From 0fb93d6d142393bd5a3d6514f41412da4280f56d Mon Sep 17 00:00:00 2001 From: Jeroen Peelaerts Date: Tue, 6 Apr 2021 15:31:06 +0200 Subject: [PATCH] Add sales total to daily overview (#3138) --- application/helpers/tabular_helper.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/helpers/tabular_helper.php b/application/helpers/tabular_helper.php index f2a8fba93..49da802e3 100644 --- a/application/helpers/tabular_helper.php +++ b/application/helpers/tabular_helper.php @@ -149,13 +149,18 @@ Get the sales payments summary */ function get_sales_manage_payments_summary($payments) { + $CI =& get_instance(); + $table = '
'; + $total = 0; foreach($payments as $key=>$payment) { $amount = $payment['payment_amount']; + $total = bcadd($total, $amount); $table .= '
' . $payment['payment_type'] . ': ' . to_currency($amount) . '
'; } + $table .= '
' . $CI->lang->line('sales_total') . ': ' . to_currency($total) . '
'; $table .= '
'; return $table;