From f53a118d7c22a85f3fd32876d9a3d1a5af3846c5 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 21 Feb 2017 09:25:59 +0100 Subject: [PATCH] =?utf8?q?PaymentTerm:=20Schreibfehler=20in=20Doku=20gefix?= =?utf8?q?t=20&=20neues=20Beispiel=20in=20=C3=9Cbersicht?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/PaymentTerm.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/SL/DB/PaymentTerm.pm b/SL/DB/PaymentTerm.pm index b78da528d..db443e947 100644 --- a/SL/DB/PaymentTerm.pm +++ b/SL/DB/PaymentTerm.pm @@ -57,8 +57,15 @@ SL::DB::PaymentTerm - Rose model for the payment_terms table =head1 SYNOPSIS my $terms = SL::DB::PaymentTerm->new(id => $::form->{payment_id})->load; - my $due_date_net = $erms->calc_date(terms => 'net'); # uses terms_netto - my $due_date_discount = $erms->calc_date(terms => 'discount'); # uses terms_skonto + my $due_date_net = $terms->calc_date(terms => 'net'); # uses terms_netto + my $due_date_discount = $terms->calc_date(terms => 'discount'); # uses terms_skonto + + # Calculate due date taking the existing invoice date and the due + # date entered by the user into account: + my $due_date = $terms->calc_date( + reference_date => $::form->{invdate}, + due_date => $::form->{duedate}, + ); =head1 FUNCTIONS -- 2.20.1