# `Sp_afterSave_sSod` (procedure) > 销售订单保存后反写报价数量 - **Type:** PROCEDURE - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `sGuid` | `varchar(2000)` | | 2 | IN | `sBrId` | `varchar(100)` | | 3 | IN | `sSuId` | `varchar(100)` | | 4 | OUT | `sCode` | `int` | | 5 | OUT | `sReturn` | `varchar(4000)` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_afterSave_sSod`'`._ ## Narrative **Business context:** 1/3 新增轮转销售订单 / 1/3 新增销售订单 → 订单生产流程 → KPI流程操作菜单 — header says 销售订单保存后反写报价数量. Thin save-phase 反写 wrapper in the `Sp_afterSave_s` family that delegates the actual qty back-write to `Sp_saveReturn_sSod`. **What it does:** Wraps `sGuid` in double-quotes if not already quoted and, when `sGuid` is non-empty, calls `Sp_saveReturn_sSod(sGuid, sBrId, sSuId, 2, @sCode, @sReturn)` (iFlag=2 = "after save" phase). Does not propagate the inner `@sCode`/`@sReturn` back to its own OUT params. **Invocation:** Reached on two paths. (1) `Sp_Check_sSod` (the save-commit dispatch proc bound via `gdsmodule.sSaveProName` on 1/3 新增轮转销售订单 and 1/3 新增销售订单) calls this proc near the tail of a successful save; the `gdsmodule.sDeleteProName` slot on the same two modules also points here directly. (2) `Sp_Invalid_backwriting` dispatches to this proc on 作废/取消作废 of forms `101251240115016086186007360` (1/3 新增销售订单), `101251240115015878710737470` (1/3 新增轮转销售订单), `101251240115016832521864320` (轮转销售订单), `101251240115016255652064530` and `101251240115016036176643130`, itself triggered from Java `CheckmodelServiceImpl` via `Sp_Invalidation`.