wip:获取标准价
This commit is contained in:
parent
a27d050b49
commit
1c5a7e853f
@ -384,7 +384,10 @@ public class ClientUtils {
|
|||||||
models.setValue("yem_exwrmbprice", dm.getBigDecimal("yem_standsalesprice"), rowInfo);
|
models.setValue("yem_exwrmbprice", dm.getBigDecimal("yem_standsalesprice"), rowInfo);
|
||||||
}
|
}
|
||||||
if (yem_exrate.compareTo(BigDecimal.ZERO) != 0) {
|
if (yem_exrate.compareTo(BigDecimal.ZERO) != 0) {
|
||||||
models.setValue("yem_safobprice", roundUpNew(dm.getBigDecimal("yem_standsalesprice").divide(yem_exrate, RoundingMode.HALF_UP)), rowInfo);
|
DynamicObjectCollection coll = getTypeColl(models);
|
||||||
|
if (!isFCAPriceItem(coll, rowInfo)) {
|
||||||
|
models.setValue("yem_safobprice", roundUpNew(dm.getBigDecimal("yem_standsalesprice").divide(yem_exrate, RoundingMode.HALF_UP)), rowInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -476,7 +479,10 @@ public class ClientUtils {
|
|||||||
// }else {
|
// }else {
|
||||||
// }
|
// }
|
||||||
if ("Z".equals(businesssort)) {
|
if ("Z".equals(businesssort)) {
|
||||||
model.setValue("yem_safobprice", fobPrice.add(sastandardprice), rowNow);
|
DynamicObjectCollection coll = getTypeColl(model);
|
||||||
|
if (!isFCAPriceItem(coll, rowNow)) {
|
||||||
|
model.setValue("yem_safobprice", fobPrice.add(sastandardprice), rowNow);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1764,7 +1770,8 @@ public class ClientUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isFCAPriceItem(DynamicObjectCollection collection, int idx, String propKey) {
|
public static boolean isFCAPriceItem(DynamicObjectCollection collection, int idx) {
|
||||||
|
String propKey = "yem_priceitemsp";
|
||||||
DynamicObject d = collection.get(idx);
|
DynamicObject d = collection.get(idx);
|
||||||
if (d.containsProperty(propKey)) {
|
if (d.containsProperty(propKey)) {
|
||||||
DynamicObject priceItem = d.getDynamicObject(propKey);
|
DynamicObject priceItem = d.getDynamicObject(propKey);
|
||||||
@ -1779,7 +1786,7 @@ public class ClientUtils {
|
|||||||
public static boolean isFCAPriceItem(DynamicObject d) {
|
public static boolean isFCAPriceItem(DynamicObject d) {
|
||||||
DynamicObjectCollection collection = new DynamicObjectCollection();
|
DynamicObjectCollection collection = new DynamicObjectCollection();
|
||||||
collection.add(d);
|
collection.add(d);
|
||||||
return isFCAPriceItem(collection, 0, "yem_priceitemsp");
|
return isFCAPriceItem(collection, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isFCAPriceItem(IDataModel model, int idx) {
|
public static boolean isFCAPriceItem(IDataModel model, int idx) {
|
||||||
@ -1823,6 +1830,15 @@ public class ClientUtils {
|
|||||||
BigDecimal calc = sastandardfcaprice.multiply(qty);
|
BigDecimal calc = sastandardfcaprice.multiply(qty);
|
||||||
model.setValue("yem_sastandardfcaamt", calc, idx);
|
model.setValue("yem_sastandardfcaamt", calc, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算销售FOB单价
|
||||||
|
*
|
||||||
|
* 销售FOB单价=商品明细对应多功能配置中 单台加价金额(结算币别)合计值 + 销售FCA标配青岛单价+FOB与FCA费用差额
|
||||||
|
*/
|
||||||
|
public static void calculateSalesFOBUnitPrice(IDataModel model, int idx) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user