<th>Nombre</th> <th>Fecha</th> <th>Hora</th> <th>Descuento</th> </tr> </thead> <tbody> <?php if ($x == 1) { $cPag = reporteQuin($idUsuario); } if ($x == 2) { $cPag = reporteMen($idUsuario); } if ($x == 3) { $cPag = gTReporte($fIni, $fFin, $idUsuario); } ?> </tbody> </table> <br>Observaciones<br> <textarea class='tAReporte'></textarea> <?php //echo "<br>".$cPag; ?> </main> </div> </section> <div class='cpReporte'> <button onclick='window.print()' class='pReporte'> <i class='fa fa-print' aria-hidden='true'></i>
function reporteMen($idUsuario) { $fIni = date('Y-m-d', strtotime('-1month', strtotime(date('Y-m-01')))); $anio = substr($fIni, 0, 4); $mes = substr($fIni, 5, 2); $dia = date("d", mktime(0, 0, 0, $mes + 1, 1, $anio) - 1); $fFin = date("{$anio}-{$mes}-{$dia}"); gRango($fIni, $fFin); $cPag = gTReporte($fIni, $fFin, $idUsuario); return $cPag; }