Fix minor delivery bug
This commit is contained in:
parent
6632f5ed75
commit
d36f2dd4ac
1 changed files with 6 additions and 8 deletions
|
@ -5,21 +5,19 @@
|
|||
|
||||
$('#stock_changes tr').removeClass('success');
|
||||
|
||||
var quantity = w.prompt('<%= j(t('.how_many_units', :unit => @stock_change.stock_article.unit, :name => @stock_change.stock_article.name)) %>');
|
||||
if(null === quantity) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var stock_change = $(
|
||||
'<%= j(render(:partial => 'stock_change', :locals => {:stock_change => @stock_change})) %>'
|
||||
).addClass('success');
|
||||
enablePriceTooltips(stock_change);
|
||||
$('input.stock-change-quantity', stock_change).val(quantity);
|
||||
|
||||
$('#stock_changes').append(stock_change);
|
||||
mark_article_for_delivery(<%= @stock_change.stock_article.id %>);
|
||||
updateSort('#stock_changes');
|
||||
|
||||
var quantity = w.prompt('<%= j(t('.how_many_units', :unit => @stock_change.stock_article.unit, :name => @stock_change.stock_article.name)) %>'); <%# how to properly escape here? %>
|
||||
if(null === quantity) {
|
||||
stock_change.remove();
|
||||
mark_article_for_delivery(<%= @stock_change.stock_article.id %>);
|
||||
return false;
|
||||
}
|
||||
$('input.stock-change-quantity', stock_change).val(quantity);
|
||||
|
||||
})(window);
|
||||
|
|
Loading…
Reference in a new issue