On Tue, May 12, 2009 at 1:11 PM, Trent <tjurew...@gmail.com> wrote:

>
> I am now running into a much larger issue with this "feature" and
> can't figure out how to fix it without altering the table definition
> to 2 decimal places.  This exact behavior occurred for my client's
> store today:
>
> 1) A customer enters and order with a subtotal of $209.90 and shipping
> cost of $7.50.
> 2) The tax % that applies for this order is 12.25%; resulting in a tax
> amount of $25.71275 (209.90 * .1225 = 25.71275)
> 3) The order total is $243.11275 (209.90 + 7.5 + 25.71275 = 243.11275)
> 4) Satchmo attempts to process the payment with Authorize.net for
> $243.11 and succeeds with a transaction approved response.
> 5) Satchmo now logs the message, "Order #103 not paid in full, sending
> to pay rest of balance".  This is occurring b/c the order has a
> remaining balance of $0.00275.
> 6) Satchmo attempts to process the payment with Authorize.net for
> $0.00 and fails with the message, "A valid amount is required."
> 7) Satchmo logs the message, "Order 103 - skipping recalculate_total
> since product is partially paid."
> 8) Satchmo sets the order status to None opposed to Pending as is
> expected.
>

Yes, this is a problem and you aren't alone at all in finding it.  I think
we just need a pass through the code and do a couple strategic
rounding-to-two-places operations to fix this.

My thought is that simply rounding off any sub-one-cent balances positive or
negative would do the trick, but I worry that in certain edge-cases it may
look as if the system has over/undercharged by a penny.

FWIW, the initial reason for this was VAT taxes, the rules for which
explicitly require this sort of calculation with interim decimal storage
greater than 2 places.

--
Bruce Kroeze
http://solidsitesolutions.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to satchmo-users@googlegroups.com
To unsubscribe from this group, send email to 
satchmo-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to