tap/app/views/products/stock_entry.html.haml

16 lines
537 B
Text
Raw Normal View History

.row
2015-09-26 12:13:43 +02:00
#stock_entry.col-md-6.col-md-offset-3
= form_for @product do |f|
%table
%tr
%td Current stock
%td= @product.stock
%tr
%td Purchase
%td
2015-09-26 12:13:43 +02:00
%input.form-control.new_stock{ type: :number, autofocus: true, data: { increment: true, target: "#product_stock" }}
%tr
%td New stock
%td= f.number_field :stock, data:{ default: f.object.stock }, class: "form-control"
2015-09-26 12:13:43 +02:00
= f.submit "Update stock", class: "btn btn-primary form-control"