Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9c04a397

Von Jan Büren vor etwa 10 Jahren hinzugefügt

  • ID 9c04a397c71979a472e6728e95300e0c362518bb
  • Vorgänger f7c37ff9
  • Nachfolger 69e31dd3

HelperFunktion OderItem: _delivered_qty optimiert

Unterschiede anzeigen:

SL/DB/OrderItem.pm
37 37
sub delivered_qty {
38 38
  my ($self) = @_;
39 39

  
40
  $self->_delivered_qty unless $self->{delivered_qty};
40
  $self->_delivered_qty;
41 41
  return $self->{delivered_qty};
42 42
}
43 43

  
44 44
sub _delivered_qty {
45 45
  my ($self) = @_;
46 46

  
47
  return if $self->{delivered_qty};
48

  
47 49
  my $d_orders = $self->order->linked_records(direction => 'to', to => 'SL::DB::DeliveryOrder');
48 50

  
49 51
  my @d_orders_delivered = grep { $_->delivered } @$d_orders;
......
59 61

  
60 62
  my $price_factor = $self->price_factor || 1;
61 63

  
62
  $self->_delivered_qty unless $self->{delivered_qty};
64
  $self->_delivered_qty;
63 65
  return ($self->{delivered_qty} * $self->sellprice * (1 - $self->discount ) / $price_factor);
64 66
}
65 67

  

Auch abrufbar als: Unified diff