发票差额校验逻辑
This commit is contained in:
parent
1531ccff95
commit
88a726d1e0
|
@ -78,9 +78,11 @@ public class ReimbursementInvoiceTaxAmtCkOp extends AbstractOperationServicePlug
|
||||||
}
|
}
|
||||||
|
|
||||||
BigDecimal differAmount = allTaxamount.subtract(allTaxamountInvoice).abs();
|
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)));
|
this.addFatalErrorMessage(extendedDataEntity, String.format("报销税额超出发票税额:%s",differAmount.setScale(2, RoundingMode.HALF_EVEN)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class TripreimbursebillInvoiceTaxAmtCkOp extends AbstractOperationService
|
||||||
}
|
}
|
||||||
|
|
||||||
BigDecimal differAmount = allTaxamount.subtract(allTaxamountInvoice).abs();
|
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)));
|
this.addFatalErrorMessage(extendedDataEntity, String.format("报销税额超出发票税额:%s",differAmount.setScale(2, RoundingMode.HALF_EVEN)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue