From eef6396de36c528b51e935d6adc9ba9b0fcc4c04 Mon Sep 17 00:00:00 2001 From: Bryan Mutai Date: Mon, 28 Sep 2020 18:22:09 +0300 Subject: [PATCH] Add max attribute to item counter input --- app/views/spree/admin/orders/_shipment_manifest.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/admin/orders/_shipment_manifest.html.haml b/app/views/spree/admin/orders/_shipment_manifest.html.haml index 2706d1bfd6..f468b5cad6 100644 --- a/app/views/spree/admin/orders/_shipment_manifest.html.haml +++ b/app/views/spree/admin/orders/_shipment_manifest.html.haml @@ -14,7 +14,7 @@ = "#{count} x #{t(state.humanize.downcase, scope: [:spree, :shipment_states], default: [:missing, "none"])}" - unless shipment.shipped? %td.item-qty-edit.hidden - = number_field_tag :quantity, item.quantity, :min => 0, :class => "line_item_quantity", :size => 5 + = number_field_tag :quantity, item.quantity, :min => 0, :class => "line_item_quantity", :max => item.variant.on_hand %td.item-total.align-center = line_item_shipment_price(line_item, item.quantity)