From f56f6f7ab8d14d1406884e6fa732c0aa01dda859 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 26 Jul 2017 13:42:53 +0200 Subject: [PATCH] =?utf8?q?SL::Helper::ShippedQty:=20chaining=20vervollst?= =?utf8?q?=C3=A4ndigt=20und=20dokumentiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Helper/ShippedQty.pm | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.39.5