<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Ui_controller
 *
 * @author Code sys PC 7
 */
class Ui_controller extends CI_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->model('customer');
        $this->load->model('material');
        $this->load->helper('url');
    }

    public function add_new_item() {
        $data['customers'] = $this->customer->getAllCustomers();
        $this->load->view('add_product', $data);
    }

    public function add_new_material() {
        $this->load->view('add_materials');
    }

    function all_materials() {
        $data['matrls'] = $this->material->getAllMaterials();
        $this->load->view('load_all_materials', $data);
    }

    public function add_new_customer() {
        $this->load->view('add_customer');
    }

    public function load_all_customer_items() {
        $data['customers'] = $this->customer->getAllCustomers();
        $this->load->view('load_all_prints_of_customer', $data);
    }

    public function load_all_customers() {
        $data['customers'] = $this->customer->getAllCustomers();
        $this->load->view('load_all_customers', $data);
    }

    public function add_new_quotation() {
        $data['customers'] = $this->customer->getAllCustomers();
        $this->load->view('quotation', $data);
    }

    public function main() {
        $this->load->view('Main');
    }

    public function view_quotation() {
        $this->load->view('view_quotation');
    }

    public function view_incomplete_jobcards() {
        $this->load->view('load_incomplete_jobcards');
    }

    public function customer_wise_quotation() {
        $data['customers'] = $this->customer->getAllCustomers();
        $this->load->view('load_customers_quotations', $data);
    }

    public function add_quotation_to_jobcard() {
        $data['customers'] = $this->customer->getAllCustomers();
        $this->load->view('add_to_job_card', $data);
    }

    public function view_jobcards_details() {
        $this->load->view('single_job_card_details');
    }

    public function customer() {
        $this->load->view('customer_menu');
    }

    public function items() {
        $this->load->view('item_menu');
    }

    public function materials() {
        $this->load->view('materials_menu');
    }

    public function quotations() {
        $this->load->view('quotation_menu');
    }

    public function jobcards() {
        $this->load->view('jobcard_menu');
    }

    public function costing() {
        $data['inks'] = $this->material->getInks();
        $data['customers'] = $this->customer->getAllCustomers();
        $data['materials'] = $this->material->getAllMaterials();
        $this->load->view('item_costin_sheet', $data);
    }

    public function pdfquot() {
        $this->load->view('quotation_pdf');
    }
}
