# `Sp_BtnUpdate_InvoiceSubCheck` (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_BtnUpdate_InvoiceSubCheck`'`._

## Narrative

**Business context:** 销售开票 / 开票提交审核 — toolbar handler for submitting a sales invoice for review. Flips the `bSubCheck` flag from 0→1 on selected `SalSalesInvoiceMaster` rows, recording the submitter and submission timestamp; second-press idempotent (skips already-submitted rows).

**What it does:** Parses `$.params[*].value[*].sId` from `sProInParam`. For each master id, `UPDATE SalSalesInvoiceMaster SET bSubCheck=1, tSubCheckDate=NOW(), sSubCheckPerson=sMakePerson WHERE sId=p_sId AND bSubCheck=0`. Only the textareaValue field is parsed from changeValue (no per-field values).

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` (POST `/procedureCall/doGenericProcedureCall`) — front-end "提交审核" toolbar button on the 销售开票 grid registers this procedure name. Naming `Sp_BtnUpdate_` (not `Sp_BtnEvent_` / `Sp_BtnRepair_`) suggests a third button-handler convention — toolbar action without dialog input.
