<?xml version="1.0" encoding="UTF-8"?>
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>AWAL_EstimatedRevenuePassedToApprover</fullName>
    <active>true</active>
    <errorConditionFormula>AND(
        RecordType.DeveloperName = &apos;AWAL&apos;,
        NOT($Permission.AWAL_Bypass_VRs),
        ISBLANK(Estimated_Revenue_Base_Case__c),
        NOT(AND(Is_Migrated__c, OR(ISPICKVAL(Migrated_From_Opportunity__r.StageName, "Pass to Approver (KLS only)"), ISPICKVAL(Migrated_From_Opportunity__r.StageName, "Passed to Finance"), ISPICKVAL(Migrated_From_Opportunity__r.StageName, "Passed to BA")))),
        NOT(Is_Amendment__c),
        NOT(
            OR(
                ISPICKVAL(StageName, &quot;Deal Tracking&quot;),
                ISPICKVAL(StageName, &quot;Deal Discussions&quot;),
                ISPICKVAL(StageName, &quot;Passed to Finance&quot;),
                ISPICKVAL(StageName, &quot;Passed to Finance Approver&quot;),
                ISPICKVAL(StageName, &quot;Finance Analysis Complete&quot;)
            )
        )
)</errorConditionFormula>
    <errorDisplayField>Estimated_Revenue_Base_Case__c</errorDisplayField>
    <errorMessage>&apos;Estimated Revenue (Life of Deal)&apos; is required when the stage is &apos;Passed to Approver&apos; or beyond.</errorMessage>
</ValidationRule>
