X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fquick-charge.html;h=bf4c44571cd509d32acd901e548c2caf3c487229;hb=42132c9a86d36d7fefa7ba5f058f764ba6e7ad5b;hp=92e0ae75381dbad5cf7fd099098baa366abf4901;hpb=ea75c42317d8f327d9dbbbf2f6127dc987f60b66;p=freeside.git diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index 92e0ae753..bf4c44571 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -71,31 +71,50 @@ function validate_quick_charge () { -
+ - + -<% include('/elements/tr-select-taxclass.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') ) { +% if ( $cgi->param('error') || $cgi->param('magic') ) { % my $param = $cgi->Vars; % % for ( $row = 0; exists($param->{"description$row"}); $row++ ) { @@ -113,7 +132,7 @@ function validate_quick_charge () {
Amount:Amount: $
Quantity: + +
Description:
Optional additional description:

-param('error') ? '' :' DISABLED' %>> +param('error') ? '' :' DISABLED' %>>
@@ -163,6 +182,11 @@ function validate_quick_charge () { <%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; @@ -171,6 +195,11 @@ 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;