|
|
@@ -242,7 +242,7 @@ public class Accountbalance extends BaseClass {
|
|
|
throw new YosException(false, "该营销账户不存在,支出凭证无法审核");
|
|
|
} else {
|
|
|
BigDecimal canuseamount = rowsaccountbalance.get(0).getBigDecimal("creditquota").add(rowsaccountbalance.get(0).getBigDecimal("balance"));
|
|
|
- if (cashbillEntity.getAmount().compareTo(canuseamount) == 1) {
|
|
|
+ if (cashbillEntity.getAmount().compareTo(canuseamount) == 1 && cashbillEntity.getAmount().compareTo(BigDecimal.ZERO)>=0) {
|
|
|
throw new YosException(false, "该营销账户可用余额不足,支出凭证无法审核");
|
|
|
}
|
|
|
BigDecimal newbalance = rowsaccountbalance.get(0).getBigDecimal("balance").subtract(cashbillEntity.getAmount());
|
|
|
@@ -387,7 +387,7 @@ public class Accountbalance extends BaseClass {
|
|
|
throw new YosException(false, "该营销账户不存在,支出凭证无法审核");
|
|
|
} else {
|
|
|
BigDecimal canuseamount = rowsaccountbalance.get(0).getBigDecimal("creditquota").add(rowsaccountbalance.get(0).getBigDecimal("balance"));
|
|
|
- if (cashbillEntity.getAmount().compareTo(canuseamount) == 1 ) {
|
|
|
+ if (cashbillEntity.getAmount().compareTo(canuseamount) == 1 && cashbillEntity.getAmount().compareTo(BigDecimal.ZERO)>=0) {
|
|
|
throw new YosException(false, "该营销账户可用余额不足,支出凭证无法审核");
|
|
|
}
|
|
|
BigDecimal newbalance = rowsaccountbalance.get(0).getBigDecimal("balance").subtract(cashbillEntity.getAmount());
|