Round off amount not shown in POS Invoice Print

Discussion in 'Free Source Codes' started by ONKAR, Jan 13, 2020.

    
  1. ONKAR

    ONKAR Active Member


    Dear Experts, I need your help for Round Off Amount not shown in MY POS bill format
    see the tdl and screenshots below,

    [Line: KA Round Off]
    Field: Simple Prompt,Simple Field
    Local: Field: Simple Prompt:Set as:"ROUND OFF"

    Local: Field: Simple Field:set as:$Roundoff
    Local: Field: Simple Prompt: Border:Thin Bottom Right
    Local: Field: Simple Prompt:Full Width: Yes
    Local: Field: Simple Field: Space Left : 0.2 inch
    Local: Field: Simple Field: Border:Full Thin Bottom
    Local: Field: Simple Field: Full Width: Yes
    Local: Field: Simple Field: Style: P9
    Local: Field: Simple Field: Line:0
    Local: Field: Simple Field:Set Always : Yes


    Capture.JPG




     
    Last edited: Aug 9, 2022


  2. ONKAR

    ONKAR Active Member



  3. Arun Prasath

    Arun Prasath Member


    Hi,
    Round off function should be used as below

    Eg
    $$RoundUp:$amount:1

    Pls try and check
     


  4. ONKAR

    ONKAR Active Member


    @ArunPrasath brother thank you for your help , but i want extact roundoff amount , as per your solution , shown me roundup amount but i want exact roundoff amount, not roundup amount , so please help me another solution.
     
    Last edited: Aug 10, 2022


  5. ONKAR

    ONKAR Active Member


    @garima sir please help me for this problem
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If you want to know the difference ... i.e. by what amount it has been rounded off....... just calculate the difference in a formula and use it.
     


  7. ONKAR

    ONKAR Active Member


    @Amit Kamdar sir check this screen shot , sample bill attached , i want display exact round off amount , not round up amount , like in this iamge roundoff amount 18 paise should be round off amount shown .

    sample bill.jpg
     


  8. sattam

    sattam Active Member


    try $$Round:$amount:1
     


  9. ONKAR

    ONKAR Active Member


    @sattam sir i want round off amount not round up amount
     


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Follow my instructions and you will find what you need..........
    make a invisible/hidden field...... roundup the amount.......... calculate the Total amount minus the roundup amount multiply by -1 .......... and you will get the round off amount, which in this case would be -18 paise.
     


  11. ONKAR

    ONKAR Active Member


    @Amit Kamdar sir thank you so much for your help , i got it solution , thank you , Thank you for the encouragement you have given me.
    see screen shot sir and solution is below ,

    [Line: KA ROUND OFF]
    Field: Simple Prompt,Simple Field
    Local: Field: Simple Prompt: Set as:"ROUND OFF"
    Local: Field: Simple Prompt: Style:Normal Bold
    Local: Field: Simple Field:set as:$Amount-$$CollAmtTotal:InventoryEntries:$Amount
    Local: Field: Simple Field:format:"No Zero"
    Local: Field: Simple Field: Align:Right
    Local: Field: Simple Prompt: Border:Thin Bottom Right
    Local: Field: Simple Prompt:Full Width: Yes
    Local: Field: Simple Field: Space Left : 0.2 inch
    Local: Field: Simple Field: Border:Full Thin Bottom
    Local: Field: Simple Field: Full Width: Yes
    Local: Field: Simple Field: Style: Large Bold
    Local: Field: Simple Field: Line:0
    Local: Field: Simple Field:Set Always : Yes


    SAMPLE BILL.jpg
     


  12. ONKAR

    ONKAR Active Member


    @Amit Kamdar , Sir AS per Your Solution I Find it Solution , But When Customer Pay Through Online Payment , then Roundoff amount , Final Total is shown Wrong sir please help me. code is below ,

    see screenshot here sir,

    SAMPLE BILL.jpg

    [Line: KA ROUND OFF]
    Field: Simple Prompt,Simple Field
    Local: Field: Simple Prompt: Set as:"ROUND OFF"
    Local: Field: Simple Prompt: Style:Normal Bold
    Local: Field: Simple Field:set as:$$COLLAMTTOTAL:INVENTORYENTRIES:$Amount-$Amount
    Local: Field: Simple Field:Set By Condition: ($$IsNegative:$$CollAmtTotal:InventoryEntries:$Amount)
    Local: Field: Simple Field:format:"No Zero"
    Local: Field: Simple Field: Align:Right
    Local: Field: Simple Prompt: Border:Thin Bottom Right
    Local: Field: Simple Prompt:Full Width: Yes
    Local: Field: Simple Field: Space Left : 0.2 inch
    Local: Field: Simple Field: Border:Full Thin Bottom
    Local: Field: Simple Field: Full Width: Yes
    Local: Field: Simple Field: Style: Large Bold
    Local: Field: Simple Field: Line:0
    Local: Field: Simple Field:Set Always : Yes

    [Line: KA Net Sales]
    Field: Simple Prompt,Simple Field
    Local: Field: Simple Prompt: Set as:"FINAL TOTAL"
    Local: Field: Simple Prompt: Style: Normal Bold
    Local: Field: Simple Field:Set as:$Amount
    Local: Field: Simple Field: Align:Right
    Local: Field: Simple Field:Format: Format:"ShowBaseSymbol,Symbol,NoZero,"+##ShowForex
    Local: Field: Simple Prompt: Border:Thin Bottom Right
    Local: Field: Simple Prompt:Full Width: Yes
    Local: Field: Simple Field: Space Left : 0.2 inch
    Local: Field: Simple Field: Border:Full Thin Bottom
    Local: Field: Simple Field: Full Width: Yes
    Local: Field: Simple Field: Style: Large Bold
    Local: Field: Simple Field: Line:0
    Local: Field: Simple Field:Set Always : Yes

    [Line: KA Cash Tendered]
    Fields: Simple Prompt, Simple Field
    Local: Field: Simple Prompt: Set as:"CASH RECEIVED"
    Local: Field: Simple Prompt: Style:Normal Bold
    Local: Field: Simple Prompt:Full Width: Yes
    Local: Field: Simple Prompt: Border: Thin Left Right
    Local: Field: Simple Field: Set as:$POSCashReceived
    Local: Field: Simple Field: Align:Right
    Local: Field: Simple Prompt:Full Width: Yes
    Local: Field: Simple Field: Space Left : 0.2 inch
    Local: Field: Simple Field: Border:Full Thin Bottom
    Local: Field: Simple Field: Full Width: Yes
    Local: Field: Simple Field: Style: Large Bold
    Local: Field: Simple Field: Line:0
    Local: Field: Simple Field:Set Always : Yes

    [Line: KA Card Tendered]
    Fields: Simple Prompt, Simple Field
    Local: Field: Simple Prompt: Set as:"ONLINE PAYMENT"
    Local: Field: Simple Prompt: Style:Normal Bold
    Local: Field: Simple Prompt:Full Width: Yes
    Local: Field: Simple Prompt: Border: Thin Bottom Right
    Local: Field: Simple Field: Set as:$$FilterValue:$Amount:LedgerEntries:Last:pOSCardFilter
    Local: Field: Simple Field:Set By Condition: ($$IsNegative:$$CollAmtTotal:InventoryEntries:$Amount)
    Local: Field: Simple Field: Align:Right
    Local: Field: Simple Prompt: Border:Thin Bottom Right
    Local: Field: Simple Prompt:Full Width: Yes
    Local: Field: Simple Field: Space Left : 0.2 inch
    Local: Field: Simple Field: Border:Full Thin Bottom
    Local: Field: Simple Field: Full Width: Yes
    Local: Field: Simple Field: Style: Large Bold
    Local: Field: Simple Field: Line:0
    Local: Field: Simple Field:Set Always : Yes


    [Line:KA Balance in change]
    Field: Simple Prompt,Simple Field
    Local: Field: Simple Prompt: Set as:"CHANGE"
    Local: Field: Simple Field: Border:Full Thin Bottom
    Local: Field: Simple Prompt: Style:Normal Bold
    Local: Field: Simple Prompt:Full Width: Yes
    Local: Field: Simple Field: Set as:$POSCashReceived - $$AsPositive:$$FilterAmtTotal:LedgerEntries:pOSCashFilter:$Amount
    Local: Field: Simple Field: Align:Right
    Local: Field: Simple Field: Border:Full Thin Bottom
    Local: Field: Simple Field: Space Left : 0.2 inch
    Local: Field: Simple Field: Full Width: Yes
    Local: Field: Simple Field: Style: Large Bold
    Local: Field: Simple Field: Line:0
     


  13. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Your formula is wrong... make the formula as per your earlier working code.
     


Share This Page