1.金额字段处理
This commit is contained in:
parent
3bf1405120
commit
aaf89f5fc7
|
|
@ -68,7 +68,7 @@ public class PurOrderUnReversePayBillPlugin extends AbstractOperationServicePlug
|
||||||
paybill.set("unsettleamount", unsettleamount);//未结算金额
|
paybill.set("unsettleamount", unsettleamount);//未结算金额
|
||||||
paybill.set("unsettleamountbase", unsettleamountbase);//未结算金额(本位币)
|
paybill.set("unsettleamountbase", unsettleamountbase);//未结算金额(本位币)
|
||||||
paybill.set("entry", entries);
|
paybill.set("entry", entries);
|
||||||
SaveServiceHelper.save(new DynamicObject[]{paybill});// }
|
SaveServiceHelper.save(new DynamicObject[]{paybill});//
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,8 @@ public class SaleOutBillConvertPlugin extends AbstractConvertPlugIn implements P
|
||||||
}
|
}
|
||||||
String batch = jsonMap.get("batch") != null ? jsonMap.get("batch").toString() : null; // 批次
|
String batch = jsonMap.get("batch") != null ? jsonMap.get("batch").toString() : null; // 批次
|
||||||
String fromZone = jsonMap.get("fromZone") != null ? jsonMap.get("fromZone").toString() : null; // 库区
|
String fromZone = jsonMap.get("fromZone") != null ? jsonMap.get("fromZone").toString() : null; // 库区
|
||||||
DynamicObject bd_warehouse=null;
|
DynamicObject bd_warehouse = null;
|
||||||
if(fromZone!=null){
|
if (fromZone != null) {
|
||||||
String wareNumber = wareTypeMap.get(fromZone);
|
String wareNumber = wareTypeMap.get(fromZone);
|
||||||
bd_warehouse = BusinessDataServiceHelper.loadSingle("bd_warehouse", new QFilter[]{new QFilter("number", QCP.equals, wareNumber)});
|
bd_warehouse = BusinessDataServiceHelper.loadSingle("bd_warehouse", new QFilter[]{new QFilter("number", QCP.equals, wareNumber)});
|
||||||
}
|
}
|
||||||
|
|
@ -113,13 +113,14 @@ public class SaleOutBillConvertPlugin extends AbstractConvertPlugIn implements P
|
||||||
// 处理第一次逻辑
|
// 处理第一次逻辑
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
// 第一次直接赋值
|
// 第一次直接赋值
|
||||||
|
BigDecimal qty = entry.getBigDecimal("qty");//原数量
|
||||||
entry.set("qty", quantity);
|
entry.set("qty", quantity);
|
||||||
entry.set("baseqty", quantity);
|
entry.set("baseqty", quantity);
|
||||||
entry.set("tqq9_goods", tqq9_goodspackage);
|
entry.set("tqq9_goods", tqq9_goodspackage);
|
||||||
entry.set("producedate", manufactureDate);
|
entry.set("producedate", manufactureDate);
|
||||||
entry.set("expirydate", expirationDate);
|
entry.set("expirydate", expirationDate);
|
||||||
entry.set("lotnumber", batch);
|
entry.set("lotnumber", batch);
|
||||||
if(bd_warehouse!=null){
|
if (bd_warehouse != null) {
|
||||||
entry.set("warehouse", bd_warehouse);
|
entry.set("warehouse", bd_warehouse);
|
||||||
}
|
}
|
||||||
entry.set("tqq9_wmsdetailid", wmsDetailId);
|
entry.set("tqq9_wmsdetailid", wmsDetailId);
|
||||||
|
|
@ -128,6 +129,18 @@ public class SaleOutBillConvertPlugin extends AbstractConvertPlugIn implements P
|
||||||
entry.set("tqq9_scs", tqq9_proxyandfactory);
|
entry.set("tqq9_scs", tqq9_proxyandfactory);
|
||||||
DynamicObjectCollection billentry_lk = entry.getDynamicObjectCollection("billentry_lk");
|
DynamicObjectCollection billentry_lk = entry.getDynamicObjectCollection("billentry_lk");
|
||||||
billentry_lk.clear();
|
billentry_lk.clear();
|
||||||
|
BigDecimal amount = entry.getBigDecimal("amount");//金额
|
||||||
|
BigDecimal taxamount = entry.getBigDecimal("taxamount");//税额
|
||||||
|
BigDecimal amountandtax = entry.getBigDecimal("amountandtax");//税额
|
||||||
|
amount=amount.multiply(quantity).divide(qty);
|
||||||
|
taxamount=taxamount.multiply(quantity).divide(qty);
|
||||||
|
amountandtax=amountandtax.multiply(quantity).divide(qty);
|
||||||
|
entry.set("amount", amount);
|
||||||
|
entry.set("curamount", amount);
|
||||||
|
entry.set("taxamount", taxamount);
|
||||||
|
entry.set("curtaxamount", taxamount);
|
||||||
|
entry.set("amountandtax", amountandtax);
|
||||||
|
entry.set("curamountandtax", amountandtax);
|
||||||
} else {
|
} else {
|
||||||
DataEntityPropertyCollection properties = entry.getDataEntityType().getProperties();
|
DataEntityPropertyCollection properties = entry.getDataEntityType().getProperties();
|
||||||
// 后续循环复制entry并赋值
|
// 后续循环复制entry并赋值
|
||||||
|
|
@ -135,13 +148,14 @@ public class SaleOutBillConvertPlugin extends AbstractConvertPlugIn implements P
|
||||||
for (IDataEntityProperty property : properties) {
|
for (IDataEntityProperty property : properties) {
|
||||||
newEntry.set(property.getName(), entry.get(property.getName()));
|
newEntry.set(property.getName(), entry.get(property.getName()));
|
||||||
}
|
}
|
||||||
|
BigDecimal qty = entry.getBigDecimal("qty");//原数量
|
||||||
newEntry.set("qty", quantity);
|
newEntry.set("qty", quantity);
|
||||||
newEntry.set("baseqty", quantity);
|
newEntry.set("baseqty", quantity);
|
||||||
newEntry.set("tqq9_goods", tqq9_goodspackage);
|
newEntry.set("tqq9_goods", tqq9_goodspackage);
|
||||||
newEntry.set("producedate", manufactureDate);
|
newEntry.set("producedate", manufactureDate);
|
||||||
newEntry.set("expirydate", expirationDate);
|
newEntry.set("expirydate", expirationDate);
|
||||||
newEntry.set("lotnumber", batch);
|
newEntry.set("lotnumber", batch);
|
||||||
if(bd_warehouse!=null){
|
if (bd_warehouse != null) {
|
||||||
newEntry.set("warehouse", bd_warehouse);
|
newEntry.set("warehouse", bd_warehouse);
|
||||||
}
|
}
|
||||||
newEntry.set("tqq9_wmsdetailid", wmsDetailId);
|
newEntry.set("tqq9_wmsdetailid", wmsDetailId);
|
||||||
|
|
@ -150,6 +164,18 @@ public class SaleOutBillConvertPlugin extends AbstractConvertPlugIn implements P
|
||||||
newEntry.set("tqq9_scs", tqq9_proxyandfactory);
|
newEntry.set("tqq9_scs", tqq9_proxyandfactory);
|
||||||
DynamicObjectCollection billentry_lk = newEntry.getDynamicObjectCollection("billentry_lk");
|
DynamicObjectCollection billentry_lk = newEntry.getDynamicObjectCollection("billentry_lk");
|
||||||
billentry_lk.clear();
|
billentry_lk.clear();
|
||||||
|
BigDecimal amount = entry.getBigDecimal("amount");//金额
|
||||||
|
BigDecimal taxamount = entry.getBigDecimal("taxamount");//税额
|
||||||
|
BigDecimal amountandtax = entry.getBigDecimal("amountandtax");//税额
|
||||||
|
amount=amount.multiply(quantity).divide(qty);
|
||||||
|
taxamount=taxamount.multiply(quantity).divide(qty);
|
||||||
|
amountandtax=amountandtax.multiply(quantity).divide(qty);
|
||||||
|
entry.set("amount", amount);
|
||||||
|
entry.set("curamount", amount);
|
||||||
|
entry.set("taxamount", taxamount);
|
||||||
|
entry.set("curtaxamount", taxamount);
|
||||||
|
entry.set("amountandtax", amountandtax);
|
||||||
|
entry.set("curamountandtax", amountandtax);
|
||||||
// 处理完新entry后的逻辑(比如加入集合或其他操作)
|
// 处理完新entry后的逻辑(比如加入集合或其他操作)
|
||||||
iterator.add(newEntry);
|
iterator.add(newEntry);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue