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).
-
+++ b/src/CurrentOrder.php @@ -49,4 +49,36 @@ class CurrentOrder { + if ($current_order) {Duplicate current order check.
-
+++ b/src/CurrentOrder.php @@ -49,4 +49,36 @@ class CurrentOrder { + if ($current_order) {Duplicate current order check.
Contribution Issue Link
Files count
0
Patches count
0