how to fetch cost Price in sales order ..Kindly Suggest

Discussion in 'Free Source Codes' started by Mac, Jul 6, 2023.

    
  1. Mac

    Mac Member


    Code:
    [#Line    : EI InvInfo]
    Option: EI2: @@ISorder
    [System:Formula]
        IsOrder: $$IsSalesOrder:##SVVoucherType OR $$IsSales:##SVVoucherType
    
    [!Line    : EI2 ]
    
       
       
                           
                            Left Fields : EI DeemedPos, VCH StockItem,Code
                            Right Fields : VCH RateIncl, VCH Rate, VCH RateUnit, VCH PrevItem, VCH Value
    
                   
                 [Field:Code]
                    Inactive:Not @@IsOrder   
                    Use         : Name Field
                    Width       : 25 mm;@@VCHDiscountWidth
                    Align       : Center
                    Style       : Normal Bold
                    Border: Thin Box
    
                    Set as:stqcost:StockItem:$StockItemName
    
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Show screenshot .... as to where it appears
     


  3. Mac

    Mac Member



  4. Mac

    Mac Member


    when we press alt+s that show cost price , that want to fetch

    upload_2023-7-8_17-48-20.png
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Replicate FIELD : STQ Cost ............
     


  6. Mac

    Mac Member


    [#Line : EI InvInfo]
    Option: EI2: @@ISorder
    [System:Formula]
    IsOrder: $$IsSalesOrder:##SVVoucherType OR $$IsSales:##SVVoucherType

    [!Line : EI2 ]




    Left Fields : EI DeemedPos, VCH StockItem,Code
    Right Fields : VCH RateIncl, VCH Rate, VCH RateUnit, VCH PrevItem, VCH Value


    [Field:Code]
    Inactive:Not @@IsOrder
    Use : rate Field
    Width : 25 mm;@@VCHDiscountWidth
    Align : Center
    Style : Normal Bold
    Border: Thin Box
    Set as : $$BaseValue:(@locInValue/@locInQty)
    locInValue : ($InwardValue:StockItem:##StockItemName + $OpeningValue:StockItem:##StockItemName)
    locInQty : ($InwardQuantity:StockItem:##StockItemName + $OpeningBalance:StockItem:##StockItemName)



    ;Set as:stqcost:StockItem:$StockItemName;
     


  7. Mac

    Mac Member


    tried same , but not work sir
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Just copying code will not work, you must understand the context in which and how a value is referred to or called for.

    In above case -- instead of ##StockItemName -- replace it with direct reference to the FIELD name of the Stock Item in the Voucher.
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member



  10. Mac

    Mac Member


    Like this ?
    $InwardValue:StockItem:##stqcost
     


  11. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    In the voucher entry screen -- what is the FIELDNAME of the Stockitem ??? use that

    $InwardValue:StockItem:##StockItemName -- here instead of ##StockItemName use the FIELDNAME -- as #Fieldname
     


  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Use Developer to find the FIELD NAME ---- open tally in Developer mode and hover your cursor over StockItemName and you will get the FieldName.
     


  13. Mac

    Mac Member


    Done sir, working fine ! Thank You So Much.
    sir please start tdl learning session (of course Paid) , so i can more learn from you much as possible.
     


  14. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You do not need to PAY for any courses ...........

    Best teacher is you, yourself -- through self learning. All you need to have is patience and perseverance.

    Tally Developer and it accompanying sample codes are enough to teach any serious and sincere learner.

    Am glad you took the approach to learn rather than depend on quick fix and ready answers as most other members do.

    Keep learning and persevere.
     
    Gagan Jyoti likes this.


  15. Mac

    Mac Member


    Thank You For Your Support. I am learning from sample code but its not good enough some time. but you guided every time well Thank you So Much.
     




  16. Hello Sir,
    how are you...

    help me
    not working pls guide me

    [Field:ItmAvgCost]

    Use : rate Field
    Width : 25 mm;@@VCHDiscountWidth
    Align : Center
    Style : Normal Bold
    Border: Thin Box
    Set as : $$BaseValue:(@locInValue/@locInQty)
    locInValue : ($InwardValue:StockItem:##VchStockItem + $OpeningValue:StockItem:##VchStockItem)
    locInQty : ($InwardQuantity:StockItem:##VchStockItem + $OpeningBalance:StockItem:##VchStockItem)
     



  17. it's resolved..
     


Share This Page