Code: Alter Collection "List of Stock Items" Format and Alignment

Discussion in 'Requests' started by naren1234, Dec 15, 2017.

    
  1. naren1234

    naren1234 Member


    Dear Experts,

    Please help me correct the below code.

    I am using below code to show Current Balance (Qty and Base unit) in "List of Stock Items".
    As you can see in attached picture,
    i) below code does not remove original list of "Item Description" (left most column with compressed/squeezed text). To fix this I added a line "Delete : Format" to below code before the last 2 lines, but then current stock balance (last column in pic) disappears.
    ii) Also, I want to make the new item name column with increased width align to Left.

    Code:
    [#Collection: List of Stock Items]
    Format : $Name,195
    Format : $VchStkItmBalance,35 : "Base"
    Thanks,
    Narendra

    ListOfStockItems.JPG
     


  2. D Lokesh

    D Lokesh Member



    Dear Sir,

    Try this below code.

    [#Collection: List of Stock Items]

    Title : $$LocaleString:"List of Stock Items"
    Type : Stock Item
    Fetch : Name
    Report : Stock Item
    Variable : SStockItem
    Trigger : SStockItem
    IsODBCTable : Yes
    Delete : Format
    Add : Format : $Name,195
    Add : Format : $VchStkItmBalance,35 : "Base"
     


  3. D Lokesh

    D Lokesh Member



    Dear Sir,

    Try this below code.

    [#Collection: List of Stock Items]

    Title : $$LocaleString:"List of Stock Items"
    Type : Stock Item
    Fetch : Name
    Report : Stock Item
    Variable : SStockItem
    Trigger : SStockItem
    IsODBCTable : Yes
    Delete : Format
    Add : Format : $Name,195
    Add : Format : $VchStkItmBalance,35 : "Base"
     


  4. naren1234

    naren1234 Member


    Dear Lokesh, Thanks for the help, works very well.
    Can i bother you with one last question?

    I am also using below code to populate similar list during voucher entry (i.e. Sale, Purchase, DrNote, CrNote, JV, Mfg. Jrnl) it works in both cases with & without voucher class.

    Code:
    [#Collection: Vch Stock Item Extract]
    
    Format: $Name,195
    Format: $VchStkItmBalance : "Base"
    Adding your code, seems to override the effect of above code, i.e. the default position of the Stock items list moved from Left-side of the screen {pic: ListAtLeft(Before)} to Bottom of the screen {pic: ListAtBottom(After)}

    Anyway to fix this back to default screen position (Left side)?



    (PS: I know, the Stock Balance appears twice in the list, was not able to fix that)

    Thanks
    Narendra
     

    Attached Files:



  5. D Lokesh

    D Lokesh Member


    Dear Sir,

    [#Collection: List of Stock Items]

    Use : Alias Collection
    Title : $$LocaleString:"List of Stock Items"
    Type : Stock Item
    Fetch : Name
    Report : Stock Item
    Variable: SStockItem
    Trigger : SStockItem
    IsODBCTable : Yes
    Delete : Format
    Add : Format : $Name, 70
    Align : Right
    FullHeight : Yes
    With Alias : Yes
     
    Manjunath Koparde likes this.


  6. naren1234

    naren1234 Member


    Great Lokesh Ji !!
    Thanks for the help.

    Any idea why the code does NOT Right Align the List of Stock Items on Screen when passing a Manufacturing Journal entry (i.e. Vch Type: Stock Journal, with option 'use as Manuf. Journal': Yes) ??
     


  7. D Lokesh

    D Lokesh Member


    Dear Sir

    Reason is "Format : $Name, 40" if you reduce the size it will come Right
     


  8. narayane88

    narayane88 Active Member


    how fetch purchase summery in collection
    i.e date, invoiceNumber, PartyName, purchase Quntity,
     


  9. D Lokesh

    D Lokesh Member



    [Collection : PurchaseVouchers Src]

    Type : Vouchers : VoucherType
    Child Of : $$VchTypePurchase
    Belongs To : Yes

    [Collection : PurchaseVouchers]

    Source Collection : PurchaseVouchers Src
    Walk : All Inventory Entries
    Fetch : StockItemName, BilledQty, Rate, Amount
    Fetch : VoucherNumber, Date, PartyLedgerName

    By : VoucherNumber : $VoucherNumber
    By : Date : $Date
    By : PartyLedgerName : $PartyLedgerName
    Aggr Compute: BilledQty : Sum : $BiledQty

    Fetch : $Date
    Fetch : $VoucherNumber
    Fetch : $PartyLedgerName
    Fetch : $BilledQty
     


  10. narayane88

    narayane88 Active Member


    upload_2018-1-5_15-30-46.png


    [Collection: My Coll]
    Title: $$LocaleString:"Name of Purchase wise"

    Source Collection : PurchaseVouchers Src
    Sub Title:"Item Name","Purchase Date","Voucher Number","Party Name","Purchased Quntity", "Purchase Rate","Sales Quentity","Balance Quentity"
    Walk : All Inventory Entries
    Fetch : StockItemName, BilledQty, Rate, Amount
    Fetch : VoucherNumber, Date, PartyLedgerName
    By : VoucherNumber : $VoucherNumber
    By : Date : $Date
    By : PartyLedgerName : $PartyLedgerName
    Aggr Compute: BilledQty : Sum : $BiledQty
    Format: $StockItemName,25
    Format : $Date,20
    Format : $VoucherNumber,10
    Format : $PartyLedgerName,20
    Format : $BilledQty,10
    Format: $Rate,15
    Format : $saleQty
    Format: $BalQTy
    [Collection : PurchaseVouchers Src]
    Type : Vouchers : VoucherType
    Child Of : $$VchTypePurchase
    Belongs To : Yes


    also fetch following in Same Collection

    Not Fetching date Properly and




    Thanks Lokesh Sir for Help
     


  11. naren1234

    naren1234 Member


    Thanks for the reply Lokesh ji,

    Two points noted:

    1) When Right Aligning the List:-
    To keep the Stock Items List Right Aligned on screen, Mfg/Stock Journals accept width upto 64 for $Name. And other voucher types (i.e. Sales, Purch, Dr/Cr Note, PO, Del Note, Rcpt Note, Phy Stock, Contra) accept $Name width upto 87.

    2) When displaying Current Stock Balance:-
    Current Balance of Stock items disappear from the List of Stock Item when I go to following menus:-
    (a) Gateway > Inventory Info > Stock Items > Alter/Display option
    (b) Gateway > Display > Inventory Books > Stock Item
    (c) Gateway > Display > Statement of Inventory > Stock Query
    If I add back below line, it reappears in above 3 menus. But then, during voucher entries, stock balance appears twice in the list. How can I fix this?
    Code:
    Add : Format : $VchStkItmBalance : "Base"
    I tried an If statement:- If user is NOT in voucher entry mode then add the above line. It did not work. :(

    If it had worked, then I could have used an If statement to modify width of $Name to 64 for Mfg/Stock Journal, else keep it to 87. That could have also fixed issue 1.

    Please advise.
     


  12. narayane88

    narayane88 Active Member


    any one state which formula used for comparing two Collection

    [Collection: My Coll]
    Title: $$LocaleString:"Name of Purchase wise"
    Source Collection : List of Stock Items
    Source Collection : PurchaseVouchers Src
    Source Collection: SalesVouchers1

    Fetch : ClosingBalance
    Sub Title:"Item Name","Purchase Date","Voucher Number","Party Name","Purchased Quntity", "Purchase Rate","Discount","Sales Quentity","Balance Quentity"
    Walk : All Inventory Entries
    Fetch : StockItemName, BilledQty, Rate, Discount,Amount
    Fetch : VoucherNumber, Date, PartyLedgerName
    Fetch :ClosingBalance
    Is ODBC Table: Yes
    By : VoucherNumber : $VoucherNumber
    By : Date : $Date
    By : PartyLedgerName : $PartyLedgerName
    Aggr Compute: BilledQty : Sum : $BiledQty
    Format: $StockItemName,25
    Format : $Date,20
    Format : $VoucherNumber,10
    Format : $PartyLedgerName,20
    Format : $BilledQty,10
    Format: $Rate,15
    Format: $discount, 5
    Format : @@ClosingBalance,20
    Format: $amount
    Unique: $VoucherNumber
    [Collection : PurchaseVouchers Src]
    Type : Vouchers : VoucherType
    Child Of : $$VchTypePurchase
    Belongs To : Yes
    [Collection : SalesVouchers Src]
    Type : Vouchers : VoucherType
    Child Of : $$VchTypeSales
    Belongs To : Yes
    [Collection : SalesVouchers1]
    Source Collection : SalesVouchers Src
    Walk : All Inventory Entries
    By : StockItemName:$StockItemName
    Sort : @@Default: $StockItemName
    Fetch : StockItemName, BilledQty
    Aggr Compute:BilledQty : Sum : $BilledQty
    Fetch: $StockItemName
    Fetch : $BilledQty

    [System:Formulas]
    ClosingBalance: (Collection mycollection_BillQty- Collection SalesVouchers1_BillQty)
     


  13. yogibaba

    yogibaba New Member


    Sir,
    Very useful information. I am new and looking for some sort of txt file to be used as add on to increase the size of list of stock items, as my item names are big and can not see clearly while entering the items.
     


  14. yogibaba

    yogibaba New Member


    Sir,
    I am also lookinf for the following, if someone can help me

    In Tally Stock Godown, etc report does not show From Godown and To Godown information in stock reports I need Stock voucher...
     


  15. Manjunath Koparde

    Manjunath Koparde New Member


    I Want To Display Show Center Of The Voucher Please Correct Code Reply
     


Share This Page