while ($MX = ibase_fetch_row($ent1)) { if ($S[3] == $MX[3] and $S[0] == $MX[0]) { $mex = 1; } } //CONECTA LEON $conn2 = Connectgto(); $sql2 = "SELECT MINVE03.CVE_ART, MINVE03.CVE_CPTO, MINVE03.FECHA_DOCU,MINVE03.REFER, SUM(MINVE03.CANT) AS CANTIDAD FROM MINVE03 WHERE MINVE03.CVE_CPTO = 7 AND ((MINVE03.FECHA_DOCU)>='{$fecha}') and ((MINVE03.FECHA_DOCU)<='{$fechaf}') and MINVE03.CVE_ART='{$clave}' GROUP BY MINVE03.CVE_ART, MINVE03.CVE_CPTO,MINVE03.FECHA_DOCU,MINVE03.REFER ORDER BY MINVE03.REFER, MINVE03.CVE_ART, MINVE03.FECHA_DOCU ASC "; $ent2 = ibase_query($conn2, $sql2); while ($GTO = ibase_fetch_row($ent2)) { if ($S[3] == $GTO[3] and $S[0] == $GTO[0]) { $gto = 1; } } //CONECTA GUADALAJARA $conn3 = Connectgdl(); $sql3 = "SELECT MINVE03.CVE_ART, MINVE03.CVE_CPTO, MINVE03.FECHA_DOCU,MINVE03.REFER, SUM(MINVE03.CANT) AS CANTIDAD FROM MINVE03 WHERE MINVE03.CVE_CPTO = 7 AND ((MINVE03.FECHA_DOCU)>='{$fecha}') and ((MINVE03.FECHA_DOCU)<='{$fechaf}') and MINVE03.CVE_ART='{$clave}' GROUP BY MINVE03.CVE_ART, MINVE03.CVE_CPTO,MINVE03.FECHA_DOCU,MINVE03.REFER ORDER BY MINVE03.REFER, MINVE03.CVE_ART, MINVE03.FECHA_DOCU ASC "; $ent3 = ibase_query($conn3, $sql3); while ($GDL = ibase_fetch_row($ent3)) { if ($S[3] == $GDL[3] and $S[0] == $GDL[0]) { $gdl = 1; } } //CONECTA MONTERREY $conn4 = Connectmty(); $sql4 = "SELECT MINVE03.CVE_ART, MINVE03.CVE_CPTO, MINVE03.FECHA_DOCU,MINVE03.REFER, SUM(MINVE03.CANT) AS CANTIDAD FROM MINVE03 WHERE MINVE03.CVE_CPTO = 7 AND ((MINVE03.FECHA_DOCU)>='{$fecha}') and ((MINVE03.FECHA_DOCU)<='{$fechaf}') and MINVE03.CVE_ART='{$clave}' GROUP BY MINVE03.CVE_ART, MINVE03.CVE_CPTO,MINVE03.FECHA_DOCU,MINVE03.REFER ORDER BY MINVE03.REFER, MINVE03.CVE_ART, MINVE03.FECHA_DOCU ASC "; $ent4 = ibase_query($conn4, $sql4); while ($MTY = ibase_fetch_row($ent4)) { if ($S[3] == $MTY[3] and $S[0] == $MTY[0]) { $mty = 1; }
$restacant = 0; $numId = 0; $idArray = 0; $num = 0; include "conex.php"; while ($num_suc <= 10) { if ($num_suc == 0) { $conn = Connectmex(); $ABR = 'MEX'; } if ($num_suc == 1) { $conn = Connectgto(); $ABR = 'GTO'; } if ($num_suc == 2) { $conn = Connectgdl(); $ABR = 'GDL'; } if ($num_suc == 3) { $conn = Connectmty(); $ABR = 'MTY'; } if ($num_suc == 4) { $conn = Connectpue(); $ABR = 'PUE'; } if ($num_suc == 5) { $conn = Connectver(); $ABR = 'VER'; } if ($num_suc == 6) {
<td class="contentfac" align="right">Ult. Mov. de respaldo : <?php echo "{$suc2}"; ?> </td> <td class="contentfac" align="left"> <?php if ($suc2 == 'MEXICO') { $conn2 = Connectmex(); $ABR2 = 'MEX'; } if ($suc2 == 'LEON') { $conn2 = Connectgto(); $ABR2 = 'GTO'; } if ($suc2 == 'GUADALAJARA') { $conn2 = Connectgdl(); $ABR2 = 'GDL'; } if ($suc2 == 'MONTERREY') { $conn2 = Connectmty(); $ABR2 = 'MTY'; } if ($suc2 == 'PUEBLA') { $conn2 = Connectpue(); $ABR2 = 'PUE'; } if ($suc2 == 'VERACRUZ') { $conn2 = Connectver(); $ABR2 = 'VER'; } if ($suc2 == 'CANCUN') {