Logical Field not working while Yes/No

Discussion in 'Free Source Codes' started by Partha Mondal, Mar 11, 2023.

    
  1. Partha Mondal

    Partha Mondal Member


    Dear Member,
    When "Is AMC Invoice" field is NO then not going to next field Party A/c field Narration part is working not showing. Also When "Is AMC Invoice" field is YES then not going to next field Party A/c field but
    showing Narration part. What happened ? Where is my mistake.

    Please help me sir.



    [#Part: EI Consignee]

    Option : EI AMC_Consignee : $$IsSales:##SVvouchertype

    [!Part : EI AMC_Consignee]

    Add : Line : BEFORE : EI Consignee : AMCTaken

    [Line : AMCTaken]

    Field : Simple field, AMCTaken
    Local : Field : Simple field: Info : $$LocaleString:"Is AMC Invoice:"
    Local : Field : Simple field: Width : @@VchLeftPromptWidth % Page
    Local : Field : Simple field: Color : Blue

    [Field : AMCTaken]
    Use : Logical Field
    Storage : IsAMCInvoice

    ;; Bottom part customization ;;;; ;;; BEFORE NARRATION ;;;;

    [#Part : VCH narration]

    Option : Part AMC : $$IsSales:##SVvouchertype

    [!Part : Part AMC]

    Add : Line : At Beginning : AMC_Type
    Add : Line : After : AMC_Type : AMC_Period
    Add : Line : After : AMC_Period : AMC_NextDue
    Add : Line : After : AMC_NextDue : AMC_Status
    Add : Line : After : AMC_Status : AMC_Pmt_Type
    Add : Line : After : AMC_Pmt_Type: AMC_Pmt_Period
    Add : Line : After : AMC_Pmt_Period: AMC_Pmt_DueDt

    [Line : AMC_Type]

    Field : Medium Prompt, AmcType, Simple Prompt, Tot_Cont_Amount
    Local : Field : Medium Prompt : Info : $$LocaleString:"AMC Contract Details :"
    Local : Field : Simple Prompt : Info : $$LocaleString:"Total Contract Amount :"
    Local : Field : Medium Prompt : Inactive : not $IsAMCInvoice
    Local : Field : Simple Prompt : Inactive : not $IsAMCInvoice

    [Line : AMC_Period]

    Field : Medium Prompt, AmcFrom, Short Prompt, AmcTo
    Local : Field : Medium Prompt : Info : $$LocaleString:"AMC From "
    Local : Field : Medium Prompt : Inactive : not $IsAMCInvoice
    Local : Field : Short Prompt : Info : $$LocaleString:"AMC To "
    Local : Field : Short Prompt : Inactive : not $IsAMCInvoice

    [Line : AMC_NextDue]

    Field : Medium Prompt, AMC_NextDue
    Local : Field : Medium Prompt : Info : $$LocaleString:"Next Due Date "
    Local : Field : Medium Prompt : Inactive : not $IsAMCInvoice

    [Line : AMC_Status]

    Field : Medium Prompt, AMC_Status
    Local : Field : Medium Prompt : Info : $$LocaleString:"AMC Status "
    Local : Field : Medium Prompt : Inactive : not $IsAMCInvoice

    [Line : AMC_Pmt_Type]

    Field : Medium Prompt, AMC_Pmt_Mode
    Local : Field : Medium Prompt : Info : $$LocaleString:"Payment Contract Mode "
    Local : Field : Medium Prompt : Inactive : not $IsAMCInvoice

    [Line : AMC_Pmt_Period]

    Field : Medium Prompt, AMC_Pmt_From, Simple Prompt, AMC_Pmt_To
    Local : Field : Medium Prompt : Info : $$LocaleString:"Payment Date From "
    Local : Field : Medium Prompt : Inactive : not $IsAMCInvoice
    Local : Field : Simple Prompt : Info : $$LocaleString:"Payment Date To "
    Local : Field : Simple Prompt : Inactive : not $IsAMCInvoice

    [Line : AMC_Pmt_DueDt]

    Field : Medium Prompt, AMC_Pmt_DueDt
    Local : Field : Medium Prompt : Info : $$LocaleString:"Next Payment Due Date "
    Local : Field : Medium Prompt : Inactive : not $IsAMCInvoice

    [Field : AmcType]

    Use : Name Field
    Table : AMC Type
    Show Table : Always
    Set Always : Yes
    Storage : AMCTYPE
    Width : 15
    Alignment : Center
    Inactive : not $IsAMCInvoice

    [Field : AmcFrom]

    Use : Short Date Field ;UNI Date Field
    Storage : AMCFROM
    Width : 10
    Inactive : not $IsAMCInvoice

    [Field : Tot_Cont_Amount]

    Use : Amount Field ;UNI Date Field
    Storage : TOTCONTAMT
    Width : 10
    Inactive : not $IsAMCInvoice

    [Field : AmcTo]

    Use : Short Date Field
    Set as : if $AMCType="Yearly" then $$Date:$AMCFROM+364 else +
    if $AMCType="Half Yearly" then $$Date:$AMCFROM+182 else $$Date:$AMCFROM+91
    Set Always : Yes
    Storage : AMCTO
    Width : 10
    Skip : Yes
    Inactive : not $IsAMCInvoice

    [Field : AMC_NextDue]

    Use : Short Date Field
    Set as : $$Date:$AMCTO+1
    Storage : AMCNEXTDUE
    Width : 10
    Skip : Yes
    Inactive : not $IsAMCInvoice

    [Field : AMC_Status]

    Use : Name Field
    Set as : if $AMCNEXTDUE>$$Date:$Date then "Open" else "Close"
    Set Always : Yes
    Storage : AMCSTATUS
    Width : 8
    Skip : Yes
    Inactive : not $IsAMCInvoice

    [Field : AMC_Pmt_Mode]

    Use : Name Field
    Table : AMCPmtMode
    Show Table : Always
    Set Always : Yes
    Storage : AMCPMTTYPE
    Width : 15
    Alignment : Center
    Inactive : not $IsAMCInvoice

    [Field : AMC_Pmt_From]

    Use : Short Date Field ;UNI Date Field
    Storage : PMTFROM
    Width : 10
    Inactive : not $IsAMCInvoice

    [Field : AMC_Pmt_To]

    Use : Short Date Field ;UNI Date Field
    Storage : PMTTO
    Width : 10
    Inactive : not $IsAMCInvoice

    [Field : AMC_Pmt_DueDt]

    Use : Short Date Field ;UNI Date Field
    Storage : PMTDUEDT
    Width : 10
    Inactive : not $IsAMCInvoice

    [Table: AMC Type]

    Title : $$LocaleString:"AMC Types "
    List Name : "Yearly", "Half Yearly", "Quarterly"
    Format : $Name, 12
    Alignment : Center

    [Table : AMCPmtMode]

    Title : $$LocaleString:"AMC Payment Type "
    List Name : "Yearly", "Half Yearly", "Quarterly", "Monthly"
    Format : $Name, 12
    Alignment : Center

    [System : UDF]

    IsAMCInvoice : Logical : 30001
    AMCTYPE : String : 30002
    AMCFROM : Date : 30003
    AMCTO : Date : 30004
    AMCNEXTDUE : Date : 30005
    AMCSTATUS : String : 30006
    TOTCONTAMT : Amount : 30007
    AMCPMTTYPE : String : 30008
    PMTFROM : Date : 30009
    PMTTO : Date : 30010
    PMTDUEDT : Date : 30011
     


  2. Partha Mondal

    Partha Mondal Member


    I got my mistake. I change my code : from BEFORE to AFTER then it will working.

    Add : Line : After : EI Consignee : AMCTaken
     


Share This Page