X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fquick-charge.html;h=ec1a58046219e1b270f8701e1a1ea9a8d33fee79;hb=2457752a82358108aa078f175a4e866f1786299a;hp=1d9647f2fa14fb8ac3c7ab1d220b701b05d7e597;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;p=freeside.git diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index 1d9647f2f..ec1a58046 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -104,20 +104,97 @@ function bill_now_changed (what) {
<% mt('Amount') |h %> | -- <% $money_char %> - | +% if ( $cust_pkg ) { + + +% my $field = '/elements/tr-input-text.html'; +% # don't allow changing these after the fact +% $field = '/elements/tr-fixed.html' if $billed; +<& $field, + label => mt('Amount to charge'), + field => 'amount', + value => sprintf('%.2f',$part_pkg->option('setup_fee')), + size => 8, + prefix => $money_char, +&> + +% if ( $curuser->access_right('Edit package definition costs') ) { + <& $field, + label => mt('Cost'), + field => 'setup_cost', + value => sprintf('%.2f',$part_pkg->setup_cost), + size => 8, + prefix => $money_char, + &> +% } + +% if ( $conf->exists('invoice-unitprice') ) { +<& $field, + label => 'Quantity', + field => 'quantity', + value => $cust_pkg->quantity +&> +% } + +<& /elements/tr-select-pkg_class.html, 'curr_value' => $classnum &> + +% # crudely estimate whether any agent commission credits might exist +% my @events = grep { $_->part_event->action =~ /credit/ } +% $cust_pkg->cust_event; +% if ( scalar @events ) { +
+ | +<% emt('Adjust commission credits if necessary') %> + |
<% mt('Amount to charge') |h %> | ++ <% $money_char %> + | +
<% mt('Quantity') |h %> | @@ -128,9 +205,9 @@ function bill_now_changed (what) { onKeyPress = "return enable_quick_charge(event)"> |
<% mt('Invoice now') |h %> | @@ -144,9 +221,9 @@ function bill_now_changed (what) { > <% mt('with terms') |h %> <& /elements/select-terms.html, - 'curr_value' => scalar($cgi->param('invoice_terms')), - 'empty_value' => $default_terms, - 'disabled' => ( $cgi->param('bill_now') ? 0 : 1 ), + 'curr_value' => scalar($cgi->param('invoice_terms')), + 'disabled' => ( $cgi->param('bill_now') ? 0 : 1 ), + 'agentnum' => $cust_main->agentnum, &>|
<% mt('Description') |h %> | @@ -227,11 +306,7 @@ function bill_now_changed (what) { |
@@ -239,21 +314,25 @@ function bill_now_changed (what) { NAME = "description<% $row %>" SIZE = "60" MAXLENGTH = "65" - VALUE = "<% $param->{"description$row"} |h %>" + VALUE = "<% $_ |h %>" rownum = "<% $row %>" onKeyPress = "return enable_quick_charge(event)" onKeyUp = "return possiblyAddRow(event)" > |