X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Felements%2Fsvc_Common.html;h=2e27f851d934567d011e2a719fb9a664eb597342;hb=8d534e61d74e561a15f0863a835cda4af639a9ea;hp=1cb1659f4f5a7eaf3016b731932c6c432af7e8ba;hpb=9e570867c27b5336f4fa701c84b70fd65791f87c;p=freeside.git diff --git a/httemplate/edit/elements/svc_Common.html b/httemplate/edit/elements/svc_Common.html index 1cb1659f4..2e27f851d 100644 --- a/httemplate/edit/elements/svc_Common.html +++ b/httemplate/edit/elements/svc_Common.html @@ -29,6 +29,13 @@ 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' => '', @@ -101,6 +110,11 @@ }; } + if ( $f->{'field'} eq 'custnum' && $pkgnum ) { + my $cust_pkg = qsearchs('cust_pkg', {'pkgnum' => $pkgnum}); + $object->set('custnum', $cust_pkg->custnum); + } + }, 'html_init' => sub {