Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision eb0b223d

Von Martin Helmling martin.helmling@octosoft.eu vor mehr als 3 Jahren hinzugefügt

  • ID eb0b223d2716d3fcffb9a3d806506ca4e396f4f8
  • Vorgänger 982ea316
  • Nachfolger 1a98dbaf

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

Unterschiede anzeigen:

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