Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3c92067f

Von Sven Schöling vor etwa 1 Jahr hinzugefügt

  • ID 3c92067ffc660f607c3deb2b35e2b8c5aead5ac3
  • Vorgänger d4fcd637
  • Nachfolger 11ed79b6

RecordLink: conversions nicht mehr manuell in Controllern machen

stattdessen per Helper setzen lassen

Unterschiede anzeigen:

SL/Controller/Reclamation.pm
26 26
use SL::DB::Shipto;
27 27
use SL::DB::Translation;
28 28
use SL::DB::ValidityToken;
29
use SL::DB::Helper::RecordLink qw(RECORD_ID RECORD_TYPE_REF RECORD_ITEM_ID RECORD_ITEM_TYPE_REF);
29 30

  
30 31
use SL::Helper::CreatePDF qw(:all);
31 32
use SL::Helper::PrintOptions;
......
1713 1714

  
1714 1715
  my $reclamation = $self->reclamation;
1715 1716

  
1716
  $reclamation->{converted_from_record_id} = delete $::form->{converted_from_record_id};
1717
  $reclamation->{converted_from_record_type_ref} = delete $::form->{converted_from_record_type_ref};
1717
  $reclamation->{RECORD_ID()} = delete $::form->{converted_from_record_id};
1718
  $reclamation->{RECORD_TYPE_REF()} = delete $::form->{converted_from_record_type_ref};
1718 1719

  
1719 1720
  my $from_record_item_ids = delete $::form->{converted_from_record_item_ids} ;
1720 1721
  my $from_record_item_type_refs = delete $::form->{converted_from_record_item_type_refs} ;
......
1722 1723
  if (scalar @{ $from_record_item_ids || [] }) {
1723 1724
    for my $idx (0 .. $#{ $reclamation->items_sorted }) {
1724 1725
      my $reclamation_item = $reclamation->items_sorted->[$idx];
1725
      $reclamation_item->{converted_from_record_item_id} = $from_record_item_ids->[$idx];
1726
      $reclamation_item->{converted_from_record_item_type_ref} = $from_record_item_type_refs->[$idx];
1726
      $reclamation_item->{RECORD_ITEM_ID()} = $from_record_item_ids->[$idx];
1727
      $reclamation_item->{RECORD_ITEM_TYPE_REF()} = $from_record_item_type_refs->[$idx];
1727 1728
    }
1728 1729
  }
1729 1730
}

Auch abrufbar als: Unified diff