入库单优化
This commit is contained in:
parent
1df36b830e
commit
e6d5e8a34f
|
|
@ -38,6 +38,9 @@ import java.math.BigDecimal;
|
|||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 入库单发票插件
|
||||
*/
|
||||
public class MaintenanceAckBillPlugin extends AbstractBillPlugIn implements Plugin {
|
||||
private static final Log log = LogFactory.getLog(MaintenanceAckBillPlugin.class);
|
||||
|
||||
|
|
@ -197,12 +200,15 @@ public class MaintenanceAckBillPlugin extends AbstractBillPlugIn implements Plug
|
|||
this.getView().showTipNotification(ResManager.loadKDString("导入发票为空。", "PaymentApplyEditUI_19", "ec-contract-formplugin", new Object[0]));
|
||||
} else {
|
||||
long orgId = (Long) ((DynamicObject) this.getModel().getValue("zcgj_accountorg")).getPkValue();
|
||||
DynamicObject fiaccountorg = (DynamicObject)this.getModel().getValue("fiaccountorg");//财务记账组织
|
||||
String ffirmname = fiaccountorg.getString("ffirmname");//业务单元-公司名称
|
||||
Set<DynamicObject> newInvoices = (Set) invoiceMap.get(Boolean.TRUE);
|
||||
Set<DynamicObject> existInvoices = (Set) invoiceMap.get(Boolean.FALSE);
|
||||
if (newInvoices != null && !newInvoices.isEmpty()) {
|
||||
for (DynamicObject newInvoice : newInvoices) {
|
||||
DynamicObject buyerOrg = newInvoice.getDynamicObject("buyer");
|
||||
if (buyerOrg != null && buyerOrg.getLong("id") != orgId) {
|
||||
String buyername = newInvoice.getString("buyername");//购买方文本
|
||||
if (buyerOrg != null && !buyername.equals(ffirmname) && buyerOrg.getLong("id") != orgId) {
|
||||
this.getView().showTipNotification(ResManager.loadKDString("导入失败:当前发票购买方不为当前财务记账组织,请确认信息。", "PaymentApplyEditUI_20", "ec-contract-formplugin", new Object[0]));
|
||||
//this.getView().showErrorNotification(ResManager.loadKDString("导入失败:当前发票购买方不为当前财务记账组织,请确认信息。", "PaymentApplyEditUI_20", "ec-contract-formplugin", new Object[0]));
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -248,13 +248,13 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
|
|||
}
|
||||
|
||||
if (!impactcost) {
|
||||
this.getView().setVisible(false, new String[]{"ismainmaterial", "procbs", "ca", "proboq"});
|
||||
/* this.getView().setVisible(false, new String[]{"ismainmaterial", "procbs", "ca", "proboq"});
|
||||
BasedataEdit procbsControl = (BasedataEdit) this.getControl("procbs");
|
||||
procbsControl.setMustInput(false);
|
||||
BasedataEdit caControl = (BasedataEdit) this.getControl("ca");
|
||||
caControl.setMustInput(false);
|
||||
BasedataEdit proboqControl = (BasedataEdit) this.getControl("proboq");
|
||||
proboqControl.setMustInput(false);
|
||||
proboqControl.setMustInput(false);*///二开去除
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1209,15 +1209,15 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
|
|||
}
|
||||
} else {
|
||||
warehouse.setQFilters(new ArrayList());
|
||||
BasedataEdit procbsControl = (BasedataEdit) this.getControl("procbs");
|
||||
/* BasedataEdit procbsControl = (BasedataEdit) this.getControl("procbs");
|
||||
procbsControl.setMustInput(false);
|
||||
BasedataEdit caControl = (BasedataEdit) this.getControl("ca");
|
||||
caControl.setMustInput(false);
|
||||
BasedataEdit proboqControl = (BasedataEdit) this.getControl("proboq");
|
||||
proboqControl.setMustInput(false);
|
||||
proboqControl.setMustInput(false);*///二开去除
|
||||
}
|
||||
|
||||
this.getView().setVisible(impactcost, new String[]{"ismainmaterial", "procbs", "ca", "proboq"});
|
||||
// this.getView().setVisible(impactcost, new String[]{"ismainmaterial", "procbs", "ca", "proboq"});//二开去除
|
||||
int entryRowCount = this.getModel().getEntryRowCount("entryentity");
|
||||
|
||||
for (int i = 0; i < entryRowCount; ++i) {
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ import java.util.*;
|
|||
* 12:进项发票分录-运费发票勾选逻辑
|
||||
* 13:费用汇总-运费费用项目行逻辑
|
||||
* 14:计量单位锁定解锁逻辑-由计量单位锁定开发字段(勿删)决定
|
||||
* 15:财务已入账初始化不走审批流为是的时候事务类型变为即入即出
|
||||
*/
|
||||
public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implements Plugin, BeforeF7SelectListener, HyperLinkClickListener {
|
||||
@Override
|
||||
|
|
@ -460,6 +461,15 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if ("zcgj_fininit".equals(key)) {
|
||||
//财务已入账初始化不走审批流
|
||||
ChangeData changeData = e.getChangeSet()[0];
|
||||
Boolean newValue = (Boolean) changeData.getNewValue();
|
||||
if (newValue) {
|
||||
DynamicObject ecma_transtype = BusinessDataServiceHelper.loadSingle("ecma_transtype", "id",
|
||||
new QFilter[]{new QFilter("number", QCP.equals, "jrjc")});//"事务类型"
|
||||
this.getModel().setValue("transtype", ecma_transtype);//事务类型
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue