[freeside-commits] branch FREESIDE_3_BRANCH updated. d4870a2a045dca3a92f1c9962612f6846dd4c493

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


The branch, FREESIDE_3_BRANCH has been updated
       via  d4870a2a045dca3a92f1c9962612f6846dd4c493 (commit)
      from  c2fdce8923a09f4a586323adbb7bd0f0dfc587f2 (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 d4870a2a045dca3a92f1c9962612f6846dd4c493
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Mar 5 18:31:41 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 98c1a93..ab9281b 100644
--- a/FS/FS/API.pm
+++ b/FS/FS/API.pm
@@ -275,6 +275,19 @@ sub customer_info {
   $return{$_} = $cust_main->get($_)
     foreach @cust_main_editable_fields;
 
+  for (@location_editable_fields) {
+    $return{$_} = $cust_main->bill_location->get($_)
+      if $cust_main->bill_locationnum;
+    $return{'ship_'.$_} = $cust_main->ship_location->get($_)
+      if $cust_main->ship_locationnum;
+  }
+
+  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 |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)




More information about the freeside-commits mailing list