Small code cleanups.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 21 May 2014 06:58:03 +0000 (08:58 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 21 May 2014 12:23:16 +0000 (14:23 +0200)
includes/current_user.inc
purchasing/supplier_invoice.php

index 31f53ae6c411d79d26eb451cbf4024c8f6237c3d..cc75e5e87cbef51969b18c35921f667b09200c7e 100644 (file)
@@ -132,7 +132,7 @@ class current_user
        }
 
        function reset_password($company, $email) {
-               global $path_to_root, $app_title;
+               global $app_title;
 
                $this->set_company($company);
                $this->logged = false;
@@ -154,7 +154,7 @@ class current_user
 
                        return true;
                }
-       return false;
+               return false;
     }
 
        function check_user_access()
index c9029c3b0bd4fc09778e4c4a842e261730ce3854..c4b91de93164aca359a267a50f7c5bd6f376c1ac 100644 (file)
@@ -260,7 +260,7 @@ function check_item_data($n)
                }
        }
 
-       if ($check_qty_charged_vs_del_qty == True)
+       if ($check_qty_charged_vs_del_qty == true && ($_POST['qty_recd'.$n] != $_POST['prev_quantity_inv'.$n]))
        {
                if (input_num('this_quantity_inv'.$n) / ($_POST['qty_recd'.$n] - $_POST['prev_quantity_inv'.$n]) >
                        (1+ ($margin / 100)))