Skip to content

Refli explores how Belgian compensations are computed. This repository contains the public website and data.

Notifications You must be signed in to change notification settings

hypered/refli.be

Repository files navigation

Refli

→ Exploring how Belgian compensations are computed.

The goal of Refli is to make Belgian employee compensation rules approachable for everyone, by providing documentation, data, and computation tools. Those should be relevant for everyone, including professionals and developers.

This project is currently in an early stage.

Withholding tax

The withholding tax (or "précompte professionnel" in French) is described in the Belgian official journal. The relevant parts are listed on the FPS Finance website (although only in Dutch and French).

In particular there are three links. The data of the second one, Barèmes 1er janvier 2021, are available in source code form in Refli.Data.Scales.

Publicodes

A simple set of rules written in Publicodes to compute a net revenue given a gross income is provided in publicodes/compensation.yaml.

Provided the publicodes NPM package is installed, displaying the result with intermediate values can be done with the helper script run-publicodes.sh.

Some code in compensation.yaml is generated with the withholding-tax/scales.hs script. E.g.:

$ nix-shell --run 'runghc -isrc/ -XNoImplicitPrelude withholding-tax/scales.hs worker-scale-1'

Gross/net salary simulations

Some data collected manually using those simulations are in tests/examples.hs.

Self-employed social contributions simulations

The e-loket (or e-guichet, e-counter) seems to be Ventouris, an application written by Cegeka for multiple SIFs.

Other simulations

Serving refli.be

The refli.be website is running some closed source code, but most of its content is a set of static files defined in this repository. To create a root directory and serve it locally, use the scripts/serve.sh script:

$ scripts/serve.sh
/nix/store/bh131nxx7rpgmlsb72l8anlx53kxdc92-all-with-static
You can now visit http://127.0.0.1:9000/.
^C

Under NixOS, adding an Nginx virtual host looks like this (where refli-be is this directory, and static is provided by hypered/design):

    virtualHosts."refli.be" = {
      forceSSL = true;
      enableACME = true;
      locations = {
        "/".alias = (import refli-be {}).site + "/";
        "/static/".alias = static + "/";
      };
    };

Note: Some pages use HTML comments triggering the SSI (server-side include) feature of Nginx. It means they pull some additional content served, normally, by the closed source backend.

refli.be

Refli.be is hosted on a droplet at Digital Ocean.

Favicon

The favicon is a manually written SVG file, converted to PNG, then to ICO:

$ nix-shell -p inkscape --run \
  'inkscape -w 512 -h 512 letter-R-favicon.svg --export-filename letter-R-favicon.png'
$ nix-shell -p imagemagick --run \
  'convert letter-R-favicon.png -define icon:auto-resize=256,64,48,32,16 favicon.ico'

To add a white background:

$ inkscape -w 512 -h 512 -b FFFFFF letter-R-favicon.svg --export-filename letter-R-favicon.png

Note: I had to remove the font-face definition from the SVG file, or I add an error.

pikchr

For files with the .pikchr extension, use something like

$ pikchr --svg-only pages/fr/blog/introducing-layers.pikchr > introducing-layers.svg

About

Refli explores how Belgian compensations are computed. This repository contains the public website and data.

Resources

Stars

Watchers

Forks