Merge pull request #14386 from egils-consulting/fix-typos-and-clarify-403-error

Update api_supplier_invoices.class.php
This commit is contained in:
Laurent Destailleur 2020-08-07 11:47:37 +02:00 committed by GitHub
commit 3a7b53cb22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -293,9 +293,9 @@ class SupplierInvoices extends DolibarrApi
}
/**
* Validate an order
* Validate an invoice
*
* @param int $id Order ID
* @param int $id Invoice ID
* @param int $idwarehouse Warehouse ID
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
*
@ -325,7 +325,7 @@ class SupplierInvoices extends DolibarrApi
$result = $this->invoice->validate(DolibarrApiAccess::$user, '', $idwarehouse, $notrigger);
if ($result == 0) {
throw new RestException(304, 'Error nothing done. May be object is already validated');
throw new RestException(304, 'Error nothing done. The invoice is already validated');
}
if ($result < 0) {
throw new RestException(500, 'Error when validating Invoice: '.$this->invoice->error);