Plano de negócio como resultado da simulação

O relatório do investidor segue o modelo: resumo executivo (com objectivos,
missão e chaves para o sucesso), startup, mercado, vendas e marcos, pessoal
e plano financeiro, com as tabelas anuais nos capítulos e o detalhe mensal
do primeiro ano em anexo, sem colunas técnicas. Antes de exportar aparece
«Falta preencher» com ligação aos campos.

O cenário fiscal calcula o IRPC de cada ano à taxa geral de 32% sobre o
lucro antes de impostos, em vez de 72 campos mensais. Os rácios passam a
ser calculados a partir do balanço quando o investidor não classifica o
activo e o passivo correntes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MzJmxFy3izprXr5dSq91jM
This commit is contained in:
Claude
2026-12-04 21:11:45 +02:00
committed by nala
parent a082c2542a
commit a3f2d2d7ca
14 changed files with 622 additions and 17 deletions
@@ -9,6 +9,7 @@ import {
createProjectDossierPrintHtml,
createProjectDossierReport,
createIntegralFinancialReport,
createInvestorDecisionReport,
dossierReportSections,
generateProjectDossierDocx,
generateProjectDossierPackage,
@@ -25,6 +26,8 @@ type Props = {
version: string;
references?: DossierReference[];
currentCalculation?: DossierCurrentCalculation | null;
/** Take the investor to the step and field that still needs data. */
onCorrect?: (field: string) => void;
};
const defaultSections = new Set<DossierReportSectionId>(
@@ -58,9 +61,10 @@ export function ProjectDossierExport({
version,
references = [],
currentCalculation = null,
onCorrect,
}: Props) {
const [selectedSections, setSelectedSections] = useState(defaultSections);
const [reportMode, setReportMode] = useState('dossier');
const [reportMode, setReportMode] = useState('investor');
const [attachments, setAttachments] = useState<DossierAttachment[]>([]);
const [error, setError] = useState('');
const [busy, setBusy] = useState('');
@@ -132,7 +136,13 @@ export function ProjectDossierExport({
const report = useMemo(
() =>
reportMode === 'financial'
reportMode === 'investor'
? createInvestorDecisionReport(draft, {
version,
references,
currentCalculation,
})
: reportMode === 'financial'
? createIntegralFinancialReport(draft, {
version,
references,
@@ -153,6 +163,11 @@ export function ProjectDossierExport({
selectedSectionSet,
],
);
const missing =
reportMode === 'investor'
? (report as ReturnType<typeof createInvestorDecisionReport>)
.missing
: [];
function model() {
return report;
}
@@ -295,7 +310,7 @@ export function ProjectDossierExport({
<fieldset
className="space-y-2"
disabled={reportMode === 'financial'}
disabled={reportMode !== 'dossier'}
>
<legend className="font-medium">
Escolha as secções a incluir
@@ -432,6 +447,9 @@ export function ProjectDossierExport({
onChange={(e) => setReportMode(e.target.value)}
disabled={Boolean(busy)}
>
<option value="investor">
Plano de negócio — relatório do investidor
</option>
<option value="dossier">
Dossier e contexto — secções seleccionadas
</option>
@@ -440,6 +458,36 @@ export function ProjectDossierExport({
</option>
</select>
</label>
{missing.length > 0 && (
<section
aria-label="Falta preencher"
className="rounded border border-amber-300 bg-amber-50 p-3 text-sm"
>
<h4 className="font-semibold">Falta preencher</h4>
<p>
Pode exportar o rascunho, mas o plano só fica completo
para partilhar com bancos ou parceiros depois de
preencher:
</p>
<ul className="list-disc space-y-1 pl-5">
{missing.map((gap, index) => (
<li key={index}>
{gap.field && onCorrect ? (
<button
type="button"
className="text-left underline"
onClick={() => onCorrect(gap.field!)}
>
{gap.message}
</button>
) : (
gap.message
)}
</li>
))}
</ul>
</section>
)}
<details className="rounded border p-3">
<summary>Conferir o relatório antes de exportar</summary>
<DossierReportPreview report={report} />