Skip to content

HR Settings (إعدادات الموارد البشرية)

Module-level settings for the HRM module — overtime rates, working days, leave policies, payroll configuration, etc.

API Endpoints

MethodURLDescription
GET/api/hr/settingsGet all HR settings
PUT/api/hr/settingsUpdate 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

KeyTypeDescription
hrm.overtime_ratedecimalOvertime multiplier (e.g., 1.5x)
hrm.working_days_per_weekintegerWorking days per week
hrm.weekend_daysarrayWeekend day names
hrm.max_overtime_hours_per_monthintegerMax overtime hours allowed
hrm.eos_calculation_methodstringEOS 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.manage permission can update

Moon ERP API Documentation