diff --git a/application/controllers/reports.php b/application/controllers/reports.php index 572176478..a76c7bb84 100644 --- a/application/controllers/reports.php +++ b/application/controllers/reports.php @@ -720,7 +720,7 @@ class Reports extends Secure_area foreach($report_data['summary'] as $key=>$row) { - $summary_data[] = array(anchor('sales/edit/'.$row['sale_id'], 'POS '.$row['sale_id'], array('class' => 'thickbox')), $row['sale_date'], $row['items_purchased'], $row['employee_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']), $row['payment_type'], $row['comment']); + $summary_data[] = array(anchor('sales/receipt/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target' => '_blank')), $row['sale_date'], $row['items_purchased'], $row['employee_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']), $row['payment_type'], $row['comment']); foreach($report_data['details'][$key] as $drow) { @@ -733,7 +733,6 @@ class Reports extends Secure_area "title" => $customer_info->first_name .' '. $customer_info->last_name.' '.$this->lang->line('reports_report'), "subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)), "headers" => $model->getDataColumns(), - "editable" => "sales", "summary_data" => $summary_data, "details_data" => $details_data, "overall_summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date,'customer_id' =>$customer_id, 'sale_type' => $sale_type)), @@ -770,7 +769,7 @@ class Reports extends Secure_area foreach($report_data['summary'] as $key=>$row) { - $summary_data[] = array(anchor('sales/edit/'.$row['sale_id'], 'POS '.$row['sale_id'], array('class' => 'thickbox')), $row['sale_date'], $row['items_purchased'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']), $row['payment_type'], $row['comment']); + $summary_data[] = array(anchor('sales/receipt/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target' => '_blank')), $row['sale_date'], $row['items_purchased'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),to_currency($row['profit']), $row['payment_type'], $row['comment']); foreach($report_data['details'][$key] as $drow) { @@ -783,7 +782,6 @@ class Reports extends Secure_area "title" => $employee_info->first_name .' '. $employee_info->last_name.' '.$this->lang->line('reports_report'), "subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)), "headers" => $model->getDataColumns(), - "editable" => "sales", "summary_data" => $summary_data, "details_data" => $details_data, "overall_summary_data" => $model->getSummaryData(array('start_date'=>$start_date, 'end_date'=>$end_date,'employee_id' =>$employee_id, 'sale_type' => $sale_type)), @@ -820,7 +818,7 @@ class Reports extends Secure_area foreach($report_data['summary'] as $key=>$row) { - $summary_data[] = array(anchor('sales/edit/'.$row['sale_id'], 'POS '.$row['sale_id'], array('class' => 'thickbox')), $row['sale_date'], $row['items_purchased'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),/*to_currency($row['profit']),*/ $row['payment_type'], $row['comment']); + $summary_data[] = array(anchor('sales/receipt/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target' => '_blank')), $row['sale_date'], $row['items_purchased'], $row['customer_name'], to_currency($row['subtotal']), to_currency($row['total']), to_currency($row['tax']),/*to_currency($row['profit']),*/ $row['payment_type'], $row['comment']); foreach($report_data['details'][$key] as $drow) { @@ -832,7 +830,6 @@ class Reports extends Secure_area "title" => $discount. '% '.$this->lang->line('reports_discount') . ' ' . $this->lang->line('reports_report'), "subtitle" => date('m/d/Y', strtotime($start_date)) .'-'.date('m/d/Y', strtotime($end_date)), "headers" => $headers, - "editable" => "sales", "summary_data" => $summary_data, "details_data" => $details_data, "header_width" => intval(100 / count($headers['summary'])), diff --git a/application/libraries/Receiving_lib.php b/application/libraries/Receiving_lib.php index 91ab08b84..b8e07cf16 100644 --- a/application/libraries/Receiving_lib.php +++ b/application/libraries/Receiving_lib.php @@ -118,7 +118,7 @@ class Receiving_lib $this->CI->session->unset_userdata('recv_stock_destination'); } - function add_item($item_id,$quantity=1,$item_location,$discount=0,$price=null,$description=null,$serialnumber=null) + function add_item($item_id,$quantity=1,$item_location=null,$discount=0,$price=null,$description=null,$serialnumber=null) { //make sure item exists in database. if(!$this->CI->Item->exists($item_id)) diff --git a/database/2.3_to_2.3.1.sql b/database/2.3_to_2.3.1.sql index 9c90031d1..fd01965e5 100644 --- a/database/2.3_to_2.3.1.sql +++ b/database/2.3_to_2.3.1.sql @@ -58,12 +58,8 @@ INSERT INTO `ospos_grants` (`permission_id`, `person_id`) VALUES ('reports_employees', 1), ('reports_suppliers', 1), ('reports_sales', 1), -('reports_discounts', 1), -('reports_taxes', 1), ('reports_categories', 1), -('reports_payments', 1), ('reports_discounts', 1), -('reports_categories', 1), ('reports_payments', 1), ('reports_taxes', 1), ('customers', 1), @@ -81,10 +77,10 @@ INSERT INTO `ospos_grants` (`permission_id`, `person_id`) VALUES -- add config options for tax inclusive sales INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('tax_included', '0'), -('recv_invoice_format', ''), -('sales_invoice_format', ''), -('sales_invoice_enable', '1'), -('recv_invoice_enable', '1'); +('recv_invoice_format', '$CO'), +('sales_invoice_format', '$CO'), +('sales_invoice_enable', '0'), +('recv_invoice_enable', '0'); -- add invoice_number column to receivings table ALTER TABLE `ospos_receivings` diff --git a/database/database.sql b/database/database.sql index a837a48eb..ab2a906ef 100644 --- a/database/database.sql +++ b/database/database.sql @@ -37,11 +37,11 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('return_policy', 'Test'), ('timezone', 'America/New_York'), ('website', ''), -('recv_invoice_format', ''), -('sales_invoice_format', ''), +('recv_invoice_format', '$CO'), +('sales_invoice_format', '$CO'), ('tax_included', '0'), -('recv_invoice_enable', '1'), -('sales_invoice_enable', '1'); +('recv_invoice_enable', '0'), +('sales_invoice_enable', '0'); -- -------------------------------------------------------- @@ -147,7 +147,6 @@ CREATE TABLE `ospos_items` ( `description` varchar(255) NOT NULL, `cost_price` decimal(15,2) NOT NULL, `unit_price` decimal(15,2) NOT NULL, - `quantity` decimal(15,2) NOT NULL DEFAULT '0', `reorder_level` decimal(15,2) NOT NULL DEFAULT '0', `receiving_quantity` int(11) NOT NULL DEFAULT '1', `item_id` int(10) NOT NULL AUTO_INCREMENT, diff --git a/import_items.csv b/import_items.csv index 19d856290..6aca1eb9e 100644 --- a/import_items.csv +++ b/import_items.csv @@ -1,2 +1,2 @@ UPC/EAN/ISBN,Item Name,Category,Supplier ID,Cost Price,Unit Price,Tax 1 Name,Tax 1 Percent,Tax 2 Name ,Tax 2 Percent,Reorder Level,Description,Allow Alt Description,Item has Serial Number,custom1,custom2,custom3,custom4,custom5,custom6,custom7,custom8,custom9,custom10,location_id,quantity -33333333,Apple iMac,Computers,,800,1200,Tax 1,8,Tax 2,10,1,Best Computer ever,y,,"Oz, Frank",The Bunny and the Hill,"Monkeys,Giraffes,Gorillas",English,New,Apple,,1999,D3lk3jlkjs,Hardbound,8,100 +33333333,Apple iMac,Computers,,800,1200,Tax 1,8,Tax 2,10,1,Best Computer ever,y,,"Oz, Frank",The Bunny and the Hill,"Monkeys,Giraffes,Gorillas",English,New,Apple,,1999,D3lk3jlkjs,Hardbound,1,100