{
  "name": "thai_net_salary",
  "slug": "net-salary",
  "description": {
    "th": "คำนวณเงินเดือนสุทธิต่อเดือนของพนักงานไทย หักประกันสังคม กองทุนสำรองเลี้ยงชีพ และภาษีหัก ณ ที่จ่าย (ภ.ง.ด.1) แบบเฉลี่ยทั้งปี รวมภาษีเดือนที่ได้โบนัส และเงินที่นายจ้างจ่ายต่อเดือน พร้อมลิงก์เปิดเครื่องคำนวณ",
    "en": "Computes a Thai employee’s monthly take-home pay after social security, provident fund and annualised PND 1 withholding tax, plus the extra tax in the bonus month and the employer’s monthly cost. Returns a link to the calculator."
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "monthly": {
        "description": "Monthly salary, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "otherMonthly": {
        "description": "Other regular monthly pay for normal working hours (not OT), baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "bonusYear": {
        "description": "Bonus for the year, baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      },
      "sso": {
        "description": "Insured under social security section 33; default true.",
        "type": "boolean"
      },
      "date": {
        "description": "Pay month as YYYY-MM-DD (Gregorian); picks the social-security wage ceiling and tax year. Default today.",
        "type": "string"
      },
      "spouse": {
        "description": "Spouse with no income (spouse allowance).",
        "type": "boolean"
      },
      "children": {
        "description": "Children claimed.",
        "type": "integer",
        "minimum": 0,
        "maximum": 99
      },
      "childrenExtra": {
        "description": "Of the children, how many get the extra allowance (2nd+ born 2018 or later); at most children − 1.",
        "type": "integer",
        "minimum": 0,
        "maximum": 98
      },
      "parents": {
        "description": "Parents (own and spouse) aged 60+ claimed.",
        "type": "integer",
        "minimum": 0,
        "maximum": 4
      },
      "providentPercent": {
        "description": "Employee provident-fund rate, percent of the monthly salary (0–15).",
        "type": "number",
        "minimum": 0,
        "maximum": 15
      },
      "otherDeductions": {
        "description": "Other yearly allowances the employee declared (insurance, home-loan interest ...), baht.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      }
    },
    "required": [
      "monthly"
    ],
    "additionalProperties": false
  }
}
