优化入库单提交校验逻辑
This commit is contained in:
parent
d734ed05dd
commit
4c65bddb70
|
@ -43,13 +43,13 @@ public class MaterialInBillSubmitValidatorOp extends AbstractOperationServicePlu
|
|||
DynamicObjectCollection entryEntity2Collection = ecma_MaterialInBill.getDynamicObjectCollection("entryentity");//入库单分录
|
||||
if (entryEntityCollection != null && entryEntityCollection.size() > 0 && entryEntity2Collection != null && entryEntity2Collection.size() > 0) {
|
||||
|
||||
BigDecimal totalInvoiceAmount = BigDecimal.ZERO; // 发票总金额
|
||||
BigDecimal totalInvoiceAmount = BigDecimal.ZERO; // 发票总金额(不含税
|
||||
BigDecimal totalInvoiceTax = BigDecimal.ZERO; // 发票总税额
|
||||
BigDecimal totalInvoiceTotal = BigDecimal.ZERO; // 发票总价税合计
|
||||
|
||||
BigDecimal totalEntryAmount = BigDecimal.ZERO; // 入库单总金额
|
||||
BigDecimal totalEntryTax = BigDecimal.ZERO; // 入库单总税额
|
||||
BigDecimal totalEntryTotal = BigDecimal.ZERO; // 入库单总价税合计
|
||||
BigDecimal totalEntryAmount = ecma_MaterialInBill.getBigDecimal("totalamount"); // 入库总金额(不含税
|
||||
BigDecimal totalEntryTax = ecma_MaterialInBill.getBigDecimal("totaltaxamount"); // 入库单总税额
|
||||
BigDecimal totalEntryTotal = ecma_MaterialInBill.getBigDecimal("totaloftaxamount"); // 入库含税总金额
|
||||
|
||||
for (DynamicObject entryEntity : entryEntityCollection) {
|
||||
BigDecimal invoiceAmount = entryEntity.getBigDecimal("zcgj_invoiceamount"); // 合同进项发票信息-金额
|
||||
|
@ -65,7 +65,7 @@ public class MaterialInBillSubmitValidatorOp extends AbstractOperationServicePlu
|
|||
totalInvoiceTotal = totalInvoiceTotal.add(invoiceTotal);
|
||||
}
|
||||
}
|
||||
for (DynamicObject entryEntity2 : entryEntity2Collection) {
|
||||
/* for (DynamicObject entryEntity2 : entryEntity2Collection) {
|
||||
BigDecimal notaxAmount = entryEntity2.getBigDecimal("amount"); // 入库单-含运费金额(不含税)
|
||||
BigDecimal taxAmount = entryEntity2.getBigDecimal("taxamount").add(entryEntity2.getBigDecimal("zcgj_transtaxamount")); // 入库单-税额+运费税额
|
||||
BigDecimal oftaxAmount = entryEntity2.getBigDecimal("amount").add(entryEntity2.getBigDecimal("taxtransamount")); // 入库单-含税金额+含税运费
|
||||
|
@ -79,7 +79,7 @@ public class MaterialInBillSubmitValidatorOp extends AbstractOperationServicePlu
|
|||
if (oftaxAmount != null) {
|
||||
totalEntryTotal = totalEntryTotal.add(oftaxAmount);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
if (totalInvoiceAmount.compareTo(totalEntryAmount) != 0) {
|
||||
this.addFatalErrorMessage(extendedDataEntity, "入库总金额与合同进项发票信息金额汇总不匹配!");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue