Amount Total till the current voucher

Discussion in 'Tally Developer' started by K Vinod Kumar, Mar 27, 2014.

    
  1. K Vinod Kumar

    K Vinod Kumar New Member


    Dear Friends,
    I have stored a UDF value in batch allocations in the sales voucher. I need to print the total amount of this UDF value from all vouchers, starting from the first voucher till the current voucher which I'm printing. For Eg :
    1 st Voucher - UDF Value - 5000, when printing this invoice, the output field should show 5000
    2 nd Voucher - UDF Value - 2000, when printing this invoice, the output field should show 7000
    3 rd Voucher - UDF Value - 1000, when printing this invoice, the output field should show 8000
    4 th Voucher - UDF Value - 3500, when printing this invoice, the output field should show 11500
    5 th Voucher - UDF Value - 1000, when printing this invoice, the output field should show 12500

    I tried with vouchernumber, it was not working, hence I tried with voucher date.
    I tried the following command, but it gives the total till the To Date and not till current voucher date.
    $$CollAmtTotal:MySalesInvoiceColl:($$ToValue:##SVToDate:$UDFField)

    I tried with SVCurrentDate, at this it does not display any value.
    $$CollAmtTotal:MySalesInvoiceColl:($$ToValue:##SVCurrentDate:$UDFField)

    [Collection : MySalesInvoiceColl Src]
    Type: Vouchers
    Child Of : $$VchTypeSales
    Belongs To: Yes
    Filter: ExciseFilter

    [System : Formula]
    ExciseFilter: @@IsExciseVoucherType

    [Collection : MySalesInvoice Coll]
    Source Collection: MySalesInvoiceCollSrc
    Walk: Inventory Entries, Batch Allocations
    Fetch: UDFField
     


  2. Gopaalran

    Gopaalran New Member


    Dear Vinod
    I am not sure but you can check with Voucher Number Filter in your Collection.

    Filter : $VoucherNumber < #VchNumber
     


  3. K Vinod Kumar

    K Vinod Kumar New Member


    Dear Sir,
    Thank you. From where will the code, get the VCHNumber value? Are you considering the VCH Number as the field?

    REgards
    Vinod
     


  4. Gopaalran

    Gopaalran New Member


    Dear Vinod,
    As I understand you want to print UDF value on sales invoice printing, in that case you can take a value from VCH Number field.
     


  5. JObimon Arackal JOhn

    JObimon Arackal JOhn Active Member



    Dear vinod ,

    run your tally in devmode.

    then if you place your cursor on a field the name of field will be shown as tooltip.

    then open tdl developer educational version search the name of that field in the entire default tdl using ctrl+d

    in search result if you double click you can see the coding related to that field.

    For Eg.

    You place your mouse above voucher of tally then it will give you the name of field

    search the same in TDl developer.


    What ever I said is for learning purpose only. please see the attachemnts
     

    Attached Files:

    • 1.png
      1.png
      File size:
      1.4 MB
      Views:
      77
    • 2.png
      2.png
      File size:
      141.1 KB
      Views:
      78
    • 3.png
      3.png
      File size:
      156.2 KB
      Views:
      75
    • 4.png
      4.png
      File size:
      159.7 KB
      Views:
      82
    Sunder and PARTHIBAN.K like this.


  6. NaraSimhulu Devalam

    NaraSimhulu Devalam New Member



    Hi Vinod Kumar

    Can U try this i this it's for you solutions.


    [Collection : MySalesInvoiceColl Src]

    Type: Vouchers
    Child Of : $$VchTypeSales
    Belongs To : Yes
    Filter : ExciseFilter

    [System : Formula]

    ExciseFilter : @@IsExciseVoucherType

    [Collection : MySalesInvoice Coll]

    Source Collection: MySalesInvoiceCollSrc
    Walk: Inventory Entries, Batch Allocations

    Fetch : PartyLedgerName, Amount
    By: MyVType: $VoucherTypeName
    Aggr Compute: MyAmount: Sum: $$AsAmount:$Amount (Give ur UDF Name)

    Format: $MyAmount

    In Set As

    Set as: $$CollectionField:$MyAmount:1:MySalesInvoiceColl


     


  7. K Vinod Kumar

    K Vinod Kumar New Member


    Dear Friends,
    Thanks to you all. A special thanks to Mr. Gopalaaran for your idea, it needed a small modification, but it worked.
    I gave the code as follows
    Filter : $$Number:$VoucherNumber <= $$Owner:$$Number:$VoucherNumber

    Regards
    Vinod
     
    Gopaalran likes this.


Share This Page