Entrega dashboard e correccoes transversais preservando Ofertas instalado
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
@@ -91,10 +91,17 @@ export function monthlyIvaInput(
|
||||
draft: Record<string, unknown>,
|
||||
settings: MonthlyIvaSettings,
|
||||
): MonthlyIvaInput {
|
||||
if (
|
||||
draft.fiscal_period &&
|
||||
inputText(draft.fiscal_period) !== settings.start.slice(0, 4)
|
||||
)
|
||||
throw new Error(
|
||||
'O ano escolhido no enquadramento fiscal difere do primeiro mês da projecção. Confira o período; nenhum ano foi alterado automaticamente.',
|
||||
);
|
||||
const sales = monthlySalesFromDraft(draft);
|
||||
if (!/^2026-(0[1-9]|1[0-2])$/.test(settings.start))
|
||||
throw new Error(
|
||||
'Indique o primeiro mês real da projecção. Este lote abrange apenas 2026.',
|
||||
'Indique o primeiro mês real da projecção. Este cálculo dispõe de cobertura apenas para 2026.',
|
||||
);
|
||||
const start = Number(settings.start.slice(5));
|
||||
if (sales.amounts.length > 12 || start + sales.amounts.length > 13)
|
||||
|
||||
Reference in New Issue
Block a user