+% if ( $cust_pkg ) {
+
+<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $cust_pkg->pkgnum %>">
+<& /elements/tr-fixed.html,
+ label => 'Amount',
+ field => 'amount',
+ value => $money_char . sprintf('%.2f',$part_pkg->option('setup_fee')),
+&>
+
+% if ( $conf->exists('invoice-unitprice') ) {
+<& /elements/tr-fixed.html,
+ 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 ) {
+<TR><TD></TD>
+ <TD><INPUT TYPE="checkbox" NAME="adjust_commission" VALUE="Y" CHECKED>
+<% emt('Adjust commission credits if necessary') %>
+</TD>
+</TR>
+% }
+
+% #display the future or past charge date, but don't allow changes
+% # XXX we probably _could_ let as-yet unbilled charges be rescheduled, but
+% # there's no compelling need yet
+% if ( $cust_pkg->setup or $cust_pkg->start_date ) {
+% my $label = $cust_pkg->setup ? emt('Billed on') : emt('Will be billed');
+% my $field = $cust_pkg->setup ? 'setup' : 'start_date';
+ <& /elements/tr-fixed-date.html,
+ label => $label,
+ value => $cust_pkg->get($field)
+ &>
+% } # else we don't show anything here
+% } else { # new one-time charge
+
+<TR>
+ <TD ALIGN="right"><% mt('Amount') |h %> </TD>
+ <TD>
+ <% $money_char %><INPUT TYPE = "text"
+ NAME = "amount"
+ SIZE = 6
+ VALUE = "<% $amount %>"
+ onChange = "return enable_quick_charge(event)"
+ onKeyPress = "return enable_quick_charge(event)"
+ >
+ </TD>
+</TR>
+
+% if ( $conf->exists('invoice-unitprice') ) {
+ <TR>
+ <TD ALIGN="right"><% mt('Quantity') |h %> </TD>
+ <TD>
+ <INPUT TYPE = "text"
+ NAME = "quantity"
+ SIZE = 4
+ VALUE = "<% $quantity %>"
+ onKeyPress = "return enable_quick_charge(event)">
+ </TD>
+ </TR>
+% }
+
+<& /elements/tr-select-pkg_class.html, 'curr_value' => $classnum &>
+
+<TR>
+ <TD ALIGN="right"><% mt('Invoice now') |h %></TD>
+ <TD>
+ <INPUT TYPE = "checkbox"
+ NAME = "bill_now"
+ VALUE = "1"
+ <% $cgi->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 ),
+ &>
+ </TD>
+</TR>
+
+%# false laziness w/misc/order_pkg.html