diff --git a/app/Jobs/Ninja/SendReminders.php b/app/Jobs/Ninja/SendReminders.php index 8cb68e400a..09ec0f0f0e 100644 --- a/app/Jobs/Ninja/SendReminders.php +++ b/app/Jobs/Ninja/SendReminders.php @@ -219,7 +219,6 @@ class SendReminders implements ShouldQueue nlog('firing email'); EmailEntity::dispatch($invitation->withoutRelations(), $invitation->company->db, $template)->delay(10); - // event(new InvoiceWasEmailed($invoice->invitations->first(), $invoice->company, Ninja::eventVars(), $template)); $invoice->entityEmailEvent($invoice->invitations->first(), $template); $invoice->sendEvent(Webhook::EVENT_REMIND_INVOICE, "client"); } @@ -231,6 +230,7 @@ class SendReminders implements ShouldQueue if (in_array($template, ['reminder1', 'reminder2', 'reminder3'])) { $invoice->{$template.'_sent'} = now(); } + $invoice->service()->touchReminder($template)->save(); } diff --git a/openapi/api-docs.yaml b/openapi/api-docs.yaml index 0d34fad69d..7b9d82a0fa 100644 --- a/openapi/api-docs.yaml +++ b/openapi/api-docs.yaml @@ -12275,6 +12275,13 @@ paths: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" + - name: email_receipt + in: query + description: | + If true, the payment will be emailed to the client. If false, no email will be sent. This will override any other email settings for payments. + required: false + schema: + type: boolean requestBody: description: "The payment request" required: true diff --git a/openapi/paths/payments.yaml b/openapi/paths/payments.yaml index 87b43a47e1..3fdcb90b8a 100644 --- a/openapi/paths/payments.yaml +++ b/openapi/paths/payments.yaml @@ -89,6 +89,13 @@ - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" + - name: email_receipt + in: query + description: | + If true, the payment will be emailed to the client. If false, no email will be sent. This will override any other email settings for payments. + required: false + schema: + type: boolean requestBody: description: "The payment request" required: true