# `Sp_Calc_sPoc` (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_sPoc`'`._ ## Narrative **Business context:** Purchasing — purchase-contract (采购合同) audit on `PurPurchaseOrderMaster`. A trimmed variant of `Sp_Calc_sPod` (the body comment still reads "采购订单"); shares parameter list and approval-workflow scaffolding. Status currently inert in the live DB. **What it does:** Guards on `sGuid`/`SysLocking`. When `CkxDefineCheck=1` & `iTmpCheck<>1` iterates the slaves through `Sp_System_CheckFlow` for multi-step approval. Runs `Sp_Bill_Used` to refuse uncheck when downstream rows exist. Flips `bCheck=1, sStatus=1, sCheckPerson, tCheckDate` on `PurPurchaseOrderMaster` for the matching `sGuid`; `iFlag=0` clears the flags. **Invocation:** Status: appears orphaned in the live database. No `gdsmodule.sProcName` binding, no `gdsconfigformmaster` reference, no callers in `information_schema.ROUTINES`. xly-src ships only an install script (`script/标版/30100101/Sp_Calc_sPoc.sql`) — no Java/XML wiring. The 采购合同 use case looks to have been absorbed into the standard 采购订单 flow under `Sp_Calc_sPod`. Candidate for maintainer audit.