|
|
|
@ -3963,7 +3963,7 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var billfee = cdc.ch_fee.Where(x => x.BSNO == Bill.BSNO && x.FEETYPE == 1).ToList();
|
|
|
|
|
var billfee = cdc.ch_fee.Where(x => x.BSNO == Bill.BSNO && x.CUSTOMERNAME== Bill.CUSTOMERNAME && x.FEETYPE == 1).ToList();
|
|
|
|
|
|
|
|
|
|
if (billfee == null || billfee.Count == 0) {
|
|
|
|
|
result.OK();
|
|
|
|
@ -4183,7 +4183,15 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
|
|
|
|
|
|
|
|
|
|
var headbsnoList = feehead.Select(x => x.BSNO).Distinct().ToList();
|
|
|
|
|
|
|
|
|
|
var FeeList = cdc.ch_fee.Where(x => BSNOList.Contains(x.BSNO) && x.FEETYPE == 1 && x.FEESTATUS!=1 && x.FEESTATUS != 2 && x.FEESTATUS != 6 && x.SETTLEMENT < x.AMOUNT).ToList();
|
|
|
|
|
var FeeList = new List<ch_fee_md>();
|
|
|
|
|
|
|
|
|
|
foreach (var head in feehead) {
|
|
|
|
|
|
|
|
|
|
var temp_FeeList = cdc.ch_fee.Where(x => head.BSNO==x.BSNO && head.CUSTOMERNAME==x.CUSTOMERNAME && x.FEETYPE == 1 && x.FEESTATUS!=1 && x.FEESTATUS != 2 && x.FEESTATUS != 6 && x.SETTLEMENT < x.AMOUNT).ToList();
|
|
|
|
|
if (temp_FeeList != null) {
|
|
|
|
|
FeeList.AddRange(temp_FeeList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (FeeList == null || FeeList.Count == 0) return;
|
|
|
|
|
|
|
|
|
@ -4215,9 +4223,21 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
|
|
|
|
|
BSNOList.AddRange(amend.Select(s => s.BSNO));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var feehead = cdc.v_op_bill.Where(x => BSNOList.Contains(x.BSNO)).ToList();
|
|
|
|
|
var feehead = cdc.v_op_bill.Where(x => BSNOList.Contains(x.BSNO) || BSNOList.Contains(x.PARENTID)).ToList();
|
|
|
|
|
|
|
|
|
|
var FeeList = cdc.ch_fee.Where(x => BSNOList.Contains(x.BSNO) && x.FEETYPE == 1 && x.FEESTATUS != 1 && x.FEESTATUS != 2 && x.FEESTATUS != 6 && x.SETTLEMENT < x.AMOUNT).ToList();
|
|
|
|
|
var headbsnoList = feehead.Select(x => x.BSNO).Distinct().ToList();
|
|
|
|
|
|
|
|
|
|
var FeeList = new List<ch_fee_md>();
|
|
|
|
|
|
|
|
|
|
foreach (var head in feehead)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var temp_FeeList = cdc.ch_fee.Where(x => head.BSNO == x.BSNO && head.CUSTOMERNAME == x.CUSTOMERNAME && x.FEETYPE == 1 && x.FEESTATUS != 1 && x.FEESTATUS != 2 && x.FEESTATUS != 6 && x.SETTLEMENT < x.AMOUNT).ToList();
|
|
|
|
|
if (temp_FeeList != null)
|
|
|
|
|
{
|
|
|
|
|
FeeList.AddRange(temp_FeeList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (FeeList == null || FeeList.Count == 0) return;
|
|
|
|
|
|
|
|
|
@ -4253,6 +4273,11 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
|
|
|
|
|
|
|
|
|
|
foreach (var item in chfeeList)
|
|
|
|
|
{
|
|
|
|
|
if (item.CUSTOMERNAME != feehead.First(x => x.BSNO == item.BSNO).CUSTOMERNAME)
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var bill = feehead.FirstOrDefault(x => x.BSNO == item.BSNO);
|
|
|
|
|
var changeamount = (item.AMOUNT - item.SETTLEMENT) * item.EXCHANGERATE;
|
|
|
|
|
var change = GetNewChange(bill.SALECORPID, item.CUSTOMERNAME, CHANGETYPE, CHANGEOPLBNAME, CHANGEUSER
|
|
|
|
@ -4275,6 +4300,11 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
|
|
|
|
|
|
|
|
|
|
foreach (var item in chfeeList)
|
|
|
|
|
{
|
|
|
|
|
if (item.CUSTOMERNAME != feehead.First(x => x.BSNO == item.BSNO).CUSTOMERNAME)
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var bill = feehead.FirstOrDefault(x => x.BSNO == item.BSNO);
|
|
|
|
|
var changeamount = (item.AMOUNT - item.SETTLEMENT) * item.EXCHANGERATE;
|
|
|
|
|
var change = GetNewChange(bill.SALECORPID, item.CUSTOMERNAME, CHANGETYPE, CHANGEOPLBNAME, CHANGEUSER
|
|
|
|
|