mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 21:54:35 -04:00
Minor fixes
This commit is contained in:
parent
b91c92e99d
commit
f5a9e5ffbe
@ -699,7 +699,7 @@ ORDER BY clients.id;
|
|||||||
invoices ON
|
invoices ON
|
||||||
clients.id=invoices.client_id
|
clients.id=invoices.client_id
|
||||||
WHERE invoices.is_deleted = false
|
WHERE invoices.is_deleted = false
|
||||||
AND invoices.status_id IN (2,3)
|
AND invoices.status_id IN (2,3,4)
|
||||||
GROUP BY clients.id
|
GROUP BY clients.id
|
||||||
HAVING invoice_balance != clients.balance
|
HAVING invoice_balance != clients.balance
|
||||||
ORDER BY clients.id;
|
ORDER BY clients.id;
|
||||||
@ -794,7 +794,7 @@ ORDER BY clients.id;
|
|||||||
ON invoices.client_id = clients.id
|
ON invoices.client_id = clients.id
|
||||||
WHERE invoices.is_deleted = 0
|
WHERE invoices.is_deleted = 0
|
||||||
AND clients.is_deleted = 0
|
AND clients.is_deleted = 0
|
||||||
AND invoices.status_id IN (2,3)
|
AND invoices.status_id IN (2,3,4)
|
||||||
GROUP BY clients.id
|
GROUP BY clients.id
|
||||||
HAVING(invoices_balance != clients.balance)
|
HAVING(invoices_balance != clients.balance)
|
||||||
ORDER BY clients.id;
|
ORDER BY clients.id;
|
||||||
@ -814,7 +814,7 @@ ORDER BY clients.id;
|
|||||||
{
|
{
|
||||||
$client = Client::withTrashed()->find($_client->id);
|
$client = Client::withTrashed()->find($_client->id);
|
||||||
|
|
||||||
$invoice_balance = $client->invoices()->where('is_deleted', false)->whereIn('status_id', [2,3])->sum('balance');
|
$invoice_balance = $client->invoices()->where('is_deleted', false)->whereIn('status_id', [2,3,4])->sum('balance');
|
||||||
|
|
||||||
$ledger = CompanyLedger::where('client_id', $client->id)->orderBy('id', 'DESC')->first();
|
$ledger = CompanyLedger::where('client_id', $client->id)->orderBy('id', 'DESC')->first();
|
||||||
|
|
||||||
@ -850,7 +850,7 @@ ORDER BY clients.id;
|
|||||||
$this->wrong_paid_to_dates = 0;
|
$this->wrong_paid_to_dates = 0;
|
||||||
|
|
||||||
foreach (Client::where('is_deleted', 0)->where('clients.updated_at', '>', now()->subDays(2))->cursor() as $client) {
|
foreach (Client::where('is_deleted', 0)->where('clients.updated_at', '>', now()->subDays(2))->cursor() as $client) {
|
||||||
$invoice_balance = $client->invoices()->where('is_deleted', false)->whereIn('status_id', [2,3])->sum('balance');
|
$invoice_balance = $client->invoices()->where('is_deleted', false)->whereIn('status_id', [2,3,4])->sum('balance');
|
||||||
$ledger = CompanyLedger::where('client_id', $client->id)->orderBy('id', 'DESC')->first();
|
$ledger = CompanyLedger::where('client_id', $client->id)->orderBy('id', 'DESC')->first();
|
||||||
|
|
||||||
if ($ledger && number_format($ledger->balance, 4) != number_format($client->balance, 4)) {
|
if ($ledger && number_format($ledger->balance, 4) != number_format($client->balance, 4)) {
|
||||||
|
@ -87,9 +87,9 @@ class Kernel extends ConsoleKernel
|
|||||||
|
|
||||||
$schedule->job(new SendFailedEmails)->daily()->withoutOverlapping();
|
$schedule->job(new SendFailedEmails)->daily()->withoutOverlapping();
|
||||||
|
|
||||||
$schedule->command('ninja:check-data --database=db-ninja-01')->daily('00:50')->withoutOverlapping();
|
$schedule->command('ninja:check-data --database=db-ninja-01')->daily('01:00')->withoutOverlapping();
|
||||||
|
|
||||||
$schedule->command('ninja:check-data --database=db-ninja-02')->dailyAt('00:55')->withoutOverlapping();
|
$schedule->command('ninja:check-data --database=db-ninja-02')->dailyAt('01:05')->withoutOverlapping();
|
||||||
|
|
||||||
$schedule->command('ninja:s3-cleanup')->dailyAt('23:15')->withoutOverlapping();
|
$schedule->command('ninja:s3-cleanup')->dailyAt('23:15')->withoutOverlapping();
|
||||||
|
|
||||||
|
@ -123,6 +123,7 @@ class PaymentFailedMailer implements ShouldQueue
|
|||||||
$nmo->settings = $settings;
|
$nmo->settings = $settings;
|
||||||
|
|
||||||
NinjaMailerJob::dispatch($nmo);
|
NinjaMailerJob::dispatch($nmo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user