summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/admin.pl4
-rwxr-xr-xbin/am.pl9
-rwxr-xr-xbin/arap.pl4
-rwxr-xr-xbin/arapprn.pl8
-rwxr-xr-xbin/bp.pl6
-rwxr-xr-xbin/cp.pl10
-rwxr-xr-xbin/io.pl8
-rwxr-xr-xbin/jc.pl6
-rwxr-xr-xbin/pos.pl8
-rwxr-xr-xbin/rc.pl2
-rwxr-xr-xbin/rp.pl8
11 files changed, 37 insertions, 36 deletions
diff --git a/bin/admin.pl b/bin/admin.pl
index e1a6f420..5229d7e6 100755
--- a/bin/admin.pl
+++ b/bin/admin.pl
@@ -464,11 +464,11 @@ sub form_header {
$selectstylesheet .= "<option></option>\n";
- if (%printer && ${LedgerSMB::Sysconfig::latex}) {
+ if (%{LedgerSMB::Sysconfig::printer} && ${LedgerSMB::Sysconfig::latex}) {
$selectprinter = "<option></option>\n";
- foreach $item (sort keys %printer) {
+ foreach $item (sort keys %{LedgerSMB::Sysconfig::printer}) {
if ($myconfig->{printer} eq $item) {
$selectprinter .= qq|<option value="$item" selected>$item</option>\n|;
diff --git a/bin/am.pl b/bin/am.pl
index f51e029b..68a2827c 100755
--- a/bin/am.pl
+++ b/bin/am.pl
@@ -2064,9 +2064,9 @@ sub config {
}
$selectstylesheet .= "<option>\n";
- if (%printer && ${LedgerSMB::Sysconfig::latex}) {
+ if (%{LedgerSMB::Sysconfig::printer} && ${LedgerSMB::Sysconfig::latex}) {
$selectprinter = "<option>\n";
- foreach $item (sort keys %printer) {
+ foreach $item (sort keys %{LedgerSMB::Sysconfig::printer}) {
if ($myconfig{printer} eq $item) {
$selectprinter .= qq|<option value="$item" selected>$item\n|;
} else {
@@ -2972,7 +2972,7 @@ sub process_transactions {
for (keys %$form) { $pt->{$_} = $form->{$_} }
my $defaultprinter;
- while (my ($key, $value) = each %printer) {
+ while (my ($key, $value) = each %{LedgerSMB::Sysconfig::printer}) {
if ($value =~ /lpr/) {
$defaultprinter = $key;
last;
@@ -3197,7 +3197,8 @@ sub print_recurring {
@f = split /:/, $pt->{recurringprint};
for ($j = 0; $j <= $#f; $j += 3) {
$media = $f[$j+2];
- $media ||= $myconfig->{printer} if $printer{$myconfig->{printer}};
+ $media ||= $myconfig->{printer}
+ if ${LedgerSMB::Sysconfig::printer}{$myconfig->{printer}};
$media ||= $defaultprinter;
$form->info("\n".$locale->text('Printing')." ".$locale->text($f{$f[$j]})." $form->{reference}");
diff --git a/bin/arap.pl b/bin/arap.pl
index 4f3c61c1..64c544a0 100755
--- a/bin/arap.pl
+++ b/bin/arap.pl
@@ -615,9 +615,9 @@ sub schedule {
}
- if (%printer && ${LedgerSMB::Sysconfig::latex} && %formname) {
+ if (%{LedgerSMB::Sysconfig::printer} && ${LedgerSMB::Sysconfig::latex} && %formname) {
$selectprinter = qq|<option>\n|;
- for (sort keys %printer) { $selectprinter .= qq|<option value="$_">$_\n| }
+ for (sort keys %{LedgerSMB::Sysconfig::printer}) { $selectprinter .= qq|<option value="$_">$_\n| }
# formname:format:printer
@p = split /:/, $form->{recurringprint};
diff --git a/bin/arapprn.pl b/bin/arapprn.pl
index f5d120f5..0bada33c 100755
--- a/bin/arapprn.pl
+++ b/bin/arapprn.pl
@@ -226,7 +226,7 @@ sub print_check {
%queued = split / /, $form->{queued};
- $form->{OUT} = "| $printer{$form->{media}}";
+ $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}";
if ($form->{printed} !~ /$form->{formname}/) {
@@ -443,7 +443,7 @@ sub print_transaction {
}
if ($form->{media} !~ /(queue|screen)/) {
- $form->{OUT} = "| $printer{$form->{media}}";
+ $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}";
if ($form->{printed} !~ /$form->{formname}/) {
@@ -625,8 +625,8 @@ sub print_options {
$form->{selectformat} = qq|<option value="html">html\n|;
- if (%printer && ${LedgerSMB::Sysconfig::latex}) {
- for (sort keys %printer) { $media .= qq|
+ if (%{LedgerSMB::Sysconfig::printer} && ${LedgerSMB::Sysconfig::latex}) {
+ for (sort keys %{LedgerSMB::Sysconfig::printer}) { $media .= qq|
<option value="$_">$_| }
}
diff --git a/bin/bp.pl b/bin/bp.pl
index e1dc01eb..ffbe2544 100755
--- a/bin/bp.pl
+++ b/bin/bp.pl
@@ -271,7 +271,7 @@ sub print {
for $i (1 .. $form->{rowcount}) {
if ($form->{"checked_$i"}) {
- $form->{OUT} = "| $printer{$form->{media}}";
+ $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}";
$form->info($locale->text('Printing')." ...");
if (BP->print_spool(\%myconfig, \%$form, ${LedgerSMB::Sysconfig::spool})) {
@@ -496,8 +496,8 @@ sub list_spool {
$form->hide_form(qw(callback title vc type sort module account path login sessionid));
- if (%printer && ${LedgerSMB::Sysconfig::latex}) {
- foreach $key (sort keys %printer) {
+ if (%{LedgerSMB::Sysconfig::printer} && ${LedgerSMB::Sysconfig::latex}) {
+ foreach $key (sort keys %{LedgerSMB::Sysconfig::printer}) {
print qq|
<input name=media type=radio class=radio value="$key" |;
print qq|checked| if $key eq $myconfig{printer};
diff --git a/bin/cp.pl b/bin/cp.pl
index be796242..d6ef60b9 100755
--- a/bin/cp.pl
+++ b/bin/cp.pl
@@ -457,8 +457,8 @@ sub payments_footer {
$media = qq|<select name=media>
<option value=screen>|.$locale->text('Screen');
- if (%printer) {
- for (sort keys %printer) { $media .= qq|
+ if (%{LedgerSMB::Sysconfig::printer}) {
+ for (sort keys %{LedgerSMB::Sysconfig::printer}) { $media .= qq|
<option value="$_">$_| }
}
@@ -1064,8 +1064,8 @@ sub payment_footer {
$media = qq|<select name=media>
<option value=screen>|.$locale->text('Screen');
- if (%printer) {
- for (sort keys %printer) { $media .= qq|
+ if (%{LedgerSMB::Sysconfig::printer}) {
+ for (sort keys %{LedgerSMB::Sysconfig::printer}) { $media .= qq|
<option value="$_">$_| }
}
@@ -1266,7 +1266,7 @@ sub print_form {
$form->{IN} = "$form->{formname}.tex";
if ($form->{media} ne 'screen') {
- $form->{OUT} = "| $printer{$form->{media}}";
+ $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}";
}
$form->parse_template(\%myconfig, ${LedgerSMB::Sysconfig::userspath});
diff --git a/bin/io.pl b/bin/io.pl
index efbe689c..4577ed86 100755
--- a/bin/io.pl
+++ b/bin/io.pl
@@ -1099,8 +1099,8 @@ sub print_options {
$media = qq|<select name=media>
<option value="screen">|.$locale->text('Screen');
- if (%printer && ${LedgerSMB::Sysconfig::latex}) {
- for (sort keys %printer) { $media .= qq|
+ if (%{LedgerSMB::Sysconfig::printer} && ${LedgerSMB::Sysconfig::latex}) {
+ for (sort keys %{LedgerSMB::Sysconfig::printer}) { $media .= qq|
<option value="$_">$_| }
}
if (${LedgerSMB::Sysconfig::latex}) {
@@ -1138,7 +1138,7 @@ sub print_options {
<td>$media</td>
|;
- if (%printer && ${LedgerSMB::Sysconfig::latex} && $form->{media} ne 'email') {
+ if (%{LedgerSMB::Sysconfig::printer} && ${LedgerSMB::Sysconfig::latex} && $form->{media} ne 'email') {
print qq|
<td nowrap>|.$locale->text('Copies').qq|
<input name=copies size=2 value=$form->{copies}></td>
@@ -1427,7 +1427,7 @@ sub print_form {
$form->{pre} = "<body bgcolor=#ffffff>\n<pre>" if $form->{format} eq 'txt';
if ($form->{media} !~ /(screen|queue|email)/) {
- $form->{OUT} = "| $printer{$form->{media}}";
+ $form->{OUT} = "| ${LedgerSMB::SysConfig::printer}{$form->{media}}";
$form->{OUT} =~ s/<%(fax)%>/<%$form->{vc}$1%>/;
$form->{OUT} =~ s/<%(.*?)%>/$form->{$1}/g;
diff --git a/bin/jc.pl b/bin/jc.pl
index 2375fae2..26efddab 100755
--- a/bin/jc.pl
+++ b/bin/jc.pl
@@ -1761,8 +1761,8 @@ sub print_options {
$form->{selectformat} = qq|<option value="html">html\n|;
- if (%printer && ${LedgerSMB::Sysconfig::latex}) {
- for (sort keys %printer) { $media .= qq|
+ if (%{LedgerSMB::Sysconfig::printer} && ${LedgerSMB::Sysconfig::latex}) {
+ for (sort keys %{LedgerSMB::Sysconfig::printer}) { $media .= qq|
<option value="$_">$_| }
}
@@ -1859,7 +1859,7 @@ sub print_timecard {
}
if ($form->{media} !~ /(screen|queue)/) {
- $form->{OUT} = "| $printer{$form->{media}}";
+ $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}";
if ($form->{printed} !~ /$form->{formname}/) {
$form->{printed} .= " $form->{formname}";
diff --git a/bin/pos.pl b/bin/pos.pl
index fb191a85..999e0aa3 100755
--- a/bin/pos.pl
+++ b/bin/pos.pl
@@ -77,7 +77,7 @@ sub on_update{
}
sub open_drawer{
- open (PRINTER, "|-", $printer{Printer});
+ open (PRINTER, "|-", ${LedgerSMB::Sysconfig::printer}{Printer});
print PRINTER $pos_config{'rp_cash_open'};
close PRINTER;
sleep 1;
@@ -840,7 +840,7 @@ sub print_form {
}
if ($form->{media} ne 'screen') {
- $form->{OUT} = "| $printer{$form->{media}}";
+ $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}";
}
$form->{discount} = $form->format_amount(\%myconfig, $form->{discount} * 100);
@@ -931,8 +931,8 @@ sub print_options {
<td><input class=radio type=radio name=media value="screen"></td>
<td>|.$locale->text('Screen').qq|</td>|;
- if (%printer) {
- for (keys %printer) {
+ if (%{LedgerSMB::Sysconfig::printer}) {
+ for (keys %{LedgerSMB::Sysconfig::printer}) {
$media .= qq|
<td><input class=radio type=radio name=media value="$_"></td>
<td nowrap>$_</td>
diff --git a/bin/rc.pl b/bin/rc.pl
index 498a2ea0..b3a4f5ba 100755
--- a/bin/rc.pl
+++ b/bin/rc.pl
@@ -402,7 +402,7 @@ sub close_till {
$cash = join ("\n", @cashlines);
$foot = $locale->text("Cumulative Error: ")."$difference\n";
$foot .= $locale->text('Reset Till By ')."$amount\n\n\n\n\n\n\n\n\n\n";
- open (PRN, "|-", $printer{Printer});
+ open (PRN, "|-", ${LedgerSMB::Sysconfig::printer}{Printer});
print PRN $head;
print PRN $lines;
print PRN $cash;
diff --git a/bin/rp.pl b/bin/rp.pl
index 685bf943..d130859e 100755
--- a/bin/rp.pl
+++ b/bin/rp.pl
@@ -1751,8 +1751,8 @@ sub print_options {
$media = qq|
<td><select name=media>
<option value=screen>|.$locale->text('Screen');
- if (%printer && ${LedgerSMB::Sysconfig::latex}) {
- for (sort keys %printer) { $media .= qq|
+ if (%{LedgerSMB::Sysconfig::printer} && ${LedgerSMB::Sysconfig::latex}) {
+ for (sort keys %{LedgerSMB::Sysconfig::printer}) { $media .= qq|
<option value="$_">$_| }
}
}
@@ -1774,7 +1774,7 @@ sub print_options {
$media
|;
- if (%printer && ${LedgerSMB::Sysconfig::latex} && $form->{media} ne 'email') {
+ if (%{LedgerSMB::Sysconfig::printer} && ${LedgerSMB::Sysconfig::latex} && $form->{media} ne 'email') {
print qq|
<td>|.$locale->text('Copies').qq|
<input name=copies size=2 value=$form->{copies}></td>
@@ -1926,7 +1926,7 @@ sub print {
if ($form->{media} !~ /(screen|email)/) {
- $form->{OUT} = "| $printer{$form->{media}}";
+ $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}";
$form->{"$form->{ct}_id"} = "";
$SIG{INT} = 'IGNORE';
} else {