[freeside-commits] branch master updated. 0437a5b5d60bdae7c4c8b5ede1827715650faf40

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


The branch, master has been updated
       via  0437a5b5d60bdae7c4c8b5ede1827715650faf40 (commit)
      from  f3853d3ed85d993f6bc058747d338fcbf344cb61 (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 0437a5b5d60bdae7c4c8b5ede1827715650faf40
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