|
|
@@ -249,6 +249,11 @@ public class InvAccountOperateServiceImpl extends ServiceImpl<InvAccountOperateM
|
|
|
|
|
|
if(invAccountOperate.getInvoiceId() != null){
|
|
|
InvAccountIncoice byId = invAccountIncoiceService.getById(invAccountOperate.getInvoiceId());
|
|
|
+
|
|
|
+ if (new BigDecimal(byId.getPayoutMoney()).compareTo(new BigDecimal(invAccountOperate.getApplyAmount())) < 0){
|
|
|
+ throw new SystemException("撤销金额大于已进账金额");
|
|
|
+ }
|
|
|
+
|
|
|
byId.setPayoutMoney(new BigDecimal(byId.getPayoutMoney()).subtract(new BigDecimal(invAccountOperate.getApplyAmount())).toString());
|
|
|
byId.setNotPayoutMoney(new BigDecimal(byId.getNotPayoutMoney()).add(new BigDecimal(invAccountOperate.getApplyAmount())).toString());
|
|
|
invAccountIncoiceService.updateById(byId);
|