meta {
  name: Create Salary Advance
  type: POST
  body: json
}

headers {
  Authorization: Bearer {{token}}
  X-Company-Id: {{company_uuid}}
  Accept: application/json
  Content-Type: application/json
}

url: {{base_url}}/api/v1/payroll/salary-advances

body: json {
  {
    "employee_id": 123,
    "month": 6,
    "year": 2026,
    "request_method": "percentage",
    "requested_value": 50,
    "reason": "Payroll running late this month"
  }
}

note: |
  `amount` is resolved server-side and is rejected if sent — fixed takes the value
  as-is, percentage resolves to basis_gross x value / 100. `basis_gross` is frozen
  from the employee's active salary so a later revision cannot change what this
  advance was worth.

  422 when the month's total would break either ceiling; the response `meta` carries
  the remaining headroom. 422 when the employee has no active salary.
  409 when advances are disabled, or the period's payroll run is already approved.
