1 % if ( scalar(@discount_term) ) {
2 <SELECT NAME="discount_term">
3 <OPTION VALUE="">1 month
4 % foreach my $discount_term (@discount_term) {
5 % my $sel = ( $cgi->param('discount_term') == $discount_term ) ? 'SELECTED' : '';
6 <OPTION <% $sel %> VALUE="<% $discount_term %>"><% $discount_term. " months" %>
14 my $cgi = $opt{'cgi'};
17 if ( $opt{discount_term} ) {
19 @discount_term = @{ $opt{discount_term} };
23 my $custnum = $opt{'custnum'};
25 my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
26 or die "unknown custnum $custnum\n";
28 @discount_term = $cust_main->discount_terms;