diff --git a/AF/AF.aspx b/AF/AF.aspx index 8ce476197..506805e0f 100644 --- a/AF/AF.aspx +++ b/AF/AF.aspx @@ -3058,7 +3058,7 @@ - + diff --git a/Acumuladores/CatFoliosGarantia.aspx b/Acumuladores/CatFoliosGarantia.aspx index d5595991a..ee503615a 100644 --- a/Acumuladores/CatFoliosGarantia.aspx +++ b/Acumuladores/CatFoliosGarantia.aspx @@ -250,10 +250,10 @@
+ SubProyecto: -
diff --git a/Acumuladores/CatFoliosGarantia.aspx.vb b/Acumuladores/CatFoliosGarantia.aspx.vb index 778a6275d..26e8947e3 100644 --- a/Acumuladores/CatFoliosGarantia.aspx.vb +++ b/Acumuladores/CatFoliosGarantia.aspx.vb @@ -47,6 +47,7 @@ Partial Class Acumuladores_CatFoliosGarantia #Region "Folios Garantía" Private Sub CargaSubProyectos() + CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, lblSubProyecto) DdlSubProyectos.Items.Clear() DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyectos.DataBind() diff --git a/App_Code/ClsClasificaciones.vb b/App_Code/ClsClasificaciones.vb index d49f390ca..a321f9f37 100644 --- a/App_Code/ClsClasificaciones.vb +++ b/App_Code/ClsClasificaciones.vb @@ -254,7 +254,7 @@ Public Class ClsClasificaciones Return Retorno End Function - Public Function AddClasificaciones(Clasificacion As String, Codigo As String, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngreso As Integer, CuentaIngreso As String, CveCategoria As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = True, Optional RequiereAFInsumo As Boolean = True, Optional RequierePersonal As Boolean = True, + Public Function AddClasificaciones(Clasificacion As String, Codigo As String, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngreso As Integer, CuentaIngreso As String, CveCategoria As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = False, Optional RequiereAFInsumo As Boolean = False, Optional RequierePersonal As Boolean = False, Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 3373f9526..7a14674f8 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -1022,22 +1022,22 @@ Public Class ClsClientes End Function - Public Function GetEstados(Optional ClaveSATPais As String = "-1") As Boolean - Dim Retorno As Boolean = False + 'Public Function GetEstados(Optional ClaveSATPais As String = "-1") As Boolean + ' Dim Retorno As Boolean = False - DataAdapter("PA_ClientesEstadosGet") + ' DataAdapter("PA_ClientesEstadosGet") - SqlAdapter.SelectCommand.Parameters.Add("@ClaveSATPais", SqlDbType.VarChar).Value = ClaveSATPais + ' SqlAdapter.SelectCommand.Parameters.Add("@ClaveSATPais", SqlDbType.VarChar).Value = ClaveSATPais - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el los estados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener el los estados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try - Return Retorno - End Function + ' Return Retorno + 'End Function @@ -1596,8 +1596,8 @@ Public Class ClsClientes Return Retorno End Function - Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, Estado As String, - Pais As String, RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer, + Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, CveEstado As Integer, + RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer, NumCuentaPago As String, CveMetodoPago33 As Integer, CveFormaPago33 As Integer, Optional CvePrecioLista As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClientesNoFrecuenteAdd") @@ -1610,8 +1610,8 @@ Public Class ClsClientes .Add("@Colonia", SqlDbType.VarChar).Value = Colonia .Add("@Localidad", SqlDbType.VarChar).Value = Localidad .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad - .Add("@Estado", SqlDbType.VarChar).Value = Estado - .Add("@Pais", SqlDbType.VarChar).Value = Pais + .Add("@CveEstado", SqlDbType.Int).Value = CveEstado + ' .Add("@Pais", SqlDbType.VarChar).Value = Pais .Add("@RFC", SqlDbType.VarChar).Value = RFC .Add("@CP", SqlDbType.VarChar).Value = CP .Add("@Telefono", SqlDbType.VarChar).Value = Telefono diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 33c02da87..202c993ec 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5646,7 +5646,7 @@ Public Class ClsContabilidad Optional PorcentajeIVA As Decimal = -1) As Boolean Dim Retorno = False - DataAdapter("PA_Conta_CuentasAsignacionesAdd") + DataAdapter("PA_Conta_CuentasAsignacionesUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@CveCuentaAsignacion", SqlDbType.Int).Value = CveConceptoAsignacion diff --git a/App_Code/ClsFISConfiguracion.vb b/App_Code/ClsFISConfiguracion.vb index 3ee63918e..a1d8ddf32 100644 --- a/App_Code/ClsFISConfiguracion.vb +++ b/App_Code/ClsFISConfiguracion.vb @@ -16,6 +16,7 @@ Public Class ClsFISConfiguracion Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlCommand As SqlCommand + Private SqlTransacc As SqlTransaction Private Data As DataTable 'Atributos de la clase @@ -23,6 +24,7 @@ Public Class ClsFISConfiguracion Private disposedValue As Boolean = False ' Para detectar llamadas redundantes 'REGISTRAR CONEXIONES ABIERTAS Private CveConexion As Integer = 0 + Private EsTransaccionCompartida As Boolean = False #End Region #Region "Propiedades" @@ -42,20 +44,38 @@ Public Class ClsFISConfiguracion #End Region - Sub New() - SqlConexion = New SqlConnection - SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString - Try - SqlConexion.Open() - Catch ex As Exception - Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try + Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) + + If TransaccionCompartida Is Nothing Then + SqlConexion = New SqlConnection + SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString + Try + SqlConexion.Open() + Catch ex As Exception + OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) + End Try + Else + SqlConexion = TransaccionCompartida.Connection + SqlTransacc = TransaccionCompartida + EsTransaccionCompartida = True + End If + SqlAdapter = New SqlDataAdapter("", SqlConexion) ConexionAdd() + + End Sub + Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure) + With SqlAdapter.SelectCommand + .Parameters.Clear() + .CommandText = pStrSQL + .CommandType = TipoComando + End With + If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc + Data = New DataTable End Sub #Region "Conexiones" Private Sub ConexionAdd() - If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then + If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then Try DataAdapter("PA_Sis_RegistrarConexion") With SqlAdapter.SelectCommand.Parameters @@ -87,21 +107,14 @@ Public Class ClsFISConfiguracion End If End Sub - Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) - With SqlAdapter.SelectCommand - .Parameters.Clear() - .CommandText = StrSQL - .CommandType = TipoComando - End With - Data = New DataTable - End Sub + #End Region Public Function GetConfiguracion(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False - Data = New DataTable - SqlAdapter = New SqlDataAdapter("PA_Fis_CuentaContablesGet", SqlConexion) - SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure + + DataAdapter("PA_Fis_CuentaContablesGet") + SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa Try SqlAdapter.Fill(Data) @@ -117,16 +130,15 @@ Public Class ClsFISConfiguracion Catch ex As SqlException OnError("Ocurrió un error al consultar las Configuraciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try - SqlAdapter.Dispose() + Return Retorno End Function Public Function AddConfiguracion(ActIVAAcreditable As Integer, ActIVAxAcreditar As Integer, PasIVAPagar As Integer, PasIVAxPagar As Integer, EROtrosIngresos As Integer, ERDSV As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False - Data = New DataTable - SqlAdapter = New SqlDataAdapter("PA_Fis_CuentaContablesAdd", SqlConexion) - SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure + + DataAdapter("PA_Fis_CuentaContablesAdd") With SqlAdapter.SelectCommand.Parameters .Add("@ActIVAAcreditable", SqlDbType.VarChar).Value = ActIVAAcreditable @@ -150,7 +162,7 @@ Public Class ClsFISConfiguracion Catch ex As Exception OnError("Ocurrió un error al Guardar la Configuración.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try - SqlAdapter.Dispose() + Return Retorno End Function diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 0fe627061..f472bb0b3 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2484,7 +2484,7 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetInventarioFisicoDetalle(CveInventarioFisico As Integer, CveUsuario As Integer, Optional Agrupar As Boolean = False) As Boolean + Public Function GetInventarioFisicoDetalle(CveInventarioFisico As Integer, CveUsuario As Integer, Optional Agrupar As Boolean = False, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_InventarioFisicoDetalleGet") @@ -2493,6 +2493,7 @@ Public Class ClsInventarios .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@Agrupar", SqlDbType.Bit).Value = Agrupar + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index f82e8f176..e3b1f758d 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -1940,6 +1940,23 @@ Public Class ClsNominas Return Retorno End Function + Public Function ProcesarSUA(txtSUA As String, cveEmpresa As Int32) As Boolean + Dim retorno As Boolean = False + DTSet = New DataSet() + DataAdapter("PA_Nom_SUAProcesar", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@TxtSUA", SqlDbType.VarChar).Value = txtSUA + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + End With + Try + SqlAdapter.Fill(DTSet) + retorno = True + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al procesar SUA.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function GetNominaEmpleadoSimulador(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, SalarioDiario As Decimal) As Boolean Dim retorno As Boolean = False Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 21eb83cd4..7c9436364 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1627,7 +1627,7 @@ Public Class ClsPaginas 'sino existe, recarga los datos If Application(AppNombre) Is Nothing Then Dim ObjVendedores As New ClsVtaVendedores - If ObjVendedores.GetVendedores(-1) Then Application(AppNombre) = ObjVendedores.DtResultados + If ObjVendedores.GetVendedores(CveEmpresa) Then Application(AppNombre) = ObjVendedores.DtResultados ObjVendedores.Dispose() End If If CveEmpresa <> -1 Then @@ -3351,7 +3351,7 @@ Public Class ClsPaginas Application("GlobalDTClasificacionPorcentaje") = value End Set End Property - Property GlobalDTPaqueterias(CveEmpresa As Integer, Optional TipoPaquteria As Integer = -1) As DataTable + Property GlobalDTPaqueterias(CveEmpresa As Integer, Optional TipoPaqueteria As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTPaqueterias-{0}", CveEmpresa) If Application(AppNombre) Is Nothing Then @@ -3361,7 +3361,7 @@ Public Class ClsPaginas End If Dim Str As StringBuilder = New StringBuilder() - If TipoPaquteria <> -1 Then Str.AppendFormat("TipoPaqueteria = {0}", TipoPaquteria) + If TipoPaqueteria <> -1 Then Str.AppendFormat("TipoPaqueteria = {0}", TipoPaqueteria) Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) GlobalDTPaqueterias = Dv.ToTable @@ -4820,6 +4820,7 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/RepVentasMensualesDetalle.aspx".ToUpper(), 721) PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722) PaginaDict.Add("/Ventas/CatMetasVendedores.aspx".ToUpper(), 723) + PaginaDict.Add("/Ventas/RepAuxiliarFacturas.aspx".ToUpper(), 704) #End Region @@ -7274,7 +7275,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("TipoCambio", TipoCambio)) params.Add(New ReportParameter("NombreSolicito", dtOC(0)("UsuarioSolicito").ToString)) 'drSol("Nombre").ToString)) params.Add(New ReportParameter("PuestoSolicito", PuestoSol)) 'drPuestoSol("Puesto").ToString - params.Add(New ReportParameter("NombreAutorizo", UsuarioActual.Nombre)) + params.Add(New ReportParameter("NombreAutorizo", nombreautorizo)) params.Add(New ReportParameter("PuestoAutorizo", PuestoAut)) 'drPuestoAut("Puesto").ToString params.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición"))) params.Add(New ReportParameter("UsoCFDI", ObjOC.UsoCFDI)) @@ -8040,5 +8041,30 @@ Public Class ClsPaginas End Sub #End Region + Public Sub CargarCentrosDeCosto(DdlProyecto As DropDownList, DdlSubProyecto As DropDownList, LthProyectoP As Label, LblSubProyecto As Label) + Select Case UsuarioActual.Empresa.Tipo_CentroCosto + Case 1 + If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False + LblSubProyecto.Text = "Centro Costo" + Case 2 + If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False + LblSubProyecto.Text = "Sucursal" + Case 3 + If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False + LblSubProyecto.Text = "Proyecto" + Case 4 + If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto
" + LblSubProyecto.Text = "Subproyecto" + Case 5 + If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto
" + LblSubProyecto.Text = "Sucursal" + End Select + DdlProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"})) + DdlProyecto.DataBind() + + DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + DdlSubProyecto.DataBind() + DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + End Sub End Class diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 40f8cfaa0..a13e094b3 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1973,11 +1973,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno End Function - Public Function UpdateSalarios(CvePersonal As Integer, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double) As Boolean + Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double) As Boolean Dim Retorno As Boolean = False SqlDataAdapter("PA_RH_PersonalUpdateSalarios") With SqlAdapter.SelectCommand.Parameters .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@Fecha", SqlDbType.Date).Value = Fecha .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@SalarioDiarioPago", SqlDbType.Money).Value = SalarioDiarioPago .Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario @@ -1994,6 +1995,24 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Function + Public Function GetMovimientosToSUA(CveEmpresa As Integer, FechaI As String, FechaF As String) As Boolean + Dim Retorno As Boolean = False + SqlDataAdapter("PA_RH_MovimientosToSUA") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.VarChar).Value = FechaI + .Add("@FechaF", SqlDbType.VarChar).Value = FechaF + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + Public Function UpdateRFCValidado(RFC As String, CveEmpresa As Integer, RFCValidadoisok As Boolean) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsSucursales.vb b/App_Code/ClsSucursales.vb.exclude similarity index 100% rename from App_Code/ClsSucursales.vb rename to App_Code/ClsSucursales.vb.exclude diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 6aad2b55e..4dcf2318d 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1651,6 +1651,43 @@ Public Class ClsVentas Return Retorno End Function + 'Reporte de Ventas - Auxiliar Facturas + Public Function GetRepAuxliarFacturas(CveProyecto As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, + CveCliente As Integer, CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, + Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1") As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_RepAuxiliarGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio + .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico + .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta + .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte auxiliar de facturas de venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + #End Region #Region "V E N T A S - P R E C I O L I S T A S" 'Hecho por Charlie 1/9/2016 @@ -4476,11 +4513,11 @@ Public Class ClsVentas Return retorno End Function - Public Function GetOCRelacionadas(CveVentasDetalles As String) As Boolean + Public Function GetOCRelacionadas(CveVenta As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Vta_OrdenCompraRelacionada", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters - .Add("@CveVentasDetalles", SqlDbType.NVarChar).Value = CveVentasDetalles + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index dd42bdcb9..1b3a113ff 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1344,7 +1344,7 @@ Namespace Modelos Public Sub GuardarVenta(ByRef factura As Modelos.Factura, ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNotaCredito As Boolean = False, Optional ObjAcum As ClsAcumuladores = Nothing) Dim Msgok As New StringBuilder - factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.TotalTC, factura.TotalTC, factura.CveMoneda, factura.Fecha, If(factura.CveEmpresaCRM > 0, factura.EmpresaCRM, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa) + factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVentaM", factura.CvePlantillaPoliza, factura.TotalTC, factura.TotalTC, factura.CveMoneda, factura.Fecha, If(factura.CveEmpresaCRM > 0, factura.EmpresaCRM, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa) If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, @@ -2213,7 +2213,7 @@ Namespace Modelos End If IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera - CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera + 'CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera End If CveSubProyectoContabilizar = CveSubProyectoVenta ImporteConcepto12 = importeMX.RoundSQL @@ -2222,10 +2222,10 @@ Namespace Modelos CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True Else @@ -2804,7 +2804,7 @@ Namespace Modelos End If - CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero + 'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero If importeMovimiento <> 0 Then @@ -2813,10 +2813,10 @@ Namespace Modelos idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then ErrorPrepoliza = True @@ -2891,7 +2891,7 @@ Namespace Modelos If Row2("CveClasificacion").ToString = "19929" Then IdCtaContable = 1142 End If - CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero + 'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero If importeMovimiento <> 0 Then @@ -2900,10 +2900,10 @@ Namespace Modelos idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then ErrorPrepoliza = True @@ -2917,42 +2917,66 @@ Namespace Modelos importeMovimiento = 0 Case 103 'Descuento - If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoAmortizacionAnticipo = -1 Then + If ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoAmortizacionAnticipo = -1 Then - importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador) + importeMovimiento = ObjFactura.Descuento * ValorMultiplicador importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago CveSubProyectoContabilizar = CveSubProyectoVenta If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString.ToEntero - 'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString.ToEntero + IdCtaContable = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero() + 'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero() End If End If - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - If importeMovimiento > 0 AndAlso UsuarioActual.CveEmpresa = 119 Then - 'código fijo en base el porcentaje iva, que se afecten las clasificaciones - For i = 0 To TmpDTDetalle.Rows.Count - 1 - If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then - TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveClasificacion").ToString + DT = TmpDTDetalle.FiltraParametros("", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"}) + + If DT.Rows.Count > 0 Then + 'Se agrega movimiento separado por la cuenta de ventas (ER) + For Each Row2 As DataRow In DT.Rows + importeMovimiento = (TmpDTDetalle.SUM("Descuento", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador + importeMX = importeMovimiento * tipoCambio * Multiplicador + FechaMovimiento = ObjFactura.FechaPago + Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}" + + If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" + 'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas + If ObjFactura.TipoDocto.Contiene("Egs") Then + IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() + Else + IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() + End If + + If importeMovimiento <> 0 Then + + If IdCtaContable <= 0 Then + CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}")) + idCuentaContabilizacion = 0 + End If + + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 103, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=-1, 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 + ObjFactura.SeGuardoPrePoliza = True + End If End If Next - End If End If + importeMovimiento = 0 - Case 103 'Descuento - 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida. - If ObjFactura.CveTipoAmortizacionAnticipo <> 1 Then - importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador) - importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador - FechaMovimiento = ObjFactura.FechaPago - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - IdCtaContable = 0 - End If + 'Case 103 'Descuento + ' 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida. + ' If ObjFactura.CveTipoAmortizacionAnticipo <> 1 Then + ' importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador) + ' importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador + ' FechaMovimiento = ObjFactura.FechaPago + ' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" + ' IdCtaContable = 0 + ' End If Case 8 'Ret IVA por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion <> 4 Then 'SI NO ES RETENCION DE IVA DE SERVICIOS @@ -3194,7 +3218,7 @@ Namespace Modelos If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows.Count = 1 Then IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("IdCtaContable").ToString.ToEntero - CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("IdCtaContableSIG").ToString.ToEntero + ' CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("IdCtaContableSIG").ToString.ToEntero End If If IdCtaContable <= 0 Then @@ -3202,10 +3226,10 @@ Namespace Modelos idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.AppendFormat("
{0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("NumCuentaMoneda").ToString.ToEntero) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.AppendFormat("
{0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("NumCuentaMoneda").ToString.ToEntero) + ' CveCuentaContabilizacion = 0 + 'End If 'BANCOS Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString) @@ -3272,10 +3296,10 @@ Namespace Modelos idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambio, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True diff --git a/App_Code/WS_PuntoVenta.vb b/App_Code/WS_PuntoVenta.vb index cd18bf021..e22b5f793 100644 --- a/App_Code/WS_PuntoVenta.vb +++ b/App_Code/WS_PuntoVenta.vb @@ -429,22 +429,22 @@ Public Class WS_PuntoVenta Return Respuesta End Function - - Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS - Dim objSucursales As New ClsSucursales - Dim Respuesta As New RespuestaWS + ' + 'Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS + ' Dim objSucursales As New ClsSucursales + ' Dim Respuesta As New RespuestaWS - If objSucursales.GetSucursales() Then - Respuesta.Datos = objSucursales.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) - Respuesta.Datos.TableName = "Resultados" - Respuesta.HuboError = False - Else - Respuesta.Descripcion = "HUBO UN ERROR" - End If + ' If objSucursales.GetSucursales() Then + ' Respuesta.Datos = objSucursales.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) + ' Respuesta.Datos.TableName = "Resultados" + ' Respuesta.HuboError = False + ' Else + ' Respuesta.Descripcion = "HUBO UN ERROR" + ' End If - objSucursales.Dispose() - Return Respuesta - End Function + ' objSucursales.Dispose() + ' Return Respuesta + 'End Function Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS @@ -1170,7 +1170,7 @@ Public Class WS_PuntoVenta 'Enviar correo de corte de turno EnviarCorreo(VtaCorte.CveCorte, VtaCorte.CveEmpresa) - Dim cuenta As Integer = GetCuenta(2090) + ' Dim cuenta As Integer = GetCuenta(2090) Else objPV.RollBack() End If @@ -1197,16 +1197,16 @@ Public Class WS_PuntoVenta Return objVentasPago End Function - - Public Function GetCuenta(CveSucursal As Integer) As Integer - Dim objSU As New ClsSucursales - Dim Cuenta As Integer + ' + 'Public Function GetCuenta(CveSucursal As Integer) As Integer + ' Dim objSU As New ClsSucursales + ' Dim Cuenta As Integer - 'Cuenta = objSU.GetCuenta(CveSucursal) - objSU.Dispose() + ' 'Cuenta = objSU.GetCuenta(CveSucursal) + ' objSU.Dispose() - Return Cuenta - End Function + ' Return Cuenta + 'End Function Public Function AddBancosIE(Importe As Double, Moneda As Integer, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer, Cuenta As Integer, Comprobante As String, Opcion As String) As Boolean diff --git a/Ashx/SIGGPSRCService.ashx b/Ashx/SIGGPSRCService.ashx index 33e0b4b40..30ad9d59c 100644 --- a/Ashx/SIGGPSRCService.ashx +++ b/Ashx/SIGGPSRCService.ashx @@ -26,85 +26,21 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState } } - private Usuario ValidaUsuarioSistema(int CveEmpresa) - { - Usuario UsuarioActual = null; - ClsSisUsuarios ObjUsuarios = new ClsSisUsuarios(); - if (ObjUsuarios.GetUsuarios(1727)) - { - if (ObjUsuarios.DtResultados.Rows.Count > 0) - { - var Usuario = ObjUsuarios.DtResultados.Rows[0]["Usuario"].ToString(); - var Contrasenia = ObjUsuarios.DtResultados.Rows[0]["Contraseña"].ToString(); - - UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, ModExtensiones.IMEI, CveEmpresa); - - UsuarioActual.CveEmpresa = CveEmpresa; - UsuarioActual.CveCliente = 183798; - - CreaObjetoEmpresa(ref UsuarioActual); - CargaZonasHorarias(ref UsuarioActual); - } - } - ObjUsuarios.Dispose(); - return UsuarioActual; - } - private void CreaObjetoEmpresa(ref Usuario UsuarioActual) - { - ClsSisEmpresas ObjEmpresa = new ClsSisEmpresas(); - if (ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1")) - { - if (ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa)) - { - System.Data.DataTable dttmp = ObjEmpresa.DtResultados; - - var EmpresasFuncionalidades = new HybridDictionary(); - foreach (System.Data.DataRow Row in dttmp.Rows) - EmpresasFuncionalidades.Add(Convert.ToInt32(Row["CveFuncionalidad"]), Row["Valor"].ToString()); - - ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades); - } - - UsuarioActual.Empresa = ObjEmpresa.Empresa; - } - ObjEmpresa.Dispose(); - } - private void CargaZonasHorarias(ref Usuario UsuarioActual) - { - ClsClientes ObjClientes = new ClsClientes(); - try - { - if (ObjClientes.GetClientes(UsuarioActual.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus: 1)) - { - if (ObjClientes.DtResultados.Rows.Count == 1) - UsuarioActual.UTCOffset = ObjClientes.DtResultados.Rows[0]["UTCOffset"].ToString().ToEntero(); - } - } - catch (Exception ex) - { - ex.ToString().GuardaLog(); - } - finally - { - ObjClientes.Dispose(); - } - } - public bool IsReusable => false; public void ProcessRequest(HttpContext context) { + context.Response.ContentType = "text/plain"; + bool retorno = false; try { - context.Response.ContentType = "text/plain"; - bool retorno = false; + string Metodo = context.Request["Metodo"] == null ? "" : context.Request["Metodo"]; switch (Metodo) { case "EjecutaServicio": ModExtensiones.GuardaLogAD("Servicio Ejecutado...........", "LogServicioConfiable"); - IniciarTransmision(context); - retorno = true; + retorno = IniciarTransmision(); break; default: break; @@ -123,11 +59,14 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState { ex.GuardaLog(ex.Message); } + + context.Response.End(); } - private void IniciarTransmision(HttpContext context) + private bool IniciarTransmision() { - var UsuarioActual = ValidaUsuarioSistema(121); + var retorno = false; + var TieneError = false; var WS = new RCGPSService.RCServiceClient(); @@ -142,6 +81,10 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState { DtTrackings = ObjGPS.DtResultados.Copy(); } + else + { + TieneError = true; + } if (DtTrackings != null) { @@ -152,6 +95,10 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState { dtTracking = ObjGPS.DtResultados.Copy(); } + else + { + TieneError = true; + } if (dtTracking != null) { foreach (DataRow Row in dtTracking.Rows) @@ -175,6 +122,7 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState } catch (Exception ex) { + TieneError = true; this.OnError("Ocurrió un error al enviar los datos", ex); } ObjGPS.Dispose(); @@ -182,15 +130,22 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState DtTrackings.Dispose(); DtTrackings = null; - if (ListaEventos.Count > 0) + if (ListaEventos.Count > 0 && !TieneError) { - var respuesta = WS.GPSAssetTracking(Token.token, ListaEventos.ToArray()); - context.Response.Write(JsonConvert.SerializeObject(respuesta)); + if (respuesta.Length > 0) + { + retorno = !TieneError; + } + } + else + { + retorno = !TieneError; } WS.Close(); - //context.Response.Write(JsonConvert.SerializeObject(new { idJob = "1", exception = "" })); + + return retorno; } diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 17e401ead..0f7b199d5 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -585,7 +585,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState 'verifica existencias - If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141) Then + If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152) Then UsaGlobal = False Dim objInv As New ClsInventarios diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index e02318b0a..14d3f041a 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -571,7 +571,7 @@ Partial Class Bancos_IE Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - + Me.CveCorte = -1 Folio = "" IDCtaBeneficiario = 0 IDCtaBeneficiarioComplementaria = 0 diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index ecbbb6b28..82abd140c 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -613,9 +613,8 @@ Producto o Servicio Observación -   - - + +   @@ -650,13 +649,21 @@ - - - -
- - - +
+
+ + + +
+ <%----%> +
+
+
+ + + +
+
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index ce6ccabce..9782d8da6 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1227,7 +1227,6 @@ Partial Class Compras_Compras ClavesBorradas = New ArrayList() TxtFecha.Text = Now.ToShortDateString TxtFechaEjecucion.Text = Now.ToShortDateString - ViewState("CveCompra") = "0" ViewState("CveFactura") = "0" ViewState("IdPoliza") = "0" ViewState("CveCompra") = -1 @@ -1536,26 +1535,27 @@ Partial Class Compras_Compras DivConsignaciones.Visible = False End If + CargarCentrosDeCosto(DdlAsignarProyecto, DdlAsignaSubProyecto, LitHProyecto, LblSubProyectoHeader) If UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then - LitHProyecto.Text = "Proyecto" - LthProyectoP.Text = "Proyecto" + ' LitHProyecto.Text = "Proyecto" + ' LthProyectoP.Text = "Proyecto" - LblSubProyectoHeader.Text = "" - LblSubProyectoPHeader.Text = "" + ' LblSubProyectoHeader.Text = "" + ' LblSubProyectoPHeader.Text = "" - LblSubProyecto.InnerText = "Proyecto" - 'LblSubProyectoDivAplica.InnerText = "Proyecto" + ' LblSubProyecto.InnerText = "Proyecto" + ' 'LblSubProyectoDivAplica.InnerText = "Proyecto" - DdlSubProyecto.Items.Clear() - 'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) - DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + 'DdlSubProyecto.Items.Clear() + ''DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + 'DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + 'DdlSubProyecto.DataBind() + 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - 'DdlAsignaSubProyecto.Items.Clear() - 'DdlAsignaSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) - 'DdlAsignaSubProyecto.DataBind() - 'DdlAsignaSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + ' 'DdlAsignaSubProyecto.Items.Clear() + ' 'DdlAsignaSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + ' 'DdlAsignaSubProyecto.DataBind() + ' 'DdlAsignaSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) divproyecto.Visible = False 'divasignaproyecto.Visible = False @@ -1563,54 +1563,54 @@ Partial Class Compras_Compras DdlProyecto.Items(0).Text = "" ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then - LitHProyecto.Text = "Sucursal" - LthProyectoP.Text = "Sucursal" + ' LitHProyecto.Text = "Sucursal" + ' LthProyectoP.Text = "Sucursal" - LblSubProyectoHeader.Text = "" - LblSubProyectoPHeader.Text = "" + ' LblSubProyectoHeader.Text = "" + ' LblSubProyectoPHeader.Text = "" - LblSubProyecto.InnerText = "Sucursal" - 'LblSubProyectoDivAplica.InnerText = "Sucursal" + ' LblSubProyecto.InnerText = "Sucursal" + ' 'LblSubProyectoDivAplica.InnerText = "Sucursal" - DdlSubProyecto.Items.Clear() - 'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) - DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + 'DdlSubProyecto.Items.Clear() + ''DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + 'DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + 'DdlSubProyecto.DataBind() + 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - 'DdlAsignaSubProyecto.Items.Clear() - 'DdlAsignaSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) - 'DdlAsignaSubProyecto.DataBind() - 'DdlAsignaSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) + ' 'DdlAsignaSubProyecto.Items.Clear() + ' 'DdlAsignaSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + ' 'DdlAsignaSubProyecto.DataBind() + ' 'DdlAsignaSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) divproyecto.Visible = False 'divasignaproyecto.Visible = False DdlProyecto.Visible = False DdlProyecto.Items(0).Text = "" - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then - LitHProyecto.Text = "Sucursal" - LthProyectoP.Text = "Sucursal" + 'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then + ' LitHProyecto.Text = "Sucursal" + ' LthProyectoP.Text = "Sucursal" - LblSubProyectoHeader.Text = "Proyecto" - LblSubProyectoPHeader.Text = "Proyecto" + ' LblSubProyectoHeader.Text = "Proyecto" + ' LblSubProyectoPHeader.Text = "Proyecto" - 'LblSubProyectoDivAplica.InnerText = "Sucursal" - 'LblProyectoDivAplica.InnerText = "Proyecto" - LblSubProyecto.InnerText = "Sucursal" - LblProyecto.InnerText = "Proyecto" + ' 'LblSubProyectoDivAplica.InnerText = "Sucursal" + ' 'LblProyectoDivAplica.InnerText = "Proyecto" + ' LblSubProyecto.InnerText = "Sucursal" + ' LblProyecto.InnerText = "Proyecto" - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then - LitHProyecto.Text = "Proyecto" - LthProyectoP.Text = "Proyecto" + 'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then + ' LitHProyecto.Text = "Proyecto" + ' LthProyectoP.Text = "Proyecto" - LblSubProyectoHeader.Text = "Sucursal" - LblSubProyectoPHeader.Text = "Sucursal" + ' LblSubProyectoHeader.Text = "Sucursal" + ' LblSubProyectoPHeader.Text = "Sucursal" - 'LblSubProyectoDivAplica.InnerText = "Proyecto" - 'LblProyectoDivAplica.InnerText = "Sucursal" - LblSubProyecto.InnerText = "Proyecto" - LblProyecto.InnerText = "Sucursal" + ' 'LblSubProyectoDivAplica.InnerText = "Proyecto" + ' 'LblProyectoDivAplica.InnerText = "Sucursal" + ' LblSubProyecto.InnerText = "Proyecto" + ' LblProyecto.InnerText = "Sucursal" End If CargaGvPersonal() @@ -10761,7 +10761,7 @@ Partial Class Compras_Compras e.Row.FCLinkButton("ImgD").Visible = False End If - If e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso e.Row.DBCampo("IEPSPSPorcentaje").ToDouble > 0 Then + If CveCompra <= 0 AndAlso e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso e.Row.DBCampo("IEPSPSPorcentaje").ToDouble > 0 Then If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=e.Row.DBCampo("CvePS").ToEntero).Rows.Count > 0 Then Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=e.Row.DBCampo("CvePS").ToEntero).Rows(0) If DrPS IsNot Nothing Then @@ -10773,6 +10773,11 @@ Partial Class Compras_Compras End If End If + If e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso e.Row.DBCampo("NoDeducible") = "True" Then + e.Row.FCLabel("LblIVAPorcentaje").ToolTip = "IVA NO Deducible" + e.Row.FCLabel("LblIVAPorcentaje").ForeColor = Drawing.Color.Red + End If + 'CargaPresupuestosEgresos If UsuarioActual.Empresa.UsaAC Then e.Row.Cells(13).Visible = True diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 001743e8f..592f5814e 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -745,7 +745,7 @@ Partial Class Compras_ReembolsosComprobaciones Dim ImporteNOIVA As Decimal = gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago - If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteNOIVA), ImporteMX:=(ImporteNOIVA) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then MsgError = "Detalle" End If End If diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx b/Contabilidad2/CatCuentasAsignaciones.aspx index fcaacad9a..768a1edda 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx +++ b/Contabilidad2/CatCuentasAsignaciones.aspx @@ -71,8 +71,8 @@
- - + +
@@ -112,6 +112,7 @@ diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb index e2c98ae18..6470747bb 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb +++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb @@ -32,10 +32,6 @@ Partial Class Contabilidad2_CatCuentasAsignaciones Private Sub CargaDatosModal() Dim ObjConta As New ClsContabilidad - Dim ObjProveedores As New ClsCompProveedores - Dim ObjRH As New ClsRH - Dim ObjClasificaciones As New ClsClasificaciones - Dim ObjInv As New ClsInventarios If ObjConta.GetConta_ConceptosContables() Then DdlCconceptosContables.DataSource = ObjConta.DtResultados @@ -45,31 +41,17 @@ Partial Class Contabilidad2_CatCuentasAsignaciones DdlCuenta.DataSource = ObjConta.DtResultados End If - If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then - DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - End If + DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlClientes.setEsWebService(True) DdlPersonal.setEsWebService(True) - 'If ObjRH.GetPersonal(-1, UsuarioActual.CveEmpresa) Then - ' DdlPersonal.DataSource = ObjRH.DtResultados - 'End If - If ObjClasificaciones.GetClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa) Then - DdlClasificacion.DataSource = ObjClasificaciones.DtResultados - End If + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) - If ObjInv.GetAlmacenes(-1, -1, UsuarioActual.CveEmpresa, -1) Then - DdlAlmacen.DataSource = ObjInv.DtResultados - End If + DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa) ObjConta.Dispose() - ObjProveedores.Dispose() - ObjRH.Dispose() - ObjClasificaciones.Dispose() - ObjInv.Dispose() - DdlCconceptosContables.DataBind() DdlCuenta.DataBind() @@ -171,7 +153,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones End If End If ObjConta.Dispose() - RegistraScript("$('#ModalCat').modal('hide');") + If Not ChkSeguirRegistrando.Checked Then RegistraScript("$('#ModalCat').modal('hide');") + If ErrorString.Length > 0 Then Alert(ErrorString) Else diff --git a/Empresas/7/Formatos/OC.rdlc b/Empresas/7/Formatos/OC.rdlc index 405871d1b..db2910868 100644 --- a/Empresas/7/Formatos/OC.rdlc +++ b/Empresas/7/Formatos/OC.rdlc @@ -1,2244 +1,5 @@ - - - - - true - true - - - - - =Parameters!TipoOC.Value - - - - - - - Textbox3 - 2.44856cm - 0.2667cm - 0.6cm - 18.82013cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - VSH VIGILANCIA Y PROTECCION SA DE CV - - - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - VSH - FitProportional - 0.35576cm - 0.2667cm - 2.02224cm - 3.36239cm - 2 - - - - - - true - true - - - - - PROVEEDOR: - - - - =Parameters!ProveedorNombre.Value - - - - - - - =Parameters!ProveedorDireccion.Value - - - - - - - =Parameters!ProveedorTel.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - FECHA DE REGISTRO: - - - - =Parameters!FechaSolicitud.Value - - - - - - - =Parameters!FechaEntrega.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - - - - true - true - - - - - DESCRIPCION: - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Justificacion.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - =Parameters!Folio.Value - - - - - - - Textbox2 - 0.35576cm - 17.81988cm - 0.6cm - 1.75917cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - No. - - - - - - - Textbox19 - 0.35576cm - 16.43113cm - 0.6cm - 1.38875cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 1.97712cm - - - 1.53649cm - - - 4.25385cm - - - 4.73296cm - - - 2.24377cm - - - 1.01139cm - - - 2.00619cm - - - 1.75917cm - - - - - 0.473cm - - - - - true - true - - - - - CANTIDAD - - - - - - - Textbox1 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CODIGO - - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - PRODUCTO - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - D E S C R I P C I O N - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Sub Proyecto - - - - - - - Textbox4 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - A.F. - - - - - - - Textbox21 - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - P. UNITARIO - - - - - - - Textbox13 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - IMPORTE - - - - - - - Textbox5 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.38833cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad1 - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!CodPS.Value - - - - - - - CodPS - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Producto.Value - - - - - - - Producto - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Obs.Value - - - - - - - Obs - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!SubProyecto.Value - - - - - - - SubProyecto - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!CodigoAF.Value - - - - - - - CodigoAF - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Total.Value - - - - - - - Total - - - 2pt - 2pt - 1pt - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 7.26722cm - 0.02288in - 0.86133cm - 19.52094cm - 9 - - - - - - true - true - - - - - =IIF(CInt(Parameters!TipoTermino.Value)=2, "C A N C E L A D O", "") - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Uso CFDI 3.3: - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsoCFDI.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 3.23147in - - - - - - true - true - - - - - NOTAS: RECEPCION DE FACTURAS VIERNES UNICAMENTE NO SE RECIBIRA SU FACTURA SIN ESTA ORDEN DE COMPRA - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =UCase(Parameters!ImporteLetra.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - _______________ - - - - - - - Textbox17 - 2.70608cm - 0.48139cm - 1.30584cm - 3.1477cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - = "__________________________________" & Chr(10) - & Parameters!NombreAutorizo.Value & Chr(10) - & "FIRMA AUTORIZADA" - - - - - Textbox17 - 2.70608cm - 5.12961cm - 1.30584cm - 6.9577cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Banco - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Cuenta/Clabe bancaria/Referencia - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - I.V.A. - - - - - - - Textbox20 - 1.62008cm - 14.6301cm - 0.45183cm - 2.5cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - DESCUENTO: - - - - - - - Textbox20 - 0.71938cm - 14.63363cm - 0.45183cm - 2.5cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!IVA.Value - - - - - - - Textbox20 - 1.62008cm - 17.1301cm - 0.45183cm - 2.5cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Descuento.Value - - - - - - - Textbox20 - 0.71938cm - 17.13363cm - 0.45183cm - 2.5cm - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - SUB-TOTAL - - - - - - - Textbox20 - 0.26755cm - 14.63363cm - 0.45183cm - 2.5cm - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SubTotal.Value - - - - - - - Textbox20 - 0.26755cm - 17.13363cm - 0.45183cm - 2.5cm - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - TOTAL - - - - - - - Textbox20 - 0.02173cm - 0.45183cm - 2.5cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Total.Value - - - - - - - Textbox20 - 0.05181cm - 2.5cm - 0.45183cm - 2.5cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - 2.07191cm - 14.63363cm - 0.50364cm - 5cm - 13 - - =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value <= 0 And Parameters!RetISR.Value <= 0, False, True) - - - - - - - - - true - true - - - - - Ret IVA - - - - - - - Textbox20 - 0.0247cm - 0.45183cm - 2.5cm - - =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0, False, True) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!RetIVA.Value - - - - - - - Textbox20 - 2.5cm - 0.45183cm - 2.5cm - 1 - - =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0, False, True) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!RetISR.Value - - - - - - - Textbox20 - 0.48711cm - 2.50353cm - 0.45183cm - 2.5cm - 2 - - =Microsoft.VisualBasic.Interaction.iif(Parameters!RetISR.Value > 0, False, True) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ret ISR - - - - - - - Textbox20 - 0.51181cm - 0.01059cm - 0.45183cm - 2.5cm - 3 - - =Microsoft.VisualBasic.Interaction.iif(Parameters!RetISR.Value > 0, False, True) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - TOTAL - - - - - - - Textbox20 - 0.94193cm - 0.00353cm - 0.45183cm - 2.5cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Total.Value - - - - - - - Textbox20 - 0.94193cm - 2.50353cm - 0.45183cm - 2.5cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - 2.61082cm - 14.62657cm - 1.39376cm - 5.00353cm - 14 - - =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0 Or Parameters!RetISR.Value > 0, False, True) - - - - - - - External - =Parameters!FirmaAutorizo.Value - Fit - 0.82196cm - 6.69573cm - 3.09107cm - 3.55292cm - 15 - - =iif(Parameters!FirmaAutorizo.Value <> "",False,True) - - - - - - - true - true - - - - - SUB-TOTAL 2 - - - - - - - Textbox20 - 1.13297cm - 14.63716cm - 0.45183cm - 2.5cm - 16 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SubTotal2.Value - - - - - - - Textbox20 - 1.13297cm - 17.13716cm - 0.45183cm - 2.5cm - 17 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 1cm - 0cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox3 + 2.44856cm + 0.2667cm + 0.6cm + 18.82013cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + VSH VIGILANCIA Y PROTECCION SA DE CV + + + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + VSH + FitProportional + 0.35576cm + 0.2667cm + 2.02224cm + 3.36239cm + 2 + + + + + + true + true + + + + + PROVEEDOR: + + + + =Parameters!ProveedorNombre.Value + + + + + + + =Parameters!ProveedorDireccion.Value + + + + + + + =Parameters!ProveedorTel.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + FECHA DE REGISTRO: + + + + =Parameters!FechaSolicitud.Value + + + + + + + =Parameters!FechaEntrega.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + + + + true + true + + + + + DESCRIPCION: + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Justificacion.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + =Parameters!Folio.Value + + + + + + + Textbox2 + 0.35576cm + 17.81988cm + 0.6cm + 1.75917cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. + + + + + + + Textbox19 + 0.35576cm + 16.43113cm + 0.6cm + 1.38875cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 1.97712cm + + + 1.53649cm + + + 4.25385cm + + + 4.73296cm + + + 2.24377cm + + + 1.01139cm + + + 2.00619cm + + + 1.75917cm + + + + + 0.473cm + + + + + true + true + + + + + CANTIDAD + + + + + + + Textbox1 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CODIGO + + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PRODUCTO + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + D E S C R I P C I O N + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Sub Proyecto + + + + + + + Textbox4 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + A.F. + + + + + + + Textbox21 + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P. UNITARIO + + + + + + + Textbox13 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IMPORTE + + + + + + + Textbox5 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38833cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!CodPS.Value + + + + + + + CodPS + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Producto.Value + + + + + + + Producto + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Obs.Value + + + + + + + Obs + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!SubProyecto.Value + + + + + + + SubProyecto + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!CodigoAF.Value + + + + + + + CodigoAF + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + 2pt + 2pt + 1pt + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 7.26722cm + 0.02288in + 0.86133cm + 19.52094cm + 9 + + + + + + true + true + + + + + =IIF(CInt(Parameters!TipoTermino.Value)=2, "C A N C E L A D O", "") + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Uso CFDI 3.3: + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsoCFDI.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 3.23147in + + + + + + true + true + + + + + NOTAS: RECEPCION DE FACTURAS VIERNES UNICAMENTE NO SE RECIBIRA SU FACTURA SIN ESTA ORDEN DE COMPRA + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =UCase(Parameters!ImporteLetra.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + _______________ + + + + + + + Textbox17 + 2.70608cm + 0.48139cm + 1.30584cm + 3.1477cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + = "__________________________________" & Chr(10) + & Parameters!NombreAutorizo.Value & Chr(10) + & "FIRMA AUTORIZADA" + + + + + Textbox17 + 2.70608cm + 5.12961cm + 1.30584cm + 6.9577cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Banco + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cuenta/Clabe bancaria/Referencia + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + I.V.A. + + + + + + + Textbox20 + 1.62008cm + 14.6301cm + 0.45183cm + 2.5cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + DESCUENTO: + + + + + + + Textbox20 + 0.71938cm + 14.63363cm + 0.45183cm + 2.5cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!IVA.Value + + + + + + + Textbox20 + 1.62008cm + 17.1301cm + 0.45183cm + 2.5cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Descuento.Value + + + + + + + Textbox20 + 0.71938cm + 17.13363cm + 0.45183cm + 2.5cm + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + SUB-TOTAL + + + + + + + Textbox20 + 0.26755cm + 14.63363cm + 0.45183cm + 2.5cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SubTotal.Value + + + + + + + Textbox20 + 0.26755cm + 17.13363cm + 0.45183cm + 2.5cm + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + TOTAL + + + + + + + Textbox20 + 0.02173cm + 0.45183cm + 2.5cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox20 + 0.05181cm + 2.5cm + 0.45183cm + 2.5cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 2.07191cm + 14.63363cm + 0.50364cm + 5cm + 13 + + =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value <= 0 And Parameters!RetISR.Value <= 0, False, True) + + + + + + + + + true + true + + + + + Ret IVA + + + + + + + Textbox20 + 0.0247cm + 0.45183cm + 2.5cm + + =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!RetIVA.Value + + + + + + + Textbox20 + 2.5cm + 0.45183cm + 2.5cm + 1 + + =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!RetISR.Value + + + + + + + Textbox20 + 0.48711cm + 2.50353cm + 0.45183cm + 2.5cm + 2 + + =Microsoft.VisualBasic.Interaction.iif(Parameters!RetISR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Ret ISR + + + + + + + Textbox20 + 0.51181cm + 0.01059cm + 0.45183cm + 2.5cm + 3 + + =Microsoft.VisualBasic.Interaction.iif(Parameters!RetISR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + TOTAL + + + + + + + Textbox20 + 0.94193cm + 0.00353cm + 0.45183cm + 2.5cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox20 + 0.94193cm + 2.50353cm + 0.45183cm + 2.5cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 2.61082cm + 14.62657cm + 1.39376cm + 5.00353cm + 14 + + =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0 Or Parameters!RetISR.Value > 0, False, True) + + + + + + + External + =Parameters!FirmaAutorizo.Value + Fit + 0.82196cm + 6.69573cm + 3.09107cm + 3.55292cm + 15 + + =iif(Parameters!FirmaAutorizo.Value <> "",False,True) + + + + + + + true + true + + + + + SUB-TOTAL 2 + + + + + + + Textbox20 + 1.13297cm + 14.63716cm + 0.45183cm + 2.5cm + 16 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SubTotal2.Value + + + + + + + Textbox20 + 1.13297cm + 17.13716cm + 0.45183cm + 2.5cm + 17 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 1cm + 0cm + 1cm + 1cm + 0.13cm +