Separate total for different Units

Discussion in 'Free Source Codes' started by Rakesh Kumar, Oct 1, 2022.

    
  1. Rakesh Kumar

    Rakesh Kumar Member


    Respected Amit Sir / Jai Kumar Sir with others respected Experts, I need separate total for different Units as below screenshot:-

    But Sir, I have no idea how to get it, pls guide me how to do this.

    upload_2022-10-1_17-28-42.png
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Search the forum and you will find the Solution.........

    Solution already posted by @balajimg and me ...... mine is manual and Balaji's is Dynamic........ Find it and implement it.....
    And then thank both of us.... :D:p
     


  3. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    The Total is already there........ but when multiple UoM are present, it will not total up in default Tally.
     


  4. Rakesh Kumar

    Rakesh Kumar Member


    Sir, as per your guidance I found the code. But it is not working, pls help me or give me a clue to implement this code.

    ;;for base unit totals

    [Field : My Base Unit Totals]
    Use : Name Field
    Set as : "No. of Items in base units : " + $$LocaleString:$$FullList:MyInvBaseUnitColl:$QtyStr

    ;;for alternate unit totals

    [Field : My Alt Unit Totals]
    Use : Name Field
    Set as : "No. of Items in alternate units : " + $$LocaleString:$$FullList:MyInvAltUnitColl:$QtyStr


    ;;for base units

    [Collection : MyInvBaseUnit]
    Source Collection : .
    Walk : AllInventoryEntries
    By : BaseUnit : $BaseUnits:StockItem:$StockItemName
    Aggr Compute: Qty : Sum : $BilledQty

    [Collection : MyInvBaseUnitColl]
    Source Collection: MyInvBaseUnit
    Source Var : MyUnt : String : $BaseUnit
    Source Var : Qty : Number : $Qty
    Compute : QtyStr : $$String:##Qty + $$String:" " + $$String:##MyUnt

    ;;==================================================

    ;;for alternate units

    [Collection : MyInvAltUnit]
    Source Collection : .
    Walk : AllInventoryEntries
    By : AltUnit : $AdditionalUnits:StockItem:$StockItemName
    Aggr Compute: Qty : Sum : $BilledQty

    [Collection : MyInvAltUnitColl]
    Source Collection: MyInvAltUnit
    Source Var : MyUnt : String : $AltUnit
    Source Var : Qty : Number : $Qty
    Compute : QtyStr : $$String:##Qty + $$String:" " + $$String:##MyUnt
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Above Post is meant as a guidance .......... Above is for Voucher Entry .....not for Stock Summary report.

    You need to create a collection of StockItems --- get their closing balance, then Filter Total the closing-QTY based on the criteria of UoM , then compute the same in the COLLECTION of your report.
     


Share This Page