Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3f0ed511

Von Moritz Bunkus vor fast 9 Jahren hinzugefügt

  • ID 3f0ed511a589aca9642391108a960ef4e8a6286d
  • Vorgänger c7241bf7
  • Nachfolger 492c85c2

Shipto: Methode zum Clonen in SL::DB::Shipto und nicht in DeliveryOrder->new_from

Unterschiede anzeigen:

SL/DB/DeliveryOrder.pm
136 136
  # save it, too.
137 137
  my $custom_shipto;
138 138
  if (!$source->shipto_id && $source->id) {
139
    my $old = $source->custom_shipto;
140
    if ($old) {
141
      $custom_shipto = SL::DB::Shipto->new(
142
        map  { +($_ => $old->$_) }
143
        grep { !m{^ (?: itime | mtime | shipto_id | trans_id ) $}x }
144
        map  { $_->name }
145
        @{ $old->meta->columns }
146
      );
147
      $custom_shipto->module('DO');
148
    }
139
    $custom_shipto = $source->custom_shipto->clone($class) if $source->can('custom_shipto') && $source->custom_shipto;
149 140

  
150 141
  } else {
151 142
    $args{shipto_id} = $source->shipto_id;

Auch abrufbar als: Unified diff