# `Sp_financialClosing_BtnEventCheckout_CheckInstore_Test` (procedure)

> 成品入库申请控制是否领料 是否报工


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

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sGuid` | `varchar(100)` |
| 2 | IN | `sBrId` | `varchar(100)` |
| 3 | IN | `sSuId` | `varchar(100)` |
| 4 | IN | `sLoginId` | `varchar(100)` |
| 5 | OUT | `sCode` | `int` |
| 6 | OUT | `sReturn` | `varchar(5000)` |

## Body

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

## Narrative

**Business context:** Test/dev twin of `Sp_financialClosing_BtnEventCheckout_CheckInstore` (`_Test` suffix — work-in-progress copy left in the schema). Per wiki convention, test/copy variants are not narrated.

**What it does:** Same body as `Sp_financialClosing_BtnEventCheckout_CheckInstore` at the time of copy: for the 成品检验 `qlyproducttestmaster.sId=sGuid`, deletes any prior `accchecking` row keyed on `sBillInStoreId` or `sBillNo`, looks up `sWorkOrderSlaveId`, resolves the current month's `sysaccountperiod.tStartDate`, then builds `p_pitproductinstoremaster` (work-order plan qty vs already-入库 qty per slave) — the basis for blocking 入库 if 领料/报工 is incomplete.

**Invocation:** Status: appears orphaned. No `gdsmodule.sProcName`, no `gdsconfigformmaster` binding, no other-routine caller, and no xly-src reference — not expected to be called from production; verify before relying on it.
