summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-12-07 18:26:43 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-12-07 18:26:43 +0000
commita3c7eaeb221da06f96c1bd3c288e62c83b4d7be2 (patch)
treee56df466dbaa50fd2ddf2b6dd871ec93925b2b1b /bin
parentb36b485608b9fc389cd0aeedbd0edc1b92c0c063 (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-xbin/arapprn.pl21
-rwxr-xr-xbin/bp.pl3
-rwxr-xr-xbin/cp.pl3
-rwxr-xr-xbin/io.pl9
-rwxr-xr-xbin/jc.pl8
-rwxr-xr-xbin/pos.pl3
-rwxr-xr-xbin/rp.pl4
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}/) {
diff --git a/bin/bp.pl b/bin/bp.pl
index 0d770bda..80fe951a 100755
--- a/bin/bp.pl
+++ b/bin/bp.pl
@@ -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})) {
diff --git a/bin/cp.pl b/bin/cp.pl
index 0e8a4255..c4474e38 100755
--- a/bin/cp.pl
+++ b/bin/cp.pl
@@ -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});
diff --git a/bin/io.pl b/bin/io.pl
index ec824540..31e8636c 100755
--- a/bin/io.pl
+++ b/bin/io.pl
@@ -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/^ //;
diff --git a/bin/jc.pl b/bin/jc.pl
index 97ccf3db..5066dc41 100755
--- a/bin/jc.pl
+++ b/bin/jc.pl
@@ -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);
diff --git a/bin/pos.pl b/bin/pos.pl
index 31087cca..7071d5d3 100755
--- a/bin/pos.pl
+++ b/bin/pos.pl
@@ -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);
diff --git a/bin/rp.pl b/bin/rp.pl
index 29c49869..0d5581d8 100755
--- a/bin/rp.pl
+++ b/bin/rp.pl
@@ -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 {