I would like the ability to round the grand total of any order to the next whole dollar utilizing a variable tax. The store I'm using is already leveraging a 3rd party tax service, so my thought was to either create a custom tax type or repurpose VAT/WEEE.
I will need to implement my own rounding algorithm as a standard rounding is only partially sufficient:
- I will always round up to the next dollar, and never down.
- If the total is <=.50 from the next dollar, we will still round up.
- If the total is ==.00 we will add a full dollar
Some examples:
Grand total before tax: $3.50
Grand total after round:$4.00
Grand total before tax: $5.02
Grand total after round:$6.00
Grand total before tax: $1.99
Grand total after round:$2.00
Grand total before tax: $10.00
Grand total after round:$11.00
I'm looking for a concrete approach - either repurposing an in-built tax type or rolling my own.