summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-09 20:37:21 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-09 20:37:21 +0000
commit9717f09801fa4c963f338a97123b2fbbe9260f02 (patch)
treeba92c16e1f40e73f0900c60e58c32eca9c00e02f /LedgerSMB
parentd3f27376d7ec8e8c157021189787dd1dff302479 (diff)
All sales tax bugs fixed
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1045 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/Tax.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/LedgerSMB/Tax.pm b/LedgerSMB/Tax.pm
index 6ff21459..1996f23c 100755
--- a/LedgerSMB/Tax.pm
+++ b/LedgerSMB/Tax.pm
@@ -38,15 +38,12 @@ sub init_taxes {
my @tmpaccounts = @accounts;
$#accounts = 0;
for my $acct (split / /, $taxaccounts2){
- if ($taxaccounts =~ /$acct/){
+ if ($taxaccounts =~ /\s$acct\s/){
push @accounts, $acct;
}
}
}
- if (! scalar @accounts){
- return @accounts;
- }
my $query = qq|SELECT t.taxnumber, c.description,
t.rate, t.chart_id, t.pass, m.taxmodulename
FROM tax t INNER JOIN chart c ON (t.chart_id = c.id)
@@ -55,6 +52,9 @@ sub init_taxes {
my $sth = $dbh->prepare($query);
foreach $taxaccount (@accounts) {
next if (! defined $taxaccount);
+ if (defined $taxaccounts2){
+ next if $taxaccount !~ /$taxaccounts2/;
+ }
$sth->execute($taxaccount) || $form->dberror($query);
my $ref = $sth->fetchrow_hashref;