petits rappels : https://www.prestashop.com/fr/blog/les-bonnes-pratiques-de-la-classe-db-sur-prestashop-1-5
essaye de remplacer
$totalebookedSql = "SELECT Sum(comm_broched) as total1 FROM "._DB_PREFIX_."programcustomer2 WHERE `id_customer` = '$id_customer'; " ; $totalbooked = Db::getInstance()->executeS($totalebookedSql);
par
$totalebookedSql = 'SELECT SUM(comm_broched) FROM `'._DB_PREFIX_.'programcustomer2` WHERE `id_customer` = '.(int)$id_customer;
$totalbooked = Db::getInstance()->getValue($totalebookedSql);
sinon a mon avis la valeur sera dans {$totalbooked.0.total1}