Compare commits
3 Commits
3d344212fc
...
e61f6fe6f5
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e61f6fe6f5 | ||
![]() |
91e9efd122 | ||
![]() |
85d54a455f |
@ -532,6 +532,11 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
|
|||||||
case "yem_squareqty":
|
case "yem_squareqty":
|
||||||
ClientUtils.calculatePortAmt(model, rowIndex);//计算港杂费
|
ClientUtils.calculatePortAmt(model, rowIndex);//计算港杂费
|
||||||
break;
|
break;
|
||||||
|
case "yem_priceitemsp":
|
||||||
|
ClientUtils.countAfterFrontAmt(model, rowIndex);//计算折扣后销售金额
|
||||||
|
ClientUtils.calculateSalesFCAStandardQingdaoUnitPrice(model, rowIndex);//销售FCA标配青岛单价
|
||||||
|
ClientUtils.calculateSalesFOBUnitPrice(model, -1);//计算销售FOB单价
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1640,11 +1640,27 @@ public class ClientUtils {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public static void countAfterFrontAmt(IDataModel model, int row) {
|
public static void countAfterFrontAmt(IDataModel model, int row) {
|
||||||
|
DynamicObject dataEntity = model.getDataEntity(true);
|
||||||
Boolean ifGift = (Boolean) model.getValue("yem_ifgift", row);
|
Boolean ifGift = (Boolean) model.getValue("yem_ifgift", row);
|
||||||
if (!ifGift) {
|
if (!ifGift) {
|
||||||
BigDecimal saFobAmount = (BigDecimal) model.getValue("yem_safobamount", row);
|
BigDecimal saFobAmount = (BigDecimal) model.getValue("yem_safobamount", row);
|
||||||
BigDecimal disAmt = (BigDecimal) model.getValue("yem_disamt", row);
|
BigDecimal disAmt = (BigDecimal) model.getValue("yem_disamt", row);
|
||||||
model.setValue("yem_afterfrontdisamt", saFobAmount.subtract(disAmt), row);
|
if (isFCAPriceItem(model, row)) {
|
||||||
|
// 折扣后销售金额 = 商品明细对应多功能配置中 单台加价金额(结算币别)合计值 + 销售FCA标配青岛单价- 折扣金额
|
||||||
|
DynamicObjectCollection c = dataEntity.getDynamicObjectCollection("yem_es_materialinfo");
|
||||||
|
|
||||||
|
DynamicObject d = c.get(row);
|
||||||
|
DynamicObjectCollection subC = d.getDynamicObjectCollection("yem_multiconfig");
|
||||||
|
BigDecimal sumAmt = BigDecimal.ZERO;
|
||||||
|
for (DynamicObject sub : subC) {
|
||||||
|
BigDecimal decimal = sub.getBigDecimal("yem_unitsetamount");
|
||||||
|
sumAmt = sumAmt.add(decimal);
|
||||||
|
}
|
||||||
|
BigDecimal sastandardfcaprice = (BigDecimal) model.getValue("yem_sastandardfcaprice", row);
|
||||||
|
model.setValue("yem_afterfrontdisamt", sumAmt.add(sastandardfcaprice).subtract(disAmt));
|
||||||
|
} else {
|
||||||
|
model.setValue("yem_afterfrontdisamt", saFobAmount.subtract(disAmt), row);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
model.setValue("yem_afterfrontdisamt", null, row);
|
model.setValue("yem_afterfrontdisamt", null, row);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user