Update api_invoices.class.php

This commit is contained in:
Laurent Destailleur 2019-02-23 14:38:13 +01:00 committed by GitHub
parent eb733728c3
commit ca45651265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -956,7 +956,7 @@ class Invoices extends DolibarrApi
throw new RestException(404, 'Thirdparty not found'); 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(); $this->invoice->fetch_lines();
@ -1015,7 +1015,7 @@ class Invoices extends DolibarrApi
} }
else else
{ {
throw new RestException(500, 'Discount error'); throw new RestException(500, 'Discount creation error');
$this->db->rollback(); $this->db->rollback();
} }
} }