Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add company to invoice entity - #6095

Open
JoeJoeflyn wants to merge 1 commit into
kimai:mainfrom
JoeJoeflyn:feature/invoice-company-field
Open

add company to invoice entity#6095
JoeJoeflyn wants to merge 1 commit into
kimai:mainfrom
JoeJoeflyn:feature/invoice-company-field

Conversation

@JoeJoeflyn

@JoeJoeflyn JoeJoeflyn commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Closes #5838

The invoice template requires a company, but that company was never stored on the invoice itself. This adds a company field to the Invoice entity, snapshotted at creation time via setModel() — same as vat, dueDays, and currency already are. The company is then preserved for API responses and exports even if the template or customer changes later.

  • new nullable company column on kimai2_invoices (migration included)
  • setModel() copies the template company into the invoice
  • exposed in the API response and export columns
  • tests for the new field, getter/setter, setModel() integration, and API response structure

@JoeJoeflyn
JoeJoeflyn force-pushed the feature/invoice-company-field branch from 124a9f1 to 1ce0453 Compare August 2, 2026 20:20
@JoeJoeflyn JoeJoeflyn changed the title Store company from invoice template on invoice entity add company to invoice entity Aug 2, 2026
@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.76%. Comparing base (8f0514a) to head (1ce0453).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #6095   +/-   ##
=========================================
  Coverage     88.75%   88.76%           
- Complexity    10090    10092    +2     
=========================================
  Files           889      889           
  Lines         32152    32157    +5     
=========================================
+ Hits          28538    28543    +5     
  Misses         3614     3614           
Files with missing lines Coverage Δ
src/Entity/Invoice.php 98.66% <100.00%> (+0.04%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Invoice entity misses the company from the invoice template

1 participant