From 17856ff5c299e4db21da28116f2666655c03f2c7 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 5 Feb 2007 12:51:05 +0000 Subject: [PATCH] C is for Cookie^WControl --- FS/FS/AccessRight.pm | 25 +++-- httemplate/view/cust_bill-logo.cgi | 34 ++++--- httemplate/view/cust_bill-pdf.cgi | 44 ++++---- httemplate/view/cust_bill-ps.cgi | 36 ++++--- httemplate/view/cust_bill.cgi | 68 +++++++------ httemplate/view/cust_main.cgi | 46 +++++---- httemplate/view/cust_main/contacts.html | 2 +- httemplate/view/cust_pkg.cgi | 166 ------------------------------- httemplate/view/elements/svc_Common.html | 84 +++++++++------- httemplate/view/svc_Common.html | 12 +-- httemplate/view/svc_acct.cgi | 94 +++++++++-------- httemplate/view/svc_broadband.cgi | 134 +++++++++++++------------ httemplate/view/svc_domain.cgi | 82 ++++++++------- httemplate/view/svc_external.cgi | 65 ++++++------ httemplate/view/svc_forward.cgi | 15 ++- httemplate/view/svc_www.cgi | 16 ++- 16 files changed, 433 insertions(+), 490 deletions(-) delete mode 100755 httemplate/view/cust_pkg.cgi diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm index cc0bf7ff6..5194bd4d9 100644 --- a/FS/FS/AccessRight.pm +++ b/FS/FS/AccessRight.pm @@ -92,12 +92,13 @@ assigned to users and/or groups. 'Cancel customer', 'Complimentary customer', #aka users-allow_comp 'Delete customer', #aka. deletecustomers #Enable customer deletions. Be very careful! Deleting a customer will remove all traces that this customer ever existed! It should probably only be used when auditing a legacy database. Normally, you cancel all of a customers' packages if they cancel service. - 'Add customer note', - 'Edit customer note', + 'Add customer note', #NEW + 'Edit customer note', #NEW ### # customer package rights ### + 'View customer packages', #NEW 'Order customer package', 'One-time charge', 'Change customer package', @@ -108,15 +109,16 @@ assigned to users and/or groups. 'Unsuspend customer package', 'Cancel customer package immediately', 'Cancel customer package later', - 'Add on-the-fly cancel reason', - 'Add on-the-fly suspend reason', + 'Add on-the-fly cancel reason', #NEW + 'Add on-the-fly suspend reason', #NEW ### # customer service rights ### - 'Edit usage', + 'Edit usage', #NEW + 'View customer services', #NEW 'Provision customer service', - 'Recharge customer service', + 'Recharge customer service', #NEW 'Unprovision customer service', 'View/link unlinked services', #not agent-virtualizable without more work @@ -126,6 +128,7 @@ assigned to users and/or groups. ### 'View invoices', 'View customer tax exemptions', #yow + 'View customer batched payments', #NEW ### # customer payment rights @@ -138,7 +141,7 @@ assigned to users and/or groups. 'Delete payment', #aka. deletepayments - Enable deletion of unclosed payments. Be very careful! Only delete payments that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted. - 'Delete refund', + 'Delete refund', #NEW ### # customer credit rights @@ -160,7 +163,7 @@ assigned to users and/or groups. # report/listing rights... ### 'List customers', - 'List zip codes', + 'List zip codes', #NEW 'List invoices', 'List packages', 'List services', @@ -173,15 +176,15 @@ assigned to users and/or groups. # misc rights ### 'Job queue', # these are not currently agent-virtualized - 'Process batches', # - 'Reprocess batches', # + 'Process batches', # NEW + 'Reprocess batches', # NEW 'Import', # 'Export', # ### # misc misc rights ### - 'Raw SQL', + 'Raw SQL', #NEW ### # setup/config rights diff --git a/httemplate/view/cust_bill-logo.cgi b/httemplate/view/cust_bill-logo.cgi index fd6a81a75..e2f810c3f 100755 --- a/httemplate/view/cust_bill-logo.cgi +++ b/httemplate/view/cust_bill-logo.cgi @@ -1,16 +1,20 @@ -% -% -%my $conf = new FS::Conf; -% -%my($query) = $cgi->keywords; -%$query =~ /^([^\.\/]*)$/; -%my $templatename = $1; -%if ( $templatename && $conf->exists("logo_$templatename.png") ) { -% $templatename = "_$templatename"; -%} else { -% $templatename = ''; -%} -% -%http_header('Content-Type' => 'image/png' ); -% <% $conf->config_binary("logo$templatename.png") %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('View invoices'); + +my $conf = new FS::Conf; + +my($query) = $cgi->keywords; +$query =~ /^([^\.\/]*)$/; +my $templatename = $1; +if ( $templatename && $conf->exists("logo_$templatename.png") ) { + $templatename = "_$templatename"; +} else { + $templatename = ''; +} + +http_header('Content-Type' => 'image/png' ); + + diff --git a/httemplate/view/cust_bill-pdf.cgi b/httemplate/view/cust_bill-pdf.cgi index 06bb965eb..f09e1b74d 100755 --- a/httemplate/view/cust_bill-pdf.cgi +++ b/httemplate/view/cust_bill-pdf.cgi @@ -1,18 +1,28 @@ -% -% -%#untaint invnum -%my($query) = $cgi->keywords; -%$query =~ /^((.+)-)?(\d+)(.pdf)?$/; -%my $templatename = $2; -%my $invnum = $3; -% -%my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); -%die "Invoice #$invnum not found!" unless $cust_bill; -% -%my $pdf = $cust_bill->print_pdf( '', $templatename); -% -%http_header('Content-Type' => 'application/pdf' ); -%http_header('Content-Length' => length($pdf) ); -%http_header('Cache-control' => 'max-age=60' ); -% <% $pdf %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('View invoices'); + +#untaint invnum +my($query) = $cgi->keywords; +$query =~ /^((.+)-)?(\d+)(.pdf)?$/; +my $templatename = $2; +my $invnum = $3; + +my $cust_bill = qsearchs({ + 'select' => 'cust_bill.*', + 'table' => 'cust_bill', + 'addl_from' => 'LEFT JOIN cust_main USING ( custnum )', + 'hashref' => { 'invnum' => $invnum }, + 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, +}); +die "Invoice #$invnum not found!" unless $cust_bill; + +my $pdf = $cust_bill->print_pdf( '', $templatename); + +http_header('Content-Type' => 'application/pdf' ); +http_header('Content-Length' => length($pdf) ); +http_header('Cache-control' => 'max-age=60' ); + + diff --git a/httemplate/view/cust_bill-ps.cgi b/httemplate/view/cust_bill-ps.cgi index f838e1b17..5313dbf02 100755 --- a/httemplate/view/cust_bill-ps.cgi +++ b/httemplate/view/cust_bill-ps.cgi @@ -1,14 +1,24 @@ -% -% -%#untaint invnum -%my($query) = $cgi->keywords; -%$query =~ /^((.+)-)?(\d+)$/; -%my $templatename = $2; -%my $invnum = $3; -% -%my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); -%die "Invoice #$invnum not found!" unless $cust_bill; -% -%http_header('Content-Type' => 'application/postscript' ); -% <% $cust_bill->print_ps( '', $templatename) %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('View invoices'); + +#untaint invnum +my($query) = $cgi->keywords; +$query =~ /^((.+)-)?(\d+)$/; +my $templatename = $2; +my $invnum = $3; + +my $cust_bill = qsearchs({ + 'select' => 'cust_bill.*', + 'table' => 'cust_bill', + 'addl_from' => 'LEFT JOIN cust_main USING ( custnum )', + 'hashref' => { 'invnum' => $invnum }, + 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, +}); +die "Invoice #$invnum not found!" unless $cust_bill; + +http_header('Content-Type' => 'application/postscript' ); + + diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 3772e8dd0..42e1e6177 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -1,40 +1,14 @@ -% -% -%#untaint invnum -%my($query) = $cgi->keywords; -%$query =~ /^((.+)-)?(\d+)$/; -%my $templatename = $2; -%my $invnum = $3; -% -%my $conf = new FS::Conf; -% -%my @payby = grep /\w/, $conf->config('payby'); -%#@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP )) -%@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP )) -% unless @payby; -%my %payby = map { $_=>1 } @payby; -% -%my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); -%die "Invoice #$invnum not found!" unless $cust_bill; -%my $custnum = $cust_bill->getfield('custnum'); -% -%#my $printed = $cust_bill->printed; -% -%my $link = $templatename ? "$templatename-$invnum" : $invnum; -% -% - <% include("/elements/header.html",'Invoice View', menubar( "Main Menu" => $p, "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", )) %> + + % if ( $cust_bill->owed > 0 % && ( $payby{'BILL'} || $payby{'CASH'} || $payby{'WEST'} || $payby{'MCRD'} ) % ) % { % my $s = 0; -% - Post % if ( $payby{'BILL'} ) { @@ -151,5 +125,41 @@
<% join('', $cust_bill->print_text('', $templatename) ) %>
% } +<% include('/elements/footer.html') %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('View invoices'); + +#untaint invnum +my($query) = $cgi->keywords; +$query =~ /^((.+)-)?(\d+)$/; +my $templatename = $2; +my $invnum = $3; + +my $conf = new FS::Conf; + +my @payby = grep /\w/, $conf->config('payby'); +#@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP )) +@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP )) + unless @payby; +my %payby = map { $_=>1 } @payby; + +my $cust_bill = qsearchs({ + 'select' => 'cust_bill.*', + 'table' => 'cust_bill', + 'addl_from' => 'LEFT JOIN cust_main USING ( custnum )', + 'hashref' => { 'invnum' => $invnum }, + 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, +}); +die "Invoice #$invnum not found!" unless $cust_bill; + +my $custnum = $cust_bill->custnum; + +#my $printed = $cust_bill->printed; + +my $link = $templatename ? "$templatename-$invnum" : $invnum; + + + - diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 20e8201e6..850b48b27 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -1,27 +1,9 @@ -% -% -%my $conf = new FS::Conf; -% -%my $curuser = $FS::CurrentUser::CurrentUser; -% -%die "No customer specified (bad URL)!" unless $cgi->keywords; -%my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array -%$query =~ /^(\d+)$/; -%my $custnum = $1; -%my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); -%die "Customer not found!" unless $cust_main; -% -% - - <% include("/elements/header.html","Customer View: ". $cust_main->name ) %> -% if ( $curuser->access_right('Edit customer') ) { +% if ( $curuser->access_right('Edit customer') ) { Edit this customer | % } - - @@ -155,11 +137,35 @@ Comments

+ +% #XXX enable me# if ( $curuser->access_right('View customer packages') { <% include('cust_main/packages.html', $cust_main ) %> -% if ( $conf->config('payby-default') ne 'HIDE' ) { +% #} +% if ( $conf->config('payby-default') ne 'HIDE' ) { <% include('cust_main/payment_history.html', $cust_main ) %> % } <% include('/elements/footer.html') %> +<%init> + +my $curuser = $FS::CurrentUser::CurrentUser; + +die "access denied" + unless $curuser->access_right('View customer'); + +my $conf = new FS::Conf; + +die "No customer specified (bad URL)!" unless $cgi->keywords; +my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array +$query =~ /^(\d+)$/; +my $custnum = $1; +my $cust_main = qsearchs({ + 'table' => 'cust_main', + 'hashref' => {'custnum'=>$custnum}, + 'extra_sql' => ' AND '. $curuser->agentnums_sql, +}); +die "Customer not found!" unless $cust_main; + + diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html index 3b86533a6..d5788c9a4 100644 --- a/httemplate/view/cust_main/contacts.html +++ b/httemplate/view/cust_main/contacts.html @@ -36,7 +36,7 @@ City <% $cust_main->get("${pre}city") %> -% if ( $cust_main->get("${pre}county" ) ) { +% if ( $cust_main->get("${pre}county") ) { County <% $cust_main->get("${pre}county") %> % } diff --git a/httemplate/view/cust_pkg.cgi b/httemplate/view/cust_pkg.cgi deleted file mode 100755 index 78b42f127..000000000 --- a/httemplate/view/cust_pkg.cgi +++ /dev/null @@ -1,166 +0,0 @@ - -% -% -%my $conf = new FS::Conf; -% -%my %uiview = (); -%my %uiadd = (); -%foreach my $part_svc ( qsearch('part_svc',{}) ) { -% $uiview{$part_svc->svcpart} = popurl(2). "view/". $part_svc->svcdb . ".cgi"; -% $uiadd{$part_svc->svcpart}= popurl(2). "edit/". $part_svc->svcdb . ".cgi"; -%} -% -%my ($query) = $cgi->keywords; -%$query =~ /^(\d+)$/; -%my $pkgnum = $1; -% -%#get package record -%my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -%die "No package!" unless $cust_pkg; -%my $part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')}); -% -%my $custnum = $cust_pkg->getfield('custnum'); -%print header('Package View', menubar( -% "View this customer (#$custnum)" => popurl(2). "view/cust_main.cgi?$custnum", -% 'Main Menu' => popurl(2) -%)); -% -%#print info -%my ($susp,$cancel,$expire)=( -% $cust_pkg->getfield('susp'), -% $cust_pkg->getfield('cancel'), -% $cust_pkg->getfield('expire'), -%); -%my($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment')); -%my($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill')); -%my $otaker = $cust_pkg->getfield('otaker'); -% -%print < -%function areyousure(href) { -% if (confirm("Permanently delete included services and cancel this package?") == true) -% window.location.href = href; -%} -% -%END -% -%print "Package information"; -%print ' (unsuspend)' -% if ( $susp && ! $cancel ); -% -%print ' (suspend)' -% unless ( $susp || $cancel ); -% -%print ' (cancel)' -% unless $cancel; -% -%print ' (edit dates)'; -% -%print &ntable("#cccccc"), '', &ntable("#cccccc",2), -% 'Package number', -% $pkgnum, '', -% 'Package', -% $pkg, '', -% 'Comment', -% $comment, '', -% 'Setup date', -% ( $setup ? time2str("%D",$setup) : "(Not setup)" ), ''; -% -%print 'Last bill date', -% ( $cust_pkg->get('last_bill') ? time2str("%D",$cust_pkg->get('last_bill')) : " " ), -% '' -% if $cust_pkg->dbdef_table->column('last_bill'); -% -%print 'Next bill date', -% ( $bill ? time2str("%D",$bill) : " " ), ''; -% -%print 'Suspension date', -% time2str("%D",$susp), '' if $susp; -%print 'Expiration date', -% time2str("%D",$expire), '' if $expire; -%print 'Cancellation date', -% time2str("%D",$cancel), '' if $cancel; -%print 'Order taker', -% $otaker, '', -% ''; -% -%unless ($expire) { -% print < -% -%Expire (date): -% -%END -%} -% -%unless ($cancel) { -% -% #services -% print '
Service Information', &table(); -% -% #list of services this pkgpart includes -% my $pkg_svc; -% my %pkg_svc; -% #foreach $pkg_svc ( qsearch('pkg_svc',{'pkgpart'=> $cust_pkg->pkgpart }) ) { -% foreach $pkg_svc ( $cust_pkg->part_pkg->pkg_svc ) { -% $pkg_svc{$pkg_svc->svcpart} = $pkg_svc->quantity if $pkg_svc->quantity; -% } -% -% #list of records from cust_svc -% my $svcpart; -% foreach $svcpart (sort {$a <=> $b} keys %pkg_svc) { -% -% my($svc)=qsearchs('part_svc',{'svcpart'=>$svcpart})->getfield('svc'); -% -% my(@cust_svc)=qsearch('cust_svc',{'pkgnum'=>$pkgnum, -% 'svcpart'=>$svcpart, -% }); -% -% my($enum); -% for $enum ( 1 .. $pkg_svc{$svcpart} ) { -% -% my($cust_svc); -% if ( $cust_svc=shift @cust_svc ) { -% my($svcnum)=$cust_svc->svcnum; -% my($label, $value, $svcdb) = $cust_svc->label; -% print <(View/Edit) $svc: $value -%END -% } else { -% print qq!!. -% qq!!. -% qq!(Provision) $svc!; -% -% print qq! or !. -% qq!(Link to legacy) $svc! -% if $conf->exists('legacy_link'); -% -% print ''; -% } -% -% } -% warn "WARNING: Leftover services pkgnum $pkgnum!" if @cust_svc;; -% } -% -% print "", -% "Choose (View/Edit) to view or edit an existing service
", -% "Choose (Provision) to setup a new service
"; -% -% print "Choose (Link to legacy) to link to a legacy (pre-Freeside) service" -% if $conf->exists('legacy_link'); -% -% print "
"; -%} -% -%#formatting -%print < -% -%END -% -% - diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html index 92eef2dad..f5b65ac49 100644 --- a/httemplate/view/elements/svc_Common.html +++ b/httemplate/view/elements/svc_Common.html @@ -1,5 +1,3 @@ -% -% % # options example... % # % # 'table' => 'svc_something' @@ -16,40 +14,6 @@ % # # defaults to "edit/$table.cgi?", will have svcnum appended % # 'edit_url' => % -% my(%opt) = @_; -% -% my $table = $opt{'table'}; -% -% my $fields = $opt{'fields'} -% #|| [ grep { $_ ne 'svcnum' } dbdef->table($table)->columns ]; -% || [ grep { $_ ne 'svcnum' } fields($table) ]; -% -% my $svcnum; -% if ( $cgi->param('svcnum') ) { -% $cgi->param('svcnum') =~ /^(\d+)$/ or die "unparsable svcnum"; -% $svcnum = $1; -% } else { -% my($query) = $cgi->keywords; -% $query =~ /^(\d+)$/ or die "no svcnum"; -% $svcnum = $1; -% } -% my $svc_x = qsearchs( $opt{'table'}, { 'svcnum' => $svcnum } ) -% or die "Unknown svcnum $svcnum in ". $opt{'table'}. " table\n"; -% -% my $cust_svc = $svc_x->cust_svc; -% my($label, $value, $svcdb) = $cust_svc->label; -% -% my $pkgnum = $cust_svc->pkgnum; -% -% my($cust_pkg, $custnum); -% if ($pkgnum) { -% $cust_pkg = $cust_svc->cust_pkg; -% $custnum = $cust_pkg->custnum; -% } else { -% $cust_pkg = ''; -% $custnum = ''; -% } -% % % if ( $custnum ) { @@ -123,3 +87,51 @@ Service #<% $svcnum %> <% joblisting({'svcnum'=>$svcnum}, 1) %> <% include('/elements/footer.html') %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('View customer services') + || $FS::CurrentUser::CurrentUser->access_right('View customer'); #XXX remove me + +my(%opt) = @_; + +my $table = $opt{'table'}; + +my $fields = $opt{'fields'} + #|| [ grep { $_ ne 'svcnum' } dbdef->table($table)->columns ]; + || [ grep { $_ ne 'svcnum' } fields($table) ]; + +my $svcnum; +if ( $cgi->param('svcnum') ) { + $cgi->param('svcnum') =~ /^(\d+)$/ or die "unparsable svcnum"; + $svcnum = $1; +} else { + my($query) = $cgi->keywords; + $query =~ /^(\d+)$/ or die "no svcnum"; + $svcnum = $1; +} +my $svc_x = qsearchs({ + 'select' => $opt{'table'}.'.*', + 'table' => $opt{'table'}, + 'addl_from' => ' LEFT JOIN cust_svc USING ( svcnum ) '. + ' LEFT JOIN cust_pkg USING ( pkgnum ) '. + ' LEFT JOIN cust_main USING ( custnum ) ', + 'hashref' => { 'svcnum' => $svcnum }, + 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, +}) or die "Unknown svcnum $svcnum in ". $opt{'table'}. " table\n"; + +my $cust_svc = $svc_x->cust_svc; +my($label, $value, $svcdb) = $cust_svc->label; + +my $pkgnum = $cust_svc->pkgnum; + +my($cust_pkg, $custnum); +if ($pkgnum) { + $cust_pkg = $cust_svc->cust_pkg; + $custnum = $cust_pkg->custnum; +} else { + $cust_pkg = ''; + $custnum = ''; +} + + diff --git a/httemplate/view/svc_Common.html b/httemplate/view/svc_Common.html index bb3a6dd33..defbee974 100644 --- a/httemplate/view/svc_Common.html +++ b/httemplate/view/svc_Common.html @@ -1,3 +1,9 @@ +<% include('elements/svc_Common.html', + 'table' => $table, + 'edit_url' => $p."edit/svc_Common.html?svcdb=$table;svcnum=", + %opt, + ) +%> <%init> # false laziness w/edit/svc_Common.html @@ -21,9 +27,3 @@ if ( UNIVERSAL::can("FS::$table", 'table_info') ) { } -<% include('elements/svc_Common.html', - 'table' => $table, - 'edit_url' => $p."edit/svc_Common.html?svcdb=$table;svcnum=", - %opt, - ) -%> diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index 2bacbcaff..86478681c 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -1,49 +1,11 @@ -% -% -%my $conf = new FS::Conf; -% -%my($query) = $cgi->keywords; -%$query =~ /^(\d+)$/; -%my $svcnum = $1; -%my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum}); -%die "Unknown svcnum" unless $svc_acct; -% -%#false laziness w/all svc_*.cgi -%my $cust_svc = qsearchs( 'cust_svc' , { 'svcnum' => $svcnum } ); -%my $pkgnum = $cust_svc->getfield('pkgnum'); -%my($cust_pkg, $custnum); -%if ($pkgnum) { -% $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } ); -% $custnum = $cust_pkg->custnum; -%} else { -% $cust_pkg = ''; -% $custnum = ''; -%} -%#eofalse -% -%my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ); -%die "Unknown svcpart" unless $part_svc; -%my $svc = $part_svc->svc; -% -%die 'Empty domsvc for svc_acct.svcnum '. $svc_acct->svcnum -% unless $svc_acct->domsvc; -%my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $svc_acct->domsvc } ); -%die 'Unknown domain (domsvc '. $svc_acct->domsvc. -% ' for svc_acct.svcnum '. $svc_acct->svcnum. ')' -% unless $svc_domain; -%my $domain = $svc_domain->domain; -% -% % if ( $custnum ) { - <% include("/elements/header.html","View $svc account") %> - <% include( '/elements/small_custview.html', $custnum, '', 1, "${p}view/cust_main.cgi") %>
-% } else { +% } else {