付款申请单 候补发票
This commit is contained in:
parent
fe953bb5e9
commit
9319acb1c4
|
@ -183,6 +183,7 @@ public class SupplementInvoiceBillPlugin extends PaymentApplyEditUI {
|
|||
int rowIndex = this.getModel().createNewEntryRow("subentryentity");
|
||||
this.getModel().setValue("invoice", invoicePk.toString(), rowIndex);
|
||||
DynamicObject invoice = BusinessDataServiceHelper.loadSingle(invoicePk, "ec_in_invoice", "unapplyinvtax,unapplyamount,isClaimed,contract,project,connecttype,currency,totalamount,totaltax,totaloftaxamount");
|
||||
|
||||
this.getModel().setValue("invoicecurrency", invoice.getDynamicObject("currency") == null ? Long.valueOf("0") : invoice.getDynamicObject("currency").getPkValue(), rowIndex);
|
||||
this.getModel().setValue("invoiceamount", invoice.getBigDecimal("totalamount"), rowIndex);
|
||||
this.getModel().setValue("invoicetax", invoice.getBigDecimal("totaltax"), rowIndex);
|
||||
|
@ -199,14 +200,29 @@ public class SupplementInvoiceBillPlugin extends PaymentApplyEditUI {
|
|||
invoice.set("connecttype", "contract");
|
||||
}
|
||||
|
||||
// this.setApplyAmtByInvoice(this.getModel().getEntryCurrentRowIndex("entryentity"));
|
||||
this.setSingeapplyinvoftaxamt();
|
||||
|
||||
// this.setApplyAmtByInvoice(this.getModel().getEntryCurrentRowIndex("entryentity"));
|
||||
log.info("SupplementInvoiceBillPlugin:发票保存");
|
||||
SaveServiceHelper.save(invArr);//发票保存
|
||||
this.getView().invokeOperation("invoicesave");
|
||||
this.setEnableByInvoice1();
|
||||
}
|
||||
|
||||
private void setSingeapplyinvoftaxamt() {
|
||||
int rowCount = this.getModel().getEntryRowCount("subentryentity");//获取子单据分录行数
|
||||
log.info("SupplementInvoiceBillPlugin:子单据体分录行数:"+rowCount);
|
||||
EntryGrid grid = (EntryGrid)this.getView().getControl("entryentity");//获取单据体控件-合同付款信息
|
||||
int[] entity_rows = grid.getEntryState().getSelectedRows();//获取选择行号
|
||||
|
||||
DynamicObject rowEntity = this.getModel().getEntryRowEntity("entryentity", entity_rows[0]);//获取对应行的单据体
|
||||
BigDecimal applyoftaxamount = rowEntity.getBigDecimal("thisapplyoftax");//获取单据体对应的 本次申请金额
|
||||
log.info("SupplementInvoiceBillPlugin:选中的单据体的申请金额数量:" + applyoftaxamount);
|
||||
if(rowCount==1){
|
||||
this.getModel().setValue("applyinvoftaxamt", applyoftaxamount,0);
|
||||
}
|
||||
}
|
||||
|
||||
protected void setEnableByInvoice1() {
|
||||
int entryRowCount = this.getModel().getEntryRowCount("entryentity");
|
||||
log.info("SupplementInvoiceBillPlugin:有发票,合同记录锁定 thisapplyoftax thisapplyamout 字段");
|
||||
|
|
Loading…
Reference in New Issue