Some observations and might be code improvement.
I observed that, after delet...

Contribution Date
Technology
Contribution Project
Contribution Details

Some observations and might be code improvement.

I observed that, after deleting the last/current order, when I revisit the main POS screen, it itself creates a new order. I am not sure where that logic is written.

Since it always creates a new order, then I think this return $order_id ? Order::load($order_id) : NULL inside CurrentOrder::get() can be altered to just return Order::load($order_id).

And this will save multiple current order checks (#20).

  1. +++ b/src/CurrentOrder.php @@ -49,4 +49,36 @@ class CurrentOrder { + if ($current_order) {

    Duplicate current order check.

  2. +++ b/src/CurrentOrder.php @@ -49,4 +49,36 @@ class CurrentOrder { + if ($current_order) {

    Duplicate current order check.

Contribution Author
Files count
0
Patches count
0