Li Jun
2022-04-27 24fda5246494953a232b37547fb50bde77bd9886
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>lastestGuaranteePeriod__c</fullName>
    <description>1、如果是一般产品时时,传询价头上的保修年限;
 
2、如果是服务多年保修 或者 (产品是市场多年保修,询价未取消多年保修、产品主数据上的多年保修期(年)大于合同保修期), 取产品主数据上的多年保修期(年);
 
3、如果产品是市场多年保修,且询价取消多年保修,则保修期为1年;
 
4、如果不是多年保修且产品不是耗材 或者 (产品是市场多年保修,询价未取消多年保修、产品主数据上的多年保修期(年)小于等于合同保修期) 取询价上的合同保修期(年);(去掉内贸的并列条件)
 
5、如果不是多年保修且产品是耗材,则为0
 
6、外贸4.1上线前切换 之前传询价头上的保修年限、之后取产品上的市场保修年限</description>
    <externalId>false</externalId>
    <formula>if(Product2__r.GuranteeType__c = &apos;&apos;,
value(text(QuantityId__r.Opportunity.Gurantee_Period__c)),
if(Product2__r.GuranteeType__c = &apos;服务&apos;,
Product2__r.Entend_gurantee_period_all__c,
if(Product2__r.GuranteeType__c = &apos;市场&apos;
&amp;&amp;(QuantityId__r.Opportunity.multiYearWarranty__c &amp;&amp; Not(CanNotCancelFlag__c)),
1,
if(Product2__r.GuranteeType__c = &apos;市场&apos;
&amp;&amp; (not(QuantityId__r.Opportunity.multiYearWarranty__c) || CanNotCancelFlag__c )
&amp;&amp; Product2__r.Entend_gurantee_period_all__c &gt; value(text(QuantityId__r.Opportunity.Gurantee_Period__c))
,
if(Text(QuantityId__r.Opportunity.Trade__c) = &apos;外貿&apos;&amp;&amp;QuantityId__r.Opportunity.DecideQuoteDate__c &lt; DATEVALUE($Label.GuaranteeUSD),value(text(QuantityId__r.Opportunity.Gurantee_Period__c)),Product2__r.Entend_gurantee_period_all__c),
value(text(QuantityId__r.Opportunity.Gurantee_Period__c))
))))</formula>
    <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
    <label>保修年限(最新)</label>
    <precision>18</precision>
    <required>false</required>
    <scale>0</scale>
    <trackTrending>false</trackTrending>
    <type>Number</type>
    <unique>false</unique>
</CustomField>