# `Sp_SalesOrder_BtnOrderComplete` (procedure) > @author:zhucx @date: @describe: - **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 PROCEDURE `Sp_SalesOrder_BtnOrderComplete`'`._ ## Narrative **Business context:** 销售管理 → 销售订单管理 → 销售订单 (`salsalesorderslave`) — line-level "完结" toolbar that flips `bSlaveComplete=1` on the selected order lines. Pair: `Sp_SalesOrder_BtnOrderCompleteApply` is the editable variant that lets the operator attach a memo and runs the `valueKey`/`changeValue` SQL-merge pattern; this one is the simple yes-button that just marks lines complete with no extra fields. Distinct from `Sp_SalOrder_BillForceComplete`, which closes the entire bill at master level. **What it does:** Validates `sProInParam`, parses `$.params[*].value[*].sSlaveId`, then for each line runs `UPDATE salsalesorderslave SET bSlaveComplete = 1 WHERE sId=p_sId AND sBrandsId=sBrId AND sSubsidiaryId=sSuId`. **Invocation:** Generic-dispatch button signature `(sProInParam, sMakePerson, sBrId, sSuId, OUT sReturn, OUT sCode)` (no `sUserId`) — dispatched by `GenericProcedureCallServiceImpl.doGenericProcedureCall()` from the 销售订单 grid's 完结 line-toolbar button. Install script: `script/标版/30100101/Sp_SalesOrder_BtnOrderComplete.sql`. No xly-src Java caller, no gdsmodule binding row — the binding lives in the grid-button metadata that the front-end pushes into the dispatcher.