Unable to Total for Alternate Unit in Stock Journal Voucher

Discussion in 'Tally Developer' started by Bhavesh Thacker, Mar 28, 2019.

    

  1. I have write a code for stock journal voucher which shows alternate unit in stock journal voucher. but due to some mistake in code it does not total for alternate qty at bottom. and runs without error.

    Please help me to correct code for alternate Unit Total.



    ;;to show additional unit in stock journal
    [#Line: SJDetailsB] ;;Shows Additional Unit After VCH BilledQty at shock name entry
    Add: Right Field : After : VCH BilledQty : VCH AltBilledQty2
    ;;to show additional unit in stock journal

    [Field: VCH AltBilledQty2]

    Use : Qty Secondary Field
    Align : Right
    Width : @@VCHQtyWidth
    Style : Small Italic
    Set as : $BilledQty
    Set always : Yes
    Skip : Yes
    Inactive : $$IsEnd:$StockItemName OR @@NoAltUnits
    Storage : VCHAltBilledQty

    [System : UDF]

    VCHAltBilledQty2 : Quantity : 20010

    [#Line: SJ Totals]
    Add : Right Field : After : VCH BilledQtyTotal : VCH BilledQtyTotal2


    [Field: VCH BilledQtyTotal2]

    Use : Qty Field
    Type : Quantity : Secondary Units
    Format : "Symbol, Short Form, No Compact"
    Set as : $$Total:VCHBilledQty
    Style : if @@IsInvVch then "Normal" else "Normal Bold"

    ;;end of code
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    [#Part: SJOut]
    Total : VCH BilledQtyTotal2
     



  3. Part SJOut is for Destination (Production) side part, but I also Tried it on SJIn Part. it shows only first items alternate unit.
    does not add second and onward items's Alternate Billed Qty in total field. !!

    Sir, I have already tried to add my filed in SJOut Part, but it does not solved the issue.

    I Have replaced Use : Qty Field with Use : Voucher Qty Total at [Field: VCH BilledQtyTotal2] and the issue is solved. !!

    Thanks for your prompt reply. I am amazed that now without using Total : VCH BilledQtyTotal2 in [#Part: SJOut] it shows total of all items in alternate unit qty.


    Thanks & Regards,

    Bhavesh I. Thacker
     


  4. ankur daga

    ankur daga Member


    Thanks Bhavesh bhai, its working fine with some little modifications for prime 2.0.
     


Share This Page