fix purchases.php
This commit is contained in:
@@ -548,7 +548,11 @@ function format_datetime($datetime) {
|
||||
* @return string Prezzo formattato
|
||||
*/
|
||||
function format_price($price) {
|
||||
return '€ ' . number_format($price, 2, ',', '.');
|
||||
// Gestisci null o valori non numerici
|
||||
if ($price === null || $price === '') {
|
||||
$price = 0;
|
||||
}
|
||||
return '€ ' . number_format((float)$price, 2, ',', '.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user