tap/app/views/products/stock_entry.html.haml
2015-09-26 12:13:43 +02:00

16 lines
537 B
Plaintext

.row
#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
%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"
= f.submit "Update stock", class: "btn btn-primary form-control"