发票导入问题处理

This commit is contained in:
zhangzhiguo 2025-09-11 17:20:57 +08:00
parent cc54242b99
commit 08e010784e
2 changed files with 4 additions and 4 deletions

View File

@ -183,7 +183,7 @@ public class InContractFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn im
DynamicObject org = (DynamicObject)this.getModel().getValue("zcgj_invoice_org"); DynamicObject org = (DynamicObject)this.getModel().getValue("zcgj_invoice_org");
//List<InvoiceVO> invoiceVOList = InvoiceDataHandleHelper.parseXhInvoiceCloudReturnData(returnData); //List<InvoiceVO> invoiceVOList = InvoiceDataHandleHelper.parseXhInvoiceCloudReturnData(returnData);
List<InvoiceVO> invoiceVOList = CustomInvoiceDataHandleHelper.parseXhInvoiceCloudReturnData(returnData); List<InvoiceVO> invoiceVOList = CustomInvoiceDataHandleHelper.parseXhInvoiceCloudReturnData(returnData);
Map<Boolean, Set<DynamicObject>> invoiceMap = InvoiceDataHandleHelper.processInvoiceVO(invoiceVOList, RequestContext.get().getCurrUserId(), Map<Boolean, Set<DynamicObject>> invoiceMap = CustomInvoiceDataHandleHelper.processInvoiceVO(invoiceVOList, RequestContext.get().getCurrUserId(),
org.getLong("id"), new Date(), "ec_out_invoice", (DynamicObject)this.getModel().getValue("zcgj_currency"), true); org.getLong("id"), new Date(), "ec_out_invoice", (DynamicObject)this.getModel().getValue("zcgj_currency"), true);
ImportInvoiceUtils invoiceUtils = new ImportInvoiceUtils(this.getView(), this.getPageCache()); ImportInvoiceUtils invoiceUtils = new ImportInvoiceUtils(this.getView(), this.getPageCache());
this.addInvoiceToEntry(invoiceUtils, invoiceMap); this.addInvoiceToEntry(invoiceUtils, invoiceMap);

View File

@ -247,7 +247,7 @@ public class MaterialInbFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn i
} else { } else {
currency = (DynamicObject) this.getModel().getValue("stdcurrency");//本位币别 currency = (DynamicObject) this.getModel().getValue("stdcurrency");//本位币别
} }
Map<Boolean, Set<DynamicObject>> invoiceMap = InvoiceDataHandleHelper.processInvoiceVO(invoiceVOList, RequestContext.get().getCurrUserId(), Map<Boolean, Set<DynamicObject>> invoiceMap = CustomInvoiceDataHandleHelper.processInvoiceVO(invoiceVOList, RequestContext.get().getCurrUserId(),
org.getLong("id"), new Date(), "ec_in_invoice", currency, true); org.getLong("id"), new Date(), "ec_in_invoice", currency, true);
ImportInvoiceUtils invoiceUtils = new ImportInvoiceUtils(this.getView(), this.getPageCache()); ImportInvoiceUtils invoiceUtils = new ImportInvoiceUtils(this.getView(), this.getPageCache());
this.addInvoiceToEntry(invoiceUtils, invoiceMap); this.addInvoiceToEntry(invoiceUtils, invoiceMap);
@ -299,7 +299,7 @@ public class MaterialInbFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn i
if (unApplyAmount != null && unApplyAmount.doubleValue() <= (double) 0.0F) { if (unApplyAmount != null && unApplyAmount.doubleValue() <= (double) 0.0F) {
this.getView().showTipNotification(String.format(ResManager.loadKDString("发票号码%s金额已经被关联完毕不可重复使用", "PaymentApplyEditUI_23", "ec-contract-formplugin", new Object[0]), invoice.getString("invoiceno"))); this.getView().showTipNotification(String.format(ResManager.loadKDString("发票号码%s金额已经被关联完毕不可重复使用", "PaymentApplyEditUI_23", "ec-contract-formplugin", new Object[0]), invoice.getString("invoiceno")));
} else { } else {
// DynamicObject upContract = (DynamicObject) this.getModel().getValue("zcgj_contract"); DynamicObject upContract = (DynamicObject) this.getModel().getValue("contract");
int rowIndex = this.getModel().createNewEntryRow("zcgj_entryentity"); int rowIndex = this.getModel().createNewEntryRow("zcgj_entryentity");
this.getModel().setValue("zcgj_invoice", invoice.getPkValue(), rowIndex); this.getModel().setValue("zcgj_invoice", invoice.getPkValue(), rowIndex);
this.getModel().setValue("zcgj_invoicecurrency", invoice.getDynamicObject("currency") == null ? Long.valueOf("0") : invoice.getDynamicObject("currency").getPkValue(), rowIndex); this.getModel().setValue("zcgj_invoicecurrency", invoice.getDynamicObject("currency") == null ? Long.valueOf("0") : invoice.getDynamicObject("currency").getPkValue(), rowIndex);
@ -310,7 +310,7 @@ public class MaterialInbFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn i
this.getModel().setValue("zcgj_unapplyinvtax", invoice.getBigDecimal("unapplyinvtax"), rowIndex); this.getModel().setValue("zcgj_unapplyinvtax", invoice.getBigDecimal("unapplyinvtax"), rowIndex);
this.getModel().setValue("zcgj_applyinvoftaxamt", invoice.getBigDecimal("unapplyamount"), rowIndex); this.getModel().setValue("zcgj_applyinvoftaxamt", invoice.getBigDecimal("unapplyamount"), rowIndex);
invoice.set("isclaimed", true); invoice.set("isclaimed", true);
// invoice.set("contract", upContract); invoice.set("contract", upContract);
invoice.set("project", (DynamicObject) this.getModel().getValue("project")); invoice.set("project", (DynamicObject) this.getModel().getValue("project"));
invoice.set("connecttype", "contract"); invoice.set("connecttype", "contract");
invArr.add(invoice); invArr.add(invoice);