X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export.pm;h=586a33a372c073c72bc45d81443c3b8ab4c2ac6c;hb=1295a884b51fda6c56ff6b3c4c05c89d93075eee;hp=4b60953cf902e5300620032c55a79127e4ce855d;hpb=7aef2e455fe8a4722036f231ee8609ac63b2a9c9;p=freeside.git diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index 4b60953cf..586a33a37 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -417,6 +417,27 @@ sub weight { export_info()->{$self->exporttype}->{'weight'} || 0; } +=item info + +Returns a reference to (a copy of) the export's %info hash. + +=cut + +sub info { + my $self = shift; + $self->{_info} ||= { + %{ export_info()->{$self->exporttype} } + }; +} + +#default fallbacks... FS::part_export::DID_Common ? +sub get_dids_can_tollfree { 0; } +sub get_dids_can_manual { 0; } +sub get_dids_can_edit { 0; } #don't use without can_manual, otherwise the + # DID selector provisions a new number from + # inventory each edit +sub get_dids_npa_select { 1; } + =back =head1 SUBROUTINES @@ -473,6 +494,12 @@ sub _upgrade_data { #class method $error = $opt->replace; die $error if $error; } + # pass downstream + my %exports_in_use; + $exports_in_use{ref $_} = 1 foreach qsearch('part_export', {}); + foreach (keys(%exports_in_use)) { + $_->_upgrade_exporttype(%opts) if $_->can('_upgrade_exporttype'); + } } #=item exporttype2svcdb EXPORTTYPE