From 2e1516ce48032a2d1623a3e2f472e82914307615 Mon Sep 17 00:00:00 2001 From: Daniele Viti Date: Wed, 24 Sep 2025 00:36:22 +0200 Subject: [PATCH] Update index.html --- index.html | 149 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 143 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index ceff652..9590da8 100644 --- a/index.html +++ b/index.html @@ -321,10 +321,12 @@ @@ -365,6 +367,64 @@ + + +
@@ -803,6 +863,13 @@ supportRate: 40, estimatedAnnualTaxable: 25000, includeINPS: true, + + // SRL/SRLS specific + iresRate: 24, // IRES standard 24% + irapRate: 3.9, // IRAP standard 3.9% + deductibleCosts: 5000, // Costi deducibili stimati + adminCompensation: 0, // Compenso amministratore + mvpDevHours: 100, mvpSupportHours: 20, mvpTeamLeader: '', @@ -968,10 +1035,10 @@ // Computed properties for UI get showInpsCharge() { - return this.taxRegime !== 'occasionale'; + return this.taxRegime !== 'occasionale' && this.taxRegime !== 'srl' && this.taxRegime !== 'srls'; }, get showIva() { - return this.taxRegime === 'ordinario'; + return this.taxRegime === 'ordinario' || this.taxRegime === 'srl' || this.taxRegime === 'srls'; }, get showWithholdingTax() { return this.taxRegime === 'ordinario' || this.taxRegime === 'occasionale'; @@ -980,7 +1047,7 @@ return this.taxRegime !== 'occasionale'; }, get showInpsDue() { - return this.taxRegime !== 'occasionale'; + return this.taxRegime !== 'occasionale' && this.taxRegime !== 'srl' && this.taxRegime !== 'srls'; }, // Labels @@ -1021,6 +1088,15 @@ netRevenue: 'Reddito Imponibile', taxDue: 'Imposta Sostitutiva (5%)' }; + case 'srl': + case 'srls': + return { + ...baseLabels, + subtotal: 'Imponibile', + grossRevenue: 'Fatturato Societario', + netRevenue: 'Utile Lordo', + taxDue: `IRES (${this.iresRate}%) + IRAP (${this.irapRate}%)` + }; default: return baseLabels; } @@ -1038,7 +1114,7 @@ const subtotal = mvpCost + totalCustomCost; - const inpsCharge = (this.taxRegime !== 'occasionale' && this.includeINPS) + const inpsCharge = (this.taxRegime !== 'occasionale' && this.taxRegime !== 'srl' && this.taxRegime !== 'srls' && this.includeINPS) ? subtotal * 0.04 : 0; @@ -1051,6 +1127,10 @@ return this.calculateOccasionale(subtotal); case 'minimi': return this.calculateMinimi(subtotal, inpsCharge); + case 'srl': + return this.calculateSRL(subtotal); + case 'srls': + return this.calculateSRLS(subtotal); default: return this.getEmptyResults(); } @@ -1141,6 +1221,53 @@ netRevenue: taxableIncome, inpsDue, taxDue, netIncome }; }, + calculateSRL(subtotal) { + // SRL calculation + const iva = subtotal * 0.22; + const totalInvoice = subtotal + iva; + const amountDue = totalInvoice; // No ritenuta per SRL + + const grossRevenue = subtotal; // Fatturato senza IVA (IVA è neutra) + const sellerFee = grossRevenue * 0.10; + const revenueAfterFee = grossRevenue - sellerFee; + + // Deduzione costi e compenso amministratore + const totalDeductions = this.deductibleCosts + this.adminCompensation; + const taxableIncome = Math.max(0, revenueAfterFee - totalDeductions); + + // Calcolo IRES e IRAP + const iresAmount = taxableIncome * (this.iresRate / 100); + const irapBase = revenueAfterFee; // IRAP si calcola sul valore della produzione + const irapAmount = irapBase * (this.irapRate / 100); + const totalTax = iresAmount + irapAmount; + + const netIncome = revenueAfterFee - totalDeductions - totalTax; + + return { + subtotal, + inpsCharge: 0, + iva, + totalInvoice, + withholdingTax: 0, + amountDue, + grossRevenue, + sellerFee, + netRevenue: revenueAfterFee, + inpsDue: 0, // Le SRL non hanno INPS gestione separata + taxDue: totalTax, + netIncome, + // Additional SRL specific values for reporting + iresAmount, + irapAmount, + deductions: totalDeductions + }; + }, + + calculateSRLS(subtotal) { + // SRLS calculation (same as SRL but with potentially lower setup costs) + return this.calculateSRL(subtotal); + }, + getEmptyResults() { return { subtotal: 0, inpsCharge: 0, iva: 0, totalInvoice: 0, withholdingTax: 0, amountDue: 0, grossRevenue: 0, @@ -1227,6 +1354,11 @@ supportRate: this.supportRate, estimatedAnnualTaxable: this.estimatedAnnualTaxable, includeINPS: this.includeINPS, + // SRL/SRLS fields + iresRate: this.iresRate, + irapRate: this.irapRate, + deductibleCosts: this.deductibleCosts, + adminCompensation: this.adminCompensation, mvpDevHours: this.mvpDevHours, mvpSupportHours: this.mvpSupportHours, mvpTeamLeader: this.mvpTeamLeader, @@ -1275,6 +1407,11 @@ this.supportRate = preventivo.supportRate || this.supportRate; this.estimatedAnnualTaxable = preventivo.estimatedAnnualTaxable || this.estimatedAnnualTaxable; this.includeINPS = preventivo.includeINPS !== undefined ? preventivo.includeINPS : this.includeINPS; + // SRL/SRLS fields + this.iresRate = preventivo.iresRate || this.iresRate; + this.irapRate = preventivo.irapRate || this.irapRate; + this.deductibleCosts = preventivo.deductibleCosts || this.deductibleCosts; + this.adminCompensation = preventivo.adminCompensation || this.adminCompensation; this.mvpDevHours = preventivo.mvpDevHours || this.mvpDevHours; this.mvpSupportHours = preventivo.mvpSupportHours || this.mvpSupportHours; this.mvpTeamLeader = preventivo.mvpTeamLeader || '';