diff --git a/Dockerfile b/Dockerfile index b5258d91b..7fc1af1af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ MAINTAINER jekkos RUN sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list RUN apt-get update RUN apt-get -y upgrade -RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server apache2 libapache2-mod-php5 pwgen python-setuptools vim-tiny php5-mysql php5-gd nodejs npm curl +RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server apache2 libapache2-mod-php5 pwgen python-setuptools vim-tiny php5-mysql php5-gd php5-apcu nodejs npm curl RUN easy_install supervisor ADD ./docker/foreground.sh /etc/apache2/foreground.sh ADD ./docker/supervisord.conf /etc/supervisord.conf diff --git a/README.md b/README.md index 51a290a2e..5da8f3ea4 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,10 @@ username: admin password:pointofsale 9. Enjoy +FAQ +--- +If an blank page (HTTP status 500) shows after search completion or receipt generation, then double check php5-gd presence in your php installation. On windows check in php.ini whether the lib is installed. On Ubuntu issue `sudo apt-get install php5-gd`. Also have a look at the Dockerfile for a complete list of recommended packages. + 13/01/2016: Install using Docker ------------------------------- From now on ospos can be deployed using Docker on Linux, Mac or Windows. This setup dramatically reduces the number of possible issues as all setup is now done in a Dockerfile. Docker runs natively on mac and linux, but will require more overhead on windows. Please refer to the docker documentation for instructions on how to set it up on your platform. diff --git a/application/helpers/table_helper.php b/application/helpers/table_helper.php index 722a238d2..792c25cea 100644 --- a/application/helpers/table_helper.php +++ b/application/helpers/table_helper.php @@ -66,7 +66,7 @@ function get_sales_manage_sale_data_row($sale, $controller) $controller_name = $CI->uri->segment(1); $table_data_row=''; - $table_data_row.=''; + $table_data_row.=''; $table_data_row.=''.'POS ' . $sale['sale_id'] . ''; $table_data_row.=''.date( $CI->config->item('dateformat') . ' ' . $CI->config->item('timeformat'), strtotime($sale['sale_time']) ).''; $table_data_row.=''.character_limiter( $sale['customer_name'], 25).''; @@ -75,12 +75,12 @@ function get_sales_manage_sale_data_row($sale, $controller) $table_data_row.=''.to_currency( $sale['change_due'] ).''; $table_data_row.=''.$sale['payment_type'].''; $table_data_row.=''.$sale['invoice_number'].''; - $table_data_row.=''; - $table_data_row.=anchor($controller_name."/edit/" . $sale['sale_id'], $CI->lang->line('common_edit'),array('class'=>"modal-dlg modal-btn-delete modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))); + $table_data_row.=''; + $table_data_row.=anchor($controller_name."/edit/" . $sale['sale_id'], $CI->lang->line('common_edit'), array('class'=>'modal-dlg modal-btn-delete modal-btn print_hide', 'title'=>$CI->lang->line('common_edit'))); $table_data_row.='    '; - $table_data_row.='' . $CI->lang->line('sales_show_receipt') . ''; + $table_data_row.=anchor($controller_name."/receipt/" . $sale['sale_id'], $CI->lang->line('sales_show_receipt'), array('class'=>'print_hide', 'title'=>$CI->lang->line('sales_show_receipt'))); $table_data_row.='    '; - $table_data_row.='' . $CI->lang->line('sales_show_invoice') . ''; + $table_data_row.=anchor($controller_name."/invoice/" . $sale['sale_id'], $CI->lang->line('sales_show_invoice'), array('class'=>'print_hide', 'title'=>$CI->lang->line('sales_show_invoice'))); $table_data_row.=''; $table_data_row.=''; diff --git a/application/libraries/Receiving_lib.php b/application/libraries/Receiving_lib.php index d2044a3f9..75c8ef359 100644 --- a/application/libraries/Receiving_lib.php +++ b/application/libraries/Receiving_lib.php @@ -200,8 +200,8 @@ class Receiving_lib 'item_location'=>$item_location, 'stock_name'=>$this->CI->Stock_location->get_location_name($item_location), 'line'=>$insertkey, - 'name'=>base64_encode($item_info->name), - 'description'=>base64_encode($description!=null ? $description: $item_info->description), + 'name'=>$item_info->name, + 'description'=>$description!=null ? $description: $item_info->description, 'serialnumber'=>$serialnumber!=null ? $serialnumber: '', 'allow_alt_description'=>$item_info->allow_alt_description, 'is_serialized'=>$item_info->is_serialized, @@ -236,7 +236,7 @@ class Receiving_lib if(isset($items[$line])) { $line = &$items[$line]; - $line['description'] = base64_encode($description); + $line['description'] = $description; $line['serialnumber'] = $serialnumber; $line['quantity'] = $quantity; $line['discount'] = $discount; diff --git a/application/libraries/Sale_lib.php b/application/libraries/Sale_lib.php index a1ba8c524..fa21d14f2 100644 --- a/application/libraries/Sale_lib.php +++ b/application/libraries/Sale_lib.php @@ -305,9 +305,9 @@ class Sale_lib 'item_location'=>$item_location, 'stock_name'=>$this->CI->Stock_location->get_location_name($item_location), 'line'=>$insertkey, - 'name'=>base64_encode($item_info->name), + 'name'=>$item_info->name, 'item_number'=>$item_info->item_number, - 'description'=>base64_encode($description!=null ? $description: $item_info->description), + 'description'=>$description!=null ? $description: $item_info->description, 'serialnumber'=>$serialnumber!=null ? $serialnumber: '', 'allow_alt_description'=>$item_info->allow_alt_description, 'is_serialized'=>$item_info->is_serialized, @@ -396,7 +396,7 @@ class Sale_lib if(isset($items[$line])) { $line = &$items[$line]; - $line['description'] = base64_encode($description); + $line['description'] = $description; $line['serialnumber'] = $serialnumber; $line['quantity'] = $quantity; $line['discount'] = $discount; diff --git a/application/models/Receiving.php b/application/models/Receiving.php index 905d4396c..2de3f5230 100644 --- a/application/models/Receiving.php +++ b/application/models/Receiving.php @@ -76,12 +76,11 @@ class Receiving extends CI_Model $cur_item_info = $this->Item->get_info($item['item_id']); - $receivings_items_data = array - ( + $receivings_items_data = array( 'receiving_id'=>$receiving_id, 'item_id'=>$item['item_id'], 'line'=>$item['line'], - 'description'=>base64_decode($item['description']), + 'description'=>$item['description'], 'serialnumber'=>$item['serialnumber'], 'quantity_purchased'=>$item['quantity'], 'receiving_quantity'=>$item['receiving_quantity'], diff --git a/application/models/Sale.php b/application/models/Sale.php index cb437d55b..c5bd1788f 100644 --- a/application/models/Sale.php +++ b/application/models/Sale.php @@ -296,7 +296,7 @@ class Sale extends CI_Model 'sale_id'=>$sale_id, 'item_id'=>$item['item_id'], 'line'=>$item['line'], - 'description'=>character_limiter(base64_decode($item['description']), 30), + 'description'=>character_limiter($item['description'], 30), 'serialnumber'=>character_limiter($item['serialnumber'], 30), 'quantity_purchased'=>$item['quantity'], 'discount_percent'=>$item['discount'], diff --git a/application/models/Sale_suspended.php b/application/models/Sale_suspended.php index 993e81e71..df3324616 100644 --- a/application/models/Sale_suspended.php +++ b/application/models/Sale_suspended.php @@ -86,7 +86,7 @@ class Sale_suspended extends CI_Model 'sale_id'=>$sale_id, 'item_id'=>$item['item_id'], 'line'=>$item['line'], - 'description'=>character_limiter(base64_decode($item['description']), 30), + 'description'=>character_limiter($item['description'], 30), 'serialnumber'=>character_limiter($item['serialnumber'], 30), 'quantity_purchased'=>$item['quantity'], 'discount_percent'=>$item['discount'], diff --git a/application/views/partial/header.php b/application/views/partial/header.php index e119086b8..7d39fe4e0 100644 --- a/application/views/partial/header.php +++ b/application/views/partial/header.php @@ -64,11 +64,11 @@ - + - + diff --git a/application/views/receivings/receipt.php b/application/views/receivings/receipt.php index 4cdf7c08d..a7c6d3d11 100644 --- a/application/views/receivings/receipt.php +++ b/application/views/receivings/receipt.php @@ -63,7 +63,7 @@ if (isset($error_message)) { ?> - +    x diff --git a/application/views/receivings/receiving.php b/application/views/receivings/receiving.php index fb945dade..b9ea9ea22 100644 --- a/application/views/receivings/receiving.php +++ b/application/views/receivings/receiving.php @@ -120,7 +120,7 @@ if (isset($error)) 'form-horizontal')); ?> ');?> -
[ in ] +
[ in ] 'description', 'class'=>'form-control input-sm', 'value'=>base64_decode($item['description']))); + echo form_input(array('name'=>'description', 'class'=>'form-control input-sm', 'value'=>$item['description'])); } else { - if (base64_decode($item['description'])!='') + if ($item['description']!='') { - echo base64_decode($item['description']); - echo form_hidden('description',base64_decode($item['description'])); + echo $item['description']; + echo form_hidden('description',$item['description']); } else { diff --git a/application/views/sales/invoice.php b/application/views/sales/invoice.php index 2d6f1142b..7e462cbcd 100755 --- a/application/views/sales/invoice.php +++ b/application/views/sales/invoice.php @@ -75,7 +75,7 @@ if (isset($error_message)) ?> - + diff --git a/application/views/sales/manage.php b/application/views/sales/manage.php index c910c68fc..9dc4f24cc 100755 --- a/application/views/sales/manage.php +++ b/application/views/sales/manage.php @@ -197,12 +197,12 @@ function init_table_sorting()
lang->line('common_list_of').' '.$this->lang->line('sales_receipt_number'); ?>
-
lang->line('common_print'); ?>
+
-
+