# `Sp_BtnEvent_DeliverGoodsFinanceReset` (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_DeliverGoodsFinanceReset`'`._

## Narrative

**Business context:** 销售 / 送货单 — button-click handler that reverses a prior 财务确认 on a delivery-note (`saldelivergoodsmaster`), unsetting the finance-confirm flag on the master and every slave line so the document can be edited or re-confirmed.

**What it does:** Walks `$.params[*].value[*].sId` from `sProInParam` and per master id sets `bFinance=0, sFinancePerson=sMakePerson, tFinanceDate=NOW()` on `saldelivergoodsmaster` and matching `saldelivergoodsslave (sParentId=p_sId)`. No pre-check against 储运 state — purely a flag reset.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — 送货单 grid's 财务撤销 toolbar button names `Sp_BtnEvent_DeliverGoodsFinanceReset` as the action. Inverse of `Sp_BtnEvent_DeliverGoodsFinance`.

Flag: stamping the unfreeze user/timestamp into `sFinancePerson` / `tFinanceDate` overwrites the original-confirm attribution (parallel to the AccProductUnFrozen comment).
