Preparar obriga??o PPC ordin?ria com recupera??o e relat?rio no dossier
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-11 08:55:14 +02:00
parent 192a7e35e5
commit fbff2660f2
14 changed files with 743 additions and 8 deletions
@@ -1,3 +1,4 @@
import { validatePpcObligation, ppcObligationReport, ppcObligationVersion, type PpcObligation } from './irpc-ppc-obligation.ts';
import {
newInvestmentCredit,
validateInvestmentCredit,
@@ -122,6 +123,7 @@ export type AnnualBook = {
creditCarry?: CreditCarry;
economicCredits?: EconomicCredits;
investmentCredit?: InvestmentCredit;
ppcObligation?: PpcObligation;
result?: AnnualRecord;
history: AnnualRecord[];
};
@@ -291,6 +293,7 @@ function books(d: Record<string, unknown>): Record<string, AnnualBook> {
return m;
}
export function validateAnnual(b: AnnualBook) {
if (b?.ppcObligation !== undefined) validatePpcObligation(b.ppcObligation);
if (b?.investmentCredit !== undefined)
validateInvestmentCredit(b.investmentCredit);
if (b?.economicCredits !== undefined) validateEconomic(b.economicCredits);
@@ -565,6 +568,7 @@ function key(d: Record<string, unknown>, b: AnnualBook) {
acquisitionScope(d),
input,
dependencies(d, !!b.investmentCredit),
...(b.ppcObligation ? [ppcObligationVersion] : []),
...(b.investmentCredit && b.creditCarry?.lots.length
? ['CBF15-credit-carry-combination/1']
: []),
@@ -1712,6 +1716,7 @@ export function annualReportRows(
indeterminate: 'Indeterminado',
}[m.status];
return [
...(m.input.ppcObligation ? ppcObligationReport(m.input.ppcObligation,m.subjectNuit,m.year,m.input.assessment) : []),
[
'IRPC — L8',
'Fecho anual — âmbito e origem',