fix:
1.外销合同赠送配件页签汇总赋值
This commit is contained in:
parent
5834e7e53f
commit
8206570fde
@ -1226,10 +1226,14 @@ public class SalesOrderUtils {
|
||||
List<DynamicObject> value = entry.getValue();
|
||||
DynamicObject basemodelib = BusinessDataServiceHelper.loadSingle(productmodelId, "yem_bd_basemodelib");
|
||||
long products = basemodelib.getLong("yem_products.id");
|
||||
// BigDecimal singlepartgiftmat = BigDecimal.ZERO;
|
||||
BigDecimal qty = BigDecimal.ZERO;
|
||||
BigDecimal singlepartgiftmat = BigDecimal.ZERO;
|
||||
for (DynamicObject dynamicObject : value) {
|
||||
BigDecimal qty = dynamicObject.getBigDecimal("yem_qty");
|
||||
BigDecimal singlepartgiftmat = dynamicObject.getBigDecimal("yem_singlepartgiftmat"); // 单台配件金额
|
||||
qty = qty.add(dynamicObject.getBigDecimal("yem_qty"));
|
||||
if (singlepartgiftmat.compareTo(BigDecimal.ZERO) == 0) {
|
||||
singlepartgiftmat = dynamicObject.getBigDecimal("yem_singlepartgiftmat");
|
||||
}
|
||||
}
|
||||
BigDecimal amount = qty.multiply(singlepartgiftmat);
|
||||
if (singlepartgiftmat.compareTo(BigDecimal.ZERO) == 0) continue;
|
||||
DynamicObject addNew = giftEntry.addNew();
|
||||
@ -1241,7 +1245,6 @@ public class SalesOrderUtils {
|
||||
addNew.set("yem_giveamtbase", amount.multiply(exrate)); // 配件金额本位币
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Long> filterColor(IDataModel model, String entryKey) {
|
||||
ArrayList<Long> list = Lists.newArrayList();
|
||||
|
Loading…
Reference in New Issue
Block a user