fix:外销合同数量汇总

This commit is contained in:
ljw 2024-09-13 16:12:09 +08:00
parent 9e041625db
commit d607e346c1
2 changed files with 29 additions and 29 deletions

View File

@ -44,7 +44,8 @@ public class ZJUtils {
int materialInfoRows = model.getEntryRowCount("yem_es_materialinfo"); int materialInfoRows = model.getEntryRowCount("yem_es_materialinfo");
for (int i = 0; i < materialInfoRows; i++) { for (int i = 0; i < materialInfoRows; i++) {
String businessSort = (String) model.getValue("yem_businesssort", i); String businessSort = (String) model.getValue("yem_businesssort", i);
if ("Z".equals(businessSort)) { Boolean yemIfgift = (Boolean) model.getValue("yem_ifgift", i);
if ("Z".equals(businessSort)&&!yemIfgift) {
total = total.add((BigDecimal) model.getValue("yem_qty", i)); total = total.add((BigDecimal) model.getValue("yem_qty", i));
} }
} }

View File

@ -223,7 +223,7 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
} }
break; break;
case "yem_businesssort": case "yem_businesssort":
countOrderSumNumber(); ZJUtils.countOrderSumNumberZJ(model);
setRandomDataTools();// setRandomDataTools();//
ClientUtils.lock(view, model, rowIndex); ClientUtils.lock(view, model, rowIndex);
ClientUtils.resourceNogLock(view, model, rowIndex); ClientUtils.resourceNogLock(view, model, rowIndex);
@ -233,7 +233,7 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
syncDeductionGifts(model, rowIndex); syncDeductionGifts(model, rowIndex);
break; break;
case "yem_ifgift": case "yem_ifgift":
countOrderSumNumber(); ZJUtils.countOrderSumNumberZJ(model);
ClientUtils.resourceNogLock(view, model, rowIndex); ClientUtils.resourceNogLock(view, model, rowIndex);
ClientUtils.empty(model, rowIndex, "yem_es_materialinfo", view); ClientUtils.empty(model, rowIndex, "yem_es_materialinfo", view);
ClientUtils.totalSaFobAmount(model, "yem_es_materialinfo", "yem_ifgift", "yem_safobamount", "yem_amount");//销售fob金额 汇总表头 fob金额 ClientUtils.totalSaFobAmount(model, "yem_es_materialinfo", "yem_ifgift", "yem_safobamount", "yem_amount");//销售fob金额 汇总表头 fob金额
@ -291,7 +291,6 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
ClientUtils.calculateSalesFCAStandardQingdaoUnitPrice(model, rowIndex);//销售FCA标配青岛单价 ClientUtils.calculateSalesFCAStandardQingdaoUnitPrice(model, rowIndex);//销售FCA标配青岛单价
break; break;
case "yem_qty": case "yem_qty":
countOrderSumNumber();
setRandomDataTools(); setRandomDataTools();
ZJUtils.countOrderSumNumberZJ(model); ZJUtils.countOrderSumNumberZJ(model);
setGiftGiving(); setGiftGiving();
@ -1074,31 +1073,31 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
} }
/** // /**
* @description 汇总数量到 订单总台数/数量 // * @description 汇总数量到 订单总台数/数量
* @author xwudd // * @author xwudd
* return // * return
* @time 2023/7/29 16:38 // * @time 2023/7/29 16:38
*/ // */
//
public void countOrderSumNumber() { // public void countOrderSumNumber() {
IDataModel model = this.getModel(); // IDataModel model = this.getModel();
BigDecimal total = BigDecimal.ZERO; // BigDecimal total = BigDecimal.ZERO;
DynamicObject billType = (DynamicObject) model.getValue("yem_billtype"); // DynamicObject billType = (DynamicObject) model.getValue("yem_billtype");
if (YEM.isNotEmpty(billType)) { // if (YEM.isNotEmpty(billType)) {
String number = billType.getString("number"); // String number = billType.getString("number");
int materialInfoRows = model.getEntryRowCount("yem_es_materialinfo"); // int materialInfoRows = model.getEntryRowCount("yem_es_materialinfo");
for (int i = 0; i < materialInfoRows; i++) { // for (int i = 0; i < materialInfoRows; i++) {
String businessSort = (String) model.getValue("yem_businesssort", i); // String businessSort = (String) model.getValue("yem_businesssort", i);
Boolean yemIfgift = (Boolean) model.getValue("yem_ifgift", i); // Boolean yemIfgift = (Boolean) model.getValue("yem_ifgift", i);
if ("Z".equals(businessSort)&&!yemIfgift) { // if ("Z".equals(businessSort)&&!yemIfgift) {
total = total.add((BigDecimal) model.getValue("yem_qty", i)); // total = total.add((BigDecimal) model.getValue("yem_qty", i));
} // }
} // }
//
} // }
model.setValue("yem_ordersumnumber", total); // model.setValue("yem_ordersumnumber", total);
} // }
public void selectF7SourceNo(BeforeF7SelectEvent e, int row) { public void selectF7SourceNo(BeforeF7SelectEvent e, int row) {