[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



I forgot to submit this AA.pm change with the original message.
Transaction moving forward work fine. Outstanding sales orders and
purchase orders seem fine. Creating invoices or purchases dated prior
to the new tax cause a problem. It looks like a module is calling the
tax but missing one of the fields:

menu.pl:88: Can't locate LedgerSMB/Taxes/.pm

Looking....

Gerald

============================

# diff -w -d -u AA.20100701.pm AA.pm
--- AA.20100701.pm      Mon Jul  5 16:03:03 2010
+++ AA.pm       Fri Jul  2 07:22:36 2010
@@ -1087,7 +1087,7 @@

     $sth->finish;
     $transdate = $dbh->quote( $form->{transdate} );
-    my $where = qq|AND (t.validto >= $transdate OR t.validto IS NULL)|
+    my $where = qq|AND ($transdate BETWEEN SYMMETRIC
coalesce(validfrom::timestamp, '-infinity'::timestamp) AND
coalesce(validto::timestamp, 'infinity'::timestamp))|
       if $form->{transdate};

     # get tax rates and description

============================