my $transfer = SL::DB::Inventory->new_from($stock);
$transfer->trans_type($trans_type);
- push @transfer_requests, $transfer;
+ push @transfer_requests, $transfer if defined $transfer->qty && $transfer->qty != 0;
};
}
$obj->$_($line->{$_}) for qw(bin_id warehouse_id chargenumber qty unit);
$obj->bestbefore_as_date($line->{bestfbefore})
if $line->{bestbefore} && $::instance_conf->get_show_bestbefore;
- push @save, $obj;
+ push @save, $obj if $obj->qty;
}
$item->delivery_order_stock_entries(@save);
let data = [];
$("#stock-in-out-table tr.listrow").each((i,row) => {
+ let qty = kivi.parse_amount($(row).find(".data-qty").val());
+
+ if (qty === 0) return;
+
data.push({
- qty: kivi.parse_amount($(row).find(".data-qty").val()),
+ qty: qty,
warehouse_id: $(row).find(".data-warehouse-id").val(),
bin_id: $(row).find(".data-bin-id").val(),
chargenumber: $(row).find(".data-chargenumber").val(),