Ejemplo n.º 1
0
 function ar($id)
 {
     $this->load->helper('mylib');
     $data['message'] = '';
     $data['date_from'] = date('Y-m-d');
     $data['date_to'] = date('Y-m-d');
     $data['select_date'] = true;
     $data['criteria1'] = false;
     $data['label1'] = '';
     $data['text1'] = '';
     $data['criteria2'] = false;
     $data['label2'] = '';
     $data['text2'] = '';
     $data['criteria3'] = false;
     $data['label3'] = '';
     $data['text3'] = '';
     $data['header'] = $data['header'] = company_header();
     switch ($id) {
         case '1':
             if (!isset($_POST['cmdPrint'])) {
                 $data['caption'] = 'LAPORAN PENJUALAN';
                 $this->template->display_form_input('criteria', $data, '');
             } else {
                 $sql = "select invoice_number,invoice_date,amount, \n                            sold_to_customer,c.company,c.city,i.warehouse_code\n                            from invoice i\n                            left join customers c on c.customer_number=i.sold_to_customer\n                            where warehouse_code='" . $this->access->cid . "'";
                 $sql .= " and invoice_date between '" . $this->input->post('txtDateFrom') . "' and '" . $this->input->post('txtDateTo') . "'";
                 $data['caption'] = "DAFTAR FAKTUR PENJUALAN";
                 $data['content'] = browse_select(array('sql' => $sql, 'action_button' => ''));
                 $this->load->view('simple_print.php', $data);
             }
             break;
         default:
             break;
     }
 }
Ejemplo n.º 2
0
 function woe($id)
 {
     $this->load->helper('mylib');
     $data['message'] = '';
     $data['date_from'] = date('Y-m-d');
     $data['date_to'] = date('Y-m-d');
     $data['select_date'] = true;
     $data['criteria1'] = false;
     $data['label1'] = 'Counter ';
     $data['text1'] = '';
     $data['criteria2'] = false;
     $data['label2'] = 'Status';
     $data['text2'] = '';
     $data['criteria3'] = false;
     $data['label3'] = '';
     $data['text3'] = '';
     $data['header'] = $data['header'] = company_header();
     $data['rpt_controller'] = "manuf/reports/woe/" . $id;
     if (isset($_POST['cmdPrint'])) {
         $d1 = $this->input->post('txtDateFrom');
         $d1 = date("Y-m-d", strtotime($d1));
         $d2 = $this->input->post('txtDateTo');
         $d2 = date("Y-m-d H:n:s", strtotime($d2));
     }
     switch ($id) {
         case '001':
             $data['caption'] = 'DAFTAR WORK EXECUTE';
             if (isset($_POST['cmdPrint'])) {
                 $sql = "select w.*,wi.*\n\t\t\t\t\tfrom work_exec w \n\t\t\t\t\tleft join work_exec_detail wi on w.work_exec_no=wi.work_exec_no\n\t\t\t\t\twhere ";
                 $sql .= " w.start_date between '" . $d1 . "' and '" . $d2 . "'";
                 $sql .= " order by w.start_date";
                 $data['content'] = browse_select(array('sql' => $sql, 'show_action' => false));
                 $this->load->view('simple_print.php', $data);
             }
             break;
         case '002':
             $data['caption'] = 'DAFTAR WORK EXECUTE DETAIL';
             if (isset($_POST['cmdPrint'])) {
                 $sql = "select w.work_exec_no,w.wo_number,w.start_date,\n\t\t\t\t\tw.expected_date,w.dept_code,w.person_in_charge,\n\t\t\t\t\tw.status,\n\t\t\t\t\twi.item_number as item_prod,wi.description as item_prod_name,\n\t\t\t\t\twi.quantity,\n\t\t\t\t\tm.*\n\t\t\t\t\tfrom work_exec w \n\t\t\t\t\tleft join work_exec_detail wi on w.work_exec_no=wi.work_exec_no\n\t\t\t\t\tleft join mat_release_detail m on m.line_exec_no=wi.id\n\t\t\t\t\twhere ";
                 $sql .= " w.start_date between '" . $d1 . "' and '" . $d2 . "'";
                 $sql .= " order by w.start_date";
                 $data['content'] = browse_select(array('sql' => $sql, 'show_action' => false, 'group_by' => array('work_exec_no')));
                 $this->load->view('simple_print.php', $data);
             }
             break;
         case '003':
         default:
             break;
     }
     if (!isset($_POST['cmdPrint'])) {
         $this->template->display_form_input('criteria', $data, '');
     }
 }
Ejemplo n.º 3
0
 function print_faktur($nomor)
 {
     $nomor = urldecode($nomor);
     $this->load->helper('mylib');
     $invoice = $this->purchase_order_model->get_by_id($nomor)->row();
     $data['purchase_order_number'] = $invoice->purchase_order_number;
     $data['po_date'] = $invoice->po_date;
     $data['supplier_number'] = $invoice->supplier_number;
     $data['amount'] = $invoice->amount;
     $caption = '';
     $sql = "select item_number,description,\n\t\t\tquantity,unit,price,amount \n\t\t\tfrom purchase_order_lineitems i\n\t\t\twhere purchase_order_number='" . $nomor . "'";
     $caption = '';
     $class = '';
     $field_key = '';
     $offset = '0';
     $limit = 100;
     $order_column = '';
     $order_type = 'asc';
     $item = browse_select($sql, $caption, $class, $field_key, $offset, $limit, $order_column, $order_type, false);
     $data['lineitems'] = $item;
     $this->load->model('suppliers_model');
     $data['supplier_info'] = $this->suppliers_model->info($data['supllier_number']);
     $data['header'] = company_header();
     $this->load->view('purchase_order_print', $data);
 }
Ejemplo n.º 4
0
 function cash($id)
 {
     $this->load->helper('mylib');
     $data['message'] = '';
     $data['date_from'] = date('Y-m-d');
     $data['date_to'] = date('Y-m-d');
     $data['select_date'] = true;
     $data['criteria1'] = false;
     $data['label1'] = 'Counter ';
     $data['text1'] = '';
     $data['criteria2'] = false;
     $data['label2'] = 'Status';
     $data['text2'] = '1';
     $data['criteria3'] = false;
     $data['label3'] = '';
     $data['text3'] = '';
     $data['header'] = $data['header'] = company_header();
     $data['rpt_controller'] = "leasing/reports/cash/" . $id;
     if (isset($_POST['cmdPrint'])) {
         $d1 = $this->input->post('txtDateFrom');
         $d1 = date("Y-m-d", strtotime($d1));
         $d2 = $this->input->post('txtDateTo');
         $d2 = date("Y-m-d H:n:s", strtotime($d2));
     }
     switch ($id) {
         case '001':
             $data['select_date'] = true;
             $data['label1'] = 'Debitur: ';
             $data['text1'] = '';
             $data['criteria1'] = true;
             $data['caption'] = 'DAFTAR PENERIMAAN CASH';
             if (isset($_POST['cmdPrint'])) {
                 $sql = "select * from qry_ls_cash_receive ";
                 $sql .= " where tanggal between '" . $d1 . "' and '" . $d2 . "'";
                 $par1 = $this->input->post("text1");
                 if ($par1 != "") {
                     $sql .= " and cust_name like '%" . $par1 . "%'";
                 }
                 $sql .= " order by tanggal";
                 $data['content'] = browse_select(array('sql' => $sql, 'show_action' => false, "fields_sum" => array("amount_recv")));
                 $this->load->view('simple_print.php', $data);
             }
             break;
         case '002':
             $data['caption'] = 'DAFTAR DEBITUR SUMMARY';
             break;
         case '003':
         default:
             break;
     }
     if (!isset($_POST['cmdPrint'])) {
         $this->template->display_form_input('criteria', $data, '');
     }
 }