# `Sp_Check_sQtt` (procedure)

> 报价单据保存之前数据校验


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sTableName` | `varchar(100)` |
| 2 | IN | `sGuid` | `varchar(100)` |
| 3 | IN | `sFormGuid` | `varchar(100)` |
| 4 | IN | `sLoginId` | `varchar(100)` |
| 5 | IN | `sBrId` | `varchar(100)` |
| 6 | IN | `sSuId` | `varchar(100)` |
| 7 | IN | `iFlag` | `int` |
| 8 | OUT | `sCode` | `int` |
| 9 | OUT | `sReturn` | `varchar(4000)` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_Check_sQtt`'`._

## Narrative

**Business context:** 销售管理 → 估价管理流程 → 新报价单 — post-save validator on the quotation form (`SalQuotationMaster`). Pure pass-through to `Sp_afterSave_sQtt`: the after-save peer carries the actual write-back into source enquiries / product cost lines; this stub exists only to honour the save-validator slot in the dispatcher.

**What it does:** Sets `sCode=1`, defaults `iFlag` to 0, clears `sReturn`, and immediately calls `Sp_afterSave_sQtt(sGuid, sBrId, sSuId, sCode, sReturn)`. No validation, no table touch.

**Invocation:** Bound to `gdsmodule.sSaveProName` on `01/04【新增】新报价单` (`101251240115016076506222050`) — 销售管理 → 估价管理流程 (KPI流程操作菜单). Dispatched by `BusinessBaseServiceImpl.checkUpdate(..., "sSaveProName")` after the save batch commits. Pre-save peer is `Sp_beforeSave_sQtt`. xly-src ships `script/标版/30100101/Sp_Check_sQtt.sql` as the install body.
