[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crappy work-around for tax accounts with expiration

For tax accounts with expiration, you have a couple of options.

If you don't need Slony, just drop the primary key constraint.  If you
do, we can help provide a solution.

Best Wishes,
Chris Travers

On 5/27/07, Leah Kubik <..hidden..> wrote:
If you have tax accounts that expired at a specific date, only the first one
(often the expired one) will be used when calculating out an invoice, or
similar... For example, if you had a tax table like this:

10019   0.07    862865185       2006-06-30      0       1
10019   0.06    862865185       \N      0       1

The 7 percent rate will always be used.  (Now I realize that in theory this
kind of tax table would never work with 1.2.x because a primary key is
required for this table, but you may have disabled this, for legacy reasons.
So here is a patch that works for me, but the code is really hacky and I am
sure there must be a better way to handle this.  Patch is against 1.2.4:

I still haven't figured out what is going on where the tax account is not
actually updated upon invoice post when using something other than the
default chart of accounts tax item that has been discussed somewhat in
previous posts.  Maybe I'll figure that out...

Leah Kubik : d416-585-9971x692 : d416-703-5977 : m416-559-6511
Frauerpower! Co. : www.frauerpower.com : Toronto, ON Canada
MSN: ..hidden.. | AIM: frauerpower | Yahoo: h3inous
F9B6 FEFE 080B 8299 D7EA  1270 005C EC73 47C9 B7A6

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
Ledger-smb-users mailing list