Batch before item on sales Collection -reg

Discussion in 'Tally Developer' started by Murali.R, Aug 19, 2023.

    
  1. Murali.R

    Murali.R Member


    [Collection: DSD Batches VchSrc]
    Type : Vouchers : VoucherType
    Child Of : $$VchTypePurchase
    Belongs To : Yes
    Fetch:InventoryEntries.BatchAllocations.*

    [Collection : JSON Stock transfer ]
    Type : Vouchers : VoucherType
    Child Of : $$VchTypeStockJrnl
    Belongs To : Yes
    Fetch : InventoryEntriesin.*
    Fetch:InventoryEntries.BatchAllocations.*

    [Collection : DSD Batches VCH Extract]
    Source Collection:JSON Stock transfer,DSD Batches VchSrc
    Title : "List Of Serial Numbers"
    Walk : InventoryEntriesIn,AllInventoryEntries,BatchAllocations
    By : StockItemName : $StockItemName
    By : BatchName : $BatchName
    SubTitle : "Batch Name" ,"StockItem Name","Cl.Wait"
    Compute : CLBalance : $$FilterValue:$StkClBalance:DSDBATCHEXTRACT:1:IsItmCorrectBatch
    Compute : BatchVA : $MyBatVA
    Compute : ClPcs : $$FilterValue:$ItmpcsQty:DSDBATCHEXTRACT:1:IsCorrectBatch
    Format : $BatchName,20
    Format : $StockItemName ,20
    Format : $CLBalance,15
    Filter : NOTEmptyCLBalance
    Column Align : Left, Right, Right
    Full Height : Yes
    Client Only : Yes
    Keep Source : ...


    This collection List only Purchase and Stock journal but I Want Opening Stock Collection please help
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Your Collections is about VOUCHERS ---- So it will take transactions during the period only.

    Make the Collection of BATCHES and include that also.
     


  3. Murali.R

    Murali.R Member


    sir Sample collection please
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Please do type --- Type : Batch in Developer-- you will get many samples. As per your report and requirements, make the appropriate collection to be used in your combined collection, by adding it as SOURCE.
     


  5. Murali.R

    Murali.R Member


    [Collection: DSD Batches VchSrc]
    Type : Vouchers : VoucherType
    Child Of : $$VchTypePurchase
    Belongs To : Yes
    Fetch:InventoryEntries.BatchAllocations.*

    [Collection : JSON Stock transfer ]
    Type : Vouchers : VoucherType
    Child Of : $$VchTypeStockJrnl
    Belongs To : Yes
    Fetch : InventoryEntriesin.*
    Fetch:InventoryEntries.BatchAllocations.*

    [Collection: CExpirySrc]
    Type : Batch
    Fetch : Name, Parent, ExpiryPeriod, ClosingBalance, GodownName, MfdOn, ClosingAsOnDate
    Filter: ExpiryDatesFilter, ZeroItemFilter

    [Collection: CExpiry]
    Use : CExpirySrc
    Client Only : Yes
    Keep Source : .
    By : StockItemName : $StockItemName
    By : BatchName : $BatchName

    [Collection : DSD Batches VCH Extract]
    Source Collection:CExpiry,JSON Stock transfer,DSD Batches VchSrc
    Title : "List Of Serial Numbers"
    Walk : InventoryEntriesIn,AllInventoryEntries,BatchAllocations
    By : StockItemName : $StockItemName
    By : BatchName : $BatchName
    SubTitle : "Batch Name" ,"StockItem Name","Cl.Wait"
    Compute : CLBalance : $$FilterValue:$StkClBalance:DSDBATCHEXTRACT:1:IsItmCorrectBatch
    Compute : BatchVA : $MyBatVA
    Compute : ClPcs : $$FilterValue:$ItmpcsQty:DSDBATCHEXTRACT:1:IsCorrectBatch
    Format : $BatchName,20
    Format : $StockItemName ,20
    Format : $CLBalance,15
    Filter : NOTEmptyCLBalance
    Column Align : Left, Right, Right
    Full Height : Yes
    Client Only : Yes
    Keep Source : ...

    Not working sir , please guide sir
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    What exactly and where is this code to be implemented? I cannot check without the full code and a screenshot idea on what you need?
     


  7. Murali.R

    Murali.R Member


    sir please send your mail id , then i will send full code and data
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member



  9. Murali.R

    Murali.R Member

    Attached Files:



  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Have seen your code and DATA -- and now explain to me the logic ???

    Batches are integral to StockItems and are contained within the StockItem Object --- in your code you are selecting the BATCH first and then the StockItem --- The collection of Batches can be made as under :
    [collection : mybatches]
    Type : Batch
    Child of : ##vComponentName or #FieldName (whatever)​

    However there is no CHILDOF in your scenario -- it is like -- not feeling well - so decide to go to Doctor - but before entering Clinic - you BUY medicine and then tell your doctor to prescribe these medicines only, since you have bought it already.

    You are able to get the other batches- because your collection is extracting batch data from specified vouchers and as such is not dependent on the "selection of the StockItem Name".
     


  11. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Also your collections are wrong in terms of usability, because when the data increases, it will take more and more time to collect the data from the specified vouchers.

    Instead the correct methodology is to select the StockItem and then extract all the batches of that StockItem.

    The steps that you are trying is against the logic that needs to be applied.
     


  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Tally have designed it with a correct methodology and it should be followed -- after you select the ITEM, the List of Active Batches shows all - including Opening batches.
     


Share This Page