function get_total($sale_id = false) { $total = 0; foreach ($this->get_cart() as $item) { $price_to_use = $this->_get_price_for_item_in_cart($item, $sale_id); $total += $price_to_use * $item['quantity'] - $price_to_use * $item['quantity'] * $item['discount'] / 100; } foreach ($this->get_taxes($sale_id) as $tax) { $total += $tax; } $total = $this->CI->config->item('round_cash_on_sales') && $this->is_sale_cash_payment() ? round_to_nearest_05($total) : $total; return to_currency_no_money($total); }
<?php } } ?> <?php if ($amount_change >= 0) { echo lang('sales_change_due'); ?> : <?php echo $this->config->item('round_cash_on_sales') && $is_sale_cash_payment ? str_replace('‑', '-', to_currency(round_to_nearest_05($amount_change))) : str_replace('‑', '-', to_currency($amount_change)); } else { echo lang('sales_amount_due'); ?> : <?php echo $this->config->item('round_cash_on_sales') && $is_sale_cash_payment ? str_replace('‑', '-', to_currency(round_to_nearest_05($amount_change * -1))) : str_replace('‑', '-', to_currency($amount_change * -1)); } if (isset($customer_balance_for_sale) && $customer_balance_for_sale !== FALSE) { ?> <?php echo lang('sales_customer_account_balance'); ?> : <?php echo to_currency($customer_balance_for_sale); } if ($ref_no) { ?> <?php echo lang('sales_ref_no');
<?php if ($amount_change >= 0) { ?> <tr> <td colspan="4" style='<?php echo is_rtl_lang() ? 'text-align: left;' : 'text-align: right;'; ?> '><?php echo lang('sales_change_due'); ?> </td> <td colspan="2" style='<?php echo is_rtl_lang() ? 'text-align: left;' : 'text-align: right;'; ?> '><?php echo $this->config->item('round_cash_on_sales') && $is_sale_cash_payment ? to_currency(round_to_nearest_05($amount_change)) : to_currency($amount_change); ?> </td> </tr> <?php } else { ?> <tr> <td colspan="4" style='<?php echo is_rtl_lang() ? 'text-align: left;' : 'text-align: right;'; ?> '><?php echo lang('sales_amount_due'); ?> </td> <td colspan="2" style='<?php