Compare commits
4
Commits
2e21ca4500
...
69f2e365bf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69f2e365bf | ||
|
|
4e97cd05ea | ||
|
|
1f7fc13872 | ||
|
|
0eb2c485cc |
@@ -10450,5 +10450,527 @@
|
||||
},
|
||||
"authenticated_destination": "Fresh read confirmed686328a0;installer inactive",
|
||||
"new_backup_restore": "Verified fresh backup and real isolated restore;no active restore performed"
|
||||
},
|
||||
"iva_l1_g4e_homologation_20261024": {
|
||||
"status": "installed_delta_verified_partial_L1",
|
||||
"candidate": "38faeac6",
|
||||
"QA_record": "fae8162c",
|
||||
"fresh_remote_main": "686328a0853a1165872b5eb8163f7223600033ea",
|
||||
"coverage": {
|
||||
"group": "G4E",
|
||||
"branches": {
|
||||
"P061": "export_nonresident_buyer",
|
||||
"P069": "export_diplomatic_mission",
|
||||
"P070": "export_international_organisation",
|
||||
"P071": "export_humanitarian_organisation"
|
||||
},
|
||||
"branch_count": 4,
|
||||
"treatment_count": 4,
|
||||
"scope": "2026/MZN/05; identified export/private-use exclusions/regulation/agreement/recognition conditions or explicit projection assumptions"
|
||||
},
|
||||
"runtime_delta": [
|
||||
{
|
||||
"path": "resources/js/lib/iva-export-beneficiaries.ts",
|
||||
"sha256_LF": "5eb2e1dce0257a261da0b751372865812020c0dc671324992b4e932322f72259"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/lib/iva-operations.ts",
|
||||
"sha256_LF": "1b074ef324c9d3dba82d20cbb3860acee2cd3f7db906017f930133e6892defad"
|
||||
}
|
||||
],
|
||||
"counts_current": {
|
||||
"delivered": 62,
|
||||
"QA": 0,
|
||||
"functional_pending": 70,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"counts_after_delivery_only": {
|
||||
"delivered": 62,
|
||||
"QA": 0,
|
||||
"functional_pending": 70,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"proofs": "3newfrontend/7withG4D;APIQA1/39;18priorbooks intact/current;types/build;Tempo manual reply ja efectuado;no accepted proof repeated",
|
||||
"rollback": "l1-g3-readonly-rollback-20261024.patch checked on G4E candidate, not applied; retain readers/history/reports; previous release and fresh verified backup required",
|
||||
"activation": "Existing Git normal FF/webhook/installer; no migrations/imports/permission changes or formal fiscal activation",
|
||||
"backup_restore": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g4e-delivery-20261024/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "e3383fdae174a5157063d5b94412ac93069088822891b07ebbb2ba640fe72f55",
|
||||
"files_sha256": "f4c67fad0981f50424a772f8133368af0d652bccaa4fc3ca7524abda70fb94c5",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g4e_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "e3383fdae174a5157063d5b94412ac93069088822891b07ebbb2ba640fe72f55",
|
||||
"active_database_writes": 0
|
||||
}
|
||||
},
|
||||
"served_revision_and_delta": "verified",
|
||||
"limits": "No blanket exemption by recipient; no certification of agreement,recognition or export. Missing condition remains indeterminate; preserve price/currency/period/history. Beverages deduction/refund remainsL2/L3,not closed.",
|
||||
"P001": "05/06 only",
|
||||
"L1_complete": false,
|
||||
"statistics_AI": "deferred",
|
||||
"authenticated_preflight": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "686328a0853a1165872b5eb8163f7223600033ea",
|
||||
"release": "/var/www/investmoz-homologacao/releases/686328a0853a1165872b5eb8163f7223600033ea-81b13983",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/679203d4b13cd5b88ab05a0da539c359c37cc426-6ad3a32e",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"current_link": "/var/www/investmoz-homologacao/releases/686328a0853a1165872b5eb8163f7223600033ea-81b13983",
|
||||
"release_revision": {
|
||||
"commit": "686328a0853a1165872b5eb8163f7223600033ea",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T16:09:18.914806+00:00",
|
||||
"manifest_sha256": "c8a33831cec8c9c6cb0dea4a54083f2a86c1395879c4378470d2da61e4a97a60"
|
||||
},
|
||||
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
|
||||
"configuration_keys": [
|
||||
"repository",
|
||||
"branch",
|
||||
"target_url",
|
||||
"legacy_root",
|
||||
"state_root",
|
||||
"release_root",
|
||||
"current_link",
|
||||
"shared_assets",
|
||||
"php",
|
||||
"schema_contract",
|
||||
"ci_environment",
|
||||
"postgis_image",
|
||||
"test_database",
|
||||
"qa_port",
|
||||
"retention",
|
||||
"webhook_secret_file"
|
||||
],
|
||||
"safe_paths": {
|
||||
"repository": "nala/Investidor-V2",
|
||||
"release_root": "/var/www/investmoz-homologacao/releases",
|
||||
"postgis_image": "postgis/postgis@sha256:01a6a70e41e6c4467c8f55f6063555ed72db2d6662cd0d571040d42eadaeb6f6"
|
||||
},
|
||||
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604"
|
||||
},
|
||||
"authenticated_destination": "Fresh read confirmed686328a0;installer inactive",
|
||||
"new_backup_restore": "Verified fresh backup and real isolated restore;no active restore performed",
|
||||
"beverages_followup": {
|
||||
"source": "CIVA13(2),20(1)(d)",
|
||||
"L2": "Dedução do IVA da via13(2),com montante/documento/condições próprios",
|
||||
"L3": "Restituição da via13(2),conforme procedimento aplicável;pedido não equivale a deferimento",
|
||||
"closed_by_G4E": false
|
||||
},
|
||||
"served_commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"installation": {
|
||||
"protected": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"release": "/var/www/investmoz-homologacao/releases/2e21ca45002b76adcef0347135783c706d37dd42-a5faea22",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/686328a0853a1165872b5eb8163f7223600033ea-81b13983",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"runtime_files_verified": 2,
|
||||
"persistent_files_and_env_verified": 369,
|
||||
"tables_compared": 174,
|
||||
"changed_tables": {
|
||||
"cache": {
|
||||
"before": {
|
||||
"rows": 105,
|
||||
"checksum": "33780b9b4fbaaf7e714478b72e2c30bb"
|
||||
},
|
||||
"after": {
|
||||
"rows": 105,
|
||||
"checksum": "59a75fda1325bd5a60ce3b26253a2a38"
|
||||
}
|
||||
},
|
||||
"sessions": {
|
||||
"before": {
|
||||
"rows": 20,
|
||||
"checksum": "c48fe23dffea4c1539854f351436ee68"
|
||||
},
|
||||
"after": {
|
||||
"rows": 21,
|
||||
"checksum": "b009a6a82a84f902064f25f5a6604253"
|
||||
}
|
||||
}
|
||||
},
|
||||
"preserved_counts": {
|
||||
"published_fiches": 29,
|
||||
"relations": 28,
|
||||
"geometries": 408
|
||||
},
|
||||
"migration_count": 0,
|
||||
"content_imports": 0,
|
||||
"comparison_role": "postgres_before_and_after;sameexportedsnapshotbaseline;noapplicationRLSvisibilityinference",
|
||||
"writes_by_verification": 0
|
||||
},
|
||||
"public": {
|
||||
"status": "installed_delta_verified",
|
||||
"served_revision": {
|
||||
"commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T16:27:47.396813+00:00",
|
||||
"manifest_sha256": "9b28c92c584ad406e17d01ffc3fa982b9299195b371e1c5311626b9025a22615"
|
||||
},
|
||||
"manifest_hash_matches": true,
|
||||
"compiled_delta_markers": {
|
||||
"export-beneficiaries/1": [
|
||||
"assets/project-dossier-C3cf2J1H.js"
|
||||
],
|
||||
"export_nonresident_buyer": [
|
||||
"assets/project-dossier-C3cf2J1H.js"
|
||||
],
|
||||
"export_diplomatic_mission": [
|
||||
"assets/project-dossier-C3cf2J1H.js"
|
||||
],
|
||||
"export_international_organisation": [
|
||||
"assets/project-dossier-C3cf2J1H.js"
|
||||
],
|
||||
"export_humanitarian_organisation": [
|
||||
"assets/project-dossier-C3cf2J1H.js"
|
||||
]
|
||||
},
|
||||
"assets": [
|
||||
{
|
||||
"file": "assets/project-dossier-document-CtNVSk-9.js",
|
||||
"status": 200,
|
||||
"sha256": "124730663c671afeeab8007eff2148d17702bf80b8fd0a7c962806878a8fafce"
|
||||
},
|
||||
{
|
||||
"file": "assets/simulation-form-CPZAFZU3.js",
|
||||
"status": 200,
|
||||
"sha256": "c6bcf64e60a5eeac0cafe3dc055dc5544162f21942ee08b34d51bc6d52947567"
|
||||
},
|
||||
{
|
||||
"file": "assets/services-DK55Gu8i.js",
|
||||
"status": 200,
|
||||
"sha256": "d96320fdc19fec053fe17efc2eb19e055463c5e5727a9c9b2dafabcd8f106519"
|
||||
},
|
||||
{
|
||||
"file": "assets/project-dossier-C3cf2J1H.js",
|
||||
"status": 200,
|
||||
"sha256": "c88e6e9641f9c8eeacece38fbeffd547f86fb603b60899db915576b5faaa74ed"
|
||||
}
|
||||
],
|
||||
"simulator_status": 200,
|
||||
"simulator_entry": "assets/app-Bb2v1uvn.js",
|
||||
"existing_fiscal_availability": {
|
||||
"data": {
|
||||
"enabled": true,
|
||||
"coverage_start": "2026-01-01",
|
||||
"coverage_end": "2026-12-31",
|
||||
"message": "IVA geral sobre base líquida disponível; enquadramento declarado."
|
||||
}
|
||||
},
|
||||
"synthetic_private_writes": 0,
|
||||
"method": "Read-only installedrevision/manifest/newcompiledcatalogueandreaders/simulatorentry;acceptedQAproofsreused"
|
||||
},
|
||||
"installer": {
|
||||
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"release": "/var/www/investmoz-homologacao/releases/2e21ca45002b76adcef0347135783c706d37dd42-a5faea22",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/686328a0853a1165872b5eb8163f7223600033ea-81b13983",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"latest_report": {
|
||||
"status": "installed",
|
||||
"commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"release": "/var/www/investmoz-homologacao/releases/2e21ca45002b76adcef0347135783c706d37dd42-a5faea22",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/686328a0853a1165872b5eb8163f7223600033ea-81b13983",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0,
|
||||
"requested_commits": [
|
||||
"2e21ca45002b76adcef0347135783c706d37dd42"
|
||||
],
|
||||
"finished_at": "2026-10-24T16:27:50.225953+00:00"
|
||||
},
|
||||
"log_file": "1792859179948208531.log",
|
||||
"summaries": [
|
||||
"OK (1 test, 3106 assertions)",
|
||||
"built in 24.64s",
|
||||
"OK (59 tests, 317 assertions)",
|
||||
"# tests 292",
|
||||
"# pass 292",
|
||||
"# fail 0"
|
||||
],
|
||||
"log_bytes": 113481
|
||||
},
|
||||
"rollback_executed": false
|
||||
},
|
||||
"authentication_previous_session": "Previous session state stale: no session process or established SSH connection; preflight request not consumed; fresh authentication required",
|
||||
"authentication": "Fresh authenticated preflight and verified backup/restore completed before Git fast-forward"
|
||||
},
|
||||
"iva_l1_g5a_special_regimes_QA_demonstrated_20261024": {
|
||||
"key": "iva_l1_g5a_special_regimes_QA_demonstrated_20261024",
|
||||
"status": "demonstrated_QA_not_installed",
|
||||
"candidate": "1f7fc13872bd706f583a6f4d29024cd3c22ec265",
|
||||
"base": "0eb2c485",
|
||||
"homologation": "2e21ca45/0eb2c485",
|
||||
"group": "G5A",
|
||||
"branches": {
|
||||
"AUD-SIM-L1-P081": [
|
||||
"regime_dispatch_goods",
|
||||
"regime_dispatch_transport"
|
||||
],
|
||||
"AUD-SIM-L1-P082": [
|
||||
"regime_internal_goods",
|
||||
"regime_internal_services"
|
||||
],
|
||||
"AUD-SIM-L1-P083": [
|
||||
"regime_transit_goods",
|
||||
"regime_transit_transport"
|
||||
]
|
||||
},
|
||||
"branch_count": 3,
|
||||
"treatment_count": 6,
|
||||
"source": "CIVA14(1)(b/c/d),PDF13/p1426(271),19(1)(b)(iv),PDF15/p1426(273);Lei22/2022art1;Lei10/2025art1/PDF12–13; fontes aceites, texto/remissões conferidos",
|
||||
"new_field": "specialRegime opcional nos livros anteriores,obrigatório nos seis tratamentos; selecção apenas do regime compatível com a alínea; escolha não comprova as condições",
|
||||
"preservation": {
|
||||
"delivered": 62,
|
||||
"prior_books": 19,
|
||||
"prior_books_identical_current_without_recalculation": true,
|
||||
"UI_prior_books_identical": true,
|
||||
"confirmed_losses": [],
|
||||
"active_inventory": "Accepted G4E receipt reused; no fresh active query/mutation claimed"
|
||||
},
|
||||
"tests": {
|
||||
"frontend_new": 4,
|
||||
"API_tests": 1,
|
||||
"API_assertions": 44,
|
||||
"QA_database": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"types": "passed",
|
||||
"production_build": "passed; existing plugin timing warnings",
|
||||
"QA_build": "passed; existing future config/chunk size warnings",
|
||||
"QA_storage": "save/recover/reject passed in temporary directory",
|
||||
"UI": {
|
||||
"actor": "Codex",
|
||||
"method": "Edge extension/CUA observed actions",
|
||||
"URL": "http://127.0.0.1:18640/g5a.html",
|
||||
"observed": [
|
||||
"six distinct treatments initially visible",
|
||||
"no-final-use condition unchecked -> indeterminate; price100MZN retained",
|
||||
"unknown regime -> indeterminate; price/currency/period retained",
|
||||
"restore regime and explicitly recheck conditions ->600MZN/05",
|
||||
"Guardar -> Recuperar -> Relatório with context/regime/source and totals",
|
||||
"three previous results in history;19priorbooks unchanged"
|
||||
],
|
||||
"manual_Tempo_reply": null,
|
||||
"screenshot": "outputs/iva-l1-g5-regimes-20261024/qa-recovered-report.png",
|
||||
"screenshot_sha256": "ec68a1287ade198f34544fed0e5b1f49a6c15c2e6855fcaf13dc34ceb45c8772"
|
||||
},
|
||||
"Word_PDF": "accepted exporter/numeric proofs reused; no new pagination claim"
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 62,
|
||||
"QA": 3,
|
||||
"functional_pending": 67,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"G5": {
|
||||
"QA": 3,
|
||||
"functional_pending": 4
|
||||
},
|
||||
"limits": "2026/MZN; condição inicial14(1),regime/destino/permanência e ligação directa próprios; preço distinto dos bens/serviços. Sem isenção pelo mapa, certificação de regime, cálculo da própria importação/saída, aquisições14(2),dedução automática ou submissãoAT. P080/P084/P085/P086 continuam pendentes. L1aberto;P001só05/06;bebidasL2/L3;Estatísticas/IAadiadas.",
|
||||
"G4E_summary_reused": {
|
||||
"P061": "export_nonresident_buyer",
|
||||
"P069": "export_diplomatic_mission",
|
||||
"P070": "export_international_organisation",
|
||||
"P071": "export_humanitarian_organisation"
|
||||
}
|
||||
},
|
||||
"iva_l1_g5a_delivery_preparation_20261024": {
|
||||
"status": "ready_after_fresh_authenticated_preflight_and_verified_backup_restore",
|
||||
"candidate": "1f7fc13872bd706f583a6f4d29024cd3c22ec265",
|
||||
"base": "0eb2c485",
|
||||
"last_known_remote_main": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"fresh_destination_preflight": "Verified authenticated installed/current-link/build revision2e21ca45;installer inactive;existing authenticated session reused",
|
||||
"coverage": {
|
||||
"group": "G5A",
|
||||
"branches": {
|
||||
"AUD-SIM-L1-P081": [
|
||||
"regime_dispatch_goods",
|
||||
"regime_dispatch_transport"
|
||||
],
|
||||
"AUD-SIM-L1-P082": [
|
||||
"regime_internal_goods",
|
||||
"regime_internal_services"
|
||||
],
|
||||
"AUD-SIM-L1-P083": [
|
||||
"regime_transit_goods",
|
||||
"regime_transit_transport"
|
||||
]
|
||||
},
|
||||
"branch_count": 3,
|
||||
"treatment_count": 6,
|
||||
"scope": "2026/MZN;CIVA14(1)(b/c/d),19(1)(b)(iv)"
|
||||
},
|
||||
"runtime_delta": [
|
||||
{
|
||||
"path": "resources/js/components/simulation-operations.tsx",
|
||||
"sha256_LF": "ef1019201ef546aee7dbd312741ec9653afdd3bb9c94777ea4735682506b6633"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/lib/iva-operations.ts",
|
||||
"sha256_LF": "e9d2b0d7ed97ef9034f151b88e819e895666048f1d362a81d88855bad8e44f82"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/lib/iva-special-regimes.ts",
|
||||
"sha256_LF": "76098c658dcaf7bb09c68664001fdd5a2a6e9e2c401d0dd0d1cdca8ae710f4ab"
|
||||
}
|
||||
],
|
||||
"counts_current": {
|
||||
"delivered": 62,
|
||||
"QA": 3,
|
||||
"functional_pending": 67,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"counts_after_delivery_only": {
|
||||
"delivered": 65,
|
||||
"QA": 0,
|
||||
"functional_pending": 67,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"proofs_reused": {
|
||||
"frontend_new": 4,
|
||||
"API_tests": 1,
|
||||
"API_assertions": 44,
|
||||
"QA_database": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"types": "passed",
|
||||
"production_build": "passed; existing plugin timing warnings",
|
||||
"QA_build": "passed; existing future config/chunk size warnings",
|
||||
"QA_storage": "save/recover/reject passed in temporary directory",
|
||||
"UI": {
|
||||
"actor": "Codex",
|
||||
"method": "Edge extension/CUA observed actions",
|
||||
"URL": "http://127.0.0.1:18640/g5a.html",
|
||||
"observed": [
|
||||
"six distinct treatments initially visible",
|
||||
"no-final-use condition unchecked -> indeterminate; price100MZN retained",
|
||||
"unknown regime -> indeterminate; price/currency/period retained",
|
||||
"restore regime and explicitly recheck conditions ->600MZN/05",
|
||||
"Guardar -> Recuperar -> Relatório with context/regime/source and totals",
|
||||
"three previous results in history;19priorbooks unchanged"
|
||||
],
|
||||
"manual_Tempo_reply": null,
|
||||
"screenshot": "outputs/iva-l1-g5-regimes-20261024/qa-recovered-report.png",
|
||||
"screenshot_sha256": "ec68a1287ade198f34544fed0e5b1f49a6c15c2e6855fcaf13dc34ceb45c8772"
|
||||
},
|
||||
"Word_PDF": "accepted exporter/numeric proofs reused; no new pagination claim"
|
||||
},
|
||||
"rollback": "l1-g3-readonly-rollback-20261024.patch checked on G5A candidate,not applied;readers/history/reports retained;fresh backup and previous release must be preserved",
|
||||
"backup_restore": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g5a-delivery-20261024/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "4568a12444365980c0265429521f7e13df67a03c116103ec18163f8c2feaa9de",
|
||||
"files_sha256": "2016c081b509c976eda3d809b4481147501468295bcb51f586ea989560ba7c59",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g5a_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "4568a12444365980c0265429521f7e13df67a03c116103ec18163f8c2feaa9de",
|
||||
"active_database_writes": 0
|
||||
}
|
||||
},
|
||||
"activation": "Existing Git FF/webhook/installer when delivery is undertaken; no migrations/imports/permission changes or synthetic active tests",
|
||||
"served_revision_and_delta": "pending installation;homologation remains2e21ca45/0eb2c485",
|
||||
"limits": "2026/MZN; condição inicial14(1),regime/destino/permanência e ligação directa próprios; preço distinto dos bens/serviços. Sem isenção pelo mapa, certificação de regime, cálculo da própria importação/saída, aquisições14(2),dedução automática ou submissãoAT. P080/P084/P085/P086 continuam pendentes. L1aberto;P001só05/06;bebidasL2/L3;Estatísticas/IAadiadas.",
|
||||
"L1_complete": false,
|
||||
"P001": "05/06 only",
|
||||
"beverages": "L2/L3;not closed",
|
||||
"statistics_AI": "deferred",
|
||||
"authenticated_preflight": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"release": "/var/www/investmoz-homologacao/releases/2e21ca45002b76adcef0347135783c706d37dd42-a5faea22",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/686328a0853a1165872b5eb8163f7223600033ea-81b13983",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"current_link": "/var/www/investmoz-homologacao/releases/2e21ca45002b76adcef0347135783c706d37dd42-a5faea22",
|
||||
"release_revision": {
|
||||
"commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T16:27:47.396813+00:00",
|
||||
"manifest_sha256": "9b28c92c584ad406e17d01ffc3fa982b9299195b371e1c5311626b9025a22615"
|
||||
},
|
||||
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
|
||||
"configuration_keys": [
|
||||
"repository",
|
||||
"branch",
|
||||
"target_url",
|
||||
"legacy_root",
|
||||
"state_root",
|
||||
"release_root",
|
||||
"current_link",
|
||||
"shared_assets",
|
||||
"php",
|
||||
"schema_contract",
|
||||
"ci_environment",
|
||||
"postgis_image",
|
||||
"test_database",
|
||||
"qa_port",
|
||||
"retention",
|
||||
"webhook_secret_file"
|
||||
],
|
||||
"safe_paths": {
|
||||
"repository": "nala/Investidor-V2",
|
||||
"release_root": "/var/www/investmoz-homologacao/releases",
|
||||
"postgis_image": "postgis/postgis@sha256:01a6a70e41e6c4467c8f55f6063555ed72db2d6662cd0d571040d42eadaeb6f6"
|
||||
},
|
||||
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604"
|
||||
},
|
||||
"authenticated_destination": "Fresh read confirmed2e21ca45;installer inactive",
|
||||
"new_backup_restore": "Verified fresh backup and real isolated restore;no active restore performed",
|
||||
"user_instruction": {
|
||||
"QA_acceptance": "G5A concluído em QA segundo o relatório4e97cd05;seis tratamentos correspondem aos três ramosP081–P083",
|
||||
"delivery": "Integrar e disponibilizar pelo processoGit existente,preservando alterações concorrentes e conferindo apenas o delta instalado",
|
||||
"proofs": "Accepted QA proofs reused;no new functional/manual proof requested",
|
||||
"constraints": "L1open;P00105/06;beveragesL2/L3;StatisticsAIdeferred"
|
||||
},
|
||||
"concurrency": {
|
||||
"fresh_origin_main": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"fresh_authenticated_destination": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"incoming_changes_since_G4E": [],
|
||||
"preserved_local_commits": [
|
||||
"0eb2c485cc13e0ecbc6fa448c95425a8ab8f05b4",
|
||||
"1f7fc13872bd706f583a6f4d29024cd3c22ec265",
|
||||
"4e97cd05ea09e5dd2e74ec3264928a2f1f61858c"
|
||||
],
|
||||
"integration": "Normal Git fast-forward,without force;fetch/ancestor guard repeated immediately before push"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"key": "iva_l1_g4e_beneficiaries_code_API_QA_visual_pending_20261024",
|
||||
"status": "demonstrated_QA_not_installed",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"base": "3be371c8",
|
||||
"group": "G4E",
|
||||
"branches": {
|
||||
@@ -38,8 +38,8 @@
|
||||
},
|
||||
"limits": "2026/MZN; projecção sob condições/documento ou pressuposto expresso, sem certificar exportação, acordo, reconhecimento ou despacho. Sem isenção geral do destinatário, dedução automática de compras, apuramento integral IVA ou submissãoAT. Bebidas permanecemL2/L3; P001só05/06; Estatísticas/IAadiadas.",
|
||||
"counts": {
|
||||
"delivered": 58,
|
||||
"QA_ready_for_delivery": 4,
|
||||
"delivered": 62,
|
||||
"QA_ready_for_delivery": 0,
|
||||
"functional_pending": 70,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
@@ -82,5 +82,18 @@
|
||||
"url": "http://127.0.0.1:18639/g4e.html",
|
||||
"reason": "Browser inventory empty; Edge reports Browser is not available. No security setting changed or workaround.",
|
||||
"request": "Quatro tratamentos; retirar condição de acordo/reconhecimento torna apuramento indeterminado sem apagar preço; Guardar → Recuperar → Relatório; comparar G4D preservado."
|
||||
}
|
||||
},
|
||||
"delivery_followup": {
|
||||
"served_commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"record": "iva_l1_g4e_homologation_20261024",
|
||||
"receipt": "l1-g4e-delivery-20261024.json"
|
||||
},
|
||||
"qa_acceptance_counts": {
|
||||
"delivered": 58,
|
||||
"QA_ready_for_delivery": 4,
|
||||
"functional_pending": 70,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"qa_acceptance_status": "demonstrated_QA_not_installed"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"key": "iva_l1_g5a_special_regimes_QA_demonstrated_20261024",
|
||||
"status": "demonstrated_QA_not_installed",
|
||||
"candidate": "1f7fc13872bd706f583a6f4d29024cd3c22ec265",
|
||||
"base": "0eb2c485",
|
||||
"homologation": "2e21ca45/0eb2c485",
|
||||
"group": "G5A",
|
||||
"branches": {
|
||||
"AUD-SIM-L1-P081": [
|
||||
"regime_dispatch_goods",
|
||||
"regime_dispatch_transport"
|
||||
],
|
||||
"AUD-SIM-L1-P082": [
|
||||
"regime_internal_goods",
|
||||
"regime_internal_services"
|
||||
],
|
||||
"AUD-SIM-L1-P083": [
|
||||
"regime_transit_goods",
|
||||
"regime_transit_transport"
|
||||
]
|
||||
},
|
||||
"branch_count": 3,
|
||||
"treatment_count": 6,
|
||||
"source": "CIVA14(1)(b/c/d),PDF13/p1426(271),19(1)(b)(iv),PDF15/p1426(273);Lei22/2022art1;Lei10/2025art1/PDF12–13; fontes aceites, texto/remissões conferidos",
|
||||
"new_field": "specialRegime opcional nos livros anteriores,obrigatório nos seis tratamentos; selecção apenas do regime compatível com a alínea; escolha não comprova as condições",
|
||||
"preservation": {
|
||||
"delivered": 62,
|
||||
"prior_books": 19,
|
||||
"prior_books_identical_current_without_recalculation": true,
|
||||
"UI_prior_books_identical": true,
|
||||
"confirmed_losses": [],
|
||||
"active_inventory": "Accepted G4E receipt reused; no fresh active query/mutation claimed"
|
||||
},
|
||||
"tests": {
|
||||
"frontend_new": 4,
|
||||
"API_tests": 1,
|
||||
"API_assertions": 44,
|
||||
"QA_database": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"types": "passed",
|
||||
"production_build": "passed; existing plugin timing warnings",
|
||||
"QA_build": "passed; existing future config/chunk size warnings",
|
||||
"QA_storage": "save/recover/reject passed in temporary directory",
|
||||
"UI": {
|
||||
"actor": "Codex",
|
||||
"method": "Edge extension/CUA observed actions",
|
||||
"URL": "http://127.0.0.1:18640/g5a.html",
|
||||
"observed": [
|
||||
"six distinct treatments initially visible",
|
||||
"no-final-use condition unchecked -> indeterminate; price100MZN retained",
|
||||
"unknown regime -> indeterminate; price/currency/period retained",
|
||||
"restore regime and explicitly recheck conditions ->600MZN/05",
|
||||
"Guardar -> Recuperar -> Relatório with context/regime/source and totals",
|
||||
"three previous results in history;19priorbooks unchanged"
|
||||
],
|
||||
"manual_Tempo_reply": null,
|
||||
"screenshot": "outputs/iva-l1-g5-regimes-20261024/qa-recovered-report.png",
|
||||
"screenshot_sha256": "ec68a1287ade198f34544fed0e5b1f49a6c15c2e6855fcaf13dc34ceb45c8772"
|
||||
},
|
||||
"Word_PDF": "accepted exporter/numeric proofs reused; no new pagination claim"
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 62,
|
||||
"QA": 3,
|
||||
"functional_pending": 67,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"G5": {
|
||||
"QA": 3,
|
||||
"functional_pending": 4
|
||||
},
|
||||
"limits": "2026/MZN; condição inicial14(1),regime/destino/permanência e ligação directa próprios; preço distinto dos bens/serviços. Sem isenção pelo mapa, certificação de regime, cálculo da própria importação/saída, aquisições14(2),dedução automática ou submissãoAT. P080/P084/P085/P086 continuam pendentes. L1aberto;P001só05/06;bebidasL2/L3;Estatísticas/IAadiadas.",
|
||||
"G4E_summary_reused": {
|
||||
"P061": "export_nonresident_buyer",
|
||||
"P069": "export_diplomatic_mission",
|
||||
"P070": "export_international_organisation",
|
||||
"P071": "export_humanitarian_organisation"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"status": "ready_after_fresh_authenticated_preflight_and_verified_backup_restore",
|
||||
"status": "installed_delta_verified_partial_L1",
|
||||
"candidate": "38faeac6",
|
||||
"QA_record": "fae8162c",
|
||||
"fresh_remote_main": "686328a0853a1165872b5eb8163f7223600033ea",
|
||||
@@ -26,8 +26,8 @@
|
||||
}
|
||||
],
|
||||
"counts_current": {
|
||||
"delivered": 58,
|
||||
"QA": 4,
|
||||
"delivered": 62,
|
||||
"QA": 0,
|
||||
"functional_pending": 70,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
@@ -65,12 +65,11 @@
|
||||
"active_database_writes": 0
|
||||
}
|
||||
},
|
||||
"served_revision_and_delta": "pending installation",
|
||||
"served_revision_and_delta": "verified",
|
||||
"limits": "No blanket exemption by recipient; no certification of agreement,recognition or export. Missing condition remains indeterminate; preserve price/currency/period/history. Beverages deduction/refund remainsL2/L3,not closed.",
|
||||
"P001": "05/06 only",
|
||||
"L1_complete": false,
|
||||
"statistics_AI": "deferred",
|
||||
"authentication": "Previous session state stale: no session process or established SSH connection; preflight request not consumed; fresh authentication required",
|
||||
"authenticated_preflight": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
@@ -114,5 +113,155 @@
|
||||
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604"
|
||||
},
|
||||
"authenticated_destination": "Fresh read confirmed686328a0;installer inactive",
|
||||
"new_backup_restore": "Verified fresh backup and real isolated restore;no active restore performed"
|
||||
"new_backup_restore": "Verified fresh backup and real isolated restore;no active restore performed",
|
||||
"beverages_followup": {
|
||||
"source": "CIVA13(2),20(1)(d)",
|
||||
"L2": "Dedução do IVA da via13(2),com montante/documento/condições próprios",
|
||||
"L3": "Restituição da via13(2),conforme procedimento aplicável;pedido não equivale a deferimento",
|
||||
"closed_by_G4E": false
|
||||
},
|
||||
"served_commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"installation": {
|
||||
"protected": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"release": "/var/www/investmoz-homologacao/releases/2e21ca45002b76adcef0347135783c706d37dd42-a5faea22",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/686328a0853a1165872b5eb8163f7223600033ea-81b13983",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"runtime_files_verified": 2,
|
||||
"persistent_files_and_env_verified": 369,
|
||||
"tables_compared": 174,
|
||||
"changed_tables": {
|
||||
"cache": {
|
||||
"before": {
|
||||
"rows": 105,
|
||||
"checksum": "33780b9b4fbaaf7e714478b72e2c30bb"
|
||||
},
|
||||
"after": {
|
||||
"rows": 105,
|
||||
"checksum": "59a75fda1325bd5a60ce3b26253a2a38"
|
||||
}
|
||||
},
|
||||
"sessions": {
|
||||
"before": {
|
||||
"rows": 20,
|
||||
"checksum": "c48fe23dffea4c1539854f351436ee68"
|
||||
},
|
||||
"after": {
|
||||
"rows": 21,
|
||||
"checksum": "b009a6a82a84f902064f25f5a6604253"
|
||||
}
|
||||
}
|
||||
},
|
||||
"preserved_counts": {
|
||||
"published_fiches": 29,
|
||||
"relations": 28,
|
||||
"geometries": 408
|
||||
},
|
||||
"migration_count": 0,
|
||||
"content_imports": 0,
|
||||
"comparison_role": "postgres_before_and_after;sameexportedsnapshotbaseline;noapplicationRLSvisibilityinference",
|
||||
"writes_by_verification": 0
|
||||
},
|
||||
"public": {
|
||||
"status": "installed_delta_verified",
|
||||
"served_revision": {
|
||||
"commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T16:27:47.396813+00:00",
|
||||
"manifest_sha256": "9b28c92c584ad406e17d01ffc3fa982b9299195b371e1c5311626b9025a22615"
|
||||
},
|
||||
"manifest_hash_matches": true,
|
||||
"compiled_delta_markers": {
|
||||
"export-beneficiaries/1": [
|
||||
"assets/project-dossier-C3cf2J1H.js"
|
||||
],
|
||||
"export_nonresident_buyer": [
|
||||
"assets/project-dossier-C3cf2J1H.js"
|
||||
],
|
||||
"export_diplomatic_mission": [
|
||||
"assets/project-dossier-C3cf2J1H.js"
|
||||
],
|
||||
"export_international_organisation": [
|
||||
"assets/project-dossier-C3cf2J1H.js"
|
||||
],
|
||||
"export_humanitarian_organisation": [
|
||||
"assets/project-dossier-C3cf2J1H.js"
|
||||
]
|
||||
},
|
||||
"assets": [
|
||||
{
|
||||
"file": "assets/project-dossier-document-CtNVSk-9.js",
|
||||
"status": 200,
|
||||
"sha256": "124730663c671afeeab8007eff2148d17702bf80b8fd0a7c962806878a8fafce"
|
||||
},
|
||||
{
|
||||
"file": "assets/simulation-form-CPZAFZU3.js",
|
||||
"status": 200,
|
||||
"sha256": "c6bcf64e60a5eeac0cafe3dc055dc5544162f21942ee08b34d51bc6d52947567"
|
||||
},
|
||||
{
|
||||
"file": "assets/services-DK55Gu8i.js",
|
||||
"status": 200,
|
||||
"sha256": "d96320fdc19fec053fe17efc2eb19e055463c5e5727a9c9b2dafabcd8f106519"
|
||||
},
|
||||
{
|
||||
"file": "assets/project-dossier-C3cf2J1H.js",
|
||||
"status": 200,
|
||||
"sha256": "c88e6e9641f9c8eeacece38fbeffd547f86fb603b60899db915576b5faaa74ed"
|
||||
}
|
||||
],
|
||||
"simulator_status": 200,
|
||||
"simulator_entry": "assets/app-Bb2v1uvn.js",
|
||||
"existing_fiscal_availability": {
|
||||
"data": {
|
||||
"enabled": true,
|
||||
"coverage_start": "2026-01-01",
|
||||
"coverage_end": "2026-12-31",
|
||||
"message": "IVA geral sobre base líquida disponível; enquadramento declarado."
|
||||
}
|
||||
},
|
||||
"synthetic_private_writes": 0,
|
||||
"method": "Read-only installedrevision/manifest/newcompiledcatalogueandreaders/simulatorentry;acceptedQAproofsreused"
|
||||
},
|
||||
"installer": {
|
||||
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"release": "/var/www/investmoz-homologacao/releases/2e21ca45002b76adcef0347135783c706d37dd42-a5faea22",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/686328a0853a1165872b5eb8163f7223600033ea-81b13983",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"latest_report": {
|
||||
"status": "installed",
|
||||
"commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"release": "/var/www/investmoz-homologacao/releases/2e21ca45002b76adcef0347135783c706d37dd42-a5faea22",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/686328a0853a1165872b5eb8163f7223600033ea-81b13983",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0,
|
||||
"requested_commits": [
|
||||
"2e21ca45002b76adcef0347135783c706d37dd42"
|
||||
],
|
||||
"finished_at": "2026-10-24T16:27:50.225953+00:00"
|
||||
},
|
||||
"log_file": "1792859179948208531.log",
|
||||
"summaries": [
|
||||
"OK (1 test, 3106 assertions)",
|
||||
"built in 24.64s",
|
||||
"OK (59 tests, 317 assertions)",
|
||||
"# tests 292",
|
||||
"# pass 292",
|
||||
"# fail 0"
|
||||
],
|
||||
"log_bytes": 113481
|
||||
},
|
||||
"rollback_executed": false
|
||||
},
|
||||
"authentication_previous_session": "Previous session state stale: no session process or established SSH connection; preflight request not consumed; fresh authentication required",
|
||||
"authentication": "Fresh authenticated preflight and verified backup/restore completed before Git fast-forward"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
{
|
||||
"status": "ready_after_fresh_authenticated_preflight_and_verified_backup_restore",
|
||||
"candidate": "1f7fc13872bd706f583a6f4d29024cd3c22ec265",
|
||||
"base": "0eb2c485",
|
||||
"last_known_remote_main": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"fresh_destination_preflight": "Verified authenticated installed/current-link/build revision2e21ca45;installer inactive;existing authenticated session reused",
|
||||
"coverage": {
|
||||
"group": "G5A",
|
||||
"branches": {
|
||||
"AUD-SIM-L1-P081": [
|
||||
"regime_dispatch_goods",
|
||||
"regime_dispatch_transport"
|
||||
],
|
||||
"AUD-SIM-L1-P082": [
|
||||
"regime_internal_goods",
|
||||
"regime_internal_services"
|
||||
],
|
||||
"AUD-SIM-L1-P083": [
|
||||
"regime_transit_goods",
|
||||
"regime_transit_transport"
|
||||
]
|
||||
},
|
||||
"branch_count": 3,
|
||||
"treatment_count": 6,
|
||||
"scope": "2026/MZN;CIVA14(1)(b/c/d),19(1)(b)(iv)"
|
||||
},
|
||||
"runtime_delta": [
|
||||
{
|
||||
"path": "resources/js/components/simulation-operations.tsx",
|
||||
"sha256_LF": "ef1019201ef546aee7dbd312741ec9653afdd3bb9c94777ea4735682506b6633"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/lib/iva-operations.ts",
|
||||
"sha256_LF": "e9d2b0d7ed97ef9034f151b88e819e895666048f1d362a81d88855bad8e44f82"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/lib/iva-special-regimes.ts",
|
||||
"sha256_LF": "76098c658dcaf7bb09c68664001fdd5a2a6e9e2c401d0dd0d1cdca8ae710f4ab"
|
||||
}
|
||||
],
|
||||
"counts_current": {
|
||||
"delivered": 62,
|
||||
"QA": 3,
|
||||
"functional_pending": 67,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"counts_after_delivery_only": {
|
||||
"delivered": 65,
|
||||
"QA": 0,
|
||||
"functional_pending": 67,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"proofs_reused": {
|
||||
"frontend_new": 4,
|
||||
"API_tests": 1,
|
||||
"API_assertions": 44,
|
||||
"QA_database": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"types": "passed",
|
||||
"production_build": "passed; existing plugin timing warnings",
|
||||
"QA_build": "passed; existing future config/chunk size warnings",
|
||||
"QA_storage": "save/recover/reject passed in temporary directory",
|
||||
"UI": {
|
||||
"actor": "Codex",
|
||||
"method": "Edge extension/CUA observed actions",
|
||||
"URL": "http://127.0.0.1:18640/g5a.html",
|
||||
"observed": [
|
||||
"six distinct treatments initially visible",
|
||||
"no-final-use condition unchecked -> indeterminate; price100MZN retained",
|
||||
"unknown regime -> indeterminate; price/currency/period retained",
|
||||
"restore regime and explicitly recheck conditions ->600MZN/05",
|
||||
"Guardar -> Recuperar -> Relatório with context/regime/source and totals",
|
||||
"three previous results in history;19priorbooks unchanged"
|
||||
],
|
||||
"manual_Tempo_reply": null,
|
||||
"screenshot": "outputs/iva-l1-g5-regimes-20261024/qa-recovered-report.png",
|
||||
"screenshot_sha256": "ec68a1287ade198f34544fed0e5b1f49a6c15c2e6855fcaf13dc34ceb45c8772"
|
||||
},
|
||||
"Word_PDF": "accepted exporter/numeric proofs reused; no new pagination claim"
|
||||
},
|
||||
"rollback": "l1-g3-readonly-rollback-20261024.patch checked on G5A candidate,not applied;readers/history/reports retained;fresh backup and previous release must be preserved",
|
||||
"backup_restore": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g5a-delivery-20261024/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "4568a12444365980c0265429521f7e13df67a03c116103ec18163f8c2feaa9de",
|
||||
"files_sha256": "2016c081b509c976eda3d809b4481147501468295bcb51f586ea989560ba7c59",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g5a_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "4568a12444365980c0265429521f7e13df67a03c116103ec18163f8c2feaa9de",
|
||||
"active_database_writes": 0
|
||||
}
|
||||
},
|
||||
"activation": "Existing Git FF/webhook/installer when delivery is undertaken; no migrations/imports/permission changes or synthetic active tests",
|
||||
"served_revision_and_delta": "pending installation;homologation remains2e21ca45/0eb2c485",
|
||||
"limits": "2026/MZN; condição inicial14(1),regime/destino/permanência e ligação directa próprios; preço distinto dos bens/serviços. Sem isenção pelo mapa, certificação de regime, cálculo da própria importação/saída, aquisições14(2),dedução automática ou submissãoAT. P080/P084/P085/P086 continuam pendentes. L1aberto;P001só05/06;bebidasL2/L3;Estatísticas/IAadiadas.",
|
||||
"L1_complete": false,
|
||||
"P001": "05/06 only",
|
||||
"beverages": "L2/L3;not closed",
|
||||
"statistics_AI": "deferred",
|
||||
"authenticated_preflight": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"release": "/var/www/investmoz-homologacao/releases/2e21ca45002b76adcef0347135783c706d37dd42-a5faea22",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/686328a0853a1165872b5eb8163f7223600033ea-81b13983",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"current_link": "/var/www/investmoz-homologacao/releases/2e21ca45002b76adcef0347135783c706d37dd42-a5faea22",
|
||||
"release_revision": {
|
||||
"commit": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T16:27:47.396813+00:00",
|
||||
"manifest_sha256": "9b28c92c584ad406e17d01ffc3fa982b9299195b371e1c5311626b9025a22615"
|
||||
},
|
||||
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
|
||||
"configuration_keys": [
|
||||
"repository",
|
||||
"branch",
|
||||
"target_url",
|
||||
"legacy_root",
|
||||
"state_root",
|
||||
"release_root",
|
||||
"current_link",
|
||||
"shared_assets",
|
||||
"php",
|
||||
"schema_contract",
|
||||
"ci_environment",
|
||||
"postgis_image",
|
||||
"test_database",
|
||||
"qa_port",
|
||||
"retention",
|
||||
"webhook_secret_file"
|
||||
],
|
||||
"safe_paths": {
|
||||
"repository": "nala/Investidor-V2",
|
||||
"release_root": "/var/www/investmoz-homologacao/releases",
|
||||
"postgis_image": "postgis/postgis@sha256:01a6a70e41e6c4467c8f55f6063555ed72db2d6662cd0d571040d42eadaeb6f6"
|
||||
},
|
||||
"pipeline_sha256": "adec1c17654f3a8658b83b134f1e75f95391b235738552721906c3236e388604"
|
||||
},
|
||||
"authenticated_destination": "Fresh read confirmed2e21ca45;installer inactive",
|
||||
"new_backup_restore": "Verified fresh backup and real isolated restore;no active restore performed",
|
||||
"user_instruction": {
|
||||
"QA_acceptance": "G5A concluído em QA segundo o relatório4e97cd05;seis tratamentos correspondem aos três ramosP081–P083",
|
||||
"delivery": "Integrar e disponibilizar pelo processoGit existente,preservando alterações concorrentes e conferindo apenas o delta instalado",
|
||||
"proofs": "Accepted QA proofs reused;no new functional/manual proof requested",
|
||||
"constraints": "L1open;P00105/06;beveragesL2/L3;StatisticsAIdeferred"
|
||||
},
|
||||
"concurrency": {
|
||||
"fresh_origin_main": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"fresh_authenticated_destination": "2e21ca45002b76adcef0347135783c706d37dd42",
|
||||
"incoming_changes_since_G4E": [],
|
||||
"preserved_local_commits": [
|
||||
"0eb2c485cc13e0ecbc6fa448c95425a8ab8f05b4",
|
||||
"1f7fc13872bd706f583a6f4d29024cd3c22ec265",
|
||||
"4e97cd05ea09e5dd2e74ec3264928a2f1f61858c"
|
||||
],
|
||||
"integration": "Normal Git fast-forward,without force;fetch/ancestor guard repeated immediately before push"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,36 @@
|
||||
# Rastreabilidade, utilização e formação
|
||||
|
||||
|
||||
## 24/10/2026 — G5A demonstrado em QA: três IDs/seis tratamentos
|
||||
|
||||
**P081 → regime_dispatch_goods / regime_dispatch_transport**: bens expedidos para zona/depósito e transporte directamente conexo,14(1)(b). **P082 → regime_internal_goods / regime_internal_services**: transmissão de bens em regime e serviço directamente conexo,enquanto os bens permanecem nessa situação,14(1)(c). **P083 → regime_transit_goods / regime_transit_transport**: bens em trânsito,draubaque/importação temporária e transporte directamente conexo,enquanto abrangidos,14(1)(d). Direito19(1)(b)(iv); fontes14,p1426(271),19,p1426(273),e alterações2022/2025 conferidas. Não confundir seis tratamentos com seisIDs. Candidata`1f7fc138`,registo`iva_l1_g5a_special_regimes_QA_demonstrated_20261024`.
|
||||
|
||||
Único campo adicionalspecialRegime,opcional nos livros antigos,obrigatório nos seis tratamentos; opções da alínea correspondente,sem inferir pelo mapa. Todas as condições legais próprias permanecem necessárias,incluindo ausência de utilização/consumo final nas áreas e ligação directa do serviço. A alínea b exige destino zona/depósito identificado,a indicação de loja franca por si não o comprova; c trata transmissão em regime enquanto os bens nele permanecem. Não se cria proibição genérica de lojas francas nem se substitui o enquadramento documentado por analogia. A escolha do regime limpa confirmações para revisão e conserva montante,moeda,mês e histórico. Valores distintos dos bens e do serviço,sem duplicação automática.
|
||||
|
||||
4testesfrontend;APIprivadaQA1teste/44asserções,rollback e guarda*_test:55441;tipos e compilações aprovados,avisos existentes deplugins/configuração futura e dimensão dechunk.19livros anteriores íntegros/actuais sem recálculo. **UI observada peloCodex noEdge/CUA**,sem prova manualTempo atribuída: seis tratamentos visíveis;retirar condição de não utilização/consumo final e escolher regime desconhecido produz indeterminação sem apagar100MZN;repor regime e confirmar condições→600MZN/campo05;Guardar→Recuperar→Relatório comopportunity328/Manica/2026-12,MZN,regimes,origens e fontes. Três resultados anteriores nohistórico e19livros anteriores idênticos noficheiroUI. Capturaqa-recovered-report.png eui-proof-dom.txt emoutputs/iva-l1-g5-regimes-20261024/. ExportadoresWord/PDF aceites reutilizados,sem nova alegação de paginação. Zero alterações noactivo.
|
||||
|
||||
**62entregues+3QA+67funcionaispendentes+P001=133.** Homologação2e21ca45/0eb2c485 preservada;G5A porentregar; [manifesto preparado](../simulations/l1-g5a-delivery-20261024.json), reversão compatível conferida/não aplicada. Destino/main e backup/restauro autenticados frescos continuam necessários antes de alterar o activo; não houve push/instalação nesta passagem. G5:3QA/4pendentes(P080,P084–P086). 2026/MZN; condição inicial14(1),regime/destino/permanência e ligação directa próprios; preço distinto dos bens/serviços. Sem isenção pelo mapa, certificação de regime, cálculo da própria importação/saída, aquisições14(2),dedução automática ou submissãoAT. P080/P084/P085/P086 continuam pendentes. L1aberto;P001só05/06;bebidasL2/L3;Estatísticas/IAadiadas.
|
||||
|
||||
|
||||
## 24/10/2026 — G4E aceite e próximo incremento G5A delimitado
|
||||
|
||||
Tempo confirmaG4E entregue em2e21ca45/0eb2c485. Resumo dos quatro IDs e tratamentos: **P061 → export_nonresident_buyer** (exportação por adquirente sem residência/estabelecimento nacional, com exclusão de uso privado); **P069 → export_diplomatic_mission** (entidades diplomáticas/consulares, conforme acordo/convénio); **P070 → export_international_organisation** (organismos internacionais/membros elegíveis nos limites do acordo); **P071 → export_humanitarian_organisation** (bens exportados por organismo humanitário/caritativo/educativo, com reconhecimento prévio do direito). Aceitação e provas reutilizadas, sem repetição. Saldo62entregues+70funcionaispendentes+P001=133.
|
||||
|
||||
Inventário anterior aos testesG5A:62fechos preservados; nenhuma perda confirmada no delta local0eb2c485, sem diferenças de código/schema/configuração/rotas face à revisão servida2e21ca45. Inventário activo e comparação de identidadePostgreSQL equivalentes reutilizados do reciboG4E, sem nova leitura ou escrita noactivo alegada.19livros anteriores congelados para conferir somente o delta;preservation-before-tests.json. Não há regressão confirmada a repor nesta passagem.
|
||||
|
||||
G5A delimitaP081/14(1)(b),P082/14(1)(c),P083/14(1)(d): bens e serviços separados em seis tratamentos, sem duplicarIDs;19(1)(b)(iv) estabelece direito nas condições legais. Fonte14,p1426(271),e19,p1426(273),conferida;alterações2022/2025 conferidas quanto ao recorte. Regime e condições de permanência/destino devem ser identificados; não inferir do mapa. P080/14(1)(a) é importação sob controlo alfandegário, não venda;P084–P086/14(2) são aquisições/ofertas/serviços adquiridos, com regulamentação prevista em14(3),não presumidos como vendas isentas nem concluídos neste incremento. Continuam pendências funcionais reais no grupo existente. Origem desta delimitação: texto oficial; subdivisãoG5A é escolha técnica de execução incremental, não nova regra organizacional.
|
||||
|
||||
L1aberto;P001só05/06;bebidas permanecemL2/L3;Estatísticas/IAadiadas. Esta preparação não altera a homologação nem activa cálculo por importação/publicação.
|
||||
|
||||
## 24/10/2026 — G4E entregue na homologação 2e21ca45
|
||||
|
||||
P061/exportação por adquirente não residente, P069/entidades diplomáticas-consulares, P070/organismos internacionais e membros elegíveis, P071/bens exportados em actividade humanitária-caritativa-educativa: quatro ramos/quatro tratamentos. EntregaGit existente, fast-forward sobre686328a0, após destino/main frescos e novo backup/restauro real isolado sem rede. Preservados174tabelas,369ficheiros/configuração e29fichas/28relações/408geometrias, comparados por identidadePostgreSQL equivalente; apenas diferenças operacionais cache/sessões registadas. Zero migrações/importações, alterações de permissões ou ensaios sintéticos noactivo.
|
||||
|
||||
Revisão efectivamente servida, manifesto/hash, cinco marcadores compilados, dois ficheiros funcionais e simuladorHTTP200 conferidos. Prova manualTempo «ja efectuado» registada emfae8162c, distinta da conferência de instalação. Código/API/provas aceites reutilizados;18livros anteriores íntegros/actuais sem recálculo. Preço/moeda/período e histórico conservados; condições próprias de saída, exclusão de uso privado, regulamentação, acordo/convénio e prévio reconhecimento explícitas. Não certifica exportação, reconhecimento ou concessão real nem isenta genericamente o destinatário. Release anterior e backup conservados; contenção compatível de novos cálculos verificada, não aplicada, conservando leitores/histórico/relatórios.
|
||||
|
||||
[Manifesto/recibo](../simulations/l1-g4e-delivery-20261024.json), registo `iva_l1_g4e_homologation_20261024`. **62entregues+70funcionaispendentes+P001=133; sem candidatasQA por disponibilizar.** G4:19entregues no âmbito descrito. L1aberto;P001só05/06;dedução/restituição de bebidas permaneceL2/L3, sem fecho porG4E;Estatísticas/IAadiadas.
|
||||
|
||||
|
||||
## 24/10/2026 — G4E: conferência visual manual concluída pela Tempo
|
||||
|
||||
A Tempo respondeu «ja efectuado» ao pedido dirigido de http://127.0.0.1:18639/g4e.html: quatro tratamentos, condição em falta sem apagar preço e Guardar → Recuperar → Relatório. Prova manual da Tempo, não observação da extensão nem conferência da revisão instalada. Código/API e provas aceites reutilizados sem repetição. Registo `iva_l1_g4e_manual_Tempo_visual_QA_closed_20261024`. **G4E concluído em QA**, candidata38faeac6, P061/P069/P070/P071. **58entregues+4QA+70funcionaispendentes+P001=133**. Homologação686328a0/3be371c8 até entrega; L1aberto, P001só05/06, bebidasL2/L3, Estatísticas/IAadiadas.
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -4,6 +4,7 @@ import { pharmaAnnexEntries, pharmaAnnexEntry, pharmaAnnexReference } from '@/li
|
||||
import { annexIEntries, annexIEntry, annexIReference } from '@/lib/iva-annex-i';
|
||||
import { temporaryBenefit, temporaryBenefitNotice } from '@/lib/iva-temporary-benefits';
|
||||
import { isExportService } from '@/lib/iva-export-services';
|
||||
import { isSpecialRegime, specialRegimesFor, specialRegimeIssue, type SpecialRegime } from '@/lib/iva-special-regimes';
|
||||
import { isOnboardSupply, supplyCategories, onboardSupplyIssue, type SupplyCategory } from '@/lib/iva-onboard-supplies';
|
||||
import { emptyProductionTaxOption, type ProductionTaxOption } from '@/lib/iva-production-option';
|
||||
import { referenceExportOperation, continueTemporaryOperation, continueAnnexIOperation, modeloA06Correspondence, newSalesOperation, operationTreatments, recordSales, reuseSales, salesBook, salesCurrent, salesReportRows, saveSalesBook, splitSales, type SalesBook, type SalesOperation } from '@/lib/iva-operations';
|
||||
@@ -36,6 +37,11 @@ export function SimulationOperations({draft,onChange}:{draft:Record<string,unkno
|
||||
<label>Representação do preço<select className="block rounded border p-2" value={row.basis} onChange={e=>change(row.id,{basis:e.target.value as SalesOperation['basis']})}><option value="">Ainda desconhecida</option><option value="net">Sem IVA</option><option value="included">IVA incluído</option></select></label>
|
||||
<label>Tratamento da operação<select className="block rounded border p-2" value={row.treatment} onChange={e=>temporaryBenefit(row.treatment)&&!temporaryBenefit(e.target.value)?continueTemporary(row.id,e.target.value):change(row.id,{treatment:e.target.value,confirmed:[]})}>{operationTreatments.map(t=><option value={t.id} key={t.id}>{t.label}</option>)}</select></label>
|
||||
</div>
|
||||
{isSpecialRegime(row.treatment)&&<fieldset className="space-y-2 rounded border p-2"><legend>Regime aduaneiro ou fiscal da operação</legend>
|
||||
<label>Regime do artigo14(1)<select value={specialRegimesFor(row.treatment).some(([value])=>value===row.specialRegime)?row.specialRegime:''} onChange={e=>change(row.id,{specialRegime:e.target.value as SpecialRegime,confirmed:[]})}><option value="">Por identificar</option>{specialRegimesFor(row.treatment).map(([value,label])=><option value={value} key={value}>{label}</option>)}</select></label>
|
||||
<p>Identifique no fundamento os bens, a operação e o documento ou pressuposto expresso do regime. A escolha conserva preço, moeda e período e pede a revisão das condições; não comprova o enquadramento por estar numa zona. Bens e serviço de transporte ou serviço conexo têm preços próprios, sem duplicar o valor.</p>
|
||||
{specialRegimeIssue(row.treatment,row.specialRegime)&&<p role="status">{specialRegimeIssue(row.treatment,row.specialRegime)}</p>}
|
||||
</fieldset>}
|
||||
{isOnboardSupply(row.treatment)&&<fieldset className="space-y-2 rounded border p-2"><legend>Natureza do abastecimento a bordo</legend>
|
||||
<label>Categoria do artigo13(3)<select value={row.supplyCategory??''} onChange={e=>change(row.id,{supplyCategory:e.target.value as SupplyCategory,confirmed:[]})}><option value="">Por identificar</option>{supplyCategories.map(([value,label])=><option key={value} value={value}>{label}</option>)}</select></label>
|
||||
<p>A escolha conserva o preço, a moeda e o período; reveja as condições. Para fornecimento misto, discrimine as parcelas efectivas sem repetir o total em cada linha. Desconhecido não equivale a «sem bebidas».</p>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { productionOptionCheck, productionOptionVersion, type ProductionTaxOptio
|
||||
import { temporaryBenefits, temporaryBenefit, temporaryBenefitNotice, temporaryBenefitVersion } from './iva-temporary-benefits.ts';
|
||||
import { directExportTreatments } from './iva-export-operations.ts';
|
||||
import { exportBeneficiaryTreatments } from './iva-export-beneficiaries.ts';
|
||||
import { specialRegimeTreatments, specialRegimeIssue, specialRegimeOptions, isSpecialRegime, type SpecialRegime } from './iva-special-regimes.ts';
|
||||
import { internationalAssetTreatments } from './iva-international-assets.ts';
|
||||
import { exportServiceTreatments, isExportService } from './iva-export-services.ts';
|
||||
import { onboardSupplyTreatments, onboardSupplyIssue, supplyCategories, isOnboardSupply, type SupplyCategory } from './iva-onboard-supplies.ts';
|
||||
@@ -68,6 +69,7 @@ export const operationTreatments:OperationTreatment[] = [
|
||||
...internationalAssetTreatments,
|
||||
...directExportTreatments,
|
||||
...exportBeneficiaryTreatments,
|
||||
...specialRegimeTreatments,
|
||||
...temporaryBenefits.map(item=>({id:item.id,label:`Benefício terminado31/12/2025 — ${item.label}`,field:null,rate:null,article:`CIVA art.${item.article}`,source:`${item.source} CIVA republicado Lei13/2016,9(14),PDF10/p.1426(268),apenas para9(13)(b/f). Âmbito:cessação nas operações internas2026/MZN;sem cálculo histórico.`,conditions:[],logicVersion:temporaryBenefitVersion})),
|
||||
{id:'annexI_goods',label:'Equipamento, sementes e outros bens do Anexo I — artigo9(12)(h)',field:'07',rate:0,logicVersion:annexIVersion,article:'CIVA arts.9(12)(h),19(1); Lei22/2022 art.3(1)',source:`CIVA republicado Lei13/2016, PDF10, p.1426(268),9(12)(h), e PDF15, p.1426(273),19(1); rectificação BR89/2017, PDF1, p.569; ${annexISource}. Âmbito técnico2026/MZN`,conditions:[internalOperation,'O bem transmitido corresponde ao código e à designação da posição escolhida no Anexo I; não basta a actividade agrícola, a marca ou uma indicação genérica de equipamento','Qualificadores expressos na posição conferidos e fundamentados, incluindo natureza, destino, certificação, peso, capacidade ou potência quando exigidos nessa linha; não acrescentar condições a linhas que não as exigem']},
|
||||
{id:'pharma_manufacturing_inputs',label:'Bens do Anexo III para fabrico de medicamentos — estabelecimento integrado no SNS',field:'07',rate:0,logicVersion:pharmaAnnexVersion,article:'CIVA arts.9(1)(g),19(1); Lei22/2022 art.3(1)',source:`CIVA republicado Lei13/2016, PDF9, p.1426(267),9(1)(g), e PDF15, p.1426(273),19(1); rectificação BR89/2017, PDF1, p.569; ${pharmaAnnexSource}. Âmbito técnico2026/MZN`,conditions:[internalOperation,'Transmissão efectuada pelo próprio estabelecimento público ou privado identificado, integrado no Serviço Nacional de Saúde; não basta que o adquirente ou destino seja um hospital','Bens a utilizar como matérias-primas, produtos intermédios ou componentes para o fabrico de medicamentos, com utilização/fundamento identificados; não mera venda de produto acabado ou utilização genérica','Bem corresponde cumulativamente ao código e à designação da linha seleccionada no Anexo III; confirmar as especificações aplicáveis sem corrigir ou completar a pauta por suposição']},
|
||||
@@ -126,7 +128,7 @@ export const operationTreatments:OperationTreatment[] = [
|
||||
{id:'foreign_operation',label:'Operação no estrangeiro — analisar territorialidade',field:null,rate:null,article:'CIVA art.6: localização por natureza da operação; art.19(1)(b)(ii) não determina sozinho a caixa06 do formulário',source:source2016,conditions:[]},
|
||||
{id:'other',label:'Outra operação / enquadramento ainda desconhecido',field:null,rate:null,article:'Fundamento específico ainda necessário; não presumir taxa ou isenção',source:'Sem fonte operacional determinada para esta linha',conditions:[]},
|
||||
];
|
||||
export type SalesOperation = {id:string;period:string;description:string;establishment:string;amount:string;basis:''|'net'|'included';treatment:string;confirmed:number[];evidence:string;sourceAmount:string|null;sourcePeriod:string;sourceCurrency:string;source:string;taxOption?:ProductionTaxOption;fundraiser?:FundraisingContext;pharmaAnnexItem?:string;annexIItem?:string;annexIOnly?:boolean;temporaryBenefitOrigin?:string;relatedExport?:{id:string;description:string;treatment:string};supplyCategory?:SupplyCategory; splitSource?:{id:string;amount:string|null;period:string;currency:string;basis:string}};
|
||||
export type SalesOperation = {id:string;period:string;description:string;establishment:string;amount:string;basis:''|'net'|'included';treatment:string;confirmed:number[];evidence:string;sourceAmount:string|null;sourcePeriod:string;sourceCurrency:string;source:string;taxOption?:ProductionTaxOption;fundraiser?:FundraisingContext;pharmaAnnexItem?:string;annexIItem?:string;annexIOnly?:boolean;temporaryBenefitOrigin?:string;relatedExport?:{id:string;description:string;treatment:string};supplyCategory?:SupplyCategory;specialRegime?:SpecialRegime; splitSource?:{id:string;amount:string|null;period:string;currency:string;basis:string}};
|
||||
export type SalesBook = {currency:string;rows:SalesOperation[];periods:Array<{period:string;complete:boolean}>; result?:SalesResult; history?:SalesResult[]};
|
||||
export type SalesLineResult = {id:string;field:string|null;net:string|null;vat:string|null;gross:string|null;rate:number|null;status:'calculated'|'exempt'|'indeterminate';reason:string;article:string;source:string;exact?:{net:FiscalFraction;vat:FiscalFraction;gross:FiscalFraction}};
|
||||
export type SalesResult = {version:string;revision:number;calculatedAt:string;opportunity:string;location:string;currency:string;key:string;inputs:SalesOperation[];rows:SalesLineResult[];periods:Array<{period:string;fields:Record<string,string|null>;exactFields?:Record<string,FiscalFraction|null>;reasons:string[]}>;rounding:string};
|
||||
@@ -186,6 +188,8 @@ export function evaluateSalesOperation(row:SalesOperation,currency:string):Sales
|
||||
if(currency!=='MZN'||row.sourceCurrency!==currency)return stop('Moeda fora de MZN ou divergente da origem; sem conversão silenciosa.');
|
||||
if(!/^2026-(0[1-9]|1[0-2])$/.test(row.period))return stop('Período fora da cobertura de2026; sem cálculo histórico presumido.');
|
||||
if(temporaryBenefit(row.treatment))return stop(temporaryBenefitNotice(row.treatment,row.period));
|
||||
const regimeIssue=specialRegimeIssue(row.treatment,row.specialRegime);
|
||||
if(regimeIssue)return {...stop(regimeIssue),field:null,rate:null};
|
||||
const supplyIssue=onboardSupplyIssue(row.treatment,row.supplyCategory);
|
||||
if(supplyIssue)return {...stop(supplyIssue),field:null,rate:null};
|
||||
if(!rule||rule.rate===null||!rule.field)return stop('Operação não calculada: delimite incidência, territorialidade e fundamento desta linha. A remissão do campo06 não constitui uma regra de classificação de todas as operações no estrangeiro.');
|
||||
@@ -263,6 +267,7 @@ export function salesReportRows(draft:Record<string,unknown>):Array<[string,stri
|
||||
for(const row of r.inputs.filter(v=>v.fundraiser))out.push(['IVA mensal',`Manifestação ocasional — ${row.description}`,`Entidade ${row.fundraiser!.entityReference}; ano ${row.period.slice(0,4)}; total anual declarado ${row.fundraiser!.annualEvents}; manifestação ${row.fundraiser!.eventNumber}; actividade ${row.fundraiser!.activity}`,`${context}; dados declarados para a entidade, incluindo manifestações fora deste dossier; não é contagem automática das vendas.`]);
|
||||
for(const row of r.inputs.filter(v=>isExportService(v.treatment)&&v.relatedExport))out.push(['IVA mensal',`Operação relacionada — ${row.description}`,`${row.relatedExport!.description}; ID ${row.relatedExport!.id}; tratamento ${row.relatedExport!.treatment}`,`${context}; referência escolhida expressamente nesta oportunidade,sem copiar valor para preço do serviço nem provar automaticamente o enquadramento subjacente`]);
|
||||
for(const row of r.inputs.filter(v=>isOnboardSupply(v.treatment)))out.push(['IVA mensal',`Natureza do abastecimento — ${row.description}`,supplyCategories.find(([value])=>value===row.supplyCategory)?.[1]??'Por identificar',`${context}; CIVA13(2–3); natureza conservada no cálculo/relatório, sem aplicar dedução ou restituição automaticamente`]);
|
||||
for(const row of r.inputs.filter(v=>isSpecialRegime(v.treatment)))out.push(['IVA mensal',`Regime especial — ${row.description}`,specialRegimeOptions.find(([value])=>value===row.specialRegime)?.[1]??'Por identificar',`${context}; CIVA14(1)(b/c/d),19(1)(b)(iv); regime declarado/documentado ou pressuposto expresso da projecção; não certifica admissão ou permanência, nem liquida importação ou saída do regime`]);
|
||||
for(const value of r.rows.filter(v=>v.exact))out.push(['IVA mensal',`Precisão exacta — ${value.id}`,`Líquido ${fractionLabel(value.exact!.net)} MZN; IVA ${fractionLabel(value.exact!.vat)} MZN; bruto ${fractionLabel(value.exact!.gross)} MZN`,`${context}; apresentação decimal a6casas, aproximação quando a fracção não termina; não aplicar à declaração sem a sua regra própria.`]);
|
||||
for(const p of r.periods){out.push(['IVA mensal',`Operações L1 — ${p.period}`,Object.entries(p.fields).map(([f,v])=>`${f}: ${v??'Indeterminado'}`).join('; '),`${context}; ${p.reasons.join(' ')}`]);
|
||||
if(p.exactFields)out.push(['IVA mensal',`Precisão exacta do período — ${p.period}`,Object.entries(p.exactFields).map(([f,v])=>`${f}: ${v?fractionLabel(v):'Indeterminado'}`).join('; '),`${context}; totais em fracções MZN, calculados antes da apresentação decimal, sem regra declarativa presumida.`]);
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import type { OperationTreatment } from './iva-operations.ts';
|
||||
|
||||
export const specialRegimeOptions = [
|
||||
['economic_zone', 'Zona económica especial'],
|
||||
['free_zone', 'Zona franca'],
|
||||
['free_warehouse', 'Depósito franco'],
|
||||
['general_free_warehouse', 'Depósito geral franco'],
|
||||
['customs_warehouse', 'Depósito de regime aduaneiro'],
|
||||
['duty_free_shop', 'Loja franca'],
|
||||
['transit', 'Trânsito'],
|
||||
['drawback', 'Draubaque'],
|
||||
['temporary_import', 'Importação temporária'],
|
||||
] as const;
|
||||
export type SpecialRegime = '' | typeof specialRegimeOptions[number][0];
|
||||
const zoneRegimes: readonly string[] = specialRegimeOptions.slice(0,6).map(([id])=>id);
|
||||
const transitRegimes: readonly string[] = ['transit','drawback','temporary_import'];
|
||||
const source = 'CIVA republicado Lei13/2016, BR156/10.º suplemento,14(1)(b/c/d) e condição inicial de14(1),PDF13/p.1426(271);19(1)(b)(iv),PDF15/p.1426(273). Lei22/2022art.1,PDF1, e Lei10/2025art.1,PDF12–13/p.2180(12)–(13),não alteram14 nem19(1)(b)(iv). Âmbito2026/MZN; não calcula importação14(1)(a), aquisição14(2), saída de regime, direitos aduaneiros ou dedução automática de compras.';
|
||||
const make = (id:string,label:string,letter:string,conditions:string[]):OperationTreatment => ({id,label,field:'05',rate:0,article:`CIVA arts.14(1)(${letter}),19(1)(b)(iv)`,source,logicVersion:'special-regimes/1',conditions:[
|
||||
'Transmissão de bens ou prestação de serviços abrangida pelo CIVA em Moçambique, com territorialidade identificada; não o próprio acto de importação nem aquisição pelo beneficiário',
|
||||
'Os bens a que a operação se refere não têm utilização nem consumo finais nas áreas mencionadas em14(1); destino efectivo ou pressuposto expresso da projecção identificado, sem o presumir pela localização no mapa',
|
||||
...conditions,
|
||||
]});
|
||||
export const specialRegimeTreatments:OperationTreatment[] = [
|
||||
make('regime_dispatch_goods','Bens expedidos para zona ou depósito elegível','b',[
|
||||
'Transmissão de bens expedidos ou transportados para zona ou depósito mencionado em14(1)(a); bens, destino e regime identificados no documento ou pressuposto expresso. A indicação de loja franca por si não comprova esse destino: identifique a zona ou depósito aplicável a esta expedição',
|
||||
'A colocação/introdução dos bens corresponde ao regime escolhido, sob controlo alfandegário e disposições especificamente aplicáveis de14(1)(a); não basta o endereço do destinatário ou o cadastro da zona',
|
||||
]),
|
||||
make('regime_dispatch_transport','Transporte directamente conexo à expedição para zona ou depósito','b',[
|
||||
'Prestação de serviço de transporte directamente conexa à transmissão de bens expedidos ou transportados para zona ou depósito de14(1)(a); transmissão, bens, destino e ligação concreta identificados. A indicação de loja franca por si não comprova esse destino: identifique a zona ou depósito aplicável a esta expedição',
|
||||
'Regime de destino e disposições especificamente aplicáveis de14(1)(a) identificados; preço desta linha é apenas o transporte, sem duplicar o valor dos bens; não qualquer serviço ao destinatário',
|
||||
]),
|
||||
make('regime_internal_goods','Transmissão de bens dentro de regime de zona ou depósito','c',[
|
||||
'Transmissão de bens efectuada num regime de14(1)(a),com bens, regime e controlo/disposições aplicáveis identificados no documento ou pressuposto expresso',
|
||||
'Os bens permanecem nessa situação no momento/período da operação; não saída do regime nem venda para consumo final na área',
|
||||
]),
|
||||
make('regime_internal_services','Serviço directamente conexo à transmissão de bens em regime','c',[
|
||||
'Prestação de serviços directamente conexa a transmissão de bens efectuada em regime de14(1)(a); bens, transmissão, regime e ligação concreta identificados, não qualquer serviço executado na zona',
|
||||
'Os bens permanecem nessa situação no momento/período da operação; preço desta linha é apenas o serviço, sem duplicar o valor dos bens; não saída do regime nem consumo final',
|
||||
]),
|
||||
make('regime_transit_goods','Bens em trânsito, draubaque ou importação temporária','d',[
|
||||
'Transmissão de bens que se encontram no regime escolhido de trânsito, draubaque ou importação temporária; bens e enquadramento identificados no documento ou pressuposto expresso, não o próprio acto de importação',
|
||||
'A operação continua considerada abrangida pelo regime no momento/período indicado; não regime terminado nem mera passagem geográfica dos bens',
|
||||
]),
|
||||
make('regime_transit_transport','Transporte directamente conexo a bens em trânsito, draubaque ou importação temporária','d',[
|
||||
'Prestação de serviço de transporte directamente conexa à transmissão de bens em trânsito, draubaque ou importação temporária; bens, operação e ligação concreta identificados',
|
||||
'A operação continua abrangida pelo regime no momento/período indicado; preço desta linha é apenas o transporte, sem duplicar o valor dos bens; não transporte genérico nem regime terminado',
|
||||
]),
|
||||
];
|
||||
export function isSpecialRegime(id:string):boolean { return specialRegimeTreatments.some(rule=>rule.id===id); }
|
||||
export function specialRegimesFor(id:string):Array<typeof specialRegimeOptions[number]> {
|
||||
const allowed=id.startsWith('regime_transit_')?transitRegimes:zoneRegimes;
|
||||
return isSpecialRegime(id)?specialRegimeOptions.filter(([value])=>allowed.includes(value)):[];
|
||||
}
|
||||
export function specialRegimeIssue(id:string,regime:unknown):string|null {
|
||||
if(!isSpecialRegime(id))return null;
|
||||
if(!specialRegimesFor(id).some(([value])=>value===regime))return 'Identifique o regime aplicável a esta operação do artigo14(1). Regime desconhecido ou de outra alínea não comprova isenção; a localização não o substitui. Conserve preço, moeda e período; apuramento indeterminado.';
|
||||
return null;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
use Tests\TestCase;
|
||||
|
||||
final class IvaSpecialRegimeDraftTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
||||
public function test_special_regimes_recover_with_the_selected_opportunity_and_previous_books(): void
|
||||
{
|
||||
$target = DB::selectOne('select current_database() as name,inet_server_port() as port');
|
||||
$this->assertSame('simulator_fiscal_delta_20261021_test', $target->name);
|
||||
$this->assertSame(55441, (int) $target->port);
|
||||
config(['investor-path.enabled' => true, 'suitecrm.enabled' => false]);
|
||||
$this->actingAs(User::factory()->create(['email_verified_at' => now()]));
|
||||
$draft = json_decode(file_get_contents(base_path('outputs/iva-l1-g5-regimes-20261024/calculated.json')), true, flags: JSON_THROW_ON_ERROR);
|
||||
$id = $this->postJson('/api/v1/simulation-drafts', ['personal_snapshot' => [], 'economic_snapshot' => $draft], ['Idempotency-Key' => (string) Str::uuid()])->assertCreated()->json('data.id');
|
||||
$recovered = $this->getJson('/api/v1/simulation-drafts/'.$id)->assertOk()->json('data.economic_snapshot');
|
||||
$this->assertSame($draft['modelo_a_snapshot'], $recovered['modelo_a_snapshot']);
|
||||
$this->assertSame('opportunity:328', $recovered['context_opportunity']);
|
||||
$this->assertSame('Manica', $recovered['selection_labels']['province_id']);
|
||||
$store = json_decode($recovered['modelo_a_snapshot'], true, flags: JSON_THROW_ON_ERROR);
|
||||
$book = $store['salesOperations']['opportunity:328'];
|
||||
$this->assertSame('opportunity:328', $book['result']['opportunity']);
|
||||
$this->assertSame('MZN', $book['result']['currency']);
|
||||
$this->assertSame('2026-12', $book['result']['periods'][0]['period']);
|
||||
$this->assertSame('600.00', $book['result']['periods'][0]['fields']['05']);
|
||||
$this->assertCount(6, $book['rows']);
|
||||
$this->assertSame(['economic_zone','customs_warehouse','free_zone','duty_free_shop','transit','temporary_import'], array_column($book['rows'], 'specialRegime'));
|
||||
foreach ($book['result']['rows'] as $row) {
|
||||
$this->assertSame('05', $row['field']);
|
||||
$this->assertSame('0.00', $row['vat']);
|
||||
}
|
||||
$frozen = json_decode(file_get_contents(base_path('tests/frontend/fixtures/iva-g4e-inputs.json')), true, flags: JSON_THROW_ON_ERROR);
|
||||
foreach (json_decode($frozen['modelo_a_snapshot'], true, flags: JSON_THROW_ON_ERROR)['salesOperations'] as $context => $original) {
|
||||
$this->assertSame($original, $store['salesOperations'][$context]);
|
||||
}
|
||||
file_put_contents(base_path('outputs/iva-l1-g5-regimes-20261024/recovered.json'), json_encode($recovered, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,48 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import fs from 'node:fs';
|
||||
import { specialRegimeTreatments as rules, specialRegimeOptions, specialRegimesFor, specialRegimeIssue } from '../../resources/js/lib/iva-special-regimes.ts';
|
||||
import { newSalesOperation, evaluateSalesOperation, recordSales, saveSalesBook, salesBook, salesCurrent } from '../../resources/js/lib/iva-operations.ts';
|
||||
import { createProjectDossierReport } from '../../resources/js/lib/project-dossier-report.ts';
|
||||
const frozen=JSON.parse(fs.readFileSync(new URL('./fixtures/iva-g4e-inputs.json',import.meta.url),'utf8'));
|
||||
const regimes=['economic_zone','customs_warehouse','free_zone','duty_free_shop','transit','temporary_import'];
|
||||
const row=(rule,i)=>({...newSalesOperation(`g5a-${i}`,'2026-12','MZN'),description:`SYNTHETIC QA — ${rule.label}`,establishment:'SYNTHETIC QA estabelecimento',amount:'100',basis:i%2?'included':'net',treatment:rule.id,specialRegime:regimes[i],confirmed:rule.conditions.map((_,n)=>n),evidence:'SYNTHETIC QA — pressuposto expresso de projecção: bens e operação identificados; regime e controlo/documento, destino, permanência no período, ausência de utilização/consumo final e ligação directa do serviço/transporte identificados. Cada linha tem preço próprio, sem duplicar bens. Sem certificação real.'});
|
||||
function fixture(){
|
||||
const draft={...structuredClone(frozen),context_opportunity:'opportunity:328',project_title:'SYNTHETIC QA — G5A / Regimes especiais'};
|
||||
const book=recordSales(draft,{currency:'MZN',rows:rules.map(row),periods:[{period:'2026-12',complete:true}]});draft.modelo_a_snapshot=saveSalesBook(draft,book);return{draft,book};
|
||||
}
|
||||
test('three branches/six goods-service treatments require own conditions,no final use and identified regime',()=>{
|
||||
assert.equal(rules.length,6);
|
||||
for(const[i,rule]of rules.entries()){
|
||||
const input=row(rule,i),result=evaluateSalesOperation(input,'MZN');assert.equal(result.field,'05');assert.equal(result.vat,'0.00');assert.equal(result.net,'100.00');assert.equal(result.gross,'100.00');assert.match(result.article,/19\(1\)\(b\)\(iv\)/);
|
||||
for(const missing of input.confirmed)assert.equal(evaluateSalesOperation({...input,confirmed:input.confirmed.filter(n=>n!==missing)},'MZN').vat,null);
|
||||
for(const patch of [{amount:''},{evidence:''},{sourceCurrency:'USD'},{period:'2027-01'},{basis:''},{description:''},{establishment:''}])assert.equal(evaluateSalesOperation({...input,...patch},'MZN').vat,null);
|
||||
assert.match(rule.conditions.join(' '),/não têm utilização nem consumo finais/);
|
||||
}
|
||||
});
|
||||
test('regimes from another paragraph or unknown are indeterminate;destination and service conditions remain distinct',()=>{
|
||||
for(const[i,rule]of rules.entries()){
|
||||
for(const[regime]of specialRegimeOptions){const result=evaluateSalesOperation({...row(rule,i),specialRegime:regime},'MZN');const allowed=specialRegimesFor(rule.id).some(([id])=>id===regime);assert.equal(result.vat,allowed?'0.00':null);if(!allowed){assert.equal(result.net,null);assert.equal(result.field,null);}}
|
||||
for(const regime of [undefined,'',null,'other'])assert.equal(evaluateSalesOperation({...row(rule,i),specialRegime:regime},'MZN').vat,null);
|
||||
}
|
||||
assert.match(rules[0].conditions.join(' '),/loja franca por si não comprova/);
|
||||
assert.equal(evaluateSalesOperation({...row(rules[0],0),specialRegime:'duty_free_shop',confirmed:[0,1,3]},'MZN').vat,null);
|
||||
assert.equal(specialRegimeIssue('regime_internal_goods','duty_free_shop'),null);
|
||||
assert.equal(specialRegimeIssue('general',undefined),null);assert.deepEqual(specialRegimesFor('general'),[]);
|
||||
});
|
||||
test('change of regime or ending eligibility preserves price,context/history and blocks presumptive totals',()=>{
|
||||
const{draft,book}=fixture();assert.equal(book.result.periods[0].fields['05'],'600.00');
|
||||
for(const patch of [{specialRegime:'transit',confirmed:[]},{specialRegime:'',confirmed:[]},{confirmed:[],evidence:'Regime terminado; rever enquadramento'}]){
|
||||
const changed=recordSales(draft,{...book,rows:book.rows.map((r,i)=>i===0?{...r,...patch}:r)});
|
||||
assert.equal(changed.rows[0].amount,'100');assert.equal(changed.rows[0].sourceCurrency,'MZN');assert.equal(changed.rows[0].period,'2026-12');assert.equal(changed.result.periods[0].fields['05'],null);assert.deepEqual(changed.history.at(-1),book.result);
|
||||
const edited={...draft,modelo_a_snapshot:saveSalesBook(draft,{...book,rows:changed.rows})};assert.equal(salesCurrent(edited,salesBook(edited)),false);
|
||||
}
|
||||
});
|
||||
test('snapshot/report retain regime,source and assumptions;all19 previous books are identical/current without recalculation',()=>{
|
||||
const{draft,book}=fixture();assert.ok(salesCurrent(draft,book));assert.deepEqual(salesBook(JSON.parse(JSON.stringify(draft))),JSON.parse(JSON.stringify(book)));
|
||||
const before=JSON.parse(frozen.modelo_a_snapshot).salesOperations,after=JSON.parse(draft.modelo_a_snapshot).salesOperations;assert.equal(Object.keys(before).length,19);
|
||||
for(const[context,original]of Object.entries(before)){assert.deepEqual(after[context],original);assert.ok(salesCurrent({...draft,context_opportunity:context},after[context]));}
|
||||
const report=JSON.stringify(createProjectDossierReport(draft,{selectedSections:new Set(['finance']),version:'QA G5A'}));
|
||||
for(const token of ['opportunity:328','Manica','2026-12','600.00','14(1)(b)','14(1)(c)','14(1)(d)','19(1)(b)(iv)','Regime especial','Importação temporária','Loja franca','pressuposto expresso','QA G5A'])assert.ok(report.includes(token),token);
|
||||
if(process.env.IVA_G5A_CALCULATED)fs.writeFileSync(process.env.IVA_G5A_CALCULATED,JSON.stringify(draft));
|
||||
});
|
||||
Reference in New Issue
Block a user