Compare commits

..

No commits in common. "67778668f7a24d523f5b052f5355c44c2124205d" and "d3ee16333454270649b76202852406541cd50783" have entirely different histories.

4 changed files with 7 additions and 45 deletions

View File

@ -42,7 +42,7 @@ public class CostcompanyDefaultPlugin extends AbstractBillPlugIn implements Plu
String billFormId = ((BillView) this.getView()).getFormId();
//如果是新增时
BillShowParameter bsp=(BillShowParameter)this.getView().getFormShowParameter();
//if(bsp.getStatus()== OperationStatus.ADDNEW ){
if(bsp.getStatus()== OperationStatus.ADDNEW ){
if("er_dailyreimbursebill".equals(billFormId)) {
//隐藏费用报销单收款信息收款人类型为供应商和客户的选项
Object company = this.getModel().getValue("costcompany");//核算组织
@ -74,7 +74,7 @@ public class CostcompanyDefaultPlugin extends AbstractBillPlugIn implements Plu
}
}
}
// }
}
}
@Override

View File

@ -24,16 +24,12 @@ public class PublicBillRecAccountCkOp extends AbstractOperationServicePlugIn {
@Override
public void onPreparePropertys(PreparePropertysEventArgs e) {
super.onPreparePropertys(e);
e.getFieldKeys().add("zcgj_isec");//工程单据 如果是工程单据则需要判断付款方式为DG才需要判断账户一致性
e.getFieldKeys().add("costcompany");
e.getFieldKeys().add("accountentry");
e.getFieldKeys().add("billpayerid");//往来单位
e.getFieldKeys().add("zcgj_ecpaytype");//付款方式
e.getFieldKeys().add("zcgj_prepay");//冲销预付
e.getFieldKeys().add("writeoffmoney");//冲销预付
}
@Override
@ -61,13 +57,6 @@ public class PublicBillRecAccountCkOp extends AbstractOperationServicePlugIn {
for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) {
DynamicObject dataEntity = extendedDataEntity.getDataEntity();
DynamicObject billPayerId = dataEntity.getDynamicObject("billpayerid");//往来单位
String ecpaytype = dataEntity.getString("zcgj_ecpaytype");//付款方式
boolean isec = dataEntity.getBoolean("zcgj_isec");//付款方式
boolean ckType = true;
if(isec){
ckType = "DG".equals(ecpaytype); //如果是无合同付款中的付款方式为 对公则需要校验
}
long aLong = dataEntity.getLong("id");
//获取报销人
DynamicObject applier = dataEntity.getDynamicObject("applier");
@ -95,12 +84,7 @@ public class PublicBillRecAccountCkOp extends AbstractOperationServicePlugIn {
continue;
}
String name = supplier.getString("name");
if(ckType){
String billPayerIdName = billPayerId.getString("name");
isOk = payeraccountname.equals(name) && payeraccountname.equals(billPayerIdName);
}else{
isOk = payeraccountname.equals(name);
}
}else if("bd_customer".equals(payertype)){ //客户
DynamicObject customer = dynamicObject.getDynamicObject("customer");
if(customer ==null){
@ -108,29 +92,11 @@ public class PublicBillRecAccountCkOp extends AbstractOperationServicePlugIn {
continue;
}
String name = customer.getString("name");
if(ckType){
String billPayerIdName = billPayerId.getString("name");
isOk = payeraccountname.equals(name) && payeraccountname.equals(billPayerIdName);
}else{
isOk = payeraccountname.equals(name);
}
}else if("er_payeer".equals(payertype)){ //职员
DynamicObject payer = dynamicObject.getDynamicObject("payer");
if(payer ==null){
this.addFatalErrorMessage(extendedDataEntity, String.format("收款信息第%d行收款人不能为空",i));
continue;
}
String name = payer.getString("name");
isOk = payeraccountname.equals(name);
}
if(!isOk && accountTxt.isEmpty()){
if(ckType){//带往来单位
this.addFatalErrorMessage(extendedDataEntity, String.format("收款信息第%d行往来单位与收款人名称和账户名称不一致请在当前行填写账户不一致说明",i));
}else{
this.addFatalErrorMessage(extendedDataEntity, String.format("收款信息第%d行收款人名称和账户名称不一致请在当前行填写账户不一致说明",i));
}
}
}

View File

@ -22,9 +22,6 @@ public class PublicReimburPayerSubOp extends AbstractOperationServicePlugIn {
e.getFieldKeys().add("zcgj_invoiceremark");
e.getFieldKeys().add("makeoutcompname");
e.getFieldKeys().add("costcompany");
//无合同付款相关
e.getFieldKeys().add("zcgj_isec");//工程单据
//e.getFieldKeys().add("zcgj_ecpaytype");//付款方式
}
@Override
@ -40,8 +37,7 @@ public class PublicReimburPayerSubOp extends AbstractOperationServicePlugIn {
for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) {
DynamicObject dataEntity = extendedDataEntity.getDataEntity();
DynamicObject costCompany = dataEntity.getDynamicObject("costcompany");//费用承担公司
boolean isec = dataEntity.getBoolean("zcgj_isec");
if (costCompany != null && !isec) {
if (costCompany != null) {
Long companyId = costCompany.getLong("id");
if (OrgCheckUtils.isKS(companyId)) {
//仅针对矿山下组织下的逻辑

View File

@ -186,7 +186,7 @@ public class MaintenanceAckBillPlugin extends AbstractBillPlugIn implements Plug
DynamicObject org = (DynamicObject) this.getModel().getValue("zcgj_accountorg");
//List<InvoiceVO> invoiceVOList = InvoiceDataHandleHelper.parseXhInvoiceCloudReturnData(returnData);
List<InvoiceVO> invoiceVOList = CustomInvoiceDataHandleHelper.parseXhInvoiceCloudReturnData(returnData);
Map<Boolean, Set<DynamicObject>> invoiceMap = CustomInvoiceDataHandleHelper.processInvoiceVO(invoiceVOList, RequestContext.get().getCurrUserId(),
Map<Boolean, Set<DynamicObject>> invoiceMap = InvoiceDataHandleHelper.processInvoiceVO(invoiceVOList, RequestContext.get().getCurrUserId(),
org.getLong("id"), new Date(), "ec_in_invoice", (DynamicObject) this.getModel().getValue("zcgj_currency"), true);
ImportInvoiceUtils invoiceUtils = new ImportInvoiceUtils(this.getView(), this.getPageCache());
this.addInvoiceToEntry(invoiceUtils, invoiceMap);