getId())); } } else $type_abo = 'HCHP';*/ $eq= eqLogic::byType('conso'); $type_abo = 'HCHP'; foreach ($eq as $eqLogic) { if ($eqLogic->getConfiguration('type') != 'water' && $eqLogic->getConfiguration('type') != 'oil' && $eqLogic->getConfiguration('type') != 'gaz' && $eqLogic->getIsEnable() == 1) { $type_abo = conso::getAbo($eqLogic->getId()); break; } } //$type_abo = (is_array($eqLogics) && count($eqLogics)==0 ? 'HCHP' : conso::getAbo($eqLogics[0]->getId()));*/ $display = ($type_abo=='HCHP' ? '' : 'displaynone'); $title = ($type_abo=='HCHP' ? 'HP' : ''); $allPeriodes = conso_periode::TabPeriodes(); $txt .= '

Ajouter une période

'; foreach ($allPeriodes as $periode) { $equipement = eqLogic::byId($periode['id_ecq']); $txt .= ''; } $txt .= '
EDITER
Libelle Date de Début Date de Fin Prix '.$title.' Prix HC Graph Type Affichage '.$title.' Affichage HC Facture Graphique Année-1 Equipement Type
DEL
'.$periode['libelle'].' '.$periode['date_debut'].' '.$periode['date_fin'].' '.$periode['total']['prix_hp']. config::byKey('Devise', 'conso') .' '.(stripos($equipement->getConfiguration('type'), 'elect') !== false ? $periode['total']['prix_hc']. config::byKey('Devise', 'conso') : '') .' '.$periode['graph'].' '; $txt .= ($equipement =='' ? '
ERREUR
' : ((int)$periode['type']==0 ? (stripos($equipement->getConfiguration('type'), 'elect') !== false ? 'Watt' : 'M3'): 'Prix')); // $txt .= ((int)$periode['type']==0 ? ($equipement->getConfiguration('type')=='electricity' ? 'Watt' : 'M3'): 'Prix'); $txt .= '
'.$periode['type_graphHP'].' '.$periode['type_graphHC'].'
'; if($periode['view_tab']>0) $txt .= '
Oui
'; else $txt .= '
Non
'; $txt .= '
'; if($periode['view_graph']>0) $txt .= '
Oui
'; else $txt .= '
Non
'; $txt .= '
'; if($periode['year_old']>0) $txt .='
Oui
'; else $txt .= '
Non
'; $txt .= '
'.($equipement =='' ? '
ERREUR
' : $equipement->getHumanName(true)).'
'; if($equipement !='') $txt .= ($periode['type_ecq']=='' ? '
ERREUR
' : ($equipement->getConfiguration('type')=='electricity' ? 'Elec': ($equipement->getConfiguration('type')=='electprod'? 'Elect. Prod' : ($equipement->getConfiguration('type')=='gaz' ? 'Gaz' : ($equipement->getConfiguration('type')=='oil' ? 'Fioul' : 'Eau'))))); $txt .= '
'; }else{ $txt .= ''; } if(!init('refreshPeriode',false)){ echo $txt; }else{ ajax::success(jeedom::toHumanReadable($txt)); } ?>