Compare commits
264
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
019bcbad6c | ||
|
|
0ebb20c86a | ||
|
|
b0818c0163 | ||
|
|
ec786f4ae2 | ||
|
|
6c12aabb3a | ||
|
|
cd259623ae | ||
|
|
9b95e5e7a8 | ||
|
|
1b67fa85ff | ||
|
|
63cc336787 | ||
|
|
af7d250320 | ||
|
|
2b592ded66 | ||
|
|
5837f34a2c | ||
|
|
2fdca86367 | ||
|
|
833b4e5cef | ||
|
|
67a96085c8 | ||
|
|
b0e01ef737 | ||
|
|
2a7254406d | ||
|
|
4601bf64a0 | ||
|
|
6cffa1188f | ||
|
|
4853bc7284 | ||
|
|
03c26d6613 | ||
|
|
3f4e71c3f3 | ||
|
|
ec33fb5be2 | ||
|
|
aac3f46306 | ||
|
|
8f14f5dde2 | ||
|
|
fb7248661d | ||
|
|
0682ef74e2 | ||
|
|
21ce03f65c | ||
|
|
6f1cf7b7a0 | ||
|
|
a4329bb4bf | ||
|
|
90b31c677f | ||
|
|
33cc971a12 | ||
|
|
cd530b248b | ||
|
|
2087134143 | ||
|
|
67b8b58149 | ||
|
|
adb849d4fc | ||
|
|
5d5f3b4148 | ||
|
|
9c2b2c6560 | ||
|
|
acc633bf08 | ||
|
|
a89f9eca8c | ||
|
|
7e5710ebbd | ||
|
|
6f90fcb9d4 | ||
|
|
e3caf55361 | ||
|
|
0bef805ede | ||
|
|
70b4a640ee | ||
|
|
0460c85330 | ||
|
|
9f053ac9d3 | ||
|
|
6234d34392 | ||
|
|
92a7418cb6 | ||
|
|
76be72c38c | ||
|
|
3bcd98e78e | ||
|
|
9600880169 | ||
|
|
df7cb7fa47 | ||
|
|
287f2f8321 | ||
|
|
4672789f2b | ||
|
|
15894f4b04 | ||
|
|
e62b7dfdc2 | ||
|
|
9bd2e062f4 | ||
|
|
948621a65c | ||
|
|
50463ca716 | ||
|
|
4193056bdd | ||
|
|
20bfeb4f71 | ||
|
|
1dda6ea258 | ||
|
|
0a80f1c457 | ||
|
|
eb9294ef42 | ||
|
|
2359a88dba | ||
|
|
69b6c49a60 | ||
|
|
163e090ea5 | ||
|
|
9b26217dec | ||
|
|
ebf5e53c3c | ||
|
|
9783c54b2c | ||
|
|
0f9f7e3409 | ||
|
|
78c9f4a356 | ||
|
|
7996c35933 | ||
|
|
29e708ba2d | ||
|
|
f9fb04f947 | ||
|
|
77d1290258 | ||
|
|
946fc08906 | ||
|
|
7ecf9ec79a | ||
|
|
536559d651 | ||
|
|
c1314cdf90 | ||
|
|
ff8848d32d | ||
|
|
1565aa4ffb | ||
|
|
4e4bf6b859 | ||
|
|
5ec2f198a3 | ||
|
|
e32690799f | ||
|
|
2d889a211b | ||
|
|
50fdd97916 | ||
|
|
9842dcbb0e | ||
|
|
e384418ecc | ||
|
|
0eb37ef59b | ||
|
|
2ed62165b7 | ||
|
|
d46b794ab2 | ||
|
|
d65d3f5c4e | ||
|
|
8e5565d5e0 | ||
|
|
72e56f7ae5 | ||
|
|
4cebd61765 | ||
|
|
1efb32c244 | ||
|
|
f75f36f0e3 | ||
|
|
a23f1dcb6e | ||
|
|
e3601c124d | ||
|
|
615f78e79f | ||
|
|
965da26426 | ||
|
|
e99ea1d013 | ||
|
|
6f056359df | ||
|
|
0cd7e9fb62 | ||
|
|
689a4c93c3 | ||
|
|
d3e9f3732c | ||
|
|
69f2e365bf | ||
|
|
4e97cd05ea | ||
|
|
1f7fc13872 | ||
|
|
0eb2c485cc | ||
|
|
2e21ca4500 | ||
|
|
fae8162c58 | ||
|
|
d03101bb69 | ||
|
|
38faeac685 | ||
|
|
3be371c823 | ||
|
|
686328a085 | ||
|
|
40a4ddcbde | ||
|
|
e50733ba1d | ||
|
|
8df721ac51 | ||
|
|
25cae1d98b | ||
|
|
679203d4b1 | ||
|
|
2fccbc8ee8 | ||
|
|
19b31d51c5 | ||
|
|
b1c8e0e343 | ||
|
|
117f2a70a8 | ||
|
|
a153d0782f | ||
|
|
0b0e002d15 | ||
|
|
b641887274 | ||
|
|
f946364baa | ||
|
|
3846be8fc6 | ||
|
|
b898955603 | ||
|
|
7b54efb0fc | ||
|
|
7a58fa2435 | ||
|
|
0f0d2e566f | ||
|
|
82e010c44f | ||
|
|
6eefe4b332 | ||
|
|
0dc2d64b20 | ||
|
|
bda6d1e3a0 | ||
|
|
ac948bd8b7 | ||
|
|
908c8afc54 | ||
|
|
643ba6ed72 | ||
|
|
ccdecbd8d7 | ||
|
|
da798dd1d8 | ||
|
|
0304612093 | ||
|
|
d76078a81f | ||
|
|
c4cc7d83e7 | ||
|
|
744682835a | ||
|
|
1fe742561f | ||
|
|
8882dc54d0 | ||
|
|
eb9e0dbc60 | ||
|
|
e45a1394fa | ||
|
|
72f4187d3b | ||
|
|
a5ac8ca1c9 | ||
|
|
fe69a16eea | ||
|
|
7696af6814 | ||
|
|
d4eae917ee | ||
|
|
b297058d11 | ||
|
|
48146089cd | ||
|
|
2440cb448a | ||
|
|
9dbfdd67ad | ||
|
|
b1928b61e5 | ||
|
|
541ea70484 | ||
|
|
9a56d98242 | ||
|
|
38b49bd5fa | ||
|
|
9b0f437073 | ||
|
|
8171c7992e | ||
|
|
30760cab9b | ||
|
|
33d18b9efc | ||
|
|
0aac0d1555 | ||
|
|
3b788ec009 | ||
|
|
db4ff64e87 | ||
|
|
c28e290b42 | ||
|
|
8d127799cd | ||
|
|
d32ad1e0a6 | ||
|
|
122f4f04b9 | ||
|
|
dacda11c07 | ||
|
|
490527b92c | ||
|
|
4a35d63cd3 | ||
|
|
0e644b5524 | ||
|
|
675cf38f67 | ||
|
|
89ab288334 | ||
|
|
5030116ee5 | ||
|
|
8719e916ea | ||
|
|
689e7cbe8b | ||
|
|
d89912e579 | ||
|
|
544068e8cc | ||
|
|
e8c39a1b54 | ||
|
|
1655f57e69 | ||
|
|
d18ff0f049 | ||
|
|
355656b5c8 | ||
|
|
cd10cccbf4 | ||
|
|
d044ef1efc | ||
|
|
65b87819a0 | ||
|
|
be62783b98 | ||
|
|
98fc16a3fb | ||
|
|
276d833a4b | ||
|
|
5d45541a11 | ||
|
|
066707ece6 | ||
|
|
c1f4a71963 | ||
|
|
cf2ddf21a1 | ||
|
|
3fd5128c62 | ||
|
|
cdf8fcfba4 | ||
|
|
8036b9b071 | ||
|
|
6985f82e9c | ||
|
|
2856240cf4 | ||
|
|
32144aa2f3 | ||
|
|
1afdfee8c0 | ||
|
|
bc84fbdb3e | ||
|
|
b6a626c92d | ||
|
|
55136b446d | ||
|
|
4a01e9e2b7 | ||
|
|
ad4160f040 | ||
|
|
af9261809c | ||
|
|
d8224ba84b | ||
|
|
088f2c2cf4 | ||
|
|
603a88e1d3 | ||
|
|
43cd0be7cb | ||
|
|
89a9c3d994 | ||
|
|
4098192a05 | ||
|
|
d242482042 | ||
|
|
6b544548d3 | ||
|
|
c3f7c3ad10 | ||
|
|
445aa7e69d | ||
|
|
7c1f532134 | ||
|
|
115c773162 | ||
|
|
ec4b2f2af2 | ||
|
|
3d877ec745 | ||
|
|
6948ed62fc | ||
|
|
7d798579a6 | ||
|
|
5bda74aedc | ||
|
|
f2150b1912 | ||
|
|
7ca94967f3 | ||
|
|
e1f010f941 | ||
|
|
0025309b98 | ||
|
|
a0e80db4ec | ||
|
|
7226287526 | ||
|
|
f1ac82ae4d | ||
|
|
98474777f6 | ||
|
|
3848f29bea | ||
|
|
203492997e | ||
|
|
165c2f6171 | ||
|
|
4ad1bf402b | ||
|
|
e12ef6ad42 | ||
|
|
c641b267ac | ||
|
|
e2b0fb4b2d | ||
|
|
7d08c2c664 | ||
|
|
761035aefb | ||
|
|
20a4099d10 | ||
|
|
e03de682ca | ||
|
|
37a8eb015a | ||
|
|
65eddf6bc7 | ||
|
|
fb4e7d8970 | ||
|
|
bc93ccdb9e | ||
|
|
7ccf62adec | ||
|
|
f4d0970917 | ||
|
|
e46f973159 | ||
|
|
1bcf34c0c0 | ||
|
|
ef0c2acd36 | ||
|
|
30aed7cd12 | ||
|
|
95d4cf44d7 | ||
|
|
73c046e104 | ||
|
|
15d82611b6 |
@@ -1,5 +1,13 @@
|
||||
# Instruções permanentes do projeto InvesteMoz
|
||||
|
||||
## Percurso adaptativo — decisão expressa da Tempo, 23/10/2026
|
||||
|
||||
Carteira/projectos âncora e percurso adaptativo têm diagnósticos distintos, mas fazem parte da mesma experiência e responsabilidade de correcção. Separar o diagnóstico não autoriza adiamento, desligamento do percurso ou perda de contexto entre corredor/localização, oportunidades, associações documentadas a âncoras/clusters, dossier e simulador. A reposição prioritária só se considera demonstrada com causa delimitada e disponibilidade recuperada, reutilizando o inventário e os recibos existentes; melhorias noutro ponto não a comprovam. Consultar os registos de reposição antes de voltar a declarar causa desconhecida ou registos desaparecidos.
|
||||
|
||||
Apresentar apenas o necessário ao investimento em preparação, com entrada por ideia, oportunidade, sector ou localização, reutilizando informação válida e autorizada da oportunidade, perfil, organização, dossier e fontes anteriores. As etapas são adaptáveis, não seis formulários obrigatórios. Não sobrescrever edições deliberadas; explicar divergências e impactos antes da confirmação. Conservar escolhas ao avançar, regressar, actualizar e autenticar-se. Seleccionar opções únicas e pedir apenas dados em falta ou desactualizados.
|
||||
|
||||
Ocultar campos e acções sem aplicação, conservando explicação breve e histórico; desconhecido não significa não aplicável. Na selecção múltipla, partilhar dados comuns sem perder os requisitos específicos de cada oportunidade. Consulta pública livre; autenticação no momento de manifestar interesse ou iniciar operação privada. Relatórios e exportações devem reflectir o contexto e as etapas efectivamente aplicáveis. O utilizador deve perceber onde está, o que falta e a próxima acção. Aperfeiçoar os componentes existentes por incrementos e registar cobertura na matriz existente; esta instrução não declara concluída a sua implementação transversal.
|
||||
|
||||
## Regras permanentes do InvesteMoz — decisão da Tempo, 12/10/2026
|
||||
|
||||
1. O portal InvesteMoz é propriedade da Tempo, Lda.
|
||||
@@ -46,3 +54,13 @@ Referenciar estas orientações nos requisitos correspondentes da matriz existen
|
||||
A legislação, os formulários e os procedimentos oficiais disponibilizados são fontes válidas para implementar os requisitos. As decisões e procedimentos da Tempo orientam a sua utilização no portal. Traduzir essas fontes em campos, regras, documentos, cálculos e percursos executáveis com rastreabilidade, sem exigir nova validação jurídica genérica ou criar aprovadores, restrições ou condições por interpretação do Codex.
|
||||
|
||||
Uma divergência concreta deve identificar os trechos, períodos e comportamento afectados; prosseguir com os restantes requisitos. Uma decisão de implementação em falta deve ser apresentada especificamente à Tempo, sem a substituir por regra inventada. Rever e remover bloqueios anteriores sem fundamento numa fonte aplicável ou decisão expressa da Tempo, preservando dados e histórico. A rastreabilidade explica a execução e não constitui uma autoridade adicional. Mantêm-se os limites autorizados de QA e das alterações no activo.
|
||||
|
||||
## Preservação do concluído — pedido expresso da Tempo, 23/10/2026
|
||||
|
||||
Antes de avançar com novas rondas de testes/validações, inventariar na matriz e no manual existentes as funcionalidades concluídas e as funcionalidades desaparecidas, e repor as perdas confirmadas. Preservar as aprovações, dados, originais, relações, versões, histórico e acessos já concluídos. Não transformar uma entrega anterior em funcionalidade nova nem exigir novamente a decisão organizacional já registada.
|
||||
|
||||
Comparar código, schema, dados, configuração e permissões entre o último estado demonstrado e o destino. Distinguir eliminação, perda de visibilidade, diferença de ambiente, pendência real e estado documental desactualizado; uma página vazia ou a falta de nova prova não apagam a aceitação anterior. Reutilizar as provas aceites e conferir apenas o delta da reposição. Cada entrega seguinte deve explicar qualquer redução do âmbito previamente disponível, em vez de a aceitar como consequência normal da implementação.
|
||||
|
||||
Transporte privado não equivale à revogação de uma divulgação anterior aprovada. Reconciliar a decisão anterior de forma delimitada e auditada, sem publicar automaticamente conteúdos novos, reviver exemplares arquivados ou sobrescrever edições posteriores. Mantêm-se backup/restauro, autenticação e os limites concretos de cada tarefa.
|
||||
|
||||
Escolha técnica de verificação: comparar dados protegidos por segurança por linha (RLS) com identidades e contexto de acesso equivalentes. Uma leitura da aplicação sem actor pode ocultar registos que o utilizador do backup consegue ler; confirmar essa diferença antes de declarar perda ou propor reposição. Esta orientação não altera permissões do portal nem autoriza contornar RLS numa operação da equipa.
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Opportunity;
|
||||
use App\Services\CorridorAgribusinessOpportunities;
|
||||
use App\Services\OpportunityManagement;
|
||||
use App\Services\OpportunityPromotion;
|
||||
use App\Services\PortalProfileAccess;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Inertia\Inertia;
|
||||
|
||||
final class CorridorAgribusinessController extends Controller
|
||||
{
|
||||
private function manifest(CorridorAgribusinessOpportunities $service): string
|
||||
{
|
||||
return hash('sha256', json_encode($service->entries(), JSON_THROW_ON_ERROR));
|
||||
}
|
||||
|
||||
public function show(Request $request, CorridorAgribusinessOpportunities $service)
|
||||
{
|
||||
$access = app(PortalProfileAccess::class);
|
||||
abort_unless($access->internalAssignment($request->user(), 'investment_project') || $access->has($request->user(), 'publisher'), 403);
|
||||
$records = Opportunity::withTrashed()->whereIn('management_creation_key', array_column($service->entries(), 'key'))->get()->keyBy('management_creation_key');
|
||||
foreach ($records as $record) abort_unless($access->canView($request->user(), $record), 403);
|
||||
return Inertia::render('management/corridor-agribusiness', ['manifestHash' => $this->manifest($service),
|
||||
'canRegister' => (bool) $access->internalAssignment($request->user(), 'investment_project'),
|
||||
'entries' => array_map(function ($entry) use ($records) {
|
||||
$r = $records->get($entry['key']);
|
||||
return [...$entry, 'id' => $r?->id, 'status' => $r?->status, 'href' => $r ? '/oportunidades/'.$r->slug : null];
|
||||
}, $service->entries())]);
|
||||
}
|
||||
|
||||
public function register(Request $request, CorridorAgribusinessOpportunities $service)
|
||||
{
|
||||
$data = $request->validate(['manifest_hash' => 'required|string|size:64', 'confirm' => 'required|accepted']);
|
||||
abort_unless(hash_equals($this->manifest($service), $data['manifest_hash']), 409, 'A fonte mudou; recupere a prévia.');
|
||||
$access = app(PortalProfileAccess::class);
|
||||
$grant = $access->internalAssignment($request->user(), 'investment_project');
|
||||
abort_unless($grant && $access->mfa($request->user()), 403, 'Use a designação existente e MFA recente.');
|
||||
return response()->json(['records' => $service->register($request->user(), $grant->organization_id)]);
|
||||
}
|
||||
|
||||
public function preview(Request $request, CorridorAgribusinessOpportunities $service)
|
||||
{
|
||||
$previews = [];
|
||||
foreach ($service->entries() as $entry) {
|
||||
$record = Opportunity::where('management_creation_key', $entry['key'])->firstOrFail();
|
||||
$input = data_get($record->workflow_context, 'promotional_summary.input');
|
||||
abort_unless(is_array($input), 409, 'Complete a selecção pública na divulgação individual.');
|
||||
$previews[] = ['id' => $record->id, ...app(OpportunityPromotion::class)->preview($request->user(), $record,
|
||||
[...$input, 'source_date' => $input['source_date'] ?: null, 'action' => 'disclose', 'etag' => app(OpportunityManagement::class)->etag($record)])];
|
||||
}
|
||||
return response()->json(['previews' => $previews]);
|
||||
}
|
||||
|
||||
public function disclose(Request $request, CorridorAgribusinessOpportunities $service)
|
||||
{
|
||||
$data = $request->validate(['confirm' => 'required|accepted', 'reason' => 'required|string|min:20|max:1000',
|
||||
'previews' => 'required|array|size:34', 'previews.*.id' => 'required|integer|distinct',
|
||||
'previews.*.token' => 'required|string|max:300000', 'previews.*.operation_key' => 'required|uuid|distinct']);
|
||||
$expected = Opportunity::whereIn('management_creation_key', array_column($service->entries(), 'key'))->pluck('id')->sort()->values()->all();
|
||||
$supplied = array_column($data['previews'], 'id'); sort($supplied);
|
||||
abort_unless($expected === $supplied && count($expected) === 34, 409, 'A prévia deve identificar exactamente as 34 fichas deste lote.');
|
||||
return response()->json(DB::transaction(function () use ($request, $data) {
|
||||
$result = [];
|
||||
foreach ($data['previews'] as $preview) $result[] = app(OpportunityPromotion::class)->confirm($request->user(), $preview['id'],
|
||||
[...$preview, 'confirm' => true, 'reason' => $data['reason']]);
|
||||
return ['records' => $result];
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -81,31 +81,18 @@ class EditorialArticleController extends Controller
|
||||
app(\App\Services\DocumentManagementAccess::class)->assertEditableResource(request()->user(), $id);
|
||||
$r = DB::table('portal_resources')->find($id);
|
||||
abort_unless($r, 404);
|
||||
$content = $r->editorial_content ? json_decode($r->editorial_content, true) : null;
|
||||
if ($content === null) {
|
||||
$document = DB::table('documents')->find($r->document_id);
|
||||
if ($document && $document->status === 'active' && $document->malware_scan_status === 'clean'
|
||||
&& in_array($document->media_type, ['text/plain', 'application/json'], true)) {
|
||||
$binary = app(VerifiedDocumentBinary::class)->respond($document);
|
||||
$bytes = $binary instanceof \Symfony\Component\HttpFoundation\BinaryFileResponse
|
||||
? file_get_contents($binary->getFile()->getPathname()) : $binary->getContent();
|
||||
$original = json_decode($bytes, true);
|
||||
if (is_array($original) && ($original['format'] ?? '') === 'investmoz-legacy-article-v1') {
|
||||
$html = preg_replace('~</(?:p|div|li|h[1-6])>|<br\s*/?>~i', "\n\n", $original['content_html'] ?? '');
|
||||
$content = ['body' => trim(html_entity_decode(strip_tags($html), ENT_QUOTES | ENT_HTML5, 'UTF-8')), 'image_resource_id' => null];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Inertia::render('portal/article-editor', ['resource' => ['id' => $r->id, 'title' => $r->title, 'metadata_version' => $r->metadata_version],
|
||||
'content' => $content, 'images' => $this->publicResources()->whereIn('d.media_type', ['image/png', 'image/jpeg', 'image/webp'])->get(['r.id', 'r.title']),
|
||||
'revisions' => DB::table('portal_resource_revisions')->where('resource_id', $id)->orderByDesc('revision_no')->get(['revision_no', 'change_type', 'created_at'])]);
|
||||
$reading = app(\App\Services\EditorialReading::class);
|
||||
$original = $reading->original($r);
|
||||
$content = $reading->content($r, $original);
|
||||
return Inertia::render('portal/article-editor', ['resource' => ['id' => $r->id, 'title' => $r->title, 'metadata_version' => $r->metadata_version, 'published' => (bool) $r->published],
|
||||
'content' => $content, 'source' => $original ? array_intersect_key($original, array_flip(['source_url', 'published_at', 'modified_at', 'legacy_id', 'image_source_url'])) : null, 'images' => $this->publicResources()->whereIn('d.media_type', ['image/png', 'image/jpeg', 'image/webp'])->get(['r.id', 'r.title']),
|
||||
'revisions' => DB::table('portal_resource_revisions')->where('resource_id', $id)->orderByDesc('revision_no')->get(['revision_no', 'change_type', 'created_at'])])->toResponse(request())->header('Cache-Control', 'private, no-store');
|
||||
}
|
||||
|
||||
public function save(Request $request, int $id)
|
||||
{
|
||||
$this->installed();
|
||||
$data = $request->validate(['body' => ['required', 'string', 'max:100000'], 'image_resource_id' => ['nullable', 'integer'], 'metadata_version' => ['required', 'integer', 'min:1']]);
|
||||
$data = $this->validateContent($request);
|
||||
DB::transaction(function () use ($request, $id, $data) {
|
||||
$r = DB::table('portal_resources')->where('id', $id)->lockForUpdate()->first();
|
||||
abort_unless($r, 404);
|
||||
@@ -118,7 +105,7 @@ class EditorialArticleController extends Controller
|
||||
if ($body === '') {
|
||||
throw ValidationException::withMessages(['body' => 'Escreva o corpo do artigo.']);
|
||||
}
|
||||
$content = ['format' => 1, 'body' => $body, 'image_resource_id' => $data['image_resource_id'] ?? null];
|
||||
$content = $this->edition($r, $data);
|
||||
$revision = (int) $r->metadata_version + 1;
|
||||
DB::table('portal_resources')->where('id', $id)->update(['editorial_content' => json_encode($content, JSON_THROW_ON_ERROR), 'published' => false, 'approved_by' => null, 'metadata_version' => $revision, 'last_reviewed_by' => $request->user()->id, 'last_reviewed_at' => now(), 'updated_at' => now()]);
|
||||
$resource = DB::table('portal_resources')->find($id);
|
||||
@@ -130,16 +117,46 @@ class EditorialArticleController extends Controller
|
||||
return redirect('/management/portal-services/resources/'.$id.'/article')->with('success', 'Artigo guardado como rascunho. Publique expressamente no acervo quando estiver pronto.');
|
||||
}
|
||||
|
||||
public function show(int $id)
|
||||
private function validateContent(Request $request): array
|
||||
{
|
||||
return $request->validate(['body' => ['required', 'string', 'max:100000'], 'image_resource_id' => ['nullable', 'integer'], 'image_mode' => ['nullable', 'in:original,selected,none'], 'metadata_version' => ['required', 'integer', 'min:1']]);
|
||||
}
|
||||
|
||||
private function edition(object $resource, array $data): array
|
||||
{
|
||||
$reading = app(\App\Services\EditorialReading::class);
|
||||
$original = $reading->original($resource);
|
||||
$mode = $data['image_mode'] ?? (!empty($data['image_resource_id']) ? 'selected' : 'none');
|
||||
if ($mode === 'selected') abort_unless(!empty($data['image_resource_id']) && $reading->publicResources()->where('r.id', $data['image_resource_id'])->whereIn('d.media_type', ['image/png', 'image/jpeg', 'image/webp'])->exists(), 422, 'Escolha uma imagem pública disponível na biblioteca.');
|
||||
return ['format' => 1, 'body' => trim($data['body']), 'image_mode' => $mode, 'image_resource_id' => $mode === 'selected' ? (int)$data['image_resource_id'] : null,
|
||||
'preserve_original_html' => $original && trim($data['body']) === $reading->plain($original['content_html'])];
|
||||
}
|
||||
|
||||
public function preview(Request $request, int $id)
|
||||
{
|
||||
$this->installed();
|
||||
$r = $this->publicResources()->where('r.id', $id)->first(['r.id', 'r.title', 'r.description', 'r.editorial_content', 'r.document_id', 'd.issuer']);
|
||||
abort_unless($r && $r->editorial_content, 404);
|
||||
$content = json_decode($r->editorial_content, true);
|
||||
// Recheck the original bytes using the same binary gate as the library.
|
||||
$binary = app(VerifiedDocumentBinary::class)->respond($this->publicResources()->where('r.id', $id)->first(['r.*', 'd.*']));
|
||||
$image = ! empty($content['image_resource_id']) ? $this->publicResources()->where('r.id', $content['image_resource_id'])->whereIn('d.media_type', ['image/png', 'image/jpeg', 'image/webp'])->value('r.id') : null;
|
||||
app(\App\Services\DocumentManagementAccess::class)->assertEditableResource($request->user(), $id);
|
||||
$resource = DB::table('portal_resources')->find($id); abort_unless($resource, 404);
|
||||
return Inertia::render('portal/article', ['article' => app(\App\Services\EditorialReading::class)->reading($resource, null, true)])
|
||||
->toResponse($request)->header('Cache-Control', 'private, no-store')->header('X-Robots-Tag', 'noindex, nofollow');
|
||||
}
|
||||
|
||||
return Inertia::render('portal/article', ['article' => ['id' => $id, 'title' => $r->title, 'description' => $r->description, 'author' => $r->issuer, 'body' => $content['body'], 'image_url' => $image ? '/documentos/'.$image.'/view' : null, 'original_url' => '/documentos/'.$id]]);
|
||||
public function previewContent(Request $request, int $id)
|
||||
{
|
||||
$this->installed();
|
||||
app(\App\Services\DocumentManagementAccess::class)->assertEditableResource($request->user(), $id);
|
||||
$resource = DB::table('portal_resources')->find($id); abort_unless($resource, 404);
|
||||
$data = $this->validateContent($request);
|
||||
abort_unless((int)$resource->metadata_version === (int)$data['metadata_version'], 409, 'A revisão mudou; recupere antes de rever a prévia.');
|
||||
return response()->json(['article' => app(\App\Services\EditorialReading::class)->reading($resource, $this->edition($resource, $data), true)])
|
||||
->header('Cache-Control', 'private, no-store')->header('X-Robots-Tag', 'noindex, nofollow');
|
||||
}
|
||||
|
||||
public function show(Request $request, int $id)
|
||||
{
|
||||
$this->installed();
|
||||
$resource = app(\App\Services\EditorialReading::class)->publicResources()->where('r.id', $id)->first(['r.*']);
|
||||
abort_unless($resource, 404);
|
||||
return Inertia::render('portal/article', ['article' => app(\App\Services\EditorialReading::class)->reading($resource)])->toResponse($request)->header('Cache-Control', 'private, no-store');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Services\InvestmentComplements;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
final class InvestmentComplementController extends Controller
|
||||
{
|
||||
public function index(Request $request, InvestmentComplements $service)
|
||||
{
|
||||
$data = $request->validate(['origin' => [\Illuminate\Validation\Rule::requiredIf(!$request->has('contexts')), 'nullable', 'string', 'max:100'], 'territory_id' => 'nullable|uuid',
|
||||
'contexts' => 'sometimes|array|max:100', 'contexts.*' => 'array:origin,territory_id', 'contexts.*.origin' => 'required|string|max:100', 'contexts.*.territory_id' => 'nullable|uuid']);
|
||||
$items = [];
|
||||
$issues = [];
|
||||
foreach ($data['contexts'] ?? [['origin' => $data['origin'], 'territory_id' => $data['territory_id'] ?? null]] as $context) {
|
||||
try {
|
||||
$items = [...$items, ...$service->options($context['origin'], $context['territory_id'] ?? null)];
|
||||
} catch (\Illuminate\Database\Eloquent\ModelNotFoundException|\Symfony\Component\HttpKernel\Exception\HttpException $e) {
|
||||
$status = $e instanceof \Symfony\Component\HttpKernel\Exception\HttpException ? $e->getStatusCode() : 404;
|
||||
if (!isset($data['contexts']) || $status !== 404) throw $e;
|
||||
$issues[] = ['origin' => $context['origin'], 'message' => 'Uma referência escolhida deixou de estar disponível para consulta pública. A relação guardada conserva-se no dossier; os outros complementos continuam disponíveis.'];
|
||||
}
|
||||
}
|
||||
return response()->json(isset($data['contexts']) ? ['items' => $items, 'issues' => $issues] : $items)->header('Cache-Control', 'private, no-store');
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ class InvestmentDiscoveryController extends Controller
|
||||
}
|
||||
|
||||
return Inertia::render('investment/catalogue', ['filters' => $filters, 'catalogueUrl' => $request->routeIs('investment.education') ? '/educacao' : '/oportunidades', 'references' => $catalogue->references(false, $filters),
|
||||
'corridorGroups' => ($filters['view'] ?? '') === 'corridors' ? app(\App\Services\OpportunityCorridorExplorer::class)->groups($filters) : [],
|
||||
'territorySelection' => app(InvestmentGeography::class)->selection($filters),
|
||||
'guides' => app(\App\Services\SectorInvestment::class)->guides(\App\Models\Sector::where('slug', $filters['sector'] ?? '')->where('is_active', true)->whereNotNull('published_at')->first()),
|
||||
'results' => $catalogue->query($filters)->paginate(12)->withQueryString(),
|
||||
@@ -88,7 +89,7 @@ class InvestmentDiscoveryController extends Controller
|
||||
$data = $request->validate(['zone_id' => ['nullable', 'uuid'], 'from_dossier' => ['nullable', 'uuid']]);
|
||||
$dossierOrigin = isset($data['from_dossier']) ? InvestmentPortfolioController::visible()->whereKey($data['from_dossier'])->firstOrFail() : null;
|
||||
if ($dossierOrigin) {
|
||||
$linked = false;
|
||||
$linked = in_array($record->id, app(\App\Services\CorridorAgribusinessOpportunities::class)->portfolioOpportunityIds($dossierOrigin), true);
|
||||
foreach (['projects' => 'project_id', 'clusters' => 'cluster_id', 'corridors' => 'corridor_id'] as $relation => $foreign) {
|
||||
if ($dossierOrigin->$foreign && DB::table('opportunity_'.$relation)->where('opportunity_id', $record->id)->where($foreign, $dossierOrigin->$foreign)->exists()) {
|
||||
$linked = true;
|
||||
@@ -106,7 +107,7 @@ class InvestmentDiscoveryController extends Controller
|
||||
$returnFilters = $request->query();
|
||||
unset($returnFilters['zone_id'], $returnFilters['from_dossier']);
|
||||
|
||||
return Inertia::render('investment/detail', ['record' => $record, 'context' => $catalogue->context($record->id), 'zone_origin' => $origin,
|
||||
return Inertia::render('investment/detail', ['complements' => app(\App\Services\InvestmentComplements::class)->options('opportunity:'.$record->id), 'record' => $record, 'context' => $catalogue->context($record->id), 'zone_origin' => $origin,
|
||||
'guides' => app(\App\Services\SectorInvestment::class)->guides($record->sector),
|
||||
'dossierOrigin' => $dossierOrigin ? ['id' => $dossierOrigin->id, 'title' => $dossierOrigin->title] : null,
|
||||
'returnUrl' => $returnFilters === [] ? '/oportunidades' : '/oportunidades?'.http_build_query($returnFilters)]);
|
||||
|
||||
@@ -61,8 +61,15 @@ class InvestmentPortfolioController extends Controller
|
||||
{
|
||||
$management = $request->routeIs('management.portfolio*');
|
||||
$filters = $request->validate(['q' => ['nullable', 'string', 'max:120'], 'kind' => ['nullable', 'in:corridor,cluster,project'],
|
||||
'sector' => ['nullable', 'string', 'max:500'],
|
||||
'province_id' => ['nullable', 'uuid'], 'district_id' => ['nullable', 'uuid'], 'admin_post_id' => ['nullable', 'uuid'], 'locality_id' => ['nullable', 'uuid']]);
|
||||
$query = $management ? InvestmentDossier::query() : self::visible();
|
||||
$sectorOptions = ($management ? InvestmentDossier::query() : self::visible())
|
||||
->whereNotNull('content->sector')->get()->pluck('content.sector')
|
||||
->filter(fn ($sector) => is_string($sector) && trim($sector) !== '')->unique()->sort()->values();
|
||||
if (! empty($filters['sector'])) {
|
||||
$query->where('content->sector', $filters['sector']);
|
||||
}
|
||||
if (! empty($filters['kind'])) {
|
||||
$query->whereNotNull($filters['kind'].'_id');
|
||||
}
|
||||
@@ -76,7 +83,7 @@ class InvestmentPortfolioController extends Controller
|
||||
}
|
||||
|
||||
return Inertia::render('portfolio/index', ['records' => $query->orderBy('title')->paginate(30)->withQueryString(),
|
||||
'management' => $management, 'filters' => $filters, 'territorySelection' => $territorySelection]);
|
||||
'management' => $management, 'filters' => $filters, 'sectors' => $sectorOptions, 'territorySelection' => $territorySelection]);
|
||||
}
|
||||
|
||||
public function show(Request $request, string $id): Response
|
||||
@@ -105,6 +112,7 @@ class InvestmentPortfolioController extends Controller
|
||||
|
||||
$opportunities = Opportunity::published()->where(function ($query) use ($record) {
|
||||
$query->whereRaw('false');
|
||||
$query->orWhereIn('id', app(\App\Services\CorridorAgribusinessOpportunities::class)->portfolioOpportunityIds($record));
|
||||
foreach (['clusters' => 'cluster_id', 'corridors' => 'corridor_id', 'projects' => 'project_id'] as $relation => $foreign) {
|
||||
if ($record->$foreign) {
|
||||
$query->orWhereIn('id', DB::table('opportunity_'.$relation)->where($foreign, $record->$foreign)->select('opportunity_id'));
|
||||
@@ -130,12 +138,19 @@ class InvestmentPortfolioController extends Controller
|
||||
->orderByDesc('updated_at')->limit(10)->get(['id', 'version', 'updated_at'])
|
||||
: collect();
|
||||
|
||||
return Inertia::render('portfolio/show', ['record' => $record, 'related' => $related, 'management' => $management, 'zones' => $zones,
|
||||
return Inertia::render('portfolio/show', ['complements' => $management ? [] : app(\App\Services\InvestmentComplements::class)->options('portfolio:'.$record->id), 'record' => $record, 'related' => $related, 'management' => $management, 'zones' => $zones,
|
||||
'anchorProject' => $anchorProject, 'existingSubmissions' => $existingSubmissions,
|
||||
'geography' => app(InvestmentRelations::class)->dossier($record, $management),
|
||||
'origin' => $origin ? ['id' => $origin->id, 'title' => $origin->title] : null, 'opportunities' => $opportunities, 'chains' => $chains]);
|
||||
}
|
||||
|
||||
public function resumeInterest(Request $request, string $id): RedirectResponse
|
||||
{
|
||||
self::visible()->findOrFail($id);
|
||||
$data = $request->validate(['catalogue_query' => ['nullable', 'string', 'max:4000']]);
|
||||
return redirect('/carteira/'.$id.'?'.http_build_query([...$data, 'prepare_interest' => '1']));
|
||||
}
|
||||
|
||||
public function save(Request $request, InvestmentDossier $dossier): RedirectResponse
|
||||
{
|
||||
$data = $request->validate(['version_no' => ['required', 'integer', 'min:1'], 'title' => ['required', 'string', 'max:255'], 'source' => ['required', 'string', 'max:2000'],
|
||||
|
||||
@@ -192,11 +192,13 @@ class InvestmentSubmissionController extends Controller
|
||||
{
|
||||
$required = $submitting ? 'required' : 'nullable';
|
||||
$data = $request->validate(['version' => ['required', 'integer', 'min:1'],
|
||||
'payload' => ['required', 'array:context_reuse,full_name,email,phone,country,residence_country_code,incorporation_country_code,organization_country_snapshot,declared_origin_country_code,organisation,representative_role,experience,investment_capacity,profile_id,sector,objective,participation_id,partnership_id,estimated_amount,currency,horizon,location,cluster_ids,corridor_ids,project_ids,contact_consent,other_details'],
|
||||
'payload' => ['required', 'array:context_opportunity,context_opportunity_snapshot,context_reuse,full_name,email,phone,country,residence_country_code,incorporation_country_code,organization_country_snapshot,declared_origin_country_code,organisation,representative_role,experience,investment_capacity,profile_id,sector,objective,participation_id,partnership_id,estimated_amount,currency,horizon,location,cluster_ids,corridor_ids,project_ids,contact_consent,other_details'],
|
||||
'payload.organization_country_snapshot' => ['sometimes', 'array', 'max:10'],
|
||||
'payload.residence_country_code' => ['nullable', 'string', app(CountryCatalogue::class)->rule()],
|
||||
'payload.incorporation_country_code' => ['nullable', 'string', app(CountryCatalogue::class)->rule()],
|
||||
'payload.declared_origin_country_code' => ['nullable', 'string', app(CountryCatalogue::class)->rule()],
|
||||
'payload.context_opportunity' => ['nullable', 'string', 'max:100'],
|
||||
'payload.context_opportunity_snapshot' => ['nullable', 'string', 'max:200000'],
|
||||
'payload.context_reuse' => ['nullable', 'string', 'max:10000'],
|
||||
'payload.other_details' => ['nullable', 'string', 'max:5000'],
|
||||
'payload.full_name' => [$required, 'string', ...($submitting ? ['min:3'] : []), 'max:150'], 'payload.email' => [$required, $submitting ? 'email:rfc' : 'string', 'max:150'],
|
||||
@@ -247,6 +249,9 @@ class InvestmentSubmissionController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$bound = DB::table('desk_cases')->where('submission_id', $request->route('id'))->where('user_id', $request->user()->id)->whereNotNull('journey_id')->first();
|
||||
if ($bound) $data['payload'] = app(\App\Services\InvestmentConsumerScope::class)->bind($request->user(), $bound->id, $data['payload'], $submitting);
|
||||
else unset($data['payload']['context_opportunity'], $data['payload']['context_opportunity_snapshot']);
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -266,7 +271,7 @@ class InvestmentSubmissionController extends Controller
|
||||
$version = DB::transaction(function () use ($request, $id, $data) {
|
||||
$row = $this->owned($request, $id, true, true);
|
||||
abort_unless($row->status === 'draft' && $row->version === (int) $data['version'], 409, 'Rascunho alterado. Recarregue antes de guardar.');
|
||||
$row->update(['payload' => $this->preserveCountrySource($row, $data['payload']), 'version' => $row->version + 1]);
|
||||
$row->update([...(isset($data['payload']['context_opportunity']) ? ['opportunity_id'=>(int)substr($data['payload']['context_opportunity'],12)] : []), 'payload' => $this->preserveCountrySource($row, $data['payload']), 'version' => $row->version + 1]);
|
||||
InvestmentSpecificNeed::where('submission_id', $id)->delete();
|
||||
foreach ($data['needs'] ?? [] as $need) {
|
||||
InvestmentSpecificNeed::create([...$need, 'submission_id' => $id]);
|
||||
@@ -310,7 +315,8 @@ class InvestmentSubmissionController extends Controller
|
||||
return InterestRequest::findOrFail($row->interest_request_id)->reference;
|
||||
}
|
||||
abort_unless($row->version === (int) $data['version'], 409, 'Rascunho alterado. Recarregue.');
|
||||
$opportunity = $row->opportunity_id ? Opportunity::published()->findOrFail($row->opportunity_id) : null;
|
||||
$scopeKey = $data['payload']['context_opportunity'] ?? null;
|
||||
$opportunity = $scopeKey ? Opportunity::published()->findOrFail(substr($scopeKey,12)) : ($row->opportunity_id ? Opportunity::published()->findOrFail($row->opportunity_id) : null);
|
||||
if ($row->dossier_id) {
|
||||
InvestmentPortfolioController::visible()->findOrFail($row->dossier_id);
|
||||
}
|
||||
@@ -331,12 +337,14 @@ class InvestmentSubmissionController extends Controller
|
||||
'sector_interest' => $p['sector'], 'message' => $p['objective'], 'privacy_consent' => true, 'consented_at' => now(),
|
||||
'status' => 'received', 'source_page' => '/investidor/manifestacoes/'.$id,
|
||||
'metadata' => ['submission_id' => $id, 'portal_user_id' => $request->user()->id, 'dossier_id' => $row->dossier_id,
|
||||
'context_opportunity' => $p['context_opportunity'] ?? null,
|
||||
'context_opportunity_snapshot' => $p['context_opportunity_snapshot'] ?? null,
|
||||
'declared_origin_country_code' => $p['declared_origin_country_code'] ?? null,
|
||||
'residence_country_code' => $p['residence_country_code'] ?? null,
|
||||
'incorporation_country_code' => $p['incorporation_country_code'] ?? null,
|
||||
...(isset($p['organization_country_snapshot']) ? ['organization_country_snapshot' => $p['organization_country_snapshot']] : []),
|
||||
...($zoneOrigin ? ['zone_origin' => (array) $zoneOrigin] : [])]]));
|
||||
$row->update(['payload' => $p, 'version' => $row->version + 1, 'interest_request_id' => $interest->id, 'status' => 'submitted']);
|
||||
$row->update(['opportunity_id'=>$opportunity?->id, 'payload' => $p, 'version' => $row->version + 1, 'interest_request_id' => $interest->id, 'status' => 'submitted']);
|
||||
InvestmentSpecificNeed::where('submission_id', $id)->delete();
|
||||
foreach ($data['needs'] ?? [] as $need) {
|
||||
InvestmentSpecificNeed::create([...$need, 'submission_id' => $id]);
|
||||
|
||||
@@ -19,12 +19,21 @@ class InvestmentTerritoryController extends Controller
|
||||
$data = $request->validate(['territory_id' => ['required', 'uuid']]);
|
||||
$profile = $request->is('minhas-oportunidades/*');
|
||||
$management = $request->is('management/*') || $profile;
|
||||
$actor = $request->user();
|
||||
$access = app(PortalProfileAccess::class);
|
||||
// The general consumers use this same endpoint while authenticated.
|
||||
// Reuse the read access already granted by the private cadastral routes.
|
||||
$profileAccess = $actor && $actor->hasVerifiedEmail()
|
||||
&& ($access->grants($actor) !== [] || $access->superuser($actor));
|
||||
$internal = $profileAccess || ($actor?->hasVerifiedEmail() && $actor->can('manage-portal'));
|
||||
if ($management) {
|
||||
$access = app(PortalProfileAccess::class);
|
||||
abort_unless($profile ? ($access->grants($request->user()) !== [] || $access->superuser($request->user())) : $request->user()?->can('manage-portal'), 403);
|
||||
abort_unless($profile ? $profileAccess : $internal, 403);
|
||||
}
|
||||
|
||||
return response()->json(app(TerritoryGeometry::class)->context($data['territory_id'], $management));
|
||||
return response()->json([
|
||||
...app(TerritoryGeometry::class)->context($data['territory_id'], $internal),
|
||||
'geometry_scope' => $internal ? 'authorized_internal' : 'public',
|
||||
])->header('Cache-Control', 'private, no-store');
|
||||
}
|
||||
|
||||
private const TABLES = ['opportunities' => 'opportunities', 'projects' => 'projects', 'clusters' => 'economic_clusters', 'corridors' => 'development_corridors', 'zones' => 'investment_zones'];
|
||||
|
||||
@@ -11,6 +11,36 @@ use Inertia\Inertia;
|
||||
|
||||
final class InvestorContextController extends Controller
|
||||
{
|
||||
private function entryComplements(Request $request): array
|
||||
{
|
||||
$data = $request->validate(['complement_origin' => 'nullable|string|max:100', 'complement_code' => 'required_with:complement_origin|string|max:40',
|
||||
'complement_target' => 'nullable|string|max:100', 'complement_territory' => 'nullable|uuid']);
|
||||
if (empty($data['complement_origin'])) return [];
|
||||
return app(\App\Services\InvestmentComplements::class)->resolve([['origin' => $data['complement_origin'], 'code' => $data['complement_code'],
|
||||
'target' => $data['complement_target'] ?? null, 'territory_id' => $data['complement_territory'] ?? null]]);
|
||||
}
|
||||
|
||||
private function entryChoices(Request $r, InvestorContext $context): array
|
||||
{
|
||||
$data = $r->validate(['source' => 'nullable|string|max:100', 'from_dossier' => 'nullable|uuid', 'opportunities' => 'sometimes|array|max:100', 'opportunities.*' => 'integer|distinct|min:1',
|
||||
'province_id' => 'nullable|uuid', 'district_id' => 'nullable|uuid', 'admin_post_id' => 'nullable|uuid', 'locality_id' => 'nullable|uuid']);
|
||||
$source = !empty($data['source']) ? $context->reference($data['source']) : null;
|
||||
$ids = $data['opportunities'] ?? (($source['kind'] ?? '') === 'opportunity' ? [$source['id']] : []);
|
||||
abort_if(!empty($data['from_dossier']) && !$ids, 422, 'Escolha a oportunidade associada à ficha da carteira.');
|
||||
$path = app(InvestmentGeography::class)->selection($data);
|
||||
$input = array_map(fn($id) => ['source' => 'opportunity:'.$id, ...($path ? ['territory' => 'territory:'.$path[array_key_last($path)]->id] : [])], $ids);
|
||||
if (!empty($data['from_dossier'])) $input[0]['portfolio_origins'] = [$data['from_dossier']];
|
||||
foreach ($this->entryComplements($r) as $complement) {
|
||||
$keys = array_filter([$complement['origin']['key'], $complement['target']['key'] ?? null], fn($key) => str_starts_with($key, 'opportunity:'));
|
||||
foreach ($keys as $key) {
|
||||
if (in_array($key, array_column($input, 'source'), true)) continue;
|
||||
$input[] = ['source' => $key, ...($complement['territory_id'] ? ['territory' => 'territory:'.$complement['territory_id']] : []),
|
||||
...(str_starts_with($complement['origin']['key'], 'portfolio:') ? ['portfolio_origins' => [substr($complement['origin']['key'], 10)]] : [])];
|
||||
}
|
||||
}
|
||||
return app(\App\Services\InvestmentOpportunityChoices::class)->resolve($input, [], true);
|
||||
}
|
||||
|
||||
public function current(Request $r, InvestorContext $context)
|
||||
{
|
||||
return response()->json($context->current($r->user()));
|
||||
@@ -23,7 +53,8 @@ final class InvestorContextController extends Controller
|
||||
|
||||
public function show(Request $r, string $id, InvestorContext $context)
|
||||
{
|
||||
return response()->json($context->view($r->user(), $id));
|
||||
$data = $r->validate(['opportunity' => 'nullable|string|max:100']);
|
||||
return response()->json($context->view($r->user(), $id, $data['opportunity'] ?? null));
|
||||
}
|
||||
|
||||
public function options(Request $r, InvestorContext $context)
|
||||
@@ -33,12 +64,56 @@ final class InvestorContextController extends Controller
|
||||
return response()->json($context->options($d['q'] ?? ''));
|
||||
}
|
||||
|
||||
public function corridorOptions(Request $r)
|
||||
{
|
||||
$data = $r->validate(['corridor' => ['nullable', \Illuminate\Validation\Rule::in(array_keys(config('investment_corridors')))], 'territory' => 'nullable|uuid']);
|
||||
$service = app(\App\Services\InvestmentCorridorContext::class);
|
||||
return response()->json(['corridors' => collect(config('investment_corridors'))->map(fn($entry,$key)=>['key'=>$key,'name'=>$entry['name'],'provinces'=>$service->provinces($key)])->values(),
|
||||
'parks' => $service->parks($data['corridor'] ?? null, $data['territory'] ?? null)]);
|
||||
}
|
||||
|
||||
public function saveDraft(Request $r, string $id, InvestorContext $context)
|
||||
{
|
||||
return response()->json($context->saveDraft($r->user(), $id, $r->all()));
|
||||
}
|
||||
|
||||
public function edit(Request $r, string $id, InvestorContext $context)
|
||||
{
|
||||
$data = $context->view($r->user(), $id);
|
||||
abort_unless($data['can_write'], 403);
|
||||
|
||||
return Inertia::render('investor-path/context', ['initial' => $data, 'options' => $context->options(), 'source' => $r->query('source') ? $context->reference($r->validate(['source' => 'required|string|max:100'])['source']) : null, 'territorySelection' => isset($data['context']['selection']['territory']) ? app(InvestmentGeography::class)->path($data['context']['selection']['territory']['id']) : []]);
|
||||
$entries = $this->entryChoices($r, $context);
|
||||
$choices = $entries ?: null;
|
||||
$source = $r->query('source') ? $context->reference($r->validate(['source' => 'required|string|max:100'])['source']) : null;
|
||||
if ($choices === null && ($source['kind'] ?? '') === 'opportunity') $choices = app(\App\Services\InvestmentOpportunityChoices::class)->resolve([['source' => $source['key']]]);
|
||||
$explicitChoices=$choices;
|
||||
$selectionKey=$r->validate(['selection_key'=>'nullable|uuid'])['selection_key']??null;
|
||||
$entryKey=fn($c)=>$c['opportunity']['key'].($selectionKey?'@'.$selectionKey:'');
|
||||
$entrySources=array_map($entryKey,$explicitChoices??[]);
|
||||
if ($choices !== null) $choices = app(\App\Services\InvestmentOpportunityChoices::class)->mergeEntries($data['context']['opportunity_choices'] ?? [], $choices);
|
||||
$draft = $context->draft($r->user(), $id);
|
||||
if ($draft && isset($draft['opportunity_choices'])) {
|
||||
$recovered = app(\App\Services\InvestmentOpportunityChoices::class)->resolve($draft['opportunity_choices'], $data['context']['opportunity_choices'] ?? [], true);
|
||||
$new=array_filter($explicitChoices??[],fn($c)=>!in_array($entryKey($c),$draft['entry_sources']??[],true));
|
||||
$choices = app(\App\Services\InvestmentOpportunityChoices::class)->mergeEntries($recovered, array_values($new));
|
||||
}
|
||||
$differences = [];
|
||||
foreach ($explicitChoices ?? [] as $entry) {
|
||||
$kept = collect($choices ?? [])->firstWhere('opportunity.key', $entry['opportunity']['key']);
|
||||
if ($kept && ($kept['territory']['key'] ?? null) !== ($entry['territory']['key'] ?? null)) $differences[] = ['title'=>$entry['opportunity']['title'],'saved'=>$kept['territory']['title']??'Por definir','requested'=>$entry['territory']['title']??'Por definir'];
|
||||
}
|
||||
$complements = isset($draft['complements']) ? app(\App\Services\InvestmentComplements::class)->resolve($draft['complements'], $data['context']['complements'] ?? []) : ($data['context']['complements'] ?? []);
|
||||
$entryTerritory = null;
|
||||
if (($source['kind'] ?? null) === 'portfolio') {
|
||||
$path = app(InvestmentGeography::class)->selection($r->validate(['province_id' => 'nullable|uuid', 'district_id' => 'nullable|uuid', 'admin_post_id' => 'nullable|uuid', 'locality_id' => 'nullable|uuid']));
|
||||
if ($path) $entryTerritory = $context->reference('territory:'.$path[array_key_last($path)]->id);
|
||||
}
|
||||
foreach ($this->entryComplements($r) as $entry) {
|
||||
$tag = 'complement:'.hash('sha256', $entry['key'].'@'.($selectionKey ?? ''));
|
||||
$entrySources[] = $tag;
|
||||
if (!in_array($tag, $draft['entry_sources'] ?? [], true)) $complements = collect([...$complements, $entry])->unique('key')->values()->all();
|
||||
}
|
||||
return Inertia::render('investor-path/context', ['entryTerritory' => $entryTerritory, 'entryComplements' => $complements, 'entryLocationDifferences'=>$differences,'entrySources'=>$entrySources,'draft' => $draft, 'requestedChoices' => $choices, 'initial' => $data, 'options' => $context->options(), 'source' => $source, 'territorySelection' => isset($data['context']['selection']['territory']) ? app(InvestmentGeography::class)->path($data['context']['selection']['territory']['id']) : ($entryTerritory ? app(InvestmentGeography::class)->path($entryTerritory['id']) : [])]);
|
||||
}
|
||||
|
||||
public function preview(Request $r, string $id, InvestorContext $context)
|
||||
@@ -55,8 +130,16 @@ final class InvestorContextController extends Controller
|
||||
{
|
||||
$d = $r->validate(['source' => 'nullable|string|max:100', 'step' => ['nullable', 'regex:/^S(0[1-9]|1[0-9])$/']]);
|
||||
$ref = isset($d['source']) ? $context->reference($d['source']) : null;
|
||||
$submissionId = $r->validate(['submission' => 'nullable|uuid'])['submission'] ?? null;
|
||||
$entrySubmission = null;
|
||||
if ($submissionId) {
|
||||
$submission = \App\Models\InvestmentSubmission::where('id', $submissionId)->where('user_id', $r->user()->id)->where('status', 'draft')->firstOrFail();
|
||||
abort_unless(($ref['kind'] ?? null) === 'portfolio' && $submission->dossier_id === $ref['id'], 422, 'Conserve a ficha de origem da manifestação.');
|
||||
$entrySubmission = ['id' => $submission->id, 'version' => $submission->version];
|
||||
}
|
||||
|
||||
return Inertia::render('investor-path/context-start', ['contexts' => $path->contexts($r->user()), 'source' => $ref, 'step' => $d['step'] ?? null]);
|
||||
$choices = $this->entryChoices($r, $context);
|
||||
return Inertia::render('investor-path/context-start', ['entrySubmission' => $entrySubmission, 'entryComplements' => $this->entryComplements($r), 'entryQuery' => $r->only(['complement_origin', 'complement_code', 'complement_target', 'complement_territory', 'from_dossier', 'province_id', 'district_id', 'admin_post_id', 'locality_id']), 'opportunityChoices' => $choices, 'contexts' => $path->contexts($r->user()), 'source' => $ref, 'step' => $d['step'] ?? null]);
|
||||
}
|
||||
|
||||
public function installation(Request $r, InvestorContextInstallation $install)
|
||||
|
||||
@@ -88,7 +88,8 @@ class InvestorPathController extends Controller
|
||||
|
||||
public function show(Request $request, string $id, InvestorPath $path): JsonResponse|Response
|
||||
{
|
||||
$data = $path->view($request->user(), $id);
|
||||
$choice = $request->validate(['opportunity' => 'nullable|string|max:100'])['opportunity'] ?? null;
|
||||
$data = $path->view($request->user(), $id, $choice);
|
||||
|
||||
return $request->expectsJson() ? response()->json($data) : Inertia::render('investor-path/show', $data);
|
||||
}
|
||||
|
||||
@@ -103,6 +103,7 @@ class OpportunityManagementController extends Controller
|
||||
$records = $query->orderByDesc('id')->paginate(20)->withQueryString();
|
||||
$records->getCollection()->each(function (Opportunity $r) use ($access, $service, $request) {
|
||||
$r->setAttribute('can_edit', $access->canEdit($request->user(), $r));
|
||||
$r->setAttribute('can_promote', app(\App\Services\OpportunityPromotion::class)->allowed($request->user(), $r));
|
||||
$r->setAttribute('working_status', $access->state($r));
|
||||
$r->setAttribute('publication', $r->publicationPresentation());
|
||||
$r->setAttribute('draft_title', $service->values($r)['canonical']['official_title'] ?? $r->title);
|
||||
@@ -130,6 +131,7 @@ class OpportunityManagementController extends Controller
|
||||
'profileReauthenticationRequired' => $record && $record->owner_user_id !== null
|
||||
? app(OpportunityProfileWorkflow::class)->reauthenticationRequired($request->user(), $record) : false,
|
||||
'publicationState' => $record?->publicationPresentation(),
|
||||
'promotionHref' => $record && app(\App\Services\OpportunityPromotion::class)->allowed($request->user(), $record) ? '/minhas-oportunidades/'.$record->id.'/divulgacao' : null,
|
||||
'canonicalResponse' => $record?->owner_user_id !== null ? app(OpportunityCanonicalResponse::class)->read($request->user(), $record) : null,
|
||||
'canEditDraft' => $record ? $access->canEdit($request->user(), $record) : false,
|
||||
'workflowParticipants' => $record && $record->owner_user_id !== null ? app(OpportunityProfileWorkflow::class)->participants($request->user(), $record) : ['validators' => [], 'publishers' => []],
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Opportunity;
|
||||
use App\Services\OpportunityPromotion;
|
||||
use Illuminate\Http\Request;
|
||||
use Inertia\Inertia;
|
||||
|
||||
final class OpportunityPromotionController extends Controller
|
||||
{
|
||||
public function show(Request $request, int $id, OpportunityPromotion $service): \Inertia\Response
|
||||
{
|
||||
return Inertia::render('management/opportunity-promotion', $service->editor($request->user(), Opportunity::findOrFail($id)));
|
||||
}
|
||||
|
||||
public function preview(Request $request, int $id, OpportunityPromotion $service): \Illuminate\Http\JsonResponse
|
||||
{
|
||||
return response()->json($service->preview($request->user(), Opportunity::findOrFail($id), $request->all()));
|
||||
}
|
||||
|
||||
public function confirm(Request $request, int $id, OpportunityPromotion $service): \Illuminate\Http\JsonResponse
|
||||
{
|
||||
return response()->json($service->confirm($request->user(), $id, $request->all()));
|
||||
}
|
||||
}
|
||||
@@ -275,7 +275,7 @@ class PortalServicesController extends Controller
|
||||
'resource' => $resource,
|
||||
'backUrl' => $backUrl,
|
||||
'downloadUrl' => route('services.download', ['id' => $id]),
|
||||
'articleUrl' => Schema::hasColumn('portal_resources','editorial_content') && DB::table('portal_resources')->where('id',$id)->whereNotNull('editorial_content')->exists() ? '/artigos/'.$id : null,
|
||||
'articleUrl' => $this->articleUrl($id),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -866,4 +866,17 @@ SQL, [$id]);
|
||||
|
||||
return $ids ?: [$id];
|
||||
}
|
||||
private function articleUrl(int $id): ?string
|
||||
{
|
||||
if (!Schema::hasColumn('portal_resources', 'editorial_content')) return null;
|
||||
$resource = DB::table('portal_resources')->find($id);
|
||||
if (!$resource) return null;
|
||||
if ($resource->editorial_content !== null) return '/artigos/'.$id;
|
||||
try {
|
||||
return app(\App\Services\EditorialReading::class)->original($resource) ? '/artigos/'.$resource->id : null;
|
||||
} catch (\Symfony\Component\HttpKernel\Exception\HttpException) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Services\Procurement;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Inertia\Inertia;
|
||||
|
||||
class ProcurementController extends Controller
|
||||
{
|
||||
private const STATE_SQL = "CASE WHEN v.payload->>'procedural_state' IN ('cancelled','results') THEN v.payload->>'procedural_state' WHEN ((v.payload->>'deadline')::timestamp AT TIME ZONE (v.payload->>'timezone'))<=CURRENT_TIMESTAMP THEN 'deadline_ended' WHEN v.payload->>'extended'='true' THEN 'extended' ELSE 'open' END";
|
||||
|
||||
private function query(Procurement $service)
|
||||
{
|
||||
abort_unless($service->available(), 404);
|
||||
|
||||
return DB::table('portal_tenders as t')->join('portal_tender_versions as v', fn ($q) => $q->on('v.id', '=', 't.published_version_id')->on('v.tender_id', '=', 't.id'))->whereNotNull('v.published_at');
|
||||
}
|
||||
|
||||
public function index(Request $request, Procurement $service)
|
||||
{
|
||||
$filters = $request->validate(['q' => 'nullable|string|max:150', 'entity' => 'nullable|uuid', 'sector' => 'nullable|integer', 'territory' => 'nullable|uuid', 'modality' => 'nullable|string|max:200', 'financier' => 'nullable|string|max:200', 'state' => 'nullable|in:open,extended,deadline_ended,cancelled,results', 'deadline_before' => 'nullable|date_format:Y-m-d', 'regime' => 'nullable|in:state,external,private,other']);
|
||||
$filters = array_filter($filters, fn ($value) => $value !== null && $value !== '');
|
||||
$query = $this->query($service);
|
||||
if (! empty($filters['q'])) {
|
||||
$query->where(fn ($q) => $q->whereRaw("v.payload->>'title' ILIKE ?", ['%'.$filters['q'].'%'])->orWhereRaw("v.payload->>'object' ILIKE ?", ['%'.$filters['q'].'%'])->orWhereRaw("v.payload->>'reference' ILIKE ?", ['%'.$filters['q'].'%']));
|
||||
}
|
||||
foreach (['entity' => 'organization_id', 'sector' => 'sector_id', 'modality' => 'modality', 'financier' => 'financier', 'regime' => 'regime'] as $filter => $field) {
|
||||
if (! empty($filters[$filter])) {
|
||||
$query->whereRaw('v.payload->>? = ?', [$field, (string) $filters[$filter]]);
|
||||
}
|
||||
}
|
||||
if (! empty($filters['territory'])) {
|
||||
$query->whereRaw("v.payload->>'territory_id' IN (WITH RECURSIVE scope(id,depth) AS (SELECT id,0 FROM geo_locations WHERE id=? AND deleted_at IS NULL UNION ALL SELECT c.id,s.depth+1 FROM geo_locations c JOIN scope s ON c.parent_id=s.id WHERE c.deleted_at IS NULL AND s.depth<4) SELECT id::text FROM scope)", [$filters['territory']]);
|
||||
}
|
||||
if (! empty($filters['state'])) {
|
||||
$query->whereRaw(self::STATE_SQL.' = ?', [$filters['state']]);
|
||||
}
|
||||
if (! empty($filters['deadline_before'])) {
|
||||
$query->whereRaw("left(v.payload->>'deadline',10)<=?", [$filters['deadline_before']]);
|
||||
}
|
||||
$rows = $query->select('t.id', 'v.id as vid')->orderByDesc('v.published_at')->paginate(20)->withQueryString();
|
||||
$rows->through(fn ($r) => ['id' => $r->id, ...$this->summary($service, $r->vid)]);
|
||||
$facets = $this->query($service)->get(['v.payload'])->map(fn ($r) => json_decode($r->payload, true));
|
||||
$options = [];
|
||||
foreach (['entity' => ['organization_id', 'organization_name'], 'sector' => ['sector_id', 'sector_name'], 'territory' => ['territory_id', 'territory_name'], 'modality' => ['modality', 'modality'], 'financier' => ['financier', 'financier']] as $name => [$value,$label]) {
|
||||
$options[$name] = $facets->filter(fn ($p) => ! empty($p[$value]))->map(fn ($p) => ['id' => (string) $p[$value], 'name' => $p[$label]])->unique('id')->values();
|
||||
}
|
||||
|
||||
return Inertia::render('procurement/index', ['items' => $rows, 'filters' => $filters, 'options' => $options, 'regimes' => config('procurement.regimes'), 'management' => $service->access($request->user())])->toResponse($request)->header('Cache-Control', 'private, no-store');
|
||||
}
|
||||
|
||||
private function summary(Procurement $service, string $vid): array
|
||||
{
|
||||
$v = $service->publishedVersion($vid);
|
||||
|
||||
return ['publication' => $v, 'state' => $service->state($v)];
|
||||
}
|
||||
|
||||
public function show(Request $request, string $id, Procurement $service)
|
||||
{
|
||||
return $this->detail($request, $id, $service, false);
|
||||
}
|
||||
|
||||
public function print(Request $request, string $id, Procurement $service)
|
||||
{
|
||||
return $this->detail($request, $id, $service, true);
|
||||
}
|
||||
|
||||
private function detail(Request $request, string $id, Procurement $service, bool $print)
|
||||
{
|
||||
$row = $this->query($service)->where('t.id', $id)->firstOrFail(['t.id', 'v.id as vid']);
|
||||
$filters = $request->only(['q', 'entity', 'sector', 'territory', 'modality', 'financier', 'state', 'deadline_before', 'regime', 'page']);
|
||||
|
||||
return Inertia::render('procurement/show', ['id' => $id, ...$this->summary($service, $row->vid), 'printMode' => $print, 'backUrl' => '/concursos'.($filters ? '?'.http_build_query($filters) : ''),
|
||||
'history' => DB::table('portal_tender_versions')->where('tender_id', $id)->whereNotNull('published_at')->orderBy('version')->pluck('id')->map(fn ($vid) => $service->publishedVersion($vid)),
|
||||
'watching' => $request->user() && DB::table('portal_tender_watches')->where('tender_id', $id)->where('user_id', $request->user()->id)->exists()])->toResponse($request)->header('Cache-Control', 'private, no-store');
|
||||
}
|
||||
|
||||
public function manage(Request $request, Procurement $service)
|
||||
{
|
||||
$service->guard($request->user());
|
||||
|
||||
return Inertia::render('procurement/manage', ['items' => DB::table('portal_tenders')->orderByDesc('updated_at')->get(['id', 'draft', 'version', 'published_version_id'])->map(fn ($r) => ['id' => $r->id, 'title' => json_decode($r->draft, true)['title'] ?? 'Rascunho sem título', 'version' => $r->version, 'published' => (bool) $r->published_version_id])])->toResponse($request)->header('Cache-Control', 'private, no-store');
|
||||
}
|
||||
|
||||
public function edit(Request $request, Procurement $service, ?string $id = null)
|
||||
{
|
||||
$service->guard($request->user());
|
||||
$r = $id ? $service->record($id) : null;
|
||||
|
||||
return Inertia::render('procurement/edit', ['record' => $r ? ['id' => $id, 'version' => $r->version, 'draft' => json_decode($r->draft, true), 'published' => (bool) $r->published_version_id] : null,
|
||||
'references' => $service->references($request->user()), 'history' => $id ? DB::table('portal_tender_versions')->where('tender_id', $id)->orderByDesc('version')->get(['version', 'act', 'reason', 'actor_id', 'published_at', 'created_at']) : []])->toResponse($request)->header('Cache-Control', 'private, no-store');
|
||||
}
|
||||
|
||||
public function save(Request $request, Procurement $service, ?string $id = null)
|
||||
{
|
||||
$id = $service->save($request->user(), $id, $request->all());
|
||||
|
||||
return redirect('/management/concursos/'.$id)->with('success', 'Rascunho guardado. A publicação anterior permanece intacta.');
|
||||
}
|
||||
|
||||
public function preview(Request $request, string $id, Procurement $service)
|
||||
{
|
||||
return response()->json($service->preview($request->user(), $id, (string) $request->input('act')))->header('Cache-Control', 'private, no-store');
|
||||
}
|
||||
|
||||
public function publish(Request $request, string $id, Procurement $service)
|
||||
{
|
||||
$service->publish($request->user(), $id, $request->all());
|
||||
|
||||
return redirect('/management/concursos/'.$id)->with('success', 'Acto publicado, com versão e auditoria. Nenhuma proposta recebida pelo portal.');
|
||||
}
|
||||
|
||||
public function watch(Request $request, string $id, Procurement $service)
|
||||
{
|
||||
$row = $this->query($service)->where('t.id', $id)->firstOrFail(['v.id']);
|
||||
DB::table('portal_tender_watches')->updateOrInsert(['tender_id' => $id, 'user_id' => $request->user()->id], ['seen_version_id' => $row->id, 'created_at' => now(), 'updated_at' => now()]);
|
||||
|
||||
return back()->with('success', 'Concurso guardado para acompanhamento. Isto não apresenta uma proposta.');
|
||||
}
|
||||
|
||||
public function unwatch(Request $request, string $id, Procurement $service)
|
||||
{
|
||||
abort_unless($service->available(), 404);
|
||||
DB::table('portal_tender_watches')->where('tender_id', $id)->where('user_id', $request->user()->id)->delete();
|
||||
|
||||
return back();
|
||||
}
|
||||
|
||||
public function watched(Request $request, Procurement $service)
|
||||
{
|
||||
$rows = $this->query($service)->join('portal_tender_watches as w', 'w.tender_id', '=', 't.id')->where('w.user_id', $request->user()->id)->get(['t.id', 'v.id as vid', 'w.seen_version_id'])->map(fn ($r) => ['id' => $r->id, 'changed' => $r->seen_version_id !== $r->vid, ...$this->summary($service, $r->vid)]);
|
||||
|
||||
return Inertia::render('procurement/manage', ['watched' => true, 'items' => $rows])->toResponse($request)->header('Cache-Control', 'private, no-store');
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,13 @@ class PublicGeographyController extends Controller
|
||||
{
|
||||
public function options(Request $request, InvestmentGeography $geography): JsonResponse
|
||||
{
|
||||
$data = $request->validate(['type' => ['required', 'in:province,district,admin_post,locality'], 'id' => ['nullable', 'uuid'], 'parent_id' => ['nullable', 'uuid'], 'q' => ['nullable', 'string', 'max:100'], 'page' => ['nullable', 'integer', 'min:1']]);
|
||||
$data = $request->validate(['corridor' => ['nullable', \Illuminate\Validation\Rule::in(array_keys(config('investment_corridors')))], 'type' => ['required', 'in:province,district,admin_post,locality'], 'id' => ['nullable', 'uuid'], 'parent_id' => ['nullable', 'uuid'], 'q' => ['nullable', 'string', 'max:100'], 'page' => ['nullable', 'integer', 'min:1']]);
|
||||
$query = $geography->publicReferences()->where('location_type', $data['type']);
|
||||
if (!empty($data['corridor'])) {
|
||||
$corridors = app(\App\Services\InvestmentCorridorContext::class);
|
||||
if ($data['type'] === 'province') $query->whereIn('id', array_column($corridors->provinces($data['corridor']), 'id'));
|
||||
elseif (!$corridors->compatible($data['corridor'], $data['parent_id'] ?? null)) abort(422, 'O território não pertence ao corredor escolhido.');
|
||||
}
|
||||
if (! empty($data['id'])) {
|
||||
$query->where('id', $data['id']);
|
||||
}
|
||||
@@ -29,6 +34,6 @@ class PublicGeographyController extends Controller
|
||||
->orWhereRaw('source_code ILIKE ?', [$term]));
|
||||
}
|
||||
|
||||
return response()->json($query->orderBy('name')->orderBy('id')->paginate(100, ['id', 'name', 'parent_id', 'location_type', 'source_code']));
|
||||
return response()->json($query->orderBy('name')->orderBy('id')->paginate(100, ['id', 'name', 'parent_id', 'location_type', 'source_code'])->withQueryString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,8 +119,8 @@ class VirtualDeskController extends Controller
|
||||
|
||||
public function createRequest(Request $request, string $id, VirtualDesk $desk): JsonResponse|RedirectResponse
|
||||
{
|
||||
$data = $request->validate(['service_version_id' => 'required|uuid', 'client_key' => 'required|uuid']);
|
||||
$row = $desk->createRequest($request->user(), $id, $data['service_version_id'], $data['client_key']);
|
||||
$data = $request->validate(['service_version_id' => 'required|uuid', 'client_key' => 'required|uuid', 'opportunity' => 'nullable|string|max:100']);
|
||||
$row = $desk->createRequest($request->user(), $id, $data['service_version_id'], $data['client_key'], $data['opportunity'] ?? null);
|
||||
|
||||
return $request->expectsJson() ? response()->json(['id' => $row->id, 'version' => $row->version], 201) : redirect('/balcao-virtual/pedidos/'.$row->id);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ class EnsureScopedEditorial
|
||||
return $next($request);
|
||||
}
|
||||
abort_unless($access->editorial($actor), 403);
|
||||
$allowed = in_array($request->route()->getName(), ['editorial.edit', 'editorial.save', 'services.resource', 'services.resource.update'], true)
|
||||
$allowed = in_array($request->route()->getName(), ['editorial.edit', 'editorial.save', 'editorial.preview', 'editorial.preview-content', 'services.resource', 'services.resource.update'], true)
|
||||
|| ($request->route()->getName() === 'services.moderate' && $request->route('type') === 'resources');
|
||||
abort_unless($allowed, 403);
|
||||
if ($request->route('id') !== null) {
|
||||
|
||||
@@ -14,12 +14,14 @@ final class EnsureScopedPortalAdministration
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
$actor = $request->user();
|
||||
abort_unless($actor, 403);
|
||||
abort_unless($actor !== null, 403);
|
||||
$scope = app(ScopedPortalAdministration::class);
|
||||
$path = $request->path();
|
||||
$interests = $request->is('management/interests', 'management/interests/*', 'api/v1/investment/admin/interests/*');
|
||||
// Fiscal maintenance reuses authorised administration; unrelated gates remain unchanged.
|
||||
$catalogue = $request->is('management/economic-references/lot-01', 'management/economic-references/lot-01/*',
|
||||
$geometryRead = $request->isMethod('GET') && $path === 'management/territory-geometries';
|
||||
$catalogue = $geometryRead || $request->is('management/territory-geometry-import', 'management/territory-geometry-import/*',
|
||||
'management/economic-references/lot-01', 'management/economic-references/lot-01/*',
|
||||
'management/education', 'management/education/*', 'management/investment/references', 'management/investment/references/*', 'api/v1/investment/admin/references', 'api/v1/investment/admin/references/*',
|
||||
'management/investment/zones', 'management/investment/zones/*', 'api/v2/investment/admin/zones', 'api/v2/investment/admin/zones/*',
|
||||
'management/balcao/atribuicoes', 'management/balcao/atribuicoes/*', 'management/balcao/servicos',
|
||||
|
||||
@@ -51,6 +51,7 @@ class HandleInertiaRequests extends Middleware
|
||||
return [
|
||||
...parent::share($request),
|
||||
'name' => config('app.name'),
|
||||
'procurementEnabled' => app(\App\Services\Procurement::class)->available(),
|
||||
'homologationReserved' => (bool) config('portal.homologation_only', false),
|
||||
'profileAccess' => app(PortalProfileAccess::class)->navigation($request->user()),
|
||||
'contentManagementHref' => app(\App\Services\ContentManagement::class)->access($request->user()) !== [] ? '/gestao-conteudos' : null,
|
||||
|
||||
@@ -29,7 +29,9 @@ class ProtectProfileOpportunity
|
||||
if ($record && ($record->owner_user_id !== null || str_starts_with($request->path(), 'minhas-oportunidades'))) {
|
||||
abort_if($record->owner_user_id === null && str_starts_with($request->path(), 'minhas-oportunidades'), 403, 'Registo legado não convertido para a política v1.');
|
||||
$access = app(PortalProfileAccess::class);
|
||||
$access->authorize($request->user(), $request->isMethod('GET') || str_ends_with($request->path(), '/workflow') || str_ends_with($request->path(), '/preview') || $request->is('minhas-oportunidades/*/classification/review') ? 'view' : 'edit', $record);
|
||||
// The promotional controller checks its own scoped disclosure capability,
|
||||
// like workflow decisions; publication does not grant draft editing.
|
||||
$access->authorize($request->user(), $request->isMethod('GET') || str_ends_with($request->path(), '/workflow') || str_ends_with($request->path(), '/preview') || $request->is('minhas-oportunidades/*/classification/review', 'minhas-oportunidades/*/divulgacao/previa', 'minhas-oportunidades/*/divulgacao/confirmar') ? 'view' : 'edit', $record);
|
||||
abort_if($request->is('management/opportunity-origin/apply'), 403, 'O cadastro privado v1 não usa a classificação editorial dos exemplos legados.');
|
||||
abort_if($request->isMethod('POST') && str_ends_with($request->path(), '/lifecycle') && ! str_contains($request->path(), '/resources/'), 403, 'Use o workflow com decisões segregadas; o perfil não concede exclusão.');
|
||||
}
|
||||
|
||||
@@ -19,7 +19,9 @@ class StoreLandAssistanceCaseRequest extends FormRequest
|
||||
{
|
||||
$payload = $this->validated('payload');
|
||||
|
||||
return is_array($payload) ? $payload : [];
|
||||
if (!is_array($payload)) return [];
|
||||
if (!empty($payload['investor_path_case_id'])) return app(\App\Services\InvestmentConsumerScope::class)->bind($this->user(), $payload['investor_path_case_id'], $payload, $this->routeIs('land-assistance.support'));
|
||||
return \Illuminate\Support\Arr::except($payload, ['context_opportunity', 'context_opportunity_snapshot']);
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
@@ -33,7 +35,9 @@ class StoreLandAssistanceCaseRequest extends FormRequest
|
||||
return [
|
||||
'version' => [$this->isMethod('post') && ! $this->routeIs('land-assistance.support') ? 'nullable' : 'required', 'integer', 'min:1'],
|
||||
'context_revision' => ['nullable', 'integer', 'min:0'], 'context_reviewed' => ['nullable', 'boolean'],
|
||||
'payload' => ['required', 'array:context_reuse,support_kind,request_description,project_reference,investor_path_case_id,applicant_category,full_name,contact_person,email,phone,preferred_contact,country,declared_origin_country_code,nationality,representative_name,representative_role,representation_basis,nuit,constitution_or_residency_note,area_status,parcels,purpose,activity,known_occupants,occupant_description,known_improvements,improvements_description,prior_right_status,prior_right_description,conflict_status,conflict_description,official_process,attachments_to_follow,exploration_plan,consultation,additional_information,truth_declaration,contact_consent'],
|
||||
'payload' => ['required', 'array:context_opportunity,context_opportunity_snapshot,context_reuse,support_kind,request_description,project_reference,investor_path_case_id,applicant_category,full_name,contact_person,email,phone,preferred_contact,country,declared_origin_country_code,nationality,representative_name,representative_role,representation_basis,nuit,constitution_or_residency_note,area_status,parcels,purpose,activity,known_occupants,occupant_description,known_improvements,improvements_description,prior_right_status,prior_right_description,conflict_status,conflict_description,official_process,attachments_to_follow,exploration_plan,consultation,additional_information,truth_declaration,contact_consent'],
|
||||
'payload.context_opportunity' => ['nullable', 'string', 'max:100'],
|
||||
'payload.context_opportunity_snapshot' => ['nullable', 'string', 'max:200000'],
|
||||
'payload.context_reuse' => ['nullable', 'string', 'max:10000'],
|
||||
'payload.support_kind' => ['nullable', 'in:investment,home,family_exploitation,recognition,regularization,delimitation,change_of_use,transfer,existing_process,conflict_guidance,other'],
|
||||
'payload.request_description' => ['nullable', 'string', 'max:4000'],
|
||||
|
||||
@@ -37,7 +37,7 @@ class StoreSimulationFormDraftRequest extends FormRequest
|
||||
'contact_province', 'contact_district', 'preferred_channel',
|
||||
];
|
||||
$economic = [
|
||||
'context_applicability_snapshot', 'investment_regime', 'context_reuse', 'compatible_fields_snapshot', 'published_iva_base', 'published_iva_currency', 'published_iva_date', 'published_iva_scope', 'monthly_iva_settings', 'monthly_iva_snapshot', 'journey_type', 'detail_level', 'business_plan_snapshot', 'financial_tools_snapshot', 'cashflow_snapshot', 'project_team_snapshot', 'project_execution_snapshot', 'purpose', 'manifestation_type', 'preferred_language', 'project_title', 'project_summary', 'project_problem', 'target_customers', 'value_proposition', 'market_assumption', 'market_source', 'project_milestones', 'selection_labels', 'project_type',
|
||||
'context_opportunity', 'context_applicability_snapshot', 'investment_regime', 'context_reuse', 'compatible_fields_snapshot', 'published_iva_base', 'published_iva_currency', 'published_iva_date', 'published_iva_scope', 'monthly_iva_settings', 'monthly_iva_snapshot', 'modelo_a_snapshot', 'journey_type', 'detail_level', 'business_plan_snapshot', 'financial_tools_snapshot', 'cashflow_snapshot', 'project_team_snapshot', 'project_execution_snapshot', 'purpose', 'manifestation_type', 'preferred_language', 'project_title', 'project_summary', 'project_problem', 'target_customers', 'value_proposition', 'market_assumption', 'market_source', 'project_milestones', 'selection_labels', 'project_type',
|
||||
'competitor_assumption', 'sales_channel_assumption', 'marketing_approach', 'location_rationale', 'project_risk_responses_snapshot', 'project_questionnaire_version',
|
||||
'customer_validation_status', 'cost_estimate_status', 'location_assessment_status', 'funding_status', 'receivables_timing_status',
|
||||
'project_type_other', 'sector_id', 'activity_id', 'products_services', 'maturity_stage', 'expected_start_date',
|
||||
@@ -72,7 +72,8 @@ class StoreSimulationFormDraftRequest extends FormRequest
|
||||
'economic_snapshot.business_plan_snapshot' => ['nullable', 'string', 'max:60000'],
|
||||
'economic_snapshot.financial_tools_snapshot' => ['nullable', 'string', 'max:30000'],
|
||||
'economic_snapshot.cashflow_snapshot' => ['nullable', 'string', 'max:20000'],
|
||||
'economic_snapshot.context_applicability_snapshot' => ['nullable', 'string', 'max:20000'],
|
||||
'economic_snapshot.context_applicability_snapshot' => ['nullable', 'string', 'max:1000000'],
|
||||
'economic_snapshot.context_opportunity' => ['nullable', 'string', 'max:100'],
|
||||
'economic_snapshot.investment_regime' => ['nullable', 'in:general,industrial_park,zee,zfi'],
|
||||
'economic_snapshot.context_reuse' => ['nullable', 'string', 'max:10000'],
|
||||
'economic_snapshot.compatible_fields_snapshot' => ['nullable', 'string', 'max:10000'],
|
||||
@@ -82,6 +83,8 @@ class StoreSimulationFormDraftRequest extends FormRequest
|
||||
'economic_snapshot.published_iva_scope' => ['nullable', 'string', 'in:yes,no'],
|
||||
'economic_snapshot.monthly_iva_settings' => ['nullable', 'string', 'max:2000'],
|
||||
'economic_snapshot.monthly_iva_snapshot' => ['nullable', 'string', 'max:60000'],
|
||||
// Preserve operation books and explicit history as the draft grows.
|
||||
'economic_snapshot.modelo_a_snapshot' => ['nullable', 'string', 'json', 'max:4000000'],
|
||||
'economic_snapshot.project_team_snapshot' => ['nullable', 'string', 'max:30000'],
|
||||
'economic_snapshot.project_execution_snapshot' => ['nullable', 'string', 'max:30000'],
|
||||
'economic_snapshot.project_risk_responses_snapshot' => ['nullable', 'string', 'max:30000'],
|
||||
|
||||
@@ -31,6 +31,13 @@ class Opportunity extends Model
|
||||
|
||||
protected $appends = ['maturity_catalogue_version'];
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
$data = parent::toArray();
|
||||
if (isset($data['description'])) $data['description'] = \App\Services\OpportunityPublicText::description($this, $data['description']);
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getMaturityCatalogueVersionAttribute(): ?string
|
||||
{
|
||||
// Only published metadata is public; never expose the current private draft.
|
||||
@@ -68,7 +75,8 @@ class Opportunity extends Model
|
||||
$scope = $public ? 'public' : ($visible && $this->owner_user_id !== null ? 'restricted' : 'unpublished');
|
||||
|
||||
return ['scope' => $scope, 'public_catalog' => $public, 'label' => match ($scope) {
|
||||
'public' => 'Publicada no catálogo público',
|
||||
'public' => data_get($this->workflow_context, 'publication.purpose') === 'promotional_preparation'
|
||||
? 'Resumo divulgado — Em preparação; não autoriza execução' : 'Publicada no catálogo público',
|
||||
'restricted' => 'Disponibilizada com acesso restrito — perfis e organização autorizados',
|
||||
default => 'Sem versão disponibilizada; aprovação interna é uma etapa distinta',
|
||||
}];
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
/** Public read projection authorized by Tempo; source rows and originals stay private. */
|
||||
class ApprovedAdministrativeBoundaries
|
||||
{
|
||||
public const HASH = '06ab905fcf9b19115c3521bf81de03f37873880f7765f229b9e1f79d99df7adc';
|
||||
|
||||
/** @var array<string,array<string,string>>|null */
|
||||
private ?array $items = null;
|
||||
|
||||
/** @return array<string,array<string,string>> */
|
||||
public function snapshots(): array
|
||||
{
|
||||
if ($this->items !== null) {
|
||||
return $this->items;
|
||||
}
|
||||
$contents = file_get_contents(base_path('docs/investmoz/unification/approved-administrative-boundaries-20261024.json'));
|
||||
if ($contents === false || ! hash_equals(self::HASH, hash('sha256', str_replace("\r\n", "\n", $contents)))) {
|
||||
throw new RuntimeException('Approved administrative boundary manifest changed.');
|
||||
}
|
||||
$manifest = json_decode($contents, true, 512, JSON_THROW_ON_ERROR);
|
||||
if (count($manifest['items']) !== 408) {
|
||||
throw new RuntimeException('Exact 408-boundary scope required.');
|
||||
}
|
||||
$this->items = array_column($manifest['items'], null, 'id');
|
||||
|
||||
return $this->items;
|
||||
}
|
||||
|
||||
public function allows(string $id, string $territoryId, string $geometryHash, string $propertiesHash): bool
|
||||
{
|
||||
$item = $this->snapshots()[$id] ?? null;
|
||||
|
||||
return $item !== null && $item['territory_id'] === $territoryId
|
||||
&& hash_equals($item['geometry_sha256'], $geometryHash)
|
||||
&& hash_equals($item['properties_sha256'], $propertiesHash);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use RuntimeException;
|
||||
|
||||
/** Exact replay of the 28 accepted links into the transported project identities. */
|
||||
final class ApprovedAnchorTerritories
|
||||
{
|
||||
public const HASH = 'd2893d0a638d630435aca1890f79a8094dc58eb65bbdd65a470bb685fa075190';
|
||||
|
||||
/** @return array{manifest_sha256:string,projects:list<array<string,mixed>>,links:list<array<string,mixed>>} */
|
||||
public function plan(): array
|
||||
{
|
||||
$file = base_path('docs/investmoz/unification/approved-anchor-territories-20261023.json');
|
||||
$contents = is_file($file) ? file_get_contents($file) : false;
|
||||
if ($contents !== false) {
|
||||
$contents = str_replace("\r\n", "\n", $contents);
|
||||
}
|
||||
if ($contents === false || ! hash_equals(self::HASH, hash('sha256', $contents))) {
|
||||
throw new RuntimeException('Reviewed territorial manifest changed.');
|
||||
}
|
||||
$manifest = json_decode($contents, true, 512, JSON_THROW_ON_ERROR);
|
||||
if (count($manifest['items']) !== 28) {
|
||||
throw new RuntimeException('Exact 28-link scope required.');
|
||||
}
|
||||
$projects = [];
|
||||
$links = [];
|
||||
foreach ($manifest['items'] as $item) {
|
||||
$project = DB::table('projects')->where('id', $item['project_id'])->whereNull('deleted_at')->first();
|
||||
$dossier = DB::table('investment_dossiers')->where('id', $item['dossier_id'])->whereNull('deleted_at')->first();
|
||||
if (! $project || $project->code !== $item['code'] || ! $dossier || $dossier->project_id !== $project->id
|
||||
|| ! hash_equals($item['content_sha256'], hash('sha256', $dossier->content))
|
||||
|| ! hash_equals($item['source_sha256'], hash('sha256', $dossier->source))) {
|
||||
throw new RuntimeException('Project identity or documentary source changed: '.$item['code']);
|
||||
}
|
||||
$original = $item['original_relation'];
|
||||
$geo = DB::table('geo_locations')->where('id', $original['geo_location_id'])->whereNull('deleted_at')->first();
|
||||
foreach (['location_type', 'source_code', 'parent_id', 'data_classification'] as $field) {
|
||||
if (! $geo || $item['territory'][$field] !== $geo->$field) {
|
||||
throw new RuntimeException('Territory identity changed: '.$original['geo_location_id']);
|
||||
}
|
||||
}
|
||||
$metadata = $projects[$project->id]['after_metadata'] ?? json_decode($project->metadata, true, 512, JSON_THROW_ON_ERROR);
|
||||
$key = $geo->id.':'.$original['role'];
|
||||
$evidence = $item['evidence'];
|
||||
// Preserve the original dossier id in evidence and explicitly map the destination.
|
||||
$evidence['transported_dossier_id'] = $dossier->id;
|
||||
if (isset($metadata['documented_location_sources'][$key]) && $metadata['documented_location_sources'][$key] != $evidence) {
|
||||
throw new RuntimeException('Existing territorial evidence differs; no overwrite: '.$item['code']);
|
||||
}
|
||||
$projects[$project->id] ??= ['id' => $project->id, 'code' => $project->code, 'before_version' => (int) $project->version_no, 'before_metadata' => json_decode($project->metadata, true, 512, JSON_THROW_ON_ERROR)];
|
||||
$metadata['documented_location_sources'][$key] = $evidence;
|
||||
$projects[$project->id]['after_metadata'] = $metadata;
|
||||
$existing = DB::table('project_locations')->where('project_id', $project->id)->where('geo_location_id', $geo->id)->where('role', $original['role'])->first();
|
||||
if ($existing && ($existing->deleted_at || $existing->data_classification !== 'public')) {
|
||||
throw new RuntimeException('Archived or restricted territorial relation must not be revived.');
|
||||
}
|
||||
$identity = DB::table('project_locations')->where('id', $original['id'])->first();
|
||||
if ($identity && (! $existing || $identity->id !== $existing->id)) {
|
||||
throw new RuntimeException('Historical relation identity is already occupied.');
|
||||
}
|
||||
$links[] = ['code' => $item['code'], 'already_present' => (bool) $existing, 'row' => [...$original, 'project_id' => $project->id]];
|
||||
}
|
||||
|
||||
return ['manifest_sha256' => self::HASH, 'projects' => array_values($projects), 'links' => $links];
|
||||
}
|
||||
|
||||
/** Caller supplies an authenticated, backed-up transaction; no source publication changes.
|
||||
* @param array{manifest_sha256:string,projects:list<array<string,mixed>>,links:list<array<string,mixed>>} $plan
|
||||
* @return array<string,int>
|
||||
*/
|
||||
public function apply(array $plan): array
|
||||
{
|
||||
if (DB::transactionLevel() < 1 || $this->plan() !== $plan) {
|
||||
throw new RuntimeException('Reviewed transaction and unchanged preview required.');
|
||||
}
|
||||
$inserted = 0;
|
||||
$updated = 0;
|
||||
foreach ($plan['projects'] as $project) {
|
||||
if ($project['before_metadata'] == $project['after_metadata']) {
|
||||
continue;
|
||||
}
|
||||
$count = DB::table('projects')->where('id', $project['id'])->where('version_no', $project['before_version'])->update([
|
||||
'metadata' => json_encode($project['after_metadata'], JSON_THROW_ON_ERROR), 'version_no' => $project['before_version'] + 1, 'updated_at' => now(),
|
||||
]);
|
||||
if ($count !== 1) {
|
||||
throw new RuntimeException('Concurrent project change.');
|
||||
}
|
||||
DB::table('audit_events')->insert(['source_system' => 'approved-anchor-territories-recovery-v1', 'external_id' => self::HASH.':'.$project['id'], 'entity_type' => 'projects', 'entity_id' => $project['id'], 'action' => 'accepted_territories_restored',
|
||||
'data_classification' => 'public', 'before_data' => json_encode(['version_no' => $project['before_version'], 'metadata' => $project['before_metadata']], JSON_THROW_ON_ERROR),
|
||||
'after_data' => json_encode(['version_no' => $project['before_version'] + 1, 'manifest_sha256' => self::HASH, 'metadata' => $project['after_metadata'], 'new_approval' => false], JSON_THROW_ON_ERROR)]);
|
||||
$updated++;
|
||||
}
|
||||
foreach ($plan['links'] as $link) {
|
||||
if ($link['already_present']) {
|
||||
continue;
|
||||
}
|
||||
DB::table('project_locations')->insert($link['row']);
|
||||
$inserted++;
|
||||
}
|
||||
|
||||
return ['relations_restored' => $inserted, 'projects_updated' => $updated, 'new_dossiers' => 0, 'publication_changes' => 0];
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ final class ContentManagement
|
||||
$editor = $documents->full($actor) || $documents->editorial($actor);
|
||||
$upload = $editor || $documents->limited($actor);
|
||||
$result = [];
|
||||
if (app(Procurement::class)->available() && app(Procurement::class)->access($actor)) $result['procurement'] = ['index' => '/management/concursos', 'create' => '/management/concursos/novo'];
|
||||
if ($legacy || ($navigation['mine'] ?? null) || ($navigation['review'] ?? null)) {
|
||||
$result['opportunities'] = ['index' => $legacy ? '/management/opportunities' : '/minhas-oportunidades',
|
||||
'create' => $legacy ? '/management/opportunities/create' : ($navigation['create'] ?? null), 'profileWorkflow' => ! $legacy];
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use DOMDocument;
|
||||
use DOMElement;
|
||||
|
||||
/** Supplement the six named agribusiness sections without changing corridor masters or source documents. */
|
||||
final class CorridorAgribusiness
|
||||
{
|
||||
public function enrich(string $html, array $links = []): string
|
||||
{
|
||||
$data = json_decode(file_get_contents(__DIR__.'/../../database/data/corridor-investment-opportunities.json'), true, 512, JSON_THROW_ON_ERROR);
|
||||
$doc = new DOMDocument;
|
||||
$previous = libxml_use_internal_errors(true);
|
||||
try {
|
||||
$doc->loadHTML('<?xml encoding="UTF-8"><html><body>'.$html.'</body></html>', LIBXML_NONET);
|
||||
$body = $doc->getElementsByTagName('body')->item(0);
|
||||
if (! $body) {
|
||||
return $html;
|
||||
}
|
||||
$changed = false;
|
||||
foreach ($data['groups'] as $index => $group) {
|
||||
$marker = 'agronegocio-oportunidades-'.($index + 1);
|
||||
if ($doc->getElementById($marker)) {
|
||||
continue;
|
||||
}
|
||||
foreach (iterator_to_array($body->childNodes) as $heading) {
|
||||
if (! $heading instanceof DOMElement) {
|
||||
continue;
|
||||
}
|
||||
$name = preg_replace('/^[a-f]\)\s*/u', '', trim($heading->textContent));
|
||||
if ($name !== $group['name']) {
|
||||
continue;
|
||||
}
|
||||
$chains = $heading->nextSibling;
|
||||
while ($chains && ! $chains instanceof DOMElement) {
|
||||
$chains = $chains->nextSibling;
|
||||
}
|
||||
// Insert only into the exact named section and its existing priority-chain paragraph.
|
||||
if (! $chains || ! str_starts_with(trim($chains->textContent), 'Cadeias de valor prioritárias:')) {
|
||||
continue;
|
||||
}
|
||||
$fragment = $doc->createDocumentFragment();
|
||||
$label = $doc->createElement('p');
|
||||
$strong = $doc->createElement('strong');
|
||||
$strong->appendChild($doc->createTextNode('Oportunidades de investimento em agronegócio:'));
|
||||
$label->appendChild($strong);
|
||||
$fragment->appendChild($label);
|
||||
$list = $doc->createElement('ul');
|
||||
$list->setAttribute('id', $marker);
|
||||
foreach ($group['opportunities'] as $itemIndex => $opportunity) {
|
||||
$item = $doc->createElement('li');
|
||||
$chain = $doc->createElement('strong');
|
||||
$chain->appendChild($doc->createTextNode($opportunity['chain'].': '));
|
||||
$item->appendChild($chain);
|
||||
$item->appendChild($doc->createTextNode($opportunity['description']));
|
||||
if (isset($links[$index][$itemIndex])) {
|
||||
$item->appendChild($doc->createTextNode(' '));
|
||||
$link = $doc->createElement('a');
|
||||
$link->setAttribute('href', $links[$index][$itemIndex]);
|
||||
$link->appendChild($doc->createTextNode('Conhecer a oportunidade e iniciar o roteiro'));
|
||||
$item->appendChild($link);
|
||||
}
|
||||
$list->appendChild($item);
|
||||
}
|
||||
$fragment->appendChild($list);
|
||||
$source = $doc->createElement('p');
|
||||
$source->appendChild($doc->createTextNode('Fonte das oportunidades: '.$data['source']));
|
||||
$fragment->appendChild($source);
|
||||
$body->insertBefore($fragment, $chains->nextSibling);
|
||||
$changed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $changed ? implode('', array_map(fn ($node) => $doc->saveHTML($node), iterator_to_array($body->childNodes))) : $html;
|
||||
} finally {
|
||||
libxml_clear_errors();
|
||||
libxml_use_internal_errors($previous);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Opportunity;
|
||||
use App\Models\Sector;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
|
||||
/** Source-defined opportunities; never infer a master corridor, site or promoter. */
|
||||
final class CorridorAgribusinessOpportunities
|
||||
{
|
||||
public const SOURCE_HASH = '1473b06c48aa234e771660e3f2a51b9d2e4e1943bd52d878e0ae854ee6657055';
|
||||
|
||||
/** Documentary cross-reference only; keep the two source designations and master records intact. */
|
||||
public function portfolioOpportunityIds(\App\Models\InvestmentDossier $dossier): array
|
||||
{
|
||||
if (!$dossier->corridor_id || data_get($dossier->content, 'code') !== 'COR-02') return [];
|
||||
// COR-02 is Beira e Centro in investment-portfolio.json. The seven entries are explicitly
|
||||
// grouped under Corredor da Beira in the accepted source, not selected by province/name search.
|
||||
$keys = collect($this->entries())->where('corridor', 'Corredor da Beira')->pluck('key');
|
||||
return Opportunity::published()->whereIn('management_creation_key', $keys)
|
||||
->where('workflow_context->corridor_agribusiness->source_sha256', self::SOURCE_HASH)->pluck('id')->all();
|
||||
}
|
||||
public const LIMITATIONS = 'Promotor, implantação exacta, área, montante, financiamento, viabilidade e licenças não indicados nesta fonte. O corredor é um enquadramento documental; não identifica uma parcela nem confirma disponibilidade.';
|
||||
|
||||
public function entries(): array
|
||||
{
|
||||
$data = json_decode(file_get_contents(database_path('data/corridor-investment-opportunities.json')), true, 512, JSON_THROW_ON_ERROR);
|
||||
if ($data['source_sha256'] !== self::SOURCE_HASH) throw new \RuntimeException('Fonte divergente; reconciliar antes de cadastrar.');
|
||||
$sector = Sector::where('slug', 'agronegocio')->where('is_active', true)->whereNull('deleted_at')->firstOrFail();
|
||||
$entries = [];
|
||||
foreach ($data['groups'] as $g => $group) {
|
||||
foreach ($group['opportunities'] as $i => $item) {
|
||||
$key = (string) Uuid::uuid5(Uuid::NAMESPACE_URL, 'investmoz:agronegocio:'.self::SOURCE_HASH.':'.$g.':'.$i);
|
||||
$title = Str::limit($item['chain'].' — '.$group['name'], 150, '…');
|
||||
$description = $item['description']."\n\nEnquadramento documental: ".$group['name'].".\n\nFonte: ".$data['source'].'; SHA-256 '.self::SOURCE_HASH.".\n\n".self::LIMITATIONS;
|
||||
$entries[] = ['key' => $key, 'group' => $g, 'index' => $i, 'corridor' => $group['name'], 'chain' => $item['chain'],
|
||||
'source' => $data['source'], 'source_sha256' => self::SOURCE_HASH, 'title' => $title,
|
||||
'summary' => $item['description'], 'description' => $description, 'sector_id' => $sector->id];
|
||||
}
|
||||
}
|
||||
if (count($entries) !== 34) throw new \RuntimeException('O lote deve conter as 34 entradas da fonte.');
|
||||
return $entries;
|
||||
}
|
||||
|
||||
public function register(User $actor, string $organization): array
|
||||
{
|
||||
// The caller uses the ordinary profile creation route and its approved scope.
|
||||
abort_unless(str_starts_with(request()->path(), 'minhas-oportunidades'), 422);
|
||||
return DB::transaction(function () use ($actor, $organization) {
|
||||
DB::select('SELECT pg_advisory_xact_lock(231026, 34)');
|
||||
$result = [];
|
||||
foreach ($this->entries() as $entry) {
|
||||
$record = Opportunity::withTrashed()->where('management_creation_key', $entry['key'])->first();
|
||||
if ($record) {
|
||||
abort_unless(app(PortalProfileAccess::class)->canView($actor, $record), 403);
|
||||
abort_unless(data_get($record->workflow_context, 'corridor_agribusiness.source_sha256') === self::SOURCE_HASH, 409);
|
||||
// Recovery never overwrites editorial changes, withdrawal or archive.
|
||||
$result[] = ['id' => $record->id, 'created' => false, 'key' => $entry['key']];
|
||||
continue;
|
||||
}
|
||||
$record = app(OpportunityManagement::class)->save($actor, ['creation_key' => $entry['key'], 'organization_id' => $organization,
|
||||
'opportunity_category' => 'investment_project', 'sector_id' => $entry['sector_id'],
|
||||
'title' => $entry['title'], 'summary' => $entry['summary'], 'description' => $entry['description'],
|
||||
'canonical' => ['opportunity_category' => 'investment_project', 'official_title' => $entry['title'],
|
||||
'executive_summary' => $entry['summary'], 'demand_statement' => $entry['description'], 'sector_id' => $entry['sector_id']],
|
||||
'reason' => 'Cadastro privado das 34 oportunidades de agronegócio solicitado pela Tempo em 23/10/2026; não constitui publicação nem aprovação de execução.']);
|
||||
$context = $record->workflow_context ?? [];
|
||||
$context['corridor_agribusiness'] = $entry;
|
||||
$context['promotional_summary'] = ['input' => ['title' => $entry['title'], 'summary' => $entry['summary'],
|
||||
'description' => $entry['description'], 'source_reference' => $entry['source'].'; SHA-256 '.self::SOURCE_HASH,
|
||||
'limitations' => self::LIMITATIONS, 'edition' => '', 'source_date' => '', 'territory_ids' => [], 'sector_id' => $entry['sector_id']]];
|
||||
$record->workflow_context = $context;
|
||||
$record->maturity_label = 'Em preparação';
|
||||
$record->save();
|
||||
DB::table('audit_events')->insert(['source_system' => 'corridor-agribusiness-registration', 'entity_type' => 'opportunity',
|
||||
'action' => 'private_source_registered', 'actor_user_id' => $actor->id, 'data_classification' => 'restricted',
|
||||
'after_data' => json_encode(['record_id' => $record->id, 'source' => $entry, 'no_publication' => true, 'no_master_relation_inferred' => true], JSON_THROW_ON_ERROR)]);
|
||||
$result[] = ['id' => $record->id, 'created' => true, 'key' => $entry['key']];
|
||||
}
|
||||
return $result;
|
||||
});
|
||||
}
|
||||
|
||||
public function articleLinks(): array
|
||||
{
|
||||
$records = Opportunity::published()->whereIn('management_creation_key', array_column($this->entries(), 'key'))->get()->keyBy('management_creation_key');
|
||||
$links = [];
|
||||
foreach ($this->entries() as $entry) {
|
||||
if ($record = $records->get($entry['key'])) $links[$entry['group']][$entry['index']] = '/oportunidades/'.$record->slug;
|
||||
}
|
||||
return $links;
|
||||
}
|
||||
}
|
||||
@@ -50,6 +50,11 @@ class DocumentManagementAccess
|
||||
->where('d.external_id', $item['external_id']);
|
||||
});
|
||||
}
|
||||
foreach (json_decode(file_get_contents(config_path('legacy_editorial_resources.json')), true, 512, JSON_THROW_ON_ERROR) as $item) {
|
||||
// These exact original bytes contain the legacy identity/source.
|
||||
// Destination upload IDs differ; the approved file scope does not.
|
||||
$query->orWhere('d.sha256', $item['sha256']);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use GuzzleHttp\Psr7\Uri;
|
||||
use GuzzleHttp\Psr7\UriResolver;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
/** Reads verified originals without writing a derived edition or changing publication. */
|
||||
final class EditorialReading
|
||||
{
|
||||
public function publicResources()
|
||||
{
|
||||
return DB::table('portal_resources as r')->join('documents as d', 'd.id', '=', 'r.document_id')
|
||||
->where('r.published', true)->where('r.rights_status', 'authorized')->where('d.rights_status', 'authorized')
|
||||
->where('d.status', 'active')->where('d.data_classification', 'public')->whereNull('d.deleted_at')
|
||||
->where('d.malware_scan_status', 'clean')->whereColumn('d.sha256', 'd.malware_scanned_sha256');
|
||||
}
|
||||
|
||||
public function original(object $resource): ?array
|
||||
{
|
||||
$document = DB::table('documents')->find($resource->document_id);
|
||||
if (! $document || $document->status !== 'active' || $document->malware_scan_status !== 'clean' || ! in_array($document->media_type, ['text/plain', 'application/json'], true)) {
|
||||
return null;
|
||||
}
|
||||
$binary = app(VerifiedDocumentBinary::class)->respond($document);
|
||||
$bytes = $binary instanceof BinaryFileResponse ? file_get_contents($binary->getFile()->getPathname()) : $binary->getContent();
|
||||
if (! is_string($bytes) || strlen($bytes) > 10485760) {
|
||||
return null;
|
||||
}
|
||||
$original = json_decode($bytes, true);
|
||||
|
||||
return is_array($original) && ($original['format'] ?? '') === 'investmoz-legacy-article-v1' && is_string($original['content_html'] ?? null) ? $original : null;
|
||||
}
|
||||
|
||||
public function plain(string $html): string
|
||||
{
|
||||
return trim(html_entity_decode(strip_tags(preg_replace('~</(?:p|div|li|h[1-6]|tr)>|<br\s*/?>~i', "\n\n", $html)), ENT_QUOTES | ENT_HTML5, 'UTF-8'));
|
||||
}
|
||||
|
||||
public function content(object $resource, ?array $original): array
|
||||
{
|
||||
return $resource->editorial_content ? json_decode($resource->editorial_content, true, 512, JSON_THROW_ON_ERROR)
|
||||
: ['body' => $this->plain($original['content_html'] ?? ''), 'image_resource_id' => null, 'image_mode' => 'original', 'preserve_original_html' => true];
|
||||
}
|
||||
|
||||
private function sourceUrl(mixed $url, ?string $base = null): ?string
|
||||
{
|
||||
if (! is_string($url) || trim($url) === '') {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
$absolute = $base ? (string) UriResolver::resolve(new Uri($base), new Uri($url)) : $url;
|
||||
|
||||
return filter_var($absolute, FILTER_VALIDATE_URL) && in_array(strtolower((string) parse_url($absolute, PHP_URL_SCHEME)), ['http', 'https'], true) ? $absolute : null;
|
||||
} catch (\InvalidArgumentException) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function reading(object $resource, ?array $override = null, bool $private = false): array
|
||||
{
|
||||
$original = $this->original($resource);
|
||||
$content = $override ?? $this->content($resource, $original);
|
||||
abort_unless(trim($content['body'] ?? '') !== '', 404, 'Este documento não contém um artigo legível.');
|
||||
$document = DB::table('documents')->find($resource->document_id);
|
||||
// The original is verified above; ordinary text adaptations retain the binary gate too.
|
||||
app(VerifiedDocumentBinary::class)->respond($document);
|
||||
$mode = $content['image_mode'] ?? (! empty($content['image_resource_id']) ? 'selected' : 'none');
|
||||
$originalImageUrl = $this->sourceUrl($original['image_source_url'] ?? null, $original['source_url'] ?? null);
|
||||
$expectedImageSha = $original['image_sha256'] ?? null;
|
||||
if (! $expectedImageSha && $originalImageUrl === 'https://investemoz.tempo.co.mz/images/tempo-background.png') {
|
||||
foreach (json_decode(file_get_contents(config_path('legacy_editorial_resources.json')), true, 512, JSON_THROW_ON_ERROR) as $accepted) {
|
||||
if ($accepted['sha256'] === $document->sha256) {
|
||||
$expectedImageSha = $accepted['original_image_sha256'] ?? null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$images = $this->publicResources()->whereIn('d.media_type', ['image/png', 'image/jpeg', 'image/webp']);
|
||||
$image = null;
|
||||
if ($mode === 'selected' && ! empty($content['image_resource_id'])) {
|
||||
$image = (clone $images)->where('r.id', $content['image_resource_id'])->first(['r.id', 'r.title']);
|
||||
}
|
||||
if ($mode === 'original' && $original) {
|
||||
$image = (clone $images)->where(function ($q) use ($expectedImageSha, $originalImageUrl) {
|
||||
$q->whereRaw('1=0');
|
||||
if ($expectedImageSha) {
|
||||
$q->orWhere('d.sha256', $expectedImageSha);
|
||||
} elseif ($originalImageUrl) {
|
||||
$q->orWhere('r.source_url', $originalImageUrl)->orWhere('d.original_source', $originalImageUrl);
|
||||
}
|
||||
})->first(['r.id', 'r.title']);
|
||||
}
|
||||
if ($image) {
|
||||
// A public flag alone never licenses missing or changed image bytes.
|
||||
$binary = (clone $images)->where('r.id', $image->id)->first(['d.*']);
|
||||
try {
|
||||
app(VerifiedDocumentBinary::class)->respond($binary);
|
||||
} catch (HttpException) {
|
||||
$image = null;
|
||||
}
|
||||
}
|
||||
$originalFormat = $original && ($content['preserve_original_html'] ?? false) && $content['body'] === $this->plain($original['content_html']);
|
||||
$html = $originalFormat ? app(LegacyContent::class)->sanitize($original['content_html'], true) : null;
|
||||
$imageReferences = [];
|
||||
if ($original) {
|
||||
preg_match_all('~<img\b[^>]*\bsrc\s*=\s*([\'"])(.*?)\1~is', $original['content_html'], $matches);
|
||||
foreach ($matches[2] as $source) {
|
||||
$url = $this->sourceUrl(html_entity_decode($source, ENT_QUOTES | ENT_HTML5, 'UTF-8'), $original['source_url'] ?? null);
|
||||
if ($url) {
|
||||
$imageReferences[] = $url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ['id' => $resource->id, 'title' => $resource->title, 'description' => $resource->description,
|
||||
'author' => $document->issuer, 'body' => $content['body'], 'html' => $html,
|
||||
'image_url' => $image ? '/documentos/'.$image->id.'/view' : null,
|
||||
'image_notice' => $mode === 'selected' && ! $image ? 'A imagem escolhida está indisponível para divulgação; a selecção mantém-se na edição.' : ($mode === 'original' && ! $image && ! empty($original['image_source_url']) ? 'Imagem de origem referenciada, mas sem exemplar público verificado na biblioteca. A referência original mantém-se preservada.' : null),
|
||||
'source_url' => $this->sourceUrl($original['source_url'] ?? $resource->source_url),
|
||||
'published_at' => $original['published_at'] ?? null, 'modified_at' => $original['modified_at'] ?? null,
|
||||
'legacy_id' => $original['legacy_id'] ?? null, 'image_source_url' => $originalImageUrl, 'image_expected_sha256' => $expectedImageSha, 'image_references' => array_values(array_unique($imageReferences)),
|
||||
'metadata_version' => $resource->metadata_version, 'private_preview' => $private,
|
||||
'original_url' => $private ? '/management/documents/'.$resource->document_id.'/download' : '/documentos/'.$resource->id,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ class InvestmentCatalogue
|
||||
'cluster_id' => ['nullable', 'uuid'], 'corridor_id' => ['nullable', 'uuid'], 'project_id' => ['nullable', 'uuid'],
|
||||
'geo_location_id' => ['nullable', 'uuid'], 'education' => ['nullable', 'boolean'],
|
||||
'zee_id' => ['nullable', 'uuid'], 'zfi_id' => ['nullable', 'uuid'], 'park_id' => ['nullable', 'uuid'],
|
||||
'dimension' => ['nullable', 'in:cluster,corridor,zee,zfi'], 'view' => ['nullable', 'in:grid,list,map,combined'],
|
||||
'dimension' => ['nullable', 'in:cluster,corridor,zee,zfi'], 'view' => ['nullable', 'in:grid,list,map,combined,corridors'],
|
||||
'maturity_level' => ['nullable', 'integer', 'between:1,8'], 'facets' => ['nullable', 'array', 'max:20'], 'facets.*' => ['integer', 'min:1'],
|
||||
'min_amount' => ['nullable', 'numeric', 'min:0', 'max:999999999999'],
|
||||
'max_amount' => ['nullable', 'numeric', 'min:0', 'max:999999999999', ...($request->filled('min_amount') ? ['gte:min_amount'] : [])],
|
||||
@@ -292,6 +292,10 @@ class InvestmentCatalogue
|
||||
}
|
||||
}
|
||||
});
|
||||
if (!empty($selected['corridor_id'])) {
|
||||
$dossier = InvestmentPortfolioController::visible()->where('corridor_id', $selected['corridor_id'])->first();
|
||||
if ($dossier) $ids['corridor_id'] = array_values(array_unique([...($ids['corridor_id'] ?? []), ...app(CorridorAgribusinessOpportunities::class)->portfolioOpportunityIds($dossier)]));
|
||||
}
|
||||
return $ids;
|
||||
}
|
||||
|
||||
@@ -308,6 +312,18 @@ class InvestmentCatalogue
|
||||
/** @return array<string,mixed> */
|
||||
public function context(int $id, bool $management = false): array
|
||||
{
|
||||
$opportunity = Opportunity::findOrFail($id);
|
||||
if (! $management && data_get($opportunity->workflow_context, 'publication.purpose') === OpportunityPromotion::PURPOSE) {
|
||||
// Promotional disclosure includes only its explicit public coverage.
|
||||
// Private profiles, source evidence and other dossier relations are not auto-published.
|
||||
$public = ['profile' => null, 'facets' => collect(), 'zones' => collect(), 'classification' => [], 'source_evidence' => [],
|
||||
'primary_territory_path' => app(InvestmentGeography::class)->path($opportunity->primary_territory_id, true),
|
||||
'opportunity_locations' => app(InvestmentRelations::class)->opportunityLocations($id)];
|
||||
foreach (self::RELATIONS as $relation => $_) $public[$relation] = collect();
|
||||
$public['locations'] = DB::table('opportunity_locations as l')->join('geo_locations as g', 'g.id', '=', 'l.geo_location_id')
|
||||
->where('l.opportunity_id', $id)->where('g.data_classification', 'public')->whereNull('g.deleted_at')->get(['g.id', 'g.name']);
|
||||
return $public;
|
||||
}
|
||||
$result = ['profile' => DB::table('opportunity_profiles')->where('opportunity_id', $id)->first(),
|
||||
'facets' => DB::table('opportunity_facets as f')->join('investment_reference_options as o', 'o.id', '=', 'f.option_id')
|
||||
->where('f.opportunity_id', $id)->get(['o.id', 'o.group', 'o.label'])];
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Http\Controllers\InvestmentPortfolioController;
|
||||
use App\Models\Opportunity;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/** Resolve documented complements without creating opportunities or master relations. */
|
||||
final class InvestmentComplements
|
||||
{
|
||||
private const TERMS = [
|
||||
'irrigation' => ['Regadio', 'regadio|irrigação|irrigacao'],
|
||||
'storage' => ['Silos e armazenagem', 'silos?|armazenagem|armazenamento'],
|
||||
'cold' => ['Cadeia de frio', 'frio|refrigeração'],
|
||||
'processing' => ['Processamento', 'processamento|transformação|moagem'],
|
||||
'spinning' => ['Fiação', 'fiação|fiacao'],
|
||||
'logistics' => ['Logística', 'logística|logistica|transporte'],
|
||||
'certification' => ['Certificação', 'certificação|certificacao'],
|
||||
'training' => ['Formação', 'formação|formacao'],
|
||||
'finance' => ['Financiamento', 'financiamento|serviços financeiros'],
|
||||
];
|
||||
|
||||
public function options(string $origin, ?string $territory = null): array
|
||||
{
|
||||
[$originKind, $originId] = array_pad(explode(':', $origin, 2), 2, '');
|
||||
abort_unless(($originKind === 'portfolio' && Str::isUuid($originId)) || ($originKind === 'opportunity' && ctype_digit($originId)), 422, 'Origem complementar inválida.');
|
||||
$principal = null;
|
||||
$relationEvidence = [];
|
||||
if (str_starts_with($origin, 'portfolio:')) {
|
||||
$record = InvestmentPortfolioController::visible()->addSelect('version_no')->findOrFail(substr($origin, 10));
|
||||
$text = trim(($record->content['focus'] ?? '')."\n".($record->content['gaps'] ?? '')."\n".($record->content['description'] ?? ''));
|
||||
$reference = ['key' => $origin, 'title' => $record->title, 'href' => '/carteira/'.$record->id, 'version' => $record->version_no];
|
||||
$ids = app(CorridorAgribusinessOpportunities::class)->portfolioOpportunityIds($record);
|
||||
foreach (['projects' => 'project_id', 'clusters' => 'cluster_id', 'corridors' => 'corridor_id'] as $relation => $foreign) {
|
||||
if ($record->$foreign) $ids = [...$ids, ...DB::table('opportunity_'.$relation)->where($foreign, $record->$foreign)->pluck('opportunity_id')->all()];
|
||||
}
|
||||
$basis = $record->source;
|
||||
foreach (array_unique($ids) as $id) $relationEvidence[$id] = ['type' => 'portfolio', 'origin' => $origin, 'source' => $basis];
|
||||
$serviceOrigins = [['dossier', $record->id]];
|
||||
foreach (['project_id' => 'project', 'cluster_id' => 'cluster'] as $foreign => $type) {
|
||||
if ($record->$foreign) $serviceOrigins[] = [$type, $record->$foreign];
|
||||
}
|
||||
} else {
|
||||
$reference = app(InvestorContext::class)->reference($origin);
|
||||
abort_unless($reference['kind'] === 'opportunity', 422);
|
||||
$principal = Opportunity::published()->findOrFail($reference['id']);
|
||||
$text = $principal->summary;
|
||||
$basis = 'Resumo cadastrado da oportunidade '.$principal->reference;
|
||||
$projects = DB::table('opportunity_projects')->where('opportunity_id', $principal->id)->pluck('project_id');
|
||||
$links = DB::table('complementary_project_links')->whereIn('anchor_project_id', $projects)
|
||||
->whereNull('deleted_at')->where('data_classification', 'public')->get(['id', 'anchor_project_id', 'complementary_project_id', 'relation_type', 'version_no']);
|
||||
$targetProjects = DB::table('opportunity_projects')->whereIn('project_id', $links->pluck('complementary_project_id'))->get();
|
||||
$ids = [$principal->id, ...$targetProjects->pluck('opportunity_id')->all()];
|
||||
$relationEvidence[$principal->id] = ['type' => 'same_fiche', 'source' => $basis];
|
||||
foreach ($targetProjects as $targetProject) $relationEvidence[$targetProject->opportunity_id] = ['type' => 'complementary_project',
|
||||
'links' => $links->where('complementary_project_id', $targetProject->project_id)->values()->map(fn($link) => (array)$link)->all()];
|
||||
foreach (Opportunity::published()->whereIn('id', $ids)->where('id', '!=', $principal->id)->get() as $linked) $text .= "\n".$linked->summary;
|
||||
if (count($ids) > 1) $basis .= '; relações complementares públicas entre projectos';
|
||||
$serviceOrigins = [['investment', (string) $principal->id]];
|
||||
$classification = app(OpportunityClassification::class);
|
||||
$principalChains = collect($classification->publicRows($principal))->where('target_type', 'chain')->filter(fn($r) => !empty($r['source_reference']));
|
||||
$chains = $principalChains->pluck('target_id')->all();
|
||||
if ($chains) {
|
||||
Opportunity::published()->whereNot('id', $principal->id)->chunkById(100, function ($records) use (&$ids, &$relationEvidence, $chains, $principalChains, $classification) {
|
||||
foreach ($records as $candidate) {
|
||||
$related = collect($classification->publicRows($candidate))->where('target_type', 'chain')->filter(fn($r) => !empty($r['source_reference']));
|
||||
$shared = array_intersect($chains, $related->pluck('target_id')->all());
|
||||
if ($shared) {
|
||||
$ids[] = $candidate->id;
|
||||
$relationEvidence[$candidate->id] ??= ['type' => 'value_chain', 'principal' => $principalChains->whereIn('target_id', $shared)->values()->all(), 'target' => $related->whereIn('target_id', $shared)->values()->all()];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
$territoryReference = $territory ? app(InvestorContext::class)->reference('territory:'.$territory) : null;
|
||||
$candidates = Opportunity::published()->whereIn('id', array_unique($ids))->get();
|
||||
$items = [];
|
||||
foreach (self::TERMS as $code => [$label, $pattern]) {
|
||||
if (!preg_match('/\b(?:'.$pattern.')\b/iu', $text, $match)) continue;
|
||||
$offers = [];
|
||||
foreach ($candidates as $candidate) {
|
||||
// A common corridor alone does not prove the component. Keep the supporting excerpt.
|
||||
if (!preg_match('/\b(?:'.$pattern.')\b/iu', $candidate->title."\n".$candidate->summary, $evidence)) continue;
|
||||
// Mentioning a need for funding/training in a project's summary is not an offer.
|
||||
if (in_array($code, ['certification', 'training', 'finance'], true) && !preg_match('/\b(?:'.$pattern.')\b/iu', $candidate->title)) continue;
|
||||
if (in_array($code, ['certification', 'training', 'finance'], true) && preg_match('/\b(?:necessidade|pedido|procura)\b/iu', $candidate->title)) continue;
|
||||
if ($territory && $candidate->primary_territory_id && !$this->compatible($territory, $candidate->primary_territory_id)) continue;
|
||||
$offers[] = ['key' => 'opportunity:'.$candidate->id, 'title' => $candidate->title, 'href' => '/oportunidades/'.$candidate->slug,
|
||||
'relationship' => $relationEvidence[$candidate->id] ?? null,
|
||||
'version' => $candidate->management_version, 'evidence' => $evidence[0], 'location' => ($principal && $principal->id === $candidate->id ? 'Componente referido na própria ficha. ' : '').($candidate->primary_territory_id ? app(InvestorContext::class)->reference('territory:'.$candidate->primary_territory_id)['title'] : 'Implantação por definir')];
|
||||
}
|
||||
// Services are concrete published offerings explicitly associated with this source.
|
||||
$services = [];
|
||||
if (in_array($code, ['certification', 'training', 'finance'], true) && Schema::hasTable('partnership_origins') && Schema::hasTable('partnership_interests')) {
|
||||
if ($serviceOrigins) {
|
||||
$services = DB::table('portal_partnerships as p')->join('partnership_origins as o', 'o.partnership_id', '=', 'p.id')
|
||||
->where(function ($q) use ($serviceOrigins) {
|
||||
foreach ($serviceOrigins as [$type, $id]) $q->orWhere(fn($q) => $q->where('o.type', $type)->where('o.target_id', $id));
|
||||
})->where('p.status', 'published')->where('p.kind', 'offering')
|
||||
->where('p.partnership_type', $code === 'finance' ? 'finance' : 'training')
|
||||
->when($code !== 'finance', fn($q) => $q->where(fn($q) => $q->where('p.title', 'ilike', '%'.$match[0].'%')->orWhereRaw("p.payload->>'summary' ILIKE ?", ['%'.$match[0].'%'])))->distinct()->get(['p.id', 'p.title'])
|
||||
->filter(function ($p) use ($territory) {
|
||||
if (!$territory) return true;
|
||||
$locations = DB::table('partnership_locations')->where('partnership_id', $p->id)->pluck('geo_location_id');
|
||||
return $locations->isEmpty() || $locations->contains(fn($id) => $this->compatible($territory, $id));
|
||||
})->map(fn ($p) => ['key' => 'partnership:'.$p->id, 'title' => $p->title, 'href' => '/parcerias/'.$p->id, 'location' => 'Consultar âmbito na oferta'])->values()->all();
|
||||
}
|
||||
}
|
||||
$excerpt = collect(explode("\n", $text))->first(fn($line) => preg_match('/\b(?:'.$pattern.')\b/iu', $line));
|
||||
$items[] = ['code' => $code, 'title' => $label, 'origin' => $reference, 'territory_id' => $territory, 'territory' => $territoryReference,
|
||||
'source' => $basis, 'excerpt' => $excerpt, 'source_sha256' => hash('sha256', $text), 'opportunities' => $offers, 'services' => $services];
|
||||
}
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function compatible(string $a, string $b): bool
|
||||
{
|
||||
if ($a === $b) return true;
|
||||
$geo = app(InvestmentGeography::class);
|
||||
return in_array($b, $geo->descendants($a), true) || in_array($a, $geo->descendants($b), true);
|
||||
}
|
||||
|
||||
public function resolve(array $input, array $previous = []): array
|
||||
{
|
||||
$resolved = [];
|
||||
foreach ($input as $choice) {
|
||||
$target = $choice['target'] ?? null;
|
||||
$old = collect($previous)->first(fn($r) => $r['origin']['key'] === $choice['origin'] && $r['code'] === $choice['code'] && ($r['target']['key'] ?? null) === $target && ($r['territory_id'] ?? null) === ($choice['territory_id'] ?? null));
|
||||
try {
|
||||
$item = collect($this->options($choice['origin'], $choice['territory_id'] ?? null))->firstWhere('code', $choice['code']);
|
||||
} catch (\Illuminate\Database\Eloquent\ModelNotFoundException $e) {
|
||||
if (!$old) throw $e;
|
||||
$item = null;
|
||||
} catch (\Symfony\Component\HttpKernel\Exception\HttpException $e) {
|
||||
if (!$old || $e->getStatusCode() !== 404) throw $e;
|
||||
$item = null;
|
||||
}
|
||||
$offer = $target && $item ? collect([...$item['opportunities'], ...$item['services']])->firstWhere('key', $target) : null;
|
||||
if ($old && (!$item || ($target && !$offer) || (!$target && ($item['opportunities'] || $item['services'])))) {
|
||||
$resolved[$old['key']] = [...$old, 'availability' => 'review_required'];
|
||||
continue;
|
||||
}
|
||||
abort_unless($item, 422, 'Complemento sem referência documentada neste investimento.');
|
||||
abort_if($target && !$offer, 422, 'A oferta complementar deixou de estar disponível neste contexto.');
|
||||
abort_if(!$target && ($item['opportunities'] || $item['services']), 422, 'Já existe uma oferta relacionada; seleccione a ficha correspondente.');
|
||||
$key = hash('sha256', $choice['origin'].'|'.$choice['code'].'|'.($target ?? 'idea').'|'.($choice['territory_id'] ?? ''));
|
||||
$resolved[$key] = ['key' => $key, 'origin' => $item['origin'], 'code' => $item['code'], 'title' => $item['title'],
|
||||
'kind' => $target ? (str_starts_with($target, 'opportunity:') ? 'opportunity' : 'service') : 'need',
|
||||
'target' => $offer, 'territory_id' => $item['territory_id'], 'territory' => $item['territory'], 'source' => $item['source'], 'excerpt' => $item['excerpt'], 'source_sha256' => $item['source_sha256']];
|
||||
}
|
||||
return array_values($resolved);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
/** An identified opportunity within the authorised dossier, never the account's last choice. */
|
||||
final class InvestmentConsumerScope
|
||||
{
|
||||
public function key(array $context, ?string $key, bool $required = false): ?string
|
||||
{
|
||||
$choices = $context['opportunity_choices'] ?? [];
|
||||
$key = $key ?: (count($choices) === 1 ? $choices[0]['opportunity']['key'] : null);
|
||||
abort_if($key && !collect($choices)->contains('opportunity.key', $key), 422, 'Escolha uma oportunidade deste dossier.');
|
||||
abort_if($required && count($choices) > 1 && !$key, 422, 'Escolha a oportunidade em tratamento.');
|
||||
return $key;
|
||||
}
|
||||
|
||||
public function facts(array $payload, array $context, ?string $key): array
|
||||
{
|
||||
$key = $this->key($context, $key);
|
||||
$path = $payload['investor_path'] ?? [];
|
||||
$defaults = ['land_needed' => 'unknown', 'external_funding' => 'unknown', 'viability' => 'unknown'];
|
||||
// A dossier-wide dispensation cannot decide a distinct opportunity's needs.
|
||||
if ($key && count($context['opportunity_choices'] ?? []) > 1) return [...$defaults, ...($path['opportunity_facts'][$key] ?? [])];
|
||||
if ($key && isset($path['opportunity_facts'][$key])) return [...$defaults, ...$path['opportunity_facts'][$key]];
|
||||
if (count($context['opportunity_choices'] ?? []) > 1) return $defaults;
|
||||
return [...$defaults, ...($path['facts'] ?? [])];
|
||||
}
|
||||
|
||||
public function context(array $context, ?string $key): array
|
||||
{
|
||||
$choices = $context['opportunity_choices'] ?? [];
|
||||
if (!$choices) return $context;
|
||||
$key = $key ?: (count($choices) === 1 ? $choices[0]['opportunity']['key'] : null);
|
||||
$choice = $key ? collect($choices)->firstWhere('opportunity.key', $key) : null;
|
||||
abort_if($key && !$choice, 422, 'Escolha uma oportunidade deste dossier.');
|
||||
$specific = ['project_summary', 'sector_id', 'sector', 'province_id', 'district_id', 'admin_post_id', 'locality_id', 'province', 'district', 'location', 'special_zone_id', 'investment_regime'];
|
||||
$context['fields'] = Arr::except($context['fields'], $specific);
|
||||
$context['provenance'] = Arr::except($context['provenance'] ?? [], $specific);
|
||||
$context['selection'] = Arr::except($context['selection'], ['opportunity', 'territory', 'park']);
|
||||
if (!$choice) {
|
||||
$context['opportunity_choices'] = [];
|
||||
$context['requirements_assessment']['requirements'] = [];
|
||||
return $context;
|
||||
}
|
||||
$context['selection']['opportunity'] = $choice['opportunity'];
|
||||
$context['fields'] = [...$context['fields'], ...Arr::only($choice['opportunity']['fields'], $specific)];
|
||||
foreach (Arr::only($choice['opportunity']['fields'], $specific) as $field => $value) $context['provenance'][$field] = Arr::only($choice['opportunity'], ['key','kind','id','title','version','sha256']);
|
||||
unset($context['selection']['sector']);
|
||||
if (!empty($context['fields']['sector_id'])) $context['selection']['sector'] = app(InvestorContext::class)->reference('sector:'.$context['fields']['sector_id']);
|
||||
if ($choice['territory']) {
|
||||
$context['selection']['territory'] = $choice['territory'];
|
||||
$context['fields'] = [...Arr::except($context['fields'], array_keys(InvestmentGeography::FIELDS)), ...$choice['territory']['fields']];
|
||||
foreach ($choice['territory']['fields'] as $field => $value) $context['provenance'][$field] = Arr::only($choice['territory'], ['key','kind','id','title','version','sha256']);
|
||||
} else {
|
||||
$context['fields'] = Arr::except($context['fields'], ['province_id', 'district_id', 'admin_post_id', 'locality_id', 'province', 'district', 'location']);
|
||||
}
|
||||
$park = $choice['park'] ?? null;
|
||||
if ($park) $context['selection']['park'] = $park;
|
||||
$context['fields']['special_zone_id'] = $park['id'] ?? '';
|
||||
$context['fields']['investment_regime'] = $park['fields']['investment_regime'] ?? 'general';
|
||||
$context['opportunity_choices'] = [$choice];
|
||||
$context['requirements_assessment']['requirements'] = array_values(array_filter($context['requirements_assessment']['requirements'] ?? [], fn($r) => $r['opportunity_key'] === $key));
|
||||
$context['consumer_opportunity'] = $choice;
|
||||
$context['complements'] = array_values(array_filter($context['complements'] ?? [], fn($c) => ($c['origin']['key'] ?? null) === $key || ($c['target']['key'] ?? null) === $key || in_array(substr($c['origin']['key'] ?? '',10),array_column($choice['portfolio_origins'] ?? [],'id'),true)));
|
||||
$context['dependency_hash'] = app(InvestorContext::class)->dependencyHash(['opportunity_choices'=>[$choice], 'fields'=>Arr::except($context['fields'],['project_title','project_summary']), 'complements'=>$context['complements']]);
|
||||
return $context;
|
||||
}
|
||||
|
||||
public function bind(User $actor, string $id, array $payload, bool $required = false): array
|
||||
{
|
||||
$case = app(VirtualDesk::class)->case($actor, $id, true);
|
||||
$context = app(InvestorContext::class)->state($case);
|
||||
$scoped = $this->context($context, $payload['context_opportunity'] ?? null);
|
||||
$choice = $scoped['consumer_opportunity'] ?? null;
|
||||
abort_if($required && count($context['opportunity_choices'] ?? []) > 1 && !$choice, 422, 'Escolha a oportunidade em tratamento antes de submeter.');
|
||||
if (!$choice) return Arr::except($payload, ['context_opportunity', 'context_opportunity_snapshot']);
|
||||
// Canonical server snapshot; client text cannot establish a different origin or territory.
|
||||
$payload['context_opportunity'] = $choice['opportunity']['key'];
|
||||
$payload['context_opportunity_snapshot'] = json_encode(['context_id' => $id, 'revision' => $context['revision'], 'choice' => $choice, 'requirements' => $scoped['requirements_assessment'] ?? null], JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);
|
||||
return $payload;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
/** Preparation within the existing path; no licence, DUAT or fiscal benefit is granted. */
|
||||
final class InvestmentContextRequirements
|
||||
{
|
||||
public const VERSION = 'context-requirements-20261023';
|
||||
|
||||
public function assess(array $context): array
|
||||
{
|
||||
$rows = [];
|
||||
foreach ($context['opportunity_choices'] ?? [] as $choice) {
|
||||
$activities = $choice['activities'] ?? [];
|
||||
$key = $choice['opportunity']['key'];
|
||||
$common = ['opportunity_key' => $key, 'opportunity_title' => $choice['opportunity']['title']];
|
||||
$add = function ($code, $title, $state, $step, $authority, $documents, $basis, $url) use (&$rows, $common) {
|
||||
$rows[] = [...$common, 'code' => $code, 'title' => $title, 'state' => $state, 'step' => $step,
|
||||
'authority' => $authority, 'documents' => $documents, 'basis' => $basis, 'source_url' => $url,
|
||||
'decision' => 'Preparação; enquadramento e acto concreto conservam confirmação na etapa correspondente.'];
|
||||
};
|
||||
$add('geography', 'Localização e geolocalização', $choice['territory'] ? 'selected' : 'missing', 'S09', 'Cadastro territorial e serviços de cadastro competentes',
|
||||
['Referência administrativa confirmada', 'Planta/esboço e coordenadas quando disponíveis; não inventar polígonos'],
|
||||
'Referência territorial escolhida no dossier; não comprova disponibilidade nem direito de uso.', '/investimentos');
|
||||
$add('land', 'Acesso à terra e DUAT', 'conditional', 'S10', 'Serviços de cadastro e órgão competente para o pedido territorial concreto',
|
||||
['Fundamento do uso: DUAT, arrendamento ou situação declarada', 'Planta/esboço do local; documentação do pedido correspondente'],
|
||||
'Regulamento de Investimento, artigos 9(1)(c)–(d) e 14(1)(c)–(d). A preparação distingue DUAT e arrendamento; escolher território não atribui terra.', PrivateInvestmentPreparation::SOURCE.'#page=42');
|
||||
$add('environment', 'Enquadramento ambiental', 'conditional', 'S08', 'Autoridade de Avaliação do Impacto Ambiental; competência central/provincial conforme categorização',
|
||||
['Descrição da actividade, dimensão e localização', 'Instrumento ambiental definido pela categorização competente; acto e condições quando emitidos'],
|
||||
'Decreto 54/2015: a natureza, dimensão e localização determinam o enquadramento; a categoria não é deduzida do corredor ou do sector.', 'https://sibmoz.gov.mz/legal-framework/');
|
||||
$add('sector', 'Licenciamento sectorial', $activities ? 'declared' : 'missing', 'S08', 'BAU, IP e autoridade sectorial competente conforme a actividade',
|
||||
['Actividades efectivas e modalidade', 'Requerimento e anexos da modalidade aplicável; acto quando emitido'],
|
||||
'Identificar as actividades efectivas antes de seleccionar o procedimento. O nome Agronegócio não escolhe uma licença única.', 'https://www.bau.gov.mz/nossos-servicos/');
|
||||
foreach (['processing' => ['Licenciamento industrial', 'Decreto 22/2014'], 'trade' => ['Licenciamento comercial', 'Decreto 34/2013']] as $activity => [$title, $basis]) {
|
||||
if (in_array($activity, $activities, true)) $add($activity, $title, 'conditional', 'S08', 'BAU, IP / entidade licenciadora da modalidade',
|
||||
['Caracterização do estabelecimento e actividade', 'Documentos e regime aplicáveis, incluindo simplificado ou mera comunicação quando preenchidas as suas condições'],
|
||||
$basis.'; regimes 39/2017 e 27/2023 no catálogo oficial BAU. Dimensão e modalidade ainda devem ser especificadas; não se selecciona automaticamente o regime.', 'https://www.bau.gov.mz/legislacao/');
|
||||
}
|
||||
foreach (['water' => 'Uso de água', 'forestry' => 'Actividade florestal', 'animal' => 'Actividade pecuária', 'transport' => 'Transporte e logística'] as $activity => $title) {
|
||||
if (in_array($activity, $activities, true)) $add($activity, $title, 'undetermined', 'S08', 'Autoridade sectorial competente a identificar para a modalidade declarada',
|
||||
['Modalidade e dimensão da actividade', 'Fonte e documentação sectorial específica a associar ao dossier'],
|
||||
'Actividade declarada; a referência do lote não contém o procedimento específico. Não se considera dispensada ou autorizada.', 'https://www.apiex.gov.mz/wp-content/uploads/2024/01/Mozambique-Business-Licensing-Guide.pdf');
|
||||
}
|
||||
}
|
||||
return ['version' => self::VERSION, 'requirements' => $rows,
|
||||
'fiscal_notice' => 'Localização, corredor, cluster ou projecto âncora não activam benefícios fiscais. O simulador mantém as condições, fonte, período e âmbito próprios; condições ausentes permanecem indeterminadas.'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Opportunity;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
final class InvestmentCorridorContext
|
||||
{
|
||||
public function key(Opportunity $record): ?string
|
||||
{
|
||||
$name = data_get($record->workflow_context, 'corridor_agribusiness.corridor');
|
||||
foreach (config('investment_corridors') as $key => $entry) if ($entry['name'] === $name) return $key;
|
||||
return null;
|
||||
}
|
||||
|
||||
public function provinces(string $key): array
|
||||
{
|
||||
$entry = config('investment_corridors.'.$key);
|
||||
abort_unless(is_array($entry), 422, 'Seleccione um corredor disponível.');
|
||||
$records = app(InvestmentGeography::class)->publicReferences()->where('location_type', 'province')
|
||||
->whereIn('source_code', $entry['provinces'])->get(['id', 'name', 'parent_id', 'location_type', 'source_code'])->all();
|
||||
abort_unless(count($records) === count($entry['provinces']), 503, 'Não foi possível recuperar todas as províncias deste corredor. Tente novamente.');
|
||||
return $records;
|
||||
}
|
||||
|
||||
public function compatible(string $key, ?string $territory): bool
|
||||
{
|
||||
if (!$territory) return true;
|
||||
$path = app(InvestmentGeography::class)->path($territory);
|
||||
return $path !== [] && in_array($path[0]->id, array_column($this->provinces($key), 'id'), true);
|
||||
}
|
||||
|
||||
/** Both membership in the selected area and documented public zone coverage are required. */
|
||||
public function parks(?string $key, ?string $territory): array
|
||||
{
|
||||
if (!$key || !$territory) return [];
|
||||
abort_unless($this->compatible($key, $territory), 422, 'A localização não pertence ao corredor escolhido.');
|
||||
$selectedPath = array_column(app(InvestmentGeography::class)->path($territory), 'id');
|
||||
$candidates = app(InvestmentZones::class)->visible()->whereIn('category', ['industrial_park', 'zee', 'zfi'])->orderBy('name')->get();
|
||||
$result = [];
|
||||
foreach ($candidates as $zone) {
|
||||
$ids = DB::table('investment_zone_locations')->where('zone_id', $zone->id)->where('validation_status', 'validated')
|
||||
->whereIn('scope_type', ['legal_scope', 'administrative', 'site'])
|
||||
->where(fn($q)=>$q->whereNull('valid_from')->orWhereDate('valid_from','<=',today()))
|
||||
->where(fn($q)=>$q->whereNull('valid_until')->orWhereDate('valid_until','>=',today()))->get(['geo_location_id','scope_type'])->all();
|
||||
if ($zone->primary_territory_id) $ids[] = (object)['geo_location_id'=>$zone->primary_territory_id,'scope_type'=>'site'];
|
||||
foreach ($ids as $link) {
|
||||
$id=$link->geo_location_id;
|
||||
if (!$this->compatible($key, $id)) continue;
|
||||
$path = array_column(app(InvestmentGeography::class)->path($id), 'id');
|
||||
if (in_array($territory, $path, true) || ($link->scope_type==='legal_scope' && in_array($id, $selectedPath, true))) {
|
||||
$result[] = $zone->only(['id', 'name', 'category', 'version_no']); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Http\Controllers\InvestmentPortfolioController;
|
||||
use App\Models\Opportunity;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
/** Multiple identified references in the existing encrypted investment context. */
|
||||
final class InvestmentOpportunityChoices
|
||||
{
|
||||
public function portfolioOrigins(array $ids, int $opportunity): array
|
||||
{
|
||||
$origins = [];
|
||||
foreach (array_unique($ids) as $id) {
|
||||
$record = InvestmentPortfolioController::visible()->addSelect('version_no')->findOrFail($id);
|
||||
$kind = null;
|
||||
if (in_array($opportunity, app(CorridorAgribusinessOpportunities::class)->portfolioOpportunityIds($record), true)) $kind = 'corridor';
|
||||
foreach (['projects' => 'project_id', 'clusters' => 'cluster_id', 'corridors' => 'corridor_id'] as $relation => $foreign) {
|
||||
if ($record->$foreign && DB::table('opportunity_'.$relation)->where('opportunity_id', $opportunity)->where($foreign, $record->$foreign)->exists()) $kind = rtrim($relation, 's');
|
||||
}
|
||||
abort_unless($kind, 422, 'A associação escolhida não pertence a esta oportunidade.');
|
||||
$origins[] = ['id' => $record->id, 'title' => $record->title, 'kind' => $kind, 'href' => '/carteira/'.$record->id,
|
||||
'version' => $record->version_no, 'sha256' => hash('sha256', json_encode([$record->title, $record->source, $record->content], JSON_THROW_ON_ERROR))];
|
||||
}
|
||||
return $origins;
|
||||
}
|
||||
|
||||
/** Add explicitly consulted associations without resetting saved geography or deliberate answers. */
|
||||
public function mergeEntries(array $saved, array $entries): array
|
||||
{
|
||||
foreach ($entries as $entry) {
|
||||
$index = array_search($entry['opportunity']['key'], array_column(array_column($saved, 'opportunity'), 'key'), true);
|
||||
if ($index === false) { $saved[] = $entry; continue; }
|
||||
$origins = collect([...($saved[$index]['portfolio_origins'] ?? []), ...($entry['portfolio_origins'] ?? [])])->unique('id')->values()->all();
|
||||
if ($origins) $saved[$index]['portfolio_origins'] = $origins;
|
||||
}
|
||||
return $saved;
|
||||
}
|
||||
|
||||
public function resolve(array $choices, array $previous = [], bool $pending = false): array
|
||||
{
|
||||
$result = [];
|
||||
foreach ($choices as $choice) {
|
||||
$ref = app(InvestorContext::class)->reference($choice['source']);
|
||||
abort_unless($ref['kind'] === 'opportunity', 422, 'Seleccione uma ficha de oportunidade.');
|
||||
$record = Opportunity::findOrFail($ref['id']);
|
||||
$old = collect($previous)->first(fn ($row) => $row['opportunity']['key'] === $ref['key']);
|
||||
$origins = $this->portfolioOrigins($choice['portfolio_origins'] ?? array_column($old['portfolio_origins'] ?? [], 'id'), (int) $record->id);
|
||||
$corridors = app(InvestmentCorridorContext::class);
|
||||
$corridor = $choice['corridor_key'] ?? $old['corridor_key'] ?? $corridors->key($record);
|
||||
$provinces = $corridor ? $corridors->provinces($corridor) : [];
|
||||
$documented = $record->primary_territory_id;
|
||||
$territory = array_key_exists('territory', $choice) ? $choice['territory'] : ($documented ? 'territory:'.$documented : null);
|
||||
if (!$territory && count($provinces) === 1) $territory = 'territory:'.$provinces[0]->id;
|
||||
if ($corridor && $territory) abort_unless($corridors->compatible($corridor, substr($territory, 10)), 422, 'A localização não pertence ao corredor escolhido.');
|
||||
$previousTerritory = $old['territory']['key'] ?? null;
|
||||
$newAlternative = $documented && $territory !== 'territory:'.$documented
|
||||
&& (! $old || ($old['documented_territory_id'] ?? null) !== $documented || $territory !== $previousTerritory);
|
||||
$corridorChanged = $old && ($old['corridor_key'] ?? $corridors->key($record)) !== $corridor;
|
||||
$incompatibleOld = $corridorChanged && $previousTerritory && !$corridors->compatible($corridor, substr($previousTerritory, 10));
|
||||
if (!$pending && ($newAlternative || ($previousTerritory && $territory !== $previousTerritory && !$incompatibleOld))) {
|
||||
abort_unless(! empty($choice['confirm_location_change']) && mb_strlen(trim($choice['location_reason'] ?? '')) >= 20,
|
||||
422, 'Uma localização documentada ou já confirmada só muda por escolha explícita, com confirmação e motivo.');
|
||||
}
|
||||
$location = $territory ? app(InvestorContext::class)->reference($territory) : null;
|
||||
abort_unless($location === null || $location['kind'] === 'territory', 422);
|
||||
$parkKey = array_key_exists('park', $choice) ? $choice['park'] : ($old['park']['key'] ?? null);
|
||||
$park = $parkKey ? app(InvestorContext::class)->reference($parkKey) : null;
|
||||
if ($park) {
|
||||
$eligible = $corridor ? array_column($corridors->parks($corridor, $location['id'] ?? null), 'id') : [];
|
||||
if (!in_array($park['id'], $eligible, true)) {
|
||||
abort_if(!empty($choice['park']), 422, 'A zona ou parque não é compatível com a localização desta oportunidade.');
|
||||
$park = null;
|
||||
}
|
||||
abort_unless(!$park || $park['kind'] === 'park', 422);
|
||||
}
|
||||
$result[] = ['opportunity' => $ref, 'territory' => $location, ...($origins ? ['portfolio_origins' => $origins] : []),
|
||||
'park' => $park,
|
||||
'corridor_key' => $corridor, 'corridor_name' => $corridor ? config('investment_corridors.'.$corridor.'.name') : null,
|
||||
'allowed_provinces' => array_map(fn($p)=>(array)$p, $provinces),
|
||||
'territory_path' => $location ? array_map(fn ($node) => \Illuminate\Support\Arr::only((array) $node, ['id', 'name', 'parent_id', 'location_type']), app(InvestmentGeography::class)->path($location['id'], true)) : [],
|
||||
'activities' => $choice['activities'] ?? ($old['activities'] ?? []),
|
||||
'documented_territory_id' => $documented, 'location_reason' => $choice['location_reason'] ?? '',
|
||||
'location_state' => $location ? ($documented && $territory === 'territory:'.$documented ? 'documented' : 'investor_selected') : 'undetermined',
|
||||
'location_changed_explicitly' => $old && $territory === $previousTerritory ? (bool) ($old['location_changed_explicitly'] ?? false) : (bool) ($choice['confirm_location_change'] ?? false),
|
||||
'coverage' => data_get($record->workflow_context, 'corridor_agribusiness.corridor'),
|
||||
'source' => data_get($record->workflow_context, 'corridor_agribusiness.source'),
|
||||
'source_sha256' => data_get($record->workflow_context, 'corridor_agribusiness.source_sha256')];
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,67 @@ final class InvestorContext
|
||||
|
||||
public function __construct(private readonly VirtualDesk $desk) {}
|
||||
|
||||
public function draft(User $actor, string $id): ?array
|
||||
{
|
||||
$case = $this->desk->case($actor, $id, true);
|
||||
$draft = $this->desk->decode($case->payload)['investor_path']['context_drafts'][(string)$actor->id] ?? null;
|
||||
return $draft ? [...$draft, 'needs_review' => (int)$draft['version'] !== (int)$case->version] : null;
|
||||
}
|
||||
|
||||
public function saveDraft(User $actor, string $id, array $input): array
|
||||
{
|
||||
$case=$this->desk->case($actor,$id,true);
|
||||
abort_if($case->closed_at,409);
|
||||
$sequence = (int)($input['draft_sequence'] ?? 0);
|
||||
$entrySources=Validator::make($input,['entry_sources'=>'sometimes|array|max:200','entry_sources.*'=>'string|max:100'])->validate()['entry_sources']??[];
|
||||
unset($input['draft_sequence'],$input['entry_sources']);
|
||||
abort_unless($sequence > 0, 422);
|
||||
$data = $this->input($input);
|
||||
if (isset($data['complements'])) app(InvestmentComplements::class)->resolve($data['complements'], $this->state($case)['complements'] ?? []);
|
||||
foreach ($data['selection'] as $slot=>$key) {
|
||||
if (!$key) continue;
|
||||
$ref=$this->reference($key);
|
||||
abort_unless(in_array($ref['kind'],$slot==='opportunity'?['opportunity','business']:[$slot],true),422,'Referência incompatível com a escolha.');
|
||||
}
|
||||
foreach ($data['opportunity_choices'] ?? [] as $choice) {
|
||||
$ref = $this->reference($choice['source']);
|
||||
abort_unless($ref['kind'] === 'opportunity', 422);
|
||||
$record = Opportunity::findOrFail($ref['id']);
|
||||
app(InvestmentOpportunityChoices::class)->portfolioOrigins($choice['portfolio_origins'] ?? [], (int) $record->id);
|
||||
$key = $choice['corridor_key'] ?? app(InvestmentCorridorContext::class)->key($record);
|
||||
if (!empty($choice['territory'])) {
|
||||
$location = $this->reference($choice['territory']);
|
||||
abort_unless($location['kind'] === 'territory', 422);
|
||||
if ($key) abort_unless(app(InvestmentCorridorContext::class)->compatible($key, $location['id']), 422, 'A localização não pertence ao corredor escolhido.');
|
||||
}
|
||||
}
|
||||
if (isset($data['opportunity_choices'])) app(InvestmentOpportunityChoices::class)->resolve($data['opportunity_choices'], $this->state($case)['opportunity_choices'] ?? [], true);
|
||||
if (!empty($data['selection']['park'])) {
|
||||
$first=$data['opportunity_choices'][0] ?? null;
|
||||
$source=$first['source'] ?? $data['selection']['opportunity'] ?? null;
|
||||
if ($source && str_starts_with($source,'opportunity:')) {
|
||||
$key=$first['corridor_key'] ?? app(InvestmentCorridorContext::class)->key(Opportunity::findOrFail(substr($source,12)));
|
||||
if ($key) {
|
||||
$territory=$first['territory'] ?? $data['selection']['territory'] ?? null;
|
||||
$ids=app(InvestmentCorridorContext::class)->provinces($key);
|
||||
$territory=$territory ? substr($territory,10) : (count($ids)===1?$ids[0]->id:null);
|
||||
$park=$this->reference($data['selection']['park']);
|
||||
abort_unless($park['kind']==='park' && in_array($park['id'],array_column(app(InvestmentCorridorContext::class)->parks($key,$territory),'id'),true),422,'A zona ou parque não tem enquadramento compatível documentado nesta localização.');
|
||||
}
|
||||
}
|
||||
}
|
||||
return DB::transaction(function () use ($actor, $id, $data, $sequence, $entrySources) {
|
||||
$case = $this->desk->case($actor, $id, true, true);
|
||||
abort_if($case->closed_at || (int)$case->version !== (int)$data['version'], 409, 'O dossier mudou. Recupere os dados antes de continuar.');
|
||||
$payload = $this->desk->decode($case->payload);
|
||||
$previous = $payload['investor_path']['context_drafts'][(string)$actor->id] ?? [];
|
||||
abort_if(($previous['draft_sequence'] ?? 0) > $sequence, 409, 'Existe um rascunho mais recente. Recupere o dossier antes de continuar.');
|
||||
$payload['investor_path']['context_drafts'][(string)$actor->id] = [...$data, 'draft_sequence' => $sequence, 'entry_sources'=>array_values(array_unique([...($previous['entry_sources']??[]),...$entrySources]))];
|
||||
DB::table('desk_cases')->where('id', $id)->update(['payload' => $this->desk->encode($payload)]);
|
||||
return ['saved' => true];
|
||||
});
|
||||
}
|
||||
|
||||
public function installed(): bool
|
||||
{
|
||||
return Schema::hasTable('investor_navigation_preferences');
|
||||
@@ -51,6 +112,7 @@ final class InvestorContext
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($context['opportunity_choices']) && !array_key_exists('park', $context['opportunity_choices'][0])) $context['opportunity_choices'][0]['park'] = $context['selection']['park'] ?? null;
|
||||
$zone = $context['selection']['park'] ?? null;
|
||||
$context['fields']['investment_regime'] = $zone['fields']['investment_regime'] ?? 'general';
|
||||
$context['fields']['special_zone_id'] = $zone['id'] ?? '';
|
||||
@@ -60,6 +122,8 @@ final class InvestorContext
|
||||
|
||||
public function dependencyHash(array $selection): string
|
||||
{
|
||||
unset($selection['portfolio'], $selection['selection']['portfolio']);
|
||||
if (isset($selection['opportunity_choices'])) $selection['opportunity_choices'] = array_map(fn($choice)=>Arr::except($choice,['portfolio_origins']),$selection['opportunity_choices']);
|
||||
return hash('sha256', json_encode(Arr::sortRecursive($selection), JSON_THROW_ON_ERROR));
|
||||
}
|
||||
|
||||
@@ -105,6 +169,18 @@ final class InvestorContext
|
||||
if ($o->primary_territory_id) {
|
||||
$fields = [...$fields, ...$this->territoryFields($o->primary_territory_id)];
|
||||
}
|
||||
} elseif ($kind === 'portfolio') {
|
||||
abort_unless(Str::isUuid($id), 422);
|
||||
$dossier = \App\Http\Controllers\InvestmentPortfolioController::visible()->findOrFail($id);
|
||||
$title = $dossier->title;
|
||||
$href = '/carteira/'.$id;
|
||||
// Documentary coverage is not the investor's chosen implantation.
|
||||
$version = DB::table('investment_dossiers')->where('id', $id)->value('version_no');
|
||||
$fields = ['project_title' => $title, 'project_summary' => $dossier->content['description'] ?? $dossier->content['focus'] ?? ''];
|
||||
$state = 'documented_origin';
|
||||
$zoneAnalysis = ['source' => $dossier->source, 'documented_sector' => $dossier->content['sector'] ?? null,
|
||||
'documented_location' => $dossier->content['location'] ?? $dossier->content['region'] ?? null,
|
||||
'geography' => app(InvestmentRelations::class)->dossier($dossier), 'available_opportunity' => false];
|
||||
} elseif ($kind === 'business') {
|
||||
abort_unless(config('existing-business.enabled') && Str::isUuid($id), 404);
|
||||
$o = ExistingBusiness::published()->with('sector')->findOrFail($id);
|
||||
@@ -268,7 +344,7 @@ final class InvestorContext
|
||||
|
||||
private function input(array $input): array
|
||||
{
|
||||
abort_if(array_diff(array_keys($input), ['version', 'selection', 'declarations', 'replace_fields', 'preview_hash', 'operation_key', 'confirm', 'document_links', '_token']), 422, 'Campo de controlo desconhecido.');
|
||||
abort_if(array_diff(array_keys($input), ['complements', 'opportunity_choices', 'version', 'selection', 'declarations', 'replace_fields', 'preview_hash', 'operation_key', 'confirm', 'document_links', '_token']), 422, 'Campo de controlo desconhecido.');
|
||||
|
||||
abort_if(! app(PrivateInvestmentPreparation::class)->available() && (! empty($input['document_links']) || array_intersect(array_keys(is_array($input['declarations'] ?? null) ? $input['declarations'] : []), PrivateInvestmentPreparation::FIELDS)), 409, 'Esta preparação ainda não está disponível neste ambiente. As respostas foram preservadas.');
|
||||
|
||||
@@ -280,7 +356,18 @@ final class InvestorContext
|
||||
$inputRules['declarations.'.$question['key']] = isset($question['options']) ? ['nullable', Rule::in(array_keys($question['options']))] : ['nullable', 'regex:/^\d+(?:\.\d+)?$/D', 'numeric', 'min:0', 'max:999999999999999999'];
|
||||
}
|
||||
|
||||
return Validator::make($input, [...$inputRules, 'version' => 'required|integer|min:1', 'selection' => 'present|array:opportunity,sector,territory,park',
|
||||
return Validator::make($input, [...$inputRules,
|
||||
'complements' => 'sometimes|array|max:100', 'complements.*' => 'array:origin,code,target,territory_id',
|
||||
'complements.*.origin' => 'required|string|max:100', 'complements.*.code' => 'required|string|max:40',
|
||||
'complements.*.target' => 'nullable|string|max:100', 'complements.*.territory_id' => 'nullable|uuid',
|
||||
'opportunity_choices' => 'sometimes|array|max:100', 'opportunity_choices.*' => 'array:source,territory,location_reason,confirm_location_change,activities,corridor_key,portfolio_origins,park',
|
||||
'opportunity_choices.*.portfolio_origins' => 'sometimes|array|max:100', 'opportunity_choices.*.portfolio_origins.*' => 'uuid',
|
||||
'opportunity_choices.*.corridor_key' => ['sometimes', 'nullable', Rule::in(array_keys(config('investment_corridors')))],
|
||||
'opportunity_choices.*.activities' => 'sometimes|array', 'opportunity_choices.*.activities.*' => 'string|distinct|in:production,processing,trade,transport,water,forestry,animal',
|
||||
'opportunity_choices.*.park' => 'sometimes|nullable|string|max:100',
|
||||
'opportunity_choices.*.source' => 'required|string|distinct|max:100', 'opportunity_choices.*.territory' => 'nullable|string|max:100',
|
||||
'opportunity_choices.*.location_reason' => 'nullable|string|max:2000', 'opportunity_choices.*.confirm_location_change' => 'sometimes|boolean',
|
||||
'version' => 'required|integer|min:1', 'selection' => 'present|array:portfolio,opportunity,sector,territory,park',
|
||||
'selection.*' => 'nullable|string|max:100', 'declarations' => 'nullable|array:project_title,project_summary,currency,expected_start_date,investor_origin,person_type,entity_stage,tax_residency_country,fiscal_residency_country,project_type,maturity_stage,'.implode(',', PrivateInvestmentPreparation::FIELDS), 'declarations.project_title' => 'nullable|string|max:200', 'declarations.project_summary' => 'nullable|string|max:5000',
|
||||
'declarations.currency' => 'nullable|regex:/^[A-Z]{3}$/', 'declarations.expected_start_date' => 'nullable|date_format:Y-m-d', 'declarations.investor_origin' => 'nullable|in:national,foreign,mixed', 'declarations.person_type' => 'nullable|in:singular,collective,sole_trader,consortium', 'declarations.entity_stage' => 'nullable|in:existing,being_formed', 'declarations.tax_residency_country' => ['nullable', 'string', app(CountryCatalogue::class)->rule()], 'declarations.fiscal_residency_country' => ['nullable', 'string', app(CountryCatalogue::class)->rule()], 'declarations.project_type' => 'nullable|string|max:100', 'declarations.maturity_stage' => 'nullable|string|max:100',
|
||||
'replace_fields' => 'nullable|array', 'replace_fields.*' => 'string|in:'.implode(',', self::FIELDS)])->validate();
|
||||
@@ -294,6 +381,7 @@ final class InvestorContext
|
||||
abort_unless((int) $case->version === $data['version'], 409, 'O dossier mudou; recupere a versão atual.');
|
||||
app(InvestorPath::class)->view($actor, $id);
|
||||
$old = $this->state($case);
|
||||
$complements = array_key_exists('complements', $data) ? app(InvestmentComplements::class)->resolve($data['complements'], $old['complements'] ?? []) : ($old['complements'] ?? []);
|
||||
$links = $old['preparation_documents'] ?? [];
|
||||
foreach ($data['document_links'] ?? [] as $key => $document) {
|
||||
if ($document) {
|
||||
@@ -303,7 +391,31 @@ final class InvestorContext
|
||||
unset($links[$key]);
|
||||
}
|
||||
}
|
||||
$choices = $old['opportunity_choices'] ?? [];
|
||||
if (! array_key_exists('opportunity_choices', $data) && array_key_exists('territory', $data['selection'])) {
|
||||
$source = $data['selection']['opportunity'] ?? ($old['selection']['opportunity']['key'] ?? null);
|
||||
if ($source && str_starts_with($source, 'opportunity:')) {
|
||||
$documented = Opportunity::findOrFail(substr($source, 12))->primary_territory_id;
|
||||
abort_if($documented && $data['selection']['territory'] !== 'territory:'.$documented, 422,
|
||||
'Confirme a alternativa territorial por ficha e indique o motivo; a localização documentada foi preservada.');
|
||||
}
|
||||
}
|
||||
if (array_key_exists('opportunity_choices', $data)) {
|
||||
$choices = app(InvestmentOpportunityChoices::class)->resolve($data['opportunity_choices'], $choices);
|
||||
$data['selection']['opportunity'] = $choices[0]['opportunity']['key'] ?? null;
|
||||
// Shared fields concern the first identified opportunity; other sites remain separate.
|
||||
$data['selection']['territory'] = $choices[0]['territory']['key'] ?? null;
|
||||
if (array_key_exists('park', $data['opportunity_choices'][0] ?? [])) $data['selection']['park'] = $choices[0]['park']['key'] ?? null;
|
||||
} elseif (array_key_exists('opportunity', $data['selection']) && $choices !== []) {
|
||||
abort(422, 'Actualize a selecção identificada de oportunidades; não substitua silenciosamente o conjunto por uma ficha.');
|
||||
}
|
||||
$selection = $old['selection'];
|
||||
foreach ($complements as $complement) {
|
||||
if (($complement['availability'] ?? '') === 'review_required') continue;
|
||||
foreach ([$complement['origin']['key'], $complement['target']['key'] ?? ''] as $key) {
|
||||
if (str_starts_with($key, 'opportunity:')) abort_unless(in_array($key, array_column(array_column($choices, 'opportunity'), 'key'), true), 422, 'Conserve a oportunidade escolhida ou retire explicitamente a sua relação complementar.');
|
||||
}
|
||||
}
|
||||
foreach ($data['selection'] as $slot => $key) {
|
||||
if ($key === null || $key === '') {
|
||||
unset($selection[$slot]);
|
||||
@@ -315,6 +427,16 @@ final class InvestorContext
|
||||
abort_unless(in_array($ref['kind'], $expected, true), 422, 'Referência incompatível com a dimensão.');
|
||||
$selection[$slot] = $ref;
|
||||
}
|
||||
$corridor = $choices[0]['corridor_key'] ?? (isset($selection['opportunity']) && $selection['opportunity']['kind'] === 'opportunity'
|
||||
? app(InvestmentCorridorContext::class)->key(Opportunity::findOrFail($selection['opportunity']['id'])) : null);
|
||||
if ($corridor && isset($selection['territory'])) abort_unless(app(InvestmentCorridorContext::class)->compatible($corridor, $selection['territory']['id']), 422, 'A localização não pertence ao corredor escolhido.');
|
||||
if ($corridor && isset($selection['park'])) {
|
||||
$eligible = array_column(app(InvestmentCorridorContext::class)->parks($corridor, $selection['territory']['id'] ?? null), 'id');
|
||||
if (!in_array($selection['park']['id'], $eligible, true)) {
|
||||
abort_if(!empty($data['selection']['park']), 422, 'A zona ou parque não tem enquadramento compatível documentado nesta localização.');
|
||||
unset($selection['park']);
|
||||
}
|
||||
}
|
||||
// A new opportunity may propose its explicitly stored sector; it never matches names.
|
||||
if (isset($data['selection']['opportunity']) && ! array_key_exists('sector', $data['selection']) && isset($selection['opportunity']['fields']['sector_id'])) {
|
||||
if (Sector::where('is_active', true)->whereKey($selection['opportunity']['fields']['sector_id'])->exists()) {
|
||||
@@ -323,7 +445,7 @@ final class InvestorContext
|
||||
}
|
||||
$proposed = [];
|
||||
$origins = [];
|
||||
foreach (['opportunity', 'sector', 'park', 'territory'] as $slot) {
|
||||
foreach (['portfolio', 'opportunity', 'sector', 'park', 'territory'] as $slot) {
|
||||
if (in_array($slot, ['park', 'territory'], true) && array_intersect(array_keys($selection[$slot]['fields'] ?? []), array_keys(InvestmentGeography::FIELDS))) {
|
||||
foreach (['province_id', 'district_id', 'admin_post_id', 'locality_id', 'province', 'district', 'location'] as $key) {
|
||||
unset($proposed[$key],$origins[$key]);
|
||||
@@ -359,22 +481,37 @@ final class InvestorContext
|
||||
unset($fields[$key],$provenance[$key]);
|
||||
}
|
||||
}
|
||||
if ($corridor) {
|
||||
foreach (['province_id','district_id','admin_post_id','locality_id','province','district','location'] as $key) {
|
||||
if (isset($selection['territory']['fields'][$key])) {
|
||||
$fields[$key]=(string)$selection['territory']['fields'][$key];
|
||||
$provenance[$key]=Arr::except($selection['territory'],['fields']);
|
||||
} else unset($fields[$key],$provenance[$key]);
|
||||
}
|
||||
$fields['special_zone_id']=$selection['park']['id']??'';
|
||||
$fields['investment_regime']=$selection['park']['fields']['investment_regime']??'general';
|
||||
}
|
||||
$replaced = [];
|
||||
foreach (array_unique([...array_keys($old['fields']), ...array_keys($fields)]) as $key) {
|
||||
if (($old['fields'][$key] ?? null) !== ($fields[$key] ?? null)) {
|
||||
$replaced[] = ['field' => $key, 'before' => $old['fields'][$key] ?? null, 'after' => $fields[$key] ?? null];
|
||||
}
|
||||
}
|
||||
foreach (['opportunity', 'sector', 'territory', 'park'] as $slot) {
|
||||
foreach (['portfolio', 'opportunity', 'sector', 'territory', 'park'] as $slot) {
|
||||
if (($old['selection'][$slot] ?? null) !== ($selection[$slot] ?? null)) {
|
||||
$changed[] = $slot;
|
||||
}
|
||||
}
|
||||
$changedFields = array_column($replaced, 'field');
|
||||
if ($complements !== ($old['complements'] ?? [])) $changed[] = 'complements';
|
||||
$choicesChanged = $choices !== ($old['opportunity_choices'] ?? []);
|
||||
$choiceInputsChanged = array_map(fn($c)=>Arr::except($c,['portfolio_origins']),$choices) !== array_map(fn($c)=>Arr::except($c,['portfolio_origins']),$old['opportunity_choices']??[]);
|
||||
if ($choiceInputsChanged) $changed = array_values(array_unique([...$changed, 'opportunity', 'territory']));
|
||||
elseif ($choicesChanged) $changed[] = 'portfolio_origins';
|
||||
$conditionsChanged = (bool) array_intersect($changedFields, array_diff(self::FIELDS, ['project_title', 'project_summary']));
|
||||
$dependencyChanged = $this->dependencyHash($old['selection']) !== $this->dependencyHash($selection) || $conditionsChanged;
|
||||
$dependencyChanged = $choiceInputsChanged || in_array('complements', $changed, true) || $this->dependencyHash($old['selection']) !== $this->dependencyHash($selection) || $conditionsChanged;
|
||||
$privateConditionsChanged = (bool) array_intersect($changedFields, PrivateInvestmentPreparation::FIELDS);
|
||||
$calculationInputsChanged = $this->dependencyHash($old['selection']) !== $this->dependencyHash($selection) || (bool) array_intersect($changedFields, array_diff(self::FIELDS, ['project_title', 'project_summary', ...array_diff(PrivateInvestmentPreparation::FIELDS, ['total_investment', 'area_required', 'area_unit'])]));
|
||||
$calculationInputsChanged = $choiceInputsChanged || $this->dependencyHash($old['selection']) !== $this->dependencyHash($selection) || (bool) array_intersect($changedFields, array_diff(self::FIELDS, ['project_title', 'project_summary', ...array_diff(PrivateInvestmentPreparation::FIELDS, ['total_investment', 'area_required', 'area_unit'])]));
|
||||
$payload = $this->desk->decode($case->payload);
|
||||
$results = $payload['investor_path']['results'] ?? [];
|
||||
$requests = DB::table('desk_requests')->where('case_id', $id)->orderBy('id')->get(['id', 'status', 'protocol', 'version'])->all();
|
||||
@@ -385,6 +522,7 @@ final class InvestorContext
|
||||
if ($privateConditionsChanged) {
|
||||
$steps = array_values(array_unique([...$steps, 'S02', 'S05', 'S06', 'S07']));
|
||||
}
|
||||
if (in_array('complements', $changed, true)) $steps = array_values(array_unique([...$steps, 'S02', 'S08']));
|
||||
$privatePreparation = null;
|
||||
if (app(PrivateInvestmentPreparation::class)->available()) {
|
||||
$docs = $this->preparationDocuments($id);
|
||||
@@ -392,11 +530,12 @@ final class InvestorContext
|
||||
$afterPreparation = app(PrivateInvestmentPreparation::class)->assess(['fields' => $fields, 'selection' => $selection, 'preparation_documents' => $links], $docs);
|
||||
$privatePreparation = ['before' => $beforePreparation, 'after' => $afterPreparation];
|
||||
}
|
||||
$plan = ['case_id' => $id, 'version' => (int) $case->version, 'revision' => (int) $old['revision'], 'selection' => $selection, 'fields' => $fields, 'provenance' => $provenance,
|
||||
$plan = ['complements' => $complements, 'opportunity_choices' => $choices, 'case_id' => $id, 'version' => (int) $case->version, 'revision' => (int) $old['revision'], 'selection' => $selection, 'fields' => $fields, 'provenance' => $provenance,
|
||||
'preparation_documents' => $links, 'private_investment' => $privatePreparation,
|
||||
'updated' => $replaced, 'maintained' => $kept, 'changed_dimensions' => $changed, 'dependent_results' => (int) $case->user_id === $actor->id && $calculationInputsChanged ? array_map(fn ($r) => ['id' => $r['id'], 'engine' => $r['engine']], $results) : [],
|
||||
'requests' => $requests, 'review_steps' => $steps, 'dependency_changed' => $dependencyChanged, 'calculation_inputs_changed' => $calculationInputsChanged, 'documents_preserved' => DB::table('desk_documents')->where('case_id', $id)->count(),
|
||||
'notice' => 'Não confirma incentivos, licenças, disponibilidade de terra, reserva ou autorização. Submissões e decisões anteriores mantêm o conteúdo enviado.'];
|
||||
$plan['requirements_assessment'] = app(InvestmentContextRequirements::class)->assess(['opportunity_choices' => $choices, 'fields' => $fields]);
|
||||
$hash = hash_hmac('sha256', json_encode(Arr::sortRecursive([$actor->id, $data, $plan]), JSON_THROW_ON_ERROR), config('app.key'));
|
||||
|
||||
return [...$plan, 'preview_hash' => $hash];
|
||||
@@ -435,14 +574,17 @@ final class InvestorContext
|
||||
foreach ($plan['review_steps'] as $step) {
|
||||
$review[$step] = ['revision' => $revision, 'reason' => 'O contexto mudou; reveja os pressupostos e a evidência aplicável.'];
|
||||
}
|
||||
$context = ['preparation_documents' => $plan['preparation_documents'], 'preparation_snapshot' => $plan['private_investment']['after'] ?? $before['preparation_snapshot'] ?? null, 'revision' => $revision, 'selection' => $plan['selection'], 'fields' => $plan['fields'], 'provenance' => $plan['provenance'], 'review_steps' => $review,
|
||||
'dependency_hash' => $this->dependencyHash(['selection' => $plan['selection'], 'fields' => Arr::except($plan['fields'], ['project_title', 'project_summary'])]), 'updated_at' => now()->toIso8601String(), 'updated_by' => $actor->id];
|
||||
$context = ['opportunity_choices' => $plan['opportunity_choices'], 'preparation_documents' => $plan['preparation_documents'], 'preparation_snapshot' => $plan['private_investment']['after'] ?? $before['preparation_snapshot'] ?? null, 'revision' => $revision, 'selection' => $plan['selection'], 'fields' => $plan['fields'], 'provenance' => $plan['provenance'], 'review_steps' => $review,
|
||||
'dependency_hash' => $this->dependencyHash([...($plan['opportunity_choices'] !== [] ? ['opportunity_choices' => $plan['opportunity_choices']] : []), ...($plan['complements'] ? ['complements' => $plan['complements']] : []), 'selection' => $plan['selection'], 'fields' => Arr::except($plan['fields'], ['project_title', 'project_summary'])]), 'updated_at' => now()->toIso8601String(), 'updated_by' => $actor->id];
|
||||
$context['requirements_assessment'] = $plan['requirements_assessment'];
|
||||
$context['complements'] = $plan['complements'];
|
||||
if ($plan['calculation_inputs_changed']) {
|
||||
foreach ($payload['investor_path']['results'] ?? [] as $i => $r) {
|
||||
$payload['investor_path']['results'][$i] = [...$r, 'context_state' => 'review_required', 'context_invalidated_revision' => $revision, 'context_invalidated_at' => now()->toIso8601String()];
|
||||
}
|
||||
}
|
||||
$payload['investor_path']['context'] = $context;
|
||||
unset($payload['investor_path']['context_drafts'][(string)$actor->id]);
|
||||
DB::table('desk_cases')->where('id', $id)->update(['payload' => $this->desk->encode($payload), 'title' => $context['fields']['project_title'] ?? $case->title, 'version' => $case->version + 1, 'updated_at' => now()]);
|
||||
$this->desk->event($this->desk->case($actor, $id), $actor, 'investment_context_changed', ['before' => $before, 'after' => $context, 'affected_result_ids' => array_column($plan['dependent_results'], 'id'), 'preserved_request_ids' => array_column($plan['requests'], 'id')]);
|
||||
$result = ['case_id' => $id, 'version' => (int) $case->version + 1, 'revision' => $revision, 'replayed' => false];
|
||||
@@ -452,12 +594,13 @@ final class InvestorContext
|
||||
}, 3);
|
||||
}
|
||||
|
||||
public function view(User $actor, string $id): array
|
||||
public function view(User $actor, string $id, ?string $opportunity = null): array
|
||||
{
|
||||
$case = $this->desk->case($actor, $id);
|
||||
abort_unless($this->desk->owns($actor, $case, false) || $actor->can('manage-portal'), 403);
|
||||
$ctx = $this->state($case);
|
||||
$path = app(InvestorPath::class)->view($actor, $id);
|
||||
$ctx['land_preparation'] = $this->landPreparation($case, $opportunity);
|
||||
$path = app(InvestorPath::class)->view($actor, $id, $opportunity);
|
||||
$ctx['path_applicability'] = ['definition_id' => $path['definition_id'], 'definition_version' => $path['definition_version'], 'source_sha256' => $path['source_sha256'],
|
||||
'steps' => array_values(array_map(fn ($step) => Arr::only($step, ['code', 'title', 'applicability', 'reason', 'state', 'context_review_required']), array_filter($path['steps'], fn ($step) => ! empty($step['branch']))))];
|
||||
|
||||
@@ -472,12 +615,19 @@ final class InvestorContext
|
||||
}
|
||||
}
|
||||
|
||||
$preparation = app(PrivateInvestmentPreparation::class)->available() ? app(PrivateInvestmentPreparation::class)->assess($ctx, $this->preparationDocuments($id)) : null;
|
||||
$preparation = app(PrivateInvestmentPreparation::class)->available() ? app(PrivateInvestmentPreparation::class)->assess(app(InvestmentConsumerScope::class)->context($ctx, $opportunity), $this->preparationDocuments($id)) : null;
|
||||
$ctx['preparation_assessment'] = $preparation;
|
||||
|
||||
$prefill = $this->prefill($ctx, $opportunity);
|
||||
$saved = $this->desk->decode($case->payload);
|
||||
if (!empty($saved['reuse_consent'])) {
|
||||
$contacts = array_filter(['email' => $saved['email'] ?? null, 'phone' => $saved['profile']['phone'] ?? null], fn($v) => is_string($v) && $v !== '');
|
||||
$prefill['simulator'] = [...$contacts, ...$prefill['simulator']];
|
||||
$prefill['land'] = [...$contacts, ...(!empty($saved['name']) ? ['full_name' => $saved['name']] : []), ...$prefill['land']];
|
||||
}
|
||||
return ['private_investment' => $preparation, 'preparation_documents' => $this->preparationDocuments($id), 'simulator_context_revision' => $simulatorRevision, 'case' => $path['case'], 'context' => $ctx, 'steps' => array_map(fn ($s) => Arr::only($s, ['code', 'title', 'state', 'context_review_required']), $path['steps']),
|
||||
'can_write' => $path['canWrite'], 'next' => $path['next'], 'results' => $path['results'], 'requests' => $path['requests'],
|
||||
'prefill' => $this->prefill($ctx), 'notice' => 'A seleção apoia a preparação e não confirma benefícios, licenças, direitos ou disponibilidade.'];
|
||||
'prefill' => $prefill, 'notice' => 'A seleção apoia a preparação e não confirma benefícios, licenças, direitos ou disponibilidade.'];
|
||||
}
|
||||
|
||||
public function preparationDocuments(string $id): array
|
||||
@@ -485,21 +635,57 @@ final class InvestorContext
|
||||
return DB::table('desk_documents as l')->join('documents as d', 'd.id', '=', 'l.document_id')->where('l.case_id', $id)->whereNull('d.deleted_at')->get(['l.id', 'l.document_id', 'd.file_name', 'd.status', 'd.malware_scan_status', 'd.version_no', 'd.sha256'])->map(fn ($row) => (array) $row)->all();
|
||||
}
|
||||
|
||||
public function prefill(array $ctx): array
|
||||
public function landPreparation(\stdClass $case, ?string $opportunity = null): array
|
||||
{
|
||||
$payload = $this->desk->decode($case->payload);
|
||||
$ctx = $this->state($case);
|
||||
$key = app(InvestmentConsumerScope::class)->key($ctx, $opportunity);
|
||||
$path = $payload['investor_path'] ?? [];
|
||||
$need = app(InvestmentConsumerScope::class)->facts($payload, $ctx, $key)['land_needed'];
|
||||
|
||||
return ['need' => in_array($need, ['yes', 'no'], true) ? $need : 'unknown', 'reason' => $key ? ($path['opportunity_fact_reasons'][$key]['land_needed'] ?? '') : ($path['fact_reasons']['land_needed'] ?? '')];
|
||||
}
|
||||
|
||||
public function prefill(array $ctx, ?string $opportunity = null): array
|
||||
{
|
||||
$original = $ctx;
|
||||
$ctx = app(InvestmentConsumerScope::class)->context($ctx, $opportunity);
|
||||
$f = $ctx['fields'];
|
||||
$sim = Arr::except(Arr::only($f, self::FIELDS), ['sector', 'province', 'district', 'location', ...array_diff(PrivateInvestmentPreparation::FIELDS, ['total_investment', 'area_required', 'area_unit'])]);
|
||||
// Entering this tool from an investment dossier selects the existing investment-analysis route.
|
||||
// The reconciliation preserves any purpose deliberately chosen in an existing simulator draft.
|
||||
$sim += ['journey_type' => 'investor', 'journey_type_label' => 'Avaliar o meu investimento', 'purpose' => 'simulate_only', 'purpose_label' => 'Apenas simular'];
|
||||
if (($ctx['land_preparation']['need'] ?? null) === 'yes') {
|
||||
$tenure = ['duat' => ['duat', 'DUAT'], 'lease' => ['leased', 'Arrendado']][$f['site_tenure'] ?? ''] ?? null;
|
||||
if ($tenure) [$sim['land_status'], $sim['land_status_label']] = $tenure;
|
||||
}
|
||||
// Human labels travel with the exact existing identifiers, not inferred locations.
|
||||
foreach (app(InvestmentGeography::class)->publicReferences()->whereIn('id', array_values(Arr::only($f, array_keys(InvestmentGeography::FIELDS))))->get(['id', 'name']) as $place) {
|
||||
foreach (array_keys(InvestmentGeography::FIELDS) as $key) {
|
||||
if (($f[$key] ?? null) === $place->id) $sim[$key.'_label'] = $place->name;
|
||||
}
|
||||
}
|
||||
if (! empty($f['sector_id']) && ($sector = Sector::where('is_active', true)->find($f['sector_id']))) $sim['sector_id_label'] = $sector->name;
|
||||
$zone = $ctx['selection']['park'] ?? null;
|
||||
$sim['context_applicability_snapshot'] = json_encode([
|
||||
'version' => 1, 'context_revision' => $ctx['revision'],
|
||||
'consumer_opportunity' => $ctx['consumer_opportunity']['opportunity']['key'] ?? null,
|
||||
'portfolio_origin' => $ctx['selection']['portfolio'] ?? null,
|
||||
'zone' => $zone ? Arr::only($zone, ['id', 'title', 'href', 'version', 'sha256', 'fields', 'analysis']) : null,
|
||||
'provenance' => $ctx['provenance'],
|
||||
'opportunity_choices' => $ctx['opportunity_choices'] ?? [],
|
||||
'complements' => $ctx['complements'] ?? [],
|
||||
'requirements_assessment' => $ctx['requirements_assessment'] ?? null,
|
||||
'path' => $ctx['path_applicability'] ?? null,
|
||||
'land_preparation' => $ctx['land_preparation'] ?? null,
|
||||
'field_provenance' => array_map(fn($origin) => Arr::only($origin, ['kind', 'title', 'version', 'context_revision']), $ctx['provenance'] ?? []),
|
||||
'preparation' => isset($ctx['preparation_assessment']) ? Arr::except($ctx['preparation_assessment'], ['questions']) : null,
|
||||
'fields' => Arr::only($f, ['investor_origin', 'tax_residency_country', 'entity_stage', 'currency', 'expected_start_date', 'investment_regime']),
|
||||
'notice' => 'Referências e declarações para preparação; sem reconhecimento automático de elegibilidade ou benefício.',
|
||||
], JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);
|
||||
|
||||
$scoped = app(InvestmentConsumerScope::class)->context($original, $opportunity);
|
||||
$f = $scoped['fields'];
|
||||
return ['simulator' => $sim, 'land' => array_filter(['project_reference' => $f['project_title'] ?? null, 'activity' => $f['sector'] ?? null, 'purpose' => $f['project_summary'] ?? null, 'parcels' => [Arr::only($f, array_keys(InvestmentGeography::FIELDS))]], fn ($v) => $v !== null),
|
||||
'desk' => array_filter(['title' => $f['project_title'] ?? null, 'territory_id' => $f['locality_id'] ?? $f['admin_post_id'] ?? $f['district_id'] ?? $f['province_id'] ?? null, 'location_source' => isset($f['province_id']) ? 'Referência consultada no contexto v'.($ctx['revision'] ?? 0).': '.($f['location'] ?? 'território identificado').'. Não confirma disponibilidade.' : null, 'description' => $f['project_summary'] ?? null, 'sector' => $f['sector'] ?? null, ...Arr::only($f, array_keys(InvestmentGeography::FIELDS))], fn ($v) => $v !== null),
|
||||
'submission' => array_filter(['currency' => $f['currency'] ?? null, 'sector' => $f['sector'] ?? null, 'objective' => $f['project_summary'] ?? null, 'location' => $f['location'] ?? null], fn ($v) => $v !== null)];
|
||||
|
||||
@@ -68,7 +68,7 @@ final class InvestorPath
|
||||
}
|
||||
|
||||
/** @return array<string,mixed> */
|
||||
public function view(User $actor, string $id): array
|
||||
public function view(User $actor, string $id, ?string $opportunity = null): array
|
||||
{
|
||||
abort_unless($this->available(), 404);
|
||||
$case = $this->desk->case($actor, $id);
|
||||
@@ -79,18 +79,26 @@ final class InvestorPath
|
||||
$payload = $this->desk->decode($case->payload);
|
||||
$path = $payload['investor_path'] ?? [];
|
||||
$context = app(InvestorContext::class)->state($case);
|
||||
$facts = $path['facts'] ?? ['land_needed' => 'unknown', 'external_funding' => 'unknown', 'viability' => 'unknown'];
|
||||
$scope = app(InvestmentConsumerScope::class);
|
||||
$opportunity = $scope->key($context, $opportunity);
|
||||
$allChoices = $context['opportunity_choices'] ?? [];
|
||||
$facts = $scope->facts($payload, $context, $opportunity);
|
||||
$factReasons = $opportunity ? ($path['opportunity_fact_reasons'][$opportunity] ?? []) : ($path['fact_reasons'] ?? []);
|
||||
$context = $scope->context($context, $opportunity);
|
||||
$records = DB::table('journey_steps')->where('journey_id', $journey->id)->whereNull('deleted_at')->get()->keyBy('step_code');
|
||||
$steps = [];
|
||||
foreach ($definition['steps'] as $step) {
|
||||
$row = $records->get($step['code']);
|
||||
abort_unless($row !== null, 409, 'Etapa em falta; reparar a instalação sem reconstruir o histórico.');
|
||||
$detail = $this->desk->decode($row->path_detail);
|
||||
if ($opportunity && (count($allChoices) > 1 || isset($detail['opportunities'][$opportunity]))) {
|
||||
$detail = $detail['opportunities'][$opportunity] ?? ['state' => 'not_started'];
|
||||
}
|
||||
$value = $step['branch'] ? ($facts[$step['branch']] ?? 'unknown') : 'yes';
|
||||
$applicable = $value === 'unknown' ? 'undetermined' : ($value === 'no' ? 'not_needed_for_preparation' : 'applicable');
|
||||
$state = $value === 'no' ? 'dispensed' : $detail['state'];
|
||||
$steps[] = [...$step, 'id' => $row->id, 'version' => $row->version_no, 'state' => $state, 'saved_state' => $detail['state'],
|
||||
'applicability' => $applicable, 'reason' => $value === 'no' ? ($path['fact_reasons'][$step['branch']] ?? '') : ($detail['reason'] ?? ''),
|
||||
'applicability' => $applicable, 'reason' => $value === 'no' ? ($factReasons[$step['branch']] ?? '') : ($detail['reason'] ?? ''),
|
||||
'detail' => $detail, 'preparation_allowed' => $value !== 'no',
|
||||
'action_gaps' => []];
|
||||
}
|
||||
@@ -143,7 +151,8 @@ final class InvestorPath
|
||||
|
||||
$landCase = (int) $case->user_id === $actor->id
|
||||
? LandAssistanceCase::where('user_id', $actor->id)->latest('updated_at')->get()
|
||||
->first(fn ($land) => ($land->payload['investor_path_case_id'] ?? null) === $id) : null;
|
||||
->first(fn ($land) => ($land->payload['investor_path_case_id'] ?? null) === $id
|
||||
&& (!$allChoices || ($opportunity && ($land->payload['context_opportunity'] ?? null) === $opportunity))) : null;
|
||||
|
||||
$preparation = ($owner || $manager) && app(PrivateInvestmentPreparation::class)->available() ? app(PrivateInvestmentPreparation::class)->assess($context, $documents->map(fn ($d) => (array) $d)->all()) : null;
|
||||
if ($preparation && $preparation['enabled']) {
|
||||
@@ -152,11 +161,12 @@ final class InvestorPath
|
||||
|
||||
return ['private_investment' => $preparation, 'case' => ['id' => $id, 'title' => $case->title, 'version' => $case->version, 'closed' => $case->closed_at !== null],
|
||||
'journey_id' => $journey->id, 'definition_id' => $version->id, 'definition_version' => $version->version_no, 'source_sha256' => $definition['source_sha256'],
|
||||
'phases' => $definition['phases'], 'steps' => $steps, 'facts' => $facts, 'fact_reasons' => $path['fact_reasons'] ?? [],
|
||||
'phases' => $definition['phases'], 'steps' => $steps, 'facts' => $facts, 'fact_reasons' => $factReasons,
|
||||
'context_opportunity' => $opportunity, 'opportunity_options' => $allChoices,
|
||||
'fintech' => ($owner || $manager) && (isset($path['fintech']) || collect($path['sector_contexts'] ?? [])->contains(fn ($s) => in_array($s['slug'], ['fintech', 'tecnologias-de-informacao', 'mercado-financeiro'], true)) || collect($path['content_sources'] ?? [])->contains('return_href', '/tech-fintech')) ? app(FintechInvestment::class)->view($payload, $steps) : null,
|
||||
'canWrite' => $owner && ! $case->closed_at, 'canReview' => $manager && (int) $case->user_id !== $actor->id && ! $case->closed_at,
|
||||
'next' => $next ? ['code' => $next['code'], 'title' => $next['title'], 'action' => 'Preparar', 'href' => $next['href'] ?? '#'.$next['code']] : null,
|
||||
'investment_context' => ($owner || $manager) ? $context : null,
|
||||
'investment_context' => ($owner || $manager) ? [...$context, 'opportunity_choices' => $opportunity ? $context['opportunity_choices'] : $allChoices] : null,
|
||||
'results' => $results, 'requests' => $requests, 'documents' => $documents,
|
||||
'zone_contexts' => ($owner || $manager) ? ($path['zone_contexts'] ?? []) : [],
|
||||
'sector_contexts' => ($owner || $manager) ? ($path['sector_contexts'] ?? []) : [],
|
||||
@@ -167,25 +177,31 @@ final class InvestorPath
|
||||
->get(['id', 'title', 'status', 'version_no', 'due_at', 'assignee_user_id']),
|
||||
'services' => DB::table('desk_service_versions')->where('status', 'published')->orderByDesc('version')->get(['id', 'code', 'definition'])
|
||||
->unique('code')->values()->map(fn ($s) => ['id' => $s->id, 'title' => json_decode($s->definition, true)['title']]),
|
||||
'tools' => ['simulator' => (int) $case->user_id === $actor->id ? '/simulador-fiscal?context='.$id.($case->simulation_id ? '&draft='.$case->simulation_id : '') : null,
|
||||
'desk' => '/balcao-virtual/dossiers/'.$id, 'guidance' => '/balcao-virtual/dossiers/'.$id.'/orientacao',
|
||||
'tools' => ['simulator' => (int) $case->user_id === $actor->id ? '/simulador-fiscal?context='.$id.($case->simulation_id ? '&draft='.$case->simulation_id : '').($opportunity ? '&opportunity='.urlencode($opportunity) : '') : null,
|
||||
'desk' => '/balcao-virtual/dossiers/'.$id.($opportunity ? '?opportunity='.urlencode($opportunity) : ''), 'guidance' => '/balcao-virtual/dossiers/'.$id.'/orientacao',
|
||||
'library' => '/documentos?context='.$id, 'opportunities' => '/oportunidades?context='.$id, 'territory' => '/zonas?context='.$id, 'partners' => '/parcerias/painel?context='.$id,
|
||||
'land' => (int) $case->user_id === $actor->id ? ($landCase ? '/investidor/terra-duat/'.$landCase->id : '/investidor/terra-duat/novo?context='.$id) : null]];
|
||||
'land' => ($facts['land_needed'] ?? 'unknown') !== 'no' && (int) $case->user_id === $actor->id ? ($landCase ? '/investidor/terra-duat/'.$landCase->id : '/investidor/terra-duat/novo?context='.$id.($opportunity ? '&opportunity='.urlencode($opportunity) : '')) : null]];
|
||||
}
|
||||
|
||||
/** @param array<string,mixed> $input */
|
||||
public function facts(User $actor, string $id, array $input): void
|
||||
{
|
||||
$data = Validator::make($input, ['version' => 'required|integer|min:1',
|
||||
$data = Validator::make($input, ['version' => 'required|integer|min:1', 'context_opportunity' => 'nullable|string|max:100',
|
||||
'land_needed' => ['required', Rule::in(['yes', 'no', 'unknown'])], 'external_funding' => ['required', Rule::in(['yes', 'no', 'unknown'])],
|
||||
'viability' => ['required', Rule::in(['unknown', 'proceed', 'reformulate', 'archive'])],
|
||||
'reason' => 'required|string|min:3|max:3000'])->validate();
|
||||
DB::transaction(function () use ($actor, $id, $data): void {
|
||||
$case = $this->writable($actor, $id, $data['version']);
|
||||
$payload = $this->desk->decode($case->payload);
|
||||
$choice = app(InvestmentConsumerScope::class)->key(app(InvestorContext::class)->state($case), $data['context_opportunity'] ?? null, true);
|
||||
foreach (['land_needed', 'external_funding', 'viability'] as $key) {
|
||||
$payload['investor_path']['facts'][$key] = $data[$key];
|
||||
$payload['investor_path']['fact_reasons'][$key] = $data['reason'];
|
||||
if ($choice) {
|
||||
$payload['investor_path']['opportunity_facts'][$choice][$key] = $data[$key];
|
||||
$payload['investor_path']['opportunity_fact_reasons'][$choice][$key] = $data['reason'];
|
||||
} else {
|
||||
$payload['investor_path']['facts'][$key] = $data[$key];
|
||||
$payload['investor_path']['fact_reasons'][$key] = $data['reason'];
|
||||
}
|
||||
}
|
||||
$this->savePayload($case, $payload);
|
||||
$this->desk->event($this->desk->case($actor, $id), $actor, 'path_applicability_declared', $data);
|
||||
@@ -195,7 +211,7 @@ final class InvestorPath
|
||||
/** @param array<string,mixed> $input */
|
||||
public function stage(User $actor, string $id, string $code, array $input): void
|
||||
{
|
||||
$data = Validator::make($input, ['version' => 'required|integer|min:1', 'state' => ['required', Rule::in(array_diff(InvestorPathDefinition::STATES, ['dispensed']))],
|
||||
$data = Validator::make($input, ['version' => 'required|integer|min:1', 'context_opportunity' => 'nullable|string|max:100', 'state' => ['required', Rule::in(array_diff(InvestorPathDefinition::STATES, ['dispensed']))],
|
||||
'reason' => 'required|string|min:3|max:3000', 'action' => ['required', Rule::in(['prepare', 'submit', 'execute', 'operate', 'review', 'record_external'])],
|
||||
'document_id' => 'nullable|uuid', 'authority' => 'nullable|string|max:200', 'reference' => 'nullable|string|max:300',
|
||||
'context_revision' => 'nullable|integer|min:0', 'context_reviewed' => 'nullable|boolean', 'decision_date' => 'nullable|date_format:Y-m-d|before_or_equal:today'])->validate();
|
||||
@@ -203,7 +219,8 @@ final class InvestorPath
|
||||
$case = $this->desk->case($actor, $id, false, true);
|
||||
abort_if($case->closed_at, 409);
|
||||
abort_unless((int) $case->version === $data['version'], 409, 'O dossier mudou; recupere a versão actual.');
|
||||
$view = $this->view($actor, $id);
|
||||
$key = app(InvestmentConsumerScope::class)->key(app(InvestorContext::class)->state($case), $data['context_opportunity'] ?? null, true);
|
||||
$view = $this->view($actor, $id, $key);
|
||||
$step = $this->findStep($view, $code);
|
||||
abort_unless($step !== null && $step['preparation_allowed'], 422, 'Etapa dispensada de preparação; altere os pressupostos com fundamento.');
|
||||
$state = $data['state'];
|
||||
@@ -238,7 +255,10 @@ final class InvestorPath
|
||||
}
|
||||
abort_if($state === 'completed' && ($step['context_review_required'] ?? false) && (! (bool) ($data['context_reviewed'] ?? false) || ($data['context_revision'] ?? -1) !== ($view['investment_context']['revision'] ?? 0)), 422, 'O contexto desta etapa exige nova conferência fundamentada; o registo anterior permanece no histórico.');
|
||||
$detail = [...$data, 'context_dependency_hash' => $view['investment_context']['dependency_hash'] ?? null, 'fintech_fingerprint' => $view['fintech']['review_fingerprints'][$code] ?? null, 'scope' => $scope, 'actor_id' => $actor->id, 'recorded_at' => now()->toIso8601String()];
|
||||
DB::table('journey_steps')->where('id', $step['id'])->update(['path_detail' => $this->desk->encode($detail),
|
||||
$stored = $this->desk->decode(DB::table('journey_steps')->where('id', $step['id'])->value('path_detail'));
|
||||
if ($key) $stored['opportunities'][$key] = $detail;
|
||||
else $stored = [...$stored, ...$detail];
|
||||
DB::table('journey_steps')->where('id', $step['id'])->update(['path_detail' => $this->desk->encode($stored),
|
||||
'status' => in_array($state, ['completed', 'approved'], true) ? 'completed' : ($state === 'not_started' ? 'pending' : 'active'),
|
||||
'version_no' => $step['version'] + 1, 'updated_at' => now()]);
|
||||
DB::table('desk_cases')->where('id', $id)->update(['version' => $case->version + 1, 'updated_at' => now()]);
|
||||
@@ -267,11 +287,12 @@ final class InvestorPath
|
||||
abort_unless(is_array($parsed) && ($parsed['version'] ?? null) === 1 && is_array($parsed['data'] ?? null), 422, 'Snapshot financeiro incompatível.');
|
||||
$payload = $this->desk->decode($case->payload);
|
||||
$context = app(InvestorContext::class)->state($case);
|
||||
$opportunity = app(InvestmentConsumerScope::class)->key($context, $economic['context_opportunity'] ?? null, true);
|
||||
if ($context['revision'] > 0) {
|
||||
abort_unless(($data['context_revision'] ?? -1) === $context['revision'], 409, 'O contexto mudou; recupere e confira os pressupostos antes de devolver o resultado.');
|
||||
abort_unless($data['context_reviewed'] ?? false, 422, 'Confirme a revisão dos pressupostos financeiros para este contexto.');
|
||||
}
|
||||
$resultKey = hash('sha256', $draft->id.':'.$draft->version_no.':'.$snapshot.':context:'.$context['revision']);
|
||||
$resultKey = hash('sha256', $draft->id.':'.$draft->version_no.':'.$snapshot.':context:'.$context['revision'].($opportunity ? ':'.$opportunity : ''));
|
||||
foreach ($payload['investor_path']['results'] ?? [] as $result) {
|
||||
if ($result['source_key'] === $resultKey) {
|
||||
return $result;
|
||||
@@ -280,6 +301,7 @@ final class InvestorPath
|
||||
abort_unless((int) $case->version === $data['version'], 409, 'Recupere a versão actual do dossier.');
|
||||
$result = ['id' => (string) Str::uuid(), 'source_key' => $resultKey, 'draft_id' => $draft->id, 'draft_version' => $draft->version_no,
|
||||
'snapshot_sha256' => $draft->snapshot_sha256, 'financial_snapshot' => $snapshot,
|
||||
'context_opportunity' => $opportunity,
|
||||
'currency' => $economic['currency'] ?? null, 'engine' => 'financial-calculators:v1',
|
||||
'kind' => 'local_calculation_inputs', 'context_state' => 'current', 'context_revision' => $context['revision'], 'context_dependency_hash' => $context['dependency_hash'] ?? app(InvestorContext::class)->dependencyHash([]), 'recorded_at' => now()->toIso8601String()];
|
||||
$payload['investor_path']['results'][] = $result;
|
||||
|
||||
@@ -78,6 +78,9 @@ final class LegacyContent
|
||||
$image = $this->publicResources()->where('r.id', $adaptation['image_resource_id'])->whereIn('d.media_type', ['image/png', 'image/jpeg', 'image/webp'])->first();
|
||||
}
|
||||
}
|
||||
if ($slug === 'agronegocio') {
|
||||
$localHtml = app(CorridorAgribusiness::class)->enrich($localHtml, app(CorridorAgribusinessOpportunities::class)->articleLinks());
|
||||
}
|
||||
preg_match_all('~href="([^"]+)"~i', $localHtml, $existingLinks);
|
||||
$alreadyLinked = array_map(fn ($href) => html_entity_decode($href, ENT_QUOTES | ENT_HTML5, 'UTF-8'), $existingLinks[1]);
|
||||
$relatedArticles = [];
|
||||
@@ -279,7 +282,7 @@ final class LegacyContent
|
||||
}
|
||||
|
||||
/** Allow presentation markup only. No scripts, styles, events, embeds or remote image execution. */
|
||||
public function sanitize(string $html): string
|
||||
public function sanitize(string $html, bool $preserveStructure = false): string
|
||||
{
|
||||
$doc = new DOMDocument;
|
||||
$old = libxml_use_internal_errors(true);
|
||||
@@ -296,7 +299,7 @@ final class LegacyContent
|
||||
}
|
||||
$headingOffset = 2 - (empty($sourceLevels) ? 2 : min($sourceLevels));
|
||||
$previousHeading = 1;
|
||||
$clean = function (DOMNode $node) use (&$clean, $doc, $headingOffset, &$previousHeading): void {
|
||||
$clean = function (DOMNode $node) use (&$clean, $doc, $headingOffset, &$previousHeading, $preserveStructure): void {
|
||||
foreach (iterator_to_array($node->childNodes) as $child) {
|
||||
if (! $child instanceof DOMElement) {
|
||||
continue;
|
||||
@@ -311,7 +314,7 @@ final class LegacyContent
|
||||
$node->replaceChild($section, $child);
|
||||
$child = $section;
|
||||
}
|
||||
if (! in_array(strtolower($child->tagName), ['p', 'strong', 'b', 'em', 'i', 'ul', 'ol', 'li', 'br', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'a'], true)) {
|
||||
if (! in_array(strtolower($child->tagName), array_merge(['p', 'strong', 'b', 'em', 'i', 'ul', 'ol', 'li', 'br', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'a'], $preserveStructure ? ['div', 'span', 'small', 'section', 'table', 'caption', 'thead', 'tbody', 'tfoot', 'tr', 'th', 'td', 'figure', 'figcaption'] : []), true)) {
|
||||
$node->removeChild($child);
|
||||
|
||||
continue;
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Opportunity;
|
||||
|
||||
/** Read-only grouping of the existing public catalogue. */
|
||||
final class OpportunityCorridorExplorer
|
||||
{
|
||||
public function groups(array $filters): array
|
||||
{
|
||||
$catalogue = app(InvestmentCatalogue::class);
|
||||
$groups = [];
|
||||
foreach ($catalogue->query($filters)->get() as $record) {
|
||||
$context = $catalogue->context($record->id);
|
||||
$classification = $context['classification'] ?? [];
|
||||
$corridors = collect($context['corridors'])->mapWithKeys(fn ($c) => ['corridor:'.$c->id => $c->name])->all();
|
||||
foreach ($classification as $relation) {
|
||||
if ($relation['target_type'] === 'corridor' && ! in_array($relation['purpose'], ['proximity', 'administrative_boundary'], true)) {
|
||||
$corridors['corridor:'.$relation['target_id']] = $relation['label'];
|
||||
}
|
||||
}
|
||||
// The approved source names are not aliases for similarly named master records.
|
||||
$source = data_get($record->workflow_context, 'corridor_agribusiness');
|
||||
$chain = null;
|
||||
if (is_array($source) && ($source['source_sha256'] ?? null) === CorridorAgribusinessOpportunities::SOURCE_HASH) {
|
||||
$corridors['source:'.hash('sha256', $source['corridor'])] = $source['corridor'];
|
||||
$chain = $source['chain'];
|
||||
}
|
||||
$chains = collect($classification)->where('target_type', 'chain')->pluck('label')->all();
|
||||
if ($chain) $chains[] = $chain;
|
||||
$stages = collect($classification)->pluck('production_stage')->filter()->unique()->values()->all();
|
||||
// Keep the source's actual activity description rather than inventing stage labels.
|
||||
if ($stages === [] && $chain && ! empty($source['summary'])) $stages = [$source['summary']];
|
||||
$path = collect($context['primary_territory_path'] ?? []);
|
||||
$province = $path->firstWhere('location_type', 'province')->name ?? $record->province;
|
||||
$district = $path->firstWhere('location_type', 'district')->name ?? $record->district;
|
||||
$item = ['id' => $record->id, 'title' => $record->title, 'slug' => $record->slug, 'summary' => $record->summary,
|
||||
'province' => $province, 'district' => $district, 'chains' => array_values(array_unique($chains)),
|
||||
'stages' => $stages, 'maturity_label' => $record->maturity_label];
|
||||
foreach ($corridors ?: ['other' => 'Outras localizações'] as $key => $name) {
|
||||
$groups[$key] ??= ['id' => $key, 'name' => $name, 'opportunities' => []];
|
||||
$groups[$key]['opportunities'][$record->id] = $item;
|
||||
}
|
||||
}
|
||||
foreach ($groups as &$group) {
|
||||
$group['opportunities'] = array_values($group['opportunities']);
|
||||
$group['count'] = count($group['opportunities']);
|
||||
$group['locations'] = array_values(array_unique(array_filter(array_map(fn ($r) => implode(' / ', array_filter([$r['province'], $r['district']])), $group['opportunities']))));
|
||||
}
|
||||
unset($group);
|
||||
uasort($groups, fn ($a, $b) => ($a['id'] === 'other' ? 1 : 0) <=> ($b['id'] === 'other' ? 1 : 0) ?: strnatcasecmp($a['name'], $b['name']));
|
||||
return array_values($groups);
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,9 @@ class OpportunityManagement
|
||||
public function values(Opportunity $record): array
|
||||
{
|
||||
$base = $record->only(self::FIELDS);
|
||||
if (data_get($record->workflow_context, 'publication.purpose') === OpportunityPromotion::PURPOSE) {
|
||||
$base = [...$base, ...($record->workflow_context['promotional_private_base'] ?? [])];
|
||||
}
|
||||
$draft = $record->management_draft ? json_decode($record->management_draft, true, 512, JSON_THROW_ON_ERROR) : [];
|
||||
|
||||
return [...$base, ...($this->closed($record) ? $draft : array_intersect_key($draft, array_flip(self::PRIVATE_DRAFT_FIELDS)))];
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Opportunity;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
/** Tempo's promotional disclosure, independent of investment execution approval. */
|
||||
final class OpportunityPromotion
|
||||
{
|
||||
public const PURPOSE = 'promotional_preparation';
|
||||
public const NOTICE = 'Em preparação. A divulgação não confirma financiamento, disponibilidade de terreno, licenças ou autorização de execução do investimento.';
|
||||
|
||||
public function allowed(User $actor, Opportunity $record): bool
|
||||
{
|
||||
$access = app(PortalProfileAccess::class);
|
||||
if ($record->trashed() || $record->owner_user_id === null || ! $access->canView($actor, $record)
|
||||
|| $access->has($actor, 'auditor') || in_array($record->status, ['archived', 'rejected'], true)) return false;
|
||||
// Never overwrite a normal approved publication or its workflow decisions.
|
||||
if ($record->published_at && data_get($record->workflow_context, 'publication.purpose') !== self::PURPOSE) return false;
|
||||
$internal = $access->internalAssignment($actor, $record->opportunity_category);
|
||||
return ($internal && $access->promoterRecordScope($actor, $record) && $access->operational($actor, 'edit', $record->id))
|
||||
|| ($access->scoped($actor, 'publisher', $record->organization_id, $record->opportunity_category)
|
||||
&& $access->operational($actor, 'publish', $record->id));
|
||||
}
|
||||
|
||||
private function authorize(User $actor, Opportunity $record): void
|
||||
{
|
||||
abort_unless($this->allowed($actor, $record), 403, 'A designação e o âmbito existentes não autorizam esta divulgação.');
|
||||
if (! app(PortalProfileAccess::class)->mfa($actor)) {
|
||||
throw new \Illuminate\Http\Exceptions\HttpResponseException(response()->json(['message' => 'Confirme a entrada normal com MFA recente para divulgar.'], 403)->header('X-Portal-Reauthentication', 'required'));
|
||||
}
|
||||
}
|
||||
|
||||
public function editor(User $actor, Opportunity $record): array
|
||||
{
|
||||
abort_unless($this->allowed($actor, $record), 403);
|
||||
$saved = data_get($record->workflow_context, 'promotional_summary', []);
|
||||
// Only previously public text is recovered automatically. No private contact/document is copied.
|
||||
$existing = data_get($record->workflow_context, 'publication.purpose') === self::PURPOSE;
|
||||
$form = $saved['input'] ?? ['title' => $existing ? $record->title : '', 'summary' => $existing ? $record->summary : '',
|
||||
'description' => $existing ? $record->description : '', 'source_reference' => '', 'edition' => '', 'source_date' => '',
|
||||
'limitations' => '', 'territory_ids' => $existing ? DB::table('opportunity_locations')->where('opportunity_id', $record->id)->pluck('geo_location_id')->all() : [],
|
||||
'sector_id' => $record->sector_id];
|
||||
return ['record' => ['id' => $record->id, 'reference' => $record->reference], 'etag' => app(OpportunityManagement::class)->etag($record),
|
||||
'initial' => $form, 'publicNow' => $existing && $record->status === 'published',
|
||||
'reauthenticationRequired' => ! app(PortalProfileAccess::class)->mfa($actor),
|
||||
'sectors' => \App\Models\Sector::catalog()->orderBy('name')->get(['id', 'name']),
|
||||
'territories' => app(InvestmentGeography::class)->publicReferences()->orderBy('name')->get(['id', 'name', 'location_type']),
|
||||
'history' => DB::table('audit_events')->where('source_system', 'tempo-preparation-publication')
|
||||
->where('after_data->record_id', $record->id)->orderByDesc('occurred_at')->get(['id', 'action', 'actor_user_id', 'occurred_at'])];
|
||||
}
|
||||
|
||||
public function preview(User $actor, Opportunity $record, array $input): array
|
||||
{
|
||||
$this->authorize($actor, $record);
|
||||
$data = Validator::make($input, ['etag' => 'required|string|size:64', 'action' => 'required|in:disclose,withdraw',
|
||||
'title' => 'required_if:action,disclose|nullable|string|max:255', 'summary' => 'required_if:action,disclose|nullable|string|max:499',
|
||||
'description' => 'nullable|string|max:6000', 'limitations' => 'nullable|string|max:2500',
|
||||
'source_reference' => 'nullable|string|max:2000', 'edition' => 'nullable|string|max:150', 'source_date' => 'nullable|date_format:Y-m-d',
|
||||
'sector_id' => ['nullable', 'integer', Rule::in(\App\Models\Sector::catalog()->pluck('id')->all())],
|
||||
'territory_ids' => 'sometimes|array|max:30', 'territory_ids.*' => 'required|uuid|distinct',
|
||||
])->validate();
|
||||
abort_unless(hash_equals(app(OpportunityManagement::class)->etag($record), $data['etag']), 409, 'A ficha mudou. Reabra antes de preparar outra prévia.');
|
||||
if ($data['action'] === 'withdraw') abort_unless(data_get($record->workflow_context, 'publication.purpose') === self::PURPOSE, 409);
|
||||
$paths = [];
|
||||
foreach ($data['territory_ids'] ?? [] as $id) {
|
||||
$path = app(InvestmentGeography::class)->path($id, true);
|
||||
abort_unless(count($path) > 0 && collect($path)->contains('id', $id), 422, 'Seleccione apenas territórios públicos existentes.');
|
||||
$paths[] = $path;
|
||||
}
|
||||
$text = fn ($key) => trim(strip_tags($data[$key] ?? ''));
|
||||
$body = implode("\n\n", array_filter([$text('description'), self::NOTICE,
|
||||
'Limitações e lacunas: '.($text('limitations') ?: 'Informação ainda por completar.'),
|
||||
'Fonte: '.($text('source_reference') ?: 'Não indicada.'), 'Edição: '.($text('edition') ?: 'Não indicada.'),
|
||||
'Data-base: '.($data['source_date'] ?? 'Não indicada.')]));
|
||||
$body = OpportunityPublicText::description($record, $body);
|
||||
$projection = ['title' => $text('title'), 'summary' => $text('summary'), 'description' => $body,
|
||||
'sector_id' => $data['sector_id'] ?? null, 'maturity_label' => 'Em preparação', 'notice' => self::NOTICE,
|
||||
'territories' => array_map(fn ($p) => ['id' => end($p)->id, 'label' => implode(' / ', array_column($p, 'name'))], $paths)];
|
||||
if ($data['action'] === 'disclose') abort_unless($projection['title'] !== '' && $projection['summary'] !== '', 422, 'Indique título e resumo em texto simples.');
|
||||
if ($data['action'] === 'withdraw') $projection = [...$projection, ...$record->only(['title', 'summary', 'description', 'sector_id', 'maturity_label'])];
|
||||
$payload = ['actor_id' => $actor->id, 'record_id' => $record->id, 'etag' => $data['etag'], 'action' => $data['action'],
|
||||
'input' => $data, 'projection' => $projection, 'expires' => now()->addMinutes(15)->timestamp];
|
||||
return ['action' => $data['action'], 'projection' => $projection, 'token' => Crypt::encryptString(json_encode($payload, JSON_THROW_ON_ERROR)),
|
||||
'current' => $record->only(['title', 'summary', 'description', 'status']), 'writes' => false];
|
||||
}
|
||||
|
||||
public function confirm(User $actor, int $id, array $input): array
|
||||
{
|
||||
$data = Validator::make($input, ['token' => 'required|string|max:300000', 'operation_key' => 'required|uuid',
|
||||
'confirm' => 'required|accepted', 'reason' => 'required|string|min:10|max:1000'])->validate();
|
||||
try { $preview = json_decode(Crypt::decryptString($data['token']), true, flags: JSON_THROW_ON_ERROR); }
|
||||
catch (\Throwable) { abort(422, 'Prévia inválida. Prepare outra prévia.'); }
|
||||
abort_unless(($preview['actor_id'] ?? null) === $actor->id && ($preview['record_id'] ?? null) === $id, 403);
|
||||
return DB::transaction(function () use ($actor, $id, $data, $preview) {
|
||||
DB::select('SELECT pg_advisory_xact_lock(hashtext(?))', ['promotional-operation:'.$data['operation_key']]);
|
||||
$record = Opportunity::whereKey($id)->lockForUpdate()->firstOrFail();
|
||||
$this->authorize($actor, $record);
|
||||
$digest = hash('sha256', $data['token'].'|'.$data['reason']);
|
||||
$replay = DB::table('audit_events')->where('source_system', 'tempo-preparation-publication')
|
||||
->where('after_data->operation_key', $data['operation_key'])->first();
|
||||
if ($replay) {
|
||||
$prior = json_decode($replay->after_data, true);
|
||||
abort_unless($prior['record_id'] === $id && (int) $replay->actor_user_id === $actor->id && hash_equals($prior['request_hash'], $digest), 409, 'Chave usada noutra operação.');
|
||||
return ['id' => $id, 'replayed' => true, 'message' => 'Operação já registada; nenhuma alteração repetida.'];
|
||||
}
|
||||
abort_unless(($preview['expires'] ?? 0) >= now()->timestamp, 409, 'A prévia expirou. Prepare outra prévia.');
|
||||
abort_unless(hash_equals(app(OpportunityManagement::class)->etag($record), $preview['etag']), 409, 'Alteração concorrente: a ficha foi preservada. Reabra e reveja a nova versão.');
|
||||
$before = $record->getRawOriginal();
|
||||
$oldLocations = DB::table('opportunity_locations')->where('opportunity_id', $id)->pluck('geo_location_id')->all();
|
||||
$context = $record->workflow_context ?? [];
|
||||
if ($preview['action'] === 'withdraw') {
|
||||
$record->status = 'suspended';
|
||||
$record->published_at = null;
|
||||
$context['publication']['visibility'] = 'withdrawn';
|
||||
$action = 'promotional_summary_withdrawn';
|
||||
} else {
|
||||
$p = $preview['projection'];
|
||||
if ($p['sector_id'] !== null) abort_unless(\App\Models\Sector::catalog()->whereKey($p['sector_id'])->exists(), 409, 'O sector deixou de estar disponível no catálogo. Prepare outra prévia.');
|
||||
$paths = [];
|
||||
foreach ($preview['input']['territory_ids'] ?? [] as $territory) {
|
||||
$path = app(InvestmentGeography::class)->path($territory, true);
|
||||
abort_unless(count($path) && collect($path)->contains('id', $territory), 409, 'Um território deixou de estar disponível. Prepare outra prévia.');
|
||||
$paths[] = $path;
|
||||
}
|
||||
$currentTerritories = array_map(fn ($path) => ['id' => end($path)->id, 'label' => implode(' / ', array_column($path, 'name'))], $paths);
|
||||
abort_unless($currentTerritories === $p['territories'], 409, 'O enquadramento territorial mudou. Prepare outra prévia.');
|
||||
// Preserve the original private draft bytes; retain its former base
|
||||
// columns in the existing hidden context before projecting public text.
|
||||
$context['promotional_private_base'] ??= $record->only(OpportunityManagement::FIELDS);
|
||||
$context['working_state'] ??= app(PortalProfileAccess::class)->state($record);
|
||||
$context['promotional_summary'] = ['input' => $preview['input'], 'projection' => $p];
|
||||
$context['publication'] = ['visibility' => 'public', 'purpose' => self::PURPOSE, 'actor_id' => $actor->id,
|
||||
'at' => now()->toIso8601String(), 'execution_approved' => false, 'private_draft_preserved' => true];
|
||||
$action = data_get($before, 'status') === 'published' ? 'promotional_summary_updated' : 'promotional_summary_published';
|
||||
foreach (['title', 'summary', 'description', 'sector_id', 'maturity_label'] as $field) $record->{$field} = $p[$field];
|
||||
foreach (['promoter_name', 'promoter_type', 'financing_modality', 'expected_impact', 'maturity_level', 'estimated_investment_amount', 'estimated_investment_currency'] as $field) $record->{$field} = null;
|
||||
$main = $paths[0] ?? [];
|
||||
$record->primary_territory_id = $main ? end($main)->id : null;
|
||||
$record->province = collect($main)->firstWhere('location_type', 'province')?->name;
|
||||
$record->district = collect($main)->firstWhere('location_type', 'district')?->name;
|
||||
$record->geography_scope = count($paths) > 1 ? 'multiple' : ($main ? 'specific' : 'unspecified');
|
||||
DB::table('opportunity_locations')->where('opportunity_id', $id)->delete();
|
||||
foreach ($preview['input']['territory_ids'] ?? [] as $territory) DB::table('opportunity_locations')->insert(['opportunity_id' => $id, 'geo_location_id' => $territory]);
|
||||
$record->status = 'published';
|
||||
$record->is_featured = false;
|
||||
$record->last_validated_at = null;
|
||||
$record->published_at = now();
|
||||
}
|
||||
$record->workflow_context = $context;
|
||||
$record->management_version++;
|
||||
$record->save();
|
||||
DB::table('audit_events')->insert(['source_system' => 'tempo-preparation-publication', 'entity_type' => 'opportunity',
|
||||
'actor_user_id' => $actor->id, 'action' => $action, 'data_classification' => 'restricted', 'correlation_id' => (string) Str::uuid(),
|
||||
'before_data' => json_encode(['record_id' => $id, 'record' => $before, 'territories' => $oldLocations], JSON_THROW_ON_ERROR),
|
||||
'after_data' => json_encode(['record_id' => $id, 'operation_key' => $data['operation_key'], 'request_hash' => $digest,
|
||||
'reason' => $data['reason'], 'projection' => $preview['projection'], 'execution_approved' => false,
|
||||
'record' => $record->getRawOriginal()], JSON_THROW_ON_ERROR)]);
|
||||
return ['id' => $id, 'replayed' => false, 'message' => $preview['action'] === 'withdraw' ? 'Resumo retirado; cadastro e histórico preservados.' : 'Resumo divulgado como Em preparação. Não autoriza execução do investimento.'];
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Opportunity;
|
||||
|
||||
/** Presentation only: originals, editorial fields and audit records remain intact. */
|
||||
final class OpportunityPublicText
|
||||
{
|
||||
public static function description(Opportunity $record, string $text): string
|
||||
{
|
||||
$source = data_get($record->workflow_context, 'corridor_agribusiness');
|
||||
if (! is_array($source) || ($source['source_sha256'] ?? null) !== CorridorAgribusinessOpportunities::SOURCE_HASH) return $text;
|
||||
|
||||
$hash = CorridorAgribusinessOpportunities::SOURCE_HASH;
|
||||
$sourceLine = 'Fonte: '.$source['source'].'; SHA-256 '.$hash;
|
||||
$paragraphs = explode("\n\n", $text);
|
||||
$result = [];
|
||||
foreach ($paragraphs as $paragraph) {
|
||||
$paragraph = trim($paragraph);
|
||||
if (in_array($paragraph, [$sourceLine, $sourceLine.'.', 'Edição: Não indicada.', 'Data-base: Não indicada.',
|
||||
'Limitações e lacunas: '.CorridorAgribusinessOpportunities::LIMITATIONS,
|
||||
OpportunityPromotion::NOTICE], true)) continue;
|
||||
if ($paragraph === 'Enquadramento documental: '.$source['corridor'].'.') $paragraph = $source['corridor'].'.';
|
||||
if ($paragraph === CorridorAgribusinessOpportunities::LIMITATIONS) {
|
||||
$paragraph = 'A localização exacta, a disponibilidade de terreno e as condições do investimento serão definidas durante a preparação do projecto.';
|
||||
}
|
||||
if ($paragraph !== '') $result[] = $paragraph;
|
||||
}
|
||||
return implode("\n\n", $result);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,287 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Opportunity;
|
||||
use App\Models\User;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
/** Publication of notices; never receives bids or changes the linked investment. */
|
||||
final class Procurement
|
||||
{
|
||||
public const TEXT = ['title', 'reference', 'responsible_unit', 'modality', 'object', 'object_kind', 'quantities', 'financier', 'instrument', 'edition', 'rule_source', 'financing_agreement', 'eligibility', 'requirements', 'proposal_validity', 'guarantee_status', 'guarantees', 'delivery_channel', 'delivery_address', 'delivery_url', 'public_contact', 'dissemination', 'origin_url', 'origin_published_at', 'clarifications_at', 'deadline', 'opening_at', 'timezone', 'minimum_source', 'minimum_edition', 'minimum_modality', 'minimum_day_basis', 'result', 'internal_notes', 'public_reason', 'minimum_working_days', 'minimum_holidays', 'minimum_calendar_source'];
|
||||
|
||||
public function available(): bool
|
||||
{
|
||||
return config('procurement.enabled') && Schema::hasTable('portal_tenders');
|
||||
}
|
||||
|
||||
public function access(?User $actor): bool
|
||||
{
|
||||
if (! $actor || ! $actor->hasVerifiedEmail()) {
|
||||
return false;
|
||||
}
|
||||
$docs = app(DocumentManagementAccess::class);
|
||||
|
||||
return ! app(PortalProfileAccess::class)->has($actor, 'auditor') && ($docs->full($actor) || $docs->editorial($actor));
|
||||
}
|
||||
|
||||
public function guard(?User $actor): void
|
||||
{
|
||||
abort_unless($this->available(), 404);
|
||||
abort_unless($this->access($actor), 403, 'Use a autorização editorial já atribuída.');
|
||||
}
|
||||
|
||||
public function references(User $actor): array
|
||||
{
|
||||
$this->guard($actor);
|
||||
$editable = app(DocumentManagementAccess::class)->documents($actor)->select('id');
|
||||
|
||||
return ['regimes' => config('procurement.regimes'), 'acts' => config('procurement.acts'),
|
||||
'organizations' => DB::table('organizations')->whereNull('deleted_at')->orderBy('name')->get(['id', 'name']),
|
||||
'sectors' => DB::table('sectors')->orderBy('name')->get(['id', 'name']),
|
||||
'territories' => app(InvestmentGeography::class)->references(true)->orderBy('name')->get(['id', 'name', 'location_type']),
|
||||
'opportunities' => app(PortalProfileAccess::class)->scope(Opportunity::query(), $actor)->orderBy('title')->get(['id', 'title']),
|
||||
'projects' => DB::table('projects')->whereNull('deleted_at')->whereIn('data_classification', ['internal', 'public'])->orderBy('name')->get(['id', 'name']),
|
||||
'documents' => DB::table('portal_resources as r')->join('documents as d', 'd.id', '=', 'r.document_id')->whereNull('d.deleted_at')
|
||||
->where(fn ($q) => $q->whereIn('d.id', $editable)->orWhere(fn ($p) => $p->where('r.published', true)->where('d.data_classification', 'public')))
|
||||
->orderBy('r.title')->get(['r.id', 'r.title', 'r.published', 'd.malware_scan_status'])];
|
||||
}
|
||||
|
||||
public function record(string $id): object
|
||||
{
|
||||
abort_unless($this->available(), 404);
|
||||
|
||||
return DB::table('portal_tenders')->where('id', $id)->firstOrFail();
|
||||
}
|
||||
|
||||
public function save(User $actor, ?string $id, array $input): string
|
||||
{
|
||||
$this->guard($actor);
|
||||
$v = Validator::make($input, ['version' => 'required|integer|min:0', 'reason' => 'required|string|min:20|max:1000', 'draft' => 'required|array']);
|
||||
$v->validate();
|
||||
$draft = $this->normalize($actor, $input['draft']);
|
||||
|
||||
return DB::transaction(function () use ($actor, $id, $input, $draft) {
|
||||
$old = $id ? DB::table('portal_tenders')->where('id', $id)->lockForUpdate()->firstOrFail() : null;
|
||||
abort_unless((int) ($old->version ?? 0) === (int) $input['version'], 409, 'A versão mudou; recupere o concurso antes de guardar.');
|
||||
$id ??= (string) Str::uuid();
|
||||
$version = ($old->version ?? 0) + 1;
|
||||
if ($old) {
|
||||
DB::table('portal_tenders')->where('id', $id)->update(['draft' => json_encode($draft, JSON_THROW_ON_ERROR), 'version' => $version, 'updated_at' => now()]);
|
||||
} else {
|
||||
DB::table('portal_tenders')->insert(['id' => $id, 'draft' => json_encode($draft, JSON_THROW_ON_ERROR), 'version' => $version, 'created_by' => $actor->id, 'created_at' => now(), 'updated_at' => now()]);
|
||||
}
|
||||
$this->version($actor, $id, $version, 'draft', $draft, $input['reason'], false);
|
||||
|
||||
return $id;
|
||||
});
|
||||
}
|
||||
|
||||
private function normalize(User $actor, array $input): array
|
||||
{
|
||||
$rules = array_fill_keys(self::TEXT, 'nullable|string|max:12000');
|
||||
$rules = [...$rules, 'regime' => 'nullable|in:state,external,private,other', 'organization_id' => 'nullable|uuid|exists:organizations,id',
|
||||
'opportunity_id' => 'nullable|integer|exists:opportunities,id', 'project_id' => 'nullable|uuid|exists:projects,id', 'sector_id' => 'nullable|integer|exists:sectors,id',
|
||||
'territory_id' => 'nullable|uuid|exists:geo_locations,id', 'contact_authorized' => 'boolean', 'minimum_days' => 'nullable|integer|min:0|max:3650',
|
||||
'lots' => 'array|max:100', 'lots.*' => 'array:code,description,quantities', 'lots.*.code' => 'required|string|max:80|distinct', 'lots.*.description' => 'required|string|max:3000', 'lots.*.quantities' => 'nullable|string|max:1500',
|
||||
'attachments' => 'array|max:100', 'attachments.*' => 'array:resource_id,public,purpose', 'attachments.*.resource_id' => 'required|integer|exists:portal_resources,id', 'attachments.*.public' => 'required|boolean', 'attachments.*.purpose' => 'required|string|max:150'];
|
||||
foreach (['origin_url', 'delivery_url', 'rule_source'] as $url) {
|
||||
$rules[$url] = 'nullable|url:http,https|max:2000';
|
||||
}
|
||||
$data = Validator::make($input, $rules)->validate();
|
||||
if (! empty($data['opportunity_id'])) {
|
||||
abort_unless(app(PortalProfileAccess::class)->scope(Opportunity::query(), $actor)->whereKey($data['opportunity_id'])->exists(), 403);
|
||||
}
|
||||
if (! empty($data['project_id'])) {
|
||||
abort_unless(DB::table('projects')->where('id', $data['project_id'])->whereNull('deleted_at')->whereIn('data_classification', ['internal', 'public'])->exists(), 422);
|
||||
}
|
||||
foreach ($data['attachments'] ?? [] as $attachment) {
|
||||
$resource = DB::table('portal_resources')->where('id', $attachment['resource_id'])->firstOrFail();
|
||||
abort_unless($this->publicDocuments()->where('r.id', $resource->id)->exists() || app(DocumentManagementAccess::class)->documents($actor)->where('id', $resource->document_id)->exists(), 403);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function preview(User $actor, string $id, string $act): array
|
||||
{
|
||||
$this->guard($actor);
|
||||
$record = $this->record($id);
|
||||
abort_unless(array_key_exists($act, config('procurement.acts')), 422);
|
||||
$p = json_decode($record->draft, true, 512, JSON_THROW_ON_ERROR);
|
||||
Validator::make($p, array_fill_keys(['title', 'reference', 'organization_id', 'modality', 'object', 'regime', 'instrument', 'edition', 'rule_source', 'origin_published_at', 'deadline', 'delivery_channel', 'timezone'], 'required'))->validate();
|
||||
Validator::make($p, ['timezone' => 'timezone', 'object_kind' => 'nullable|in:works,goods,services,mixed,other', 'guarantee_status' => 'nullable|in:required,not_required,unknown'])->validate();
|
||||
Validator::make($p, ['public_reason' => 'required|string|min:20|max:1000'])->validate();
|
||||
$dates = [];
|
||||
foreach (['origin_published_at', 'clarifications_at', 'deadline', 'opening_at'] as $field) {
|
||||
if (empty($p[$field])) {
|
||||
continue;
|
||||
}
|
||||
$validator = Validator::make([$field => $p[$field]], [$field => 'date_format:Y-m-d\TH:i']);
|
||||
$validator->validate();
|
||||
$dates[$field] = CarbonImmutable::createFromFormat('!Y-m-d\TH:i', $p[$field], $p['timezone']);
|
||||
}
|
||||
$this->require($dates['deadline']->greaterThan($dates['origin_published_at']), 'deadline', 'Entrega anterior à publicação de origem.');
|
||||
if (isset($dates['clarifications_at'])) {
|
||||
$this->require($dates['clarifications_at']->betweenIncluded($dates['origin_published_at'], $dates['deadline']), 'clarifications_at', 'Esclarecimentos fora do período de publicação/entrega.');
|
||||
}
|
||||
if (isset($dates['opening_at'])) {
|
||||
$this->require($dates['opening_at']->greaterThanOrEqualTo($dates['deadline']), 'opening_at', 'A abertura indicada é anterior à entrega.');
|
||||
}
|
||||
if (($p['guarantee_status'] ?? '') === 'required') {
|
||||
$this->require(! empty($p['guarantees']), 'guarantees', 'Descreva a garantia documentada exigida.');
|
||||
}
|
||||
if (isset($p['minimum_days'])) {
|
||||
foreach (['minimum_source', 'minimum_edition', 'minimum_modality', 'minimum_day_basis'] as $field) {
|
||||
$this->require(! empty($p[$field]), $field, 'Identifique fonte, edição, modalidade e contagem do prazo mínimo.');
|
||||
}
|
||||
$this->require($p['minimum_modality'] === $p['modality'], 'minimum_modality', 'A regra indicada pertence a outra modalidade.');
|
||||
$earliest = $dates['origin_published_at'];
|
||||
if ($p['minimum_day_basis'] === 'business') {
|
||||
$this->require(! empty($p['minimum_calendar_source']), 'minimum_calendar_source', 'Identifique a fonte do calendário de dias úteis e feriados.');
|
||||
$weekdays = array_filter(array_map('trim', explode(',', (string) ($p['minimum_working_days'] ?? ''))));
|
||||
$this->require(count($weekdays) > 0 && ! array_diff($weekdays, ['1', '2', '3', '4', '5', '6', '7']), 'minimum_working_days', 'Indique os dias de trabalho documentados (1=segunda, 7=domingo).');
|
||||
$holidays = array_values(array_filter(preg_split('/[\s,;]+/', (string) ($p['minimum_holidays'] ?? ''))));
|
||||
Validator::make(['dates' => $holidays], ['dates' => 'array|max:1000', 'dates.*' => 'date_format:Y-m-d'])->validate();
|
||||
for ($left = (int) $p['minimum_days'],$iterations = 0; $left > 0; $iterations++) {
|
||||
$this->require($iterations < 36500, 'minimum_days', 'Calendário insuficiente para calcular o prazo indicado.');
|
||||
$earliest = $earliest->addDay();
|
||||
if (in_array((string) $earliest->isoWeekday(), $weekdays, true) && ! in_array($earliest->format('Y-m-d'), $holidays, true)) {
|
||||
$left--;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->require($p['minimum_day_basis'] === 'calendar', 'minimum_day_basis', 'Identifique dias corridos ou calendário de dias úteis documentado.');
|
||||
$earliest = $earliest->addDays((int) $p['minimum_days']);
|
||||
}
|
||||
$this->require($dates['deadline']->greaterThanOrEqualTo($earliest), 'deadline', 'Prazo inferior ao mínimo documentado para esta modalidade/edição/calendário.');
|
||||
}
|
||||
$previous = $record->published_version_id ? $this->publishedVersion($record->published_version_id) : null;
|
||||
$this->require($previous ? $act !== 'initial' : $act === 'initial', 'act', $previous ? 'O anúncio inicial já existe; publique um acto associado.' : 'Publique primeiro o anúncio inicial.');
|
||||
if ($previous) {
|
||||
$before = $previous['payload'];
|
||||
if (($before['deadline'] ?? '') !== $p['deadline'] || ($before['timezone'] ?? '') !== $p['timezone']) {
|
||||
$this->require($act === 'extension', 'act', 'Uma mudança do prazo exige acto de prorrogação, com data anterior e nova.');
|
||||
}
|
||||
if ($act === 'extension') {
|
||||
$this->require($dates['deadline']->greaterThan(CarbonImmutable::parse($before['deadline'], $before['timezone'])), 'deadline', 'A prorrogação deve avançar o prazo anterior.');
|
||||
$p['deadline_previous'] = $before['deadline'];
|
||||
$p['timezone_previous'] = $before['timezone'];
|
||||
}
|
||||
$p['extended'] = ($before['extended'] ?? false) || $act === 'extension';
|
||||
$p['procedural_state'] = $before['procedural_state'] ?? null;
|
||||
}
|
||||
if ($act === 'award') {
|
||||
$p['procedural_state'] = 'results';
|
||||
}
|
||||
if ($act === 'cancellation') {
|
||||
$p['procedural_state'] = 'cancelled';
|
||||
}
|
||||
if (in_array($act, ['award', 'cancellation', 'other'], true)) {
|
||||
$this->require(! empty($p['result']), 'result', 'Descreva o acto ou resultado documentado.');
|
||||
}
|
||||
$p['organization_name'] = DB::table('organizations')->where('id', $p['organization_id'])->whereNull('deleted_at')->value('name');
|
||||
$this->require((bool) $p['organization_name'], 'organization_id', 'Entidade eliminada; recupere a referência.');
|
||||
$p['sector_name'] = empty($p['sector_id']) ? null : DB::table('sectors')->where('id', $p['sector_id'])->value('name');
|
||||
$p['territory_name'] = empty($p['territory_id']) ? null : app(InvestmentGeography::class)->references(true)->where('id', $p['territory_id'])->value('name');
|
||||
if (! empty($p['territory_id'])) {
|
||||
$this->require((bool) $p['territory_name'], 'territory_id', 'Referência territorial indisponível.');
|
||||
}
|
||||
unset($p['internal_notes']);
|
||||
if (! ($p['contact_authorized'] ?? false)) {
|
||||
unset($p['public_contact']);
|
||||
}
|
||||
$attachments = [];
|
||||
foreach ($p['attachments'] ?? [] as $item) {
|
||||
if (! $item['public']) {
|
||||
continue;
|
||||
}
|
||||
$doc = $this->publicDocuments()->where('r.id', $item['resource_id'])->first(['r.id', 'r.title', 'd.sha256', 'd.id as document_id']);
|
||||
$this->require((bool) $doc, 'attachments', 'Anexo público exige publicação autorizada, scan limpo e direitos sem restrição na biblioteca.');
|
||||
$attachments[] = [...$item, 'title' => $doc->title, 'sha256' => trim($doc->sha256), 'document_id' => $doc->document_id];
|
||||
}
|
||||
$p['attachments'] = $attachments;
|
||||
if (! empty($p['opportunity_id'])) {
|
||||
$o = Opportunity::published()->whereKey($p['opportunity_id'])->first(['id', 'title', 'slug']);
|
||||
$p['opportunity'] = $o ? ['title' => $o->title, 'url' => '/oportunidades/'.$o->slug] : null;
|
||||
}
|
||||
if (! empty($p['project_id'])) {
|
||||
$p['project_name'] = DB::table('projects')->where('id', $p['project_id'])->whereNull('deleted_at')->where('data_classification', 'public')->value('name');
|
||||
}
|
||||
unset($p['opportunity_id'],$p['project_id']);
|
||||
$plan = ['id' => $id, 'version' => $record->version, 'act' => $act, 'payload' => $p];
|
||||
$plan['hash'] = hash_hmac('sha256', json_encode($plan, JSON_THROW_ON_ERROR), config('app.key'));
|
||||
|
||||
return $plan;
|
||||
}
|
||||
|
||||
public function publish(User $actor, string $id, array $input): void
|
||||
{
|
||||
$this->guard($actor);
|
||||
Validator::make($input, ['hash' => 'required|string|size:64', 'act' => 'required|string', 'reason' => 'required|string|min:20|max:1000'])->validate();
|
||||
DB::transaction(function () use ($actor, $id, $input) {
|
||||
$record = DB::table('portal_tenders')->where('id', $id)->lockForUpdate()->firstOrFail();
|
||||
$plan = $this->preview($actor, $id, $input['act']);
|
||||
abort_unless(hash_equals($plan['hash'], $input['hash']), 409, 'Prévia alterada; reveja o conteúdo antes de publicar.');
|
||||
abort_unless($input['reason'] === $plan['payload']['public_reason'], 409, 'O motivo público deve coincidir com a prévia.');
|
||||
$version = $record->version + 1;
|
||||
$vid = $this->version($actor, $id, $version, $input['act'], $plan['payload'], $input['reason'], true);
|
||||
DB::table('portal_tenders')->where('id', $id)->update(['published_version_id' => $vid, 'version' => $version, 'updated_at' => now()]);
|
||||
});
|
||||
}
|
||||
|
||||
private function version(User $actor, string $id, int $version, string $act, array $payload, string $reason, bool $published): string
|
||||
{
|
||||
$vid = (string) Str::uuid();
|
||||
DB::table('portal_tender_versions')->insert(['id' => $vid, 'tender_id' => $id, 'version' => $version, 'act' => $act, 'payload' => json_encode($payload, JSON_THROW_ON_ERROR), 'reason' => $reason, 'actor_id' => $actor->id, 'published_at' => $published ? now() : null, 'created_at' => now()]);
|
||||
DB::table('audit_events')->insert(['source_system' => 'procurement', 'entity_type' => 'portal_tenders', 'entity_id' => $id, 'actor_user_id' => $actor->id, 'action' => $published ? 'notice_published' : 'tender_draft_saved', 'data_classification' => 'internal', 'after_data' => json_encode(['version_id' => $vid, 'act' => $act, 'reason' => $reason], JSON_THROW_ON_ERROR)]);
|
||||
|
||||
return $vid;
|
||||
}
|
||||
|
||||
public function publicDocuments(): Builder
|
||||
{
|
||||
return DB::table('portal_resources as r')->join('documents as d', 'd.id', '=', 'r.document_id')->where('r.published', true)->where('r.rights_status', '!=', 'restricted')->where('d.rights_status', '!=', 'restricted')->where('d.data_classification', 'public')->where('d.status', 'active')->whereNull('d.deleted_at')->where('d.malware_scan_status', 'clean')->whereColumn('d.sha256', 'd.malware_scanned_sha256')
|
||||
->where(fn ($q) => $q->whereNull('d.source_system')->orWhereNotIn('d.source_system', ['opportunity-resources', 'opportunity-image-derivatives']))
|
||||
->whereNotExists(fn ($q) => $q->selectRaw('1')->from('opportunity_documents as od')->whereColumn('od.document_id', 'd.id')->whereRaw("NOT jsonb_exists(COALESCE(od.payload,'{}'::jsonb),'library_source')"))
|
||||
->whereNotExists(fn ($q) => $q->selectRaw('1')->from('opportunity_images as oi')->whereColumn('oi.document_id', 'd.id')->whereRaw("NOT jsonb_exists(COALESCE(oi.payload,'{}'::jsonb),'library_source')"));
|
||||
}
|
||||
|
||||
public function publishedVersion(string $id): array
|
||||
{
|
||||
$v = DB::table('portal_tender_versions')->where('id', $id)->whereNotNull('published_at')->firstOrFail();
|
||||
$p = json_decode($v->payload, true, 512, JSON_THROW_ON_ERROR);
|
||||
foreach ($p['attachments'] ?? [] as $i => $item) {
|
||||
$p['attachments'][$i]['available'] = $this->publicDocuments()->where('r.id', $item['resource_id'])->where('d.id', $item['document_id'])->where('d.sha256', $item['sha256'])->exists();
|
||||
}
|
||||
|
||||
return ['id' => $v->id, 'version' => $v->version, 'act' => $v->act, 'payload' => $p, 'published_at' => $v->published_at, 'reason' => $v->reason];
|
||||
}
|
||||
|
||||
public function state(array $version): string
|
||||
{
|
||||
$p = $version['payload'];
|
||||
if (in_array($p['procedural_state'] ?? '', ['cancelled', 'results'], true)) {
|
||||
return $p['procedural_state'];
|
||||
}
|
||||
if (CarbonImmutable::parse($p['deadline'], $p['timezone'])->isPast()) {
|
||||
return 'deadline_ended';
|
||||
}
|
||||
|
||||
return ($p['extended'] ?? false) ? 'extended' : 'open';
|
||||
}
|
||||
|
||||
private function require(bool $condition, string $field, string $message): void
|
||||
{
|
||||
if (! $condition) {
|
||||
throw ValidationException::withMessages([$field => $message]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,9 +60,11 @@ final class SimulationFormDrafts
|
||||
throw new HttpException(409, 'Já existe um rascunho activo. Carregue-o antes de guardar novas alterações.');
|
||||
}
|
||||
|
||||
if ($case) $data['economic_snapshot'] = $this->landContext($data['economic_snapshot'], $case);
|
||||
$snapshotHash = hash('sha256', json_encode($this->canonical($data), JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE));
|
||||
$draft = SimulationFormDraft::query()->create([
|
||||
'id' => (string) Str::uuid(), 'owner_user_id' => $actorId, 'anonymous_token_hash' => $tokenHash,
|
||||
'version_no' => 1, 'create_key_hash' => $keyHash, 'create_payload_hash' => $payloadHash, 'snapshot_sha256' => $payloadHash,
|
||||
'version_no' => 1, 'create_key_hash' => $keyHash, 'create_payload_hash' => $payloadHash, 'snapshot_sha256' => $snapshotHash,
|
||||
'personal_snapshot' => SimulationFormDraft::encryptSnapshot($data['personal_snapshot']),
|
||||
'economic_snapshot' => SimulationFormDraft::encryptSnapshot($data['economic_snapshot']),
|
||||
'expires_at' => $actorId === null ? now()->addDays(30) : null,
|
||||
@@ -89,6 +91,7 @@ final class SimulationFormDrafts
|
||||
$this->checkContext($request, $draft);
|
||||
$this->requireMatch($request, $draft);
|
||||
$previousEconomic = SimulationFormDraft::decryptSnapshot($draft->economic_snapshot);
|
||||
$data['economic_snapshot'] = $this->preserveInactiveLandStatus($draft, $data['economic_snapshot'], $previousEconomic, $actorId);
|
||||
if (($data['economic_snapshot']['reuse_simulation'] ?? null) === 'no') {
|
||||
unset($data['economic_snapshot']['simulation_sources']);
|
||||
} elseif (is_array($previousEconomic['simulation_sources'] ?? null)) {
|
||||
@@ -456,6 +459,39 @@ final class SimulationFormDrafts
|
||||
return $query;
|
||||
}
|
||||
|
||||
private function preserveInactiveLandStatus(SimulationFormDraft $draft, array $economic, array $previous, ?int $actorId): array
|
||||
{
|
||||
if (! $actorId || ! config('investor-path.enabled') || ! app(VirtualDesk::class)->installed()) return $economic;
|
||||
// Use the real owner-bound dossier even if a request omits its context parameter.
|
||||
$case = DB::table('desk_cases')->where('simulation_id', $draft->id)->where('user_id', $actorId)->first();
|
||||
if (! $case) return $economic;
|
||||
return $this->landContext($economic, $case, $previous);
|
||||
}
|
||||
|
||||
private function landContext(array $economic, \stdClass $case, ?array $previous = null): array
|
||||
{
|
||||
$snapshot = json_decode($economic['context_applicability_snapshot'] ?? $previous['context_applicability_snapshot'] ?? '', true);
|
||||
$key = $economic['context_opportunity'] ?? $snapshot['consumer_opportunity'] ?? null;
|
||||
$key = app(InvestmentConsumerScope::class)->key(app(InvestorContext::class)->state($case), is_string($key) ? $key : null);
|
||||
$decision = app(InvestorContext::class)->landPreparation($case, $key);
|
||||
if ($decision['need'] !== 'yes' && $previous !== null) {
|
||||
if (array_key_exists('land_status', $previous)) $economic['land_status'] = $previous['land_status'];
|
||||
else unset($economic['land_status']);
|
||||
if (isset($previous['selection_labels']['land_status'])) $economic['selection_labels']['land_status'] = $previous['selection_labels']['land_status'];
|
||||
else unset($economic['selection_labels']['land_status']);
|
||||
}
|
||||
$snapshot = json_decode($economic['context_applicability_snapshot'] ?? $previous['context_applicability_snapshot'] ?? '', true);
|
||||
if (! is_array($snapshot) || ($snapshot['version'] ?? null) !== 1) {
|
||||
$snapshot = ['version' => 1, 'context_revision' => app(InvestorContext::class)->state($case)['revision']];
|
||||
}
|
||||
$snapshot['land_preparation'] = $decision;
|
||||
$snapshot['consumer_opportunity'] = $key;
|
||||
if ($key) $economic['context_opportunity'] = $key;
|
||||
$economic['context_applicability_snapshot'] = json_encode($snapshot, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);
|
||||
|
||||
return $economic;
|
||||
}
|
||||
|
||||
private function checkContext(Request $request, SimulationFormDraft $draft): void
|
||||
{
|
||||
$context = $request->input('context');
|
||||
|
||||
@@ -14,16 +14,31 @@ final class TerritoryGeometry
|
||||
abort_unless($geography->references($management)->where('id', $id)->exists(), 404);
|
||||
$path = $geography->path($id, $management);
|
||||
$ids = array_map(fn ($node) => $node->id, $path);
|
||||
$approved = app(ApprovedAdministrativeBoundaries::class);
|
||||
$rows = DB::table('geo_geometries as g')->join('geo_locations as l', 'l.id', '=', 'g.geo_location_id')
|
||||
->whereIn('g.geo_location_id', $ids)->whereNull('g.deleted_at')->whereNull('l.deleted_at')
|
||||
->whereIn('g.data_classification', $management ? ['internal', 'public'] : ['public'])
|
||||
->where(function ($query) use ($management, $approved) {
|
||||
$query->where('g.data_classification', 'public');
|
||||
$query->orWhere(function ($internal) use ($management, $approved) {
|
||||
$internal->where('g.data_classification', 'internal');
|
||||
if (! $management) {
|
||||
$internal->whereIn('g.id', array_keys($approved->snapshots()));
|
||||
}
|
||||
});
|
||||
})
|
||||
->whereRaw("g.properties->>'purpose' = 'administrative_boundary'")
|
||||
->whereIn('g.geometry_type', ['polygon', 'multipolygon'])
|
||||
->whereRaw('ST_IsValid(g.geom) AND NOT ST_IsEmpty(g.geom) AND ST_SRID(g.geom)=4326')
|
||||
->orderBy('g.geo_location_id')->orderBy('g.id')->limit(101)
|
||||
->get(['g.id', 'g.geo_location_id', 'l.name', 'l.location_type', 'g.properties', 'g.data_classification',
|
||||
DB::raw('ST_AsGeoJSON(ST_SimplifyPreserveTopology(g.geom,0.0001),6) as geometry')]);
|
||||
$areas = $rows->take(100)->map(function ($row) use ($id) {
|
||||
DB::raw('ST_AsGeoJSON(ST_SimplifyPreserveTopology(g.geom,0.0001),6) as geometry'),
|
||||
DB::raw("encode(sha256(ST_AsEWKB(g.geom)),'hex') as geometry_sha256"),
|
||||
DB::raw("encode(sha256(convert_to(g.properties::text,'UTF8')),'hex') as properties_sha256")]);
|
||||
if (! $management) {
|
||||
$rows = $rows->filter(fn ($row) => $row->data_classification === 'public'
|
||||
|| $approved->allows($row->id, $row->geo_location_id, $row->geometry_sha256, $row->properties_sha256))->values();
|
||||
}
|
||||
$areas = $rows->take(100)->map(function ($row) use ($id, $management) {
|
||||
$source = json_decode($row->properties, true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
return ['id' => $row->id, 'territory_id' => $row->geo_location_id, 'location_type' => $row->location_type,
|
||||
@@ -31,7 +46,7 @@ final class TerritoryGeometry
|
||||
'title' => 'Limite administrativo: '.$row->name, 'purpose' => 'administrative_boundary',
|
||||
'source_reference' => $source['authority'] ?? null, 'source_date' => $source['source_version'] ?? null,
|
||||
'source_url' => $source['source_url'] ?? null, 'source_sha256' => $source['source_sha256'] ?? null,
|
||||
'data_classification' => $row->data_classification, 'legal_currentness' => $source['legal_currentness'] ?? 'not_determined', 'url' => ''];
|
||||
'data_classification' => $management ? $row->data_classification : 'public', 'legal_currentness' => $source['legal_currentness'] ?? 'not_determined', 'url' => ''];
|
||||
})->all();
|
||||
|
||||
return ['territory_id' => $id, 'territory_registered' => true,
|
||||
|
||||
@@ -20,7 +20,7 @@ class TerritoryGeometryImport
|
||||
|
||||
private function guard(User $actor, bool $write = false): void
|
||||
{
|
||||
abort_unless($actor->can('manage-portal'), 403);
|
||||
abort_unless($actor->can('manage-portal') || app(ScopedPortalAdministration::class)->administrative($actor), 403);
|
||||
abort_unless(config('geometry-import.enabled'), 503, 'Importação cartográfica não disponibilizada.');
|
||||
if (! $write) {
|
||||
return;
|
||||
|
||||
@@ -170,11 +170,11 @@ class VirtualDesk
|
||||
});
|
||||
}
|
||||
|
||||
public function createRequest(User $actor, string $caseId, string $serviceId, string $clientKey): \stdClass
|
||||
public function createRequest(User $actor, string $caseId, string $serviceId, string $clientKey, ?string $opportunity = null): \stdClass
|
||||
{
|
||||
abort_unless(Str::isUuid($serviceId) && Str::isUuid($clientKey), 422);
|
||||
|
||||
return DB::transaction(function () use ($actor, $caseId, $serviceId, $clientKey) {
|
||||
return DB::transaction(function () use ($actor, $caseId, $serviceId, $clientKey, $opportunity) {
|
||||
$case = $this->case($actor, $caseId, true, true);
|
||||
abort_if($case->closed_at, 409, 'Dossier encerrado.');
|
||||
$service = DB::table('desk_service_versions')->where('id', $serviceId)->where('status', 'published')->first();
|
||||
@@ -197,7 +197,10 @@ class VirtualDesk
|
||||
$this->event($case, $actor, 'request_prefill_prepared', ['draft_id' => $draft->id, 'draft_version' => $draft->version_no, 'snapshot_sha256' => $draft->snapshot_sha256, 'fields' => ['title', 'description']]);
|
||||
}
|
||||
$context = app(InvestorContext::class)->state($case);
|
||||
$mapped = app(InvestorContext::class)->prefill($context)['desk'];
|
||||
if (count($context['opportunity_choices'] ?? []) > 1 && !$opportunity) $payload['description'] = '';
|
||||
$mapped = app(InvestorContext::class)->prefill($context, $opportunity)['desk'];
|
||||
if ($opportunity) $payload['context_opportunity'] = $opportunity;
|
||||
$payload = app(InvestmentConsumerScope::class)->bind($actor, $caseId, $payload);
|
||||
$serviceFields = json_decode($service->definition, true)['fields'];
|
||||
foreach (['territory_id' => 'territory_id', 'location_source' => 'location_source', 'title' => 'title', 'description' => 'description', 'sector' => 'sector', 'province_id' => 'province_id', 'district_id' => 'district_id', 'admin_post_id' => 'admin_post_id', 'locality_id' => 'locality_id'] as $field => $source) {
|
||||
if (isset($serviceFields[$field],$mapped[$source]) && (empty($payload[$field]) || in_array($field, ['title', 'description'], true) && $context['revision'] > 0)) {
|
||||
@@ -230,6 +233,12 @@ class VirtualDesk
|
||||
$draft = SimulationFormDraft::query()->whereKey($draft->id)->lockForUpdate()->firstOrFail();
|
||||
}
|
||||
$economic = SimulationFormDraft::decryptSnapshot($draft->economic_snapshot);
|
||||
$contextChoices = app(InvestorContext::class)->state($case)['opportunity_choices'] ?? [];
|
||||
if (count($contextChoices) > 1) {
|
||||
$snapshot = json_decode($economic['context_applicability_snapshot'] ?? '{}', true);
|
||||
$draftChoices = $snapshot['opportunity_choices'] ?? [];
|
||||
if (count($draftChoices) !== 1 || ($draftChoices[0]['opportunity']['key'] ?? null) !== ($payload['context_opportunity'] ?? null)) return null;
|
||||
}
|
||||
$description = (string) ($economic['project_summary'] ?? '');
|
||||
if (trim($description) === '') {
|
||||
return null;
|
||||
@@ -250,7 +259,9 @@ class VirtualDesk
|
||||
* @return array<string,mixed> */
|
||||
public function validateFields(array $payload, array $definition, bool $submitting): array
|
||||
{
|
||||
$rules = ['payload' => ['required', 'array:'.implode(',', [...array_keys($definition['fields']), 'country', 'declared_origin_country_code', 'context_reuse'])],
|
||||
$rules = ['payload' => ['required', 'array:'.implode(',', [...array_keys($definition['fields']), 'country', 'declared_origin_country_code', 'context_reuse', 'context_opportunity', 'context_opportunity_snapshot'])],
|
||||
'payload.context_opportunity' => ['nullable', 'string', 'max:100'],
|
||||
'payload.context_opportunity_snapshot' => ['nullable', 'string', 'max:200000'],
|
||||
'payload.context_reuse' => ['nullable', 'string', 'max:10000'],
|
||||
'payload.country' => ['nullable', 'string', 'max:100', app(CountryCatalogue::class)->legacyCountryRule()],
|
||||
'payload.declared_origin_country_code' => ['nullable', 'string', app(CountryCatalogue::class)->rule()]];
|
||||
@@ -334,6 +345,9 @@ class VirtualDesk
|
||||
}
|
||||
}
|
||||
$payload = $this->validateFields($data['payload'], $this->definition($request), $submit);
|
||||
if ($request->status !== 'returned' || in_array('context_opportunity', json_decode($request->editable_fields ?? '[]', true), true)) {
|
||||
$payload = app(InvestmentConsumerScope::class)->bind($actor, $request->case_id, $payload, $submit);
|
||||
}
|
||||
if ($request->status === 'returned') {
|
||||
$editable = json_decode($request->editable_fields ?? '[]', true);
|
||||
$previous = $this->decode($request->payload);
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
// Functional configuration expressly defined by Tempo, 23/10/2026.
|
||||
// Codes identify the existing national territorial registry; no geometry is inferred.
|
||||
return [
|
||||
'pemba-lichinga' => ['name' => 'Corredor de Pemba–Lichinga', 'provinces' => ['02', '01']],
|
||||
'nacala' => ['name' => 'Corredor de Nacala', 'provinces' => ['03']],
|
||||
'vale-zambeze' => ['name' => 'Corredor do Vale do Zambeze', 'provinces' => ['05', '04']],
|
||||
'beira' => ['name' => 'Corredor da Beira', 'provinces' => ['07', '06']],
|
||||
'limpopo' => ['name' => 'Corredor do Limpopo', 'provinces' => ['09']],
|
||||
// Tempo's final clarification: both Maputo Province and Maputo City.
|
||||
'maputo' => ['name' => 'Corredor de Maputo', 'provinces' => ['10', '11']],
|
||||
];
|
||||
@@ -0,0 +1,170 @@
|
||||
[
|
||||
{
|
||||
"external_id": "legacy-tempo-post-62413-20170626",
|
||||
"sha256": "b471c1afd7235f359acdcc16a93088f77e1f988706c8d3c4d4f11c5d560aea47",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-73945-20170731",
|
||||
"sha256": "2aa0ce0eb305bfdf93e390a978d3694d0fbc0129034077b68cebce418f878415",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-76474-20170808",
|
||||
"sha256": "8f769aec4715449d056c8c25294060b2ff290ec0893c28e9bdcc4e8092fc75f5",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-62414-20170626",
|
||||
"sha256": "a040c0b7cb95dd7f053f4d13662dd58b2b06453b6fa61a2d531d0257a8db8c17",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-62418-20170626",
|
||||
"sha256": "e8ccafa68f0d1aa80f2e41d9e09f7b13e7c653a8472a731798cfd5e04ce2963e",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-75002-20170804",
|
||||
"sha256": "7b6fbd998be2b47b96e9a4724560c192c502709fa308d6590c0797ddcdb10544",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-73246-20170728",
|
||||
"sha256": "430ee8674c71104fc126bed2911d676f150ac623857a1ada75662987fd9ac390",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-77232-20170811",
|
||||
"sha256": "27544d3127803b7495bef9fd633147d0225d8c31816c4d59ed05a2edd59de070",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-62416-20170626",
|
||||
"sha256": "ac575ce340571192552c89b63f0bd62a84dbc47828e6930133af5ff70e249319",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-62929-20170627",
|
||||
"sha256": "488017b062c6760659d9147b7f12aea4afd8d824121adb9462e2c7a2ae58437b",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-62649-20170626",
|
||||
"sha256": "38a858713472759a2d20a308bdd9d8afa9cfb76dcaf8d11ca709e89261573e42",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-62739-20170626",
|
||||
"sha256": "5870fc0fad9bb7af537b7b1468151cde138b1b886ce846c7be25647b630245dd",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-62854-20170627",
|
||||
"sha256": "44b1ba9d593bb625cf53de8909e78eb0b3129742c3ec9d58ec68c984e8930bce",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-63128-20170627",
|
||||
"sha256": "74be8f29e5053f53ab1a39a2f63208145c30f23357ca6d78b637dd02bf9c1fb4",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-63181-20170627",
|
||||
"sha256": "3d0f9ac14d36156d8178e33f8616d6406f31ea4cd69c8308cbf4227586d7ccb3",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-63146-20170627",
|
||||
"sha256": "542353466cc6d82b651619c495f138b0576a4be41d21aad194ae2005050cb1bc",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-62688-20170626",
|
||||
"sha256": "a210a789b06d425822f4124f74226a2b27246c086c5ec5f041f1b2237d7c2b65",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-63248-20170628",
|
||||
"sha256": "6c30e61197b8568332af6d9b19bbba7ad8665b3873bb031a8c8aedd41536b060",
|
||||
"kind": "historico_noticioso",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-173220-20260616",
|
||||
"sha256": "5b76c3d84dcf7f9a489686d90e3857ae6536705c918e841310bb42b354e80976",
|
||||
"kind": "setorial",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-173222-20260616",
|
||||
"sha256": "e64d7063d1ac4dda028c97e1ba64938d2a9e426a0b630c57ee5df52a41312cc7",
|
||||
"kind": "setorial",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-173482-20260915",
|
||||
"sha256": "6f888e133a779c719073246f89bcae150198e5897c0e7d9b7ba75f54c54a7830",
|
||||
"kind": "trabalho_domestico",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-173484-20260915",
|
||||
"sha256": "297df455a9c6fd1f0ab7ca7bbe124ce483c86fe55be26baa695f03089b3ac049",
|
||||
"kind": "trabalho_domestico",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-173478-20260915",
|
||||
"sha256": "d4e320ed99dd9d53d205e47932f73651976d43081d5d39f2bfc2996901408644",
|
||||
"kind": "trabalho_domestico",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-173480-20260915",
|
||||
"sha256": "c3ee6401eda5b582c61969b5e3b74fdf26ef34ca481b1aca8c4c309d845147ae",
|
||||
"kind": "trabalho_domestico",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-173476-20260915",
|
||||
"sha256": "72fbf28391db4804e0637b64e7f59e9fa597812a2681b4562dc3d6dfb4093a30",
|
||||
"kind": "trabalho_domestico",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-173470-20260915",
|
||||
"sha256": "26feeae6b8d04972c7a64ee360583cccdcaeb4b0d8795fd7bc2fd3c38866cc19",
|
||||
"kind": "trabalho_domestico",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-173474-20260915",
|
||||
"sha256": "9fa741a17b746bfa2f3ce7b6ce1d2bb34d3a35d3b58330b0554f9e0a6844f049",
|
||||
"kind": "trabalho_domestico",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
},
|
||||
{
|
||||
"external_id": "legacy-tempo-post-173463-20260915",
|
||||
"sha256": "4f34b7bac4b3030c0614844d379f6e3cfad1b7f6ea3db575a58c33ae033b0e73",
|
||||
"kind": "trabalho_domestico",
|
||||
"original_image_sha256": "28f41f12e10ab34545d8e432f6e8c74f86960e17e0c4a9956f514bcde4881eaa"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'enabled' => (bool) env('PROCUREMENT_ENABLED', false),
|
||||
'regimes' => ['state' => 'Contratação pública do Estado', 'external' => 'Financiamento externo', 'private' => 'Concurso privado', 'other' => 'Outro regime documentado'],
|
||||
'acts' => ['initial' => 'Anúncio inicial', 'clarification' => 'Esclarecimento', 'correction' => 'Rectificação', 'extension' => 'Prorrogação', 'award' => 'Resultado / adjudicação', 'cancellation' => 'Cancelamento', 'other' => 'Outro acto'],
|
||||
];
|
||||
@@ -0,0 +1,181 @@
|
||||
{
|
||||
"source": "investimentos nos corredores.docx",
|
||||
"source_sha256": "1473b06c48aa234e771660e3f2a51b9d2e4e1943bd52d878e0ae854ee6657055",
|
||||
"introduction": "Os corredores de desenvolvimento integram cadeias de valor prioritárias que podem ser apresentadas no portal InvesteMoz como oportunidades concretas de investimento na produção, transformação, logística e comercialização. Para cada corredor, são destacadas abaixo as oportunidades associadas aos produtos com maior potencial.",
|
||||
"segments": [
|
||||
"Produção primária e fornecimento de insumos",
|
||||
"Processamento e transformação agro-industrial",
|
||||
"Armazenagem, cadeia de frio e logística",
|
||||
"Embalagem, distribuição, comercialização e exportação",
|
||||
"Infraestruturas e serviços de apoio às cadeias de valor"
|
||||
],
|
||||
"groups": [
|
||||
{
|
||||
"name": "Corredor de Pemba–Lichinga",
|
||||
"opportunities": [
|
||||
{
|
||||
"chain": "Batata, trigo, feijão, milho e soja",
|
||||
"description": "Produção comercial, armazenamento e processamento de batata, trigo, feijão, milho e soja."
|
||||
},
|
||||
{
|
||||
"chain": "Algodão",
|
||||
"description": "Descaroçamento, fiação e produção de óleo e derivados de algodão."
|
||||
},
|
||||
{
|
||||
"chain": "Sésamo",
|
||||
"description": "Limpeza, prensagem, embalagem e exportação de sésamo."
|
||||
},
|
||||
{
|
||||
"chain": "Florestas",
|
||||
"description": "Viveiros, plantações comerciais, madeira processada e produtos florestais sustentáveis."
|
||||
},
|
||||
{
|
||||
"chain": "Avicultura",
|
||||
"description": "Produção de rações, incubação, criação, abate e cadeia de frio para avicultura."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Corredor de Nacala",
|
||||
"opportunities": [
|
||||
{
|
||||
"chain": "Mandioca",
|
||||
"description": "Produção e transformação de mandioca em farinha, amido e outros derivados."
|
||||
},
|
||||
{
|
||||
"chain": "Milho, amendoim e sésamo",
|
||||
"description": "Produção, armazenagem e processamento de milho, amendoim e sésamo."
|
||||
},
|
||||
{
|
||||
"chain": "Algodão",
|
||||
"description": "Descaroçamento e transformação de algodão."
|
||||
},
|
||||
{
|
||||
"chain": "Frutas e caju",
|
||||
"description": "Pomares, processamento, embalagem e exportação de frutas e caju."
|
||||
},
|
||||
{
|
||||
"chain": "Florestas",
|
||||
"description": "Silvicultura comercial, madeira processada e produtos florestais."
|
||||
},
|
||||
{
|
||||
"chain": "Avicultura",
|
||||
"description": "Produção de rações, criação, abate e distribuição de produtos avícolas."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Corredor do Vale do Zambeze",
|
||||
"opportunities": [
|
||||
{
|
||||
"chain": "Arroz",
|
||||
"description": "Produção irrigada, moagem, embalagem e comercialização de arroz."
|
||||
},
|
||||
{
|
||||
"chain": "Milho e batata",
|
||||
"description": "Produção, secagem, armazenagem e transformação de milho e batata."
|
||||
},
|
||||
{
|
||||
"chain": "Sésamo",
|
||||
"description": "Limpeza, prensagem e exportação de sésamo."
|
||||
},
|
||||
{
|
||||
"chain": "Algodão",
|
||||
"description": "Descaroçamento e transformação de algodão."
|
||||
},
|
||||
{
|
||||
"chain": "Avicultura",
|
||||
"description": "Produção de rações, incubação, criação e abate de aves."
|
||||
},
|
||||
{
|
||||
"chain": "Bovinos e caprinos",
|
||||
"description": "Criação, engorda, abate, processamento de carne e cadeia de frio para bovinos e caprinos."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Corredor da Beira",
|
||||
"opportunities": [
|
||||
{
|
||||
"chain": "Milho, trigo e arroz",
|
||||
"description": "Produção, silos, moagem e processamento de milho, trigo e arroz."
|
||||
},
|
||||
{
|
||||
"chain": "Soja",
|
||||
"description": "Esmagamento de soja, produção de óleo vegetal e fabrico de rações."
|
||||
},
|
||||
{
|
||||
"chain": "Hortícolas",
|
||||
"description": "Produção irrigada, conservação, embalagem e distribuição de hortícolas."
|
||||
},
|
||||
{
|
||||
"chain": "Sésamo",
|
||||
"description": "Limpeza, prensagem e exportação de sésamo."
|
||||
},
|
||||
{
|
||||
"chain": "Açúcar",
|
||||
"description": "Produção e refinação de açúcar e aproveitamento de subprodutos."
|
||||
},
|
||||
{
|
||||
"chain": "Florestas",
|
||||
"description": "Plantações comerciais, processamento de madeira e produtos florestais."
|
||||
},
|
||||
{
|
||||
"chain": "Carne bovina",
|
||||
"description": "Criação, engorda, abate, processamento e cadeia de frio para carne bovina."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Corredor do Limpopo",
|
||||
"opportunities": [
|
||||
{
|
||||
"chain": "Arroz",
|
||||
"description": "Produção irrigada, moagem, embalagem e comercialização de arroz."
|
||||
},
|
||||
{
|
||||
"chain": "Hortícolas",
|
||||
"description": "Produção em estufas e campo aberto, conservação, embalagem e distribuição de hortícolas."
|
||||
},
|
||||
{
|
||||
"chain": "Carne vermelha",
|
||||
"description": "Criação, engorda, abate, processamento e cadeia de frio para carne vermelha."
|
||||
},
|
||||
{
|
||||
"chain": "Avicultura",
|
||||
"description": "Produção de rações, incubação, criação, abate e distribuição de produtos avícolas."
|
||||
},
|
||||
{
|
||||
"chain": "Infraestruturas e serviços de apoio",
|
||||
"description": "Infraestruturas de irrigação, armazenagem, transporte refrigerado e centros de comercialização."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Corredor de Maputo",
|
||||
"opportunities": [
|
||||
{
|
||||
"chain": "Arroz",
|
||||
"description": "Produção irrigada, moagem, embalagem e fornecimento de arroz aos mercados urbanos e regionais."
|
||||
},
|
||||
{
|
||||
"chain": "Hortícolas",
|
||||
"description": "Produção, conservação, embalagem, transformação e distribuição de hortícolas."
|
||||
},
|
||||
{
|
||||
"chain": "Carne vermelha",
|
||||
"description": "Criação, engorda, abate, processamento, distribuição e exportação regional de carne vermelha."
|
||||
},
|
||||
{
|
||||
"chain": "Avicultura",
|
||||
"description": "Produção de rações, incubação, criação, abate e comercialização de produtos avícolas."
|
||||
},
|
||||
{
|
||||
"chain": "Infraestruturas e serviços de apoio",
|
||||
"description": "Plataformas logísticas, centros de distribuição, cadeia de frio e serviços de exportação."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"sector": "Agronegócio"
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('portal_tenders', function (Blueprint $t) {
|
||||
$t->uuid('id')->primary();
|
||||
$t->jsonb('draft');
|
||||
$t->unsignedInteger('version')->default(1);
|
||||
$t->uuid('published_version_id')->nullable();
|
||||
$t->foreignId('created_by')->constrained('users')->restrictOnDelete();
|
||||
$t->timestampsTz();
|
||||
});
|
||||
Schema::create('portal_tender_versions', function (Blueprint $t) {
|
||||
$t->uuid('id')->primary();
|
||||
$t->foreignUuid('tender_id')->constrained('portal_tenders')->restrictOnDelete();
|
||||
$t->unsignedInteger('version');
|
||||
$t->string('act', 24);
|
||||
$t->jsonb('payload');
|
||||
$t->text('reason');
|
||||
$t->foreignId('actor_id')->constrained('users')->restrictOnDelete();
|
||||
$t->timestampTz('published_at')->nullable();
|
||||
$t->timestampTz('created_at')->useCurrent();
|
||||
$t->unique(['tender_id', 'version']);
|
||||
});
|
||||
Schema::create('portal_tender_watches', function (Blueprint $t) {
|
||||
$t->foreignUuid('tender_id')->constrained('portal_tenders')->restrictOnDelete();
|
||||
$t->foreignId('user_id')->constrained('users')->restrictOnDelete();
|
||||
$t->uuid('seen_version_id')->nullable();
|
||||
$t->timestampsTz();
|
||||
$t->primary(['tender_id', 'user_id']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if (DB::table('portal_tenders')->exists()) {
|
||||
throw new RuntimeException('Preserve procedures, acts and history; use a reviewed data reversal.');
|
||||
}
|
||||
Schema::dropIfExists('portal_tender_watches');
|
||||
Schema::dropIfExists('portal_tender_versions');
|
||||
Schema::dropIfExists('portal_tenders');
|
||||
}
|
||||
};
|
||||
@@ -4,6 +4,10 @@ Data: 2026-10-03. Âmbito: prompt master recebido em `Pasted text.txt`, document
|
||||
|
||||
## Estado inicial e ambiente
|
||||
|
||||
**Orientação de publicação e percurso do lote, 23/10/2026:** as 34 oportunidades de Agronegócio ficam publicáveis sem relações obrigatórias com corredores/clusters/projectos. Lacuna encontrada: a comparação múltipla existente não era transportada ao dossier. Correcção aditiva no contexto cifrado existente, com escolhas identificadas e localização por ficha, confirmação de alternativa, requisitos/fontes/documentos/entidades por contexto, reutilização no simulador e conservação de resultados/histórico. Sete testes do contexto (132 asserções) e um do lote pela sessão HTTP (15) passaram. Publicação QA efectuada; instalação no destino separa código, cadastro privado e divulgação autenticada. Ver [orientação e guia no manual](unification/traceability-and-manual.md). Não altera Turismo de Inhambane nem concede benefícios por localização. Lacunas de modalidade/dimensão/acto concreto permanecem explícitas, sem nova revalidação de fontes oficiais aceites.
|
||||
|
||||
**Correcção de âmbito, 23/10/2026 — agronegócio e percurso existente:** a lista informativa instalada não encerrava o cadastro. Preparadas e efectivamente cadastradas 34 oportunidades privadas em QA, com as seis designações documentais intactas, sector, fonte/hash e lacunas explícitas. Reutilizada a candidata de divulgação promocional `9d3bfa89` no fluxo necessário, sem alterações independentes de administração de contas nem novos papéis. Equipa edita/recupera e divulga/actualiza/retira pela interface; público acede à ficha individual, manifestação e roteiro com referência confirmada no mesmo dossier. Três testes específicos, 553 asserções; tipos/build concluídos; tabelas/linhas preexistentes comparadas e preservadas. As divulgações dos testes foram revertidas; as 34 fichas permanecem privadas. Sem alteração da homologação nesta correcção. Carregamento inicial técnico QA já executado; não é dependência das operações correntes. Guia, limites e recibo na [secção de correcção do manual](unification/traceability-and-manual.md#correcção-de-âmbito--34-oportunidades-cadastradas-e-roteiro-em-qa-23102026). Não encerra viabilidade, implantação, financiamento ou execução das oportunidades.
|
||||
|
||||
| Item | Evidência observada |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Branch / commit | `main` / `4f35313d06ccd597a4ebf9ed043964d898c95813` |
|
||||
@@ -318,4 +322,34 @@ Situação comum observada: `publication_status=draft`, `validation_status=valid
|
||||
|
||||
### Referência da entrada única de gestão — QA, 22/10/2026
|
||||
|
||||
Nos requisitos existentes `MASTER-9f6dd1d9-0001`, `MASTER-9f6dd1d9-0003` e `MASTER-02f44baf-0002`, acrescentar como evidência delimitada a secção «Entrada única de gestão — preparação em QA, 22/10/2026» do manual de rastreabilidade e `tests/Feature/ContentManagementEntryTest.php`: quatro testes/99 asserções, ClamAV real e reversão transaccional em QA. Origem do objectivo e das regras operacionais: decisão expressa da Tempo; navegação, filtros e recuperação do upload são escolhas de implementação. Reutilizados biblioteca, armazenamento, perfis e histórico. Não altera os critérios de aceitação nem fecha os requisitos integrais: integração/contas reais e categorias não demonstradas conservam o seu estado. Geometrias permanecem separadas.
|
||||
Nos requisitos existentes `MASTER-9f6dd1d9-0001`, `MASTER-9f6dd1d9-0003` e `MASTER-02f44baf-0002`, acrescentar como evidência delimitada a secção «Entrada única de gestão — preparação em QA, 22/10/2026» do manual de rastreabilidade e `tests/Feature/ContentManagementEntryTest.php`: quatro testes/99 asserções, ClamAV real e reversão transaccional em QA. Origem do objectivo e das regras operacionais: decisão expressa da Tempo; navegação, filtros e recuperação do upload são escolhas de implementação. Reutilizados biblioteca, armazenamento, perfis e histórico. Não altera os critérios de aceitação nem fecha os requisitos integrais: integração/contas reais e categorias não demonstradas conservam o seu estado. Geometrias permanecem separadas.
|
||||
|
||||
|
||||
AUD-GEO-02/03: Recuperação da demarcação territorial — QA, 22/10/2026. 408/581 limites recuperados em QA; cadeia territorial guardada/reaberta no portal. Homologacao ainda sem reposicao; consultar a nova secao no manual existente. Mantidas 173 correspondencias pendentes e ausencia de geometrias proprias das localidades. Origem: pedido expresso da Tempo de recuperar funcionalidade; enquadramento e mensagens sao escolhas tecnicas. Nao encerra o criterio de reposicao no destino.
|
||||
|
||||
|
||||
AUD-GEO-02/03 - 22/10/2026: Demarcação territorial reposta na homologação — 22/10/2026. 408 limites (11/133/264) importados pela conta real/MFA, com tres recibos auditados; backup/restauro de 171 tabelas conferido, 333 ficheiros verificados. Consulta do mapa demonstrada na oportunidade real #30, sem a alterar. Acessos previstos e originais privados preservados. Reposicao no destino concluida; 26+147 correspondencias e ausencia de poligonos proprios de localidades mantidas como lacunas reais. Ver fecho e guia no manual existente; sem repetir provas QA aceites.
|
||||
|
||||
### Incremento Concursos e anúncios — QA, 22/10/2026
|
||||
|
||||
Instalação autorizada e concluída na homologação em 22/10/2026: integração funcional `f4d09709`, schema selectivo/contrato/activação conferidos após backup e restauro isolado de 171 tabelas. Gestão real com MFA: cadastro, recuperação e prévia de rascunho privado auditado; catálogo público 200, zero anúncios publicados. Preservados dados/permissões/originais e geometrias. Evidência e links finais em «Instalação concluída na homologação» no manual e `unification/procurement-installation-receipt-20261022.json`. Provas QA aceites reutilizadas. Este fecho substitui o estado de proposta pendente de instalação abaixo, sem declarar aceite pela Tempo o guia não conferido nem expandir o âmbito para recepção de propostas.
|
||||
|
||||
Proposta de entrega da candidata `1bcf34c0`: ver «Proposta de instalação compatível com deploy automático» no manual existente. Identificados três novos cadastros e o gate real de contrato de migrations do pipeline. Sequência proposta: revisão → coordenação do deploy → backup/restauro isolado → migration selectiva autenticada com flag desligada → contrato → integração/build/promoção → activação → conferência do delta no destino. Reversão conserva tabelas, actos, auditoria e originais posteriores; não restaura backup antigo sobre dados novos. Provas QA reutilizadas; nenhuma integração, migration remota, activação ou publicação real executada nesta passagem. A Tempo ainda não conferiu links locais/guia; não registar aceitação nem entrega no destino por essa razão.
|
||||
|
||||
Nos requisitos existentes de gestão/publicação `MASTER-9f6dd1d9-0001`, `MASTER-9f6dd1d9-0003` e `MASTER-02f44baf-0002`, registar o recorte solicitado pela Tempo: procedimentos com regime/edição/fontes, lotes, rascunhos recuperáveis, prévia, actos versionados, catálogo/ficha/anexos anónimos, filtros, impressão e acompanhamento por conta simples. Evidência: secção «Concursos e anúncios — implementação em QA» do manual existente e `tests/Feature/ProcurementTest.php`, com passagem adicional no navegador dos três regimes, prorrogação, cancelamento, download e acompanhamento. Reutilizadas autorizações e biblioteca; não foram criados papéis ou aprovadores. Origem funcional: pedido expresso da Tempo; flag, prévia assinada e controlo de versão são escolhas técnicas. Entrega delimitada a QA: integração em main, migração/activação no destino e anúncios reais seguem o processo existente. Não fecha requisitos integrais de contratação/recepção de propostas, nem declara parametrizado todo o articulado legal. Geometrias permanecem no recorte separado já entregue.
|
||||
|
||||
### Preservação do concluído e reposição — 23/10/2026
|
||||
|
||||
Origem: pedido expresso da Tempo de inventariar o concluído e repor funcionalidades desaparecidas antes de outra ronda de testes/validações. Inventariados os mesmos 43 componentes do manual e os 17 percursos da matriz executável existente; os componentes de interface referenciados estão presentes. Estados históricos foram reconciliados com entregas posteriores, sem revogar aceitações por falta de nova prova. Não se criou nova matriz/backlog nem se promoveu uma funcionalidade parcial a concluída.
|
||||
|
||||
Perda confirmada: carteira e projectos âncora. Os 29 dossiers existiam em homologação, todos em rascunho, apesar de os exemplares locais idênticos estarem publicados com aprovação documental do proprietário de 26/09. Conteúdo, fonte e título conferidos por identidade/código e hashes nos 29; o commit `e65cb269` de 06/10 retirou o caminho de publicação com essa aprovação do importador. Isso explica a diferença do processo de instalação; não prova quando a visibilidade desapareceu de um endereço específico. Reposta a visibilidade dos 15 projectos, 8 clusters e 6 corredores em QA e homologação, com versões e 29 eventos de reposição; sem importação, reescrita de conteúdos, alteração dos mestres ou novas aprovações/papéis.
|
||||
|
||||
Backup/restauro fresco de 174 tabelas antes da escrita activa; depois da reposição, 171 tabelas inalteradas. Diferenças limitadas a dossiers, auditoria e sessões. Biblioteca, 20 artigos públicos, 28 privados, geometrias e permissões preservados. Conferência pública delimitada: carteira 29, projectos 15, clusters 8, corredores 6. Sem suite geral de testes nesta passagem. Evidência, limites e regra de preservação em `unification/preservation-inventory-20261023.json`, secção «Preservação do concluído — inventário e reposição» do manual e instrução permanente de 23/10 em `AGENTS.md`.
|
||||
|
||||
### Acervo legado — correspondência e preparação QA, 22/10/2026
|
||||
|
||||
Fecho do delta privado na homologação: candidata `fb4e7d89` integrada em `65eddf6b`; backup/restauro isolado, transporte privado e cadastro autenticado dos 28 concluídos, sem publicação. Pesquisa/editor/prévia/recuperação conferidos para os 28; gravação/recuperação visual da revisão 3 pela conta real no recurso 32. Originais, registos anteriores e permissões preservados. Recibo `unification/legacy-editorial-installation-receipt-20261022.json` e secção «Legado — cadastro privado concluído na homologação» do manual. Publicação e revisão editorial efectiva cabem à equipa pela interface; dois originais continuam incompletos. Não fecha nem diagnostica a falha separada da carteira/projectos âncora, nem constitui aceitação do commit/pacote pela Tempo.
|
||||
|
||||
Actualização do mesmo requisito: os 28 rascunhos têm edição, leitura privada, prévia sem guardar, recuperação e publicação/retirada pela interface em QA, preservando originais, origem e revisões. Seis testes/1.000 asserções, TypeScript e build passaram; publicação positiva apenas em transacções revertidas. Pacote privado v2 preparado com 28 originais e proveniência; não transportado nem publicado na homologação. Guia, permissões existentes, lacunas de imagens, dependências da entrega e reversão na secção «Legado — edição e leitura dos 28 rascunhos em QA» do manual. Pedido funcional expresso da Tempo; hash de âmbito, prévia e controlo de versão são escolhas técnicas, sem novo papel/aprovador. Conserva o saldo de 20 públicos aceites e dois originais incompletos, sem repetir provas ou fechar a integração integral.
|
||||
|
||||
Referência do acervo legado, 22/10/2026: a lista única `v2/auditoria-portal/legado-correspondencia-integral.md` e o CSV existente reconciliam 50 identidades (20 publicados, 28 por integrar no destino, um vazio, um sem título). 20/20 páginas conferidas por HTTP anónimo/identidade/origem; cartões de Turismo observados no destino. Os 28 restantes avançaram para rascunhos internos QA, com ClamAV real e repetição idempotente, sem publicação. Recibo e limites no manual, secção «Legado — correspondência integral e avanço privado QA». As duas lacunas editoriais foram confirmadas no original. Não fecha a integração integral nem substitui revisão editorial por prova HTTP; nenhuma alteração activa nesta passagem.
|
||||
|
||||
@@ -78,3 +78,6 @@
|
||||
"Cópia privada ou derivado";"C:\laragon\www\portal-investidor\storage\app\private\portal-documents\b0ea969a-30ec-477b-8b8b-b7af82a11bfe";"b0ea969a-30ec-477b-8b8b-b7af82a11bfe";"67067";"5C69B6F189A1D3F5307E0CF7DD8224554705158A682637D3105AFAD615DB26E2";"b0ea969a-30ec-477b-8b8b-b7af82a11bfe";"C:\laragon\www\portal-investidor\storage\app\private\geo-ine-review-20260928\original.pdf + C:\laragon\www\portal-investidor\storage\app\private\geo-ine-review-20260928-v2\original.pdf + C:\laragon\www\portal-investidor\storage\app\private\portal-documents\b0ea969a-30ec-477b-8b8b-b7af82a11bfe";"Private stored copy already represented by its document record";"Acessível em armazenamento privado";"Inventariado por caminho, tamanho e SHA-256; não publicado nem aberto nesta revisão."
|
||||
"Formulario fornecido Tempo";"\\Mac\Home\Documents\TEMPO\Portal Tempo\Servicos Tempo\portal do investidor\Notas\Novo Modelo A.docx";"Novo Modelo A.docx";"532008";"62C198E90D8C6792F7D5CCEFC6386DF2E4B6089573067D3A6E1EAE7FC2B9572B";"IVA Modelo A - exemplar Tempo";"";"Original privado na biblioteca QA; sem publicacao ou activacao";"Acessivel / importado QA / privado / scan limpo";"Imagem incorporada lida visualmente; edicao/vigencia nao certificada. Correspondencia na reconciliacao Modelo A, AUD-SIM-INT02. Variante de bytes preservada, nao duplicado por nome."
|
||||
"Formulario fornecido Tempo";"\\Mac\Home\Documents\TEMPO\Portal Tempo\Servicos Tempo\portal do investidor\Notas\Novo Modelo A v1.docx";"Novo Modelo A v1.docx";"532100";"63D45FA80DB17A60B43619D55A25813229D670D14C758273F86316285DB8E02B";"IVA Modelo A - exemplar Tempo";"";"Original privado na biblioteca QA; sem publicacao ou activacao";"Acessivel / importado QA / privado / scan limpo";"Imagem incorporada lida visualmente; edicao/vigencia nao certificada. Correspondencia na reconciliacao Modelo A, AUD-SIM-INT02. Variante de bytes preservada, nao duplicado por nome."
|
||||
"Documento oficial localizado para consultaQA";"C:\laragon\www\portal-investidor\outputs\iva-l1-g5d-offer-drafts-20261024\BR-11-I-2010-03-17-despacho-modelos.pdf";"BR-11-I-2010-03-17-despacho-modelos.pdf";"376928";"384fb46354e1888df43f72288dfed7933e30c7534211e0dcb6994f43b10e0059";"BR11/I Série17/03/2010,DespachoMF06/01/2010,ModelosRCBFDecreto56/2009";"";"Preservar original e origem;sem publicação/importação/activação de regra";"Acessível";"PDF1–5 lidos;ModeloI.1versoPDF3 localizado;âmbito ligação14(3)/alterações por conferir,sem nova autenticação da fonte oficial"
|
||||
"Fonte oficial localizada para cotejoQA";"C:\laragon\www\portal-investidor\outputs\iva-l1-g6e-supplies-20261024\Decreto56-2009-BR40.pdf";"Decreto56-2009-BR40.pdf";"422005";"6ea1b8d93daed48c6d590481d874010fa1708211d8f27c319dc9a31328456017";"Decreto56/2009/CBFLei4/2009 — originalBR40 ecompilaçãoMIREME";"";"Preservar original/origem;sem publicação ou activação de cálculo";"Acessível";"CotejoModeloI.1;âmbitoCBF não demonstra remissãoCIVA14(3);não autenticação adicional"
|
||||
"Fonte oficial localizada para cotejoQA";"C:\laragon\www\portal-investidor\outputs\iva-l1-g6e-supplies-20261024\MIREME-legislacao-investimentos.pdf";"MIREME-legislacao-investimentos.pdf";"1674566";"df50f6a489ffb35a4252fddec0ffa1f9c58d7b8cb4e54c9f25b7904bd39218b7";"Decreto56/2009/CBFLei4/2009 — originalBR40 ecompilaçãoMIREME";"";"Preservar original/origem;sem publicação ou activação de cálculo";"Acessível";"CotejoModeloI.1;âmbitoCBF não demonstra remissãoCIVA14(3);não autenticação adicional"
|
||||
|
||||
|
@@ -24,3 +24,6 @@
|
||||
"docs/investmoz/simulations/official-source-register.md";"sumário oficial INM do BR 134/2024";"https://www.inm.gov.mz/pt-br/content/sum%C3%A1rio-br-n%C2%BA-134-de-110724-boletim-da-rep%C3%BAblica-i-serie-p%C3%A1g-2827";"Não identificado por esta referência; URL registada";"Referência de pesquisa/documentação; não conta como ficheiro importado";"Manter como fonte externa a obter/conferir; não activa regra fiscal"
|
||||
"docs/investmoz/simulations/official-source-register.md";"ficha oficial INM do aviso";"https://www.inm.gov.mz/pt-br/content/assembleia-da-rep%C3%BAblica-br-n%C2%BA-89-de-080617-boletim-da-rep%C3%BAblica-i-serie-p%C3%A1g-569";"Não identificado por esta referência; URL registada";"Referência de pesquisa/documentação; não conta como ficheiro importado";"Manter como fonte externa a obter/conferir; não activa regra fiscal"
|
||||
"docs/investmoz/simulations/official-source-register.md";"reprodução integral de terceiro, auxiliar";"https://www.lexlink.eu/FileGet.aspx?FileId=2999523";"Não identificado por esta referência; URL registada";"Referência de pesquisa/documentação; não conta como ficheiro importado";"Manter como fonte externa a obter/conferir; não activa regra fiscal"
|
||||
"docs/investmoz/simulations/iva-l1-p084-p085-draft-preparation-qa-20261024.json";"BR11/2010,DespachoMF06/01/2010,ModeloI.1versoPDF3";"https://www.cipmoz.org/wp-content/uploads/2023/parcerias-publico-privadas/9PP%29%20Despacho_Mecanismos%20Implementacao%20do%20Regulamento%20do%20Codigo%20dos%20Beneficios%20Fiscais.pdf";"C:\laragon\www\portal-investidor\outputs\iva-l1-g5d-offer-drafts-20261024\BR-11-I-2010-03-17-despacho-modelos.pdf";"Original oficialBR obtido/hash;âmbito específico ainda por conferir";"Consulta autorizada;sem publicação ou activação fiscal"
|
||||
"docs/investmoz/simulations/iva-l1-p084-p085-model-i1-cotejo-20261024.json";"Decreto56/2009/RegCBFLei4/2009,origemModeloI.1";"https://fracessoriasa.co.mz/wp-content/uploads/2021/03/10-Decreto-n_56.2009-REGULAMENTO-DOS-BENEFICIOS-FISCAIS.pdf";"C:\laragon\www\portal-investidor\outputs\iva-l1-g6e-supplies-20261024\Decreto56-2009-BR40.pdf";"OriginalBR ecompilaçãooficial obtidos/hash,âmbito cotejado";"Sem correspondênciaCIVA14(3)demonstrada;sem publicação ou activação fiscal"
|
||||
"docs/investmoz/simulations/iva-l1-p084-p085-model-i1-cotejo-20261024.json";"Decreto56/2009/RegCBFLei4/2009,origemModeloI.1";"https://mireme.gov.mz/wp-content/uploads/2022/03/Lei-e-Regualamento-das-zonas-francas-industriais-investimentos.pdf";"C:\laragon\www\portal-investidor\outputs\iva-l1-g6e-supplies-20261024\MIREME-legislacao-investimentos.pdf";"OriginalBR ecompilaçãooficial obtidos/hash,âmbito cotejado";"Sem correspondênciaCIVA14(3)demonstrada;sem publicação ou activação fiscal"
|
||||
|
||||
|
@@ -0,0 +1,710 @@
|
||||
{
|
||||
"date": "2026-10-23",
|
||||
"decision": "Pedido expresso da Tempo: aplicar o anexo de identidade visual aos cinco cartões de Encontre o contexto do seu investimento.",
|
||||
"instructionSource": {
|
||||
"path": "C:\\Users\\jorge\\.codex\\attachments\\637b878f-1f58-490d-bd07-d5cd10ae2377\\Pasted text.txt",
|
||||
"sha256": "fcc24dcce4b5df3f10e29add48052808d48ddcf674d052287854e11910e01d69"
|
||||
},
|
||||
"source": {
|
||||
"type": "AI-generated photorealistic illustrative images",
|
||||
"tool": "image_gen, built-in mode",
|
||||
"skill": "C:/Users/jorge/.codex/skills/.system/imagegen/SKILL.md",
|
||||
"externalPhotographsUsed": false,
|
||||
"namedRealLocationsDepicted": false,
|
||||
"note": "Cenas ilustrativas plausíveis, sem atribuição a instalações, pessoas, instituições ou projectos reais."
|
||||
},
|
||||
"analysisAndPlan": "docs/investmoz/public-portal-sections.md#fotografias-nos-cartões-de-contexto-do-investimento--23102026",
|
||||
"filesChanged": [
|
||||
"resources/js/pages/PortalInvestidor.tsx",
|
||||
"resources/js/components/investment-context-cards.tsx",
|
||||
"tools/portal-context-cards-qa.mjs",
|
||||
"docs/investmoz/public-portal-sections.md",
|
||||
"docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv",
|
||||
"docs/investmoz/public-portal-context-images.json"
|
||||
],
|
||||
"images": [
|
||||
{
|
||||
"key": "clusters-agroindustria",
|
||||
"prompt": "Use case: photorealistic-natural. Asset type: an individual navigation card photograph for a professional investment portal. Generate ONE clean, realistic editorial photograph in horizontal 16:9 composition. Natural daylight, realistic restrained colours, excellent photographic detail, balanced uncluttered framing, one clear subject readable at a small thumbnail size. Contemporary setting plausible in Mozambique in southern Africa. This is a generic illustrative scene, NOT a depiction or claim about any named real facility, project, landmark or institution. No text, lettering, titles, captions, logos, brands, watermarks, flags, official emblems, maps, diagrams, graphical overlays, UI elements, collages, artificial colour filters, futuristic architecture or advertising poster treatment. Realistic people, hands, equipment and perspective; dignified candid activity instead of posed stock photography. Subject: a modest, well maintained agro-processing packing facility linking commercial agriculture to local industry. Wide three-quarter view into an airy open-sided processing shed with pale walls and a few orderly wooden or reusable produce crates, stainless processing/sorting benches and an unobtrusive commercial agricultural field visible beyond. Two Black southern African workers in clean practical workwear sorting harvested vegetables naturally, faces not prominent. Show production and transformation together in ONE genuine-looking continuous scene, no montage. Clear simple geometry, warm-neutral sunlight, subtle vegetation.",
|
||||
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-f72e66b0-d788-4476-8b20-c39b22d5d6dc.png",
|
||||
"original": "outputs/investment-context-20261023/originals/clusters-agroindustria.png",
|
||||
"originalSha256": "75e04a694081ab757831fc9b37323949d09806e622c83d07588fc47c423c9033",
|
||||
"originalDimensions": {
|
||||
"width": 1672,
|
||||
"height": 941
|
||||
},
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/investment-context/clusters-agroindustria.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 116796,
|
||||
"sha256": "12494b31ab551cffb79f81c7d1519c0c4a2d4236e7f129bec1ce32251b39d847"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-context/clusters-agroindustria-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 42060,
|
||||
"sha256": "76e3152c99ed188f748542dcf0464787307dbdc1c6299e7264dfd1bd86ad75e3"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-context/clusters-agroindustria-fallback.webp",
|
||||
"width": 240,
|
||||
"height": 135,
|
||||
"bytes": 9596,
|
||||
"sha256": "9f668da50f7d64955b31940d239b420ac18dbb76a8120c8bedab3f2c04710288"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "corredores-logisticos",
|
||||
"prompt": "Use case: photorealistic-natural. Asset type: an individual navigation card photograph for a professional investment portal. Generate ONE clean, realistic editorial photograph in horizontal 16:9 composition. Natural daylight, realistic restrained colours, excellent photographic detail, balanced uncluttered framing, one clear subject readable at a small thumbnail size. Contemporary setting plausible in Mozambique in southern Africa. This is a generic illustrative scene, NOT a depiction or claim about any named real facility, project, landmark or institution. No text, lettering, titles, captions, logos, brands, watermarks, flags, official emblems, maps, diagrams, graphical overlays, UI elements, collages, artificial colour filters, futuristic architecture or advertising poster treatment. Realistic people, hands, equipment and perspective; dignified candid activity instead of posed stock photography. Subject: a commercial freight terminal serving a southern African logistics corridor. Elevated medium-wide viewpoint showing an orderly short line of unbranded freight containers, one realistic container-handling crane and a freight truck on a paved lane, with a calm strip of water and low coastal industrial vegetation in the distance. Infrastructure of credible modest contemporary scale, generic and unidentifiable; do not reproduce or name Maputo, Beira, Nacala or any real port. Spatially coherent containers, road and handling equipment; clean clear subject with no excessive machinery.",
|
||||
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-0363da23-f9cb-413b-bb64-024539085c4b.png",
|
||||
"original": "outputs/investment-context-20261023/originals/corredores-logisticos-v2.png",
|
||||
"originalSha256": "2151d1a59265c6f7151d18af6ef6ad78f9fc6e0cd58ac9cc5c64b50a25c5058e",
|
||||
"originalDimensions": {
|
||||
"width": 1672,
|
||||
"height": 941
|
||||
},
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/investment-context/corredores-logisticos-v2.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 85184,
|
||||
"sha256": "1939c26df297588b6c3e5ea08b700d4cda5d1183cf3e5faed06a1ca060d2475e"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-context/corredores-logisticos-v2-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 26222,
|
||||
"sha256": "06dc0e7126cb2c13eb3f9a98f6ee58f5d64f9d07c28620975f744f263744fe15"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-context/corredores-logisticos-v2-fallback.webp",
|
||||
"width": 240,
|
||||
"height": 135,
|
||||
"bytes": 5334,
|
||||
"sha256": "f9fd6e6c3a2d4654df1a8fdb287e122f1889b5d318c104c4816ee393c793e242"
|
||||
}
|
||||
],
|
||||
"selectedSource": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-c2cff7da-d602-4191-9aca-380918a09619.png",
|
||||
"editPrompt": "Edit the provided photograph: REMOVE THE ENTIRE FOREGROUND TRUCK, including cab, wheels, long trailer and the red freight container on that trailer. The big truck at lower left/centre must be completely gone. Replace the removed truck's area with a continuous empty realistic paved road surface matching the surrounding pavement and road markings. Leave the stacked stationary freight containers along the quay, the water, the large port crane, the lifted container and workers. All remaining equipment and containers should have plain surfaces without readable lettering, logos, numbers or brands. No new truck, vehicle, symbol, text or overlay. Keep a single clean editorial photograph, natural lighting and horizontal 16:9 framing. Generic commercial port scene, not a named real facility."
|
||||
},
|
||||
{
|
||||
"key": "projectos-ancora",
|
||||
"prompt": "Use case: photorealistic-natural. Asset type: an individual navigation card photograph for a professional investment portal. Generate ONE clean, realistic editorial photograph in horizontal 16:9 composition. Natural daylight, realistic restrained colours, excellent photographic detail, balanced uncluttered framing, one clear subject readable at a small thumbnail size. Contemporary setting plausible in Mozambique in southern Africa. This is a generic illustrative scene, NOT a depiction or claim about any named real facility, project, landmark or institution. No text, lettering, titles, captions, logos, brands, watermarks, flags, official emblems, maps, diagrams, graphical overlays, UI elements, collages, artificial colour filters, futuristic architecture or advertising poster treatment. Realistic people, hands, equipment and perspective; dignified candid activity instead of posed stock photography. Subject: a small team of two Black southern African engineering professionals, one woman and one man, in realistic hard hats and restrained protective workwear, seen candidly from a three-quarter rear angle reviewing an unmarked folded technical plan at a utility-scale solar installation. Low rows of realistic blue solar panels and a simple low service building recede into a dry green southern African landscape. No readable drawing or numbers on the plan. Focus on credible engineering and investment project scale; clean composition, quiet professional atmosphere, no landmark or company identifiers.",
|
||||
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-19fcd882-542b-43c9-81e7-593fd75083f6.png",
|
||||
"original": "outputs/investment-context-20261023/originals/projectos-ancora.png",
|
||||
"originalSha256": "f23cf6e64307a280f3aa58741454a23480ac28fcae01a0810adf134b783a3a74",
|
||||
"originalDimensions": {
|
||||
"width": 1672,
|
||||
"height": 941
|
||||
},
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/investment-context/projectos-ancora.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 77114,
|
||||
"sha256": "de0b59774246fee982761de59618b3e7707c3fe30f2b1bcbb6017d4dce53c4dc"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-context/projectos-ancora-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 29484,
|
||||
"sha256": "268e405112ed341fce3c9792c3caa47053984100cd4a204453e31bbe5db6e890"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-context/projectos-ancora-fallback.webp",
|
||||
"width": 240,
|
||||
"height": 135,
|
||||
"bytes": 6750,
|
||||
"sha256": "db7e4b4382e09eb6b4f9f2a4603ccac4b4eacc53ba0f6776429e33dbf5131954"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "educacao-formacao",
|
||||
"prompt": "Use case: photorealistic-natural. Asset type: an individual navigation card photograph for a professional investment portal. Generate ONE clean, realistic editorial photograph in horizontal 16:9 composition. Natural daylight, realistic restrained colours, excellent photographic detail, balanced uncluttered framing, one clear subject readable at a small thumbnail size. Contemporary setting plausible in Mozambique in southern Africa. This is a generic illustrative scene, NOT a depiction or claim about any named real facility, project, landmark or institution. No text, lettering, titles, captions, logos, brands, watermarks, flags, official emblems, maps, diagrams, graphical overlays, UI elements, collages, artificial colour filters, futuristic architecture or advertising poster treatment. Realistic people, hands, equipment and perspective; dignified candid activity instead of posed stock photography. Subject: a candid technical training classroom with three Black southern African young adult students of different genders and one instructor working together at a practical electronics and computing workbench. Bright modest well maintained vocational classroom, natural window light, simple laboratory equipment and unbranded closed or angled laptops whose screens have no visible interface or text. Focus on two students engaged in a realistic small hands-on electronics exercise with normal anatomy and correct equipment proportions. Dignified contemporary clothing, natural concentration, professional skills and human capital investment, no posed smiles or stereotypes.",
|
||||
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-d21314d7-c726-41ad-862c-3c8b64df6b53.png",
|
||||
"original": "outputs/investment-context-20261023/originals/educacao-formacao.png",
|
||||
"originalSha256": "e59ec599e8c64ab84195d0cb37871d3102df178a13275806ca3b7f98e6bfa895",
|
||||
"originalDimensions": {
|
||||
"width": 1672,
|
||||
"height": 941
|
||||
},
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/investment-context/educacao-formacao.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 68224,
|
||||
"sha256": "e3e5dbd292cac555a45bcbd94a0fa6b60e6b710debc0c827c68603f40bfb8a28"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-context/educacao-formacao-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 27384,
|
||||
"sha256": "d3b743fbba7a8cb40e45999ee8c345cbfc0332cf85f5c5c2d6a5cf1240a395e4"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-context/educacao-formacao-fallback.webp",
|
||||
"width": 240,
|
||||
"height": 135,
|
||||
"bytes": 7156,
|
||||
"sha256": "0b2a12898043c57cf4354b54ebcba8adec8d41b3886bc574584ccc12af7b1e4c"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "documentos-formularios",
|
||||
"prompt": "Use case: photorealistic-natural. Asset type: an individual navigation card photograph for a professional investment portal. Generate ONE clean, realistic editorial photograph in horizontal 16:9 composition. Natural daylight, realistic restrained colours, excellent photographic detail, balanced uncluttered framing, one clear subject readable at a small thumbnail size. Contemporary setting plausible in Mozambique in southern Africa. This is a generic illustrative scene, NOT a depiction or claim about any named real facility, project, landmark or institution. No text, lettering, titles, captions, logos, brands, watermarks, flags, official emblems, maps, diagrams, graphical overlays, UI elements, collages, artificial colour filters, futuristic architecture or advertising poster treatment. Realistic people, hands, equipment and perspective; dignified candid activity instead of posed stock photography. Subject: a close-medium editorial photograph of a tidy modern administrative office desk where a Black southern African professional in a plain light blue shirt is naturally reviewing organised business documentation. Frame hands, desk and partial torso, no prominent portrait. Neat neutral folders, a few sheets with only faint out-of-focus non-readable printing, a pen and an unbranded laptop angled away with no visible UI. Soft window light, white and pale neutral surfaces with subtle blue accents. Absolutely no readable personal data, invented official seals or highlighted fake text; realistic fingers and documents, calm minimal composition.",
|
||||
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-f1c8e22e-6885-4578-ac7d-02692c5cc071.png",
|
||||
"original": "outputs/investment-context-20261023/originals/documentos-formularios.png",
|
||||
"originalSha256": "cfbd38a9cc9b9acf35f38220f5bd9c1ab1feafe411bc1d4bbdb3658de557e052",
|
||||
"originalDimensions": {
|
||||
"width": 1672,
|
||||
"height": 941
|
||||
},
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/investment-context/documentos-formularios.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 43002,
|
||||
"sha256": "70ddea3256e6a8d981b1fae5ee7b4de6c910d757137b79a59306c268c278402f"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-context/documentos-formularios-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 17996,
|
||||
"sha256": "436865c948acbb7b6e9e482bef8f5bd626c6960f2f155608e40dfcd0e76b84cb"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-context/documentos-formularios-fallback.webp",
|
||||
"width": 240,
|
||||
"height": 135,
|
||||
"bytes": 4958,
|
||||
"sha256": "fad6a6ab825a82ec2541d2e0c6de9d85486e4bbca159b912f87bec9cc0aeeba5"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"primaryImagesBytesTotal": 390320,
|
||||
"responsive480ImagesBytesTotal": 143146,
|
||||
"implementation": {
|
||||
"gridColumns": [
|
||||
1,
|
||||
2,
|
||||
4
|
||||
],
|
||||
"aspectRatio": "16:9",
|
||||
"responsiveImages": true,
|
||||
"lazyLoading": true,
|
||||
"altLanguage": "pt",
|
||||
"fallback": "Derivado pequeno da própria imagem; se também falhar, estado acessível Imagem indisponível, com dimensão reservada e link mantido.",
|
||||
"globalCSSChanged": false,
|
||||
"businessLogicChanged": false,
|
||||
"databaseChanged": false,
|
||||
"heroChanged": false
|
||||
},
|
||||
"visualReview": "Cinco composições individuais distintas, cores naturais e luz editorial; sem títulos/colagens ou mapas. A composição de Corredores foi revista para remover o camião com marca. Capturas em computador e telemóvel inspeccionadas.",
|
||||
"verification": {
|
||||
"browser": {
|
||||
"results": [
|
||||
{
|
||||
"width": 320,
|
||||
"dpr": 1,
|
||||
"columns": 1,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
|
||||
"width": 320,
|
||||
"height": 180
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
|
||||
"width": 320,
|
||||
"height": 180
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
|
||||
"width": 320,
|
||||
"height": 180
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
|
||||
"width": 320,
|
||||
"height": 180
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
|
||||
"width": 320,
|
||||
"height": 180
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 390,
|
||||
"dpr": 2,
|
||||
"columns": 1,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria.webp",
|
||||
"width": 389,
|
||||
"height": 219
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2.webp",
|
||||
"width": 389,
|
||||
"height": 219
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora.webp",
|
||||
"width": 389,
|
||||
"height": 219
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao.webp",
|
||||
"width": 389,
|
||||
"height": 219
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios.webp",
|
||||
"width": 389,
|
||||
"height": 219
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 768,
|
||||
"dpr": 1,
|
||||
"columns": 2,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
|
||||
"width": 384,
|
||||
"height": 216
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
|
||||
"width": 384,
|
||||
"height": 216
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
|
||||
"width": 384,
|
||||
"height": 216
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
|
||||
"width": 384,
|
||||
"height": 216
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
|
||||
"width": 384,
|
||||
"height": 216
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1024,
|
||||
"dpr": 1,
|
||||
"columns": 4,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
|
||||
"width": 256,
|
||||
"height": 144
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
|
||||
"width": 256,
|
||||
"height": 144
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
|
||||
"width": 256,
|
||||
"height": 144
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
|
||||
"width": 256,
|
||||
"height": 144
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
|
||||
"width": 256,
|
||||
"height": 144
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1440,
|
||||
"dpr": 2,
|
||||
"columns": 4,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1920,
|
||||
"dpr": 1,
|
||||
"columns": 4,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"fail": "primary",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"fail": "all",
|
||||
"status": "passed"
|
||||
}
|
||||
],
|
||||
"errors": [],
|
||||
"navigation": [
|
||||
"/clusters",
|
||||
"/corredores",
|
||||
"/projectos-ancora",
|
||||
"/educacao",
|
||||
"/documentos"
|
||||
],
|
||||
"databaseAccess": false
|
||||
},
|
||||
"script": "tools/portal-context-cards-qa.mjs",
|
||||
"screenshots": [
|
||||
"outputs/investment-context-20261023/cards-1024-dpr1.png",
|
||||
"outputs/investment-context-20261023/cards-1440-dpr2.png",
|
||||
"outputs/investment-context-20261023/cards-1920-dpr1.png",
|
||||
"outputs/investment-context-20261023/cards-320-dpr1.png",
|
||||
"outputs/investment-context-20261023/cards-390-dpr2.png",
|
||||
"outputs/investment-context-20261023/cards-768-dpr1.png",
|
||||
"outputs/investment-context-20261023/fallback-all.png",
|
||||
"outputs/investment-context-20261023/fallback-primary.png"
|
||||
],
|
||||
"types": {
|
||||
"command": "npm run types:check",
|
||||
"exitCode": 0
|
||||
},
|
||||
"lint": {
|
||||
"files": [
|
||||
"resources/js/components/investment-context-cards.tsx",
|
||||
"resources/js/pages/PortalInvestidor.tsx",
|
||||
"tools/portal-context-cards-qa.mjs"
|
||||
],
|
||||
"exitCode": 0
|
||||
},
|
||||
"build": {
|
||||
"command": "npm run build",
|
||||
"exitCode": 0,
|
||||
"pageAsset": "assets/PortalInvestidor-fh5VZanx.js",
|
||||
"log": "outputs/investment-context-20261023/build-local.log"
|
||||
}
|
||||
},
|
||||
"scope": "Aplicado no código e pacote locais. API e navegação simuladas na verificação visual; sem dados activos ou publicação externa.",
|
||||
"matrixReferences": [
|
||||
"MASTER-efd550fd-0104",
|
||||
"MASTER-55050f60-0001"
|
||||
],
|
||||
"acceptanceLimit": "Prova restrita à apresentação e navegação dos cinco cartões; não encerra critérios funcionais mais amplos da matriz.",
|
||||
"layoutRevision": {
|
||||
"date": "2026-10-23",
|
||||
"decision": "Pedido expresso da Tempo: título a vermelho e menos espaço em branco dentro dos cartões.",
|
||||
"changes": "Título no vermelho #ed1c24; removidas alturas mínimas de título e descrição; preenchimento 20→16 px, intervalo 8→6 px e entrelinhas 28/24→24/20 px. Mantidos imagens, conteúdos, links e alinhamento por linha da grelha.",
|
||||
"browser": {
|
||||
"results": [
|
||||
{
|
||||
"width": 320,
|
||||
"dpr": 1,
|
||||
"columns": 1,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
|
||||
"width": 320,
|
||||
"height": 180
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
|
||||
"width": 320,
|
||||
"height": 180
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
|
||||
"width": 320,
|
||||
"height": 180
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
|
||||
"width": 320,
|
||||
"height": 180
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
|
||||
"width": 320,
|
||||
"height": 180
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 390,
|
||||
"dpr": 2,
|
||||
"columns": 1,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria.webp",
|
||||
"width": 389,
|
||||
"height": 219
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2.webp",
|
||||
"width": 389,
|
||||
"height": 219
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora.webp",
|
||||
"width": 389,
|
||||
"height": 219
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao.webp",
|
||||
"width": 389,
|
||||
"height": 219
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios.webp",
|
||||
"width": 389,
|
||||
"height": 219
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 768,
|
||||
"dpr": 1,
|
||||
"columns": 2,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
|
||||
"width": 384,
|
||||
"height": 216
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
|
||||
"width": 384,
|
||||
"height": 216
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
|
||||
"width": 384,
|
||||
"height": 216
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
|
||||
"width": 384,
|
||||
"height": 216
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
|
||||
"width": 384,
|
||||
"height": 216
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1024,
|
||||
"dpr": 1,
|
||||
"columns": 4,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
|
||||
"width": 256,
|
||||
"height": 144
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
|
||||
"width": 256,
|
||||
"height": 144
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
|
||||
"width": 256,
|
||||
"height": 144
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
|
||||
"width": 256,
|
||||
"height": 144
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
|
||||
"width": 256,
|
||||
"height": 144
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1440,
|
||||
"dpr": 2,
|
||||
"columns": 4,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1920,
|
||||
"dpr": 1,
|
||||
"columns": 4,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
|
||||
"width": 266,
|
||||
"height": 149
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"fail": "primary",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"fail": "all",
|
||||
"status": "passed"
|
||||
}
|
||||
],
|
||||
"errors": [],
|
||||
"navigation": [
|
||||
"/clusters",
|
||||
"/corredores",
|
||||
"/projectos-ancora",
|
||||
"/educacao",
|
||||
"/documentos"
|
||||
],
|
||||
"databaseAccess": false
|
||||
},
|
||||
"lintExitCode": 0,
|
||||
"buildExitCode": 0,
|
||||
"pageAsset": "assets/PortalInvestidor-CYCMhSzW.js",
|
||||
"screenshots": [
|
||||
"outputs/investment-context-compact-20261023/cards-1024-dpr1.png",
|
||||
"outputs/investment-context-compact-20261023/cards-1440-dpr2.png",
|
||||
"outputs/investment-context-compact-20261023/cards-1920-dpr1.png",
|
||||
"outputs/investment-context-compact-20261023/cards-320-dpr1.png",
|
||||
"outputs/investment-context-compact-20261023/cards-390-dpr2.png",
|
||||
"outputs/investment-context-compact-20261023/cards-768-dpr1.png"
|
||||
],
|
||||
"databaseChanged": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
{
|
||||
"date": "2026-10-23",
|
||||
"decision": "Pedido expresso da Tempo: adaptar hero, imagens e pesquisa da referência, preservando a informação e os comportamentos equivalentes do V2.",
|
||||
"sourceProject": "D:/Projects/Tempo_Investidor/investidor",
|
||||
"targetProject": "D:/Projects/Tempo_Investidor/Investidor-V2",
|
||||
"planAndAnalysis": "docs/investmoz/public-portal-sections.md#adequação-do-hero--23102026",
|
||||
"implementation": [
|
||||
"resources/js/components/portal-hero.tsx",
|
||||
"resources/js/pages/PortalInvestidor.tsx"
|
||||
],
|
||||
"assets": [
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\investidor\\public\\images\\hero\\hero-1.png",
|
||||
"original": "public\\images\\hero\\hero-1.png",
|
||||
"sha256": "3c9246169025b9b1b4d1d10fb51c1f644123984bde56c6c2d9bf869d851024fc",
|
||||
"bytes": 2315768,
|
||||
"webpBytes": 94012,
|
||||
"mobileBytes": 38804
|
||||
},
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\investidor\\public\\images\\hero\\hero-3.jpg",
|
||||
"original": "public\\images\\hero\\hero-3.jpg",
|
||||
"sha256": "91377213b6286aca7ee4af90860a7dc7a75fa08a165ef7b3192081db43f92dff",
|
||||
"bytes": 9875137,
|
||||
"webpBytes": 140342,
|
||||
"mobileBytes": 32998
|
||||
}
|
||||
],
|
||||
"desktopBytesTotal": 234354,
|
||||
"mobileBytesTotal": 71802,
|
||||
"originalBytesTotal": 12190905,
|
||||
"verification": {
|
||||
"browser": {
|
||||
"results": [
|
||||
{
|
||||
"width": 320,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 390,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 768,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1440,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1920,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1440,
|
||||
"reducedMotion": "no-preference",
|
||||
"status": "passed"
|
||||
}
|
||||
],
|
||||
"errors": [],
|
||||
"requests": [
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=",
|
||||
"/oportunidades",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique"
|
||||
],
|
||||
"databaseAccess": false
|
||||
},
|
||||
"browserScript": "tools/portal-hero-qa.mjs",
|
||||
"screenshots": [
|
||||
"outputs/portal-hero-20261023/after-1440-no-preference.png",
|
||||
"outputs/portal-hero-20261023/after-1440-reduce.png",
|
||||
"outputs/portal-hero-20261023/after-1440-second-image.png",
|
||||
"outputs/portal-hero-20261023/after-1920-reduce.png",
|
||||
"outputs/portal-hero-20261023/after-320-reduce.png",
|
||||
"outputs/portal-hero-20261023/after-390-reduce.png",
|
||||
"outputs/portal-hero-20261023/after-768-reduce.png",
|
||||
"outputs/portal-hero-20261023/before-1440-reduce.png",
|
||||
"outputs/portal-hero-20261023/before-390-reduce.png"
|
||||
],
|
||||
"additionalCases": [
|
||||
"pesquisa por Enter e botão",
|
||||
"ordem do teclado: campo → botão",
|
||||
"query acentuada e pontuação preservadas",
|
||||
"remoção de espaços exteriores",
|
||||
"pesquisa vazia abre catálogo",
|
||||
"CTA abre oportunidades",
|
||||
"API indisponível mantém indicadores indeterminados",
|
||||
"contagens zero preservadas",
|
||||
"duas imagens carregadas",
|
||||
"selecção manual",
|
||||
"pausa e retoma explícitas",
|
||||
"foco pausa rotação",
|
||||
"rotação automática após perda de foco",
|
||||
"movimento reduzido",
|
||||
"entrada documental e cabeçalho preservados"
|
||||
],
|
||||
"existingFrontendTests": {
|
||||
"command": "node --test tests/frontend/portal-api.test.mjs tests/frontend/portal-navigation.test.mjs",
|
||||
"passed": 20
|
||||
},
|
||||
"typecheck": {
|
||||
"command": "npm run types:check",
|
||||
"exitCode": 0
|
||||
},
|
||||
"lint": {
|
||||
"files": [
|
||||
"resources/js/components/portal-hero.tsx",
|
||||
"resources/js/pages/PortalInvestidor.tsx",
|
||||
"tools/portal-hero-qa.mjs"
|
||||
],
|
||||
"exitCode": 0
|
||||
},
|
||||
"qaBuild": {
|
||||
"command": "INVESTMOZ_QA_BUILD=1 npm run build",
|
||||
"exitCode": 0
|
||||
},
|
||||
"localBuild": {
|
||||
"command": "npm run build",
|
||||
"exitCode": 0,
|
||||
"pageAsset": "assets/PortalInvestidor-MsUeKoJQ.js"
|
||||
}
|
||||
},
|
||||
"matrix": {
|
||||
"file": "docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv",
|
||||
"referencesAdded": [
|
||||
"MASTER-9dee08d0-0016",
|
||||
"MASTER-efd550fd-0104",
|
||||
"MASTER-55050f60-0001"
|
||||
],
|
||||
"rowCount": 3422,
|
||||
"criteriaAndStatesPreserved": true
|
||||
},
|
||||
"scope": {
|
||||
"appliedToLocalCodeAndBuild": true,
|
||||
"activeDatabaseChanged": false,
|
||||
"migrationsRun": false,
|
||||
"externalDeploymentPerformed": false,
|
||||
"backendSearchReimplemented": false
|
||||
},
|
||||
"limits": "Verificação visual com dados sintéticos; pesquisa continua limitada ao catálogo de oportunidades. Os critérios mais amplos da matriz permanecem no estado anterior.",
|
||||
"latestRevision": {
|
||||
"id": "hero-no-controls-20261023",
|
||||
"date": "2026-10-23",
|
||||
"decision": "Pedido expresso da Tempo: remover do hero as duas bolinhas e o botão de pausa das imagens.",
|
||||
"implementation": "Removidos grupo de controlos, ícones Pause/Play e estado de pausa manual. Preservadas troca automática, escrita dinâmica, pesquisa e preferência de movimento reduzido.",
|
||||
"browser": {
|
||||
"results": [
|
||||
{
|
||||
"width": 320,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 390,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 768,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1440,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1920,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 390,
|
||||
"reducedMotion": "no-preference",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1440,
|
||||
"reducedMotion": "no-preference",
|
||||
"status": "passed"
|
||||
}
|
||||
],
|
||||
"errors": [],
|
||||
"requests": [
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=",
|
||||
"/oportunidades",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=",
|
||||
"/oportunidades",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique"
|
||||
],
|
||||
"databaseAccess": false
|
||||
},
|
||||
"screenshots": [
|
||||
"outputs/portal-hero-no-controls-20261023/after-1440-no-preference.png",
|
||||
"outputs/portal-hero-no-controls-20261023/after-1440-reduce.png",
|
||||
"outputs/portal-hero-no-controls-20261023/after-1920-reduce.png",
|
||||
"outputs/portal-hero-no-controls-20261023/after-320-reduce.png",
|
||||
"outputs/portal-hero-no-controls-20261023/after-390-no-preference.png",
|
||||
"outputs/portal-hero-no-controls-20261023/after-390-reduce.png",
|
||||
"outputs/portal-hero-no-controls-20261023/after-768-reduce.png",
|
||||
"outputs/portal-hero-no-controls-20261023/second-image-1440.png",
|
||||
"outputs/portal-hero-no-controls-20261023/second-image-390.png",
|
||||
"outputs/portal-hero-no-controls-20261023/typed-1440.png",
|
||||
"outputs/portal-hero-no-controls-20261023/typed-390.png"
|
||||
],
|
||||
"checks": {
|
||||
"lintExitCode": 0,
|
||||
"buildExitCode": 0,
|
||||
"pageAsset": "assets/PortalInvestidor-T0B6aoV_.js"
|
||||
},
|
||||
"scope": {
|
||||
"appliedLocally": true,
|
||||
"databaseAccess": false,
|
||||
"externalDeployment": false
|
||||
}
|
||||
},
|
||||
"revisionHistory": [
|
||||
{
|
||||
"id": "hero-typing-20261023",
|
||||
"date": "2026-10-23",
|
||||
"decision": "Pedido expresso da Tempo: título e frase dinâmicos como na referência; remover Termos de uso do hero.",
|
||||
"plan": [
|
||||
"Analisar a sequência de escrita da referência.",
|
||||
"Animar o título e depois a frase, mantendo os textos do V2 e reservando a dimensão final.",
|
||||
"Reiniciar a escrita na troca de imagem e integrar pausa/retoma e preferência de movimento reduzido.",
|
||||
"Remover o link e o ícone jurídico do hero.",
|
||||
"Demonstrar comportamento em computador e telemóvel e compilar o pacote local."
|
||||
],
|
||||
"files": [
|
||||
"resources/js/components/portal-hero.tsx",
|
||||
"resources/css/app.css",
|
||||
"tools/portal-hero-qa.mjs"
|
||||
],
|
||||
"browser": {
|
||||
"results": [
|
||||
{
|
||||
"width": 320,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 390,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 768,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1440,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1920,
|
||||
"reducedMotion": "reduce",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 390,
|
||||
"reducedMotion": "no-preference",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1440,
|
||||
"reducedMotion": "no-preference",
|
||||
"status": "passed"
|
||||
}
|
||||
],
|
||||
"errors": [],
|
||||
"requests": [
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=",
|
||||
"/oportunidades",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
|
||||
"/oportunidades?q=",
|
||||
"/oportunidades",
|
||||
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique"
|
||||
],
|
||||
"databaseAccess": false
|
||||
},
|
||||
"screenshots": [
|
||||
"outputs/portal-hero-typing-20261023/after-1440-no-preference.png",
|
||||
"outputs/portal-hero-typing-20261023/after-1440-reduce.png",
|
||||
"outputs/portal-hero-typing-20261023/after-1440-second-image.png",
|
||||
"outputs/portal-hero-typing-20261023/after-1920-reduce.png",
|
||||
"outputs/portal-hero-typing-20261023/after-320-reduce.png",
|
||||
"outputs/portal-hero-typing-20261023/after-390-no-preference.png",
|
||||
"outputs/portal-hero-typing-20261023/after-390-reduce.png",
|
||||
"outputs/portal-hero-typing-20261023/after-768-reduce.png",
|
||||
"outputs/portal-hero-typing-20261023/typed-1440.png",
|
||||
"outputs/portal-hero-typing-20261023/typed-390.png",
|
||||
"outputs/portal-hero-typing-20261023/typing-1440.png",
|
||||
"outputs/portal-hero-typing-20261023/typing-390.png"
|
||||
],
|
||||
"demonstrated": [
|
||||
"escrita progressiva",
|
||||
"título antes da frase",
|
||||
"texto completo no modo de movimento reduzido",
|
||||
"nome acessível completo durante a escrita",
|
||||
"pesquisa sem deslocamento durante a escrita",
|
||||
"reinício na selecção manual e automática de imagem",
|
||||
"pausa e retoma da escrita",
|
||||
"cursor com pausa",
|
||||
"Termos de uso ausente do hero",
|
||||
"pesquisa, teclado, CTA, API indisponível e contagens zero preservados"
|
||||
],
|
||||
"checks": {
|
||||
"types": {
|
||||
"command": "npm run types:check",
|
||||
"exitCode": 0
|
||||
},
|
||||
"lint": {
|
||||
"command": "vp lint resources/js/components/portal-hero.tsx tools/portal-hero-qa.mjs",
|
||||
"exitCode": 0
|
||||
},
|
||||
"build": {
|
||||
"command": "npm run build",
|
||||
"exitCode": 0,
|
||||
"pageAsset": "assets/PortalInvestidor-BbVHeTeI.js",
|
||||
"log": "outputs/portal-hero-typing-20261023/build-local.log"
|
||||
}
|
||||
},
|
||||
"scope": {
|
||||
"appliedLocally": true,
|
||||
"databaseAccess": false,
|
||||
"externalDeployment": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -48,3 +48,91 @@ Edge headless: 11 páginas públicas/autenticação verificadas a 390×844, com
|
||||
Página inicial também verificada a 1440×1000. Cenário fiscal exercitado no navegador: base 1.000 × taxa 10% × (1 − redução 50%) = 50. Resultados em `public-portal-browser-validation.json`.
|
||||
|
||||
Antes da migration local foi criado e restaurado o backup de 74 tabelas em `storage/app/private/portal-services-backup-20260927-090641/`. O backup completo anterior permanece em `C:/laragon/backups/portal-investidor-20260927-101224/` e representa o estado anterior a esta entrega.
|
||||
|
||||
## Adequação do hero — 23/10/2026
|
||||
|
||||
Origem: pedido expresso da Tempo nesta sessão para aproveitar o hero, as imagens e a barra de pesquisa de `D:/Projects/Tempo_Investidor/investidor`, usando a informação existente no V2. Aplicam-se as orientações permanentes do `AGENTS.md`, incluindo a distinção entre decisão da Tempo e escolha técnica, a preservação de dados e a separação de QA e activo.
|
||||
|
||||
Análise prévia: a página de entrada real do V2 é `PortalInvestidor.tsx`, servida por `PortalServicesController::home`. A referência é `domains/investor-portal/components/homepage/homepage-hero.tsx`, montada em `InstitutionalHomepage`. A referência usa Inertia 2, Framer Motion, tradução e navegação diferentes; o V2 usa Inertia 3 e pesquisa de oportunidades. Copiar essas dependências e `/pesquisa` ou `/aviso-legal` directamente criaria incompatibilidades e destinos inexistentes.
|
||||
|
||||
Plano executado:
|
||||
|
||||
1. Registar a apresentação anterior em computador e telemóvel, com os componentes reais e dados sintéticos.
|
||||
2. Copiar os dois originais efectivamente usados pela referência (`hero-1.png` e `hero-3.jpg`), conferir SHA-256 e gerar derivados WebP para computador e telemóvel. `hero-2.png` não faz parte da rotação da referência.
|
||||
3. Extrair `components/portal-hero.tsx` e aplicar fotografias em rotação, texto centrado e pesquisa branca com botão vermelho. Preservar os textos do V2, contagens da API, sectores, documentos, apoio, cabeçalho e rodapé.
|
||||
4. Manter a pesquisa de oportunidades em `/oportunidades?q=`, incluindo pesquisa vazia e caracteres acentuados. Conservar “Consultar oportunidades” e “Planear finanças”. A primeira iteração acrescentou o acesso jurídico `/termos-de-uso` ao hero; foi removido na revisão expressamente pedida pela Tempo abaixo.
|
||||
5. Verificar apresentação, teclado, imagens, rotação, pausa, movimento reduzido, falha da API, contagens zero, TypeScript, lint e compilação. Compilar primeiro o pacote QA e depois os assets locais em `public/build`.
|
||||
|
||||
Escolhas técnicas desta adaptação: React e transições CSS existentes, sem novas dependências; rotação de oito segundos, pausa por controlo explícito, foco, ponteiro ou separador oculto; apresentação estática quando o utilizador pede movimento reduzido. A primeira iteração apresentou o texto estático; a revisão abaixo introduz a escrita dinâmica pedida pela Tempo. O campo indica pesquisa de oportunidades e conserva exemplos que o catálogo suporta; esta alteração não implementa uma pesquisa global de legislação/licenciamento.
|
||||
|
||||
Evidência reproduzível: `tools/portal-hero-qa.mjs`, com Vite local e Playwright configurável por `HERO_QA_PLAYWRIGHT`/`HERO_QA_CHROMIUM`. Fixtures e capturas em `outputs/portal-hero-20261023/`; síntese persistente em `public-portal-hero-validation.json`. Os testes de interface interceptam a API e a navegação Inertia, sem acesso a Laravel, base de dados ou serviços externos. A compilação local aplica os assets desta pasta; não representa publicação noutro servidor.
|
||||
|
||||
Referências na matriz existente: `MASTER-efd550fd-0104` (composição da página), `MASTER-9dee08d0-0016` (contexto da pesquisa) e `MASTER-55050f60-0001` (entrada documental preservada). Esta prova cobre a adaptação visual e os percursos exercitados; não encerra os critérios funcionais mais amplos dessas linhas.
|
||||
|
||||
### Revisão: escrita dinâmica e remoção do acesso jurídico no hero
|
||||
|
||||
Decisão expressa da Tempo na continuação da sessão de 23/10/2026: animar “INVISTA EM MOÇAMBIQUE” e “Transforme informação em decisões e ideias em negócios reais.” como na página de referência, e remover “Termos de uso” do hero. A anterior apresentação estática e a inclusão desse link eram escolhas de implementação, agora substituídas pelo pedido do proprietário.
|
||||
|
||||
Análise e plano executado: reproduzir a sequência da referência (espera inicial de 250 ms, título a 50 ms por carácter, intervalo de 150 ms e frase a 28 ms por carácter); reiniciar ao trocar de imagem; acrescentar o cursor intermitente; reservar a dimensão final de ambas as linhas para manter a pesquisa imóvel; remover o link e o ícone jurídico do hero; verificar em computador e telemóvel e compilar o pacote local.
|
||||
|
||||
Implementação em `portal-hero.tsx`, com React existente e CSS do cursor em `app.css`, sem dependências novas. A pausa explícita suspende também a escrita, retomando do mesmo ponto. Quando o separador fica oculto a escrita pára; a preferência de movimento reduzido apresenta os dois textos completos. Leitores de ecrã recebem o texto completo uma única vez, independentemente do número de caracteres visíveis. Os temporizadores são limpos ao mudar de imagem ou desmontar o componente.
|
||||
|
||||
O script `tools/portal-hero-qa.mjs` demonstra a escrita progressiva, a ordem título→frase, o reinício manual/automático, a pausa/retoma, a posição estável da pesquisa, o modo sem movimento e a ausência de “Termos de uso” no hero. As capturas e resultados desta revisão ficam em `outputs/portal-hero-typing-20261023/`, preservando a evidência anterior. Síntese e compilação final registadas na revisão de `public-portal-hero-validation.json`; referência acrescentada à linha existente `MASTER-efd550fd-0104`, sem encerrar o seu critério mais amplo.
|
||||
|
||||
### Revisão: remoção dos controlos visíveis das imagens
|
||||
|
||||
Pedido expresso da Tempo na continuação de 23/10/2026: remover do hero o grupo com o botão de pausa e as duas bolinhas de selecção de imagem. Removidos o grupo, os ícones e o estado de pausa manual. A troca automática de imagens e a escrita dinâmica permanecem; conservam-se a pausa da rotação por foco/ponteiro, a suspensão em separador oculto e a preferência de movimento reduzido. Esta decisão substitui os controlos visíveis introduzidos como escolha de implementação nas revisões anteriores.
|
||||
|
||||
O script existente de interface foi adaptado para demonstrar a ausência dos controlos e a continuação da rotação automática, escrita e pesquisa, com capturas em `outputs/portal-hero-no-controls-20261023/`. Evidência e pacote local registados em `public-portal-hero-validation.json`, mantendo o histórico das revisões e os estados dos requisitos da matriz.
|
||||
|
||||
## Fotografias nas etapas de Como Investir — 23/10/2026
|
||||
|
||||
Origem: pedido expresso da Tempo para analisar e ilustrar exclusivamente os cartões “1. Explorar”, “2. Preparar” e “3. Acompanhar”. Aplicam-se as orientações permanentes de `AGENTS.md` de 12/10 e 22/10/2026; componentes e optimização de recursos são escolhas técnicas, sem novas regras operacionais.
|
||||
|
||||
Análise e plano: os cartões existentes são âncoras estáticas na home React/Inertia, numa grelha de três colunas a partir de 768 px. Explorar liga a `/oportunidades` e representa a identificação de sector, território e oportunidade; Preparar liga a `/como-investir` e representa percurso/documentação; Acompanhar liga a `/balcao-virtual` e representa envio/consulta de pedido e protocolo. Os recursos locais existentes ilustram outras secções; preparar três fotografias distintas para evitar repetição. Gerar cenas editoriais plausíveis com `imagegen`, rever composição, guardar originais e versões WebP locais, integrar imagens 16:9 com dimensões reservadas e carregamento diferido, manter textos/destinos/título vermelho, verificar comportamento responsivo, navegação e falhas de imagem, compilar. Âmbito exclusivamente visual, sem alterações em dados, autenticação, apoio ou rodapé. Referência documental na linha existente `MASTER-efd550fd-0104`, sem criar outra matriz nem encerrar o critério mais amplo.
|
||||
|
||||
Implementação: `components/investment-steps.tsx` reúne os três cartões, preservando títulos, descrições e âncoras. Fotografias individuais geradas com a ferramenta integrada `image_gen`, sem local ou projecto real atribuído: avaliação de oportunidade num parque empresarial genérico, preparação documental numa reunião e consulta de pedido no computador. Originais em `outputs/investment-steps-20261023/originals/`; recursos locais em `public/images/investment-steps/` com WebP 960×540, 480×270 e alternativa própria 240×135. Os cartões usam `srcset`, `sizes`, `loading="lazy"`, dimensões reservadas, corte 16:9, alt em português, foco visível e texto compacto com 16 px de preenchimento. Se também falhar a alternativa pequena, o cartão mantém a área reservada, descrição acessível e destino utilizável.
|
||||
|
||||
Verificação desta secção: componentes reais com API sintética e sem base de dados, seis larguras de 320 a 1920 px, duas densidades de ecrã, três imagens distintas, texto/destinos conservados, navegação por teclado, ausência de transbordo e deslocamento no carregamento, falhas dos recursos principais e de todos os recursos. Oito cenários sem erros JavaScript. Fotografias, prompts, hashes, capturas, relatório de browser e compilação documentados em `public-portal-steps-images.json` e `outputs/investment-steps-20261023/`. Ajuste restrito a esta secção; apoio, acesso à gestão e rodapé mantidos.
|
||||
|
||||
## Fotografias nos cartões de contexto do investimento — 23/10/2026
|
||||
|
||||
Origem: pedido expresso da Tempo para aplicar o anexo “Melhorar as imagens e a identidade visual do Portal do Investidor de Moçambique” exclusivamente à secção “Encontre o contexto do seu investimento”. O anexo define estética fotográfica editorial, imagens individuais contextualizadas, recursos locais, acessibilidade, desempenho e preservação dos cinco destinos e conteúdos. Aplicam-se as orientações permanentes de `AGENTS.md` de 12/10 e 22/10/2026; os pormenores de implementação abaixo são escolhas técnicas.
|
||||
|
||||
Análise prévia: Laravel/Inertia 3 e React, com Tailwind existente; os cinco cartões estavam embutidos em `pages/PortalInvestidor.tsx`. `EducationalArticleCard` destina-se a artigos com acções e metadados diferentes, pelo que não foi alterado. A secção foi extraída para `components/investment-context-cards.tsx`, mantendo o título, descrições, âncoras e grelha de uma/duas/quatro colunas. Não foram alteradas as páginas de destino, dados, APIs ou estilos globais.
|
||||
|
||||
Foram geradas cinco imagens distintas com a ferramenta integrada `image_gen`, segundo a skill `imagegen`: agro-indústria, terminal logístico, acompanhamento de instalação solar, formação técnica e análise documental. São imagens fotográficas ilustrativas geradas, sem localização ou instituição real atribuída, e não fotografias documentais de projectos cadastrados. A imagem do terminal foi revista para remover o camião com marca visível. Não foram usadas fotografias externas nem URLs de serviços de imagens. Originais seleccionados, prompts e hashes estão registados no manifesto `public-portal-context-images.json`; os originais foram preservados dentro do workspace.
|
||||
|
||||
Recursos finais em `public/images/investment-context/`: `clusters-agroindustria`, `corredores-logisticos-v2`, `projectos-ancora`, `educacao-formacao` e `documentos-formularios`, em WebP 960×540, com variantes 480×270 e alternativas 240×135. As imagens mantêm 16:9, `object-cover`, textos alternativos em português, dimensões reservadas, `srcset`, `sizes`, `loading="lazy"` e descodificação assíncrona. Cada cartão conserva o seu título e descrição; o foco usa o azul e os tons neutros pedidos no anexo.
|
||||
|
||||
Se um recurso principal falhar, o cartão usa a sua própria variante pequena, evitando repetir a fotografia de outra secção. Se também essa falhar, apresenta “Imagem indisponível” no mesmo espaço reservado, com descrição acessível e link operacional. Este é apenas um estado de erro; os cinco cartões usam imagens fotográficas na apresentação normal.
|
||||
|
||||
Verificação reproduzível: `tools/portal-context-cards-qa.mjs`, com o portal e cabeçalho reais, API sintética e acesso exclusivo aos recursos locais. Exercita seis larguras de ecrã, ecrãs de alta densidade, os cinco destinos por teclado, imagens carregadas e distintas, alinhamento, dimensões, ausência de deslocamento no carregamento e dois cenários de falha. Capturas e resultados em `outputs/investment-context-20261023/`; síntese, fontes/prompts e compilação em `public-portal-context-images.json`. Referências acrescentadas às linhas existentes `MASTER-efd550fd-0104` e `MASTER-55050f60-0001`, sem encerrar os respectivos critérios mais amplos.
|
||||
|
||||
Revisão expressa da Tempo de 23/10/2026: título da secção no vermelho da identidade existente (`#ed1c24`) e cartões mais compactos. Removidas as alturas mínimas de 56 e 72 px do título/descrição; reduzidos o preenchimento de 20 para 16 px, o intervalo de 8 para 6 px e as entrelinhas. As alturas passam a acompanhar o conteúdo, com alinhamento por linha da grelha, conservando imagens, textos e destinos. A reserva das dimensões das imagens mantém-se. Evidência desta revisão em `outputs/investment-context-compact-20261023/` e no campo `layoutRevision` do manifesto existente.
|
||||
|
||||
## Sectores da home e catálogo completo — 23/10/2026
|
||||
|
||||
Origem: pedido expresso da Tempo para adaptar a estrutura de “Áreas de Investimento” do projecto `D:/Projects/Tempo_Investidor/tempo-dashboard`, incluindo cartões, botão para mais sectores e respectiva página, e uniformizar a vermelho os títulos das secções da home. Aplicadas as orientações permanentes `AGENTS.md` de 12/10 e 22/10/2026: as decisões de produto são da Tempo; as escolhas técnicas abaixo não criam requisitos organizacionais.
|
||||
|
||||
Análise prévia: a referência usa `components/investor-portal/homepage/homepage-sectors.tsx` e `pages/investor-portal/sectors/index.tsx`. Mostra cinco cartões com fotografia e título sobreposto, resumo, “Saiba mais” e ligação central arredondada para o catálogo. O V2 já dispunha de `/sectores`, fichas `/sectores/{slug}`, especialização Fintech e dados de `SectorOrganization`. Foram reutilizados esses contratos e percursos, sem importar Framer Motion, traduções ou rotas exclusivas da referência.
|
||||
|
||||
Implementação: `components/public-sector-cards.tsx` partilha os cartões entre a home e o catálogo. A home mostra os primeiros cinco sectores, na ordem recebida da API, com “Ler mais” para a ficha existente e “Ver mais sectores” para `/sectores`. A página existente apresenta todos os sectores publicados, na mesma estrutura visual, e “Voltar ao início”. Mantêm-se nomes, descrições, contagens, valores zero, especializações e URLs canónicos recebidos. Descrições ausentes não são preenchidas com dados da referência. Fintech permanece ligado à ficha própria, sem âncoras HTML aninhadas.
|
||||
|
||||
Foram inventariados os onze JPG disponíveis em `storage/app/public/investor-portal/sectors` na referência, copiados os originais para evidência e preparados derivados locais WebP 960×540/480×270 em `public/images/sectors/`. O mapeamento visual por slug é de apresentação e não altera a taxonomia. Para Imobiliário e sectores sem imagem específica usa-se a vista empresarial genérica disponível na referência; para Bens de Consumo e Franquias usa-se a imagem de actividade industrial. A variante genérica também serve como alternativa em caso de erro; se ambas falharem, o título e as ligações continuam visíveis num fundo neutro. Não se atribui aos ficheiros uma origem oficial, licença externa ou localização documental não comprovada.
|
||||
|
||||
Os seis títulos de secção da home — contexto do investimento, sectores, Como Investir, oportunidades em destaque, documentos essenciais e apoio — usam `HOME_SECTION_HEADING` em `lib/portal-presentation.ts`: vermelho `#ed1c24`, 24 px, entrelinha de 32 px e peso 700. O cartão de Apoio passou a superfície clara para manter contraste com o título vermelho. O título principal animado do hero mantém a sua hierarquia própria. `PORTAL_MORE_LINK` centraliza o botão arredondado, contorno vermelho e estado de foco, seguindo a referência.
|
||||
|
||||
Verificação: `tools/portal-home-sectors-qa.mjs` carrega os componentes reais com dez sectores sintéticos, descrições nulas e especialização Fintech, sem base de dados. Exercita seis larguras, prévia de cinco/cartálogo de dez, estilos dos seis títulos, percurso por teclado, dez fichas, Fintech, regresso à home, catálogo vazio e dois cenários de indisponibilidade de imagens. Capturas, inventário, hashes e resultados em `outputs/home-sectors-20261023/`; resumo persistente em `public-portal-sectors-validation.json`. Referências na matriz existente: `MASTER-efd550fd-0104` e `MASTER-9f5719c8-0077`. Esta adaptação não encerra critérios mais amplos nem altera dados, permissões, regras operacionais ou publicação noutro servidor.
|
||||
|
||||
Pedido expresso da Tempo, 23/10/2026 — botão “Contactar Apoio ao Investidor”: em `layouts/portal-navigation.tsx`, a faixa de largura total foi substituída por um botão centrado, com largura ajustada ao texto, altura mínima de 44 px, preenchimento reduzido, sombra discreta e vermelho `#ed1c24`, conservando `/apoio` e o foco visível. Verificado a 320, 390 e 1440 px: cerca de 223×44 px, sem transbordo ou erros JavaScript. Evidência em `outputs/support-button-20261023/qa-results.json` e capturas; compilação local no mesmo directório. Ajuste de apresentação por decisão do proprietário, sem nova regra operacional nem alteração de dados.
|
||||
|
||||
Revisão anterior de 23/10/2026, superada pela correcção de âmbito abaixo: o Codex interpretou o pedido de abreviação como aplicável à zona inferior inteira e alterou indevidamente o botão de apoio e o rodapé partilhado. Essa interpretação não foi uma decisão da Tempo. A revisão removeu o bloco interno, abreviou o botão para “Apoio” e recolheu contactos/ligações em “Informações” num rodapé claro; estas alterações fora do bloco indicado foram revertidas após a clarificação expressa do proprietário. O registo desta revisão é histórico e não descreve a apresentação actual.
|
||||
|
||||
Evidência histórica da revisão superada: `outputs/footer-compact-20261023/qa-results.json`, capturas e `check.mjs`. Não constitui aceitação do âmbito pelo proprietário.
|
||||
|
||||
Correcção expressa da Tempo, 23/10/2026: o pedido abrange exclusivamente o bloco “INVESTE Moçambique / Portal do Investidor — conheça as oportunidades… / Acesso à gestão”. Em `pages/PortalInvestidor.tsx`, esse bloco fica abreviado num ícone de acesso à gestão, com nome acessível e descrição “Acesso à gestão”, destino `/acesso-gestao`, área de interacção de 44 px e fundo branco, sem o título e parágrafo anteriores. O botão de apoio foi restaurado exactamente à apresentação anterior à abreviação: “Contactar Apoio ao Investidor”, compacto, vermelho e sem ícone. `components/tempo-footer.tsx` e os estilos `.tempo-footer` foram integralmente restaurados ao estado anterior, incluindo contactos e ligações visíveis e o fundo original do rodapé geral. Não se altera autenticação nem dados. Esta correcção substitui a interpretação indevida acima e mantém as restantes alterações previamente pedidas.
|
||||
|
||||
Evidência da correcção: `outputs/footer-scope-correction-20261023/check.mjs`, `qa-results.json`, capturas e `build-local.log`; componentes reais com API sintética a 320, 390 e 1440 px, ícone de gestão focável, bloco específico claro sem parágrafo, botão de apoio completo/vermelho, rodapé geral restaurado, contactos e ligações legais visíveis, sem transbordo ou erros JavaScript. Lint dos componentes alterados e compilação local. Referência na linha existente `MASTER-efd550fd-0104`, sem encerramento do critério amplo nem alteração dos seus estados.
|
||||
|
||||
Continuação expressa da Tempo, 23/10/2026: acrescentado o título visível “Acesso à gestão” ao lado do ícone nesse mesmo bloco, para tornar o destino compreensível. O acesso mantém-se compacto, vermelho e com fundo claro, conservando `/acesso-gestao`. Ajuste restrito a essa ligação; apoio e rodapé geral conservam a apresentação restaurada. Referência: `MASTER-efd550fd-0104` e a evidência da revisão anterior acima. Verificado a 320, 390 e 1440 px, sem transbordo ou erros JavaScript; lint e compilação aprovados. Evidência em `outputs/management-label-20261023/qa-results.json`, capturas e `build-local.log`. No pedido seguinte, a Tempo determinou o alinhamento desse acesso à esquerda; aplicado `justify-start` apenas no seu contentor.
|
||||
|
||||
@@ -0,0 +1,748 @@
|
||||
{
|
||||
"date": "2026-10-23",
|
||||
"decision": "Pedido expresso da Tempo: adaptar Áreas de Investimento do tempo-dashboard aos sectores da home e ao catálogo completo, copiar a estrutura dos botões e uniformizar a vermelho os títulos de secção da home.",
|
||||
"reference": {
|
||||
"project": "D:/Projects/Tempo_Investidor/tempo-dashboard",
|
||||
"files": [
|
||||
"resources/js/components/investor-portal/homepage/homepage-sectors.tsx",
|
||||
"resources/js/pages/investor-portal/sectors/index.tsx"
|
||||
],
|
||||
"structure": "Cinco cartões com fotografia, título sobreposto, resumo e acção de leitura; botão central arredondado/contorno vermelho para o catálogo."
|
||||
},
|
||||
"analysisAndPlan": "docs/investmoz/public-portal-sections.md#sectores-da-home-e-catálogo-completo--23102026",
|
||||
"filesChanged": [
|
||||
"resources/js/components/public-sector-cards.tsx",
|
||||
"resources/js/lib/portal-presentation.ts",
|
||||
"resources/js/components/investment-context-cards.tsx",
|
||||
"resources/js/lib/portal-api.ts",
|
||||
"resources/js/pages/PortalInvestidor.tsx",
|
||||
"resources/js/pages/portal/services.tsx",
|
||||
"tools/portal-home-sectors-qa.mjs",
|
||||
"docs/investmoz/public-portal-sections.md",
|
||||
"docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv"
|
||||
],
|
||||
"behaviour": {
|
||||
"homePreview": 5,
|
||||
"previewOrder": "Ordem recebida da API, sem novos filtros de publicação.",
|
||||
"readMore": "Ler mais, para a URL recebida ou ficha existente /sectores/{slug}.",
|
||||
"moreSectors": "Ver mais sectores, botão arredondado para /sectores.",
|
||||
"catalogue": "Todos os sectores publicados devolvidos pelo cadastro existente; Voltar ao início para /.",
|
||||
"specializations": "Fintech conservado como ligação própria; sem âncoras aninhadas.",
|
||||
"countsAndDescriptions": "Preservados dados recebidos, incluindo zero e descrições ausentes; não importados textos ou registos do outro projecto.",
|
||||
"headings": [
|
||||
{
|
||||
"title": "Encontre o contexto do seu investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Sectores de investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Como Investir",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Oportunidades em destaque",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Documentos essenciais",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Apoio ao Investidor",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
}
|
||||
],
|
||||
"supportCard": "Superfície clara para contraste com o título vermelho."
|
||||
},
|
||||
"assets": [
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\agronegocio.jpg",
|
||||
"sourceBytes": 444057,
|
||||
"original": "outputs/home-sectors-20261023/originals/agronegocio.jpg",
|
||||
"sha256": "7337b689a6ad8b0b4c8d716ea356db14e22bd2982089825bb2382121ed3482f6",
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/sectors/agronegocio.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 110310,
|
||||
"sha256": "3e9d3be22556300f880be39837f86e764e3d05433beff1da6694ef6cee1d5c34"
|
||||
},
|
||||
{
|
||||
"file": "public/images/sectors/agronegocio-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 31592,
|
||||
"sha256": "fd1f7624f7fd9224fc1c7bd11746806e419c645ba43c257b1edd9ba250cd47f1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\economia-azul.jpg",
|
||||
"sourceBytes": 456892,
|
||||
"original": "outputs/home-sectors-20261023/originals/economia-azul.jpg",
|
||||
"sha256": "1a2c04d0d9ed4a26129553daefd2ee18f6d820026ab1203acf3bcf91b0550f69",
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/sectors/economia-azul.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 107626,
|
||||
"sha256": "bf3751e66839c1b3c585c91ffe65d32b9ee79ebd7d08e5e2c95c6cd581b04f8f"
|
||||
},
|
||||
{
|
||||
"file": "public/images/sectors/economia-azul-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 29350,
|
||||
"sha256": "aaf8ee66709d8e15c4304690dd03830b4368d14468a597d5617ccdb71d614331"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\energia.jpg",
|
||||
"sourceBytes": 386678,
|
||||
"original": "outputs/home-sectors-20261023/originals/energia.jpg",
|
||||
"sha256": "a164e2c8ef155a6a198ae400feca132e79ba75e022473893ec48ebfa0557f679",
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/sectors/energia.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 81236,
|
||||
"sha256": "b5605d9bb8645c5042baa511aaf39fcb187080a48d8e067b130fc974c4c9196d"
|
||||
},
|
||||
{
|
||||
"file": "public/images/sectors/energia-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 21926,
|
||||
"sha256": "7e53977fc6ce11755455f8092ac3f8c7126f54d909a3935e522f8dae0ab834be"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\industria.jpg",
|
||||
"sourceBytes": 357131,
|
||||
"original": "outputs/home-sectors-20261023/originals/industria.jpg",
|
||||
"sha256": "d70c4257ac58a4b5e9f8b8b1a4cf6d98c0514043442c3ce46f5c98399038527f",
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/sectors/industria.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 80422,
|
||||
"sha256": "ca8ddd2d65647f1ed7a9906271fa2ea3d027f310b89434fd7781a37a3d18322d"
|
||||
},
|
||||
{
|
||||
"file": "public/images/sectors/industria-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 25194,
|
||||
"sha256": "8bd695231209c0042b94e68b0e2095fa7202297708dabff0f78b337500b8c9b7"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\infraestruturas.jpg",
|
||||
"sourceBytes": 395383,
|
||||
"original": "outputs/home-sectors-20261023/originals/infraestruturas.jpg",
|
||||
"sha256": "ac6cde89507af68991faebee19540f955146724d3be901839b85a4098fe1674b",
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/sectors/infraestruturas.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 86654,
|
||||
"sha256": "14754a59477e5c62a62c190be812c89d9616608b3c98acb6100ad70d94d34df0"
|
||||
},
|
||||
{
|
||||
"file": "public/images/sectors/infraestruturas-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 25772,
|
||||
"sha256": "eca58096087d05dae3eea2b4d063c103f9fc85b0ea20fc5051313cf9bfa1020f"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\logistica-transportes.jpg",
|
||||
"sourceBytes": 413702,
|
||||
"original": "outputs/home-sectors-20261023/originals/logistica-transportes.jpg",
|
||||
"sha256": "5976ead23da0d4e7d5debf875262f0229d389826aaeb7e7be4ebbac3f5129a9e",
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/sectors/logistica-transportes.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 96254,
|
||||
"sha256": "0d235e7bbd160cccd3f97daa3337d6b27fde49db9782ad2ba0599c6a83022b6c"
|
||||
},
|
||||
{
|
||||
"file": "public/images/sectors/logistica-transportes-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 28816,
|
||||
"sha256": "32f5137e0a7f6a7894b186edb2ca38f12cdfdca04dda3588de3969fb3d2e333a"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\mineracao.jpg",
|
||||
"sourceBytes": 415161,
|
||||
"original": "outputs/home-sectors-20261023/originals/mineracao.jpg",
|
||||
"sha256": "7e6d1e5a17d434456ad937680a6c5501bd33bd624d2cc7ebf4b643185a9440aa",
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/sectors/mineracao.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 96642,
|
||||
"sha256": "12c93df378f54108b13260c10d29789564af7844cc84bcd9281d2be917d83354"
|
||||
},
|
||||
{
|
||||
"file": "public/images/sectors/mineracao-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 26034,
|
||||
"sha256": "be3e7763fb8cd2e02f576204269821c40d93a7c155d8088a5084064b7269e4d6"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\outros-sectores.jpg",
|
||||
"sourceBytes": 328152,
|
||||
"original": "outputs/home-sectors-20261023/originals/outros-sectores.jpg",
|
||||
"sha256": "4aaac0869dc7e61c4c7a87e1af95beb108aa9be0da082702f6f70722e62b1e7a",
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/sectors/outros-sectores.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 75414,
|
||||
"sha256": "f47b3d0da5b0cd5153d393c6f779484ba89043e50195e968338108e893a88077"
|
||||
},
|
||||
{
|
||||
"file": "public/images/sectors/outros-sectores-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 24936,
|
||||
"sha256": "a4fc00551d75c96a1648ad4f81d759d4d6ecd7e6fc5689689216a96934bd1ea2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\servicos-financeiros.jpg",
|
||||
"sourceBytes": 348386,
|
||||
"original": "outputs/home-sectors-20261023/originals/servicos-financeiros.jpg",
|
||||
"sha256": "f932a56248d5544bff92aa30f4af3a5a63044c311969d4370d06f157b097d570",
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/sectors/servicos-financeiros.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 72144,
|
||||
"sha256": "15379485db7de7b2efebe8bdbd4cbd8e911eb34ab8a23b3dd114c849bb4ae65c"
|
||||
},
|
||||
{
|
||||
"file": "public/images/sectors/servicos-financeiros-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 20698,
|
||||
"sha256": "c21949201e35e63625d3d2e7520e10912fe65be1186954142b2784f6efca51ed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\tic-economia-digital.jpg",
|
||||
"sourceBytes": 417398,
|
||||
"original": "outputs/home-sectors-20261023/originals/tic-economia-digital.jpg",
|
||||
"sha256": "b09703bd079f55fb5a8ec3167ce96e1fdb1e5090813a81c817b9a33909427d94",
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/sectors/tic-economia-digital.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 97892,
|
||||
"sha256": "b1d79c1a941085582d6a72799140bafed1bf38ec0201a4dfe5f6faf54ea55ae8"
|
||||
},
|
||||
{
|
||||
"file": "public/images/sectors/tic-economia-digital-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 28242,
|
||||
"sha256": "c4279a27ed402ca2feb62f11a8a954cbcae993912d3c8c27a2d9644fdf922114"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\turismo.jpg",
|
||||
"sourceBytes": 393339,
|
||||
"original": "outputs/home-sectors-20261023/originals/turismo.jpg",
|
||||
"sha256": "1a76db252bc8c1a9dc1f3c650bd95e55337c36a6f604753d61cad96c19b1875f",
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/sectors/turismo.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 93234,
|
||||
"sha256": "de46707dfdd8b98c48ec88d19f3df0b1d6c130adfcbd97d5a7c2e6fa2db62bef"
|
||||
},
|
||||
{
|
||||
"file": "public/images/sectors/turismo-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 27012,
|
||||
"sha256": "4d3d9a04b9426474dca9ba8895021b48fffbe7e4d4a4551272b8c832cf83488e"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"assetMapping": {
|
||||
"agronegocio": "agronegocio",
|
||||
"turismo": "turismo",
|
||||
"infraestruturas": "infraestruturas",
|
||||
"economia-azul": "economia-azul",
|
||||
"mercado-financeiro": "servicos-financeiros",
|
||||
"mineracao": "mineracao",
|
||||
"energia-especifica": "energia",
|
||||
"imobiliario": "outros-sectores",
|
||||
"bens-de-consumo-e-franquias": "industria",
|
||||
"tecnologias-de-informacao": "tic-economia-digital"
|
||||
},
|
||||
"assetSource": "JPG locais do projecto de referência indicado pelo proprietário, inventariados e copiados sem alteração; WebP derivados para apresentação. Sem alegação adicional de licença externa, origem oficial ou localização documental. Imagem genérica reutilizada como alternativa funcional e para sectores sem imagem específica.",
|
||||
"assetBytes960": 997828,
|
||||
"assetBytes480": 289572,
|
||||
"verification": {
|
||||
"browser": {
|
||||
"results": [
|
||||
{
|
||||
"width": 320,
|
||||
"homeSectors": 5,
|
||||
"catalogueSectors": 10,
|
||||
"homeColumns": 2,
|
||||
"headings": [
|
||||
{
|
||||
"title": "Encontre o contexto do seu investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Sectores de investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Como Investir",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Oportunidades em destaque",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Documentos essenciais",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Apoio ao Investidor",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 390,
|
||||
"homeSectors": 5,
|
||||
"catalogueSectors": 10,
|
||||
"homeColumns": 2,
|
||||
"headings": [
|
||||
{
|
||||
"title": "Encontre o contexto do seu investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Sectores de investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Como Investir",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Oportunidades em destaque",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Documentos essenciais",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Apoio ao Investidor",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 768,
|
||||
"homeSectors": 5,
|
||||
"catalogueSectors": 10,
|
||||
"homeColumns": 3,
|
||||
"headings": [
|
||||
{
|
||||
"title": "Encontre o contexto do seu investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Sectores de investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Como Investir",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Oportunidades em destaque",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Documentos essenciais",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Apoio ao Investidor",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1024,
|
||||
"homeSectors": 5,
|
||||
"catalogueSectors": 10,
|
||||
"homeColumns": 5,
|
||||
"headings": [
|
||||
{
|
||||
"title": "Encontre o contexto do seu investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Sectores de investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Como Investir",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Oportunidades em destaque",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Documentos essenciais",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Apoio ao Investidor",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1440,
|
||||
"homeSectors": 5,
|
||||
"catalogueSectors": 10,
|
||||
"homeColumns": 5,
|
||||
"headings": [
|
||||
{
|
||||
"title": "Encontre o contexto do seu investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Sectores de investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Como Investir",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Oportunidades em destaque",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Documentos essenciais",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Apoio ao Investidor",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"width": 1920,
|
||||
"homeSectors": 5,
|
||||
"catalogueSectors": 10,
|
||||
"homeColumns": 5,
|
||||
"headings": [
|
||||
{
|
||||
"title": "Encontre o contexto do seu investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Sectores de investimento",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Como Investir",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Oportunidades em destaque",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Documentos essenciais",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
},
|
||||
{
|
||||
"title": "Apoio ao Investidor",
|
||||
"size": "24px",
|
||||
"weight": "700",
|
||||
"color": "rgb(237, 28, 36)",
|
||||
"lineHeight": "32px"
|
||||
}
|
||||
],
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"fail": "primary",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"fail": "all",
|
||||
"status": "passed"
|
||||
},
|
||||
{
|
||||
"emptyCatalogue": true,
|
||||
"status": "passed"
|
||||
}
|
||||
],
|
||||
"errors": [],
|
||||
"navigation": [
|
||||
"/sectores",
|
||||
"/sectores",
|
||||
"/sectores",
|
||||
"/sectores",
|
||||
"/sectores",
|
||||
"/sectores/agronegocio",
|
||||
"/sectores",
|
||||
"/sectores/turismo",
|
||||
"/sectores",
|
||||
"/sectores/infraestruturas",
|
||||
"/sectores",
|
||||
"/sectores/economia-azul",
|
||||
"/sectores",
|
||||
"/sectores/mercado-financeiro",
|
||||
"/sectores",
|
||||
"/sectores/mineracao",
|
||||
"/sectores",
|
||||
"/sectores/energia-especifica",
|
||||
"/sectores",
|
||||
"/sectores/imobiliario",
|
||||
"/sectores",
|
||||
"/sectores/bens-de-consumo-e-franquias",
|
||||
"/sectores",
|
||||
"/sectores/tecnologias-de-informacao",
|
||||
"/sectores",
|
||||
"/sectores/mercado-financeiro/fintech",
|
||||
"/sectores",
|
||||
"/",
|
||||
"/sectores",
|
||||
"/sectores"
|
||||
],
|
||||
"databaseAccess": false
|
||||
},
|
||||
"script": "tools/portal-home-sectors-qa.mjs",
|
||||
"screenshots": [
|
||||
"outputs/home-sectors-20261023/catalogue-1024.png",
|
||||
"outputs/home-sectors-20261023/catalogue-1440.png",
|
||||
"outputs/home-sectors-20261023/catalogue-1920.png",
|
||||
"outputs/home-sectors-20261023/catalogue-320.png",
|
||||
"outputs/home-sectors-20261023/catalogue-390.png",
|
||||
"outputs/home-sectors-20261023/catalogue-768.png",
|
||||
"outputs/home-sectors-20261023/fallback-all.png",
|
||||
"outputs/home-sectors-20261023/fallback-primary.png",
|
||||
"outputs/home-sectors-20261023/home-sectors-1024.png",
|
||||
"outputs/home-sectors-20261023/home-sectors-1440.png",
|
||||
"outputs/home-sectors-20261023/home-sectors-1920.png",
|
||||
"outputs/home-sectors-20261023/home-sectors-320.png",
|
||||
"outputs/home-sectors-20261023/home-sectors-390.png",
|
||||
"outputs/home-sectors-20261023/home-sectors-768.png",
|
||||
"outputs/home-sectors-20261023/homepage-1440.png"
|
||||
],
|
||||
"existingFrontendTests": {
|
||||
"command": "node --test tests/frontend/portal-api.test.mjs tests/frontend/portal-navigation.test.mjs",
|
||||
"passed": 20
|
||||
},
|
||||
"types": {
|
||||
"command": "npm run types:check",
|
||||
"exitCode": 0
|
||||
},
|
||||
"lint": {
|
||||
"exitCode": 0
|
||||
},
|
||||
"build": {
|
||||
"command": "npm run build",
|
||||
"exitCode": 0,
|
||||
"assets": {
|
||||
"resources/js/pages/PortalInvestidor.tsx": "assets/PortalInvestidor-Q1OJxvfZ.js",
|
||||
"resources/js/pages/portal/services.tsx": "assets/services-DiuG4Zkv.js"
|
||||
},
|
||||
"log": "outputs/home-sectors-20261023/build-local.log"
|
||||
}
|
||||
},
|
||||
"scope": {
|
||||
"appliedLocally": true,
|
||||
"databaseChanged": false,
|
||||
"migrationsRun": false,
|
||||
"businessRulesChanged": false,
|
||||
"routesChanged": false,
|
||||
"sourceProjectChanged": false,
|
||||
"newDependencies": false,
|
||||
"externalDeployment": false
|
||||
},
|
||||
"limits": "Interface e navegação exercitadas com API e páginas públicas em fixtures; não equivale a demonstração integral dos workflows operacionais ou de critérios mais amplos da matriz.",
|
||||
"matrixReferences": [
|
||||
"MASTER-efd550fd-0104",
|
||||
"MASTER-9f5719c8-0077"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,406 @@
|
||||
{
|
||||
"date": "2026-10-23",
|
||||
"decision": "Pedido expresso da Tempo: analisar e acrescentar imagens adequadas exclusivamente aos três cartões de Como Investir.",
|
||||
"analysisAndPlan": "docs/investmoz/public-portal-sections.md#fotografias-nas-etapas-de-como-investir--23102026",
|
||||
"source": {
|
||||
"type": "Fotografias ilustrativas geradas por IA, sem atribuição a pessoas, instituições, locais ou projectos reais.",
|
||||
"tool": "image_gen, modo integrado",
|
||||
"skill": "C:/Users/jorge/.codex/skills/.system/imagegen/SKILL.md",
|
||||
"externalPhotographsUsed": false
|
||||
},
|
||||
"images": [
|
||||
{
|
||||
"key": "explorar",
|
||||
"prompt": "Use case: photorealistic-natural. Asset for a small navigation card on a Mozambique investor portal. Create one individual photorealistic editorial photograph, horizontal 16:9, professional restrained style, natural soft daylight, realistic skin and materials, neutral colors, documentary composition readable at 350px wide. Illustration of a plausible setting, no identifiable named project or official building. No text, lettering, logos, watermarks, flags, maps, diagrams, graphic overlays, montage, or advertisement styling. Keep main subject inside the central 80% for responsive crop. Stage 1 EXPLORE opportunities, sector and territory: two Mozambican business professionals, a woman and man in smart casual clothing, standing outdoors by a quiet access road at a modest business park, naturally discussing a tablet held by the woman. Generic unbranded low warehouse buildings and green productive land visible in background, credible southern African environment. Eye-level medium-wide candid composition, both people three-quarter view, looking at tablet and surroundings rather than camera. Business evaluation and discovery, no construction work or hard hats.",
|
||||
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-42eb9338-4350-40bf-9098-858c12994189.png",
|
||||
"original": "outputs/investment-steps-20261023/originals/explorar.png",
|
||||
"originalSha256": "a3c4ec1a0d2deaf87e0c8e765616c74ab70067eade9a862effce9e6befbbccb6",
|
||||
"originalDimensions": {
|
||||
"width": 1672,
|
||||
"height": 941
|
||||
},
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/investment-steps/explorar.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 52266,
|
||||
"sha256": "c3e151ae649ce3cb66f5babc39978fa5803d320cacc95a27e798db4ec2d45a4c"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-steps/explorar-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 19312,
|
||||
"sha256": "d3f383d9a58b23fada37472ea853f985aca8c3146123747d777b27704d32c7e0"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-steps/explorar-fallback.webp",
|
||||
"width": 240,
|
||||
"height": 135,
|
||||
"bytes": 5300,
|
||||
"sha256": "ba12ac4d2e81ac8a2c2e681667ccb08a3abfdba24de39e6e942d6378b700f2a9"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "preparar",
|
||||
"prompt": "Use case: photorealistic-natural. Asset for a small navigation card on a Mozambique investor portal. Create one individual photorealistic editorial photograph, horizontal 16:9, professional restrained style, natural soft daylight, realistic skin and materials, neutral colors, documentary composition readable at 350px wide. Illustration of a plausible setting, no identifiable named project or official building. No text, lettering, logos, watermarks, flags, maps, diagrams, graphic overlays, montage, or advertisement styling. Keep main subject inside the central 80% for responsive crop. Stage 2 PREPARE investment and organize documents: a Mozambican woman entrepreneur and a male business adviser seated at a light wood office desk, calmly reviewing and sorting a small tidy set of document folders and loose sheets beside a closed laptop. One points to a page while the other organizes a folder. No visible readable writing or personal data; papers at an angle. Bright modest professional meeting room, view from slightly above table height, hands and folders clear in foreground, natural candid interaction, realistic anatomy.",
|
||||
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-5f07618a-1e86-42d9-aaf8-3acd0abf2164.png",
|
||||
"original": "outputs/investment-steps-20261023/originals/preparar.png",
|
||||
"originalSha256": "679a6875bb3ec79a9b71c27c9d785334376746be2bb305f461db9e19b0a0b7ea",
|
||||
"originalDimensions": {
|
||||
"width": 1672,
|
||||
"height": 941
|
||||
},
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/investment-steps/preparar.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 57942,
|
||||
"sha256": "6de28042d3abce238a3680fb878779682f3672c3feb97b7e42b72e9a0a0ffbac"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-steps/preparar-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 19950,
|
||||
"sha256": "671ba0fc207f85833b91027d3f6dad91599e95702cfea439e558906f92a2bfac"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-steps/preparar-fallback.webp",
|
||||
"width": 240,
|
||||
"height": 135,
|
||||
"bytes": 6008,
|
||||
"sha256": "645b34cd60b31fdc8e6586dedb71061c08add9ff985ce90909333b0bd1e0aa3e"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "acompanhar",
|
||||
"prompt": "Use case: photorealistic-natural. Asset for a small navigation card on a Mozambique investor portal. Create one individual photorealistic editorial photograph, horizontal 16:9, professional restrained style, natural soft daylight, realistic skin and materials, neutral colors, documentary composition readable at 350px wide. Illustration of a plausible setting, no identifiable named project or official building. No text, lettering, logos, watermarks, flags, maps, diagrams, graphic overlays, montage, or advertisement styling. Keep main subject inside the central 80% for responsive crop. Stage 3 FOLLOW UP submitted request and protocol: a Mozambican male entrepreneur seated at a tidy desk using a laptop to check an online application, one hand naturally on trackpad, a small closed document folder nearby. Three-quarter side view showing focused face and laptop, warm daylight from side window, modest contemporary office with soft greenery out of focus. Laptop screen is oblique and softly out of focus with only indistinct neutral interface rows, no readable text, official seal, logo or invented dashboard details. Convey calm digital self-service and progress checking, not a call centre or signing documents.",
|
||||
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-f896c5f8-19a0-49b0-af8e-0d12bfe4c7aa.png",
|
||||
"original": "outputs/investment-steps-20261023/originals/acompanhar.png",
|
||||
"originalSha256": "17d453445f2afb4c7641909950d2ecfb8276c433a4e28eeee94d0a57d1bdad46",
|
||||
"originalDimensions": {
|
||||
"width": 1672,
|
||||
"height": 941
|
||||
},
|
||||
"derivatives": [
|
||||
{
|
||||
"file": "public/images/investment-steps/acompanhar.webp",
|
||||
"width": 960,
|
||||
"height": 540,
|
||||
"bytes": 43722,
|
||||
"sha256": "fe764c8161de36ee597f856face5341260670d1a28ab482bd01a0f5120ad0588"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-steps/acompanhar-480.webp",
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"bytes": 16176,
|
||||
"sha256": "79ceaecb0ef23c6729e43d04b7e91493d6784ea9f658d540dda3550702dc3623"
|
||||
},
|
||||
{
|
||||
"file": "public/images/investment-steps/acompanhar-fallback.webp",
|
||||
"width": 240,
|
||||
"height": 135,
|
||||
"bytes": 5298,
|
||||
"sha256": "cd4530cfef4f19f23f640ceae59cfd73d0ee269643118b458f2a4748f5845fc6"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"cards": [
|
||||
{
|
||||
"title": "1. Explorar",
|
||||
"description": "Identifique o sector, território e oportunidade.",
|
||||
"href": "/oportunidades",
|
||||
"image": "explorar"
|
||||
},
|
||||
{
|
||||
"title": "2. Preparar",
|
||||
"description": "Conheça o percurso e organize os documentos.",
|
||||
"href": "/como-investir",
|
||||
"image": "preparar"
|
||||
},
|
||||
{
|
||||
"title": "3. Acompanhar",
|
||||
"description": "Envie o pedido e acompanhe o protocolo.",
|
||||
"href": "/balcao-virtual",
|
||||
"image": "acompanhar"
|
||||
}
|
||||
],
|
||||
"presentation": {
|
||||
"component": "resources/js/components/investment-steps.tsx",
|
||||
"homeIntegration": "resources/js/pages/PortalInvestidor.tsx",
|
||||
"aspectRatio": "16:9",
|
||||
"responsiveImages": [
|
||||
960,
|
||||
480
|
||||
],
|
||||
"fallback": "Variante própria de 240 px; se também falhar, espaço reservado com descrição acessível e Imagem indisponível.",
|
||||
"columns": "Uma coluna abaixo de 768 px, três a partir de 768 px.",
|
||||
"compactText": "16 px de preenchimento, sem altura mínima de texto.",
|
||||
"accessibility": "Alt em português, nomes e descrições das âncoras, foco visível, dimensões reservadas e loading lazy.",
|
||||
"headings": "Título vermelho partilhado da home preservado."
|
||||
},
|
||||
"verification": {
|
||||
"browser": {
|
||||
"results": [
|
||||
{
|
||||
"width": 320,
|
||||
"dpr": 1,
|
||||
"fail": "none",
|
||||
"columns": 1,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/explorar-480.webp",
|
||||
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7820512820512822
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/preparar-480.webp",
|
||||
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7820512820512822
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar-480.webp",
|
||||
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7820512820512822
|
||||
}
|
||||
],
|
||||
"layoutShift": false,
|
||||
"overflow": false
|
||||
},
|
||||
{
|
||||
"width": 390,
|
||||
"dpr": 2,
|
||||
"fail": "none",
|
||||
"columns": 1,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/explorar.webp",
|
||||
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7755102040816326
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/preparar.webp",
|
||||
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7755102040816326
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar.webp",
|
||||
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7755102040816326
|
||||
}
|
||||
],
|
||||
"layoutShift": false,
|
||||
"overflow": false
|
||||
},
|
||||
{
|
||||
"width": 768,
|
||||
"dpr": 1,
|
||||
"fail": "none",
|
||||
"columns": 3,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/explorar-480.webp",
|
||||
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7734375
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/preparar-480.webp",
|
||||
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7734375
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar-480.webp",
|
||||
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7734375
|
||||
}
|
||||
],
|
||||
"layoutShift": false,
|
||||
"overflow": false
|
||||
},
|
||||
{
|
||||
"width": 1024,
|
||||
"dpr": 1,
|
||||
"fail": "none",
|
||||
"columns": 3,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/explorar-480.webp",
|
||||
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7784090909090908
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/preparar-480.webp",
|
||||
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7784090909090908
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar-480.webp",
|
||||
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7784090909090908
|
||||
}
|
||||
],
|
||||
"layoutShift": false,
|
||||
"overflow": false
|
||||
},
|
||||
{
|
||||
"width": 1440,
|
||||
"dpr": 2,
|
||||
"fail": "none",
|
||||
"columns": 3,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/explorar.webp",
|
||||
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.775
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/preparar.webp",
|
||||
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.775
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar.webp",
|
||||
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.775
|
||||
}
|
||||
],
|
||||
"layoutShift": false,
|
||||
"overflow": false
|
||||
},
|
||||
{
|
||||
"width": 1920,
|
||||
"dpr": 1,
|
||||
"fail": "none",
|
||||
"columns": 3,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/explorar-480.webp",
|
||||
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.775
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/preparar-480.webp",
|
||||
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.775
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar-480.webp",
|
||||
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.775
|
||||
}
|
||||
],
|
||||
"layoutShift": false,
|
||||
"overflow": false
|
||||
},
|
||||
{
|
||||
"width": 390,
|
||||
"dpr": 2,
|
||||
"fail": "primary",
|
||||
"columns": 1,
|
||||
"photos": [
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/explorar-fallback.webp",
|
||||
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7755102040816326
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/preparar-fallback.webp",
|
||||
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7755102040816326
|
||||
},
|
||||
{
|
||||
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar-fallback.webp",
|
||||
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
|
||||
"lazy": "lazy",
|
||||
"ratio": 1.7755102040816326
|
||||
}
|
||||
],
|
||||
"layoutShift": false,
|
||||
"overflow": false
|
||||
},
|
||||
{
|
||||
"width": 390,
|
||||
"dpr": 2,
|
||||
"fail": "all",
|
||||
"columns": 1,
|
||||
"photos": [],
|
||||
"layoutShift": false,
|
||||
"overflow": false
|
||||
}
|
||||
],
|
||||
"errors": [],
|
||||
"navigation": [
|
||||
"/oportunidades",
|
||||
"/como-investir",
|
||||
"/balcao-virtual"
|
||||
],
|
||||
"databaseAccess": false
|
||||
},
|
||||
"script": "outputs/investment-steps-20261023/check.mjs",
|
||||
"screenshots": [
|
||||
"outputs/investment-steps-20261023/cards-1024-none.png",
|
||||
"outputs/investment-steps-20261023/cards-1440-none.png",
|
||||
"outputs/investment-steps-20261023/cards-1920-none.png",
|
||||
"outputs/investment-steps-20261023/cards-320-none.png",
|
||||
"outputs/investment-steps-20261023/cards-390-all.png",
|
||||
"outputs/investment-steps-20261023/cards-390-none.png",
|
||||
"outputs/investment-steps-20261023/cards-390-primary.png",
|
||||
"outputs/investment-steps-20261023/cards-768-none.png"
|
||||
],
|
||||
"lint": {
|
||||
"exitCode": 0
|
||||
},
|
||||
"types": {
|
||||
"command": "npm run types:check",
|
||||
"exitCode": 0,
|
||||
"log": "outputs/investment-steps-20261023/types.log"
|
||||
},
|
||||
"build": {
|
||||
"command": "npm run build",
|
||||
"exitCode": 0,
|
||||
"homeAsset": "assets/PortalInvestidor-C1QTZ3-t.js",
|
||||
"log": "outputs/investment-steps-20261023/build-local.log"
|
||||
}
|
||||
},
|
||||
"scope": {
|
||||
"appliedLocally": true,
|
||||
"otherSectionsChanged": false,
|
||||
"supportAndFooterChanged": false,
|
||||
"databaseAccess": false,
|
||||
"businessRulesChanged": false,
|
||||
"routesChanged": false,
|
||||
"newDependencies": false,
|
||||
"externalDeployment": false
|
||||
},
|
||||
"matrixReferences": [
|
||||
"MASTER-efd550fd-0104"
|
||||
],
|
||||
"limits": "Componentes reais com API sintética e destinos interceptados para verificar a navegação; não demonstra os workflows operacionais completos nem encerra o critério mais amplo da matriz."
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,191 @@
|
||||
{
|
||||
"implementation_commit": "2b592ded669f400e2322c183947a045bb3790c73",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P122": [
|
||||
"goods_sale_commission",
|
||||
"goods_purchase_commission"
|
||||
],
|
||||
"AUD-SIM-L1-P128": [
|
||||
"service_sale_mandate",
|
||||
"service_purchase_mandate"
|
||||
]
|
||||
},
|
||||
"branch_count": 2,
|
||||
"treatment_count": 4,
|
||||
"source": "CIVA3(3)c,Lei13/2016PDF6/p1426(264);4(3),PDF7/p1426(265). Lei22/2022não altera3/4;Lei10/2025PDF12mantém3(3)c e não altera4. Base15(2)e/P091já entregue permanece independente;sem nova aplicação da base neste incremento.",
|
||||
"meaning": {
|
||||
"P122": "Transferências de bens em execução de contrato de comissão,incluindo consignação;na venda comissário considerado comprador,na compra comitente considerado comprador. Venda:comitente→comissário→terceiro;compra:terceiro→comissário→comitente. Contraprestações e referências das duas relações separadas.",
|
||||
"P128": "Serviço efectuado por intervenção de mandatário emnome próprio:mandatário considerado adquirente eprestador sucessivamente4(3). Venda/prestação:mandante→mandatário→terceiro;compra/aquisição:terceiro→mandatário→mandante. Não é mera intermediação emnome de outrem ou base15(2)e de bens."
|
||||
},
|
||||
"formula": "Classifytwo successive relations bykind/direction;keep eachoriginalconsideration separate;no monetaryaggregation or taxcalculation.",
|
||||
"scope": "2026,circuitos emnome próprio,partes/contratos/objectos econtraprestações originais das duas relações. Sem soma/compensação automática,base tributável nova,localização,isenção,taxa,IVA,dedução/campo11 ou totaisModeloA. Sem conversão cambial;moeda original identificada e coerente com contexto. P091preservado,sem repetir aceitação/cálculo.",
|
||||
"technical_choices": "NewownNames opportunity-scoped book in existingmodelo_a snapshot/API/dossier,no schema/permissions. Switchretainsallhiddenrefs/values andclearsownconfirmations,keepscommon. Originaldecimalstrings up to15integer/6fractiondigits retained;no rounding/conversion. References or explicitassumptions reused,no certificates/approvers invented. OptionalexistingBaseRef notprerequisite;doesnotmodifyP091.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 6,
|
||||
"passed": 6,
|
||||
"failed": 0,
|
||||
"by_treatment": "Four circuits:ownconditions unknown/no,direction/parties,separate originals,dates/refs/currency,zero vsunknown",
|
||||
"additional": "Switchretainsvalues/refs andclearsownconfirmations;nonmonetarytaxfields remainnull;allpriorbooks includingP091 unchanged,history/report/currentkey/corruptwriteguards"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 37,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g10-own-name-20261025\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Edge/CUArealcomponent:ownNameunknown makescircuitindeterminate;restoredconfirmation andsave/recover/report4circuitswith2relations each and1000.25/1100.75MZN keptseparate,no totals,newbase/VAT/ratenull,3previousversions. SyntheticQA,notmanualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g10-own-name-20261025\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "5837f34a2cc64a94f91f038ffcb0c62f5fb5ba6a",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P089",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094",
|
||||
"AUD-SIM-L1-P095",
|
||||
"AUD-SIM-L1-P096",
|
||||
"AUD-SIM-L1-P097",
|
||||
"AUD-SIM-L1-P098",
|
||||
"AUD-SIM-L1-P099",
|
||||
"AUD-SIM-L1-P100",
|
||||
"AUD-SIM-L1-P101",
|
||||
"AUD-SIM-L1-P102",
|
||||
"AUD-SIM-L1-P103",
|
||||
"AUD-SIM-L1-P105",
|
||||
"AUD-SIM-L1-P106",
|
||||
"AUD-SIM-L1-P107",
|
||||
"AUD-SIM-L1-P108",
|
||||
"AUD-SIM-L1-P109",
|
||||
"AUD-SIM-L1-P110",
|
||||
"AUD-SIM-L1-P111",
|
||||
"AUD-SIM-L1-P112",
|
||||
"AUD-SIM-L1-P113",
|
||||
"AUD-SIM-L1-P114",
|
||||
"AUD-SIM-L1-P115",
|
||||
"AUD-SIM-L1-P116",
|
||||
"AUD-SIM-L1-P117",
|
||||
"AUD-SIM-L1-P118",
|
||||
"AUD-SIM-L1-P119",
|
||||
"AUD-SIM-L1-P120"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "2fdca863/5837f34a;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g10-own-name-preserved.json",
|
||||
"sha256": "03defa4a680af33e1bcd05770d619343704d448d295142263b21c40e516b2a5d",
|
||||
"scope": "P122/P128QA;all priorbooks/history includingP105–110 andpartialP084/P085 immutable;no activewrites"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-own-name.ts": "c36509de24d31d747d91630a31ce7d72baa749e9928b718a944556348fc54f85",
|
||||
"resources/js/components/simulation-own-name.tsx": "6e142242aa29ae07e36b4d8d0be7d78f770d701e0a92e1a6e9832fcb794c17cf",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "9718dc440aa98497011775d8bd03049d7857fa3badf27f4467d6d434f642defd",
|
||||
"resources/js/lib/project-dossier.ts": "099dc307a86c763a9509516f6d59cc5c454b1f81189cc04b919d8d6045baf9dc"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 107,
|
||||
"QA": 2,
|
||||
"functional_pending": 23,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "2fdca863",
|
||||
"remaining": "OnejointGit delivery forP122/P128,freshbackup/realisolatedrestore,acceptedQA reused,installeddeltaonly. No individualbranch deployment.",
|
||||
"limits": "L1open;deductionoutsideincrement;P00105/06;P121digital/P084/P085pending;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g10-own-name-20261025\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "63cc336787cade92fb7ee5b2b2d407308a0cf66b",
|
||||
"receipt": "l1-g10-own-name-delivery-20261025.json",
|
||||
"record": "iva_l1_g10_own_name_P122_P128_homologation_20261025",
|
||||
"counts": {
|
||||
"delivered": 109,
|
||||
"QA": 0,
|
||||
"functional_pending": 23,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"key": "iva_l1_g4e_beneficiaries_code_API_QA_visual_pending_20261024",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"base": "3be371c8",
|
||||
"group": "G4E",
|
||||
"branches": {
|
||||
"AUD-SIM-L1-P061": "export_nonresident_buyer",
|
||||
"AUD-SIM-L1-P069": "export_diplomatic_mission",
|
||||
"AUD-SIM-L1-P070": "export_international_organisation",
|
||||
"AUD-SIM-L1-P071": "export_humanitarian_organisation"
|
||||
},
|
||||
"branch_count": 4,
|
||||
"treatment_count": 4,
|
||||
"source": "CIVA13(1)(b/j/k/l),PDF12/p1426(270),19(1)(b)(i),PDF15/p1426(273); alterações2022/2025 reutilizadas",
|
||||
"preservation": {
|
||||
"initial_worktree": "clean at3be371c8",
|
||||
"accepted_delivered": 58,
|
||||
"prior_books": 18,
|
||||
"prior_books_identical_current": true,
|
||||
"confirmed_losses": [],
|
||||
"active": "No remote changes; accepted G4D inventory reused, not freshly re-read"
|
||||
},
|
||||
"tests": {
|
||||
"frontend_new": 3,
|
||||
"frontend_delta_with_G4D": 7,
|
||||
"API_tests": 1,
|
||||
"API_assertions": 39,
|
||||
"database": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"rollback": true,
|
||||
"types": "passed",
|
||||
"production": "built successfully; plugin timings warning; PowerShell classified native stderr as nonzero",
|
||||
"visual": false,
|
||||
"report_visual": false,
|
||||
"Word_PDF": "accepted exporter proofs reused; no pagination claim",
|
||||
"QA_build": "built successfully; existing future Vite config compatibility warning",
|
||||
"QA_storage": "save/recover/reject passed in temporary directory",
|
||||
"QA_HTTP": "200 HTML and module entrypoints; no visual claim"
|
||||
},
|
||||
"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": 62,
|
||||
"QA_ready_for_delivery": 0,
|
||||
"functional_pending": 70,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"candidate": "38faeac6",
|
||||
"manual_visual_completion": {
|
||||
"status": "demonstrated_QA_not_installed",
|
||||
"candidate": "38faeac6",
|
||||
"prior_code_record": "d03101bb",
|
||||
"group": "G4E",
|
||||
"branches": [
|
||||
"P061",
|
||||
"P069",
|
||||
"P070",
|
||||
"P071"
|
||||
],
|
||||
"visual": {
|
||||
"actor": "Tempo",
|
||||
"method": "manual",
|
||||
"url": "http://127.0.0.1:18639/g4e.html",
|
||||
"request": "Quatro tratamentos; condição em falta sem apagar preço; Guardar → Recuperar → Relatório",
|
||||
"reply_exact": "ja efectuado",
|
||||
"tool_visual_observation": false,
|
||||
"no_repeat_of_accepted_proofs": true
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 58,
|
||||
"QA": 4,
|
||||
"functional_pending": 70,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation": "686328a0/3be371c8",
|
||||
"L1_complete": false,
|
||||
"P001": "05/06 only",
|
||||
"beverages": "L2/L3; not closed",
|
||||
"statistics_AI": "deferred"
|
||||
},
|
||||
"visual_pending_historical": {
|
||||
"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,94 @@
|
||||
{
|
||||
"key": "iva_l1_g5a_special_regimes_QA_demonstrated_20261024",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"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": 65,
|
||||
"QA": 0,
|
||||
"functional_pending": 67,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"G5": {
|
||||
"delivered": 3,
|
||||
"QA": 0,
|
||||
"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"
|
||||
},
|
||||
"qa_acceptance_status": "demonstrated_QA_not_installed",
|
||||
"qa_acceptance_counts": {
|
||||
"delivered": 62,
|
||||
"QA": 3,
|
||||
"functional_pending": 67,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"delivery_followup": {
|
||||
"served_commit": "69f2e365bf4ebd509ec2e080dd0bf1b7717d7a75",
|
||||
"record": "iva_l1_g5a_homologation_20261024",
|
||||
"receipt": "l1-g5a-delivery-20261024.json"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"key": "iva_l1_g5b_P086_acquisition_continuity_QA_demonstrated_20261024",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"candidate": "689a4c93c33cd737c6fc90823533b34b5219b5d3",
|
||||
"base": "d3e9f373",
|
||||
"homologation": "69f2e365/d3e9f373",
|
||||
"group": "G5B",
|
||||
"branches": {
|
||||
"AUD-SIM-L1-P086": "former_exploration_exemption -> explicit normal acquisition continuation"
|
||||
},
|
||||
"branch_count": 1,
|
||||
"scope": "nonapplication and continuation;not a newly active exemption",
|
||||
"source": {
|
||||
"rectification": {
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-89-I-Serie-2017-06-08.pdf",
|
||||
"bytes": 9456358,
|
||||
"sha256": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
|
||||
"pages": 16
|
||||
},
|
||||
"page": "PDF1/p569,visual inspected",
|
||||
"CIVA_original": "14(2)(c),PDF13/p1426(271)",
|
||||
"2022_2025": "art1 lists checked;no reintroduction14(2)(c)",
|
||||
"acceptance": "Tempo08/10/2026;no generic provenance/legal revalidation added"
|
||||
},
|
||||
"inventory": {
|
||||
"archive_files": [
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-16-I-Serie-2008-04-16.pdf",
|
||||
"bytes": 2267865,
|
||||
"sha256": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee",
|
||||
"pages": 28
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-248-I-Suplemento-1-2025.pdf",
|
||||
"bytes": 440018,
|
||||
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
|
||||
"pages": 21
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-89-I-Serie-2017-06-08.pdf",
|
||||
"bytes": 9456358,
|
||||
"sha256": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
|
||||
"pages": 16
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-95-I-Suplemento-2025-05-21.pdf",
|
||||
"bytes": 329070,
|
||||
"sha256": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358",
|
||||
"pages": 2
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\Lei-13-2016-CIVA-BR-156-10-suplemento.pdf",
|
||||
"bytes": 2127554,
|
||||
"sha256": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
|
||||
"pages": 32
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf",
|
||||
"bytes": 1834284,
|
||||
"sha256": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
|
||||
"pages": 18
|
||||
}
|
||||
],
|
||||
"existing_corpus_references": [
|
||||
{
|
||||
"path": "docs/investmoz/document-corpus-inventory-2026-10-06.csv",
|
||||
"sha256": "3a24442558ad2b9d4ac9b58cc6d281bd0db83b4c93d4696e30a6f8981d9eaa7b",
|
||||
"usage": "existing corpus/source inventory reused; no claim of newly reviewing every source"
|
||||
},
|
||||
{
|
||||
"path": "docs/investmoz/fiscal-source-references-2026-10-06.csv",
|
||||
"sha256": "f2fde2257fd481f984e59bdfc62ce209c849b350961111616d2c2927c1421d6f",
|
||||
"usage": "existing corpus/source inventory reused; no claim of newly reviewing every source"
|
||||
}
|
||||
]
|
||||
},
|
||||
"preservation": {
|
||||
"delivered": 65,
|
||||
"sales_books": 20,
|
||||
"sales_books_identical_current_without_recalculation": true,
|
||||
"purchase_books_in_frozen_fixture": 0,
|
||||
"UI_previous_sales_identical": true,
|
||||
"new_purchase_context": "opportunity:329",
|
||||
"UI_history_count": 3,
|
||||
"confirmed_losses": [],
|
||||
"active": "Accepted G5A receipt reused;no fresh active query/mutation"
|
||||
},
|
||||
"implementation": {
|
||||
"optional_fields": [
|
||||
"acquisitionTreatment",
|
||||
"acquisitionTreatmentOrigin",
|
||||
"AcquisitionBook.history"
|
||||
],
|
||||
"legacy_fields": "No new mandatory keys on previous rows/books;scoped continuity version only on new chosen treatment",
|
||||
"manual_periods": "calculate only explicit purchase-book months;budget reuse still verifies existing source;no sales month required for direct entries",
|
||||
"period_change_impact": "Report includes declared purchase months rather than implicit financial-plan months;previous accepted4-month scenarios pass;no frozen result recalculated",
|
||||
"history": "Previous result snapshots retained when explicitly recalculating;old reference/document/values/answers conserved",
|
||||
"not_applicable_UI": "Normal deduction controls hidden while former eliminated reference selected;no deleted data"
|
||||
},
|
||||
"tests": {
|
||||
"frontend_new": 4,
|
||||
"existing_changed_acquisition_suite": 8,
|
||||
"frontend_total": 12,
|
||||
"latest_delta": 4,
|
||||
"API_tests": 1,
|
||||
"API_assertions": 45,
|
||||
"QA_database": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"types": "passed",
|
||||
"production_build": "passed;existing plugin timing warnings",
|
||||
"QA_build": "passed;existing config/chunk warnings",
|
||||
"QA_storage": "save/recover/reject passed in temporary directory",
|
||||
"UI": {
|
||||
"actor": "Codex",
|
||||
"method": "Edge/CUA observed",
|
||||
"URL": "http://127.0.0.1:18641/g5b.html",
|
||||
"observed": [
|
||||
"former14(2)(c) selected -> eliminated notice;deduction indeterminate,100/16/116MZN retained",
|
||||
"normal deduction controls hidden while nonapplicable",
|
||||
"explicit continue ->normal controls/facts restored;calculate ->16MZN field10 under normal declared conditions",
|
||||
"Guardar -> Recuperar -> Relatório with document,source,period/context;17/18 remain indeterminate",
|
||||
"three results in history and20salesbooks unchanged in saved file"
|
||||
],
|
||||
"manual_Tempo_reply": null,
|
||||
"screenshot": "outputs/iva-l1-g5b-acquisitions-20261024/qa-recovered-report.png",
|
||||
"screenshot_sha256": "e29df1a8daf66f43ab7aaab9f78f472cf331272860aaac0edcde6ff40fd3a9d5"
|
||||
},
|
||||
"Word_PDF": "Existing exporter/numeric proofs reused;no new pagination claim"
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 66,
|
||||
"QA": 0,
|
||||
"functional_pending": 66,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"G5": {
|
||||
"delivered": 4,
|
||||
"QA": 0,
|
||||
"functional_pending": 3
|
||||
},
|
||||
"limits": "2026/MZN;P086 é não aplicação da antiga14(2)(c),eliminada pelo Aviso2017,e continuidade deliberada na aquisição normal; não é isenção nova/activa nem cálculo retroactivo. Sem taxa presumida,dedução automática,importação,apuramento integral ou submissãoAT. P080/P084/P085 pendentes. L1aberto;P001só05/06;bebidasL2/L3;Estatísticas/IAadiadas.",
|
||||
"qa_acceptance_status": "demonstrated_QA_not_installed",
|
||||
"qa_acceptance_counts": {
|
||||
"delivered": 65,
|
||||
"QA": 1,
|
||||
"functional_pending": 66,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"delivery_followup": {
|
||||
"served_commit": "6f056359df4231f9e1802922782b21263a8dae0b",
|
||||
"record": "iva_l1_g5b_homologation_20261024",
|
||||
"receipt": "l1-g5b-delivery-20261024.json"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,181 @@
|
||||
{
|
||||
"candidate": "9842dcbb0e570bc9af6d4f0d20b76f67bee30178",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"P080": [
|
||||
"special_economic_zone_import",
|
||||
"free_zone_import",
|
||||
"free_warehouse_import",
|
||||
"general_free_warehouse_import",
|
||||
"customs_warehouse_import",
|
||||
"duty_free_shop_import"
|
||||
]
|
||||
},
|
||||
"source": "Lei13/2016,CIVA14(1)(a),initial condition14(1),PDF13/p1426(271);no14change in consulted2022/2025 amendments",
|
||||
"source_reused": "Existing six-file source archive and general corpus/reference inventories;official source acceptanceTempo08/10;not reauthenticated",
|
||||
"legal_interpretation_limits": "P080 own import,not sale;not mere geography;all six regimes,customs control,applicable provisions,permanence,no final use/consumption;no automatic field11/duties/normalVAT",
|
||||
"tests": {
|
||||
"frontend": {
|
||||
"passed": 20,
|
||||
"failed": 0,
|
||||
"new": 3,
|
||||
"record": "node:test tool output this session;no separately saved stdout claimed"
|
||||
},
|
||||
"API": {
|
||||
"tests": 1,
|
||||
"assertions": 26,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g5c-review-20261024\\api-tests.xml",
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transactions": "rollback"
|
||||
},
|
||||
"types": "passed",
|
||||
"production_build": "passed;existing plugin/chunk warnings",
|
||||
"UI": "Codex Edge/CUA,real component;unknown->indeterminate,no->nonapplication,yes->exempt;save/recover/report;not manualTempo acceptance",
|
||||
"synthetic_QA_storage": "1 test passed;UTF8 multibyte buffer decoding preserved"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "e384418ecc76ed77fe34a30814c4737a96887b00",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"preservation": "Reuse accepted G6C installed receipt d46b794a/2ed62165; no active code/schema/data/config/permissions changes in this QA task",
|
||||
"frozen": "tests/frontend/fixtures/iva-g6d-inputs.json",
|
||||
"frozen_sha256": "26f9b75b4b436bfd2e21487b8eed12e8db62e9ebfc46e3ace9c92271994fc80b",
|
||||
"books": {
|
||||
"sales": 20,
|
||||
"acquisitions": 1,
|
||||
"imports": 4
|
||||
},
|
||||
"counts_before": {
|
||||
"delivered": 72,
|
||||
"QA": 1,
|
||||
"pending": 59,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"G6D": "P048 remains QA, not installed"
|
||||
},
|
||||
"UI_book": {
|
||||
"rows": 6,
|
||||
"history": 5,
|
||||
"opportunity": "334",
|
||||
"province": "Manica",
|
||||
"period": "2026-12",
|
||||
"document_date": "2026-11-14"
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 72,
|
||||
"QA": 2,
|
||||
"functional_pending": 58,
|
||||
"documentary_P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"active": "unchanged d46b794a/2ed62165;no push,installation,migration or active data change",
|
||||
"other_QA": "P048 G6D candidate0eb37ef5 preserved,not delivered",
|
||||
"pending": {
|
||||
"P084": {
|
||||
"source": "14(2)(a),14(3),samePDF13",
|
||||
"treatment": "Acquisition/import of goods for gifts to national public-interest/relevant-social institutions;goods wholly suitable and used in evident public-interest activities;no services",
|
||||
"documentary": "Application procedure referred to in14(3) not located in consulted sources;not declared nonexistent",
|
||||
"development": "Specific acquisition/import flow absent;common persistence/report reused",
|
||||
"verification": "Not performed for this branch",
|
||||
"action": "Locate applicable implementing provision and amendments/scope,then implement only express conditions and verify save/recover/report",
|
||||
"estimate": "6–10h preliminary development/verification after documentary delimitation;unmeasured;document retrieval ETA unknown"
|
||||
},
|
||||
"P085": {
|
||||
"source": "14(2)(b),14(3),samePDF13",
|
||||
"treatment": "Acquisition of goods for gifts mitigating effects of natural disasters;no automatic extension to import/services",
|
||||
"documentary": "Application procedure referred to in14(3) not located in consulted sources;not declared nonexistent",
|
||||
"development": "Specific acquisition/goods/disaster-purpose flow absent",
|
||||
"verification": "Not performed for this branch",
|
||||
"action": "Locate applicable implementation procedure;reuse P084 common fields while keeping own scope;verify complete flow",
|
||||
"estimate": "4–8h preliminary after documentary delimitation,reusingP084;unmeasured;retrieval ETA unknown"
|
||||
}
|
||||
},
|
||||
"limits": "72delivered remainclosed;L1open;P001only05/06;beveragesL2/L3;Statistics/AIdeferred;L1closure doesnot requireL2/L3/alltaxes",
|
||||
"qa_status_preserved": "P080 demonstrated QA,not delivered;P084/P085 individually diagnosed and still pending",
|
||||
"delivery_followup": {
|
||||
"served_commit": "2d889a211ba303db31dcba815e439456dfba9f36",
|
||||
"record": "iva_l1_P048_P080_joint_homologation_20261024",
|
||||
"receipt": "l1-g6d-g5c-delivery-20261024.json",
|
||||
"counts": {
|
||||
"delivered": 74,
|
||||
"QA": 0,
|
||||
"functional_pending": 58,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
{
|
||||
"key": "iva_l1_g6a_P049_P051_import_exemptions_QA_demonstrated_20261024",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"candidate": "965da2642627ad1e484d52587e07b4a60cae6af2",
|
||||
"base": "e99ea1d0",
|
||||
"homologation": "6f056359/e99ea1d0",
|
||||
"group": "G6A",
|
||||
"branches": {
|
||||
"AUD-SIM-L1-P049": "reimport_same_state",
|
||||
"AUD-SIM-L1-P051": "central_bank_gold"
|
||||
},
|
||||
"branch_count": 2,
|
||||
"source": {
|
||||
"reference": "CIVA12(1)(d/f),Lei13/2016PDF11/p1426(269),visual inspected;2022PDF2/p2252(26) and2025PDF12–13/p2180(12–13) retain d/f",
|
||||
"acceptance": "Tempo08/10/2026;no new generic authenticity/legal approval",
|
||||
"archive": [
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-16-I-Serie-2008-04-16.pdf",
|
||||
"sha256": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee",
|
||||
"pages": 28
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-248-I-Suplemento-1-2025.pdf",
|
||||
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
|
||||
"pages": 21
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-89-I-Serie-2017-06-08.pdf",
|
||||
"sha256": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
|
||||
"pages": 16
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-95-I-Suplemento-2025-05-21.pdf",
|
||||
"sha256": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358",
|
||||
"pages": 2
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\Lei-13-2016-CIVA-BR-156-10-suplemento.pdf",
|
||||
"sha256": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
|
||||
"pages": 32
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf",
|
||||
"sha256": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
|
||||
"pages": 18
|
||||
}
|
||||
],
|
||||
"existing_corpus_references": [
|
||||
"docs/investmoz/document-corpus-inventory-2026-10-06.csv",
|
||||
"docs/investmoz/fiscal-source-references-2026-10-06.csv"
|
||||
]
|
||||
},
|
||||
"preservation": {
|
||||
"base": "e99ea1d0137543ca3fc37cb2c79732f3bb7c3edf",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_active_receipt": "l1-g5b-delivery-20261024.json;6f056359/e99ea1d0;174tables/369files/29published/28relations/408geometries;no schema/content/permissions changes",
|
||||
"frozen_fixture_sha256": "96f239cd9edd6d522447ce16e7b6dc32610f836a9d25dc8ea8789fb3042cf6f2",
|
||||
"sales_books": 20,
|
||||
"purchase_books": 1,
|
||||
"preserved_open": [
|
||||
"P080",
|
||||
"P084",
|
||||
"P085"
|
||||
],
|
||||
"counts": {
|
||||
"delivered": 66,
|
||||
"QA": 0,
|
||||
"functional_pending": 66,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
},
|
||||
"tests": {
|
||||
"frontend_new": 5,
|
||||
"affected_report_tests": 14,
|
||||
"frontend_total": 19,
|
||||
"API_tests": 1,
|
||||
"API_assertions": 20,
|
||||
"QA_database": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"types": "passed",
|
||||
"production_build": "passed;existing plugin warnings",
|
||||
"QA_build": "passed;existing chunk warning",
|
||||
"QA_storage": "save/recover/reject passed,temporary file only",
|
||||
"UI": {
|
||||
"actor": "Codex",
|
||||
"method": "Edge/CUA observed",
|
||||
"URL": "http://127.0.0.1:18642/g6a.html",
|
||||
"observed": [
|
||||
"unknown condition ->indeterminate",
|
||||
"failed condition ->nonapplication,normal tax unknown",
|
||||
"affirmative conditions ->exempt import VAT0.00",
|
||||
"switch treatment ->only applicable questions;answers,document,1000MZN retained",
|
||||
"save/recover/report ->P049/P051,Manica,2026-12,documents,sources",
|
||||
"three previous UI results;20salesbooks and1purchasebook identical"
|
||||
],
|
||||
"manual_Tempo_reply": null,
|
||||
"screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6a-imports-20261024\\qa-recovered-report.png",
|
||||
"screenshot_sha256": "e6914778f6513e2ea22850d1b30a79ff3592e0c8085cb09c38f1ffb23541cf9c"
|
||||
},
|
||||
"Word_PDF": "Existing exporter proofs reused;no new pagination claim"
|
||||
},
|
||||
"implementation": {
|
||||
"optional_snapshot_key": "importExemptions",
|
||||
"no_schema_change": true,
|
||||
"legacy_books": "no additional required fields;20sales and1purchase unchanged/current",
|
||||
"data_conditions": "per branch;unknown != false;no ordinary rate inferred",
|
||||
"value": "declared/previsional value preserved,optional;no invented customs taxable base",
|
||||
"period": "explicit import period independent from supporting document date and sales calendar",
|
||||
"history": "explicit classification archives previous result;edits keep historical state;reports show only applicable conditions",
|
||||
"roll_back": "l1-g6a-readonly-rollback-20261024.patch checked,not applied;readers/history/reports retained"
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 68,
|
||||
"QA": 0,
|
||||
"functional_pending": 64,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"G6": {
|
||||
"delivered": 2,
|
||||
"QA": 0,
|
||||
"functional_pending": 13
|
||||
},
|
||||
"limits": "2026/MZN;classificação L1 de12(1)(d/f),sem direitosaduaneirosL13,dedução/campo11L2,baseaduaneira,taxa normal presumida,apuramento integral ou submissãoAT. P080/P084/P085 explicitamente abertos;L1aberto;P001só05/06;bebidasL2/L3;Estatísticas/IAadiadas.",
|
||||
"qa_acceptance_status": "demonstrated_QA_not_installed",
|
||||
"qa_acceptance_counts": {
|
||||
"delivered": 66,
|
||||
"QA": 2,
|
||||
"functional_pending": 64,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"delivery_followup": {
|
||||
"served_commit": "e3601c124d50fa2b52ea9d9fb86fbddf1d224d51",
|
||||
"record": "iva_l1_g6a_homologation_20261024",
|
||||
"receipt": "l1-g6a-delivery-20261024.json"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
{
|
||||
"key": "iva_l1_g6b_P055_P057_import_exemptions_QA_demonstrated_20261024",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"candidate": "f75f36f0e36a5d9981f631b6e22f3c9e723ee454",
|
||||
"base": "a23f1dcb",
|
||||
"homologation": "e3601c12/a23f1dcb",
|
||||
"group": "G6B",
|
||||
"branches": {
|
||||
"AUD-SIM-L1-P055": "author_art_import",
|
||||
"AUD-SIM-L1-P057": "fire_brigade_vehicle"
|
||||
},
|
||||
"branch_count": 2,
|
||||
"source": {
|
||||
"reference": "CIVA12(1)(j/l),Lei13/2016PDF11/p1426(269),visual inspected;2022PDF2/p2252(26) and2025PDF12–13/p2180(12–13) retain j/l",
|
||||
"acceptance": "Tempo08/10/2026;no new generic authenticity/legal approval",
|
||||
"archive": [
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-16-I-Serie-2008-04-16.pdf",
|
||||
"sha256": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee",
|
||||
"pages": 28
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-248-I-Suplemento-1-2025.pdf",
|
||||
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
|
||||
"pages": 21
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-89-I-Serie-2017-06-08.pdf",
|
||||
"sha256": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
|
||||
"pages": 16
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-95-I-Suplemento-2025-05-21.pdf",
|
||||
"sha256": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358",
|
||||
"pages": 2
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\Lei-13-2016-CIVA-BR-156-10-suplemento.pdf",
|
||||
"sha256": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
|
||||
"pages": 32
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf",
|
||||
"sha256": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
|
||||
"pages": 18
|
||||
}
|
||||
],
|
||||
"existing_corpus_references": [
|
||||
"docs/investmoz/document-corpus-inventory-2026-10-06.csv",
|
||||
"docs/investmoz/fiscal-source-references-2026-10-06.csv"
|
||||
]
|
||||
},
|
||||
"preservation": {
|
||||
"base": "a23f1dcb6e886a6de75917f17f2da4b9ab94599e",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_active_receipt": "l1-g6a-delivery-20261024.json;e3601c12/a23f1dcb;174tables/369files/29published/28relations/408geometries;no schema/content/permissions changes",
|
||||
"frozen_fixture_sha256": "6765354faf917282ea03bed31cee071d1a44cf008a7560171048adb8ffa6debf",
|
||||
"sales_books": 20,
|
||||
"purchase_books": 1,
|
||||
"import_books": 1,
|
||||
"import_history": 3,
|
||||
"preserved_open": [
|
||||
"P080",
|
||||
"P084",
|
||||
"P085"
|
||||
],
|
||||
"counts": {
|
||||
"delivered": 68,
|
||||
"QA": 0,
|
||||
"functional_pending": 64,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
},
|
||||
"tests": {
|
||||
"frontend_new": 4,
|
||||
"existing_import_suite": 5,
|
||||
"frontend_total": 9,
|
||||
"API_tests": 1,
|
||||
"API_assertions": 23,
|
||||
"QA_database": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"types": "passed",
|
||||
"production_build": "passed;existing plugin warnings",
|
||||
"QA_build": "passed;existing chunk warning",
|
||||
"QA_storage": "save/recover/reject and UTF8 split-multibyte boundary passed;Buffer concatenation before decoding;temporary file only",
|
||||
"UI": {
|
||||
"actor": "Codex",
|
||||
"method": "Edge/CUA observed",
|
||||
"URL": "http://127.0.0.1:18643/g6b.html",
|
||||
"observed": [
|
||||
"unknown condition ->indeterminate",
|
||||
"failed condition ->nonapplication,normal tax unknown",
|
||||
"affirmative conditions ->exempt import VAT0.00",
|
||||
"switch treatment ->only applicable questions;answers,document,2500MZN retained",
|
||||
"save/recover/report ->P055/P057,Manica,2026-12,documents,sources",
|
||||
"four previous UI results;20salesbooks,1purchase and1importbook identical"
|
||||
],
|
||||
"manual_Tempo_reply": null,
|
||||
"screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6b-imports-20261024\\qa-recovered-report.png",
|
||||
"screenshot_sha256": "7f6ef7c5a3ee5aca026ad29279510b2ab9fa63d76d13b878007a5c58f4163a7e"
|
||||
},
|
||||
"Word_PDF": "Existing exporter proofs reused;no new pagination claim"
|
||||
},
|
||||
"implementation": {
|
||||
"existing_snapshot_key": "importExemptions",
|
||||
"scoped_version": "import-beneficiaries/1 only when new treatment selected;legacy keys/source preserved",
|
||||
"no_schema_change": true,
|
||||
"legacy_books": "no additional required fields;20sales,1purchase and1importbook unchanged/current",
|
||||
"data_conditions": "per branch;unknown != false;no ordinary rate inferred",
|
||||
"value": "declared/previsional value preserved,optional;no invented customs taxable base",
|
||||
"period": "explicit import period independent from supporting document date and sales calendar",
|
||||
"history": "explicit classification archives previous result;edits keep historical state;reports show only applicable conditions",
|
||||
"roll_back": "l1-g6b-readonly-rollback-20261024.patch checked,not applied;readers/history/reports retained"
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 70,
|
||||
"QA": 0,
|
||||
"functional_pending": 62,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"G6": {
|
||||
"delivered": 4,
|
||||
"QA": 0,
|
||||
"functional_pending": 11
|
||||
},
|
||||
"limits": "2026/MZN;classificação L1 de12(1)(j/l),sem direitosaduaneirosL13,dedução/campo11L2,baseaduaneira,taxa normal presumida,apuramento integral ou submissãoAT. P080/P084/P085 explicitamente abertos;L1aberto;P001só05/06;bebidasL2/L3;Estatísticas/IAadiadas.",
|
||||
"QA_auxiliary_encoding_correction": {
|
||||
"cause": "Demo middleware decoded each incoming byte chunk separately;one split UTF8 character changed in a prior-history key",
|
||||
"scope": "local synthetic QA file only;private API and accepted active data unchanged",
|
||||
"before": "ui-saved-before-utf8-fix.json preserved",
|
||||
"fix": "Concatenate buffers before UTF8 decoding;boundary regression test passed",
|
||||
"verification": "Reset from exact private API recovery via explicit QA button;save/recover/report repeated;all20sales+1purchase+1importbooks identical to frozen baseline",
|
||||
"helper_sha256": "3cbaac752269c91c6675a10e95646292cc8191949c23700b37805ed46a49672f"
|
||||
},
|
||||
"qa_acceptance_status": "demonstrated_QA_not_installed",
|
||||
"qa_acceptance_counts": {
|
||||
"delivered": 68,
|
||||
"QA": 2,
|
||||
"functional_pending": 62,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"delivery_followup": {
|
||||
"served_commit": "4cebd617651ca877bd4715c661973873e69f05e1",
|
||||
"record": "iva_l1_g6b_homologation_20261024",
|
||||
"receipt": "l1-g6b-delivery-20261024.json"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,224 @@
|
||||
{
|
||||
"key": "iva_l1_g6c_P053_P054_import_assets_QA_demonstrated_20261024",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"candidate": "8e5565d5e0501ecd2a40ae684f4948b867308c54",
|
||||
"base": "72e56f7a",
|
||||
"homologation": "4cebd617/72e56f7a",
|
||||
"group": "G6C",
|
||||
"branches": {
|
||||
"AUD-SIM-L1-P053": [
|
||||
"eligible_ship_import",
|
||||
"ship_operation_object_import"
|
||||
],
|
||||
"AUD-SIM-L1-P054": [
|
||||
"eligible_aircraft_import",
|
||||
"aircraft_operation_object_import"
|
||||
]
|
||||
},
|
||||
"branch_count": 2,
|
||||
"treatment_count": 4,
|
||||
"source": {
|
||||
"reference": "CIVA12(1)(h/i),Lei13/2016PDF11/p1426(269),by reference13(1)(f/g) and13(1)(c/d),PDF12/p1426(270);full-page visual proofs G6A/G4B reused;2022PDF2/p2252(26) and2025PDF13/p2180(13) retain h/i and do not change13",
|
||||
"acceptance": "Tempo08/10/2026;no generic authenticity/legal revalidation",
|
||||
"archive": [
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-16-I-Serie-2008-04-16.pdf",
|
||||
"sha256": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee",
|
||||
"pages": 28
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-248-I-Suplemento-1-2025.pdf",
|
||||
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
|
||||
"pages": 21
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-89-I-Serie-2017-06-08.pdf",
|
||||
"sha256": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
|
||||
"pages": 16
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-95-I-Suplemento-2025-05-21.pdf",
|
||||
"sha256": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358",
|
||||
"pages": 2
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\Lei-13-2016-CIVA-BR-156-10-suplemento.pdf",
|
||||
"sha256": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
|
||||
"pages": 32
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf",
|
||||
"sha256": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
|
||||
"pages": 18
|
||||
}
|
||||
],
|
||||
"existing_corpus_references": [
|
||||
"docs/investmoz/document-corpus-inventory-2026-10-06.csv",
|
||||
"docs/investmoz/fiscal-source-references-2026-10-06.csv"
|
||||
]
|
||||
},
|
||||
"preservation": {
|
||||
"base": "72e56f7ae5b3c5d8c0f22b61778ec291b2bca2f6",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_active_receipt": "l1-g6b-delivery-20261024.json;4cebd617/72e56f7a;174tables/369files/29published/28relations/408geometries;no schema/content/permissions changes",
|
||||
"frozen_fixture_sha256": "acbd2187c64bf4952b90117d247e5d8440b71cf094aad36ffe147e2098ef9d17",
|
||||
"sales_books": 20,
|
||||
"purchase_books": 1,
|
||||
"import_books": 2,
|
||||
"import_histories": {
|
||||
"opportunity:330": 3,
|
||||
"opportunity:331": 4
|
||||
},
|
||||
"preserved_open": [
|
||||
"P080",
|
||||
"P084",
|
||||
"P085"
|
||||
],
|
||||
"counts": {
|
||||
"delivered": 70,
|
||||
"QA": 0,
|
||||
"functional_pending": 62,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
},
|
||||
"tests": {
|
||||
"frontend_new": 4,
|
||||
"existing_import_suites": 9,
|
||||
"frontend_total": 13,
|
||||
"API_tests": 1,
|
||||
"API_assertions": 24,
|
||||
"QA_database": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"types": "passed",
|
||||
"production_build": "passed;existing plugin timing warnings",
|
||||
"QA_build": "passed;existing chunk warning",
|
||||
"QA_storage": "save/recover/reject and split-multibyte UTF8 boundary passed;inherited Buffer concatenation preserved",
|
||||
"UI": {
|
||||
"actor": "Codex",
|
||||
"method": "Edge/CUA observed",
|
||||
"URL": "http://127.0.0.1:18644/g6c.html",
|
||||
"observed": [
|
||||
"four treatments mapped to two IDs",
|
||||
"object link unknown ->indeterminate;negative ->nonapplication;affirmative ->exempt0.00",
|
||||
"switch object to principal aircraft ->own condition unknown,object response retained;return ->response restored",
|
||||
"4000MZN/document/2026-12 conserved",
|
||||
"save/recover/report ->P053/P054/four treatments,Manica,opportunity332,source12h/i and13f/g",
|
||||
"four previous new-book UI results;all23acceptedbooks identical"
|
||||
],
|
||||
"manual_Tempo_reply": null,
|
||||
"screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6c-imports-20261024\\qa-recovered-report.png",
|
||||
"screenshot_sha256": "d09a98c6a6c73a526c8803358eef6448cdc634a8a430c6ab8fe691ecdbd32bf4"
|
||||
},
|
||||
"Word_PDF": "Existing exporter proofs reused;no new pagination claim"
|
||||
},
|
||||
"implementation": {
|
||||
"existing_snapshot_key": "importExemptions",
|
||||
"no_schema_change": true,
|
||||
"scoped_version": "import-assets/1 only for selected asset treatments;G6A/G6B keys/source remain unchanged",
|
||||
"shared_definitions": "internationalShipEligibility/internationalAircraftEligibility export existing G4B strings without changing sale treatments",
|
||||
"legacy_books": "20sales,1purchase and2importbooks identical/current without recalculation",
|
||||
"history": "explicit classification archives previous result;edits keep earlier version",
|
||||
"not_applicable_UI": "only conditions for selected principal asset/object;hidden answers retained",
|
||||
"field11": "no deduction or ModeloA totals populated by classification",
|
||||
"rollback": "l1-g6c-readonly-rollback-20261024.patch checked,not applied;readers/history/reports retained"
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 72,
|
||||
"QA": 0,
|
||||
"functional_pending": 60,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"G6": {
|
||||
"delivered": 6,
|
||||
"QA": 0,
|
||||
"functional_pending": 9
|
||||
},
|
||||
"limits": "2026/MZN;classificação12(1)(h/i),bem principal ou objecto da exploração identificado,sem baseaduaneira,direitosL13,dedução/campo11L2,taxa normal presumida,apuramento integral ou submissãoAT. Não encerraP052/abastecimentos. P080/P084/P085 explicitamente abertos;L1aberto;P001só05/06;bebidasL2/L3;Estatísticas/IAadiadas.",
|
||||
"qa_acceptance_status": "demonstrated_QA_not_installed",
|
||||
"qa_acceptance_counts": {
|
||||
"delivered": 70,
|
||||
"QA": 2,
|
||||
"functional_pending": 60,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"delivery_followup": {
|
||||
"served_commit": "d46b794ab2c6113738f76c69097ae3dcddcf56dd",
|
||||
"record": "iva_l1_g6c_homologation_20261024",
|
||||
"receipt": "l1-g6c-delivery-20261024.json"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
{
|
||||
"key": "iva_l1_g6d_P048_import_customs_QA_demonstrated_20261024",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"candidate": "0eb37ef59b9b65837e6791518b378fe4e64ca112",
|
||||
"base": "2ed62165",
|
||||
"homologation": "d46b794a/2ed62165",
|
||||
"group": "G6D",
|
||||
"branches": {
|
||||
"AUD-SIM-L1-P048": [
|
||||
"customs_transit_import",
|
||||
"customs_temporary_import",
|
||||
"customs_drawback_import"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 3,
|
||||
"source": {
|
||||
"reference": "CIVA12(1)(c),Lei13/2016PDF11/p1426(269),full-page visual proof G6A reused;2022PDF2/p2252(26) and2025PDF13/p2180(13) retain c by reference;no new expanded wording used",
|
||||
"acceptance": "Tempo08/10/2026;no generic authenticity/legal revalidation",
|
||||
"archive": [
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-16-I-Serie-2008-04-16.pdf",
|
||||
"sha256": "fc373ff5637edf75ec6a9595dec8763a8503d4ee786e3b7d8f1c742eae9d80ee",
|
||||
"pages": 28
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-248-I-Suplemento-1-2025.pdf",
|
||||
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
|
||||
"pages": 21
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-89-I-Serie-2017-06-08.pdf",
|
||||
"sha256": "11f0cab15eb6e51010952203ffa24fdc533a24fd642e19525fe4f46b17a1f5e5",
|
||||
"pages": 16
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\BR-95-I-Suplemento-2025-05-21.pdf",
|
||||
"sha256": "e0e682e2c027c3cd9c1d46a73a3f48bc5f6bdbf05667fd97314d7a3f6a456358",
|
||||
"pages": 2
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\Lei-13-2016-CIVA-BR-156-10-suplemento.pdf",
|
||||
"sha256": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
|
||||
"pages": 32
|
||||
},
|
||||
{
|
||||
"file": "docs\\investmoz\\simulations\\source-archive\\Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf",
|
||||
"sha256": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
|
||||
"pages": 18
|
||||
}
|
||||
],
|
||||
"existing_corpus_references": [
|
||||
"docs/investmoz/document-corpus-inventory-2026-10-06.csv",
|
||||
"docs/investmoz/fiscal-source-references-2026-10-06.csv"
|
||||
],
|
||||
"scope_lookup_2020": {
|
||||
"URL": "https://www.inm.gov.mz/pt-br/content/assembleia-da-rep%C3%BAblica-suplemento-n%C2%BA-1-de-231220-pag-2414-1-20-br-n%C2%BA-246-boletim-da",
|
||||
"scope": "Official INM index identifies Lei16/2020 as altering9(13),not12(1)(c)",
|
||||
"retrieval": "Index search text read;direct page timeout and two official PDF download attempts failed;no fullPDF obtained or claimed",
|
||||
"use": "scope lookup for an existing reference;not a second authenticity approval and not the operative text of12(1)(c)"
|
||||
}
|
||||
},
|
||||
"preservation": {
|
||||
"base": "2ed62165b7a5b7e0a836db350fb39ace6453fed5",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_active_receipt": "l1-g6c-delivery-20261024.json;d46b794a/2ed62165;174tables/369files/29published/28relations/408geometries;no schema/content/permissions changes",
|
||||
"frozen_fixture_sha256": "ac5f1b23de6b3e13c9b0e116b435c389d8147d5f4145b19dc234bf79596c5db6",
|
||||
"sales_books": 20,
|
||||
"purchase_books": 1,
|
||||
"import_books": 3,
|
||||
"import_histories": {
|
||||
"opportunity:330": 3,
|
||||
"opportunity:331": 4,
|
||||
"opportunity:332": 4
|
||||
},
|
||||
"preserved_open": [
|
||||
"P080",
|
||||
"P084",
|
||||
"P085"
|
||||
],
|
||||
"counts": {
|
||||
"delivered": 72,
|
||||
"QA": 0,
|
||||
"functional_pending": 60,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
},
|
||||
"tests": {
|
||||
"frontend_new": 4,
|
||||
"existing_import_suites": 13,
|
||||
"frontend_total": 17,
|
||||
"API_tests": 1,
|
||||
"API_assertions": 25,
|
||||
"QA_database": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"types": "passed",
|
||||
"production_build": "passed;existing plugin timing warnings",
|
||||
"QA_build": "passed;existing chunk warning",
|
||||
"QA_storage": "save/recover/reject and split-multibyte UTF8 boundary passed;inherited Buffer concatenation preserved",
|
||||
"UI": {
|
||||
"actor": "Codex",
|
||||
"method": "Edge/CUA observed",
|
||||
"URL": "http://127.0.0.1:18645/g6d.html",
|
||||
"observed": [
|
||||
"three treatments mapped to one ID",
|
||||
"full customs duty exemption unknown ->indeterminate;negative ->nonapplication;affirmative with own regime ->exempt0.00",
|
||||
"switch transit to temporary import ->own regime condition unknown,previous answers retained;return ->transit response restored",
|
||||
"5000MZN/document/2026-12 conserved",
|
||||
"save/recover/report ->P048/three treatments,Manica,opportunity333,source12(1)(c)",
|
||||
"four previous new-book UI results;all24acceptedbooks identical"
|
||||
],
|
||||
"manual_Tempo_reply": null,
|
||||
"screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6d-imports-20261024\\qa-recovered-report.png",
|
||||
"screenshot_sha256": "fadcff5be7c2a7a768a87531fefab15d189f87c9181e60fc2c794b4a5a01ae8c"
|
||||
},
|
||||
"Word_PDF": "Existing exporter proofs reused;no new pagination claim"
|
||||
},
|
||||
"implementation": {
|
||||
"existing_snapshot_key": "importExemptions",
|
||||
"no_schema_change": true,
|
||||
"scoped_version": "import-customs-regimes/1 only for selected customs import treatments;G6A/G6B/G6C keys/source remain unchanged",
|
||||
"regime_confirmations": "transit/temporary/drawback have distinct keys;fullCustomsExemption differs from P049 customsExempt;partial relief or suspension cannot satisfy total exemption",
|
||||
"legacy_books": "20sales,1purchase and3importbooks identical/current without recalculation",
|
||||
"history": "explicit classification archives previous result;edits keep earlier version",
|
||||
"not_applicable_UI": "only conditions for selected customs regime;hidden answers retained",
|
||||
"field11": "no deduction or ModeloA totals populated by classification",
|
||||
"rollback": "l1-g6d-readonly-rollback-20261024.patch checked,not applied;readers/history/reports retained"
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 72,
|
||||
"QA": 1,
|
||||
"functional_pending": 59,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"G6": {
|
||||
"delivered": 6,
|
||||
"QA": 1,
|
||||
"functional_pending": 8
|
||||
},
|
||||
"limits": "2026/MZN;P048/12(1)(c),trânsito/importação temporária/draubaque com isenção total de direitos,sem baseaduaneira,cálculo de direitosL13,saída de regime,dedução/campo11L2,taxa normal presumida,apuramento integral ou submissãoAT. Não confundir com vendas em regimeG5/P083. P080/P084/P085 explicitamente abertos;L1aberto;P001só05/06;bebidasL2/L3;Estatísticas/IAadiadas.",
|
||||
"qa_status_preserved": "demonstrated_QA_not_installed",
|
||||
"delivery_followup": {
|
||||
"served_commit": "2d889a211ba303db31dcba815e439456dfba9f36",
|
||||
"record": "iva_l1_P048_P080_joint_homologation_20261024",
|
||||
"receipt": "l1-g6d-g5c-delivery-20261024.json",
|
||||
"counts": {
|
||||
"delivered": 74,
|
||||
"QA": 0,
|
||||
"functional_pending": 58,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
{
|
||||
"candidate": "1565aa4ffb13fae75e925ccdb2b7553a9b111dd5",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P052": [
|
||||
"ship_provisions_import",
|
||||
"ship_fuel_import",
|
||||
"ship_technical_products_import",
|
||||
"ship_cargo_accessories_import",
|
||||
"aircraft_provisions_import",
|
||||
"aircraft_fuel_import",
|
||||
"aircraft_technical_products_import",
|
||||
"aircraft_cargo_accessories_import"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 8,
|
||||
"source": "Lei13/2016,CIVA12(1)(g),12(3)(a)(i–iv)/(b),PDF11–12/p1426(269–270),13(3);2022PDF2/2025PDF13g/3 maintainedbyreference",
|
||||
"source_scope": "Ship maritime/fluvial/lacustrine international navigation;aircraft international navigation,not requirement of principallyinternationalcompany fromP054. Provisions,fuel,technicalproducts,cargoaccessories;ownexclusions only. No deduction/field11,customsduties/base ornormalVAT assumed.",
|
||||
"new_checks": {
|
||||
"frontend": {
|
||||
"passed": 3,
|
||||
"failed": 0,
|
||||
"record": "node:test outputthissession,no savedstdoutclaimed;acceptedoldproofs reused,not rerun"
|
||||
},
|
||||
"API": {
|
||||
"tests": 2,
|
||||
"assertions": 32,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6e-supplies-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"production_build": "passed;existingplugin/chunkwarnings",
|
||||
"QA_storage": "1testpassed,save/recover/reject,multibyteUTF8bufferboundary",
|
||||
"UI": "CodexEdgeCUArealcomponent:coastalfishingexclusion unknown/nonapplication/exempt states,fueltanksconditiononlyfuel,save/recover/report8rows,5historyversions;notmanualTempoacceptance"
|
||||
},
|
||||
"technical_obstacle_resolved": {
|
||||
"origin": "Implementationchoice,notTempobusinessrule",
|
||||
"old_limit_characters": 1000000,
|
||||
"observed_preserved_draft_characters": 1040665,
|
||||
"new_limit_characters": 4000000,
|
||||
"why": "Do not discardacceptedbooks/explicit history tofitnewbranch;allowcurrentdraftwithboundedJSONstringvalidation",
|
||||
"evidence": "InitialAPI422 recorded intooloutput;afterfix exactprivate recoveryand4millionboundnegative testpassed;no activechange"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "4e4bf6b8595f1b92d5a9de1b90be8d639f34feb5",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "P048/P0802d889a21/e3269079;174tables/369files/29published/28relations/408geometries,postgres equivalent;reuse accepted code/schema/data/config/permission delta proof",
|
||||
"frozen_fixture": "tests\\frontend\\fixtures\\iva-offers-inputs.json",
|
||||
"sha256": "98e7e77d3ed4bd0151b8192f190b3ed1eba4e2174385c8d0aa613be04331023e",
|
||||
"preserved": "26fiscalbooks+1offerpreparationbook(2rows,histories,deliberatepurposeedit);no recalculation",
|
||||
"counts_before": {
|
||||
"delivered": 74,
|
||||
"QA": 0,
|
||||
"functional_pending": 58,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"active_changes": 0
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 74,
|
||||
"QA": 1,
|
||||
"functional_pending": 57,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"active": "2d889a21/e3269079unchanged;no push/install/migration",
|
||||
"P084_P085": "ModelI.1diploma checked jointly;Despacho06/01/2010->Decreto56/2009art2->CBFLei4/2009;no direct14(3)correspondence found inreadRegulation1–16;scenario mapping recorded separately;drafts5ec2f198preservedexactly",
|
||||
"limits": "L1open;P001only05/06;beveragesL2/L3;Statistics/AIdeferred;closingL1doesnotrequireL2/L3/alltaxes",
|
||||
"qa_status_preserved": "P052 demonstratedQA;notinstalled;P084/P085 drafts preserved,benefits pending",
|
||||
"delivery_followup": {
|
||||
"served_commit": "c1314cdf90c368b51489aaf04c2cdbe59cfb88e6",
|
||||
"receipt": "l1-g6e-delivery-20261024.json",
|
||||
"record": "iva_l1_g6e_P052_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 75,
|
||||
"QA": 0,
|
||||
"functional_pending": 57,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
{
|
||||
"candidate": "29e708ba2dca2450eaff8eff6f5e19079ffc7f8e",
|
||||
"implementation_commit": "f9fb04f9",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P050": [
|
||||
"service_in_customs_value",
|
||||
"accessory_service_first_destination"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 2,
|
||||
"source": "CIVA12(1)(e),Lei13/2016PDF11/p1426(269);16(1)/16(1)(b)/16(2),PDF14/p1426(272);2022PDF1–2/2025PDF12–13maintain12e byreference,notchange16;2020/2025May9(13)scopes reused",
|
||||
"meaning": "Servicefullvalueincluded in importtaxbase,eitheralreadyincustomsvalue oraddedaccessorycharge untilfirstdestination;destinationfromtransportdocument or,initsabsence,firstbreakbulk inland. Two technicalprofiles,notnewbusinessconditions.",
|
||||
"tax_separation": "serviceVat0.00 onlywhenownconditions;importVat remainsnull forP050,no customsbase/duties/importedgoodstaxcalculation,normalratepresumption,invoicecorrection orfield11deduction",
|
||||
"new_inputs": "OptionalserviceImportRef,serviceBaseRef,serviceFirstDestination(onlyaccessoryprofile),serviceProvider. Servicevalue/reference/context requiredforclassification;not newmandatoryfields onoldgoods. HidegoodsCode/originCountry forservices;preserve hiddenanswers across profilechange.",
|
||||
"reference_reuse": "P050services filteredout from importedgoods references ofP084/P085;no newtaxbenefit or goodsconversion",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"new_tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "allownconditions,missing/failednotzero,ownfirstdestination,switchpreservation,service/importVATseparation,27priorfiscalbooks+946fc089drafts exact,currentoldkeys,report,malformedservicewriteguard,no service-as-goods reuse",
|
||||
"record": "latestnode:test outputthissession;acceptedoldproofs reused,not rerun"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 30,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6f-services-20261024\\api-tests.xml"
|
||||
},
|
||||
"types_final": "passed",
|
||||
"production_build_final": "passed,existingplugin/chunkwarnings",
|
||||
"synthetic_QA_storage": "1passed includingmultibyteUTF8bufferboundary",
|
||||
"UI": "CodexEdgeCUArealcomponent:inclusionunknown->indeterminate,no->nonapplication,yes->serviceexemption;servicefieldsownrefs;goodsfields hidden,firstdestination onlyaccessory;save/recover/report2rows/opportunity336/Manica/2026-12/document14Nov2026/5historyversions;notmanualTempoacceptance"
|
||||
},
|
||||
"integrity_fix": "Newmalformedoptionalreference test initially detected savepath lacked validating newencodedbook;now validatesbefore returning/onChange,no original overwritten;validoldbooks/keys preserved",
|
||||
"preservation": {
|
||||
"base": "77d1290258a925a104b616dc4648db33d43064ea",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"preservation": "Reuse acceptedG6Ec1314cdf/536559d6:174tables/369files/29published/28relations/408geometries;code/schema/data/config/permissions delta accepted;no active query/write in this QA task",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-offer-paths-inputs.json",
|
||||
"sha256": "78125d82172cda05c16b10e74ac2fdfd4eaaa25bd99cd3bde33281c2bfdd01e6",
|
||||
"books": "27fiscalbooks+offerbook;requeststates/scopes/normal-conditionalscenarios/history946fc089preservedexactly",
|
||||
"counts_before": {
|
||||
"delivered": 75,
|
||||
"QA": 0,
|
||||
"functional_pending": 57,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
}
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 75,
|
||||
"QA": 1,
|
||||
"functional_pending": 56,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"active": "Unchangedc1314cdf/536559d6;no push/install/activequeries/schema/data/config/permissionchange",
|
||||
"P084_P085": {
|
||||
"authorized_partial_candidate": "946fc089",
|
||||
"next_delivery_scope": "Preparation/requeststates/scopeddecisions/humanitarianpurpose/normalandconditionalhypotheticalscenarios,notconfirmedbenefit/notclosing2branches",
|
||||
"documentary_scope": "IdentifyexpressapplicableCIVA14(3)procedure/link and amendments;distinguishP084internal/import andP085acquisition. ModelI.1/Despacho/CBFcotejo reused,not repeated;do notinventcertificates/approvers orclaimregulation nonexistent",
|
||||
"preserved": "Allrows,scopeversions,deliberateedits,normal/conditionalinputs andhistory exactlyequalfrozenfixture"
|
||||
},
|
||||
"limits": "L1open;P001only05/06;beveragesL2/L3;classificationseparatefromfield11;Statistics/AIdeferred;L1closuredoesnotrequireL2/L3/alltaxes",
|
||||
"qa_status_preserved": "P050 demonstratedQA,notinstalled;P084/P085 partialpreparation/scenarios includedinancestry andauthorizedfornextdelivery,notbenefitclosure",
|
||||
"delivery_followup": {
|
||||
"served_commit": "78c9f4a356d5eaf590d8d82168228a2f84b1f633",
|
||||
"receipt": "l1-g6f-delivery-20261024.json",
|
||||
"record": "iva_l1_g6f_P050_with_partial_P084_P085_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 76,
|
||||
"QA": 0,
|
||||
"functional_pending": 56,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
{
|
||||
"implementation_commit": "9783c54b2c70b2d91fefd08a394a21b0690af5ba",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P056": [
|
||||
"authorized_investment_equipment"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 1,
|
||||
"condition_count": 4,
|
||||
"source": "CIVA12(1)(k),Lei13/2016PDF11/p1426(269);Lei22/2022PDF2/p2252(26),Lei10/2025PDF13/p2180(13)maintain k by remissão;2017rectificationPDF1 concerns6/14/annexes,not12k",
|
||||
"meaning": "Imported equipment classified K,destined to investment in undertaking authorized under InvestmentLaw/regulation;authorization reference and applicable scope,not authorization request or automatic class lookup",
|
||||
"source_links": [
|
||||
"https://www.inm.gov.mz/pt-br/content/suplemento-n%C2%BA-10-de-301216-pag-1426-259-290-br-n%C2%BA-156-boletim-da-rep%C3%BAblica-i-serie",
|
||||
"https://pt.apiex.gov.mz/investir/"
|
||||
],
|
||||
"technical_choices": "Dedicated optional reference/scope fields required only for newP056 classification;traceability of statutory conditions,not additional certificate/approver or official-source revalidation;reuse importer,documents,value,period,evidence and opportunity",
|
||||
"scope": "2026/MZN,classification of import VAT only;no customsbase/duties,automatic authorization or goodsclassification,domestic purchaseexemption,deduction/field11/ModeloA totals",
|
||||
"result": "0.00 only ownconditions yes+reference/scope;projected assumption expressly labelled;missing=indeterminate;no=notapplicable and no presumed ordinaryrate",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 3,
|
||||
"passed": 3,
|
||||
"failed": 0,
|
||||
"scope": "own conditions,mistyped writes,switch retention,context invalidation,all delivered books unchanged,serviceVAT separate,partial offers unchanged,history,report"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 25,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6g-investment-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Real component in Edge/CUA:unknown/no/yes authorization triad,own fields,save/recover/report one row,5 prior versions;synthetic only,not manual Tempo acceptance",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6g-investment-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "0f9f7e3409bdea1d4d6c351a572e7c37b3a09b4e",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "78c9f4a3/0f9f7e34;174 tables/369 files;29 published fiches/28 relations/408 geometries;code/schema/data/config/permissions compared at delivery",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g6g-preserved-inputs.json",
|
||||
"sha256": "43b5060803730e940bc1afa5e75dac16e634da2cf3ea80ce71cab9ef6185e51d",
|
||||
"counts_before": {
|
||||
"delivered": 76,
|
||||
"QA": 0,
|
||||
"functional_pending": 56,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"scope": "P056 only; preserve P050 service VAT separately and P084/P085 preparation/conditional simulation without closing benefits; no active query/write"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-import-exemptions.ts": "1b4fda4e7e363e68f951eca14a415a93d08b06aaa49b41e639b44fc5c9cee488",
|
||||
"resources/js/components/simulation-import-exemptions.tsx": "c6f36defc756eac0bb21f17e7165bb84efbbbfd120ea3be83787ffe368b7f1b1"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 76,
|
||||
"QA": 1,
|
||||
"functional_pending": 55,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "78c9f4a3",
|
||||
"remaining": "Integrate/deliver by existingGit process with manifest,fresh backup/isolatedrestore and installeddelta;no push in this QA task",
|
||||
"limits": "P084/P085 partial only,pending;P00105/06;L1open;beveragesL2/L3;Stats/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6g-investment-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "9b26217dec945fe07b665c6ad7638a965bf104a9",
|
||||
"receipt": "l1-g6g-delivery-20261024.json",
|
||||
"record": "iva_l1_g6g_P056_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 77,
|
||||
"QA": 0,
|
||||
"functional_pending": 55,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
{
|
||||
"implementation_commit": "69b6c49a600c02352fdb9d10b0f756dca6c500a5",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P060": [
|
||||
"un_development_exemption",
|
||||
"un_development_reduction"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 2,
|
||||
"conditions": "Seven common statutory conditions and one own customs-relief condition per treatment;not16 treatments",
|
||||
"source": "CIVA12(2)(c),Lei13/2016PDF11/p1426(269),12(4)PDF12/p1426(270);Lei22/2022PDF2–3 andLei10/2025PDF13 maintain2/4 by remissão;2017rectification does notchange12(2)c/4",
|
||||
"source_links": [
|
||||
"https://www.parlamento.mz/?post_documents=boletim-da-republica-i-serie-nr-250-quarta-feira-28-de-dezembro-de-2022",
|
||||
"https://www.inm.gov.mz/pt-br/content/suplemento-n%C2%BA-10-de-301216-pag-1426-259-290-br-n%C2%BA-156-boletim-da-rep%C3%BAblica-i-serie"
|
||||
],
|
||||
"meaning": "Materials/equipment for development projects funded by UN agencies/specialized institutions accredited with MozambiqueGovernment;exclusive project implementation;favourableFinanceMinisterdecision following priorrequest/list/importplan and customsconformity with approvedlist/plan;request is not grant",
|
||||
"technical_choices": "Dedicated optional document references shown/required only for P060 classification;reuse importer,goods,document,date,period,evidence,opportunity;keep all answers across treatment switches. Reference fields trace statutory conditions,not newcertificate/approver or revalidation of officialsources. Exact decimal arithmetic via integers with up to6inputfractiondigits/14outputfractiondigits,no assumed fiscalrounding;negative/malformed/unknown inputs not zero. Newversion only books containingP060,oldkeys exactlycurrent.",
|
||||
"scope": "2026/MZN,classification of own import VAT and application of expressly supplied rights-relief proportion to expressly supplied normalVAT. No customsbase/duties/normalVAT-rate calculation;no deduction/field11/ModeloA totals/serviceVAT alteration. Not automatically extend decisions/list/plan scope.",
|
||||
"formula": "normalVAT × (100 − rightsReductionPercent)/100;partial percentage strictly between0and100;100requires ownfull-exemptiontreatment;0notapplicable;explicitnormalVAT0 distinctfrommissing",
|
||||
"result": "Full customs exemption plus ownconditions -> importVat0.00;partial reduction -> statusreduced and exactresult;missing=indeterminate,no=notapplicable,no presumedordinarytax. Effective-declared versus projected-assumptions explicit.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "Every owncondition missing/no;references and full/partial boundaries;exact fractions/large numbers/zero;malformedwriteguard;switch/context/referenceinvalidation;history;priorbooks/partialoffers exactlypreserved;report"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 34,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6h-development-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Realcomponent Edge/CUA:decision unknown/no/assumed;normalVATmissing indeterminate;800with25%=600,50%=400;full0.00;save/recover/report2rows and5priorversions;scope/list/plan/decision/references retained. Synthetic only,not manualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6h-development-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "163e090ea547d0c046bddecc0b4f5db150910d7d",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "9b26217d/163e090e;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions verified at delivery",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g6h-preserved-inputs.json",
|
||||
"sha256": "0eec529d197507a74d63a046761604fa31d10d8908d4d27b79719a1d116524d8",
|
||||
"counts_before": {
|
||||
"delivered": 77,
|
||||
"QA": 0,
|
||||
"functional_pending": 55,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"scope": "P060 only;preserve P056 authorization scope,P050 serviceVAT,and partial P084/P085;no active query/write"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-import-exemptions.ts": "799e9a0020e805af9f67387bfa36608c4973f15c4427d1b82c3f6b6398aed129",
|
||||
"resources/js/components/simulation-import-exemptions.tsx": "89ab431fa6810c1f56897f203a817a41722c4a9df0cb075561dee6208e8730d1"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 77,
|
||||
"QA": 1,
|
||||
"functional_pending": 54,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "9b26217d",
|
||||
"remaining": "Integrate/deliver by existingGit with manifest,freshbackup/realisolatedrestore and installeddelta;no push in QA task",
|
||||
"limits": "P084/P085 partial,pending;P00105/06;L1open;beveragesL2/L3;Stats/AI deferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6h-development-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "eb9294ef42c2cfc97eb8c2553d545e3bff7c0add",
|
||||
"receipt": "l1-g6h-delivery-20261024.json",
|
||||
"record": "iva_l1_g6h_P060_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 78,
|
||||
"QA": 0,
|
||||
"functional_pending": 54,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
{
|
||||
"implementation_commit": "67a96085c8828231bb7e44ca26a4acb7b915ecee",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P096": [
|
||||
"regulated_energy"
|
||||
],
|
||||
"AUD-SIM-L1-P097": [
|
||||
"aeronautical_fees"
|
||||
],
|
||||
"AUD-SIM-L1-P098": [
|
||||
"public_works"
|
||||
],
|
||||
"AUD-SIM-L1-P099": [
|
||||
"public_water"
|
||||
]
|
||||
},
|
||||
"branch_count": 4,
|
||||
"treatment_count": 4,
|
||||
"source": "CIVA15(2)j/k/l/m,15(1)/(5)/(6)/(9),Lei13/2016PDF13–14/p1426(271–272);Lei22/2022PDF3mantém15(2)j–m;Lei10/2025não altera15,adita18(6),PDF13:dedução do imposto suportado relativo a essas operações na mesma proporção da base reduzida.",
|
||||
"meaning": {
|
||||
"P096": {
|
||||
"treatment": "regulated_energy",
|
||||
"formula": "contraprestação total antes redução,sempróprioIVA ×62%",
|
||||
"conditions": "Transmissão de energia com preço fixado porAutoridadePública,referência/âmbito/intervalo aplicáveis."
|
||||
},
|
||||
"P097": {
|
||||
"treatment": "aeronautical_fees",
|
||||
"formula": "contraprestação total antes redução,sempróprioIVA ×85%",
|
||||
"conditions": "Preço doserviço fixado através de taxas aeronáuticas. Não aplicar a comunicações/saneamento/telecomunicações genericamente pelo título histórico da matriz;é necessário demonstrar o preço fixado através de taxa aeronáutica15(2)k."
|
||||
},
|
||||
"P098": {
|
||||
"treatment": "public_works",
|
||||
"formula": "contraprestação total antes redução,sempróprioIVA ×40%(redução60%,não base60%)",
|
||||
"conditions": "Construção/reabilitação de obras públicas abrangidas15(2)l/15(9),projecto/contrato/categoria/âmbito identificados;estradas,pontes,infraestrutura água/saneamento,electrificação rural emprojectos públicos e hidráulicaagrícola noâmbito definido. Não exigir preço regulado a esta alínea."
|
||||
},
|
||||
"P099": {
|
||||
"treatment": "public_water",
|
||||
"formula": "contraprestação total antes redução,sempróprioIVA ×75%",
|
||||
"conditions": "Água potável através derede pública,preço fixado porAutoridadePública comreferência/âmbito/intervalo aplicáveis."
|
||||
}
|
||||
},
|
||||
"formula": "Base=fullconsideration before reduction excludingownVAT ×branchpercentage once;exactdecimal retained,no fiscalrounding assumed.",
|
||||
"scope": "2026/MZN,base apenas. Percentagens62/85/40/75 são de base,não taxasIVA. Proporção18(6)registada sem calcular/conceder dedução/campo11;dedução permanece nas condições/lotes próprios. Sem taxaIVA,IVA,isenção ou totaisModeloA. Não dividir bruto comIVA sem composição esclarecida,nem reduzir montante já reduzido.",
|
||||
"technical_choices": "NewregulatedReducedBases opportunity-scoped book in existingmodelo_a snapshot/API/dossier,no schema/permissions. Switchretainshiddenprice/projectrefs andclearsownconditions;sharedconditions retained. Inputs15integer/6fractiondigits,BigInt×percentage,outputupto8fractiondigits. Existingrefs or explicitassumptions,no certificates/approvers invented.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 6,
|
||||
"passed": 6,
|
||||
"failed": 0,
|
||||
"by_branch": {
|
||||
"AUD-SIM-L1-P096": "Ownconditions unknown/no,source/scope/date/currency,exactpercentage/base,zero vsunknown passed",
|
||||
"AUD-SIM-L1-P097": "Ownconditions unknown/no,source/scope/date/currency,exactpercentage/base,zero vsunknown passed",
|
||||
"AUD-SIM-L1-P098": "Ownconditions unknown/no,source/scope/date/currency,exactpercentage/base,zero vsunknown passed",
|
||||
"AUD-SIM-L1-P099": "Ownconditions unknown/no,source/scope/date/currency,exactpercentage/base,zero vsunknown passed"
|
||||
},
|
||||
"additional": "Eightfractiondigit exactresults from6fractioninput,no float/fiscalrounding;works40not60,pricefields irrelevanttoworks,project/categories guard,switchhiddenretention,allpreviousbooks/history/report/corruptwriteguards"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 27,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7-reduced-bases-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Edge/CUArealcomponent:unknown full-before-reduction composition makesenergybaseindeterminate;unknown workscategory makesworksbaseindeterminate;restore confirms620.155/850.2125/400.10/750.1875MZN,proportion62/85/40/75%,VAT/ratenull. Save/recover/report4rows+3previousversions. SyntheticQA,notmanualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7-reduced-bases-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "b0e01ef737d26a991474e7fcc5d77cd330f20815",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P089",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094",
|
||||
"AUD-SIM-L1-P095",
|
||||
"AUD-SIM-L1-P100",
|
||||
"AUD-SIM-L1-P101",
|
||||
"AUD-SIM-L1-P102",
|
||||
"AUD-SIM-L1-P103",
|
||||
"AUD-SIM-L1-P105",
|
||||
"AUD-SIM-L1-P106",
|
||||
"AUD-SIM-L1-P107",
|
||||
"AUD-SIM-L1-P108",
|
||||
"AUD-SIM-L1-P109",
|
||||
"AUD-SIM-L1-P110",
|
||||
"AUD-SIM-L1-P111",
|
||||
"AUD-SIM-L1-P112",
|
||||
"AUD-SIM-L1-P113",
|
||||
"AUD-SIM-L1-P114",
|
||||
"AUD-SIM-L1-P115",
|
||||
"AUD-SIM-L1-P116",
|
||||
"AUD-SIM-L1-P117",
|
||||
"AUD-SIM-L1-P118",
|
||||
"AUD-SIM-L1-P119",
|
||||
"AUD-SIM-L1-P120"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "2a725440/b0e01ef7;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g7-reduced-preserved.json",
|
||||
"sha256": "0f106010eb54921462d64f42bf44ac551ef2ab614f6fe0eb063908d858529b01",
|
||||
"scope": "P096–P099QA;all priorbooks/history includingP111–P120 andpartialP084/P085 immutable;no activewrites"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-reduced-bases.ts": "4fc79388066a4d012b9af279ef53212ee963ae43d858307155e9ae8a140b5285",
|
||||
"resources/js/components/simulation-reduced-bases.tsx": "00f1e0f1490240f578401c3a6e10b6812ee5b7978bbf7d7e5c9c1a81124bc6d1",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "6032b9605703e7e29d5fb45cc158e8da57b9af4980d312f3326ddf18ee1e8814",
|
||||
"resources/js/lib/project-dossier.ts": "ab044a0952cc4753925768f5ba7fd422637cfb9d826c1e8c26d21d7616b6dacf"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 103,
|
||||
"QA": 4,
|
||||
"functional_pending": 25,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "2a725440",
|
||||
"remaining": "OnejointGit delivery forfourcompatiblebranches,onebackup/realisolatedrestore,perbranchQAproofsreused,installeddeltaonly. No individualbranch deployment.",
|
||||
"limits": "P121digital/P084/P085pending;L1open;P00105/06;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7-reduced-bases-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "2fdca86367d8bad524113b4cf6c49a0110130be9",
|
||||
"receipt": "l1-g7-reduced-delivery-20261024.json",
|
||||
"record": "iva_l1_g7_reduced_P096_P099_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 107,
|
||||
"QA": 0,
|
||||
"functional_pending": 25,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
{
|
||||
"implementation_commit": "1dda6ea25858f9fd35304458b09b8e6ab899ebb8",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P090": [
|
||||
"public_authority_indemnity",
|
||||
"public_authority_compensation"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 2,
|
||||
"source": "CIVA15(2)(d),Lei13/2016PDF13/p1426(271);15(3)/(4)/(5)/(6),PDF14/p1426(272);Lei22/2022PDF3maintains2d/3–6,Lei10/2025doesnotamend15. Statutory public-act compensation distinct from judicial contract-breach indemnity15(6)(a).",
|
||||
"source_links": [
|
||||
"https://www.inm.gov.mz/pt-br/content/suplemento-n%C2%BA-10-de-301216-pag-1426-259-290-br-n%C2%BA-156-boletim-da-rep%C3%BAblica-i-serie",
|
||||
"https://www.parlamento.mz/?post_documents=boletim-da-republica-i-serie-nr-250-quarta-feira-28-de-dezembro-de-2022"
|
||||
],
|
||||
"meaning": "Determine the tax base for an identified taxable domestic supply of goods/services resulting from a public-authority act,using indemnity or other compensation;do not infer taxability from compensation/publicentity alone. Judicial contract-breach indemnity is not included by analogy.",
|
||||
"technical_choices": "New opportunity-scoped publicAuthorityBases book inside existing modelo_a_snapshot;no schema/API/permissions change. Existing dossier/report and monthlyIVA components extended incrementally. Cash/nonmonetary/mixed form hides irrelevant fields but retains edits. Exact decimal sums with integers,up to6fractiondigits per input;no fiscalrounding assumption. Normalvalue explicitly supplied with valuationreference,not appraised by portal. References/conditions trace source,not newcertificate/approver or revalidation of officialsource.",
|
||||
"scope": "2026/MZN;P090baseonly. BaseAmount independent from vat/rate,which alwaysremainnull. No determination of incidence,rate,exemption,tax,customsbase,deduction/field11/ModeloA totals orautomaticposting toother fiscalbooks. Components supplied netofIVA with applicable15(5)/(6)composition identified.",
|
||||
"formula": "base = applicable net monetary component + applicable net nonmonetary normalvalue;form explicitly selects applicablecomponents;missing/invalid applicableamount orvaluationref staysnull,explicitzero is allowed;hiddenvalues not erased.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "Ownconditions unknown/no;judicialexclusion;money/in-kind/mixed;exactlarge/fractionalamounts/zero;missingrefs;context/version/history;malformedwriteguard;allpriorbooks unchanged;report"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 29,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7a-public-base-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings;final build after Portuguese report-label adjustment",
|
||||
"UI": "Realcomponent Edge/CUA:unknownact/missingvaluation indeterminate;judicialcontractbreach notapplicable;switchmoney->mixed retains250.20and1500.25,base1750.45;finalbases1500.25/1250.30withVATnull;save/recover/report2rows+5priorversions;documents/act/value/compositionrefs retained. Synthetic only,not manualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7a-public-base-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "0a80f1c457cd5670110d153e90962671c73535f4",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "eb9294ef/0a80f1c4;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions checked at delivery",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g7a-preserved-inputs.json",
|
||||
"sha256": "418c1825be1cb6e0851d3bc9b8a6c03335349645bda5e73792fc3ff2c3bf28da",
|
||||
"counts_before": {
|
||||
"delivered": 78,
|
||||
"QA": 0,
|
||||
"functional_pending": 54,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"scope": "P090 only;preserve P060decision/list/plan/scope and proportional results,P056authorization/P050serviceVAT/partialP084P085;no active query/write"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-public-authority-base.ts": "667704ba8c2d26421993f5e7e2c6599afb2912e052b27a96e423cb8d01a21d85",
|
||||
"resources/js/components/simulation-public-authority-base.tsx": "7aa05785fdb6fcb7de4c0345e9c09073ebdbb3a8b39f1bd2610da08abc8c8a89",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "db5b4431351766f8f86b4e60195381dab17c077ca3db72de48f2fb7e0f2a320b",
|
||||
"resources/js/lib/project-dossier.ts": "60a9dd9f4eed5884b16c7097906bc438958b3b1407976e10f4699d35c1c68b19"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 78,
|
||||
"QA": 1,
|
||||
"functional_pending": 53,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "eb9294ef",
|
||||
"remaining": "Integrate/deliver by existingGit with manifest,freshbackup/realisolatedrestore and installeddelta;no push in QA task",
|
||||
"limits": "P084/P085partial,pending;P00105/06;L1open;beveragesL2/L3;Stats/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7a-public-base-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "4193056bdd69b48cf61c25a9a7404af4f0957f3c",
|
||||
"receipt": "l1-g7a-delivery-20261024.json",
|
||||
"record": "iva_l1_g7a_P090_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 79,
|
||||
"QA": 0,
|
||||
"functional_pending": 53,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
{
|
||||
"implementation_commit": "948621a65caf1395230bfed3ddfab59e94cddda0",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P091": [
|
||||
"commission_sale_transfer",
|
||||
"commission_purchase_transfer"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 2,
|
||||
"source": "CIVA15(2)(e),Lei13/2016PDF13/p1426(271);3(3)(c)PDF6/p1426(264);15(5)/(6)PDF14/p1426(272);Lei22/2022PDF3maintains15e,Lei10/2025PDF12maintains3c byremissão anddoesnotamend15;2017rectification doesnotamendthoseprovisions. Specialauction15(2)(g)notreplaced.",
|
||||
"source_links": [
|
||||
"https://www.inm.gov.mz/pt-br/content/suplemento-n%C2%BA-10-de-301216-pag-1426-259-290-br-n%C2%BA-156-boletim-da-rep%C3%BAblica-i-serie",
|
||||
"https://www.parlamento.mz/?post_documents=boletim-da-republica-i-serie-nr-250-quarta-feira-28-de-dezembro-de-2022"
|
||||
],
|
||||
"meaning": "Goods transferred under commissioncontract,includingconsignment whereapplicable;principal-to-agent sale commission usesagentagreed saleprice minuscommission;agent-to-principal purchase commission usesagentagreed purchaseprice pluscommission. Notanycommissionpayment orautonomousbrokerageservice.",
|
||||
"technical_choices": "Newopportunity-scoped commissionBases bookinside existingmodelo_a_snapshot;incrementalexistingmonthlyIVA/dossier/report/API integration,no schema/permissionschange. Price/commission/compositionreferences netofIVA,beforeoneadjustment. Exactdecimalintegerarithmetic,upto6inputfractiondigits,noassumedfiscalrounding. Directionchange retainsallvalues/parties/documents but clearsdirectionconfirmation asintegritychoice,notneworganizationalrule. Negativedifference isdisplayed arithmetically with fiscalbaseindeterminate inthisrecorte,nozero-floor/absolutevalue,newtaxrate orapprover. Unknownamount/commissionpercentage notdefaultzero.",
|
||||
"scope": "2026/MZN;P091baseonly. BaseAmount separatefromvat/rate(alwaysnull);no incidence,rate,tax,commissionserviceVAT,exemption,deduction/field11/ModeloAtotals orautomaticposting intootherfiscalbooks. Statutorycondition references notnewcertificates/approvers orrevalidationofacceptedofficialsources.",
|
||||
"formula": {
|
||||
"commission_sale_transfer": "agent agreed sale price − commission",
|
||||
"commission_purchase_transfer": "agent agreed purchase price + commission"
|
||||
},
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "Everyowncondition missing/no;references;subtract/addonce;fractional/large/zero/negativearithmetic;directionchangeconfirmation;missingamount;context/version/history;malformedwriteguard;allpriorbooks/currentkeys preserved;report"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 29,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7b-commissions-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existingplugin timingwarnings",
|
||||
"UI": "Realcomponent Edge/CUA:unknowncontract/missingcommission indeterminate;directionswitchchangesprice label/clearsconfirmation while retaining1000.25/100.10androles/references;specialauctionnotapplicable;finalsale900.15/purchase1100.35,VATnull;save/recover/report2rows+5priorversions. Syntheticonly,notmanualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7b-commissions-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "50463ca716b74a669f8e1e72354ac0dfdc80d030",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P090"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "4193056b/50463ca7;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions checked at delivery",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g7b-preserved-inputs.json",
|
||||
"sha256": "2f8e5c92cc3ce422af09631e717eaaee31b8427ada60493f0f18aeda97596a78",
|
||||
"counts_before": {
|
||||
"delivered": 79,
|
||||
"QA": 0,
|
||||
"functional_pending": 53,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"scope": "P091only;preserve P090base/VATseparation/history,P060decision/list/plan/scope/proportion,P056authorization/P050serviceVAT/partialP084P085;no active query/write"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-commission-base.ts": "3be1331f4da40e6292fa7f5dcfba28355af6d931a7d24f44eb081c6f16c8efb2",
|
||||
"resources/js/components/simulation-commission-base.tsx": "5bfbb95d2dd22106d7d416fd3af0f7ae0778f22ae9d23da15ba9dd45882cfc94",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "16c95f5eaf5d5a308c93b30523292e52ccafed9d4e7f897f8559459116fbf4ae",
|
||||
"resources/js/lib/project-dossier.ts": "945a9e2a4a9aa6a26f7108f95d4fd237c0551dbf884cec41bcaa3eba592acc4a"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 79,
|
||||
"QA": 1,
|
||||
"functional_pending": 52,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "4193056b",
|
||||
"remaining": "Integrate/deliver by existingGit withmanifest,freshbackup/realisolatedrestore andinstalleddelta;no pushinQAtask",
|
||||
"limits": "P084/P085partial,pending;P00105/06;L1open;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7b-commissions-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "e62b7dfdc25f7c12425e89cea26f7ccf67b7d177",
|
||||
"receipt": "l1-g7b-delivery-20261024.json",
|
||||
"record": "iva_l1_g7b_P091_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 80,
|
||||
"QA": 0,
|
||||
"functional_pending": 52,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
{
|
||||
"implementation_commit": "4672789f2bf1fcce0726936e9e5bec05fb18c448",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P094": [
|
||||
"act_sale_amount",
|
||||
"act_normal_value"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 2,
|
||||
"source": "CIVA15(2)(h),Lei13/2016PDF13/p1426(271);15(4)/(5)/(6)PDF14/p1426(272). Lei22/2022PDF3maintains15h/4–6 by remissão;Lei10/2025doesnotamend15. Rectificação2017doesnotamend15h.",
|
||||
"meaning": "Goods transferred as result of auction,judicial/administrative sale,conciliation or settlement;value at which auction/sale effected or,where applicable,normal value. Five act kinds are contexts,not five branches. No automatic lower value or normal-value fallback.",
|
||||
"technical_choices": "New opportunity-scoped actSaleBases book in existing modelo_a_snapshot/API/dossier;no schema/permissions change. Chosen net value and composition references,up to6fractiondigits exactly preserved,no assumed fiscal rounding. Changing act/valuation retains both values/documents and clears corresponding applicability confirmation as integrity choice,not new organizational requirement. Reuse existing documents or explicit projection assumptions;no invented certificate,appraiser or approver.",
|
||||
"scope": "2026/MZN,P094baseonly;normal value supplied with identified basis/scope,not appraised automatically. No incidence,rate,VAT,deduction/field11/ModeloAtotals or substitution of special auctioncommission15g. Unknown values remain indeterminate,explicit zero distinguished.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "All5actkinds and2valuations;ownconditions missing/no;references/date/currency;no minimum/fallback;exactdecimal/zero;switch retention/cleared confirmation;context/history;corruptwriteguard;old books/currentkeys preserved;report"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 28,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7c-act-bases-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Realcomponent Edge/CUA:missing applicability and valuation reference yield indeterminate;switch to normal retains2200.50;confirming yields2200.50 instead of1500.25;specialauction condition no yields notapplicable/noIVAzero;finalact1500.25/normal2200.50,VATnull;save/recover/report2rows+5priorversions. Synthetic QA,not manual Tempo acceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7c-act-bases-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "15894f4b0493423fda5edde7d016a270fd137a30",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "e62b7dfd/15894f4b;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions checked at delivery",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g7c-preserved-inputs.json",
|
||||
"sha256": "2ffcdb0f42ac1011aa29fde5b72532c99a3c75210e754442e38af587489d542c",
|
||||
"counts_before": {
|
||||
"delivered": 80,
|
||||
"QA": 0,
|
||||
"functional_pending": 52,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"scope": "P094only;preserve P091directions/references/baseVAT,P090,P060scope,P056,P050,partialP084P085;no active query/write"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-act-sale-base.ts": "ed555c826427a0964995144c59d4e801bfeebce5219a63a612f31bb977788d00",
|
||||
"resources/js/components/simulation-act-sale-base.tsx": "384e17aa18ed5ed9a8c6c47773577e87f211c2bccb3acbe3943269a08de1485a",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "3b2a24fde6db625c350f7366ec789b5aa7e86aa08645409203b5e96d02dc1ff3",
|
||||
"resources/js/lib/project-dossier.ts": "852ceaf59b95d92ff57d3b711dc2bc13eb4b547e7d9f1516eb543ece83247c09"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 80,
|
||||
"QA": 1,
|
||||
"functional_pending": 51,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "e62b7dfd",
|
||||
"remaining": "Integrate/deliver through existingGit withmanifest,freshbackup/real isolatedrestore and installeddelta;no push in QA task",
|
||||
"limits": "P084/P085partial,pending;P00105/06;L1open;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7c-act-bases-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "df7cb7fa47f50ae23f52c1bdf7e48e38489cffef",
|
||||
"receipt": "l1-g7c-delivery-20261024.json",
|
||||
"record": "iva_l1_g7c_P094_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 81,
|
||||
"QA": 0,
|
||||
"functional_pending": 51,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
{
|
||||
"implementation_commit": "3bcd98e78ee42c3034cee452b8570a72cd89020e",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P095": [
|
||||
"fuel_tax_included",
|
||||
"fuel_tax_excluded"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 2,
|
||||
"source": "CIVA15(2)(i),Lei13/2016PDF13/p1426(271);15(1)/(5)/(6),PDF13–14/p1426(271–272);Lei22/2022PDF3maintains15i/1/5/6 by remissão;Lei10/2025doesnotamend15;2017rectificationdoesnotamend15i.",
|
||||
"meaning": "Transmissions of fuel with price fixed by public authority,effected by resellers;consideration under15(1)/(5) excludes FuelTax(TC). Two input-composition treatments in one branch,not two legal benefits.",
|
||||
"formula": {
|
||||
"fuel_tax_included": "consideration net of own VAT but including TC minus exact TC amount",
|
||||
"fuel_tax_excluded": "consideration already net of own VAT and TC,unchanged;no second subtraction"
|
||||
},
|
||||
"technical_choices": "New regulatedFuelBases opportunity-scoped book in existingmodelo_a_snapshot/API/dossier;no schema/permissions change. Exactdecimal up to6fractiondigits,no assumed fiscalrounding. Explicit reference/scope/interval of price with operation date/month checked;end optional if no fixedterm and temporal correspondence confirmed,not invented mandatory expiry. Source/projection assumptions reused;no certification/approver. Treatment change retains amounts/documents but clears composition confirmation as integrity choice.",
|
||||
"scope": "2026/MZN,P095baseonly;no automatic price,TC rate/amount,IVA/incidence/rate/deduction/field11/ModeloAtotals. Not general fuel purchases/services or unregulated price. Unknown TC/price parameters indeterminate;zero only explicit. TC exceeding consideration remains indeterminate,not negative/flooredzero.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "Ownconditions missing/no;price/reference/scope/date interval including openend/boundaries;exactdecimal subtractonce/zero/excess;switch retention/clearedconfirmation;corruptwriteguard;oldbooks/currentkeys/history/report"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 30,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7d-fuel-base-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Realcomponent Edge/CUA:TCunknown and operation afterpriceinterval indeterminate;composition switch hidesTC/clearsconfirmation,retains100.10;alreadyexcluded preserves1500.25;pricefixed no yields notapplicable/noIVAzero;finalincluded1400.15/excluded1500.25,VATnull. Save/recover/report2rows+6priorversions. SyntheticQA,not manualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7d-fuel-base-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "960088016944bbdd24e7479a7c08499809cb42fe",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "df7cb7fa/96008801;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared at delivery",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g7d-preserved-inputs.json",
|
||||
"sha256": "eafc5db6d2b8c0c50f29564eefd2af15fcc77b93d030adae2feb2e75e7a86894",
|
||||
"counts_before": {
|
||||
"delivered": 81,
|
||||
"QA": 0,
|
||||
"functional_pending": 51,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"scope": "P095 only;all previousbooks immutable including P094/91/90/P060/P050 and partialP084P085;no active query/write"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-fuel-base.ts": "3e00b285b2bfd4e0cdd7106be5f8ebd86dbc17b4dd83e36ccba844b6d6a7a9d2",
|
||||
"resources/js/components/simulation-fuel-base.tsx": "d55f8ede39ed42114c9eed473684cf1a764420e63cdb0faf2af4906773b8cfd9",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "11988f00f562c8d86db442cd7996a6640e8916feea11230f6105521985d83720",
|
||||
"resources/js/lib/project-dossier.ts": "85ca23ac160e7e06c0e605bfc0dc1a4ed2678df94136eaaa21ccfcba883a7e7c"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 81,
|
||||
"QA": 1,
|
||||
"functional_pending": 50,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "df7cb7fa",
|
||||
"remaining": "Integrate/deliver through existingGit withmanifest,freshbackup/real isolatedrestore and installeddelta;no push in QA task",
|
||||
"limits": "P084/P085partial,pending;P00105/06;L1open;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7d-fuel-base-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "92a7418cb6b080916a4d02d3c1db4be94d3d96f1",
|
||||
"receipt": "l1-g7d-delivery-20261024.json",
|
||||
"record": "iva_l1_g7d_P095_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 82,
|
||||
"QA": 0,
|
||||
"functional_pending": 50,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
{
|
||||
"implementation_commit": "9f053ac9d3f332c432420fd5b5d31cdfb7936071",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P100": [
|
||||
"noncash_only",
|
||||
"cash_and_noncash"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 2,
|
||||
"source": "CIVA15(3)/(4),Lei13/2016PDF14/p1426(272);composition15(5)/(6);Lei22/2022PDF3maintains15(3–6)byremissão;Lei10/2025doesnotamend15;2017rectificationdoesnotamend15(3)/(4).",
|
||||
"meaning": "Consideration not wholly or partly defined in money:money received/receivable plus normalvalue of goods/services given in exchange as consideration for identified operation. Entirely noncash only with express composition confirmation,not inferred from emptycash field.",
|
||||
"formula": {
|
||||
"noncash_only": "normalvalue,absence of monetary consideration explicitly confirmed",
|
||||
"cash_and_noncash": "cashamount received/receivable + normalvalue of goods/services given in exchange"
|
||||
},
|
||||
"technical_choices": "New noncashBases opportunity-scoped book in existingmodelo_a_snapshot/API/dossier;no schema/permissionschange. Exactdecimal up to6fractiondigits,no assumed fiscalrounding. Composition change retains cash/reference/normalvalue/documents but clears corresponding confirmation as integrity choice. Hidden cash is preserved but not summed in noncash_only. Normalvalue supplied with15(4)basis/scope,composition15(5)/(6)netofownVAT;no automatic appraisal/certificate/appraiser/approver.",
|
||||
"scope": "2026/MZN,baseonly;no currencyconversion,automatic normalvaluation,incidence/rate/VAT/deduction/field11/ModeloAtotals. Unknown monetary share not inferredzero;explicitzero differentiated. Otherbranches and prior normalvalue contexts unchanged.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "Ownconditions missing/no;exchange/agreement/normalvalue basis/scope/references;exactadditiononce/zero/largefractionalamounts;switchretention;hidden cash excluded;corruptwriteguard;alloldbooks/currentkeys/history/report"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 29,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7e-noncash-base-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Realcomponent Edge/CUA:normalvalue basis/moneyunknown indeterminate;switch mixed→noncash hidescash/clearsconfirmation;confirmed noncash uses2200.50 despite retained500.25;switchback recovers500.25;finalnoncash2200.50/mixed2700.75,VATnull;save/recover/report2rows+5priorversions. SyntheticQA,not manualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7e-noncash-base-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "6234d3439285f0251af90694c9347f1936cb4f7f",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094",
|
||||
"AUD-SIM-L1-P095"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "92a7418c/6234d343;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared at delivery",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g7e-preserved-inputs.json",
|
||||
"sha256": "825dd90f48540c83bd7c9ca8b234e0dd558a12aca19d394cfa91b32a17d0edb7",
|
||||
"counts_before": {
|
||||
"delivered": 82,
|
||||
"QA": 0,
|
||||
"functional_pending": 50,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"scope": "P100 only;allpreviousbooks immutable including P095TC/P094valuation/P091/P090/P060/P050/partialP084P085;no active query/write"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-noncash-base.ts": "d07cbefec4d54cffe41626093832972b31b8eacf0021a146655c79b189f25434",
|
||||
"resources/js/components/simulation-noncash-base.tsx": "e8d5dd905d9c6b75ed7589e4ecf7b708bb288ba59285d409f444e799f9f09c35",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "bc1005d31306c859dfa325f8d63e8bac98073b38f6d65ab22f736537629d4752",
|
||||
"resources/js/lib/project-dossier.ts": "84d3c968dfa0a644f1767c09dd266fbe32b086117da0416564681e4a51e8d7f6"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 82,
|
||||
"QA": 1,
|
||||
"functional_pending": 49,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "92a7418c",
|
||||
"remaining": "Integrate/deliver through existingGit withmanifest,freshbackup/real isolatedrestore and installeddelta;no push in QA task",
|
||||
"limits": "P084/P085partial,pending;P00105/06;L1open;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7e-noncash-base-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "70b4a640ee5f790f8e6a089d157456ff437e336d",
|
||||
"receipt": "l1-g7e-delivery-20261024.json",
|
||||
"record": "iva_l1_g7e_P100_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 83,
|
||||
"QA": 0,
|
||||
"functional_pending": 49,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
{
|
||||
"implementation_commit": "e3caf553616da59222dbc2bd2327dfae602ad3db",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P101": [
|
||||
"tax_component",
|
||||
"accessory_component"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 2,
|
||||
"source": "CIVA15(5)(a)/(b),Lei13/2016PDF14/p1426(272);15(1)/(2)/(6);Lei22/2022PDF3maintains15(5)byremissão;Lei10/2025doesnotamend15;2017rectificationdoesnotamend15(5).",
|
||||
"meaning": "Include taxes,duties,fees/otherimpositions excludingownVAT;accessory expenses charged forcommissions,packaging,transport/insurance onclientaccount. Both component treatments form one base peroperation,not parallelbases.",
|
||||
"formula": "initial amount netofownVAT/applicableexclusions + sum of applicable components notalreadyincluded;alreadyincluded components retained without secondsum",
|
||||
"technical_choices": "New considerationCompositions opportunity-scoped book in existingmodelo_a_snapshot/API/dossier;operations with nested components,ids and immutableinput/history/report. No schema/permissionschange. Exactdecimal up to6fractiondigits,no assumed fiscalrounding. Componenttreatmentchange preservesamount/reference/inclusion but clearsnatureconfirmation as integritychoice. Idduplicates/malformednestedwrite guarded. References reuse documents/projectionassumptions,no newcertificates/approvers.",
|
||||
"scope": "2026/MZN,P101compositiononly;no incidence/taxrates/IVA/deduction/field11/ModeloAtotals. Initialamount explicitlynetofownIVA and applicable15(6)exclusions;specialbases15(2)respected includingP095TCexclusion. DetailedP102exclusions notclosed by thisrecorte. Unknowncomponentamount/inclusion notassumedzero or missing;ownIVA not added ascomponent.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "Ownoperationandcomponentconditions unknown/no;tax/accessory separately andtogether;ownIVA;references;addmissingonly/alreadyincluded unchanged;exactdecimal/zero;switchretention;duplicateparts/malformednestedwrite;oldbooks/currentkeys/history/report"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 31,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7f-composition-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Realcomponent Edge/CUA:unknown inclusion indeterminate;tax100.10alreadyincluded plusaccessory50.25 produces1050.50 from1000.25;ownIVAcondition no yields notapplicable/noIVAzero;finalbothnotincluded1150.60,VATnull;save/recover/report1operation/2components/6priorversions. SyntheticQA,not manualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7f-composition-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "0bef805ede26c9878f5e040aafbd65186ddb56f2",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094",
|
||||
"AUD-SIM-L1-P095",
|
||||
"AUD-SIM-L1-P100"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "70b4a640/0bef805e;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared at delivery",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g7f-preserved-inputs.json",
|
||||
"sha256": "6f22015f78ed08c36234b5a19ad574fbc2662d6854c1f85112e1c2bd635ec325",
|
||||
"counts_before": {
|
||||
"delivered": 83,
|
||||
"QA": 0,
|
||||
"functional_pending": 49,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"scope": "P101 only;allpreviousbooks immutable including P100normalvalue/P095TC/P094/P091/P060/P050/partialP084P085;no active query/write"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-composition-base.ts": "557d6b4b5ed2c534b69e5edf43c9e4014cdfb7362bf164829cd16e4deeabbf73",
|
||||
"resources/js/components/simulation-composition-base.tsx": "3507c14f15e40bf018089520a46b7e22002ddbd9bffa64d179f085b0d933ae0e",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "82694be2d0a5ac097b64d68dceeda1df239bb2bf2bce193e8112d3dadad79a95",
|
||||
"resources/js/lib/project-dossier.ts": "c640883680629049ea851a63e28e967a70297257a55e5d885df8e32f4b81e871"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 83,
|
||||
"QA": 1,
|
||||
"functional_pending": 48,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "70b4a640",
|
||||
"remaining": "Integrate/deliver through existingGit withmanifest,freshbackup/real isolatedrestore and installeddelta;no push in QA task",
|
||||
"limits": "P084/P085partial,pending;P00105/06;L1open;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7f-composition-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "7e5710ebbd235f9478f149f8470a238c9e66ea9e",
|
||||
"receipt": "l1-g7f-delivery-20261024.json",
|
||||
"record": "iva_l1_g7f_P101_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 84,
|
||||
"QA": 0,
|
||||
"functional_pending": 48,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
{
|
||||
"implementation_commit": "acc633bf088c66042a8442d356076bdbb508ac53",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P102": [
|
||||
"judicial_indemnity",
|
||||
"granted_discount",
|
||||
"third_party_payment",
|
||||
"returnable_packaging"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 4,
|
||||
"source": "CIVA15(6)(a–d),2016PDF14/p1426(272);27(5)(b),PDF17/p1426(275);2022PDF3maintains15(6);2025PDF14maintains27(5)(b),amends27(10),not15;2017rectificationdoesnotamendtheseprovisions.",
|
||||
"meaning": "Four exclusions:judicial indemnity for total/partial contractbreach;granteddiscount/abatement/bonus;payment inname/onaccount of purchaser/recipient recorded inappropriate thirdpartyaccounts;packaging notactuallytransacted withseparateinvoiceindication/express agreedreturnmention.",
|
||||
"formula": "initialamount netofownVAT with15(5)inclusions minus only exclusions stillincluded;alreadyexcluded retained without secondsubtraction",
|
||||
"technical_choices": "New considerationExclusions opportunity-scoped book,operations with nestedparts and ownconditions/references/scope. Exactdecimal up to6fractiondigits,no assumedrounding. Typechange preservesamount/reference/scope/hiddenaccounts/invoiceexcerpt butclears ownconditions. No newcertificates/approvers. References identify judicialdeclaration/contract,discountgrant,thirdpartyaccounts/recipient,invoicepackagingmention or explicit projectionassumptions.",
|
||||
"scope": "2026/MZN,P102baseonly;no IVA/incidence/rate/deduction/field11/regularisations/ModeloAtotals. No automaticlegaldecision orpriorperiodposting. Packagingrequiresagreedreturnmention,notactualreturn. Unknownconditions/amount/inclusion indeterminate;failedcondition yields notapplicable,notzero;exclusionsexceedinginitialamount notnegative/flooredzero.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "Allfour treatments ownconditions unknown/no;judicial/contract/grant/account/recipient/invoice/scope references;subtractincludedonly/alreadyexcluded;exactdecimal/zero/excess;typechange retains hiddenvalues andclears ownconditions;corruptnestedguard;allpreviousbooks/currentkeys/history/report"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 34,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7g-exclusions-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Realcomponent Edge/CUA:judicialdeclarationunknown;discountnotgranted;thirdpartyaccountconditionunknown;packagingreturnmentionunknown allpreventexclusion. Alreadyexcluded indemnity100.10notresubtracted=>899.80. Finalallincluded:1000.25−200.55=799.70,VATnull;save/recover/report1operation/4parts/8priorversions. SyntheticQA,notmanualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7g-exclusions-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "a89f9eca8cb388512d97aebf5e2e1ff267756dd6",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094",
|
||||
"AUD-SIM-L1-P095",
|
||||
"AUD-SIM-L1-P100",
|
||||
"AUD-SIM-L1-P101"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "7e5710eb/a89f9eca;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared at delivery",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g7g-preserved-inputs.json",
|
||||
"sha256": "7bc9a3a0b2a37dbb6f342dde26c6463e2f5ce62228796e44fc0e0e213a03dfa0",
|
||||
"counts_before": {
|
||||
"delivered": 84,
|
||||
"QA": 0,
|
||||
"functional_pending": 48,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"scope": "P102only;allpreviousbooks immutable including P101/P100/P095/P094/P091/P060/P050/partialP084P085;no active query/write"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-exclusion-base.ts": "2d4d2f607eb4e24e617a5640b239d14ab4958e364cc6f3cda36a407b8b1d782f",
|
||||
"resources/js/components/simulation-exclusion-base.tsx": "4c69345d9e49c96756727cbf909bf1d5949fa9db14c346157413dd1885258520",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "81be9e69aeab5d544a2fb8aadcf487bb6f04ae0ab06861759709912afe9c82bf",
|
||||
"resources/js/lib/project-dossier.ts": "af10643db841e08f14a9ef534ccf7367fe5b05e20c58b770e3a4cf51aa0192e8"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 84,
|
||||
"QA": 1,
|
||||
"functional_pending": 47,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "7e5710eb",
|
||||
"remaining": "Integrate/deliver through existingGit withmanifest,freshbackup/real isolatedrestore and installeddelta;no push in QA task",
|
||||
"limits": "P084/P085partial,pending;P00105/06;L1open;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7g-exclusions-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "5d5f3b414866969e4b2d38376402b8f264c6d19c",
|
||||
"receipt": "l1-g7g-delivery-20261024.json",
|
||||
"record": "iva_l1_g7g_P102_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 85,
|
||||
"QA": 0,
|
||||
"functional_pending": 47,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
{
|
||||
"implementation_commit": "67b8b5814955ebce761b2123969958c9f2c8bf0f",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P103": [
|
||||
"price_comparison",
|
||||
"referenced_correction"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 2,
|
||||
"source": "CIVA15(7),2016PDF14/p1426(272),15(1)/(5)/(6);2022PDF3maintains15(7);2025doesnotamend15;2017rectificationdoesnotamend15(7).",
|
||||
"meaning": "AT may correct consideration below current/normal factorygate/wholesale/retail/serviceprice,considering natureoftransmission. Comparison doesnot exerciseATpower or automaticallysubstitute referenceprice. Recordedcorrection in effective declareddata or expresslyconditional projectedscenario retains ownamount/ref/date/scope.",
|
||||
"formula": {
|
||||
"price_comparison": "compare exactdeclared/reference values;retain declaredbase withoutautomaticcorrection",
|
||||
"referenced_correction": "if15(7)belowtrigger andscopeconfirmed,use explicitlyreferenced correctedamount;no max/defaultreference"
|
||||
},
|
||||
"technical_choices": "New valueReviews opportunity-scoped book in existingmodelo_a_snapshot/API/dossier;exactdecimal up to6fractiondigits,no assumedrounding. Context/percourse/origin changes preserve values/references butclear affected confirmation;projected→effective cannotreuse assumedcorrectionconfirmation. No newcertificates/appraisers/approvers. Currentkeys/history/immutableinputs/report retained.",
|
||||
"scope": "2026/MZN,P103baseonly;no automaticvaluation/legalcorrection,incidence/rate/VAT/deduction/field11/regularisation/ModeloAtotals oractiveauthorityaction. Referencecontext/scope and equivalentcomposition required. Unknowncorrectionamount notdefaultreference;no inventedfloor/maximum. Projectedcorrection clearlyconditional,notATdecision. Notbelowdoesnotdemonstrate15(7)trigger.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "Allfourpricecontexts;ownconditions/references;below/equal/above;no automaticreference substitution;correctionamount/ref/date/scope/application;projected/effective distinction;exactdecimal/zero;context/percourse/originswitch retention/clearedconfirmation;oldbooks/currentkeys/history/report;corruptwriteguard"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 33,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7h-value-review-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Realcomponent Edge/CUA:pricereference/missingcorrectedamount indeterminate;comparisonbelow retains1000.25 against1500.50;projected→effective clearsapplicationconfirmation;outofscope no preventsapplication;returnprojected/confirmed producesconditional1400.75,not1500.50. Save/recover/report2rows+5priorversions,VATnull. SyntheticQA,notmanualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7h-value-review-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "adb849d4fc6d840eec1123e8fc90c4c34a008da4",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094",
|
||||
"AUD-SIM-L1-P095",
|
||||
"AUD-SIM-L1-P100",
|
||||
"AUD-SIM-L1-P101",
|
||||
"AUD-SIM-L1-P102"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "5d5f3b41/adb849d4;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared at delivery",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g7h-preserved-inputs.json",
|
||||
"sha256": "d2e25976ee432238fa90791db01c124f24c0cfb805e213af73d4c7dab4f25f31",
|
||||
"counts_before": {
|
||||
"delivered": 85,
|
||||
"QA": 0,
|
||||
"functional_pending": 47,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"scope": "P103only;allpreviousbooks immutable including P102/P101/P100/P095/P060/P050/partialP084P085;no active query/write"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-value-review.ts": "411aa0506868afd112bac0e27571db1978b21bd8375051dc36abbe55dfad7876",
|
||||
"resources/js/components/simulation-value-review.tsx": "ff3fc2ad0e0082a931341ae51b63d6abe2bfee00b90e5891fc4dce742e84a017",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "c7f6a45a8533f6ce4128c912511b7712011fc365b99dfbe675d6cb2b455dfca1",
|
||||
"resources/js/lib/project-dossier.ts": "89ee4a4abfa36c4d159edd71c936d718e2a6e99c9c8a83be669451fb309c5d2c"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 85,
|
||||
"QA": 1,
|
||||
"functional_pending": 46,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "5d5f3b41",
|
||||
"remaining": "Integrate/deliver through existingGit withmanifest,freshbackup/real isolatedrestore and installeddelta;no push in QA task",
|
||||
"limits": "P084/P085partial,pending;P00105/06;L1open;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7h-value-review-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "cd530b248bf9dee5a6e7f1e4d710346084a2421f",
|
||||
"receipt": "l1-g7h-delivery-20261024.json",
|
||||
"record": "iva_l1_g7h_P103_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 86,
|
||||
"QA": 0,
|
||||
"functional_pending": 46,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
{
|
||||
"implementation_commit": "90b31c677f9f541364a2fdddc98d01280d4371f1",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P089": [
|
||||
"free_company_service",
|
||||
"private_company_asset_use",
|
||||
"exempt_sector_asset_use"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 3,
|
||||
"source": "CIVA15(2)(c),2016PDF13/p1426(271),4(2)(a)/(b)PDF7/p1426(265),15(4)/(5)/(6)PDF14;2022doesnotamend4,maintains15c/4–6;2025doesnotamend4/15;2017rectificationdoesnotamendtheseprovisions.",
|
||||
"meaning": "Free services bycompany forprivate/nonbusinesspurpose4(2)(a);useofcompanygoods forprivate/nonbusinesspurpose or in exemptsector4(2)(b). Previous total/partialdeduction ongoods/elements requiredonlyfor4(2)(b),not4(2)(a). Use distinctfrompermanentgoods transferP088.",
|
||||
"formula": "normalvalue ofservice under15(4),identifiedbasis/scope andcomposition15(5)/(6),netofownVAT",
|
||||
"technical_choices": "New serviceNormals opportunity-scoped book in existingmodelo_a_snapshot/API/dossier;exactdecimal up to6fractiondigits,no assumedrounding. Treatment change retains amounts/documents/asset/prior deduction references butclears ownconditions,keepingcommonconditions;hiddenvalues notimposed onfree_service. References reused or explicitprojectionassumptions,no newcertificate/appraiser/approver.",
|
||||
"scope": "2026/MZN,P089baseonly;no automaticnormalvaluation orsubstitution byassetpurchaseprice/cost;no IVA/incidence/rate/deduction/field11/regularisation/ModeloAtotals. Prior deductionfact/reference doesnot calculateorgrant deduction. Unknownconditions/normalvalue indeterminate,explicitno notapplicable notzero. Otherbooks includingP103/102/101/095unchanged.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "Allthree treatments ownconditions unknown/no;free_service no priorDeduction prerequisite;assetuse requiresasset/deduction reference;normalvalue basis/scope/date/currency;exactdecimal/zero;switch preserveshiddenrefs/clearsownconditions;oldbooks/currentkeys/history/report;corruptwriteguard"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 29,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7i-service-normal-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Realcomponent Edge/CUA:missingnormalvaluebasis indeterminate;privateassetuse priorDeductionno notapplicable,unknown indeterminate;switchprivateuse→free hidesasset/deductionrefs andclearsownconditions,free succeedswithoutprior deduction;switchback recoversrefs andrequiresownconditions. Save/recover/report500.25/700.50/900.75,VATnull,3rows+5priorversions. SyntheticQA,notmanualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7i-service-normal-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "33cc971a122be5334b865cb5b3b92c93485f59a0",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094",
|
||||
"AUD-SIM-L1-P095",
|
||||
"AUD-SIM-L1-P100",
|
||||
"AUD-SIM-L1-P101",
|
||||
"AUD-SIM-L1-P102",
|
||||
"AUD-SIM-L1-P103"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "cd530b24/33cc971a;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared at delivery",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g7i-preserved-inputs.json",
|
||||
"sha256": "f563b21e8c75ab7db66bd5c9545f539f304449877796dd71f08c9ded8ee385d0",
|
||||
"counts_before": {
|
||||
"delivered": 86,
|
||||
"QA": 0,
|
||||
"functional_pending": 46,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"scope": "P089only;allpreviousbooks immutable including P103/P102/P101/P100/P095/P060/P050/partialP084P085;no active query/write"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-service-normal.ts": "e10fa8131534982eae17ce72849fb794a8e0438c85719b872571a33c53e5f019",
|
||||
"resources/js/components/simulation-service-normal.tsx": "b7838cc7dadd058906a3997e218deb79792d587a6daf67f7f3139ff22a0668a5",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "8581d037947c9d764400e99627952524bcf28ed8b5bf865ba4a1cb4b74acd7ac",
|
||||
"resources/js/lib/project-dossier.ts": "aa15412c46064a9cff6dbe2dba086e1acfe79fe50f313280ccb9ee7c89484c99"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 86,
|
||||
"QA": 1,
|
||||
"functional_pending": 45,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "cd530b24",
|
||||
"remaining": "Integrate/deliver through existingGit withmanifest,freshbackup/real isolatedrestore and installeddelta;no push in QA task",
|
||||
"limits": "P084/P085partial,pending;P00105/06;L1open;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g7i-service-normal-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "6f1cf7b7a09796b3964b39f0b1e778f978ae60fb",
|
||||
"receipt": "l1-g7i-delivery-20261024.json",
|
||||
"record": "iva_l1_g7i_P089_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 87,
|
||||
"QA": 0,
|
||||
"functional_pending": 45,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
{
|
||||
"implementation_commit": "ec33fb5be2934f34d06349b84bf8e5316f90960e",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P106": [
|
||||
"general_service"
|
||||
],
|
||||
"AUD-SIM-L1-P107": [
|
||||
"immovable_service"
|
||||
],
|
||||
"AUD-SIM-L1-P108": [
|
||||
"movable_work"
|
||||
],
|
||||
"AUD-SIM-L1-P109": [
|
||||
"activity_service"
|
||||
],
|
||||
"AUD-SIM-L1-P110": [
|
||||
"transport_service"
|
||||
]
|
||||
},
|
||||
"branch_count": 5,
|
||||
"treatment_count": 5,
|
||||
"QA_example_count": 10,
|
||||
"source": "CIVA6(3),6(4)/(5)a–d,6(6),Lei13/2016 PDF7–8/p1426(265–266);Aviso BR89-I,de08/06/2017,PDF1,rectifica expressamente6(5)c/d:actividades nacionais e transporte pela distância nacional;Lei10/2025 PDF12mantém6(3–6),altera7–9digitais.",
|
||||
"meaning": {
|
||||
"P106": "Sede/EP/domicílio do prestador a partir do qual o serviço é prestado,sem regras especiais aplicáveis. Não usar endereço/nacionalidade do cliente.",
|
||||
"P107": "Local do imóvel e relação do serviço,incluindo preparação/coordenação de trabalhos imobiliários,peritos/agentes. Independente da sede do prestador.",
|
||||
"P108": "Execução total ou essencial dos trabalhos/peritagens em bens móveis corpóreos. Independente da sede do prestador.",
|
||||
"P109": "Local material de actividades artísticas,científicas,desportivas,recreativas,ensino/similares,organizadores e serviços acessórios;6(5)c rectificado2017.",
|
||||
"P110": "Distância nacional6(5)d rectificada2017;partida/chegada nacionais incluem percurso fora do país6(6);ida/volta são dois trajectos. Identificar distância total/nacional na mesma unidade,sem apuramento monetário."
|
||||
},
|
||||
"formula": "Territorial classification only;P110 exact distances retained as numerator/denominator with6(6)deemednational override,no monetaryapportionment/rounding.",
|
||||
"scope": "Recorte2026,classificação territorial de serviços por factos próprios;sem base,taxa,IVA,isenção,dedução/campo11 ou totaisModeloA. Digital/outros6(7)/(8)exigem percursos próprios,não classificados automaticamente. P002transversal não encerrado.",
|
||||
"technical_choices": "NewserviceLocations opportunity-scoped book in existingmodelo_a snapshot/API/dossier;no schema/permissions. Switch preserveshiddenrefs/locations/routes but clearsownconditions,keepscommon. Decimaldistance up to18integer/6fractiondigits,BigInt comparison,no float/no assumedzero. References or explicitprojectedassumptions reused,no certificates/approvers invented.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 7,
|
||||
"passed": 7,
|
||||
"failed": 0,
|
||||
"by_branch": {
|
||||
"AUD-SIM-L1-P106": "own conditions unknown/no,dates/references,domestic/foreign cases passed",
|
||||
"AUD-SIM-L1-P107": "own conditions unknown/no,dates/references,domestic/foreign cases passed",
|
||||
"AUD-SIM-L1-P108": "own conditions unknown/no,dates/references,domestic/foreign cases passed",
|
||||
"AUD-SIM-L1-P109": "own conditions unknown/no,dates/references,domestic/foreign cases passed",
|
||||
"AUD-SIM-L1-P110": "own conditions unknown/no,dates/references,domestic/foreign cases passed"
|
||||
},
|
||||
"additional": "Preservation of all oldbooks includingP105 and partialP084/P085;switch hiddenretention/ownconditions reset;scope/history/report;transport mixed route,deemed national route,zero vs unknown,invalid/decimal exact distances."
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 48,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g8-services-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Realcomponent Edge/CUA:unknown providercountry makesP106 indeterminate;restoration producesnational. P110 departureMZ/arrivalforeign yieldsnationalportion80.25of100.50. Saved/recovered/report10rows+3previousversions across5branches;VAT/base/rate alwaysnull. SyntheticQA,notmanualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g8-services-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "aac3f463067e9178e15219262027fcb976566a2a",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P089",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094",
|
||||
"AUD-SIM-L1-P095",
|
||||
"AUD-SIM-L1-P100",
|
||||
"AUD-SIM-L1-P101",
|
||||
"AUD-SIM-L1-P102",
|
||||
"AUD-SIM-L1-P103",
|
||||
"AUD-SIM-L1-P105"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "8f14f5dd/aac3f463;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g8-services-preserved.json",
|
||||
"sha256": "bed8a17fc6bf961dc15eccc46a8c336270752728470cf196cb2c2c901085c186",
|
||||
"scope": "P106–109 QA only;P105 and all previous books/history immutable;no active writes"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-service-location.ts": "abf13bd0f6f8aed209b38f3fd8d5906b96572de2d13f87b0d742ee3f31095a19",
|
||||
"resources/js/components/simulation-service-location.tsx": "ede4923dc4343949821cdd1c540837261cf816afee3069d031053cac73da5339",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "dd102e122a243f58c85db0dcde889877066c5aac9c873eb0f8f93905a6d0d848",
|
||||
"resources/js/lib/project-dossier.ts": "03bfad1ac2a443ee4fd0a7c0091f5b3e34e17a9c8b2b75d1249ac0c96729d643"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 88,
|
||||
"QA": 5,
|
||||
"functional_pending": 39,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "8f14f5dd",
|
||||
"remaining": "One jointGit integration/delivery forfivecompatiblebranches,one backup/realrestore,individualQAproofsreused,installeddelta only. No individualbranch deployment.",
|
||||
"limits": "P084/P085partial,pending;L1open;P00105/06;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g8-services-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "03c26d66139f36573cf58362a5076b4d5f98eca2",
|
||||
"receipt": "l1-g8-services-delivery-20261024.json",
|
||||
"record": "iva_l1_g8_services_P106_P110_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 93,
|
||||
"QA": 0,
|
||||
"functional_pending": 39,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
{
|
||||
"implementation_commit": "0682ef74e2e1523d5a424b92989de39122677898",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P105": [
|
||||
"goods_with_transport",
|
||||
"goods_without_transport",
|
||||
"goods_before_import"
|
||||
]
|
||||
},
|
||||
"branch_count": 1,
|
||||
"treatment_count": 3,
|
||||
"source": "CIVA6(1)/(2),Lei13/2016 PDF7/p1426(265);Lei10/2025 PDF12 mantém1/2 e altera7–9 digitais.",
|
||||
"meaning": "Local dos bens no início transporte/expedição ou,sem transporte,quando postos à disposição;regra especial do importador/transmissões subsequentes antes da importação nacional. Fora do território não equivale a isenção ou IVA zero.",
|
||||
"formula": "Classificação territorial pelos factos6(1)/(2),sem cálculo monetário.",
|
||||
"scope": "2026,bens corpóreos;classificação territorial apenas,sem base,taxa,IVA,isenção,dedução/campo11,direitos ou totaisModeloA. Não abrange digitais/serviços por esta regra.",
|
||||
"technical_choices": "Livro goodsLocations por oportunidade no snapshot/API/dossier existente;sem schema/permissões. Troca conserva locais/referências ocultos e limpa condições próprias;dados e documentos reutilizáveis ou pressupostos expressos,sem certificados/aprovadores inventados.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "Três percursos,condições desconhecidas/não,referências/datas,local físico e regra6(2),endereço/moeda não determinam território,troca conserva dados ocultos/limpa condições próprias,gravação/histórico/relatório e livros anteriores preservados."
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 30,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g8a-goods-location-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Edge/CUA componente real:local desconhecido produz indeterminado;restauradoMZ,gravação/recuperação/relatório confirmam national/outside/national,IVA/base/taxa null,3linhas e4versões anteriores. Dados sintéticos,não aceitação manualTempo.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g8a-goods-location-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "21ce03f65ced0047ae7143e47c76f250b20029d6",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P089",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094",
|
||||
"AUD-SIM-L1-P095",
|
||||
"AUD-SIM-L1-P100",
|
||||
"AUD-SIM-L1-P101",
|
||||
"AUD-SIM-L1-P102",
|
||||
"AUD-SIM-L1-P103"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "6f1cf7b7/21ce03f6;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared at delivery",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g8a-preserved-inputs.json",
|
||||
"sha256": "7b0b553abaeb83d891064cedb65ccddc730caac27a227ae2046aa3e4f5d75538",
|
||||
"counts_before": {
|
||||
"delivered": 87,
|
||||
"QA": 0,
|
||||
"functional_pending": 45,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"scope": "P105only;allpreviousbooks immutable including P089/P103/P102/P101/P095/P060/P050/partialP084P085;no active query/write"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-goods-location.ts": "c187bbaf13d408461e787786dc8cc81504fef6ed60a848f62ebffe31cfa86e6d",
|
||||
"resources/js/components/simulation-goods-location.tsx": "e4440c1315a1b1009d9b51ced99d7e6a2fc65a3ebac05d6b5bde1d41a796784f",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "ca7c2185d9fcf8ffc8374be4a99d3102c7e1326372859ac678603da90b3de913",
|
||||
"resources/js/lib/project-dossier.ts": "c95bbd7e307ab2c7dcec42fc9d280709f0ecb7c9be174977ae571cc4447bf5b9"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 87,
|
||||
"QA": 1,
|
||||
"functional_pending": 44,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "6f1cf7b7",
|
||||
"remaining": "Integrar/disponibilizar pelo processoGit existente com manifesto,backup/restauro e delta instalado;sem push nesta tarefaQA.",
|
||||
"limits": "P084/P085 parciais e pendentes;L1aberto;P00105/06;bebidasL2/L3;Estatísticas/IAadiadas.",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g8a-goods-location-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "8f14f5dde24819fce062dc316ed21dfbe033ebf8",
|
||||
"receipt": "l1-g8a-delivery-20261024.json",
|
||||
"record": "iva_l1_g8a_P105_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 88,
|
||||
"QA": 0,
|
||||
"functional_pending": 44,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,264 @@
|
||||
{
|
||||
"implementation_commit": "6cffa1188f8f0f43d8d161cf97b7a08a885055f6",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P111": [
|
||||
"rights_service"
|
||||
],
|
||||
"AUD-SIM-L1-P112": [
|
||||
"advertising_service"
|
||||
],
|
||||
"AUD-SIM-L1-P113": [
|
||||
"telecom_service"
|
||||
],
|
||||
"AUD-SIM-L1-P114": [
|
||||
"consulting_service"
|
||||
],
|
||||
"AUD-SIM-L1-P115": [
|
||||
"data_service"
|
||||
],
|
||||
"AUD-SIM-L1-P116": [
|
||||
"finance_service"
|
||||
],
|
||||
"AUD-SIM-L1-P117": [
|
||||
"staff_service"
|
||||
],
|
||||
"AUD-SIM-L1-P118": [
|
||||
"intermediation_service"
|
||||
],
|
||||
"AUD-SIM-L1-P119": [
|
||||
"abstention_service"
|
||||
],
|
||||
"AUD-SIM-L1-P120": [
|
||||
"movable_lease_service"
|
||||
]
|
||||
},
|
||||
"branch_count": 10,
|
||||
"treatment_count": 10,
|
||||
"QA_example_count": 30,
|
||||
"source": "CIVA2(1)a/b,2(2),6(3),6(7)a–j e6(8),Lei13/2016PDF6–8/p1426(264–266);23(1)/(2),25(4),26(1–3),PDF16–17. Lei22/2022não altera estes artigos. Lei10/2025PDF12mantém alíneasa–j ealtera6(7–9);PDF13art23(2)excluik e remete declaração33(2);PDF14mantém26(1–3),adita26(4)digital ealtera33(2).",
|
||||
"meaning": {
|
||||
"P111": {
|
||||
"clause": "6(7)a",
|
||||
"treatment": "rights_service",
|
||||
"nature": "Cessão/autorização de direitos de autor,licenças,marcas e análogos"
|
||||
},
|
||||
"P112": {
|
||||
"clause": "6(7)b",
|
||||
"treatment": "advertising_service",
|
||||
"nature": "Publicidade"
|
||||
},
|
||||
"P113": {
|
||||
"clause": "6(7)c",
|
||||
"treatment": "telecom_service",
|
||||
"nature": "Telecomunicações"
|
||||
},
|
||||
"P114": {
|
||||
"clause": "6(7)d",
|
||||
"treatment": "consulting_service",
|
||||
"nature": "Consultores,engenheiros,advogados,economistas,contabilistas/gabinetes de estudos,organização,investigação/desenvolvimento e similares"
|
||||
},
|
||||
"P115": {
|
||||
"clause": "6(7)e",
|
||||
"treatment": "data_service",
|
||||
"nature": "Tratamento de dados/fornecimento de informações"
|
||||
},
|
||||
"P116": {
|
||||
"clause": "6(7)f",
|
||||
"treatment": "finance_service",
|
||||
"nature": "Operações bancárias,financeiras,seguro/resseguro;eventual isenção independente"
|
||||
},
|
||||
"P117": {
|
||||
"clause": "6(7)g",
|
||||
"treatment": "staff_service",
|
||||
"nature": "Colocação de pessoal"
|
||||
},
|
||||
"P118": {
|
||||
"clause": "6(7)h",
|
||||
"treatment": "intermediation_service",
|
||||
"nature": "Intermediação em nome epor conta de outrem no fornecimento de serviço enumerado,subjacente identificado"
|
||||
},
|
||||
"P119": {
|
||||
"clause": "6(7)i",
|
||||
"treatment": "abstention_service",
|
||||
"nature": "Obrigação de não exercer,mesmo parcialmente,actividade/direito enumerado,subjacente identificado"
|
||||
},
|
||||
"P120": {
|
||||
"clause": "6(7)j",
|
||||
"treatment": "movable_lease_service",
|
||||
"nature": "Locação de bens móveis corpóreos,incluindo financeira,bens/contrato identificados"
|
||||
}
|
||||
},
|
||||
"routes": {
|
||||
"inbound": "Prestador semsede/EP/domicílio nacional a partir do qual presta;adquirente2(1)a/b comEP/domicílio nacional,incluindo exclusivamente isentos semdedução:territórionacional6(7),responsáveladquirente2(2)/23(2),declaração33(2)nos termosa regulamentar;sem pressupor montante/imposto devido.",
|
||||
"outbound": "Adquirente estabelecido/domiciliado noestrangeiro:6(8)forado âmbitonacional,ainda que prestadortenha sede/EP/domicílio nacional;não isenção/IVAzero nem imposto estrangeiro presumido. Qualidadea/b oculta/conservada,não imposta aestepercurso.",
|
||||
"domestic": "Prestador nacional apartirdo qualpresta eadquirentenacional,sem regraspróprias:6(3);qualidade prestadorSP/regimegeral ereferência permite identificarprestador23(1),casocontrário responsávelindeterminado sem apagarclassificaçãoterritorial."
|
||||
},
|
||||
"formula": "Territorial classification and responsible party only,no monetarycalculation. No righttodeduction prerequisite for6(7);nondigital23(2)excludedigital26(4)/32(1)c routing.",
|
||||
"scope": "2026,serviços enumerados não digitais;localização e identificação do responsável pelas obrigações. Sem isenção confirmada,base,taxa,IVA,montante a pagar,dedução/campo11 ou totaisModeloA. P121/P130digitais eP002transversal não fechados;outros6(4)/(5)encaminhados para percursos próprios. Não automatiza declaração,pagamento,retenção ou prazo digital32(1)c.",
|
||||
"technical_choices": "NewlistedServices opportunity-scoped book in existingmodelo_a snapshot/API/dossier;no schema/permissions. Switchpreserveshiddenparty/quality/targetrefs andclearsownconditions,keepscommon. References or explicitprojectedassumptions reused,no certificates/approvers invented. Requiredfactualrefs explainruleapplication,not provenance revalidation.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 12,
|
||||
"passed": 12,
|
||||
"failed": 0,
|
||||
"by_branch": {
|
||||
"AUD-SIM-L1-P111": "Ownnature,unknown/no,three routes,quality a/b/other,exemptwithoutdeduction allowed,dates/references and separate responsible passed",
|
||||
"AUD-SIM-L1-P112": "Ownnature,unknown/no,three routes,quality a/b/other,exemptwithoutdeduction allowed,dates/references and separate responsible passed",
|
||||
"AUD-SIM-L1-P113": "Ownnature,unknown/no,three routes,quality a/b/other,exemptwithoutdeduction allowed,dates/references and separate responsible passed",
|
||||
"AUD-SIM-L1-P114": "Ownnature,unknown/no,three routes,quality a/b/other,exemptwithoutdeduction allowed,dates/references and separate responsible passed",
|
||||
"AUD-SIM-L1-P115": "Ownnature,unknown/no,three routes,quality a/b/other,exemptwithoutdeduction allowed,dates/references and separate responsible passed",
|
||||
"AUD-SIM-L1-P116": "Ownnature,unknown/no,three routes,quality a/b/other,exemptwithoutdeduction allowed,dates/references and separate responsible passed",
|
||||
"AUD-SIM-L1-P117": "Ownnature,unknown/no,three routes,quality a/b/other,exemptwithoutdeduction allowed,dates/references and separate responsible passed",
|
||||
"AUD-SIM-L1-P118": "Ownnature,unknown/no,three routes,quality a/b/other,exemptwithoutdeduction allowed,dates/references and separate responsible passed",
|
||||
"AUD-SIM-L1-P119": "Ownnature,unknown/no,three routes,quality a/b/other,exemptwithoutdeduction allowed,dates/references and separate responsible passed",
|
||||
"AUD-SIM-L1-P120": "Ownnature,unknown/no,three routes,quality a/b/other,exemptwithoutdeduction allowed,dates/references and separate responsible passed"
|
||||
},
|
||||
"additional": "P118/P119 underlyingclauses/refs,selfreference/digitaltarget guard;switchretains hiddenrefs andclearsownconditions;alloldbooks immutable,currentkeys/history/report/corruptwrites."
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 109,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g9-nondigital-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Realcomponent Edge/CUA:recipientqualityunknown andP118underlyingclauseunknown make resultsindeterminate;switch buyerforeign applies6(8)andhidesquality,returnMZ restoresunknown qualityandoriginalref;restorea/subjclause then save/recover/report30rows+4previousversions. VAT/base/ratealwaysnull,responsible acquirer/outside/provider. SyntheticQA,notmanualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g9-nondigital-20261024\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "4853bc7284d3ed3b1fbafa403fd8406705ac3165",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P089",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094",
|
||||
"AUD-SIM-L1-P095",
|
||||
"AUD-SIM-L1-P100",
|
||||
"AUD-SIM-L1-P101",
|
||||
"AUD-SIM-L1-P102",
|
||||
"AUD-SIM-L1-P103",
|
||||
"AUD-SIM-L1-P105",
|
||||
"AUD-SIM-L1-P106",
|
||||
"AUD-SIM-L1-P107",
|
||||
"AUD-SIM-L1-P108",
|
||||
"AUD-SIM-L1-P109",
|
||||
"AUD-SIM-L1-P110"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "03c26d66/4853bc72;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g9-nondigital-preserved.json",
|
||||
"sha256": "3132adfbbbcde4b2d8c7c7c657dfb38f743d7994650b78bab4931c443eaab628",
|
||||
"scope": "P111–P120QA;all priorbooks/history includingP105–110 andpartialP084/P085 immutable;no activewrites"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-listed-services.ts": "fdc05407576a6c68f8158bc797331380c09e84282609a06ae2a7aa2966c54db6",
|
||||
"resources/js/components/simulation-listed-services.tsx": "77badfa54c3bb6e25fe5153bb852cebc48262b64b4aabc9348a2b1838094917a",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "43446ed6a23b0e101d72ea50f73cdbae0242ace92af12d836a0955cc85800d82",
|
||||
"resources/js/lib/project-dossier.ts": "fea39f530bf7786778dbdadbb6b08678f2a4071bcccc264e3d026155477517c8"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 93,
|
||||
"QA": 10,
|
||||
"functional_pending": 29,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "03c26d66",
|
||||
"remaining": "OnejointGit integration/delivery for tencompatiblebranches,onebackup/realisolatedrestore,individualQAproofsreused,installeddeltaonly. No individualbranch deployment.",
|
||||
"limits": "P084/P085partial,pending;L1open;P00105/06;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g9-nondigital-20261024\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "2a7254406db3aa6e8c71bfbaf56bbcda1f139d19",
|
||||
"receipt": "l1-g9-nondigital-delivery-20261024.json",
|
||||
"record": "iva_l1_g9_nondigital_P111_P120_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 103,
|
||||
"QA": 0,
|
||||
"functional_pending": 29,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
{
|
||||
"implementation_commit": "9b95e5e7a8d129d6256f8df1b62423b8a94c4477",
|
||||
"status": "delivered_with_QA_proofs_preserved",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P088": [
|
||||
"permanent_private_goods",
|
||||
"free_goods_transfer",
|
||||
"exempt_sector_goods",
|
||||
"fixed_asset_20a"
|
||||
],
|
||||
"AUD-SIM-L1-P124": [
|
||||
"permanent_private_goods",
|
||||
"free_goods_transfer",
|
||||
"exempt_sector_goods",
|
||||
"fixed_asset_20a"
|
||||
]
|
||||
},
|
||||
"branch_count": 2,
|
||||
"treatment_count": 4,
|
||||
"shared_operations_not_double_counted": true,
|
||||
"source": "CIVA3(3)e/f,Lei13/2016PDF6–7/p1426(264–265);15(2)b,PDF13/p1426(271);20(1)a,PDF15/p1426(273). Lei22/2022PDF3mantém15(2)b e20(1)a;Lei10/2025PDF12mantém3(3)e/f e não altera15/20.",
|
||||
"meaning": {
|
||||
"P124": "Classificação da afectação permanente de bens a uso próprio/particular/alheio,transmissão gratuita,afectação a sector isento ou aoactivo imobilizado de bens20(1)a. Exige dedução anterior total/parcial nos bens/elementos;em3e conferir excepção de amostras/ofertas depequeno valor,sem limiar inventado. Facto histórico de dedução,não nova dedução.",
|
||||
"P088": "Base15(2)b:preço aquisição ou,na sua falta demonstrada,preço custo,reportados ao momento da operação. ClassificaçãoP124 pode estar identificada ebaseP088 indeterminada;sem custo por defeito para preço aquisição desconhecido."
|
||||
},
|
||||
"formula": "15(2)b:current acquisitionprice;only if absent,currentcost.No automaticvaluation/update/depreciation/deduction.",
|
||||
"scope": "2026/MZN,quatro tratamentos partilhados entre dois requisitos sobre a mesma operação,registada uma vez. Distinto de uso temporário de bens como serviçoP089. Sem nova dedução/campo11,regularização,taxaIVA,IVA ou totaisModeloA;dedução anterior apenas facto histórico. Excepçãoamostras/ofertas fica fora deste percurso quando aplicável;desconhecido permanece indeterminado.",
|
||||
"technical_choices": "NewregulatedGoodsAllocations opportunity-scoped book in existingmodelo_a snapshot/API/dossier;oneoperation jointlycoversP124facts/P088base,no duplicatedentry/aggregation. Switchretains hiddenprices/refs andrequiresreviewownfacts/valuation. Money15integer/6fractiondigits,BigInt,no float/rounding. Existingrefs or explicitassumptions,no certificates/approvers/newthresholds. valuationDate meansmomenttowhichpriceisreported,not compulsorynewdocumentissue date.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 7,
|
||||
"passed": 7,
|
||||
"failed": 0,
|
||||
"by_treatment": "Four ownfact paths,priorDeduction unknown/no,scope/refs/date,exactcurrent acquisition/cost and no VAT",
|
||||
"additional": "P124classification separatedfromP088missingbase;costfallback requires explicitabsence ofacquisitionprice,currentmoment,date/scope;switchretains hiddenprices/refs andclearsconfirmations;zero vsunknown;allpreviousbooks/history/report/corruptwriteguards"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 27,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-goods-allocation-20261025\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed,existing plugin timing warnings",
|
||||
"UI": "Edge/CUArealcomponent:acquisitionabsenceunknown retainsassimilatedclassification butcostbaseindeterminate;priorDeductionunknown makesclassificationindeterminate;restorefacts,saved/recovered/report4operations1000.25/800.15/1000.25/800.15MZN and4previousversions,VAT/ratenull. SyntheticQA,notmanualTempoacceptance.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-goods-allocation-20261025\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "1b67fa85ff91174a45c171a6cf6af821727acca5",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P089",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094",
|
||||
"AUD-SIM-L1-P095",
|
||||
"AUD-SIM-L1-P096",
|
||||
"AUD-SIM-L1-P097",
|
||||
"AUD-SIM-L1-P098",
|
||||
"AUD-SIM-L1-P099",
|
||||
"AUD-SIM-L1-P100",
|
||||
"AUD-SIM-L1-P101",
|
||||
"AUD-SIM-L1-P102",
|
||||
"AUD-SIM-L1-P103",
|
||||
"AUD-SIM-L1-P105",
|
||||
"AUD-SIM-L1-P106",
|
||||
"AUD-SIM-L1-P107",
|
||||
"AUD-SIM-L1-P108",
|
||||
"AUD-SIM-L1-P109",
|
||||
"AUD-SIM-L1-P110",
|
||||
"AUD-SIM-L1-P111",
|
||||
"AUD-SIM-L1-P112",
|
||||
"AUD-SIM-L1-P113",
|
||||
"AUD-SIM-L1-P114",
|
||||
"AUD-SIM-L1-P115",
|
||||
"AUD-SIM-L1-P116",
|
||||
"AUD-SIM-L1-P117",
|
||||
"AUD-SIM-L1-P118",
|
||||
"AUD-SIM-L1-P119",
|
||||
"AUD-SIM-L1-P120",
|
||||
"AUD-SIM-L1-P122",
|
||||
"AUD-SIM-L1-P128"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "63cc3367/1b67fa85;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-goods-allocation-preserved.json",
|
||||
"sha256": "724929bfda23475531c373f2bf5a88951c192e7ecb930e1d38249d6e2cbefd14",
|
||||
"scope": "P088/P124QA;all priorbooks/history includingP105–110 andpartialP084/P085 immutable;no activewrites"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-goods-allocation.ts": "6646a2054ebd4e6731b60719d36ce922ed50f2e062e0f980190eb20ce8c23d20",
|
||||
"resources/js/components/simulation-goods-allocation.tsx": "08c84f4b9af21e46cd9d5af6f6bee9e12c14b111438f1649a694a27f36d14180",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "1b27e8d3a6c79c6f8769bf5158ed8be45718f655b13cdf23b517bdb44c5a6951",
|
||||
"resources/js/lib/project-dossier.ts": "c5de565ff7ded1fcf4d1f3a025694d3e2af4ff75e55266463758e8c1c5fcc314"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 109,
|
||||
"QA": 2,
|
||||
"functional_pending": 21,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "63cc3367",
|
||||
"remaining": "OnejointGit delivery forP088/P124,freshbackup/realisolatedrestore,acceptedQA reused,installeddeltaonly. No individualbranch deployment.",
|
||||
"limits": "L1open;newdeduction/regularisationoutsideincrement;P00105/06;P121digital/P084/P085pending;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-goods-allocation-20261025\\source-archive-inventory.json",
|
||||
"qa_status_preserved": "QA_complete_not_delivered",
|
||||
"delivery_followup": {
|
||||
"served_commit": "6c12aabb3ac7f8296025a2af0408390bfe292bdb",
|
||||
"receipt": "l1-goods-allocation-delivery-20261025.json",
|
||||
"record": "iva_l1_goods_allocation_P088_P124_homologation_20261025",
|
||||
"counts": {
|
||||
"delivered": 111,
|
||||
"QA": 0,
|
||||
"functional_pending": 21,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"candidate": "946fc089066fa7c7b71648da0de4035f3b8b592f",
|
||||
"status": "partial_preparation_and_conditional_simulation_delivered_benefits_pending",
|
||||
"authorization": "ExplicitTempo:distinctP085emergency/humanitarianpurpose andP084requeststates;presentingdoesnotgrant;decisionspreservegoods/operation/period/conditions;normalandconditionalhypotheticalscenarios;documentaryconference stillrequired",
|
||||
"P084": {
|
||||
"states": [
|
||||
"preparation",
|
||||
"presented",
|
||||
"granted",
|
||||
"denied"
|
||||
],
|
||||
"scope": "Immutable explicitrequestRecords retain state,goods,operation,period,conditions,decisionreference/date;allrecordedscopes showninUI/report;edits/currentrequest donot replace prior decisions or extend them toother goods/operations/periods/opportunities",
|
||||
"precision": "Months,exact calendardates,or literaloperation/temporalscope including untilrevocation/withoutend;no artificialenddate orsingleoperation restriction when thedocumentstatesotherwise",
|
||||
"incomplete": "Draft can save incomplete;recording scopeddecision requires fouruserrequested scopeelements,not a new certificate/approver;document/date optional ifnotavailable",
|
||||
"not_submission": "No request sent to authority;declaredrecordstate isnot a grant bysimulator"
|
||||
},
|
||||
"P085": {
|
||||
"fields": "Emergency/disaster,nature,humanitarianpurpose,goods,recipient,availabledocuments,mitigation",
|
||||
"procedure": "Only applyemergency/donation procedurewhen correspondence demonstrated;not appliednow;P085acquisition scope retained,no automaticimport extension orP084status requirement"
|
||||
},
|
||||
"scenarios": {
|
||||
"normal": "User-indicated VAT with documentorprojectionpremise;missing/invalidamountororigin remainsindeterminate,no inferrednormalrate/base",
|
||||
"conditional": "Explicit hypotheticalassumption+materialconditions/context required;unknown/contradictedconditions giveindeterminate;0.00 onlylabelledhypotheticalconditionalexemption,notgrantedorapplied",
|
||||
"application": "Never modifies VATresults,field11,ModeloAtotals orrequeststatus;evenrecordeddeferido doesnotautoapply"
|
||||
},
|
||||
"reuse": "Existingper-opportunity reference reuse fills emptyfields only;optional availabledocuments canappend primaryreference without overwriting otherdocuments;all27priorfiscalbooks andoldofferhistory/deliberatepurpose preservedexactly",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"scope": "requestnotgrant,scopeddecisionhistory includingexact/literalperiods,P085ownpurpose,scenariopremises,save/recover/reportpreservation",
|
||||
"record": "latestnode:test outputthissession;acceptedoldproofs not rerun"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 31,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-offer-paths-20261024\\api-tests.xml"
|
||||
},
|
||||
"types_final": "passed",
|
||||
"production_build_final": "passed;existingplugin/chunkwarnings",
|
||||
"UI": "CodexEdgeCUA:presentedstate,priorpartialgrantNovemberonly,normal800/conditional0hypothesis;withdrawassumption->indeterminate;incompletescopecannotreplacepriorrecord;P085humanitarianpurpose/normal160;version/save/recover/reportwithallrecords,4historicalversions. Exact/literalperiodvariants coveredbyunit tests,not separateUIclaim;notmanualTempoacceptance"
|
||||
},
|
||||
"regulatory_correspondence": {
|
||||
"status": "Still not demonstrated;not closed or declarednonexistent",
|
||||
"established_chain": "ModelI.1/Despacho06Jan2010->Decreto56/2009art2->CBFLei4/2009;not demonstrated implementinglinkCIVA14(3)",
|
||||
"this_session": "Jointtargetedqueries foundno newlyestablishedprimarylink;directATfiscal listing returnedno readabletoolcontent,whichisnot evidenceofabsence;no unreadsources adopted",
|
||||
"next": "Locate/read specific14(3) implementinglink or expressly applicable procedure,withinternalacquisition/import scope and amendments;onlythenapplyrespectivebenefit",
|
||||
"no_invented_requirements": "No certificate,taxclearance,projectapproval,newauthorityorapprover created;Tempo productclarification isnotdocumentaryproof"
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 75,
|
||||
"QA_complete_branches": 0,
|
||||
"functional_pending": 57,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"installed": "G6E/P052c1314cdf,receipt536559d6;thisclarification946fc089QAonly,nopush/install",
|
||||
"preservation_before_tests": {
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-g6e-inputs.json",
|
||||
"sha256": "f1ac7bd08994dfcf34f8567dffca98acf945f722093791ce8bbe94d679ac3af5",
|
||||
"accepted_delivered_before_install": 74,
|
||||
"accepted_QA": [
|
||||
"P052"
|
||||
],
|
||||
"preserved": "27fiscalbooks+offerbook(2rows,deliberateedits,histories)",
|
||||
"confirmed_losses": [],
|
||||
"scope": "Tempo explicitP084requeststates/scopeddecision,P085emergency/humanitarianpurpose,normal/conditionalhypotheticalscenarios;no automaticbenefit/activechange",
|
||||
"installation_in_progress": "c1314cdf;separateverifiedreceipt"
|
||||
},
|
||||
"limits": "L1open;P001only05/06;beveragesL2/L3;Statistics/AIdeferred;classificationdistinctfromdeduction/field11;L1closuredoesnotrequireL2/L3/alltaxes",
|
||||
"qa_status_preserved": "partial offer-path clarification demonstratedQA,not installed;P084/P085benefits remainpending",
|
||||
"delivery_followup": {
|
||||
"served_commit": "78c9f4a356d5eaf590d8d82168228a2f84b1f633",
|
||||
"receipt": "l1-g6f-delivery-20261024.json",
|
||||
"record": "iva_l1_g6f_P050_with_partial_P084_P085_homologation_20261024",
|
||||
"counts": {
|
||||
"delivered": 76,
|
||||
"QA": 0,
|
||||
"functional_pending": 56,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"candidate": "5ec2f198a35fd09e1e027f1db6fdf0b6d960114a",
|
||||
"status": "draft_preparation_only_demonstrated_QA;P084/P085 benefits and complete branches remain pending;not installed",
|
||||
"authorization": "ExplicitTempo24/10 joint documentary research,distinctconditions,fields/reuse/draftpreparation while research proceeds",
|
||||
"scope": {
|
||||
"P084": "Acquisition/import,beneficiary,purpose,national/public-social institution,goods suitability,public-interest use",
|
||||
"P085": "Acquisition only,goods,recipient/purpose,disaster/nature and mitigation;no import extension"
|
||||
},
|
||||
"reuse": "Only selected opportunity,explicitreference,fill empty fields only;preserve deliberate edits,originalbooks,provenance;no currencyconversion",
|
||||
"persistence": "Existing private API opaque modelo_a_snapshot.offerPreparations per opportunity;incomplete drafts accepted;explicit saved versions/history",
|
||||
"no_benefit_application": "No VAT calculation,exemption,result,zero,field11 or ModeloA totals;otherbranches unaffected",
|
||||
"documentary_research": {
|
||||
"document": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g5d-offer-drafts-20261024\\BR-11-I-2010-03-17-despacho-modelos.pdf",
|
||||
"sha256": "384fb46354e1888df43f72288dfed7933e30c7534211e0dcb6994f43b10e0059",
|
||||
"source_url": "https://www.cipmoz.org/wp-content/uploads/2023/parcerias-publico-privadas/9PP%29%20Despacho_Mecanismos%20Implementacao%20do%20Regulamento%20do%20Codigo%20dos%20Beneficios%20Fiscais.pdf",
|
||||
"identity": "BR11/I Série17/03/2010;DespachoMinistroFinanças06/01/2010;art1/2 modelos de implementaçãoRCBFDecreto56/2009",
|
||||
"pages": 17,
|
||||
"read_scope": "PDF1-5;ModelI.1/I.1A/I.2,includingI.1verso PDF3",
|
||||
"findings": [
|
||||
"ModelI.1verso lists emergency request viaINGC and other requests with legal provision/import invoices/donation certificate",
|
||||
"This is customs application documentation,not demonstrated to be the complete application regulation for CIVA14(2)(a/b) under14(3)",
|
||||
"Do not infer these instructions apply to domestic purchases,P085 imports,or all beneficiaries;do not turn oldINGC name/form or timelines into current portal mandatory requirements without applicable scope/amendments",
|
||||
"Source officialBR accepted;host is a mirror,not a second provenance approval"
|
||||
],
|
||||
"next": "Locate specific CIVA14(3) implementing provisions and later customs/INGD changes;compare domestic acquisition vs import applicability;draft preparation can proceed independently",
|
||||
"no_rule_activation": true
|
||||
},
|
||||
"remaining": "Locate and read applicable implementation of CIVA14(3),including domestic acquisition vs import scope and later customs/INGD changes;then complete respective benefit application and verify;do not infer that regulation doesnotexist",
|
||||
"estimate": "10–18h was conditional forP084/P085 only,notallL1;preliminary before draftpreparation,no new measured remaining estimate or documentary deadline claimed",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"new_tests": 4,
|
||||
"passed": 4,
|
||||
"failed": 0,
|
||||
"evidence": "node:test output this session;no saved stdout claimed"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 23,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g5d-offer-drafts-20261024\\api-tests.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"production_build": "passed,existing plugin/chunk warnings",
|
||||
"UI": "Codex Edge/CUA realcomponent;distinctconditions,explicitreuse preserved deliberately editedpurpose,saveversion/save/recover/report,unknown amounts preserved;notmanualTempo acceptance",
|
||||
"QA_harness_correction": "Syntheticprefix mismatch rejected firstlocal save;fixed helper toaccept inheritedSYNTHETICQAG5Cseed;afterViterestart browserlocaledits andtwohistoricalversions preserved;successful save/recover/report verified"
|
||||
},
|
||||
"preservation": {
|
||||
"prior_books": 26,
|
||||
"prior_snapshot_keys_values": "exactlyequal,frozenG5Cinputs",
|
||||
"active": "unchanged installed2d889a21;receipt e3269079;no push/install of draft code"
|
||||
},
|
||||
"counts": {
|
||||
"delivered": 74,
|
||||
"QA_complete_branches": 0,
|
||||
"functional_pending": 58,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"limits": "L1open;P001only05/06;beveragesL2/L3;Statistics/AIdeferred;classification separatefromfield11;L1closure doesnotdepend onL2/L3/alltaxes",
|
||||
"draft_delivery_followup": {
|
||||
"served_commit": "c1314cdf90c368b51489aaf04c2cdbe59cfb88e6",
|
||||
"receipt": "l1-g6e-delivery-20261024.json",
|
||||
"status": "Originaldraftpreparationavailable;notfullbenefitclosure",
|
||||
"new_request_states_scenarios": "Not included;separateQAafterthisrelease"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"status": "diploma and formal basis of model identified;not demonstrated CIVA14(3) implementing correspondence",
|
||||
"chain": [
|
||||
"DespachoMF06/01/2010,BR11/I17/03/2010,art1(a)/art2 approvesModelI.1 and publishes attachedforms",
|
||||
"Express empowerment:art2Decreto56/2009",
|
||||
"Decreto56/2009,preamble/art1,implementsCBFLei4/2009;Regulationart1sameobject;art3investmentbeneficiaries;art6importrecognition,art7ruralinvestments,art8internaltaxes",
|
||||
"No expressCIVA14(3) or its gift conditions located in the readDecreto/Regulationarts1–16;do not treat form as sufficient correspondence"
|
||||
],
|
||||
"exact_citations": "BR40/I07/10/2009:PDF2/p303 decree1/2 and regulation1;PDF3/p304 regulation3/5/6/7/8;PDF4/p305 remaining9–16. MIREMEcompilationPDF86–92 contextualread,not new approval",
|
||||
"scenario_mapping": {
|
||||
"P084_internal_acquisition": "ModelI.1 titled/customs import instructions;doesnotdemonstrate domestic purchase procedure. Regulation8 concerns internal taxes underCBFobject,not automatically gifts14(2)(a).",
|
||||
"P084_import": "ModelI.1 may document customs exemption request only with identified legalbasis;othercases instruction asks provision/importinvoice/donationcertificate. Itdoesnotitself establish14(2)(a) entitlement or impose allCBFconditions on gifts.",
|
||||
"P085_internal_acquisition": "CIVA14(2)(b) acquisition;customs emergency instruction doesnot establish internal acquisition procedure.",
|
||||
"P085_import": "Not automatically covered by14(2)(b). Emergency request viaINGC appears inI.1verso,but requires own applicable legalbasis;no branchscope extension or mandatorycurrentINGCworkflow inferred."
|
||||
},
|
||||
"remaining": "Locate CIVA14(3) specific implementing link or expressly applicable procedure and later amendments/INGD/customs scope;preserve existing drafts and continue independent branches",
|
||||
"no_new_restrictions": "No mandatoryprojectapproval,NUIT/accounting,taxclearance,certificate or five/thirtyday deadlines added to P084/P085 by this cotejo;officialsources accepted,not reauthenticated",
|
||||
"sources": [
|
||||
{
|
||||
"file": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6e-supplies-20261024\\Decreto56-2009-BR40.pdf",
|
||||
"url": "https://fracessoriasa.co.mz/wp-content/uploads/2021/03/10-Decreto-n_56.2009-REGULAMENTO-DOS-BENEFICIOS-FISCAIS.pdf",
|
||||
"sha256": "6ea1b8d93daed48c6d590481d874010fa1708211d8f27c319dc9a31328456017",
|
||||
"pages": 5
|
||||
},
|
||||
{
|
||||
"file": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-g6e-supplies-20261024\\MIREME-legislacao-investimentos.pdf",
|
||||
"url": "https://mireme.gov.mz/wp-content/uploads/2022/03/Lei-e-Regualamento-das-zonas-francas-industriais-investimentos.pdf",
|
||||
"sha256": "df50f6a489ffb35a4252fddec0ffa1f9c58d7b8cb4e54c9f25b7904bd39218b7",
|
||||
"pages": 136
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
{
|
||||
"implementation_commit": "b0818c01633ed7eab7240fcec5fa4a0a87c15104",
|
||||
"status": "QA_complete_not_delivered",
|
||||
"coverage": {
|
||||
"AUD-SIM-L1-P092": [
|
||||
"reseller_margin"
|
||||
],
|
||||
"AUD-SIM-L1-P093": [
|
||||
"auction_margin"
|
||||
],
|
||||
"AUD-SIM-L1-P125": [
|
||||
"used_goods",
|
||||
"art",
|
||||
"collection",
|
||||
"antique"
|
||||
]
|
||||
},
|
||||
"branch_count": 3,
|
||||
"treatment_count": 2,
|
||||
"category_count": 4,
|
||||
"QA_example_count": 8,
|
||||
"shared_operations_not_double_counted": true,
|
||||
"source": "CIVA Lei13/2016:3(3)g/3(6),PDF7,p1426(265);15(2)f/g,PDF13,p1426(271). RIVA Decreto7/2008,BR16-I de16/04/2008,arts47–49,PDF8–9,p106–107. Lei22/2022 PDF3 mantém15f/g e fixa17(1)16%. Lei10/2025 não altera15/17 e revoga regimes35/42;referência antiga não os reactiva. Rectificação2017 sem alteração destas disposições.",
|
||||
"meaning": {
|
||||
"P092": "Revendedor: margem individual positiva da contraprestação total com IVA menos preço de compra justificado; dividir por 1.16 e arredondar a base à unidade. Perda conservada no bem, sem compensação entre transmissões. Opção pelo regime normal fica separada.",
|
||||
"P093": "Organizador em nome próprio por conta do comitente, contrato de comissão e venda em leilão: base = facturado ao comprador menos líquido do comitente menos IVA próprio identificado. Líquido = adjudicação menos comissão. IVA desconhecido não é zero.",
|
||||
"P125": "Classificação própria: bem usado reutilizável, arte, colecção ou antiguidade superior a 100 anos; critérios de 3(6) conservados. Categoria identificada não activa automaticamente a margem. Tiragem limitada a 200 exemplares e cerâmica única executada/assinada pelo artista nos percursos respectivos."
|
||||
},
|
||||
"scope": "2026/MZN,transmissões internas tributáveis e aquisição nacional com qualidade do fornecedor/comitente demonstrada. Duas fórmulas, quatro categorias, oito exemplos e três ramos; uma operação individual, sem dupla contagem. Apenas classificação/base:sem IVA calculado,nova dedução,campo11,regularização ou totaisModeloA. IVA identificado no leilão é componente referenciada. Exportação isenta e opção normal separadas; origens legadas35/42 permanecem indeterminadas.",
|
||||
"technical_choices": "regulatedSecondhands por oportunidade no snapshot/API/dossier existentes;BigInt com6casas,sem float;arredondamento à unidade mais próxima,empate para cima como escolha técnica explícita;troca conserva campos/referências e exige rever confirmações.Nenhum certificado/aprovador inventado. Prazo49(6)/(7) de5dias úteis identificado,sem calendário de feriados presumido.",
|
||||
"verification": {
|
||||
"frontend": {
|
||||
"tests": 11,
|
||||
"passed": 11,
|
||||
"failed": 0,
|
||||
"coverage": "8 combinações regime/categoria;ausência de factos/referências;opção normal;origem nacional/elegibilidade;limites de tiragem/idade;perdas/arredondamento;trocadecategoria;persistência,histórico,relatório e preservação integral"
|
||||
},
|
||||
"privateAPI": {
|
||||
"tests": 1,
|
||||
"assertions": 35,
|
||||
"target": "simulator_fiscal_delta_20261021_test:55441",
|
||||
"transaction_rollback": true,
|
||||
"xml": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-secondhand-20261025\\phpunit.xml"
|
||||
},
|
||||
"types": "passed",
|
||||
"build": "passed;existing plugin timing warnings",
|
||||
"UI": "Edge/CUA,componente real:preço compra vazio mantém classificação mas base indeterminada;venda900/compra1000 conserva perda100 ebase0semcompensaroutrosbens;restauro1160/1000base138;gravação/recuperação/relatório8operações,4versõesanteriores,bases138.00x4/344.83x4,IVA/taxanull. Dados sintéticos,não aceitação manual da Tempo.",
|
||||
"UI_screenshot": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-secondhand-20261025\\qa-recovered-report.png"
|
||||
},
|
||||
"preservation": {
|
||||
"base": "ec786f4ae2eb25d9a21cdc46dc883efcf8fb8c02",
|
||||
"delivered_ids": [
|
||||
"AUD-SIM-L1-P003",
|
||||
"AUD-SIM-L1-P004",
|
||||
"AUD-SIM-L1-P005",
|
||||
"AUD-SIM-L1-P006",
|
||||
"AUD-SIM-L1-P007",
|
||||
"AUD-SIM-L1-P008",
|
||||
"AUD-SIM-L1-P009",
|
||||
"AUD-SIM-L1-P010",
|
||||
"AUD-SIM-L1-P011",
|
||||
"AUD-SIM-L1-P012",
|
||||
"AUD-SIM-L1-P013",
|
||||
"AUD-SIM-L1-P014",
|
||||
"AUD-SIM-L1-P015",
|
||||
"AUD-SIM-L1-P016",
|
||||
"AUD-SIM-L1-P017",
|
||||
"AUD-SIM-L1-P018",
|
||||
"AUD-SIM-L1-P019",
|
||||
"AUD-SIM-L1-P020",
|
||||
"AUD-SIM-L1-P021",
|
||||
"AUD-SIM-L1-P022",
|
||||
"AUD-SIM-L1-P023",
|
||||
"AUD-SIM-L1-P024",
|
||||
"AUD-SIM-L1-P025",
|
||||
"AUD-SIM-L1-P026",
|
||||
"AUD-SIM-L1-P027",
|
||||
"AUD-SIM-L1-P028",
|
||||
"AUD-SIM-L1-P029",
|
||||
"AUD-SIM-L1-P030",
|
||||
"AUD-SIM-L1-P031",
|
||||
"AUD-SIM-L1-P032",
|
||||
"AUD-SIM-L1-P033",
|
||||
"AUD-SIM-L1-P034",
|
||||
"AUD-SIM-L1-P035",
|
||||
"AUD-SIM-L1-P036",
|
||||
"AUD-SIM-L1-P037",
|
||||
"AUD-SIM-L1-P038",
|
||||
"AUD-SIM-L1-P039",
|
||||
"AUD-SIM-L1-P040",
|
||||
"AUD-SIM-L1-P041",
|
||||
"AUD-SIM-L1-P042",
|
||||
"AUD-SIM-L1-P043",
|
||||
"AUD-SIM-L1-P044",
|
||||
"AUD-SIM-L1-P045",
|
||||
"AUD-SIM-L1-P048",
|
||||
"AUD-SIM-L1-P049",
|
||||
"AUD-SIM-L1-P050",
|
||||
"AUD-SIM-L1-P051",
|
||||
"AUD-SIM-L1-P052",
|
||||
"AUD-SIM-L1-P053",
|
||||
"AUD-SIM-L1-P054",
|
||||
"AUD-SIM-L1-P055",
|
||||
"AUD-SIM-L1-P056",
|
||||
"AUD-SIM-L1-P057",
|
||||
"AUD-SIM-L1-P060",
|
||||
"AUD-SIM-L1-P061",
|
||||
"AUD-SIM-L1-P062",
|
||||
"AUD-SIM-L1-P063",
|
||||
"AUD-SIM-L1-P064",
|
||||
"AUD-SIM-L1-P065",
|
||||
"AUD-SIM-L1-P066",
|
||||
"AUD-SIM-L1-P067",
|
||||
"AUD-SIM-L1-P068",
|
||||
"AUD-SIM-L1-P069",
|
||||
"AUD-SIM-L1-P070",
|
||||
"AUD-SIM-L1-P071",
|
||||
"AUD-SIM-L1-P072",
|
||||
"AUD-SIM-L1-P073",
|
||||
"AUD-SIM-L1-P074",
|
||||
"AUD-SIM-L1-P075",
|
||||
"AUD-SIM-L1-P076",
|
||||
"AUD-SIM-L1-P077",
|
||||
"AUD-SIM-L1-P078",
|
||||
"AUD-SIM-L1-P079",
|
||||
"AUD-SIM-L1-P080",
|
||||
"AUD-SIM-L1-P081",
|
||||
"AUD-SIM-L1-P082",
|
||||
"AUD-SIM-L1-P083",
|
||||
"AUD-SIM-L1-P086",
|
||||
"AUD-SIM-L1-P088",
|
||||
"AUD-SIM-L1-P089",
|
||||
"AUD-SIM-L1-P090",
|
||||
"AUD-SIM-L1-P091",
|
||||
"AUD-SIM-L1-P094",
|
||||
"AUD-SIM-L1-P095",
|
||||
"AUD-SIM-L1-P096",
|
||||
"AUD-SIM-L1-P097",
|
||||
"AUD-SIM-L1-P098",
|
||||
"AUD-SIM-L1-P099",
|
||||
"AUD-SIM-L1-P100",
|
||||
"AUD-SIM-L1-P101",
|
||||
"AUD-SIM-L1-P102",
|
||||
"AUD-SIM-L1-P103",
|
||||
"AUD-SIM-L1-P105",
|
||||
"AUD-SIM-L1-P106",
|
||||
"AUD-SIM-L1-P107",
|
||||
"AUD-SIM-L1-P108",
|
||||
"AUD-SIM-L1-P109",
|
||||
"AUD-SIM-L1-P110",
|
||||
"AUD-SIM-L1-P111",
|
||||
"AUD-SIM-L1-P112",
|
||||
"AUD-SIM-L1-P113",
|
||||
"AUD-SIM-L1-P114",
|
||||
"AUD-SIM-L1-P115",
|
||||
"AUD-SIM-L1-P116",
|
||||
"AUD-SIM-L1-P117",
|
||||
"AUD-SIM-L1-P118",
|
||||
"AUD-SIM-L1-P119",
|
||||
"AUD-SIM-L1-P120",
|
||||
"AUD-SIM-L1-P122",
|
||||
"AUD-SIM-L1-P124",
|
||||
"AUD-SIM-L1-P128"
|
||||
],
|
||||
"confirmed_losses": [],
|
||||
"accepted_delivery": "6c12aabb/ec786f4a;174tables/369files;29published/28relations/408geometries;code/schema/data/config/permissions compared",
|
||||
"frozen": "tests\\frontend\\fixtures\\iva-secondhand-preserved.json",
|
||||
"sha256": "f3616dc0b3a333128d08679e0e0949fa3cc425290db8e46bd4f563198f7f8e07",
|
||||
"scope": "P092/P093/P125QA;all priorbooks/history includingP105–110 andpartialP084/P085 immutable;no activewrites"
|
||||
},
|
||||
"runtime_delta": {
|
||||
"resources/js/lib/iva-secondhand.ts": "de9cab0f8685c0be1072ce0b8b5ae98865383fa52f4487ecb62514ddb28d6fdc",
|
||||
"resources/js/components/simulation-secondhand.tsx": "7a715a05635137d3b7b8a1eb3d554646c4553430904613235199fc6a254cec20",
|
||||
"resources/js/components/simulation-monthly-iva.tsx": "338d5c4b9b60b2be6b3f059c543c92127222f621424854cba9a19651d86d2967",
|
||||
"resources/js/lib/project-dossier.ts": "fe0b12b2acc5d1a59c862abf6c96e2e09c51193fc2e090e475dc0ec8673e23c9"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 111,
|
||||
"QA": 3,
|
||||
"functional_pending": 18,
|
||||
"P001": 1,
|
||||
"total": 133
|
||||
},
|
||||
"homologation_unchanged": "6c12aabb",
|
||||
"remaining": "Uma entrega conjunta P092/P093/P125 pelo processoGit;backup/restauro isolado fresco e conferência apenas do delta instalado,reutilizando estas provas.",
|
||||
"limits": "L1aberto;P00105/06;P121digital/P084/P085pendentes;bebidasL2/L3;Estatísticas/IAadiadas",
|
||||
"sources_inventory": "C:\\laragon\\www\\portal-investidor\\outputs\\iva-l1-secondhand-20261025\\source-archive-inventory.json"
|
||||
}
|
||||
@@ -0,0 +1,323 @@
|
||||
{
|
||||
"status": "installed_delta_verified_partial_L1",
|
||||
"candidate": "af7d2503207c8744cdbb6d96b8cca89fa367384e",
|
||||
"base_installed": "2fdca86367d8bad524113b4cf6c49a0110130be9",
|
||||
"coverage_complete_branches": {
|
||||
"AUD-SIM-L1-P122": [
|
||||
"goods_sale_commission",
|
||||
"goods_purchase_commission"
|
||||
],
|
||||
"AUD-SIM-L1-P128": [
|
||||
"service_sale_mandate",
|
||||
"service_purchase_mandate"
|
||||
]
|
||||
},
|
||||
"branch_count_complete": 2,
|
||||
"treatment_count": 4,
|
||||
"runtime_delta": [
|
||||
{
|
||||
"path": "resources/js/lib/iva-own-name.ts",
|
||||
"sha256_LF": "c36509de24d31d747d91630a31ce7d72baa749e9928b718a944556348fc54f85"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/components/simulation-own-name.tsx",
|
||||
"sha256_LF": "6e142242aa29ae07e36b4d8d0be7d78f770d701e0a92e1a6e9832fcb794c17cf"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/components/simulation-monthly-iva.tsx",
|
||||
"sha256_LF": "9718dc440aa98497011775d8bd03049d7857fa3badf27f4467d6d434f642defd"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/lib/project-dossier.ts",
|
||||
"sha256_LF": "099dc307a86c763a9509516f6d59cc5c454b1f81189cc04b919d8d6045baf9dc"
|
||||
}
|
||||
],
|
||||
"counts_before": {
|
||||
"delivered": 107,
|
||||
"QA": 2,
|
||||
"functional_pending": 23,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 109,
|
||||
"QA": 0,
|
||||
"functional_pending": 23,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"counts_after_delivery": {
|
||||
"delivered": 109,
|
||||
"QA": 0,
|
||||
"functional_pending": 23,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"QA_proofs_reused": [
|
||||
"iva-l1-g10-own-name-qa-20261025.json"
|
||||
],
|
||||
"authorization": "Tempo explicitly requests one joint delivery ofaf7d2503,P122/P128,main compatibility/concurrent changes preserved,installeddelta only",
|
||||
"scope": "2026,circuitos emnome próprio,partes/contratos/objectos econtraprestações originais das duas relações. Sem soma/compensação automática,base tributável nova,localização,isenção,taxa,IVA,dedução/campo11 ou totaisModeloA. Sem conversão cambial;moeda original identificada e coerente com contexto. P091preservado,sem repetir aceitação/cálculo.",
|
||||
"source": "CIVA3(3)c,Lei13/2016PDF6/p1426(264);4(3),PDF7/p1426(265). Lei22/2022não altera3/4;Lei10/2025PDF12mantém3(3)c e não altera4. Base15(2)e/P091já entregue permanece independente;sem nova aplicação da base neste incremento.",
|
||||
"meaning": {
|
||||
"P122": "Transferências de bens em execução de contrato de comissão,incluindo consignação;na venda comissário considerado comprador,na compra comitente considerado comprador. Venda:comitente→comissário→terceiro;compra:terceiro→comissário→comitente. Contraprestações e referências das duas relações separadas.",
|
||||
"P128": "Serviço efectuado por intervenção de mandatário emnome próprio:mandatário considerado adquirente eprestador sucessivamente4(3). Venda/prestação:mandante→mandatário→terceiro;compra/aquisição:terceiro→mandatário→mandante. Não é mera intermediação emnome de outrem ou base15(2)e de bens."
|
||||
},
|
||||
"formula": "Classifytwo successive relations bykind/direction;keep eachoriginalconsideration separate;no monetaryaggregation or taxcalculation.",
|
||||
"preservation": "107prior closures and partialP084/P085 preserved;accepted perbranchQA reused;one integration/backup/real isolatedrestore/check for whole set",
|
||||
"partial_P084_P085": "Preparation/conditional simulation only,benefits pending;no closure",
|
||||
"limits": "L1open;deductionoutsideincrement;P00105/06;P121digital/P084/P085pending;beveragesL2/L3;Statistics/AIdeferred",
|
||||
"containment": "l1-g10-own-name-readonly-rollback-20261025.patch,checked only,not applied;blocks newP096–099classifications,preserves readers/history/otherbranches",
|
||||
"authenticated_preflight": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "2fdca86367d8bad524113b4cf6c49a0110130be9",
|
||||
"release": "/var/www/investmoz-homologacao/releases/2fdca86367d8bad524113b4cf6c49a0110130be9-c65ebbad",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/2a7254406db3aa6e8c71bfbaf56bbcda1f139d19-ae306e0a",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"current_link": "/var/www/investmoz-homologacao/releases/2fdca86367d8bad524113b4cf6c49a0110130be9-c65ebbad",
|
||||
"release_revision": {
|
||||
"commit": "2fdca86367d8bad524113b4cf6c49a0110130be9",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T22:01:48.219730+00:00",
|
||||
"manifest_sha256": "d45edd81644fa6b659aece95804fd9c5e8e99c599ef82bf078ee2ba39e700f12"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"backup_restore": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g10-own-name-delivery-20261025/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "85e90033b54a7eb7fed1bf0de466b984f5c03cc3b4938b5d8db20b7bf0abf954",
|
||||
"files_sha256": "291e2c871d94c3b642252f8daa8a9d7557278f13028e68df78b5f6edec5b1234",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g10_own_name_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "85e90033b54a7eb7fed1bf0de466b984f5c03cc3b4938b5d8db20b7bf0abf954",
|
||||
"active_database_writes": 0
|
||||
}
|
||||
},
|
||||
"delivery_local_date": "2026-10-25",
|
||||
"delivery_timezone": "Africa/Johannesburg",
|
||||
"served_commit": "63cc336787cade92fb7ee5b2b2d407308a0cf66b",
|
||||
"installation": {
|
||||
"protected": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "63cc336787cade92fb7ee5b2b2d407308a0cf66b",
|
||||
"release": "/var/www/investmoz-homologacao/releases/63cc336787cade92fb7ee5b2b2d407308a0cf66b-a32af166",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/2fdca86367d8bad524113b4cf6c49a0110130be9-c65ebbad",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"runtime_files_verified": 4,
|
||||
"persistent_files_and_env_verified": 369,
|
||||
"tables_compared": 174,
|
||||
"changed_tables": {
|
||||
"cache": {
|
||||
"before": {
|
||||
"rows": 106,
|
||||
"checksum": "0533965406197091e01442f39b006a04"
|
||||
},
|
||||
"after": {
|
||||
"rows": 106,
|
||||
"checksum": "690fff122d6fc745c2e2ab9bd28732aa"
|
||||
}
|
||||
},
|
||||
"sessions": {
|
||||
"before": {
|
||||
"rows": 93,
|
||||
"checksum": "d97f35b74199225940dea7078a712474"
|
||||
},
|
||||
"after": {
|
||||
"rows": 94,
|
||||
"checksum": "def210abad7e8e9b838f9490594fb787"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "63cc336787cade92fb7ee5b2b2d407308a0cf66b",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T22:09:58.694541+00:00",
|
||||
"manifest_sha256": "40f4377487ec290e47d1bee92146172fa4e2a316fa4a072dcc82300fea3cc6c1"
|
||||
},
|
||||
"manifest_hash_matches": true,
|
||||
"compiled_delta_markers": {
|
||||
"own-name-chains/1": [
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"goods_sale_commission": [
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"goods_purchase_commission": [
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"service_sale_mandate": [
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"service_purchase_mandate": [
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"ownNames": [
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"ownName": [
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"forAnother": [
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"commissionContract": [
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"successiveService": [
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"directionConfirmed": [
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"firstAmount": [
|
||||
"assets/services-BoK-jPgg.js",
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"secondAmount": [
|
||||
"assets/services-BoK-jPgg.js",
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"firstLegRef": [
|
||||
"assets/services-BoK-jPgg.js",
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"secondLegRef": [
|
||||
"assets/services-BoK-jPgg.js",
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"existingBaseRef": [
|
||||
"assets/services-BoK-jPgg.js",
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
],
|
||||
"IVA: Indeterminado": [
|
||||
"assets/project-dossier-Ct_yYLqe.js"
|
||||
]
|
||||
},
|
||||
"assets": [
|
||||
{
|
||||
"file": "assets/simulation-form-CPZAFZU3.js",
|
||||
"status": 200,
|
||||
"sha256": "c6bcf64e60a5eeac0cafe3dc055dc5544162f21942ee08b34d51bc6d52947567"
|
||||
},
|
||||
{
|
||||
"file": "assets/services-BoK-jPgg.js",
|
||||
"status": 200,
|
||||
"sha256": "df86ebec3aad6060cc563343ddc3010d330fcd8b89e21db9861c042dbadb3317"
|
||||
},
|
||||
{
|
||||
"file": "assets/project-dossier-document-DTNvmcJB.js",
|
||||
"status": 200,
|
||||
"sha256": "e961e77528e9c18681f133dd6e332202f48783bb0f9373117aac8aa83a0653b3"
|
||||
},
|
||||
{
|
||||
"file": "assets/project-dossier-Ct_yYLqe.js",
|
||||
"status": 200,
|
||||
"sha256": "db9b14435dccf65e83555e2517b939e0bc05a31782996abffe6d7b29b901ea47"
|
||||
}
|
||||
],
|
||||
"simulator_status": 200,
|
||||
"simulator_entry": "assets/app-dGCxtIbq.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": "63cc336787cade92fb7ee5b2b2d407308a0cf66b",
|
||||
"release": "/var/www/investmoz-homologacao/releases/63cc336787cade92fb7ee5b2b2d407308a0cf66b-a32af166",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/2fdca86367d8bad524113b4cf6c49a0110130be9-c65ebbad",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"latest_report": {
|
||||
"status": "installed",
|
||||
"commit": "63cc336787cade92fb7ee5b2b2d407308a0cf66b",
|
||||
"release": "/var/www/investmoz-homologacao/releases/63cc336787cade92fb7ee5b2b2d407308a0cf66b-a32af166",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/2fdca86367d8bad524113b4cf6c49a0110130be9-c65ebbad",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0,
|
||||
"requested_commits": [
|
||||
"63cc336787cade92fb7ee5b2b2d407308a0cf66b"
|
||||
],
|
||||
"finished_at": "2026-10-24T22:10:01.647328+00:00"
|
||||
},
|
||||
"log_file": "1792879692780810651.log",
|
||||
"summaries": [
|
||||
"OK (1 test, 3106 assertions)",
|
||||
"built in 27.93s",
|
||||
"OK (59 tests, 317 assertions)",
|
||||
"# tests 413",
|
||||
"# pass 413",
|
||||
"# fail 0"
|
||||
],
|
||||
"log_bytes": 146997
|
||||
},
|
||||
"rollback_executed": false
|
||||
},
|
||||
"base_VAT_separation": "AcceptedQA reused:P122goods sale/purchasecommission3(3)c andP128services sale/purchasemandate4(3). Agent ownname andforanother,parties/contract/object/period/two relations explicit. Originalconsiderations separated,never summed/netted/converted or usedasautomaticbase. P091anditsbooks/history preserved,not recalculated. No territoriality/exemption/base/rate/VAT/deductionfield11 or ModeloAtotals activated. Four installedruntimehashes/17compiledmarkers;107previousclosures preserved;no syntheticactivewrites.",
|
||||
"activation": "OnejointGit fast-forward/webhook/installer;zero migrations/imports"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/resources/js/lib/iva-own-name.ts
|
||||
+++ b/resources/js/lib/iva-own-name.ts
|
||||
@@ -45,6 +45,7 @@
|
||||
function key(draft:Record<string,unknown>,book:OwnNameBook):string{return JSON.stringify({version:ownNameVersion,scope:acquisitionScope(draft),location:draft.selection_labels??{},currency:draft.currency,rows:book.rows});}
|
||||
export function ownNameCurrent(draft:Record<string,unknown>,book:OwnNameBook):boolean{return!!book.result&&book.result.sourceKey===key(draft,book);}
|
||||
export function recordOwnNames(draft:Record<string,unknown>,book:OwnNameBook):OwnNameBook{
|
||||
+ throw new Error('Novas classificações P122/P128 temporariamente suspensas; dados, histórico, relatórios e restantes ramos preservados.');
|
||||
if(!book.rows.length||new Set(book.rows.map(row=>row.id)).size!==book.rows.length)throw new Error('Indique operações com identificadores distintos;originais conservados.');
|
||||
const result:OwnNameCalculation={version:ownNameVersion,revision:(book.result?.revision??0)+1,calculatedAt:new Date().toISOString(),opportunity:acquisitionScope(draft),location:JSON.stringify(draft.selection_labels??{}),sourceKey:key(draft,book),source:ownNameSource,inputs:structuredClone(book.rows),rows:book.rows.map(row=>evaluateOwnName(row,draft.currency))};
|
||||
const next={...book,result,history:[...(book.history??[]),...(book.result?[book.result]:[])]};saveOwnNameBook(draft,next);return next;
|
||||
@@ -0,0 +1,258 @@
|
||||
{
|
||||
"status": "installed_delta_verified_partial_L1",
|
||||
"base_remote_main": "490527b92cf1ca18122679440ff3a38933b7e0c2",
|
||||
"candidate": "c28e290b42a2a96c68b16dab59871581633a471e",
|
||||
"compatibility": "fresh fetch;origin/main ancestor of candidate;no concurrent change;local stale main not used",
|
||||
"coverage": {
|
||||
"G2C": {
|
||||
"P013": [
|
||||
"cultural_visits_public",
|
||||
"cultural_visits_nonprofit"
|
||||
],
|
||||
"P014": [
|
||||
"religious_personnel_public",
|
||||
"religious_personnel_nonprofit"
|
||||
],
|
||||
"P015": [
|
||||
"statutory_membership"
|
||||
]
|
||||
},
|
||||
"G2D": {
|
||||
"P024": [
|
||||
"author_rights"
|
||||
],
|
||||
"P025": [
|
||||
"cultural_publications"
|
||||
]
|
||||
},
|
||||
"new_branches": 5,
|
||||
"new_treatments": 7,
|
||||
"conditional_treatments_total": 32
|
||||
},
|
||||
"counts_before": {
|
||||
"delivered": 12,
|
||||
"QA": 5,
|
||||
"functional_pending": 115,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"counts_after_delivery": {
|
||||
"delivered": 17,
|
||||
"QA": 0,
|
||||
"functional_pending": 115,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"runtime_delta": [
|
||||
{
|
||||
"path": "resources/js/lib/iva-operations.ts",
|
||||
"sha256_LF": "577a029e24580d9c4dba0e4c19ce57da6273fe6f44185b3a32bd02fd7573578c"
|
||||
}
|
||||
],
|
||||
"activation": "Existing Git FF/webhook installer;catalogue available in existing L1 component;no migration/import/server fiscal rule activation/permissions changes",
|
||||
"preservation": "12delivered+G2C/G2Dproofs reused;four frozen books unchanged/current without recalculation;newrules scoped keys only",
|
||||
"rollback": "Existing compatible readonly containment patch apply-check passed;keep catalogue/readers/snapshots/reports;prior release and fresh verified backup required;no active rollback executed",
|
||||
"QA": "G2C2frontend+API1/14;G2D2frontend+API1/11;UI?API?report;types/build passed;acceptedWord/PDFunchanged",
|
||||
"P001_blocks_independent": false,
|
||||
"L1_complete": false,
|
||||
"statistics_AI": "deferred",
|
||||
"authenticated_preflight": "confirmed490527b9;installed/current/revisionagree;serviceinactive;pipelinehashunchanged",
|
||||
"backup_restore": {
|
||||
"verified": true,
|
||||
"tables": 174,
|
||||
"files": 369,
|
||||
"dump_sha256": "c11ba51e60cb3ac1cad5411c2aeefcb0adaeadd6fd2c16cd42fd6b63b1449fff",
|
||||
"backup": "/var/backups/investmoz-l1-g2cd-delivery-20261024/backup",
|
||||
"restore": "l1_g2cd_restore_20261024:55441;networknone;174checksumsagree;containerremoved;zeroactiveDBwrites"
|
||||
},
|
||||
"installed_delta": "verified",
|
||||
"served_commit": "3b788ec0098d84dcc154239651a35c685dfc2ebd",
|
||||
"installation": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g2cd-delivery-20261024/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "c11ba51e60cb3ac1cad5411c2aeefcb0adaeadd6fd2c16cd42fd6b63b1449fff",
|
||||
"files_sha256": "21fc80e45eaa289b67e2d2ce6bcc538b51330a3fa7cfb7e9cd64367201389b5e",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g2cd_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "c11ba51e60cb3ac1cad5411c2aeefcb0adaeadd6fd2c16cd42fd6b63b1449fff",
|
||||
"active_database_writes": 0
|
||||
},
|
||||
"installer": {
|
||||
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "3b788ec0098d84dcc154239651a35c685dfc2ebd",
|
||||
"release": "/var/www/investmoz-homologacao/releases/3b788ec0098d84dcc154239651a35c685dfc2ebd-56825c6e",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/490527b92cf1ca18122679440ff3a38933b7e0c2-d41ae12f",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"latest_report": {
|
||||
"status": "installed",
|
||||
"commit": "3b788ec0098d84dcc154239651a35c685dfc2ebd",
|
||||
"release": "/var/www/investmoz-homologacao/releases/3b788ec0098d84dcc154239651a35c685dfc2ebd-56825c6e",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/490527b92cf1ca18122679440ff3a38933b7e0c2-d41ae12f",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0,
|
||||
"requested_commits": [
|
||||
"3b788ec0098d84dcc154239651a35c685dfc2ebd"
|
||||
],
|
||||
"finished_at": "2026-10-24T12:48:10.504292+00:00"
|
||||
},
|
||||
"log_file": "1792846007466003663.log",
|
||||
"summaries": [
|
||||
"OK (1 test, 3106 assertions)",
|
||||
"built in 23.88s",
|
||||
"OK (59 tests, 317 assertions)",
|
||||
"# tests 251",
|
||||
"# pass 251",
|
||||
"# fail 0"
|
||||
],
|
||||
"log_bytes": 101223
|
||||
},
|
||||
"protected_preservation": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "3b788ec0098d84dcc154239651a35c685dfc2ebd",
|
||||
"release": "/var/www/investmoz-homologacao/releases/3b788ec0098d84dcc154239651a35c685dfc2ebd-56825c6e",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/490527b92cf1ca18122679440ff3a38933b7e0c2-d41ae12f",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"runtime_files_verified": 1,
|
||||
"persistent_files_and_env_verified": 369,
|
||||
"tables_compared": 174,
|
||||
"changed_tables": {
|
||||
"audit_events": {
|
||||
"before": {
|
||||
"rows": 645,
|
||||
"checksum": "88c2047620eb3fad4d2a2837ed3daef5"
|
||||
},
|
||||
"after": {
|
||||
"rows": 646,
|
||||
"checksum": "cf24e81547ee23d812ccaadaccc387b6"
|
||||
}
|
||||
},
|
||||
"cache": {
|
||||
"before": {
|
||||
"rows": 105,
|
||||
"checksum": "ef2967a3b3174300a6509d3013c1823d"
|
||||
},
|
||||
"after": {
|
||||
"rows": 105,
|
||||
"checksum": "6dfe16f04a406749beaf0a189897106b"
|
||||
}
|
||||
},
|
||||
"sessions": {
|
||||
"before": {
|
||||
"rows": 5,
|
||||
"checksum": "2a932f661c46631221bec768a4a23574"
|
||||
},
|
||||
"after": {
|
||||
"rows": 8,
|
||||
"checksum": "6d7f01315a1de04eadaddc0b90e0526c"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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
|
||||
},
|
||||
"audit_delta": {
|
||||
"historical_audit_unchanged": true,
|
||||
"historical_rows": 645,
|
||||
"new_events": 1,
|
||||
"new_event_metadata": {
|
||||
"source_system": "virtual-desk",
|
||||
"entity_type": "desk_cases",
|
||||
"action": "consulted",
|
||||
"created_at": "2026-10-24T12:47:35.31492+00:00"
|
||||
},
|
||||
"verification_writes": 0
|
||||
},
|
||||
"public_delta": {
|
||||
"status": "installed_delta_verified",
|
||||
"served_revision": {
|
||||
"commit": "3b788ec0098d84dcc154239651a35c685dfc2ebd",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T12:48:08.073225+00:00",
|
||||
"manifest_sha256": "b00f59904a5709fbcd8eaa6b51ac8dc421ddfc8dfd2e0ce18d133240150c8810"
|
||||
},
|
||||
"manifest_hash_matches": true,
|
||||
"compiled_delta_markers": {
|
||||
"cultural_visits_": [
|
||||
"assets/project-dossier-BDWSVUNs.js"
|
||||
],
|
||||
"religious_personnel_": [
|
||||
"assets/project-dossier-BDWSVUNs.js"
|
||||
],
|
||||
"statutory_membership": [
|
||||
"assets/project-dossier-BDWSVUNs.js"
|
||||
],
|
||||
"author_rights": [
|
||||
"assets/project-dossier-BDWSVUNs.js"
|
||||
],
|
||||
"cultural_publications": [
|
||||
"assets/project-dossier-BDWSVUNs.js"
|
||||
],
|
||||
"iva-operations-l1/2": [
|
||||
"assets/project-dossier-BDWSVUNs.js"
|
||||
]
|
||||
},
|
||||
"assets": [
|
||||
{
|
||||
"file": "assets/simulation-form-CPZAFZU3.js",
|
||||
"status": 200,
|
||||
"sha256": "c6bcf64e60a5eeac0cafe3dc055dc5544162f21942ee08b34d51bc6d52947567"
|
||||
},
|
||||
{
|
||||
"file": "assets/project-dossier-document-BVqhDRN3.js",
|
||||
"status": 200,
|
||||
"sha256": "56076c99222527ecc453bd245e21830618d07d26a874eede4f07cd597587922a"
|
||||
},
|
||||
{
|
||||
"file": "assets/project-dossier-BDWSVUNs.js",
|
||||
"status": 200,
|
||||
"sha256": "574235d0a55380d1a0a4044b46bed1c9f47aca0ec4f61b1356ac7216b8fcc85d"
|
||||
},
|
||||
{
|
||||
"file": "assets/services-CJfVMeO3.js",
|
||||
"status": 200,
|
||||
"sha256": "ae0b9fda96068b6179b16d0b7d121d4d840ba82d6763253821bb6b9ac03a3686"
|
||||
}
|
||||
],
|
||||
"simulator_status": 200,
|
||||
"simulator_entry": "assets/app-B0KlTmxs.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"
|
||||
},
|
||||
"Git": "freshfetch;branchpush;mainfastforward;noforce;existingwebhook",
|
||||
"rollback_executed": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
{
|
||||
"status": "installed_delta_verified_partial_L1",
|
||||
"candidate": "9b0f4370737f340b7fca606728f5ca281f6b5dfd",
|
||||
"base_remote_main": "3b788ec0098d84dcc154239651a35c685dfc2ebd",
|
||||
"fresh_fetch": "confirmed main3b788ec0;ancestor;no concurrent changes detected;localmainnotused",
|
||||
"coverage": {
|
||||
"G2E": {
|
||||
"P033": "industrial_feed",
|
||||
"P034": "industrial_feed_inputs",
|
||||
"P036": "veterinary_goods",
|
||||
"P044": "agricultural_services"
|
||||
},
|
||||
"G2F": {
|
||||
"P023": "special_tax_games",
|
||||
"P028": "stamped_values",
|
||||
"P037": "public_passenger_transport"
|
||||
},
|
||||
"new_branches": 7,
|
||||
"new_treatments": 7,
|
||||
"conditional_treatments_total": 39
|
||||
},
|
||||
"counts_before": {
|
||||
"delivered": 17,
|
||||
"QA": 7,
|
||||
"functional_pending": 108,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"counts_after_delivery": {
|
||||
"delivered": 24,
|
||||
"QA": 0,
|
||||
"functional_pending": 108,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"runtime_delta": [
|
||||
{
|
||||
"path": "resources/js/lib/iva-operations.ts",
|
||||
"sha256_LF": "dcb141a4d0a1edb0d2b2c8f63a20a076b8362c02d652baad673e652c133c64ce"
|
||||
}
|
||||
],
|
||||
"activation": "ExistingGitFF/webhook/installer;catalogueexistingcomponent;no migrations/imports/server fiscal rule activation/permissions changes",
|
||||
"preservation": "17delivered closed;G2E/G2FacceptedQAproofsreused;sixfrozenbookscurrentwithoutrecalculation",
|
||||
"rollback": "Keepcataloguereaderssnapshotsresultsreports;existingreadonlycontainmentpatchapplycheckrequired;backuprestorebeforepush;no rollback executed",
|
||||
"P001": "Stilldocumentary05/06;05/07doesnotresolveit;doesnotblockindependent",
|
||||
"QA": "G2E2frontend+API1/14;G2F2frontend+API1/13;UItoAPIreport;types/buildpassed;WordPDFunchanged",
|
||||
"authenticated_preflight": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "3b788ec0098d84dcc154239651a35c685dfc2ebd",
|
||||
"release": "/var/www/investmoz-homologacao/releases/3b788ec0098d84dcc154239651a35c685dfc2ebd-56825c6e",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/490527b92cf1ca18122679440ff3a38933b7e0c2-d41ae12f",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"current_link": "/var/www/investmoz-homologacao/releases/3b788ec0098d84dcc154239651a35c685dfc2ebd-56825c6e",
|
||||
"release_revision": {
|
||||
"commit": "3b788ec0098d84dcc154239651a35c685dfc2ebd",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T12:48:08.073225+00:00",
|
||||
"manifest_sha256": "b00f59904a5709fbcd8eaa6b51ac8dc421ddfc8dfd2e0ce18d133240150c8810"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"backup_restore": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g2ef-delivery-20261024/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "e23ea1909ede1cb3be7a5e5751f5580e8b8c0b2452c53772c8e28d06ec999b20",
|
||||
"files_sha256": "c56f7ac804b0d4f0c69a2f53a23b00cc34fa067888e62e13444192b3d41c52cf",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g2ef_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "e23ea1909ede1cb3be7a5e5751f5580e8b8c0b2452c53772c8e28d06ec999b20",
|
||||
"active_database_writes": 0
|
||||
}
|
||||
},
|
||||
"installed_delta": "verified",
|
||||
"L1_complete": false,
|
||||
"statistics_AI": "deferred",
|
||||
"rollback_compatibility": "gitapplycheckpassed;notapplied;keepcatalogueandreaders;previousreleaseandverifiedbackupavailable",
|
||||
"served_commit": "9a56d982423d0c244850f8638290a1ce8a968619",
|
||||
"installation": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g2ef-delivery-20261024/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "e23ea1909ede1cb3be7a5e5751f5580e8b8c0b2452c53772c8e28d06ec999b20",
|
||||
"files_sha256": "c56f7ac804b0d4f0c69a2f53a23b00cc34fa067888e62e13444192b3d41c52cf",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g2ef_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "e23ea1909ede1cb3be7a5e5751f5580e8b8c0b2452c53772c8e28d06ec999b20",
|
||||
"active_database_writes": 0
|
||||
},
|
||||
"installer": {
|
||||
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "9a56d982423d0c244850f8638290a1ce8a968619",
|
||||
"release": "/var/www/investmoz-homologacao/releases/9a56d982423d0c244850f8638290a1ce8a968619-19d0ea6c",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/3b788ec0098d84dcc154239651a35c685dfc2ebd-56825c6e",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"latest_report": {
|
||||
"status": "installed",
|
||||
"commit": "9a56d982423d0c244850f8638290a1ce8a968619",
|
||||
"release": "/var/www/investmoz-homologacao/releases/9a56d982423d0c244850f8638290a1ce8a968619-19d0ea6c",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/3b788ec0098d84dcc154239651a35c685dfc2ebd-56825c6e",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0,
|
||||
"requested_commits": [
|
||||
"9a56d982423d0c244850f8638290a1ce8a968619"
|
||||
],
|
||||
"finished_at": "2026-10-24T13:01:02.426859+00:00"
|
||||
},
|
||||
"log_file": "1792846776358374658.log",
|
||||
"summaries": [
|
||||
"OK (1 test, 3106 assertions)",
|
||||
"built in 25.68s",
|
||||
"OK (59 tests, 317 assertions)",
|
||||
"# tests 255",
|
||||
"# pass 255",
|
||||
"# fail 0"
|
||||
],
|
||||
"log_bytes": 102308
|
||||
},
|
||||
"protected_preservation": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "9a56d982423d0c244850f8638290a1ce8a968619",
|
||||
"release": "/var/www/investmoz-homologacao/releases/9a56d982423d0c244850f8638290a1ce8a968619-19d0ea6c",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/3b788ec0098d84dcc154239651a35c685dfc2ebd-56825c6e",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"runtime_files_verified": 1,
|
||||
"persistent_files_and_env_verified": 369,
|
||||
"tables_compared": 174,
|
||||
"changed_tables": {
|
||||
"cache": {
|
||||
"before": {
|
||||
"rows": 105,
|
||||
"checksum": "17b5d816f82ab932dca814a8e76c1211"
|
||||
},
|
||||
"after": {
|
||||
"rows": 105,
|
||||
"checksum": "316356979dc340fc5f141679bdee5c0d"
|
||||
}
|
||||
},
|
||||
"sessions": {
|
||||
"before": {
|
||||
"rows": 8,
|
||||
"checksum": "d1df0268b1343c91b756052e39ca7930"
|
||||
},
|
||||
"after": {
|
||||
"rows": 11,
|
||||
"checksum": "787de58f2b0436566c2ad27161a8a759"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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_delta": {
|
||||
"status": "installed_delta_verified",
|
||||
"served_revision": {
|
||||
"commit": "9a56d982423d0c244850f8638290a1ce8a968619",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T13:00:59.831259+00:00",
|
||||
"manifest_sha256": "b92bc7b64176675274dd934bb683f09c4a4ca3c4fe690dfce06425e89a7f3e04"
|
||||
},
|
||||
"manifest_hash_matches": true,
|
||||
"compiled_delta_markers": {
|
||||
"industrial_feed": [
|
||||
"assets/project-dossier-DSFHX342.js"
|
||||
],
|
||||
"industrial_feed_inputs": [
|
||||
"assets/project-dossier-DSFHX342.js"
|
||||
],
|
||||
"veterinary_goods": [
|
||||
"assets/project-dossier-DSFHX342.js"
|
||||
],
|
||||
"agricultural_services": [
|
||||
"assets/project-dossier-DSFHX342.js"
|
||||
],
|
||||
"special_tax_games": [
|
||||
"assets/project-dossier-DSFHX342.js"
|
||||
],
|
||||
"stamped_values": [
|
||||
"assets/project-dossier-DSFHX342.js"
|
||||
],
|
||||
"public_passenger_transport": [
|
||||
"assets/project-dossier-DSFHX342.js"
|
||||
],
|
||||
"iva-operations-l1/2": [
|
||||
"assets/project-dossier-DSFHX342.js"
|
||||
]
|
||||
},
|
||||
"assets": [
|
||||
{
|
||||
"file": "assets/project-dossier-DSFHX342.js",
|
||||
"status": 200,
|
||||
"sha256": "9083729b212d85c15164545718f7813f1a843627eb7dffbfa398bd8ce4a35afb"
|
||||
},
|
||||
{
|
||||
"file": "assets/services-CfCgVoiZ.js",
|
||||
"status": 200,
|
||||
"sha256": "4e3c1d5d90b642e4face01d05ab47f73cc9e3e7c4286fb7b638319d8d71dc96a"
|
||||
},
|
||||
{
|
||||
"file": "assets/project-dossier-document-7BExzGRH.js",
|
||||
"status": 200,
|
||||
"sha256": "3e925451351648c1dd2f7323c15e1881ba09dd3f0f27092a153958537476583f"
|
||||
},
|
||||
{
|
||||
"file": "assets/simulation-form-CPZAFZU3.js",
|
||||
"status": 200,
|
||||
"sha256": "c6bcf64e60a5eeac0cafe3dc055dc5544162f21942ee08b34d51bc6d52947567"
|
||||
}
|
||||
],
|
||||
"simulator_status": 200,
|
||||
"simulator_entry": "assets/app-CHL9O0-A.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"
|
||||
},
|
||||
"Git": "freshfetch;branchpush;mainfastforward;noforce;existingwebhook",
|
||||
"rollback_executed": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,371 @@
|
||||
{
|
||||
"status": "installed_delta_verified_partial_L1",
|
||||
"candidate": "b297058d11aee206530492a65f86e3d58eb5ba15",
|
||||
"base_remote_main": "9a56d982423d0c244850f8638290a1ce8a968619",
|
||||
"fresh_fetch": "main9a56d982;ancestor;no concurrent advance detected",
|
||||
"coverage": {
|
||||
"G2G": {
|
||||
"P010": [
|
||||
"public_security"
|
||||
],
|
||||
"P027": [
|
||||
"official_military_supplies"
|
||||
],
|
||||
"P031": [
|
||||
"sisa_subject_operation"
|
||||
],
|
||||
"P032": [
|
||||
"exempt_activity_asset_sale",
|
||||
"no_deduction_right_asset_sale",
|
||||
"excluded_deduction_asset_sale"
|
||||
]
|
||||
},
|
||||
"G2H": {
|
||||
"P026": [
|
||||
"listed_maize",
|
||||
"listed_maize_flour",
|
||||
"listed_rice",
|
||||
"listed_bread",
|
||||
"listed_iodised_salt",
|
||||
"listed_infant_powdered_milk",
|
||||
"listed_wheat",
|
||||
"listed_wheat_flour",
|
||||
"listed_fresh_chilled_tomato",
|
||||
"listed_potato",
|
||||
"listed_onion",
|
||||
"listed_frozen_horse_mackerel",
|
||||
"listed_lighting_kerosene",
|
||||
"listed_domestic_lpg",
|
||||
"listed_jet_fuel",
|
||||
"listed_eligible_bicycles",
|
||||
"listed_condoms",
|
||||
"listed_insecticides"
|
||||
]
|
||||
},
|
||||
"new_branches": 5,
|
||||
"new_treatments": 24,
|
||||
"conditional_treatments_total": 63
|
||||
},
|
||||
"counts_before": {
|
||||
"delivered": 24,
|
||||
"QA": 5,
|
||||
"functional_pending": 103,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"counts_after_delivery": {
|
||||
"delivered": 29,
|
||||
"QA": 0,
|
||||
"functional_pending": 103,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"runtime_delta": [
|
||||
{
|
||||
"path": "resources/js/lib/iva-operations.ts",
|
||||
"sha256_LF": "f18941067a82d18f43af4252c11b7ff26e001212e1e6cb5bff62c9b4ba48f855"
|
||||
}
|
||||
],
|
||||
"activation": "ExistingGitFF/webhook/installer;catalogueexistingcomponent;no migrations/imports/server rule activation/permissions/other tax calculations",
|
||||
"QA": "G2G2frontend+API1/16;G2H2frontend+API1/28;UItoAPIreport;types/buildpassed;acceptedWordPDFreused",
|
||||
"preservation": "24delivered andeightfrozencontextscurrentwithoutrecalculation;G2G/G2Hproofsreused;G2Ftraceabilityclarifiedwithoutretests",
|
||||
"rollback": "Keepcataloguereaderssnapshotsresultsreports;compatibleexistingreadonlypatch;priorreleaseandfreshbackuprestorebeforepush;no rollback executed",
|
||||
"P001": "Documentary05/06stillopen;05/07doesnotresolveit;noindependentblock",
|
||||
"authenticated_preflight": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "9a56d982423d0c244850f8638290a1ce8a968619",
|
||||
"release": "/var/www/investmoz-homologacao/releases/9a56d982423d0c244850f8638290a1ce8a968619-19d0ea6c",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/3b788ec0098d84dcc154239651a35c685dfc2ebd-56825c6e",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"current_link": "/var/www/investmoz-homologacao/releases/9a56d982423d0c244850f8638290a1ce8a968619-19d0ea6c",
|
||||
"release_revision": {
|
||||
"commit": "9a56d982423d0c244850f8638290a1ce8a968619",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T13:00:59.831259+00:00",
|
||||
"manifest_sha256": "b92bc7b64176675274dd934bb683f09c4a4ca3c4fe690dfce06425e89a7f3e04"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"backup_restore": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g2gh-delivery-20261024/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "ffe24d9e324cc1ad2354e8feec088e072db437eb54d1f5b6dfd3830865940b40",
|
||||
"files_sha256": "57bcb40faf4cb5e14b0aa13eb8b274f222e51bc3cd5fd17e07d70e87165e2b94",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g2gh_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "ffe24d9e324cc1ad2354e8feec088e072db437eb54d1f5b6dfd3830865940b40",
|
||||
"active_database_writes": 0
|
||||
}
|
||||
},
|
||||
"installed_delta": "verified",
|
||||
"L1_complete": false,
|
||||
"statistics_AI": "deferred",
|
||||
"rollback_compatibility": "gitapplycheckpassed;notapplied;keepcatalogueandreaders;previousreleaseandverifiedbackupavailable",
|
||||
"served_commit": "d4eae917ee9c9d37f0339905a96c1e35480f324e",
|
||||
"installation": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g2gh-delivery-20261024/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "ffe24d9e324cc1ad2354e8feec088e072db437eb54d1f5b6dfd3830865940b40",
|
||||
"files_sha256": "57bcb40faf4cb5e14b0aa13eb8b274f222e51bc3cd5fd17e07d70e87165e2b94",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g2gh_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "ffe24d9e324cc1ad2354e8feec088e072db437eb54d1f5b6dfd3830865940b40",
|
||||
"active_database_writes": 0
|
||||
},
|
||||
"installer": {
|
||||
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "d4eae917ee9c9d37f0339905a96c1e35480f324e",
|
||||
"release": "/var/www/investmoz-homologacao/releases/d4eae917ee9c9d37f0339905a96c1e35480f324e-afcda0da",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/9a56d982423d0c244850f8638290a1ce8a968619-19d0ea6c",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"latest_report": {
|
||||
"status": "installed",
|
||||
"commit": "d4eae917ee9c9d37f0339905a96c1e35480f324e",
|
||||
"release": "/var/www/investmoz-homologacao/releases/d4eae917ee9c9d37f0339905a96c1e35480f324e-afcda0da",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/9a56d982423d0c244850f8638290a1ce8a968619-19d0ea6c",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0,
|
||||
"requested_commits": [
|
||||
"d4eae917ee9c9d37f0339905a96c1e35480f324e"
|
||||
],
|
||||
"finished_at": "2026-10-24T13:15:14.273272+00:00"
|
||||
},
|
||||
"log_file": "1792847626452821855.log",
|
||||
"summaries": [
|
||||
"OK (1 test, 3106 assertions)",
|
||||
"built in 26.20s",
|
||||
"OK (59 tests, 317 assertions)",
|
||||
"# tests 259",
|
||||
"# pass 259",
|
||||
"# fail 0"
|
||||
],
|
||||
"log_bytes": 103542
|
||||
},
|
||||
"protected_preservation": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "d4eae917ee9c9d37f0339905a96c1e35480f324e",
|
||||
"release": "/var/www/investmoz-homologacao/releases/d4eae917ee9c9d37f0339905a96c1e35480f324e-afcda0da",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/9a56d982423d0c244850f8638290a1ce8a968619-19d0ea6c",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"runtime_files_verified": 1,
|
||||
"persistent_files_and_env_verified": 369,
|
||||
"tables_compared": 174,
|
||||
"changed_tables": {
|
||||
"cache": {
|
||||
"before": {
|
||||
"rows": 105,
|
||||
"checksum": "316356979dc340fc5f141679bdee5c0d"
|
||||
},
|
||||
"after": {
|
||||
"rows": 105,
|
||||
"checksum": "39b6357efbe3142e8d0e55b5fac6a935"
|
||||
}
|
||||
},
|
||||
"sessions": {
|
||||
"before": {
|
||||
"rows": 11,
|
||||
"checksum": "787de58f2b0436566c2ad27161a8a759"
|
||||
},
|
||||
"after": {
|
||||
"rows": 14,
|
||||
"checksum": "ba1aa4ceaf894c62a66a4186ae4e9ddc"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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_delta": {
|
||||
"status": "installed_delta_verified",
|
||||
"served_revision": {
|
||||
"commit": "d4eae917ee9c9d37f0339905a96c1e35480f324e",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T13:15:11.725340+00:00",
|
||||
"manifest_sha256": "4018026aac013855f2c9baf9258ed96e1b1bf808d996e8fa8eec9458ea6b35c7"
|
||||
},
|
||||
"manifest_hash_matches": true,
|
||||
"compiled_delta_markers": {
|
||||
"public_security": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"official_military_supplies": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"sisa_subject_operation": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"exempt_activity_asset_sale": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"no_deduction_right_asset_sale": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"excluded_deduction_asset_sale": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"maize": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"maize_flour": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"rice": [
|
||||
"assets/services-CVvFKfag.js",
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"bread": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"iodised_salt": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"infant_powdered_milk": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"wheat": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"wheat_flour": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"fresh_chilled_tomato": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"potato": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"onion": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"frozen_horse_mackerel": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"lighting_kerosene": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"domestic_lpg": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"jet_fuel": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"eligible_bicycles": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"condoms": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"insecticides": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"listed_": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
],
|
||||
"iva-operations-l1/2": [
|
||||
"assets/project-dossier-PaHmg6s9.js"
|
||||
]
|
||||
},
|
||||
"assets": [
|
||||
{
|
||||
"file": "assets/services-CVvFKfag.js",
|
||||
"status": 200,
|
||||
"sha256": "3ce2515eb4d53e8c2da3f10fdca2bfea208d801616813e6dcd18331b7d25c048"
|
||||
},
|
||||
{
|
||||
"file": "assets/simulation-form-CPZAFZU3.js",
|
||||
"status": 200,
|
||||
"sha256": "c6bcf64e60a5eeac0cafe3dc055dc5544162f21942ee08b34d51bc6d52947567"
|
||||
},
|
||||
{
|
||||
"file": "assets/project-dossier-PaHmg6s9.js",
|
||||
"status": 200,
|
||||
"sha256": "9fce800b1b9805b436a1d3801f8a596ad8c879604ac193d2af6cfb546d15c7e8"
|
||||
},
|
||||
{
|
||||
"file": "assets/project-dossier-document-CNebL8r6.js",
|
||||
"status": 200,
|
||||
"sha256": "242eebf5c9d9dac52eb0b53009013705058cfd62aeb0c576e4cdb6cad7619c5f"
|
||||
}
|
||||
],
|
||||
"simulator_status": 200,
|
||||
"simulator_entry": "assets/app-gy0vGuME.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"
|
||||
},
|
||||
"Git": "freshfetch;branchpush;mainfastforward;noforce;existingwebhook",
|
||||
"rollback_executed": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,319 @@
|
||||
{
|
||||
"status": "installed_delta_verified_partial_L1",
|
||||
"candidate": "72f4187d3bc0727ae0c5162500d5d6f26b7eed49",
|
||||
"base_remote_main": "d4eae917ee9c9d37f0339905a96c1e35480f324e",
|
||||
"fresh_fetch": "main d4eae917; ancestral; no concurrent advance detected; fetch again immediately before push",
|
||||
"coverage": {
|
||||
"G2I": {
|
||||
"P019": [
|
||||
"production_agriculture"
|
||||
],
|
||||
"P020": [
|
||||
"production_forestry",
|
||||
"production_forestry_opted"
|
||||
],
|
||||
"P021": [
|
||||
"production_livestock",
|
||||
"production_livestock_opted"
|
||||
],
|
||||
"P022": [
|
||||
"production_fishing",
|
||||
"production_fishing_opted"
|
||||
]
|
||||
},
|
||||
"G2J": {
|
||||
"P016": [
|
||||
"fundraising_public",
|
||||
"fundraising_nonprofit"
|
||||
]
|
||||
},
|
||||
"new_branches": 5,
|
||||
"new_treatments": 9,
|
||||
"conditional_treatments_total": 72,
|
||||
"calendar_resolution": "Civil279(c)/296 plus CIVA11(3), production-option/2; no additional branch"
|
||||
},
|
||||
"counts_before": {
|
||||
"delivered": 29,
|
||||
"QA": 5,
|
||||
"functional_pending": 98,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"counts_after_delivery": {
|
||||
"delivered": 34,
|
||||
"QA": 0,
|
||||
"functional_pending": 98,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"runtime_delta": [
|
||||
{
|
||||
"path": "resources/js/components/simulation-operations.tsx",
|
||||
"sha256_LF": "94e7419ee3338c9eda6418e741d72f08334dbb3f6507dd78d2bd6690d4be6b5b"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/lib/iva-fundraising.ts",
|
||||
"sha256_LF": "b58fc5733eb9f7facfe00a5f4cf0acdc98ad1e4191dbfdd1189fdf379e25e227"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/lib/iva-operations.ts",
|
||||
"sha256_LF": "844d9b634afcb6a72237ca87626e5e1bcba8df3744b35063c1657a590d17b957"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/lib/iva-production-option.ts",
|
||||
"sha256_LF": "2bdbb6ed52086c2c47d9f615b2cbe1c8f1370b8fdcefaa40c07b6cda8cc47526"
|
||||
}
|
||||
],
|
||||
"activation": "Existing Git FF/webhook/installer and existing enabled simulator panel; no migrations/imports/server-rule activation/permissions/other taxes",
|
||||
"QA": "G2I fe69a16e/a5ac8ca1 reused except changed calendar; calendar2frontend+API1/10;G2J2frontend+API1/10;UI/API/report;types/buildpassed;acceptedWordPDFreused",
|
||||
"preservation": "29 delivered branches and previous receipts/data retained; only changed G2I opted-rule results marked historical, never rewritten",
|
||||
"rollback": "Keep catalogue/readers/snapshots/results/reports; verified compatible l1-joint-readonly-rollback-20261024.patch suspends edits/calculations only; not applied. Prior release and verified fresh backup retained; no broad rollback or DB restoration executed.",
|
||||
"rollback_compatibility": "git apply --check passed; not applied",
|
||||
"authenticated_preflight": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "d4eae917ee9c9d37f0339905a96c1e35480f324e",
|
||||
"release": "/var/www/investmoz-homologacao/releases/d4eae917ee9c9d37f0339905a96c1e35480f324e-afcda0da",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/9a56d982423d0c244850f8638290a1ce8a968619-19d0ea6c",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"current_link": "/var/www/investmoz-homologacao/releases/d4eae917ee9c9d37f0339905a96c1e35480f324e-afcda0da",
|
||||
"release_revision": {
|
||||
"commit": "d4eae917ee9c9d37f0339905a96c1e35480f324e",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T13:15:11.725340+00:00",
|
||||
"manifest_sha256": "4018026aac013855f2c9baf9258ed96e1b1bf808d996e8fa8eec9458ea6b35c7"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"backup_restore": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g2ij-delivery-20261024/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "a75cb8751146ad0a59ecd62fa13e4d9ede3fd98ad2f4ebda092b48f7c2526c32",
|
||||
"files_sha256": "889fe89ec3acccfc17ace98dec9e6fb8675bfb75f69efb1ae9ce7585c50ef873",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g2ij_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "a75cb8751146ad0a59ecd62fa13e4d9ede3fd98ad2f4ebda092b48f7c2526c32",
|
||||
"active_database_writes": 0
|
||||
}
|
||||
},
|
||||
"P001": "Documentary05/06only;independentoperationsnotblocked",
|
||||
"L1_complete": false,
|
||||
"statistics_AI": "deferred",
|
||||
"served_commit": "e45a1394fa2ca8631593549b3af62093f25d9c13",
|
||||
"installed_delta": "verified",
|
||||
"installation": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g2ij-delivery-20261024/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "a75cb8751146ad0a59ecd62fa13e4d9ede3fd98ad2f4ebda092b48f7c2526c32",
|
||||
"files_sha256": "889fe89ec3acccfc17ace98dec9e6fb8675bfb75f69efb1ae9ce7585c50ef873",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g2ij_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "a75cb8751146ad0a59ecd62fa13e4d9ede3fd98ad2f4ebda092b48f7c2526c32",
|
||||
"active_database_writes": 0
|
||||
},
|
||||
"installer": {
|
||||
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "e45a1394fa2ca8631593549b3af62093f25d9c13",
|
||||
"release": "/var/www/investmoz-homologacao/releases/e45a1394fa2ca8631593549b3af62093f25d9c13-f5f7e07d",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/d4eae917ee9c9d37f0339905a96c1e35480f324e-afcda0da",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"latest_report": {
|
||||
"status": "installed",
|
||||
"commit": "e45a1394fa2ca8631593549b3af62093f25d9c13",
|
||||
"release": "/var/www/investmoz-homologacao/releases/e45a1394fa2ca8631593549b3af62093f25d9c13-f5f7e07d",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/d4eae917ee9c9d37f0339905a96c1e35480f324e-afcda0da",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0,
|
||||
"requested_commits": [
|
||||
"e45a1394fa2ca8631593549b3af62093f25d9c13"
|
||||
],
|
||||
"finished_at": "2026-10-24T13:51:04.874534+00:00"
|
||||
},
|
||||
"log_file": "1792849778512278349.log",
|
||||
"summaries": [
|
||||
"OK (1 test, 3106 assertions)",
|
||||
"built in 25.05s",
|
||||
"OK (59 tests, 317 assertions)",
|
||||
"# tests 265",
|
||||
"# pass 265",
|
||||
"# fail 0"
|
||||
],
|
||||
"log_bytes": 105228
|
||||
},
|
||||
"protected_preservation": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "e45a1394fa2ca8631593549b3af62093f25d9c13",
|
||||
"release": "/var/www/investmoz-homologacao/releases/e45a1394fa2ca8631593549b3af62093f25d9c13-f5f7e07d",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/d4eae917ee9c9d37f0339905a96c1e35480f324e-afcda0da",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"runtime_files_verified": 4,
|
||||
"persistent_files_and_env_verified": 369,
|
||||
"tables_compared": 174,
|
||||
"changed_tables": {
|
||||
"cache": {
|
||||
"before": {
|
||||
"rows": 105,
|
||||
"checksum": "39b6357efbe3142e8d0e55b5fac6a935"
|
||||
},
|
||||
"after": {
|
||||
"rows": 105,
|
||||
"checksum": "de9f82d4485c5358f6677efbc61c53a0"
|
||||
}
|
||||
},
|
||||
"sessions": {
|
||||
"before": {
|
||||
"rows": 14,
|
||||
"checksum": "ba1aa4ceaf894c62a66a4186ae4e9ddc"
|
||||
},
|
||||
"after": {
|
||||
"rows": 15,
|
||||
"checksum": "c6e69ce7f5936cefebf8b1d7b9295a15"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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_delta": {
|
||||
"status": "installed_delta_verified",
|
||||
"served_revision": {
|
||||
"commit": "e45a1394fa2ca8631593549b3af62093f25d9c13",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T13:51:02.487098+00:00",
|
||||
"manifest_sha256": "2f3fd204e659ac71f0e35b59365b7342d79f1460119ef34a4daa217e4b21c0af"
|
||||
},
|
||||
"manifest_hash_matches": true,
|
||||
"compiled_delta_markers": {
|
||||
"production_": [
|
||||
"assets/project-dossier-CP3iqTD7.js",
|
||||
"assets/services-D8gl05j7.js"
|
||||
],
|
||||
"agriculture": [
|
||||
"assets/project-dossier-CP3iqTD7.js"
|
||||
],
|
||||
"forestry": [
|
||||
"assets/project-dossier-CP3iqTD7.js"
|
||||
],
|
||||
"livestock": [
|
||||
"assets/project-dossier-CP3iqTD7.js"
|
||||
],
|
||||
"fishing": [
|
||||
"assets/project-dossier-CP3iqTD7.js"
|
||||
],
|
||||
"fundraising_public": [
|
||||
"assets/project-dossier-CP3iqTD7.js"
|
||||
],
|
||||
"fundraising_nonprofit": [
|
||||
"assets/project-dossier-CP3iqTD7.js",
|
||||
"assets/services-D8gl05j7.js"
|
||||
],
|
||||
"production-option/2": [
|
||||
"assets/project-dossier-CP3iqTD7.js"
|
||||
],
|
||||
"fundraising/1": [
|
||||
"assets/project-dossier-CP3iqTD7.js"
|
||||
]
|
||||
},
|
||||
"assets": [
|
||||
{
|
||||
"file": "assets/simulation-form-CPZAFZU3.js",
|
||||
"status": 200,
|
||||
"sha256": "c6bcf64e60a5eeac0cafe3dc055dc5544162f21942ee08b34d51bc6d52947567"
|
||||
},
|
||||
{
|
||||
"file": "assets/project-dossier-document-RxKyJJE-.js",
|
||||
"status": 200,
|
||||
"sha256": "f1580c32f9b5590f65ef1caeb99bcb8838a7593837001e8f541815318bbffc65"
|
||||
},
|
||||
{
|
||||
"file": "assets/project-dossier-CP3iqTD7.js",
|
||||
"status": 200,
|
||||
"sha256": "7317575f701ff3b68c5909f57bfa8b2d228fc30f3c0a8b852ebe2f98ad4431fc"
|
||||
},
|
||||
{
|
||||
"file": "assets/services-D8gl05j7.js",
|
||||
"status": 200,
|
||||
"sha256": "018c16520dc0410f830de3963aa55bcf459297cd0bbebfa4562312cd2793c218"
|
||||
}
|
||||
],
|
||||
"simulator_status": 200,
|
||||
"simulator_entry": "assets/app-B5iYnxXw.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"
|
||||
},
|
||||
"Git": "fresh fetch; feature push; main fast-forward; no force; existing webhook",
|
||||
"rollback_executed": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,391 @@
|
||||
{
|
||||
"status": "installed_delta_verified_partial_L1",
|
||||
"base_remote_main": "e45a1394fa2ca8631593549b3af62093f25d9c13",
|
||||
"fresh_fetch": "origin/main e45a1394,ancestor;fetch again immediately before main push",
|
||||
"coverage": {
|
||||
"G2K": {
|
||||
"P008": [
|
||||
"pharma_manufacturing_inputs"
|
||||
]
|
||||
},
|
||||
"G2L": {
|
||||
"P035": [
|
||||
"annexI_goods"
|
||||
]
|
||||
},
|
||||
"new_branches": 2,
|
||||
"new_treatments": 2,
|
||||
"documentary_rows": {
|
||||
"AnexoIII": 170,
|
||||
"AnexoI": 172
|
||||
},
|
||||
"existing_treatments_reused": "Explicit identity-preserving continuations to9(10);no new branch IDs"
|
||||
},
|
||||
"counts_current": {
|
||||
"delivered": 36,
|
||||
"QA": 0,
|
||||
"functional_pending": 96,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"counts_after_QA_and_delivery_only": {
|
||||
"delivered": 36,
|
||||
"QA": 0,
|
||||
"functional_pending": 96,
|
||||
"documentary": 1,
|
||||
"total": 133
|
||||
},
|
||||
"runtime_delta": [
|
||||
{
|
||||
"path": "resources/js/components/simulation-operations.tsx",
|
||||
"sha256_LF": "6e6d7b5d7f47541683dd4f32e93805b0d3068283a8ff1b3446884f5e4c626039"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/lib/iva-operations.ts",
|
||||
"sha256_LF": "02e411659c84c00182c6c46f3af499f04648a8cf84911ce11ed9a21f12d48d78"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/lib/iva-pharma-annex.ts",
|
||||
"sha256_LF": "dd56382b6edcced208efb03ebfc412f75e03b7180d084021ecbde1bac713ce3f"
|
||||
},
|
||||
{
|
||||
"path": "resources/js/lib/iva-annex-i.ts",
|
||||
"sha256_LF": "6dda21a66dd9399b911bc9839163a5e20f10808ac1937d3b2ca70dff3109424d"
|
||||
}
|
||||
],
|
||||
"QA": {
|
||||
"G2K": "8882dc54/1fe74256;accepted proofs reused",
|
||||
"G2L": "4frontend/types/build accepted; manual Tempo reading/viewing and reported save/recover/report passage; actual saved UI payload verified and private API1/29 passed;12previousbooks preserved without recalculation.",
|
||||
"review_controls": "Same-origin synthetic file save/recover/report clarified; manual passage reported by Tempo and saved file found; no Codex browser observation claimed."
|
||||
},
|
||||
"visual_gate": {
|
||||
"origin": "http://127.0.0.1:18639",
|
||||
"user_authorized": true,
|
||||
"user_requested_retry": true,
|
||||
"current_tool_result": "A saved user permission setting blocks this action; saved permission or managed policy denies access",
|
||||
"alternate_origin_or_browser_workaround_attempted": false
|
||||
},
|
||||
"before_delivery_required": [],
|
||||
"activation": "Existing Git fast-forward/webhook/installer and existing simulator panel;no migrations/imports/server fiscal activation/permissions/other taxes",
|
||||
"rollback": "Existing l1-joint-readonly-rollback-20261024.patch passed git apply --check;not applied;keeps catalogue/readers/history/API/reports. Retain prior release and verified fresh backup before deployment;no DBrestore executed.",
|
||||
"backup_restore_new_delivery": "Verified fresh backup and real isolated restore;no active restore executed.",
|
||||
"homologation_unchanged": false,
|
||||
"P001": "05/06only;notextended",
|
||||
"L1_complete": false,
|
||||
"statistics_AI": "deferred",
|
||||
"G2L_candidate": "744682835a91f08aece9258380466ae746bc7353",
|
||||
"G2K_candidate": "8882dc54d0973bc058b04009bdbc36c9da2cc31b",
|
||||
"G2L_record": "iva_l1_g2_annex_i_code_qa_visual_pending_20261024",
|
||||
"visual_verification_routes": {
|
||||
"authority": "Express Tempo instruction,24/10/2026",
|
||||
"manual_Tempo": {
|
||||
"accepted": true,
|
||||
"status": "manual_passage_reported_and_saved_payload_technically_verified",
|
||||
"observations": {
|
||||
"source": "Tempo, conversation24/10/2026",
|
||||
"earlier_statement": "No failure seen in what was read and observed; save/recovery buttons not identified.",
|
||||
"latest_statement": "ja procedi com a tua instrução pode verificar",
|
||||
"scope": "User reports following the save/recover/report instructions after controls were clarified.",
|
||||
"Codex_visual_observation": false,
|
||||
"additional_individual_observations_invented": false
|
||||
}
|
||||
},
|
||||
"Codex_browser": {
|
||||
"accepted_after_tool_permission_review": true,
|
||||
"saved_permission_not_changed_by_conversation_authorization": true
|
||||
},
|
||||
"scope": [
|
||||
"Search/select an AnnexI position",
|
||||
"Conditions and missing information",
|
||||
"Save/recover and match selected position in report;continuitywhereapplicable"
|
||||
],
|
||||
"automatic_tests": "Already accepted;do not repeat",
|
||||
"tool_block_is_portal_failure_evidence": false,
|
||||
"circumvention": false
|
||||
},
|
||||
"G2L_completion_record": "iva_l1_g2l_manual_completion_and_actual_UI_payload_20261024",
|
||||
"candidate": "da798dd1d8a017cfb20764b566661807b2ef0ffc",
|
||||
"authenticated_preflight": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "e45a1394fa2ca8631593549b3af62093f25d9c13",
|
||||
"release": "/var/www/investmoz-homologacao/releases/e45a1394fa2ca8631593549b3af62093f25d9c13-f5f7e07d",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/d4eae917ee9c9d37f0339905a96c1e35480f324e-afcda0da",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"current_link": "/var/www/investmoz-homologacao/releases/e45a1394fa2ca8631593549b3af62093f25d9c13-f5f7e07d",
|
||||
"release_revision": {
|
||||
"commit": "e45a1394fa2ca8631593549b3af62093f25d9c13",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T13:51:02.487098+00:00",
|
||||
"manifest_sha256": "2f3fd204e659ac71f0e35b59365b7342d79f1460119ef34a4daa217e4b21c0af"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"backup_restore": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g2kl-delivery-20261024/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "8c6d8f2745ebb3dc6883d67fb8d9810593d47ad44fb0e20859e3547044adee6c",
|
||||
"files_sha256": "66d42c9053508681e8f7adfe20631396272f2fb934a69a6c79347a029fa11f78",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g2kl_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "8c6d8f2745ebb3dc6883d67fb8d9810593d47ad44fb0e20859e3547044adee6c",
|
||||
"active_database_writes": 0
|
||||
}
|
||||
},
|
||||
"rollback_compatibility": "git apply --check passed on current candidate;patch not applied;catalogue/readers/history retained",
|
||||
"served_commit": "ccdecbd8d74596e729f03381d3b37ca22ce5800e",
|
||||
"installed_delta": "verified",
|
||||
"installation": {
|
||||
"backup": {
|
||||
"stage": "/var/backups/investmoz-l1-g2kl-delivery-20261024/backup",
|
||||
"target": {
|
||||
"database": "teste_investidor",
|
||||
"port": 5432
|
||||
},
|
||||
"tables": 174,
|
||||
"files_verified": 369,
|
||||
"dump_sha256": "8c6d8f2745ebb3dc6883d67fb8d9810593d47ad44fb0e20859e3547044adee6c",
|
||||
"files_sha256": "66d42c9053508681e8f7adfe20631396272f2fb934a69a6c79347a029fa11f78",
|
||||
"restore_verified": false
|
||||
},
|
||||
"restore": {
|
||||
"restore_verified": true,
|
||||
"tables_verified": 174,
|
||||
"container_network": "none",
|
||||
"database": "l1_g2kl_restore_20261024",
|
||||
"port": 55441,
|
||||
"source_dump_sha256": "8c6d8f2745ebb3dc6883d67fb8d9810593d47ad44fb0e20859e3547044adee6c",
|
||||
"active_database_writes": 0
|
||||
},
|
||||
"installer": {
|
||||
"service": "ExecMainStatus=0\nActiveState=inactive\nSubState=dead\n",
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "ccdecbd8d74596e729f03381d3b37ca22ce5800e",
|
||||
"release": "/var/www/investmoz-homologacao/releases/ccdecbd8d74596e729f03381d3b37ca22ce5800e-0967d766",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/e45a1394fa2ca8631593549b3af62093f25d9c13-f5f7e07d",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"latest_report": {
|
||||
"status": "installed",
|
||||
"commit": "ccdecbd8d74596e729f03381d3b37ca22ce5800e",
|
||||
"release": "/var/www/investmoz-homologacao/releases/ccdecbd8d74596e729f03381d3b37ca22ce5800e-0967d766",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/e45a1394fa2ca8631593549b3af62093f25d9c13-f5f7e07d",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0,
|
||||
"requested_commits": [
|
||||
"ccdecbd8d74596e729f03381d3b37ca22ce5800e"
|
||||
],
|
||||
"finished_at": "2026-10-24T14:40:58.261566+00:00"
|
||||
},
|
||||
"log_file": "1792852768694030688.log",
|
||||
"summaries": [
|
||||
"OK (1 test, 3106 assertions)",
|
||||
"built in 25.35s",
|
||||
"OK (59 tests, 317 assertions)",
|
||||
"# tests 272",
|
||||
"# pass 272",
|
||||
"# fail 0"
|
||||
],
|
||||
"log_bytes": 107426
|
||||
},
|
||||
"protected_preservation": {
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "ccdecbd8d74596e729f03381d3b37ca22ce5800e",
|
||||
"release": "/var/www/investmoz-homologacao/releases/ccdecbd8d74596e729f03381d3b37ca22ce5800e-0967d766",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/e45a1394fa2ca8631593549b3af62093f25d9c13-f5f7e07d",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0
|
||||
},
|
||||
"runtime_files_verified": 4,
|
||||
"persistent_files_and_env_verified": 369,
|
||||
"tables_compared": 174,
|
||||
"changed_tables": {
|
||||
"cache": {
|
||||
"before": {
|
||||
"rows": 105,
|
||||
"checksum": "9d045636f1332b32bb65a20a35a0ffe1"
|
||||
},
|
||||
"after": {
|
||||
"rows": 105,
|
||||
"checksum": "f8fbf67b713b7dfdce6a3bacb6c46823"
|
||||
}
|
||||
},
|
||||
"sessions": {
|
||||
"before": {
|
||||
"rows": 14,
|
||||
"checksum": "fa2aec2278d6646c26970993447e306a"
|
||||
},
|
||||
"after": {
|
||||
"rows": 15,
|
||||
"checksum": "9c9c8b103d1429a690d8e140f1c19ad7"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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_delta": {
|
||||
"status": "installed_delta_verified",
|
||||
"served_revision": {
|
||||
"commit": "ccdecbd8d74596e729f03381d3b37ca22ce5800e",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-24T14:40:55.681401+00:00",
|
||||
"manifest_sha256": "8ee52a7b3f7c4363f10d73382d85325bbfa331c2e6e44ccd08d92e578cdf2776"
|
||||
},
|
||||
"manifest_hash_matches": true,
|
||||
"compiled_delta_markers": {
|
||||
"annexI_goods": [
|
||||
"assets/project-dossier-DmOH9u9e.js",
|
||||
"assets/services-zksozm3m.js"
|
||||
],
|
||||
"pharma_manufacturing_inputs": [
|
||||
"assets/project-dossier-DmOH9u9e.js",
|
||||
"assets/services-zksozm3m.js"
|
||||
],
|
||||
"annexI-lei22-2022/1": [
|
||||
"assets/project-dossier-DmOH9u9e.js"
|
||||
],
|
||||
"annexIII-lei22-2022/1": [
|
||||
"assets/project-dossier-DmOH9u9e.js"
|
||||
],
|
||||
"annexIItem": [
|
||||
"assets/project-dossier-DmOH9u9e.js",
|
||||
"assets/services-zksozm3m.js"
|
||||
],
|
||||
"pharmaAnnexItem": [
|
||||
"assets/project-dossier-DmOH9u9e.js",
|
||||
"assets/services-zksozm3m.js"
|
||||
],
|
||||
"2912.19.00": [
|
||||
"assets/project-dossier-DmOH9u9e.js",
|
||||
"assets/services-zksozm3m.js"
|
||||
],
|
||||
"8201.50.00": [
|
||||
"assets/project-dossier-DmOH9u9e.js"
|
||||
],
|
||||
"8701.95.00": [
|
||||
"assets/project-dossier-DmOH9u9e.js"
|
||||
]
|
||||
},
|
||||
"assets": [
|
||||
{
|
||||
"file": "assets/project-dossier-DmOH9u9e.js",
|
||||
"status": 200,
|
||||
"sha256": "4cd3c0dbc4466661ce7e73dd4120fb956b9386c6e141b038e5a526cbf7424196"
|
||||
},
|
||||
{
|
||||
"file": "assets/simulation-form-CPZAFZU3.js",
|
||||
"status": 200,
|
||||
"sha256": "c6bcf64e60a5eeac0cafe3dc055dc5544162f21942ee08b34d51bc6d52947567"
|
||||
},
|
||||
{
|
||||
"file": "assets/services-zksozm3m.js",
|
||||
"status": 200,
|
||||
"sha256": "5b771620208247a10da9d22e78be4fc772f8c1e02afcf38a7e6a47a5cdfefd5d"
|
||||
},
|
||||
{
|
||||
"file": "assets/project-dossier-document-BGVr7IFw.js",
|
||||
"status": 200,
|
||||
"sha256": "fa7e832b28fbb762872dd5df448ef20c6f2ce5bafd5226b20c31376b566a25da"
|
||||
}
|
||||
],
|
||||
"simulator_status": 200,
|
||||
"simulator_entry": "assets/app-CQEv1lby.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"
|
||||
},
|
||||
"Git": "fresh fetch;feature push;main fast-forward;no force;existing webhook",
|
||||
"rollback_executed": false
|
||||
},
|
||||
"G2L_visual_evidence": {
|
||||
"method": "Verificação manual pela Tempo, autorizada expressamente na conversa;não foi observação de navegador peloCodex.",
|
||||
"tool_block": "Permissão guardada/política gerida impediu o Codex de controlar a origemQA18639. Não foi alterada nem contornada.",
|
||||
"manual_evidence": [
|
||||
{
|
||||
"statement": "conferi o SYNTHETIC QA — G2L / Anexo I",
|
||||
"scope": "Abertura e leitura da páginaQA pelaTempo"
|
||||
},
|
||||
{
|
||||
"statement": "pelo que li e observei não vi nenhuam falha mas tambem não vi nenhum botao gravação/recuperaça",
|
||||
"scope": "Observação parcial semfalha noquefoivisto;gravação/recuperação ainda não conferidas"
|
||||
},
|
||||
{
|
||||
"statement": "ja procedi com a tua instrução pode verificar",
|
||||
"scope": "Confirmação pelaTempo da execução da instrução já apresentada:guardar exemploQA,recuperar gravaçãoQA eabrir relatório da gravação recuperada,após clarificação doscontrolos"
|
||||
}
|
||||
],
|
||||
"limits": "Não se atribuem àTempo resultados individuais adicionais não descritos,nem se apresenta captura ou observação visual peloCodex. O ficheiro comprova gravação;isoladamente não comprova cliques de recuperação/abertura. Estes passos são sustentados pela comunicação daTempo.",
|
||||
"technical_corroboration": {
|
||||
"record": "iva_l1_g2l_manual_completion_and_actual_UI_payload_20261024",
|
||||
"saved_at": "2026-10-24T14:32:44.805Z",
|
||||
"saved_file_sha256": "bfa1b242671b57925d560d1b76a6065a52238f4cbd9f255b17e594384f5e0ef7",
|
||||
"API_QA": "Ficheiro real→POST/GETprivado,1teste/29asserções;contexto/snapshot exactos;transacção revertida",
|
||||
"report": "Mesmas funções daQA aplicadas ao snapshot real;contexto,fontes,identidades,versão evalores correspondentes"
|
||||
},
|
||||
"existing_references": [
|
||||
"iva_l1_g2l_manual_verification_route_20261024",
|
||||
"iva_l1_g2l_manual_partial_controls_20261024",
|
||||
"iva_l1_g2l_manual_completion_and_actual_UI_payload_20261024",
|
||||
"iva_l1_g2kl_homologation_20261024"
|
||||
],
|
||||
"installed_revision_check_is_visual_proof": false,
|
||||
"accepted_proofs_repeated": false,
|
||||
"delivery_closure_preserved": "ccdecbd8/643ba6ed"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user