Need Correct the Code (selected voucher to go optional voucher)

Discussion in 'Free Source Codes' started by pradeep kumar dewangan, Aug 9, 2019.

         

  1. [#Button: Optional Button]

    Key : Ctrl+L
    Action : Set : OptionalFlag : NOT ##OptionalFlag
    Title : if ##OptionalFlag then $$LocaleString:"Regular" else $$LocaleString:"Optional"
    Inactive : NOT @@IsOptionalAllowed
    Scope : Selected Lines


    [#Form: Day Book]

    Add : Button : Optional Button

    [#Report: Day Book]

    Object : Voucher
    Add : Collection : Daybook Vouchers of Company

    [#Collection : Daybook Vouchers of Company]

    Data Source : Parent Report: Selected
    Fetch : Inventory Entries.*, Voucher Number, Date, Ledger Entries.*
     


  2. Sanjeev S

    Sanjeev S Member


    Try this ......

    [#Form: Day Book]
    Add : Button : Update OptVouchers

    [Button : Update OptVouchers]
    Title : "Optional"
    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 will be Updated as Optional :"

    [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
    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

    [System : Formula]
    VchID : $$SPrintF:mad:@VCHMasterID:$MasterID
     
    Vikram Bhat likes this.


  3. Vikram Bhat

    Vikram Bhat Member


    Sir Its Code Do Optional Can You make it to regular For sales Order
     



  4. Thank for Members for corporation
    Its nice working

    Voucher to go Optional - Its Nice

    but Optional to Regular ??

    Please some correction.

    again Thanks for Members
     


  5. sumamehtra

    sumamehtra Member


    Dear sir
    I want selected voucher to voucher type change (Sales Order voucher to Sales Order Authorization). Please share
     


Share This Page