# `Sp_SalSalesCheckded` (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` | `text` | | 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_SalSalesCheckded`'`._ ## Narrative **Business context:** 销售管理 → 销售送货流程 → 3/4 送货单->销售对帐 — deductions-only ("ded") variant of `Sp_SalSalesCheck`. Reads only the deduction view `Viw_SalDeliverGoodsded` so the user can reconcile 扣款类送货单 rows separately from regular 送货 lines when the integrator splits the to-be-reconciled list. **What it does:** Same `TmpSalSalesCheck` staging shape and same `SysSystemSettings` (`NetMoney/NetPrice`) rounding as the base proc. Builds the to-be-reconciled rows from `Viw_SalDeliverGoodsded` + `salrejectgoodsmaster`, applies the `B1` exclusion of rows already linked via `sMinusSrcId`, scopes by `Fun_GetLookCustomer`, splices `bFilter`, then projects gross/tax/foreign-money buckets to the form via `Sp_Outstanding_Query` paging. **Invocation:** Not currently bound to any `gdsconfigformmaster` row, no `gdsmodule` hook, no other-routine caller, and no xly-src reference. Status: appears orphaned — likely a customer/branch fork of `Sp_SalSalesCheck` that the integrator wires in by editing `gdsconfigformmaster.sTbName` on the 设定单据->销售对账 form. Candidate for maintainer audit.