From 209100ca065acebaff1294b0c1d2853529773413 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Thu, 18 Dec 2014 14:41:55 +0100 Subject: [PATCH] =?utf8?q?PTC-Doku=20um=20API-Beispielsaufruf=20erg=C3=A4n?= =?utf8?q?zt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Helper/PriceTaxCalculator.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SL/DB/Helper/PriceTaxCalculator.pm b/SL/DB/Helper/PriceTaxCalculator.pm index 9048736da..df6113663 100644 --- a/SL/DB/Helper/PriceTaxCalculator.pm +++ b/SL/DB/Helper/PriceTaxCalculator.pm @@ -360,6 +360,14 @@ C. The items are stored in the same order the items are stored in the object that L has been called on. +For example: + + my $invoice = SL::DB::Invoice->new(id => 12345)->load; + my %data = $invoice->calculate_prices_and_taxes; + my $second_item = $invoice->items->[1]; + + print "line total of second item: " . $data{items}->[ $second_item->id ]->{linetotal}; + =back =back -- 2.20.1