Skip to content

Commit

Permalink
Added invoice refund amount method
Browse files Browse the repository at this point in the history
  • Loading branch information
dumithsalinda committed Feb 17, 2025
1 parent ab7e9d8 commit 47952ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Models/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,8 @@ public function invoiceable()
{
return $this->morphTo('invoiceable');
}
public function refundAmount()
{
return $this->payments()->where('method', 'REFUND')->sum('amount');
}
}

0 comments on commit 47952ae

Please sign in to comment.