From ebc3a8f35b6f04686f125760b44f38e81043fe9a Mon Sep 17 00:00:00 2001 From: tetragon Date: Sun, 22 Apr 2007 01:38:46 +0000 Subject: Fix for NaN.00 invoice prints and regex tweaks to init_taxes git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1094 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Tax.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'LedgerSMB/Tax.pm') diff --git a/LedgerSMB/Tax.pm b/LedgerSMB/Tax.pm index 70161257..01bff4d4 100755 --- a/LedgerSMB/Tax.pm +++ b/LedgerSMB/Tax.pm @@ -36,9 +36,9 @@ sub init_taxes { my @accounts = split / /, $taxaccounts; if ( defined $taxaccounts2 ) { my @tmpaccounts = @accounts; - $#accounts = 0; + $#accounts = -1; for my $acct ( split / /, $taxaccounts2 ) { - if ( $taxaccounts =~ /\s$acct\s/ ) { + if ( $taxaccounts =~ /\b$acct\b/ ) { push @accounts, $acct; } } @@ -53,7 +53,7 @@ sub init_taxes { foreach $taxaccount (@accounts) { next if ( !defined $taxaccount ); if ( defined $taxaccounts2 ) { - next if $taxaccount !~ /$taxaccounts2/; + next if $taxaccounts2 !~ /\b$taxaccount\b/; } $sth->execute($taxaccount) || $form->dberror($query); my $ref = $sth->fetchrow_hashref; -- cgit v1.2.3