From b6825703b47d7897d78b4a99456e5ab75d181cac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 24 Oct 2017 12:47:15 +0200 Subject: [PATCH] Update api_invoices.class.php --- htdocs/compta/facture/class/api_invoices.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 1dfaea3d580..52ef2a90d1b 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -77,7 +77,8 @@ class Invoices extends DolibarrApi $this->invoice->totaldeposits = $this->invoice->getSumDepositsUsed(); $this->invoice->resteapayer = price2num($this->invoice->total_ttc - $this->invoice->totalpaye - $this->invoice->totalcreditnotes - $this->invoice->totaldeposits, 'MT'); - // get available discounts + // get available discounts of customer + /* TODO Move this into thirdparty API $soc = new Societe($this->db); if ($this->invoice->socid > 0) $res = $soc->fetch($this->invoice->socid); @@ -89,6 +90,7 @@ class Invoices extends DolibarrApi $this->invoice->absolute_discount = price2num($absolute_discount, 'MT'); $this->invoice->absolute_creditnote = price2num($absolute_creditnote, 'MT'); } + */ if( ! DolibarrApi::_checkAccessToResource('facture',$this->invoice->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);