X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fquick-charge.html;h=de427c18c54da6a652a9840bfd9e8ad6f48218a8;hb=b30d8390c796fc64b92836e2ab2e78b2b00e928e;hp=1d9647f2fa14fb8ac3c7ab1d220b701b05d7e597;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index 1d9647f2f..de427c18c 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -100,24 +100,118 @@ function bill_now_changed (what) { onSubmit = "document.QuickChargeForm.submit.disabled=true; return validate_quick_charge();" > - + + +
<% mt('Amount') |h %> | -- <% $money_char %> - | +% if ( $cust_pkg ) { #modify one-time charge + + +% 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('Tax exempt') |h %> | +param('setuptax') ? 'CHECKED' : '' %>> | +
<% mt('Amount to charge') |h %> | ++ <% $money_char %> + | +
<% mt('Quantity') |h %> | @@ -128,67 +222,77 @@ function bill_now_changed (what) { onKeyPress = "return enable_quick_charge(event)"> |
<% mt('Invoice now') |h %> | -- param('bill_now') ? 'CHECKED' : '' %> - onClick = "bill_now_changed(this);" - onChange = "bill_now_changed(this);" - > - <% 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 ), - &> - | -
<% mt('Charge date') |h %> | -- param('bill_now') - ? 'STYLE = "background-color:#dddddd" DISABLED' - : '' - %> - > - - param('bill_now') ? '' : 'STYLE="display:none"' %> - > - (<% mt('leave blank to charge immediately') |h %>) - | -
<% mt('Invoice now') |h %> | ++ param('bill_now') ? 'CHECKED' : '' %> + onClick = "bill_now_changed(this);" + onChange = "bill_now_changed(this);" + > + <% mt('with terms') |h %> + <& /elements/select-terms.html, + 'curr_value' => scalar($cgi->param('invoice_terms')), + 'disabled' => ( $cgi->param('bill_now') ? 0 : 1 ), + 'agentnum' => $cust_or_prospect->agentnum, + &> + | +
<% mt('Charge date') |h %> | ++ param('bill_now') + ? 'STYLE = "background-color:#dddddd" DISABLED' + : '' + %> + > + + param('bill_now') ? '' : 'STYLE="display:none"' %> + > + (<% mt('leave blank to charge immediately') |h %>) + | +
<% mt("Disable automatic $what charge") |h %> | @@ -207,6 +311,8 @@ function bill_now_changed (what) { <& /elements/tr-select-taxoverride.html, 'onclick' => 'parent.taxoverridemagic(this);', 'curr_value' => $cgi->param('tax_override') &> +% } # if !$cust_pkg +|
<% mt('Description') |h %> | @@ -227,11 +333,7 @@ function bill_now_changed (what) { |
@@ -239,21 +341,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)" > |