mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-06 03:02:34 +01:00
fixes for check data
This commit is contained in:
parent
78ba574236
commit
e7376aa42b
@ -321,7 +321,7 @@ class CheckData extends Command
|
|||||||
Client::withTrashed()->cursor()->each(function ($client) use ($wrong_paid_to_dates, $credit_total_applied) {
|
Client::withTrashed()->cursor()->each(function ($client) use ($wrong_paid_to_dates, $credit_total_applied) {
|
||||||
$total_invoice_payments = 0;
|
$total_invoice_payments = 0;
|
||||||
|
|
||||||
foreach ($client->invoices->where('is_deleted', false) as $invoice) {
|
foreach ($client->invoices->where('is_deleted', false)->where('status_id', '>', 1) as $invoice) {
|
||||||
$total_amount = $invoice->payments->whereNull('deleted_at')->sum('pivot.amount');
|
$total_amount = $invoice->payments->whereNull('deleted_at')->sum('pivot.amount');
|
||||||
$total_refund = $invoice->payments->whereNull('deleted_at')->sum('pivot.refunded');
|
$total_refund = $invoice->payments->whereNull('deleted_at')->sum('pivot.refunded');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user