# `Sp_SalSalesCheck_All` (procedure) - **Type:** PROCEDURE - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `sLoginId` | `varchar(100)` | | 2 | IN | `sCustomerId` | `varchar(100)` | | 3 | IN | `sBrId` | `varchar(100)` | | 4 | IN | `sSuId` | `varchar(100)` | | 5 | IN | `bFilter` | `longtext` | | 6 | IN | `sUnTaskFormId` | `varchar(100)` | | 7 | IN | `pageNum` | `int` | | 8 | IN | `pageSize` | `int` | | 9 | OUT | `totalCount` | `int` | | 10 | IN | `countCloumn` | `text` | | 11 | OUT | `countMapJson` | `longtext` | | 12 | IN | `sFilterOrderBy` | `text` | | 13 | IN | `sGroupby_select_sql` | `text` | | 14 | IN | `sGroupby_group_sql` | `text` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_SalSalesCheck_All`'`._ ## Narrative **Business context:** 销售管理 → 销售对账/开票流程 → 销售对账 (`salsalescheckingmaster` / `salsalescheckingslave`) — variant of the standard "未对账印件清单" data-source proc `Sp_SalSalesCheck` that returns the union of *all* source-bill types (送货单 + 销售订单 + 工单 + …) in one paged listing, rather than the single-type branch the production version picks via `SysSystemSettings.CbxSrcNoCheck`. Pre-stages a temp table `B1` of `sMinusSrcId` from `saldelivergoodsmaster` + `salrejectgoodsmaster` so that delivery notes already replaced by 抵扣/退货 bills are filtered out. **What it does:** Reads `NetMoney`/`NetPrice` rounding settings, builds a `B1` temp table of replaced source ids, resolves `Fun_GetLookCustomer` for visibility, then `CREATE TEMPORARY TABLE TmpSalSalesCheck` and inserts from each bill family in turn — selecting `(dProductQty - dCheckingQty) AS dNoCheckingQty` and the standard projection columns. Caller-supplied `bFilter` JSON is rewritten to a WHERE clause via `Fun_bFilter_toWhere(.,'A')` and `@sTableAlias@` is replaced with `A.`. Returns the paged + counted result through the usual `Sp_Outstanding_Query`-style pager glue. **Invocation:** Status: **appears orphaned** — `_All` is a feature variant retained alongside the canonical `Sp_SalSalesCheck`. No `gdsconfigformmaster.sSqlStr` binds it, no `gdsmodule.sProcName` references it, no other proc in `information_schema.ROUTINES` mentions it, and `grep -rln Sp_SalSalesCheck_All xly-src` returns no hits. Maintainers should confirm whether this is an experimental successor to `Sp_SalSalesCheck` or stale code; per wiki convention, treat as not-in-production until a binding is re-established.