Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1cf410d3

Von Sven Schöling vor mehr als 3 Jahren hinzugefügt

  • ID 1cf410d303521b14bc4a9deb6315a905b0cc86e7
  • Vorgänger fa37b23d
  • Nachfolger 4aba3771

Inventory Helper: _qty auf _number umgestellt

Unterschiede anzeigen:

SL/Helper/Inventory.pm
13 13
use SL::MoreCommon qw(listify);
14 14
use SL::DBUtils qw(selectall_hashref_query selectrow_query);
15 15
use SL::DB::TransferType;
16
use SL::Helper::Number qw(_round_qty _qty);
16
use SL::Helper::Number qw(_number _round_number);
17 17
use SL::X;
18 18

  
19 19
our @EXPORT_OK = qw(get_stock get_onhand allocate allocate_for_assembly produce_assembly check_constraints);
......
226 226
        reserve_for_table => $chunk->{reserve_for_table},
227 227
        for_object_id     => undef,
228 228
      );
229
      $rest_qty -=  _round_qty($qty);
229
      $rest_qty -=  _round_number($qty, 5);
230 230
    }
231
    $rest_qty = _round_qty($rest_qty);
231
    $rest_qty = _round_number($rest_qty, 5);
232 232
    last if $rest_qty == 0;
233 233
  }
234 234
  if ($rest_qty > 0) {
235 235
    die SL::X::Inventory::Allocation->new(
236 236
      error => 'not enough to allocate',
237
      msg => t8("can not allocate #1 units of #2, missing #3 units", _qty($qty), $part->displayable_name, _qty($rest_qty)),
237
      msg => t8("can not allocate #1 units of #2, missing #3 units", _number(\%::myconfig, $qty), $part->displayable_name, _number(\%::myconfig, $rest_qty)),
238 238
    );
239 239
  } else {
240 240
    if ($params{constraints}) {
......
313 313
        $err      .= ' '.t8('part \'#\'1 in bin \'#2\' only with qty #3 (need additional #4) and chargenumber \'#5\'.',
314 314
              SL::DB::Part->load_cached($_->parts_id)->description,
315 315
              SL::DB::Bin->load_cached($_->bin_id)->full_description,
316
              _qty($_->qty), _qty($needed), $_->chargenumber ? $_->chargenumber : '--') for @allocs;
316
              _number($_->qty), _number($needed), $_->chargenumber ? $_->chargenumber : '--') for @allocs;
317 317
        die SL::X::Inventory::Allocation->new(
318 318
          error => 'allocation constraints failure',
319 319
          msg   => $err,

Auch abrufbar als: Unified diff