Fix sorting.
authorMaxime Bourget <bmx007@gmail.com>
Sat, 15 Jun 2013 11:44:32 +0000 (12:44 +0100)
committerMaxime Bourget <bmx007@gmail.com>
Sat, 15 Jun 2013 11:50:04 +0000 (12:50 +0100)
Seems to nott work when they are more than 3 sorts.
It's because db_pager sort thing in column order instead of click order.

includes/picking.inc

index 1462b59ff05311e954766d2e7f6e63318b6b7c25..2713dc16bfab6312101eda8c010f152613a24197 100644 (file)
@@ -3,7 +3,7 @@
 require_once($path_to_root.'/'.'sales/includes/sales_db.inc');
 function process_picking_flag() {
        $id = find_submit('_chgpck', false);
-       if ($id != -1 && isset($_POST['pick'])) {
+       if ($id != null && $id != -1 && isset($_POST['pick'])) {
                $id = str_replace("_update", "", $id);
                change_pck_flag($id, isset($_POST['pick'][$id]));
        }