Repõe a regra aprovada dos rácios e agrupa as faltas por causa
O Pacote 3, aprovado a 20/11, não classifica automaticamente empréstimos nem presume vencimentos: a liquidez volta a exigir a classificação declarada. Na lista «Falta preencher» do plano de negócio, a mesma instrução para vários meses passa a ser uma linha com os meses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzJmxFy3izprXr5dSq91jM
This commit is contained in:
@@ -95,29 +95,11 @@ void test('approved formulas are presented from the same monthly and annual stat
|
||||
assert.equal(get(t, 'Crescimento das vendas')[2], '0,00%');
|
||||
assert.equal(get(t, 'Crescimento das vendas').at(-1), 'Por determinar');
|
||||
});
|
||||
void test('inconsistent balance blocks only dependent indicators; without classification liquidity comes from the balance', () => {
|
||||
void test('inconsistent balance blocks only dependent indicators; missing liquidity does not invent maturity', () => {
|
||||
const { plan, source } = fixture();
|
||||
delete plan.ratioCurrentBalances;
|
||||
let t = buildFinancialRatiosTable(plan, source);
|
||||
// Mapa de erros, plano de negócio: ratios are calculated from the balance;
|
||||
// loans are read as long-term and the rule is stated in the notes.
|
||||
const balance = source.find((b) => b.id === 'balance');
|
||||
const value = (label) =>
|
||||
Number(balance.rows.find((r) => r[0] === label)[1]);
|
||||
const expected =
|
||||
(value('Total do activo') - value('Activos fixos líquidos')) /
|
||||
(value('Total do passivo') -
|
||||
value('Empréstimos e suprimentos por reembolsar'));
|
||||
assert.equal(
|
||||
get(t, 'Liquidez corrente')[1],
|
||||
expected.toFixed(2).replace('.', ',') + '×',
|
||||
);
|
||||
assert.ok(
|
||||
t.notes.some((n) =>
|
||||
n.startsWith('Activo e passivo correntes calculados a partir do balanço'),
|
||||
),
|
||||
);
|
||||
assert.ok(!t.issues.some((i) => i.includes('Activo corrente — mês')));
|
||||
assert.equal(get(t, 'Liquidez corrente')[1], 'Por determinar');
|
||||
assert.equal(get(t, 'Margem líquida')[1], '26,00%');
|
||||
assert.equal(get(t, 'Retorno do capital')[1], '14,77%');
|
||||
source
|
||||
|
||||
@@ -133,3 +133,15 @@ void test("missing executive summary fields are listed with the field to open (C
|
||||
/Preencha este campo para continuar/,
|
||||
);
|
||||
});
|
||||
|
||||
void test("the same missing classification for many months is one line with the months (Criar Hotel)", () => {
|
||||
const plan = financialReportFixture(36);
|
||||
delete plan.ratioCurrentBalances;
|
||||
const report = createInvestorDecisionReport({
|
||||
project_title: "Hotel",
|
||||
business_plan_snapshot: serializeBusinessPlanSnapshot(plan),
|
||||
});
|
||||
const lines = report.missing.filter((g) => g.message.startsWith("Rácios financeiros / Activo corrente"));
|
||||
assert.equal(lines.length, 1);
|
||||
assert.match(lines[0].message, /— meses 1 a 36:/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user