From: Jan Büren Date: Mon, 5 Oct 2015 09:45:27 +0000 (+0200) Subject: OrderItem POD hinzugefügt X-Git-Tag: release-3.4.1~666 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=31347b09de4258cab0dd7c251ea69a4485e5f40b;p=kivitendo-erp.git OrderItem POD hinzugefügt Hinweis auf entfernte Funktionen und Verbesserungsmöglichkeiten. --- diff --git a/SL/DB/OrderItem.pm b/SL/DB/OrderItem.pm index 1eb524734..5fcb8be2a 100644 --- a/SL/DB/OrderItem.pm +++ b/SL/DB/OrderItem.pm @@ -44,3 +44,47 @@ sub record { goto &order } 1; +__END__ + +=pod + +=head1 NAME + +SL::DB::OrderItems: Rose model for orderitems + +=head1 FUNCTIONS + +=over 4 + +=item C + +returns the number of orderitems which are already linked to Delivery Orders. +The linked key is parts_id and not orderitems (id) -> delivery_order_items (id). +Therefore this function is not safe for identical parts_id. +Sample call: +C<$::form-Eformat_amount(\%::myconfig, $_[0]-Eshipped_qty);> + +=back + +=head1 TODO + +Older versions of OrderItem.pm had more functions which where used for calculating the +qty for the different states of the Delivery Order. +For example to get the qty in already marked as delivered Delivery Orders: + +C + +return $self-E_delivered_qty; + + sub _delivered_qty { + (..) + my @d_orders_delivered = grep { $_-Edelivered } @$d_orders; + my @doi_delivered = grep { $_-Eparts_id == $self-Eparts_id } map { $_-Eorderitems } @d_orders_delivered; + } + +In general the function C and all (project) related functions should be marked deprecate, + because of the better linked item to item data in the record_links table. + + + +