Revision 72ab222c
Von Jan Büren vor mehr als 3 Jahren hinzugefügt
SL/Helper/Inventory.pm | ||
---|---|---|
332 | 332 |
trans_type => $trans_type_out, |
333 | 333 |
shippingdate => $shippingdate, |
334 | 334 |
employee => SL::DB::Manager::Employee->current, |
335 |
comment => t8('Used for assembly #1 #2', $part->partnumber, $part->description), |
|
335 | 336 |
); |
336 | 337 |
} |
337 | 338 |
|
t/wh/inventory.t | ||
---|---|---|
1 | 1 |
use strict; |
2 |
use Test::Deep qw(cmp_deeply ignore superhashof); |
|
2 | 3 |
use Test::More; |
3 | 4 |
use Test::Exception; |
4 | 5 |
|
... | ... | |
177 | 178 |
is(SL::Helper::Inventory::get_stock(part => $part1), "2.00000", 'and consumes...'); |
178 | 179 |
is(SL::Helper::Inventory::get_stock(part => $part2), "7.00000", '..the materials'); |
179 | 180 |
|
181 |
# check comments and warehouses |
|
182 |
$::form->{l_comment} = 'Y'; |
|
183 |
$::form->{l_warehouse_from} = 'Y'; |
|
184 |
$::form->{l_warehouse_to} = 'Y'; |
|
185 |
local $::instance_conf->data->{produce_assembly_same_warehouse} = 1; |
|
186 |
|
|
187 |
my @contents = WH->get_warehouse_journal(sort => 'date'); |
|
188 |
|
|
189 |
cmp_deeply(\@contents, |
|
190 |
[ ignore(), ignore(), |
|
191 |
superhashof({ |
|
192 |
'comment' => 'Used for assembly 6 Test Assembly', |
|
193 |
'warehouse_from' => 'Warehouse' |
|
194 |
}), |
|
195 |
superhashof({ |
|
196 |
'comment' => 'Used for assembly 6 Test Assembly', |
|
197 |
'warehouse_from' => 'Warehouse' |
|
198 |
}), |
|
199 |
superhashof({ |
|
200 |
'part_type' => 'assembly', |
|
201 |
'warehouse_to' => 'Warehouse' |
|
202 |
}), |
|
203 |
], |
|
204 |
"Comments for assembly productions are ok" |
|
205 |
); |
|
206 |
|
|
207 |
|
|
208 |
|
|
209 |
|
|
210 |
|
|
211 |
|
|
180 | 212 |
# try to produce without allocations dies |
181 | 213 |
|
182 | 214 |
dies_ok(sub { |
Auch abrufbar als: Unified diff
S/H/Inventory.pm Kommentare beim Erzeugnis fertigen für verbrauchte Artikel