Audit trail added.
[fa-stable.git] / sales / includes / db / credit_status_db.inc
index 0bcabe7071ce823399d5d54015f8134f9aa38204..d59785a365cf5ad00dcbbc0471dc662030e4ddc5 100644 (file)
@@ -1,5 +1,14 @@
 <?php
-
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
 function add_credit_status($description, $disallow_invoicing)
 {
        $sql = "INSERT INTO ".TB_PREF."credit_status (reason_description, dissallow_invoices) 
@@ -16,10 +25,11 @@ function update_credit_status($status_id, $description, $disallow_invoicing)
        db_query($sql, "could not update credit status");                       
 }
 
-function get_all_credit_status()
+function get_all_credit_status($all=false)
 {
        $sql = "SELECT * FROM ".TB_PREF."credit_status";
-       
+       if (!$all) $sql .= " WHERE !inactive";
+
        return db_query($sql, "could not get all credit status");
 }