subledger_list shows inactive records in Journal Entry. Fixed.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 21 Dec 2017 07:13:56 +0000 (08:13 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Thu, 21 Dec 2017 07:13:56 +0000 (08:13 +0100)
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');