subledger_list shows inactive records in Journal Entry. Fixed.
[fa-stable.git] / includes / ui / ui_lists.inc
index eab6f4fa7cf5d58e09528184931a00805ba99f36..35fc2b703c985051c983b5d2cbcfdee494bf3f0b 100644 (file)
@@ -2637,12 +2637,12 @@ function subledger_list($name, $account, $selected_id=null)
                FROM "
                .TB_PREF."debtors_master d,"
                .TB_PREF."cust_branch c
-               WHERE d.debtor_no=c.debtor_no AND c.receivables_account=".db_escape($account);
+               WHERE d.debtor_no=c.debtor_no AND NOT d.inactive AND c.receivables_account=".db_escape($account);
        else
                $sql = "SELECT supplier_id as id, supp_ref as name 
                FROM "
                .TB_PREF."suppliers s
-               WHERE s.payable_account=".db_escape($account);
+               WHERE NOT s.inactive AND s.payable_account=".db_escape($account);
 
        $mode = get_company_pref('no_customer_list');