Sp_AdjustMoneyCl_BtnRepair (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(1000) |
| 6 | OUT | sCode |
int |
Body
Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURESpAdjustMoneyCl_BtnRepair'._
Narrative
Business context: 报销申请 (expense-reimbursement) module — batch-edit button proc for the travel/差旅 reimbursement form (the Cl suffix marks the 差旅 variant). Header says 差旅报销单调整金额. Sibling of Sp_AdjustMoney_BtnRepair; the only difference is the recompute formula uses the four travel components (dAirfare, dHotelExpense, dOtherExpense, dTravelAllowance) instead of dAccountMoney.
What it does: Parses sProInParam JSON; reads $.changeValue.dAdjustMoney and $.changeValue.sAdjustMemo; validates sAdjustMemo is non-empty (returns Fun_Sis_GetConstNew('sAdjReasonCantEmpty'), sCode=-1 otherwise); iterates $.params[*].value[*].sId and runs UPDATE expensereimbursementslave SET dAdjustMoney=…, dMaterialsMoney = dAirfare + dHotelExpense + dOtherExpense + dTravelAllowance + dAdjustMoney, sAdjustMemo=… WHERE sId=… for each selected id.
Invocation: Status: appears orphaned. No caller found in any channel (form-master sSqlStr/sConfigSqlStr, gdsmodule hooks, gdsconfigformslave.sButtonParam / sButtonEnabled, other routines, xly-src grep) — candidate for maintainer audit. Same orphan condition as the non-Cl sibling: _BtnRepair procs dispatch via sButtonParam but no button row currently references this proc name.
Caveat: same as the non-Cl sibling — the empty-memo branch sets sCode=-1 but does not LEAVE top, so the update still runs.