# `Sp_Calc_clear` (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` | `longtext` |
| 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_clear`'`._

## Narrative

**Business context:** 固定资产 / 固定资产清理申请单 — fixed-asset "clearance / disposal" (清理) application: marks an asset-disposal request as approved (or reverts) on `eptmachinefixedclear`. Used when retiring/scrapping an asset.

**What it does:** Same shape as `Sp_Calc_about`, but on `eptmachinefixedclear`. Refuses if `sGuid` empty or row `bInvalid=1`. `iFlag=1` sets `bCheck=1, sStatus=1, sCheckPersON=sLoginId, tCheckDate=NOW()`; `iFlag=0` reverses. Scoped by `sBrandsId/sSubsidiaryId`. Sibling of `Sp_Calc_about`, `Sp_Calc_borrow`, `Sp_Calc_Change`.

**Invocation:** Status: appears orphaned. No caller found in any channel — candidate for maintainer audit. Signature matches the workflow check-hook contract; likely bound only in customer-specific overrides.

Flag: `sTmpReturn` declared but never assigned — trailing branch is dead (shared with siblings).
