2013-02-13 01:18:50 +01:00
|
|
|
- title t('.title')
|
2019-05-14 16:24:41 +02:00
|
|
|
- content_for :javascript do
|
|
|
|
:javascript
|
|
|
|
$(function() {
|
|
|
|
// Subscribe to database changes.
|
|
|
|
// See publish/subscribe design pattern in /doc.
|
|
|
|
$(document).on('StockArticle#create', function(e) {
|
|
|
|
$.ajax({
|
|
|
|
url: '#{new_on_stock_article_create_stock_takings_path}',
|
|
|
|
type: 'get',
|
|
|
|
data: {stock_article_id: e.stock_article_id},
|
|
|
|
contentType: 'application/json; charset=UTF-8'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
2009-02-12 18:32:20 +01:00
|
|
|
|
2012-10-29 18:28:17 +01:00
|
|
|
- content_for :sidebar do
|
|
|
|
%p
|
2013-02-13 01:18:50 +01:00
|
|
|
%i= t('.text_deviations', inv_link: link_to(t('.temp_inventory'), stock_articles_path)).html_safe
|
2019-05-14 16:24:41 +02:00
|
|
|
%p= t('.text_need_articles', create_link: link_to(t('.create'), new_stock_article_path, :remote => true)).html_safe
|
2012-10-29 18:28:17 +01:00
|
|
|
|
|
|
|
= simple_form_for(@stock_taking) do |f|
|
|
|
|
= f.input :date, as: :date_picker
|
2013-09-20 22:40:13 +02:00
|
|
|
= f.input :note, :input_html => {:size => "28x7", :value => "#{show_user @current_user, unique: true}: ..."}
|
2013-02-13 01:18:50 +01:00
|
|
|
%h2= t '.stock_articles'
|
2012-10-29 18:28:17 +01:00
|
|
|
|
|
|
|
#stock_changes
|
|
|
|
= render :partial => 'stock_change', :collection => @stock_taking.stock_changes
|
|
|
|
.form-actions
|
|
|
|
= f.submit class: 'btn'
|
2013-09-10 10:27:13 +02:00
|
|
|
= link_to t('ui.or_cancel'), stock_takings_path
|