20230213-1

临时发布20240103
ddlucky 2 years ago
parent 1fba15e2d4
commit e1d4971e8b

@ -3387,44 +3387,42 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement
var cdc = new CommonDataContext();
var apphead = new ch_fee_recvapplication_md();
foreach (var body in bodyList)
{
var bodyhead = cdc.ch_fee_recvapplication.FirstOrDefault(x => x.BILLNO == body.BILLNO);
if (bodyhead != null)
{
if (apphead.SALECORPID == null) apphead.SALECORPID = bodyhead.SALECORPID;
else
{
if (apphead.SALECORPID != bodyhead.SALECORPID)
{
result.SetErrorInfo("不同销售公司的收费申请不能同时结算");
return result;
}
}
body.SALECORPID = bodyhead.SALECORPID;
}
else{
//
var paybodyhead = cdc.ch_fee_payapplication.FirstOrDefault(x => x.BILLNO == body.BILLNO);
if (paybodyhead != null)
{
if (apphead.SALECORPID == null) apphead.SALECORPID = paybodyhead.SALECORPID;
else
{
if (apphead.SALECORPID != paybodyhead.SALECORPID)
{
result.SetErrorInfo("不同销售公司的收费申请不能同时结算");
return result;
}
}
body.SALECORPID = paybodyhead.SALECORPID;
}
}
//foreach (var body in bodyList)
//{
// var bodyhead = cdc.ch_fee_recvapplication.FirstOrDefault(x => x.BILLNO == body.BILLNO);
}
// if (bodyhead != null)
// {
// if (apphead.SALECORPID == null) apphead.SALECORPID = bodyhead.SALECORPID;
// else
// {
// if (apphead.SALECORPID != bodyhead.SALECORPID)
// {
// result.SetErrorInfo("不同销售公司的收费申请不能同时结算");
// return result;
// }
// }
// body.SALECORPID = bodyhead.SALECORPID;
// }
// else{
// //
// var paybodyhead = cdc.ch_fee_payapplication.FirstOrDefault(x => x.BILLNO == body.BILLNO);
// if (paybodyhead != null)
// {
// if (apphead.SALECORPID == null) apphead.SALECORPID = paybodyhead.SALECORPID;
// else
// {
// if (apphead.SALECORPID != paybodyhead.SALECORPID)
// {
// result.SetErrorInfo("不同销售公司的收费申请不能同时结算");
// return result;
// }
// }
// body.SALECORPID = paybodyhead.SALECORPID;
// }
// }
//}
var List = bodyList.Select(s => s.BILLNO).ToList();

@ -122,7 +122,7 @@ namespace DSWeb.MvcShipping.Controllers
strSql.Append(",case A.OPDATE when '1900-01-01 00:00:00.000' then '' else CONVERT(varchar(100), A.OPDATE,23) end as OPDATE,A.ENTERP,A.DELIVERYDATE");
strSql.Append(",case A.CUSTOMDATE when '1900-01-01 00:00:00.000' then '' else CONVERT(varchar(100), A.CUSTOMDATE,23) end as CUSTOMDATE,A.SERVICECONTRACTNO");
strSql.Append(",A.CUSTSERVICE, A.PORTLOAD, A.PORTDISCHARGE,B.DESTINATION, A.CUSTOMNO, A.ACCDATE,A.CARRIER, A.BSSOURCE,A.BSSOURCEDETAIL,A.LANE, A.FORWARDER,A.NETWEIGHT,A.KGS,A.TEU,A.CNTRTOTAL,A.CORPID");
strSql.Append(",A.CUSTSERVICE, A.PORTLOAD, A.PORTDISCHARGE,B.DESTINATION, A.CUSTOMNO, B.ACCDATE,A.CARRIER, A.BSSOURCE,A.BSSOURCEDETAIL,A.LANE, A.FORWARDER,A.NETWEIGHT,A.KGS,A.TEU,A.CNTRTOTAL,A.CORPID");
strSql.Append(",A.CNTR1,A.CNTR2,A.CNTR3,A.CNTR4,A.CNTR5,A.CNTR6,A.CNTR7,A.CNTR8,A.CNTR9,A.CNTR10,A.OTCNTR,A.TRADETYPE,A.GOODSNAME,A.FEESTATUS,A.PKGS,A.CBM,A.ORDERNO,A.SALECORPID,(select [NAME] from [company] where GID=A.SALECORPID) as SALECORP");
strSql.Append(",(CASE A.FEESTATUS WHEN 1 THEN '锁定' else '未锁定' end) as FEESTATUSREF,A.AGENTID ");
strSql.Append(",F.CUSTOMERNAME AS CUSTNAME ");
@ -210,7 +210,7 @@ namespace DSWeb.MvcShipping.Controllers
strSql.Append(" A.ETD,A.ETA,A.ATD");
strSql.Append(" ,A.OPDATE,A.ENTERP,A.DELIVERYDATE");
strSql.Append(" ,A.CUSTOMDATE,A.SERVICECONTRACTNO");
strSql.Append(" ,A.CUSTSERVICE, A.PORTLOAD, A.PORTDISCHARGE,B.DESTINATION, A.CUSTOMNO, A.ACCDATE,A.CARRIER, A.BSSOURCE,A.BSSOURCEDETAIL, A.LANE, A.FORWARDER,A.NETWEIGHT,A.KGS,A.TEU,A.CNTRTOTAL,A.CORPID");
strSql.Append(" ,A.CUSTSERVICE, A.PORTLOAD, A.PORTDISCHARGE,B.DESTINATION, A.CUSTOMNO, B.ACCDATE,A.CARRIER, A.BSSOURCE,A.BSSOURCEDETAIL, A.LANE, A.FORWARDER,A.NETWEIGHT,A.KGS,A.TEU,A.CNTRTOTAL,A.CORPID");
strSql.Append(" ,A.CNTR1,A.CNTR2,A.CNTR3,A.CNTR4,A.CNTR5,A.CNTR6,A.CNTR7,A.CNTR8,A.CNTR9,A.CNTR10,A.OTCNTR,A.TRADETYPE,A.GOODSNAME,A.FEESTATUS,A.PKGS,A.CBM,A.ORDERNO,A.SALECORPID,A.STLDATE,F.CUSTOMERNAME,C.[DESCRIPTION] ");
strSql.Append(",A.STLNAME, S.SETTLETIME,B.SALE,B.OPDATE,A.AGENTID");
@ -1602,6 +1602,9 @@ namespace DSWeb.MvcShipping.Controllers
public ContentResult SumListData(int start, int limit, string condition, string sort)
{
//20230213 用于替换查询语句中 A. 的部分
//因为指定会计期间时,如果选择了“合并更改单”,对会计期间的查询限制应该是 [业务和“更改单所附着的业务(A)”]的会计期间
condition = condition.Replace(" A.", " B.");
var strDa = GetRangDAStr("index", Convert.ToString(Session["USERID"]).ToString().Trim(), Convert.ToString(Session["SHOWNAME"]).ToString().Trim(), Convert.ToString(Session["COMPANYID"]).ToString().Trim());

@ -253,9 +253,10 @@ namespace DSWeb.MvcShipping.Controllers
strSql.Append(",SUM(G.NOACCTAXRMBDR) NOACCTAXRMBDR,SUM(G.NOACCTAXRMBCR) NOACCTAXRMBCR,SUM(G.NOACCTAXUSDDR) NOACCTAXUSDDR,SUM(G.NOACCTAXUSDCR) NOACCTAXUSDCR,SUM(G.NOACCTAXOTDR) NOACCTAXOTDR");
strSql.Append(",SUM(G.NOACCTAXOTCR) NOACCTAXOTCR,SUM(G.NOACCTAXTTLDR) NOACCTAXTTLDR,SUM(G.NOACCTAXTTLCR) NOACCTAXTTLCR,SUM(G.NOACCTAXUSDDR-G.NOACCTAXUSDCR) AS NOACCTAXUSDPROFIT");
strSql.Append(",SUM(G.NOACCTAXRMBDR-G.NOACCTAXRMBCR) AS NOACCTAXRMBPROFIT,SUM(G.NOACCTAXOTDR-G.NOACCTAXOTCR) AS NOACCTAXOTPROFIT,SUM(G.NOACCTAXTTLDR-G.NOACCTAXTTLCR) AS NOACCTAXTTLPROFIT ");
// strSql.Append(",SUM(G.NOACCTAXTTLDR) AS TTLACCTAXDR,SUM(G.NOACCTAXTTLCR) AS TTLACCTAXCR,SUM(G.NOACCTAXTTLDR-G.NOACCTAXTTLCR) AS TTLACCTAXPROFIT");
strSql.Append(" FROM V_OP_BS B ");
strSql.Append("LEFT JOIN V_OP_BILL A ON (A.PARENTID=B.BSNO) ");
// strSql.Append(",SUM(G.NOACCTAXTTLDR) AS TTLACCTAXDR,SUM(G.NOACCTAXTTLCR) AS TTLACCTAXCR,SUM(G.NOACCTAXTTLDR-G.NOACCTAXTTLCR) AS TTLACCTAXPROFIT");
strSql.Append(" cd.COUNTRY,cd.CHAU ");
strSql.Append(" FROM V_OP_BS B left join code_disport cd on cd.PORT=b.DESTINATION ");
strSql.Append("LEFT JOIN V_OP_BILL A ON (A.PARENTID=B.BSNO) ");
if (!string.IsNullOrEmpty(feecondition))
{
strSql.Append("LEFT JOIN (SELECT BSNO, sum(RMBDR) RMBDR,SUM(RMBCR) RMBCR,SUM(STLRMBDR) STLRMBDR,SUM(STLRMBCR) STLRMBCR,SUM(USDDR) USDDR");

@ -186,8 +186,25 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
new SqlParameter(PARM_FEE_GID,SqlDbType.VarChar,36)
};
var customertypeDic = new Dictionary<string, string>
{
{ "CUSTOMERNAME", "委托单位" },
{ "CARRIER", "船公司" },
{ "FORWARDER", "订舱代理" },
{ "CUSTOMSER", "报关行" },
{ "TRUCKER", "车队" },
{ "SHIPPERID", "发货人" },
{ "CONSIGNEEID", "收货人" },
{ "NOTIFYPARTYID", "通知人" },
{ "AGENTID", "代理" },
{ "YARD", "场站" }
};
foreach (MsChFee feeEntity in tempFeeEntities)
{
if (customertypeDic.ContainsKey(feeEntity.CustomerType))
feeEntity.CustomerType = customertypeDic[feeEntity.CustomerType];
if (feeEntity.BsNo == "*" || feeEntity.BsNo == "")
{
SqlParameter[] parms = GetInsertParms();

@ -3502,6 +3502,11 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
return result;
}
/// <summary>
/// 判断指定的提单信息
/// </summary>
/// <param name="head"></param>
/// <returns></returns>
private static DBResult (MsOp_BLISSUEmb head)
{
var result = new DBResult();

@ -2579,6 +2579,7 @@ Ext.extend(Shipping.MsCwVouchersGlEdit, Ext.Panel, {
var strACCDATE = arrayList[5].toString();
//this.formHead.getForm().findField('VOUNO').setValue(sVOUNO);
this.formHead.getForm().findField('VOUNO').setValue("");
this.formHead.getForm().findField('lbTitle2').setValue(strY + "年第" + strM + "期");
//
this.formHead.getForm().findField('VOUDATE').setValue(strVOUDATE);
@ -2588,7 +2589,7 @@ Ext.extend(Shipping.MsCwVouchersGlEdit, Ext.Panel, {
Ext.getCmp('VOUNO_HAO').hide();
//
this.GetAddText();
//this.GetAddText();
this.setBtnStatusDisable(true);
} else {

@ -6627,11 +6627,22 @@ Ext.extend(Shipping.MsRptNoTotalIndex, Ext.Panel, {
var etdDate_Max = form.findField('PS_ETDDATEEND').getRawValue();
sql = sql + getAndConSql(sql, etdDate_Max, " B.ETD<='" + etdDate_Max + " 23:59:59'");
this.CheckAmend.checked == true
//如果勾选 合并更改单 则查询时更改单的会计期间 依照更改单所属的业务的会计期间
var accDate_Min = form.findField('PS_ACCDATEBGN').getRawValue();
sql = sql + getAndConSql(sql, accDate_Min, " B.ACCDATE>='" + accDate_Min + "'");
if (this.CheckAmend.checked == true) {
sql = sql + getAndConSql(sql, accDate_Min, " A.ACCDATE>='" + accDate_Min + "'");
} else {
sql = sql + getAndConSql(sql, accDate_Min, " B.ACCDATE>='" + accDate_Min + "'");
}
var accDate_Max = form.findField('PS_ACCDATEEND').getRawValue();
sql = sql + getAndConSql(sql, accDate_Max, " B.ACCDATE<='" + accDate_Max + "'");
if (this.CheckAmend.checked == true) {
sql = sql + getAndConSql(sql, accDate_Max, " A.ACCDATE<='" + accDate_Max + "'");
} else {
sql = sql + getAndConSql(sql, accDate_Max, " B.ACCDATE<='" + accDate_Max + "'");
}
var ENTERP = form.findField('PS_ENTERP').getValue();
sql = sql + getAndConSql(sql, ENTERP, "B.ENTERP='" + ENTERP + "'");

@ -193,7 +193,9 @@ Ext.extend(Shipping.MsRptOpProfitIndex, Ext.Panel, {
{ name: 'STLUSDCR', type: 'number' },
{ name: 'STLOTCR', type: 'number' },
{ name: 'STLTTLCR', type: 'number' },
{ name: 'PROFITRATE', type: 'number' }
{ name: 'PROFITRATE', type: 'number' },
{ name: 'COUNTRY', type: 'string' },
{ name: 'CHAU', type: 'string' }
],
remoteSort: true,
@ -913,7 +915,9 @@ Ext.extend(Shipping.MsRptOpProfitIndex, Ext.Panel, {
align: 'right',
width: 90
}]
}, {
}
,{
text: Zi.LAN.ALLNOACCTAX,
dataIndex: 'ALLNOACCTAX',
columns: [{
@ -1002,7 +1006,17 @@ Ext.extend(Shipping.MsRptOpProfitIndex, Ext.Panel, {
width: 90
}]
}
, {
sortable: true,
dataIndex: 'COUNTRY',
text: Zi.LAN.COUNTRY,
width: 86
}, {
sortable: true,
dataIndex: 'CHAU',
text: Zi.LAN.CHAU,
width: 86
}
];
this.Pagenum = Ext.create('Ext.form.field.Number', {

Loading…
Cancel
Save