Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 57008bc3

Von Bernd Bleßmann vor 12 Monaten hinzugefügt

  • ID 57008bc3297edf35fc5d67f8ca9acbe6e5664127
  • Vorgänger cd424304
  • Nachfolger 6859be4f

S:D:Order: weitere Methoden für Vorgängerbelege

Unterschiede anzeigen:

SL/DB/Order.pm
}
}
sub preceding_sales_order_intakes {
my ($self) = @_;
my @lrs = ();
if ($self->id) {
@lrs = grep { $_->record_type eq SALES_ORDER_INTAKE_TYPE() } @{$self->linked_records(from => 'SL::DB::Order')};
} else {
if ('SL::DB::Order' eq $self->{RECORD_TYPE_REF()}) {
my $order = SL::DB::Order->load_cached($self->{RECORD_ID()});
push @lrs, $order if $order->record_type eq SALES_ORDER_INTAKE_TYPE();
}
}
return \@lrs;
}
sub preceding_purchase_orders {
my ($self) = @_;
......
return \@lrs;
}
sub preceding_purchase_quotation_intakes {
my ($self) = @_;
my @lrs = ();
if ($self->id) {
@lrs = grep { $_->record_type eq PURCHASE_QUOTATION_INTAKE_TYPE() } @{$self->linked_records(from => 'SL::DB::Order', recursive => 1)};
} else {
if ('SL::DB::Order' eq $self->{RECORD_TYPE_REF()}) {
my $order = SL::DB::Order->load_cached($self->{RECORD_ID()});
push @lrs, $order if $order->record_type eq PURCHASE_QUOTATION_INTAKE_TYPE();
}
}
return \@lrs;
}
sub preceding_request_quotations {
my ($self) = @_;
my @lrs = ();
if ($self->id) {
@lrs = grep { $_->record_type eq REQUEST_QUOTATION_TYPE() } @{$self->linked_records(from => 'SL::DB::Order', recursive => 1)};
} else {
if ('SL::DB::Order' eq $self->{RECORD_TYPE_REF()}) {
my $order = SL::DB::Order->load_cached($self->{RECORD_ID()});
push @lrs, $order if $order->record_type eq REQUEST_QUOTATION_TYPE();
}
}
return \@lrs;
}
sub type_data {
SL::DB::Helper::TypeDataProxy->new(ref $_[0], $_[0]->type);
}

Auch abrufbar als: Unified diff