From 0fd179c4e5c1884ea119f90cd845808ed44442dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Wed, 16 Aug 2017 15:02:51 +0200 Subject: [PATCH] Workflow Lieferschein -> Rechnung. Liefertermin als Rechnungslieferdatum setzen Falls im Lieferschein einen Liefertermin gesetzt hat, ist dieser eindeutig der sinnvollere Liefertermin in der Rechnung anstatt das Lieferscheindatum. --- bin/mozilla/do.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 5d86682c6..d1f112963 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -969,7 +969,9 @@ sub invoice { $main::auth->assert($form->{type} eq 'purchase_delivery_order' ? 'vendor_invoice_edit' : 'invoice_edit'); $form->{convert_from_do_ids} = $form->{id}; - $form->{deliverydate} = $form->{transdate}; + # if we have a reqdate (Liefertermin), this is definetely the preferred + # deliverydate for invoices + $form->{deliverydate} = $form->{reqdate} || $form->{transdate}; $form->{transdate} = $form->{invdate} = $form->current_date(\%myconfig); $form->{duedate} = $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1); $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); -- 2.20.1