import { newPecPlan, calculatePecPlan, pecPlanSource, type PecPlan, } from '@/lib/irpc-pec-plan'; import { fractionPresentation, type FiscalFraction, } from '@/lib/fiscal-rational'; export function SimulationIrpcPecPlan({ plan, total, notApplicable, year, onChange, }: { plan?: PecPlan; total: FiscalFraction | null; notApplicable: boolean; year: string; onChange: (p: PecPlan) => void; }) { if (!plan) return (

Prepare os montantes por prestação ou a opção de pagamento único,sem registar pagamento.

); const m = calculatePecPlan(plan, total, notApplicable, year), patch = (p: Partial) => onChange({ ...plan, ...p }); const field = ( key: 'reference' | 'june' | 'august' | 'october', label: string, ) => ( ); return (
Projecção PEC
{m.pending.length ? (

{m.pending.join(' ')}

) : (

Soma reconciliada:{' '} {m.rows .map( (r) => r.month + ': ' + fractionPresentation(r.amount).decimal + ' MZN', ) .join('; ')} . Prazo legal não validado.

)}
0}> Alterar projecção PEC {field('reference', 'Fundamento do projecção PEC')} {plan.mode === 'three' && ( <> {field('june', 'PEC Junho — MZN')} {field('august', 'PEC Agosto — MZN')} {field('october', 'PEC Outubro — MZN')} )} {plan.mode === 'single' && ( )}

O mês escolhido é uma hipótese de tesouraria para avaliar a viabilidade. A reconciliação da soma não valida os prazos legais,emite guia ou regista pagamento. Alterar a estimativa exige reconferir o plano. Guarde pelo rascunho e recalcule o fecho para actualizar o relatório.

Fonte do projecção PEC

{pecPlanSource}

); }