FIX|Missing require in API : markAsCreditAvailable
Quick fix of a problem I encountered earlier when using `markAsCreditAvailable` API method for invoice routes. The method was using the `DiscountAbsolute` class without importing it resulting in a 500 HTTP error.
This commit is contained in:
parent
73b40828c8
commit
609a29219d
@ -996,6 +996,8 @@ class Invoices extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function markAsCreditAvailable($id)
|
public function markAsCreditAvailable($id)
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||||
|
|
||||||
if (!DolibarrApiAccess::$user->rights->facture->creer) {
|
if (!DolibarrApiAccess::$user->rights->facture->creer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user