[freeside-commits] branch master updated. 5372897f367498972c96f5494e142e6e11b29eb8
Christopher Burger
burgerc at freeside.biz
Fri Jun 14 21:43:36 PDT 2019
The branch, master has been updated
via 5372897f367498972c96f5494e142e6e11b29eb8 (commit)
from ac3296dc4d9c1c7ff3646df6496a4f49d9e07b9b (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 5372897f367498972c96f5494e142e6e11b29eb8
Author: Christopher Burger <burgerc at freeside.biz>
Date: Sat Jun 15 00:42:58 2019 -0400
RT# 83450 - fixed rateplan export
diff --git a/FS/FS/part_export/saisei.pm b/FS/FS/part_export/saisei.pm
index 78dda7190..9dba56b49 100644
--- a/FS/FS/part_export/saisei.pm
+++ b/FS/FS/part_export/saisei.pm
@@ -165,12 +165,12 @@ sub _export_insert {
die ("Please double check your credentials as ".$existing_rateplan->{message}."\n") if $existing_rateplan->{message};
# if no existing rate plan create one and modify it.
- $self->api_create_rateplan($svc_broadband, $rateplan_name) unless $existing_rateplan;
- $self->api_modify_rateplan($svc_broadband, $rateplan_name) unless ($self->{'__saisei_error'} || $existing_rateplan);
+ $self->api_create_rateplan($svc_broadband, $rateplan_name) unless $existing_rateplan->{collection};
+ $self->api_modify_rateplan($svc_broadband, $rateplan_name) unless ($self->{'__saisei_error'} || $existing_rateplan->{collection});
return $self->api_error if $self->{'__saisei_error'};
# set rateplan to existing one or newly created one.
- my $rateplan = $existing_rateplan ? $existing_rateplan : $self->api_get_rateplan($rateplan_name);
+ my $rateplan = $existing_rateplan->{collection} ? $existing_rateplan : $self->api_get_rateplan($rateplan_name);
my $username = $svc_broadband->{Hash}->{svcnum};
my $description = $svc_broadband->{Hash}->{description};
@@ -1012,7 +1012,7 @@ sub get_svc_location {
'addl_from' => 'LEFT JOIN cust_location USING (locationnum)',
'hashref' => { 'pkgnum' => $svc->{Hash}->{pkgnum} },
});
- $svc_location = $pkg_location->{Hash}->{latitude}.','.$pkg_location->{Hash}->{longitude} if ($pkg_location);
+ $svc_location = $pkg_location->{Hash}->{latitude}.','.$pkg_location->{Hash}->{longitude} if ($pkg_location->{Hash}->{latitude} && $pkg_location->{Hash}->{longitude});
}
return $svc_location;
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_export/saisei.pm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list