Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 31347b09

Von Jan Büren vor mehr als 9 Jahren hinzugefügt

  • ID 31347b09de4258cab0dd7c251ea69a4485e5f40b
  • Vorgänger 7317b8d9
  • Nachfolger a2be45a1

OrderItem POD hinzugefügt

Hinweis auf entfernte Funktionen und Verbesserungsmöglichkeiten.

Unterschiede anzeigen:

SL/DB/OrderItem.pm
44 44

  
45 45
1;
46 46

  
47
__END__
48

  
49
=pod
50

  
51
=head1 NAME
52

  
53
SL::DB::OrderItems: Rose model for orderitems
54

  
55
=head1 FUNCTIONS
56

  
57
=over 4
58

  
59
=item C<shipped_qty>
60

  
61
returns the number of orderitems which are already linked to Delivery Orders.
62
The linked key is parts_id and not orderitems (id) -> delivery_order_items (id).
63
Therefore this function is not safe for identical parts_id.
64
Sample call:
65
C<$::form-E<gt>format_amount(\%::myconfig, $_[0]-E<gt>shipped_qty);>
66

  
67
=back
68

  
69
=head1 TODO
70

  
71
Older versions of OrderItem.pm had more functions which where used for calculating the
72
qty for the different states of the Delivery Order.
73
For example to get the qty in already marked as delivered Delivery Orders:
74

  
75
C<delivered_qty>
76

  
77
return $self-E<gt>_delivered_qty;
78

  
79
  sub _delivered_qty {
80
  (..)
81
    my @d_orders_delivered = grep { $_-E<gt>delivered } @$d_orders;
82
    my @doi_delivered      = grep { $_-E<gt>parts_id == $self-E<gt>parts_id } map { $_-E<gt>orderitems } @d_orders_delivered;
83
  }
84

  
85
In general the function C<shipped_qty> and all (project) related functions should be marked deprecate,
86
 because of the better linked item to item data in the record_links table.
87

  
88

  
89

  
90

  

Auch abrufbar als: Unified diff