From ef1481f5b23e03e8a6d8eb778ddcabaa1318c1a6 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Tue, 30 Jun 2009 06:54:50 +0000 Subject: [PATCH] Small annoying bug-fixes in items.php and items_trans_db.inc --- CHANGELOG.txt | 5 +++++ inventory/includes/db/items_trans_db.inc | 2 +- inventory/manage/items.php | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4b75caeb..eb34b8d3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,11 @@ Legend: ! -> Note $ -> Affected files +30-Jun-2009 Joe Hunt +# Small annoying bug-fixes in items.php and items_trans_db.inc +$ /inventory/manage/items.php + /inventory/includes/db/items_trans_db.inc + 30-Jun-2009 Joe Hunt + Implemented automatic price calculation of items from std. cost. $ /admin/company_preferences.php diff --git a/inventory/includes/db/items_trans_db.inc b/inventory/includes/db/items_trans_db.inc index eb044cd7..dee7ef70 100644 --- a/inventory/includes/db/items_trans_db.inc +++ b/inventory/includes/db/items_trans_db.inc @@ -34,11 +34,11 @@ function stock_cost_update($stock_id, $material_cost, $labour_cost, $overhead_co $qoh = get_qoh_on_date($_POST['stock_id']); + $date_ = Today(); if ($qoh > 0) { $update_no = get_next_trans_no(systypes::cost_update()); - $date_ = Today(); if (!is_date_in_fiscalyear($date_)) $date_ = end_fiscalyear(); diff --git a/inventory/manage/items.php b/inventory/manage/items.php index 10af47a6..36249813 100644 --- a/inventory/manage/items.php +++ b/inventory/manage/items.php @@ -113,6 +113,7 @@ function clear_data() unset($_POST['NewStockID']); unset($_POST['dimension_id']); unset($_POST['dimension2_id']); + unset($_POST['no_sale']); } //------------------------------------------------------------------------------------ @@ -192,6 +193,7 @@ if (isset($_POST['addupdate'])) display_notification(_("A new item has been added.")); $_POST['stock_id'] = $_POST['NewStockID'] = $_POST['description'] = $_POST['long_description'] = ''; + $_POST['no_sale'] = 0; set_focus('NewStockID'); } $Ajax->activate('_page_body'); -- 2.30.2