> It would be great to have these values correctly shown in the admin
> when an order is created, so if there is anything I can do testing
> wise let me know.

I am also interested in having this fixed in the admin interface...
any possibility of this coming soon?
still get 0E-10 values on orders (in the admin site)

On Feb 2, 3:17 am, digicase <[email protected]> wrote:
> I've just updated to the latest svn version of Satchmo and indeed the
> patch in [1927] does fix things in the templates. I would imagine this
> is safe to use in production now? I'm assuming the admin pages will
> not fail with scientific values, but just display them in a way that
> humans can't read (e.g. 0E-10).
>

>
> Thanks again Dan and Chris.
>
> On Feb 1, 11:56 pm, Dan Harris <[email protected]> wrote:
>
> > 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