Merge pull request #7718 from Oeris/develop-api

FIX wrong paramters name in the usecreditnote method
This commit is contained in:
Laurent Destailleur 2017-10-28 22:00:29 +02:00 committed by GitHub
commit da1afa80cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -701,7 +701,7 @@ class Invoices extends DolibarrApi
* @param int $id Id of invoice
* @param int $discountid Id of a discount coming from a credit note
*
* @url POST {id}/usecreditnote/{creditnoteid}
* @url POST {id}/usecreditnote/{discountid}
*
* @return int
* @throws 400
@ -719,7 +719,7 @@ class Invoices extends DolibarrApi
if(empty($id)) {
throw new RestException(400, 'Invoice ID is mandatory');
}
if(empty($creditId)) {
if(empty($discountid)) {
throw new RestException(400, 'Credit ID is mandatory');
}