Revision 726e362a
Von Sven Schöling vor mehr als 4 Jahren hinzugefügt
SL/Helper/Inventory.pm | ||
---|---|---|
use SL::MoreCommon qw(listify);
|
||
use SL::DBUtils qw(selectall_hashref_query selectrow_query);
|
||
use SL::DB::TransferType;
|
||
use SL::Helper::Number qw(_number _round_number);
|
||
use SL::Helper::Number qw(_format_number _round_number);
|
||
use SL::X;
|
||
|
||
our @EXPORT_OK = qw(get_stock get_onhand allocate allocate_for_assembly produce_assembly check_constraints);
|
||
... | ... | |
if ($rest_qty > 0) {
|
||
die SL::X::Inventory::Allocation->new(
|
||
error => 'not enough to allocate',
|
||
msg => t8("can not allocate #1 units of #2, missing #3 units", _number(\%::myconfig, $qty), $part->displayable_name, _number(\%::myconfig, $rest_qty)),
|
||
msg => t8("can not allocate #1 units of #2, missing #3 units", _format_number($qty), $part->displayable_name, _format_number($rest_qty)),
|
||
);
|
||
} else {
|
||
if ($params{constraints}) {
|
||
... | ... | |
$err .= ' '.t8('part \'#\'1 in bin \'#2\' only with qty #3 (need additional #4) and chargenumber \'#5\'.',
|
||
SL::DB::Part->load_cached($_->parts_id)->description,
|
||
SL::DB::Bin->load_cached($_->bin_id)->full_description,
|
||
_number($_->qty), _number($needed), $_->chargenumber ? $_->chargenumber : '--') for @allocs;
|
||
_format_number($_->qty), _format_number($needed), $_->chargenumber ? $_->chargenumber : '--') for @allocs;
|
||
die SL::X::Inventory::Allocation->new(
|
||
error => 'allocation constraints failure',
|
||
msg => $err,
|
Auch abrufbar als: Unified diff
Inventory Helper: Auf Number Helper Änderungen angepasst