From 1b1347f2e6d40aa75bbfdfb4789d60efeff13ea8 Mon Sep 17 00:00:00 2001
From: GWY <guweiyiscp096@foxmail.com>
Date: 星期五, 15 四月 2022 09:41:12 +0800
Subject: [PATCH] LS内贸未发货和以后的不显示二级经营证(临时)
---
force-app/main/default/classes/SBG027Controller.cls | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/classes/SBG027Controller.cls b/force-app/main/default/classes/SBG027Controller.cls
index 8ca0d67..096e73a 100644
--- a/force-app/main/default/classes/SBG027Controller.cls
+++ b/force-app/main/default/classes/SBG027Controller.cls
@@ -107,7 +107,7 @@
Opportunity.SalesChannel__c, Opportunity.ExpectedDeliveryDate__c, Opportunity.DealerId__c,Opportunity.DealerSalesStaffName__c,OlympusContractPricesD__c,SpecialDeliveryContact_D__c,Opportunity.SpecialDeliveryContact_D__r.ManagementCode_F__c,
Opportunity.ForeignTradeCompany__c, Opportunity.SpecialDeliveryAddress__c,PaymentTerms__c,SpecialDeliveryContact__c,PDF_Sp_Shipment_Term__c,PDF_Sp_ShippingTerms__c,
ForeignTradeCompany_D__r.ManagementCode_F__c, SpecialDeliveryAccount_D__r.ManagementCode_F__c, SpecialDeliveryContact2_D__r.ManagementCode_F__c,Opportunity.Dealer__r.DummyDealer__c,ContractPriceTotal__c,
- If_Supervise__c,CrossCooperativeDealerCode__c,SplitRatio__c,CrossCooperativeProject__c,Level_Category__c,DealerSalesStaffNameA__c,Dealer_A__r.ManagementCode_Ext__c,Dealer_B__r.ManagementCode_F__c
+ If_Supervise__c,CrossCooperativeDealerCode__c,SplitRatio__c,CrossCooperativeProject__c,Level_Category__c,DealerSalesStaffNameA__c,Dealer_A__r.ManagementCode_Ext__c,Dealer_B__r.ManagementCode_F__c
from order where Id IN :ordIds ];
//List<order> ordList = [select Id,Name,Opportunity.Name, Opportunity.CurrencyIsoCode,OrderNumber,Opportunity.ForeignTradeCompany__r.ManagementCode_F__c,CustomerContractPriceD__c,SpecialCondition_text__c,SalesChannel__c,
// Owner.Name,Opportunity.AccountId__c,Opportunity.InquiryNumber__c,Opportunity.SpecialDeliveryAddress__r.ManagementCode_F__c, ServiceFee_D__c,Opportunity.SpecialDeliveryAddress_D__c,Opportunity.SpecialDeliveryAddress_D__r.ManagementCode_F__c,
@@ -190,7 +190,11 @@
//CBPR
if (ord.Opportunity.Dealer__r.DummyDealer__c == true || ord.Opportunity.SalesChannel__c == 'direct'){
quotation.DealerCode = ord.Opportunity.Account.ManagementCode_F__c;
- quotation.SalesAccountCode = ord.SpecialDeliveryAccount_D__r.ManagementCode_F__c;
+ if (ord.Opportunity.TradeType__c == 'Tax Exemption' && ord.Opportunity.SalesChannel__c == 'direct') {
+ quotation.SalesAccountCode = ord.Opportunity.Account.ManagementCode_F__c;
+ }else {
+ quotation.SalesAccountCode = ord.SpecialDeliveryAccount_D__r.ManagementCode_F__c;
+ }
}
else{
quotation.DealerCode = ord.Opportunity.Dealer__r.ManagementCode_Ext__c;
@@ -238,7 +242,7 @@
quotation.Other2 = other2;//ord.SpecialCondition_text__c;
quotation.Other3 = ord.Shipment_Term_D__c + ',' + ord.Shipment_Term2_D__c;
// 璺ㄥ尯鍩熼攢鍞� XHL 20210831 Start
- quotation.CoopAgent = '';
+ /*quotation.CoopAgent = '';
quotation.CoopAgentPCT = '';
if (ord.CrossCooperativeProject__c) {//璺ㄧ渷浠藉悎浣滈」鐩�
quotation.CoopAgent = ord.Dealer_B__r.ManagementCode_F__c;//鍚堜綔鍖哄煙浠g悊鍟咰ode
@@ -249,6 +253,17 @@
Integer pct = Integer.valueOf(splitRatio.split(':')[1].trim())*10;
quotation.CoopAgentPCT = String.valueof(pct);//涓氱哗鎷嗗垎姣斾緥(鍙�:鍚庤竟鐨勫��*10)
}
+ } */
+
+ quotation.CoopAgent = '';
+ quotation.CoopAgentPCT = '';
+ if (ord.CrossCooperativeProject__c) {//璺ㄧ渷浠藉悎浣滈」鐩�
+ quotation.CoopAgent = ord.CrossCooperativeDealerCode__c;//鍚堜綔鍖哄煙浠g悊鍟咰ode
+ String splitRatio = ord.SplitRatio__c;
+ if (String.isNotBlank(splitRatio) && splitRatio.indexof(':') > 0) {
+ Integer pct = Integer.valueOf(splitRatio.split(':')[1].trim())*10;
+ quotation.CoopAgentPCT = String.valueof(pct);//涓氱哗鎷嗗垎姣斾緥(鍙�:鍚庤竟鐨勫��*10)
+ }
}
// 璺ㄥ尯鍩熼攢鍞� XHL 20210831 End
quotation.GeDataDetails = new List<GeDataDetails_element>();
--
Gitblit v1.9.1