Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 28f67151

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

  • ID 28f67151ac88eb5bd0075c3b15419a734a0fca3a
  • Vorgänger ff3bb5cf
  • Nachfolger f7c37ff9

Lieferplan: Warenwert der ausgelagerten Warenmenge anzeigen

Unterschiede anzeigen:

SL/DB/OrderItem.pm
44 44
  my @doi_delivered      = grep { $_->parts_id == $self->parts_id } map { $_->orderitems } @d_orders_delivered;
45 45

  
46 46
  require SL::AM;
47
  return sum(map { AM->convert_unit($_->unit => $self->unit) * $_->qty } @doi_delivered);
47
  $self->{delivered_qty} =  sum(map { AM->convert_unit($_->unit => $self->unit) * $_->qty } @doi_delivered);
48
  return $self->{delivered_qty};
48 49
}
49 50

  
50 51
sub value_of_goods {
......
52 53

  
53 54
  my $price_factor = $self->price_factor || 1;
54 55

  
55
  return ($self->qty * $self->sellprice * (1 - $self->discount ) / $price_factor);
56
  return ($self->{delivered_qty} * $self->sellprice * (1 - $self->discount ) / $price_factor);
56 57
}
57 58

  
58 59
sub taxincluded {

Auch abrufbar als: Unified diff