ci = &get_instance(); $this->db = $this->ci->load->database('accounting', TRUE); $t="select * from admin_menu where parent_id=22 and page_link='account/defaults'"; $r=$this->ci->db->query($t); if($r->num_rows()==0){ $t="INSERT INTO `admin_menu` (`id`, `menu_name`, `parent_id`, `order_number`, `inactive_icon`, `active_icon`, `is_active`, `page_link`, `created_on`) VALUES (NULL, 'Accounting Settings', '22', '6', ' ', ' ', 'yes', 'account/defaults', '".date("y-m-d h:i:s")."');"; $q=$this->ci->db->query($t); } // $this->init(); } function pre($Obj) { echo "
"; print_r($Obj); echo ""; } function init() { $tbl_acgroups = "CREATE TABLE IF NOT EXISTS `tbl_acgroups` ( `acgroup_id` INT(11) NOT NULL, `acgroup_code` VARCHAR(250) NOT NULL, `acgroup_name` VARCHAR(250) NOT NULL, `posting_side` VARCHAR(20) NOT NULL, `created_on` DATE NOT NULL, `created_by` VARCHAR(250) NOT NULL, `remarks` TEXT NOT NULL, `status` INT(11) NOT NULL, `display_order` INT(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; "; } function showFeeTypeMappingOption($default="") { $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accounts.status<>1)")->result(); foreach ($Accategoreies as $AccountCategory) { $AccountCategory->Accounts = $this->db->query("select * from tbl_accounts where accategory_id='$AccountCategory->accategory_id'")->result(); } ?>