# `Sp_System_CheckMaterialsInvalidL` (procedure) > 材料作废校验 - **Type:** PROCEDURE - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `sFormGuid` | `varchar(100)` | | 2 | IN | `sGuid` | `varchar(100)` | | 3 | IN | `sTableName` | `varchar(100)` | | 4 | IN | `sLoginId` | `varchar(100)` | | 5 | OUT | `sReturn` | `varchar(4000)` | | 6 | IN | `sBrId` | `varchar(100)` | | 7 | IN | `sSuId` | `varchar(100)` | | 8 | OUT | `sCode` | `int` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_System_CheckMaterialsInvalidL`'`._ ## Narrative **Business context:** Trimmed variant of `Sp_System_CheckMaterialsInvalid` — same 材料作废校验 ("material retired") guard for 工单 / 报价单 save, but without the downstream `salsalesordermaster.bCheck` cross-check. The `L` suffix marks the "lite" version used when the order-audit linkage isn't enforced. **What it does:** On `sTableName='mftworkordermaster'` joins `mftworkordermaterials → elematerials` and collects `GROUP_CONCAT(sMaterialsName WHERE E.bInvalid=1)`; on `quoquotationmaster` does the same against `quoquotationmaterials`. If any retired material is referenced, returns `sCode=-8` with `':材料已作废,不能保存'`. Otherwise leaves `sCode=1`. **Invocation:** Status: appears orphaned. No caller found in any channel (form-master, `gdsmodule` hooks, other routines, xly-src grep across all extensions, dynamic-dispatch search) — looks like a relaxed copy of `Sp_System_CheckMaterialsInvalid` kept on hand for a tenant that bypasses the order-bCheck enforcement; candidate for maintainer audit.