Godown's item opening qty Fetching Help

Discussion in 'Tally Developer' started by mutharasan, Dec 11, 2020.

    
  1. mutharasan

    mutharasan Member


    Dear Admin Sir,


    I want to fetch the opening qty of an particular item from particular godown for particular date. is there any short syntex to achieve it?

    I have written one voucher collection based report with itemopening balance and date column and item Name and sold qty

    I used following collection to fetch item godown opening balance only

    [Collection: mygdncoll]

    Type : Stock Items in Godown
    Child Of: "Godwon-A"
    Compute: Name : $Name
    Compute : StkOpBalance : If $$IsEmpty:$$AsSignedQty:$$GodownItemValue:mad:@Mytestgodown:$Name:$OpeningBalance Then 0 Else $$AsSignedQty:$$GodownItemValue:mad:@Mytestgodown:$Name:$OpeningBalance
    Compute : StkClBalance : If $$IsEmpty:$$AsSignedQty:$$GodownItemValue:mad:@Mytestgodown:$Name:$ClosingBalance Then 0 Else $$AsSignedQty:$$GodownItemValue:mad:@Mytestgodown:$Name:$ClosingBalance
    Compute: Date : $date


    I tried with $$filtervalue - Function and also $$collectionfieldbykey -Function But i can't do it.
    If is it possible, please help me.

    Thanks and regards
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    For STOCK Quantity it is VALUE..........

    Try OpeningValue and ClosingValue ...instead of OpeningBalance and ClosingBalance.
     
    mutharasan likes this.


  3. mutharasan

    mutharasan Member


    Dear Admin Sir

    Thank you for your valuable and immediate reply,

    still i am strucking with this program

    i have attached demo data and screen shots and code for your better understanding, kindly help me.
     

    Attached Files:



  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Please implement what I have suggested. You have not done it so far........it is simple.
     


  5. mutharasan

    mutharasan Member


    Dear admin Sir,

    i have implemented that what you kindly suggested that i used $openingvalue instead of $openingBalance. But i could not achieve the result sir.

    Also i tried with $$filtervalue function with date and stockitemname filter

    Also i tried with $$collectionfieldbykey with searchkey function.

    i am still strucking.

    Thanking You
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    As per your code, it is working.........
    As per your Data there is no Opening as on 1st April........

    Since I do not understand your need or structure of your report....... the data is not showing proper results when next period is selected.

    You need to structure your data / report accordingly.

    Capture.PNG
     
    mutharasan likes this.


  7. mutharasan

    mutharasan Member


    Dear Admin Sir,

    Many many Thanks to your valuable and immediate reply. in my report i need to fetch the opening qty for the particular date which is according to date Field sir.

    suppose if i will use Collectionfiedbykey function what object should i taken for populating the collection.

    I don't know this is available in what type of object. please give me some idea to achieve this report

    my report concept is , what was the opening qty of the date field, and after sales what is the closing qty. This is my intention of my report.

    Thank you, Sir
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Not possible in the structure / collection of your present code.........

    study the Tally's Godown-wise report available......... that is why they have made it godown-wise....... the way you need is not possible, as it involves different Collection in a different way.
     
    mutharasan and Jaydeep Shah like this.


  9. mutharasan

    mutharasan Member


    Dear Admin Sir,

    Thank you very much for your instant and valuable support. For this report i have changed the style of my report and now i have achieved the result. Once again i am very greatful to you sir.
     



  10. Why Filter is not applied sir? I had added filter of item search but doesn work
    [#Menu: Gateway of Tally]

    Item: Sales Report : Display: SLs Report

    [Report: SLs Report]
    Variable: StkItemName
    Form: SLs Form
    Variable: SVfromdate, SVTodate
    Set: SVFromdate:$$MonthStart:##SVCurrentDate
    Set: SVTodate:$$Monthend:##SVCurrentDate

    [Form: SLs Form]

    Part: SLS TitPart, SLs part
    Use: Dsp Template
    Button : AESItemCLmnrItemFilter

    [Part: SLS TitPart]

    Line: Slsrepotit, Slsperiod, SLSparticulartit

    [Line: Slsrepotit]

    Field: Formsubtitle
    Local: Field: Formsubtitle:Info:"Detailed sales Register"
    Space Bottom: 2 mms

    [Line: Slsperiod]

    Right Field: slsperiod

    [Field: slsperiod]

    Field: slsfrom, slshyphen, slsto

    [Field: slsfrom]

    Use: short Date Field
    Set as: ##SVfromdate
    Width: 7% page
    Align: center

    [Field: slshyphen]

    Width: 1% page
    Set as: "-"

    [Field: slsto]

    Use: short Date Field
    Set as: ##SVTodate
    Width: 7% page
    Align: center


    [Line: SLSparticulartit]

    Field: slsitem
    Right Field: slsdate, slsgodown, Slsopeingqty, slsbilledqty, Slsclosingqty

    Local: Field: slsitem :Info: "Item Name"
    Local: Field: slsdate : Info: "Date"
    Local: Field: slsgodown : Info: "From Godown"
    Local: Field: Slsopeingqty : Info: "opening Qty"
    Local: Field: slsbilledqty : Info: "Sold Qty"
    Local: Field: Slsclosingqty : Info: "Closing qty"
    Border: Column Titles
    [Part: SLs Part]

    Line: Sls Line
    Repeat: Sls Line : ASS SLs vch coll
    Scroll: Vertical

    [Line: Sls Line]

    Field: slsitem
    Right Field: slsdate, slsgodown, Slsopeingqty, slsbilledqty, Slsclosingqty

    [Field: slsitem]

    Width: 20% Page
    Set as: $stockitemName

    [Field: slsdate]

    Use: Short date Field
    Set as: $Date
    Width: 10% Page
    Align: Right

    [Field:slsgodown ]

    Width: 10% Page
    Set as: $GodownName
    Align: Right

    [Field: Slsopeingqty]

    Use: Qty primary Field
    Width: 10% Page
    Set as: $$AsSignedQty:$$GodownItemValue:#slsgodown:#slsitem:$openingbalance;;
    Align: Right

    [Field: slsbilledqty]

    Use: Qty Primary Field
    Set as: $Billedqty
    Width: 10% Page
    Align: Right

    [Field: Slsclosingqty]

    Use: qty Primary Field
    Set as: #Slsopeingqty-#slsbilledqty
    Width: 10% Page
    Align: Right

    [Collection: ASS SLs vch collSRC]

    Type: vouchers : vouchertype
    Child Of:$$VchTypeSales
    Belongs To: Yes

    [Collection: ASS SLs vch coll]

    Source Collection: ASS SLs vch collSRC
    Walk: Inventory Entries, Batch Allocations
    By: stockitemName : $stockitemName
    By: GodownName : $godownName
    By: VoucherNumber : $voucherNumber
    Compute: Billedqty : $Billedqty
    Compute: Date : $..Date
    Filter : VchFilters
    [System:Formula]
    VchFilters :if $$IsSysName:##StkItemName Then 1=1 Else #slsitem = ##StkItemName; If $$IsEmpty:##StkItemName Or $$IsEndOfList:##StkItemName Then True Else $StockItemName = #FSSStockName
    [Button : AESItemCLmnrItemFilter]

    Title : "Filter Item"
    Key : Alt + k
    Action : Alter : FilterItem
    [Collection : FilterItem]

    Type : StockItem
    Belongs To : Yes
    Title : $$LocaleString:"List of Stock Items"
    Format : $Name, 20

    [Report: FilterItem] ;;Auto Report
    Title : $$LocaleString:"Batch Items"
    Form : FilterItem
    Local : Form : FilterItem : Vertical Align : Top
    Local : Collection: Default : Align : Right
    Variable : StkItemName

    [Form: FilterItem]
    No Confirm : Yes
    Space Top : 0.5
    Space Left : 1
    Space Right : 1
    Full Width : No
    Full Height : No
    Vertical Align : Top
    Part : FilterItem

    [Part: FilterItem]

    Line : FilterItem Title
    Line : FilterItem ItemName

    [Line: FilterItem Title]
    Fields : Long Prompt
    Local : Field : Long Prompt : Info : $$LocaleString:"Select Item"
    Local : Field : Long Prompt : Full Width : Yes
    Local : Field : Long Prompt : Alignment : Center
    Space Bottom: 0.5

    [Line: FilterItem ItemName]
    Fields : Medium Prompt, FilterGrp ItemName
    Local : Field : Medium Prompt : Info : $$LocaleString:"Name of Item"
    Space Bottom: 0.5
    [Field: FilterGrp ItemName]
    Use : Name Field
    Table : FilterItem, End Of List
    Show Table : Always
    Variable : StkItemName
    Modifies : StkItemName

    [Variable : StkItemName]

    Type : String

    [System : Variable]

    StkItemName
     


Share This Page