summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjeff <jeff>2008-06-23 15:36:25 +0000
committerjeff <jeff>2008-06-23 15:36:25 +0000
commit3c0c02570de780a7afe0b6f240306a6b82b3e41f (patch)
tree37f635212c402261a804152a99f62a65458d731a
parent71436e7f8df90c5eaea6178a829a7685b22e4062 (diff)
invoice service address modifications
-rw-r--r--FS/FS/cust_bill.pm4
-rw-r--r--conf/invoice_html16
-rw-r--r--conf/invoice_latex2
3 files changed, 20 insertions, 2 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index 006892c2d..c29bb4209 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -1820,13 +1820,15 @@ sub print_latex {
'unitprices' => $conf->exists('invoice-unitprice'),
);
+ my $countrydefault = $conf->config('countrydefault') || 'US';
my $prefix = $cust_main->has_ship_address ? 'ship_' : '';
foreach ( qw( contact company address1 address2 city state zip country fax) ){
my $method = $prefix.$_;
$invoice_data{"ship_$_"} = _latex_escape($cust_main->$method);
}
+ $invoice_data{'ship_country'} = ''
+ if ( $invoice_data{'ship_country'} eq $countrydefault );
- my $countrydefault = $conf->config('countrydefault') || 'US';
if ( $cust_main->country eq $countrydefault ) {
$invoice_data{'country'} = '';
} else {
diff --git a/conf/invoice_html b/conf/invoice_html
index be03d1635..331a0b978 100644
--- a/conf/invoice_html
+++ b/conf/invoice_html
@@ -60,6 +60,22 @@
)
%>
</td>
+ <%= $ship_enable ? ('<td align="left">'.
+ join('<BR>',grep length($_), '<b>Service Address</b>',
+ $ship_company,
+ $ship_address1,
+ $ship_address2,
+ "$ship_city,&nbsp;$ship_state&nbsp;$ship_zip",
+ $ship_country,
+ ' ',
+ ' ',
+ ).
+ ($agent_custid ? "<b>ID:</b> $agent_custid<BR>" : '').
+ ($ship_fax ? "<b>Fax:</b> $ship_fax<BR>" : '').
+ '</td><tr><td></td><td></td>'
+ )
+ : ''
+ %>
<td align="right">
Terms: <%= $terms %><BR>
<%= $po_line %>
diff --git a/conf/invoice_latex b/conf/invoice_latex
index ef92cf3fd..0f83a5fe6 100644
--- a/conf/invoice_latex
+++ b/conf/invoice_latex
@@ -202,7 +202,6 @@
\hfill
\makebox{
\begin{minipage}[t]{6.4cm}
-\begin{flushright}
[@--
if ($ship_enable) {
$OUT .= '\textbf{Service Address}\\\\';
@@ -219,6 +218,7 @@
$OUT .= '';
}
--@]
+\begin{flushright}
Terms: [@-- $terms --@]\\
[@-- $po_line --@]\\
\end{flushright}