Working on recurring invoices + reminders

This commit is contained in:
David Bomba 2020-09-08 21:01:55 +10:00
parent 84ec6b35cd
commit f8f8da830e
2 changed files with 7 additions and 4 deletions

View File

@ -37,7 +37,7 @@ class RecurringInvoicesCron
public function handle() : void
{
/* Get all invoices where the send date is less than NOW + 30 minutes() */
info("Sending recurring invoices {now()}");
info("Sending recurring invoices {Carbon::now()->format('Y-m-d h:i:s')}");
if (! config('ninja.db.multi_db_enabled')) {

View File

@ -66,6 +66,9 @@ class ReminderJob implements ShouldQueue
if ($invoice->isPayable()) {
$reminder_template = $invoice->calculateTemplate();
$invoice->service()->touchReminder($this->reminder_template)->save();
$invoice->invitations->each(function ($invitation) use ($invoice) {
$email_builder = (new InvoiceEmail())->build($invitation);