X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fedit%2Fprocess%2Felements%2Fprocess.html;h=c197eb123cbac5b5d2e8c25771f0922daec0bc58;hb=25efd7207d9ea9be4bea1093917c0d8dc4b1e87a;hp=76722c960f29e17f7ee2446bfd2d513aabe8d0a8;hpb=4b05b20576ddb14577d59c87c8257c6804449410;p=freeside.git diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index 76722c960..c197eb123 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -89,6 +89,9 @@ Example: # for use with tables that are FS::option_Common (among other things) 'args_callback' => sub { my( $cgi, $object ) = @_; }, + # if no errors after package insert or replace will update services attached to package. + 'update_svc' => sub { my( $cgi, $object ) = @_; }, + 'debug' => 1, #turns on debugging output #agent virtualization @@ -438,6 +441,12 @@ foreach my $value ( @values ) { } } + if ( !$error and $opt{'update_svc'} ) { + my @args = (); + @args = &{ $opt{'args_callback'} }( $cgi, $new ) if $opt{'args_callback'}; + $error = &{ $opt{'update_svc'} }( $cgi, $new, @args ); + } + if ( $error ) { $cgi->param('error', $error); @@ -459,6 +468,14 @@ foreach my $value ( @values ) { } +if ($class eq "FS::tower") { + foreach my $part_svc_broadband_export ( FS::tower_sector->part_export_svc_broadband ) { + if ($part_svc_broadband_export and $part_svc_broadband_export->can('export_tower_sector')) { + $error = $part_svc_broadband_export->export_tower_sector($new); + } + } +} + # set up redirect URLs my $redirect;