mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge branch 'v5-develop' of https://github.com/turbo124/invoiceninja into v5-develop
This commit is contained in:
commit
aa68bc2567
@ -712,6 +712,7 @@ class CheckData extends Command
|
||||
->pluck('p')
|
||||
->first();
|
||||
|
||||
$over_payment = $over_payment*-1;
|
||||
|
||||
$this->logMessage("# {$client->id} # {$client->name} {$client->balance} is invalid should be {$over_payment}");
|
||||
|
||||
@ -719,7 +720,7 @@ class CheckData extends Command
|
||||
|
||||
$this->logMessage("# {$client->id} " . $client->present()->name().' - '.$client->number." Fixing {$client->balance} to 0");
|
||||
|
||||
$client->balance = $over_payment * -1;
|
||||
$client->balance = $over_payment;
|
||||
$client->save();
|
||||
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ class ClientLedgerBalanceUpdate implements ShouldQueue
|
||||
|
||||
MultiDB::setDb($this->company->db);
|
||||
|
||||
CompanyLedger::where('balance', 0)->where('client_id', $this->client->id)->cursor()->each(function ($company_ledger) {
|
||||
CompanyLedger::where('balance', 0)->where('client_id', $this->client->id)->orderBy('updated_at', 'ASC')->cursor()->each(function ($company_ledger) {
|
||||
if ($company_ledger->balance > 0) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user