# `SP_Inventory_ProductInOutWarehouseMoney` (procedure)


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sCustomerGuid` | `varchar(100)` |
| 2 | IN | `sProductGuid` | `varchar(100)` |
| 3 | IN | `sDefineNoS` | `varchar(100)` |
| 4 | IN | `sDefineNoS2` | `varchar(100)` |
| 5 | IN | `sWareHouseGuid` | `varchar(100)` |
| 6 | IN | `tStartDate` | `datetime` |
| 7 | IN | `tEndDate` | `datetime` |
| 8 | IN | `sLocationGuid` | `varchar(100)` |
| 9 | IN | `sWarehouseLocationGuid` | `varchar(100)` |
| 10 | IN | `sBrId` | `varchar(100)` |
| 11 | IN | `sSuId` | `varchar(100)` |
| 12 | IN | `bFilter` | `varchar(5000)` |
| 13 | IN | `pageNum` | `int` |
| 14 | IN | `pageSize` | `int` |
| 15 | OUT | `totalCount` | `int` |
| 16 | IN | `countCloumn` | `varchar(5000)` |
| 17 | OUT | `countMapJson` | `longtext` |
| 18 | IN | `sFilterOrderBy` | `varchar(5000)` |
| 19 | IN | `sGroupby_select_sql` | `varchar(5000)` |
| 20 | IN | `sGroupby_group_sql` | `varchar(5000)` |
| 21 | OUT | `sCode` | `int` |
| 22 | OUT | `sReturn` | `varchar(5000)` |

## Body

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

## Narrative

**Business context:** Money-column split of the finished-product warehouse-ledger family — sibling of `SP_Inventory_ProductInOutWareHouse` projecting product value (`dProductMoney`, foreign-currency money) for financial inventory-value reporting. Trailing `sCode`/`sReturn` OUT params follow the standard error-channel convention.

**What it does:** Same temp-ledger build as `SP_Inventory_ProductInOutWareHouse` (opening balance, in/out movements over a date window, joins to `eleproduct`/`elewarehouse` for display) with the SELECT list scoped to money columns. Returns paginated rowset and count-aggregation JSON through `Sp_Outstanding_Query`.

**Invocation:** Status: appears orphaned. No form-master binding, no `gdsmodule` hook, no other DB caller. Lives in xly-src as `script/标版/optimize/SP_Inventory_ProductInOutWarehouseMoney.sql` and `script/标版/30100101/cost/SP_Inventory_ProductInOutWarehouseMoney.sql`. Candidate for maintainer audit — the live 库存产品价值 form binds to `Sp_Inventory_ProductInOutStore`, not this warehouse-side variant.
