1.订舱上出口报关金额差值只要合计一致就可以允许下推,
2.销售出库增加单台赠送配件金额,合同一路携带,出库生成赠送配件信息时,数量根据机型+单台赠送配件金额汇总(同合同逻辑)
This commit is contained in:
25655 2025-03-01 15:57:21 +08:00
parent 6fcc1de663
commit a71a6adf42

View File

@ -235,11 +235,13 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
String yemProducts = loadSingle.getString("yem_products.number");
String aLong = loadSingle.getString("yem_productmodel.yem_products.number");
BigDecimal yemQty = loadSingle.getBigDecimal("yem_qty");
if (map.get(yemContractnumbersM+yemShipmentnumbersM+yemProducts+aLong) != null) {
BigDecimal bigDecimal = map.get(yemContractnumbersM+yemShipmentnumbersM+yemProducts+aLong);
map.put(yemContractnumbersM+yemShipmentnumbersM+yemProducts+aLong, bigDecimal.add(yemQty));
} else {
map.put(yemContractnumbersM+yemShipmentnumbersM+yemProducts+aLong, yemQty);
BigDecimal yemSinglepartgiftmat = loadSingle.getBigDecimal("yem_singlepartgiftmat");
if (yemSinglepartgiftmat.compareTo(BigDecimal.ZERO) != 0) {
if (map.get(yemContractnumbersM + yemShipmentnumbersM + yemProducts + aLong) != null) {
map.compute(yemContractnumbersM + yemShipmentnumbersM + yemProducts + aLong, (k, bigDecimal) -> bigDecimal.add(yemQty));
} else {
map.put(yemContractnumbersM + yemShipmentnumbersM + yemProducts + aLong, yemQty);
}
}
}
DynamicObjectCollection yemEsSalesorderL = this.getModel().getEntryEntity("yem_es_salesorder_l");
@ -1285,9 +1287,9 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
String name = dataEntity.getDataEntityType().getName();
DynamicObjectCollection materialinfo = dataEntity.getDynamicObjectCollection("yem_es_materialinfo");
BigDecimal sum = BigDecimal.ZERO;
boolean allonPush = true;
BigDecimal allonPush = BigDecimal.ZERO;
// boolean allonPush = true;
for (DynamicObject dynamicObject : materialinfo) {
BigDecimal adstamount = dynamicObject.getBigDecimal("yem_adstamount"); // 销售出库金额-提交
BigDecimal saamtpriceclause;
if ("yem_es_declaredocx".equals(name)) {
@ -1299,13 +1301,18 @@ public class StorageTransEdit extends AbstractBillPlugIn implements BeforeF7Sele
}
BigDecimal amt = adstamount.subtract(saamtpriceclause);
if (amt.compareTo(BigDecimal.ZERO) != 0) {
allonPush = false;
BigDecimal yemExportmat = dynamicObject.getBigDecimal("yem_exportmat");
if (yemExportmat.compareTo(BigDecimal.ZERO) > 0) {
allonPush = allonPush.add(yemExportmat);
}
sum = sum.add(amt);
dynamicObject.set("yem_exportmat", amt);
}
dataEntity.set("yem_exportmatsum", sum);
dataEntity.set("yem_allonpush", allonPush);
if (allonPush.compareTo(BigDecimal.ZERO) == 0) {
dataEntity.set("yem_allonpush", true);
}else {
dataEntity.set("yem_allonpush", false);
}
}
}