Add professor share calculation and financial reporting feature
Introduces per-class payout configuration (percentage or hourly rate, plus an optional per-session expense allowance), pure calculation utilities for professor payout/net profit/receivables, and a new financial-reports API surface with per-class, per-session, and date-range/monthly reports. Also adds full CRUD for institutional expenses used in the range report, and wires up the new permissions and roles. Fixes a pre-existing ReferenceError (missing parseImportDate import) in paymentService that blocked creating payments with dated transactions.
This commit is contained in:
@@ -90,7 +90,16 @@ const PERMISSIONS = {
|
||||
|
||||
// Pending student registrations
|
||||
PENDING_STUDENTS_READ: 'pending_students:read',
|
||||
PENDING_STUDENTS_UPDATE: 'pending_students:update'
|
||||
PENDING_STUDENTS_UPDATE: 'pending_students:update',
|
||||
|
||||
// Institutional expenses (used for financial reporting)
|
||||
EXPENSES_CREATE: 'expenses:create',
|
||||
EXPENSES_READ: 'expenses:read',
|
||||
EXPENSES_UPDATE: 'expenses:update',
|
||||
EXPENSES_DELETE: 'expenses:delete',
|
||||
|
||||
// Financial reports (professor share, class profitability, date-range analytics)
|
||||
FINANCIAL_REPORTS_READ: 'financial_reports:read'
|
||||
};
|
||||
|
||||
const ALL_PERMISSIONS = Object.values(PERMISSIONS);
|
||||
|
||||
Reference in New Issue
Block a user