# `Sp_Sales_NotDeliverGoodListNew` (procedure)

> 送货通知单


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sLoginId` | `varchar(100)` |
| 2 | IN | `sState` | `varchar(10)` |
| 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` | `varchar(5000)` |
| 11 | OUT | `countMapJson` | `longtext` |
| 12 | IN | `sFilterOrderBy` | `varchar(5000)` |
| 13 | IN | `sGroupby_select_sql` | `varchar(5000)` |
| 14 | IN | `sGroupby_group_sql` | `varchar(5000)` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_Sales_NotDeliverGoodListNew`'`._

## Narrative

**Business context:** Customer-specific (`安徽金印`) variant of `Sp_Sales_NotDeliverGoodList` — paged worklist of 销售订单 lines still owing delivery, with the 安徽金印 build's tweaks (different qty-rounding, customer-product-mapping, etc.).

**What it does:** Same overall shape as `Sp_Sales_NotDeliverGoodList`: temp `NotDeliverGoodList` filled from `salsalesorderslave`/`viw_product_materials` joined with `elecustomer`, `siswarehouse`, `sissalesman`, `sispayment`, `sisdeliver`, `sistax`; folded with stock (`eleproductstock`, `pitproductstorevirtual`, `PitProductInStoreSlave`), 工单 status (`mftworkorderslave`) and reject deductions (`SalRejectGoodsSlave`). Filters on `sState`, `bFilter`, `Fun_GetLookCustomer(sLoginId)` and `sUnTaskFormId`. Final paging via `Sp_Do_ProcedurePageTree`.

**Invocation:** Status: appears orphaned in this snapshot. No `gdsconfigformmaster` binding and no Java/MyBatis hit; only the customer override script `script/客户/安徽金印/Sp_Sales_NotDeliverGoodListNew.sql` ships it. The 安徽金印 build likely activates this proc by swapping the form-master sSqlStr from `Sp_Sales_NotDeliverGoodList` to `…New`, but that wiring isn't present in this DB — maintainer audit recommended before pruning.
