Merge von 833,836-838 aus unstable: Lieferdatum in Rechnungen
[kivitendo-erp.git] / SL / OE.pm
index 5350065..4662f50 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -628,6 +628,10 @@ sub retrieve {
 
   ($form->{currency}) = split /:/, $form->{currencies};
 
+  # set reqdate if this is an invoice->order conversion. If someone knows a better check to ensure 
+  # we come from invoices, feel free.
+  $form->{reqdate} = $form->{deliverydate} if ($form->{deliverydate} and $form->{callback} =~ /action=ar_transactions/);
+
   if ($form->{id} or @ids) {
 
     # retrieve order for single id