summaryrefslogtreecommitdiff
path: root/LedgerSMB/Tax.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/Tax.pm')
-rwxr-xr-xLedgerSMB/Tax.pm6
1 files changed, 3 insertions, 3 deletions
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;