I give up. I cannot make this work the way I want.
It also occurred to me that I don’t really want to alter the Ticket Total anyway, I would rather it stay as-is and just have rounding calculations placed into a separate Account without altering the Ticket Total with Calculation Types.
Here are a some examples of what I am looking to achieve. I built this with a cool little function that allows me to send in a number, the Rounding factor, and the Exchange Rate if required:
function nearest(num,rnd,xr) {
// num : the number to round
// rnd : a value to round to
// xr : exchange rate
num = num * xr;
rnd = 1 / (rnd);
return Math.round(num * rnd) / rnd;
}
These shots show the rnd
rounding factor set to 10
, so the function was called like this:
{CALL:round.nearest('{TICKET TOTAL}','{:CALC RND}','{:CALC XR}')}
Examples of what it produces:
I have a Payment Processor for Cash HNL set to Execute Automation Command
that produces those dialogs. Right now, it just shows information without doing anything else, but my intent would be to create an Account Transaction on-the-fly and apply the DIFF value to that Account.
I might want to build my own Custom Payment Screen LOL