Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision aa27857a

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID aa27857abd01bef62a76deb2918ad1184ec4dd56
  • Vorgänger 931395c4
  • Nachfolger 503133bd

Model::Record: übergebe Typ für new_from_workflow und ..._multi

Unterschiede anzeigen:

SL/Controller/Reclamation.pm
}
my $order = SL::DB::Order->new(id => $::form->{from_id})->load;
my $reclamation = SL::Model::Record->new_from_workflow($order, $self->type);
my $reclamation = SL::Model::Record->new_from_workflow($order, ref($self->reclamaiton), $self->type);
$self->reclamation($reclamation);
......
}
my $delivery_order = SL::DB::DeliveryOrder->new(id => $::form->{from_id})->load;
my $reclamation = SL::Model::Record->new_from_workflow($delivery_order, $self->type);
my $reclamation = SL::Model::Record->new_from_workflow($delivery_order, ref($self->reclamaiton), $self->type);
$self->reclamation($reclamation);
......
}
my $invoice = SL::DB::Invoice->new(id => $::form->{from_id})->load;
my $reclamation = SL::Model::Record->new_from_workflow($invoice, $self->type);
my $reclamation = SL::Model::Record->new_from_workflow($invoice, ref($self->reclamaiton), $self->type);
$self->reclamation($reclamation);
......
require SL::DB::PurchaseInvoice;
my $invoice = SL::DB::PurchaseInvoice->new(id => $::form->{from_id})->load;
$invoice->{type} = $invoice->invoice_type; #can't add type → invoice_type in SL/DB/PurchaseInvoice
my $reclamation = SL::Model::Record->new_from_workflow($invoice, $self->type);
my $reclamation = SL::Model::Record->new_from_workflow($invoice, ref($self->reclamaiton), $self->type);
$self->reclamation($reclamation);

Auch abrufbar als: Unified diff