Hi Oliver,

I know this is a late reply, sorry.

I made a 1-line modification in *satchmo/apps/satchmo_store/shop/models.py* to 
fix this issue for me. In the function *force_recalculate_total* (under the 
Order model) find the line:

self.total = Decimal(item_sub_total + self.shipping_sub_total + self.tax)

I then added below that the following:
self.total = trunc_decimal(self.total-self.balance_paid, 2)

This mimics the behavior in the *_balance* function (which calls 
force_recalculate_total anyway). However _balance is not always used so 
this 'fixes' the discrepancy when force_recalculate_total is used directly.

- Darren


On Friday, October 5, 2012 1:08:27 PM UTC-5, Olivier Lauret wrote:
>
> Hi Darren,
>
> The way I have worked around this issue on my website (www.equalitea.co.uk) 
> is as follow:
>
> The problem with taxes is that it has to round up the value (this is by 
> law in the UK and I think it should be the same in many countries) and this 
> exactly what the payment module is doing. This is however not the case of 
> the shop when you set that the price already contains the vat (this I'd the 
> case in Europe). The way I got around it is to make sure that you set the 
> price without vat with 4 digits (i don't know how many digits are enough 
> but this is what I'm doing) for the cents so that with the taxes it 
> slightly below the exact value I want. For instance (not sure I was clear 
> in what I said!), if I want a price to show as £4.99, you need to subtract 
> the equivalent of the vat (20% in the UK), and round it down at 4 digit for 
> the cents. In my case, the number will be 4.1583 . Therefore, I know that 
> with when the vat is added, it will be a prove very close to 4.99, without 
> going above it. (hope this is clearer now!)
>
> I don't know if this I'd the way to do, that's why I didn't reply to my 
> own message. So if someone can clarify, this would be great. Otherwise, I 
> hope my answer will help.
>
> Regards,
> Olivier
> On Oct 5, 2012 6:23 PM, "Darren Hollenbeck" <[email protected]<javascript:>> 
> wrote:
>

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/satchmo-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to