1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fix for restoring a failed/voided payment

This commit is contained in:
Hillel Coren 2017-09-24 11:52:30 +03:00
parent e1eb97b206
commit 1573a89b56

View File

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