Added amount paid from all orders in the total amount paid in the view of admin customer

This commit is contained in:
vishalsingh.qlo325
2024-05-06 09:34:53 +05:30
parent 9ac84143b1
commit d5bd7198cd
5 changed files with 22 additions and 9 deletions

View File

@@ -656,10 +656,16 @@ class AdminCustomerThreadsControllerCore extends AdminController
$total_ok = 0;
$orders_ok = array();
foreach ($orders as $key => $order) {
if ($order['valid']) {
if ($order['valid']
|| strtotime($order['order_last_date']) >= strtotime(date('Y-m-d'))
) {
$orders_ok[] = $order;
}
if ($order['total_paid_real']) {
$total_ok += $order['total_paid_real']/$order['conversion_rate'];
}
$orders[$key]['date_add'] = Tools::displayDate($order['date_add']);
$orders[$key]['total_paid_real'] = Tools::displayPrice($order['total_paid_real'], new Currency((int)$order['id_currency']));
}