From 9bb1ede65a2bd2ddb72246e12546efe777e16b86 Mon Sep 17 00:00:00 2001 From: alexandreaj <5599410+alexandreaj@users.noreply.github.com> Date: Mon, 18 Mar 2019 21:11:13 +0100 Subject: [PATCH] Update api_invoices.class.php Adding possibility to set due date (date_lim_reglement field in mysql) via the API. --- 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 bf7a102ffeb..2698e1ebec2 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -227,7 +227,7 @@ class Invoices extends DolibarrApi $this->invoice->lines = $lines; }*/ - if ($this->invoice->create(DolibarrApiAccess::$user) < 0) { + if ($this->invoice->create(DolibarrApiAccess::$user,0,$request_data["date_lim_reglement"]) < 0) { throw new RestException(500, "Error creating invoice", array_merge(array($this->invoice->error), $this->invoice->errors)); } return $this->invoice->id;