Compare commits

...

2 Commits

Author SHA1 Message Date
xuhaihui e6d5e8a34f 入库单优化 2025-12-11 17:01:52 +08:00
xuhaihui 1df36b830e 收款申请添加财务记账组织赋值逻辑 2025-12-11 17:00:41 +08:00
4 changed files with 24 additions and 6 deletions

View File

@ -56,10 +56,12 @@ public class ContractSelectProjectPlugin extends AbstractBillPlugIn implements P
if (zcgj_companybelong != null) {
DynamicObject zcgj_headquarters = zcgj_companybelong.getDynamicObject("zcgj_headquarters");//本部
this.getModel().setValue("zcgj_hqorg", zcgj_headquarters);//总部代收组织
this.getModel().setValue("fiaccountorg", zcgj_headquarters);//财务记账组织
}
}
} else {
this.getModel().setValue("zcgj_hqorg", null);//总部代收组织
this.getModel().setValue("fiaccountorg", null);//财务记账组织
}
}
}

View File

@ -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;

View File

@ -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) {

View File

@ -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);//事务类型
}
}
}