import type { AdvanceFiscalPeriod } from '@/lib/irpc-ppc-obligation'; import { newPecPlan, calculatePecPlan, type PecPlan, } from '@/lib/irpc-pec-plan'; import { fractionPresentation, type FiscalFraction, } from '@/lib/fiscal-rational'; export function SimulationIrpcPecPlan({ plan, total, notApplicable, year, period, onChange, }: { plan?: PecPlan; total: FiscalFraction | null; notApplicable: boolean; year: string; period?: AdvanceFiscalPeriod; 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, period), 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.

)} {m.needsPeriodConfirmation && !m.calendarPending && ( )}
0}> Alterar projecção PEC {field('reference', 'Fundamento do projecção PEC')} {plan.mode === 'three' && ( <> {field( 'june', m.calendarPending ? 'PEC primeiro montante — mês por confirmar' : m.nonCivil ? 'PEC 6.º mês (' + m.months[0] + ') — MZN' : 'PEC Junho — MZN', )} {field( 'august', m.calendarPending ? 'PEC segundo montante — mês por confirmar' : m.nonCivil ? 'PEC 8.º mês (' + m.months[1] + ') — MZN' : 'PEC Agosto — MZN', )} {field( 'october', m.calendarPending ? 'PEC terceiro montante — mês por confirmar' : m.nonCivil ? 'PEC 10.º mês (' + m.months[2] + ') — MZN' : '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

{m.source}

); }