Add Invoice Template Feature for Customizable Invoice Generation #291
+168
−1
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.
This pull request was created by Sweep to resolve the following request by @curtisdelicata:
Continue chatting at https://sweep-chat-demo.vercel.app/c/fa51e9b4-7f52-4ba5-a5f4-31d222c46a11.
Purpose
Implement a flexible invoice template system that allows businesses to create and customize invoice designs, improving branding and professional presentation of invoices.
Description
This pull request introduces a comprehensive invoice template feature that enables teams to create, manage, and apply custom invoice templates. The implementation includes:
InvoiceTemplate
model with fields for company information, logo, header/footer text, and color schemeThe feature allows for more personalized and branded invoice generation, with the flexibility to have multiple templates per team and select a default template automatically.
Summary
Key Changes
InvoiceTemplate
model with team-based scopinginvoice_templates
tableInvoice
model to support template associationBillingService
to automatically select invoice templateInvoiceGenerated
email to include template informationNew Files
app/Models/InvoiceTemplate.php
database/migrations/2024_02_15_000000_create_invoice_templates_table.php
resources/views/invoice-templates/form.blade.php
Modified Files
app/Models/Invoice.php
app/Services/BillingService.php
app/Mail/InvoiceGenerated.php