X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fquick-charge.html;h=d510150541a4f26feda6cf98f71c11ef488b7b8e;hp=2dcbe51699dbd9d2077109574fb178135ce58ff5;hb=1203e278e2ec38fcf1468da2e4f10862004bebeb;hpb=3b54099d7b5532a411bb477006d78844c0597745 diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index 2dcbe5169..d51015054 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -78,18 +78,32 @@ function validate_quick_charge () { - + + + +% 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') ) %> - + + + @@ -114,7 +128,7 @@ function validate_quick_charge () {
Amount:Amount: $
Quantity: + +
Description:
Optional additional description:

-param('error') ? '' :' DISABLED' %>> +param('error') ? '' :' DISABLED' %>> @@ -167,6 +181,8 @@ function validate_quick_charge () { 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; @@ -175,6 +191,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;