From da8e5472ca332e44400bb25e89c35d6b020b4f50 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Thu, 15 Aug 2019 12:35:02 +0200 Subject: [PATCH] Workflow Lieferantenauftrag->Kreditorenbuchung: Zahlungsbedingungen aus Auftrag MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Um das Fälligkeitsdatum zu ermitteln, die Zahlungsbedingungen aus dem Auftrag nehmen, nicht die aus den Lieferantenstammdaten. --- bin/mozilla/ap.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index a5d20da87..bba2af4c0 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -1206,8 +1206,7 @@ sub add_from_purchase_order { $::form->{taxincluded} = 1; # we use amount below, so tax is included $::form->{transdate} = $today->to_kivitendo; $::form->{duedate} = $today->to_kivitendo; - $::form->{duedate} = $order->vendor->payment->calc_date(reference_date => $today)->to_kivitendo if $order->vendor->payment; - + $::form->{duedate} = $order->payment_terms->calc_date(reference_date => $today)->to_kivitendo if $order->payment_terms; create_links(); my $config_po_ap_workflow_chart_id = $::instance_conf->get_workflow_po_ap_chart_id; -- 2.20.1