A patch to hopefully fix things at the template layer was added to
trunk in [1927]

On Jan 30, 10:55 pm, digicase <[email protected]> wrote:
> Thank you Dan!
>
> On Jan 30, 10:44 pm, Dan Harris <[email protected]> wrote:
>
> > Opened as ticket #722. I will take a look at it today.
>
> > On Jan 29, 9:43 pm, digicase <[email protected]> wrote:
>
> > > Thank you Chris and Dan.
>
> > > As Dan has found, the issue is not with the Paypal template, which was
> > > using the truncate_decimal filter as expected, but rather the issue of
> > > scientific numbers being stored in the database and then passed to the
> > > template.
>
> > > For my test order the Shipping Discount, Tax, Discount amount should
> > > all be stored as 0.0000000000 in the product order record. Unit tax,
> > > Line item tax and Line item discount should also be 0.0000000000 for
> > > the Order Line Item.
>
> > > The Subtotal (20.0000000000), Shipping cost (4.0000000000) and Total
> > > (24.0000000000) were saved in the product order as expected.
>
> > > I'm really sorry but I don't have the Python/Django skills to work on
> > > a patch for an issue as complex as this. Unfortunately I have never
> > > submitted a ticket before either! Are there guidelines I can follow
> > > for this?
>
> > > Thanks.
>
> > > On Jan 30, 7:16 am, Dan Harris <[email protected]> wrote:
>
> > > > After looking into this a bit here is what I have noticed:
>
> > > > the truncate_decimal filter while working just fine, does not always
> > > > return a decimal number. If you pass in a number in scientific to
> > > > truncate_decimal it will return a truncated number in scientific
> > > > notation, for example:
>
> > > > truncate_decimal("2E+1") yields Decimal("2E+1") with then turns into
> > > > string "2E+1" which is incorrect on the PayPal form.
>
> > > > this is not always the case, for instance:
>
> > > > truncate_decimal("2.1223E+1") yields Decimal("21.23")
>
> > > > Perhaps truncate_decimal should be altered to never return a number in
> > > > scientific notation. This will solve the immediate issue with the
> > > > PayPal form and all other templates in Satchmo. The underlying problem
> > > > of values in models being stored in scientific notation is another
> > > > issue.
>
> > > > This should probably be a ticket...
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to