Compare commits
2 Commits
5c03fd576a
...
e6d5e8a34f
| Author | SHA1 | Date |
|---|---|---|
|
|
e6d5e8a34f | |
|
|
1df36b830e |
|
|
@ -56,10 +56,12 @@ public class ContractSelectProjectPlugin extends AbstractBillPlugIn implements P
|
||||||
if (zcgj_companybelong != null) {
|
if (zcgj_companybelong != null) {
|
||||||
DynamicObject zcgj_headquarters = zcgj_companybelong.getDynamicObject("zcgj_headquarters");//本部
|
DynamicObject zcgj_headquarters = zcgj_companybelong.getDynamicObject("zcgj_headquarters");//本部
|
||||||
this.getModel().setValue("zcgj_hqorg", zcgj_headquarters);//总部代收组织
|
this.getModel().setValue("zcgj_hqorg", zcgj_headquarters);//总部代收组织
|
||||||
|
this.getModel().setValue("fiaccountorg", zcgj_headquarters);//财务记账组织
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.getModel().setValue("zcgj_hqorg", null);//总部代收组织
|
this.getModel().setValue("zcgj_hqorg", null);//总部代收组织
|
||||||
|
this.getModel().setValue("fiaccountorg", null);//财务记账组织
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,9 @@ import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库单发票插件
|
||||||
|
*/
|
||||||
public class MaintenanceAckBillPlugin extends AbstractBillPlugIn implements Plugin {
|
public class MaintenanceAckBillPlugin extends AbstractBillPlugIn implements Plugin {
|
||||||
private static final Log log = LogFactory.getLog(MaintenanceAckBillPlugin.class);
|
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]));
|
this.getView().showTipNotification(ResManager.loadKDString("导入发票为空。", "PaymentApplyEditUI_19", "ec-contract-formplugin", new Object[0]));
|
||||||
} else {
|
} else {
|
||||||
long orgId = (Long) ((DynamicObject) this.getModel().getValue("zcgj_accountorg")).getPkValue();
|
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> newInvoices = (Set) invoiceMap.get(Boolean.TRUE);
|
||||||
Set<DynamicObject> existInvoices = (Set) invoiceMap.get(Boolean.FALSE);
|
Set<DynamicObject> existInvoices = (Set) invoiceMap.get(Boolean.FALSE);
|
||||||
if (newInvoices != null && !newInvoices.isEmpty()) {
|
if (newInvoices != null && !newInvoices.isEmpty()) {
|
||||||
for (DynamicObject newInvoice : newInvoices) {
|
for (DynamicObject newInvoice : newInvoices) {
|
||||||
DynamicObject buyerOrg = newInvoice.getDynamicObject("buyer");
|
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().showTipNotification(ResManager.loadKDString("导入失败:当前发票购买方不为当前财务记账组织,请确认信息。", "PaymentApplyEditUI_20", "ec-contract-formplugin", new Object[0]));
|
||||||
//this.getView().showErrorNotification(ResManager.loadKDString("导入失败:当前发票购买方不为当前财务记账组织,请确认信息。", "PaymentApplyEditUI_20", "ec-contract-formplugin", new Object[0]));
|
//this.getView().showErrorNotification(ResManager.loadKDString("导入失败:当前发票购买方不为当前财务记账组织,请确认信息。", "PaymentApplyEditUI_20", "ec-contract-formplugin", new Object[0]));
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -248,13 +248,13 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!impactcost) {
|
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");
|
BasedataEdit procbsControl = (BasedataEdit) this.getControl("procbs");
|
||||||
procbsControl.setMustInput(false);
|
procbsControl.setMustInput(false);
|
||||||
BasedataEdit caControl = (BasedataEdit) this.getControl("ca");
|
BasedataEdit caControl = (BasedataEdit) this.getControl("ca");
|
||||||
caControl.setMustInput(false);
|
caControl.setMustInput(false);
|
||||||
BasedataEdit proboqControl = (BasedataEdit) this.getControl("proboq");
|
BasedataEdit proboqControl = (BasedataEdit) this.getControl("proboq");
|
||||||
proboqControl.setMustInput(false);
|
proboqControl.setMustInput(false);*///二开去除
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1209,15 +1209,15 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
warehouse.setQFilters(new ArrayList());
|
warehouse.setQFilters(new ArrayList());
|
||||||
BasedataEdit procbsControl = (BasedataEdit) this.getControl("procbs");
|
/* BasedataEdit procbsControl = (BasedataEdit) this.getControl("procbs");
|
||||||
procbsControl.setMustInput(false);
|
procbsControl.setMustInput(false);
|
||||||
BasedataEdit caControl = (BasedataEdit) this.getControl("ca");
|
BasedataEdit caControl = (BasedataEdit) this.getControl("ca");
|
||||||
caControl.setMustInput(false);
|
caControl.setMustInput(false);
|
||||||
BasedataEdit proboqControl = (BasedataEdit) this.getControl("proboq");
|
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");
|
int entryRowCount = this.getModel().getEntryRowCount("entryentity");
|
||||||
|
|
||||||
for (int i = 0; i < entryRowCount; ++i) {
|
for (int i = 0; i < entryRowCount; ++i) {
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ import java.util.*;
|
||||||
* 12:进项发票分录-运费发票勾选逻辑
|
* 12:进项发票分录-运费发票勾选逻辑
|
||||||
* 13:费用汇总-运费费用项目行逻辑
|
* 13:费用汇总-运费费用项目行逻辑
|
||||||
* 14:计量单位锁定解锁逻辑-由计量单位锁定开发字段(勿删)决定
|
* 14:计量单位锁定解锁逻辑-由计量单位锁定开发字段(勿删)决定
|
||||||
|
* 15:财务已入账初始化不走审批流为是的时候事务类型变为即入即出
|
||||||
*/
|
*/
|
||||||
public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implements Plugin, BeforeF7SelectListener, HyperLinkClickListener {
|
public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implements Plugin, BeforeF7SelectListener, HyperLinkClickListener {
|
||||||
@Override
|
@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