mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 19:14:36 -04:00
Code cleanup
This commit is contained in:
parent
36c2d94479
commit
e6903984f4
@ -781,7 +781,8 @@ class InvoiceController extends BaseController
|
|||||||
case 'email':
|
case 'email':
|
||||||
//check query parameter for email_type and set the template else use calculateTemplate
|
//check query parameter for email_type and set the template else use calculateTemplate
|
||||||
|
|
||||||
if (request()->has('email_type') && in_array(request()->input('email_type'), ['reminder1', 'reminder2', 'reminder3', 'reminder_endless', 'custom1', 'custom2', 'custom3'])) {
|
// if (request()->has('email_type') && in_array(request()->input('email_type'), ['reminder1', 'reminder2', 'reminder3', 'reminder_endless', 'custom1', 'custom2', 'custom3'])) {
|
||||||
|
if (request()->has('email_type') && property_exists($invoice->company->settings, request()->input('email_type'))) {
|
||||||
$this->reminder_template = $invoice->client->getSetting(request()->input('email_type'));
|
$this->reminder_template = $invoice->client->getSetting(request()->input('email_type'));
|
||||||
} else {
|
} else {
|
||||||
$this->reminder_template = $invoice->calculateTemplate('invoice');
|
$this->reminder_template = $invoice->calculateTemplate('invoice');
|
||||||
|
@ -77,10 +77,6 @@ trait MakesReminders
|
|||||||
|
|
||||||
private function checkEndlessReminder($last_sent_date, $endless_reminder_frequency_id) :bool
|
private function checkEndlessReminder($last_sent_date, $endless_reminder_frequency_id) :bool
|
||||||
{
|
{
|
||||||
// nlog("endless date match = ".$this->addTimeInterval($last_sent_date, $endless_reminder_frequency_id));
|
|
||||||
// nlog("Endless reminder bool = ");
|
|
||||||
// nlog(Carbon::now()->startOfDay()->eq($this->addTimeInterval($last_sent_date, $endless_reminder_frequency_id)));
|
|
||||||
|
|
||||||
if (Carbon::now()->startOfDay()->eq($this->addTimeInterval($last_sent_date, $endless_reminder_frequency_id))) {
|
if (Carbon::now()->startOfDay()->eq($this->addTimeInterval($last_sent_date, $endless_reminder_frequency_id))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user