mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 00:24:38 -04:00
Fixes for company ledger
This commit is contained in:
parent
d8b37a08ab
commit
accd408ba1
@ -47,7 +47,7 @@ class ClientLedgerBalanceUpdate implements ShouldQueue
|
|||||||
*/
|
*/
|
||||||
public function handle() :void
|
public function handle() :void
|
||||||
{
|
{
|
||||||
nlog("Updating company ledgers");
|
nlog("Updating company ledger for client ". $this->client->id);
|
||||||
|
|
||||||
MultiDB::setDb($this->company->db);
|
MultiDB::setDb($this->company->db);
|
||||||
|
|
||||||
@ -62,8 +62,14 @@ class ClientLedgerBalanceUpdate implements ShouldQueue
|
|||||||
->orderBy('id', 'DESC')
|
->orderBy('id', 'DESC')
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if(!$last_record)
|
if(!$last_record){
|
||||||
return;
|
|
||||||
|
$last_record = CompanyLedger::where('client_id', $company_ledger->client_id)
|
||||||
|
->where('company_id', $company_ledger->company_id)
|
||||||
|
->orderBy('id', 'DESC')
|
||||||
|
->first();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
nlog("Updating Balance NOW");
|
nlog("Updating Balance NOW");
|
||||||
|
|
||||||
@ -72,13 +78,7 @@ class ClientLedgerBalanceUpdate implements ShouldQueue
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
nlog("Finished checking company ledgers");
|
nlog("Updating company ledger for client ". $this->client->id);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function checkLedger()
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user