[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing tax.pm in 1.21 for a new tax which replaces two old taxes
- Subject: Re: Changing tax.pm in 1.21 for a new tax which replaces two old taxes
- From: Chris Travers <..hidden..>
- Date: Tue, 6 Jul 2010 22:33:17 -0700
Here is what I'm going to propose we do:
alter Tax.pm to retrieve no taxes from any modules which have a 0
rate. This would allow any tax to be set to 0 and thus be skipped.
Complex taxes would need to be set to a real rate other than 0.
Try this patch:
Index: LedgerSMB/Tax.pm
===================================================================
--- LedgerSMB/Tax.pm (revision 2960)
+++ LedgerSMB/Tax.pm (working copy)
@@ -62,6 +62,7 @@
$sth->execute($taxaccount, $transdate)
|| $form->dberror($query);
my $ref = $sth->fetchrow_hashref;
+ next if !$ref->{rate};
my $module = $ref->{'taxmodulename'};
require "LedgerSMB/Taxes/${module}.pm";