# @mostajs/school-billing
**Auteur** : Dr Hamid MADANI <drmdh@msn.com> · **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.
```js
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`
