Compare commits

...

2 Commits

Author SHA1 Message Date
zhangzhiguo c87bbc2a35 差旅报销单乘车人校验 2025-09-23 19:26:41 +08:00
zhangzhiguo 88a726d1e0 发票差额校验逻辑 2025-09-23 19:26:28 +08:00
3 changed files with 7 additions and 5 deletions

View File

@ -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)));
} }
} }
} }
} }

View File

@ -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)));
} }
} }

View File

@ -65,14 +65,14 @@ public class TripreimbursebillIsInvoiceUserCheckOp extends AbstractOperationServ
int i=1; int i=1;
for (DynamicObject dynamicObject : tripentry) { for (DynamicObject dynamicObject : tripentry) {
String invoicetype = dynamicObject.getString("invoicetype"); String invoicetype = dynamicObject.getString("invoicetype");
if("9".equals(invoicetype) || "10".equals(invoicetype)){ //if("9".equals(invoicetype) || "10".equals(invoicetype)){
String passengername = dynamicObject.getString("passengername"); String passengername = dynamicObject.getString("passengername");
if(!applierName.equals(passengername)){ if(!StringUtils.isEmpty(passengername) && !applierName.equals(passengername)){
String message = String.format("发票信息第%d行旅客和申请人不一致!",i); String message = String.format("发票信息第%d行旅客和申请人不一致!",i);
this.addFatalErrorMessage(extendedDataEntity, message); this.addFatalErrorMessage(extendedDataEntity, message);
break; break;
} }
} //}
i++; i++;
} }
} }