diff options
Diffstat (limited to 'httemplate/edit/elements/svc_Common.html')
-rw-r--r-- | httemplate/edit/elements/svc_Common.html | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/httemplate/edit/elements/svc_Common.html b/httemplate/edit/elements/svc_Common.html index 72abcba1f..b6737c14a 100644 --- a/httemplate/edit/elements/svc_Common.html +++ b/httemplate/edit/elements/svc_Common.html @@ -13,7 +13,7 @@ % $pkgnum = $1; % $cgi->param('svcpart') =~ /^(\d+)$/ or die 'unparsable svcpart'; % $svcpart = $1; -% $cgi->delete_all(); #so edit.html treats this correctly as new?? +% #$cgi->delete_all(); #so edit.html treats this correctly as new?? % } % <% include( 'edit.html', @@ -63,7 +63,7 @@ }, 'field_callback' => sub { - my $f = shift; + my ($cgi, $object, $f) = @_; my $columndef = $part_svc->part_svc_column($f->{'field'}); my $flag = $columndef->columnflag; if ( $flag eq 'F' ) { @@ -72,6 +72,23 @@ } }, + 'html_init' => sub { + my $cust_main; + if ( $pkgnum ) { + my $cust_pkg = qsearchs('cust_pkg', {'pkgnum' => $pkgnum}); + $cust_main = $cust_pkg->cust_main if $cust_pkg; + } + $cust_main + ? include( '/elements/small_custview.html', + $cust_main, + '', + 1, + popurl(2). "view/cust_main.cgi" + ). '<BR>' + : ''; + + }, + 'html_table_bottom' => sub { my $svc_x = shift; my $html = ''; |