| | |
| | | //CBPR |
| | | if (ord.Opportunity.Dealer__r.DummyDealer__c == true || ord.Opportunity.SalesChannel__c == 'direct'){ |
| | | quotation.DealerCode = ord.Opportunity.Account.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; |
| | |
| | | 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;//合作区域代理商Code |
| | |
| | | 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;//合作区域代理商Code |
| | | 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>(); |