need help for Amount calculation in POS VOUCHER

Discussion in 'Free Source Codes' started by ONKAR, Dec 25, 2019.

    
  1. ONKAR

    ONKAR Active Member


    dear all experts, I want your help, for PoS voucher, if Cinnamon costs only Rs 370 per kg, and if a customer is asking for Rs 50 only, then how will we do that in PoS voucher ??

    मुझे आपकी मदत चाहिये , पिओएस वौचर के लिये , अगर दालचिनी का दाम ३७० रुपये किलो है , ओर कोई ग्राहक सिर्फ ५० रुपये कि दालचिनी मांग रहा है , तो उसका क्यालकुलेशन हम पिओएस वौचर मै कैसे करेंगे ??
     


  2. teja varma

    teja varma Active Member


    change the rate to 50
     


  3. ONKAR

    ONKAR Active Member


    @teja varma bhai I mean to say that if a customer directly tells me that give me 50 rupees cinnamon, then how much gram should I give by putting 50 rupees in the amount of column in the POS voucher. I want this , please give me correct solution.
     


  4. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    :D
     


  5. teja varma

    teja varma Active Member


    hoo :) I didn't understand
    okay
    if 1000gm = 370 rupees
    then 50 rupees = 50*1000/370 = 13.5 gms

    based on these formula customize your voucher entry
     


  6. ONKAR

    ONKAR Active Member


    :D:D:D:D:D:D:D
     


  7. ONKAR

    ONKAR Active Member


    Capture.JPG


    @teja varma Bhai and jay sir, if the customer tells me to give me only 50 rupees cinnamon, then it should be automatically calculated according to the rate, how much cinnamon of 50 rupees should I give to the customer. Teja Bhai I know that calculation, but I want this in tally, how ? any solution, please ??
     


  8. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    [#Field: VCH POSValue]

    Skip : No
    Read Only : NO
     


  9. teja varma

    teja varma Active Member


    okay I understand , try this sample :

    Code:
    
    [#Field:VchStockItem]
        Sub Form:OnkarQtyCalcForm:@@IsPointOfSales and (NOT $$IsEndofList:#VCHStockItem)
       
    
    [Report:OnkarQtyCalcForm]
        Form:OnkarQtyCalcForm
    
    [Form:OnkarQtyCalcForm]
        Part:OnkarQtyCalcForm
       
       
    [Part:OnkarQtyCalcForm]
        Line:OnkarQtyCalcForm1,OnkarQtyCalcForm2
        Width:50% page
       
    [Line:OnkarQtyCalcForm1]
        Space Top:0.2
        Field:NameField,SimpleField,ShortnameField,ComputedQtyTitle
        Local:Field:NameField:Info:$$LocaleString:"REF QTY"
        Local:Field:SimpleField:Info:$$LocaleString:"REF AMOUNT"
        Local:Field:ShortNameField:Info:$$LocaleString:"ASKED AMOUNT"
        Local:Field:Default:Width:20
        Local:Field:Default:Style:Normal Bold
        Local:Field:Default:Align:Center
       
    [Field:ComputedQtyTitle]
        Use:NameField
        Info:"SALE QTY"
       
    [Line:OnkarQtyCalcForm2]
        Space Top:0.2
        Fields:Orefqty,Orefamount,Oaskedamount,Osaleqty
        Local:Field:Default:Width:20
        Local:Field:Default:Style:Normal Bold
        Local:Field:Default:Align:Center
       
    
    [Field:Orefqty]   
        Use:Qty Primary Field
        Storage:Orefqty
       
    [Field:Orefamount]   
        Use:Amount Field
        Storage:Orefamount
       
    [Field:Oaskedamount]   
        Use:Amount Field
        Storage:Oaskedamount
    
    [Field:Osaleqty]   
        Use:Qty Primary Field
        Storage:ComputedQty
        On:Focus:Yes:Set Field:$$AsQty:@a
        a:($Oaskedamount * @b )/$Orefamount
        b:$$AsAmount:$Orefqty
    
    
    [#Field:VchBilledQty]
        Set By Condition:@@IsPointOfSales and (NOT $$IsEndofList:#VCHStockItem):$ComputedQty
       
    [#Field:VchValue]
        Set By Condition:@@IsPointOfSales and (NOT $$IsEndofList:#VCHStockItem):$Oaskedamount
    
    
    [System:UDF]
        Orefqty:Quantity:2003
        Orefamount:Amount:4002
        Oaskedamount:Amount:5002
        ComputedQty:Quantity:3003
    
    

    enter values as shown in the picture (for the example you given):

    onkar1.PNG onkar2.PNG
     
    Frz likes this.


  10. Rohit Khedar

    Rohit Khedar Member


    Teja Verma is expert man to help everyone in this form but not hlp me.
     


  11. teja varma

    teja varma Active Member


    Dear Rohit Khedar
    Some Problems need time and patience to solve and I don't have much time see and solve all the queries
    as I have other Crucial projects to do , so please understand every time I can't help you
     


  12. ONKAR

    ONKAR Active Member


    Dear @teja varma bhai thank you so much and love you mere Bhai.
     


  13. ONKAR

    ONKAR Active Member


    Dear JAY Sir , as per your code , thank you so much , but sir Whenever I put a rate in the column of the amount, it comes perfect but there is no automatic calculation in the column of the quantity according to the rate. so sir please give me solution. and @teja varma bhai your solution is perfect , but i want some changes in it , When I enter a stock item in a POS voucher, it opens the popup form, after putting the quantity in the first column, then second column its rate should come automatically, as per stock item , but it does not come, because I have more than 1000 products, Then I will have a problem, right? I do not even know the price of the whole thing. Hence. so bhai please give me minor updated solution , i tried but not getting result. thank you.
     


  14. teja varma

    teja varma Active Member


    where you are giving the rates , in standard rate or price level
     


  15. ONKAR

    ONKAR Active Member



  16. Frz

    Frz Member


    thank for prompt reply
     


  17. ONKAR

    ONKAR Active Member


    @teja varma bhai one more problem , there is one, when I select any stock item in the POS voucher, a popup of the form comes up, which is wrong, I want it only for a selected item. From all of the products, like loose products , means masalas , in marathi language khada masala , so can you add an option like button in pos voucher menu bar , when i click that button and then fill the entry so form will popup , its easy for me. please bro .
     
    Last edited: Dec 30, 2019


  18. drive

    drive Active Member


    ;;Try This One

    [#Line: EI InvInfo]
    Add: Right Fields: Before: VCH ActualQty : MrDrive
    [Field: MrDrive]
    Use: Number Field
    Set as : @mTotal/100000
    mTotal : $$number:mad:mTotal1
    mTotal1 : ($Amount*100000/@mRate)
    mRate : $$Number:#VCHRate
    Format : "Decimal:4"
    Set Always:YES
    Skip:YES
    ;Invisible:YES
    [#Field: VCH POSBilledQty]
    Set as: $$AsQty:#MrDrive
    Set Always: YEs
    [#Field: VCH POSValue]
    Skip : No
    Read Only : NO
     


  19. ONKAR

    ONKAR Active Member



    Dear @drive Sir, can you explain in detail how to use it? and see the screenshot also


    Capture.JPG
     


  20. drive

    drive Active Member


    Put Amount In "VCHValue"
     

    Attached Files:

    • 1.png
      1.png
      File size:
      40.5 KB
      Views:
      38
    • 2.png
      2.png
      File size:
      43.9 KB
      Views:
      36
    • 3.png
      3.png
      File size:
      48.3 KB
      Views:
      33
    • 4.png
      4.png
      File size:
      43.7 KB
      Views:
      35


  21. Sanjeev S

    Sanjeev S Active Member


    Dear Omkar,

    Just try this

    [Field:Orefamount]
    Use:Amount Field
    Storage:Orefamount
    Set as : $$AsAmount:mad:MyRate

    MyRate : $$Number:$$CurrentValue:$StandardPrice:StockItem:$.StockItemName
    Set Always : Yes

    Rate will be automatic if Standard Price is filled.

    You can skip is as well.

    Even Quantity default as 1 Kg or 1000 gms can be skipped for fast POS billing
     


  22. ONKAR

    ONKAR Active Member


    @drive sir, like you said, I did it, but shown only 0 amount, as if a sugar price of Rs 38 kg now, if the customer asks me for only 20 rupees of sugar, that is, I mean These 1 /4 KG [250 grams] should be shown in the Quantity column, but are not showing, why? see the screenshot, sir.

    Capture.JPG
     
    Last edited: Dec 31, 2019


  23. ONKAR

    ONKAR Active Member


    DEAR @Sanjeev S sir can you explain in detail how to use it? and send here the screenshot also
     


  24. teja varma

    teja varma Active Member


    standard rates added

    Code:
    
    [#Field:VchStockItem]
        Sub Form:OnkarQtyCalcForm:@@IsPointOfSales and (NOT $$IsEndofList:#VCHStockItem)
       
    
    [Report:OnkarQtyCalcForm]
        Form:OnkarQtyCalcForm
    
    [Form:OnkarQtyCalcForm]
        Part:OnkarQtyCalcForm
       
    
       
    [Part:OnkarQtyCalcForm]
        Line:OnkarQtyCalcForm1,OnkarQtyCalcForm2
        Width:50% page
    
       
    [Line:OnkarQtyCalcForm1]
        Space Top:0.2
        Field:NameField,SimpleField,ShortnameField,ComputedQtyTitle
        Local:Field:NameField:Info:$$LocaleString:"REF QTY"
        Local:Field:SimpleField:Info:$$LocaleString:"REF AMOUNT"
        Local:Field:ShortNameField:Info:$$LocaleString:"ASKED AMOUNT"
        Local:Field:Default:Width:20
        Local:Field:Default:Style:Normal Bold
        Local:Field:Default:Align:Center
    
       
    [Field:ComputedQtyTitle]
        Use:NameField
        Info:"SALE QTY"
    
       
    [Line:OnkarQtyCalcForm2]
        Space Top:0.2
        Fields:Orefqty,Orefamount,Oaskedamount,Osaleqty
        Local:Field:Default:Width:20
        Local:Field:Default:Style:Normal Bold
        Local:Field:Default:Align:Center
       
    
    
    [Field:Orefqty]   
        Use:Qty Field
        Storage:Orefqty
    
       
    [Field:Orefamount]   
        Use:Rate Field
        Storage:Orefamount
        Set as:($StandardPrice:StockItem:$StockItemName)
        Skip Forward:Yes
       
    
       
    [Field:Oaskedamount]   
        Use:Amount Field
        Storage:Oaskedamount
    
    
    [Field:Osaleqty]   
        Use:Qty Field
        Storage:ComputedQty
        Set as:@a / $$Number:$Orefqty
        Set Always:Yes
        a:($Oaskedamount )*( $$Number:$Orefamount)
    
    
    
    [#Field:VchBilledQty]
        Set By Condition:@@IsPointOfSales and (NOT $$IsEndofList:#VCHStockItem):$ComputedQty
    
       
    [#Field:VchValue]
        Set By Condition:@@IsPointOfSales and (NOT $$IsEndofList:#VCHStockItem):$Oaskedamount
    
    
    
    [System:UDF]
        Orefqty:Quantity:2003
        Orefamount:Rate:4002
        Oaskedamount:Amount:5002
        ComputedQty:Quantity:3003
    
    remaining things do it yourself..
     


  25. ONKAR

    ONKAR Active Member


    Dear @teja varma bhai thank you so much, but some minor mistake, see the screenshot, Quantity showing wrong

    Capture.JPG
     


Share This Page