<thead> <th style="text-align: center;">Sel.</th> <th style="text-align: center;">Descrizione servizio</th> <th style="text-align: center;">Costo €</th> <th style="text-align: center;">St </th> <th style="text-align: center;">In data</th> <th style="text-align: center;">Operatore</th> </thead> <?php foreach ($ar_lista as $idrow => $elem) { $isChecked = ''; $dt_completamento = ''; $stato_esecuzione = $elem->{'stato_esecuzione'}; if ($elem->{'dt_completamento'} != null) { $d = new DateTime(DrupalDateToDate($elem->{'dt_completamento'})); $dt_completamento = $d->format("d/m/Y"); } if ($elem->{'nid_parkauto'}) { $isChecked = ' checked '; } ?> <tr> <td><input class="ricalcola registrazione walkin" type="checkbox" name="sop_selected[]" id="<?php echo 'sop_nid_parkauto_' . $idrow; ?> " <?php echo $isChecked; ?> /></td> <td><input class="no-input" type="text" id="<?php
protected function load_data() { $this->rs_parkauto = array(); if (!$this->nid) { return; } $result = array(); $query = new EntityFieldQuery(); $query->entityCondition('entity_type', 'node')->entityCondition('bundle', 'parkauto')->propertyCondition('status', 1)->propertyCondition('nid', $this->nid)->addMetaData('account', user_load(1)); $qryres = $query->execute(); if (isset($qryres['node'])) { $items_nids = array_keys($qryres['node']); $items = entity_load('node', $items_nids); foreach ($items as $nodo => $elem) { $result['nid'] = $nodo; $result['rc_sito_parking'] = $elem->field_p_sito_parking[LANGUAGE_NONE][0]['nid']; $result['rc_p_online'] = $elem->field_p_online[LANGUAGE_NONE][0]['value']; $result['rc_uid_registrazione'] = $elem->field_p_uid_registrazione[LANGUAGE_NONE][0]['uid']; $result['rc_uid_walkin'] = $elem->field_p_uid_walkin[LANGUAGE_NONE][0]['uid']; $result['rc_uid_walkout'] = $elem->field_p_uid_walkout[LANGUAGE_NONE][0]['uid']; $result['rc_uid_walkout_closed'] = $elem->field_p_uid_walkout_closed[LANGUAGE_NONE][0]['uid']; $result['rc_dtreg_dttm_registrazione'] = DrupalDateTimeToDateTime($elem->field_p_dtreg_registrazione[LANGUAGE_NONE][0]['value']); $result['rc_dtreg_stddt_registrazione'] = DrupalDateTimeToDateTime($elem->field_p_dtreg_registrazione[LANGUAGE_NONE][0]['value']); $result['rc_dtreg_dttm_walkin'] = DrupalDateTimeToDateTime($elem->field_p_dtreg_walkin[LANGUAGE_NONE][0]['value']); $result['rc_dtreg_stddt_walkin'] = DrupalDateTimeToDateTime($elem->field_p_dtreg_walkin[LANGUAGE_NONE][0]['value']); $result['rc_dtreg_dttm_walkout'] = DrupalDateTimeToDateTime($elem->field_p_dtreg_walkout[LANGUAGE_NONE][0]['value']); $result['rc_dtreg_stddt_walkout'] = DrupalDateTimeToDateTime($elem->field_p_dtreg_walkout[LANGUAGE_NONE][0]['value']); $result['rc_dtreg_dttm_walkout_closed'] = DrupalDateTimeToDateTime($elem->field_p_dtreg_walkout_closed[LANGUAGE_NONE][0]['value']); $result['rc_dtreg_stddt_walkout_closed'] = DrupalDateTimeToDateTime($elem->field_p_dtreg_walkout_closed[LANGUAGE_NONE][0]['value']); $result['rc_stato_parking'] = $elem->field_p_stato_parking[LANGUAGE_NONE][0]['value']; $result['rc_rif_barcode'] = $elem->field_p_rif_barcode[LANGUAGE_NONE][0]['value']; $result['rc_dt_checkin_checkout_in'] = DrupalDateToDate($elem->field_p_dt_checkin_checkout[LANGUAGE_NONE][0]['value']); $result['rc_tm_checkin_checkout_in'] = DrupalTimeToTime($elem->field_p_dt_checkin_checkout[LANGUAGE_NONE][0]['value'], "H:i"); $result['rc_dt_checkin_checkout_out'] = DrupalDateToDate($elem->field_p_dt_checkin_checkout[LANGUAGE_NONE][0]['value2']); $result['rc_tm_checkin_checkout_out'] = DrupalTimeToTime($elem->field_p_dt_checkin_checkout[LANGUAGE_NONE][0]['value2'], "H:i"); $rs_data = ListinoBase::get_data_from_nid($elem->field_p_tipo_parcheggio[LANGUAGE_NONE][0]['nid']); $result['rc_tipo_parcheggio'] = $rs_data['field_p_tipo_parcheggio']; $result['rc_azienda'] = $elem->field_p_azienda[LANGUAGE_NONE][0]['value']; $result['rc_azienda_indirizzo'] = $elem->field_p_azienda_indirizzo[LANGUAGE_NONE][0]['value']; $result['rc_azienda_city'] = $elem->field_p_azienda_city[LANGUAGE_NONE][0]['value']; $result['rc_azienda_piva'] = $elem->field_p_azienda_piva[LANGUAGE_NONE][0]['value']; $result['rc_nome_cliente'] = $elem->field_p_nome_cliente[LANGUAGE_NONE][0]['value']; $result['rc_cognome_cliente'] = $elem->field_p_cognome_cliente[LANGUAGE_NONE][0]['value']; $result['rc_ritira_auto'] = $elem->field_p_ritira_auto[LANGUAGE_NONE][0]['value']; $result['rc_email_cliente'] = $elem->field_p_email_cliente[LANGUAGE_NONE][0]['value']; $result['rc_nr_telefono_cliente'] = $elem->field_p_nr_telefono_cliente[LANGUAGE_NONE][0]['value']; $result['rc_targa_auto_cliente'] = $elem->field_p_targa_auto_cliente[LANGUAGE_NONE][0]['value']; $result['rc_modello_auto_cliente'] = $elem->field_p_modello_auto_cliente[LANGUAGE_NONE][0]['value']; $result['rc_marca_auto_cliente'] = $elem->field_p_marca_auto_cliente[LANGUAGE_NONE][0]['value']; $result['rc_nr_passeggeri_cliente'] = $elem->field_p_nr_passeggeri_cliente[LANGUAGE_NONE][0]['value']; $result['rc_tipo_cliente'] = $elem->field_p_tipo_cliente[LANGUAGE_NONE][0]['nid']; $result['rc_tp_veicolo_cliente'] = $elem->field_p_tp_veicolo_cliente[LANGUAGE_NONE][0]['nid']; $result['rc_tp_gestione_chiavi'] = $elem->field_p_tp_gestione_chiavi[LANGUAGE_NONE][0]['value']; $result['rc_note_interne'] = $elem->field_p_note_interne[LANGUAGE_NONE][0]['value']; $result['rc_note_prenotazione'] = $elem->field_p_note_prenotazione[LANGUAGE_NONE][0]['value']; $result['rc_zona_parcheggio_auto'] = $elem->field_p_zona_parcheggio_auto[LANGUAGE_NONE][0]['value']; $result['rc_cd_volo_cliente'] = $elem->field_p_cd_volo_cliente[LANGUAGE_NONE][0]['value']; $result['rc_nr_terminal_cliente'] = $elem->field_p_nr_terminal_cliente[LANGUAGE_NONE][0]['value']; $result['rc_provenienza_cliente'] = $elem->field_p_provenienza_cliente[LANGUAGE_NONE][0]['value']; $pagamentoCliente = new PagamentoCliente(); $pagamentoCliente->load_data(array('nid_parkauto' => $result['nid'])); $result['pag_cliente'] = $pagamentoCliente->get_lista(); $result['rc_dt_walkin'] = DrupalDateToDate($elem->field_p_dt_walkin[LANGUAGE_NONE][0]['value']); $result['rc_tm_walkin'] = DrupalTimeToTime($elem->field_p_dt_walkin[LANGUAGE_NONE][0]['value'], "H:i"); $result['rc_dt_walkout_prevista'] = DrupalDateToDate($elem->field_p_dt_walkout_prevista[LANGUAGE_NONE][0]['value']); $result['rc_tm_walkout_prevista'] = DrupalTimeToTime($elem->field_p_dt_walkout_prevista[LANGUAGE_NONE][0]['value'], "H:i"); $result['rc_dt_walkout'] = DrupalDateToDate($elem->field_p_dt_walkout[LANGUAGE_NONE][0]['value']); $result['rc_tm_walkout'] = DrupalTimeToTime($elem->field_p_dt_walkout[LANGUAGE_NONE][0]['value'], "H:i"); $result['rc_valore_sct_mag'] = $elem->field_p_valore_sct_mag[LANGUAGE_NONE][0]['value']; $result['rc_tipo_sct_mag'] = $elem->field_p_tipo_sct_mag[LANGUAGE_NONE][0]['value']; $result['rc_tp_sct_mag_v_p'] = $elem->field_p_tp_sct_mag_v_p[LANGUAGE_NONE][0]['value']; $result['rc_motivazione_sct_mag'] = $elem->field_p_motivazione_sct_mag[LANGUAGE_NONE][0]['value']; $result['rc_tp_doc_fiscale'] = $elem->field_p_tp_doc_fiscale[LANGUAGE_NONE][0]['value']; $result['rc_dt_walkout'] = DrupalDateToDate($elem->field_p_dt_walkout[LANGUAGE_NONE][0]['value']); $result['rc_tm_walkout'] = DrupalTimeToTime($elem->field_p_dt_walkout[LANGUAGE_NONE][0]['value'], "H:i"); $result['rc_imp_totale_pagato'] = $elem->field_p_imp_totale_pagato[LANGUAGE_NONE][0]['value']; $result['rc_imp_totale_dovuto'] = $elem->field_p_imp_totale_dovuto[LANGUAGE_NONE][0]['value']; $result['rc_totale_nr_giorni'] = $elem->field_p_totale_nr_giorni[LANGUAGE_NONE][0]['value']; $result['rc_imp_totale_residuo'] = $elem->field_p_imp_totale_residuo[LANGUAGE_NONE][0]['value']; // $result['rc_dt_rif_checkin_checkout_in'] = DrupalDateToDate($elem->field_p_dt_rif_checkin_checkout[LANGUAGE_NONE][0]['value']); $result['rc_tm_rif_checkin_checkout_in'] = DrupalTimeToTime($elem->field_p_dt_rif_checkin_checkout[LANGUAGE_NONE][0]['value'], "H:i"); $result['rc_dt_rif_checkin_checkout_out'] = DrupalDateToDate($elem->field_p_dt_rif_checkin_checkout[LANGUAGE_NONE][0]['value2']); $result['rc_tm_rif_checkin_checkout_out'] = DrupalTimeToTime($elem->field_p_dt_rif_checkin_checkout[LANGUAGE_NONE][0]['value2'], "H:i"); $result['rc_is_ricevuta_stampata'] = $elem->field_p_is_ricevuta_stampata[LANGUAGE_NONE][0]['value']; } } $this->rs_parkauto = $result; }