diff options
| author | Christopher Burger <burgerc@freeside.biz> | 2019-04-24 10:26:01 -0400 |
|---|---|---|
| committer | Christopher Burger <burgerc@freeside.biz> | 2019-04-24 10:28:39 -0400 |
| commit | ac155162693c27f9f26382358c302f548f381d5e (patch) | |
| tree | 485baf0b6e138f718e29af0a1a1756481bfa66e5 | |
| parent | c04ccc32b86d5a05afcb24a6081c4b068d315d40 (diff) | |
RT# 83203 - made Tower/Sector, speed_up, speed_down required
| -rw-r--r-- | FS/FS/part_export/saisei.pm | 5 | ||||
| -rw-r--r-- | FS/FS/part_svc.pm | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/FS/FS/part_export/saisei.pm b/FS/FS/part_export/saisei.pm index a28be6f0c..ba6bc622f 100644 --- a/FS/FS/part_export/saisei.pm +++ b/FS/FS/part_export/saisei.pm @@ -868,6 +868,11 @@ sub require_tower_and_sector { 1; } +sub required_fields { + my @fields = ('svc_broadband__ip_addr_required', 'svc_broadband__speed_up_required', 'svc_broadband__speed_down_required', 'svc_broadband__sectornum_required'); + return @fields; +} + sub process_virtual_ap { my ($self, $opt) = @_; diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm index a80c195c8..387157346 100644 --- a/FS/FS/part_svc.pm +++ b/FS/FS/part_svc.pm @@ -899,6 +899,18 @@ sub process { $exportnums{$exportnum} = $role; } } + + ## make sure export required fields are marked required. + my @required_fields; + foreach (keys %exportnums) { + my $export = qsearchs('part_export', { 'exportnum' => $_ }) + if $exportnums{$_}; + if ($export) { + push @required_fields, $export->required_fields if $export->can('required_fields'); + } + } + foreach (@required_fields) { $new->set($_, 'Y'); } + my $error; if ( $param->{'svcpart'} ) { $error = $new->replace( $old, |
