X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep308.php;h=a8bcccbe2cf5e9da8689be6b15f9ab7e775da236;hb=95f98ed74ac6379b95e2ceb1eb0c9bbcd36fd4a9;hp=2187717734cbf67c68ebca1f2c9a100eef630bcf;hpb=95ff74b5722826544743a01daf527aa3c9efe11a;p=fa-stable.git diff --git a/reporting/rep308.php b/reporting/rep308.php index 21877177..a8bcccbe 100644 --- a/reporting/rep308.php +++ b/reporting/rep308.php @@ -111,7 +111,7 @@ function avg_unit_cost($stock_id, $location=null, $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 standard_cost > 0.001 AND qty <> 0 AND move.type <> ".ST_LOCTRANSFER; if ($location != '') $sql .= " AND move.loc_code = ".db_escape($location);