# `Sp_System_ProductMoneyAllSure` (procedure)


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sProInParam` | `varchar(10000)` |
| 2 | IN | `sMakePerson` | `varchar(100)` |
| 3 | IN | `sBrId` | `varchar(100)` |
| 4 | IN | `sSuId` | `varchar(100)` |
| 5 | OUT | `sReturn` | `varchar(4000)` |
| 6 | OUT | `sCode` | `int` |

## Body

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

## Narrative

**Business context:** 成本管理 → 产品存货核算 — batch confirm (批量确认) of every product-inventory line in one or more 会计期间. Forward pair of `Sp_System_ProductMoneyAllReSure`. Marks `accproductstore` rows for each 收/发/存 source as `bConfirm=1` so the downstream `Sp_System_ProductMoney` month-end calc can consume them.

**What it does:** Parses `$.params[*].value[*].sId` to period ids, refuses if `sysaccountperiod.bCalProducts=1` ("数据已核算不能批量操作"). For each `p_sPeriodId` sets `bConfirm=1, sConfirmMonth=p_sPeriodId` on `accproductstore` for the same six product-inventory source buckets the un-confirm twin covers: 盘盈入库 (form `192116810113315264733417750`), 装配入库 (via `pitproductinstoreslave`/`sgdsemigoodsmatchbillmaster`), 出库业务 (4 forms), 签收扣数, 发货运费, 销售发票.

**Invocation:** No `gdsmodule` binding, no form-master, no other-proc, no xly-src match beyond `script/标版/30100101/cost/Sp_System_ProductMoneyAllSure.sql` — dispatched dynamically by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` from the 产品存货核算 period grid's 批量确认 toolbar button.
