# `Sp_Inventory_ProductInventoryV56_qc` (procedure)


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sProductGuid` | `varchar(100)` |
| 2 | IN | `sProductClassifyGuid` | `varchar(100)` |
| 3 | IN | `sWarehouseGuid` | `varchar(100)` |
| 4 | IN | `sLocationGuid` | `varchar(100)` |
| 5 | IN | `sWarehouseLocationGuid` | `varchar(100)` |
| 6 | IN | `sCustomerGuid` | `varchar(100)` |
| 7 | IN | `iHasZero` | `int` |
| 8 | IN | `iGetQty` | `int` |
| 9 | OUT | `dProductQty` | `decimal(18,6)` |
| 10 | IN | `sDefineNoS` | `varchar(100)` |
| 11 | IN | `sDefineNoS2` | `varchar(100)` |
| 12 | IN | `iSumQty` | `int` |
| 13 | OUT | `dProductPrice` | `decimal(18,6)` |
| 14 | IN | `tStartDate` | `datetime` |
| 15 | IN | `tEndDate` | `datetime` |
| 16 | IN | `iDetailStock` | `int` |
| 17 | IN | `iGetAvailableQty` | `int` |
| 18 | IN | `sBrId` | `varchar(100)` |
| 19 | IN | `sSuId` | `varchar(100)` |
| 20 | IN | `bFilter` | `varchar(5000)` |
| 21 | IN | `pageNum` | `int` |
| 22 | IN | `pageSize` | `int` |
| 23 | OUT | `totalCount` | `int` |
| 24 | IN | `countCloumn` | `varchar(5000)` |
| 25 | OUT | `countMapJson` | `longtext` |
| 26 | IN | `sFilterOrderBy` | `varchar(5000)` |
| 27 | IN | `sGroupby_select_sql` | `varchar(5000)` |
| 28 | IN | `sGroupby_group_sql` | `varchar(5000)` |

## Body

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

## Narrative

**Business context:** Customer-specific (千彩 / 全彩) override of `Sp_Inventory_ProductInventoryV56` — finished-product available-stock query. The `_qc` suffix is the 千彩 customer branch; the standard proc serves 成品库存 → 库存查询 → 成品可用库存查询. Parameter list omits the standard `sLoginId` second slot present on the base proc.

**What it does:** Same parameter shape and table model as the standard `Sp_Inventory_ProductInventoryV56` (aggregates `pitproductstore` / `eleproductstock` per product / 自定义项 / warehouse / location across a date window, computes available qty, joins display fields, paginates through `Sp_Outstanding_Query`) but with customer-tailored column lineup and joins specific to 千彩's workflow.

**Invocation:** Status: appears orphaned in the standard catalog. No form-master binding, no `gdsmodule` hook, no other DB caller in the live schema. Sole xly-src reference is the customer override file `script/客户/千彩/Sp_Inventory_ProductInventoryV56_qc.sql` — installed on the 千彩 tenant only. Candidate for maintainer audit when reconciling this dump against the 千彩 deployment.
