# `Sp_Calc_sRgd1` (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(4000)` | | 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_sRgd1`'`._ ## Narrative **Business context:** Variant of [`Sp_Calc_sRgd`](Sp_Calc_sRgd.md) — audit / un-audit of a 销售退货 (sales return / reject-goods) bill on `SalRejectGoodsMaster`/`SalRejectGoodsSlave`. The `1` suffix marks a numbered staging copy kept alongside the live version, presumably from a refactor cycle. **What it does:** Same skeleton as `Sp_Calc_sRgd` (cursor slave, `INSERT INTO MitMaterialsStore`/`PitProductStore`, `INSERT INTO EleMaterialsStock`, `UPDATE EleProductStock`, back-write `SalDeliverGoodsSlave`, post `CahReceivables` adjustment, `CALL Sp_Bill_Used`/`SP_Inventory_ProductCalcQty`/`Sp_System_AutoMaterialsPriceSingle`/`Sp_System_CheckFlow`, flip master `bCheck`) but without the materials-warehouse-cap call (`Sp_calc_materialsstoreLimit`) that the live version keeps. **Invocation:** No `gdsmodule.sProcName='Sp_Calc_sRgd1'` binding, no callers in any channel, no xly-src grep hits. **Status: appears orphaned.** Numbered backup variant of the live `Sp_Calc_sRgd` — per wiki convention numbered/named copies are not narrated as production code; verify before relying on it. Likely safe to drop, but check whether any customer overlay rebinds a module to this name.