fix:外销合同数量汇总
This commit is contained in:
parent
9e041625db
commit
d607e346c1
@ -44,7 +44,8 @@ public class ZJUtils {
|
||||
int materialInfoRows = model.getEntryRowCount("yem_es_materialinfo");
|
||||
for (int i = 0; i < materialInfoRows; 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));
|
||||
}
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
|
||||
}
|
||||
break;
|
||||
case "yem_businesssort":
|
||||
countOrderSumNumber();
|
||||
ZJUtils.countOrderSumNumberZJ(model);
|
||||
setRandomDataTools();//
|
||||
ClientUtils.lock(view, model, rowIndex);
|
||||
ClientUtils.resourceNogLock(view, model, rowIndex);
|
||||
@ -233,7 +233,7 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
|
||||
syncDeductionGifts(model, rowIndex);
|
||||
break;
|
||||
case "yem_ifgift":
|
||||
countOrderSumNumber();
|
||||
ZJUtils.countOrderSumNumberZJ(model);
|
||||
ClientUtils.resourceNogLock(view, model, rowIndex);
|
||||
ClientUtils.empty(model, rowIndex, "yem_es_materialinfo", view);
|
||||
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标配青岛单价
|
||||
break;
|
||||
case "yem_qty":
|
||||
countOrderSumNumber();
|
||||
setRandomDataTools();
|
||||
ZJUtils.countOrderSumNumberZJ(model);
|
||||
setGiftGiving();
|
||||
@ -1074,31 +1073,31 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 汇总数量到 订单总台数/数量
|
||||
* @author xwudd
|
||||
* return
|
||||
* @time 2023/7/29 16:38
|
||||
*/
|
||||
|
||||
public void countOrderSumNumber() {
|
||||
IDataModel model = this.getModel();
|
||||
BigDecimal total = BigDecimal.ZERO;
|
||||
DynamicObject billType = (DynamicObject) model.getValue("yem_billtype");
|
||||
if (YEM.isNotEmpty(billType)) {
|
||||
String number = billType.getString("number");
|
||||
int materialInfoRows = model.getEntryRowCount("yem_es_materialinfo");
|
||||
for (int i = 0; i < materialInfoRows; i++) {
|
||||
String businessSort = (String) model.getValue("yem_businesssort", i);
|
||||
Boolean yemIfgift = (Boolean) model.getValue("yem_ifgift", i);
|
||||
if ("Z".equals(businessSort)&&!yemIfgift) {
|
||||
total = total.add((BigDecimal) model.getValue("yem_qty", i));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
model.setValue("yem_ordersumnumber", total);
|
||||
}
|
||||
// /**
|
||||
// * @description 汇总数量到 订单总台数/数量
|
||||
// * @author xwudd
|
||||
// * return
|
||||
// * @time 2023/7/29 16:38
|
||||
// */
|
||||
//
|
||||
// public void countOrderSumNumber() {
|
||||
// IDataModel model = this.getModel();
|
||||
// BigDecimal total = BigDecimal.ZERO;
|
||||
// DynamicObject billType = (DynamicObject) model.getValue("yem_billtype");
|
||||
// if (YEM.isNotEmpty(billType)) {
|
||||
// String number = billType.getString("number");
|
||||
// int materialInfoRows = model.getEntryRowCount("yem_es_materialinfo");
|
||||
// for (int i = 0; i < materialInfoRows; i++) {
|
||||
// String businessSort = (String) model.getValue("yem_businesssort", i);
|
||||
// Boolean yemIfgift = (Boolean) model.getValue("yem_ifgift", i);
|
||||
// if ("Z".equals(businessSort)&&!yemIfgift) {
|
||||
// total = total.add((BigDecimal) model.getValue("yem_qty", i));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// model.setValue("yem_ordersumnumber", total);
|
||||
// }
|
||||
|
||||
|
||||
public void selectF7SourceNo(BeforeF7SelectEvent e, int row) {
|
||||
|
Loading…
Reference in New Issue
Block a user