# `Sp_Calc_sPin` (procedure) > 采购询价单 - **Type:** PROCEDURE - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `iFlag` | `int` | | 2 | IN | `iTmpCheck` | `int` | | 3 | IN | `sFormGuid` | `varchar(100)` | | 4 | IN | `sGuid` | `varchar(100)` | | 5 | IN | `sLoginId` | `varchar(100)` | | 6 | OUT | `sReturn` | `varchar(4000)` | | 7 | IN | `sBrId` | `varchar(100)` | | 8 | IN | `sSuId` | `varchar(100)` | | 9 | OUT | `sCode` | `int` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_Calc_sPin`'`._ ## Narrative **Business context:** 采购管理 → purchase-inquiry (采购询价单) audit on `PurPurchaseinquirymaster` — a lightweight check/uncheck for the inquiry-RFQ document that precedes a purchase order. **What it does:** Guards on `sGuid` only (no `bInvalid` or `SysLocking` checks). On `iFlag=1` confirms the row is not already `bCheck=1` then `Update PurPurchaseinquirymaster` to set `bCheck=1, sStatus=1, sCheckPerson, tCheckDate=NOW()`; reads `SysSystemSettings.CkxDefineCheck` but does not act on it (workflow not wired). `iFlag=0` symmetrically clears the flags. No KPI write, no downstream-bill scan. **Invocation:** Status: appears orphaned. No `gdsmodule.sProcName` binding, no `gdsconfigformmaster` reference, no callers in `information_schema.ROUTINES`, no hits in xly-src across all extensions (not even an install script under `script/标版/`). Candidate for maintainer audit — the procedure exists in the DB but the 采购询价单 module has no form wired to it.