高章伟
2022-02-24 2aa8da8af66aa8ae00f25831aed6bb0364176e7b
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
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>If_ThisMonth_Plan__c</fullName>
    <description>//20200410以前逻辑:OPD计划的状态是确认中并且OPD计划的实施日是在本月月末之前的都算本月计划
IF(AND(
text(Status__c)=&quot;计划中&quot;,
OPDPlan_ImplementDate__c &lt;= IF(
MONTH(today()) = 12,
DATE(YEAR(today()), 12, 31),
DATE(YEAR(today()), MONTH(today()) + 1, 1) - 1 
)),
1,0)
//20200410-LZHU-BNH39S
OPD计划的状态是确认中并且OPD计划的实施日是在本月月初之后至本月月末之前的算本月计划,及只统计&quot;OPD计划实施日期&quot;为当月的OPD计划</description>
    <externalId>false</externalId>
    <formula>IF(
AND(text(Status__c)=&quot;计划中&quot;,
OPDPlan_ImplementDate__c &gt;= DATE(YEAR(today()), MONTH(today()), 1),
OPDPlan_ImplementDate__c &lt;= if(MONTH(today()) != 12,DATE(YEAR(today()), MONTH(today()) + 1, 1) - 1 ,DATE(YEAR(today()), 12, 31) ) ), 1, 0)</formula>
    <label>是否本月计划(公式)</label>
    <precision>18</precision>
    <required>false</required>
    <scale>0</scale>
    <trackHistory>false</trackHistory>
    <trackTrending>false</trackTrending>
    <type>Number</type>
    <unique>false</unique>
</CustomField>