From fa7202e4f6b4540649481a40c47ebdfb62b08b8d Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sat, 6 Feb 2010 16:46:38 +0000 Subject: [PATCH] get_standard_cost fixed again. --- CHANGELOG.txt | 7 ++++++- includes/db/inventory_db.inc | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1cc580d..b4287d0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +06-Feb-2010 Janusz Dobrowolski +# Fixed get_standard_cost() for dummy items again. +$ /includes/db/inventory_db.inc + 06-Feb-2010 Joe Hunt/Chaitanya ! Changed Balance Sheets/PL Statements to be recursive $ /gl/inquiry/balance_sheet.php @@ -36,8 +40,9 @@ $ /includes/main.inc $ /gl/includes/db/gl_db_accounts.inc /gl/includes/db/gl_db_account_types.inc +>>>>>>> 1.368 05-Feb-2010 Janusz Dobrowolski -# Fixed get_standard_cost()for dummy items +# Fixed get_standard_cost() for dummy items $ /includes/db/inventory_db.inc # Prevent saving empty lines in invoices/delivery notes $ /sales/includes/db/sales_delivery_db.inc diff --git a/includes/db/inventory_db.inc b/includes/db/inventory_db.inc index 2680f3e..9adb162 100644 --- a/includes/db/inventory_db.inc +++ b/includes/db/inventory_db.inc @@ -59,7 +59,7 @@ function get_item_edit_info($stock_id) function get_standard_cost($stock_id) { - $sql = "SELECT IF(s.type='D', 0, material_cost + labour_cost + overhead_cost) AS std_cost + $sql = "SELECT IF(s.mb_flag='D', 0, material_cost + labour_cost + overhead_cost) AS std_cost FROM ".TB_PREF."stock_master s WHERE stock_id=".db_escape($stock_id); $result = db_query($sql, "The standard cost cannot be retrieved"); -- 2.30.2