X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep306.php;h=3ce3a86025bd49314d54a4d5a60f706e7f390300;hb=6351305b2b0e5782804ab4d9e3db5f84b671d6f2;hp=728bd7a64e5c1aefb371f403f78c5cf7e6f16811;hpb=d1babda7c01b314d35fb89f2d195553b55936532;p=fa-stable.git diff --git a/reporting/rep306.php b/reporting/rep306.php index 728bd7a6..3ce3a860 100644 --- a/reporting/rep306.php +++ b/reporting/rep306.php @@ -9,7 +9,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$page_security = 'SA_SALESANALYTIC'; +$page_security = 'SA_SUPPLIERANALYTIC'; // ---------------------------------------------------------------- // $ Revision: 2.0 $ // Creator: Joe Hunt @@ -38,7 +38,7 @@ function getTransactions($category, $location, $fromsupp, $item, $from, $to) item.stock_id, item.description, item.inactive, move.loc_code, - supplier.supplier_id, + supplier.supplier_id , IF(ISNULL(grn.rate), credit.rate, grn.rate) ex_rate, supplier.supp_name AS supplier_name, move.tran_date, move.qty AS qty, @@ -224,8 +224,7 @@ function print_inventory_purchase() } $curr = get_supplier_currency($trans['supplier_id']); - $rate = get_exchange_rate_from_home_currency($curr, sql2date($trans['tran_date'])); - $trans['price'] *= $rate; + $trans['price'] *= $trans['ex_rate']; $rep->NewLine(); $trans['supp_reference'] = get_supp_inv_reference($trans['supplier_id'], $trans['stock_id'], $trans['tran_date']); $rep->fontSize -= 2; @@ -267,7 +266,7 @@ function print_inventory_purchase() $rep->NewLine(); $rep->NewLine(); $total_supp = $total_qty = 0.0; - $supplier_name = $trans['supplier_name']; + $supplier_name = isset($trans['supplier_name']) ? $trans['supplier_name'] : ""; } } if ($supplier_name != '')