[freeside-commits] branch FREESIDE_2_3_BRANCH updated. b2e6af304e3671d8dc29931201c6e46d872957d7

Ivan ivan at 420.am
Wed Mar 5 18:31:55 PST 2014


The branch, FREESIDE_2_3_BRANCH has been updated
       via  b2e6af304e3671d8dc29931201c6e46d872957d7 (commit)
      from  83153d0d334defaf1fe909a244baec175986fa40 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b2e6af304e3671d8dc29931201c6e46d872957d7
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Mar 5 18:31:51 2014 -0800

    API methods to pull customer information: name, phone numbers, email and postal billing info, and address info in a normalized 2.3/3.x fashion, RT#22830

diff --git a/FS/FS/API.pm b/FS/FS/API.pm
index df48802..9deed3d 100644
--- a/FS/FS/API.pm
+++ b/FS/FS/API.pm
@@ -101,7 +101,16 @@ sub customer_info {
   );
 
   $return{$_} = $cust_main->get($_)
-    foreach @cust_main_editable_fields;
+    foreach ( @cust_main_editable_fields,
+              @location_editable_fields,
+              map "ship_$_", @location_editable_fields,
+            );
+
+  my @invoicing_list = $cust_main->invoicing_list;
+  $return{'invoicing_list'} =
+    join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list );
+  $return{'postal_invoicing'} =
+    0 < ( grep { $_ eq 'POST' } @invoicing_list );
 
   return \%return;
 

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/API.pm |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list