diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-12-07 18:26:43 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-12-07 18:26:43 +0000 |
commit | a3c7eaeb221da06f96c1bd3c288e62c83b4d7be2 (patch) | |
tree | e56df466dbaa50fd2ddf2b6dd871ec93925b2b1b /bin | |
parent | b36b485608b9fc389cd0aeedbd0edc1b92c0c063 (diff) |
Fixes some issues with saving parts. Also is a step towards fixing printing with 3-arg open statements. Printing is not verified yet.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@739 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/arapprn.pl | 21 | ||||
-rwxr-xr-x | bin/bp.pl | 3 | ||||
-rwxr-xr-x | bin/cp.pl | 3 | ||||
-rwxr-xr-x | bin/io.pl | 9 | ||||
-rwxr-xr-x | bin/jc.pl | 8 | ||||
-rwxr-xr-x | bin/pos.pl | 3 | ||||
-rwxr-xr-x | bin/rp.pl | 4 |
7 files changed, 32 insertions, 19 deletions
diff --git a/bin/arapprn.pl b/bin/arapprn.pl index 18fd884f..9b2f025a 100755 --- a/bin/arapprn.pl +++ b/bin/arapprn.pl @@ -115,9 +115,10 @@ sub print { } $filename .= ($form->{format} eq 'postscript') ? '.ps' : '.pdf'; - $form->{OUT} = ">${LedgerSMB::Sysconfig::spool}/$filename" if - $form->{media} ne 'screen'; - + if ($form->{media} ne 'screen'){ + $form->{OUT} = "${LedgerSMB::Sysconfig::spool}/$filename"; + $form->{printmode} = '>'; + } $form->{queued} .= " $form->{formname} $filename"; $form->{queued} =~ s/^ //; $printform = new Form; @@ -216,8 +217,8 @@ sub print_check { id => $form->{id} ); $form->{audittrail} .= $form->audittrail("", \%myconfig, \%audittrail); - $form->{OUT} = ">${LedgerSMB::Sysconfig::spool}/$filename"; - + $form->{OUT} = "${LedgerSMB::Sysconfig::spool}/$filename"; + $form->{printmode} = '>'; $form->{queued} .= " $form->{formname} $filename"; $form->{queued} =~ s/^ //; } @@ -227,8 +228,8 @@ sub print_check { %queued = split / /, $form->{queued}; - $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}"; - + $form->{OUT} = "${LedgerSMB::Sysconfig::printer}{$form->{media}}"; + $form->{printmode} = '|-'; if ($form->{printed} !~ /$form->{formname}/) { $form->{printed} .= " $form->{formname}"; @@ -424,7 +425,8 @@ sub print_transaction { } $filename .= ($form->{format} eq 'postscript') ? '.ps' : '.pdf'; - $form->{OUT} = ">${LedgerSMB::Sysconfig::spool}/$filename"; + $form->{OUT} = "${LedgerSMB::Sysconfig::spool}/$filename"; + $form->{printmode} = '>'; $form->{queued} .= " $form->{formname} $filename"; $form->{queued} =~ s/^ //; @@ -444,7 +446,8 @@ sub print_transaction { } if ($form->{media} !~ /(queue|screen)/) { - $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}"; + $form->{OUT} = "${LedgerSMB::Sysconfig::printer}{$form->{media}}"; + $form->{printmode} = '|-'; if ($form->{printed} !~ /$form->{formname}/) { @@ -271,7 +271,8 @@ sub print { for $i (1 .. $form->{rowcount}) { if ($form->{"checked_$i"}) { - $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}"; + $form->{OUT} = "${LedgerSMB::Sysconfig::printer}{$form->{media}}"; + $form->{printmode} = '|-'; $form->info($locale->text('Printing')." ..."); if (BP->print_spool(\%myconfig, \%$form, ${LedgerSMB::Sysconfig::spool})) { @@ -1279,7 +1279,8 @@ sub print_form { $form->{IN} = "$form->{formname}.tex"; if ($form->{media} ne 'screen') { - $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}"; + $form->{OUT} = "${LedgerSMB::Sysconfig::printer}{$form->{media}}"; + $form->{printmode} = '|-'; } $form->parse_template(\%myconfig, ${LedgerSMB::Sysconfig::userspath}); @@ -1427,8 +1427,8 @@ sub print_form { $form->{pre} = "<body bgcolor=#ffffff>\n<pre>" if $form->{format} eq 'txt'; if ($form->{media} !~ /(screen|queue|email)/) { - $form->{OUT} = "| ${LedgerSMB::SysConfig::printer}{$form->{media}}"; - + $form->{OUT} = "${LedgerSMB::SysConfig::printer}{$form->{media}}"; + $form->{printmode} = '|-'; $form->{OUT} =~ s/<%(fax)%>/<%$form->{vc}$1%>/; $form->{OUT} =~ s/<%(.*?)%>/$form->{$1}/g; @@ -1458,6 +1458,7 @@ sub print_form { $form->{plainpaper} = 1; $form->{OUT} = "${LedgerSMB::Sysconfig::sendmail}"; + $form->{printmode} = '|-'; if ($form->{emailed} !~ /$form->{formname}/) { $form->{emailed} .= " $form->{formname}"; @@ -1513,7 +1514,9 @@ sub print_form { } $filename .= ($form->{format} eq 'postscript') ? '.ps' : '.pdf'; - $form->{OUT} = ">${LedgerSMB::Sysconfig::spool}/$filename"; + $form->{OUT} = "${LedgerSMB::Sysconfig::spool}/$filename"; + $form->{printmode} = '>'; + $form->{queued} .= " $form->{formname} $filename"; $form->{queued} =~ s/^ //; @@ -1859,8 +1859,9 @@ sub print_timecard { } if ($form->{media} !~ /(screen|queue)/) { - $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}"; - + $form->{OUT} = "${LedgerSMB::Sysconfig::printer}{$form->{media}}"; + $form->{printmode} = '|-'; + if ($form->{printed} !~ /$form->{formname}/) { $form->{printed} .= " $form->{formname}"; $form->{printed} =~ s/^ //; @@ -1894,7 +1895,8 @@ sub print_timecard { } $filename .= ($form->{format} eq 'postscript') ? '.ps' : '.pdf'; - $form->{OUT} = ">${LedgerSMB::Sysconfig::spool}/$filename"; + $form->{OUT} = "${LedgerSMB::Sysconfig::spool}/$filename"; + $form->{printmode} = '>'; $form->{queued} = "$form->{formname} $filename"; $form->update_status(\%myconfig); @@ -863,7 +863,8 @@ sub print_form { } if ($form->{media} ne 'screen') { - $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}"; + $form->{OUT} = "${LedgerSMB::Sysconfig::printer}{$form->{media}}"; + $form->{printmode} = '|-'; } $form->{discount} = $form->format_amount(\%myconfig, $form->{discount} * 100); @@ -1892,6 +1892,7 @@ sub e_mail { sub send_email { $form->{OUT} = "${LedgerSMB::Sysconfig::sendmail}"; + $form->{printmode} = '|-'; $form->{subject} = $locale->text('Statement - [_1]', $form->{todate}) unless $form->{subject}; $form->isblank("email", $locale->text('E-mail address missing!')); @@ -1926,7 +1927,8 @@ sub print { if ($form->{media} !~ /(screen|email)/) { - $form->{OUT} = "| ${LedgerSMB::Sysconfig::printer}{$form->{media}}"; + $form->{OUT} = "${LedgerSMB::Sysconfig::printer}{$form->{media}}"; + $form->{printmode} = '|-'; $form->{"$form->{ct}_id"} = ""; $SIG{INT} = 'IGNORE'; } else { |