feat(irpc): qualify L7 expenses and compatible special treatments in QA

This commit is contained in:
2026-10-26 12:14:52 +02:00
parent d37fffb2d2
commit ab2ff2fdbc
14 changed files with 939 additions and 12 deletions
@@ -1,3 +1,4 @@
import {SimulationIrpcSpecial} from '@/components/simulation-irpc-special';
import {SimulationIrpcFormPreparation} from '@/components/simulation-irpc-form-preparation';
import {SimulationIrpcPeriodFx} from '@/components/simulation-irpc-period-fx';
import {SimulationIrpcDepreciation} from '@/components/simulation-irpc-depreciation';
@@ -39,8 +40,9 @@ export function SimulationIrpcNormal({draft,onChange}:{draft:Record<string,unkno
<SimulationIrpcCosts draft={draft} book={b} save={save}/>
<SimulationIrpcTaxableBase draft={draft} book={b} save={save}/>
<SimulationIrpcAssessment book={b} save={save}/>
<SimulationIrpcSpecial draft={draft} book={b} save={save}/>
<SimulationIrpcFormPreparation draft={draft} book={b} save={save}/>
<button type="button" onClick={()=>{try{save(recordNormal(draft,b));}catch(e){setError(String(e));}}}>Calcular e guardar ajustamentos L6</button>
<button type="button" onClick={()=>{try{save(recordNormal(draft,b));}catch(e){setError(String(e));}}}>Calcular e guardar L6 e tratamentos L7 preparados</button>
<button type="button" onClick={()=>{try{const html=normalHtml(draft),url=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'})),a=document.createElement('a');a.href=url;a.download='IRPC-normal-ajustamentos.html';a.click();URL.revokeObjectURL(url);setError('');}catch(e){setError(String(e));}}}>Exportar mapa parcial L6</button>
{normalReportRows(draft).map((r,n)=><p key={n}>{r[1]} — {r[2]} — {r[3]}</p>)}
</section>;