import { newPecObligation, calculatePecObligation, pecObligationSource, type PecObligation, } from '@/lib/irpc-pec-obligation'; import { fractionPresentation } from '@/lib/fiscal-rational'; import type { AnnualBook } from '@/lib/irpc-annual-settlement'; export function SimulationIrpcPecObligation({ book, onChange, }: { book: AnnualBook; onChange: (p: PecObligation) => void; }) { const p = book.pecObligation; if (!p) return (
Obrigação PEC

Preparar o total e os meses previstos conserva os comprovativos pagos em separado.

); const m = calculatePecObligation( p, book.subjectNuit, book.year, book.assessment, ), patch = (changes: Partial) => onChange({ ...p, ...changes }); const field = ( key: Exclude, label: string, ) => ( ); return (
Obrigação PEC — preparação
{p.scope === 'ordinary_resident' && ( <> {field('subjectNuit', 'NUIT — obrigação PEC')} {field('year', 'Exercício — obrigação PEC')} {field( 'activityStartYear', 'Ano de início efectivo da actividade — PEC', )} {field( 'activityReference', 'Fonte do início de actividade — PEC', )} {p.activityStartYear !== book.year && ( <> {field('previousYear', 'Exercício anterior — PEC')} {field( 'previousTurnover', 'Volume de negócios anterior — MZN', )} {field( 'turnoverReference', 'Fonte do volume de negócios — PEC', )} {field( 'previousPpcPaid', 'PPC efectivamente pagos no ano anterior — MZN', )} {field( 'ppcReference', 'Fonte dos PPC anteriores — PEC', )} )} )} {m.pending.length ? (

{m.pending.join(' ')}

) : m.notApplicable ? (

Não aplicável no ano de início da actividade29(4).

) : ( <>

Obrigação total:{' '} {fractionPresentation(m.total!).decimal} MZN.

    {m.months.map((month) => (
  • {month}
  • ))}

Repartição por prestação e opção de pagamento único por preparar; não se presume dia limite nem arredondamento do PPC para o PEC.

)}

Guardar o rascunho conserva esta preparação. Calcular o fecho anual inclui-a no relatório. Não regista pagamentos,cria deduções ou executa guias. Os comprovativos efectivos permanecem no detalhe PEC existente.

Fonte e limites PEC

{pecObligationSource}

); }