Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 47dc096c

Von Sven Schöling vor fast 2 Jahren hinzugefügt

  • ID 47dc096c85d3dd5b19900234e033166c77b63bc2
  • Vorgänger 27441deb
  • Nachfolger 3aaba5ca

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;
......
1707 1708

  
1708 1709
  my $reclamation = $self->reclamation;
1709 1710

  
1710
  $reclamation->{converted_from_record_id} = delete $::form->{converted_from_record_id};
1711
  $reclamation->{converted_from_record_type_ref} = delete $::form->{converted_from_record_type_ref};
1711
  $reclamation->{RECORD_ID()} = delete $::form->{converted_from_record_id};
1712
  $reclamation->{RECORD_TYPE_REF()} = delete $::form->{converted_from_record_type_ref};
1712 1713

  
1713 1714
  my $from_record_item_ids = delete $::form->{converted_from_record_item_ids} ;
1714 1715
  my $from_record_item_type_refs = delete $::form->{converted_from_record_item_type_refs} ;
......
1716 1717
  if (scalar @{ $from_record_item_ids || [] }) {
1717 1718
    for my $idx (0 .. $#{ $reclamation->items_sorted }) {
1718 1719
      my $reclamation_item = $reclamation->items_sorted->[$idx];
1719
      $reclamation_item->{converted_from_record_item_id} = $from_record_item_ids->[$idx];
1720
      $reclamation_item->{converted_from_record_item_type_ref} = $from_record_item_type_refs->[$idx];
1720
      $reclamation_item->{RECORD_ITEM_ID()} = $from_record_item_ids->[$idx];
1721
      $reclamation_item->{RECORD_ITEM_TYPE_REF()} = $from_record_item_type_refs->[$idx];
1721 1722
    }
1722 1723
  }
1723 1724
}

Auch abrufbar als: Unified diff