if(isset($_GET['mes'])){
switch($_GET['mes']){
case '01': $mes = "ENERO";
break;
case '02': $mes = "FEBRERO";
break;
case '03': $mes = "MARZO";
break;
case '04': $mes = "ABRIL";
break;
case '05': $mes = "MAYO";
break;
case '06': $mes = "JUNIO";
break;
case '07': $mes = "JULIO";
break;
case '08': $mes = "AGOSTO";
break;
case '09': $mes = "SEPTIEMBRE";
break;
case '10': $mes = "OCTUBRE";
break;
case '11': $mes = "NOVIEMBRE";
break;
case '12': $mes = "DICIEMBRE";
break;
}
} else { $mes = "OCTUBRE"; }
?>
INGRESOS echo $mes; ?> 2018
Actualizar
Hermes
Movil Jaguar
Sucursal |
Empleados |
Clientes |
% |
$row = sqlsrv_fetch_array($result);
$total_CTS = $row['MZ_CTS'] + $row['LZ_CTS'] + $row['MX_CTS'] + $row['VE_CTS'];
$total_MONTO = $row['MZ_MONTO'] + $row['LZ_MONTO'] + $row['MX_MONTO'] + $row['VE_MONTO'];
if($row['MZ_CTS'] == 0 || $row['LZ_CTS'] == 0 || $row['MX_CTS'] || $row['VE_CTS'] == 0){
$prom_mz = 0;
$prom_lz = 0;
$prom_mx = 0;
$prom_ve = 0;
} else {
$prom_mz = number_format((float)$row['MZ_MONTO']/$row['MZ_CTS'], 2, '.', '');
$prom_lz = number_format((float)$row['LZ_MONTO']/$row['LZ_CTS'], 2, '.', '');
$prom_mx = number_format((float)$row['MX_MONTO']/$row['MX_CTS'], 2, '.', '');
$prom_ve = number_format((float)$row['VE_MONTO']/$row['VE_CTS'], 2, '.', '');
}
$promedio_mz = number_format($prom_mz);
$promedio_lz = number_format($prom_lz);
$promedio_mx = number_format($prom_mx);
$promedio_ve = number_format($prom_ve);
if($total_CTS > 0){
$promedio_total = number_format($total_MONTO/$total_CTS);
}
if($total_MONTO > 0){
$porcent_mz = ($row["MZ_MONTO"]/$total_MONTO)*100;
$porcent_mz = number_format((float)$porcent_mz, 2, '.', '');
$porcent_mx = ($row["MX_MONTO"]/$total_MONTO)*100;
$porcent_mx = number_format((float)$porcent_mx, 2, '.', '');
$porcent_lz = ($row["LZ_MONTO"]/$total_MONTO)*100;
$porcent_lz = number_format((float)$porcent_lz, 2, '.', '');
$porcent_ve = ($row["VE_MONTO"]/$total_MONTO)*100;
$porcent_ve = number_format((float)$porcent_ve, 2, '.', '');
} else {
$porcent_mz = "Sin Operaciones por el momento 0";
$porcent_lz = "Sin Operaciones por el momento 0";
$porcent_mx = "Sin Operaciones por el momento 0";
$porcent_ve = "Sin Operaciones por el momento 0";
}
$promemp_mz = number_format($row["MZ_MONTO"]/46);
$promemp_lz = number_format($row["LZ_MONTO"]/8);
$promemp_mx = number_format($row["MX_MONTO"]/11);
$promemp_ve = number_format($row["VE_MONTO"]/7);
$total_promemp = number_format($total_MONTO/72);
$row['MZ_MONTO'] = number_format($row['MZ_MONTO']);
$row['LZ_MONTO'] = number_format($row['LZ_MONTO']);
$row['MX_MONTO'] = number_format($row['MX_MONTO']);
$row['VE_MONTO'] = number_format($row['VE_MONTO']);
$total_MONTO = number_format($total_MONTO);
echo "".
"Manzanillo | ".
"48 | ".
"".$row['MZ_CTS']." | ".
"".$porcent_mz." % | ".
"
";
echo "".
"Lázaro Cárdenas | ".
"7 | ".
"".$row['LZ_CTS']." | ".
"".$porcent_lz." % | ".
"
";
echo "".
"México | ".
"11 | ".
"".$row['MX_CTS']." | ".
"".$porcent_mx." % | ".
"
";
echo "".
"Veracruz | ".
"7 | ".
"".$row['VE_CTS']." | ".
"".$porcent_ve." % | ".
"
";
$total_porcent = $porcent_mz+$porcent_lz+$porcent_mx+$porcent_ve;
echo "".
"Total | ".
"72 | ".
"".$total_CTS." | ".
"".$total_porcent." % | ".
"
";
sqlsrv_free_stmt($result);
sqlsrv_close($con_comercial);
?>
No. de Clientes
Porcentaje de Participación