Sp_Calc_sAcod (procedure)
客户框架协议
- Type: PROCEDURE
- Deterministic: NO
- SQL data access: CONTAINS SQL
Parameters
| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | iFlag |
int |
| 2 | IN | iTmpCheck |
int |
| 3 | IN | sFormGuid |
varchar(100) |
| 4 | IN | sGuid |
varchar(100) |
| 5 | IN | sLoginId |
varchar(100) |
| 6 | OUT | sReturn |
varchar(5000) |
| 7 | IN | sBrId |
varchar(100) |
| 8 | IN | sSuId |
varchar(100) |
| 9 | OUT | sCode |
int |
Body
Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURESpCalc_sAcod'._
Narrative
Business context: 销售管理 / 客户档案 — 客户框架协议 (customer framework agreement / accord) check / uncheck on elecustomeraccord. Approves a multi-period sales-pricing-or-volume agreement with a customer so it can act as a price/discount baseline downstream.
What it does: Validates sGuid. With iFlag=1: refuses if already bCheck=1 (returns sNoCanCheckBybCheck); else sets bCheck=1, sStatus=1, sCheckPerson=sLoginId, tCheckDate=NOW(). With iFlag<>1: guards on bCheck=0 then clears the four fields. Scoped by sBrandsId/sSubsidiaryId. No accounting-period or invalid-flag guard.
Invocation: Status: appears orphaned. No caller found in any channel (gdsmodule hooks, gdsmoduleflow, form-master, other routines, xly-src grep) — candidate for maintainer audit. Standard Sp_Calc_* check-hook signature; likely bound only in customer-specific overrides.
Flag: uncheck branch reuses sNoCanCheckBybCheck instead of sNoCanCheckBybUnCheck — same copy-paste bug as Sp_Calc_Product.