Files
Investidor-V2/tests/frontend/helpers/irpc-economic-case.mjs
T

65 lines
3.1 KiB
JavaScript

import { internationalCase } from './irpc-international-case.mjs';
import { carryCase } from './irpc-carry-case.mjs';
import { prepareEconomicBook } from '../../../resources/js/lib/irpc-annual-settlement.ts';
import { newEconomicPosition } from '../../../resources/js/lib/irpc-economic-credit.ts';
export function economicCase(withCarry = false) {
const c = withCarry ? carryCase() : internationalCase();
c.b = prepareEconomicBook(c.b);
Object.assign(c.b.economicCredits, {
state: 'known',
reference: 'SYNTHETIC QA full ordinary economic-credit inventory',
rows: [
{
...newEconomicPosition('economic-1'),
subjectNuit: c.b.subjectNuit,
year: c.b.year,
assessmentKey: c.b.assessmentKey,
kind: 'ordinary_profit',
payerNuit: '111222333',
recipientResident: 'yes',
payerResident: 'yes',
payerIrpc: 'yes',
payerExempt: 'no',
article40: 'no',
qualificationReference:
'SYNTHETIC QA entities seated/effectively managed in MZ; payer subject nonexempt IRPC',
article40Reference:
'SYNTHETIC QA explicit nonapplication of40(1), including2009 participation/period/recipient conditions',
distributionDocument: 'SYNTHETIC-DIVIDEND2026',
distributionParcel: 'distribution-1',
distributionDate: '2026-09-30',
income: '100',
incomeIncluded: 'yes',
incomeReference:
'SYNTHETIC QA100 gross of beneficiary withholding already included in current L6; no actual dividend assertion',
taxIssuer: 'SYNTHETIC domestic IRPC issuer',
taxDocument: 'SYNTHETIC-SOURCE-IRPC2026',
taxParcel: 'underlying-tax-1',
parcelReference:
'SYNTHETIC QA underlying domestic IRPC parcel, distinct from recipient withholding or foreign income tax',
proofAmount: '20',
taxAmount: '20',
attributionReference:
'SYNTHETIC QA documented IRPC20 corresponding to included profits100, not inferred by applying a rate to dividends',
previouslyAttributed: '0',
priorAttributionReference:
'SYNTHETIC QA actual previous attribution to other profits known zero',
grossUpIncluded: '12',
grossUpReference:
'SYNTHETIC QA53 nominal credit12 already included in reconciled current base4400; no base mutation',
nationalLimit: '32',
nationalLimitReference:
'SYNTHETIC QA documented proportional current collecta ceiling32 after credit addition; not an automatic fraction derivation',
previousUse: {
state: 'known',
amount: '0',
reference:
'SYNTHETIC QA actual prior economic-credit use known zero',
},
},
],
});
return c;
}