mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 19:14:41 -04:00
Merge pull request #6139 from turbo124/v5-develop
Fixes for duplicated register header
This commit is contained in:
commit
861f755650
@ -84,6 +84,8 @@ class CheckData extends Command
|
|||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
$time_start = microtime(true);
|
||||||
|
|
||||||
$database_connection = $this->option('database') ? $this->option('database') : 'Connected to Default DB';
|
$database_connection = $this->option('database') ? $this->option('database') : 'Connected to Default DB';
|
||||||
$fix_status = $this->option('fix') ? "Fixing Issues" : "Just checking issues ";
|
$fix_status = $this->option('fix') ? "Fixing Issues" : "Just checking issues ";
|
||||||
|
|
||||||
@ -107,6 +109,8 @@ class CheckData extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->logMessage('Done: '.strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE));
|
$this->logMessage('Done: '.strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE));
|
||||||
|
$this->logMessage('Total execution time in seconds: ' . (microtime(true) - $time_start));
|
||||||
|
|
||||||
$errorEmail = config('ninja.error_email');
|
$errorEmail = config('ninja.error_email');
|
||||||
|
|
||||||
if ($errorEmail) {
|
if ($errorEmail) {
|
||||||
@ -315,13 +319,24 @@ class CheckData extends Command
|
|||||||
Client::withTrashed()->where('is_deleted', 0)->cursor()->each(function ($client) use ($credit_total_applied) {
|
Client::withTrashed()->where('is_deleted', 0)->cursor()->each(function ($client) use ($credit_total_applied) {
|
||||||
$total_invoice_payments = 0;
|
$total_invoice_payments = 0;
|
||||||
|
|
||||||
foreach ($client->invoices()->where('is_deleted', false)->where('status_id', '>', 1)->get() as $invoice) {
|
//commented out 27/06/2021 - client paid to date always increments to the total amount the client has paid
|
||||||
|
// foreach ($client->invoices()->where('is_deleted', false)->where('status_id', '>', 1)->get() as $invoice) {
|
||||||
|
|
||||||
$total_amount = $invoice->payments()->where('is_deleted', false)->whereIn('status_id', [Payment::STATUS_COMPLETED, Payment:: STATUS_PENDING, Payment::STATUS_PARTIALLY_REFUNDED, Payment::STATUS_REFUNDED])->get()->sum('pivot.amount');
|
// $total_amount = $invoice->payments()->where('is_deleted', false)->whereIn('status_id', [Payment::STATUS_COMPLETED, Payment:: STATUS_PENDING, Payment::STATUS_PARTIALLY_REFUNDED, Payment::STATUS_REFUNDED])->get()->sum('pivot.amount');
|
||||||
$total_refund = $invoice->payments()->where('is_deleted', false)->whereIn('status_id', [Payment::STATUS_COMPLETED, Payment:: STATUS_PENDING, Payment::STATUS_PARTIALLY_REFUNDED, Payment::STATUS_REFUNDED])->get()->sum('pivot.refunded');
|
// $total_refund = $invoice->payments()->where('is_deleted', false)->whereIn('status_id', [Payment::STATUS_COMPLETED, Payment:: STATUS_PENDING, Payment::STATUS_PARTIALLY_REFUNDED, Payment::STATUS_REFUNDED])->get()->sum('pivot.refunded');
|
||||||
|
|
||||||
$total_invoice_payments += ($total_amount - $total_refund);
|
// $total_invoice_payments += ($total_amount - $total_refund);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
//commented IN 27/06/2021 - sums ALL client payments
|
||||||
|
$p = Payment::where('client_id', $client->id)
|
||||||
|
->where('is_deleted', 0)
|
||||||
|
->whereIn('status_id', [Payment::STATUS_COMPLETED, Payment:: STATUS_PENDING, Payment::STATUS_PARTIALLY_REFUNDED, Payment::STATUS_REFUNDED]);
|
||||||
|
|
||||||
|
$total_amount = $p->sum('amount');
|
||||||
|
$total_refund = $p->sum('refunded');
|
||||||
|
|
||||||
|
$total_invoice_payments += ($total_amount - $total_refund);
|
||||||
|
|
||||||
// 10/02/21
|
// 10/02/21
|
||||||
foreach ($client->payments as $payment) {
|
foreach ($client->payments as $payment) {
|
||||||
|
@ -129,7 +129,7 @@ class UpdateReminder extends AbstractService
|
|||||||
|
|
||||||
if ($this->invoice->last_sent_date &&
|
if ($this->invoice->last_sent_date &&
|
||||||
(int)$this->settings->endless_reminder_frequency_id > 0) {
|
(int)$this->settings->endless_reminder_frequency_id > 0) {
|
||||||
$reminder_date = $this->addTimeInterval($this->invoice->last_sent_date, (int)$this->settings->num_days_reminder3)->addSeconds($offset);
|
$reminder_date = $this->addTimeInterval($this->invoice->last_sent_date, (int)$this->settings->endless_reminder_frequency_id)->addSeconds($offset);
|
||||||
|
|
||||||
if ($reminder_date->gt(Carbon::parse($this->invoice->next_send_date)));
|
if ($reminder_date->gt(Carbon::parse($this->invoice->next_send_date)));
|
||||||
$date_collection->push($reminder_date);
|
$date_collection->push($reminder_date);
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
<img class="h-32 w-auto" src="{{ $company->present()->logo() }}" alt="{{ ctrans('texts.logo') }}">
|
<img class="h-32 w-auto" src="{{ $company->present()->logo() }}" alt="{{ ctrans('texts.logo') }}">
|
||||||
</div>
|
</div>
|
||||||
<h1 class="text-center text-3xl mt-8">{{ ctrans('texts.register') }}</h1>
|
<h1 class="text-center text-3xl mt-8">{{ ctrans('texts.register') }}</h1>
|
||||||
<h1 class="text-center text-3xl mt-8">{{ ctrans('texts.register') }}</h1>
|
|
||||||
<p class="block text-center text-gray-600">{{ ctrans('texts.register_label') }}</p>
|
<p class="block text-center text-gray-600">{{ ctrans('texts.register_label') }}</p>
|
||||||
|
|
||||||
<form action="{{ route('client.register', request()->route('company_key')) }}" method="POST" x-data="{ more: false }">
|
<form action="{{ route('client.register', request()->route('company_key')) }}" method="POST" x-data="{ more: false }">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user