feat(04-03): Vendor, ExpenseCategory, Expense schema + category seeding + COA additions
- Add ExpenseStatus and ExpensePaymentMethod enums - Add Vendor model (@@unique([tenantId, name])) - Add ExpenseCategory model with accountCode linking to COA - Add Expense model with approval workflow and JE reference - Add User relations: createdExpenses, approvedExpenses - Add COA accounts 5080 Fuel/Transportation, 5085 Rent Expense (31 total) - Seed 9 default expense categories in createTenant transaction - Add Vendor subject to CASL types, Expense/Vendor permissions for OFFICE_STAFF Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,10 @@ export function definePermissionsFor(
|
||||
can("update", "TechnicianProfile");
|
||||
// Inventory management
|
||||
can("manage", "Inventory");
|
||||
// Expense management (record, list, view)
|
||||
can("manage", "Expense");
|
||||
// Vendor management (CRUD)
|
||||
can("manage", "Vendor");
|
||||
// Job type rates (read-only for office staff — admin configures rates)
|
||||
can("read", "JobTypeRate");
|
||||
// View financial reports (read-only)
|
||||
|
||||
Reference in New Issue
Block a user