发票差额校验逻辑

This commit is contained in:
zhangzhiguo 2025-09-23 19:26:28 +08:00
parent 1531ccff95
commit 88a726d1e0
2 changed files with 4 additions and 2 deletions

View File

@ -78,9 +78,11 @@ public class ReimbursementInvoiceTaxAmtCkOp extends AbstractOperationServicePlug
}
BigDecimal differAmount = allTaxamount.subtract(allTaxamountInvoice).abs();
if (differAmount.compareTo(TOLERANCE) > 0) {
//差额大于0且小于0.05
if (differAmount.compareTo(BigDecimal.ZERO) !=0 && differAmount.compareTo(TOLERANCE) < 0) {
this.addFatalErrorMessage(extendedDataEntity, String.format("报销税额超出发票税额:%s",differAmount.setScale(2, RoundingMode.HALF_EVEN)));
}
}
}
}

View File

@ -81,7 +81,7 @@ public class TripreimbursebillInvoiceTaxAmtCkOp extends AbstractOperationService
}
BigDecimal differAmount = allTaxamount.subtract(allTaxamountInvoice).abs();
if (differAmount.compareTo(TOLERANCE) > 0) {
if (differAmount.compareTo(BigDecimal.ZERO) !=0 &&differAmount.compareTo(TOLERANCE) < 0) {
this.addFatalErrorMessage(extendedDataEntity, String.format("报销税额超出发票税额:%s",differAmount.setScale(2, RoundingMode.HALF_EVEN)));
}
}