|
|
@@ -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");
|