Fix update function

This commit is contained in:
Ludovic Stephan 2017-04-03 11:20:56 -03:00
parent e20ab2f352
commit b113a57b74

View file

@ -110,14 +110,14 @@ $(document).ready(function() {
$line.find('.current_stock').text(old_stock + stock_diff);
$line.find('.stock_diff').text('');
if ($line.find('.stock_new input').val()) {
if ($line.find('.stock_new input').val() && stock_diff) {
var old_misc = +$line.find('.misc input').val();
$line.find('.misc input').val(old_misc + stock_diff)
.trigger('input');
}
var id = $line.find('input[type="hidden"]').val();
conflicts = conflicts.delete(id);
conflicts.delete(parseInt(id));
}
$('.finished input').change(function() {