Check Data Script
This commit is contained in:
parent
4f35c6f894
commit
ffc87c4dc1
|
|
@ -301,7 +301,7 @@ class CheckData extends Command
|
|||
$invoice_balance = $client->invoices->where('is_deleted', false)->where('status_id', '>', 1)->sum('balance');
|
||||
$credit_balance = $client->credits->where('is_deleted', false)->sum('balance');
|
||||
|
||||
$invoice_balance += $credit_balance;
|
||||
$invoice_balance -= $credit_balance;
|
||||
|
||||
$ledger = CompanyLedger::where('client_id', $client->id)->orderBy('id', 'DESC')->first();
|
||||
|
||||
|
|
@ -390,7 +390,7 @@ class CheckData extends Command
|
|||
$invoice_balance = Invoice::where('client_id', $client->id)->where('is_deleted', false)->where('status_id', '>', 1)->withTrashed()->sum('balance');
|
||||
$client_balance = Credit::where('client_id', $client->id)->where('is_deleted', false)->withTrashed()->sum('balance');
|
||||
|
||||
$invoice_balance += $client_balance;
|
||||
$invoice_balance -= $client_balance;
|
||||
|
||||
$ledger = CompanyLedger::where('client_id', $client->id)->orderBy('id', 'DESC')->first();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue