1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fix for restoring a failed/voided payment

This commit is contained in:
Hillel Coren 2017-09-24 11:52:02 +03:00
parent d691596e06
commit deaf39d29d

View File

@ -295,6 +295,10 @@ class Payment extends EntityModel
*/
public function getCompletedAmount()
{
if ($this->isFailed() || $this->isVoided()) {
return 0;
}
return $this->amount - $this->refunded;
}