From b3bfc51ee84f29990eddfc8d4b1855971bdf9b96 Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Sat, 14 Jul 2018 09:39:52 +0100 Subject: [PATCH] Add cashup feature --- application/config/autoload.php | 2 +- application/controllers/Cashups.php | 240 +++++++++++++ application/helpers/tabular_helper.php | 51 ++- application/language/en-GB/cashups_lang.php | 38 ++ .../en-GB/expenses_categories_lang.php | 1 + application/language/en-GB/module_lang.php | 2 + application/language/en-GB/sales_lang.php | 6 +- application/language/en-US/cashups_lang.php | 38 ++ .../en-US/expenses_categories_lang.php | 1 + application/language/en-US/module_lang.php | 2 + .../migrations/sqlscripts/3.2.1_to_3.3.0.sql | 45 +++ application/models/Cashup.php | 210 +++++++++++ application/views/cashups/form.php | 340 ++++++++++++++++++ application/views/cashups/manage.php | 63 ++++ public/images/menubar/cashups.png | Bin 0 -> 1086 bytes 15 files changed, 1034 insertions(+), 5 deletions(-) create mode 100644 application/controllers/Cashups.php create mode 100644 application/language/en-GB/cashups_lang.php create mode 100644 application/language/en-US/cashups_lang.php create mode 100644 application/models/Cashup.php create mode 100644 application/views/cashups/form.php create mode 100644 application/views/cashups/manage.php create mode 100644 public/images/menubar/cashups.png diff --git a/application/config/autoload.php b/application/config/autoload.php index 457dc17c4..a7b554177 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', 'Supplier', 'Inventory', 'Receiving', 'Giftcard', 'Item_kit', 'Item_kit_items', 'Stock_location', 'Item_quantity', 'Dinner_table', 'Customer_rewards', 'Rewards', 'Tax', 'Expense_category', 'Expense' ); +$autoload['model'] = array('Appconfig', 'Person', 'Customer', 'Employee', 'Module', 'Item', 'Item_taxes', 'Sale', 'Supplier', 'Inventory', 'Receiving', 'Giftcard', 'Item_kit', 'Item_kit_items', 'Stock_location', 'Item_quantity', 'Dinner_table', 'Customer_rewards', 'Rewards', 'Tax', 'Expense_category', 'Expense', 'Cashup'); diff --git a/application/controllers/Cashups.php b/application/controllers/Cashups.php new file mode 100644 index 000000000..b7f0d9e96 --- /dev/null +++ b/application/controllers/Cashups.php @@ -0,0 +1,240 @@ +xss_clean(get_cashups_manage_table_headers()); + + // filters that will be loaded in the multiselect dropdown + $data['filters'] = array('is_deleted' => $this->lang->line('cashups_is_deleted')); + + $this->load->view('cashups/manage', $data); + } + + public function search() + { + $cash_up = 0; + $search = $this->input->get('search'); + $limit = $this->input->get('limit'); + $offset = $this->input->get('offset'); + $sort = $this->input->get('sort'); + $order = $this->input->get('order'); + $filters = array( + 'start_date' => $this->input->get('start_date'), + 'end_date' => $this->input->get('end_date'), + 'is_deleted' => FALSE); + + // check if any filter is set in the multiselect dropdown + $filledup = array_fill_keys($this->input->get('filters'), TRUE); + $filters = array_merge($filters, $filledup); + $cash_ups = $this->Cashup->search($search, $filters, $limit, $offset, $sort, $order); + $total_rows = $this->Cashup->get_found_rows($search, $filters); + $data_rows = array(); + foreach($cash_ups->result() as $cash_up) + { + $data_rows[] = $this->xss_clean(get_cash_up_data_row($cash_up)); + } + + echo json_encode(array('total' => $total_rows, 'rows' => $data_rows)); + } + + public function view($cashup_id = -1) + { + $data = array(); + + $data['employees'] = array(); + foreach($this->Employee->get_all()->result() as $employee) + { + foreach(get_object_vars($employee) as $property => $value) + { + $employee->$property = $this->xss_clean($value); + } + + $data['employees'][$employee->person_id] = $employee->first_name . ' ' . $employee->last_name; + } + + $cash_ups_info = $this->Cashup->get_info($cashup_id); + + foreach(get_object_vars($cash_ups_info) as $property => $value) + { + $cash_ups_info->$property = $this->xss_clean($value); + } + + // open cashup + if(empty($cash_ups_info->cashup_id)) + { + $cash_ups_info->open_date = date('Y-m-d H:i:s'); + $cash_ups_info->close_date = $cash_ups_info->open_date; + $cash_ups_info->open_employee_id = $this->Employee->get_logged_in_employee_info()->person_id; + $cash_ups_info->close_employee_id = $this->Employee->get_logged_in_employee_info()->person_id; + } + // if all the amounts are null or 0 that means it's a close cashup + elseif(floatval($cash_ups_info->closed_amount_cash) == 0 && + floatval($cash_ups_info->closed_amount_card) == 0 && + floatval($cash_ups_info->closed_amount_check) == 0) + { + // set the close date and time to the actual as this is a close session + $cash_ups_info->close_date = date('Y-m-d H:i:s'); + + // the closed amount starts with the open amount -/+ any trasferred amount + $cash_ups_info->closed_amount_cash = $cash_ups_info->open_amount_cash + $cash_ups_info->transfer_amount_cash; + + // if it's date mode only and not date & time truncate the open and end date to date only + if(empty($this->config->item('date_or_time_format'))) + { + // search for all the payments given the time range + $inputs = array('start_date' => substr($cash_ups_info->open_date, 0, 10), 'end_date' => substr($cash_ups_info->close_date, 0, 10), 'sale_type' => 'complete', 'location_id' => 'all'); + } + else + { + // search for all the payments given the time range + $inputs = array('start_date' => $cash_ups_info->open_date, 'end_date' => $cash_ups_info->close_date, 'sale_type' => 'complete', 'location_id' => 'all'); + } + + // get all the transactions payment summaries + $this->load->model('reports/Summary_payments'); + $reports_data = $this->Summary_payments->getData($inputs); + + foreach($reports_data as $row) + { + if($row['payment_type'] == $this->lang->line('sales_cash')) + { + $cash_ups_info->closed_amount_cash += $this->xss_clean($row['payment_amount']); + } + elseif($row['payment_type'] == $this->lang->line('sales_due')) + { + $cash_ups_info->closed_amount_cash -= $this->xss_clean($row['payment_amount']); + } + elseif($row['payment_type'] == $this->lang->line('sales_debit') || + $row['payment_type'] == $this->lang->line('sales_credit')) + { + $cash_ups_info->closed_amount_card += $this->xss_clean($row['payment_amount']); + } + elseif($row['payment_type'] == $this->lang->line('sales_check')) + { + $cash_ups_info->closed_amount_check += $this->xss_clean($row['payment_amount']); + } + } + + // lookup expenses paid in cash + $filters = array( + 'only_cash' => TRUE, + 'only_due' => FALSE, + 'only_check' => FALSE, + 'only_credit' => FALSE, + 'only_debit' => FALSE, + 'is_deleted' => FALSE); + $payments = $this->Expense->get_payments_summary('', array_merge($inputs, $filters)); + + foreach($payments as $row) + { + $cash_ups_info->closed_amount_cash -= $this->xss_clean($row['amount']); + } + + $cash_ups_info->closed_amount_total = $this->_calculate_total($cash_ups_info->open_amount_cash, $cash_ups_info->transfer_amount_cash, $cash_ups_info->closed_amount_cash, $cash_ups_info->closed_amount_card, $cash_ups_info->closed_amount_check); + } + + $data['cash_ups_info'] = $cash_ups_info; + + $this->load->view("cashups/form", $data); + } + + public function get_row($row_id) + { + $cash_ups_info = $this->Cashup->get_info($row_id); + $data_row = $this->xss_clean(get_cash_up_data_row($cash_ups_info)); + + echo json_encode($data_row); + } + + public function save($cashup_id = -1) + { + $open_date = $this->input->post('open_date'); + $open_date_formatter = date_create_from_format($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'), $open_date); + + $close_date = $this->input->post('close_date'); + $close_date_formatter = date_create_from_format($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'), $close_date); + + $cash_up_data = array( + 'open_date' => $open_date_formatter->format('Y-m-d H:i:s'), + 'close_date' => $close_date_formatter->format('Y-m-d H:i:s'), + 'open_amount_cash' => parse_decimals($this->input->post('open_amount_cash')), + 'transfer_amount_cash' => parse_decimals($this->input->post('transfer_amount_cash')), + 'closed_amount_cash' => parse_decimals($this->input->post('closed_amount_cash')), + 'closed_amount_card' => parse_decimals($this->input->post('closed_amount_card')), + 'closed_amount_check' => parse_decimals($this->input->post('closed_amount_check')), + 'closed_amount_total' => parse_decimals($this->input->post('closed_amount_total')), + 'note' => $this->input->post('note') != NULL, + 'description' => $this->input->post('description'), + 'open_employee_id' => $this->input->post('open_employee_id'), + 'close_employee_id' => $this->input->post('close_employee_id'), + 'deleted' => $this->input->post('deleted') != NULL + ); + + if($this->Cashup->save($cash_up_data, $cashup_id)) + { + $cash_up_data = $this->xss_clean($cash_up_data); + + //New cashup_id + if($cashup_id == -1) + { + echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('cashups_successful_adding'), 'id' => $cash_up_data['cashup_id'])); + } + else // Existing Cashup + { + echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('cashups_successful_updating'), 'id' => $cashup_id)); + } + } + else//failure + { + echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('cashups_error_adding_updating'), 'id' => -1)); + } + } + + public function delete() + { + $cash_ups_to_delete = $this->input->post('ids'); + + if($this->Cashup->delete_list($cash_ups_to_delete)) + { + echo json_encode(array('success' => TRUE, 'message' => $this->lang->line('cashups_successful_deleted') . ' ' . count($cash_ups_to_delete) . ' ' . $this->lang->line('cashups_one_or_multiple'), 'ids' => $cash_ups_to_delete)); + } + else + { + echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('cashups_cannot_be_deleted'), 'ids' => $cash_ups_to_delete)); + } + } + + /* + AJAX call from cashup input form to calculate the total + */ + public function ajax_cashup_total() + { + $open_amount_cash = parse_decimals($this->input->post('open_amount_cash')); + $transfer_amount_cash = parse_decimals($this->input->post('transfer_amount_cash')); + $closed_amount_cash = parse_decimals($this->input->post('closed_amount_cash')); + $closed_amount_card = parse_decimals($this->input->post('closed_amount_card')); + $closed_amount_check = parse_decimals($this->input->post('closed_amount_check')); + + $total = $this->_calculate_total($open_amount_cash, $transfer_amount_cash, $closed_amount_cash, $closed_amount_card, $closed_amount_check); + + echo json_encode(array('total' => to_currency_no_money($total))); + } + + /* + Calculate total + */ + private function _calculate_total($open_amount_cash, $transfer_amount_cash, $closed_amount_cash, $closed_amount_card, $closed_amount_check) + { + return ($closed_amount_cash - $open_amount_cash - $transfer_amount_cash + $closed_amount_card + $closed_amount_check); + } +} +?> diff --git a/application/helpers/tabular_helper.php b/application/helpers/tabular_helper.php index f37befc91..0f1ee1949 100644 --- a/application/helpers/tabular_helper.php +++ b/application/helpers/tabular_helper.php @@ -579,7 +579,7 @@ function get_expenses_manage_table_headers() } /* -Gets the html data row for the expenses. +Gets the html data row for the expenses */ function get_expenses_data_row($expense) { @@ -643,4 +643,53 @@ function get_expenses_manage_payments_summary($payments, $expenses) return $table; } + +/* +Get the header for the cashup tabular view +*/ +function get_cashups_manage_table_headers() +{ + $CI =& get_instance(); + $headers = array( + array('cashup_id' => $CI->lang->line('cashups_id')), + array('open_date' => $CI->lang->line('cashups_opened_date')), + array('open_employee_id' => $CI->lang->line('cashups_open_employee')), + array('open_amount_cash' => $CI->lang->line('cashups_open_amount_cash')), + array('transfer_amount_cash' => $CI->lang->line('cashups_transfer_amount_cash')), + array('close_date' => $CI->lang->line('cashups_closed_date')), + array('close_employee_id' => $CI->lang->line('cashups_close_employee')), + array('closed_amount_cash' => $CI->lang->line('cashups_closed_amount_cash')), + array('note' => $CI->lang->line('cashups_note')), + array('closed_amount_card' => $CI->lang->line('cashups_closed_amount_card')), + array('closed_amount_check' => $CI->lang->line('cashups_closed_amount_check')), + array('closed_amount_total' => $CI->lang->line('cashups_closed_amount_total')) + ); + + return transform_headers($headers); +} + +/* +Gets the html data row for the cashups +*/ +function get_cash_up_data_row($cash_up) +{ + $CI =& get_instance(); + $controller_name = strtolower(get_class($CI)); + return array ( + 'cashup_id' => $cash_up->cashup_id, + 'open_date' => date($CI->config->item('dateformat') . ' ' . $CI->config->item('timeformat'), strtotime($cash_up->open_date)), + 'open_employee_id' => $cash_up->open_first_name . ' ' . $cash_up->open_last_name, + 'open_amount_cash' => to_currency($cash_up->open_amount_cash), + 'transfer_amount_cash' => to_currency($cash_up->transfer_amount_cash), + 'close_date' => date($CI->config->item('dateformat') . ' ' . $CI->config->item('timeformat'), strtotime($cash_up->close_date)), + 'close_employee_id' => $cash_up->close_first_name . ' ' . $cash_up->close_last_name, + 'closed_amount_cash' => to_currency($cash_up->closed_amount_cash), + 'note' => $cash_up->note ? '' : '', + 'closed_amount_card' => to_currency($cash_up->closed_amount_card), + 'closed_amount_check' => to_currency($cash_up->closed_amount_check), + 'closed_amount_total' => to_currency($cash_up->closed_amount_total), + 'edit' => anchor($controller_name."/view/$cash_up->cashup_id", '', + array('class'=>'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'title'=>$CI->lang->line($controller_name.'_update')) + )); +} ?> diff --git a/application/language/en-GB/cashups_lang.php b/application/language/en-GB/cashups_lang.php new file mode 100644 index 000000000..38932c9f8 --- /dev/null +++ b/application/language/en-GB/cashups_lang.php @@ -0,0 +1,38 @@ +db->from('cash_up'); + $this->db->where('cashup_id', $cashup_id); + + return ($this->db->get()->num_rows() == 1); + } + + /* + Gets employee info + */ + public function get_employee($cashup_id) + { + $this->db->from('cash_up'); + $this->db->where('cashup_id', $cashup_id); + + return $this->Employee->get_info($this->db->get()->row()->employee_id); + } + + public function get_multiple_info($cash_up_ids) + { + $this->db->from('cash_up'); + $this->db->where_in('cashup_id', $cashup_ids); + $this->db->order_by('cashup_id', 'asc'); + + return $this->db->get(); + } + + /* + Gets rows + */ + public function get_found_rows($search, $filters) + { + return $this->search($search, $filters, 0, 0, 'cashup_id', 'asc', TRUE); + } + + /* + Searches cashups + */ + public function search($search, $filters, $rows = 0, $limit_from = 0, $sort = 'cashup_id', $order = 'asc', $count_only = FALSE) + { + // get_found_rows case + if($count_only == TRUE) + { + $this->db->select('COUNT(cash_up.cashup_id) as count'); + } + + $this->db->select(' + cash_up.cashup_id, + MAX(cash_up.open_date) AS open_date, + MAX(cash_up.close_date) AS close_date, + MAX(cash_up.open_amount_cash) AS open_amount_cash, + MAX(cash_up.transfer_amount_cash) AS transfer_amount_cash, + MAX(cash_up.closed_amount_cash) AS closed_amount_cash, + MAX(cash_up.closed_amount_card) AS closed_amount_card, + MAX(cash_up.closed_amount_check) AS closed_amount_check, + MAX(cash_up.closed_amount_total) AS closed_amount_total, + MAX(cash_up.description) AS description, + MAX(cash_up.note) AS note, + MAX(cash_up.open_employee_id) AS open_employee_id, + MAX(cash_up.close_employee_id) AS close_employee_id, + MAX(open_employees.first_name) AS open_first_name, + MAX(open_employees.last_name) AS open_last_name, + MAX(close_employees.first_name) AS close_first_name, + MAX(close_employees.last_name) AS close_last_name + '); + $this->db->from('cash_up AS cash_up'); + $this->db->join('people AS open_employees', 'open_employees.person_id = cash_up.open_employee_id', 'LEFT'); + $this->db->join('people AS close_employees', 'close_employees.person_id = cash_up.close_employee_id', 'LEFT'); + + $this->db->group_start(); + $this->db->like('cash_up.open_date', $search); + $this->db->or_like('open_employees.first_name', $search); + $this->db->or_like('open_employees.last_name', $search); + $this->db->or_like('close_employees.first_name', $search); + $this->db->or_like('close_employees.last_name', $search); + $this->db->or_like('cash_up.closed_amount_total', $search); + $this->db->or_like('CONCAT(open_employees.first_name, " ", open_employees.last_name)', $search); + $this->db->or_like('CONCAT(close_employees.first_name, " ", close_employees.last_name)', $search); + $this->db->group_end(); + + $this->db->where('cash_up.deleted', $filters['is_deleted']); + + if(empty($this->config->item('date_or_time_format'))) + { + $this->db->where('DATE_FORMAT(cash_up.open_date, "%Y-%m-%d") BETWEEN ' . $this->db->escape($filters['start_date']) . ' AND ' . $this->db->escape($filters['end_date'])); + } + else + { + $this->db->where('cash_up.open_date BETWEEN ' . $this->db->escape(rawurldecode($filters['start_date'])) . ' AND ' . $this->db->escape(rawurldecode($filters['end_date']))); + } + + $this->db->group_by('cashup_id'); + + // get_found_rows case + if($count_only == TRUE) + { + return $this->db->get()->row_array()['count']; + } + + $this->db->order_by($sort, $order); + + if($rows > 0) + { + $this->db->limit($rows, $limit_from); + } + + return $this->db->get(); + } + + /* + Gets information about a particular cashup + */ + public function get_info($cashup_id) + { + $this->db->select(' + cash_up.cashup_id AS cashup_id, + cash_up.open_date AS open_date, + cash_up.close_date AS close_date, + cash_up.open_amount_cash AS open_amount_cash, + cash_up.transfer_amount_cash AS transfer_amount_cash, + cash_up.closed_amount_cash AS closed_amount_cash, + cash_up.closed_amount_card AS closed_amount_card, + cash_up.closed_amount_check AS closed_amount_check, + cash_up.closed_amount_total AS closed_amount_total, + cash_up.description AS description, + cash_up.note AS note, + cash_up.open_employee_id AS open_employee_id, + cash_up.close_employee_id AS close_employee_id, + cash_up.deleted AS deleted, + open_employees.first_name AS open_first_name, + open_employees.last_name AS open_last_name, + close_employees.first_name AS close_first_name, + close_employees.last_name AS close_last_name + '); + $this->db->from('cash_up AS cash_up'); + $this->db->join('people AS open_employees', 'open_employees.person_id = cash_up.open_employee_id', 'LEFT'); + $this->db->join('people AS close_employees', 'close_employees.person_id = cash_up.close_employee_id', 'LEFT'); + $this->db->where('cashup_id', $cashup_id); + + $query = $this->db->get(); + if($query->num_rows() == 1) + { + return $query->row(); + } + else + { + //Get empty base parent object + $cash_up_obj = new stdClass(); + + //Get all the fields from cashup table + foreach($this->db->list_fields('cash_up') as $field) + { + $cash_up_obj->$field = ''; + } + + return $cash_up_obj; + } + } + + /* + Inserts or updates an cashup + */ + public function save(&$cash_up_data, $cashup_id = FALSE) + { + if(!$cashup_id == -1 || !$this->exists($cashup_id)) + { + if($this->db->insert('cash_up', $cash_up_data)) + { + $cash_up_data['cashup_id'] = $this->db->insert_id(); + + return TRUE; + } + + return FALSE; + } + + $this->db->where('cashup_id', $cashup_id); + + return $this->db->update('cash_up', $cash_up_data); + } + + /* + Deletes a list of cashups + */ + public function delete_list($cashup_ids) + { + $success = FALSE; + + //Run these queries as a transaction, we want to make sure we do all or nothing + $this->db->trans_start(); + $this->db->where_in('cashup_id', $cashup_ids); + $success = $this->db->update('cash_up', array('deleted'=>1)); + $this->db->trans_complete(); + + return $success; + } +} +?> diff --git a/application/views/cashups/form.php b/application/views/cashups/form.php new file mode 100644 index 000000000..5696e2d3a --- /dev/null +++ b/application/views/cashups/form.php @@ -0,0 +1,340 @@ +
lang->line('common_fields_required_message'); ?>
+ + + +cashup_id, array('id'=>'cashups_edit_form', 'class'=>'form-horizontal')); ?> +
+
+ lang->line('cashups_info'), 'cash_ups_info', array('class'=>'control-label col-xs-3')); ?> + cashup_id) ? $this->lang->line('cashups_id') . ' ' . $cash_ups_info->cashup_id : '', 'cashup_id', array('class'=>'control-label col-xs-8', 'style'=>'text-align:left')); ?> +
+ +
+ lang->line('cashups_open_date'), 'open_date', array('class'=>'required control-label col-xs-3')); ?> +
+
+ + 'open_date', + 'id'=>'open_date', + 'class'=>'form-control input-sm datepicker', + 'value'=>date($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'), strtotime($cash_ups_info->open_date))) + );?> +
+
+
+ +
+ lang->line('cashups_open_employee'), 'open_employee', array('class'=>'control-label col-xs-3')); ?> +
+ open_employee_id, 'id="open_employee_id" class="form-control"');?> +
+
+ +
+ lang->line('cashups_open_amount_cash'), 'open_amount_cash', array('class'=>'control-label col-xs-3')); ?> +
+
+ + config->item('currency_symbol'); ?> + + 'open_amount_cash', + 'id'=>'open_amount_cash', + 'class'=>'form-control input-sm', + 'value'=>to_currency_no_money($cash_ups_info->open_amount_cash)) + );?> + + config->item('currency_symbol'); ?> + +
+
+
+ +
+ lang->line('cashups_transfer_amount_cash'), 'transfer_amount_cash', array('class'=>'control-label col-xs-3')); ?> +
+
+ + config->item('currency_symbol'); ?> + + 'transfer_amount_cash', + 'id'=>'transfer_amount_cash', + 'class'=>'form-control input-sm', + 'value'=>to_currency_no_money($cash_ups_info->transfer_amount_cash)) + );?> + + config->item('currency_symbol'); ?> + +
+
+
+ +
+ lang->line('cashups_close_date'), 'close_date', array('class'=>'required control-label col-xs-3')); ?> +
+
+ + 'close_date', + 'id'=>'close_date', + 'class'=>'form-control input-sm datepicker', + 'value'=>date($this->config->item('dateformat') . ' ' . $this->config->item('timeformat'), strtotime($cash_ups_info->close_date))) + );?> +
+
+
+ +
+ lang->line('cashups_close_employee'), 'close_employee', array('class'=>'control-label col-xs-3')); ?> +
+ close_employee_id, 'id="close_employee_id" class="form-control"');?> +
+
+ +
+ lang->line('cashups_closed_amount_cash'), 'closed_amount_cash', array('class'=>'control-label col-xs-3')); ?> +
+
+ + config->item('currency_symbol'); ?> + + 'closed_amount_cash', + 'id'=>'closed_amount_cash', + 'class'=>'form-control input-sm', + 'value'=>to_currency_no_money($cash_ups_info->closed_amount_cash)) + );?> + + config->item('currency_symbol'); ?> + +
+
+
+ +
+ lang->line('cashups_note'), 'note', array('class'=>'control-label col-xs-3')); ?> +
+ 'note', + 'id'=>'note', + 'value'=>0, + 'checked'=>($cash_ups_info->note) ? 1 : 0) + );?> +
+
+ +
+ lang->line('cashups_closed_amount_card'), 'closed_amount_card', array('class'=>'control-label col-xs-3')); ?> +
+
+ + config->item('currency_symbol'); ?> + + 'closed_amount_card', + 'id'=>'closed_amount_card', + 'class'=>'form-control input-sm', + 'value'=>to_currency_no_money($cash_ups_info->closed_amount_card)) + );?> + + config->item('currency_symbol'); ?> + +
+
+
+ +
+ lang->line('cashups_closed_amount_check'), 'closed_amount_check', array('class'=>'control-label col-xs-3')); ?> +
+
+ + config->item('currency_symbol'); ?> + + 'closed_amount_check', + 'id'=>'closed_amount_check', + 'class'=>'form-control input-sm', + 'value'=>to_currency_no_money($cash_ups_info->closed_amount_check)) + );?> + + config->item('currency_symbol'); ?> + +
+
+
+ +
+ lang->line('cashups_closed_amount_total'), 'closed_amount_total', array('class'=>'control-label col-xs-3')); ?> +
+
+ + config->item('currency_symbol'); ?> + + 'closed_amount_total', + 'id'=>'closed_amount_total', + 'readonly'=>'true', + 'class'=>'form-control input-sm', + 'value'=>to_currency_no_money($cash_ups_info->closed_amount_total) + ));?> + + config->item('currency_symbol'); ?> + +
+
+
+ +
+ lang->line('cashups_description'), 'description', array('class'=>'control-label col-xs-3')); ?> +
+ 'description', + 'id'=>'description', + 'class'=>'form-control input-sm', + 'value'=>$cash_ups_info->description) + );?> +
+
+ + cashup_id)) + { + ?> +
+ lang->line('cashups_is_deleted').':', 'deleted', array('class'=>'control-label col-xs-3')); ?> +
+ 'deleted', + 'id'=>'deleted', + 'value'=>1, + 'checked'=>($cash_ups_info->deleted) ? 1 : 0) + );?> +
+
+ +
+ + + diff --git a/application/views/cashups/manage.php b/application/views/cashups/manage.php new file mode 100644 index 000000000..0cb3f7a7a --- /dev/null +++ b/application/views/cashups/manage.php @@ -0,0 +1,63 @@ +load->view("partial/header"); ?> + + + +load->view('partial/print_receipt', array('print_after_sale'=>false, 'selected_printer'=>'takings_printer')); ?> + + + +
+ +
+ +
+
+
+ +load->view("partial/footer"); ?> diff --git a/public/images/menubar/cashups.png b/public/images/menubar/cashups.png new file mode 100644 index 0000000000000000000000000000000000000000..11eb8a3194e529777e5434e00c2e5c084aa70d83 GIT binary patch literal 1086 zcmV-E1i|}>P)R|6G0TmAEhAvsI5j5!NfL!XpAuwqwxU78cpB0*z{rq9|=rxda}R!9X>XLsYoe5dH+%#e6%*N0ifs@K87)k3Wyc44F&>J4q;@K z1%Sd?4JR=@@Ug-ej2xyk!YC>MfP|+p-Gu$MDK9`s10Yw={s-Y!o4}Mo5bOH}0L3S% z*2AENl~})n5axXaK)rfSfm*k-6hg@O0szIwNqiL4wkd=#>L~ycpI6A`oos={9U}cg zpasPP#UFWUvho0$RQx{>qyd;Zyk-<%gMd1+Qhfk^Fz;n=zrFPbR_0#9kF`~9z9Xm4 zz}cbO(B9FxFQY@iM!e^dorrj5EDy`;u|1;Z>)=!>o z-v?j@7C=1l7qG{n{{1+4nX9s(od`T%LF{1PM!;1Eiq&g`a|!9?!YTe`jRSuc8=U zkgfrso?mMDs$=UHT%Uagr`DG1zJGT(0w3-^bp5^E-F?+(GB>BH$za+s+Arj63Wf-%jH7#89MIN(Y4F|1grEU z>jM&v6tw#We@4BzO79DxVl#*Z8U@hg7H0rrIs*togS$87S$;J3`5V0tsp|ncTSRvN zG2H<~bq4?k01g1?Z6)0S6mQp@5rtf=A*?Alyh zM!d8KSiB(tI$oT#0ioa3**YL%pyTCf8yL!8pZ_bs0GXhgOWYZXUjP6A07*qoM6N<$ Ef(