From: Joe Hunt Date: Wed, 2 Dec 2009 00:17:30 +0000 (+0000) Subject: More restrictions on deleting gl_accounts X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=e6320e294868e3681f384a5308eb9805a50cbde2;p=textcart.git More restrictions on deleting gl_accounts Small changes in systypes for ST_COSTUPDATE. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2ae28b3..984754d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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. diff --git a/gl/manage/gl_accounts.php b/gl/manage/gl_accounts.php index e9efad8..807a53a 100644 --- a/gl/manage/gl_accounts.php +++ b/gl/manage/gl_accounts.php @@ -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 diff --git a/includes/systypes.inc b/includes/systypes.inc index 4589e76..969960c 100644 --- a/includes/systypes.inc +++ b/includes/systypes.inc @@ -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);