From 0d121de1a631a140817b5ef04cf597d35083d4d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?=
 <marcosgdf@gmail.com>
Date: Fri, 23 May 2014 02:48:24 +0200
Subject: [PATCH] Fix: [ bug #1388 ] Wrong date when invoicing several orders

---
 ChangeLog                           | 1 +
 htdocs/commande/orderstoinvoice.php | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 3bb088b99f3..9832c1c7bfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -113,6 +113,7 @@ Fix: [ bug #1306 ] Fatal error when adding an external calendar.
 New: Added es_CL language
 Fix: Margin tabs bad data show
 Fix: [ bug #1318 ] Problem with enter key when adding an existing product to a customer invoice.
+Fix: [ bug #1388 ] Wrong date when invoicing several orders
 
 ***** ChangeLog for 3.5 compared to 3.4.* *****
 For users:
diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php
index aa2883ccb96..7b79a16bec1 100644
--- a/htdocs/commande/orderstoinvoice.php
+++ b/htdocs/commande/orderstoinvoice.php
@@ -413,7 +413,7 @@ if ($action == 'create' && empty($mesgs))
 
 	// Date invoice
 	print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td colspan="2">';
-	$html->select_date(0,'','','','',"add",1,1);
+	$html->select_date('','','','','',"add",1,1);
 	print '</td></tr>';
 	// Payment term
 	print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
-- 
GitLab