From 74a34acf77088c847370f6126abb37b18a164c19 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Feb 2018 02:14:17 +0100 Subject: [PATCH] Tab vs space --- .../facture/class/api_invoices.class.php | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index e691d497194..c1f8774095a 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -60,30 +60,30 @@ class Invoices extends DolibarrApi * * @throws RestException */ - function get($id) - { + function get($id) + { if(! DolibarrApiAccess::$user->rights->facture->lire) { throw new RestException(401); } - $result = $this->invoice->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Invoice not found'); - } + $result = $this->invoice->fetch($id); + if (! $result) { + throw new RestException(404, 'Invoice not found'); + } - // Get payment details - $this->invoice->totalpaye = $this->invoice->getSommePaiement(); - $this->invoice->totalcreditnotes = $this->invoice->getSumCreditNotesUsed(); - $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 payment details + $this->invoice->totalpaye = $this->invoice->getSommePaiement(); + $this->invoice->totalcreditnotes = $this->invoice->getSumCreditNotesUsed(); + $this->invoice->totaldeposits = $this->invoice->getSumDepositsUsed(); + $this->invoice->resteapayer = price2num($this->invoice->total_ttc - $this->invoice->totalpaye - $this->invoice->totalcreditnotes - $this->invoice->totaldeposits, 'MT'); - if( ! DolibarrApi::_checkAccessToResource('facture',$this->invoice->id)) { + if (! DolibarrApi::_checkAccessToResource('facture',$this->invoice->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } $this->invoice->fetchObjectLinked(); return $this->_cleanObjectDatas($this->invoice); - } + } /** * List invoices