优化入库单和支出财务确认单的添加发票逻辑
This commit is contained in:
parent
f15714f936
commit
ed40a8dd8b
|
@ -119,7 +119,12 @@ public class MaterialInbFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn i
|
|||
} else {
|
||||
currencyId = ((DynamicObject) this.getModel().getValue("stdcurrency")).getLong("id");//本位币别
|
||||
}
|
||||
long orgId = ((DynamicObject) this.getModel().getValue("fiaccountorg")).getLong("id");//财务记账组织
|
||||
DynamicObject fiaccountorg = (DynamicObject) this.getModel().getValue("fiaccountorg");//财务记账组织
|
||||
if (fiaccountorg == null) {
|
||||
this.getView().showErrorNotification("清先填写财务记账组织!");
|
||||
return;
|
||||
}
|
||||
long orgId = fiaccountorg.getLong("id");//财务记账组织
|
||||
QFilter filter = new QFilter("org", "=", orgId);
|
||||
filter.and(new QFilter("isclaimed", "=", false));
|
||||
filter.and(new QFilter("billstatus", "=", "C"));
|
||||
|
@ -130,7 +135,7 @@ public class MaterialInbFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn i
|
|||
filter1.and(new QFilter("billstatus", "=", "C"));
|
||||
DynamicObject contract = (DynamicObject) this.getModel().getValue("contract");//合同
|
||||
String matinsource = (String) this.getModel().getValue("matinsource");//入库来源
|
||||
if (contract != null && matinsource.equals("1")) {
|
||||
if (contract != null ) {
|
||||
//入库来源为合同清单且合同字段不为空时,使用合同过滤
|
||||
long contractId = contract.getLong("id");
|
||||
filter1.and(new QFilter("contract", "=", contractId));
|
||||
|
|
|
@ -83,7 +83,12 @@ public class OutContractFinaceConfirmeInvoicePlugin extends AbstractBillPlugIn i
|
|||
|
||||
private void showInvoice(String entryType) {
|
||||
long currencyId = ((DynamicObject)this.getModel().getValue("zcgj_currency")).getLong("id");
|
||||
long orgId = ((DynamicObject)this.getModel().getValue("zcgj_invoice_org")).getLong("id");
|
||||
DynamicObject zcgj_invoice_org = (DynamicObject) this.getModel().getValue("zcgj_invoice_org");
|
||||
if (zcgj_invoice_org == null){
|
||||
this.getView().showErrorNotification("清先填写发票企业名称!");
|
||||
return;
|
||||
}
|
||||
long orgId = zcgj_invoice_org.getLong("id");
|
||||
QFilter filter = new QFilter("org", "=", orgId);
|
||||
filter.and(new QFilter("isclaimed", "=", false));
|
||||
filter.and(new QFilter("billstatus", "=", "C"));
|
||||
|
|
Loading…
Reference in New Issue