# `Sp_Sis_GetMaxNo_New` (procedure)

> 最大单据号


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sBillType` | `varchar(100)` |
| 2 | OUT | `sReturn` | `varchar(100)` |
| 3 | IN | `sFormGuid` | `varchar(100)` |
| 4 | IN | `sSaleManGuid` | `varchar(100)` |
| 5 | IN | `sCustomerGuid` | `varchar(100)` |
| 6 | IN | `sClassNo` | `longtext` |
| 7 | IN | `sBrId` | `varchar(100)` |
| 8 | IN | `sSuId` | `varchar(100)` |

## Body

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

## Narrative

**Business context:** Forward variant of [`Sp_Sis_GetMaxNo`](Sp_Sis_GetMaxNo.md) — same 8-arg signature with extra local declarations (`sFormGuidWhere LONGTEXT`, `p_sRealFormGuid varchar(100)`), apparently a work-in-progress rewrite that adds richer multi-form-guid handling. Per wiki convention, `_New` variants are not narrated as live code unless wired in.

**What it does:** Same shape as `Sp_Sis_GetMaxNo` (bill-number factory) with extended logic around `sFormGuidWhere`/`p_sRealFormGuid` — likely supporting reset / sequence segregation across grouped form IDs. Confirm against the diff before deploying.

**Invocation:** Not referenced in `gdsmodule`, no form-master binding, no other DB routine calls it, no xly-src reference. Status: appears orphaned — not expected to be called from production. The live entry point is `Sp_Sis_GetMaxNo`.
