From d7d7b020db58c4aa5be2521c38719df2ec0bacb2 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Fri, 6 Mar 2015 20:08:32 -0600 Subject: RT#29406: Per customer option to display service address of package on invoice --- httemplate/docs/schema.html | 1 + httemplate/edit/cust_main.cgi | 13 +++++++++++++ httemplate/view/cust_main/contacts.html | 7 +++++++ 3 files changed, 21 insertions(+) (limited to 'httemplate') diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html index cd4914a6c..bb1861292 100644 --- a/httemplate/docs/schema.html +++ b/httemplate/docs/schema.html @@ -137,6 +137,7 @@
  • otaker - order taker
  • referral_custnum
  • comments +
  • invoice_ship_address - Y or null, does ship address appear on invoice (columns in italics are optional)
  • cust_main_invoice - Invoice destinations for email invoices. Note that a customer can have many email destinations for their invoice (either literal or via svcnum), but only one postal destination. diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index d7895722a..7343a9d16 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -82,6 +82,19 @@ enable_district => 1, enable_coords => 1, &> +% unless ($conf->exists('invoice-ship_address')) { #it's always on, so hide per-cust config + +   + + <% include('/elements/checkbox.html', + 'field' => 'invoice_ship_address', + 'value' => 'Y', + 'curr_value' => $cust_main->invoice_ship_address, + 'postfix' => emt('included on invoices'), + ) %> + + +% } diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html index 5b61e7400..e810d6f5d 100644 --- a/httemplate/view/cust_main/contacts.html +++ b/httemplate/view/cust_main/contacts.html @@ -13,6 +13,13 @@ (<% mt('same as billing') %>) % } +% if ( +% ($this eq 'ship') +% && $cust_main->invoice_ship_address +% && !$conf->exists('invoice-ship_address') #it's always on, so hide per-cust config +% ) { +(<% emt('included on invoices') %>) +% } % if ( $this eq 'bill' ) { -- cgit v1.2.1