More restrictions on deleting gl_accounts
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 2 Dec 2009 00:17:30 +0000 (00:17 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 2 Dec 2009 00:17:30 +0000 (00:17 +0000)
Small changes in systypes for ST_COSTUPDATE.

CHANGELOG.txt
gl/manage/gl_accounts.php
includes/systypes.inc

index 2ae28b34fb8707ee23617b784725e2a3c64cda02..984754d184a17c7a606a8dacff800faa59eb6540 100644 (file)
@@ -25,6 +25,8 @@ $ -> Affected files
 $ config.default.php
   /lang/new_language_template/LC_MESSAGES/empty.po
   /lang/en_US/LC_MESSAGES/en_US.mo
+# More restrictions on deleting gl_accounts
+$ /gl/manage/gl_accounts.php
 
 01-Dec-2009 Janusz Dobrowolski
 # Removing config.php after error during install. Otherwise misleading message is displayed.
index e9efad86bedc6fcde3fde1f5c8292750dbf1f809..807a53a72c194449c77f6b70142ec140b273e263 100644 (file)
@@ -121,6 +121,10 @@ function can_delete($selected_account)
        $sql= "SELECT COUNT(*) FROM ".TB_PREF."company WHERE debtors_act=$acc 
                OR pyt_discount_act=$acc
                OR creditors_act=$acc 
+               OR bank_charge_act=$acc 
+               OR exchange_diff_act=$acc
+               OR profit_loss_year_act=$acc
+               OR retained_earnings_act=$acc
                OR freight_act=$acc
                OR default_sales_act=$acc 
                OR default_sales_discount_act=$acc
index 4589e76bca9f622ab8e6ccd466c2efbe570cfbf5..969960cd3a4c8e11c857c3e54d3b2cbbd6121cc0 100644 (file)
@@ -63,7 +63,7 @@ function get_systype_db_info($type)
         case     31              : return array("".TB_PREF."service_orders", null, "order_no", "cust_ref", "date");
         case     ST_SALESQUOTE   : return array("".TB_PREF."sales_orders", "trans_type", "order_no", "reference", "ord_date");
         case    ST_DIMENSION    : return array("".TB_PREF."dimensions", null, "id", "reference", "date_");
-        case     ST_COSTUPDATE   : return null;
+        case     ST_COSTUPDATE   : return array("".TB_PREF."gl_trans", "type", "type_no", null, "tran_date");
        }
 
        display_db_error("invalid type ($type) sent to get_systype_db_info", "", true);