projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Speicherroutine darf nur auf "customer_vendor_edit" testen
[kivitendo-erp.git]
/
SL
/
WH.pm
diff --git
a/SL/WH.pm
b/SL/WH.pm
index
3fbbfa4
..
28e836e
100644
(file)
--- a/
SL/WH.pm
+++ b/
SL/WH.pm
@@
-73,6
+73,8
@@
sub transfer {
return;
};
return;
};
+ my @trans_ids;
+
my $db = SL::DB::Inventory->new->db;
$db->do_transaction(sub{
while (my $transfer = shift @args) {
my $db = SL::DB::Inventory->new->db;
$db->do_transaction(sub{
while (my $transfer = shift @args) {
@@
-109,10
+111,11
@@
sub transfer {
);
if ($unit) {
);
if ($unit) {
- $qty *= $unit->factor;
- $qty /= $part->unit_obj->factor || 1 if $part->unit;
+ $qty = $unit->convert_to($qty, $part->unit_obj);
}
}
+ $params{chargenumber} ||= '';
+
if ($direction & 1) {
SL::DB::Inventory->new(
%params,
if ($direction & 1) {
SL::DB::Inventory->new(
%params,
@@
-130,12
+133,16
@@
sub transfer {
qty => $qty,
)->save;
}
qty => $qty,
)->save;
}
+
+ push @trans_ids, $trans_id;
}
}) or do {
$::form->error("Warehouse transfer error: " . join("\n", (split(/\n/, $db->error))[0..2]));
};
$::lxdebug->leave_sub;
}
}) or do {
$::form->error("Warehouse transfer error: " . join("\n", (split(/\n/, $db->error))[0..2]));
};
$::lxdebug->leave_sub;
+
+ return @trans_ids;
}
sub transfer_assembly {
}
sub transfer_assembly {
@@
-614,6
+621,14
@@
sub get_warehouse_report {
push @filter_vars, '%' . $filter{ean} . '%';
}
push @filter_vars, '%' . $filter{ean} . '%';
}
+ if ($filter{date}) {
+ push @filter_ary, "i.itime <= ?";
+ push @filter_vars, $filter{date};
+ }
+ if (!$filter{include_invalid_warehouses}){
+ push @filter_ary, "NOT (w.invalid)";
+ }
+
# prepare qty comparison for later filtering
my ($f_qty_op, $f_qty, $f_qty_base_unit);
# prepare qty comparison for later filtering
my ($f_qty_op, $f_qty, $f_qty_base_unit);
@@
-1007,6
+1022,8
@@
An expiration date. Note that this is not by default used by C<warehouse_report>
=head1 BUGS
=head1 BUGS
+None yet.
+
=head1 AUTHOR
=cut
=head1 AUTHOR
=cut