@mostajs/school-billing
v0.1.0
Published
Frais scolaires : inscription/mensuel/par niveau, remises & promotions, factures/reçus, abonnement mensuel. DB-agnostique ; compose payment/subscriptions-plan/numbering/file-export. Alimente reporting.
Maintainers
Readme
@mostajs/school-billing
Auteur : Dr Hamid MADANI [email protected] · Licence : AGPL-3.0-or-later · Statut : 0.1.0 (6 tests verts)
Frais scolaires + remises/promotions + factures/reçus + mensuel. Autonome ; compose payment/subscriptions-plan/numbering/file-export.
import { createSchoolBilling, createMemoryRepositories } from '@mostajs/school-billing';
const b = createSchoolBilling({ repositories: createMemoryRepositories(), payment, numbering });
const f = await b.fees.define({ label:'Mensualité', kind:'mensuel', amount:6000 });
await b.discounts.define({ label:'Fratrie -15%', type:'percent', value:15, code:'FRATRIE' });
const inv = await b.invoices.create(studentId, { feeIds:[f.id], discountCode:'FRATRIE' });
await b.invoices.pay(inv.id, { method:'cib' });Lancer : node test-scripts/unit/school-billing.test.mjs && node examples/frais/run.mjs
