@jjlmoya/utils-finance 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/package.json +64 -0
  2. package/src/category/i18n/en.ts +159 -0
  3. package/src/category/i18n/es.ts +159 -0
  4. package/src/category/i18n/fr.ts +159 -0
  5. package/src/category/index.ts +24 -0
  6. package/src/category/seo.astro +15 -0
  7. package/src/components/PreviewNavSidebar.astro +116 -0
  8. package/src/components/PreviewToolbar.astro +143 -0
  9. package/src/data.ts +11 -0
  10. package/src/env.d.ts +5 -0
  11. package/src/index.ts +32 -0
  12. package/src/layouts/PreviewLayout.astro +117 -0
  13. package/src/pages/[locale]/[slug].astro +146 -0
  14. package/src/pages/[locale].astro +251 -0
  15. package/src/pages/index.astro +4 -0
  16. package/src/tests/faq_count.test.ts +19 -0
  17. package/src/tests/locale_completeness.test.ts +39 -0
  18. package/src/tests/mocks/astro_mock.js +2 -0
  19. package/src/tests/no_h1_in_components.test.ts +48 -0
  20. package/src/tests/schemas_fulfillment.test.ts +23 -0
  21. package/src/tests/seo_length.test.ts +23 -0
  22. package/src/tests/title_quality.test.ts +55 -0
  23. package/src/tests/tool_validation.test.ts +17 -0
  24. package/src/tool/compoundInterest/bibliography.astro +14 -0
  25. package/src/tool/compoundInterest/component.astro +697 -0
  26. package/src/tool/compoundInterest/i18n/en.ts +212 -0
  27. package/src/tool/compoundInterest/i18n/es.ts +212 -0
  28. package/src/tool/compoundInterest/i18n/fr.ts +212 -0
  29. package/src/tool/compoundInterest/index.ts +34 -0
  30. package/src/tool/compoundInterest/logic.ts +40 -0
  31. package/src/tool/compoundInterest/seo.astro +14 -0
  32. package/src/tool/compoundInterest/ui.ts +19 -0
  33. package/src/tool/courtFeeCalculator/bibliography.astro +14 -0
  34. package/src/tool/courtFeeCalculator/component.astro +427 -0
  35. package/src/tool/courtFeeCalculator/i18n/en.ts +268 -0
  36. package/src/tool/courtFeeCalculator/i18n/es.ts +268 -0
  37. package/src/tool/courtFeeCalculator/i18n/fr.ts +268 -0
  38. package/src/tool/courtFeeCalculator/index.ts +33 -0
  39. package/src/tool/courtFeeCalculator/logic.ts +86 -0
  40. package/src/tool/courtFeeCalculator/seo.astro +14 -0
  41. package/src/tool/courtFeeCalculator/ui.ts +31 -0
  42. package/src/tool/debtSnowball/bibliography.astro +14 -0
  43. package/src/tool/debtSnowball/component.astro +1052 -0
  44. package/src/tool/debtSnowball/i18n/en.ts +288 -0
  45. package/src/tool/debtSnowball/i18n/es.ts +288 -0
  46. package/src/tool/debtSnowball/i18n/fr.ts +288 -0
  47. package/src/tool/debtSnowball/index.ts +37 -0
  48. package/src/tool/debtSnowball/logic.ts +156 -0
  49. package/src/tool/debtSnowball/seo.astro +14 -0
  50. package/src/tool/debtSnowball/ui.ts +49 -0
  51. package/src/tool/fireCalculator/bibliography.astro +14 -0
  52. package/src/tool/fireCalculator/component.astro +689 -0
  53. package/src/tool/fireCalculator/i18n/en.ts +261 -0
  54. package/src/tool/fireCalculator/i18n/es.ts +261 -0
  55. package/src/tool/fireCalculator/i18n/fr.ts +261 -0
  56. package/src/tool/fireCalculator/index.ts +33 -0
  57. package/src/tool/fireCalculator/logic.ts +108 -0
  58. package/src/tool/fireCalculator/seo.astro +14 -0
  59. package/src/tool/fireCalculator/ui.ts +33 -0
  60. package/src/tool/ibanBicSwiftConverter/bibliography.astro +14 -0
  61. package/src/tool/ibanBicSwiftConverter/component.astro +581 -0
  62. package/src/tool/ibanBicSwiftConverter/i18n/en.ts +167 -0
  63. package/src/tool/ibanBicSwiftConverter/i18n/es.ts +216 -0
  64. package/src/tool/ibanBicSwiftConverter/i18n/fr.ts +167 -0
  65. package/src/tool/ibanBicSwiftConverter/index.ts +33 -0
  66. package/src/tool/ibanBicSwiftConverter/logic.ts +101 -0
  67. package/src/tool/ibanBicSwiftConverter/seo.astro +14 -0
  68. package/src/tool/ibanBicSwiftConverter/ui.ts +17 -0
  69. package/src/tool/inflation/bibliography.astro +14 -0
  70. package/src/tool/inflation/component.astro +400 -0
  71. package/src/tool/inflation/i18n/en.ts +301 -0
  72. package/src/tool/inflation/i18n/es.ts +301 -0
  73. package/src/tool/inflation/i18n/fr.ts +301 -0
  74. package/src/tool/inflation/index.ts +34 -0
  75. package/src/tool/inflation/logic.ts +92 -0
  76. package/src/tool/inflation/seo.astro +14 -0
  77. package/src/tool/inflation/ui.ts +17 -0
  78. package/src/tool/lateInterest/bibliography.astro +14 -0
  79. package/src/tool/lateInterest/component.astro +655 -0
  80. package/src/tool/lateInterest/i18n/en.ts +255 -0
  81. package/src/tool/lateInterest/i18n/es.ts +224 -0
  82. package/src/tool/lateInterest/i18n/fr.ts +224 -0
  83. package/src/tool/lateInterest/index.ts +34 -0
  84. package/src/tool/lateInterest/logic.ts +89 -0
  85. package/src/tool/lateInterest/seo.astro +14 -0
  86. package/src/tool/lateInterest/ui.ts +33 -0
  87. package/src/tool/legalInterestRate/bibliography.astro +14 -0
  88. package/src/tool/legalInterestRate/component.astro +650 -0
  89. package/src/tool/legalInterestRate/i18n/en.ts +159 -0
  90. package/src/tool/legalInterestRate/i18n/es.ts +159 -0
  91. package/src/tool/legalInterestRate/i18n/fr.ts +159 -0
  92. package/src/tool/legalInterestRate/index.ts +33 -0
  93. package/src/tool/legalInterestRate/logic.ts +29 -0
  94. package/src/tool/legalInterestRate/seo.astro +14 -0
  95. package/src/tool/legalInterestRate/ui.ts +23 -0
  96. package/src/tool/lotteryOptimizer/bibliography.astro +14 -0
  97. package/src/tool/lotteryOptimizer/component.astro +863 -0
  98. package/src/tool/lotteryOptimizer/i18n/en.ts +188 -0
  99. package/src/tool/lotteryOptimizer/i18n/es.ts +281 -0
  100. package/src/tool/lotteryOptimizer/i18n/fr.ts +188 -0
  101. package/src/tool/lotteryOptimizer/index.ts +33 -0
  102. package/src/tool/lotteryOptimizer/logic.ts +133 -0
  103. package/src/tool/lotteryOptimizer/seo.astro +14 -0
  104. package/src/tool/lotteryOptimizer/ui.ts +33 -0
  105. package/src/tool/mortgage/bibliography.astro +14 -0
  106. package/src/tool/mortgage/component.astro +1030 -0
  107. package/src/tool/mortgage/i18n/en.ts +227 -0
  108. package/src/tool/mortgage/i18n/es.ts +227 -0
  109. package/src/tool/mortgage/i18n/fr.ts +227 -0
  110. package/src/tool/mortgage/index.ts +34 -0
  111. package/src/tool/mortgage/logic.ts +118 -0
  112. package/src/tool/mortgage/seo.astro +14 -0
  113. package/src/tool/mortgage/ui.ts +35 -0
  114. package/src/tool/percentageCalculator/bibliography.astro +14 -0
  115. package/src/tool/percentageCalculator/component.astro +640 -0
  116. package/src/tool/percentageCalculator/i18n/en.ts +233 -0
  117. package/src/tool/percentageCalculator/i18n/es.ts +233 -0
  118. package/src/tool/percentageCalculator/i18n/fr.ts +233 -0
  119. package/src/tool/percentageCalculator/index.ts +34 -0
  120. package/src/tool/percentageCalculator/logic.ts +48 -0
  121. package/src/tool/percentageCalculator/seo.astro +14 -0
  122. package/src/tool/percentageCalculator/ui.ts +30 -0
  123. package/src/tool/rentIncreaseCalculator/bibliography.astro +14 -0
  124. package/src/tool/rentIncreaseCalculator/component.astro +587 -0
  125. package/src/tool/rentIncreaseCalculator/i18n/en.ts +159 -0
  126. package/src/tool/rentIncreaseCalculator/i18n/es.ts +220 -0
  127. package/src/tool/rentIncreaseCalculator/i18n/fr.ts +159 -0
  128. package/src/tool/rentIncreaseCalculator/index.ts +33 -0
  129. package/src/tool/rentIncreaseCalculator/logic.ts +43 -0
  130. package/src/tool/rentIncreaseCalculator/seo.astro +14 -0
  131. package/src/tool/rentIncreaseCalculator/ui.ts +19 -0
  132. package/src/tools.ts +16 -0
  133. package/src/types.ts +74 -0
@@ -0,0 +1,268 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { CourtFeeCalculatorUI } from '../ui';
4
+
5
+ const slug = 'calculatrice-frais-judiciaires-espagne';
6
+ const title = 'Calculatrice de Frais Judiciaires Espagne';
7
+ const description = 'Calculez les frais judiciaires exacts pour les entreprises espagnoles selon la Loi 10/2012. Calculatrice automatique du formulaire 696 avec exemptions.';
8
+
9
+ const faqData = [
10
+ {
11
+ question: 'Les particuliers sont-ils exonérés des frais judiciaires en Espagne?',
12
+ answer: 'Oui, depuis 2016, les particuliers sont complètement exonérés du paiement des frais judiciaires en Espagne dans tous les ordres juridictionnels.',
13
+ },
14
+ {
15
+ question: 'Quel est le montant maximum des frais judiciaires?',
16
+ answer: 'La part variable est plafonnée à 10 000 euros. Combinée avec la part fixe, le total maximum varie en fonction du type de procédure.',
17
+ },
18
+ {
19
+ question: 'Qu\'est-ce que le Formulaire 696?',
20
+ answer: 'C\'est le formulaire officiel de l\'Administration fiscale utilisé pour l\'auto-liquidation des frais de l\'exercice du pouvoir juridictionnel en Espagne.',
21
+ },
22
+ {
23
+ question: 'Y a-t-il des frais judiciaires en matière pénale?',
24
+ answer: 'Non, il n\'y a pas de frais judiciaires pour les procédures pénales en Espagne.',
25
+ },
26
+ {
27
+ question: 'Comment est calculée la part variable?',
28
+ answer: 'La part variable est de 0,5% du montant du litige jusqu\'à 1 million d\'euros. Au-delà, elle est de 0,25%. Le maximum est de 10 000 euros.',
29
+ },
30
+ ];
31
+
32
+ const howToData = [
33
+ {
34
+ name: 'Sélectionnez le type de contribuable',
35
+ text: 'Indiquez si vous êtes une personne physique (exonérée) ou une personne morale (entreprise). Les particuliers ne paient pas de frais.',
36
+ },
37
+ {
38
+ name: 'Choisissez la juridiction et le type de procédure',
39
+ text: 'Sélectionnez l\'ordre juridictionnel (Civil, Administratif ou Social) et le type de procédure.',
40
+ },
41
+ {
42
+ name: 'Entrez le montant du litige',
43
+ text: 'Écrivez le montant total réclamé dans la plainte. Pour l\'ordre social, ce champ ne s\'applique pas.',
44
+ },
45
+ {
46
+ name: 'Consultez le détail',
47
+ text: 'Obtenez le calcul automatique avec part fixe, part variable et total pour le formulaire 696.',
48
+ },
49
+ ];
50
+
51
+ const bibliographyData = [
52
+ {
53
+ name: 'Loi 10/2012 sur les Frais Judiciaires (Bulletin Officiel)',
54
+ url: 'https://www.boe.es/buscar/act.php?id=BOE-A-2012-14301',
55
+ },
56
+ {
57
+ name: 'Décision de la Cour Constitutionnelle 140/2016 sur les Frais Judiciaires',
58
+ url: 'https://www.boe.es/buscar/doc.php?id=BOE-A-2016-7905',
59
+ },
60
+ {
61
+ name: 'Administration Fiscale Espagnole - Formulaire 696',
62
+ url: 'https://sede.agenciatributaria.gob.es/Sede/procedimientoini/GC07.shtml',
63
+ },
64
+ {
65
+ name: 'Conseil Général du Pouvoir Judiciaire - Information sur les Frais',
66
+ url: 'https://www.cgpj.es/es/Inicio',
67
+ },
68
+ ];
69
+
70
+ const seoData = [
71
+ {
72
+ type: 'title',
73
+ text: 'Calculatrice de Frais Judiciaires en Espagne: Guide Complet',
74
+ level: 2,
75
+ },
76
+ {
77
+ type: 'paragraph',
78
+ html: 'La <strong>Calculatrice de Frais Judiciaires</strong> est un outil technique conçu pour déterminer avec précision le coût fiscal du pouvoir juridictionnel en Espagne. Depuis la réforme de la Loi 10/2012, le calcul de ces frais est devenu une tâche critique pour la planification procédurale des entreprises et des professionnels du droit.',
79
+ },
80
+ {
81
+ type: 'card',
82
+ title: 'Aspects Clés des Frais Judiciaires',
83
+ html: '<ul><li>Obligatoires uniquement pour les <strong>personnes morales</strong> (entreprises).</li><li>Assujettis au <strong>Formulaire 696</strong> de l\'Administration fiscale.</li><li>Composés d\'une <strong>part fixe</strong> et d\'une <strong>part variable</strong>.</li><li>Plafond de la part variable fixé à <strong>10 000 €</strong>.</li></ul>',
84
+ },
85
+ {
86
+ type: 'card',
87
+ html: '<p>Cet outil simule l\'auto-liquidation du tribut, en détaillant les montants selon l\'ordre juridictionnel (Civil, Administratif ou Social) et le montant du litige, permettant de prévoir l\'impact financier avant l\'engagement du procès.</p>',
88
+ },
89
+ {
90
+ type: 'title',
91
+ text: 'Qui Doit Payer les Frais Judiciaires en 2026?',
92
+ level: 2,
93
+ },
94
+ {
95
+ type: 'paragraph',
96
+ html: 'La loi actuelle, suite à la décision historique de la <strong>Cour Constitutionnelle 140/2016</strong>, établit un cadre d\'exonération clair qui protège l\'accès à la justice des citoyens individus.',
97
+ },
98
+ {
99
+ type: 'list',
100
+ items: [
101
+ '<strong>Personnes Physiques:</strong> Jouissent d\'une exonération absolue dans tous les ordres juridictionnels.',
102
+ '<strong>Personnes Morales:</strong> Sont les principaux sujets passifs du tribut.',
103
+ '<strong>Sujets Spéciaux:</strong> Les entités d\'utilité publique et les administrations sont exonérées.',
104
+ ],
105
+ },
106
+ {
107
+ type: 'title',
108
+ text: 'Structure Technique de la Redevance',
109
+ level: 3,
110
+ },
111
+ {
112
+ type: 'paragraph',
113
+ html: 'Le calcul mathématique effectué par notre outil se divise en deux composantes obligatoires qui s\'ajoutent pour obtenir le total du Formulaire 696.',
114
+ },
115
+ {
116
+ type: 'title',
117
+ text: '1. Part Fixe par Procédure',
118
+ level: 4,
119
+ },
120
+ {
121
+ type: 'paragraph',
122
+ html: 'Déterminée par le type d\'action juridique intentée. Un jugement civil ordinaire entraîne une redevance de 300 €, tandis qu\'un pourvoi en cassation devant la Cour Suprême s\'élève à 1 200 €.',
123
+ },
124
+ {
125
+ type: 'title',
126
+ text: '2. Part Variable par Montant du Litige',
127
+ level: 4,
128
+ },
129
+ {
130
+ type: 'paragraph',
131
+ html: 'S\'applique à la base imposable du procès. Pour les entreprises, les taux de taxation s\'appliquent de manière échelonnée.',
132
+ },
133
+ {
134
+ type: 'table',
135
+ headers: ['Tranche de Montant', 'Taux Applicable'],
136
+ rows: [
137
+ ['Jusqu\'à 1 000 000 €', '<strong>0,50%</strong>'],
138
+ ['Dépassement de 1 000 000 €', '<strong>0,25%</strong>'],
139
+ ['Limite Maximale Variable', '<strong>10 000 €</strong>'],
140
+ ],
141
+ },
142
+ {
143
+ type: 'title',
144
+ text: 'Frais dans des Ordres Juridictionnels Spécifiques',
145
+ level: 2,
146
+ },
147
+ {
148
+ type: 'title',
149
+ text: 'Juridiction Civile',
150
+ level: 3,
151
+ },
152
+ {
153
+ type: 'paragraph',
154
+ html: 'C\'est le domaine avec le plus grand volume de liquidations. Couvre les procédures monitoires, verbales, ordinaires et les exécutions. Notre calculatrice ajuste automatiquement la redevance fixe selon la complexité de la procédure choisie.',
155
+ },
156
+ {
157
+ type: 'title',
158
+ text: 'Ordre Contentieux-Administratif',
159
+ level: 3,
160
+ },
161
+ {
162
+ type: 'paragraph',
163
+ html: 'S\'applique dans les litiges contre l\'Administration. Les montants varient selon qu\'il s\'agit d\'une procédure abrégée (200 €) ou ordinaire (350 €), plus les tranches variables correspondantes.',
164
+ },
165
+ {
166
+ type: 'tip',
167
+ title: 'Référence Légale',
168
+ html: '<p>Consultez toujours la Loi 10/2012 pour les cas particuliers d\'exonération partielle ou les remises pour utilisation de moyens télématiques.</p>',
169
+ },
170
+ {
171
+ type: 'title',
172
+ text: 'Conséquences de l\'Omission du Paiement',
173
+ level: 2,
174
+ },
175
+ {
176
+ type: 'paragraph',
177
+ html: 'L\'introduction d\'une action en justice par une partie obligée sans le justificatif de paiement correspondant entraîne une demande de régularisation. Le non-respect de ce délai de 10 jours entraîne le classement définitif des procédures.',
178
+ },
179
+ {
180
+ type: 'card',
181
+ title: 'Avantages de la Simulation Préalable',
182
+ html: '<ul><li>Précision absolue dans la quantification des frais de procédure.</li><li>Évite les retards dus aux erreurs d\'auto-liquidation du Formulaire 696.</li><li>Optimise la prise de décision financière dans la stratégie juridique.</li></ul>',
183
+ },
184
+ {
185
+ type: 'paragraph',
186
+ html: 'Notre <strong>Calculatrice de Frais Judiciaires</strong> garantit que les professionnels et les entreprises opèrent avec des données mises à jour jusqu\'en 2026, respectant la rigueur technique qu\'exige la pratique juridique moderne.',
187
+ },
188
+ ];
189
+
190
+ const faqSchema: WithContext<FAQPage> = {
191
+ '@context': 'https://schema.org',
192
+ '@type': 'FAQPage',
193
+ mainEntity: faqData.map((item) => ({
194
+ '@type': 'Question',
195
+ name: item.question,
196
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
197
+ })),
198
+ };
199
+
200
+ const howToSchema: WithContext<HowTo> = {
201
+ '@context': 'https://schema.org',
202
+ '@type': 'HowTo',
203
+ name: title,
204
+ description,
205
+ step: howToData.map((step, i) => ({
206
+ '@type': 'HowToStep',
207
+ position: i + 1,
208
+ name: step.name,
209
+ text: step.text,
210
+ })),
211
+ };
212
+
213
+ const appSchema: WithContext<SoftwareApplication> = {
214
+ '@context': 'https://schema.org',
215
+ '@type': 'SoftwareApplication',
216
+ name: title,
217
+ description,
218
+ applicationCategory: 'FinanceApplication',
219
+ offers: {
220
+ '@type': 'Offer',
221
+ price: '0',
222
+ priceCurrency: 'EUR',
223
+ },
224
+ };
225
+
226
+ export const content: ToolLocaleContent<CourtFeeCalculatorUI> = {
227
+ slug,
228
+ title,
229
+ description,
230
+ faqTitle: 'Questions Fréquemment Posées',
231
+ bibliographyTitle: 'Sources et Références',
232
+ ui: {
233
+ labelTitle: 'Calculatrice de Frais Judiciaires',
234
+ labelDescription: 'Calculez le montant exact du formulaire 696 selon la juridiction, la procédure et le montant du litige. Pour les entreprises et professionnels espagnols.',
235
+ labelLegalParameters: 'Paramètres Légaux',
236
+ labelEntityType: 'Type de Contribuable',
237
+ labelJurisdiction: 'Juridiction',
238
+ labelProcedure: 'Type de Procédure',
239
+ labelClaimAmount: 'Montant du Litige',
240
+ labelEstimatedSettlement: 'Liquidation Estimée',
241
+ labelExemptSubject: 'Contribuable Exonéré',
242
+ labelFixedQuote: 'Part Fixe (Procédurale)',
243
+ labelVariableQuote: 'Part Variable (0,5% / 0,25%)',
244
+ labelTaxableBase: 'Base Imposable',
245
+ labelCopySettlement: 'Copier la Liquidation',
246
+ labelEntityJuridica: 'Personne Morale (SARL, SA)',
247
+ labelEntityFisica: 'Personne Physique (Exonérée)',
248
+ labelCivilOrder: 'Ordre Civil',
249
+ labelAdministrativeOrder: 'Administratif',
250
+ labelSocialOrder: 'Ordre Social',
251
+ labelModel696: 'Formulaire 696',
252
+ labelOrdinary: 'Jugement Ordinaire',
253
+ labelVerbal: 'Jugement Verbal / Suivi',
254
+ labelExecutive: 'Exécutoire',
255
+ labelAppeal: 'Appel',
256
+ labelCassation: 'Cassation',
257
+ labelAbbreviated: 'Abrégé',
258
+ labelSupplication: 'Supplique',
259
+ currencySymbol: '€',
260
+ currencyCode: 'EUR',
261
+ currencyLocale: 'fr-FR',
262
+ },
263
+ faq: faqData,
264
+ howTo: howToData,
265
+ bibliography: bibliographyData,
266
+ seo: seoData,
267
+ schemas: [faqSchema, howToSchema, appSchema],
268
+ };
@@ -0,0 +1,33 @@
1
+ import type { FinanceToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
+ import CourtFeeCalculatorComponent from './component.astro';
3
+ import CourtFeeCalculatorSEO from './seo.astro';
4
+ import CourtFeeCalculatorBibliography from './bibliography.astro';
5
+ import type { CourtFeeCalculatorUI } from './ui';
6
+
7
+ export type CourtFeeCalculatorLocaleContent = ToolLocaleContent<CourtFeeCalculatorUI>;
8
+
9
+ import { content as es } from './i18n/es';
10
+ import { content as en } from './i18n/en';
11
+ import { content as fr } from './i18n/fr';
12
+
13
+ export const courtFeeCalculator: FinanceToolEntry<CourtFeeCalculatorUI> = {
14
+ id: 'calculadora-tasas-judiciales',
15
+ icons: {
16
+ bg: 'mdi:gavel',
17
+ fg: 'mdi:percent',
18
+ },
19
+ i18n: {
20
+ es: async () => es,
21
+ en: async () => en,
22
+ fr: async () => fr,
23
+ },
24
+ };
25
+
26
+ export { CourtFeeCalculatorComponent, CourtFeeCalculatorSEO, CourtFeeCalculatorBibliography };
27
+
28
+ export const COURT_FEE_CALCULATOR_TOOL: ToolDefinition = {
29
+ entry: courtFeeCalculator,
30
+ Component: CourtFeeCalculatorComponent,
31
+ SEOComponent: CourtFeeCalculatorSEO,
32
+ BibliographyComponent: CourtFeeCalculatorBibliography,
33
+ };
@@ -0,0 +1,86 @@
1
+ export type JurisdictionType = 'civil' | 'contencioso' | 'social';
2
+ export type ProcedureType = 'ordinario' | 'monitorio' | 'ejecutivo' | 'apelacion' | 'casacion' | 'abreviado' | 'cont-ordinario' | 'cont-apelacion' | 'cont-casacion' | 'suplicacion' | 'soc-casacion';
3
+ export type EntityType = 'juridica' | 'fisica';
4
+
5
+ export interface CourtFeeResult {
6
+ isExempt: boolean;
7
+ fixedFee: number;
8
+ variableFee: number;
9
+ totalFee: number;
10
+ taxableBase: number;
11
+ procedureName: string;
12
+ }
13
+
14
+ const FIXED_FEES: Record<JurisdictionType, Record<ProcedureType, number>> = {
15
+ civil: {
16
+ ordinario: 300,
17
+ monitorio: 100,
18
+ ejecutivo: 200,
19
+ apelacion: 800,
20
+ casacion: 1200,
21
+ abreviado: 0,
22
+ 'cont-ordinario': 0,
23
+ 'cont-apelacion': 0,
24
+ 'cont-casacion': 0,
25
+ suplicacion: 0,
26
+ 'soc-casacion': 0,
27
+ },
28
+ contencioso: {
29
+ ordinario: 0,
30
+ monitorio: 0,
31
+ ejecutivo: 0,
32
+ apelacion: 0,
33
+ casacion: 0,
34
+ abreviado: 200,
35
+ 'cont-ordinario': 350,
36
+ 'cont-apelacion': 800,
37
+ 'cont-casacion': 1200,
38
+ suplicacion: 0,
39
+ 'soc-casacion': 0,
40
+ },
41
+ social: {
42
+ ordinario: 0,
43
+ monitorio: 0,
44
+ ejecutivo: 0,
45
+ apelacion: 0,
46
+ casacion: 0,
47
+ abreviado: 0,
48
+ 'cont-ordinario': 0,
49
+ 'cont-apelacion': 0,
50
+ 'cont-casacion': 0,
51
+ suplicacion: 500,
52
+ 'soc-casacion': 600,
53
+ },
54
+ };
55
+
56
+ const PROCEDURE_LABELS: Record<JurisdictionType, Record<ProcedureType, string>> = {
57
+ civil: { ordinario: 'Juicio Ordinario', monitorio: 'Juicio Verbal / Monitorio', ejecutivo: 'Ejecutivo', apelacion: 'Apelación', casacion: 'Casación', abreviado: '', 'cont-ordinario': '', 'cont-apelacion': '', 'cont-casacion': '', suplicacion: '', 'soc-casacion': '' },
58
+ contencioso: { ordinario: '', monitorio: '', ejecutivo: '', apelacion: '', casacion: '', abreviado: 'Abreviado', 'cont-ordinario': 'Ordinario', 'cont-apelacion': 'Apelación', 'cont-casacion': 'Casación', suplicacion: '', 'soc-casacion': '' },
59
+ social: { ordinario: '', monitorio: '', ejecutivo: '', apelacion: '', casacion: '', abreviado: '', 'cont-ordinario': '', 'cont-apelacion': '', 'cont-casacion': '', suplicacion: 'Suplicación', 'soc-casacion': 'Casación' },
60
+ };
61
+
62
+ export class CourtFeeLogic {
63
+ private static getVariableFee(jurisdiction: JurisdictionType, amount: number): number {
64
+ if (jurisdiction === 'social') return 0;
65
+ const variable = amount <= 1000000 ? amount * 0.005 : 5000 + (amount - 1000000) * 0.0025;
66
+ return Math.min(variable, 10000);
67
+ }
68
+
69
+ static calculateFee(
70
+ entityType: EntityType,
71
+ jurisdiction: JurisdictionType,
72
+ procedure: ProcedureType,
73
+ amount: number
74
+ ): CourtFeeResult {
75
+ if (entityType === 'fisica') {
76
+ return { isExempt: true, fixedFee: 0, variableFee: 0, totalFee: 0, taxableBase: 0, procedureName: '' };
77
+ }
78
+ const fixedFee = FIXED_FEES[jurisdiction][procedure] || 0;
79
+ const variableFee = this.getVariableFee(jurisdiction, amount);
80
+ return { isExempt: false, fixedFee, variableFee, totalFee: fixedFee + variableFee, taxableBase: amount, procedureName: procedure };
81
+ }
82
+
83
+ static getProcedureLabel(jurisdiction: JurisdictionType, procedure: ProcedureType): string {
84
+ return PROCEDURE_LABELS[jurisdiction][procedure] || '';
85
+ }
86
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
3
+ import { courtFeeCalculator } from './index';
4
+ import type { KnownLocale } from '../../types';
5
+
6
+ interface Props {
7
+ locale?: KnownLocale;
8
+ }
9
+
10
+ const { locale = 'es' } = Astro.props;
11
+ const content = await courtFeeCalculator.i18n[locale]?.();
12
+ if (!content) return null;
13
+ ---
14
+ <SEORenderer content={{ locale: locale as string, sections: content.seo }} />
@@ -0,0 +1,31 @@
1
+ export interface CourtFeeCalculatorUI {
2
+ labelTitle: string;
3
+ labelDescription: string;
4
+ labelLegalParameters: string;
5
+ labelEntityType: string;
6
+ labelJurisdiction: string;
7
+ labelProcedure: string;
8
+ labelClaimAmount: string;
9
+ labelEstimatedSettlement: string;
10
+ labelExemptSubject: string;
11
+ labelFixedQuote: string;
12
+ labelVariableQuote: string;
13
+ labelTaxableBase: string;
14
+ labelCopySettlement: string;
15
+ labelEntityJuridica: string;
16
+ labelEntityFisica: string;
17
+ labelCivilOrder: string;
18
+ labelAdministrativeOrder: string;
19
+ labelSocialOrder: string;
20
+ labelModel696: string;
21
+ labelOrdinary: string;
22
+ labelVerbal: string;
23
+ labelExecutive: string;
24
+ labelAppeal: string;
25
+ labelCassation: string;
26
+ labelAbbreviated: string;
27
+ labelSupplication: string;
28
+ currencySymbol: string;
29
+ currencyCode: string;
30
+ currencyLocale: string;
31
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
3
+ import { debtSnowball } from './index';
4
+ import type { KnownLocale } from '../../types';
5
+
6
+ interface Props {
7
+ locale?: KnownLocale;
8
+ }
9
+
10
+ const { locale = 'es' } = Astro.props;
11
+ const content = await debtSnowball.i18n[locale]?.();
12
+ ---
13
+
14
+ {content && <SharedBibliography links={content.bibliography} />}