feat: operational resource procurement facility
Implement RESOURCE-WP-0005: entity register, V0.1 terms parameters, entity association on inventory and planning records, transfer-price and credit-state arithmetic, monthly settlement, and entity views on the portfolio report. Live close emits nothing until delivered cost is known. Handoffs are FIN-WP-0006 and RAILIANCE-WP-0017.
This commit is contained in:
parent
325a505980
commit
f8d1c542d5
37 changed files with 1316 additions and 28 deletions
54
schemas/settlement-statement.schema.json
Normal file
54
schemas/settlement-statement.schema.json
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://coulomb.social/resource-control/settlement-statement.schema.json",
|
||||
"title": "Internal settlement statement v0.1",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schema_version",
|
||||
"record_type",
|
||||
"terms_version",
|
||||
"financial_entity_id",
|
||||
"procuring_entity_id",
|
||||
"period",
|
||||
"statement_date",
|
||||
"due_date",
|
||||
"currency",
|
||||
"line_items",
|
||||
"known_delivered_cost_eur",
|
||||
"known_transfer_price_eur",
|
||||
"unknown_cost_remainder",
|
||||
"prior_outstanding_eur",
|
||||
"payment_recognition",
|
||||
"interest_eur",
|
||||
"new_transfer_charges_eur",
|
||||
"outstanding_eur",
|
||||
"consumption_mode"
|
||||
],
|
||||
"properties": {
|
||||
"schema_version": {"const": "0.1"},
|
||||
"record_type": {"const": "settlement_statement"},
|
||||
"terms_version": {"type": "string", "minLength": 1},
|
||||
"financial_entity_id": {"type": "string", "pattern": "^entity:[a-z0-9]+$"},
|
||||
"procuring_entity_id": {"type": "string", "pattern": "^entity:[a-z0-9]+$"},
|
||||
"period": {"type": "string", "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$"},
|
||||
"statement_date": {"type": "string", "format": "date"},
|
||||
"due_date": {"type": "string", "format": "date"},
|
||||
"currency": {"const": "EUR"},
|
||||
"line_items": {"type": "array"},
|
||||
"known_delivered_cost_eur": {"type": "string", "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$"},
|
||||
"known_transfer_price_eur": {"type": "string", "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$"},
|
||||
"unknown_cost_remainder": {"type": "boolean"},
|
||||
"prior_outstanding_eur": {"type": "string", "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$"},
|
||||
"recognized_payments_eur": {"type": ["string", "null"]},
|
||||
"payment_recognition": {"enum": ["unknown", "recognized"]},
|
||||
"interest_eur": {"type": "string", "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$"},
|
||||
"new_transfer_charges_eur": {"type": "string", "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$"},
|
||||
"outstanding_eur": {"type": "string", "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$"},
|
||||
"credit_limit_eur": {"type": ["string", "null"]},
|
||||
"credit_headroom_eur": {"type": ["string", "null"]},
|
||||
"consumption_mode": {"enum": ["open", "restricted"]},
|
||||
"next_month_allowance_eur": {"type": ["string", "null"]},
|
||||
"payment_instruction": {"type": ["object", "null"]}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue