Merged changes up to 2.3.16 into unstable
[fa-stable.git] / gl / includes / db / gl_db_accounts.inc
index 6a41188c225c7847860a56cb97cc21b70ef77f62..ce11a325607e6bfb2807ec86cc991f371e714de0 100644 (file)
@@ -96,6 +96,7 @@ function gl_account_in_company_defaults($acc)
                OR name='profit_loss_year_act'
                OR name='retained_earnings_act'
                OR name='freight_act'
+               OR name='deferred_income_act'
                OR name='default_sales_act' 
                OR name='default_sales_discount_act'
                OR name='default_prompt_payment_act'
@@ -195,15 +196,15 @@ function gl_account_in_quick_entry_lines($acc)
 //     Returns n>0 when account is AR, n<0 when account is AP
 //  (priority for AR accounts)
 //
- function is_subledger_account($account)
- {
+function is_subledger_account($account)
+{
        $sql = "SELECT 1 FROM ".TB_PREF."cust_branch WHERE receivables_account=".db_escape($account)
        ." UNION SELECT -1 FROM ".TB_PREF."suppliers WHERE payable_account=".db_escape($account);
 
-       $result = db_query($sql,"Couldn't test AR/AP account");
-       $myrow = db_fetch_row($result);
-       return $myrow[0];
- }
+       $result = db_query($sql,"Couldn't test AR/AP account");
+       $myrow = db_fetch_row($result);
+       return $myrow[0];
+}
 
 function get_subaccount_name($code_id, $person_id)
 {