Commit 964b0dc3 by 13420

扣款金额不能大于销售开票剩余金额bug修改

parent 4caab276
......@@ -158,7 +158,7 @@ public class HGCWTools {
DecimalFormat decimalFormat = new DecimalFormat("#.000");
HGCW008 hgcw008 = results.get(0);
BigDecimal remainingAmount = new BigDecimal(decimalFormat.format(hgcw008.getRemainingAmount().subtract(deductionAmount)));
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) {
throw new PlatException("扣款金额不能大于结算单剩余金额!");
}
hgcw008.setRemainingAmount(remainingAmount);
......@@ -343,7 +343,7 @@ public class HGCWTools {
DecimalFormat decimalFormat = new DecimalFormat("#.000");
HGCW010 HGCW010 = results.get(0);
BigDecimal remainingAmount = new BigDecimal(decimalFormat.format(HGCW010.getRemainingAmount().subtract(cutAmount)));
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) {
throw new PlatException("扣款金额不能大于销售开票剩余金额!");
}
HGCW010.setRemainingAmount(remainingAmount);
......@@ -416,7 +416,7 @@ public class HGCWTools {
DecimalFormat decimalFormat = new DecimalFormat("#.000");
HGCW012 HGCW012 = results.get(0);
BigDecimal remainingAmount = new BigDecimal(decimalFormat.format(HGCW012.getRemainingAmount().subtract(cutAmount)));
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) {
throw new PlatException("扣款金额不能大于采购收票剩余金额!");
}
HGCW012.setRemainingAmount(remainingAmount);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment