MCP Control
Расчёт выплат · Чувствительное действие

Расчёт выплат · Исправление · Платежи

payroll_correct_payment
Кассовый чек, калькулятор и монеты

Попробуйте три запроса

Подготовить
  1. Вы указываетеPayeeid
  2. ПомощникПодготовка
  3. Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Расчёт выплат / Исправление / Платежи». Для изменения нужны payeeId, periodStart. Покажи объект и ожидаемый эффект до выполнения.
Что входит в подготовку
payeeId
Параметр
periodStart
Параметр
periodEnd
Параметр
Применить
  1. Вы указываетеСогласованные значения
  2. ПомощникОдин вызов
  3. Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Расчёт выплат / Исправление / Платежи» с параметром payeeId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
Фрагмент учебных параметров
payeeId
DEMO-101
accountId
DEMO-101
categoryId
DEMO-101
Проверить итог
  1. Вы указываетеИсходный ответ
  2. ПомощникСверка результата
  3. Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Расчёт выплат / Исправление / Платежи» по исходному ответу. Покажи тип операции, payment. Объясни, чем подтвердить эффект для выбранного объекта.
Как сверить изменение
  1. До измененияПрочитать версию
  2. При записиПередать выбранную версию
  3. После ответаПеречитать объект
Как работает действие

Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.

Описание разработчика

Correct one unchanged payroll bookkeeping payment atomically: append its exact inverse and record the explicit replacement expense for a currently verified employee and explicit period. Both effects commit together or neither does. Currency must remain unchanged; no conversion, bank transfer, earnings calculation or final settlement occurs. Requires current OAuth and employee permissions and current protected payroll/finance authority. Recover uncertainty through payroll_get_correct_payment_result.

Параметры запроса
payeeId
Exact employee Firebase UID. The server requires active protected membership in this company plus a consistent employee profile; a profile label alone is insufficient. обязательно по схеме · string
periodStart
Explicit inclusive payroll period start, YYYY-MM-DD. This labels the completed payment; no earnings are calculated. обязательно по схеме · string
periodEnd
Explicit inclusive payroll period end, YYYY-MM-DD, on or after periodStart and at most 366 days later. обязательно по схеме · string
amount
Amount already paid to this employee, in the selected account’s native units. This does not send money or establish salary owed. обязательно по схеме · number · максимум 1000000000000
accountId
Existing company financial account that funded the completed payment. Currency is resolved from this account. обязательно по схеме · string
categoryId
Existing company expense-enabled category. This operation does not create categories or infer a payroll category. обязательно по схеме · string
paidAt
When the payment occurred, with an explicit time zone and at most six fractional second digits. Future dates beyond five minutes are rejected; omitted means server commit time. необязательно · string
comment
Business reason for recording or correcting an already completed employee payment. Never include credentials. обязательно по схеме · string · до символов 1000
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
paymentId
An immutable payment ID created by payroll_record_payment or payroll_correct_payment. Legacy salary, manual-finance and provider transactions are excluded. обязательно по схеме · string
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · string
Что вернёт команда
operation
Explicit bookkeeping operation performed atomically. обязательно по схеме · string · варианты record, reverse, correct
payment
New expense record for record/correct, or null for a reversal. обязательно по схеме · object / null
reversedPaymentId
Original payment reversed by reverse/correct, or null for a new record. обязательно по схеме · string / null
reversal
Appended inverse effect, or null for a new record. обязательно по схеме · object / null
Поля и технические схемы
Входные поля и поля ответа payroll_correct_payment
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "payeeId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Exact employee Firebase UID. The server requires active protected membership in this company plus a consistent employee profile; a profile label alone is insufficient."
    },
    "periodStart": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
      "description": "Explicit inclusive payroll period start, YYYY-MM-DD. This labels the completed payment; no earnings are calculated."
    },
    "periodEnd": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
      "description": "Explicit inclusive payroll period end, YYYY-MM-DD, on or after periodStart and at most 366 days later."
    },
    "amount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000000000,
      "description": "Amount already paid to this employee, in the selected account’s native units. This does not send money or establish salary owed."
    },
    "accountId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Existing company financial account that funded the completed payment. Currency is resolved from this account."
    },
    "categoryId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Existing company expense-enabled category. This operation does not create categories or infer a payroll category."
    },
    "paidAt": {
      "description": "When the payment occurred, with an explicit time zone and at most six fractional second digits. Future dates beyond five minutes are rejected; omitted means server commit time.",
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "comment": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000,
      "description": "Business reason for recording or correcting an already completed employee payment. Never include credentials."
    },
    "requestId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Stable identifier for this exact operation. Reuse unchanged arguments after an uncertain response."
    },
    "paymentId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "An immutable payment ID created by payroll_record_payment or payroll_correct_payment. Legacy salary, manual-finance and provider transactions are excluded."
    },
    "expectedRevision": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$",
      "description": "Exact immutable payment revision returned by a successful payment record or correction."
    }
  },
  "required": [
    "payeeId",
    "periodStart",
    "periodEnd",
    "amount",
    "accountId",
    "categoryId",
    "comment",
    "requestId",
    "paymentId",
    "expectedRevision"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "operation": {
      "type": "string",
      "enum": [
        "record",
        "reverse",
        "correct"
      ],
      "description": "Explicit bookkeeping operation performed atomically."
    },
    "payment": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "paymentId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
              "description": "Canonical immutable expense transaction ID for this recorded employee payment."
            },
            "payeeId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
              "description": "Verified employee recipient, stored in the protected operation receipt rather than overloading the native ledger author field."
            },
            "periodStart": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "description": "Recorded inclusive pay-period start; not calculated earnings."
            },
            "periodEnd": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "description": "Recorded inclusive pay-period end; not proof of final payroll settlement."
            },
            "amount": {
              "type": "number",
              "exclusiveMinimum": 0,
              "description": "Recorded expense amount in native account units."
            },
            "currency": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32,
              "description": "Currency marker copied from the verified source account."
            },
            "accountId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
              "description": "Company financial account debited by this entry."
            },
            "categoryId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
              "description": "Verified expense-enabled category."
            },
            "paidAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
              "description": "Recorded absolute time of the completed payment."
            },
            "recordedBy": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
              "description": "Connected employee who recorded the entry; this remains the native transactions.user_id author."
            },
            "comment": {
              "type": "string",
              "maxLength": 1000,
              "description": "Recorded business reason."
            },
            "revision": {
              "type": "string",
              "pattern": "^[a-f0-9]{32}$",
              "description": "Exact immutable payment revision returned by a successful payment record or correction."
            }
          },
          "required": [
            "paymentId",
            "payeeId",
            "periodStart",
            "periodEnd",
            "amount",
            "currency",
            "accountId",
            "categoryId",
            "paidAt",
            "recordedBy",
            "comment",
            "revision"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "New expense record for record/correct, or null for a reversal."
    },
    "reversedPaymentId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
        },
        {
          "type": "null"
        }
      ],
      "description": "Original payment reversed by reverse/correct, or null for a new record."
    },
    "reversal": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "transactionId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
              "description": "Appended inverse credit transaction; the original expense remains immutable."
            },
            "accountId": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
              "description": "Original source account receiving the inverse bookkeeping effect."
            },
            "amount": {
              "type": "number",
              "exclusiveMinimum": 0,
              "description": "Exact original amount reversed without currency conversion."
            },
            "currency": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32,
              "description": "Unchanged original account currency."
            },
            "recordedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
              "description": "Server timestamp of the correcting bookkeeping entry."
            }
          },
          "required": [
            "transactionId",
            "accountId",
            "amount",
            "currency",
            "recordedAt"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Appended inverse effect, or null for a new record."
    }
  },
  "required": [
    "operation",
    "payment",
    "reversedPaymentId",
    "reversal"
  ],
  "additionalProperties": false
}