add some more customer output formats that include service address, RT#4583
authorivan <ivan>
Mon, 9 Feb 2009 11:32:07 +0000 (11:32 +0000)
committerivan <ivan>
Mon, 9 Feb 2009 11:32:07 +0000 (11:32 +0000)
FS/FS/ConfDefaults.pm
FS/FS/UI/Web.pm

index a3af52d..5f53642 100644 (file)
@@ -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)',
index 744d5f7..6386f91 100644 (file)
@@ -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{$_}
                          : ''