Переглянути джерело

订单明细新增custamount逻辑优化

hu 3 місяців тому
батько
коміт
f2f507e0a2

+ 2 - 2
src/custom/restcontroller/webmanage/sale/order/OrderItems.java

@@ -164,12 +164,12 @@ public class OrderItems extends Controller {
                 pricerate = (pricerate.compareTo(BigDecimal.ZERO) == 0 ? new BigDecimal(1) : pricerate);
             }
 
-
+            custamount = item.getBigDecimal("custamount");
             int year = Year.now().getValue();
             int quarter = YearMonth.now().get(IsoFields.QUARTER_OF_YEAR);
             Rows custamountrows = dbConnect.runSqlQuery("select * from sa_agents where sys_enterpriseid=" + sys_enterpriseid + " and siteid='" + siteid + "'");
             if (!custamountrows.isEmpty()) {
-                custamount = custamountrows.get(0).getBigDecimal("custamount");
+
                 if (custamountrows.get(0).getInteger("year") == year && custamountrows.get(0).getInteger("quarter") == quarter) {
                     if (custamountrows.get(0).getBigDecimal("pricerate").compareTo(BigDecimal.ZERO) > 0) {
                         rwpricerate = custamountrows.get(0).getBigDecimal("pricerate");