mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-28 19:10:11 -04:00
Minor fixes
This commit is contained in:
@@ -132,4 +132,4 @@ $autoload['language'] = array();
|
||||
|
|
||||
| $autoload['model'] = array('first_model' => 'first');
|
||||
*/
|
||||
$autoload['model'] = array('Appconfig', 'Person', 'Customer', 'Employee', 'Module', 'Item', 'Item_taxes', 'Sale', 'Sale_suspended', 'Supplier', 'Inventory', 'Receiving', 'Giftcard', 'Item_kit', 'Item_kit_items', 'Stock_location', 'Item_quantity','Dinner_table','Customer_rewards','Rewards', 'Tax');
|
||||
$autoload['model'] = array('Appconfig', 'Person', 'Customer', 'Employee', 'Module', 'Item', 'Item_taxes', 'Sale', 'Sale_suspended', 'Supplier', 'Inventory', 'Receiving', 'Giftcard', 'Item_kit', 'Item_kit_items', 'Stock_location', 'Item_quantity', 'Dinner_table', 'Customer_rewards', 'Rewards', 'Tax');
|
||||
|
||||
@@ -71,7 +71,7 @@ class Customers extends Persons
|
||||
$info->$property = $this->xss_clean($value);
|
||||
}
|
||||
$data['person_info'] = $info;
|
||||
$data['sales_tax_code_label'] = $info->sales_tax_code . ' ' .$this->Tax->get_info($info->sales_tax_code)->tax_code_name;
|
||||
$data['sales_tax_code_label'] = $info->sales_tax_code . ' ' . $this->Tax->get_info($info->sales_tax_code)->tax_code_name;
|
||||
$data['total'] = $this->xss_clean($this->Customer->get_totals($customer_id)->total);
|
||||
$packages = array('' => $this->lang->line('items_none'));
|
||||
foreach($this->Customer_rewards->get_all()->result_array() as $row)
|
||||
@@ -83,11 +83,11 @@ class Customers extends Persons
|
||||
|
||||
if ($customer_sales_tax_support == '1')
|
||||
{
|
||||
$data['customer_sales_tax_enabled'] = TRUE;
|
||||
$data['customer_sales_tax_enabled'] = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['customer_sales_tax_enabled'] = FALSE;
|
||||
$data['customer_sales_tax_enabled'] = FALSE;
|
||||
}
|
||||
|
||||
$this->load->view("customers/form", $data);
|
||||
@@ -271,4 +271,4 @@ class Customers extends Persons
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -213,7 +213,7 @@ class Items extends Secure_Controller
|
||||
$customer_sales_tax_support = $this->config->item('customer_sales_tax_support');
|
||||
if($customer_sales_tax_support == '1')
|
||||
{
|
||||
$data['customer_sales_tax_enabled'] = TRUE;
|
||||
$data['customer_sales_tax_enabled'] = TRUE;
|
||||
$tax_categories = array();
|
||||
foreach($this->Tax->get_all_tax_categories()->result_array() as $row)
|
||||
{
|
||||
@@ -224,7 +224,7 @@ class Items extends Secure_Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['customer_sales_tax_enabled'] = FALSE;
|
||||
$data['customer_sales_tax_enabled'] = FALSE;
|
||||
$data['tax_categories'] = array();
|
||||
$data['selected_tax_category'] = '';
|
||||
}
|
||||
@@ -705,7 +705,7 @@ class Items extends Secure_Controller
|
||||
/*if(strcmp('.htaccess', $pic_file)==0) {
|
||||
$pic_file='';
|
||||
}*/
|
||||
$item_data['pic_filename']=$pic_file;
|
||||
$item_data['pic_filename'] = $pic_file;
|
||||
|
||||
$item_number = $data[0];
|
||||
$invalidated = FALSE;
|
||||
|
||||
@@ -37,8 +37,6 @@ class Receivings extends Secure_Controller
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function select_supplier()
|
||||
{
|
||||
$supplier_id = $this->input->post('supplier');
|
||||
|
||||
@@ -236,7 +236,7 @@ class Sales extends Secure_Controller
|
||||
$this->sale_lib->add_payment($payment_type, $amount_tendered);
|
||||
}
|
||||
}
|
||||
else if ($payment_type == $this->lang->line('sales_rewards'))
|
||||
elseif ($payment_type == $this->lang->line('sales_rewards'))
|
||||
{
|
||||
$customer_id = $this->sale_lib->get_customer();
|
||||
$package_id = $this->Customer->get_info($customer_id)->package_id;
|
||||
@@ -970,9 +970,13 @@ class Sales extends Secure_Controller
|
||||
$data['email_receipt'] = $this->sale_lib->get_email_receipt();
|
||||
$data['selected_payment_type'] = $this->sale_lib->get_payment_type();
|
||||
if($customer_info && $this->config->item('customer_reward_enable') == TRUE)
|
||||
$data['payment_options'] = $this->Sale->get_payment_options(TRUE,TRUE);
|
||||
{
|
||||
$data['payment_options'] = $this->Sale->get_payment_options(TRUE, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['payment_options'] = $this->Sale->get_payment_options();
|
||||
}
|
||||
$quote_number = $this->sale_lib->get_quote_number();
|
||||
if ($quote_number != NULL)
|
||||
{
|
||||
@@ -1214,7 +1218,8 @@ class Sales extends Secure_Controller
|
||||
$sale_id = $this->input->post('suspended_sale_id');
|
||||
$this->sale_lib->clear_all();
|
||||
|
||||
if($sale_id > 0) {
|
||||
if($sale_id > 0)
|
||||
{
|
||||
$this->sale_lib->copy_entire_sale($sale_id);
|
||||
$this->Sale->delete_suspended_sale($sale_id);
|
||||
}
|
||||
@@ -1256,4 +1261,4 @@ class Sales extends Secure_Controller
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -89,7 +89,8 @@ class Tax_lib
|
||||
|
||||
$tax_group_index = $this->clean('X'.$tax_group);
|
||||
|
||||
if ($item_tax_amount != 0) {
|
||||
if ($item_tax_amount != 0)
|
||||
{
|
||||
if(!array_key_exists($tax_group_index, $sales_taxes))
|
||||
{
|
||||
$insertkey = $tax_group_index;
|
||||
@@ -148,10 +149,11 @@ class Tax_lib
|
||||
*/
|
||||
public function round_sales_taxes(&$sales_taxes)
|
||||
{
|
||||
if (!empty($sales_taxes))
|
||||
if(!empty($sales_taxes))
|
||||
{
|
||||
$sort = array();
|
||||
foreach($sales_taxes as $k=>$v) {
|
||||
foreach($sales_taxes as $k=>$v)
|
||||
{
|
||||
$sort['print_sequence'][$k] = $v['print_sequence'];
|
||||
}
|
||||
array_multisort($sort['print_sequence'], SORT_ASC, $sales_taxes);
|
||||
@@ -307,6 +309,7 @@ class Tax_lib
|
||||
$tax_code = $sales_tax_code;
|
||||
}
|
||||
}
|
||||
|
||||
return $tax_code;
|
||||
}
|
||||
|
||||
@@ -317,4 +320,4 @@ class Tax_lib
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -57,7 +57,7 @@ class Dinner_table extends CI_Model
|
||||
|
||||
public function get_name($dinner_table_id)
|
||||
{
|
||||
if($dinner_table_id == null || empty($dinner_table_id))
|
||||
if(empty($dinner_table_id))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -157,6 +157,7 @@ Gets information about a particular tax_code
|
||||
$this->save_tax_rates($tax_rate_data, $tax_code);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -180,6 +181,7 @@ Gets information about a particular tax_code
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -203,8 +205,10 @@ Gets information about a particular tax_code
|
||||
// Delete all exceptions for the given tax_code
|
||||
$this->delete_tax_rate_exceptions($tax_code);
|
||||
|
||||
if ($tax_rate_data != NULL) {
|
||||
foreach ($tax_rate_data as $row) {
|
||||
if ($tax_rate_data != NULL)
|
||||
{
|
||||
foreach ($tax_rate_data as $row)
|
||||
{
|
||||
$row['rate_tax_code'] = $tax_code;
|
||||
$success &= $this->db->insert('tax_code_rates', $row);
|
||||
}
|
||||
@@ -255,7 +259,8 @@ Gets information about a particular tax_code
|
||||
$this->db->from('tax_codes');
|
||||
$this->db->join('tax_code_rates',
|
||||
'tax_code = rate_tax_code and rate_tax_category_id = 0', 'LEFT');
|
||||
if (!empty($search)) {
|
||||
if (!empty($search))
|
||||
{
|
||||
$this->db->like('tax_code', $search);
|
||||
$this->db->or_like('tax_code_name', $search);
|
||||
}
|
||||
@@ -275,7 +280,8 @@ Gets information about a particular tax_code
|
||||
public function get_found_rows($search)
|
||||
{
|
||||
$this->db->from('tax_codes');
|
||||
if (!empty($search)) {
|
||||
if (!empty($search))
|
||||
{
|
||||
$this->db->like('tax_code', $search);
|
||||
$this->db->or_like('tax_code_name', $search);
|
||||
}
|
||||
@@ -300,7 +306,8 @@ Gets information about a particular tax_code
|
||||
$suggestions = array();
|
||||
|
||||
$this->db->from('tax_codes');
|
||||
if (!empty($search)) {
|
||||
if (!empty($search))
|
||||
{
|
||||
$this->db->like('tax_code', $search);
|
||||
$this->db->or_like('tax_code_name', $search);
|
||||
}
|
||||
@@ -326,7 +333,8 @@ Gets information about a particular tax_code
|
||||
|
||||
$this->db->from('tax_categories');
|
||||
$this->db->where('tax_category_id !=', 0);
|
||||
if (!empty($search)) {
|
||||
if (!empty($search))
|
||||
{
|
||||
$this->db->like('tax_category', '%'.$search.'%');
|
||||
}
|
||||
$this->db->order_by('tax_category', 'asc');
|
||||
@@ -344,6 +352,7 @@ Gets information about a particular tax_code
|
||||
$this->db->select('tax_category');
|
||||
$this->db->from('tax_categories');
|
||||
$this->db->where('tax_category_id', $tax_category_id);
|
||||
|
||||
return $this->db->get()->row()->tax_category;
|
||||
}
|
||||
|
||||
@@ -351,6 +360,7 @@ Gets information about a particular tax_code
|
||||
{
|
||||
$this->db->from('tax_categories');
|
||||
$this->db->order_by('tax_category_id');
|
||||
|
||||
return $this->db->get();
|
||||
}
|
||||
|
||||
@@ -358,6 +368,7 @@ Gets information about a particular tax_code
|
||||
{
|
||||
$this->db->select('tax_category_id');
|
||||
$this->db->from('tax_categories');
|
||||
|
||||
return $this->db->get()->row()->tax_category_id;
|
||||
}
|
||||
|
||||
@@ -372,4 +383,4 @@ Gets information about a particular tax_code
|
||||
return $this->db->get()->result_array();
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user