Development #7880
openFeature #7116: POS Terminal & Cart (M03)
Build salesperson selection & sales attribution
0%
Description
Refer to:
- docs/planning/modules/M03_POS_Terminal_Cart.md
- docs/planning/02_Database_Design_TableDesigns.md
- docs/planning/FPOS/01_POS_Sales_Engine.md
- docs/planning/FPOS/09_System_Configuration.md
Implement salesperson/promoter selection within the POS sales flow and preserve the selected salesperson against the applicable sale items/transaction.
The available salesperson list must come from synchronized master data such as MAS_SALESPERSON and MAS_SCOPE_SALESPERSON, so Cashier only sees active salespeople assigned to the current store.
Scope:
- Provide a Salesperson function/action from the POS sales screen.
- Load active salesperson records applicable to the current store.
- Allow search/select by salesperson code and name.
- Support salesperson records that are linked to a MAS_USER as well as code-only salesperson records.
- Allow salesperson selection to be optional or compulsory according to the applicable POS configuration.
- When Compulsory Salesperson is enabled, prevent completion of the applicable sale/item until the required salesperson has been selected.
- Allow the selected salesperson to be changed before transaction completion.
- Support assigning salesperson/promoter information to the applicable cart line, consistent with the legacy FPOS behaviour.
- Where required by the business flow, allow the selected salesperson to be applied to subsequent scanned items until changed/cleared.
- Clearly display the assigned salesperson on the relevant cart line or sales screen.
- Do not allow inactive or out-of-scope salespeople to be selected.
- Preserve salesperson ID/code/name snapshot required for completed transaction reporting/audit.
- Write the salesperson attribution into transactions.db together with the completed sales transaction.
- Include salesperson information when the Cashier transaction is synchronized to Backend.
- Backend must preserve the salesperson attribution when processing and publishing the sales transaction to QubeBiz.
- Ensure suspended/recovered carts retain their salesperson assignments.
- Ensure item void/removal does not incorrectly alter salesperson attribution on other cart lines.
- Receipt printing of salesperson information remains under M07 and should consume this recorded salesperson information where configured.
Example:
Cart
────────────────────────────────────────────
Mouse Qty 1 RM 29.90
Salesperson: SP001 - JohnKeyboard Qty 1 RM 89.00
Salesperson: SP002 - Mary
────────────────────────────────────────────
Or, where the store uses one salesperson for the ongoing sale:
Select Salesperson
↓
SP001 - John
↓
Next scanned items inherit SP001
↓
Cashier changes/clears salesperson when required
Done when: Cashier can select an applicable salesperson/promoter during a sale, compulsory-selection rules are enforced when configured, salesperson attribution is preserved at the correct sales/cart level, and the information flows from Cashier → transactions.db → Backend → QubeBiz without being lost.