From 7d0b690f5684cdfdcd68d25568a101f6b088ad98 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 9 Feb 2009 11:32:07 +0000 Subject: [PATCH] add some more customer output formats that include service address, RT#4583 --- FS/FS/ConfDefaults.pm | 20 +++++++++++++++----- FS/FS/UI/Web.pm | 20 +++++++++++++++++++- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/FS/FS/ConfDefaults.pm b/FS/FS/ConfDefaults.pm index a3af52d30..5f53642c3 100644 --- a/FS/FS/ConfDefaults.pm +++ b/FS/FS/ConfDefaults.pm @@ -44,17 +44,27 @@ sub cust_fields_avail { ( 'custnum | Status | Last, First or Company (Last, First) | (same for service contact if present)', 'Cust. Status | (bill) Name | (bill) Company | (service) Name | (service) Company' => - 'Status | Last, First | Company | (same for service address if present)', + 'Status | Last, First | Company | (same for service contact if present)', 'Cust# | Cust. Status | (bill) Name | (bill) Company | (service) Name | (service) Company' => - 'custnum | Status | Last, First | Company | (same for service address if present)', + 'custnum | Status | Last, First | Company | (same for service contact if present)', 'Cust# | Cust. Status | Name | Company | Address 1 | Address 2 | City | State | Zip | Country | Day phone | Night phone | Invoicing email(s)' => - 'custnum | Status | Last, First | Company | (all address fields ) | Day phone | Night phone | Invoicing email(s)', + 'custnum | Status | Last, First | Company | (all address fields) | Day phone | Night phone | Invoicing email(s)', 'Cust# | Cust. Status | Name | Company | Address 1 | Address 2 | City | State | Zip | Country | Day phone | Night phone | Fax number | Invoicing email(s) | Payment Type' => - 'custnum | Status | Last, First | Company | (all address fields ) | ( all phones ) | Invoicing email(s) | Payment Type', + 'custnum | Status | Last, First | Company | (all address fields) | ( all phones ) | Invoicing email(s) | Payment Type', + 'Cust# | Cust. Status | Name | Company | Address 1 | Address 2 | City | State | Zip | Country | Day phone | Night phone | Fax number | Invoicing email(s) | Payment Type | Current Balance' => - 'custnum | Status | Last, First | Company | (all address fields ) | ( all phones ) | Invoicing email(s) | Payment Type | Current Balance', + 'custnum | Status | Last, First | Company | (all address fields) | ( all phones ) | Invoicing email(s) | Payment Type | Current Balance', + + 'Cust# | Cust. Status | (bill) Name | (bill) Company | (bill) Address 1 | (bill) Address 2 | (bill) City | (bill) State | (bill) Zip | (bill) Country | (bill) Day phone | (bill) Night phone | (service) Name | (service) Company | (service) Address 1 | (service) Address 2 | (service) City | (service) State | (service) Zip | (service) Country | (service) Day phone | (service) Night phone | Invoicing email(s)' => + 'custnum | Status | Last, First | Company | (all address fields) | Day phone | Night phone | (same for service address if present) | Invoicing email(s)', + + 'Cust# | Cust. Status | (bill) Name | (bill) Company | (bill) Address 1 | (bill) Address 2 | (bill) City | (bill) State | (bill) Zip | (bill) Country | (bill) Day phone | (bill) Night phone | (bill) Fax number | (service) Name | (service) Company | (service) Address 1 | (service) Address 2 | (service) City | (service) State | (service) Zip | (service) Country | (service) Day phone | (service) Night phone | (service) Fax number | Invoicing email(s) | Payment Type' => + 'custnum | Status | Last, First | Company | (all address fields) | ( all phones ) | (same for service address if present) | Invoicing email(s) | Payment Type', + + 'Cust# | Cust. Status | (bill) Name | (bill) Company | (bill) Address 1 | (bill) Address 2 | (bill) City | (bill) State | (bill) Zip | (bill) Country | (bill) Day phone | (bill) Night phone | (bill) Fax number | (service) Name | (service) Company | (service) Address 1 | (service) Address 2 | (service) City | (service) State | (service) Zip | (service) Country | (service) Day phone | (service) Night phone | (service) Fax number | Invoicing email(s) | Payment Type | Current Balance' => + 'custnum | Status | Last, First | Company | (all address fields) | ( all phones ) | (same for service address if present) | Invoicing email(s) | Payment Type | Current Balance', 'Invoicing email(s)' => 'Invoicing email(s)', 'Cust# | Invoicing email(s)' => 'custnum | Invoicing email(s)', diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index 744d5f793..6386f9187 100644 --- a/FS/FS/UI/Web.pm +++ b/FS/FS/UI/Web.pm @@ -237,6 +237,24 @@ sub cust_header { 'Day phone' => 'daytime', # XXX should use msgcat, but how? 'Night phone' => 'night', # XXX should use msgcat, but how? 'Fax number' => 'fax', + '(bill) Address 1' => 'address1', + '(bill) Address 2' => 'address2', + '(bill) City' => 'city', + '(bill) State' => 'state', + '(bill) Zip' => 'zip', + '(bill) Country' => 'country_full', + '(bill) Day phone' => 'daytime', # XXX should use msgcat, but how? + '(bill) Night phone' => 'night', # XXX should use msgcat, but how? + '(bill) Fax number' => 'fax', + '(service) Address 1' => 'ship_address1', + '(service) Address 2' => 'ship_address2', + '(service) City' => 'ship_city', + '(service) State' => 'ship_state', + '(service) Zip' => 'ship_zip', + '(service) Country' => 'ship_country_full', + '(service) Day phone' => 'ship_daytime', # XXX should use msgcat, how? + '(service) Night phone' => 'ship_night', # XXX should use msgcat, how? + '(service) Fax number' => 'ship_fax', 'Invoicing email(s)' => 'invoicing_list_emailonly_scalar', 'Payment Type' => 'payby', 'Current Balance' => 'current_balance', @@ -281,7 +299,7 @@ sub cust_header { } @cust_header = split(/ \| /, $cust_fields); - @cust_fields = map { $header2method{$_} } @cust_header; + @cust_fields = map { $header2method{$_} || $_ } @cust_header; @cust_colors = map { exists $header2colormethod{$_} ? $header2colormethod{$_} : '' -- 2.11.0