Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Invoice Template Feature for Customizable Invoice Generation #291

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Dec 24, 2024

This pull request was created by Sweep to resolve the following request by @curtisdelicata:

Description: Allow users to customize invoice templates (e.g., logo, company details).

Tasks:
Develop a system for creating and saving invoice templates.
Implement a UI for customizing templates.
Apply templates to generated invoices.
Acceptance Criteria:
Users can create and apply invoice templates.
Invoices are generated with the selected template.

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:

  • A new InvoiceTemplate model with fields for company information, logo, header/footer text, and color scheme
  • Database migration to support invoice template storage
  • Integration with existing invoice generation process
  • Form for creating and editing invoice templates
  • Ability to set a default template for invoice generation

The 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

  • Added InvoiceTemplate model with team-based scoping
  • Created database migration for invoice_templates table
  • Updated Invoice model to support template association
  • Modified BillingService to automatically select invoice template
  • Updated InvoiceGenerated email to include template information
  • Created a new form view for managing invoice templates

New 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

@curtisdelicata curtisdelicata merged commit 3e0e263 into main Dec 24, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant