Fixed tabbed dialogs. Removed redundant 'popup' variables.
[fa-stable.git] / inventory / cost_update.php
index efd99593f8a2bf1e60b3befe8d9895e9942b2f4d..11ab6fc39c7ed9c8121c9d577ad243ab0a985b20 100644 (file)
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 $page_security = 'SA_STANDARDCOST';
-if (!@$_GET['popup'])
-       $path_to_root = "..";
-else   
+
+if (@$_GET['page_level'] == 1)
        $path_to_root = "../..";
+else   
+       $path_to_root = "..";
 
 include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/includes/date_functions.inc");
@@ -21,6 +22,7 @@ include_once($path_to_root . "/includes/ui.inc");
 include_once($path_to_root . "/includes/banking.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
 include_once($path_to_root . "/inventory/includes/inventory_db.inc");
+include_once($path_to_root . "/includes/ui/items_cart.inc");
 
 $js = "";
 if ($SysPrefs->use_popup_windows)
@@ -112,10 +114,6 @@ $_POST['overhead_cost'] = price_decimal_format($myrow["overhead_cost"], $dec3);
 
 amount_row(_("Standard Material Cost Per Unit"), "material_cost", null, "class='tableheader2'", null, $dec1);
 
-if ($page_nested)
-{
-       hidden('popup', @$_GET['popup']);
-}
 if ($myrow["mb_flag"]=='M')
 {
        amount_row(_("Standard Labour Cost Per Unit"), "labour_cost", null, "class='tableheader2'", null, $dec2);