Stock Query Purchase Cost + GST%

Discussion in 'Tally Developer' started by kamal, Oct 17, 2017.

    
  1. kamal

    kamal Member


    Dear Experts,
    im trying to add one line in stock query for last purchase rate + gst
    im unable to get the formula for the calculation
    can any body arrange the solutions

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; stock query ;;;;;;;;;;

    [#Part: STQ Item Details]
    add : line : after : STQ StdCostPrice : STQWithTax

    [line: STQWithTax]
    field : medium prompt,STQWithTax
    LOCAL : FIELD : medium prompt : INFO : "Last Purchase + Tax"
    LOCAL : FIELD : medium prompt : color : Blue
    LOCAL : FIELD : medium prompt : STYLE: Large Bold

    [Field : STQWithTax]
    Use : Number Field
    Set As : $krSaleWithTax
    Color : BLUE
    Background : Stone Wash


    [SYSTEM : FORMULA]
    krSaleWithTax : $krgst * $LastPurcPrice:StockItem:##StockItemName
    krgst : $GSTIGSTRate:StockItem:$StockItemName
    ;; i need to get the tax rate from stock item
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    [#Part: STQ Item Details]
    add : line : after : STQ StdCostPrice : STQWithTax
    [line: STQWithTax]
    field : medium prompt,STQWithTax
    LOCAL : FIELD : medium prompt : INFO : "Last Purchase + Tax"
    LOCAL : FIELD : medium prompt : color : Blue
    LOCAL : FIELD : medium prompt : STYLE: Large Bold
    [Field : STQWithTax]
    Use : Rate Field ;;;; CHANGED
    Storage : SaleWithTax ;;;; CHANGED
    Set As : @@krSaleWithTax ;;;; CHANGED
    Set Always : Yes ;;;; CHANGED
    Color : BLUE
    Background : Stone Wash
    [SYSTEM : FORMULA]
    krSaleWithTax : ((@@krgst/100) * @@LastPurchasePrice) + @@LastPurchasePrice ;;; CHANGED
    krgst : $BasicRateOfExcise ;;;; CHANGED
    LastPurchasePrice : $LastPurcPrice:StockItem:##StockItemName ;;;; CHANGED
    [System : UDF] ;;;; CHANGED
    SaleWithTax : Rate : 2117 ;;;; CHANGED
     


  3. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    SHOWING LAST PURCHASE RATE ONLY.
    TAX NOT ADDED
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Find out what the field name for GST Rate as defined in Stock Item Master.......

    and replace "$BasicRateOfExcise" with that field and you will have it.........
     


  5. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    $Gstigstrate

    Also tried
    No any effect found.
    Please try first.
     


  6. HVPatel

    HVPatel Active Member


    If Method Name $Gstigstrate is correct, than try below, you may get
    Code:
    $Gstigstrate:StockItem:##StockItemName
    Regards
     


  7. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    $Gstigstrate:stockitem:stockitemname

    also not working
    Bad Formula
     


  8. HVPatel

    HVPatel Active Member


    below is a formula, hope using this you will get GST Rate
    Code:
    $$GetGSTRate:$Date:$GSTEntryLedgerName:$StockItemName:@@IGSTDutyHead:$GSTStockItemRate
    Regards
     


  9. Systecg

    Systecg Member


    bad formula
     


  10. Systecg

    Systecg Member


    bad formula
     


  11. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    This Works.... thanks HV Patel for the Assist.

    And to all others ---- first try to implement suggestions in the right way before making a COMMENT. It is obvious that you are not experts, so do not be quick to comment before first understanding and implementing it properly.



    [#Part: STQ Item Details]
    add : line : after : STQ StdCostPrice : STQWithTax
    [line: STQWithTax]
    field : medium prompt,STQWithTax, STQGSTRate
    LOCAL : FIELD : medium prompt : INFO : "Last Purchase Rate + GST"
    LOCAL : FIELD : medium prompt : color : Blue
    LOCAL : FIELD : medium prompt : STYLE: Large Bold
    LOCAL : FIELD : medium prompt : Background: Stone wash
    [Field : STQWithTax]
    Use : Rate Field
    Storage : SaleWithTax
    Set As : @@krSaleWithTax
    Set Always : Yes
    Color : BLUE
    Background : Stone Wash
    Width : 12
    Align : Left
    [Field : STQGSTRate]
    Use : Name Field
    Set as : "(GST - " + $$LocaleString:$BasicRateOfExcise:StockItem:##StockItemName + "% )"
    Set Always : Yes
    Width : 12
    Style : Normal
    Format : "Percentage, Decimals:0"
    Align : Center
    Color : BLUE
    Background : Stone Wash
    [SYSTEM : FORMULA]
    krSaleWithTax : ((@@krgst/100) * @@LastPurchasePrice) + @@LastPurchasePrice
    krgst : $BasicRateOfExcise:StockItem:##StockItemName
    LastPurchasePrice : $LastPurcPrice:StockItem:##StockItemName
    [System : UDF]
    SaleWithTax : Rate : 2117
     


  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Dear Mr.Patel,

    This gives an error....
    FUNCTION: 'GetGSTRate' LABEL: : Parameter 'pLedgerName Parsing failed '$GSTEntryLedgerName'
    FUNCTION: 'GetGSTRate' LABEL: : Parameter 'pInvRate Parsing failed '$GSTStockItemRate'
    FUNCTION: 'GetGSTRate' LABEL: : Parameter 'pLedgerName Parsing failed '$GSTEntryLedgerName'
    FUNCTION: 'GetGSTRate' LABEL: : Parameter 'pInvRate Parsing failed '$GSTStockItemRate'

    Your earlier suggestion worked.... $Gstigstrate:StockItem:##StockItemName ..... I replaced $Gstigstrate with $BasicRateOfExcise and it is working fine.

    Regards
    Amit Kamdar
     


  13. HVPatel

    HVPatel Active Member


    Its Great finally, you got your solutions, keep it up.. and also suggest to all to do like Mr. Amit, go through tdl default programme, and refer user manual, and sample codes available with Tally Developer application.
    Regards
     


  14. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    $Gstigstrate:stockitem:stockitemname

    also not working
    Bad Formula


    Dear Expert See Your post "before implement".
    and if you are expert then help others.
    instead of judge or comment.

    hope you will..........
     


  15. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If you can read...you would know that "$Gstigstrate:stockitem:stockitemname" has not been used. Glad it is not working anyway for you.

    Hope you will......get solution on your own. Good luck.
     


  16. HVPatel

    HVPatel Active Member


    Already suggested, to use below
    $Gstigstrate:StockItem:##StockItemName ;; to get GST rate only in numbers
    (MethodName:Object:Reference)
    Than why using wrong - $Gstigstrate:stockitem:stockitemname ;; its not work,,
    ;;;;;;;;;
    As per above Calculation in tdl code (By Kamal)
    [SYSTEM : FORMULA]
    krSaleWithTax : $krgst * $LastPurcPrice:StockItem:##StockItemName
    krgst : $GSTIGSTRate:StockItem:$StockItemName (change here as above suggested)

    ;; Here for example, last purchase rate is Rs. 2150/-, and GST Rate is 28%, than
    krSaleWithTax : Rs.2150/- * 28 = 60200/- will come.

    Regards
     


  17. RAJdon

    RAJdon New Member



    Bro Use Tally.ERP9 Release 4 and Above... u will not get the error
     


Share This Page