minium qty is 1

This commit is contained in:
2026-03-08 15:48:01 -04:00
parent 42ea5dffc9
commit 449910c941

View File

@@ -15,7 +15,8 @@
<td data-label="<%= t :label_qty %>"> <td data-label="<%= t :label_qty %>">
<%= f.number_field :quantity, <%= f.number_field :quantity,
step: 1, step: 1,
min: 0, min: 1,
value: (f.object.quantity.to_i > 0) ? f.object.quantity : 1,
class: "qty-field", class: "qty-field",
no_label: true, no_label: true,
disabled: readonly %> disabled: readonly %>