Option to ignore old CDRs, RT#81480
[freeside.git] / httemplate / elements / cust_pkg_usageprice.html
index 7290993..74b7842 100644 (file)
         >
 %         my $info = $part_pkg_usageprice->target_info;
 %         my $amount = $part_pkg_usageprice->amount / ($info->{multiplier}||1);
-          <OPTION VALUE="">Additional <% $info->{label} %>
+          <OPTION VALUE="">Additional <% $info->{label} %></OPTION>
 %         for (1..100) { #100?  arbitrary.
-            <OPTION VALUE="<% $_ %>"><%
+%           my $selected = ($opt{'curr_quantity'} == $_) ? ' SELECTED' : '';
+            <OPTION VALUE="<% $_ %>"<% $selected %>><%
               $money_char. sprintf('%.2f', $_ * $part_pkg_usageprice->price ).
               ' '.
               'for'. #( $part_pkg_usageprice->action eq 'increment' ? 'per' : 'for' ).
               ' '.
               ( $_ * $amount ). ' '. $info->{label}
-            %>
+            %></OPTION>
 %         }
         </SELECT>
       </TD>
@@ -42,8 +43,6 @@
 % }
 <%init>
 
-#my $targets = FS::part_pkg_usageprice->targets;
-
 my( %opt ) = @_;
 
 my $conf = new FS::Conf;