<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Riwayat extends CI_Controller {
	public function __construct() {
		parent::__construct();
		cek_login();
	}
    
	public function semua() {
        akses('owner');

		$conf = [
            'title' => 'Semua Riwayat'
		];
		
		$this -> layout -> load('layout', 'riwayat/semua', $conf);
	}

	public function penjualan() {
        akses('kasir');

		$conf = [
            'title' => 'Riwayat Penjualan'
		];
		
		$this -> layout -> load('layout', 'riwayat/penjualan', $conf);
	}
        
	public function pembelian() {
        akses('admin');

		$conf = [
			'title' => 'Riwayat Pembelian'
		];
		
		$this -> layout -> load('layout', 'riwayat/pembelian', $conf);
	}

	public function retur() {
        akses('kasir');

		$conf = [
			'title' => 'Riwayat Retur Barang'
		];
		
		$this -> layout -> load('layout', 'riwayat/retur_data', $conf);
	}

}

// Controller Pelanggan
// Kode ini dibuat dan dikembangkan oleh codelingker