Sp_Calc_sPca1.md 1.77 KB

Sp_Calc_sPca1 (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_sPca1'._

Narrative

Business context: Audit handler for 供应商送货 (vendor delivery / "sh" send-back) on PurPurchaseArriveshMaster — the supplier-delivery doc that is the inbound counterpart of a PurPurchaseArriveMaster (送检) cycle. Body is largely the same shape as Sp_Calc_sPca but the qty-roll-up that would write back to purpurchaseorderslave.dArriveAuxiliaryQty/dArriveQty is commented out (2023-06-26 注释) along with the Sp_Bill_Used check (2023-07-04 注释).

What it does: Standard validate-and-flip — guards sGuid/bInvalid/bCheck, then Update PurPurchaseArriveshMaster to set bCheck=1, sStatus=1, sCheckPerson, tCheckDate=tCheckTime. Reverse branch (iFlag=0) zeroes the audit fields. All cross-table side-effects in the body are commented out.

Invocation: Status: appears orphaned. No gdsmodule.sProcName/sSaveProName, gdsconfigformmaster form-master, sibling-routine, or xly-src reference points at Sp_Calc_sPca1. Candidate for maintainer audit — the commented-out code suggests the proc was carved off Sp_Calc_sPca for the 送货 send-back path and then deferred when the qty roll-up was reworked.