1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Minor fixes

This commit is contained in:
David Bomba 2023-11-13 08:18:30 +11:00
parent 46b28d6b09
commit 73f4417797

View File

@ -37,7 +37,8 @@ class ClientService
public function calculateBalance(?Invoice $invoice = null)
{
$balance = Invoice::where('client_id', $this->client->id)
$balance = Invoice::withTrashed()
->where('client_id', $this->client->id)
->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL])
->where('is_deleted', false)
->sum('balance');