G2A Many GEOs
SHARE
TWEET

Untitled

a guest Mar 29th, 2020 121 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. class laporan extends CI_Controller{
  3.     function __construct(){
  4.         parent::__construct();
  5.         if($this->session->userdata('masuk') !=TRUE){
  6.             $url=base_url();
  7.             redirect($url);
  8.         };
  9.         $this->load->model('m_kategori');
  10.         $this->load->model('m_barang');
  11.         $this->load->model('m_suplier');
  12.         $this->load->model('m_pembelian');
  13.         $this->load->model('m_penjualan');
  14.         $this->load->model('m_laporan');
  15.     }
  16.     function index(){
  17.     if($this->session->userdata('akses')=='1'){
  18.         $data['data']=$this->m_barang->tampil_barang();
  19.         $data['kat']=$this->m_kategori->tampil_kategori();
  20.         $data['jual_bln']=$this->m_laporan->get_bulan_jual();
  21.         $data['jual_thn']=$this->m_laporan->get_tahun_jual();
  22.         $this->load->view('admin/v_laporan',$data);
  23.     }else{
  24.         echo "Halaman tidak ditemukan";
  25.     }
  26.     }
  27.     function lap_stok_barang(){
  28.         $x['data']=$this->m_laporan->get_stok_barang();
  29.         $this->load->view('admin/laporan/v_lap_stok_barang',$x);
  30.     }
  31.     function lap_data_barang(){
  32.         $x['data']=$this->m_laporan->get_data_barang();
  33.         $this->load->view('admin/laporan/v_lap_barang',$x);
  34.     }
  35.     function lap_data_penjualan(){
  36.         $x['data']=$this->m_laporan->get_data_penjualan();
  37.         $x['jml']=$this->m_laporan->get_total_penjualan();
  38.         $this->load->view('admin/laporan/v_lap_penjualan',$x);
  39.     }
  40.     function lap_penjualan_pertanggal(){
  41.         $tanggal=$this->input->post('tgl');
  42.         $x['jml']=$this->m_laporan->get_data__total_jual_pertanggal($tanggal);
  43.         $x['data']=$this->m_laporan->get_data_jual_pertanggal($tanggal);
  44.         $this->load->view('admin/laporan/v_lap_jual_pertanggal',$x);
  45.     }
  46.     function lap_penjualan_perbulan(){
  47.         $bulan=$this->input->post('bln');
  48.         $x['jml']=$this->m_laporan->get_total_jual_perbulan($bulan);
  49.         $x['data']=$this->m_laporan->get_jual_perbulan($bulan);
  50.         $this->load->view('admin/laporan/v_lap_jual_perbulan',$x);
  51.     }
  52.     function lap_penjualan_pertahun(){
  53.         $tahun=$this->input->post('thn');
  54.         $x['jml']=$this->m_laporan->get_total_jual_pertahun($tahun);
  55.         $x['data']=$this->m_laporan->get_jual_pertahun($tahun);
  56.         $this->load->view('admin/laporan/v_lap_jual_pertahun',$x);
  57.     }
  58.     function lap_laba_rugi(){
  59.         $bulan=$this->input->post('bln');
  60.         $x['jml']=$this->m_laporan->get_total_lap_laba_rugi($bulan);
  61.         $x['data']=$this->m_laporan->get_lap_laba_rugi($bulan);
  62.         $this->load->view('admin/laporan/v_lap_laba_rugi',$x);
  63.     }
  64. }
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top