Add sales total to daily overview (#3138)

This commit is contained in:
Jeroen Peelaerts
2021-04-06 15:31:06 +02:00
committed by jekkos
parent a3a06fdb07
commit 0fb93d6d14

View File

@@ -149,13 +149,18 @@ Get the sales payments summary
*/
function get_sales_manage_payments_summary($payments)
{
$CI =& get_instance();
$table = '<div id="report_summary">';
$total = 0;
foreach($payments as $key=>$payment)
{
$amount = $payment['payment_amount'];
$total = bcadd($total, $amount);
$table .= '<div class="summary_row">' . $payment['payment_type'] . ': ' . to_currency($amount) . '</div>';
}
$table .= '<div class="summary_row">' . $CI->lang->line('sales_total') . ': ' . to_currency($total) . '</div>';
$table .= '</div>';
return $table;