commit melhorias compras4
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-22 16:28:03 +02:00
parent efd97e265b
commit 36dcfdf00c
118 changed files with 6042 additions and 92 deletions
@@ -0,0 +1,27 @@
{
"date": "2026-11-22",
"status": "authorized_for_qa_implementation_in_progress_see_authorization_and_qa_proofs",
"requirement": "RQ-01 line account assignments and distributions; shared contract extension authorised specifically for development and isolated QA",
"evidence": {
"current_host": "app/Services/BudgetWorkflow.php",
"installed_artifact": "packages/budget-control/src/BudgetControl.php",
"common_source": "C:/laragon/www/sgf-tempo/packages/budget-control/src/BudgetControl.php",
"both_sha256_at_proposal_before_authorized_source_edits": "1349d1ab4ab58a83c9abbf43549ebe7e4ed77717ed5463a2defac748cf7b9a31",
"current_contract": "record(origin, centre, requiredKind, kind, amount, subtotal) and consume(origin, invoice, total, subtotal)",
"limitation": "All entries for a requisition are treated as one origin and use its first budget allocation; calling this contract repeatedly with different centres cannot implement a correct distribution"
},
"requested_scope": [
"Develop and test a versioned optional distribution contract at the common budget source and the SGC host adaptation, in isolated development/QA only",
"Keep all current single-centre commands and previously frozen processes compatible",
"Freeze explicit line/destination identity, version and authorised centre; do not infer external project, asset or production identities",
"Use explicit net and gross minor-unit allocations whose sums equal the authoritative native line/document totals; no presumed percentages, exchange rates or rounding adjustments",
"Revalidate allocations when the approved quotation or invoice basis changes; never silently rescale a prior estimate",
"Partial invoice allocations must be explicit, within the remaining frozen allocations, and reconcile to the native invoice totals",
"Reserve, award-adjust, commit, release and consume all assigned centres atomically through the one common budget authority, with idempotence and no duplicate effects",
"Preserve existing budget classification, tax basis, currency and eligibility rules; no silent exception for an insufficient or unauthorised allocation",
"Retain original documents, relations and audit history; test schema evolution and recovery only in guarded disposable QA databases"
],
"acceptance": ["Old single-centre regressions remain valid", "Exact allocation totals and partial consumption without lost cents", "One operation per original document/event; replay is harmless and changed replay rejected", "Any failed centre validation rolls back the whole distributed command", "Concurrent commands and cancellations cannot overspend or duplicate releases", "Tenant, department, authority, currency and source-version isolation", "No write to the other product database and no duplicate ledger or stock effect"],
"excluded": ["Editing or installing published financial artifacts", "Pilot or SGF runtime activation", "Production migration or data changes", "Real company allocations, budgets or grants", "Payments or accounting postings", "New self-approval or quotation exceptions"],
"recovery": "Prepare and verify compatibility and rollback guards in isolated QA. Existing installations continue using their unchanged pinned artifacts and current single-centre records. Deployment requires a later concrete authorisation."
}