diff --git a/COPYING b/COPYING index fe83d1350..43493da92 100644 --- a/COPYING +++ b/COPYING @@ -1,8 +1,11 @@ The MIT License (MIT) -Copyright (c) 2014 pappastech +Copyright (c) 2012-2014 pappastech +Copyright (c) 2013 Rob Garrison +Copyright (c) 2013 Parq +Copyright (c) 2013 Ramel Copyright (c) 2014-2015 jekkos -Copyright (c) 2015 FrancescoUK aka daN4cat +Copyright (c) 2015 FrancescoUK (aka daN4cat) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/application/controllers/config.php b/application/controllers/config.php index 635cd5eee..cf4c9cb98 100644 --- a/application/controllers/config.php +++ b/application/controllers/config.php @@ -24,32 +24,32 @@ class Config extends Secure_area $batch_save_data=array( 'company'=>$this->input->post('company'), - 'address'=>$this->input->post('address'), - 'phone'=>$this->input->post('phone'), - 'email'=>$this->input->post('email'), - 'fax'=>$this->input->post('fax'), - 'website'=>$this->input->post('website'), - 'default_tax_1_rate'=>$this->input->post('default_tax_1_rate'), - 'default_tax_1_name'=>$this->input->post('default_tax_1_name'), - 'default_tax_2_rate'=>$this->input->post('default_tax_2_rate'), - 'default_tax_2_name'=>$this->input->post('default_tax_2_name'), - 'return_policy'=>$this->input->post('return_policy'), - 'tax_included'=>$this->input->post('tax_included'), - 'recv_invoice_format'=>$this->input->post('recv_invoice_format'), - 'sales_invoice_format'=>$this->input->post('sales_invoice_format'), - 'receiving_calculate_average_price'=>$this->input->post('receiving_calculate_average_price'), - 'lines_per_page'=>$this->input->post('lines_per_page'), - 'default_sales_discount'=>$this->input->post('default_sales_discount'), - 'custom1_name'=>$this->input->post('custom1_name'),/**GARRISON ADDED 4/20/2013**/ - 'custom2_name'=>$this->input->post('custom2_name'),/**GARRISON ADDED 4/20/2013**/ - 'custom3_name'=>$this->input->post('custom3_name'),/**GARRISON ADDED 4/20/2013**/ - 'custom4_name'=>$this->input->post('custom4_name'),/**GARRISON ADDED 4/20/2013**/ - 'custom5_name'=>$this->input->post('custom5_name'),/**GARRISON ADDED 4/20/2013**/ - 'custom6_name'=>$this->input->post('custom6_name'),/**GARRISON ADDED 4/20/2013**/ - 'custom7_name'=>$this->input->post('custom7_name'),/**GARRISON ADDED 4/20/2013**/ - 'custom8_name'=>$this->input->post('custom8_name'),/**GARRISON ADDED 4/20/2013**/ - 'custom9_name'=>$this->input->post('custom9_name'),/**GARRISON ADDED 4/20/2013**/ - 'custom10_name'=>$this->input->post('custom10_name')/**GARRISON ADDED 4/20/2013**/ + 'address'=>$this->input->post('address'), + 'phone'=>$this->input->post('phone'), + 'email'=>$this->input->post('email'), + 'fax'=>$this->input->post('fax'), + 'website'=>$this->input->post('website'), + 'default_tax_1_rate'=>$this->input->post('default_tax_1_rate'), + 'default_tax_1_name'=>$this->input->post('default_tax_1_name'), + 'default_tax_2_rate'=>$this->input->post('default_tax_2_rate'), + 'default_tax_2_name'=>$this->input->post('default_tax_2_name'), + 'return_policy'=>$this->input->post('return_policy'), + 'tax_included'=>$this->input->post('tax_included'), + 'recv_invoice_format'=>$this->input->post('recv_invoice_format'), + 'sales_invoice_format'=>$this->input->post('sales_invoice_format'), + 'receiving_calculate_average_price'=>$this->input->post('receiving_calculate_average_price'), + 'lines_per_page'=>$this->input->post('lines_per_page'), + 'default_sales_discount'=>$this->input->post('default_sales_discount'), + 'custom1_name'=>$this->input->post('custom1_name'), + 'custom2_name'=>$this->input->post('custom2_name'), + 'custom3_name'=>$this->input->post('custom3_name'), + 'custom4_name'=>$this->input->post('custom4_name'), + 'custom5_name'=>$this->input->post('custom5_name'), + 'custom6_name'=>$this->input->post('custom6_name'), + 'custom7_name'=>$this->input->post('custom7_name'), + 'custom8_name'=>$this->input->post('custom8_name'), + 'custom9_name'=>$this->input->post('custom9_name'), + 'custom10_name'=>$this->input->post('custom10_name') ); if (!empty($upload_data['orig_name'])) @@ -68,14 +68,14 @@ class Config extends Secure_area function save_locale() { $batch_save_data=array( - 'currency_symbol'=>$this->input->post('currency_symbol'), - 'currency_side'=>$this->input->post('currency_side'),/**GARRISON ADDED 4/20/2013**/ - 'language'=>$this->input->post('language'), - 'timezone'=>$this->input->post('timezone'), - 'dateformat'=>$this->input->post('dateformat'), - 'timeformat'=>$this->input->post('timeformat'), - 'thousands_separator'=>$this->input->post('thousands_separator'), - 'decimal_point'=>$this->input->post('decimal_point'), + 'currency_symbol'=>$this->input->post('currency_symbol'), + 'currency_side'=>$this->input->post('currency_side'), + 'language'=>$this->input->post('language'), + 'timezone'=>$this->input->post('timezone'), + 'dateformat'=>$this->input->post('dateformat'), + 'timeformat'=>$this->input->post('timeformat'), + 'thousands_separator'=>$this->input->post('thousands_separator'), + 'decimal_point'=>$this->input->post('decimal_point') ); $result = $this->Appconfig->batch_save( $batch_save_data ); @@ -133,19 +133,19 @@ class Config extends Secure_area function save_barcode() { $batch_save_data=array( - 'barcode_type'=>$this->input->post('barcode_type'), - 'barcode_quality'=>$this->input->post('barcode_quality'), - 'barcode_width'=>$this->input->post('barcode_width'), - 'barcode_height'=>$this->input->post('barcode_height'), - 'barcode_font'=>$this->input->post('barcode_font'), - 'barcode_font_size'=>$this->input->post('barcode_font_size'), - 'barcode_first_row'=>$this->input->post('barcode_first_row'), - 'barcode_second_row'=>$this->input->post('barcode_second_row'), - 'barcode_third_row'=>$this->input->post('barcode_third_row'), - 'barcode_num_in_row'=>$this->input->post('barcode_num_in_row'), - 'barcode_page_width'=>$this->input->post('barcode_page_width'), - 'barcode_page_cellspacing'=>$this->input->post('barcode_page_cellspacing'), - 'barcode_content'=>$this->input->post('barcode_content'), + 'barcode_type'=>$this->input->post('barcode_type'), + 'barcode_quality'=>$this->input->post('barcode_quality'), + 'barcode_width'=>$this->input->post('barcode_width'), + 'barcode_height'=>$this->input->post('barcode_height'), + 'barcode_font'=>$this->input->post('barcode_font'), + 'barcode_font_size'=>$this->input->post('barcode_font_size'), + 'barcode_first_row'=>$this->input->post('barcode_first_row'), + 'barcode_second_row'=>$this->input->post('barcode_second_row'), + 'barcode_third_row'=>$this->input->post('barcode_third_row'), + 'barcode_num_in_row'=>$this->input->post('barcode_num_in_row'), + 'barcode_page_width'=>$this->input->post('barcode_page_width'), + 'barcode_page_cellspacing'=>$this->input->post('barcode_page_cellspacing'), + 'barcode_content'=>$this->input->post('barcode_content') ); $result = $this->Appconfig->batch_save( $batch_save_data ); @@ -156,18 +156,18 @@ class Config extends Secure_area function save_receipt() { $batch_save_data = array ( - 'use_invoice_template' => $this->input->post ( 'use_invoice_template' ), - 'invoice_default_comments' => $this->input->post ( 'invoice_default_comments' ), - 'invoice_email_message' => $this->input->post ( 'invoice_email_message' ), - 'receipt_show_taxes' => $this->input->post ( 'receipt_show_taxes' ), - 'print_silently' => $this->input->post ( 'print_silently' ), - 'print_header' => $this->input->post ( 'print_header' ), - 'print_footer' => $this->input->post ( 'print_footer' ), - 'print_top_margin' => $this->input->post ( 'print_top_margin' ), - 'print_left_margin' => $this->input->post ( 'print_left_margin' ), - 'print_bottom_margin' => $this->input->post ( 'print_bottom_margin' ), - 'print_right_margin' => $this->input->post ( 'print_right_margin' ), - 'show_total_discount' => $this->input->post( 'show_total_discount' ) + 'use_invoice_template' => $this->input->post ( 'use_invoice_template' ), + 'invoice_default_comments' => $this->input->post ( 'invoice_default_comments' ), + 'invoice_email_message' => $this->input->post ( 'invoice_email_message' ), + 'receipt_show_taxes' => $this->input->post ( 'receipt_show_taxes' ), + 'print_silently' => $this->input->post ( 'print_silently' ), + 'print_header' => $this->input->post ( 'print_header' ), + 'print_footer' => $this->input->post ( 'print_footer' ), + 'print_top_margin' => $this->input->post ( 'print_top_margin' ), + 'print_left_margin' => $this->input->post ( 'print_left_margin' ), + 'print_bottom_margin' => $this->input->post ( 'print_bottom_margin' ), + 'print_right_margin' => $this->input->post ( 'print_right_margin' ), + 'show_total_discount' => $this->input->post( 'show_total_discount' ) ); $result = $this->Appconfig->batch_save( $batch_save_data ); $success = $result ? true : false; @@ -198,13 +198,13 @@ class Config extends Secure_area { $this->load->dbutil(); $prefs = array( - 'format' => 'zip', - 'filename' => 'ospos.sql' + 'format' => 'zip', + 'filename' => 'ospos.sql' ); $backup =& $this->dbutil->backup($prefs); - $file_name = 'ospos-' . date("Y-m-d-H-i-s") .'.zip'; + $file_name = 'ospos-' . date("Y-m-d-H-i-s") .'.zip'; $save = 'uploads/'.$file_name; $this->load->helper('download'); while (ob_get_level()) { diff --git a/application/controllers/giftcards.php b/application/controllers/giftcards.php index 2dd6998f5..26a748b89 100644 --- a/application/controllers/giftcards.php +++ b/application/controllers/giftcards.php @@ -39,7 +39,7 @@ class Giftcards extends Secure_area implements iData_controller $suggestions = $this->Giftcard->get_search_suggestions($this->input->post('q'),$this->input->post('limit')); echo implode("\n",$suggestions); } -/** GARRISON ADDED 5/3/2013 **/ + /* Gives search suggestions for person_id based on what is being searched for */ @@ -48,7 +48,7 @@ class Giftcards extends Secure_area implements iData_controller $suggestions = $this->Customer->get_customer_search_suggestions($this->input->post('q'),$this->input->post('limit')); echo implode("\n",$suggestions); } -/** END GARRISON ADDED **/ + function get_row() { $giftcard_id = $this->input->post('row_id'); diff --git a/application/controllers/items.php b/application/controllers/items.php index aa559b5da..07e075083 100644 --- a/application/controllers/items.php +++ b/application/controllers/items.php @@ -44,7 +44,7 @@ class Items extends Secure_area implements iData_controller $is_serialized = $this->input->post('is_serialized'); $no_description = $this->input->post('no_description'); $search_custom = $this->input->post('search_custom'); - $is_deleted = $this->input->post('is_deleted'); // Parq 131215 + $is_deleted = $this->input->post('is_deleted'); $limit_from = $this->input->post('limit_from'); $lines_per_page = $this->Appconfig->get('lines_per_page'); $items = $this->Item->search($search,$stock_location,$empty_upc,$low_inventory,$is_serialized,$no_description,$search_custom,$is_deleted,$lines_per_page,$limit_from); @@ -108,7 +108,6 @@ class Items extends Secure_area implements iData_controller echo implode("\n",$suggestions); } -/**GARRISON ADDED 5/18/2013**/ /* Gives search suggestions based on what is being searched for */ @@ -207,8 +206,6 @@ class Items extends Secure_area implements iData_controller $suggestions = $this->Item->get_custom10_suggestions($this->input->post('q')); echo implode("\n",$suggestions); } - -/**END GARRISON ADDED**/ function get_row() { @@ -217,7 +214,7 @@ class Items extends Secure_area implements iData_controller $stock_location = $this->item_lib->get_item_location(); $item_quantity = $this->Item_quantity->get_item_quantity($item_id,$stock_location); $item_info->quantity = $item_quantity->quantity; - $data_row=get_item_data_row($item_info,$this); + $data_row = get_item_data_row($item_info,$this); echo $data_row; $this->_remove_duplicate_cookies(); @@ -244,12 +241,11 @@ class Items extends Secure_area implements iData_controller $quantity = $this->Item_quantity->get_item_quantity($item_id,$location['location_id'])->quantity; $quantity = ($item_id == -1) ? null: $quantity; $location_array[$location['location_id']] = array('location_name'=>$location['location_name'], 'quantity'=>$quantity); - $data['stock_locations']= $location_array; + $data['stock_locations'] = $location_array; } - $this->load->view("items/form",$data); + $this->load->view("items/form", $data); } - //Ramel Inventory Tracking function inventory($item_id=-1) { $data['item_info']=$this->Item->get_info($item_id); @@ -262,7 +258,7 @@ class Items extends Secure_area implements iData_controller $data['item_quantities'][$location_data['location_id']] = $this->Item_quantity->get_item_quantity($item_id,$location_data['location_id'])->quantity; } - $this->load->view("items/inventory",$data); + $this->load->view("items/inventory", $data); } function count_details($item_id=-1) @@ -277,8 +273,8 @@ class Items extends Secure_area implements iData_controller $data['item_quantities'][$location_data['location_id']] = $this->Item_quantity->get_item_quantity($item_id,$location_data['location_id'])->quantity; } - $this->load->view("items/count_details",$data); - } //------------------------------------------- Ramel + $this->load->view("items/count_details", $data); + } function generate_barcodes($item_ids) { @@ -355,17 +351,17 @@ class Items extends Secure_area implements iData_controller 'receiving_quantity'=>$this->input->post('receiving_quantity'), 'allow_alt_description'=>$this->input->post('allow_alt_description'), 'is_serialized'=>$this->input->post('is_serialized'), - 'deleted'=>$this->input->post('is_deleted'), /** Parq 131215 **/ - 'custom1'=>$this->input->post('custom1'),/**GARRISON ADDED 4/21/2013**/ - 'custom2'=>$this->input->post('custom2'),/**GARRISON ADDED 4/21/2013**/ - 'custom3'=>$this->input->post('custom3'),/**GARRISON ADDED 4/21/2013**/ - 'custom4'=>$this->input->post('custom4'),/**GARRISON ADDED 4/21/2013**/ - 'custom5'=>$this->input->post('custom5'),/**GARRISON ADDED 4/21/2013**/ - 'custom6'=>$this->input->post('custom6'),/**GARRISON ADDED 4/21/2013**/ - 'custom7'=>$this->input->post('custom7'),/**GARRISON ADDED 4/21/2013**/ - 'custom8'=>$this->input->post('custom8'),/**GARRISON ADDED 4/21/2013**/ - 'custom9'=>$this->input->post('custom9'),/**GARRISON ADDED 4/21/2013**/ - 'custom10'=>$this->input->post('custom10')/**GARRISON ADDED 4/21/2013**/ + 'deleted'=>$this->input->post('is_deleted'), + 'custom1'=>$this->input->post('custom1'), + 'custom2'=>$this->input->post('custom2'), + 'custom3'=>$this->input->post('custom3'), + 'custom4'=>$this->input->post('custom4'), + 'custom5'=>$this->input->post('custom5'), + 'custom6'=>$this->input->post('custom6'), + 'custom7'=>$this->input->post('custom7'), + 'custom8'=>$this->input->post('custom8'), + 'custom9'=>$this->input->post('custom9'), + 'custom10'=>$this->input->post('custom10') ); if (!empty($upload_data['orig_name'])) @@ -373,7 +369,7 @@ class Items extends Secure_area implements iData_controller $item_data['pic_id'] = $upload_data['raw_name']; } - $employee_id=$this->Employee->get_logged_in_employee_info()->person_id; + $employee_id = $this->Employee->get_logged_in_employee_info()->person_id; $cur_item_info = $this->Item->get_info($item_id); if($this->Item->save($item_data,$item_id)) @@ -381,7 +377,7 @@ class Items extends Secure_area implements iData_controller $success = TRUE; $new_item = FALSE; //New item - if($item_id==-1) + if ($item_id==-1) { $item_id = $item_data['item_id']; $new_item = TRUE; @@ -398,7 +394,6 @@ class Items extends Secure_area implements iData_controller } } $success &= $this->Item_taxes->save($items_taxes_data, $item_id); - //Save item quantity $stock_locations = $this->Stock_location->get_undeleted_all()->result_array(); @@ -473,7 +468,6 @@ class Items extends Secure_area implements iData_controller '
'.$this->lang->line('upload_no_file_selected').'
'); } - //Ramel Inventory Tracking function save_inventory($item_id=-1) { $employee_id=$this->Employee->get_logged_in_employee_info()->person_id; @@ -508,8 +502,7 @@ class Items extends Secure_area implements iData_controller echo json_encode(array('success'=>false,'message'=>$this->lang->line('items_error_adding_updating').' '. $cur_item_info->name,'item_id'=>-1)); } - - }//---------------------------------------------------------------------Ramel + } function bulk_update() { @@ -610,16 +603,16 @@ class Items extends Secure_area implements iData_controller 'supplier_id' => $this->Supplier->exists($data[3]) ? $data[3] : null, 'allow_alt_description' => $data[12] != '' ? '1' : '0', 'is_serialized' => $data[13] != '' ? '1' : '0', - 'custom1' => $data[14], /** GARRISON ADDED 5/6/2013 **/ - 'custom2' => $data[15], /** GARRISON ADDED 5/6/2013 **/ - 'custom3' => $data[16], /** GARRISON ADDED 5/6/2013 **/ - 'custom4' => $data[17], /** GARRISON ADDED 5/6/2013 **/ - 'custom5' => $data[18], /** GARRISON ADDED 5/6/2013 **/ - 'custom6' => $data[19], /** GARRISON ADDED 5/6/2013 **/ - 'custom7' => $data[20], /** GARRISON ADDED 5/6/2013 **/ - 'custom8' => $data[21], /** GARRISON ADDED 5/6/2013 **/ - 'custom9' => $data[22], /** GARRISON ADDED 5/6/2013 **/ - 'custom10' => $data[23] /** GARRISON ADDED 5/6/2013 **/ + 'custom1' => $data[14], + 'custom2' => $data[15], + 'custom3' => $data[16], + 'custom4' => $data[17], + 'custom5' => $data[18], + 'custom6' => $data[19], + 'custom7' => $data[20], + 'custom8' => $data[21], + 'custom9' => $data[22], + 'custom10' => $data[23] ); $item_number = $data[0]; $invalidated = false; @@ -747,6 +740,5 @@ class Items extends Secure_area implements iData_controller { return 450; } - } ?> diff --git a/application/controllers/person_controller.php b/application/controllers/person_controller.php index 32a9bbeac..983552830 100644 --- a/application/controllers/person_controller.php +++ b/application/controllers/person_controller.php @@ -30,7 +30,7 @@ abstract class Person_controller extends Secure_area implements iPerson_controll } echo '#'; } -/** GARRISON ADDED 4/25/2013 IN PROGRESS **/ + /* Gives search suggestions based on what is being searched for */ @@ -49,6 +49,5 @@ abstract class Person_controller extends Secure_area implements iPerson_controll $data_row=get_person_data_row($this->Person->get_info($person_id),$this); echo $data_row; } - } ?> \ No newline at end of file diff --git a/application/helpers/currency_helper.php b/application/helpers/currency_helper.php index a63565586..6ecdeae12 100644 --- a/application/helpers/currency_helper.php +++ b/application/helpers/currency_helper.php @@ -1,5 +1,4 @@ ' . $image . ''; $table_data_row.='