Revision d04df165
Von Thomas Heck vor etwa 12 Jahren hinzugefügt
t/wh/transfer.t | ||
---|---|---|
8 | 8 |
use_ok 'SL::DB::Warehouse'; |
9 | 9 |
use_ok 'SL::WH'; |
10 | 10 |
|
11 |
use_ok('SL::DB::Inventory'); |
|
12 |
|
|
13 |
|
|
11 | 14 |
Support::TestSetup::login(); |
12 | 15 |
|
13 |
my $part = SL::DB::Manager::Part->get_first; |
|
14 |
is(ref $part, 'SL::DB::Part', 'loading a part to test with id ' . $part->id); |
|
16 |
my $part = SL::DB::Part->new(unit => 'mg', description => 'TestObject'); |
|
17 |
$part->save(); |
|
18 |
|
|
19 |
is(ref($part), 'SL::DB::Part', 'loading a part to test with id ' . $part->id); |
|
20 |
|
|
15 | 21 |
|
16 | 22 |
my $wh = SL::DB::Manager::Warehouse->get_first; |
17 | 23 |
is(ref $wh, 'SL::DB::Warehouse', 'loading a warehouse to test with id ' . $wh->id); |
... | ... | |
71 | 77 |
chargenumber => '', |
72 | 78 |
}; |
73 | 79 |
|
80 |
################################################# |
|
81 |
|
|
82 |
test {shift->{qty}, shift->{qty} + 4000000000, 'transfer one way with unit'} { |
|
83 |
transfer_type => 'transfer', |
|
84 |
parts_id => $part->id, |
|
85 |
src_warehouse_id => $wh->id, |
|
86 |
dst_warehouse_id => $wh->id, |
|
87 |
src_bin_id => $bin1->id, |
|
88 |
dst_bin_id => $bin2->id, |
|
89 |
qty => 4, |
|
90 |
unit => 't', |
|
91 |
chargenumber => '', |
|
92 |
}; |
|
93 |
|
|
74 | 94 |
############################################## |
75 | 95 |
|
76 | 96 |
use_ok 'SL::DB::TransferType'; |
... | ... | |
138 | 158 |
}; |
139 | 159 |
|
140 | 160 |
|
161 |
SL::DB::Manager::Inventory->delete_objects(where => [parts_id => $part->id]); |
|
162 |
|
|
163 |
$part->delete(); |
|
164 |
|
|
141 | 165 |
done_testing; |
142 | 166 |
|
143 | 167 |
1; |
Auch abrufbar als: Unified diff
Bug bei der Umrechnung von Einheiten beim Einlagern behoben.
fixt #1983