Required help in using Logic filed (YES/No) for enable a disable the extra fields

Discussion in 'Free Source Codes' started by Dilip S H, Mar 12, 2023.

    
  1. Dilip S H

    Dilip S H Member


    Dear Sir.

    Please help me on the below code.

    Required help in using Logic filed (YES/No) for enable a disable the extra fields

    For example:- In Sales voucher i want use logic field To enable and disable this option.

    if the option is yes below code should work and its no then its shouldn't work.

    Please help


    Regards,
    DIlip S H







    [#Line: EI ColumnOne]

    Option : Global EI ColumnOne : @@IsSales


    ;; "Global" prefix is added for better readability of the code


    [!Line: Global EI ColumnOne]



    Add : Right Fields : At Beginning : Global VCH Marks, Global VCH NumPack




    Local : Field : Default : Align : Center


    ;;;;;;;;;;;;;;;;;;;;;;;






    Local : Field : Global VCH Marks : Info : "BOX"

    Local : Field : Global VCH NumPack : Info : "Nos"



    [#Line: EI ColumnTwo] ;;



    Option : Global EI ColumnTwo : @@IsSales



    [!Line: Global EI ColumnTwo]



    Add : Right Fields : At Beginning : Global VCH Marks, Global VCH NumPack

    Local : Field : Default : Align : Center



    Local : Field : Global VCH Marks : Info : ""

    Local : Field : Global VCH Marks : Width : 9

    Local : Field : Global VCH NumPack : Info :""

    [#Line: EI InvDetails]



    Option : Global EI InvDetails : @@IsSales



    [!Line: Global EI InvDetails]



    Delete : Lines : EI Marks, EI NumPackages



    [#Line: CI InvDetails]



    Option : Global CI InvDetails : @@IsSales



    [!Line: Global CI InvDetails]



    Delete : Lines : CI MarksPackages



    [#Line: EI InvInfo] ;; Invoice Inventory Entries without Class



    Option : Global EI InvInfo : @@IsSales



    [#Line: CI InvInfo] ;; Invoice Inventory Entries with Class



    Option : Global EI InvInfo : @@IsSales



    [!Line: Global EI InvInfo]



    Add : Right Fields : At Beginning : Global VCH Marks, Global VCH NumPack

    Local : Field : Global VCH Marks : Storage : BasicPackageMarks

    Local : Field : Global VCH NumPack : Storage : BasicNumPackages



    [Field: Global VCH Marks]



    Use : Short Name Field

    Width : 8

    Align : Right

    Border : Thin Left Right

    Invisible : NOT ##VrVarC1

    Skip on : $$IsEnd:$StockItemName

    ;; Inactive : $$IsEnd:$StockItemName



    [Field: Global VCH NumPack]



    Use : Short Name Field

    Width : 12

    Align : Right

    Border : Thin Left Right

    Invisible : NOT ##VrVarC1

    Skip on : $$IsEnd:$StockItemName

    ;; Inactive : $$IsEnd:$StockItemName



    [#Form: Export Invoice]



    Option : Global Export Invoice NP : @@IsSales



    [!Form : Global Export Invoice NP]



    Local : Line : VCH NarrPrompt: Add : Right Fields : At Beginning : Global Total Marks, Global Total NumPack



    [Field: Global Total Marks]



    Use : Global VCH Marks

    Border : Totals

    Set as : $$String:mad:@NumPackMarksTotal

    Set always : Yes

    Skip : Yes



    [Field: Global Total NumPack]


    Use : Global VCH NumPack

    Border : Totals

    Set as : $$String:mad:@NumNumPackTotal

    Skip : Yes

    Set always : Yes



    [System: Formula]



    NumNumPack : $$Number:$BasicNumPackages

    NumNumPackTotal : $$CollNumTotal:InventoryEntries:mad:@NumNumPack

    NumPackMarks : $$Number:$BasicPackageMarks

    NumPackMarksTotal : $$CollNumTotal:InventoryEntries:mad:@NumPackMarks


    ;[#Line: EXPINV Column1]

    ;Option : TAXINCLU : @@IsSales

    ;[!Line : TAXINCLU]

    ;Add : Left Fields : After : EXPINV DescTitle : TAXINC

    ;Local : Field : TAXINC : Info : "No of Pack"

    ;Local : Field : TAXINC : Width : 5.5

    ;Local : Field : TAXINC : Align : Center





    ;[#Line: EXPINV InvDetails]

    ;Option : EB EXPINV InvDetails : @@IsSales

    ;[!Line : EB EXPINV InvDetails]

    ;Add : Left Fields : After : EXPINV Desc : TAXINC

    ;[Field: TAXINC]

    ;Use : Number Field

    ;Width : 6

    ;Set As :$BasicPackageMarks

    ;Align : Right

    ;Border: Thin Left

    ;Skip : YES



    [#Line: EXPINV Column1]

    Option : TAXINCLUd : @@IsSales

    [!Line : TAXINCLUd]

    ;Add : Left Fields : After : EXPINV DescTitle : TAXINCd
    ;Add : Right Field : Before : EXPINV Qty : TAXINCd
    ;Add : Left Field : After : EXPINV DescTitle :TXINCd
    Add : Right Fields: After : EXPINV HSNSACTitle:TAXINCd

    Local : Field : TAXINCd : Info : "BOX"

    ;Local : Field : TAXINCd : Width : 5

    Local : Field : TAXINCd : Align : Center
    Local : Field : TAXINCd : Style : Normal
    Local : Field : TAXINCd :Width : If @@IsGSTTaxAnalysisWithItems Then If @@InvWithActQty AND @@GSTAltQtyasSeperaCol Then 4.8 Else 5 Else +
    If (@@IsOrderVch OR @@IsJobOrderVouchers) AND @@InvWithActQty AND @@InvWithBatches AND @@InvWithPartNo Then @@TrackingWidth-3 Else @@TrackingWidth


    [#Line: EXPINV InvDetails]



    Option : dEB EXPINV InvDetails : @@IsSales



    [!Line : dEB EXPINV InvDetails]

    ;Add : Left Fields : Before : EXPINV ActualQty : TAXINCd
    Add : Right Field : Before : EXPINV Qty : TAXINCd

    [Field: TAXINCd]

    Use : Text Field

    ;Width : 4.5
    Width : If @@IsGSTTaxAnalysisWithItems Then If @@InvWithActQty AND @@GSTAltQtyasSeperaCol Then 4.8 Else 5 Else +
    If (@@IsOrderVch OR @@IsJobOrderVouchers) AND @@InvWithActQty AND @@InvWithBatches AND @@InvWithPartNo Then @@TrackingWidth-3 Else @@TrackingWidth



    Set As :$BasicPackageMarks

    Align : Right

    Border: Thin Left

    Skip : YES
    Style:Normal bold

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;[#Line: GST EXPINV AccSubTotal]

    ;[!Form : Global Export Invoice NP]
    [#Line: EXPINV Totals]
    ;Add : Right Fields : After : EXPINV MarksTitle1:Global Total Marks1
    Add : Right Fields : Before : EXPINV ActualQtyTotal :Global Total Marks1


    [Field: Global Total Marks1]



    Use : Global VCH Marks1

    Border : Totals

    Set as : $$String:mad:@NumPackMarksTotal

    Set always : Yes

    Border:thin left

    Skip : Yes

    Width : If @@IsGSTTaxAnalysisWithItems Then If @@InvWithActQty AND @@GSTAltQtyasSeperaCol Then 4.8 Else 5 Else +
    If (@@IsOrderVch OR @@IsJobOrderVouchers) AND @@InvWithActQty AND @@InvWithBatches AND @@InvWithPartNo Then @@TrackingWidth-3 Else @@TrackingWidth


    Align : Right
    Style:Normal bold



    ;;;;;;;;;;;;;;;
     


Share This Page