More accurate result
This commit is contained in:
parent
74667c2943
commit
925554d15e
@ -95,7 +95,7 @@ abstract class CommonInvoice extends CommonObject
|
|||||||
* This does not include open direct debit requests.
|
* This does not include open direct debit requests.
|
||||||
*
|
*
|
||||||
* @param int $multicurrency Return multicurrency_amount instead of amount
|
* @param int $multicurrency Return multicurrency_amount instead of amount
|
||||||
* @return double Remain of amount to pay
|
* @return double Remain of amount to pay
|
||||||
*/
|
*/
|
||||||
public function getRemainToPay($multicurrency = 0)
|
public function getRemainToPay($multicurrency = 0)
|
||||||
{
|
{
|
||||||
@ -103,7 +103,7 @@ abstract class CommonInvoice extends CommonObject
|
|||||||
$alreadypaid+=$this->getSommePaiement($multicurrency);
|
$alreadypaid+=$this->getSommePaiement($multicurrency);
|
||||||
$alreadypaid+=$this->getSumDepositsUsed($multicurrency);
|
$alreadypaid+=$this->getSumDepositsUsed($multicurrency);
|
||||||
$alreadypaid+=$this->getSumCreditNotesUsed($multicurrency);
|
$alreadypaid+=$this->getSumCreditNotesUsed($multicurrency);
|
||||||
return price2num($this->total_ttc, 'MT') - price2num($alreadypaid, 'MT');
|
return price2num($this->total_ttc - $alreadypaid, 'MT');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user