<% include("/elements/header-popup.html", 'One-time charge entry', '', ( $cgi->param('error') ? '' : 'onload="addRow()"' ), ) %> <% include('/elements/error.html') %>
% if ( $conf->exists('invoice-unitprice') ) { % } <% include('/elements/tr-select-pkg_class.html', 'curr_value' => $cgi->param('classnum') ) %> <% include('/elements/tr-select-taxclass.html', 'curr_value' => $cgi->param('taxclass') ) %> <% include('/elements/tr-select-taxproduct.html', 'label' => 'Tax product', 'onclick' => 'parent.taxproductmagic(this);', 'curr_value' => $cgi->param('taxproductnum') ) %> <% include('/elements/tr-select-taxoverride.html', 'onclick' => 'parent.taxoverridemagic(this);', 'curr_value' => $cgi->param('tax_override') ) %> % my $row = 0; % if ( $cgi->param('error') || $cgi->param('magic') ) { % my $param = $cgi->Vars; % % for ( $row = 0; exists($param->{"description$row"}); $row++ ) { % } % }
Amount: $
Quantity:
Description:
Optional additional description (also printed on invoice):
" rownum="<% $row %>" onkeyup = "possiblyAddRow;" >

param('error') ? '' :' DISABLED' %>>
<%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('One-time charge'); my $conf = new FS::Conf; $cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum'; my $custnum = $1; my $amount = ''; if ( $cgi->param('amount') =~ /^\s*\$?\s*(\d+(\.\d{1,2})?)\s*$/ ) { $amount = $1; } my $quantity = 1; if ( $cgi->param('quantity') =~ /^\s*(\d+)\s*$/ ) { $quantity = $1; } $cgi->param('pkg') =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]]*)$/ or die 'illegal description'; my $pkg = $1;