Revision eb0b223d
Von Martin Helmling martin.helmling@octosoft.eu vor mehr als 3 Jahren hinzugefügt
SL/Helper/Inventory.pm | ||
---|---|---|
214 | 214 |
|
215 | 215 |
last if $rest_qty == 0; |
216 | 216 |
} |
217 |
|
|
218 | 217 |
if ($rest_qty > 0) { |
219 | 218 |
die SL::X::Inventory::Allocation->new( |
220 |
error => 'not enough to allocate',
|
|
219 |
error => t8('not enough to allocate'),
|
|
221 | 220 |
msg => t8("can not allocate #1 units of #2, missing #3 units", $qty, $part->displayable_name, $rest_qty), |
222 | 221 |
); |
223 | 222 |
} else { |
... | ... | |
243 | 242 |
my @allocations; |
244 | 243 |
|
245 | 244 |
for my $part_id (keys %parts_to_allocate) { |
246 |
my $part = SL::DB::Part->new(id => $part_id);
|
|
245 |
my $part = SL::DB::Part->load_cached($part_id);
|
|
247 | 246 |
push @allocations, allocate(%params, part => $part, qty => $parts_to_allocate{$part_id}); |
248 | 247 |
} |
249 | 248 |
|
Auch abrufbar als: Unified diff
Inventory Helper: Artikel laden und Fehlermeldung korrigiert
Damit beim Fehler der Name des Artikels kommt, muss dieser geladen
werden.
Im Fehlerstring wird zuerst der Fehler , dann der Text ausgegeben