+=over 4
+
+=item C<shipped_qty>
+
+=item C<shipped_qty>
+
+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-E<gt>format_amount(\%::myconfig, $_[0]-E<gt>shipped_qty);>
+
+=item C<delivered_qty>
+
+Returns the amount of this orderitem that has been delivered, meaning it
+appears in a delivery order AND has been transferred. The delivery order items
+are found by direct record_links from orderitems to delivery order items.
+Delivery order items that were added manually and not via the record workflow
+will therefore not be calculated correctly.
+
+Orders that were created before the individual items were linked (this feature
+was added in kivitendo 3.2.0) will therefore return incorrect results.
+
+=item C<delivered_qty_sql>
+
+Does the same as delivered_qty, but via sql.
+
+
+
+=item C<delivered_qty_sql>
+
+Returns the amount of the orderitem that has actually been shipped, not just where delivery_order_items exist (how delivered_qty works).
+
+Doesn't deal with different units yet.
+
+=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<delivered_qty>
+
+return $self-E<gt>_delivered_qty;
+
+ sub _delivered_qty {
+ (..)
+ my @d_orders_delivered = grep { $_-E<gt>delivered } @$d_orders;
+ my @doi_delivered = grep { $_-E<gt>parts_id == $self-E<gt>parts_id } map { $_-E<gt>orderitems } @d_orders_delivered;
+ }
+
+In general the function C<shipped_qty> and all (project) related functions should be marked deprecate,
+ because of the better linked item to item data in the record_links table.
+
+=head1 AUTHORS
+
+G. Richardson E<lt>grichardson@kivitendo-premium.deE<gt>
+
+=cut