diff options
author | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
commit | c82d349f864e6bd9f96fd1156903bc1f7193a203 (patch) | |
tree | e117a87533656110b6acd56fc0ca64289892a9f5 /httemplate/edit/process/cust_pkg_detail.html | |
parent | 74e058c8a010ef6feb539248a550d0bb169c1e94 (diff) |
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'httemplate/edit/process/cust_pkg_detail.html')
-rw-r--r-- | httemplate/edit/process/cust_pkg_detail.html | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/httemplate/edit/process/cust_pkg_detail.html b/httemplate/edit/process/cust_pkg_detail.html deleted file mode 100644 index 132ff63c5..000000000 --- a/httemplate/edit/process/cust_pkg_detail.html +++ /dev/null @@ -1,59 +0,0 @@ -% if ( $error ) { -<% header('Error') %> -<FONT COLOR="#ff0000"><B><% $error |h %></B></FONT><BR><BR> -<CENTER><INPUT TYPE="BUTTON" VALUE="OK" onClick="parent.cClick()"></CENTER> -</BODY></HTML> -% } else { -<% header($action) %> - <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); - </SCRIPT> - </BODY></HTML> -% } -<%init> - -my %access_right = ( - 'I' => 'Edit customer package invoice details', - 'C' => 'Edit customer package comments', -); - -my %name = ( - 'I' => 'invoice details', - 'C' => 'package comments', -); - -my $curuser = $FS::CurrentUser::CurrentUser; - -$cgi->param('detailtype') =~ /^(\w)$/ or die 'illegal detailtype'; -my $detailtype = $1; - -my $right = $access_right{$detailtype}; -die "access denied" - unless $curuser->access_right($right); - -$cgi->param('pkgnum') =~ /^(\d+)$/ or die 'illegal pkgnum'; -my $pkgnum = $1; - -my $cust_pkg = qsearchs({ - 'table' => 'cust_pkg', - 'addl_from' => 'LEFT JOIN cust_main USING ( custnum )', - 'hashref' => { 'pkgnum' => $pkgnum }, - 'extra_sql' => ' AND '. $curuser->agentnums_sql, -}); - - -my @orig_details = $cust_pkg->cust_pkg_detail($detailtype); - -my $action = ucfirst($name{$detailtype}). - ( scalar(@orig_details) ? ' changed ' : ' added ' ); - -my $param = $cgi->Vars; -my @details = (); -for ( my $row = 0; exists($param->{"detail$row"}); $row++ ) { - push @details, $param->{"detail$row"} - if $param->{"detail$row"} =~ /\S/; -} - -my $error = $cust_pkg->set_cust_pkg_detail($detailtype, @details); - -</%init> |