Пример #1
0
 public function search_records()
 {
     $this->load->model('audit_trail_model');
     $a_search = $this->input->post('searchAudit');
     $date_frm = $a_search['searchAudit_dateFRM'];
     $date_to = $a_search['searchAudit_dateTO'];
     $date_frm_format = date_format(new DateTime($date_frm), "Y/m/d");
     $date_to_format = date_format(new DateTime($date_to), "Y/m/d");
     $data = $this->audit_trail_model->search($a_search['searchAudit_user'], $date_frm_format, $date_to_format);
     $html = "";
     $err = validates(array($a_search), array());
     if ($err < 1) {
         echo jcode(array('success' => 3, 'err' => $err));
     } else {
         if (!$data->num_rows()) {
             echo jcode(array('success' => 2));
         } else {
             foreach ($data->result() as $key) {
                 $html .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=''>" . $key->full_name . "</td>\n\t\t\t\t\t\t<td class=''>" . $key->user_type . "</td>\n\t\t\t\t\t\t<td class=''>" . $key->a_action . "</td>\n\t\t\t\t\t\t<td class=''>" . $key->a_date . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t";
             }
             auditrecord("Searched Records in Audit Trail.");
             echo jcode(array('success' => 1, 'response' => $html));
         }
     }
 }
Пример #2
0
 public function del_user_access()
 {
     $this->load->model('user_access_model');
     $user_id = $this->input->post('id');
     $fname = $this->input->post('fname');
     $data = $this->user_access_model->delete_user($user_id);
     auditrecord("Deleted User " . $fname . "");
     echo jcode(array('success' => 1, 'response' => $data));
 }
Пример #3
0
 public function save_bank_recon()
 {
     $this->load->model('bank_recon_model');
     $bank_recon_data = $this->input->post('bank');
     $err = validates(array($bank_recon_data), array());
     if (count($err)) {
         echo jcode(array('success' => 3, 'err' => $err));
     } else {
         $bID = isset($bank_recon_data['bank_id']) ? $bank_recon_data['bank_id'] : '';
         $check_id = $this->bank_recon_model->bank_recon_exist($bID);
         if ($check_id) {
             echo jcode(array('success' => 2));
         } else {
             $this->bank_recon_model->bank_recon_add($bank_recon_data);
             auditrecord("Added New Bank Record");
             echo jcode(array('success' => 1));
         }
     }
 }
Пример #4
0
 public function report_tbl()
 {
     $this->load->model("subsidiary_account_model");
     if ($this->session->userdata('islogged')) {
         $account_type = $this->input->get('at');
         $account_code = $this->input->get('ac');
         $account_title = $this->input->get('atits');
         $html = $this->config->item('report_header');
         $data = array('account_type' => $this->subsidiary_account_model->search_subsidiarymainaccount($account_type, $account_code, $account_title)->result());
         $html .= $this->load->view('report/sub_search_result', $data, true);
         $html .= $this->config->item('report_footer');
         auditrecord("Generated Subsidiary Summary Report");
         pdf_create($html, 'filename');
     } else {
         echo jcode(array('success' => 1));
     }
 }
Пример #5
0
 public function report_tbl()
 {
     $this->load->model("main_account_model");
     if ($this->session->userdata('islogged')) {
         $account_type = $this->input->get('at');
         $account_code = $this->input->get('ac');
         $account_title = $this->input->get('atits');
         $html = $this->config->item('report_header');
         $data = array('main_account' => $this->main_account_model->searc_mainaccount($account_type, $account_code, $account_title)->result());
         $html .= $this->load->view('report/main_account_search', $data, true);
         $html .= $this->config->item('report_footer');
         auditrecord("Generated Chart of Account Summary Report");
         pdf_create($html, 'filename');
     } else {
         redirect('login');
     }
 }
Пример #6
0
 public function export_sales_detailed()
 {
     $this->load->model('journal_sj_model');
     $this->load->helper('sales_detailed');
     $data = $this->journal_sj_model->export_sales_summary();
     auditrecord("Export Sales Detailed Report (Excel)");
     sales_detailed($data);
 }
Пример #7
0
 public function ap_excel_report()
 {
     $this->load->model('journal_ap_model');
     $this->load->helper('ap_excel_report');
     $search = $this->input->post('searchAP');
     $ap_invoice_no = $this->input->post($search['searchAP_invNo']);
     $ap_inv_date_frm = $this->input->post($search['searchAP_date_frm']);
     $ap_inv_date_to = $this->input->post($search['searchAP_date_to']);
     $data = $this->journal_ap_model->journal_ap_get($ap_invoice_no, $ap_inv_date_frm, $ap_inv_date_to)->result();
     // 'accounts_total' => $this->journal_ap_model->journal_ap_get_total($ap_invoice_no,$ap_invoice_date,$ap_master_name,$ap_po_no)->result()
     // print_r($this->db->last_query());
     auditrecord("Export AP Detailed Report (Excel)");
     ap_excel_report($data);
 }
Пример #8
0
 public function logout()
 {
     auditrecord("System Logout");
     $this->session->sess_destroy();
     redirect(base_url());
 }
Пример #9
0
 public function export_summary()
 {
     $this->load->model('journal_cd_model');
     $this->load->helper('check_dis_summary');
     $data = $this->journal_cd_model->summary_report_data();
     auditrecord("Export Summary Check Disbursement (Excel)");
     check_dis_summary($data);
 }
Пример #10
0
 public function report_tbl()
 {
     $this->load->model('master_account_model');
     if ($this->session->userdata('islogged')) {
         $master_name = $this->input->get('mn');
         $master_add = $this->input->get('ma');
         $master_con_person = $this->input->get('mcp');
         $master_con_num = $this->input->get('mcn');
         $html = $this->config->item('report_header');
         $data = array('master_account' => $this->master_account_model->master_account_get($master_name, $master_add, $master_con_person, $master_con_num)->result());
         $html .= $this->load->view('report/master_account_search', $data, true);
         $html .= $this->config->item('report_footer');
         auditrecord("Generated Master Account Summary Report");
         pdf_create($html, 'filename');
     } else {
         echo jcode(array('success' => 1));
     }
 }
Пример #11
0
 public function load_acct_group()
 {
     $this->load->model('system_settings_model');
     $data = $this->system_settings_model->account_group_show();
     $html = "";
     foreach ($data->result() as $key) {
         $html .= "\n\t\t\t<tr>\n\t\t\t\t<td>" . $key->account_type . "</td>\n\t\t\t\t<td>" . $key->account_groupname . "</td>\n\t\t\t\t<td><i  class='fa fa-trash-o btn-style-2 animate-4 accountgroup-item btn_delgroup' data-item='" . $key->id . "'></i></td>\n\t\t\t</tr>\n\t\t\t";
     }
     auditrecord("Searched Record in Account Group");
     echo jcode(array('success' => 1, 'response' => $html));
 }
Пример #12
0
 public function cr_summary_report()
 {
     $this->load->model("journal_cr_model");
     if ($this->session->userdata('islogged')) {
         $cr_or_no = $this->input->get('or');
         $cr_or_date_frm = $this->input->get('ordfrm');
         $cr_or_date_to = $this->input->get('ordto');
         $html = $this->config->item('report_header');
         $data = array('accounts' => $this->journal_cr_model->journal_cr_get($cr_or_no, $cr_or_date_frm, $cr_or_date_to)->result(), 'total' => $this->journal_cr_model->journal_cr_get_total($cr_or_no, $cr_or_date_frm, $cr_or_date_to));
         $html .= $this->load->view('report/cr_search_report', $data, true);
         $html .= $this->config->item('report_footer');
         auditrecord("Generated Cash Receipts Summary Report (PDF)");
         pdf_create($html, 'filename');
     } else {
         echo jcode(array('success' => 1));
     }
 }
Пример #13
0
 public function trial_summary_report()
 {
     $this->load->model("trial_balance_model");
     if ($this->session->userdata('islogged')) {
         $account_code = $this->input->get('in');
         $date_fr = $this->input->get('invd');
         $date_to = $this->input->get('mn');
         $trans = $this->input->get('trans');
         $html = '';
         $data = $this->trial_data($trans, $date_fr, $date_to, $account_code);
         $trial = array_merge($data);
         $html = $this->config->item('report_header');
         $viewData = array('trial' => $trial);
         $html .= $this->load->view('report/trial_balance', $viewData, true);
         $html .= $this->config->item('report_footer');
         auditrecord("Generated Trial Balance Report.");
         pdf_create($html, 'filename');
     } else {
         echo jcode(array('success' => 1));
     }
 }