<% include('/elements/error.html') %>
-<FORM NAME="DiscountPkgForm" ACTION="<% $p %>edit/process/cust_pkg_discount.html" METHOD=POST>
+<FORM NAME = "DiscountPkgForm"
+ ACTION = "<% $p %>edit/process/cust_pkg_discount.html"
+ METHOD = POST
+ onSubmit = "document.DiscountPkgForm.submit.disabled=true;"
+>
<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
<% ntable('#cccccc') %>
<TR>
- <TH ALIGN="right">Current package </TH>
+ <TH ALIGN="right">Package </TH>
<TD COLSPAN=7>
<% $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '' %><B><% $part_pkg->pkg |h %></B> - <% $part_pkg->comment |h %>
</TD>
<% include('/elements/tr-select-discount.html',
'empty_label' => ( $pkgdiscountnum ? '' : 'Select discount' ),
- 'onchange' => 'enable_discount_pkg',
+ 'onchange' => 'enable_discount_pkg()',
+ 'cgi' => $cgi,
+ 'setup_only' => $setup_only,
)
%>
# " ( pkgnum ". cust_pkg->pkgnum. ")";
my $part_pkg = $cust_pkg->part_pkg;
+my $setup_only = ($part_pkg->freq eq '0') ? 1 : 0;
</%init>