From 9dab694bb019edb0432ce8d40ce2b1f2b026a800 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 21 Sep 2017 17:48:12 +0200 Subject: [PATCH] FIX: REST API, date field not used for invoices creation --- htdocs/compta/facture/class/api_invoices.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 4efc997cc42..a5f1fe92999 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -191,7 +191,7 @@ class Invoices extends DolibarrApi foreach($request_data as $field => $value) { $this->invoice->$field = $value; } - if(! array_keys($request_data,'date')) { + if(! array_key_exists('date', $request_data)) { $this->invoice->date = dol_now(); } /* We keep lines as an array