Global change in naming convention from std_cost to unit_cost.
[fa-stable.git] / reporting / rep301.php
index 16e96191c34b243031e0e23681ec24ea53b1e54a..b00a5a9a98ceafab539aa21791c13b4f4bbb38ec 100644 (file)
@@ -43,7 +43,7 @@ function get_domestic_price($myrow, $stock_id)
         }
     }
     else
-        $price = $myrow['standard_cost']; //pick standard_cost for sales deliveries
+        $price = $myrow['unit_cost']; //pick unit_cost for sales deliveries
 
     return $price;
 }
@@ -63,7 +63,7 @@ function getAverageCost($stock_id, $location, $to_date)
                                LEFT JOIN ".TB_PREF."debtor_trans cust_trans ON cust_trans.trans_no=move.trans_no AND cust_trans.type=move.type
                                LEFT JOIN ".TB_PREF."debtors_master debtor ON cust_trans.debtor_no=debtor.debtor_no
                        WHERE stock_id=".db_escape($stock_id)."
-                       AND move.tran_date <= '$to_date' AND standard_cost > 0.001 AND qty <> 0 AND move.type <> ".ST_LOCTRANSFER;
+                       AND move.tran_date <= '$to_date' AND unit_cost > 0.001 AND qty <> 0 AND move.type <> ".ST_LOCTRANSFER;
 
        if ($location != 'all')
                $sql .= " AND move.loc_code = ".db_escape($location);