Skip to content

[IP-248]: General — Company Branding (logo, colors, fonts) - #704

Merged
nielsdrost7 merged 3 commits into
InvoicePlane:developfrom
KhawarMehfooz:248
Aug 5, 2026
Merged

[IP-248]: General — Company Branding (logo, colors, fonts)#704
nielsdrost7 merged 3 commits into
InvoicePlane:developfrom
KhawarMehfooz:248

Conversation

@KhawarMehfooz

@KhawarMehfooz KhawarMehfooz commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Checklist

Checklist

  • My code follows the code formatting guidelines.
  • I have tested my changes locally.
  • I selected the appropriate branch for this PR.
  • I have rebased my changes on top of the selected branch.
  • I included relevant documentation updates if necessary.
  • I have an accompanying issue ID for this pull request.

Description

Adds company branding — primary color, accent color, font family, and font size — to the General tab of the Company Settings page, and wires those settings (plus the existing invoice logo upload) into actual invoice PDF/preview rendering.

Settings (Modules/Core/Filament/Company/Pages/CompanySettings.php, Modules/Core/Models/Setting.php):

  • New Setting::KEY_PRIMARY_COLOR, KEY_ACCENT_COLOR, KEY_FONT_FAMILY, KEY_FONT_SIZE constants.
  • ColorPicker fields for primary/accent color, a Select for font family (Inter, Roboto, Arial, Helvetica, Georgia, Times New Roman), and a numeric TextInput for font size, all in a new "Company Branding" section of the General tab.
  • Persisted per-company via the existing Setting::saveForCompany / getForCompany mechanism.
  • Reuses the existing invoice logo upload (Setting::KEY_INVOICE_LOGO, shipped in [IP-247]: company-scoped Settings page (Invoices/Quotes/Taxes/Email/System/Dashboard) #686) rather than adding a duplicate logo field.

PDF rendering (Modules/Invoices/Services/InvoiceService.php, Modules/Invoices/resources/views/pdf/invoice.blade.php):

  • InvoiceService::renderHtml() now resolves a resolveBranding() helper that reads the four settings above plus the invoice logo, per-company, and passes them into the PDF/preview Blade view.
  • The invoice template now renders the company logo (if uploaded) and uses the configured colors/font instead of hardcoded values.
  • Falls back to the original hardcoded look (#1f2937 / #6b7280 / DejaVu Sans / 12px, no logo) when a company hasn't set any branding, so existing invoices render unchanged.

Out of scope: Quote PDFs — there is currently no quote PDF generation pipeline in the codebase at all (only a dead legacy template referencing a nonexistent model shape), so branding there would mean building that pipeline from scratch. Left as a separate follow-up.


Related Issue(s)

Fixes #248


Motivation and Context

Issue #248 ("Company Branding: logo, colors, fonts") was partially covered by #686, which explicitly called out that only the invoice-logo upload was implemented and general branding (colors, fonts) — plus actually applying it to invoice PDFs — was still outstanding. This PR closes that remaining gap end-to-end: settings capture and rendering.


Issue Type

  • Bugfix
  • Improvement of an existing feature
  • New feature

Screenshots

Screenshot 2026-08-03 at 3 22 59 PM

coderabbitai[bot]

This comment was marked as outdated.

CodeRabbit flagged that the invoice PDF renders font-family via raw
inline CSS with no @font-face registration, so Dompdf silently falls
back for fonts outside its core/DejaVu substitution table. Addresses
review feedback on InvoicePlane#704.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@InvoicePlane InvoicePlane deleted a comment from coderabbitai Bot Aug 4, 2026
@nielsdrost7
nielsdrost7 merged commit 6c770f0 into InvoicePlane:develop Aug 5, 2026
1 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.

[Settings]: General — Company Branding (logo, colors, fonts)

2 participants