[freeside-commits] branch master updated. 00cd6dc7e1f767476d449a9180d44e6a6d042284
Ivan
ivan at 420.am
Tue May 23 16:11:00 PDT 2017
The branch, master has been updated
via 00cd6dc7e1f767476d449a9180d44e6a6d042284 (commit)
from 1e2720d0bcb45a372ea7a6ec118a67742e5ea6ff (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 00cd6dc7e1f767476d449a9180d44e6a6d042284
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue May 23 16:10:59 2017 -0700
throw a better, pre-vitelity error message if we're missing any of their required fields, RT#73618
diff --git a/FS/FS/part_export/vitelity.pm b/FS/FS/part_export/vitelity.pm
index 089e109..29ed8b6 100644
--- a/FS/FS/part_export/vitelity.pm
+++ b/FS/FS/part_export/vitelity.pm
@@ -282,6 +282,20 @@ sub _export_insert {
#porting a number in? different code path
if ( $svc_phone->lnp_status eq 'portingin' ) {
+ my $cust_main = $svc_phone->cust_svc->cust_pkg->cust_main;
+
+ return 'Customer company is required'
+ unless $cust_main->company;
+
+ return 'Customer day phone (for contact, not porting) is required'
+ unless $cust_main->daytime;
+
+ return 'LNP Other Provider is required'
+ unless $svc_phone->lnp_other_provider;
+
+ return 'LNP Other Provider Account # is required'
+ unless $svc_phone->lnp_other_provider_account;
+
my %location = $svc_phone->location_hash;
my $sa = Geo::StreetAddress::US->parse_location( $location{'address1'} );
@@ -290,7 +304,7 @@ sub _export_insert {
'partial' => 'no',
'wireless' => 'no',
'carrier' => $svc_phone->lnp_other_provider,
- 'company' => $svc_phone->cust_svc->cust_pkg->cust_main->company,
+ 'company' => $cust_main->company,
'accnumber' => $svc_phone->lnp_other_provider_account,
'name' => $svc_phone->phone_name_or_cust,
'streetnumber' => $sa->{number},
@@ -305,7 +319,7 @@ sub _export_insert {
'state' => $location{'state'},
'zip' => $location{'zip'},
'billnumber' => $svc_phone->phonenum, #?? do we need a new field for this?
- 'contactnumber' => $svc_phone->cust_svc->cust_pkg->cust_main->daytime,
+ 'contactnumber' => $cust_main->daytime,
);
if ( $result =~ /^ok:/i ) {
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_export/vitelity.pm | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
More information about the freeside-commits
mailing list