summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2004-01-01 20:40:39 +0000
committerivan <ivan>2004-01-01 20:40:39 +0000
commite728f9664160d943e02657dd9d83aa1bb7d8e5f4 (patch)
tree1e22d0bacc64e3d586f4d57453b2ae64168ef490 /FS
parent1d2cbbff7fe3600eef0abfb3c0fc0712b3b0506b (diff)
escape stuff from latex
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_bill.pm32
1 files changed, 16 insertions, 16 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index e5c1966..8adbb6c 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -928,15 +928,15 @@ sub print_ps {
my %invoice_data = (
'invnum' => $self->invnum,
'date' => time2str('%b %o, %Y', $self->_date),
- 'agent' => $cust_main->agent->agent,
- 'payname' => $cust_main->payname,
- 'company' => $cust_main->company,
- 'address1' => $cust_main->address1,
- 'address2' => $cust_main->address2,
- 'city' => $cust_main->city,
- 'state' => $cust_main->state,
- 'zip' => $cust_main->zip,
- 'country' => $cust_main->country,
+ 'agent' => _latex_escape($cust_main->agent->agent),
+ 'payname' => _latex_escape($cust_main->payname),
+ 'company' => _latex_escape($cust_main->company),
+ 'address1' => _latex_escape($cust_main->address1),
+ 'address2' => _latex_escape($cust_main->address2),
+ 'city' => _latex_escape($cust_main->city),
+ 'state' => _latex_escape($cust_main->state),
+ 'zip' => _latex_escape($cust_main->zip),
+ 'country' => _latex_escape($cust_main->country),
'footer' => join("\n", $conf->config('invoice_latexfooter') ),
'quantity' => 1,
'terms' => $conf->config('invoice_default_terms') || 'Payable upon receipt',
@@ -951,7 +951,7 @@ sub print_ps {
$invoice_data{'po_line'} =
( $cust_main->payby eq 'BILL' && $cust_main->payinfo )
- ? "Purchase Order #". $cust_main->payinfo
+ ? _latex_escape("Purchase Order #". $cust_main->payinfo)
: '~';
my @line_item = ();
@@ -969,11 +969,11 @@ sub print_ps {
foreach my $line_item ( $self->_items ) {
#foreach my $line_item ( $self->_items_pkg ) {
$invoice_data{'ref'} = $line_item->{'pkgnum'};
- $invoice_data{'description'} = $line_item->{'description'};
+ $invoice_data{'description'} = _latex_escape($line_item->{'description'});
if ( exists $line_item->{'ext_description'} ) {
$invoice_data{'description'} .=
"\\tabularnewline\n~~".
- join("\\tabularnewline\n~~", @{$line_item->{'ext_description'}} );
+ join("\\tabularnewline\n~~", map { _latex_escape($_) } @{$line_item->{'ext_description'}} );
}
$invoice_data{'amount'} = $line_item->{'amount'};
$invoice_data{'product_code'} = $line_item->{'pkgpart'} || 'N/A';
@@ -992,7 +992,7 @@ sub print_ps {
my $taxtotal = 0;
foreach my $tax ( $self->_items_tax ) {
- $invoice_data{'total_item'} = $tax->{'description'};
+ $invoice_data{'total_item'} = _latex_escape($tax->{'description'});
$taxtotal += ( $invoice_data{'total_amount'} = $tax->{'amount'} );
push @total_fill,
map { my $b=$_; $b =~ s/\$(\w+)/$invoice_data{$1}/eg; $b }
@@ -1019,7 +1019,7 @@ sub print_ps {
# credits
foreach my $credit ( $self->_items_credits ) {
- $invoice_data{'total_item'} = $credit->{'description'};
+ $invoice_data{'total_item'} = _latex_escape($credit->{'description'});
#$credittotal
$invoice_data{'total_amount'} = '-\dollar '. $credit->{'amount'};
push @total_fill,
@@ -1029,7 +1029,7 @@ sub print_ps {
# payments
foreach my $payment ( $self->_items_payments ) {
- $invoice_data{'total_item'} = $payment->{'description'};
+ $invoice_data{'total_item'} = _latex_escape($payment->{'description'});
#$paymenttotal
$invoice_data{'total_amount'} = '-\dollar '. $payment->{'amount'};
push @total_fill,
@@ -1143,7 +1143,7 @@ sub _items_previous {
my @b = ();
foreach ( @pr_cust_bill ) {
push @b, {
- 'description' => 'Previous Balance, Invoice \#'. $_->invnum.
+ 'description' => 'Previous Balance, Invoice #'. $_->invnum.
' ('. time2str('%x',$_->_date). ')',
#'pkgpart' => 'N/A',
'pkgnum' => 'N/A',