From 4158930d4c9563173ff14f5586df4574e40516f5 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Thu, 20 Jun 2019 09:11:13 +0200 Subject: [PATCH] Fixed Inventory Purchasing Report with physical rate from line. --- reporting/rep306.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reporting/rep306.php b/reporting/rep306.php index 728bd7a6..5aa11041 100644 --- a/reporting/rep306.php +++ b/reporting/rep306.php @@ -38,6 +38,7 @@ function getTransactions($category, $location, $fromsupp, $item, $from, $to) item.stock_id, item.description, item.inactive, move.loc_code, + supplier.supplier_id , IF(ISNULL(grn.rate), credit.rate, grn.rate) ex_rate, supplier.supplier_id, supplier.supp_name AS supplier_name, move.tran_date, @@ -224,7 +225,8 @@ function print_inventory_purchase() } $curr = get_supplier_currency($trans['supplier_id']); - $rate = get_exchange_rate_from_home_currency($curr, sql2date($trans['tran_date'])); + //$rate = get_exchange_rate_from_home_currency($curr, sql2date($trans['tran_date'])); + $rate = $trans['ex_rate']; $trans['price'] *= $rate; $rep->NewLine(); $trans['supp_reference'] = get_supp_inv_reference($trans['supplier_id'], $trans['stock_id'], $trans['tran_date']); -- 2.30.2