projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
65bc89d
)
0000948: Cost Update form uses cached old cost
author
Joe Hunt
<joe.hunt.consulting@gmail.com>
Mon, 18 Jul 2011 20:58:27 +0000
(22:58 +0200)
committer
Joe Hunt
<joe.hunt.consulting@gmail.com>
Mon, 18 Jul 2011 20:58:27 +0000
(22:58 +0200)
inventory/cost_update.php
patch
|
blob
|
history
diff --git
a/inventory/cost_update.php
b/inventory/cost_update.php
index 7268d797ab9bde32bdceac23e5a98ada8594991a..b5ee125dd966fab6f3094b8360c60692e950d428 100644
(file)
--- a/
inventory/cost_update.php
+++ b/
inventory/cost_update.php
@@
-38,8
+38,8
@@
if (isset($_GET['stock_id']))
if (isset($_POST['UpdateData']))
{
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');
$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');
$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;
start_table(TABLESTYLE2);
$dec1 = $dec2 = $dec3 = 0;