From 6826115b2d029f6282e4fc2d7469b7576b0b436d Mon Sep 17 00:00:00 2001 From: Jorge Colmenarez Date: Sun, 26 Feb 2017 15:35:21 -0400 Subject: [PATCH] Support for Configurable Dinner Tables Feature --- LICENSE | 3 +- application/config/autoload.php | 2 +- application/controllers/Config.php | 52 +++++++ application/controllers/Sales.php | 12 +- application/language/en/config_lang.php | 7 + application/language/en/sales_lang.php | 1 + application/language/es/config_lang.php | 7 + application/language/es/sales_lang.php | 1 + application/libraries/Sale_lib.php | 30 ++++ application/models/Dinner_table.php | 96 ++++++++++++ application/models/Sale.php | 5 +- application/models/Sale_suspended.php | 37 ++++- application/views/configs/manage.php | 6 + application/views/configs/table_config.php | 155 ++++++++++++++++++++ application/views/partial/dinner_tables.php | 29 ++++ application/views/sales/register.php | 12 +- application/views/sales/suspended.php | 2 + database/3.0.2_to_3.1.0.sql | 45 +++++- database/constraints.sql | 6 +- database/database.sql | 34 ++++- database/migrate_phppos_dist.sql | 41 +++++- database/phppos_migrate.sql | 6 + database/rename_tables.sql | 1 + database/tables.sql | 27 +++- public/license/LICENSE | 3 +- 25 files changed, 594 insertions(+), 26 deletions(-) create mode 100644 application/models/Dinner_table.php create mode 100644 application/views/configs/table_config.php create mode 100644 application/views/partial/dinner_tables.php diff --git a/LICENSE b/LICENSE index 52ac62c05..ac9a32c58 100644 --- a/LICENSE +++ b/LICENSE @@ -11,9 +11,10 @@ Copyright (c) 2015 Aamir Shahzad (aka asakpke), RoshanTech.com Copyright (c) 2015 Toni Haryanto (aka yllumi) Copyright (c) 2016-2017 Ramkrishna Mondal (aka RamkrishnaMondal) Copyright (c) 2016 Rinaldy@dbarber (aka rnld26) -Copyright (c) 2016 Jorge Colmenarez (aka jlctmaster), frontuari.com +Copyright (c) 2016-2017 Jorge Colmenarez (aka jlctmaster), frontuari.com Copyright (c) 2017 Steve Ireland Copyright (c) 2017 i92guboj +Copyright (c) 2017 Deep Shah (aka deepshah) 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/config/autoload.php b/application/config/autoload.php index 090828883..68414ead9 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -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'); +$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'); diff --git a/application/controllers/Config.php b/application/controllers/Config.php index 5f444cf12..7c4b0e4e2 100644 --- a/application/controllers/Config.php +++ b/application/controllers/Config.php @@ -193,6 +193,7 @@ class Config extends Secure_Controller public function index() { $data['stock_locations'] = $this->Stock_location->get_all()->result_array(); + $data['dinner_tables'] = $this->Dinner_table->get_all()->result_array(); $data['support_barcode'] = $this->barcode_lib->get_list_barcodes(); $data['logo_exists'] = $this->config->item('company_logo') != ''; $data['line_sequence_options'] = $this->sale_lib->get_line_sequence_options(); @@ -376,9 +377,19 @@ class Config extends Secure_Controller $this->load->view('partial/stock_locations', array('stock_locations' => $stock_locations)); } + public function dinner_tables() + { + $dinner_tables = $this->Dinner_table->get_all()->result_array(); + + $dinner_tables = $this->xss_clean($dinner_tables); + + $this->load->view('partial/dinner_tables', array('dinner_tables' => $dinner_tables)); + } + private function _clear_session_state() { $this->sale_lib->clear_sale_location(); + $this->sale_lib->clear_table(); $this->sale_lib->clear_all(); $this->load->library('receiving_lib'); $this->receiving_lib->clear_stock_source(); @@ -419,6 +430,47 @@ class Config extends Secure_Controller echo json_encode(array('success' => $success, 'message' => $this->lang->line('config_saved_' . ($success ? '' : 'un') . 'successfully'))); } + public function save_tables() + { + $this->db->trans_start(); + + $this->Appconfig->save('dinner_table_enable',$this->input->post('dinner_table_enable')); + + $deleted_tables = $this->Dinner_table->get_all()->result_array(); + $not_to_delete = array(); + foreach($this->input->post() as $key => $value) + { + if (strstr($key, 'dinner_table') && $key != 'dinner_table_enable') + { + + $dinner_table_id = preg_replace("/.*?_(\d+)$/", "$1", $key); + $not_to_delete[] = $dinner_table_id; + + // save or update + $table_data = array('name' => $value); + if ($this->Dinner_table->save($table_data, $dinner_table_id)) + { + $this->_clear_session_state(); + } + } + } + + // all locations not available in post will be deleted now + foreach ($deleted_tables as $dinner_table) + { + if(!in_array($dinner_table['dinner_table_id'],$not_to_delete)) + { + $this->Dinner_table->delete($dinner_table['dinner_table_id']); + } + } + + $this->db->trans_complete(); + + $success = $this->db->trans_status(); + + echo json_encode(array('success' => $success, 'message' => $this->lang->line('config_saved_' . ($success ? '' : 'un') . 'successfully'))); + } + public function save_barcode() { $batch_save_data = array( diff --git a/application/controllers/Sales.php b/application/controllers/Sales.php index bfb89d2b0..3746de6e5 100644 --- a/application/controllers/Sales.php +++ b/application/controllers/Sales.php @@ -146,6 +146,8 @@ class Sales extends Secure_Controller { $mode = $this->input->post('mode'); $this->sale_lib->set_mode($mode); + $dinner_table = $this->input->post('dinner_table'); + $this->sale_lib->set_dinner_table($dinner_table); } elseif($this->Stock_location->is_allowed_location($stock_location, 'sales')) { @@ -387,6 +389,7 @@ class Sales extends Secure_Controller public function complete() { $data = array(); + $data['dinner_table'] = $this->sale_lib->get_dinner_table(); $data['cart'] = $this->sale_lib->get_cart(); $data['subtotal'] = $this->sale_lib->get_subtotal(); $data['discounted_subtotal'] = $this->sale_lib->get_subtotal(TRUE); @@ -449,7 +452,7 @@ class Sales extends Secure_Controller $data['quote_number'] = $quote_number; // Save the data to the sales table - $data['sale_id_num'] = $this->Sale->save($data['cart'], $customer_id, $employee_id, $data['comments'], $invoice_number, $data['payments']); + $data['sale_id_num'] = $this->Sale->save($data['cart'], $customer_id, $employee_id, $data['comments'], $invoice_number, $data['payments'], $data['dinner_table']); $data['sale_id'] = 'POS ' . $data['sale_id_num']; // Resort and filter cart lines for printing @@ -506,7 +509,7 @@ class Sales extends Secure_Controller else { // Save the data to the sales table - $data['sale_id_num'] = $this->Sale->save($data['cart'], $customer_id, $employee_id, $data['comments'], null, $data['payments']); + $data['sale_id_num'] = $this->Sale->save($data['cart'], $customer_id, $employee_id, $data['comments'], null, $data['payments'], $data['dinner_table']); $data['sale_id'] = 'POS ' . $data['sale_id_num']; $data['cart'] = $this->sale_lib->sort_and_filter_cart($data['cart']); @@ -818,6 +821,8 @@ class Sales extends Secure_Controller 'return' => $this->lang->line('sales_return')); } $data['mode'] = $this->sale_lib->get_mode(); + $data['empty_tables'] = $this->sale_lib->get_empty_tables(); + $data['selected_table'] = $this->sale_lib->get_dinner_table(); $data['stock_locations'] = $this->Stock_location->get_allowed_locations('sales'); $data['stock_location'] = $this->sale_lib->get_sale_location(); $data['subtotal'] = $this->sale_lib->get_subtotal(TRUE); @@ -1005,6 +1010,7 @@ class Sales extends Secure_Controller public function suspend() { + $dinner_table = $this->sale_lib->get_dinner_table(); $cart = $this->sale_lib->get_cart(); $payments = $this->sale_lib->get_payments(); $employee_id = $this->Employee->get_logged_in_employee_info()->person_id; @@ -1016,7 +1022,7 @@ class Sales extends Secure_Controller //SAVE sale to database $data = array(); - if ($this->Sale_suspended->save($cart, $customer_id, $employee_id, $comment, $invoice_number, $quote_number, $payments) == '-1') + if ($this->Sale_suspended->save($cart, $customer_id, $employee_id, $comment, $invoice_number, $quote_number, $payments, $dinner_table) == '-1') { $data['error'] = $this->lang->line('sales_unsuccessfully_suspended_sale'); } diff --git a/application/language/en/config_lang.php b/application/language/en/config_lang.php index d8fda667f..7e29a05da 100644 --- a/application/language/en/config_lang.php +++ b/application/language/en/config_lang.php @@ -77,6 +77,11 @@ $lang["config_default_tax_rate_2"] = "Tax 2 Rate"; $lang["config_default_tax_rate_number"] = "The default tax rate must be a number"; $lang["config_default_tax_rate_required"] = "The default tax rate is a required field"; $lang["config_default_tax_name_required"] = "The default tax name is a required field"; +$lang["config_dinner_table"] = "Table"; +$lang["config_dinner_table_enable"] = "Enable Dinner Tables"; +$lang["config_dinner_table_duplicate"] = "Please use an unique table name"; +$lang["config_dinner_table_invalid_chars"] = "The table name can not contain '_'"; +$lang["config_dinner_table_required"] = "Table is a required field"; $lang["config_dot"] = "dot"; $lang["config_email"] = "Email"; $lang["config_email_configuration"] = "Email Configuration"; @@ -175,6 +180,8 @@ $lang["config_stock_location"] = "Stock location"; $lang["config_stock_location_duplicate"] = "Please use an unique location name"; $lang["config_stock_location_invalid_chars"] = "The stock location name can not contain '_'"; $lang["config_stock_location_required"] = "Stock location is a required field"; +$lang["config_table"] = "Table"; +$lang["config_table_configuration"] = "Table Configuration"; $lang["config_takings_printer"] = "Takings Printer"; $lang["config_tax_decimals"] = "Tax Decimals"; $lang["config_tax_included"] = "Tax Included"; diff --git a/application/language/en/sales_lang.php b/application/language/en/sales_lang.php index fbb14625a..e22361e0d 100644 --- a/application/language/en/sales_lang.php +++ b/application/language/en/sales_lang.php @@ -117,6 +117,7 @@ $lang["sales_successfully_updated"] = "Sale successfully updated"; $lang["sales_suspend_sale"] = "Suspend"; $lang["sales_suspended_sale_id"] = "ID"; $lang["sales_suspended_sales"] = "Suspended"; +$lang["sales_table"] = "Table"; $lang["sales_tax"] = "Tax"; $lang["sales_tax_percent"] = "Tax %"; $lang["sales_total"] = "Total"; diff --git a/application/language/es/config_lang.php b/application/language/es/config_lang.php index 4d0c37bbf..b60b0f30a 100644 --- a/application/language/es/config_lang.php +++ b/application/language/es/config_lang.php @@ -77,6 +77,11 @@ $lang["config_default_tax_rate_2"] = "Impuesto 2"; $lang["config_default_tax_rate_number"] = "El Impuesto Predeterminado debe ser un número"; $lang["config_default_tax_rate_required"] = "El Impuesto Predeterminado es requerido"; $lang["config_default_tax_name_required"] = "El nombre del impuesto predeterminado es requerido"; +$lang["config_dinner_table"] = "Mesa"; +$lang["config_dinner_table_enable"] = "Activar Mesa de Restaurante"; +$lang["config_dinner_table_duplicate"] = "Utilice un nombre de mesa único"; +$lang["config_dinner_table_invalid_chars"] = "El nombre de la mesa no puede contener '_'"; +$lang["config_dinner_table_required"] = "La mesa es un campo obligatorio"; $lang["config_dot"] = "punto"; $lang["config_email"] = "Email"; $lang["config_email_configuration"] = "Configuracion de correo"; @@ -170,6 +175,8 @@ $lang["config_stock_location"] = "Ubicación de Inventario"; $lang["config_stock_location_duplicate"] = "Por favor use un nombre de inventario único"; $lang["config_stock_location_invalid_chars"] = "Nombre de la Ubicación de Inventario no debe contener '_'"; $lang["config_stock_location_required"] = "Número de Ubicación de Inventario es requerido"; +$lang["config_table"] = "Mesa"; +$lang["config_table_configuration"] = "Configuración de Mesa"; $lang["config_takings_printer"] = "Impresion de retenciones"; $lang["config_tax_decimals"] = "Decimales de impuestos"; $lang["config_tax_included"] = "Impuestos incluidos"; diff --git a/application/language/es/sales_lang.php b/application/language/es/sales_lang.php index df393d9fd..803f878e8 100644 --- a/application/language/es/sales_lang.php +++ b/application/language/es/sales_lang.php @@ -107,6 +107,7 @@ $lang["sales_successfully_updated"] = "La venta ha sido actualizada satisfactori $lang["sales_suspend_sale"] = "Suspender Venta"; $lang["sales_suspended_sale_id"] = "ID de Venta Suspendida"; $lang["sales_suspended_sales"] = "Ventas Suspendidas"; +$lang["sales_table"] = "Mesa"; $lang["sales_tax"] = "Impuesto"; $lang["sales_tax_percent"] = "% de Impuesto"; $lang["sales_total"] = "Total"; diff --git a/application/libraries/Sale_lib.php b/application/libraries/Sale_lib.php index a9ccee78d..160ffec61 100644 --- a/application/libraries/Sale_lib.php +++ b/application/libraries/Sale_lib.php @@ -388,6 +388,29 @@ class Sale_lib $this->CI->session->unset_userdata('sales_mode'); } + public function get_dinner_table() + { + if(!$this->CI->session->userdata('dinner_table')) + { + if($this->CI->config->item('dinner_table_enable') == TRUE) + { + $this->set_dinner_table(1); + } + } + + return $this->CI->session->userdata('dinner_table'); + } + + public function set_dinner_table($dinner_table) + { + $this->CI->session->set_userdata('dinner_table', $dinner_table); + } + + public function clear_table() + { + $this->CI->session->unset_userdata('dinner_table'); + } + public function get_sale_location() { if(!$this->CI->session->userdata('sales_location')) @@ -747,11 +770,13 @@ class Sale_lib $this->set_invoice_number($suspended_sale_info->invoice_number); $this->set_quote_number($suspended_sale_info->quote_number); + $this->set_dinner_table($suspended_sale_info->dinner_table_id); } public function clear_all() { $this->set_invoice_number_enabled(FALSE); + $this->clear_table(); $this->empty_cart(); $this->clear_comment(); $this->clear_email_receipt(); @@ -924,6 +949,11 @@ class Sale_lib return $total; } + + public function get_empty_tables() + { + return $this->CI->Dinner_table->get_empty_tables(); + } } ?> diff --git a/application/models/Dinner_table.php b/application/models/Dinner_table.php new file mode 100644 index 000000000..9f605a7bf --- /dev/null +++ b/application/models/Dinner_table.php @@ -0,0 +1,96 @@ +db->from('dinner_tables'); + $this->db->where('dinner_table_id', $dinner_table_id); + + return ($this->db->get()->num_rows() >= 1); + } + + + public function save(&$table_data, $dinner_table_id) + { + $name = $$table_data['name']; + + if(!$this->exists($dinner_table_id)) + { + $this->db->trans_start(); + + $location_data = array('name'=>$name, 'deleted'=>0); + $this->db->insert('dinner_tables', $table_data); + $dinner_table_id = $this->db->insert_id(); + + $this->db->trans_complete(); + + return $this->db->trans_status(); + } + else + { + $this->db->where('dinner_table_id', $dinner_table_id); + + return $this->db->update('dinner_tables', $table_data); + } + } + + /* + Get empty tables + */ + public function get_empty_tables() + { + $this->db->from('dinner_tables'); + $this->db->where('status', 0); + $this->db->where('deleted', 0); + + $empty_tables = $this->db->get()->result_array(); + + $empty_tables_array = array(); + foreach($empty_tables as $empty_table) + { + $empty_tables_array[$empty_table['dinner_table_id']] = $empty_table['name']; + } + + return $empty_tables_array; + + } + + public function get_name($dinner_table_id) + { + $this->db->from('dinner_tables'); + $this->db->where('dinner_table_id',$dinner_table_id); + + return $this->db->get()->row()->name; + } + + public function get_all() + { + $this->db->from('dinner_tables'); + + return $this->db->get(); + } + + public function get_undeleted_all() + { + $this->db->from('dinner_tables'); + $this->db->where('deleted', 0); + + return $this->db->get(); + } + + /* + Deletes one table + */ + public function delete($dinner_table_id) + { + $this->db->trans_start(); + + $this->db->where('dinner_table_id', $dinner_table_id); + $this->db->update('dinner_tables', array('deleted' => 1)); + + $this->db->trans_complete(); + + return $this->db->trans_status(); + } +} +?> \ No newline at end of file diff --git a/application/models/Sale.php b/application/models/Sale.php index aa1fafae4..80f47c6c2 100644 --- a/application/models/Sale.php +++ b/application/models/Sale.php @@ -481,7 +481,7 @@ class Sale extends CI_Model return $success; } - public function save($items, $customer_id, $employee_id, $comment, $invoice_number, $payments, $sale_id = FALSE) + public function save($items, $customer_id, $employee_id, $comment, $invoice_number, $payments, $dinner_table, $sale_id = FALSE) { if(count($items) == 0) { @@ -493,7 +493,8 @@ class Sale extends CI_Model 'customer_id' => $this->Customer->exists($customer_id) ? $customer_id : null, 'employee_id' => $employee_id, 'comment' => $comment, - 'invoice_number' => $invoice_number + 'invoice_number' => $invoice_number, + 'dinner_table_id'=> $dinner_table ); // Run these queries as a transaction, we want to make sure we do all or nothing diff --git a/application/models/Sale_suspended.php b/application/models/Sale_suspended.php index fdce3e9a0..4f30bbe8e 100644 --- a/application/models/Sale_suspended.php +++ b/application/models/Sale_suspended.php @@ -52,20 +52,30 @@ class Sale_suspended extends CI_Model return $this->db->update('sales_suspended', $sale_data); } - public function save($items, $customer_id, $employee_id, $comment, $invoice_number, $quote_number, $payments, $sale_id = FALSE) + public function save($items, $customer_id, $employee_id, $comment, $invoice_number, $quote_number, $payments, $dinner_table, $sale_id = FALSE) { if(count($items) == 0) { return -1; } + if($dinner_table > 2) //not delivery or take away + { + $table_status = 1; + } + else + { + $table_status = 0; + } + $sales_data = array( 'sale_time' => date('Y-m-d H:i:s'), 'customer_id' => $this->Customer->exists($customer_id) ? $customer_id : null, 'employee_id' => $employee_id, 'comment' => $comment, 'invoice_number' => $invoice_number, - 'quote_number' => $quote_number, + 'quote_number' => $quote_number, + 'dinner_table_id' => $dinner_table ); //Run these queries as a transaction, we want to make sure we do all or nothing @@ -122,6 +132,13 @@ class Sale_suspended extends CI_Model } } + $dinner_table_data = array( + 'status' => $table_status + ); + + $this->db->where('dinner_table_id',$dinner_table); + $this->db->update('dinner_tables', $dinner_table_data); + $this->db->trans_complete(); if($this->db->trans_status() === FALSE) @@ -137,6 +154,14 @@ class Sale_suspended extends CI_Model //Run these queries as a transaction, we want to make sure we do all or nothing $this->db->trans_start(); + $dinner_table = $this->get_dinner_table($sale_id); + $dinner_table_data = array( + 'status' => 0 + ); + + $this->db->where('dinner_table_id',$dinner_table); + $this->db->update('dinner_tables', $dinner_table_data); + $this->db->delete('sales_suspended_payments', array('sale_id' => $sale_id)); $this->db->delete('sales_suspended_items_taxes', array('sale_id' => $sale_id)); $this->db->delete('sales_suspended_items', array('sale_id' => $sale_id)); @@ -170,5 +195,13 @@ class Sale_suspended extends CI_Model return $this->db->get()->row()->comment; } + + public function get_dinner_table($sale_id) + { + $this->db->from('sales_suspended'); + $this->db->where('sale_id', $sale_id); + + return $this->db->get()->row()->dinner_table_id; + } } ?> diff --git a/application/views/configs/manage.php b/application/views/configs/manage.php index 40b385cab..890dd89e3 100644 --- a/application/views/configs/manage.php +++ b/application/views/configs/manage.php @@ -16,6 +16,9 @@
  • lang->line('config_location'); ?>
  • +
  • + lang->line('config_table'); ?> +
  • lang->line('config_receipt'); ?>
  • @@ -49,6 +52,9 @@
    load->view("configs/stock_config"); ?>
    +
    + load->view("configs/table_config"); ?> +
    load->view("configs/receipt_config"); ?>
    diff --git a/application/views/configs/table_config.php b/application/views/configs/table_config.php new file mode 100644 index 000000000..bc14c5f7e --- /dev/null +++ b/application/views/configs/table_config.php @@ -0,0 +1,155 @@ + 'table_config_form', 'class' => 'form-horizontal')); ?> +
    +
    +
    lang->line('common_fields_required_message'); ?>
    +
      + +
      + lang->line('config_dinner_table_enable'), 'dinner_table_enable', array('class' => 'control-label col-xs-2')); ?> +
      + 'dinner_table_enable', + 'value' => 'dinner_table_enable', + 'id' => 'dinner_table_enable', + 'checked' => $this->config->item('dinner_table_enable')));?> +
      +
      + +
      + load->view('partial/dinner_tables', array('dinner_tables' => $dinner_tables)); ?> +
      + + 'submit', + 'id' => 'submit', + 'value'=>$this->lang->line('common_submit'), + 'class' => 'btn btn-primary btn-sm pull-right')); ?> +
      +
      + + + diff --git a/application/views/partial/dinner_tables.php b/application/views/partial/dinner_tables.php new file mode 100644 index 000000000..430820eb1 --- /dev/null +++ b/application/views/partial/dinner_tables.php @@ -0,0 +1,29 @@ +$table) +{ + $dinner_table_id = $table['dinner_table_id']; + $dinner_table_name = $table['name']; + ++$i; +?> +
      + lang->line('config_dinner_table') . ' ' . $i, 'dinner_table_' . $i, array('class'=>'required control-label col-xs-2')); ?> +
      + 'dinner_table_' . $dinner_table_id, + 'id'=>'dinner_table_' . $dinner_table_id, + 'class'=>'dinner_table valid_chars form-control input-sm required', + 'value'=>$dinner_table_name + ); + $table['deleted'] && $form_data['disabled'] = 'disabled'; + echo form_input($form_data); + ?> +
      + +    + +
      + diff --git a/application/views/sales/register.php b/application/views/sales/register.php index c2edc7f4b..8dac8bd25 100644 --- a/application/views/sales/register.php +++ b/application/views/sales/register.php @@ -30,8 +30,18 @@ if (isset($success))
    • "$('#mode_form').submit();", 'class'=>'selectpicker show-menu-arrow', 'data-style'=>'btn-default btn-sm', 'data-width'=>'fit')); ?>
    • - config->item('dinner_table_enable') == TRUE) + { + ?> +
    • + +
    • +
    • + "$('#mode_form').submit();", 'class'=>'selectpicker show-menu-arrow', 'data-style'=>'btn-default btn-sm', 'data-width'=>'fit')); ?> +
    • + 1) { ?> diff --git a/application/views/sales/suspended.php b/application/views/sales/suspended.php index 9c7612e10..7ecd6bbbc 100644 --- a/application/views/sales/suspended.php +++ b/application/views/sales/suspended.php @@ -3,6 +3,7 @@ lang->line('sales_suspended_sale_id'); ?> lang->line('sales_date'); ?> + lang->line('sales_table'); ?> lang->line('sales_customer'); ?> lang->line('sales_comments'); ?> lang->line('sales_unsuspend_and_delete'); ?> @@ -16,6 +17,7 @@ config->item('dateformat'), strtotime($suspended_sale['sale_time']));?> + Dinner_table->get_name($suspended_sale['dinner_table_id']);?>