# @mostajs/school-billing — fiche LLM RÔLE Frais scolaires : inscription/mensuel/par niveau + remises/promotions + factures/reçus + abonnement mensuel. Autonome/DB-agnostique. Compose (injectés) : payment (encaissement), subscriptions-plan (mensuel), numbering (n° reçu), file-export (reçu). Alimente reporting. Délègue l'élève à @mostajs/school. EXPORTS createSchoolBilling({ repositories, payment?, subscriptionsPlan?, numbering?, fileExport?, now? }) -> { fees, discounts, invoices, subscribeMonthly, revenue } createMemoryRepositories(); FeeSchema, DiscountSchema, InvoiceSchema API fees.define({label,kind:'inscription'|'mensuel'|'niveau',amount})/list ; discounts.define({label,type:'percent'|'amount',value,code})/list/byCode invoices.create(studentId,{feeIds,discountCode|discountId})->{subtotal,reduction,total,receiptNo}/pay(id,{method})/listByStudent/outstanding/get/receipt(id,format) subscribeMonthly(studentId,planId) [subscriptions-plan] ; revenue({from,to}) PIÈGES - remise percent (×%) ou amount (montant fixe, plafonné au subtotal). pay compose payment.charge. mensuel = subscriptions-plan (scope 'student').