���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/adimi/application/modules/web/models/customer/ |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Invoices extends CI_Model { public function __construct() { parent::__construct(); $this->user_auth->check_customer_auth(); } //Invoice List public function invoice_list() { $customer_id = $this->session->userdata('customer_id'); $this->db->select('a.*,b.customer_name'); $this->db->from('invoice a'); $this->db->join('customer_information b','b.customer_id = a.customer_id'); $this->db->where('a.customer_id',$customer_id); $this->db->order_by('a.invoice','desc'); $query = $this->db->get(); if ($query->num_rows() > 0) { return $query->result_array(); } return false; } //Invoice List public function total_customer_invoice($customer_id) { $this->db->select('a.*,b.customer_name'); $this->db->from('invoice a'); $this->db->join('customer_information b','b.customer_id = a.customer_id'); $this->db->where('a.customer_id',$customer_id); $query = $this->db->get(); if ($query->num_rows() > 0) { return $query->num_rows(); } return false; } //Retrieve invoice_html_data public function retrieve_invoice_html_data($invoice_id) { $this->db->select(' a.*, b.*, c.*, d.product_id, d.product_name, d.product_details, d.product_model,d.unit, e.unit_short_name, f.variant_name, a.invoice_details '); $this->db->from('invoice a'); $this->db->join('customer_information b','b.customer_id = a.customer_id'); $this->db->join('invoice_details c','c.invoice_id = a.invoice_id'); $this->db->join('product_information d','d.product_id = c.product_id'); $this->db->join('unit e','e.unit_id = d.unit','left'); $this->db->join('variant f','f.variant_id = c.variant_id','left'); $this->db->where('a.invoice_id',$invoice_id); $query = $this->db->get(); if ($query->num_rows() > 0) { return $query->result_array(); } return false; } }