feat(portal): deliver ordinary national credit fraction and education continuity
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
@@ -1154,12 +1154,28 @@ export function calculateAnnual(d: Record<string, unknown>, b: AnnualBook) {
|
||||
b.subjectNuit,
|
||||
b.year,
|
||||
b.assessmentKey,
|
||||
{
|
||||
ordinary:
|
||||
assessment?.kind === 'normal' &&
|
||||
assessment.current &&
|
||||
assessment.key === b.assessmentKey,
|
||||
taxableBase: assessment?.record?.model.taxableBase ?? null,
|
||||
colecta: assessment?.colecta ?? null,
|
||||
},
|
||||
);
|
||||
pending.push(
|
||||
...m.pending.map((e) => 'País ' + p.country + ': ' + e),
|
||||
);
|
||||
return m;
|
||||
}) ?? [];
|
||||
const derivedNational = positions.flatMap((p) =>
|
||||
p.nationalDerivation ? [p.nationalDerivation.income] : [],
|
||||
);
|
||||
const currentBase = assessment?.record?.model.taxableBase;
|
||||
if (currentBase && cmp(addFractions(derivedNational), currentBase) > 0n)
|
||||
pending.push(
|
||||
'As parcelas estrangeiras com fracção derivada excedem em conjunto a matéria colectável corrente; reconcilie a afectação por país.',
|
||||
);
|
||||
const economicRows =
|
||||
b.economicCredits?.rows.map((r) => {
|
||||
const issues = claims
|
||||
@@ -1384,7 +1400,9 @@ export function calculateAnnual(d: Record<string, unknown>, b: AnnualBook) {
|
||||
: []),
|
||||
...(b.internationalCredits
|
||||
? [
|
||||
'Crédito internacional do próprio exercício:fracção nacional,convenção e montantes MZN são documentados;sem cálculo presumido,transporte ou consumo oficial. ' +
|
||||
(positions.some((p) => p.nationalDerivation)
|
||||
? 'Crédito internacional do próprio exercício:fracção nacional derivada no caso L6 ordinário com parcela líquida correspondida;CDT e montantes MZN documentados;sem repartição presumida de custos/perdas,transporte ou consumo oficial. '
|
||||
: 'Crédito internacional do próprio exercício:fracção nacional,convenção e montantes MZN são documentados;sem cálculo presumido,transporte ou consumo oficial. ') +
|
||||
(b.economicCredits
|
||||
? 'Benefícios positivos ficam separados;crédito económico no detalhe próprio.'
|
||||
: 'Créditos económicos/benefícios positivos ficam separados.'),
|
||||
@@ -1630,6 +1648,21 @@ export function annualReportRows(
|
||||
show(p.paid) +
|
||||
'; fracção nacional: ' +
|
||||
show(p.nationalLimit) +
|
||||
(p.nationalDerivation
|
||||
? '; derivação L6: colecta ' +
|
||||
show(p.nationalDerivation.colecta) +
|
||||
' × parcela líquida ' +
|
||||
show(p.nationalDerivation.income) +
|
||||
' / matéria colectável ' +
|
||||
show(
|
||||
p.nationalDerivation
|
||||
.taxableBase,
|
||||
) +
|
||||
'; exacta ' +
|
||||
p.nationalLimit?.numerator +
|
||||
'/' +
|
||||
p.nationalLimit?.denominator
|
||||
: '; limite documentado') +
|
||||
'; limite CDT: ' +
|
||||
(p.input.treaty === 'no'
|
||||
? 'Não aplicável documentado'
|
||||
@@ -1646,7 +1679,15 @@ export function annualReportRows(
|
||||
p.pending.join(' | '),
|
||||
p.input.incomeReference +
|
||||
'; ' +
|
||||
p.input.nationalLimitReference +
|
||||
(p.nationalDerivation
|
||||
? 'Limite manual anterior conservado, não utilizado nesta derivação'
|
||||
: p.input.nationalLimitReference) +
|
||||
(p.nationalDerivation
|
||||
? '; correspondência: ' +
|
||||
p.nationalDerivation.reference +
|
||||
'; ' +
|
||||
p.nationalDerivation.version
|
||||
: '') +
|
||||
'; ' +
|
||||
p.input.treatyReference +
|
||||
'; ' +
|
||||
|
||||
Reference in New Issue
Block a user