# `Sp_BtnEvent_DeliverGoodsFinanceSlave` (procedure)

> 送货单财务批量确认


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

## Parameters

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

## Body

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

## Narrative

**Business context:** 销售 / 送货单 — per-line variant of `Sp_BtnEvent_DeliverGoodsFinance`: finance confirms individual `saldelivergoodsslave` rows ("送货单财务批量确认") rather than the whole master, so a delivery-note can be partially confirmed line-by-line.

**What it does:** Walks `$.params[*].value[*].sSlaveId` from `sProInParam`. Per slave id, first checks `saldelivergoodsslave.bSingleReceipt=0 AND sId=p_sSlaveId`; if found, aborts with `sCode=-1` and localised `sDeliveryCyNotConfirm` ("该送货单储运未确认，禁止财务确认") message from `Fun_Sis_GetConst`. Otherwise sets `bFinance=1, sFinancePerson=sMakePerson, tFinanceDate=NOW()` on that single slave row.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — 送货单 line-grid 财务批量确认 toolbar button names `Sp_BtnEvent_DeliverGoodsFinanceSlave` as the action. Sibling of the master-level `Sp_BtnEvent_DeliverGoodsFinance`.

Flag: contains a stray `select p_iSCount;` diagnostic that leaks a result-set back to the caller.
