Deprecated: strripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/prod/gestion_estudiantes/library-adaptada-a-php7/Zend/View/Helper/BaseUrl.php on line 110
Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/prod/gestion_estudiantes/library-adaptada-a-php7/Zend/View/Helper/BaseUrl.php on line 72
Deprecated: Zend_Validate_EmailAddress::setHostnameValidator(): Implicitly marking parameter $hostnameValidator as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/library-adaptada-a-php7/Zend/Validate/EmailAddress.php on line 246
Deprecated: EspejadoTablaSedes::getPrueba(): Implicitly marking parameter $params as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/api/models/EspejadoTablaSedes.php on line 28
Deprecated: EspejadoTablaSedes::identificarDiferencias(): Implicitly marking parameter $checksumEnGestionEstudiantes as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/api/models/EspejadoTablaSedes.php on line 97
Deprecated: EspejadoTablaSedes::identificarDiferencias(): Implicitly marking parameter $checksumEnAdmin as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/api/models/EspejadoTablaSedes.php on line 97
Deprecated: SedeCursoxanioAlumnoColeccion::_prepararEVAsCursoDestino(): Implicitly marking parameter $mapaDestino as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/admin/models/SedeCursoxanioAlumnoColeccion.php on line 1410
Deprecated: CuentaCorrienteColeccion::getSaldoYDatosAlumno(): Implicitly marking parameter $wheres as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/cuentacorriente/models/CuentaCorrienteColeccion.php on line 697
Deprecated: CuentaCorrienteColeccion::getItemsFacturados(): Implicitly marking parameter $wheres as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/cuentacorriente/models/CuentaCorrienteColeccion.php on line 756
Deprecated: CuentaCorrienteColeccion::getDeudasDelAlumnoOLD(): Implicitly marking parameter $evscxaIdsPrioritarios as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/cuentacorriente/models/CuentaCorrienteColeccion.php on line 1486
Deprecated: MotivoCuentaCorriente::motivo(): Implicitly marking parameter $formatos as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/cuentacorriente/logicalmodels/MotivoCuentaCorriente.php on line 123
Deprecated: FuncionesSobreEVAs::getAlumnosSaldos(): Implicitly marking parameter $filtrar as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/cuentacorriente/logicalmodels/FuncionesSobreEVAs.php on line 246
Deprecated: RegistradorDeMovimiento::__construct(): Implicitly marking parameter $FuncionesSobreEVAs as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/cuentacorriente/logicalmodels/operaciones/registradores/RegistradorDeMovimiento.php on line 50
@session_start();
function api_recibos($array){
$conexion=conexion();
if ($array['origen'] == 'AA')
include_once(__DOCROOT_ADMIN__."/function/principal.php");
include_once(__DOCROOT_ADMIN__."/function/enviar_correo.php");
$ruta_archivo=__DOCROOT_LOGS__."/pagos_".date('Y_m').".log";
$fp = fopen($ruta_archivo, "a+");
$dni=$array['dni'];
$correo=$array['email'];
$sede=$array['sede_id'];
if($sede == '')
$sede=0;
$usuario=$array['usuario'];
$origen=$array['origen'];
$envio_recibo=$array['envio_recibo'];
$pagos=$array['pagos'];
if($origen == 'AA'){
$monto=$array['monto'];
$total_pagos=$array['total_pagos'];
}
// sacamos nombre y apellido
$sQuery="SELECT apellido, nombre FROM personas WHERE dni='$dni'";
$res = $conexion->query($sQuery);
while($r = $res->fetch_object()){
$apellido=$r->apellido;
$nombre=$r->nombre;
}
$apellidoynombre=$apellido.", ".$nombre;
// sacamos el codigo alfabetico de la sede de centro, email y direccion
$sQuery="SELECT codigo, email_sede, direccion FROM sedes_centros WHERE id_sede_centro='$sede'";
$res = $conexion->query($sQuery);
while($r = $res->fetch_object()){
$codigo=$r->codigo;
$email_sede=$r->email_sede;
$direccion=$r->direccion;
}
// sacamos el ultimo Num_recibo y el ultimo Num_sede
$Num_recibo=0;
$sQuery="SELECT Num_recibo FROM recibos ORDER BY Num_recibo DESC LIMIT 0,1";
$res = $conexion->query($sQuery);
while($r = $res->fetch_object()){
$Num_recibo=$r->Num_recibo;
}
$Num_recibo=$Num_recibo+1;
$Num_sede=0;
$sQuery="SELECT Num_sede FROM recibos WHERE id_sede_centro = '$sede' ORDER BY Num_recibo DESC LIMIT 0,1";
$res = $conexion->query($sQuery);
while($r = $res->fetch_object()){
$Num_sede=$r->Num_sede;
}
$Num_sede=$Num_sede+1;
// formato de numero para el recibo
$len=strlen($Num_recibo);
$hasta=6-$len;
for ($i=0; $i < $hasta; $i++){
$Num_recibo="0".$Num_recibo;
}
$len=strlen($Num_sede);
$hasta=5-$len;
for ($i=0; $i < $hasta; $i++){
$Num_sede="0".$Num_sede;
}
$numero_recibo=$codigo." ".$Num_sede." ".$Num_recibo;
// armado del html
$archivo_html=__DOCROOT_ADMIN__.'/html/recibos.html' ;
$maqueta = file_get_contents($archivo_html);
$maqueta = reemplazar_discernible_uno("","", $maqueta);
$maqueta = reemplazar_discernible_uno("~src_logo_recibos"," src='".__HOST_WEB__."/imagenes/recibos-online-logoedyn.png'", $maqueta);
$maqueta = reemplazar_discernible_uno("~src_fondo_recibos"," src='".__HOST_WEB__."/imagenes/recibos-online-gracias.png'", $maqueta);
$fecha=date("d/m/y");
$maqueta = reemplazar_discernible_uno("",$fecha, $maqueta);
$maqueta = reemplazar_discernible_uno("",$apellidoynombre, $maqueta);
$maqueta = reemplazar_discernible_uno("",$numero_recibo, $maqueta);
$maqueta = reemplazar_discernible_uno("",$email_sede, $maqueta);
$maqueta = reemplazar_discernible_uno("",$direccion, $maqueta);
$discernible_abre = "";
$discernible_cierra = "";
$lista_conceptos = leer_entre_discernibles($discernible_abre, $discernible_cierra, $maqueta);
$lista_final='';
$total=0;
foreach($pagos as $item_pagos ){
$total=$total+$item_pagos['pago_ahora'];
$aux_lista = $lista_conceptos;
$aux_lista = reemplazar_discernible_uno('',$item_pagos['descripcion'], $aux_lista);
$aux_lista = reemplazar_discernible_uno('',$item_pagos['pago_ahora'], $aux_lista);
$lista_final .= $aux_lista;
$fecha_recibo=date("Y-m-d H:i:s");
$sQuery="INSERT INTO `recibos`
(`Num_recibo`, `Num_sede`, `id_sede_centro`, `fecha`, `dni`, `codigo`, `descripcion`, `parcial`, `usuario`, `envio_recibo`, `origen`)
VALUES ('$Num_recibo', '$Num_sede', '$sede', '$fecha_recibo', '$dni', '".$item_pagos['id']."', '".$item_pagos['descripcion']."', '".$item_pagos['pago_ahora']."', '$usuario', '$envio_recibo', '$origen')";
$conexion->query($sQuery);
if(($origen == 'AC' || $origen == 'AE')&& $item_pagos['pago_ahora'] > 0){
// si es AC sacamos la sede
if($origen == 'AC'){
$idsedecentro=$_SESSION['idsedecentro'];
$sQuery="SELECT id_padre FROM sedes_centros WHERE id_sede_centro='$idsedecentro'";
$res = $conexion->query($sQuery);
while($r = $res->fetch_object()){
$id_padre=$r->id_padre;
}
$sQuery="SELECT id_sede_centro FROM sedes_centros WHERE id_sede_centro='$id_padre'";
$res = $conexion->query($sQuery);
while($r = $res->fetch_object()){
$codigosede=$r->id_sede_centro;
}
if( !isset( $codigosede ) || $codigosede == '' ) {
$codigosede='NULL' ;
}
}else{
$codigosede=$sede;
}
$sQuery="INSERT INTO `pagos`
(`dni`, `id`, `valor`, `comentario`, `usuario`, `numero_recibo`,`sede`)
VALUES
('$dni', '".$item_pagos['id']."', '".$item_pagos['pago_ahora']."', '".$item_pagos['descripcion']."', '$usuario','$numero_recibo',$codigosede);";
$conexion->query($sQuery);
}
fwrite($fp,date("Y-m-d H:i:s")." ".$numero_recibo." - DNI ".$dni." - Cod.Gestion ".$item_pagos['id']." - Descr. ".$item_pagos['descripcion']." - $".$item_pagos['pago_ahora']." - Usuario ".$usuario." - origen ".$origen." - ".$correo." - envio: ".$envio_recibo."\n");
}
if($origen == 'AA' && $monto > $total_pagos){
$diferencia=$monto - $total_pagos;
$aux_lista = $lista_conceptos;
$aux_lista = reemplazar_discernible_uno('','A cuenta', $aux_lista);
$aux_lista = reemplazar_discernible_uno('',$diferencia, $aux_lista);
$lista_final .= $aux_lista;
$total=$total+$diferencia;
$sQuery="INSERT INTO `recibos`
(`Num_recibo`, `Num_sede`, `id_sede_centro`, `fecha`, `dni`, `codigo`, `descripcion`, `parcial`, `usuario`, `envio_recibo`, `origen`)
VALUES ('$Num_recibo', '$Num_sede', '$sede', '$fecha_recibo', '$dni', '0', 'A cuenta', '".$diferencia."', '$usuario', '$envio_recibo', '$origen')";
$conexion->query($sQuery);
fwrite($fp,date("Y-m-d H:i:s")." ".$numero_recibo." - DNI ".$dni." - Cod.Gestion - Descr. A cuenta. - $".$diferencia." - Usuario ".$usuario." - origen ".$origen." - ".$correo." - envio: ".$envio_recibo."\n");
}
$maqueta = reemplazar_discernible($discernible_abre, $discernible_cierra, $lista_final, $maqueta);
$maqueta = reemplazar_discernible_uno("",$total, $maqueta);
fwrite($fp,date("Y-m-d H:i:s")." ".$maqueta."\n");
if($envio_recibo == 1 && ($correo != '' || $email_sede != '')){
$asunto="Recibo Escuela de Natha Yoga";
if($email_sede == "laplata@escueladenathayoga.com.ar")
$email_sede='';
if( !enviar_correo($correo,$email_sede,$asunto, $maqueta) ) {
if($origen == 'AC')
echo "No se pudo enviar correo. " ;
}
}
return $numero_recibo;
}
?>
Deprecated: ContableColeccion::getEVAsDetallado(): Implicitly marking parameter $filtrar as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/cuentacorriente/models/ContableColeccion.php on line 167
Deprecated: AsistenciaMensualCursoxanioColeccion::_wheres(): Implicitly marking parameter $params as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/admin/models/AsistenciaMensualCursoxanioColeccion.php on line 149
Deprecated: ViewSedeCurso::getSedeCursos(): Implicitly marking parameter $wheres as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/application/modules/admin/models/ViewSedeCurso.php on line 76
Deprecated: Return type of Zend_Db_Table_Rowset_Abstract::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/prod/gestion_estudiantes/library-adaptada-a-php7/Zend/Db/Table/Rowset/Abstract.php on line 243
Deprecated: Zend_Db_Table_Row_Abstract::setTable(): Implicitly marking parameter $table as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/library-adaptada-a-php7/Zend/Db/Table/Row/Abstract.php on line 336
Deprecated: Zend_Db_Table_Row_Abstract::findDependentRowset(): Implicitly marking parameter $select as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/library-adaptada-a-php7/Zend/Db/Table/Row/Abstract.php on line 879
Deprecated: Zend_Db_Table_Row_Abstract::findParentRow(): Implicitly marking parameter $select as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/library-adaptada-a-php7/Zend/Db/Table/Row/Abstract.php on line 935
Deprecated: Zend_Db_Table_Row_Abstract::findManyToManyRowset(): Implicitly marking parameter $select as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/prod/gestion_estudiantes/library-adaptada-a-php7/Zend/Db/Table/Row/Abstract.php on line 1002
Resultado: Ok :)