Credit note can be posted without customer selected when search customer List is...
[fa-stable.git] / reporting / rep306.php
index 00cddadc1f96a000cd4c3fe61ff9abd0d87a2f55..9dc886a10bea22481318af64bae8e8ac0e9f1ae6 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$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] : '';
 }
 
 //----------------------------------------------------------------------------------------------------