From 71320995d00d480a7177fe7ea1acc62c7d00baec Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Mon, 18 Jul 2011 22:58:27 +0200 Subject: [PATCH] 0000948: Cost Update form uses cached old cost --- inventory/cost_update.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/inventory/cost_update.php b/inventory/cost_update.php index 7268d797..b5ee125d 100644 --- a/inventory/cost_update.php +++ b/inventory/cost_update.php @@ -38,8 +38,8 @@ if (isset($_GET['stock_id'])) if (isset($_POST['UpdateData'])) { - $old_cost = input_num('OldMaterialCost') + input_num('OldLabourCost') - + input_num('OldOverheadCost'); + $old_cost = get_standard_cost($_POST['stock_id']); + $new_cost = input_num('material_cost') + input_num('labour_cost') + input_num('overhead_cost'); @@ -92,9 +92,6 @@ set_global_stock_item($_POST['stock_id']); $myrow = get_item($_POST['stock_id']); div_start('cost_table'); -hidden("OldMaterialCost", $myrow["material_cost"]); -hidden("OldLabourCost", $myrow["labour_cost"]); -hidden("OldOverheadCost", $myrow["overhead_cost"]); start_table(TABLESTYLE2); $dec1 = $dec2 = $dec3 = 0; -- 2.30.2