Preparation for more robust tax support in GetPaid

0 views
Skip to first unread message

Calvin Hendryx-Parker

unread,
Jun 11, 2008, 6:22:03 AM6/11/08
to getpa...@googlegroups.com
Hi,

During the NOLA sprint we put in place a few notable changes to the checkout/cart/order totaling so we can support the diverse ecosphere of taxing models around the world.

The old API used to just return a float for the call to the Tax Utility.  Now the same call will return a list of dictionaries with one dict per each tax that is potentially applied to the order or configured in the system.

The next step from here would be to finish a default implementation of a ITax policy that can be registered in the site.  I would suggest we just do a simple flat tax one so people get the idea of how to develop and register their own.

That is pretty much our current status for now.  Let me if there are any other ideas floating around that we haven't thought of.

Cheers,

Cal

--
S i x F e e t U p , I n c . | "Nowhere to go but open source"
Silicon Valley: +1 (650) 401-8579 x602
Midwest: +1 (317) 861-5948 x602
Toll-Free: 1-866-SIX-FEET
mailto:cal...@sixfeetup.com
http://www.sixfeetup.com | Zope/Plone Custom Development

John Rowland Lenton

unread,
Jun 11, 2008, 7:16:15 AM6/11/08
to getpa...@googlegroups.com
On Wed, Jun 11, 2008 at 06:22:03AM -0400, Calvin Hendryx-Parker wrote:
> Hi,
>
> During the NOLA sprint we put in place a few notable changes to the
> checkout/cart/order totaling so we can support the diverse ecosphere of
> taxing models around the world.
>
> The old API used to just return a float for the call to the Tax Utility.
> Now the same call will return a list of dictionaries with one dict per each
> tax that is potentially applied to the order or configured in the system.
>
> The next step from here would be to finish a default implementation of a
> ITax policy that can be registered in the site. I would suggest we just do
> a simple flat tax one so people get the idea of how to develop and register
> their own.
>
> That is pretty much our current status for now. Let me if there are any
> other ideas floating around that we haven't thought of.

I haven't looked in a long time, but how hard would it be to change
the floats to Decimal? I dunno in the rest of the world, but at least
in Argentina the AFIP (IRS to you) can be very picky about the
accumulation of cent differences that can happen if you're using
floats.

--
John Lenton (jo...@except.com.ar) -- http://except.com.ar/
except - responsible free software developers for hire.

Calvin Hendryx-Parker

unread,
Jun 11, 2008, 9:45:31 AM6/11/08
to getpa...@googlegroups.com
On Wed, Jun 11, 2008 at 7:16 AM, John Rowland Lenton <jo...@except.com.ar> wrote:


I haven't looked in a long time, but how hard would it be to change
the floats to Decimal? I dunno in the rest of the world, but at least
in Argentina the AFIP (IRS to you) can be very picky about the
accumulation of cent differences that can happen if you're using
floats.

Actually that will be implementation specific.  Right now the Tax Utility isn't responsible for returning the value, but your ITax implementation will be.

Cal

Christopher Johnson

unread,
Jun 11, 2008, 10:01:32 AM6/11/08
to getpa...@googlegroups.com
On Wed, Jun 11, 2008 at 7:16 AM, John Rowland Lenton <jo...@except.com.ar> wrote:

In general if we could make the "price fields" behave like price fields all the time (and not have to do the hack to make them have two decimal places, thought there was a doc on the PloneGetPaid/docs but can't find it now...), that would be nice :D

-c
 

--
John Lenton (jo...@except.com.ar)  --  http://except.com.ar/
except - responsible free software developers for hire.





--
Cofounder and CEO
ifPeople - Innovation for People
www.ifpeople.net
t: 678-608-3408
130 Boulevard NE, #6
Atlanta, GA 30312
Reply all
Reply to author
Forward
0 new messages