# `Sp_NotPayAbles_HZ` (procedure)


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sSupplyGuid` | `varchar(4000)` |
| 2 | OUT | `bOut` | `int` |
| 3 | IN | `sLoginId` | `varchar(4000)` |
| 4 | IN | `sBrId` | `varchar(100)` |
| 5 | IN | `sSuId` | `varchar(100)` |
| 6 | IN | `bFilter` | `varchar(5000)` |
| 7 | IN | `sUnTaskFormId` | `varchar(100)` |
| 8 | IN | `pageNum` | `int` |
| 9 | IN | `pageSize` | `int` |
| 10 | OUT | `totalCount` | `int` |
| 11 | IN | `countCloumn` | `varchar(5000)` |
| 12 | OUT | `countMapJson` | `longtext` |
| 13 | IN | `sFilterOrderBy` | `varchar(5000)` |
| 14 | IN | `sGroupBy_select_sql` | `varchar(5000)` |
| 15 | IN | `sGroupBy_group_sql` | `varchar(5000)` |

## Body

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

## Narrative

**Business context:** Summary (汇总) variant of `Sp_NotPayAbles` — same supplier-payables intent under 1/1 对账( 采购&外协)->付款, but rolls each supplier's many bills into a single per-supplier row (汇总) rather than per-bill detail. Intended for an AP overview report.

**What it does:** Same `SysAccountPeriod.tAPDate` cutoff, `Sp_Sis_GetConst` lookups, and `p_tmp_PayablesWarning` shape as `Sp_NotPayAbles`. Diverges in the final SQL — collapses the per-bill UNION result by `sSupplyId` so `dMaterialsMoney/dPayMoney/dNoPayMoney` are summed per supplier before paging through `Sp_Outstanding_Query`.

**Invocation:** Status: appears orphaned. No `gdsconfigformmaster` binding, no `gdsmodule` hook, no other-routine call, no xly-src caller — the per-bill `Sp_NotPayAbles` is the procedure actually wired to the deployed form. Candidate for maintainer audit; if the 汇总 view is needed, the form needs updating to call this proc.
