12 lines
1.3 KiB
JSON
12 lines
1.3 KiB
JSON
|
|
{
|
||
|
|
"_comment": "SINGLE SOURCE OF TRUTH for splitting the invoice register into INTERNAL and EXTERNAL. An invoice is INTERNAL when the debtor it names is a Mega group entity — billing between our own companies. Everything else is EXTERNAL: a third party outside the group. Read by both invoice pages (components/InvoiceRegisterPage.tsx) through lib/invoice-party.ts, so the two can never disagree about which side of the split a row is on.",
|
||
|
|
"_why": "Every invoice in the register as of 2026-10-08 is billed to Mega Infrastructure (09MIS001) — a Mega group entity — so the whole register was internal. The two pages are a split of ONE collection, never two collections: an invoice can never be invisible on both, and moving a debtor here reclassifies it on both screens at once.",
|
||
|
|
"_matching": "An internal debtor matches on EITHER name or debtor number, case-insensitively, with surrounding whitespace ignored. An invoice naming no debtor at all is NOT internal — it falls to the external page and is marked unclassified rather than quietly filed as internal.",
|
||
|
|
"_addAnEntity": "Add another row when Mega invoices a sister company. Do not add individual sites or projects here — a site is not a legal entity and would misfile the whole invoice.",
|
||
|
|
"internalDebtors": [
|
||
|
|
{
|
||
|
|
"name": "Mega Infrastructure",
|
||
|
|
"debtorNo": "09MIS001"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|