From: Sven Schöling Date: Wed, 26 Jul 2017 11:42:53 +0000 (+0200) Subject: SL::Helper::ShippedQty: chaining vervollständigt und dokumentiert X-Git-Tag: release-3.5.4~949 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f56f6f7ab8d14d1406884e6fa732c0aa01dda859;p=kivitendo-erp.git SL::Helper::ShippedQty: chaining vervollständigt und dokumentiert --- diff --git a/SL/Helper/ShippedQty.pm b/SL/Helper/ShippedQty.pm index 13efcb5a6..3bc8ee12a 100644 --- a/SL/Helper/ShippedQty.pm +++ b/SL/Helper/ShippedQty.pm @@ -225,6 +225,7 @@ sub write_to { die "unknown reference '@{[ ref $obj ]}' for @{[ __PACKAGE__ ]}::write_to"; } } + $self; } sub write_to_objects { @@ -332,6 +333,9 @@ SL::Helper::ShippedQty - Algorithmic module for calculating shipped qty # delivered by oe_id my $delivered = $helper->delievered->{$oi->id}; + # calculate and write_to can be chained: + my $helper = SL::Helper::ShippedQty->new->calculate($orders)->write_to_objects; + =head1 DESCRIPTION This module encapsulates the algorithm needed to compute the shipped qty for