last if $rest_qty == 0;
}
-
if ($rest_qty > 0) {
die SL::X::Inventory::Allocation->new(
- error => 'not enough to allocate',
+ error => t8('not enough to allocate'),
msg => t8("can not allocate #1 units of #2, missing #3 units", $qty, $part->displayable_name, $rest_qty),
);
} else {
my @allocations;
for my $part_id (keys %parts_to_allocate) {
- my $part = SL::DB::Part->new(id => $part_id);
+ my $part = SL::DB::Part->load_cached($part_id);
push @allocations, allocate(%params, part => $part, qty => $parts_to_allocate{$part_id});
}
'SL::X::Inventory' => {
isa => 'SL::X::Base',
fields => [ qw(msg error) ],
- defaults => { error_template => [ '%s: %s', qw(msg error) ] },
+ defaults => { error_template => [ '%s: %s', qw(msg) ] },
},
'SL::X::Inventory::Allocation' => {
isa => 'SL::X::Base',
fields => [ qw(msg error) ],
- defaults => { error_template => [ '%s: %s', qw(msg error) ] },
+ defaults => { error_template => [ '%s: %s', qw(msg) ] },
},
);
'brutto' => 'brutto',
'building data' => 'Verarbeite Daten',
'building report' => 'Erstelle Bericht',
+ 'can not allocate #1 units of #2, missing #3 units' => 'Kann keine #1 Einheiten von #2 belegen, es fehlen #3 Einheiten',
'can only parse a pdf file' => 'Kann nur eine gültige PDF-Datei verwenden.',
'cash' => 'Ist-Versteuerung',
'chargenumber #1' => 'Chargennummer #1',
'no tax_id in acc_trans' => 'Keine tax_id in acc_trans',
'not configured' => 'nicht konfiguriert',
'not delivered' => 'nicht geliefert',
+ 'not enough to allocate' => 'Keine Verfügbarkeit',
'not executed' => 'nicht ausgeführt',
'not running' => 'läuft nicht',
'not set' => 'nicht gesetzt',