Files
Toiminnanohjaus/app/Modules/Jobs/Application/DTOs/JobBillingInfo.php
T
petriandClaude Opus 5.5 5f9423a3c3 Add monthly fee billing lines to the billing material
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]>
2026-11-24 13:23:46 +02:00

36 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Modules\Jobs\Application\DTOs;
use App\Modules\Jobs\Domain\Enums\JobStatus;
use App\Modules\Jobs\Domain\Enums\PaymentBasis;
/**
* A customer job as billing sees it: who is billed, under which billing
* unit and reference, and how (payment basis, quoted amount and monthly
* fee without VAT), and for monthly fees the months it runs.
*/
final readonly class JobBillingInfo
{
public function __construct(
public int $id,
public string $number,
public string $name,
public int $customerId,
public string $customerName,
public JobStatus $status,
public ?PaymentBasis $paymentBasis,
public ?int $quotedAmountCents,
public ?string $customerReference,
public ?int $billingUnitId,
public ?string $billingUnitName,
public ?int $monthlyFeeCents = null,
public ?string $startsOn = null,
public ?string $dueOn = null,
public ?string $completedOn = null,
public string $createdOn = '',
) {}
}