Added measurement unit with the average lead time in the KPI

This commit is contained in:
vishalsingh.qlo325
2024-06-07 12:53:58 +05:30
parent 19e74a7ff2
commit ba321cbf16

View File

@@ -959,6 +959,12 @@ class AdminStatsControllerCore extends AdminStatsTabController
case 'average_lead_time':
$dateToday = date('Y-m-d');
$value = Tools::ps_round(AdminStatsController::getAverageLeadTime(), 2);
if ($value && $value <= 1) {
$value .= ' '.$this->l('day');
} else {
$value .= ' '.$this->l('days');
}
break;
case 'average_guest_in_booking':
$dateToday = date('Y-m-d');