<commit_before><?php 
class Sales_model extends CI_model{

	function get_sales(){		
		$this->db->order_by("sales_id", "desc");
		$this->db->select('*');
		$this->db->from('pos_sales');
		$this->db->join('pos_item', 'pos_item.item_id = pos_sales.sales_item');
		$this->db->join('aauth_users', 'aauth_users.name = pos_item.item_supplier', 'left');

		$query = $this->db->get();

		return $query;
	}

	function get_daily_sales(){
		date_default_timezone_set('Asia/Manila');
		$today = date('Y-m-d');	

	    $this->db->order_by("sales_id", "desc");
		$this->db->select('sales_id,pos_item.item_id, pos_item.item_name, pos_item.item_supplier, pos_item.item_category, sales_quantity,sales_total, sales_status, sales_discount, sales_date, sales_supplier, sales_st, sales_status,letter_code');
		$this->db->from('pos_sales');
		$this->db->where('sales_date >=', $today);
		$this->db->join('pos_item', 'pos_item.item_id = pos_sales.sales_item');
		$this->db->join('aauth_users', 'aauth_users.name = pos_item.item_supplier', 'left');

		$query = $this->db->get();

		return $query;
	}

	function get_all_sales(){
	    $this->db->order_by("sales_id", "desc");
		$this->db->select('sales_id,pos_item.item_id, pos_item.item_name, pos_item.item_supplier, pos_item.item_category, sales_quantity,sales_total, sales_status, sales_discount, sales_date, sales_supplier, sales_st, sales_status, letter_code');
		$this->db->from('pos_sales');<commit_msg>fix: total qty sold<commit_after><?php 
class Sales_model extends CI_model{

	function get_sales(){		
		$this->db->order_by("sales_id", "desc");
		$this->db->select('*');
		$this->db->from('pos_sales');
		$this->db->where('sales_status =', 0); // to remove archived sales items
		$this->db->join('pos_item', 'pos_item.item_id = pos_sales.sales_item');
		$this->db->join('aauth_users', 'aauth_users.name = pos_item.item_supplier', 'left');

		$query = $this->db->get();

		return $query;
	}

	function get_daily_sales(){
		date_default_timezone_set('Asia/Manila');
		$today = date('Y-m-d');	

	    $this->db->order_by("sales_id", "desc");
		$this->db->select('sales_id,pos_item.item_id, pos_item.item_name, pos_item.item_supplier, pos_item.item_category, sales_quantity,sales_total, sales_status, sales_discount, sales_date, sales_supplier, sales_st, sales_status,letter_code');
		$this->db->from('pos_sales');
		$this->db->where('sales_date >=', $today);
		$this->db->where('sales_status =', 0); // to remove archived sales items

		$this->db->join('pos_item', 'pos_item.item_id = pos_sales.sales_item');
		$this->db->join('aauth_users', 'aauth_users.name = pos_item.item_supplier', 'left');

		$query = $this->db->get();

		return $query;
	}

	function get_all_sales(){
	    $this->db->order_by("sales_id", "desc");
		$this->db->select('sales_id,pos_item.item_id, pos_item.item_name, pos_item.item_supplier, pos_item.item_category, sales_quantity,sales_total, sales_status, sales_discount, sales_date, sales_supplier, sales_st, sales_status, letter_code');
		$this->db->from('pos_sales');
		$this->db->where('sales_status =', 0); // to remove archived sales items
{'fraction_non_alphanumeric': 0.19089147286821706, 'fraction_numerical': 0.0009689922480620155, 'mean_word_length': 6.070776255707763, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4918778', 'n_tokens_mistral': 1263, 'n_tokens_neox': 1146, 'n_words': 165}