X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep306.php;h=9dc886a10bea22481318af64bae8e8ac0e9f1ae6;hb=807baf36cadbb2452b15c2321bbcacdbc09a8951;hp=f3d022fd29fff42f73cddf5e9f2812d125071c5d;hpb=a99cb262f8c9e65ab86c231c997cca422e836817;p=fa-stable.git diff --git a/reporting/rep306.php b/reporting/rep306.php index f3d022fd..9dc886a1 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 @@ -85,10 +85,7 @@ function get_supp_inv_reference($supplier_id, $stock_id, $date) AND trans.tran_date=".db_escape($date); $result = db_query($sql,"No transactions were returned"); $row = db_fetch_row($result); - if (isset($row[0])) - return $row[0]; - else - return ''; + return is_array($row) ? $row[0] : ''; } //---------------------------------------------------------------------------------------------------- @@ -266,7 +263,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 != '')