# `Sp_Calc_sMft` (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(5000)` | | 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_sMft`'`._ ## Narrative **Business context:** 新材料测试 — new-material test order audit / un-audit on `mftmaterialstest`. Touches `salsalesorderslave` as well, suggesting the test approval also back-writes a result reference onto the originating sales-order line (e.g., to clear a "材料待测试" hold). **What it does:** Standard `Sp_Calc_s` skeleton: defaults the IN params, validates `sGuid`, branches on `iFlag`. On `iFlag=1` flips `mftmaterialstest.bCheck=1` with audit person/date and updates the linked `salsalesorderslave` row; `iFlag=0` reverses both updates. No KPI logging, no workflow call discovered. **Invocation:** Status: appears orphaned. No `gdsmodule.sProcName` binding, no `gdsconfigformmaster` reference, no other routine refs, no xly-src grep hits — candidate for maintainer audit. The 新材料测试申请 family is also represented by `Sp_Calc_sMpz` / `Sp_Calc_sMsc`, both equally unbound; the actively-used flow may have moved to a different proc or been retired.