From: Joe Hunt Date: Sun, 17 Oct 2010 09:12:37 +0000 (+0000) Subject: Changed Inventory Sales Report to use average cost by actual trans dates if non zero X-Git-Tag: v2.4.2~19^2~560 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=558e613a8b90bc4092bdb9e2eb8a3d7cff58844a;p=fa-stable.git Changed Inventory Sales Report to use average cost by actual trans dates if non zero --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index aef91a34..036f1ff7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +17-Oct-2010 Joe Hunt +! Changed Inventory Sales Report to use average cost by actual trans dates if non zero +$ /reporting/rep304.php + 16-Oct-2010 Joe Hunt ! [0000266] Added dimension selections in Profit Loss and Balance drilldown and Trial Balance $ /gl/inquiry/balance_sheet.php diff --git a/reporting/rep304.php b/reporting/rep304.php index a525f33c..ac59e881 100644 --- a/reporting/rep304.php +++ b/reporting/rep304.php @@ -43,7 +43,7 @@ function getTransactions($category, $location, $fromcust, $from, $to) ".TB_PREF."stock_moves.tran_date, SUM(-".TB_PREF."stock_moves.qty) AS qty, SUM(-".TB_PREF."stock_moves.qty*".TB_PREF."stock_moves.price*(1-".TB_PREF."stock_moves.discount_percent)) AS amt, - SUM(-".TB_PREF."stock_moves.qty *(".TB_PREF."stock_master.material_cost + ".TB_PREF."stock_master.labour_cost + ".TB_PREF."stock_master.overhead_cost)) AS cost + SUM(-IF(".TB_PREF."stock_moves.standard_cost <> 0, ".TB_PREF."stock_moves.qty * ".TB_PREF."stock_moves.standard_cost, ".TB_PREF."stock_moves.qty *(".TB_PREF."stock_master.material_cost + ".TB_PREF."stock_master.labour_cost + ".TB_PREF."stock_master.overhead_cost))) AS cost FROM ".TB_PREF."stock_master, ".TB_PREF."stock_category, ".TB_PREF."debtor_trans,