54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
label TEXT NOT NULL,
description TEXT NULL,
amount INTEGER NULL,
formula TEXT NULL, -- Formule de calcul du montant de la cotisation, si cotisation dynamique (exemple : membres.revenu_imposable * 0.01)
id_service INTEGER NOT NULL REFERENCES services (id) ON DELETE CASCADE,
id_account INTEGER NULL REFERENCES acc_accounts (id) ON DELETE SET NULL -- NULL si le type n'est pas associé automatiquement à la compta
);
CREATE TABLE IF NOT EXISTS services_users
-- Enregistrement des cotisations et activités
(
id INTEGER NOT NULL PRIMARY KEY,
id_user INTEGER NOT NULL REFERENCES membres (id) ON DELETE CASCADE,
|
|
>
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
label TEXT NOT NULL,
description TEXT NULL,
amount INTEGER NULL,
formula TEXT NULL, -- Formule de calcul du montant de la cotisation, si cotisation dynamique (exemple : membres.revenu_imposable * 0.01)
id_service INTEGER NOT NULL REFERENCES services (id) ON DELETE CASCADE,
id_account INTEGER NULL REFERENCES acc_accounts (id) ON DELETE SET NULL, -- NULL si le type n'est pas associé automatiquement à la compta
id_year INTEGER NULL REFERENCES acc_years (id) ON DELETE SET NULL -- NULL si le type n'est pas associé automatiquement à la compta
);
CREATE TABLE IF NOT EXISTS services_users
-- Enregistrement des cotisations et activités
(
id INTEGER NOT NULL PRIMARY KEY,
id_user INTEGER NOT NULL REFERENCES membres (id) ON DELETE CASCADE,
|