Modify Date Using Modify Object BUT Does not change Date ... Help

Discussion in 'Requests' started by Johar, Sep 2, 2016.

         
  1. Johar

    Johar New Member


    Dear Experts,

    Below is mention code it does not change date as per input. Please Help

    [#Form: Day Book]
    Add: Button: After : DSPShowGP : InputNewDate

    [Button: InputNewDate]
    Title: "Set Date"
    Key: Ctrl+R
    Action List : InputDate, ModifyDate

    [Button: InputDate]
    Key: Ctrl+R
    Action: Alter: Rpt InputDate

    [Button: ModifyDate]
    Key: Ctrl+R
    Action: Call : FuncEdit


    [Function: FuncEdit]

    ;; Variable to Save MasterID
    Variable : MSTID : String
    ;;Variable : Ndate : Date

    ;; Walking Over Current Vouchers of Day Book
    100 : WALK COLLECTION : SELDayVouchers
    ;;110 : Set : Ndate : #NewDate

    ;; Set Master ID to a Variable
    120 : SET : MSTID : "ID:"+ $$String:$MasterID

    ;; Set Object In Edit Mode
    130 : NEW OBJECT : Voucher : ##MSTID

    ;; Set Target to the First Ledger (PartyLedger)
    140 : SET TARGET : LedgerEntries[1]

    150: log : #NewDate

    ;;Modifies Value of the Methord
    160 : SET VALUE : Date : #NewDate




    ;;$$MAchineDate ***** If i use $$Machinedate the date changes but not taking Input Date



    ;; Back to Ledger Entry Object
    170 : SET TARGET : ..

    ;; Back to Voucher Object
    180 : SET TARGET : ..

    ;; Saving Object
    190 : ACCEPT ALTER

    200 : END WALK



    [Collection: SELDayVouchers]

    Data Source : Report : Current
    Fetch : All Ledger Entries


    [Report: Rpt InputDate]
    Title : "Update Voucher Date"
    Form : Input Date
    Auto : Yes

    [Form: Input Date]
    Part : Input Date
    Width: 10% Screen
    Height: 10% Screen

    [Part: Input Date]
    Line: New Date

    [Line: New Date]

    Field : Simple Prompt , NewDate
    Local : Field: Simple Prompt : Info: "New Date"

    [Field : NewDate]
    Use : Short Date Field



    Thanks a lot.
     



  2. uttam100

    uttam100 Member


    Upload screen shot
     



  3. Johar

    Johar New Member


    Dear Uttam Sir,

    Uploaded Screen shot, first i select which voucher date change is needed, then i set date as per my requirement but change does not happen, and when i change it to $machinedate changes are made why it is not working please help.
     

    Attached Files:

    • P1.png
      P1.png
      File size:
      307.7 KB
      Views:
      22
    • P2.png
      P2.png
      File size:
      334.7 KB
      Views:
      19



  4. Johar

    Johar New Member


    i got it solved.. Thanks
     



  5. sattam

    sattam Member


    can u share the corrected code? @Mr. Johar
     



  6. Johar

    Johar New Member


    [#Form: Day Book]
    Add: Button: After : DSPShowGP : InputNewDate

    [Button: InputNewDate]
    Title: "Set Date"
    Key: Ctrl+R
    Action List : InputDate, ModifyDate

    [Button: InputDate]
    Key: Ctrl+R
    Action: Alter: Rpt InputDate

    [Button: ModifyDate]
    Key: Ctrl+R
    Action: Call : FuncEdit


    [Function: FuncEdit]

    ;; Variable to Save MasterID
    Variable : MSTID : String

    ;; Walking Over Current Vouchers of Day Book
    100 : WALK COLLECTION : SELDayVouchers

    ;; Set Master ID to a Variable
    120 : SET : MSTID : "ID:"+ $$String:$MasterID

    ;; Set Object In Edit Mode
    130 : NEW OBJECT : Voucher : ##MSTID

    ;; Set Target to the First Ledger (PartyLedger)
    140 : SET TARGET : LedgerEntries[1]

    ;;Modifies Value of the Methord
    160 : SET VALUE : Date : #NDate

    ;; Back to Ledger Entry Object
    170 : SET TARGET : ..

    ;; Back to Voucher Object
    180 : SET TARGET : ..

    ;; Saving Object
    190 : ACCEPT ALTER

    200 : END WALK



    [Collection: SELDayVouchers]

    Data Source : Report : Current
    Fetch : All Ledger Entries


    [Report: Rpt InputDate]
    Title : "Update Voucher Date"
    Form : Input Date
    Auto : Yes

    [Form: Input Date]
    Part : Input Date
    Width: 25% Screen
    Height: 8% Screen

    [Part: Input Date]
    Line: New Date

    [Line: New Date]

    Field : Long Prompt , NewDate
    Local : Field: Long Prompt : Set As: "New Date"

    [Field : NewDate]
    Use : Short Date Field
    Modifies : NDate
    Border : Thin Box
    Width : 15

    [System : Variable]
    Ndate : " "


    [Variable : NDate]
    Type : Date
    Persistent : Yes
     



  7. sattam

    sattam Member


    Thanks Mr. Johar
     



  8. uttam100

    uttam100 Member


    What if, if I want to change amount
     



Share This Page