?> "> <td><?php echo $i++; ?> </td> <td><?php echo $l['empleado']; ?> </td> <td><?php echo $l['puesto']; ?> </td> <td><?php echo $util->cambiaFFecha($l['h_ent'], "d-m-Y H:s"); ?> </td> <td><?php echo $util->cambiaFFecha($l['h_sal'], "d-m-Y H:s"); ?> </td> <td style="width: 10%"> <button class="btn btn-primary" onclick="modalChangeAsistencia(<?php echo $l['id']; ?> ,1)"><i class="fa fa-clock-o"></i></button> <button class="btn btn-warning" onclick="modalChangeAsistencia(<?php echo $l['id']; ?> ,2)"><i class="fa fa-clock-o"></i></button>
?> " /> <!--tabla --> <table class="table" style="text-transform: uppercase"> <thead> <tr> <th>#</th> <th>Empleado</th> <th><center>hrs</center></th> <th>Sueldo</th> <th>Reporte</th> </tr> </thead> <tbody> <?php $lista = $nomina->generaNomina($util->cambiaFFecha($_POST['inicio'], "Y-m-d"), $util->cambiaFFecha($_POST['fin'], "Y-m-d")); $i = 1; while ($l = $lista->fetch()) { //calcula el sueldo en base a las hrs trabajadas $deis = $nomina->getJustificacionesEmp($util->cambiaFFecha($_POST['inicio'], "Y-m-d"), $util->cambiaFFecha($_POST['inicio'], "Y-m-d"), $l['id']); $hs = $_POST['dias'] * $l['hrs_trabj']; if ($l['hrs'] + $l['hrs_trabj'] * $deis['num'] >= $hs) { $sueldo = $l['salario']; } else { $sueldo = $l['hrs'] * $l['salario'] / $hs; } $sueldo = round($sueldo, 0); $inh = intval($l['hrs']); $min = 60 * ($l['hrs'] - $inh); $min = round($min, 0); if ($min < 10) {
</div> <div class="col-md-4"> <label>Nombre</label> <input class="form-control" name="nombre" value="<?php echo $em['nombres']; ?> " /> </div> </div> </div> <div class="row"> <div class="form-group"> <div class="col-md-4"> <label>Fecha de Nacimiento</label> <input id="fechaNac" name="fechaNac" class="form-control datepicker" value="<?php echo $util->cambiaFFecha($em['fecha_nacto'], "d-m-Y"); ?> " /> </div> <div class="col-md-4"> <label>Sexo</label> <br /> <label class="radio-inline"> <input type="radio" <?php if ($em['sexo'] == 1) { echo "checked"; } ?> name="sexo" id="inlineRadio1" value="1"> Masculino </label> <label class="radio-inline">
<?php include_once "../controller/cUtilerias.php"; include_once "../controller/cAsistencias.php"; $util = new cUtilerias(); $asit = new cAsistencias(); $asit->modificaAsistencia($util->cambiaFFecha($_POST['fecha'], "Y-m-d H:i"), $_POST['tipo'], $_POST['asiento']);
<?php require '../fpdf/fpdf.php'; include_once "../controller/cUtilerias.php"; include_once "../controller/cEmpleados.php"; include_once "../controller/cAsistencias.php"; $asistencia = new cAsistencias(); $emp = new cEmpleados(); $util = new cUtilerias(); $emple = $emp->devuelveEmpleado($_GET['id']); $lista = $asistencia->listaAsistenciasEmpleado($util->cambiaFFecha($_GET['inicio'], "Y-m-d"), $util->cambiaFFecha($_GET['fin'], "Y-m-d"), $_GET['id']); class PDF extends FPDF { //header function Header() { $this->Image('../img/logo.png', 37, 6, 130); $this->Ln(20); } //footer function Footer() { $this->SetY(-15); $this->SetFont('Arial', 'I', 8); $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C'); } } $pdf = new PDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 14);
<?php include_once "../controller/cAsistencias.php"; include_once "../controller/cUtilerias.php"; $asis = new cAsistencias(); $util = new cUtilerias(); $asis->justificaD($util->cambiaFFecha($_POST['dia'], "Y-m-d"), $_POST['idemp']); echo "SE HA JUSTIFICADO EL DIA " . $_POST['dia'];