import torrus 1.0.9
[freeside.git] / httemplate / edit / elements / svc_Common.html
index 36950b2..2e27f85 100644 (file)
                    die "No part_svc entry!" unless $part_svc;
 
                    label_fixup($part_svc, $opt);
+                  
+                  if ( my $cb = $opt{'svc_edit_callback'} ) {
+                     my $cust_pkg = $pkgnum
+                                      ? qsearchs('cust_pkg', {pkgnum=>$pkgnum})
+                                      : ''; #?
+                      &{ $cb }( $cgi,$svc_x, $part_svc,$cust_pkg, $fields,$opt);
+                    }
                  },
 
                  'new_hashref_callback' => sub {
@@ -79,6 +86,8 @@
                      $f->{'table'}       = 'inventory_item';
                      $f->{'name_col'}    = 'item'; 
                      $f->{'value_col'}   = 'item'; 
+                     $f->{'agent_virt'}  = 1;
+                     $f->{'agent_null'}  = 1;
                      $f->{'hashref'}     = {
                                             'classnum'=>$columndef->columnvalue,
                                             #'svcnum'  => '',