Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ecc3f8bc

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

  • ID ecc3f8bc2af5b6f64ddf3a58967f3cb2cbac3977
  • Vorgänger 1672b7f7
  • Nachfolger 71eff037

Inventory Helper: Dokument für Allocations extra

Sollen beim Produzieren/Abfüllen für die notwendigen Artikel auch
Dokumente angegeben werden, so müssen diese extra in die Allocation
Struktur eingebracht werden.

Automatischer Test angepasst: Inventoryhelper nun mit Parameter oe_id

zu #11216

Unterschiede anzeigen:

SL/Helper/Inventory.pm
207 207
        bestbefore        => $chunk->{bestbefore},
208 208
        reserve_for_id    => $chunk->{reserve_for_id},
209 209
        reserve_for_table => $chunk->{reserve_for_table},
210
        oe_id             => undef,
210 211
      );
211 212
      $rest_qty -= $qty;
212 213
    }
......
346 347
      trans_type   => $trans_type_out,
347 348
      shippingdate => $shippingdate,
348 349
      employee     => SL::DB::Manager::Employee->current,
349
      oe_id        => $oe_id,
350
      oe_id        => $allocation->oe_id,
350 351
    );
351 352
  }
352 353

  
......
381 382
}
382 383

  
383 384
package SL::Helper::Inventory::Allocation {
384
  my @attributes = qw(parts_id qty bin_id warehouse_id chargenumber bestbefore comment reserve_for_id reserve_for_table);
385
  my @attributes = qw(parts_id qty bin_id warehouse_id chargenumber bestbefore comment reserve_for_id reserve_for_table oe_id);
385 386
  my %attributes = map { $_ => 1 } @attributes;
386 387

  
387 388
  for my $name (@attributes) {
......
463 464
    bestbefore        => undef,
464 465
    reserve_for_id    => undef,
465 466
    reserve_for_table => undef,
467
    oe_id             => $my_document,
466 468
  );
467 469

  
468 470
  # produce_assembly:
......
750 752

  
751 753
=item * reserve_for_table
752 754

  
755
=item * oe_id
756

  
757
Must be explicit set if the allocation needs also an (other) document.
758

  
753 759
=back
754 760

  
755
C<chargenumber>, C<bestbefore>, C<reserve_for_id> and C<reserve_for_table> may
761
C<chargenumber>, C<bestbefore>, C<reserve_for_id>, C<reserve_for_table> and oe_id  may
756 762
be C<undef> (but must still be present at creation time). Instances are
757 763
considered immutable.
758 764

  
765

  
759 766
=head1 CONSTRAINTS
760 767

  
761 768
  # whitelist constraints
t/wh/inventory.t
88 88
   reserve_for_id    => undef,
89 89
   reserve_for_table => undef,
90 90
   warehouse_id      => $wh->id,
91
 }, 'allocatiion works');
91
   comment           => undef,
92
   oe_id             => undef,
93
 }, 'allocation works');
92 94

  
93 95
# simple
94 96

  

Auch abrufbar als: Unified diff