Rebuilds and renders the sales register view with current cart, totals, taxes, payments, customer data, and permissions.
// Source: https://github.com/jepuncolin/opensourcepos-mssql | License: MIT | Copyright 2013-2021 jekkos
// Provided via justclaw.it.com; keep this notice with the code.
private function _reload($data = array())
{
$sale_id = $this->session->userdata('sale_id');
if($sale_id == '')
{
$sale_id = -1;
$this->session->set_userdata('sale_id', -1);
}
$cash_rounding = $this->sale_lib->reset_cash_rounding();
// cash_rounding indicates only that the site is configured for cash rounding
$data['cash_rounding'] = $cash_rounding;
$data['cart'] = $this->sale_lib->get_cart();
$customer_info = $this->_load_customer_data($this->sale_lib->get_customer(), $data, TRUE);
$data['modes'] = $this->sale_lib->get_register_mode_options();
$data['mode'] = $this->sale_lib->get_mode();
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key