projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
654022f
)
t/wh/inventory.t: Reservierungen entfernt
author
Sven Schöling
<s.schoeling@googlemail.com>
Fri, 16 Oct 2020 12:25:54 +0000
(14:25 +0200)
committer
Sven Schöling
<s.schoeling@googlemail.com>
Fri, 27 Nov 2020 15:27:45 +0000
(16:27 +0100)
t/wh/inventory.t
patch
|
blob
|
history
diff --git
a/t/wh/inventory.t
b/t/wh/inventory.t
index
36fc73b
..
8c5d843
100644
(file)
--- a/
t/wh/inventory.t
+++ b/
t/wh/inventory.t
@@
-6,7
+6,6
@@
use lib 't';
use SL::Dev::Part qw(new_part new_assembly);
use SL::Dev::Inventory qw(create_warehouse_and_bins set_stock);
use SL::Dev::Record qw(create_sales_order);
use SL::Dev::Part qw(new_part new_assembly);
use SL::Dev::Inventory qw(create_warehouse_and_bins set_stock);
use SL::Dev::Record qw(create_sales_order);
-use SL::DB::Helper::Reservation qw(make_reservation);
use_ok 'Support::TestSetup';
use_ok 'SL::DB::Bin';
use_ok 'Support::TestSetup';
use_ok 'SL::DB::Bin';
@@
-58,20
+57,6
@@
WH->transfer({
is(SL::Helper::Inventory::get_stock(part => $assembly1), "60.00000", 'normal get_stock works');
is(SL::Helper::Inventory::get_onhand(part => $assembly1), "60.00000", 'normal get_onhand works');
is(SL::Helper::Inventory::get_stock(part => $assembly1), "60.00000", 'normal get_stock works');
is(SL::Helper::Inventory::get_onhand(part => $assembly1), "60.00000", 'normal get_onhand works');
-# reserve some of it, get_stock, get_onhand
-
-my $order = create_sales_order(save => 1);
-
-make_reservation(
- part => $assembly1,
- bin => $bin1,
- reserve_for => $order,
- qty => 25,
-);
-
-is(WH->get_stock_(part => $assembly1), "60.00000", 'normal get_stock works');
-is(WH->get_onhand_(part => $assembly1), "35.00000", 'normal get_onhand works');
-
# allocate some stuff
my @allocations = SL::Helper::Inventory::allocate(
# allocate some stuff
my @allocations = SL::Helper::Inventory::allocate(
@@
-85,8
+70,6
@@
is_deeply(\%{ $allocations[0] }, {
chargenumber => '',
parts_id => $assembly1->id,
qty => 12,
chargenumber => '',
parts_id => $assembly1->id,
qty => 12,
- reserve_for_id => undef,
- reserve_for_table => undef,
warehouse_id => $wh->id,
comment => undef,
for_object_id => undef,
warehouse_id => $wh->id,
comment => undef,
for_object_id => undef,
@@
-94,8
+77,6
@@
is_deeply(\%{ $allocations[0] }, {
# simple
# simple
-# with reservation
-
# more than exists
# produce something
# more than exists
# produce something