Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 125 |
|
0.00% |
0 / 4 |
CRAP | n/a |
0 / 0 |
|
| actualizaBancoRemarksdeFiduciario | |
0.00% |
0 / 54 |
|
0.00% |
0 / 1 |
240 | |||
| actualizaFiduciariosAtrasados | |
0.00% |
0 / 56 |
|
0.00% |
0 / 1 |
2 | |||
| bloqueaFiduciarioContenedores | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
12 | |||
| statusFiduciario | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
30 | |||
| 1 | <?php |
| 2 | function actualizaBancoRemarksdeFiduciario($fRID='', $guarda=true) |
| 3 | { |
| 4 | if(empty($fRID)) |
| 5 | return; |
| 6 | |
| 7 | //$arr_BCM = ia_sqlArray("SELECT banco_cuenta_mov_id, remarks, remarks_log FROM banco_cuenta_mov_con_links WHERE link_to IS NOT NULL ORDER BY fecha DESC",'banco_cuenta_mov_id'); |
| 8 | $fRenDB = ia_singleton("SELECT * FROM fiduciario_reembolso WHERE fiduciario_reembolso_id=".strit($fRID)); |
| 9 | |
| 10 | //echo "<pre>fRenDB".print_r($fRenDB, true) ."</pre>"; |
| 11 | $sql = array(); |
| 12 | $i=0; |
| 13 | |
| 14 | if(!empty($fRenDB) && is_array($fRenDB)) |
| 15 | { |
| 16 | $fCenDBs = ia_sqlArray("SELECT * FROM fiduciario_contenedor WHERE fiduciario_reembolso_id = '$fRID'", 'fiduciario_contenedor_id'); |
| 17 | if(empty($fCenDBs)) |
| 18 | return; |
| 19 | |
| 20 | $fiduciarios = array('fND' => array(), 'fenDB' => array()); |
| 21 | $fC = 0; |
| 22 | |
| 23 | $remarksBCM = str_pad("CONTENEDOR", 13, " ", STR_PAD_RIGHT)."\t". |
| 24 | str_pad("PEDIMENTO", 17, " ", STR_PAD_RIGHT)."\t". |
| 25 | str_pad("CONSTANCIA", 12, " ", STR_PAD_RIGHT)."\t". |
| 26 | str_pad("ORIGINAL", 12, " ", STR_PAD_RIGHT)."\t". |
| 27 | str_pad("INTERES", 12, " ", STR_PAD_RIGHT)."\t". |
| 28 | str_pad("REEMBOLSO", 12, " ", STR_PAD_RIGHT)."\r\n\r\n"; |
| 29 | |
| 30 | foreach($fCenDBs as $kk=>$vv) |
| 31 | { |
| 32 | $fID = $fCenDBs[$kk]['fiduciario_id']; |
| 33 | if(($fC == 0 || $fC != $fID) && !array_key_exists($fID, $fiduciarios['fND'])) |
| 34 | { |
| 35 | $fiduciarios['fND'][$fID] = ia_singleton("SELECT * FROM fiduciario WHERE fiduciario_id='$fID'"); |
| 36 | $fiduciarios['fND'][$fID]['contenedores_reembolsados'] = 0; //OJO. Es una columna virtual. |
| 37 | $fiduciarios['fND'][$fID]['contenedores_cancelados'] = 0; //OJO. Es una columna virtual. |
| 38 | $fiduciarios['sumaCont'][$fID]['Errores'] = ia_singleread("SELECT |
| 39 | SUM(CASE WHEN error='Si' THEN 1 ELSE 0 END) as Errores |
| 40 | FROM fiduciario_contenedor |
| 41 | WHERE fiduciario_id = '$fID'"); |
| 42 | //Por seguridad. |
| 43 | if(empty($fiduciarios['sumaCont'][$fID]['Errores'])) |
| 44 | $fiduciarios['sumaCont'][$fID]['Errores'] = 0; |
| 45 | //echo "<pre>".print_r($fiduciarios[$fID],true)."</pre>"; |
| 46 | } |
| 47 | |
| 48 | $fC = $fID; |
| 49 | |
| 50 | if($vv['error'] == 'Si' || $vv['error'] == 'Tu') |
| 51 | { |
| 52 | $fiduciarios['fND'][$fID]['contenedores_cancelados']++; |
| 53 | } |
| 54 | else |
| 55 | { |
| 56 | $fiduciarios['fND'][$fID]['contenedores_reembolsados']++; |
| 57 | } |
| 58 | |
| 59 | |
| 60 | $remarksBCM.= str_pad($fCenDBs[$kk]['numero_contenedor'], 13, " ", STR_PAD_RIGHT)."\t". |
| 61 | str_pad($fCenDBs[$kk]['numero_pedimento'], 17, " ", STR_PAD_RIGHT)."\t". |
| 62 | str_pad($fCenDBs[$kk]['numero_constancia'], 12, " ", STR_PAD_RIGHT)."\t". |
| 63 | str_pad(echonf($fCenDBs[$kk]['monto_garantia'],true), 12, " ", STR_PAD_LEFT)."\t". |
| 64 | str_pad(echonf($fCenDBs[$kk]['monto_intereses'],true), 12, " ", STR_PAD_LEFT)."\t". |
| 65 | str_pad(echonf($fCenDBs[$kk]['monto_total_reembolsado'],true), 12, " ", STR_PAD_LEFT)."\r\n"; |
| 66 | } |
| 67 | |
| 68 | $cuantosFid = sizeof($fiduciarios['fND']); |
| 69 | $tmpRemarks = "REEMBOLSO DE ".$cuantosFid." FIDUCIARIO".($cuantosFid>1?"S\r\n":"\r\n"); |
| 70 | |
| 71 | //Preparo la explicación para el banco y los fiduciarios. |
| 72 | foreach($fiduciarios['fND'] as $kkk=>$vvv) |
| 73 | { |
| 74 | $tmpRemarks.= "MONTO ORIGINAL ".echonf($vvv['monto_retiro'],true); |
| 75 | $tmpRemarks.= " DEL DÍA ".strtoupper(get_date_spanish(strtotime($vvv['fecha_retiro']), false, 'small_date','month_mini')); |
| 76 | $tmpRemarks.= "\r\n(CONTENEDORES REEMBOLSADOS: ".($vvv['contenedores_reembolsados'] + $vvv['contenedores_cancelados'])." DE ".$vvv['contenedores'].")\r\n"; |
| 77 | } |
| 78 | |
| 79 | $remarksBCM = "$tmpRemarks" . PHP_EOL . "$remarksBCM"; |
| 80 | |
| 81 | $txt_remarksBCM = strit($remarksBCM); |
| 82 | |
| 83 | $links=generaListadoLinksBCM($fRenDB['banco_cuenta_mov_id']); |
| 84 | |
| 85 | $txt_links=" ,detalle_links = ".strit($links); |
| 86 | |
| 87 | $sql[]="UPDATE banco_cuenta_mov SET |
| 88 | remarks = $txt_remarksBCM |
| 89 | $txt_links |
| 90 | WHERE banco_cuenta_mov_id=".strit($fRenDB['banco_cuenta_mov_id']); |
| 91 | |
| 92 | $txt_remarksBCM = $links . $remarksBCM; |
| 93 | $txt_remarksBCM = strit($txt_remarksBCM); |
| 94 | |
| 95 | $sql[]="UPDATE fiduciario_reembolso SET |
| 96 | remarks = $txt_remarksBCM |
| 97 | WHERE fiduciario_reembolso_id=".strit($fRenDB['fiduciario_reembolso_id']); |
| 98 | } |
| 99 | |
| 100 | |
| 101 | if($guarda) |
| 102 | { |
| 103 | ia_transaction($sql); |
| 104 | ia_errores_a_dime(); |
| 105 | } |
| 106 | else |
| 107 | return $sql; |
| 108 | } |
| 109 | |
| 110 | function actualizaFiduciariosAtrasados() |
| 111 | { |
| 112 | global $gIAParametros; |
| 113 | |
| 114 | leeParametrosVitex(); |
| 115 | |
| 116 | //Expirados con más de 175 días sin solicitud de reembolso. |
| 117 | $sql1 = "SELECT COUNT(DISTINCT(fiduciario_id)) FROM fiduciario |
| 118 | WHERE DATEDIFF(NOW(),fecha_retiro) > $gIAParametros[dias_para_solicitar_reembolso_fiduciario] |
| 119 | AND terminado = 'No' |
| 120 | AND solicitud_reembolso_fecha IS NULL |
| 121 | OR fiduciario_id IN ( |
| 122 | SELECT fiduciario_id FROM fiduciario_contenedor WHERE DATEDIFF(NOW(),fecha_retiro) > $gIAParametros[dias_para_solicitar_reembolso_fiduciario] |
| 123 | AND fiduciario_reembolso_id IS NULL AND solicitud_reembolso_fecha IS NULL |
| 124 | AND monto_reembolsado = 0 |
| 125 | AND monto_cancelado = 0 )"; |
| 126 | |
| 127 | //Expirados con más de 175 días con solicitud de reembolso. |
| 128 | $sql2 = "SELECT COUNT(DISTINCT(fiduciario_id)) FROM fiduciario |
| 129 | WHERE DATEDIFF(NOW(),fecha_retiro) > $gIAParametros[dias_para_solicitar_reembolso_fiduciario] |
| 130 | AND terminado = 'No' |
| 131 | AND solicitud_reembolso_fecha IS NOT NULL |
| 132 | OR fiduciario_id IN ( |
| 133 | SELECT fiduciario_id FROM fiduciario_contenedor WHERE DATEDIFF(NOW(),fecha_retiro) > $gIAParametros[dias_para_solicitar_reembolso_fiduciario] |
| 134 | AND fiduciario_reembolso_id IS NULL |
| 135 | AND solicitud_reembolso_fecha IS NOT NULL |
| 136 | AND monto_reembolsado = 0 |
| 137 | AND monto_cancelado = 0 )"; |
| 138 | |
| 139 | //Expirados con más de 178 días sin solicitud de reembolso. |
| 140 | $sql3 = "SELECT COUNT(DISTINCT(fiduciario_id)) as ExpUrgente FROM fiduciario |
| 141 | WHERE DATEDIFF(NOW(),fecha_retiro) > $gIAParametros[dias_para_flashear_tab_fiduciario] |
| 142 | AND terminado = 'No' |
| 143 | AND solicitud_reembolso_fecha IS NULL |
| 144 | OR fiduciario_id IN ( |
| 145 | SELECT fiduciario_id FROM fiduciario_contenedor WHERE DATEDIFF(NOW(),fecha_retiro) > $gIAParametros[dias_para_flashear_tab_fiduciario] |
| 146 | AND fiduciario_reembolso_id IS NULL AND solicitud_reembolso_fecha IS NULL |
| 147 | AND monto_reembolsado = 0 |
| 148 | AND monto_cancelado = 0 )"; |
| 149 | |
| 150 | //VCA 23-09-2021 Fiduciarios con Link sin revisar |
| 151 | //$sql4 = "SELECT COUNT(bloqueado) FROM fiduciario WHERE bloqueado IN ('MODIFICADO','AMBOSMOD','CONTMOD')"; |
| 152 | $sql4 = "SELECT COUNT(bloqueado) FROM fiduciario WHERE fiduciario_id IN ( SELECT fiduciario_id FROM fiduciario_contenedor WHERE fiduciario_reembolso_id IS NOT NULL AND bloqueado != 'CERRADO' )"; |
| 153 | $sql5 = "SELECT COUNT(error) FROM fiduciario WHERE error IN ('Si','Pa')"; |
| 154 | $sql6 = "SELECT COUNT(capturado) FROM fiduciario WHERE capturado IN ('No')"; |
| 155 | |
| 156 | /** ** ** ** CONTENEDORES ** ** ** **/ |
| 157 | $sql7 = "SELECT COUNT(bloqueado) FROM fiduciario_contenedor WHERE bloqueado IN ('MODIFICADO','AMBOSMOD','CONTMOD')"; |
| 158 | $sql8 = "SELECT COUNT(error) FROM fiduciario_contenedor WHERE error IN ('Si','Pa')"; |
| 159 | $sql10 = "SELECT COUNT(fecha_retiro) FROM fiduciario_contenedor |
| 160 | WHERE DATEDIFF(NOW(),fecha_retiro) > $gIAParametros[dias_para_solicitar_reembolso_fiduciario] |
| 161 | AND fiduciario_reembolso_id IS NULL |
| 162 | AND solicitud_reembolso_fecha IS NULL |
| 163 | AND monto_reembolsado = 0 |
| 164 | AND monto_cancelado = 0 "; |
| 165 | $sql11 = "SELECT COUNT(fecha_retiro) FROM fiduciario_contenedor |
| 166 | WHERE DATEDIFF(NOW(),fecha_retiro) > $gIAParametros[dias_para_solicitar_reembolso_fiduciario] |
| 167 | AND fiduciario_reembolso_id IS NULL |
| 168 | AND solicitud_reembolso_fecha IS NOT NULL |
| 169 | AND monto_reembolsado = 0 |
| 170 | AND monto_cancelado = 0 "; |
| 171 | /** ** ** ** CONTENEDORES ** ** ** **/ |
| 172 | |
| 173 | //Expirados con más de 175 días con solicitud de reembolso de hace más de 3 días. |
| 174 | $sql12 = "SELECT COUNT(DISTINCT(fiduciario_id)) FROM fiduciario |
| 175 | WHERE DATEDIFF(NOW(),fecha_retiro) > $gIAParametros[dias_para_solicitar_reembolso_fiduciario] |
| 176 | AND terminado = 'No' |
| 177 | AND DATEDIFF(NOW(),solicitud_reembolso_fecha) > $gIAParametros[dias_despues_solicitar_reembolso] |
| 178 | OR fiduciario_id IN ( |
| 179 | SELECT fiduciario_id FROM fiduciario_contenedor WHERE DATEDIFF(NOW(),fecha_retiro) > $gIAParametros[dias_para_solicitar_reembolso_fiduciario] |
| 180 | AND fiduciario_reembolso_id IS NULL |
| 181 | AND DATEDIFF(NOW(),solicitud_reembolso_fecha) > $gIAParametros[dias_despues_solicitar_reembolso] |
| 182 | AND monto_reembolsado = 0 |
| 183 | AND monto_cancelado = 0 )"; |
| 184 | |
| 185 | //Expirados con más de 175 días con solicitud de reembolso de hace más de 3 días. |
| 186 | $sql13 = "SELECT COUNT(fecha_retiro) FROM fiduciario_contenedor |
| 187 | WHERE DATEDIFF(NOW(),fecha_retiro) > $gIAParametros[dias_para_solicitar_reembolso_fiduciario] |
| 188 | AND fiduciario_reembolso_id IS NULL |
| 189 | AND DATEDIFF(NOW(),solicitud_reembolso_fecha) > $gIAParametros[dias_despues_solicitar_reembolso] |
| 190 | AND monto_reembolsado = 0 |
| 191 | AND monto_cancelado = 0 "; |
| 192 | |
| 193 | //Expirados con más de 178 días sin solicitud de reembolso. |
| 194 | $sql14 = "SELECT COUNT(fiduciario_id) FROM fiduciario_contenedor WHERE DATEDIFF(NOW(),fecha_retiro) > $gIAParametros[dias_para_flashear_tab_fiduciario] |
| 195 | AND fiduciario_reembolso_id IS NULL AND solicitud_reembolso_fecha IS NULL |
| 196 | AND monto_reembolsado = 0 |
| 197 | AND monto_cancelado = 0"; |
| 198 | |
| 199 | |
| 200 | $FidExp = ia_singleread($sql1); |
| 201 | $FidExpSol = ia_singleread($sql2); |
| 202 | $FidExpUrg = ia_singleread($sql3); |
| 203 | $FidBloq = ia_singleread($sql4); |
| 204 | $FidErr = ia_singleread($sql5); |
| 205 | $FidCap = ia_singleread($sql6); |
| 206 | |
| 207 | $FidContBloq = ia_singleread($sql7); |
| 208 | $FidContErr = ia_singleread($sql8); |
| 209 | $FidContExp = ia_singleread($sql10); |
| 210 | $FidContExpSol = ia_singleread($sql11); |
| 211 | $FidContExpUrg = ia_singleread($sql14); |
| 212 | |
| 213 | $FidExpSolUrg = ia_singleread($sql12); |
| 214 | $FidContExpSolUrg = ia_singleread($sql13); |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | $sql = array(); |
| 222 | |
| 223 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidExp, 'expirados_sin_solicitud', 'fiduciario') ON DUPLICATE KEY UPDATE valor=$FidExp"; |
| 224 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidExpSol, 'expirados_con_solicitud', 'fiduciario') ON DUPLICATE KEY UPDATE valor=$FidExpSol"; |
| 225 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidExpUrg, 'expirados_urgentes', 'fiduciario') ON DUPLICATE KEY UPDATE valor=$FidExpUrg"; |
| 226 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidBloq, 'bloqueado', 'fiduciario') ON DUPLICATE KEY UPDATE valor=$FidBloq"; |
| 227 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidErr, 'error', 'fiduciario') ON DUPLICATE KEY UPDATE valor=$FidErr"; |
| 228 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidCap, 'capturado', 'fiduciario') ON DUPLICATE KEY UPDATE valor=$FidCap"; |
| 229 | |
| 230 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidContBloq, 'bloqueado', 'fiduciario_contenedor') ON DUPLICATE KEY UPDATE valor=$FidContBloq"; |
| 231 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidContErr, 'error', 'fiduciario_contenedor') ON DUPLICATE KEY UPDATE valor=$FidContErr"; |
| 232 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidContExp, 'expirados_sin_solicitud', 'fiduciario_contenedor') ON DUPLICATE KEY UPDATE valor=$FidContExp"; |
| 233 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidContExpSol, 'expirados_con_solicitud', 'fiduciario_contenedor') ON DUPLICATE KEY UPDATE valor=$FidContExpSol"; |
| 234 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidExpSolUrg, 'expirados_con_solicitud_urge', 'fiduciario') ON DUPLICATE KEY UPDATE valor=$FidExpSolUrg"; |
| 235 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidContExpSolUrg, 'expirados_con_solicitud_urge', 'fiduciario_contenedor') ON DUPLICATE KEY UPDATE valor=$FidContExpSolUrg"; |
| 236 | $sql[] = "INSERT INTO campos_exists (campo_id, valor, tabla_exists, tabla_origen) VALUES(1, $FidContExpUrg, 'expirados_urgentes', 'fiduciario_contenedor') ON DUPLICATE KEY UPDATE valor=$FidContExpUrg"; |
| 237 | |
| 238 | /** |
| 239 | $myFile = "actualizaFiduciariosAtrasados.txt"; |
| 240 | $fh = fopen($myFile, 'w') or die("can't open file"); |
| 241 | $bleh = "<pre>".print_r($sql, true)."</pre>"; |
| 242 | fwrite($fh, $bleh); |
| 243 | fclose($fh); |
| 244 | **/ |
| 245 | ia_transaction($sql); |
| 246 | } |
| 247 | |
| 248 | function bloqueaFiduciarioContenedores($do='SI') |
| 249 | { |
| 250 | global $gIAParametros; |
| 251 | $sql=array(); |
| 252 | $ahora = new DateTime(); |
| 253 | $ahora->modify("-".$gIAParametros['tiempo_para_bloquear_contenedor_fiduciario']." hours"); |
| 254 | $fechaCapturados=$ahora->format('Y-m-d H:i:s'); |
| 255 | $sql[]="UPDATE fiduciario_contenedor SET puede_borrar='No' WHERE |
| 256 | (fecha_capturado IS NOT NULL AND puede_borrar='Si' AND fecha_capturado<'$fechaCapturados') OR |
| 257 | (fecha_capturado IS NULL AND puede_borrar='Si' AND numero_contenedor<>'' AND monto_garantia > 0 AND alta_db<'$fechaCapturados')"; |
| 258 | if($do=='SI') |
| 259 | { |
| 260 | if(ia_transaction($sql)) |
| 261 | ia_errores_a_dime(); |
| 262 | return true; |
| 263 | } |
| 264 | else |
| 265 | return $sql; |
| 266 | } |
| 267 | |
| 268 | function statusFiduciario($sF='',$sFC='',$cCM=0,$cualCambia='fiduciario') |
| 269 | { |
| 270 | $matriz = array( |
| 271 | 'fiduciario'=> |
| 272 | array( |
| 273 | 'ABIERTO' =>array('ABIERTO'=>'ABIERTO', 'CERRADO'=>'CERRADO', 'MODIFICADO'=>'MODIFICADO'), |
| 274 | 'CERRADO' =>array('ABIERTO'=>'ABIERTO', 'CERRADO'=>'CERRADO', 'MODIFICADO'=>'MODIFICADO'), |
| 275 | 'MODIFICADO'=>array('ABIERTO'=>'ABIERTO', 'CERRADO'=>'CERRADO', 'MODIFICADO'=>'MODIFICADO'), |
| 276 | 'AMBOSMOD' =>array('ABIERTO'=>array('ABIERTO','CONTMOD'), 'CERRADO'=>array('CERRADO','CONTMOD'), 'MODIFICADO'=>array('MODIFICADO','AMBOSMOD')), |
| 277 | 'CONTMOD' =>array('ABIERTO'=>array('ABIERTO','CONTMOD'), 'CERRADO'=>array('CERRADO','CONTMOD'), 'MODIFICADO'=>array('MODIFICADO','AMBOSMOD')) |
| 278 | ), |
| 279 | 'fiduciario_contenedor'=> |
| 280 | array( |
| 281 | 'ABIERTO' =>array('ABIERTO'=>'ABIERTO', 'CERRADO'=>'ABIERTO', 'MODIFICADO'=>'CONTMOD'), |
| 282 | 'CERRADO' =>array('ABIERTO'=>'CERRADO', 'CERRADO'=>'CERRADO', 'MODIFICADO'=>'CONTMOD'), |
| 283 | 'MODIFICADO'=>array('ABIERTO'=>'MODIFICADO', 'CERRADO'=>'MODIFICADO', 'MODIFICADO'=>'AMBOSMOD'), |
| 284 | 'AMBOSMOD' =>array('ABIERTO'=>array('MODIFICADO','AMBOSMOD'),'CERRADO'=>array('MODIFICADO','AMBOSMOD'),'MODIFICADO'=>'AMBOSMOD'), |
| 285 | 'CONTMOD' =>array('ABIERTO'=>array('ABIERTO','CONTMOD'), 'CERRADO'=>array('ABIERTO','CONTMOD'), 'MODIFICADO'=>'CONTMOD') |
| 286 | ) |
| 287 | ); |
| 288 | |
| 289 | |
| 290 | if($cCM > 0) |
| 291 | $cCM = 1; |
| 292 | else |
| 293 | $cCM = 0; |
| 294 | |
| 295 | /** |
| 296 | echo "<br/>sF:$sF"; |
| 297 | echo "<br/>sFC:$sFC"; |
| 298 | echo "<br/>cCM:$cCM"; |
| 299 | echo "<br/>cualCambia:$cualCambia"; |
| 300 | **/ |
| 301 | |
| 302 | //El segundo valor es error $sF porque quiere decir que mandaron datos erroneos. |
| 303 | $status = array_key_exists($sF,$matriz[$cualCambia]) && array_key_exists($sFC,$matriz[$cualCambia][$sF]) ? $matriz[$cualCambia][$sF][$sFC] : $sF; |
| 304 | |
| 305 | $status = is_array($status) ? $matriz[$cualCambia][$sF][$sFC][$cCM] : $status; |
| 306 | |
| 307 | return $status; |
| 308 | } |