summaryrefslogtreecommitdiff
path: root/LedgerSMB/IS.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/IS.pm')
-rwxr-xr-xLedgerSMB/IS.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm
index 0b38b3a8..96aafdac 100755
--- a/LedgerSMB/IS.pm
+++ b/LedgerSMB/IS.pm
@@ -1224,7 +1224,7 @@ sub reverse_invoice {
sub delete_invoice {
- my ($self, $myconfig, $form, $spool) = @_;
+ my ($self, $myconfig, $form, ${LedgerSMB::Sysconfig::spool}) = @_;
# connect to database
my $dbh = $form->dbconnect_noauto($myconfig);
@@ -1251,11 +1251,11 @@ sub delete_invoice {
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
- my $spoolfile;
+ my ${LedgerSMB::Sysconfig::spool}file;
my @spoolfiles = ();
- while (($spoolfile) = $sth->fetchrow_array) {
- push @spoolfiles, $spoolfile;
+ while ((${LedgerSMB::Sysconfig::spool}file) = $sth->fetchrow_array) {
+ push @spoolfiles, ${LedgerSMB::Sysconfig::spool}file;
}
$sth->finish;
@@ -1267,8 +1267,8 @@ sub delete_invoice {
my $rc = $dbh->commit;
if ($rc) {
- foreach $spoolfile (@spoolfiles) {
- unlink "$spool/$spoolfile" if $spoolfile;
+ foreach ${LedgerSMB::Sysconfig::spool}file (@spoolfiles) {
+ unlink "${LedgerSMB::Sysconfig::spool}/$spoolfile" if $spoolfile;
}
}