-
This commit is contained in:
@@ -2966,6 +2966,7 @@ Public Class ClsBancos
|
|||||||
SqlAdapter.SelectCommand.Parameters.Add("@CveCredito", SqlDbType.Int).Value = CveCredito
|
SqlAdapter.SelectCommand.Parameters.Add("@CveCredito", SqlDbType.Int).Value = CveCredito
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch Ex1 As SqlException
|
Catch Ex1 As SqlException
|
||||||
|
|||||||
@@ -8079,7 +8079,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("existe una diferencia de más de 0.05 entre el IVA de la compra y los detalles.", TipoMensaje.MsgAdvertencia)
|
Alert($"existe una diferencia de {DiferenciaIVas} entre el IVA de la compra y los detalles.", TipoMensaje.MsgAdvertencia)
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -8166,7 +8166,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("existe una diferencia de más de 0.05 entre el RetIVA de la compra y los detalles.", TipoMensaje.MsgAdvertencia)
|
Alert($"existe una diferencia de {DiferenciaRetIVA} entre el RetIVA de la compra y los detalles.", TipoMensaje.MsgAdvertencia)
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -8256,7 +8256,7 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("existe una diferencia de más de 0.05 entre el RetISR de la compra y los detalles.", TipoMensaje.MsgAdvertencia)
|
Alert($"existe una diferencia de {DiferenciaRetISR} entre el RetISR de la compra y los detalles.", TipoMensaje.MsgAdvertencia)
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -1370,9 +1370,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
|
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
|
||||||
|
|
||||||
if (Msg != null && Msg.Length > 0)
|
if (Msg != null && Msg.Length > 0)
|
||||||
{
|
{
|
||||||
Msg = msgCorregidoSat(Msg, CvePersonal, RFC, CURP);
|
msggral = string.Format("{0}<tr><td>{3}</td><td>{2}</td><td><pre>{4}</pre><span style='display:none'>{1}</span></td></tr>", msggral, Msg, gvRow.DataKey("Nombre"), gvRow.DataKey("Codigo"), msgCorregidoSat(Msg, CvePersonal, RFC, CURP));
|
||||||
msggral = string.Format("{0}<tr><td>{3}</td><td>{2}</td><td><pre>{1}</pre></td></tr>", msggral, Msg, gvRow.DataKey("Nombre"), gvRow.DataKey("Codigo"));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1550,7 +1549,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
Alert(string.Format("se envio el correo a '{0}'.", Correo), TipoMensaje.MsgInformacion);
|
Alert(string.Format("se envio el correo a '{0}'.", Correo), TipoMensaje.MsgInformacion);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1559,7 +1557,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
Alert("No se tiene un correo registrado.", TipoMensaje.MsgAdvertencia);
|
Alert("No se tiene un correo registrado.", TipoMensaje.MsgAdvertencia);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1628,6 +1625,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
DataRow drow;
|
DataRow drow;
|
||||||
string Correo = string.Empty;
|
string Correo = string.Empty;
|
||||||
string NombreCompleto = string.Empty;
|
string NombreCompleto = string.Empty;
|
||||||
|
string RFC = string.Empty;
|
||||||
|
string CURP = string.Empty;
|
||||||
using (ClsRH objrh = new ClsRH())
|
using (ClsRH objrh = new ClsRH())
|
||||||
{
|
{
|
||||||
objrh.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa);
|
objrh.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa);
|
||||||
@@ -1637,12 +1636,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
Correo = drow["Correo"].ToString();
|
Correo = drow["Correo"].ToString();
|
||||||
NombreCompleto = drow["NombreCompleto"].ToString();
|
NombreCompleto = drow["NombreCompleto"].ToString();
|
||||||
|
RFC = drow["RFC"].ToString();
|
||||||
|
CURP = drow["CURP"].ToString();
|
||||||
}
|
}
|
||||||
string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4));
|
string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4));
|
||||||
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
|
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
|
||||||
|
|
||||||
if (Msg != null && Msg.Length > 0)
|
if (Msg != null && Msg.Length > 0)//<pre>{4}</pre><span style='display:none'>{1}</span>
|
||||||
{ Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{0}", Msg), TipoMensaje.MsgAdvertencia); }
|
{ Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{1}", Msg, msgCorregidoSat(Msg, CvePersonal, RFC, CURP)), TipoMensaje.MsgAdvertencia); }
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClsNominas ObjPeriodo = new ClsNominas();
|
ClsNominas ObjPeriodo = new ClsNominas();
|
||||||
|
|||||||
@@ -16,7 +16,10 @@ Partial Class PopUpSeleccionarEmpresa
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GetEmpresas()
|
Private Sub GetEmpresas()
|
||||||
|
|
||||||
|
|
||||||
|
GlobalDTUsuarios(-1, -1) = Nothing 'Esto es por los cambios de contaseña
|
||||||
Dim Dt As Data.DataTable = GlobalDTUsuarios(UsuarioActual.CveUsuario)
|
Dim Dt As Data.DataTable = GlobalDTUsuarios(UsuarioActual.CveUsuario)
|
||||||
|
|
||||||
If Dt IsNot Nothing Then
|
If Dt IsNot Nothing Then
|
||||||
@@ -87,7 +90,9 @@ Partial Class PopUpSeleccionarEmpresa
|
|||||||
RegistraScript("Ir3();")
|
RegistraScript("Ir3();")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
dt.Dispose()
|
dt.Dispose()
|
||||||
|
Else
|
||||||
|
Alert($"Usuario Nulo {gvr.DataKey("Usuario")} , {gvr.DataKey("Contraseña")}, {IMEI}, {gvr.DataKey("CveEmpresa").ToEntero}", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1385,6 +1385,7 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
|
||||||
GlobalDTUsuarios(CveEmpresa:=-1) = Nothing
|
GlobalDTUsuarios(CveEmpresa:=-1) = Nothing
|
||||||
|
|
||||||
|
|
||||||
'If ObjUsuarios.GetUsuariosEmpresas(-1, UsuarioActual.CveEmpresa) Then
|
'If ObjUsuarios.GetUsuariosEmpresas(-1, UsuarioActual.CveEmpresa) Then
|
||||||
' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados
|
' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados
|
||||||
' Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0")
|
' Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0")
|
||||||
|
|||||||
@@ -2750,7 +2750,7 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, ObjClientes.IniciaTransacSQL) Then
|
If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 1, ObjClientes.IniciaTransacSQL) Then
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3843,12 +3843,23 @@ Partial Class Clientes
|
|||||||
Public Sub BtnAgregaCuentaContable(sender As Object, e As EventArgs) Handles BtnActivaRegistroClientes.Click, BtnActivaRegistroAnticipos.Click, BtnActivaRegistroIVA.Click, BtnActivaRegistroISR.Click
|
Public Sub BtnAgregaCuentaContable(sender As Object, e As EventArgs) Handles BtnActivaRegistroClientes.Click, BtnActivaRegistroAnticipos.Click, BtnActivaRegistroIVA.Click, BtnActivaRegistroISR.Click
|
||||||
Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString()
|
Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString()
|
||||||
Dim Button = DirectCast(sender, Button)
|
Dim Button = DirectCast(sender, Button)
|
||||||
|
|
||||||
|
|
||||||
|
Dim CodigoCuentaAltaCompaq As String = ""
|
||||||
|
Dim NombreCuentaCuentaAltaCompaq As String = ""
|
||||||
|
Dim IdCuentaAltaCompaq As Integer = -1
|
||||||
|
|
||||||
|
|
||||||
Select Case CuentaContable
|
Select Case CuentaContable
|
||||||
Case "Clientes"
|
Case "Clientes"
|
||||||
AgregarCuentaContable(Button, DdlCtaContableClientes, "", "", -1)
|
AgregarCuentaContable(Button, DdlCtaContableClientes, "", "", -1)
|
||||||
Case "Anticipos"
|
Case "Anticipos"
|
||||||
AgregarCuentaContable(Button, DdlCtaContableAnticipos, "", "", -1)
|
|
||||||
|
AgregarCuentaContable(Button, DdlCtaContableAnticipos, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq)
|
||||||
|
AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 3)
|
||||||
|
|
||||||
Case "RetIVA"
|
Case "RetIVA"
|
||||||
|
|
||||||
AgregarCuentaContable(Button, DdlCtaContableRetIVA, "", "", -1)
|
AgregarCuentaContable(Button, DdlCtaContableRetIVA, "", "", -1)
|
||||||
Case "RetISR"
|
Case "RetISR"
|
||||||
AgregarCuentaContable(Button, DdlCtaContableRetISR, "", "", -1)
|
AgregarCuentaContable(Button, DdlCtaContableRetISR, "", "", -1)
|
||||||
@@ -3957,14 +3968,23 @@ Partial Class Clientes
|
|||||||
Return ProcesoCorrecto
|
Return ProcesoCorrecto
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, Transaccion As SqlTransaction) As Boolean
|
Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, CveConceptoContable As Integer, Optional Transaccion As SqlTransaction = Nothing) As Boolean
|
||||||
|
|
||||||
Dim ObjContabilidad As New ClsContabilidad(Transaccion)
|
|
||||||
Dim Respuesta As Boolean = False
|
Dim Respuesta As Boolean = False
|
||||||
|
Dim DisposeClases As Boolean = False
|
||||||
|
|
||||||
|
Dim ObjContabilidad As ClsContabilidad
|
||||||
|
|
||||||
|
If Transaccion Is Nothing Then
|
||||||
|
ObjContabilidad = New ClsContabilidad
|
||||||
|
DisposeClases = True
|
||||||
|
Else
|
||||||
|
ObjContabilidad = New ClsContabilidad(Transaccion)
|
||||||
|
DisposeClases = False
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then
|
If UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then
|
||||||
|
|
||||||
|
|
||||||
If ObjContabilidad.GetCuentasGlobales(UsuarioActual.CveEmpresa, 1) Then
|
If ObjContabilidad.GetCuentasGlobales(UsuarioActual.CveEmpresa, 1) Then
|
||||||
Dim CvePadre As Integer = ObjContabilidad.DtResultados.FiltroPrimeroValor("CveCuenta").ToEntero
|
Dim CvePadre As Integer = ObjContabilidad.DtResultados.FiltroPrimeroValor("CveCuenta").ToEntero
|
||||||
If CvePadre > 0 Then
|
If CvePadre > 0 Then
|
||||||
@@ -3972,7 +3992,7 @@ Partial Class Clientes
|
|||||||
Dim CvecuentaNueva As Integer = ObjContabilidad.AddCuenta(CvePadre, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, "A", 2, 1, CveCliente:=CveCliente, IdCompaq:=IdCuentaAltaCompaq)
|
Dim CvecuentaNueva As Integer = ObjContabilidad.AddCuenta(CvePadre, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, "A", 2, 1, CveCliente:=CveCliente, IdCompaq:=IdCuentaAltaCompaq)
|
||||||
|
|
||||||
If CvecuentaNueva > 0 Then
|
If CvecuentaNueva > 0 Then
|
||||||
If ObjContabilidad.AddCuentasAsignaciones(1, UsuarioActual.CveEmpresa, CvecuentaNueva, CveCliente:=CveCliente) Then
|
If ObjContabilidad.AddCuentasAsignaciones(CveConceptoContable, UsuarioActual.CveEmpresa, CvecuentaNueva, CveCliente:=CveCliente, PorcentajeIVA:=0) Then
|
||||||
Respuesta = True
|
Respuesta = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -3982,6 +4002,18 @@ Partial Class Clientes
|
|||||||
Respuesta = True
|
Respuesta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If DisposeClases Then
|
||||||
|
ObjContabilidad.Dispose()
|
||||||
|
|
||||||
|
If Not Respuesta Then
|
||||||
|
Alert("Se presento un error al agregar y asignar la cuenta (Conta SIG).", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Return Respuesta
|
Return Respuesta
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user