# `Sp_Supply_BtnEventCancelInvalid` (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 | `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_Supply_BtnEventCancelInvalid`'`._

## Narrative

**Business context:** 基础资料 → 供应商与外协加工商 → 供应商信息 — 取消作废 (un-invalidate / restore) toolbar action for the supplier-master grid (`elesupply`). Reverses [`Sp_Supply_BtnEventInvalid`](Sp_Supply_BtnEventInvalid.md), bringing previously-deactivated suppliers back into purchase pickers.

**What it does:** Parses `$.params[*].value[*].sId` from `sProInParam` (supports `-`-joined multi-id strings). For each `sIdOne`: reads `elesupply.sSupplyName`, runs `UPDATE elesupply SET bInvalid=0 WHERE sId=… AND sBrandsId=sBrId AND sSubsidiaryId=sSuId`, and writes a `syslog` row with `sOperationType='取消作废供应商'`, `sLog='取消作废供应商：<sSupplyName>'`, `sFormId='11811781131121915163429350260'` (the 供应商信息 form sId), `sClientType='浏览器'`. Returns the localised `Fun_Sis_GetConst('chooseData', …)` error when `sProInParam` is empty.

**Invocation:** Dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` — the 取消作废 button on the 供应商信息 grid names this procedure. Install script: `script/标版/30100101/Sp_Supply_BtnEventCancelInvalid.sql`.
