HR Settings (إعدادات الموارد البشرية)
Module-level settings for the HRM module — overtime rates, working days, leave policies, payroll configuration, etc.
API Endpoints
| Method | URL | Description |
|---|---|---|
GET | /api/hr/settings | Get all HR settings |
PUT | /api/hr/settings | Update HR settings |
Examples
bash
# Get settings
curl -X GET "https://moon-erp.elbaset.com/api/hr/settings" \
-H "Authorization: Bearer {token}"
# Update settings
curl -X PUT "https://moon-erp.elbaset.com/api/hr/settings" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"hrm.overtime_rate": 1.5,
"hrm.working_days_per_week": 5,
"hrm.weekend_days": ["friday", "saturday"],
"hrm.max_overtime_hours_per_month": 40,
"hrm.eos_calculation_method": "labor_law"
}'dart
// Get settings
final response = await dio.get('/api/hr/settings');
// Update settings
await dio.put('/api/hr/settings', data: {
'hrm.overtime_rate': 1.5,
'hrm.working_days_per_week': 5,
'hrm.weekend_days': ['friday', 'saturday'],
});Common Settings
| Key | Type | Description |
|---|---|---|
hrm.overtime_rate | decimal | Overtime multiplier (e.g., 1.5x) |
hrm.working_days_per_week | integer | Working days per week |
hrm.weekend_days | array | Weekend day names |
hrm.max_overtime_hours_per_month | integer | Max overtime hours allowed |
hrm.eos_calculation_method | string | EOS formula to use |
Business Rules
- Settings use the global settings system with
hrm.prefix - Settings follow the fallback chain: user+branch → branch → company → default
- Only users with
hrm.settings.managepermission can update