seeking help for Bank Allocations update

Discussion in 'Requests' started by zakirhossain_diu, Dec 16, 2019.

         

  1. Dear experts,
    I am trying to modify codes collected from this forum.
    I have 500 entries in Bank ledger without Bank allocations that's why not showing in Reconciliation report, Now I want to update all vouchers at once. Transaction type is "Others" so I don't need to put Instrument number.
    Below modified codes that I am trying and getting an error as Collection "BankAllocations" could not be found.

    Thank you

    Code:
    [#Form: Day Book]
    Add : Button : Update OptVouchers
    
    [Button : Update OptVouchers]
    Title : "Alter"
    Key : Ctrl + O
    Action : Execute : Update Voucher to Optional
    
    [Report : Update Voucher to Optional]
    Title : "Update Vouchers"
    
    [Form : Update Voucher to Optional]
    Parts : Update Voucher to Optional
    Option : Small Size Form
    Full Width : No
    Space Left : 1
    Space Right : 1
    
    On : Form Accept : Yes : Call : Update Voucher as Optional
    
    
    [Part : Update Voucher to Optional]
    Lines : Form SubTitle, Update Voucher to Optional
    Local : Field : Form SubTitle : Info : "Update Voucher Status"
    Space Bottom: 1
    
    [Line : Update Voucher to Optional]
    Fields : Long Prompt, Logical Field
    Local : Field : Long Prompt : Set as : $$String:"Vouchers Bank allocation will be Alter :"
    
    [Function : Update Voucher as Optional]
    010 : START BATCH POST : 500
    020 : Walk Collection : Selected OptVouchers for Update
    030 : Set Object : (Voucher, ##VchID).
    040 : Set Target
    ;040a: Walk Collection: Ledgerentries
            1015    :    Insert Collection Object    : BankAllocations
            1016    :    Set Value        :     Name                        : $$MakeUniqueID
            1017    :    SET VALUE        :     Date                        : $$Date:$date
            1018    :    SET VALUE        :   TRANSACTIONTYPE                : "Others"
            1019    :    Set Value        :    INSTRUMENTDATE                : $$Date:$date    
            1020    :    SET VALUE        :     INSTRUMENTNUMBER            : ""
            1021    :    SET VALUE        :     status                        :        No
            1022    :   Set Value        :     PAYMENTMODE                    :        "Transacted"
            1023    :    Set Value        :     ISCONNECTEDPAYMENT            :         No
            1024    :   Set Value        :     ISSPLIT                        :       No
            1025    :   Set Value        :     ISCONTRACTUSED                :        No
            1026    :   Set Value        :     ISACCEPTEDWITHWARNING        :        No
            1027    :    Set Value        :     ISTRANSFORCED                :       No
            1028    :    Set Value        :     AMOUNT                        : ($$AsAmount:$Amount) *-1
            1029    :    Set Target        : ..
    
    ;050 : Set value : IsOptional : Yes
    ;060 : Set Value : Narration : "Status Changed"
    070 : Alter Target
    080 : Set Target : ..
    090 : End Walk
    500 : End Batch Post
    
    
    [Collection : Selected OptVouchers for Update]
    Data Source : Parent Report : Selected Lines
    Walk : Ledgerentries
    [System : Formula]
    VchID : $$SPrintF:mad:@VCHMasterID:$MasterID
    
    
     


Share This Page