44673626 3 years ago
parent
commit
6939c5a0fe
  1. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnInvoiceSettledDetailDiffDapperRepository.cs
  2. 1
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnInvoiceSettledDetailDiffDapperRepository.cs

@ -96,7 +96,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" LEFT JOIN Set_fis b ON a.ChassisNumber = b.ChassisNumber2 \n" + " LEFT JOIN Set_fis b ON a.ChassisNumber = b.ChassisNumber2 \n" +
" AND a.KENNCode = b.KENNCode \n" + " AND a.KENNCode = b.KENNCode \n" +
" AND a.MaterialCode = b.ItemCode\n" + " AND a.MaterialCode = b.ItemCode\n" +
" LEFT JOIN ( SELECT SUM( amt )/ SUM( Qty ) InvoicePrice, MaterialCode FROM set_invoice WHERE version = '202110' GROUP BY materialcode ) c ON a.MaterialCode = c.MaterialCode\n" + " LEFT JOIN ( SELECT SUM( amt )/ SUM( Qty ) InvoicePrice, MaterialCode FROM set_invoice WHERE version = '{0}' GROUP BY materialcode ) c ON a.MaterialCode = c.MaterialCode\n" +
" LEFT JOIN set_material d ON a.MaterialCode = d.CustomerPartCode \n" + " LEFT JOIN set_material d ON a.MaterialCode = d.CustomerPartCode \n" +
" WHERE\n" + " WHERE\n" +
" b.Qty IS NULL \n" + " b.Qty IS NULL \n" +

1
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs

@ -91,6 +91,7 @@ namespace SettleAccount.Job.Services
{ {
itm.InvocieAmt =Math.Round( itm.InvoiceQty * itm.InvoicePrice,2); itm.InvocieAmt =Math.Round( itm.InvoiceQty * itm.InvoicePrice,2);
itm.DiffPrice = itm.Price - itm.InvoicePrice; itm.DiffPrice = itm.Price - itm.InvoicePrice;
itm.DiffSettleFisQty = itm.SettledQty;
} }
_ls=_ls.OrderBy(p => p.ChassisNumber).ThenBy(p=>p.KENNCode).ThenBy(p=>p.SapMaterialCode).ToList(); _ls=_ls.OrderBy(p => p.ChassisNumber).ThenBy(p=>p.KENNCode).ThenBy(p=>p.SapMaterialCode).ToList();

Loading…
Cancel
Save