Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0845ca9d

Von Martin Helmling martin.helmling@octosoft.eu vor etwa 4 Jahren hinzugefügt

  • ID 0845ca9d3bd7adc7689a34d562c3ff0371711514
  • Vorgänger 21b7295d
  • Nachfolger 2951ed30

Inventory Helper: Bessere Fehlermeldung bei fehlenden Parametern

Alle Fehler im allocate() des Inventory-Helpers werden nun per
SL::X::Inventory::Allocation Fehlermethode erzeugt,
damit es eine einheitliche Prüfung geben kann.

verbessert egw 12413

Unterschiede anzeigen:

SL/Helper/Inventory.pm
sub allocate {
my (%params) = @_;
my $part = $params{part} or Carp::croak('allocate needs a part');
my $qty = $params{qty} or Carp::croak('allocate needs a qty');
die SL::X::Inventory::Allocation->new(
error => 'allocate needs a part',
msg => t8("Method allocate needs the parameter 'part'"),
) unless $params{part};
die SL::X::Inventory::Allocation->new(
error => 'allocate needs a qty',
msg => t8("Method allocate needs the parameter 'qty'"),
) unless $params{qty};
my $part = $params{part};
my $qty = $params{qty};
return () if $qty <= 0;
locale/de/all
'Meta tag keywords' => 'Metatag Keywords',
'Meta tag title' => 'Metatag Titel',
'Method' => 'Verfahren',
'Method allocate needs the parameter \'part\'' => 'Es fehlt der Parameter \'part\'',
'Method allocate needs the parameter \'qty\'' => 'Es fehlt der Parameter \'qty\' oder die Menge ist 0',
'Microfiche' => 'Mikrofilm',
'Minimum Amount' => 'Mindestbetrag',
'Miscellaneous' => 'Verschiedenes',

Auch abrufbar als: Unified diff