# `Sp_financialClosing_BtnEventOutSideEstimation_test` (procedure)


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

## Parameters

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

## Body

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

## Narrative

**Business context:** Test/scratch variant of `Sp_financialClosing_BtnEventOutSideEstimation` — 系统设置 → 系统参数 → 财务结账 / 发外暂估. Per wiki convention `_test` suffix procs are scratch copies that should not be relied on in production. Same overall shape — populates temp table `Sp_instore` from outsource-process check rows, runs DELETE/UPDATE/INSERT on the related ledgers — but the body is truncated/partial (only the `Sp_instore` population block is present).

**What it does:** Same as the base proc at the time of copy: parses `sCostPeriod`, validates the period state, rebuilds `Sp_instore` from outsource-process check rows and adjusts. The copy is incomplete — it lacks the final INSERT into `accordercostanalysis`/`accoutsideproductstore` seen in the production variant. Treat as a sandbox, not a callable routine.

**Invocation:** Status: appears orphaned. No caller found in any channel — no `gdsmodule` hook, no `gdsconfigformmaster` reference, no other proc CALLs it, no xly-src grep hit. Candidate for maintainer audit and removal once the `_new` variant is promoted or dropped.
