Materials created before billing months existed have no period, so the
profitability report left out what they billed. Their month is now the
month they were created in, as in the export repository.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Profitability by job and service unit from a period's hours, expenses
and the created billing materials of its months. Hours are costed at one
internal hourly cost, set on the price list maintenance page; a job of
several service units is shared evenly between them.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
- Company details get an optional "Valikon nimi", shown at the left of the
main menu; it falls back to the application name when empty.
- A billing material gets its running number (billing_exports.number) only
when it is created, so discarded drafts leave no gaps. Drafts have no
number; existing created materials are numbered by the migration, and the
CSV file name uses the number.
- TaskAssigneeMigrationTest rolls back from its own migration onward instead
of assuming it is the last one.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Jobs billed by a fixed monthly fee get a monthly fee field, kept behind
the quotes permission like the quoted amount. A billing material now has
a billing month: a new draft adds every monthly fee job with something
to bill, each on an invoice of its own, and bills one line for every
unbilled month from the job's start up to the billing month (or its end
or completion), so skipped months are caught up and no month is billed
twice. Their expenses are billed alongside, their hours are covered by
the fee and marked billed, and the job keeps running.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Management builds the monthly billing material (laskuaineisto) as a
draft: done jobs are added as invoices of their own, combined when the
customer, billing unit and reference allow it, and their billable hours
are set per work type. Creating the material checks the jobs again,
marks the approved hours and billable expenses billed, forms invoice
lines with price and VAT snapshots and moves the jobs to "Lasku luotu".
Fixed price jobs bill their quoted amount once. Billed hours keep their
approval and billed expenses can no longer change. The Fennoa export
and monthly fee lines come later.
Co-Authored-By: Claude Opus 5.5 <[email protected]>