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.

Comments

Hubbs created an issue. See original summary.

smccabe’s picture

Draft 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.

shabana.navas’s picture

Status: Active » Needs review
StatusFileSize
new2.63 KB

Patch that omits orders in the draft state from the order lookup. Also, has some phpcs fixes.

Status: Needs review » Needs work

The last submitted patch, 3: pos_order_lookup_omit_draft_orders-2938975-3.patch, failed testing. View results

shabana.navas’s picture

Fixed tests.

shabana.navas’s picture

Status: Needs work » Needs review
sorabh.v6’s picture

Assigned: Unassigned » sorabh.v6
sorabh.v6’s picture

Assigned: sorabh.v6 » Unassigned
Status: Needs review » Needs work
+++ b/src/Form/OrderLookupForm.php
@@ -86,8 +92,17 @@ class OrderLookupForm extends FormBase {
+   * @return array

Return 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

  • smccabe committed 315456d on 8.x-2.x authored by shabana.navas
    Issue #2938975 by shabana.navas, sorabh.v6, Hubbs: Order lookup - Paying...
smccabe’s picture

Status: Needs work » Fixed

Did return type fix and committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.