FIX: REST API, date field not used for invoices creation

This commit is contained in:
David 2017-09-21 17:48:12 +02:00 committed by GitHub
parent 3898cfe02f
commit 9dab694bb0

View File

@ -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