From dfc2fbf830c4968fc87785e64aa1ccd2cf12d8a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Duveau?= Date: Sat, 19 Oct 2024 17:32:12 -0300 Subject: [PATCH] Clean up main branch --- OLD site/favicon/512x512.png | Bin 12729 -> 0 bytes OLD site/favicon/favicon.png | Bin 285 -> 0 bytes OLD site/index.html | 155 ----------------------------------- OLD site/script.js | 96 ---------------------- SVELTE.md | 107 ------------------------ 5 files changed, 358 deletions(-) delete mode 100644 OLD site/favicon/512x512.png delete mode 100644 OLD site/favicon/favicon.png delete mode 100644 OLD site/index.html delete mode 100644 OLD site/script.js delete mode 100644 SVELTE.md diff --git a/OLD site/favicon/512x512.png b/OLD site/favicon/512x512.png deleted file mode 100644 index c8b9db0e207210a539f0c32324e1acacf777c181..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12729 zcmeHt`8$;D-~Tn!$Ouu0WZ%hFwvZ?>$QCn*2IWS$?OWCvt#?tf?@L)SBTIL(o8hC) z9-^$HWvtnEW6X2*={`Qs_xL`4!1p-555J7#y3Xrd-uwA_y&qVbqu3AeAA%r=-Pq`& z6$HV-zig)~`dQHJ z;PLXeMKC5_qbr7kH{!B5OOK|d|Cz!wR+b+74jXhO>0z5 z)}GI#Wc8n=H+PC$GC-Q@OR(HMzkDn1s(UdlaxvUZ1kYyb)E&ALv9sNU^Y0GpS>4S| z>-06Z$W#2rix7ceNIeMdk1)CFa!4P7bK)U{hzJ6I>GyL^qy%{I*xdEkAn*>}Ecj~x zc!@X)o}iwe{$~c*#Npo~5O5X|D5k*r`0uIkkRS6uYs4Tp@y)#iwtp|ksRz{_`1fK^ zj2;}RH!+RA_j_UyX!Q38yq*XQA>tP#_s_OCp@rWg^hBP3&79Fn5&gYMBozA3#yO3^ z6M>xe-xI?Sc}vzq!2e65at=c_v)BqeYqb?34sCE6m!hR?JU^OyKFhH5PDQ<+ zXsEwl6tq0oqxG$?CVSOV`5>`@vvxL9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mjFZDJG!~#CG%QdU_gnJ_* z%GOh@f&%+ZBRwn+ZkCl$=TPH&M6AIH)P`(y0R$?zo1SI%K^wHkeFdfQHrAgB)$fV2 z?nbUAeX>@^qX`o?jZ0N`uON2qQ-SJTHRo33??UoD*t{XnEoOSIeUNWKxJ4N?&#M=E zyPAIASk1}HE0D3!wvi=0N}|V{+cjeh8J?o)uexw$*87$Xr+BGq+KCT{56t=*qb|8N z5g!k49zRedAT=bzpg?ABGP- z@)*y}=D&CG>lc+R*GetU2`-4cW!KYw*5b?FqIq*49yL0q=ylyluPu(*N&QBH!RcK; zo-?jdO!j`kX3h{gk>S8ywg)=J*7_|#uPtDi(jXMTb0o4Dm&hCnYec)I$ztaD0e0s!-~ZkqrA diff --git a/OLD site/index.html b/OLD site/index.html deleted file mode 100644 index 728681b..0000000 --- a/OLD site/index.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - Calculateur impôts stock-options - - - - - - - - - - - - - - - - - - - - - - - - -
-

Calculateur impôts stock-options

-

Informations

-

-

    -
  • Le calculateur est conçu pour les stock-options émises après 2017 (avant cette date il y a - d'autres - règles plus avantageuses).
  • -
  • Les résultats sont à 1€ près. Vous pourriez rencontrer des erreurs d'arrondis.
  • -
  • Le calculateur ne fait pas de conversion de devises et considère que tous les chiffres sont donnés en euros.
  • -
-

-
- Mes options sont dans un PEE -

Dans un PEE, la fiscalité est différente. Seul les prélèvements sociaux sont dûs. Ne tenez pas compte de - l'impôt sur le revenu dans les résultats.

-
-
-
-
-

Calculateur

-
-
- - - Prix payé pour obtenir l'action. Prix de l'option. - - - - Au moment de l'achat. - - - - -
-
- - - En valeur (en €), pas en %. Cela correspond à une remise au moment - où vous avez reçu les options. Les actions valaient 100€ quand vous avez reçu vos options et - votre employeur vous donne - des options à 80€, vous avez 20€ de rabais. - - - - - - - Votre dernière tranche d'imposition. -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - diff --git a/OLD site/script.js b/OLD site/script.js deleted file mode 100644 index 1f74ba6..0000000 --- a/OLD site/script.js +++ /dev/null @@ -1,96 +0,0 @@ -function compute() { - var validationErrors = 0; - const marketValue = validate('marketValue'); - const pricePaid = validate('pricePaid'); - const priceSold = validate('priceSold'); - const discount = validate('discount'); - const numberOfActions = validate('numberOfActions'); - const taxRate = validate('taxRate') / 100; - if (validationErrors > 0) { return; } - - const tauxPrelevementsSociaux = (9.2 + 0.5 + 7.5) / 100 - const PFU = 12.8 / 100; - - // Rabais - var rabaisExcedentaireTotal = Math.max((discount - (marketValue * 5 / 100)) * numberOfActions, 0); - var rabaisExcedentaireImpot = rabaisExcedentaireTotal * taxRate; - var rabaisExcedentaireSociaux = rabaisExcedentaireTotal * tauxPrelevementsSociaux; - var rabaisExcedentaireTaxes = rabaisExcedentaireImpot + rabaisExcedentaireSociaux; - - display(rabaisExcedentaireImpot, 'rabaisExcedentaireImpot'); - display(rabaisExcedentaireSociaux, 'rabaisExcedentaireSociaux'); - display(rabaisExcedentaireTaxes, 'rabaisExcedentaireTaxes'); - - // Levée d'options - var leveeOptionTotal = Math.max((marketValue - (pricePaid + discount)) * numberOfActions, 0); - var leveeOptionImpot = leveeOptionTotal * taxRate; - var leveeOptionSociaux = leveeOptionTotal * (tauxPrelevementsSociaux + 10 / 100) - var leveeOptionTaxes = leveeOptionImpot + leveeOptionSociaux; - - display(leveeOptionImpot, 'leveeOptionImpot'); - display(leveeOptionSociaux, 'leveeOptionSociaux'); - display(leveeOptionTaxes, 'leveeOptionTaxes'); - - // Plus value - var withPFU = (taxRate > PFU); - - var plusValueTotal = Math.max((priceSold - marketValue), 0) * numberOfActions; - var plusValueImpot = withPFU ? plusValueTotal * PFU : plusValueTotal * taxRate; - var plusValueSociaux = plusValueTotal * tauxPrelevementsSociaux - var plusValueTaxes = plusValueImpot + plusValueSociaux; - - display(plusValueImpot, 'plusValueImpot'); - display(plusValueSociaux, 'plusValueSociaux'); - display(plusValueTaxes, 'plusValueTaxes'); - - // Total - var taxImpot = rabaisExcedentaireImpot + leveeOptionImpot + plusValueImpot; - var taxSociaux = rabaisExcedentaireSociaux + leveeOptionSociaux + plusValueSociaux; - var taxTaxes = taxImpot + taxSociaux - var totalCost = (numberOfActions * pricePaid) + rabaisExcedentaireImpot + rabaisExcedentaireSociaux + leveeOptionImpot + leveeOptionSociaux - var totalSale = (numberOfActions * priceSold) - var totalBenefit = totalSale - taxTaxes - - display(taxImpot, 'taxImpot'); - display(taxSociaux, 'taxSociaux'); - display(taxTaxes, 'taxTaxes'); - display(totalCost, 'totalCost'); - display(totalSale, 'totalSale'); - display(totalBenefit, 'totalBenefit'); - document.getElementById("withPFU").innerText = (withPFU ? 'Oui' : 'Non'); - - document.getElementById('resultHr').removeAttribute('hidden'); - document.getElementById('resultTitle').removeAttribute('hidden'); - document.getElementById('result').removeAttribute('hidden'); - document.getElementById('summary').removeAttribute('hidden'); -} - -function format(value){ - const formatter = new Intl.NumberFormat('fr-FR', { - style: 'currency', - currency: 'EUR', - minimumFractionDigits: 0, - maximumFractionDigits: 0 - }); - - return formatter.format(value); -} - -function display(value, key) { - document.getElementById(key).innerText = format(value); -} - -function validate(key) { - const element = document.getElementById(key); - const value = element.value; - - element.removeAttribute('aria-invalid'); - - if (value < 0 || value === '') { - element.setAttribute('aria-invalid', true); - validationErrors++; - return; - } - - return Number(value); -} \ No newline at end of file diff --git a/SVELTE.md b/SVELTE.md deleted file mode 100644 index d488b3c..0000000 --- a/SVELTE.md +++ /dev/null @@ -1,107 +0,0 @@ -# This repo is no longer maintained. Consider using `npm init vite` and selecting the `svelte` option or — if you want a full-fledged app framework — use [SvelteKit](https://kit.svelte.dev), the official application framework for Svelte. - ---- - -# svelte app - -This is a project template for [Svelte](https://svelte.dev) apps. It lives at https://github.com/sveltejs/template. - -To create a new project based on this template using [degit](https://github.com/Rich-Harris/degit): - -```bash -npx degit sveltejs/template svelte-app -cd svelte-app -``` - -*Note that you will need to have [Node.js](https://nodejs.org) installed.* - - -## Get started - -Install the dependencies... - -```bash -cd svelte-app -npm install -``` - -...then start [Rollup](https://rollupjs.org): - -```bash -npm run dev -``` - -Navigate to [localhost:8080](http://localhost:8080). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes. - -By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the `sirv` commands in package.json to include the option `--host 0.0.0.0`. - -If you're using [Visual Studio Code](https://code.visualstudio.com/) we recommend installing the official extension [Svelte for VS Code](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). If you are using other editors you may need to install a plugin in order to get syntax highlighting and intellisense. - -## Building and running in production mode - -To create an optimised version of the app: - -```bash -npm run build -``` - -You can run the newly built app with `npm run start`. This uses [sirv](https://github.com/lukeed/sirv), which is included in your package.json's `dependencies` so that the app will work when you deploy to platforms like [Heroku](https://heroku.com). - - -## Single-page app mode - -By default, sirv will only respond to requests that match files in `public`. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere. - -If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for *any* path. You can make it so by editing the `"start"` command in package.json: - -```js -"start": "sirv public --single" -``` - -## Using TypeScript - -This template comes with a script to set up a TypeScript development environment, you can run it immediately after cloning the template with: - -```bash -node scripts/setupTypeScript.js -``` - -Or remove the script via: - -```bash -rm scripts/setupTypeScript.js -``` - -If you want to use `baseUrl` or `path` aliases within your `tsconfig`, you need to set up `@rollup/plugin-alias` to tell Rollup to resolve the aliases. For more info, see [this StackOverflow question](https://stackoverflow.com/questions/63427935/setup-tsconfig-path-in-svelte). - -## Deploying to the web - -### With [Vercel](https://vercel.com) - -Install `vercel` if you haven't already: - -```bash -npm install -g vercel -``` - -Then, from within your project folder: - -```bash -cd public -vercel deploy --name my-project -``` - -### With [surge](https://surge.sh/) - -Install `surge` if you haven't already: - -```bash -npm install -g surge -``` - -Then, from within your project folder: - -```bash -npm run build -surge public my-project.surge.sh -```