Button to get simple calculation for credit card payment

Hello everyone! I’m trying to create a button to get some simple calculation done.

To process a credit card payment I need to get the total amount of the payment that is going to be done by credit card divided by 1,22 to get the value before taxes since this value rounded up to two decimals needs to be input into the credit card machine. At the moment this calculation is done with the help of a normal calculator but I think it could be done faster within SambaPOs.

I got this so far:

I would like that amount to be rounded to two decimals, for example if the total amount to be paid by credit card is 10, the value to be shown need to be 8,20. Right now I’m getting 8,19672131. How can I round this result to two decimals?

Also, when I press my calculation button I get the big keyboard on the screen, can I make it to show a small keyboard only and how?

Finally It would be nice that on the payment screen after I write the amount to be process by credit card in the “charged” space ( red circle in the next picture) I could press my calculation button and get this number (in the picture the number 2) to be divided by 1,22 so I don’t have to input it manually.

I know I probably need to replace [?Amount] by something like [:charged] but I’m not sure whats the command to call for this value.

Any help will be appreciated, thanks a lot!

You can setup something like that.

[=F(100*TN('{:TENDEREDAMOUNT}')/122,'0.00')]
2 Likes