diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-24 02:38:49 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-24 02:38:49 +0000 |
commit | b193f4e3c1c2b4e826ed1004b8c64d5e6e991ba8 (patch) | |
tree | 79152cd1bc3296d7783ab0b060e10c127c02cdd6 /bin | |
parent | 1b13895ec6bd39568353c1a4d66d55f733f56734 (diff) |
Moved %printer from ledger-smb.conf to Ledger::Sysconfig
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@281 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/admin.pl | 4 | ||||
-rwxr-xr-x | bin/am.pl | 9 | ||||
-rwxr-xr-x | bin/arap.pl | 4 | ||||
-rwxr-xr-x | bin/arapprn.pl | 8 | ||||
-rwxr-xr-x | bin/bp.pl | 6 | ||||
-rwxr-xr-x | bin/cp.pl | 10 | ||||
-rwxr-xr-x | bin/io.pl | 8 | ||||
-rwxr-xr-x | bin/jc.pl | 6 | ||||
-rwxr-xr-x | bin/pos.pl | 8 | ||||
-rwxr-xr-x | bin/rc.pl | 2 | ||||
-rwxr-xr-x | bin/rp.pl | 8 |
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|; @@ -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="$_">$_| } } @@ -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}; @@ -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}); @@ -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; @@ -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}"; @@ -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> @@ -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; @@ -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 { |