Problem/Motivation
When a cashier looks up a draft order, then opens the order, the cashier does not have any way to pay for the order.
There are buttons for the cashier to place, park or cancel the order. Placing the order completes the order without payment.
There is an edit tab. Clicking that brings the cashier to/admin/commerce/orders/XX/edit, instead of to the POS interface.
Proposed resolution
- Add a 'Payment and Completion' button that takes the cashier to the POS payment keypad.
- Update the 'Place order' button so that it prompts the cashier if the order has not been paid for, giving the cashier an option to go to the POS payment keypad.
- Update the edit tab so that the cashier is redirected to the main POS interface.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | pos_order_lookup_omit_draft_orders-2938975-5.patch | 4.06 KB | shabana.navas |
| #3 | pos_order_lookup_omit_draft_orders-2938975-3.patch | 2.63 KB | shabana.navas |
Comments
Comment #2
smccabe commentedDraft type orders should be handled with Parked Orders as per #2911260: Allow parking of orders. For this issue, we should just exclude draft orders from the results as they are either in progress or abandoned, neither of which should show in search.
Comment #3
shabana.navas commentedPatch that omits orders in the draft state from the order lookup. Also, has some phpcs fixes.
Comment #5
shabana.navas commentedFixed tests.
Comment #6
shabana.navas commentedComment #7
sorabh.v6Comment #8
sorabh.v6Return type should be mixed, because at line number 140 we are returning an array but on line 143 we are returning '\Drupal\Core\StringTranslation\TranslatableMarkup|string'.
Other than that, patch works as expected. Thanks for the patch @shabana.navas
Comment #10
smccabe commentedDid return type fix and committed.