feat(qa): integrate financial example, growth, dividends and detailed declarations
This commit is contained in:
@@ -287,6 +287,22 @@ export function buildIntegralFinancialTables(
|
||||
'Despesas de arranque reconhecidas e pagas no início. Saldos patrimoniais anteriores não são novas despesas.',
|
||||
);
|
||||
table('funding').rows = [
|
||||
...(plan.fundingBreakdown
|
||||
? [
|
||||
[
|
||||
'Capital do proprietário',
|
||||
plan.fundingBreakdown.ownerCapital,
|
||||
],
|
||||
[
|
||||
'Capital do investidor',
|
||||
plan.fundingBreakdown.investorCapital,
|
||||
],
|
||||
[
|
||||
'Capital adicional angariado',
|
||||
plan.fundingBreakdown.additionalCapital,
|
||||
],
|
||||
]
|
||||
: []),
|
||||
['Capital introduzido', plan.equity],
|
||||
['Suprimentos', plan.shareholderLoans],
|
||||
['Empréstimos', plan.bankLoanProceeds],
|
||||
@@ -335,6 +351,7 @@ export function buildIntegralFinancialTables(
|
||||
let depreciation = 0n,
|
||||
cumulativeProfit = -startup,
|
||||
principal = 0n;
|
||||
let distributedDividends = 0n;
|
||||
let obligationsKnown = true;
|
||||
const fixed = openingFixed + cents(plan.assetInvestment);
|
||||
const loans =
|
||||
@@ -393,6 +410,7 @@ export function buildIntegralFinancialTables(
|
||||
depreciation += cents(row.depreciation);
|
||||
principal += cents(row.principalRepayment);
|
||||
cumulativeProfit += profit;
|
||||
distributedDividends += cents(row.dividends);
|
||||
const inventory =
|
||||
row.inventoryClosing === null
|
||||
? null
|
||||
@@ -421,7 +439,8 @@ export function buildIntegralFinancialTables(
|
||||
loans -
|
||||
principal +
|
||||
deferredGrant;
|
||||
const capital = paidCapital + cumulativeProfit;
|
||||
const capital =
|
||||
paidCapital + cumulativeProfit - distributedDividends;
|
||||
return {
|
||||
opening,
|
||||
cash,
|
||||
@@ -439,7 +458,7 @@ export function buildIntegralFinancialTables(
|
||||
: assets - liabilities - capital,
|
||||
loans: loans - principal,
|
||||
paidCapital,
|
||||
accumulatedResults: cumulativeProfit,
|
||||
accumulatedResults: cumulativeProfit - distributedDividends,
|
||||
fixed: fixed - depreciation,
|
||||
inventory,
|
||||
};
|
||||
@@ -464,6 +483,21 @@ export function buildIntegralFinancialTables(
|
||||
['interestExpense', 'Juros'],
|
||||
] as const)
|
||||
flows('profit-loss', label, data(key));
|
||||
for (const line of plan.operatingExpenseLines ?? [])
|
||||
flows(
|
||||
'profit-loss',
|
||||
`Despesa: ${line.label}`,
|
||||
result.rows.map((_, i) =>
|
||||
cents(line.amountsByPeriod?.[i] ?? line.monthlyAmount),
|
||||
),
|
||||
);
|
||||
table('profit-loss').notes.push(
|
||||
...(plan.operatingExpenseLines
|
||||
? [
|
||||
'As despesas discriminadas são componentes do total operacional, não despesas adicionais.',
|
||||
]
|
||||
: []),
|
||||
);
|
||||
flows('profit-loss', 'Imposto estimado', taxExpenses);
|
||||
flows(
|
||||
'profit-loss',
|
||||
@@ -494,6 +528,8 @@ export function buildIntegralFinancialTables(
|
||||
] as const)
|
||||
flows('cashflow', label, data(key));
|
||||
flows('cashflow', 'Pagamento fiscal estimado', taxPayments);
|
||||
if (plan.dividendsByPeriod)
|
||||
flows('cashflow', 'Dividendos distribuídos', data('dividends'));
|
||||
flows(
|
||||
'cashflow',
|
||||
'Fluxo líquido',
|
||||
|
||||
Reference in New Issue
Block a user