diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 33c02da87..202c993ec 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5646,7 +5646,7 @@ Public Class ClsContabilidad Optional PorcentajeIVA As Decimal = -1) As Boolean Dim Retorno = False - DataAdapter("PA_Conta_CuentasAsignacionesAdd") + DataAdapter("PA_Conta_CuentasAsignacionesUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@CveCuentaAsignacion", SqlDbType.Int).Value = CveConceptoAsignacion diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index f82e8f176..e3b1f758d 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -1940,6 +1940,23 @@ Public Class ClsNominas Return Retorno End Function + Public Function ProcesarSUA(txtSUA As String, cveEmpresa As Int32) As Boolean + Dim retorno As Boolean = False + DTSet = New DataSet() + DataAdapter("PA_Nom_SUAProcesar", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@TxtSUA", SqlDbType.VarChar).Value = txtSUA + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + End With + Try + SqlAdapter.Fill(DTSet) + retorno = True + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al procesar SUA.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function GetNominaEmpleadoSimulador(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, SalarioDiario As Decimal) As Boolean Dim retorno As Boolean = False Try diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 40f8cfaa0..a13e094b3 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1973,11 +1973,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno End Function - Public Function UpdateSalarios(CvePersonal As Integer, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double) As Boolean + Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double) As Boolean Dim Retorno As Boolean = False SqlDataAdapter("PA_RH_PersonalUpdateSalarios") With SqlAdapter.SelectCommand.Parameters .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@Fecha", SqlDbType.Date).Value = Fecha .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@SalarioDiarioPago", SqlDbType.Money).Value = SalarioDiarioPago .Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario @@ -1994,6 +1995,24 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Function + Public Function GetMovimientosToSUA(CveEmpresa As Integer, FechaI As String, FechaF As String) As Boolean + Dim Retorno As Boolean = False + SqlDataAdapter("PA_RH_MovimientosToSUA") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.VarChar).Value = FechaI + .Add("@FechaF", SqlDbType.VarChar).Value = FechaF + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + Public Function UpdateRFCValidado(RFC As String, CveEmpresa As Integer, RFCValidadoisok As Boolean) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index dd42bdcb9..baf59538a 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1344,7 +1344,7 @@ Namespace Modelos Public Sub GuardarVenta(ByRef factura As Modelos.Factura, ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNotaCredito As Boolean = False, Optional ObjAcum As ClsAcumuladores = Nothing) Dim Msgok As New StringBuilder - factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.TotalTC, factura.TotalTC, factura.CveMoneda, factura.Fecha, If(factura.CveEmpresaCRM > 0, factura.EmpresaCRM, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa) + factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVentaM", factura.CvePlantillaPoliza, factura.TotalTC, factura.TotalTC, factura.CveMoneda, factura.Fecha, If(factura.CveEmpresaCRM > 0, factura.EmpresaCRM, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa) If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, @@ -2213,7 +2213,7 @@ Namespace Modelos End If IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera - CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera + 'CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera End If CveSubProyectoContabilizar = CveSubProyectoVenta ImporteConcepto12 = importeMX.RoundSQL @@ -2222,10 +2222,10 @@ Namespace Modelos CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True Else @@ -2804,7 +2804,7 @@ Namespace Modelos End If - CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero + 'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero If importeMovimiento <> 0 Then @@ -2813,10 +2813,10 @@ Namespace Modelos idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then ErrorPrepoliza = True @@ -2891,7 +2891,7 @@ Namespace Modelos If Row2("CveClasificacion").ToString = "19929" Then IdCtaContable = 1142 End If - CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero + 'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero If importeMovimiento <> 0 Then @@ -2900,10 +2900,10 @@ Namespace Modelos idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then ErrorPrepoliza = True @@ -3194,7 +3194,7 @@ Namespace Modelos If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows.Count = 1 Then IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("IdCtaContable").ToString.ToEntero - CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("IdCtaContableSIG").ToString.ToEntero + ' CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("IdCtaContableSIG").ToString.ToEntero End If If IdCtaContable <= 0 Then @@ -3202,10 +3202,10 @@ Namespace Modelos idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.AppendFormat("
{0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("NumCuentaMoneda").ToString.ToEntero) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.AppendFormat("
{0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("NumCuentaMoneda").ToString.ToEntero) + ' CveCuentaContabilizacion = 0 + 'End If 'BANCOS Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString) @@ -3272,10 +3272,10 @@ Namespace Modelos idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambio, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx b/Contabilidad2/CatCuentasAsignaciones.aspx index fcaacad9a..768a1edda 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx +++ b/Contabilidad2/CatCuentasAsignaciones.aspx @@ -71,8 +71,8 @@
- - + +
@@ -112,6 +112,7 @@ diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb index e2c98ae18..6470747bb 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb +++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb @@ -32,10 +32,6 @@ Partial Class Contabilidad2_CatCuentasAsignaciones Private Sub CargaDatosModal() Dim ObjConta As New ClsContabilidad - Dim ObjProveedores As New ClsCompProveedores - Dim ObjRH As New ClsRH - Dim ObjClasificaciones As New ClsClasificaciones - Dim ObjInv As New ClsInventarios If ObjConta.GetConta_ConceptosContables() Then DdlCconceptosContables.DataSource = ObjConta.DtResultados @@ -45,31 +41,17 @@ Partial Class Contabilidad2_CatCuentasAsignaciones DdlCuenta.DataSource = ObjConta.DtResultados End If - If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then - DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - End If + DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlClientes.setEsWebService(True) DdlPersonal.setEsWebService(True) - 'If ObjRH.GetPersonal(-1, UsuarioActual.CveEmpresa) Then - ' DdlPersonal.DataSource = ObjRH.DtResultados - 'End If - If ObjClasificaciones.GetClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa) Then - DdlClasificacion.DataSource = ObjClasificaciones.DtResultados - End If + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) - If ObjInv.GetAlmacenes(-1, -1, UsuarioActual.CveEmpresa, -1) Then - DdlAlmacen.DataSource = ObjInv.DtResultados - End If + DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa) ObjConta.Dispose() - ObjProveedores.Dispose() - ObjRH.Dispose() - ObjClasificaciones.Dispose() - ObjInv.Dispose() - DdlCconceptosContables.DataBind() DdlCuenta.DataBind() @@ -171,7 +153,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones End If End If ObjConta.Dispose() - RegistraScript("$('#ModalCat').modal('hide');") + If Not ChkSeguirRegistrando.Checked Then RegistraScript("$('#ModalCat').modal('hide');") + If ErrorString.Length > 0 Then Alert(ErrorString) Else diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx index f347c4d54..176fdd0eb 100644 --- a/Nomina/Nomina2.aspx +++ b/Nomina/Nomina2.aspx @@ -4,10 +4,39 @@