diff options
author | jeff <jeff> | 2008-06-02 11:16:09 +0000 |
---|---|---|
committer | jeff <jeff> | 2008-06-02 11:16:09 +0000 |
commit | 1d2c5120add6c4c63723c7ef896b5d0b8fe962df (patch) | |
tree | 89378cd5e24e89b8599990f2e7ca5019abe1bc54 /FS/FS | |
parent | 773dc8ba7af4d895e0347ebfa59a340f268fd10b (diff) |
typeset tear-off remittance coupon
Diffstat (limited to 'FS/FS')
-rw-r--r-- | FS/FS/Conf.pm | 23 | ||||
-rw-r--r-- | FS/FS/Conf_compat17.pm | 7 | ||||
-rw-r--r-- | FS/FS/cust_bill.pm | 22 |
3 files changed, 28 insertions, 24 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 2b47bf0..2750124 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -533,21 +533,7 @@ worry that config_items is freeside-specific and icky. invoice_latexfooter invoice_latexsmallfooter invoice_latexnotes - invoice_html - invoice_htmlreturnaddress - invoice_htmlfooter - invoice_htmlnotes - logo.png - logo.eps - ); - -@base_items = qw ( - invoice_template - invoice_latex - invoice_latexreturnaddress - invoice_latexfooter - invoice_latexsmallfooter - invoice_latexnotes + invoice_latexcoupon invoice_html invoice_htmlreturnaddress invoice_htmlfooter @@ -830,6 +816,13 @@ worry that config_items is freeside-specific and icky. }, { + 'key' => 'invoice_latexcoupon', + 'section' => 'billing', + 'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.', + 'type' => 'textarea', + }, + + { 'key' => 'invoice_latexreturnaddress', 'section' => 'billing', 'description' => 'Return address for LaTeX typeset PostScript invoices.', diff --git a/FS/FS/Conf_compat17.pm b/FS/FS/Conf_compat17.pm index e9e25bb..19e2e5d 100644 --- a/FS/FS/Conf_compat17.pm +++ b/FS/FS/Conf_compat17.pm @@ -693,6 +693,13 @@ httemplate/docs/config.html }, { + 'key' => 'invoice_latexcoupon', + 'section' => 'billing', + 'description' => 'Remittance coupon for LaTeX typeset PostScript invoices.', + 'type' => 'textarea', + }, + + { 'key' => 'invoice_latexreturnaddress', 'section' => 'billing', 'description' => 'Return address for LaTeX typeset PostScript invoices.', diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 1f837de..69c5722 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -1671,6 +1671,7 @@ sub print_generic { 'footer' => sub { map "$_", @_ }, 'smallfooter' => sub { map "$_", @_ }, 'returnaddress' => sub { map "$_", @_ }, + 'coupon' => sub { map "$_", @_ }, }, 'html' => { 'notes' => @@ -1702,6 +1703,7 @@ sub print_generic { $_; } @_ }, + 'coupon' => sub { "" }, }, 'template' => { 'notes' => @@ -1731,6 +1733,7 @@ sub print_generic { $_; } @_ }, + 'coupon' => sub { "" }, }, ); @@ -1872,8 +1875,17 @@ sub print_generic { push @address, '' while (scalar(@address) < 5); + $invoice_data{'logo_file'} = $params{'logo_file'} + if $params{'logo_file'}; + + my( $pr_total, @pr_cust_bill ) = $self->previous; #previous balance +# my( $cr_total, @cr_cust_credit ) = $self->cust_credit; #credits + #my $balance_due = $self->owed + $pr_total - $cr_total; + my $balance_due = $self->owed + $pr_total; + $invoice_data{'balance'} = $balance_due; + #do variable substitution in notes, footer, smallfooter - foreach my $include (qw( notes footer smallfooter )) { + foreach my $include (qw( notes footer smallfooter coupon )) { my $inc_file = $conf->key_orbase("invoice_${format}$include", $template); my @inc_src; @@ -1919,11 +1931,6 @@ sub print_generic { ? &$escape_function("Purchase Order #". $cust_main->payinfo) : $nbsp; - my( $pr_total, @pr_cust_bill ) = $self->previous; #previous balance -# my( $cr_total, @cr_cust_credit ) = $self->cust_credit; #credits - #my $balance_due = $self->owed + $pr_total - $cr_total; - my $balance_due = $self->owed + $pr_total; - my %money_chars = ( 'latex' => '', 'html' => $conf->config('money_char') || '$', 'template' => '', @@ -2233,9 +2240,6 @@ sub print_generic { } } - $invoice_data{'logo_file'} = $params{'logo_file'} - if $params{'logo_file'}; - $invoice_lines = 0; my $wasfunc = 0; foreach ( grep /invoice_lines\(\d*\)/, @invoice_template ) { #kludgy |