fix(invoices): correct payment-check email template key so dunning email sends#752
Open
Luca-Timo wants to merge 1 commit into
Open
fix(invoices): correct payment-check email template key so dunning email sends#752Luca-Timo wants to merge 1 commit into
Luca-Timo wants to merge 1 commit into
Conversation
…ail sends queuePaymentCheckEmail queued the admin payment-check email with template key 'invoice_payment_check_admin', but no such template exists — the only one is 'invoice_payment_check' (crmEmailTemplates.js:217, seeded by migration 116), which IS the admin "Paid / Partial / Not paid" email. The processor does an exact template_key lookup and throws "template not found", so every dunning admin payment-check email failed, retried to the cap, and got stuck pending. One-word fix: queue 'invoice_payment_check'. Unbreaks the built-in invoice-dunning flow's email step. (Rebased onto the post-decompose invoiceService refactor — the line now lives in invoice/payments.js.)
818b453 to
3682de1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #751.
queuePaymentCheckEmailqueued the admin payment-check email with template keyinvoice_payment_check_admin(invoiceService.js:3059), but no such template exists — the only one isinvoice_payment_check(crmEmailTemplates.js:217, seeded by migration 116), which IS the admin "Paid / Partial / Not paid" email. The processor does an exacttemplate_keylookup (emailProcessor.js:715) and throwsEmail template '…' not found, so every dunning admin payment-check email fails, retries to the cap, and gets stuckpending.One-word fix: queue
invoice_payment_check. Unbreaks the built-in invoice-dunning flow's email step. Verified in the field: the queued row'serror_messagewas exactlyEmail template 'invoice_payment_check_admin' not found.Left as a follow-up (cosmetic, not a break): the dev-tools test-send list still references
invoice_payment_check_admin— that surface already greys out absent templates.