+ {!target ? (
+
+ ) : target.priorAssetInvestment !== undefined ? (
+
+ ) : null}
+ {target && (
+ <>
+
+ A caixa requerida é a reserva pretendida depois das
+ despesas e aquisições iniciais. A caixa disponível é o
+ saldo declarado antes de novo financiamento. Fontes
+ planeadas não são recebimentos realizados. Os activos
+ disponíveis são os que já existem, na mesma base de
+ valorização declarada.
+
+
+ {field(
+ 'Caixa requerida após o arranque',
+ target.cashRequired,
+ (value) =>
+ onChange({
+ ...plan,
+ startupAssetRequirements: {
+ ...target,
+ cashRequired: value,
+ },
+ }),
+ )}
+ {field(
+ 'Caixa disponível antes de novo financiamento',
+ plan.openingCash,
+ (value) =>
+ onChange({ ...plan, openingCash: value }),
+ )}
+ {field(
+ 'Outros activos correntes requeridos',
+ target.otherCurrentAssetsRequired,
+ (value) =>
+ onChange({
+ ...plan,
+ startupAssetRequirements: {
+ ...target,
+ otherCurrentAssetsRequired: value,
+ },
+ }),
+ )}
+ {field(
+ 'Outros activos correntes disponíveis',
+ a.openingOtherAssets,
+ (value) =>
+ onChange({
+ ...plan,
+ reportAssumptions: {
+ ...a,
+ openingOtherAssets: value,
+ },
+ }),
+ )}
+ {field(
+ 'Activos de longo prazo requeridos',
+ target.longTermAssetsRequired,
+ (value) =>
+ onChange({
+ ...plan,
+ startupAssetRequirements: {
+ ...target,
+ longTermAssetsRequired: value,
+ },
+ }),
+ )}
+ {field(
+ 'Activos de longo prazo disponíveis',
+ a.openingFixedAssets,
+ (value) =>
+ onChange({
+ ...plan,
+ reportAssumptions: {
+ ...a,
+ openingFixedAssets: value,
+ },
+ }),
+ )}
+
+
+ Existências e recebíveis iniciais já planeados conservam
+ os campos próprios e integram os activos correntes, sem
+ serem contados duas vezes. As necessidades são mínimos;
+ não se presumem vendas de activos excedentários. A
+ depreciação mantém a base e a vida útil declaradas.
+
+ {error && {error}
}
+ {budget && (
+ <>
+
+ Total de activos requeridos:{' '}
+ {startupAmount(budget.totalRequiredAssets)}{' '}
+ {plan.currency}. Requisitos brutos, incluindo
+ despesas de arranque:{' '}
+ {startupAmount(budget.grossRequirements)}{' '}
+ {plan.currency}. Aquisições adicionais
+ calculadas:{' '}
+ {startupAmount(budget.assetInvestment)}{' '}
+ {plan.currency}.
+
+
+
+ A adopção altera apenas o investimento em
+ activos, com repartição entre correntes e longo
+ prazo. Não cria financiamento nem substitui a
+ caixa disponível.
+
+ >
+ )}
+ >
+ )}
+
+ );
+}
diff --git a/resources/js/lib/annual-example-original-detail.ts b/resources/js/lib/annual-example-original-detail.ts
new file mode 100644
index 00000000..402eedc4
--- /dev/null
+++ b/resources/js/lib/annual-example-original-detail.ts
@@ -0,0 +1,351 @@
+// Amounts transcribed from the immutable original PN tables T003, T005, T012 and T013. Never used as balancing entries.
+export const annualExampleOriginalDetail = {
+ sourceSha256:
+ '4f1e1dbc90c8a4888291201898f306c06e2e687843a754a04a9a8a56f459ab99',
+ sales: [
+ {
+ label: 'Publicidade',
+ annual: ['2137', '3000', '3500'],
+ monthly2025: [
+ '100',
+ '110',
+ '121',
+ '133',
+ '140',
+ '161',
+ '177',
+ '195',
+ '215',
+ '237',
+ '261',
+ '287',
+ ],
+ },
+ {
+ label: 'Intermediação Comercial',
+ annual: ['5336', '6000', '6500'],
+ monthly2025: [
+ '250',
+ '275',
+ '302',
+ '332',
+ '365',
+ '402',
+ '442',
+ '486',
+ '535',
+ '588',
+ '647',
+ '712',
+ ],
+ },
+ {
+ label: 'Comercialização de Commodities',
+ annual: ['3211', '4000', '4250'],
+ monthly2025: [
+ '150',
+ '165',
+ '182',
+ '200',
+ '220',
+ '242',
+ '266',
+ '293',
+ '322',
+ '354',
+ '389',
+ '428',
+ ],
+ },
+ {
+ label: 'Formação',
+ annual: ['201', '250', '275'],
+ monthly2025: [
+ '10',
+ '11',
+ '12',
+ '13',
+ '14',
+ '15',
+ '16',
+ '18',
+ '20',
+ '22',
+ '24',
+ '26',
+ ],
+ },
+ ],
+ costs: [
+ {
+ label: 'Publicidade',
+ annual: ['1595', '2500', '3000'],
+ monthly2025: [
+ '75',
+ '82',
+ '90',
+ '99',
+ '109',
+ '120',
+ '132',
+ '145',
+ '160',
+ '176',
+ '194',
+ '213',
+ ],
+ },
+ {
+ label: 'Intermediação Comercial',
+ annual: ['4273', '5500', '6000'],
+ monthly2025: [
+ '200',
+ '220',
+ '242',
+ '266',
+ '293',
+ '322',
+ '354',
+ '389',
+ '428',
+ '471',
+ '518',
+ '570',
+ ],
+ },
+ {
+ label: 'Comercialização de Commodities',
+ annual: ['3211', '3750', '4000'],
+ monthly2025: [
+ '150',
+ '165',
+ '182',
+ '200',
+ '220',
+ '242',
+ '266',
+ '293',
+ '322',
+ '354',
+ '389',
+ '428',
+ ],
+ },
+ {
+ label: 'Formação',
+ annual: ['139', '450', '475'],
+ monthly2025: [
+ '6',
+ '7',
+ '8',
+ '9',
+ '10',
+ '11',
+ '12',
+ '13',
+ '14',
+ '15',
+ '16',
+ '18',
+ ],
+ },
+ {
+ label: 'Marketing',
+ annual: ['1077', '1100', '1200'],
+ monthly2025: [
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ ],
+ },
+ ],
+ departments: [
+ {
+ label: 'DIrecção Comercial',
+ annual: ['300', '400', '400'],
+ monthly2025: [
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ ],
+ annual2025Origin: 'annual-and-monthly',
+ },
+ {
+ label: 'Direcção de Admin e Finanças',
+ annual: ['300', '400', '400'],
+ monthly2025: [
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ ],
+ annual2025Origin: 'annual-and-monthly',
+ },
+ {
+ label: 'Serviços',
+ annual: ['300', '400', '400'],
+ monthly2025: [
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ ],
+ annual2025Origin: 'annual-and-monthly',
+ },
+ {
+ label: 'Marketing',
+ annual: ['300', null, null],
+ monthly2025: [
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ ],
+ annual2025Origin: 'sum-of-documented-months',
+ },
+ {
+ label: 'Revista Tempo',
+ annual: ['300', null, null],
+ monthly2025: [
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ ],
+ annual2025Origin: 'sum-of-documented-months',
+ },
+ {
+ label: 'Gsetão de Projectos',
+ annual: ['300', null, null],
+ monthly2025: [
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ ],
+ annual2025Origin: 'sum-of-documented-months',
+ },
+ {
+ label: 'Gabinete Juridico',
+ annual: ['300', null, null],
+ monthly2025: [
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ '25',
+ ],
+ annual2025Origin: 'sum-of-documented-months',
+ },
+ ],
+ salesTotals: [
+ '680',
+ '748',
+ '824',
+ '905',
+ '990',
+ '1095',
+ '1203',
+ '1324',
+ '1458',
+ '1604',
+ '1765',
+ '1941',
+ ],
+ costTotals: [
+ '586',
+ '644',
+ '710',
+ '781',
+ '860',
+ '945',
+ '1038',
+ '1142',
+ '1257',
+ '1383',
+ '1520',
+ '1672',
+ ],
+ people: {
+ annual: ['1', '1', '1'],
+ monthly2025: [
+ '1',
+ '1',
+ '1',
+ '1',
+ '1',
+ '1',
+ '1',
+ '1',
+ '1',
+ '1',
+ '1',
+ '1',
+ ],
+ },
+} as const;
diff --git a/resources/js/lib/annual-example-reconciliation.ts b/resources/js/lib/annual-example-reconciliation.ts
new file mode 100644
index 00000000..6d93c042
--- /dev/null
+++ b/resources/js/lib/annual-example-reconciliation.ts
@@ -0,0 +1,64 @@
+import { annualExampleOriginalDetail as source } from './annual-example-original-detail.ts';
+import type { AnnualReferencePlan } from './business-plan-guidance.ts';
+import { reportMoney } from './integral-financial-report.ts';
+
+const cents = (s: string) => {
+ const [a, b = ''] = s.split('.');
+ return BigInt(a) * 100n + BigInt(b.padEnd(2, '0'));
+};
+export function reconcileOriginalExample(plan: AnnualReferencePlan) {
+ const sum = (
+ rows: readonly { annual: readonly (string | null)[] }[],
+ year: number,
+ ) =>
+ rows.reduce(
+ (n, r) =>
+ n + (r.annual[year] === null ? 0n : cents(r.annual[year]!)),
+ 0n,
+ );
+ return {
+ years: plan.years.map((y, i) => ({
+ year: y.year,
+ sales: reportMoney(cents(y.sales)),
+ knownSales: reportMoney(sum(source.sales, i)),
+ salesDifference: reportMoney(cents(y.sales) - sum(source.sales, i)),
+ costs: reportMoney(cents(y.directCosts)),
+ knownCosts: reportMoney(sum(source.costs, i)),
+ costDifference: reportMoney(
+ cents(y.directCosts) - sum(source.costs, i),
+ ),
+ payroll: reportMoney(cents(y.payroll)),
+ knownPayroll: reportMoney(sum(source.departments, i)),
+ payrollDifference: reportMoney(
+ cents(y.payroll) - sum(source.departments, i),
+ ),
+ missingDepartments: source.departments
+ .filter((r) => r.annual[i] === null)
+ .map((r) => r.label),
+ })),
+ months: source.salesTotals.map((total, i) => {
+ const sales = source.sales.reduce(
+ (n, r) => n + cents(r.monthly2025[i]!),
+ 0n,
+ );
+ const costs = source.costs.reduce(
+ (n, r) =>
+ n +
+ (r.monthly2025[i] === null ? 0n : cents(r.monthly2025[i]!)),
+ 0n,
+ );
+ return {
+ period: `2025-${String(i + 1).padStart(2, '0')}`,
+ sourceSales: reportMoney(cents(total!)),
+ knownSales: reportMoney(sales),
+ salesDifference: reportMoney(cents(total!) - sales),
+ sourceCosts: reportMoney(cents(source.costTotals[i]!)),
+ knownCosts: reportMoney(costs),
+ costDifference: reportMoney(
+ cents(source.costTotals[i]!) - costs,
+ ),
+ };
+ }),
+ needed: 'Vendas por serviço que somem 14.537/21.500/23.875 e custos por serviço que somem 12.538/16.200/18.325; distribuição mensal coerente dessas linhas; remuneração de Marketing, Revista Tempo, Gestão de Projectos e Gabinete Jurídico em 2026 e 2027 (total conjunto ainda por repartir: 1.600 em cada ano). As diferenças são diagnóstico documental, não rubricas financeiras.',
+ };
+}
diff --git a/resources/js/lib/annual-example-report.ts b/resources/js/lib/annual-example-report.ts
index 74f9f1ec..7e01d2de 100644
--- a/resources/js/lib/annual-example-report.ts
+++ b/resources/js/lib/annual-example-report.ts
@@ -10,6 +10,8 @@ import {
type InvestmentReportTable,
} from './integral-financial-report.ts';
import { buildComplementaryTables } from './complementary-report.ts';
+import { annualExampleOriginalDetail as original } from './annual-example-original-detail.ts';
+import { reconcileOriginalExample } from './annual-example-reconciliation.ts';
/** Presentation adapter only: uses the approved annual calculation, never converts it into investor movements. */
export function buildAnnualExampleTables(
@@ -80,7 +82,15 @@ export function buildAnnualExampleTables(
['Capital do investidor', plan.investorCapital],
['Empréstimos', plan.loans],
['Dinheiro adicional angariado', plan.additionalMoney],
- ['Total de fontes confirmadas', result.availableFunding],
+ [
+ 'Financiamento disponível declarado no exemplo',
+ result.availableFunding,
+ ],
+ ['Caixa requerida (objectivo do cenário)', plan.openingCash],
+ [
+ 'Caixa efectivamente disponível antes do financiamento',
+ 'Não documentado no exemplo original',
+ ],
['Financiamento necessário', result.requiredFunding],
[
'Capital por mobilizar — hipótese, não financiamento confirmado',
@@ -283,6 +293,127 @@ export function buildAnnualExampleTables(
: undefined,
}).map((w) => `Aviso não bloqueante — ${y.year}: ${w.message}`),
);
+ type Month = (typeof result.years)[number]['illustrativeMonths'][number];
+ const months = result.years.flatMap((y) => y.illustrativeMonths);
+ const detailedHeaders = [
+ 'Rubrica',
+ ...result.years.flatMap((y) =>
+ y.illustrativeMonths.map(
+ (m) => `${y.year}-${String(m.month).padStart(2, '0')}`,
+ ),
+ ),
+ ...headers.slice(1),
+ ];
+ const expand = (
+ table: InvestmentReportTable,
+ fields: Record