# `Sp_Calc_sOpn1` (procedure) > @author:zhucx @date: 2022/12/02 @describe: 成外购到货/发外到货 - **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_sOpn1`'`._ ## Narrative **Business context:** Audit handler for 成外购到货/发外到货 send-back variant on `opsoutsidearriveshmaster` ("sh" suffix = 送货 send-back line, i.e. the inbound subset that ships back into stores). Header comments declare authorship `zhucx 2022/12/02`. Sister of `Sp_Calc_sOpn`, which targets `opsoutsidearrivemaster`. **What it does:** Same `Sp_Calc_*` shape — validates `sGuid`, guards on `bInvalid`/`bCheck`, `Update opsoutsidearriveshmaster` + `opsoutsidearriveshslave` flipping `bCheck/sStatus/sCheckPerson/tCheckDate`. No qty roll-up beyond the master/slave flip in the body sampled. **Invocation:** Status: appears orphaned. No `gdsmodule.sProcName/sSaveProName`, `gdsconfigformmaster` form-master, sibling-routine, or xly-src reference points at `Sp_Calc_sOpn1`. Candidate for maintainer audit — likely a forked variant left in place when the active 发外到货 path was consolidated onto `Sp_Calc_sOsa`.