From ca456512657be03f972cbcd6cb16e21844011b34 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Feb 2019 14:38:13 +0100 Subject: [PATCH] Update api_invoices.class.php --- htdocs/compta/facture/class/api_invoices.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 0cb005ddba5..afecfd33b45 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -956,7 +956,7 @@ class Invoices extends DolibarrApi throw new RestException(404, 'Thirdparty not found'); } - if (! $object->paye) // protection against multiple submit + if (! $this->invoice->paye) // protection against multiple submit { $this->invoice->fetch_lines(); @@ -1015,7 +1015,7 @@ class Invoices extends DolibarrApi } else { - throw new RestException(500, 'Discount error'); + throw new RestException(500, 'Discount creation error'); $this->db->rollback(); } }