projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NENA2 export: supply a default value for class of service, #14049
[freeside.git]
/
FS
/
FS
/
part_export
/
nena2.pm
diff --git
a/FS/FS/part_export/nena2.pm
b/FS/FS/part_export/nena2.pm
index
4d3f08f
..
8d59425
100644
(file)
--- a/
FS/FS/part_export/nena2.pm
+++ b/
FS/FS/part_export/nena2.pm
@@
-263,6
+263,15
@@
sub data {
# customer name and class
$hash{customer_name} = $svc->phone_name_or_cust;
$hash{class_of_service} = $svc->e911_class;
# customer name and class
$hash{customer_name} = $svc->phone_name_or_cust;
$hash{class_of_service} = $svc->e911_class;
+ if (!$hash{class_of_service}) {
+ # then guess
+ my $cust_main = $svc->cust_main;
+ if ($cust_main->company) {
+ $hash{class_of_service} = '2';
+ } else {
+ $hash{class_of_service} = '1';
+ }
+ }
$hash{type_of_service} = $svc->e911_type || '0';
$hash{exchange} = '';
$hash{type_of_service} = $svc->e911_type || '0';
$hash{exchange} = '';