Decisão do proprietário de 04/12/2026: o investidor não escolhe a taxa de IVA; ela decorre da actividade (CAE) do plano. Saúde privada (CAE 86), ensino privado reconhecido e formação profissional usam a taxa reduzida do artigo 17-A da Lei 22/2022; as restantes actividades usam a taxa geral. O IVA mensal das vendas mostra a taxa, a base legal e as condições da lei para o investidor confirmar. A taxa reduzida é uma versão governada própria (IVA-REDUZIDA-17A-BASE-LIQUIDA), com ficha em database/qa, registo QA por fiscal:qa-register-iva --reduced, pré-visualização QA e ligação por INVESTMOZ_IVA_REDUCED_RULE_ID/VERSION. Enquanto não estiver publicada, o IVA das actividades a 5% fica por determinar e nunca usa a taxa geral em substituição. Os resultados anteriores à taxa geral continuam actuais. Decisões e pendências da sessão registadas no manual existente. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzJmxFy3izprXr5dSq91jM
49 lines
1.7 KiB
TypeScript
49 lines
1.7 KiB
TypeScript
import { operationTreatments } from './iva-operations.ts';
|
|
|
|
export type IvaActivityOperation =
|
|
| 'internal_general_net'
|
|
| 'internal_reduced_17a_net';
|
|
|
|
export type IvaActivityTreatment = {
|
|
operation: IvaActivityOperation;
|
|
rate: 16 | 5;
|
|
label: string;
|
|
article: string;
|
|
conditions: string[];
|
|
/** True when the plan has a documented activity; otherwise the general rate is only the default. */
|
|
fromActivity: boolean;
|
|
};
|
|
|
|
const treatment = (
|
|
id: string,
|
|
operation: IvaActivityOperation,
|
|
fromActivity: boolean,
|
|
): IvaActivityTreatment => {
|
|
const row = operationTreatments.find((item) => item.id === id)!;
|
|
return {
|
|
operation,
|
|
rate: operation === 'internal_general_net' ? 16 : 5,
|
|
label: row.label,
|
|
article: row.article,
|
|
conditions: [...row.conditions],
|
|
fromActivity,
|
|
};
|
|
};
|
|
|
|
/**
|
|
* IVA follows the activity, not a choice of rate (owner decision 04/12/2026).
|
|
* CAE-Rev.2 subclasses that are the operations of artigo 15(10) take the
|
|
* reduced rate of artigo 17-A; every other activity takes the general rate.
|
|
* The conditions of the law are shown for the investor to confirm.
|
|
*/
|
|
export function ivaTreatmentForCae(code?: string | null): IvaActivityTreatment {
|
|
const cae = (code ?? '').trim();
|
|
if (/^86\d{3}$/.test(cae))
|
|
return treatment('private_health', 'internal_reduced_17a_net', true);
|
|
if (cae === '85492')
|
|
return treatment('private_training', 'internal_reduced_17a_net', true);
|
|
if (/^85(1\d{2}|2[12]\d|300)$/.test(cae))
|
|
return treatment('private_education', 'internal_reduced_17a_net', true);
|
|
return treatment('general', 'internal_general_net', cae !== '');
|
|
}
|