# `Sp_BtnEventCalculatewages_financial` (procedure)


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sProInParam` | `longtext` |
| 2 | IN | `sMakePerson` | `varchar(100)` |
| 3 | IN | `sBrId` | `varchar(100)` |
| 4 | IN | `sSuId` | `varchar(100)` |
| 5 | OUT | `sReturn` | `varchar(1000)` |
| 6 | OUT | `sCode` | `int` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_BtnEventCalculatewages_financial`'`._

## Narrative

**Business context:** 工人计件工资 / 财务确认 — finance-side variant of `Sp_BtnEventCalculatewages`. Same flow (verify master `bCheck=1`, gate by user's 部门 vs machine 部门, compute `dAllMoney`/`dWageMoney` via `Sp_System_ReplaceField`) but the department-mismatch error swaps to the localised `sSupervisorDepartNotMatch` ("本设备对应的部门主管,与当前用户所在部门不匹配,禁止确认非本部门数据") to make the message specific to the finance step.

**What it does:** Identical to `Sp_BtnEventCalculatewages` — see that procedure for the per-line update of `mftproductionreportslave` (`bAffirm, sAffirm, tAffirmDate, dEmpHour, dTimeMoney`) and the `sPayrollCalculate` branch over `mftproductionreportemployee` rows.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — 工资查询/财务确认 toolbar button names this proc as its action. Internally calls `Sp_System_ReplaceField`. Twin: `Sp_BtnEventCalculatewages` (production-side confirm).
