-
This commit is contained in:
@@ -2966,6 +2966,7 @@ Public Class ClsBancos
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveCredito", SqlDbType.Int).Value = CveCredito
|
||||
|
||||
Try
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
|
||||
@@ -8079,7 +8079,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
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
|
||||
End If
|
||||
Else
|
||||
@@ -8166,7 +8166,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
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
|
||||
End If
|
||||
Else
|
||||
@@ -8256,7 +8256,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
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
|
||||
End If
|
||||
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));
|
||||
|
||||
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>{1}</pre></td></tr>", msggral, Msg, gvRow.DataKey("Nombre"), gvRow.DataKey("Codigo"));
|
||||
{
|
||||
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));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1550,7 +1549,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
|
||||
Alert(string.Format("se envio el correo a '{0}'.", Correo), TipoMensaje.MsgInformacion);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1559,7 +1557,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Alert("No se tiene un correo registrado.", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
@@ -1628,6 +1625,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DataRow drow;
|
||||
string Correo = string.Empty;
|
||||
string NombreCompleto = string.Empty;
|
||||
string RFC = string.Empty;
|
||||
string CURP = string.Empty;
|
||||
using (ClsRH objrh = new ClsRH())
|
||||
{
|
||||
objrh.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa);
|
||||
@@ -1637,12 +1636,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
Correo = drow["Correo"].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));
|
||||
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
|
||||
|
||||
if (Msg != null && Msg.Length > 0)
|
||||
{ Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{0}", Msg), TipoMensaje.MsgAdvertencia); }
|
||||
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/>{1}", Msg, msgCorregidoSat(Msg, CvePersonal, RFC, CURP)), TipoMensaje.MsgAdvertencia); }
|
||||
else
|
||||
{
|
||||
ClsNominas ObjPeriodo = new ClsNominas();
|
||||
|
||||
@@ -16,7 +16,10 @@ Partial Class PopUpSeleccionarEmpresa
|
||||
End If
|
||||
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)
|
||||
|
||||
If Dt IsNot Nothing Then
|
||||
@@ -87,7 +90,9 @@ Partial Class PopUpSeleccionarEmpresa
|
||||
RegistraScript("Ir3();")
|
||||
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
|
||||
|
||||
@@ -1385,6 +1385,7 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTUsuarios(CveEmpresa:=-1) = Nothing
|
||||
|
||||
|
||||
'If ObjUsuarios.GetUsuariosEmpresas(-1, UsuarioActual.CveEmpresa) Then
|
||||
' Application("GlobalDTUsuarios") = ObjUsuarios.DtResultados
|
||||
' Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0")
|
||||
|
||||
@@ -2750,7 +2750,7 @@ Partial Class Clientes
|
||||
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
|
||||
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
|
||||
Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString()
|
||||
Dim Button = DirectCast(sender, Button)
|
||||
|
||||
|
||||
Dim CodigoCuentaAltaCompaq As String = ""
|
||||
Dim NombreCuentaCuentaAltaCompaq As String = ""
|
||||
Dim IdCuentaAltaCompaq As Integer = -1
|
||||
|
||||
|
||||
Select Case CuentaContable
|
||||
Case "Clientes"
|
||||
AgregarCuentaContable(Button, DdlCtaContableClientes, "", "", -1)
|
||||
Case "Anticipos"
|
||||
AgregarCuentaContable(Button, DdlCtaContableAnticipos, "", "", -1)
|
||||
|
||||
AgregarCuentaContable(Button, DdlCtaContableAnticipos, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq)
|
||||
AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 3)
|
||||
|
||||
Case "RetIVA"
|
||||
|
||||
AgregarCuentaContable(Button, DdlCtaContableRetIVA, "", "", -1)
|
||||
Case "RetISR"
|
||||
AgregarCuentaContable(Button, DdlCtaContableRetISR, "", "", -1)
|
||||
@@ -3957,14 +3968,23 @@ Partial Class Clientes
|
||||
Return ProcesoCorrecto
|
||||
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 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 ObjContabilidad.GetCuentasGlobales(UsuarioActual.CveEmpresa, 1) Then
|
||||
Dim CvePadre As Integer = ObjContabilidad.DtResultados.FiltroPrimeroValor("CveCuenta").ToEntero
|
||||
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)
|
||||
|
||||
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
|
||||
End If
|
||||
End If
|
||||
@@ -3982,6 +4002,18 @@ Partial Class Clientes
|
||||
Respuesta = True
|
||||
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
|
||||
End Function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user