diff --git a/AC/RegNomina.aspx.vb b/AC/RegNomina.aspx.vb index cc9ed0b49..38dda7c00 100644 --- a/AC/RegNomina.aspx.vb +++ b/AC/RegNomina.aspx.vb @@ -374,7 +374,7 @@ Partial Class AC_RegNomina Dim IdCtaDevolucionISPT As Integer = 1745 Dim IdCtaMatriz As Integer Dim IdCtaCuotaSindical As Integer = 644 - Dim IdCtaInfonavit As Integer = 2018 + Dim IdCtaInfonavit As Integer = 4478 Dim IdCtaFonacot As Integer = 646 Dim IdCtaServicioMedico As Integer = 643 Dim IdCtaPension As Integer = 643 diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index fff9651c8..0a78eb6fe 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -3504,7 +3504,7 @@ Public Class ClsBancos #End Region #Region "PagosCajaChica" - Public Function GetPagosCajaChica(FechaI As String, FechaF As String, CveEmpresa As Integer, CveCuenta As Integer, Optional TipoPago As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean + Public Function GetPagosCajaChica(FechaI As String, FechaF As String, CveEmpresa As Integer, CveCuenta As Integer, Optional TipoPago As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional MSI As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_BancosCajaChicaPagosGet") @@ -3515,6 +3515,7 @@ Public Class ClsBancos .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta .Add("@TipoChequeEfectivo", SqlDbType.Int).Value = TipoPago .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@MSI", SqlDbType.Int).Value = MSI End With Try diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 018752561..8163a318d 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -87,7 +87,7 @@ Public Class ClsClientes Public Property Codigo As String Public Property LimiteCredito As Double 'Public Property NumCtaPago As String - 'Public Property CveMetodoPago As Integer + Public Property CveMetodoPago As Integer Public Property AplicaFEMSA As Boolean Public Property FEMSA_NumSociedad As String Public Property FEMSA_NumProveedor As String diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 83377e9b8..d2a33c406 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -941,7 +941,7 @@ Public Class ClsCompras Public Function GetRepProductosServicios(CveProyecto As Integer, CveSubProyecto As String, CveCategoria As String, CveClasificacion As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, CveProveedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Gpo As Integer, CveFamilia As Integer, CveSubFamilia As Integer, CveTipoActivoFijo As String, CveSubTipoActivoFijo As String, CveActivoFijo As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoGasto As String = "-1", - Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1") As Boolean + Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional Deducible As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_GetRepPS") @@ -969,6 +969,7 @@ Public Class ClsCompras .Add("@TipoGasto", SqlDbType.VarChar).Value = TipoGasto .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto + .Add("@Deducible", SqlDbType.Int).Value = Deducible End With Try @@ -984,7 +985,7 @@ Public Class ClsCompras FechaF As Date, CveProveedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Gpo As Integer, CveFamilia As Integer, CveSubFamilia As Integer, CveTipoActivoFijo As String, CveSubTipoActivoFijo As String, CveActivoFijo As Integer, CveMoneda As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, - Optional TipoGasto As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1") As Boolean + Optional TipoGasto As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional Deducible As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_GetRepPSDetalle") @@ -1016,6 +1017,8 @@ Public Class ClsCompras .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto + .Add("@Deducible", SqlDbType.Int).Value = Deducible + End With Try diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 2880efb7d..d251f6f23 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -1026,7 +1026,7 @@ Public Class ClsContabilidad Concepto = $"{NombreComercial} F:{SerieFolio}" End Select - Case 119 + Case 119, 158 Select Case CveConcepto Case 2, 17 'Pago Proveedores @@ -1038,13 +1038,13 @@ Public Class ClsContabilidad Case 6 'Compra Case 13, 61 'iva ventas - Concepto = SerieFolio + Concepto = String.Format("{0} - {1}", NombreComercial, SerieFolio) Case 14, 19 'iva compras Concepto = SerieFolio Case 38, 39 'ieps ventas - Concepto = SerieFolio + Concepto = String.Format("{0} - {1}", NombreComercial, SerieFolio) Case 25, 26 'eips compras Concepto = SerieFolio @@ -3225,7 +3225,7 @@ Public Class ClsContabilidad #Region " CUENTAS " - Public Function GetCuentas(CveCuenta As Integer, Codigo As String, Afectable As Integer, CveEmpresa As Integer, Optional RowNum As Integer = 100000, Optional CvePadre As Integer = -1) As Boolean ', Codigo As String, Nombre As String, CveClasificacionCuenta As Integer, TipoCuenta As Integer, Afectable As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean + Public Function GetCuentas(CveCuenta As Integer, Codigo As String, Afectable As Integer, CveEmpresa As Integer, Optional RowNum As Integer = 100000, Optional CvePadre As Integer = -1, Optional Nombre As String = "-1") As Boolean ', Codigo As String, Nombre As String, CveClasificacionCuenta As Integer, TipoCuenta As Integer, Afectable As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean Dim Retorno = False DataAdapter("PA_Conta_CuentasGet") @@ -3234,6 +3234,7 @@ Public Class ClsContabilidad .Add("@Codigo", SqlDbType.VarChar).Value = Codigo .Add("@Afectable", SqlDbType.VarChar).Value = Afectable .Add("@CveEmpresa", SqlDbType.VarChar).Value = CveEmpresa + .Add("@Nombre", SqlDbType.VarChar).Value = Nombre .Add("@RowNum", SqlDbType.VarChar).Value = RowNum .Add("@CvePadre", SqlDbType.Int).Value = CvePadre End With @@ -6437,5 +6438,24 @@ Public Class ClsContabilidad Return Retorno End Function + Public Function UpdateProveedorPoliza(CveOrdenCompra As Integer, CveProveedor As Integer, Concepto As String) As Boolean + Dim Retorno = False + DataAdapter("PA_Conta_ActualizarProveedor") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveOrdenCompra", SqlDbType.Int).Value = CveOrdenCompra + .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + .Add("@Proveedor", SqlDbType.VarChar).Value = Concepto + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al obtener traspasar las Prepolizas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function End Class \ No newline at end of file diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 353146e49..55c6e7eca 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -2619,12 +2619,14 @@ Public Class ClsGenerales #End Region #Region "SAT PRODUCTOS SERVICIOS Y UNIDAD DE MEDIDA" - Public Function GetSATProductosServicios() As Boolean + Public Function GetSATProductosServicios(Optional CodigoSAT As String = "-1", Optional SATClaveProductoServicio As String = "-1", Optional CveSATPS As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_SAT_ProductosServiciosGet") With SqlAdapter.SelectCommand.Parameters - + .Add("@CodigoSAT", SqlDbType.VarChar).Value = CodigoSAT + .Add("@SATClaveProductoServicio", SqlDbType.VarChar).Value = SATClaveProductoServicio + .Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS End With 'SqlTypes.SqlDateTime.Null diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 8dc140ab6..23ac5b7b2 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -130,7 +130,8 @@ Public Class ClsNominas .CommandText = pStrSQL .CommandType = TipoComando End With - Data = New DataTable + Data = New DataTable() + DTSet = New DataSet() If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc End Sub #Region "Conexiones" @@ -255,7 +256,27 @@ Public Class ClsNominas Return retorno End Function - + Public Function SUAMovmientosAfiliatoriosGET(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer) As Boolean + Dim retorno As Boolean = False + DTSet = New DataSet() + DataAdapter("[PA_Nom_SUAMovmientosAfiliatoriosGET]", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + .Add("@FechaFin", SqlDbType.Date).Value = FechaFin + .Add("@TipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo + End With + Try + SqlAdapter.Fill(DTSet) + If DTSet.Tables.Count > 0 Then + Data = DTSet.Tables(0) + End If + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte de movimientos Afiliatorios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function ReportedePercepcionesDeduccionesGet(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer) As Boolean Dim retorno As Boolean = False DTSet = New DataSet() @@ -268,6 +289,9 @@ Public Class ClsNominas End With Try SqlAdapter.Fill(DTSet) + If DTSet.Tables.Count > 0 Then + Data = DTSet.Tables(0) + End If retorno = True Catch ex As Exception OnError("Ocurrió un error al obtener el reporte de Percepciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) @@ -286,6 +310,9 @@ Public Class ClsNominas End With Try SqlAdapter.Fill(DTSet) + If DTSet.Tables.Count > 0 Then + Data = DTSet.Tables(0) + End If retorno = True Catch ex As Exception OnError("Ocurrió un error al obtener el reporte de incidencias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) @@ -303,6 +330,9 @@ Public Class ClsNominas End With Try SqlAdapter.Fill(DTSet) + If DTSet.Tables.Count > 0 Then + Data = DTSet.Tables(0) + End If retorno = True Catch ex As Exception OnError("Ocurrió un error al obtener el reporte de acumulados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) @@ -311,7 +341,7 @@ Public Class ClsNominas End Function Public Function GetCalculoAguinaldo(ejercicio As Int32, cveEmpresa As Int32, importe As Double, CveTipoPeriodo As Integer, CvePeriodo As Integer) As Boolean Dim retorno As Boolean = False - DataAdapter("PA_NomCalcularAguinaldo", CommandType.StoredProcedure) + DataAdapter("PA_Nom_CalcularAguinaldo", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa .Add("@Ejercicio", SqlDbType.Int).Value = ejercicio @@ -327,24 +357,28 @@ Public Class ClsNominas End Try Return retorno End Function - Public Function Autorizaperiodoconta(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean + Public Function RegistraProvision(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean Dim retorno As Boolean = False - DataAdapter("PA_Nom_Autorizaperiodoconta", CommandType.StoredProcedure) + DataAdapter("PA_Nom_RegistraProvision", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try - SqlAdapter.Fill(Data) + SqlAdapter.Fill(DTSet) + Data = New DataTable + If DTSet.Tables.Count > 0 Then + Data = DTSet.Tables(0) + End If retorno = True Catch ex As Exception - OnError("Ocurrió un error al autorizar periodo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al registrar la provisión de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function - Public Function GetDispersiondenomina(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean + Public Function GetDispersionnomina(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean Dim retorno As Boolean = False - DataAdapter("PA_PA_NomDispersiondenomina", CommandType.StoredProcedure) + DataAdapter("PA_Nom_Dispersionnomina", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa @@ -359,7 +393,7 @@ Public Class ClsNominas End Function Public Function GetCalculoUtilidades(ejercicio As Int32, cveEmpresa As Int32, importe As Double, importeA As Double) As Boolean Dim retorno As Boolean = False - DataAdapter("PA_NomCalcularUtilidades", CommandType.StoredProcedure) + DataAdapter("PA_Nom_CalcularUtilidades", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa .Add("@Ejercicio", SqlDbType.Int).Value = ejercicio @@ -2549,7 +2583,7 @@ Public Class ClsNominas End Try Return retorno End Function - Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean) As Boolean + Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean, CveCuenta As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure) @@ -2563,20 +2597,21 @@ Public Class ClsNominas .Add("@montoLimite", SqlDbType.Decimal).Value = (montoLimite) .Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion) .Add("@estatus", SqlDbType.Bit).Value = (estatus) + .Add("@CveCuenta", SqlDbType.Int).Value = (CveCuenta) End With Try SqlAdapter.Fill(Data) retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al agregar los movimientos permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception retorno = False - OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al agregar los movimientos permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function - Public Function UpMovtoPermanente(cveMovtoPermanente As Int32, cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean) As Boolean + Public Function UpMovtoPermanente(cveMovtoPermanente As Int32, cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean, CveCuenta As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_UpMovtoPermanente", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters @@ -2590,16 +2625,21 @@ Public Class ClsNominas .Add("@montoLimite", SqlDbType.Decimal).Value = (montoLimite) .Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion) .Add("@estatus", SqlDbType.Bit).Value = (estatus) + .Add("@CveCuenta", SqlDbType.Int).Value = (CveCuenta) End With Try SqlAdapter.Fill(Data) retorno = True Catch sqEx As SqlException retorno = False - OnError("Ocurrió un error al agregar los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + If (sqEx.Message.Contains("FK_Conta_CuentasAsignaciones_Conta_ConceptosContables")) Then + OnError("Es necesario asignar el concepto contable al concepto de nomina para poder realizar la vinculacion de la cuenta.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Else + OnError("Ocurrió un error al actualizar los movimientos permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If Catch ex As Exception retorno = False - OnError("Ocurrió un error al agregar los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al actualizar los movimientos permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 162bf1b97..2d8747e86 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -293,19 +293,27 @@ Public Class ClsPaginas Application("Directorio") = value End Set End Property - Property GlobalDTPSATPS() As DataTable + Public Shared ReadOnly Property GlobalDTPSATPS(SATProductoServicio As String, Optional CodigoSAT As String = "-1", Optional CveSATPS As Integer = -1) As DataTable Get - If Application("GlobalDTPSATPS") Is Nothing Then - Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing - ObjGrales.Dispose() - End If + 'If Application("GlobalDTPSATPS") Is Nothing Then + ' Dim ObjGrales As New ClsGenerales + ' If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing + ' ObjGrales.Dispose() + 'End If - GlobalDTPSATPS = DirectCast(Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable + 'GlobalDTPSATPS = DirectCast(Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable + + Dim ObjGrales As New ClsGenerales + If ObjGrales.GetSATProductosServicios(CodigoSAT, SATProductoServicio, CveSATPS) Then + GlobalDTPSATPS = ObjGrales.DtResultados + Else + GlobalDTPSATPS = Nothing + End If + ObjGrales.Dispose() End Get - Set(value As DataTable) - Application("GlobalDTPSATPS") = value - End Set + 'Set(value As DataTable) + ' Application("GlobalDTPSATPS") = value + 'End Set End Property #Region "GLOBALES DE SAT COMERCIO EXTERIOR" @@ -1752,7 +1760,7 @@ Public Class ClsPaginas ObjProveedores.Dispose() End If - If CveEmpresa <> -1 Then + If CveEmpresa <> -1 AndAlso Application(AppNombre) IsNot Nothing Then Dim StrSQL As New StringBuilder StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) If CveProveedor >= 0 Then StrSQL.AppendFormat(" AND CveProveedor = {0} ", CveProveedor) @@ -3844,6 +3852,7 @@ Public Class ClsPaginas PaginaDict = New System.Collections.Hashtable PaginaDict.Add("/Nomina/ISRCalculoAnual.aspx".ToUpper(), 918) + PaginaDict.Add("/Nomina/MovimientosSUA.aspx".ToUpper(), 919) PaginaDict.Add("/Nomina/Acumulados.aspx".ToUpper(), 916) PaginaDict.Add("/RH/CalculoSBC.aspx".ToUpper(), 915) PaginaDict.Add("/Inicio.aspx".ToUpper(), -1) diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 80494b780..502e985bb 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1807,7 +1807,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Calle As String, NumExt As String, NumInt As String, Colonia As String, CP As String, Ciudad As String, CveEstado As Integer, Telefono As String, Celular As String, RFC As String, CURP As String, NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String, CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveUsuario As Integer, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1, - Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Boolean = False) As Boolean + Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Boolean = False, Optional CvePais As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -1889,6 +1889,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo .Add("@ContactoAlterno", SqlDbType.VarChar).Value = ContactoAlterno .Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario .Add("@Sindicalizado", SqlDbType.Bit).Value = Sindicalizado + .Add("@CvePais", SqlDbType.Int).Value = CvePais .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue @@ -1921,7 +1922,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, CvePersonal As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String, CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1, Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveUsuarioModifico As Integer = -1, - Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1) As Boolean + Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1, Optional CvePais As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -2007,6 +2008,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo .Add("@FechaReingreso", SqlDbType.Date).Value = FechaReingreso .Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario .Add("@Sindicalizado", SqlDbType.Int).Value = Sindicalizado + .Add("@CvePais", SqlDbType.Int).Value = CvePais End With @@ -6738,10 +6740,27 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual)) ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF)) - ListaTagsDocumentost.Add(New TagsDocumentos("{HoraInicioJornada}", DtResultados(0)("HorarioDe").ToString)) - ListaTagsDocumentost.Add(New TagsDocumentos("{HoraFinJornada}", DtResultados(0)("HorarioA").ToString)) - ListaTagsDocumentost.Add(New TagsDocumentos("{Salario}", "")) - ListaTagsDocumentost.Add(New TagsDocumentos("{MetodoPago}", DtResultados(0)("MetodoPago").ToString)) + 'ListaTagsDocumentost.Add(New TagsDocumentos("{HoraInicioJornada}", DtResultados(0)("HorarioDe").ToString)) + 'ListaTagsDocumentost.Add(New TagsDocumentos("{HoraFinJornada}", DtResultados(0)("HorarioA").ToString)) + 'ListaTagsDocumentost.Add(New TagsDocumentos("{Salario}", "")) + 'ListaTagsDocumentost.Add(New TagsDocumentos("{MetodoPago}", DtResultados(0)("MetodoPago").ToString)) + + If MinFecha = DtResultados(0)("FechaFinContrato").ToString.ToDate Then + ListaTagsDocumentost.Add(New TagsDocumentos("{FechaFin}", "Sin Fecha Fin")) + Else + ListaTagsDocumentost.Add(New TagsDocumentos("{FechaFin}", DtResultados(0)("FechaFinContrato").ToString.ToDate.ToString("dd/MM/yyyy"))) + End If + + ListaTagsDocumentost.Add(New TagsDocumentos("{Sexo}", DtResultados(0)("Genero").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{NombreEmpresa}", DtResultados(0)("Empresa").ToString)) + + Dim SalarioDiarioTag As String = DtResultados(0)("SalarioDiario").ToString.ToDouble.Texto2Letras() + + ListaTagsDocumentost.Add(New TagsDocumentos("{Sueldo}", DtResultados(0)("SalarioDiario").ToString.ToDouble.ToString("###,###,###.00"))) + ListaTagsDocumentost.Add(New TagsDocumentos("{SueldoLetra}", SalarioDiarioTag)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Nacionalidad}", DtResultados(0)("ClaveSATPaisDescripcion").ToString)) + + End If diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index d73f18d86..b485575cc 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -4387,7 +4387,6 @@ Public Class ClsVentas Return Retorno End Function #End Region - #Region " AUTORIZACION LIMITES " Public Function AutorizacionLimitesGet(CveCliente As Integer, CveCveVendedor As Integer, CveEstatus As Integer) As Boolean diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index 7e9d8cc88..49432dc6c 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -269,10 +269,13 @@ Public Class LogicNominas 'If Asistencias > 15 Then ' Asistencias = 15 'End If + If Asistencias <= 0 Then + Asistencias = 1 + End If Dim Vacaciones As Integer = objPersonal.DtResultados.SUM("AplicaVacacion").ToEntero() DiasIncapacitados = objPersonal.DtResultados.SUM("AplicaIncapacidad").ToEntero() DiasPagados = Asistencias - Vacaciones - If DiasPagados < 0 Then DiasPagados = 0 + If DiasPagados <= 0 Then DiasPagados = 1 Else continuar = False End If diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 420e86ef7..a47720df8 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -2267,7 +2267,6 @@ Namespace Modelos Dim importeMovimiento As Decimal Dim FechaMovimiento As Date = ObjFactura.Fecha Dim IdCtaContable As Integer - Dim CveCuenta As Integer Dim IdCtaContableCliente As Integer Dim CveCuentaCliente As Integer Dim Concepto As String = ObjFactura.SerieFolio @@ -2293,9 +2292,7 @@ Namespace Modelos If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=ObjFactura.DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero - CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveCuentaIVAXTrasladar").ToString.ToEntero IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero - CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveCuentaIVATrasladado").ToString.ToEntero End If Dim UsaComplementariaClientes As Boolean = True @@ -2310,7 +2307,6 @@ Namespace Modelos TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False) importeMovimiento = 0 IdCtaContable = 0 - CveCuenta = 0 CveSubProyectoContabilizar = 0 Multiplicador = (Row("Multiplicador").ToString.ToEntero) Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", "") @@ -2332,23 +2328,19 @@ Namespace Modelos If tipoCambio = 1 Then IdCtaContable = ObjFactura.Cliente.IdCtaContClientes - CveCuenta = ObjFactura.Cliente.CveCuentaClientes Else IdCtaContable = ObjFactura.Cliente.IdCtaContComplementaria - CveCuenta = 0 - If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementariaClientes) Then + If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsaComplementariaClientes) Then importeMX = importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If End If IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera - CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera End If IdCtaContableCliente = IdCtaContable - CveCuentaCliente = CveCuenta End If Case 3 'Cliente @@ -2359,7 +2351,6 @@ Namespace Modelos importeMX = importeMovimiento * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos - CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveSubProyectoContabilizar = CveSubProyectoVenta If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" End If @@ -2375,16 +2366,13 @@ Namespace Modelos If tipoCambio = 1 Then IdCtaContable = ObjFactura.Cliente.IdCtaContClientes - CveCuenta = ObjFactura.Cliente.CveCuentaClientes Else IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera - CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera End If IdCtaContableCliente = IdCtaContable - CveCuentaCliente = CveCuenta - If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 190, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 193, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 190, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 193, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If Else @@ -2405,13 +2393,10 @@ Namespace Modelos If tipoCambio = 1 Then IdCtaContable = ObjFactura.Cliente.IdCtaContClientes - CveCuenta = ObjFactura.Cliente.CveCuentaClientes Else IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera - CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera End If IdCtaContableCliente = IdCtaContable - CveCuentaCliente = CveCuenta Dim CveMovimiento As Integer = -1 Dim CveAlmacen As Integer = -1 @@ -2435,11 +2420,11 @@ Namespace Modelos Dim Importe318 As Decimal = importeMovimiento - Importe68 - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, Importe318, Referencia, 318, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Importe318, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, Importe318, Referencia, 318, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Importe318, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If @@ -2448,8 +2433,8 @@ Namespace Modelos End If Else - If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If Else @@ -2474,15 +2459,13 @@ Namespace Modelos IdCtaContable = 0 If tipoCambio = 1 Then IdCtaContable = ObjFactura.Cliente.IdCtaContClientes - CveCuenta = ObjFactura.Cliente.CveCuentaClientes ElseIf UsaComplementariaClientes Then IdCtaContable = ObjFactura.Cliente.IdCtaContComplementaria - CveCuenta = 0 - If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementariaClientes) Then + If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsaComplementariaClientes) Then importeMX = importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If End If @@ -2497,11 +2480,8 @@ 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 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 + + 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), CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True Else ObjFactura.SeGuardoPrePoliza = True @@ -2594,16 +2574,14 @@ Namespace Modelos CveConceptoFluctua = 65 TipoMovtoFluctua = False IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria Else CveConceptoFluctua = 64 TipoMovtoFluctua = True IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria End If Dim ImporteFluctuacion As Decimal = Math.Abs((Importe251 * difFluctuacion).RoundSQL) * ValorMultiplicador - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=Dr("CveVenta").ToString.ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=TipoCambioNC, TipoCambioPago:=Dr("TCCambioValuacion").ToString.ToDecimal, CveCuenta:=CveCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=Dr("CveVenta").ToString.ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=TipoCambioNC, TipoCambioPago:=Dr("TCCambioValuacion").ToString.ToDecimal) Then ErrorPrepoliza = True Exit For End If @@ -2687,16 +2665,14 @@ Namespace Modelos CveConceptoFluctua = 65 TipoMovtoFluctua = False IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria Else CveConceptoFluctua = 64 TipoMovtoFluctua = True IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria End If Dim ImporteFluctuacion As Decimal = Math.Abs((importeMovimientoDev * difFluctuacion).RoundSQL) * ValorMultiplicador - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=TipoCambioFactura, CveCuenta:=CveCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=TipoCambioFactura) Then ErrorPrepoliza = True Exit For End If @@ -2760,7 +2736,6 @@ Namespace Modelos If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" CveIEAnticipo = -1 IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos - CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveSubProyectoContabilizar = CveSubProyectoVenta Dim CveVenta As Integer = ObjFactura.CveVenta @@ -2781,7 +2756,7 @@ Namespace Modelos If importeMovimiento <> 0 Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveVentaAmortizacion:=CveVentaAmortizacion, CveCliente:=ObjFactura.CveCliente, - CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, + CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For @@ -2809,13 +2784,12 @@ Namespace Modelos If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos - CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveSubProyectoContabilizar = CveSubProyectoVenta If importeMovimiento <> 0 Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=row2("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, - ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, + ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True Exit For @@ -2835,7 +2809,6 @@ Namespace Modelos For Each Row2 As DataRow In DT.Rows importeMovimiento = Math.Abs(Row2("PU").ToString.ToDecimal) IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos - CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveSubProyectoContabilizar = CveSubProyectoVenta If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" @@ -2844,7 +2817,7 @@ Namespace Modelos ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, ImporteMX:=importeMovimiento * tipoCambio, - ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, + ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True Else @@ -2977,16 +2950,14 @@ Namespace Modelos CveConceptoFluctua = 65 TipoMovtoFluctua = False IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria Else CveConceptoFluctua = 64 TipoMovtoFluctua = True IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria End If Dim ImporteFluctuacion As Decimal = Math.Abs((Importe251 * difFluctuacion).RoundSQL) * ValorMultiplicador - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=row2("CveVenta").ToString.ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=row2("TCCambioValuacion").ToString.ToDecimal, CveCuenta:=CveCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=row2("CveVenta").ToString.ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=row2("TCCambioValuacion").ToString.ToDecimal) Then ErrorPrepoliza = True Exit For End If @@ -3005,7 +2976,6 @@ Namespace Modelos sumaAmorticaciones += importeMovimiento If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos - CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveSubProyectoContabilizar = CveSubProyectoVenta If importeMovimiento <> 0 Then @@ -3014,7 +2984,7 @@ Namespace Modelos ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteMX:=importeMovimiento * tipoCambio, - ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, + ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then ErrorPrepoliza = True End If @@ -3092,11 +3062,6 @@ 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 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, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then ErrorPrepoliza = True Else @@ -3283,16 +3248,6 @@ Namespace Modelos End If End If - 'Contabilidad SIG - If ObjFactura.Cliente.CveCuentaRetIVA > 0 Then - CveCuenta = ObjFactura.Cliente.CveCuentaRetIVA - Else - If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero - End If - End If - End If End If Case 313 'Ret Iva Servicios @@ -3346,16 +3301,6 @@ Namespace Modelos End If End If - 'Contabilidad SIG - If ObjFactura.Cliente.CveCuentaRetISR > 0 Then - CveCuenta = ObjFactura.Cliente.CveCuentaRetISR - Else - If ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero - End If - End If - End If End If Case 13 'Iva por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then @@ -3371,10 +3316,8 @@ Namespace Modelos importeMX = importeMX * -1 IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado) - CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado) Else IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) - CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar) End If CveSubProyectoContabilizar = CveSubProyectoVenta @@ -3432,14 +3375,12 @@ Namespace Modelos If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSTrasladado").ToString().ToEntero() - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSTrasladadoSIG").ToString().ToEntero() End If End If Else If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladar").ToString().ToEntero() - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladarSIG").ToString().ToEntero() End If End If End If @@ -3490,7 +3431,6 @@ Namespace Modelos importeMovimiento = DrPago("Importe").ToString.ToDecimal * ValorMultiplicador importeMX = importeMovimiento * tipoCambio * Multiplicador IdCtaContable = 0 - CveCuenta = 0 CveSubProyectoContabilizar = CveSubProyectoVenta Dim PorcentajeImpuestoPago As Decimal = TmpDTDetalle.MAX("PorcentajeIVA").ToDecimal @@ -3512,7 +3452,7 @@ Namespace Modelos 'BANCOS Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString) - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento)) Then ErrorPrepoliza = True Exit For End If @@ -3580,7 +3520,7 @@ Namespace Modelos ' 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 + 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), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambio, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Else ObjFactura.SeGuardoPrePoliza = True @@ -4035,7 +3975,7 @@ Namespace Modelos CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero Try If ValorInventario <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, Me.SerieFolio, 69, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=Me.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, Me.SerieFolio, 69, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then OcurrioError = True Exit For End If @@ -4048,7 +3988,7 @@ Namespace Modelos If Not OcurrioError Then IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero ValorInventario = Math.Round(DtCostos.SUM("Total", "").ToDecimal, 2, MidpointRounding.AwayFromZero) - If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, True, ValorInventario, Me.SerieFolio, 68, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=Me.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, True, ValorInventario, Me.SerieFolio, 68, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then OcurrioError = True End If End If @@ -4210,7 +4150,7 @@ Namespace Modelos IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() 'If TotalCosto <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then OcurrioError = True End If 'End If @@ -4351,7 +4291,7 @@ Namespace Modelos IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() 'If TotalCosto <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then OcurrioError = True End If 'End If @@ -4430,20 +4370,20 @@ Namespace Modelos Select Case RowIL("TipoImpuesto").ToString Case "1" - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, Importe, Concepto, 27, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, Importe, Concepto, 27, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If Case "3" - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, Importe, Concepto, 116, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, Importe, Concepto, 116, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If Case "4" - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, Importe, Concepto, 58, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, Importe, Concepto, 58, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If Case "5" - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, True, Importe, Concepto, 27, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, True, Importe, Concepto, 27, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If End Select @@ -5198,10 +5138,9 @@ Namespace Modelos End If IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero - CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostosSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero If Not ErrorCancelar Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, False, Multiplicador * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=Multiplicador * ValorInventario, CveCuenta:=CveCuenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, False, Multiplicador * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=Multiplicador * ValorInventario, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero) Then ErrorCancelar = True End If End If diff --git a/Ashx/E72.ashx b/Ashx/E72.ashx new file mode 100644 index 000000000..78d0e2c55 --- /dev/null +++ b/Ashx/E72.ashx @@ -0,0 +1,71 @@ +<%@ WebHandler Language="VB" Class="E72" %> + +Imports System +Imports System.Web +Imports System.Data +Imports Newtonsoft.Json +Imports Extensiones +Imports System.IO + +Public Class E72 : Implements IHttpHandler, IRequiresSessionState + Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable + Get + Return False + End Get + End Property + Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest + + Try + Select Case context.Request("metodo") + Case "contratoexistencia" + contratoexistencia(context) + End Select + Catch ex As Exception + ex.GuardaLog(ex.Message) + End Try + End Sub + + Private Function contratoexistencia(ByVal context As HttpContext) As String + Try + + + Dim retorno As String = "" + Dim ObjInv As New ClsInventarios + ObjInv.GetRepEntradasSalidasXContrato(72, -1, MinFecha, Date.Now, -1, -1, 17, -1, -1, 3, -1, 1158) + Dim DtRepEntradasSalidasXContrato As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0") + + ObjInv.ApartadosRep(-1, 70437, 259, 72, -1, MinFecha, Date.Now) + Dim DtApartados As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0", "", {"CvePS", "Cantidad"}) + Dim asd As Integer = DtApartados.Rows.Count + + Dim DTapartado = From row In DtApartados.AsEnumerable + Group row By CvePS = row.Field(Of Integer)("CvePS") Into CvePSGroup = Group + Select New With { + Key CvePS, + .Cantidad = CvePSGroup.Sum(Function(r) r.Field(Of Decimal)("Cantidad")) + } + + Dim DtTemp = From entradas In DtRepEntradasSalidasXContrato + Join apartados In DTapartado + On entradas.Field(Of Integer)("CvePS") Equals apartados.CvePS + Select New With { + .Codigo = entradas.Field(Of String)("Codigo"), + .Existencia = entradas.Field(Of Double)("SaldoFCant"), + .AlmacenAlt = apartados.Cantidad, + .Precio = entradas.Field(Of Double)("PrecioVenta") + } + + + + retorno = JsonConvert.SerializeObject(DtTemp).ToString + context.Response.Write(retorno) + ObjInv.Dispose() + Return retorno + Catch ex As Exception + + End Try + + End Function + + +End Class \ No newline at end of file diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 43e27b789..50ad3494f 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -35,11 +35,33 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState context.Response.Close() context.Response.End() Else - context.Response.ContentType = "text/plain" + If context.Request("metodo").Contiene("Contabilizapoliza", "RevisaConexion") Then + context.Response.ContentType = "text/json" + Else + context.Response.ContentType = "text/plain" + + End If End If Try Select Case context.Request("metodo") + Case "Contabilizapoliza" + Dim CvePrePoliza As Integer = context.Request("CvePrePoliza").ToString().ToEntero() + Dim CveUsuario As Integer = context.Request("CveUsuario").ToString().ToEntero() + Dim CveEmpresa As Integer = context.Request("CveEmpresa").ToString().ToEntero() + GuardaLog(String.Format("?metodo=Contabilizapoliza&CvePrePoliza={0}&CveUsuario={1}&CveEmpresa ={2}", CvePrePoliza, CveUsuario, CveEmpresa)) + ActualizaPrePoliza(context) + Dim obj As New ADSNetLibrary.SIGAPI.Models.ResponseModel(Of Object)() + obj.Result = DateTime.Now.ToString() + Dim retorno = JsonConvert.SerializeObject(obj).ToString() + context.Response.Write(retorno) + context.Response.StatusCode = 200 + Case "RevisaConexion" + Dim obj As New ADSNetLibrary.SIGAPI.Models.ResponseModel(Of Object)() + obj.Result = DateTime.Now.ToString() + Dim retorno = JsonConvert.SerializeObject(obj).ToString() + context.Response.Write(retorno) + context.Response.StatusCode = 200 Case "getps" GETPS(context) Case "getps2" @@ -70,6 +92,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState ActualizaPrePoliza(context) Case "getpersonal" getpersonal(context) + Case "getcuentascontables" + GetCuentasContables(context) Case "getcontratos" GetContratos(context) Case "GettingCURP" @@ -558,6 +582,15 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState End If If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then + 'Dim i As Integer = 0 'limpieza de columnas + 'While i < DtRetorno.Columns.Count + ' If Not DtRetorno.Columns(i).ColumnName.Contiene("CveProveedor", "NombreCortoProveedor") Then + ' DtRetorno.Columns.RemoveAt(i) + ' Else + ' i = i + 1 + ' End If + 'End While + DtRetorno.Columns("CveCliente").ColumnName = "id" DtRetorno.Columns(ColumnaNombre).ColumnName = "text" retorno = JsonConvert.SerializeObject(DtRetorno).ToString @@ -593,11 +626,6 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState ObjProveedores.Dispose() End If - 'Dim ObjProveedores As New ClsCompProveedores - 'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", Name, "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then - ' DtRetorno = ObjProveedores.DtResultados - 'End If - 'ObjProveedores.Dispose() Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable) '.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then DtRetorno = dt.FiltraParametros(String.Format("NombreCortoProveedor like '%{0}%'", Name)) @@ -606,14 +634,24 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState End If If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then + Dim i As Integer = 0 'limpieza de columnas + While i < DtRetorno.Columns.Count + If Not DtRetorno.Columns(i).ColumnName.Contiene("CveProveedor", "NombreCortoProveedor") Then + DtRetorno.Columns.RemoveAt(i) + Else + i = i + 1 + End If + End While + DtRetorno.Columns("CveProveedor").ColumnName = "id" DtRetorno.Columns("NombreCortoProveedor").ColumnName = "text" retorno = JsonConvert.SerializeObject(DtRetorno).ToString context.Response.Write(retorno) + DtRetorno.Dispose() Else context.Response.Write("[]") End If - DtRetorno.Dispose() + Return retorno End Function #End Region @@ -1147,11 +1185,6 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState ObjPersonal.Dispose() End If - 'Dim ObjProveedores As New ClsCompProveedores - 'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", Name, "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then - ' DtRetorno = ObjProveedores.DtResultados - 'End If - 'ObjProveedores.Dispose() Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}") If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then DtRetorno = dt.FiltraParametros($"NombreCompleto like '%{Name}%'") @@ -1159,6 +1192,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState End If If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then + DtRetorno.Columns("CvePersonal").ColumnName = "id" DtRetorno.Columns("NombreCompleto").ColumnName = "text" retorno = JsonConvert.SerializeObject(DtRetorno).ToString @@ -1205,4 +1239,47 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Return retorno End Function #End Region + +#Region "Get Cuentas" + Private Function GetCuentasContables(ByVal context As HttpContext) As String + Dim retorno As String = "" + Dim DtRetorno As DataTable = Nothing + + Dim usuario As Usuario = UsuarioActual(context) + Dim CveEmpresa As String + If IsNothing(usuario) Then + context.Response.Write("") + Else + CveEmpresa = usuario.CveEmpresa + + Dim Name = IfNull(context.Request("Name"), "-1").ToString + Dim ObjConta As New ClsContabilidad + If ObjConta.GetCuentas(-1, "-1", 1, CveEmpresa, Nombre:=Name) Then + DtRetorno = ObjConta.DtResultados + End If + ObjConta.Dispose() + + End If + + If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then + Dim i As Integer = 0 'limpieza de columnas + While i < DtRetorno.Columns.Count + If Not DtRetorno.Columns(i).ColumnName.Contiene("CveCuenta", "CtaCodigo") Then + DtRetorno.Columns.RemoveAt(i) + Else + i = i + 1 + End If + End While + DtRetorno.Columns("CveCuenta").ColumnName = "id" + DtRetorno.Columns("CtaCodigo").ColumnName = "text" + retorno = JsonConvert.SerializeObject(DtRetorno).ToString + context.Response.Write(retorno) + Else + context.Response.Write("[]") + End If + + DtRetorno.Dispose() + Return retorno + End Function +#End Region End Class \ No newline at end of file diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 3fd17f4ff..3295a33f7 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -98,13 +98,23 @@
- +
+ + + + MSI + 3M + 6M + 9M + 12M + +
@@ -194,7 +204,7 @@
- diff --git a/Compras/RepProductosServiciosDetalle.aspx.vb b/Compras/RepProductosServiciosDetalle.aspx.vb index 419685e86..d60c194a2 100644 --- a/Compras/RepProductosServiciosDetalle.aspx.vb +++ b/Compras/RepProductosServiciosDetalle.aspx.vb @@ -73,7 +73,7 @@ Partial Class Compras_RepProductosServiciosDetalle Private Sub InicializaValores() Dim Grupo, Proyecto, SubProyecto, Categoria, Clasificacion, PS, Proveedor, Estatus, Usuario, Familia, SubFamilia, TipoActivoFijo, SubTipoActivoFijo, ActivoFijo, TipoGasto As String - Dim Anio, Mes, AnioMes, Fecha, FechaI, FechaF, TipoDocto As String + Dim Anio, Mes, AnioMes, Fecha, FechaI, FechaF, TipoDocto, Deducible As String Grupo = If(Request("GPO") IsNot Nothing AndAlso Request("GPO").ToEntero() > 0, Request("GPO").ToEntero(), -1).ToString Proyecto = If(Request("CveProyecto") IsNot Nothing AndAlso Request("CveProyecto").ToEntero() > 0, Request("CveProyecto").ToEntero(), -1).ToString @@ -105,6 +105,8 @@ Partial Class Compras_RepProductosServiciosDetalle ActivoFijo = If(Request("CveAF") IsNot Nothing AndAlso Request("CveAF").ToEntero() > 0, Request("CveAF").ToEntero(), -1).ToString CveMoneda = If(Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero() > 0, Request("CveMoneda").ToEntero(), -1).ToString.ToEntero TipoDocto = If(Request("TipoDocto") IsNot Nothing, Request("TipoDocto").ToString, "-1").ToString + Deducible = If(Request("Deducible") IsNot Nothing, Request("Deducible").ToString, "-1").ToString + Anio = If(Request("Anio") IsNot Nothing, Request("Anio").ToString, "-1").ToString Mes = If(Request("Mes") IsNot Nothing, Request("Mes").ToString, "-1").ToString AnioMes = If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString @@ -158,6 +160,7 @@ Partial Class Compras_RepProductosServiciosDetalle DdlProveedor.SelectedText = "Todos" End If DdlTipoDocto.SelectedValueExist(TipoDocto) + DdlDeducible.SelectedValueExist(Deducible) DdlEstatus.SelectedValueExist(Estatus) DdlUsuario.SelectedValueExist(Usuario) 'DdlTipoAF.SelectedValueExist(TipoActivoFijo) @@ -359,7 +362,9 @@ Partial Class Compras_RepProductosServiciosDetalle If ObjCompras.GetRepProductosServiciosDetalle(DdlProyecto.SelectedValue.ToEntero, SubProyectos, Categoria, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, FechaI, FechaF, DdlProveedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, - UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlFamilia.SelectedValue.ToEntero, DdlSubFamilia.SelectedValue.ToEntero, TipoAF, SubTipoAF, DdlAF.SelectedValue.ToEntero, CveMoneda, TipoCambio, TCEspecifico:=TCEspecifico, TipoGasto:=TipoGasto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=DdlTipoDocto.SelectedValue) Then + UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlFamilia.SelectedValue.ToEntero, DdlSubFamilia.SelectedValue.ToEntero, TipoAF, SubTipoAF, + DdlAF.SelectedValue.ToEntero, CveMoneda, TipoCambio, TCEspecifico:=TCEspecifico, TipoGasto:=TipoGasto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, + TipoDocto:=DdlTipoDocto.SelectedValue, Deducible:=DdlDeducible.SelectedValue.ToEntero) Then DtDatos = ObjCompras.DtResultados Else DtDatos = Nothing @@ -378,7 +383,7 @@ Partial Class Compras_RepProductosServiciosDetalle Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha) If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then TCEspecifico = TxtEspecifico.Text.ToDouble Else TCEspecifico = -1 - If ObjCompras.GetRepProductosServiciosDetalle(Proyecto, SubProyecto, Categoria, Clasificacion, PS, FechaI, FechaF, Proveedor, Usuario, Estatus, UsuarioActual.CveEmpresa, Grupo, Familia, SubFamilia, TipoActivoFijo, SubTipoActivoFijo, ActivoFijo, CveMoneda, TipoCambio, TCEspecifico:=TCEspecifico, TipoGasto:=TipoGasto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=DdlTipoDocto.SelectedValue) Then + If ObjCompras.GetRepProductosServiciosDetalle(Proyecto, SubProyecto, Categoria, Clasificacion, PS, FechaI, FechaF, Proveedor, Usuario, Estatus, UsuarioActual.CveEmpresa, Grupo, Familia, SubFamilia, TipoActivoFijo, SubTipoActivoFijo, ActivoFijo, CveMoneda, TipoCambio, TCEspecifico:=TCEspecifico, TipoGasto:=TipoGasto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=DdlTipoDocto.SelectedValue, Deducible:=DdlDeducible.SelectedValue.ToEntero) Then DtDatos = ObjCompras.DtResultados Else DtDatos = Nothing diff --git a/Contabilidad/PlantillasPolizasDetalle.aspx.vb b/Contabilidad/PlantillasPolizasDetalle.aspx.vb index 0b773fffc..ec1b8e94a 100644 --- a/Contabilidad/PlantillasPolizasDetalle.aspx.vb +++ b/Contabilidad/PlantillasPolizasDetalle.aspx.vb @@ -252,7 +252,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle If HdnModalidad.Value = "I" Then If CvePlantillaPoliza > 0 Then - If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedItem.ToEntero, TxtOrden.Text.Trim.ToEntero, + If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal, CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then TxtOrden.Text = "" @@ -290,7 +290,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle Else If HdnID.Value.ToEntero <> -1 Then If CvePlantillaPoliza > 0 Then - If ObjPlantillaPolizaDetalle.UpdateConta_PlantillasPolizasDetalle(DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedItem.ToEntero, TxtOrden.Text.Trim.ToEntero, + If ObjPlantillaPolizaDetalle.UpdateConta_PlantillasPolizasDetalle(DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, HdnID.Value.ToEntero, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal, CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) @@ -390,7 +390,6 @@ Partial Class Contabilidad_PlantillasPolizasDetalle If Con.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then dtt = Con.DtResultados End If - DdlCtaContable.Visible = False Dim drr As DataRow = dtt.FiltroPrimero(String.Format("CveConceptoAdmin={0}", DdlConcepto.SelectedValue)) If drr IsNot Nothing Then @@ -399,6 +398,12 @@ Partial Class Contabilidad_PlantillasPolizasDetalle LblCuenta.Text = "" End If + DdlCuentas.Items.Clear() + DdlCuentas.DataSource = dtt + DdlCuentas.DataBind() + DdlCuentas.Visible = True + DdlCtaContable.Visible = False + dtt.Dispose() Con.Dispose() End If diff --git a/Contabilidad/RegPrePoliza1.aspx.vb b/Contabilidad/RegPrePoliza1.aspx.vb index 24a9d6da5..2dbc8e945 100644 --- a/Contabilidad/RegPrePoliza1.aspx.vb +++ b/Contabilidad/RegPrePoliza1.aspx.vb @@ -857,9 +857,9 @@ Partial Class ContabilidadC_RegPrePoliza Next If CvePeriodo > 0 Then - If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then - MsgError = "No se pudo actualizar el periodo de la nómina" - End If + 'If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then + ' MsgError = "No se pudo actualizar el periodo de la nómina" + 'End If End If If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index fa0bebecb..1868ddeed 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -343,7 +343,8 @@
+ DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta, ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones" + Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None"> Cuenta @@ -582,10 +583,23 @@   - + + + + + + - + + + + + + + + + @@ -751,7 +765,7 @@ SubProyecto:
-
+

@@ -769,7 +783,7 @@ Cargo:
-
+
@@ -777,7 +791,7 @@ Abono:
-
+
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 2b9d9ec0a..e9f305103 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -188,6 +188,15 @@ Partial Class ContabilidadC_RegPrePolizaS End Set End Property + Public Property IDMovEditar As Integer + Get + Return CType(ViewState("IDMovEditar"), Integer) + End Get + Set(value As Integer) + ViewState("IDMovEditar") = value + End Set + End Property + Public Property TipoPoliza As String Get Return CType(ViewState("TipoPoliza"), String) @@ -317,7 +326,16 @@ Partial Class ContabilidadC_RegPrePolizaS .Add("CveConceptoContable", Type.GetType("System.Int32")) .Add("IdCtaContable", Type.GetType("System.Int32")) .Add("ConceptoContable", Type.GetType("System.String")) - .Add("CveCuenta", Type.GetType("System.Int32")) + .Add("CveCuenta", Type.GetType("System.Int32")) + .Add("ContadoTipoTransaccion", Type.GetType("System.Int32")) + .Add("ContadoCuenta", Type.GetType("System.Int32")) + .Add("ContadoNumeroFolio", Type.GetType("System.String")) + .Add("ContadoImporte", Type.GetType("System.Double")) + .Add("ContadoBeneficiario", Type.GetType("System.String")) + .Add("ContadoObservaciones", Type.GetType("System.String")) + .Add("Modificado", Type.GetType("System.Boolean")) + + End With End Sub @@ -422,7 +440,6 @@ Partial Class ContabilidadC_RegPrePolizaS End If ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza) - DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") GvPrePoliza.DataSource = DtMovimientos GvPrePoliza.DataBind() @@ -453,8 +470,6 @@ Partial Class ContabilidadC_RegPrePolizaS End If End If - - divDatosPrincipales.Visible = False divObservaciones.Visible = False UPMovs.Visible = False @@ -523,7 +538,9 @@ Partial Class ContabilidadC_RegPrePolizaS If CveConceptoContable.Contiene(30, 204) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) 'e.Row.FCHyperLink("HlReferencia").NavigateUrl = CveConceptoContable - + If e.Row.DBCampo("Modificado") Then + e.Row.FCCheckBox("chkModificado").Checked = True + End If End If If e.Row.RowType = DataControlRowType.Header Then @@ -820,10 +837,10 @@ Partial Class ContabilidadC_RegPrePolizaS If e.Row.DataKey("CveConcepto").ToEntero.Contiene(30) Then e.Row.FCLinkButton("ImgBancos").Visible = True - - If CveTipoTransaccion > 0 And CveCuenta > 0 And Folio.Length > 0 And ImporteDocumento > 0 And Beneficiario.Length > 0 Then - e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green" - End If + If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And + e.Row.DataKey("ContadoImporte").ToEntero > 0 And e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then + e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green" + End If End If End If End Sub @@ -872,22 +889,25 @@ Partial Class ContabilidadC_RegPrePolizaS Dim TipoMovto As Boolean = False Dim IdCtaContable As Integer = 0 - 'Registra movimieno bancario - If CveConcepto = 30 Then - CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario" - If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then - FolioIE = ObjIE.Folio - End If - End If - - 'inserto las compras que voy a pagarDdlSaldos - For Each gvr As GridViewRow In GvMov.Rows - 'If gvr.DataKey("IDCuenta").ToEntero > 0 Then - ' IdCtaContable = gvr.DataKey("IDCuenta") - 'End If + For Each gvr As GridViewRow In GvMov.Rows + 'If gvr.DataKey("IDCuenta").ToEntero > 0 Then + ' IdCtaContable = gvr.DataKey("IDCuenta") + 'End If + + 'Registra movimieno bancario + If gvr.DataKey("CveConcepto").ToEntero = 30 Then + + CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFecha.Text, gvr.DataKey("ContadoNumeroFolio").ToString, + gvr.DataKey("ContadoBeneficiario").ToString, gvr.DataKey("ContadoImporte").ToString.ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "", + False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario" + If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then + FolioIE = ObjIE.Folio + End If + End If + If gvr.DataKey("TipoMovto").ToDouble > 0 Then Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble @@ -897,9 +917,9 @@ Partial Class ContabilidadC_RegPrePolizaS TipoMovto = False End If - If CveConcepto <> 30 Then + If gvr.DataKey("CveConcepto").ToEntero <> 30 Then - If CveConcepto = 41 Then + If gvr.DataKey("CveConcepto").ToEntero = 41 Then CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero Else CveIE = -1 @@ -927,7 +947,10 @@ Partial Class ContabilidadC_RegPrePolizaS Else MsgError = "No se pudo insertar el detalle de la póliza2" Exit For - End If + End If + End If + If CveIE > 0 AndAlso gvr.DataKey("CveConcepto").ToEntero = 30 Then + MensajeAlert.AppendFormat("

Folio Bancario: {1}", CveIE, FolioIE) End If Next @@ -967,7 +990,6 @@ Partial Class ContabilidadC_RegPrePolizaS If MsgError = "" Then 'MENSAJE IE If CveIE Then - MensajeAlert.AppendFormat("

Folio Bancario: {1}", CveIE, FolioIE) Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()") Else Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()") @@ -1137,7 +1159,7 @@ Partial Class ContabilidadC_RegPrePolizaS End Sub Private Sub CargaCtaContableE() Dim ObjConta As New ClsContabilidad - If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then + If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then DdlCtaContableE.DataSource = ObjConta.DtResultados End If ObjConta.Dispose() @@ -1244,7 +1266,7 @@ Partial Class ContabilidadC_RegPrePolizaS If DtMovimientos Is Nothing Then CreaDT() If CvePrePoliza > 0 Then Dim dr As DataRow = DtMovimientos.NewRow - dr("IdCtaContable") = -1 'DdlCtaContableE.SelectedValue + dr("IdCtaContable") = DdlCtaContableE.SelectedValue dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue dr("Concepto") = TxtConceptoE.Text @@ -1261,10 +1283,9 @@ Partial Class ContabilidadC_RegPrePolizaS dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, "")) + dr("Modificado") = True - TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbonoE.Text.ToDouble).ToString.FormatoNumero - TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargoE.Text.ToDouble).ToString.FormatoNumero DtMovimientos.Rows.Add(dr) DtMovimientos.AcceptChanges() @@ -1272,7 +1293,12 @@ Partial Class ContabilidadC_RegPrePolizaS GvPrePoliza.DataSource = DtMovimientos GvPrePoliza.DataBind() UpPrePoliza.Update() - End If + End If + + TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero + TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero + UpTotalCargo.Update() + UpTotalAbono.Update() Else 'Dim dr As DataRow = DtMovimientos.NewRow 'Dim CodigoCuenta As String = "" @@ -1325,7 +1351,7 @@ Partial Class ContabilidadC_RegPrePolizaS If Rows.Count > 0 Then Dim dr As DataRow = Rows(0) - dr("IdCtaContable") = -1 'DdlCtaContableE.SelectedValue + dr("IdCtaContable") = DdlCtaContableE.SelectedValue dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue dr("Concepto") = TxtConceptoE.Text @@ -1342,6 +1368,8 @@ Partial Class ContabilidadC_RegPrePolizaS dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, "")) dr("CveCuenta") = DdlCtaContableE.SelectedValue.ToEntero dr("CodigoNombreCuenta") = DdlCtaContableE.SelectedItem.Text + dr("Modificado") = True + 'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnConceptoContable").Value = DdlConceptosContablesE.SelectedValue.ToEntero 'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnProveedor").Value = DdlProveedoresE.SelectedValue.ToEntero @@ -1362,8 +1390,7 @@ Partial Class ContabilidadC_RegPrePolizaS dr("Cargo") = "".ToDouble End If - TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbonoE.Text.ToDouble).ToString.FormatoNumero - TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargoE.Text.ToDouble).ToString.FormatoNumero + DtMovimientos.AcceptChanges() GvPrePoliza.EditIndex = -1 @@ -1372,11 +1399,17 @@ Partial Class ContabilidadC_RegPrePolizaS GvPrePoliza.DataBind() UpPrePoliza.Update() End If - GvPrePoliza.Columns(11).Visible = True + GvPrePoliza.Columns(11).Visible = True + GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True - GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True + TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero + TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero + UpTotalCargo.Update() + UpTotalAbono.Update() + End If - End If + End If + UpPrePoliza.Update() RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal") @@ -1549,8 +1582,20 @@ Partial Class ContabilidadC_RegPrePolizaS CargaTipoTransaccion("Ing") Else CargaTipoTransaccion("Egs") - End If - + End If + + Dim IdMov As Integer = GvRow.DataKey("IdMov").ToString.ToEntero + Dim Rows As DataRow() = DtMovimientos.Select("IdMov = " & IdMov) + IDMovEditar = IdMov + + If Rows.Count > 0 Then + Dim dr As DataRow = Rows(0) + DdlTipoTransaccion.SelectedValueExist(dr("ContadoTipoTransaccion").ToString.ToEntero) + DdlCuenta.SelectedValueExist(dr("ContadoCuenta").ToString.ToEntero) + TxtDocumentoFolio.Text = dr("ContadoNumeroFolio").ToString + TxtDocumentoObservaciones.Text = dr("ContadoObservaciones").ToString + TxtDocumentoBeneficiario.Text = dr("ContadoBeneficiario").ToString + End If TxtDocumentoImporte.Text = If(GvRow.FCTextBox("TxtAbono").Text = "", GvRow.FCTextBox("TxtCargo").Text.FormatoNumero, GvRow.FCTextBox("TxtAbono").Text.FormatoNumero) UpBancos.Update() @@ -1568,14 +1613,31 @@ Partial Class ContabilidadC_RegPrePolizaS DdlCuenta.DataBind() DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1")) End Sub - Private Sub BtnContado_Click(sender As Object, e As EventArgs) Handles BtnContado.Click - CveConcepto = 30 - CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero - CveCuenta = DdlCuenta.SelectedValue.ToEntero - Folio = TxtDocumentoFolio.Text - ImporteDocumento = TxtDocumentoImporte.Text.ToDecimal - Observaciones = TxtDocumentoObservaciones.Text - Beneficiario = TxtDocumentoBeneficiario.Text + Private Sub BtnContado_Click(sender As Object, e As EventArgs) Handles BtnContado.Click + Dim Rows As DataRow() = DtMovimientos.Select("IdMov = " & IDMovEditar) + + If Rows.Count > 0 Then + Dim dr As DataRow = Rows(0) + + + dr("ContadoTipoTransaccion") = DdlTipoTransaccion.SelectedValue.ToEntero + dr("ContadoCuenta") = DdlCuenta.SelectedValue.ToEntero + dr("ContadoNumeroFolio") = TxtDocumentoFolio.Text + dr("ContadoImporte") = TxtDocumentoImporte.Text.ToDecimal + dr("ContadoBeneficiario") = TxtDocumentoBeneficiario.Text + dr("ContadoObservaciones") = TxtDocumentoObservaciones.Text + End If + DtMovimientos.AcceptChanges() + GvMov.DataSource = DtMovimientos + GvMov.DataBind() + 'CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero + 'CveCuenta = DdlCuenta.SelectedValue.ToEntero + 'Folio = TxtDocumentoFolio.Text + 'ImporteDocumento = TxtDocumentoImporte.Text.ToDecimal + 'Observaciones = TxtDocumentoObservaciones.Text + 'Beneficiario = TxtDocumentoBeneficiario.Text + + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal")) GvMov.Rows(RowIndex).FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green" UPMovs.Update() @@ -1844,6 +1906,8 @@ Partial Class ContabilidadC_RegPrePolizaS .Referencia = "", .Concepto = "", .SubProyecto = row.Item("SubProyecto"), + .Folio = "", + .TipoTransferencia = "", .CveConceptoContable = row.Item("CveConcepto"), .CveSubProyecto = IIf(row.Item("CveSubProyecto").ToString.ToEntero > 0, row.Item("CveSubProyecto"), -1), .IdCtaContable = IIf(row.Item("IdCtaContable").ToString.ToEntero > 0, row.Item("IdCtaContable"), -1), @@ -1861,10 +1925,10 @@ Partial Class ContabilidadC_RegPrePolizaS For i = 0 To columnCount worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1)) Next - worksheet.Columns("I").Hidden = True - worksheet.Columns("J").Hidden = True worksheet.Columns("K").Hidden = True worksheet.Columns("L").Hidden = True + worksheet.Columns("M").Hidden = True + worksheet.Columns("N").Hidden = True NombreArchivo = DdlPlantilla2.SelectedItem.Text.ToString @@ -1928,6 +1992,14 @@ Partial Class ContabilidadC_RegPrePolizaS Alert("El nombre de la octava columna debe ser 'SubProyecto'. Favor de corregirlo", TipoMensaje.MsgError) Exit Sub End If + If Not dt.Columns(8).ColumnName = "Folio" Then + Alert("El nombre de la novena columna debe ser 'Folio'.Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + If Not dt.Columns(9).ColumnName = "TipoTransferencia" Then + Alert("El nombre de la decima columna debe ser 'TipoTransferencia'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If End If If Not ErrorArchivo Then @@ -1950,20 +2022,47 @@ Partial Class ContabilidadC_RegPrePolizaS Dim CveConceptoContable As Integer = GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("CveConceptoContable", String.Format("ConceptoContable ='{0}'", Row("ConceptoAdministrativo"))).ToEntero ' Row("CveConceptoContable").ToString.ToEntero 'Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero Dim CveClasificacion As Integer = -1 - Dim CveCuenta As Integer = -1 + Dim CveCuentaExcel As Integer = -1 Dim ObjConta2 As New ClsContabilidad - If ObjConta2.GetCuentas(-1, Row("Cuenta").ToString.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then - CveCuenta = ObjConta2.DtResultados.FiltroPrimeroValor("CveCuenta", "").ToEntero + Dim FolioExcel As Integer = -1 + Dim TipoMov As Integer = -1 + Dim CveBancoCuenta As Integer = -1 + If ObjConta2.GetCuentas(-1, Row("Cuenta").ToString.Replace("-", "").Trim, 1, UsuarioActual.CveEmpresa) Then + CveCuentaExcel = ObjConta2.DtResultados.FiltroPrimeroValor("CveCuenta", "").ToEntero NombreCuenta = ObjConta2.DtResultados.FiltroPrimeroValor("CtaCodigo", "") End If ObjConta2.Dispose() - If CveCuenta <= 0 Then + If CveCuentaExcel <= 0 AndAlso CveConceptoContable <> 30 Then ' concepto 30-Bancos, tomará la cuetna de las especificaciones que se hagan enel modal Alert(String.Format("La cuenta {0} no se reconoció, favor de verificar el archivo.", Row("Cuenta").ToString)) DtMovimientos.Clear() Exit For End If + If CveConceptoContable = 30 Then + Dim objconta3 As New ClsContabilidad + objconta3.GetConta_CuentasDataContabilidad(CveCuentaExcel, UsuarioActual.CveEmpresa) + If objconta3.DtResultados.Rows.Count > 0 Then + Dim rowcc As DataRow = objconta3.DtResultados.Rows(0) + CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero() + DdlCuenta.SelectedValue = CveBancoCuenta + End If + TipoMov = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveTipoTransaccion", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero + FolioExcel = Row("Folio").ToString + CveTipoTransaccion = TipoMov + CveCuenta = CveBancoCuenta + Folio = FolioExcel + ImporteDocumento = IIf(Row("Abono").ToString.ToEntero > 0, Row("Abono").ToString, Row("Cargo").ToString) + Observaciones = Row("Referencia").ToString + Beneficiario = Row("Concepto").ToString + If Not TipoMov > 0 Then + Alert(String.Format("El Tipo de Transferencia no fue encontrado:
Tipo Transferencia: {0}
Folio: {1}
Importe: {2} ", Row("TipoTransferencia").ToString(), FolioExcel, ImporteDocumento), TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + End If + + 'sino viene el cveconcepto, busca por le nombre del concepto If CveConceptoContable = 0 Then Alert(String.Format("El concepto {0} no se reconoció, favor de verificar el archivo.", Row("ConceptoAdministrativo"))) @@ -2008,8 +2107,14 @@ Partial Class ContabilidadC_RegPrePolizaS dr("CveClasificacion") = CveClasificacion dr("CveCliente") = -1 dr("CveVenta") = -1 - dr("CveCuenta") = CveCuenta + dr("CveCuenta") = CveCuentaExcel + dr("ContadoTipoTransaccion") = CveTipoTransaccion + dr("ContadoCuenta") = CveCuenta + dr("ContadoNumeroFolio") = Folio + dr("ContadoImporte") = ImporteDocumento + dr("ContadoBeneficiario") = Beneficiario + dr("ContadoObservaciones") = Observaciones DtMovimientos.Rows.Add(dr) DtMovimientos.AcceptChanges() @@ -2027,6 +2132,7 @@ Partial Class ContabilidadC_RegPrePolizaS End Try End If End Sub + #End Region #Region "Paquete Egresos" diff --git a/Contabilidad2/RepEstadoActividades.aspx.vb b/Contabilidad2/RepEstadoActividades.aspx.vb index 0141383de..c9d8051e6 100644 --- a/Contabilidad2/RepEstadoActividades.aspx.vb +++ b/Contabilidad2/RepEstadoActividades.aspx.vb @@ -248,7 +248,7 @@ Partial Class AC_RepEstadoActividades 'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray 'e.Row.ControlStyle.ForeColor = Drawing.Color.White e.Row.ControlStyle.Font.Bold = True - ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then + ElseIf e.Row.DBCampo("CtaMayor").ToString.Contiene("3", "4") Then 'e.Row.CssClass = "SubTotales3" e.Row.ControlStyle.Font.Bold = True End If @@ -277,7 +277,7 @@ Partial Class AC_RepEstadoActividades 'e.Row.ControlStyle.BackColor = Drawing.Color.LightGray 'e.Row.ControlStyle.ForeColor = Drawing.Color.White e.Row.ControlStyle.Font.Bold = True - ElseIf e.Row.DBCampo("CtaMayor").ToString.ToEntero = 3 Then + ElseIf e.Row.DBCampo("CtaMayor").ToString.Contiene("3", "4") Then 'e.Row.CssClass = "SubTotales" e.Row.ControlStyle.Font.Bold = True End If diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index 9826998e5..484dc6af8 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -4501,7 +4501,7 @@ Partial Class Contratos_ContratoObra { .ColumnHeaders = True, .StartRow = 0, - .NumberOfColumns = 5, + .NumberOfColumns = 6, .NumberOfRows = worksheet.Rows.Count, .Resolution = ColumnTypeResolution.AutoPreferStringCurrentCulture }) @@ -4605,8 +4605,6 @@ Partial Class Contratos_ContratoObra If StrArray.Length > 0 Then If CBool(StrArray(0)) = True Then CvePS = StrArray(1).ToEntero - - End If End If @@ -4614,8 +4612,13 @@ Partial Class Contratos_ContratoObra Dim ObjPS As New ClsProductosServicios + Dim CveClasificacion As Integer + If DrowPS.Table.Columns.Contains("Clasificacion") Then + CveClasificacion = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DrowPS("Clasificacion").ToString.Trim)).ToEntero + Else + CveClasificacion = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveClasificacion").ToString.ToEntero 'toma el primero + End If - Dim CveClasificacion As Integer = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveClasificacion").ToString.ToEntero Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"UnidadMedida = '{ DrowPS("UnidadMedida").ToString}' OR Abreviatura = '{ DrowPS("UnidadMedida").ToString}'").ToString.ToEntero If Not CveUnidadMedida > 0 Then diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc index c50c98442..fcdeda3a6 100644 --- a/Empresas/141/Formatos/Factura.rdlc +++ b/Empresas/141/Formatos/Factura.rdlc @@ -2165,7 +2165,7 @@ - Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Tierra Blanca (667) 716-6997 - Sanalona (667) 713-667 + Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Guamuchil (673) 688-0108 - Sanalona (667) 713-667 - - - - - - Textbox15 - - - #4f81bd - Middle - 2pt - 2pt - - - - - - - - true - true - - - - - Unidad - - - - - - - Textbox33 - - - #4f81bd - Middle - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox17 - - - #4f81bd - Middle - 2pt - 2pt - - - - - - - - true - true - - - - - P/U - - - - - - - Textbox21 - - - #4f81bd - Middle - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox23 - - - #4f81bd - Middle - 2pt - 2pt - - - - - - - - 0.25521in - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - PU - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value*Fields!PU.Value - - - - - - - PU2 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.03125in - - - - - true - true - - - - - - - - - - - - Textbox71 - - - - #1414ff - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #1414ff - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #1414ff - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox74 - - - - #1414ff - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox75 - - - - #1414ff - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - After - - - - - - Before - - - - DsOC - 2.02937in - 0.11465cm - 0.5in - 7.86284in - - - - - - true - true - - - - - Tipo - - - - - - - Textbox3 - 0.912in - 5.662in - 0.5cm - 2.24597in - 1 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha y hora de emisión - - - - - - - - - - - - - - - - Textbox3 - 0.46414in - 5.662in - 0.5cm - 2.24597in - 2 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Serie.Value - - - - - - - - - =Parameters!Folio.Value - - - - - - - Textbox3 - 0.22455in - 5.662in - 0.60856cm - 2.24597in - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - FACTURA - - - - - - - Textbox3 - 0.0412cm - 5.662in - 0.5cm - 2.24597in - 4 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Empresa.Value - - - - - - - - - GralesR.F.C - - - - =Parameters!RFC.Value - - - - - - - Textbox4 - 1.78362in - 0.46414in - 3.96172in - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - SON: ( - - - - =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - ) - - - - - - - ImporteLetra - 2.53743in - 1.39103in - 0.23264in - 4.73657in - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SelloCFDI.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SelloSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!QR.Value - FitProportional - 4.61035in - 0.03124in - 1.46528in - 1.56699in - 10 - - - - - - External - - FitProportional - 0.2607cm - 0.03093cm - 2.88998cm - 4.56434cm - 11 - - - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox3 - 0.66099in - 5.662in - 0.25114in - 2.24597in - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Tipo.Value - - - - - - - Textbox3 - 1.10885in - 5.662in - 0.20721in - 2.24597in - 13 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Domicilio Fiscal - - - - - - - - - =Parameters!DomicilioExpedicion.Value - - - - - - - Textbox10 - 0.46414in - 1.87861in - 0.69679in - 1.65152in - 14 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Lugar de Expedición - - - - - - - - - =Parameters!DomicilioExpedicion.Value - - - - - - - Textbox10 - 0.46414in - 3.84822in - 0.69679in - 1.786in - 15 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteNombre.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteDireccion.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Cuidad - - - - - - - #4f81bd - - 1.25pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteLugar.Value - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sub Total 1 - - - - - - - Textbox19 - 2.55788in - 6.15538in - 0.21875in - 0.84815in - 22 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Descuento - - - - - - - Textbox19 - 2.77396in - 6.15538in - 0.21875in - 0.84815in - 23 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Amort. Ant - - - - - - - Textbox19 - 2.99271in - 6.15538in - 0.21875in - 0.84815in - 24 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sub Total 2 - - - - - - - Textbox19 - 3.21146in - 6.15538in - 0.21875in - 0.84815in - 25 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - IVA (16%) - - - - - - - Textbox19 - 3.43021in - 6.15538in - 0.21875in - 0.84815in - 26 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total - - - - - - - Textbox19 - 3.64584in - 6.15538in - 0.21875in - 0.84815in - 27 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIF(Parameters!SubTotal.Value.ToString="","-",Parameters!SubTotal.Value) - - - - - - - Textbox42 - 2.5756in - 7.00353in - 0.19253in - 0.89055in - 28 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIF(Parameters!Amortizacion.Value.ToString="","-",Parameters!Amortizacion.Value) - - - - - - - Textbox42 - 2.97299in - 7.00353in - 0.22222in - 0.89054in - 29 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Parameters!Descuento.Value.ToString = "", "-",Parameters!Descuento.Value) - - - - - - - Textbox42 - 2.76813in - 7.00353in - 0.20486in - 0.89054in - 30 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIF(Parameters!SubTotal2.Value.ToString="","-",Parameters!SubTotal2.Value) - - - - - - - Textbox42 - 3.19521in - 7.00353in - 0.23803in - 0.89054in - 31 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Parameters!IVA.Value.ToString="","-",Parameters!IVA.Value) - - - - - - - Textbox42 - 3.43324in - 7.00353in - 0.2126in - 0.89054in - 32 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Total.Value - - - - - - - Textbox42 - 3.64584in - 7.00353in - 0.21875in - 0.89054in - 33 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Importe con letra: - - - - - - - Textbox19 - 2.53316in - 0.03124in - 0.2053in - 1.35979in - 34 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Forma de pago: - - - - - - - Textbox19 - 2.73851in - 0.03124in - 0.22222in - 1.35979in - 35 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sello digital del CFDI: - - - - - - - Textbox19 - 2.96073in - 0.03124in - 0.61916in - 1.35979in - 36 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sello del SAT: - - - - - - - Textbox19 - 3.57989in - 0.03124in - 0.30208in - 1.36417in - 37 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Cadena original del complemento de certificación digital del SAT: - - - - - - - Textbox19 - 3.92015in - 0.03056in - 0.21875in - 7.87741in - 38 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FormaPago.Value - - - - - - - ImporteLetra - 2.73851in - 1.39103in - 0.20833in - 4.73657in - 39 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio Fiscal: - - - - - - - Textbox54 - 4.59646in - 1.65378in - 0.18056in - 4.388in - 40 - - - - - - - White - - - - - - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - No. Serie del Certificado del SAT: - - - - - - - Textbox54 - 4.79091in - 1.65378in - 0.18056in - 4.388in - 41 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha y Hora de certificación: - - - - - - - Textbox54 - 5.00196in - 1.65378in - 0.19444in - 4.40189in - 42 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Certificado del Contribuyente: - - - - - - - Textbox54 - 5.20757in - 1.65378in - 0.19445in - 4.40189in - 43 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SerieCertificadoSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaCertificacion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CertificadoContribuyente.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Regímen: Regímen General de Ley Personas Morales; Condiciones de pago: - - - - =Parameters!CondicionPago.Value - - - - ; Método de Pago: - - - - =Parameters!MetodoPago.Value - - - - ; Num. Cta Pago: - - - - =Parameters!NumCta.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Éste documento es una representacion impresa de un CFDi - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - P A G A R E con Folio - - - - =Parameters!Serie.Value - - - - - - - - - =Parameters!Folio.Value - - - - Por éste pagare prometo (emos) pagar incondicionalmente a la orden de - - - - =Parameters!Empresa.Value - - - - a su vencimiento el - - - - =Parameters!Vencimiento.Value - - - - , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ - - - - =Parameters!Total.Value - - - - SON: ( - - - - =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - ). Valor recibido a mi (nuestra) entera satisfaccion. la falta de pago de éste documento a su vencimiento dará derecho a - - - - =Parameters!Empresa.Value - - - - o tenedor, desde el dia siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionén. Lugar y Fecha de Suscripcion: Hermosillo, Sonora a - - - - =Parameters!Fecha.Value - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteNombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteDireccion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Acepto de conformidad - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.26711cm - 0.05457cm - 0cm - 0.57653cm - 7 - - - - - - 0.26711cm - 0.69053cm - 0cm - 0.57653cm - 8 - - - - - - 0.26711cm - 1.32627cm - 0cm - 0.57653cm - 9 - - - - - - 0.26711cm - 1.63234cm - 0cm - 0.57653cm - 10 - - - - - - 0.26711cm - 2.2683cm - 0cm - 0.57653cm - 11 - - - - - - 0.26711cm - 2.90404cm - 0cm - 0.57653cm - 12 - - - - - - 0.26711cm - 3.57348cm - 0cm - 0.57653cm - 13 - - - - - - 0.26711cm - 4.20944cm - 0cm - 0.57653cm - 14 - - - - - - 0.26711cm - 4.84518cm - 0cm - 0.57653cm - 15 - - - - - - 0.26711cm - 5.15125cm - 0cm - 0.57653cm - 16 - - - - - - 0.26711cm - 5.78721cm - 0cm - 0.57653cm - 17 - - - - - - 0.26711cm - 6.42295cm - 0cm - 0.57653cm - 18 - - - - - - 0.26711cm - 7.10321cm - 0cm - 0.57653cm - 19 - - - - - - 0.26711cm - 7.73917cm - 0cm - 0.57653cm - 20 - - - - - - 0.26711cm - 8.37491cm - 0cm - 0.57653cm - 21 - - - - - - 0.26711cm - 8.68098cm - 0cm - 0.57653cm - 22 - - - - - - 0.26711cm - 9.31694cm - 0cm - 0.57653cm - 23 - - - - - - 0.26711cm - 9.95268cm - 0cm - 0.57653cm - 24 - - - - - - 0.26711cm - 14.03363cm - 0cm - 0.57653cm - 25 - - - - - - 0.26711cm - 14.66959cm - 0cm - 0.57653cm - 26 - - - - - - 0.26711cm - 15.30533cm - 0cm - 0.57653cm - 27 - - - - - - 0.26711cm - 15.6114cm - 0cm - 0.57653cm - 28 - - - - - - 0.26711cm - 16.24736cm - 0cm - 0.57653cm - 29 - - - - - - 0.26711cm - 16.8831cm - 0cm - 0.57653cm - 30 - - - - - - 0.26711cm - 10.5767cm - 0cm - 0.57653cm - 31 - - - - - - 0.26711cm - 11.21266cm - 0cm - 0.57653cm - 32 - - - - - - 0.26711cm - 11.8484cm - 0cm - 0.57653cm - 33 - - - - - - 0.26711cm - 12.15447cm - 0cm - 0.57653cm - 34 - - - - - - 0.26711cm - 12.79043cm - 0cm - 0.57653cm - 35 - - - - - - 0.26711cm - 13.42617cm - 0cm - 0.57653cm - 36 - - - - - - 0.26711cm - 18.37745cm - 0cm - 0.57653cm - 37 - - - - - - 0.26711cm - 19.01341cm - 0cm - 0.57653cm - 38 - - - - - - 0.26711cm - 17.71435cm - 0cm - 0.57653cm - 39 - - - - - - true - 18.57368cm - 0.09423cm - 4.36819cm - 20.04854cm - 50 - - - - - - - - true - true - - - - - CFDI Relacionados - - - - - - - Textbox5 - 0.11382cm - 0.05336cm - 0.54004cm - 20.00281cm - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo Relación: - - - - - - - Textbox29 - 0.83025cm - 4.33636cm - 0.41981cm - 5.31841cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!TipoRelacionTexto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.42456cm - - - 2.05585cm - - - 3.03631cm - - - 7.7847cm - - - - - 0.44125cm - - - - - true - true - - - - - Folio - - - - - - - Textbox10 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox21 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio Fiscal - - - - - - - Textbox11 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.41479cm - - - - - true - true - - - - - =Fields!SerieFolio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet4 - 1.39643cm - 2.83462cm - 0.85604cm - 15.30142cm - 3 - - - - - - true - true - - - - - VERSION 3.3 - - - - - - - Textbox5 - 2.28775cm - 17.08931cm - 0.6cm - 3.06609cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - 15.56744cm - 0.07745cm - 2.97096cm - 20.1554cm - 51 - - =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) - - - - - - - 22.94187cm - - - - =Today - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 0.5cm - 1.27cm - + + + + + + Textbox15 + + + #4f81bd + Middle + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad + + + + + + + Textbox33 + + + #4f81bd + Middle + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox17 + + + #4f81bd + Middle + 2pt + 2pt + + + + + + + + true + true + + + + + P/U + + + + + + + Textbox21 + + + #4f81bd + Middle + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox23 + + + #4f81bd + Middle + 2pt + 2pt + + + + + + + + 0.25521in + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value*Fields!PU.Value + + + + + + + PU2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.03125in + + + + + true + true + + + + + + + + + + + + Textbox71 + + + + #1414ff + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #1414ff + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #1414ff + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox74 + + + + #1414ff + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox75 + + + + #1414ff + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + Before + + + + DsOC + 2.02937in + 0.11465cm + 0.5in + 7.86284in + + + + + + true + true + + + + + Tipo + + + + + + + Textbox3 + 0.912in + 5.662in + 0.5cm + 2.24597in + 1 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y hora de emisión + + + + + + + + + + + + + + + + Textbox3 + 0.46414in + 5.662in + 0.5cm + 2.24597in + 2 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Serie.Value + + + + - + + + + =Parameters!Folio.Value + + + + + + + Textbox3 + 0.22455in + 5.662in + 0.60856cm + 2.24597in + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + FACTURA + + + + + + + Textbox3 + 0.0412cm + 5.662in + 0.5cm + 2.24597in + 4 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Empresa.Value + + + + + + + + + GralesR.F.C + + + + =Parameters!RFC.Value + + + + + + + Textbox4 + 1.78362in + 0.46414in + 3.96172in + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + SON: ( + + + + =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + ) + + + + + + + ImporteLetra + 2.53743in + 1.39103in + 0.23264in + 4.73657in + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SelloCFDI.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SelloSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 4.61035in + 0.03124in + 1.46528in + 1.56699in + 10 + + + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.2607cm + 0.03093cm + 2.88998cm + 4.56434cm + 11 + + + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox3 + 0.66099in + 5.662in + 0.25114in + 2.24597in + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Tipo.Value + + + + + + + Textbox3 + 1.10885in + 5.662in + 0.20721in + 2.24597in + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Domicilio Fiscal + + + + + + + + + =Parameters!DomicilioExpedicion.Value + + + + + + + Textbox10 + 0.46414in + 1.87861in + 0.69679in + 1.65152in + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Lugar de Expedición + + + + + + + + + =Parameters!DomicilioExpedicion.Value + + + + + + + Textbox10 + 0.46414in + 3.84822in + 0.69679in + 1.786in + 15 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Dirección + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteDireccion.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cuidad + + + + + + + #4f81bd + + 1.25pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteLugar.Value + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sub Total 1 + + + + + + + Textbox19 + 2.55788in + 6.15538in + 0.21875in + 0.84815in + 22 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Descuento + + + + + + + Textbox19 + 2.77396in + 6.15538in + 0.21875in + 0.84815in + 23 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Amort. Ant + + + + + + + Textbox19 + 2.99271in + 6.15538in + 0.21875in + 0.84815in + 24 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sub Total 2 + + + + + + + Textbox19 + 3.21146in + 6.15538in + 0.21875in + 0.84815in + 25 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + IVA (16%) + + + + + + + Textbox19 + 3.43021in + 6.15538in + 0.21875in + 0.84815in + 26 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total + + + + + + + Textbox19 + 3.64584in + 6.15538in + 0.21875in + 0.84815in + 27 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!SubTotal.Value.ToString="","-",Parameters!SubTotal.Value) + + + + + + + Textbox42 + 2.5756in + 7.00353in + 0.19253in + 0.89055in + 28 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!Amortizacion.Value.ToString="","-",Parameters!Amortizacion.Value) + + + + + + + Textbox42 + 2.97299in + 7.00353in + 0.22222in + 0.89054in + 29 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!Descuento.Value.ToString = "", "-",Parameters!Descuento.Value) + + + + + + + Textbox42 + 2.76813in + 7.00353in + 0.20486in + 0.89054in + 30 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!SubTotal2.Value.ToString="","-",Parameters!SubTotal2.Value) + + + + + + + Textbox42 + 3.19521in + 7.00353in + 0.23803in + 0.89054in + 31 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!IVA.Value.ToString="","-",Parameters!IVA.Value) + + + + + + + Textbox42 + 3.43324in + 7.00353in + 0.2126in + 0.89054in + 32 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox42 + 3.64584in + 7.00353in + 0.21875in + 0.89054in + 33 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Importe con letra: + + + + + + + Textbox19 + 2.53316in + 0.03124in + 0.2053in + 1.35979in + 34 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Forma de pago: + + + + + + + Textbox19 + 2.73851in + 0.03124in + 0.22222in + 1.35979in + 35 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sello digital del CFDI: + + + + + + + Textbox19 + 2.96073in + 0.03124in + 0.61916in + 1.35979in + 36 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sello del SAT: + + + + + + + Textbox19 + 3.57989in + 0.03124in + 0.30208in + 1.36417in + 37 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cadena original del complemento de certificación digital del SAT: + + + + + + + Textbox19 + 3.92015in + 0.03056in + 0.21875in + 7.87741in + 38 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FormaPago.Value + + + + + + + ImporteLetra + 2.73851in + 1.39103in + 0.20833in + 4.73657in + 39 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio Fiscal: + + + + + + + Textbox54 + 4.59646in + 1.65378in + 0.18056in + 4.388in + 40 + + + + + + + White + + + + + + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. Serie del Certificado del SAT: + + + + + + + Textbox54 + 4.79091in + 1.65378in + 0.18056in + 4.388in + 41 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y Hora de certificación: + + + + + + + Textbox54 + 5.00196in + 1.65378in + 0.19444in + 4.40189in + 42 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Certificado del Contribuyente: + + + + + + + Textbox54 + 5.20757in + 1.65378in + 0.19445in + 4.40189in + 43 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaCertificacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CertificadoContribuyente.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Regímen: Regímen General de Ley Personas Morales; Condiciones de pago: + + + + =Parameters!CondicionPago.Value + + + + ; Método de Pago: + + + + =Parameters!MetodoPago.Value + + + + ; Num. Cta Pago: + + + + =Parameters!NumCta.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Éste documento es una representacion impresa de un CFDi + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + P A G A R E con Folio + + + + =Parameters!Serie.Value + + + + - + + + + =Parameters!Folio.Value + + + + Por éste pagare prometo (emos) pagar incondicionalmente a la orden de + + + + =Parameters!Empresa.Value + + + + a su vencimiento el + + + + =Parameters!Vencimiento.Value + + + + , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ + + + + =Parameters!Total.Value + + + + SON: ( + + + + =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + ). Valor recibido a mi (nuestra) entera satisfaccion. la falta de pago de éste documento a su vencimiento dará derecho a + + + + =Parameters!Empresa.Value + + + + o tenedor, desde el dia siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionén. Lugar y Fecha de Suscripcion: Hermosillo, Sonora a + + + + =Parameters!Fecha.Value + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Dirección: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteNombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteDireccion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Acepto de conformidad + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.26711cm + 0.05457cm + 0cm + 0.57653cm + 7 + + + + + + 0.26711cm + 0.69053cm + 0cm + 0.57653cm + 8 + + + + + + 0.26711cm + 1.32627cm + 0cm + 0.57653cm + 9 + + + + + + 0.26711cm + 1.63234cm + 0cm + 0.57653cm + 10 + + + + + + 0.26711cm + 2.2683cm + 0cm + 0.57653cm + 11 + + + + + + 0.26711cm + 2.90404cm + 0cm + 0.57653cm + 12 + + + + + + 0.26711cm + 3.57348cm + 0cm + 0.57653cm + 13 + + + + + + 0.26711cm + 4.20944cm + 0cm + 0.57653cm + 14 + + + + + + 0.26711cm + 4.84518cm + 0cm + 0.57653cm + 15 + + + + + + 0.26711cm + 5.15125cm + 0cm + 0.57653cm + 16 + + + + + + 0.26711cm + 5.78721cm + 0cm + 0.57653cm + 17 + + + + + + 0.26711cm + 6.42295cm + 0cm + 0.57653cm + 18 + + + + + + 0.26711cm + 7.10321cm + 0cm + 0.57653cm + 19 + + + + + + 0.26711cm + 7.73917cm + 0cm + 0.57653cm + 20 + + + + + + 0.26711cm + 8.37491cm + 0cm + 0.57653cm + 21 + + + + + + 0.26711cm + 8.68098cm + 0cm + 0.57653cm + 22 + + + + + + 0.26711cm + 9.31694cm + 0cm + 0.57653cm + 23 + + + + + + 0.26711cm + 9.95268cm + 0cm + 0.57653cm + 24 + + + + + + 0.26711cm + 14.03363cm + 0cm + 0.57653cm + 25 + + + + + + 0.26711cm + 14.66959cm + 0cm + 0.57653cm + 26 + + + + + + 0.26711cm + 15.30533cm + 0cm + 0.57653cm + 27 + + + + + + 0.26711cm + 15.6114cm + 0cm + 0.57653cm + 28 + + + + + + 0.26711cm + 16.24736cm + 0cm + 0.57653cm + 29 + + + + + + 0.26711cm + 16.8831cm + 0cm + 0.57653cm + 30 + + + + + + 0.26711cm + 10.5767cm + 0cm + 0.57653cm + 31 + + + + + + 0.26711cm + 11.21266cm + 0cm + 0.57653cm + 32 + + + + + + 0.26711cm + 11.8484cm + 0cm + 0.57653cm + 33 + + + + + + 0.26711cm + 12.15447cm + 0cm + 0.57653cm + 34 + + + + + + 0.26711cm + 12.79043cm + 0cm + 0.57653cm + 35 + + + + + + 0.26711cm + 13.42617cm + 0cm + 0.57653cm + 36 + + + + + + 0.26711cm + 18.37745cm + 0cm + 0.57653cm + 37 + + + + + + 0.26711cm + 19.01341cm + 0cm + 0.57653cm + 38 + + + + + + 0.26711cm + 17.71435cm + 0cm + 0.57653cm + 39 + + + + + + true + 18.57368cm + 0.09423cm + 4.36819cm + 20.04854cm + 50 + + + + + + + + true + true + + + + + CFDI Relacionados + + + + + + + Textbox5 + 0.11382cm + 0.05336cm + 0.54004cm + 20.00281cm + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo Relación: + + + + + + + Textbox29 + 0.83025cm + 4.33636cm + 0.41981cm + 5.31841cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoRelacionTexto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.42456cm + + + 2.05585cm + + + 3.03631cm + + + 7.7847cm + + + + + 0.44125cm + + + + + true + true + + + + + Folio + + + + + + + Textbox10 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox21 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox11 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet4 + 1.39643cm + 2.83462cm + 0.85604cm + 15.30142cm + 3 + + + + + + true + true + + + + + VERSION 3.3 + + + + + + + Textbox5 + 2.28775cm + 17.08931cm + 0.6cm + 3.06609cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 15.56744cm + 0.07745cm + 2.97096cm + 20.1554cm + 51 + + =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) + + + + + + + 22.94187cm + + + + =Today + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 0.5cm + 1.27cm + @@ -810,6 +811,7 @@ 2pt + true @@ -950,7 +952,6 @@ 2pt - true @@ -1611,49 +1612,7 @@ ReportParameter1 - - - 2 - 4 - - - 0 - 0 - NombreEmpresa - - - 1 - 0 - FechaInicio - - - 0 - 1 - FechaFin - - - 1 - 1 - UsuarioImprimio - - - 0 - 2 - LogoPath - - - 1 - 2 - Filtros - - - 0 - 3 - FechaImprimio - - - - + Cm 40c94aad-a12a-44fb-ab0d-ea36a9656792 \ No newline at end of file diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index c6cce12bd..96c1fc580 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -576,7 +576,7 @@ Partial Class General_SaldosIniciales Dim CveTipoPS As Integer = If(TipoPS.ToUpper = "PRODUCTO", 2, 1) Dim CveClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString.ToEntero Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"UnidadMedida = '{UnidadMedida}' OR Abreviatura = '{UnidadMedida}'").ToString.ToEntero - Dim CveSATPS As Integer = GlobalDTPSATPS.FiltroPrimeroValor("CveSATPS", $"SATClavePS = '{SATClavePS}'").ToString.ToEntero + Dim CveSATPS As Integer = ClsPaginas.GlobalDTPSATPS("-1", CodigoSAT:=SATClavePS).FiltroPrimeroValor("CveSATPS", "").ToEntero Dim CveTamaño As Integer = GlobalDTAcumTamaños.FiltroPrimeroValor("CveTamaño", $"Tamaño = '{Tamaño}' AND CveEmpresa = {UsuarioActual.CveEmpresa}").ToString.ToEntero Dim CveClasificacion2 As Integer = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion2}'").ToString.ToEntero Dim CveClasificacionDetalle As Integer = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CveClasificacionDetalle", $"ClasificacionDetalle = '{Linea}'").ToString.ToEntero @@ -1233,14 +1233,14 @@ Partial Class General_SaldosIniciales Dim Folio As Integer = Row("Folio").ToString.ToEntero Dim Fecha As Date = Row("Fecha").ToString.ToDate Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString.ToDate - Dim ImpuestoLocal As Double = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString.ToDouble, 0.0) + Dim ImpuestoLocal As Decimal = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString.ToDecimal, 0D) Dim Amortizacion As Double = If(dt.Columns.Contains("Amort.Ant"), Row("Amort.Ant").ToString.ToDouble, 0.0) Dim SubTotal As Decimal = Row("SubTotal").ToString.ToDecimal Dim IVA As Decimal = Row("IVA").ToString.ToDecimal Dim Total As Decimal = Row("Total").ToString.ToDecimal Dim Saldo As Decimal = Row("Saldo").ToString.ToDecimal Dim CveCliente As Integer = DtClientes.FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero - Dim RetIVA As Double = Row("Ret IVA").ToString.ToDouble + Dim RetIVA As Decimal = Row("Ret IVA").ToString.ToDecimal Dim RetISR As Double = Row("Ret ISR").ToString.ToDouble Dim Moneda As String = Row("Moneda").ToString Dim TipoCambio As String = Row("Tipo Cambio").ToString @@ -1249,7 +1249,6 @@ Partial Class General_SaldosIniciales Dim CveVendedor As Integer = 0 Dim IEPS As Decimal = 0 'Row("IEPS").ToString.ToDecimal Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString.ToEntero - Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString.ToDecimal, 0) Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString, "") Dim PorcentajeIVA As Decimal = If(dt.Columns.Contains("PorcentajeIVA"), Round(Row("PorcentajeIVA").ToString.ToDecimal, 4), 0) @@ -1300,7 +1299,7 @@ Partial Class General_SaldosIniciales 0, 0, 0, FechaVencimiento, Fecha, "", "", Fecha, CveVendedor, Folio2, "", "", 0, 0, 0, "-1".ToDate, "-1".ToDate, "-1".ToDate, -1, -1, 0, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Serie:=Serie, CveSubProyecto:=Sucursal.ToEntero, CveSubProyectoEjecucion:=Sucursal.ToEntero, CveSubProyectoCobranza:=Sucursal.ToEntero, IEPS:=IEPS, - ObservacionesAlmacen:=Transaccion, Entrega:=CodCliente, ImpuestoLocal:=ImpuestosLocales) Then + ObservacionesAlmacen:=Transaccion, Entrega:=CodCliente, ImpuestoLocal:=ImpuestoLocal) Then ErrorVentas = True Exit For End If @@ -1329,14 +1328,22 @@ Partial Class General_SaldosIniciales If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaComplementaria = True 'PrePólizaDetalle - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString, 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero) Then ErrorVentas = True : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, ConceptoContable, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString, 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, ConceptoContable, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For If IVA > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For End If 'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString, 38, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For + If RetIVA > 0 Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, Folio.ToString, 8, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=RetIVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For + End If + If ImpuestoLocal > 0 Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImpuestoLocal, Folio.ToString, 27, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImpuestoLocal, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For + End If + + If UsaComplementaria Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total * TipoCambio.ToDecimal - Total, Folio.ToString, 203, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, ImporteMX:=Total * TipoCambio.ToDecimal - Total, TipoCambio:=TipoCambio.ToDecimal) Then ErrorVentas = True : Exit For End If diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 11ada3319..2a458ea07 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -1331,7 +1331,7 @@ Partial Class Inventarios_EntradasSalidas tCveSubProyecto = drA2("CveSubProyecto").ToString.ToEntero End If - If UsuarioActual.CveEmpresa = 119 AndAlso Not tCveSubProyecto.Contiene(10276) Then + If UsuarioActual.CveEmpresa = 119 AndAlso Not tCveSubProyecto.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347)) Then FechaCaducidadVal = MinFecha FechaCaducidad = MinFecha Lote = "" @@ -3845,16 +3845,16 @@ Partial Class Inventarios_EntradasSalidas Dim ObjInventario As New ClsInventarios Dim CveUM As Integer Dim Mensaje As String = "" - Dim FechaCaducidad As Date - Dim lote As String + 'Dim FechaCaducidad As Date + 'Dim lote As String If ObjProductosServicios.GetPS(DdlPSSalida.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then If ObjProductosServicios.DtResultados.Rows.Count > 0 Then CveUM = ObjProductosServicios.CveUnidadMedida.ToString.ToEntero End If End If - FechaCaducidad = If(ObjProductosServicios.AplicaCaducidad, TxtCaducidadSalida.Text.ToDate, MinFecha) - lote = If(ObjProductosServicios.AplicaLote, TxtLoteSalida.Text.ToString, "-1") + Dim Lote As String = If(TxtLoteSalida.Text = "", "", TxtLoteSalida.Text) + Dim FechaCaducidad As Date = If(TxtCaducidadSalida.Text = "", MinFecha.ToShortDateString, TxtCaducidadSalida.Text).ToDate If ObjInventario.GetExistenciasPS(DdlPSSalida.SelectedValue.ToEntero, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero, PendientePorSurtir:=1, Lote:=lote, FechaCaducidad:=FechaCaducidad) >= TxtCantidadSalidaInv.Text.ToDouble Then If Not DdlPSSalida.SelectedValue.ToEntero > 0 Then diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 0c0018eb9..f0df0fce3 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -973,8 +973,8 @@ Partial Class Inventarios_EntregaAlmacen If CBool(e.Row.DBCampo("AplicaCaducidad")) Then e.Row.FCTextBox("TxtCaducidad").Visible = True e.Row.FCLinkButton("LnkCaducidad").Visible = True - e.Row.FCTextBox("TxtCaducidad").ReadOnly = True - CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False + e.Row.FCTextBox("TxtCaducidad").readonly = True + CType(e.row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False 'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro If e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then @@ -2275,6 +2275,7 @@ Partial Class Inventarios_EntregaAlmacen If ErrorMovInv Then Exit For + Else ErrorMovInv = True End If @@ -2601,27 +2602,24 @@ Partial Class Inventarios_EntregaAlmacen Dim CveAlmacenOrigen = If(CveAlmacenTraspasoDestino > 0, CveAlmacenTraspasoDestino, DdlAlmacen.SelectedValue.ToEntero()) Dim CveSeccionAlmacen As Integer = 0 Dim ValorTraspaso As Decimal = 0 - - 'SI TIENE APARTADOS DEBE GENERAR LOS TRASPASOS - If DtTempApartados.Rows.Count > 0 Then - + If DtTempApartados IsNot Nothing AndAlso DtTempApartados.Rows.Count > 0 Then For Each Dr As DataRow In DtTempApartados.Rows If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString().ToEntero() Then - CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, - Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, - CveAlmacenDestino:=Dr("CveAlmacen").ToString().ToEntero(), Modulo:="RE/G9") - FolioSalida = ObjInventario.Folio - CveAlmacenApartado = Dr("CveAlmacen").ToString().ToEntero() + CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, + Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, + CveAlmacenDestino:=Dr("CveAlmacen").ToString().ToEntero(), Modulo:="RE/G9") + FolioSalida = ObjInventario.Folio + CveAlmacenApartado = Dr("CveAlmacen").ToString().ToEntero() + + Dim DrMovto = DtTraspasos.NewRow + DrMovto("Almacen") = Dr("Almacen").ToString().ToEntero() + DrMovto("CveAlmacen") = Dr("CveAlmacen").ToString().ToEntero() + DrMovto("CveMovimientoSalida") = CveMovimientoSalidaApartado + DrMovto("FolioSalida") = FolioSalida + DtTraspasos.Rows.Add(DrMovto) + End If - Dim DrMovto = DtTraspasos.NewRow - DrMovto("Almacen") = Dr("Almacen").ToString().ToEntero() - DrMovto("CveAlmacen") = Dr("CveAlmacen").ToString().ToEntero() - DrMovto("CveMovimientoSalida") = CveMovimientoSalidaApartado - DrMovto("FolioSalida") = FolioSalida - DtTraspasos.Rows.Add(DrMovto) - End If - If Not CveMovimientoSalidaApartado > 0 Then ErrorMovInv = True TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados") @@ -2636,85 +2634,82 @@ Partial Class Inventarios_EntregaAlmacen CveSeccionAlmacen = -3 If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), Serie:=Dr("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), Lote:=Dr("Lote").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen) Then - ErrorMovInv = True - TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados") - Exit For - End If - Next - - If Not ErrorMovInv Then - - Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("EA/Apart", 53, 0, 0, 1, TxtFecha.Text.ToDate, "Traspaso Apartado", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If CvePrePolizaTraspaso > 0 Then - - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, ValorTraspaso, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalidaApartado, Contabilizable:=False, ImporteMX:=ValorTraspaso) Then ErrorMovInv = True + TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados") + Exit For End If + Next - For Each Dr1 As DataRow In DtTraspasos.Rows - CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString().ToEntero() + If Not ErrorMovInv Then + + Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("EA/Apart", 53, 0, 0, 1, TxtFecha.Text.ToDate, "Traspaso Apartado", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + If CvePrePolizaTraspaso > 0 Then + + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, ValorTraspaso, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalidaApartado, Contabilizable:=False, ImporteMX:=ValorTraspaso) Then + ErrorMovInv = True + End If + + For Each Dr1 As DataRow In DtTraspasos.Rows + CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString().ToEntero() CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), - If Not CveMovimientoEntradaApartado > 0 Then + CveMovimientoRelacionado:=CveMovimientoSalida, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, + CveCliente:=CveCliente, Modulo:="RE/G10") + FolioEntrada = ObjInventario.Folio + + If Not CveMovimientoEntradaApartado > 0 Then ErrorMovInv = True - TextoError.AppendFormat("Ocurrió un error al procesar los movimientos de traspaso de apartado. Por favor vuelva a intentar.") - Exit For - End If + TextoError.AppendFormat("Ocurrió un error al procesar los movimientos de traspaso de apartado. Por favor vuelva a intentar.") + Exit For + End If - Dr1("CveMovimientoEntrada") = CveMovimientoEntradaApartado - Dr1("FolioEntrada") = FolioEntrada + Dr1("CveMovimientoEntrada") = CveMovimientoEntradaApartado + Dr1("FolioEntrada") = FolioEntrada - If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then - ValorTraspaso = ObjInventario.DtResultados.SUMD("Total").RoundSQL - For Each Dr As DataRow In ObjInventario.DtResultados.Rows + If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then + ValorTraspaso = ObjInventario.DtResultados.SUMD("Total").RoundSQL + For Each Dr As DataRow In ObjInventario.DtResultados.Rows - CveSeccionAlmacen = -3 + CveSeccionAlmacen = -3 - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), Serie:=Dr("Serie").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), Lote:=Dr("Lote").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen) Then - ErrorMovInv = True - TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") - Exit For - End If - Next - End If + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), Serie:=Dr("Serie").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), Lote:=Dr("Lote").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen) Then + ErrorMovInv = True + TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.") + Exit For + End If + Next + End If - If ErrorMovInv Then Exit For + If ErrorMovInv Then Exit For - If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, ValorTraspaso, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntradaApartado, Contabilizable:=False, ImporteMX:=ValorTraspaso) Then - ErrorMovInv = True - End If - Next + If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, ValorTraspaso, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntradaApartado, Contabilizable:=False, ImporteMX:=ValorTraspaso) Then + ErrorMovInv = True + End If + Next - Else - ErrorMovInv = True + Else + ErrorMovInv = True + End If End If - End If - + End If End If End If - End If - End If - - End If - - End If End If - End If - - 'QUEMAR REMISIONES - - 'CARGA REMISIONES DE LA VENTA DEVUELTA - - 'CARGA REMISIONES DE LA VENTA DEVUELTA - If ObjInventario.GetDevolucionRemisionesFacturadas(CveVentaSurtir) Then - DtDevRem = ObjInventario.DtResultados.FiltraParametros("CantidadAlmacen = 0") - Else - ErrorMovInv = True - End If - - If Not ErrorMovInv Then + + 'QUEMAR REMISIONES + If Not ErrorMovInv And EsDevolucionVenta = 1 And TipoDocto = "Ing" Then + Dim DtDevRem As New DataTable + + 'CARGA REMISIONES DE LA VENTA DEVUELTA + If ObjInventario.GetDevolucionRemisionesFacturadas(CveVentaSurtir) Then + DtDevRem = ObjInventario.DtResultados.FiltraParametros("CantidadAlmacen = 0") + Else + ErrorMovInv = True + End If + + If Not ErrorMovInv Then If DtDevRem.Rows.Count > 0 Then For Each DrMovtos As DataRow In DtDevRem.FiltraParametros("", "CveRem", {"CveRem"}).Rows If Not ObjInventario.ActualizarEsDevolucionVenta(DrMovtos("CveRem").ToString().ToEntero(), 2) Then @@ -3280,10 +3275,10 @@ Partial Class Inventarios_EntregaAlmacen 'sino es transitorio, los transitorios, ya no se hace otro movimiento ConceptoMovimiento = If(ChkTransitorio.Checked, 2, 27) - Almacen2 = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero(), CveAlmacenTraspasoDestino) - CveMovimientoEntrada = ObjInventario.AddMovimiento(Almacen2, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, - Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenTraspasoDestino, - Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""), Modulo:="RE/GT1", CveOP:=CveOP) + Almacen2 = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero(), CveAlmacenTraspasoDestino) + CveMovimientoEntrada = ObjInventario.AddMovimiento(Almacen2, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, + Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenTraspasoDestino, + Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""), Modulo:="RE/GT1", CveOP:=CveOP) FolioEntrada = ObjInventario.Folio If CveMovimientoEntrada > 0 Then If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx.vb b/Inventarios/PaquetesArmadoDesarmado.aspx.vb index 7e8f78fbe..720f688d5 100644 --- a/Inventarios/PaquetesArmadoDesarmado.aspx.vb +++ b/Inventarios/PaquetesArmadoDesarmado.aspx.vb @@ -605,14 +605,14 @@ Partial Class Inventarios_PaquetesArmadoDesarmado Dim Drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteDesarmado).FiltroPrimero("") Dim CveUMTemp As Integer = Drp("CveUM").ToString.ToEntero - Dim AplicaSeccion As Boolean = CBool(Drp("AplicaSeccion")) - If AplicaSeccion Then - CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDesarmado, CvePaqueteDesarmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero - End If + 'Dim AplicaSeccion As Boolean = CBool(Drp("AplicaSeccion")) + 'If AplicaSeccion Then + ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDesarmado, CvePaqueteDesarmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero + 'End If If AplicaSerie Then For Each Gvr As GridViewRow In GvSeriesPaqueteDesarmado.Rows 'AGREGA MOVTO DETALLE DE LA SALIDA DEL PAQUETE - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Gvr.DataKey("Serie").ToString) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=-3, Serie:=Gvr.DataKey("Serie").ToString) Then TieneError = True MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida" Exit For diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 0585cb4a3..48675aa7f 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -3009,10 +3009,8 @@ Partial Class Inventarios_RecepcionAlmacen Row("CveUM") = GvRow.DataKey("CveUM").ToEntero() DtPSVirtual.Rows.Add(Row) End If - End If Next - End If Next @@ -3065,36 +3063,32 @@ Partial Class Inventarios_RecepcionAlmacen Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero()).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero() + CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, 13, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoRef, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/VD") + If CveMovimientoVirtual > 0 Then + FolioVirtual = ObjInventario.Folio - CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, 13, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoRef, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/VD") + For Each RowUsado As DataRow In DtPSVirtual.Rows + Dim CvePS = RowUsado("CvePS").ToString().ToEntero() + Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal() + Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal() + Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero() - If CveMovimientoVirtual > 0 Then - FolioVirtual = ObjInventario.Folio - - For Each RowUsado As DataRow In DtPSVirtual.Rows - Dim CvePS = RowUsado("CvePS").ToString().ToEntero() - Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal() - Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal() - Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero() - - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then - ErrorMovInv = True - Exit For - End If - Next - - If SumarImporteUsados Then - If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then - ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal") - End If + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + ErrorMovInv = True + Exit For End If + Next - Else - ErrorMovInv = True + If SumarImporteUsados Then + If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then + ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal") + End If End If - End If + Else + ErrorMovInv = True + End If Else ErrorMovInv = True End If diff --git a/Inventarios/ReconstruirCostos.aspx.vb b/Inventarios/ReconstruirCostos.aspx.vb index 1f082cf1d..6b714f911 100644 --- a/Inventarios/ReconstruirCostos.aspx.vb +++ b/Inventarios/ReconstruirCostos.aspx.vb @@ -37,10 +37,9 @@ Partial Class Inventario_ReconstruirCostos If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then DdlMarca.DataSource = ObjPS.DtResultados - DdlMarca.DataBind() - End If ObjPS.Dispose() + DdlMarca.DataBind() End Sub Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click CargaDatos() diff --git a/Inventarios/TraspasoAlmacen.aspx b/Inventarios/TraspasoAlmacen.aspx index 647d737bd..320609c34 100644 --- a/Inventarios/TraspasoAlmacen.aspx +++ b/Inventarios/TraspasoAlmacen.aspx @@ -331,7 +331,7 @@
- Ver Compra + VerCompra
@@ -454,7 +454,7 @@
- + diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 303283d94..4187a209a 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -344,7 +344,7 @@ Partial Class Inventarios_TraspasoAlmacen 'End If If Mov.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then - DtMovimientos = Mov.DtResultados.DefaultView.ToTable("Cantidad, CveUM, CvePS, CveAF, PS, Serie, CveClasificacion, EstatusExistencia") + DtMovimientos = Mov.DtResultados.DefaultView.ToTable("Cantidad, CveUM, CvePS, CveAF, PS, Serie, CveSeccionAlmacen, CveClasificacion, EstatusExistencia") CargaGvDatos() End If diff --git a/Nomina/ConceptoNomina.aspx.cs b/Nomina/ConceptoNomina.aspx.cs index b798fb34e..a3ed53073 100644 --- a/Nomina/ConceptoNomina.aspx.cs +++ b/Nomina/ConceptoNomina.aspx.cs @@ -258,6 +258,7 @@ public partial class Nomina_CatConcepto : ClsPaginas { if (UsuarioActual.Empresa.UsaContabilidad) { + DdlCtaContable.DataValueField = "Id"; using (ClsContPAQi ObjConta = new ClsContPAQi(UsuarioActual.Empresa)) { @@ -336,9 +337,9 @@ public partial class Nomina_CatConcepto : ClsPaginas if (EsEditar) { - TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto,UsuarioActual.CveEmpresa); + TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto, UsuarioActual.CveEmpresa); - if(!TieneError) + if (!TieneError) { if (ChkMovtoPermanente.Checked) { @@ -346,9 +347,9 @@ public partial class Nomina_CatConcepto : ClsPaginas } else { - if(TxtFormulaTotal.Text == "FNC.[MovimientosPermanentes]") + if (TxtFormulaTotal.Text == "FNC.[MovimientosPermanentes]") { - // ObjNomina.UpdateConceptoFormula(CveConcepto, "FNC.[MovimientosPermanentes] ", 1); + // ObjNomina.UpdateConceptoFormula(CveConcepto, "FNC.[MovimientosPermanentes] ", 1); } } } @@ -370,7 +371,7 @@ public partial class Nomina_CatConcepto : ClsPaginas - if (CveConcepto>0) + if (CveConcepto > 0) { if (ChkMovtoPermanente.Checked) { @@ -451,7 +452,7 @@ public partial class Nomina_CatConcepto : ClsPaginas TxtFormulaImporte.Text = drow["Formula"].ToString(); TxtFormulaTotal.Text = drow["FormulaTotal"].ToString(); - ChkMovtoPermanente.Checked=(TxtFormulaTotal.Text == "FNC.[MovimientosPermanentes]"); + ChkMovtoPermanente.Checked = (TxtFormulaTotal.Text == "FNC.[MovimientosPermanentes]"); ChkMovtoPermanente_CheckedChanged(null, null); TxtFormulaGravada.Text = drow["FormulaGravada"].ToString(); if (drow["EsRetencion"].Equals("1")) ChkRetencion.Checked = true; @@ -468,7 +469,15 @@ public partial class Nomina_CatConcepto : ClsPaginas DdlClasificacion.SelectedValueExist(drow["CveClasificacion"]); DdlTipoGasto.SelectedValueExist(drow["CveTipoGasto"]); + //DdlCtaContable.SelectedValueExist(drow["CveCuenta"]); + if (DdlCtaContable.DataValueField == "Id") + { + DdlCtaContable.SelectedValueExist( drow["IdCtaContable"]); + } + else + { DdlCtaContable.SelectedValueExist(drow["CveCuenta"]); + } //if (UsuarioActual.Empresa.TipoContabilidad == 1) //{ //} @@ -477,12 +486,17 @@ public partial class Nomina_CatConcepto : ClsPaginas // DdlCtaContable.SelectedValueExist(drow["IdCtaContable"]); //} DdlConceptoSAT.SelectedValueExist(drow["CveSATConcepto"]); + }else + { + CveConcepto = 0; + } ObjNomina.Dispose(); } else { + CveConcepto = 0; TxtCodigo.Text = ""; TxtConcepto.Text = ""; DdlTipo.SelectedValueExist("-1"); diff --git a/Nomina/MovimientosSUA.aspx b/Nomina/MovimientosSUA.aspx new file mode 100644 index 000000000..312fdbe6f --- /dev/null +++ b/Nomina/MovimientosSUA.aspx @@ -0,0 +1,217 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="MovimientosSUA.aspx.cs" Inherits="Nomina_MovimientosSUA" %> + + + + + + + Movimientos SUA + + + + + + +
  • + Archivo SUA +
  • +
    +
    +
    + + + + + + +
    +
    +
    +
    + + +
    + + + +
    + + +
    +
    + + + + + +
    +
    + +
    +
    + + + + + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    + + Asistencia +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    +
    +
    + + Altas bajas +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    +
    +
    + + Modificación de salario +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    +
    +
    + + + + + diff --git a/Nomina/MovimientosSUA.aspx.cs b/Nomina/MovimientosSUA.aspx.cs new file mode 100644 index 000000000..57ae06071 --- /dev/null +++ b/Nomina/MovimientosSUA.aspx.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; + +public partial class Nomina_MovimientosSUA : ClsPaginas +{ + + private DataTable dtMovtosSUA + { + get + { + if (ViewState["dtMovtosSUA"] == null) { return null; } + else { return (DataTable)ViewState["dtMovtosSUA"]; } + } + + set { ViewState["dtMovtosSUA"] = value; } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + TxtRpdFechaInicio.Text = string.Format(" {0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).FirstDayOfMonth()); + TxtRpdFechaFin.Text = string.Format(" {0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth()); + CargaTiposPeriodo(); + } + } + private void CargaTiposPeriodo() + { + DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo.FiltraParametros("Estatus = 'Activo'"); + DdlTipoPeriodo.DataBind(); + DdlTipoPeriodo.Items.Insert(0, new ListItem("Seleccione", "-1")); + if (DdlTipoPeriodo.Items.Count > 0) + { + DdlTipoPeriodo.SelectedIndex = 0; + } + } + + protected void LnkConsultar_Click(object sender, EventArgs e) + { + using (ClsNominas onom = new ClsNominas()) + { + if (onom.SUAMovmientosAfiliatoriosGET(UsuarioActual.CveEmpresa, TxtRpdFechaInicio.Text.ToDateTime(), TxtRpdFechaFin.Text.ToDateTime(), DdlTipoPeriodo.SelectedValue.ToEntero()) + && onom.DTSetResultados.Tables.Count > 3) + { + GVAsistencia.DataSource = onom.DTSetResultados.Tables[0]; + GVAltasBajas.DataSource = onom.DTSetResultados.Tables[1]; + GVModSalario.DataSource = onom.DTSetResultados.Tables[2]; + dtMovtosSUA = onom.DTSetResultados.Tables[3]; + GVAsistencia.DataBind(); + GVAltasBajas.DataBind(); + GVModSalario.DataBind(); + } + } + upDatosSUAM.Update(); + } + + protected void LnkDownTxt_Click(object sender, EventArgs e) + { + string movtos = ""; + string concater = ""; + foreach (DataRow item in dtMovtosSUA.Rows) + { + + movtos = string.Format("{0}{1}{2}", movtos, concater, item["TxtRow"]); + concater = "\\r\\n"; + } + RegistraScript(string.Format("SaveCsv(\"Movt.txt\", '{0}');", movtos)); + } +} \ No newline at end of file diff --git a/Nomina/Nomina.aspx b/Nomina/Nomina.aspx index c04e8e10c..369061bf9 100644 --- a/Nomina/Nomina.aspx +++ b/Nomina/Nomina.aspx @@ -24,6 +24,7 @@ color: #5b9bd1; } + .txtgridsimula { width: 100% !important; min-width: 60px; @@ -106,6 +107,17 @@ white-space: nowrap; } + .GvConceptos td { + font-size: 11px; + } + + .GvConceptos.table > tbody > tr.ConceptosTotales td { + border-top: 1px solid #E87E04; + color: #fff; + font-size: 13px; + background-color: #E87E04; + } + .GvConceptos.table > tbody > tr > th { border-top: 1px solid #E87E04; color: #fff; @@ -240,12 +252,12 @@
    - +
    - +
    @@ -258,7 +270,20 @@
    -
    + + + +
    + + + +
    +
    + + +
    + +
    <%----%> <%----%> @@ -276,7 +301,7 @@