mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 06:14:31 -04:00
Fix for restoring a failed/voided payment
This commit is contained in:
parent
d691596e06
commit
deaf39d29d
@ -295,6 +295,10 @@ class Payment extends EntityModel
|
|||||||
*/
|
*/
|
||||||
public function getCompletedAmount()
|
public function getCompletedAmount()
|
||||||
{
|
{
|
||||||
|
if ($this->isFailed() || $this->isVoided()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return $this->amount - $this->refunded;
|
return $this->amount - $this->refunded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user