Previous Voucher Value

Discussion in 'Tally Developer' started by HVPatel, Sep 11, 2012.

    
Thread Status:
Not open for further replies.
  1. HVPatel

    HVPatel Active Member


    Hello Experts
    I have User Defined Field in Sales Voucher,
    Entering numbers, for example
    15-05-12 1st voucher = 25
    16-05-12 2nd voucher = 39
    17-05-12 3rd voucher = 1000
    01-05-12 4th voucher = 45
    Now i want to get value of previous/last voucher (4th voucher = 45+1) in next 5th voucher, means
    02-05-12 5th voucher = 46

    Using below i am getting last value + 1 that is 1000+1, i need 45+1
    [System: UDF]
    storeBillRangefrom: String: 1029

    [Field : Billrangefrom]
    Use : Name Field
    Storage: storeBillrangefrom
    Set As : $CurrentBillRangefrom
    Width : 10
    [Collection : HPCollection]
    Type : Voucher
    Filter : IsSales

    [System : Formula]
    LastBillRangefrom : $$CollectionField:$storeBillRangeto:mad:@LastItem:HPCollection
    CurrentBillRangefrom : $$Number:mad:@LastBillRangefrom + 1
     

    Attached Files:



  2. admin

    admin Administrator Staff Member


    [Collection : HPCollection]
    Type : Voucher
    Filter : IsSales
    Sort : @@Increaing : $MasterId

    ;; Now all the sales voucher will sort on Master Id instead of Date/VoucherNumber
     


  3. HVPatel

    HVPatel Active Member


    Thanks sir, its working.
     


Thread Status:
Not open for further replies.

Share This Page