diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index a2129f8a1..4e3b0b213 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -4463,6 +4463,21 @@ Public Class ClsBancos Return Retorno End Function + Public Function InhabilitarCuentasBancos(CveBanco As Integer, Estatus As Boolean) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_InhabilitarCuentas") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveBanco", SqlDbType.Int).Value = CveBanco + .Add("@Estatus", SqlDbType.Bit).Value = Estatus + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al inhabilitar las Cuentas Bancarias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function Public Function GetBancosSAT() As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Nom_Sat_BancosGet") diff --git a/App_Code/ClsCRM.vb b/App_Code/ClsCRM.vb index a07d2a7d3..7cb6f40ef 100644 --- a/App_Code/ClsCRM.vb +++ b/App_Code/ClsCRM.vb @@ -431,7 +431,8 @@ Public Class ClsCRM Return Retorno End Function - Public Function AddEmpresaCRM(NombreEmpresa As String, RFC As String, CveMedioCaptacion As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer, CveEncuestaAplicada As Integer, CveVendedor As Integer, Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1") As Integer + Public Function AddEmpresaCRM(NombreEmpresa As String, RFC As String, CveMedioCaptacion As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer, CveEncuestaAplicada As Integer, CveVendedor As Integer, + Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional CveGiroClasificacion As Integer = -1) As Integer Dim CveEmpresaCRM As Integer = -1 DataAdapter("PA_CRM_EmpresaAdd") With SqlAdapter.SelectCommand.Parameters @@ -444,6 +445,7 @@ Public Class ClsCRM .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@Correo", SqlDbType.VarChar).Value = Correo + .Add("@CveGiroClasificacion", SqlDbType.Int).Value = CveGiroClasificacion .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With @@ -456,7 +458,8 @@ Public Class ClsCRM Return CveEmpresaCRM End Function - Public Function UpdateEmpresCRM(NombreEmpresa As String, RFC As String, CveMedioCaptacion As Integer, CveEmpresaCRM As Integer, CveVendedor As Integer, CveUsuarioMod As Integer, Optional CveCliente As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1") As Boolean + Public Function UpdateEmpresCRM(NombreEmpresa As String, RFC As String, CveMedioCaptacion As Integer, CveEmpresaCRM As Integer, CveVendedor As Integer, CveUsuarioMod As Integer, + Optional CveCliente As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional CveGiroClasificacion As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CRM_EmpresaUpdate") With SqlAdapter.SelectCommand.Parameters @@ -469,6 +472,7 @@ Public Class ClsCRM .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@Correo", SqlDbType.VarChar).Value = Correo + .Add("@CveGiroClasificaciones", SqlDbType.Int).Value = CveGiroClasificacion End With Try SqlAdapter.Fill(Data) @@ -651,7 +655,8 @@ Public Class ClsCRM Public Function GetAcercamiento(CveEmpresa As Integer, Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamiento As Integer = -1, Optional CveTipoProceso As Integer = -1, Optional CveVendedor As Integer = -1, Optional FechaInicio As String = "-1", Optional FechaFin As String = "-1", Optional NombreAcercamiento As String = "-1", Optional CveMedioCaptacion As Integer = -1, Optional CveRechazoMotivo As Integer = -1, Optional CveProbabilidad As Integer = -1, - Optional FechaApertura As String = "-1", Optional FechaCierre As String = "-1", Optional TopSelect As Integer = 10000) As Boolean + Optional FechaApertura As String = "-1", Optional FechaCierre As String = "-1", Optional TopSelect As Integer = 10000, Optional CvePS As Integer = -1, + Optional CveGiroClasificacion As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CRM_AcercamientoGet") With SqlAdapter.SelectCommand.Parameters @@ -675,6 +680,9 @@ Public Class ClsCRM .Add("@FechaCierre", SqlDbType.VarChar).Value = FechaCierre .Add("@TopSelect", SqlDbType.Int).Value = TopSelect + + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@CveGiroClasificacion", SqlDbType.Int).Value = CveGiroClasificacion End With Try SqlAdapter.Fill(Data) @@ -688,7 +696,7 @@ Public Class ClsCRM Public Function AddAcercamiento(CveEmpresaCRM As Integer, CveContactoPrincipal As Integer, CveTipoProceso As Integer, CveEtapaProcesoActual As Integer, CveVendedor As Integer, CveMedioCaptacion As Integer, CveRechazoMotivo As Integer, CveProbabilidadAcercamiento As Integer, FechaApertura As DateTime, NombreAcercamiento As String, Descripcion As String, Importe As Double, Comision As Double, Prioridad As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer, - Optional FechaCierre As Nullable(Of DateTime) = Nothing) As Integer + Optional FechaCierre As Nullable(Of DateTime) = Nothing, Optional CvePS As Integer = -1) As Integer Dim _CveAcercamiento As Integer = -1 DataAdapter("PA_CRM_AcercamientoAdd") @@ -714,6 +722,7 @@ Public Class ClsCRM .Add("@Prioridad", SqlDbType.Int).Value = Prioridad .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuarioIng", SqlDbType.Int).Value = CveUsuarioIng + .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With @@ -729,7 +738,7 @@ Public Class ClsCRM Public Function UpdateAcercamiento(CveAcercamiento As Integer, CveContactoPrincipal As Integer, CveTipoProceso As Integer, CveEtapaProcesoActual As Integer, CveVendedor As Integer, CveMedioCaptacion As Integer, CveProbabilidadAcercamiento As Integer, NombreAcercamiento As String, Descripcion As String, Importe As Double, Comision As Double, Prioridad As Integer, CveUsuarioMod As Integer, Optional CveRechazoMotivo As Integer = -1, Optional CveEncuestaAplicadaProceso As Integer = -1, - Optional FechaApertura As Nullable(Of DateTime) = Nothing, Optional FechaCierre As Nullable(Of DateTime) = Nothing) As Boolean + Optional FechaApertura As Nullable(Of DateTime) = Nothing, Optional FechaCierre As Nullable(Of DateTime) = Nothing, Optional CvePS As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CRM_AcercamientoUpdate") With SqlAdapter.SelectCommand.Parameters @@ -755,6 +764,7 @@ Public Class ClsCRM .Add("@CveRechazoMotivo", SqlDbType.Int).Value = CveRechazoMotivo .Add("@FechaApertura", SqlDbType.DateTime).Value = IIf(FechaApertura Is Nothing, SqlTypes.SqlDateTime.Null, FechaApertura) .Add("@FechaCierre", SqlDbType.DateTime).Value = IIf(FechaCierre Is Nothing, SqlTypes.SqlDateTime.Null, FechaCierre) + .Add("@CvePS", SqlDbType.Int).Value = CvePS End With Try SqlAdapter.Fill(Data) @@ -1051,7 +1061,7 @@ Public Class ClsCRM Return retorno End Function - Public Function RepAcercamientosDetalle(CveEmpresa As Int32, cveVendedor As Int32, cveMedioCaptacion As Int32, cveProbabilidadAcercamiento As Int32, cveEtapaProceso As Int32, sFecha As String, sFechaIni As String, sFechaFin As String) As Boolean + Public Function RepAcercamientosDetalle(CveEmpresa As Int32, cveVendedor As Int32, cveMedioCaptacion As Int32, cveProbabilidadAcercamiento As Int32, cveEtapaProceso As Int32, sFecha As String, sFechaIni As String, sFechaFin As String, Optional CveTipoProceso As Integer = -1) As Boolean Dim retorno As Boolean = False DataAdapter("PA_CRM_RepAcercamientosDetalle", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters @@ -1063,6 +1073,7 @@ Public Class ClsCRM .Add("@SFecha", SqlDbType.VarChar).Value = sFecha .Add("@SFechaIni", SqlDbType.VarChar).Value = sFechaIni .Add("@SFechaFin", SqlDbType.VarChar).Value = sFechaFin + .Add("@CveTipoProceso", SqlDbType.Int).Value = CveTipoProceso End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index ed8ddbc71..d82eed1e6 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -2406,7 +2406,7 @@ Public Class ClsContabilidad Public Function AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza As Integer, CveConcepto As Integer, TipoMovto As Integer, IdCtaContable As Integer, Orden As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, CveProveedor As Integer, Optional CvePersonal As Integer = -1, - Optional PorcentajeImpuesto As Decimal = 0) As Boolean + Optional PorcentajeImpuesto As Decimal = 0, Optional CveCuenta As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta_PlantillasPolizasDetalleAdd") @@ -2423,6 +2423,7 @@ Public Class ClsContabilidad .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@PorcentajeImpuesto", SqlDbType.SmallMoney).Value = PorcentajeImpuesto + .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta End With Try diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index e7b9a2971..83a20daf6 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -2507,7 +2507,7 @@ Public Class ClsContratos Return Retorno End Function - Public Function GetVentasAvanceObra(CveContrato As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer) As Boolean + Public Function GetVentasAvanceObra(CveContrato As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer, CveRubro As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Con_RepVentasAvancesObra") @@ -2517,6 +2517,9 @@ Public Class ClsContratos .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@Tipo", SqlDbType.Int).Value = Tipo + .Add("@CveRubro", SqlDbType.Int).Value = CveRubro + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With @@ -3493,10 +3496,63 @@ Public Class ClsContratos End Try Return Retorno - End Function + End Function + + + +#Region " MAQUINARIA FLOTILLA HERRAMIENTA " + + + Public Function AddContratosMaquinariaFlotilla(CveActivoFijo As Integer, Fecha As Date, CvePersonal As Integer, Importe As Decimal, CveContratoDetalle As Integer) As Boolean + Dim Retorno As Boolean = False + Dataset = New DataSet() + DataAdapter("PA_Con_ContratosMaquinariaFlotillaAdd") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo + .Add("@Fecha", SqlDbType.DateTime).Value = Fecha + .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@Importe", SqlDbType.Money).Value = Importe + .Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle + End With + + Try + SqlAdapter.Fill(Dataset) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar el registro.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + + Public Function GetContratosMaquinariaFlotillaSubTipoAF(CveContrato As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + Dataset = New DataSet() + DataAdapter("PA_Con_ContratosMaquinariaFlotillaSuibTipoAFGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato + + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el registro.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + + +#End Region + #Region " IDisposable Support " - ' IDisposable + ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then If disposing Then diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index b89221914..e4bdd741e 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -5252,6 +5252,30 @@ Public Class ClsInventarios Return Retorno End Function + + 'Public Function GetMovimientosDetalleTransitorio(CveMovimiento As Integer, CveEmpresa As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter(" + ' select t.FechaMovto, t.CveMovimiento, d.CvePS, d.Cantidad, d.PUOriginal,d.CveUM, dm.CveMovimiento, db.CveMovimientoDetalle from ( + ' select * from Inv_Movimientos m where CveConcepto = 27 and CveEmpresa = @CveEmpresa and + ' m.FechaMovto > '2020/10/01' and m.CveMovimiento = @CveMovimiento and not exists (select * from Conta_PrePolizasDetalle dd where dd.CveMovimientoAlmacen = m.CveMovimiento) + ' ) t left join Inv_MovimientosDetalle d on d.CveMovimiento = t.CveMovimiento left join Inv_MovimientosDetalle dm on dm.CveMovimientoDetalle = d.CveMovimientoDetalleEntrada + ' left join Inv_MovimientosDetalle db on db.CveMovimientoDetalleEntrada = dm.CveMovimientoDetalle and db.CveMovimiento = dm.CveMovimiento + 1 order by db.CveMovimientoDetalle ", CommandType.Text) + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' End With + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener los movimientos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try + + ' Return Retorno + 'End Function + #Region "Proyeccion" Public Function AddMovimientosProyectados(CvePS As Integer, Cantidad As Decimal, TipoMovto As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index be81c310e..b05a5614f 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7052,6 +7052,28 @@ Public Class ClsPaginas RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo) RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo) + Case "RNC" + + + NombreArchivo = "RemisionNC" + NombreArchivoDescarga = "RemisionNC" + TipoDocumento = "REMISION" + + params.Add(New ReportParameter("TipoDocumento", NombreArchivoDescarga)) + params.Add(New ReportParameter("Tipo", TipoDocumento)) + params.Add(New ReportParameter("Ref", TipoDocumentoRef)) + params.Add(New ReportParameter("AplicaPagare", AplicaPagare)) + + 'ALAN YEPIZ + If UsuarioActual.CveEmpresa.Contiene(123) Then + params.Add(New ReportParameter("DiaExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Day))) + params.Add(New ReportParameter("MesExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Month))) + params.Add(New ReportParameter("AñoExpedicion", String.Format("{0}", Vta.Fecha.ToDate.Year))) + End If + + RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo) + RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo) + Case Else NombreArchivo = "" TipoDocumento = "" diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index d0648d098..a4b949dfd 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -2719,7 +2719,7 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetRepCotizacionesSinFacturar(FechaI As Date, FechaF As Date, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1) As Boolean + Public Function GetRepCotizacionesSinFacturar(FechaI As Date, FechaF As Date, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional CveEstatusFactura As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_RepCotizacionesSinFacturarGet") @@ -2729,6 +2729,7 @@ Public Class ClsVentas .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta End With diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 732c68020..68dbd2bec 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -520,6 +520,11 @@ Namespace Modelos Me.DtOtrosConceptos = ObjVentas.DtResultados.Copy() End If + 'CARGA REMISIONES RELACIONADAS + If ObjVentas.GetRemisionesRelacionadas(CveVenta, TipoDocto) Then + Me.DtRemisionesDocumentosRelacionados = ObjVentas.DtResultados.Copy() + End If + ObjVentas.Dispose() If Me.RealizarDevolucionAlmacen Then @@ -1912,6 +1917,27 @@ Namespace Modelos DtVentasNC.Rows.Add(Dr) End If End Sub + Private Function CancelarMovimientosUsados(factura As Modelos.Factura, UsuarioActual As Usuario, ByRef ObjAcum As ClsAcumuladores) As Boolean + Dim Retorno As Boolean = True + If ObjAcum.DistribuidorMovtosGet(factura.CveCliente, UsuarioActual.CveEmpresa, CveVentaRNCCargo:=factura.CveVenta, CveConcepto:=2) Then + Dim CveConceptoSalida As Integer = 2 + + Dim DtSalidas As DataTable = ObjAcum.DtResultados.FiltraParametros("Cantidad > 0") + If DtSalidas IsNot Nothing AndAlso DtSalidas.Rows.Count > 0 Then + For Each RowSalida As DataRow In DtSalidas.Rows + Dim Cantidad As Decimal = RowSalida("Cantidad").ToString().ToDecimal() * -1 + + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, RowSalida("CveTamaño").ToString.ToEntero, CveConceptoSalida, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "") Then + Retorno = False + Exit For + End If + Next + DtSalidas.Dispose() + End If + + End If + Return Retorno + End Function Private Function GuardarUsados(ByRef ObjAcum As ClsAcumuladores, ByRef ObjVentas As ClsVentas, ByRef ObjInventario As ClsInventarios, factura As Modelos.Factura, ByRef Optional Resp As MMensajeFactura = Nothing) As Boolean Dim Resultado As Boolean = True @@ -4574,6 +4600,7 @@ Namespace Modelos Dim ObjInventario As New ClsInventarios(ObjVentas.IniciaTransacSQL()) Dim ObjContrato As New ClsContratos(ObjVentas.IniciaTransacSQL()) Dim ObjEventos As New ClsOIEventos(ObjVentas.IniciaTransacSQL()) + Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL()) Dim ObjAC As ClsContPAQi = Nothing If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200) = "1" Then @@ -4990,6 +5017,16 @@ Namespace Modelos End If End If + 'CANCELA MOVIMIENTOS DE USADOS + If Not ErrorCancelar Then + If ObjFactura.TipoDocto = "Ing" Then + If Not CancelarMovimientosUsados(ObjFactura, UsuarioActual, ObjAcum) Then + ErrorCancelar = True + MensajeError = "Ocurrió un error al cancelar los movimientos de usados" + End If + End If + End If + End If 'MARCA LA VENTA PARA REALIZAR LA DEVOLUCION POSTERIORMENTE @@ -5774,6 +5811,8 @@ Namespace Modelos Public Property DtDocumentacionCliente As Data.DataTable Public Property DtContratosSerieDetalle As Data.DataTable Public Property DtOtrosConceptos As Data.DataTable + + Public Property DtRemisionesDocumentosRelacionados As Data.DataTable Public Property DtInventario As Data.DataTable 'Public Property DtAnticipoAmortizacion As Data.DataTable Public Property DtRemConceptosSurtidos As Data.DataTable diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index 56fce0da2..42549491e 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -2688,6 +2688,15 @@ Public Class Timbrado #Region "Timbra" If ArchivoGenerado Then + Dim opciones As String() = New String(0) {"CALCULAR_SELLO"} + Dim pade = New PADE33.PadeTimbradoServiceClient + Dim Respuesta As String = pade.timbradoPrueba("72330711-cac6-4106-8051-cbcda1aef495", "rene.molina@adssistemas.mx", "Facturacion2021#", cfdi.Xml, opciones) + ' Aumentamos el timeout de la operación + + Dim FolioFiscal As String + FolioFiscal = obtenerAtributo(Respuesta, "TimbreFiscalDigital", "UUID") 'XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText + + 'cfdi.TimbrarCfdi(UsuarioServicio, ClaveServicio, UrlServicio, TimbraProduccion) 'sw.Stop() diff --git a/App_WebReferences/PADE33/Reference.svcmap b/App_WebReferences/PADE33/Reference.svcmap new file mode 100644 index 000000000..0bfba4957 --- /dev/null +++ b/App_WebReferences/PADE33/Reference.svcmap @@ -0,0 +1,32 @@ + + + + false + true + true + + false + false + false + + + true + Auto + true + true + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/PADE33/Timbrado3.wsdl b/App_WebReferences/PADE33/Timbrado3.wsdl new file mode 100644 index 000000000..20ff39a6d --- /dev/null +++ b/App_WebReferences/PADE33/Timbrado3.wsdl @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/PADE33/Timbrado3.xsd b/App_WebReferences/PADE33/Timbrado3.xsd new file mode 100644 index 000000000..a986a6652 --- /dev/null +++ b/App_WebReferences/PADE33/Timbrado3.xsd @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/PADE33/configuration.svcinfo b/App_WebReferences/PADE33/configuration.svcinfo new file mode 100644 index 000000000..34a3fd535 --- /dev/null +++ b/App_WebReferences/PADE33/configuration.svcinfo @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/PADE33/configuration91.svcinfo b/App_WebReferences/PADE33/configuration91.svcinfo new file mode 100644 index 000000000..fdf001f3e --- /dev/null +++ b/App_WebReferences/PADE33/configuration91.svcinfo @@ -0,0 +1,201 @@ + + + + + + + PadeTimbradoServicePortBinding + + + + + + + + + + + + + + + + + + + + + StrongWildcard + + + + + + 65536 + + + + + + + + + System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + System.Text.UTF8Encoding + + + Buffered + + + + + + Text + + + System.ServiceModel.Configuration.BasicHttpSecurityElement + + + None + + + System.ServiceModel.Configuration.HttpTransportSecurityElement + + + None + + + None + + + System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement + + + Never + + + TransportSelected + + + (Collection) + + + + + + System.ServiceModel.Configuration.BasicHttpMessageSecurityElement + + + UserName + + + Default + + + + + + + + + http://timbrado.pade.mx:80/servicio/Timbrado3.3 + + + + + + basicHttpBinding + + + PadeTimbradoServicePortBinding + + + PADE33.PadeTimbradoService + + + System.ServiceModel.Configuration.AddressHeaderCollectionElement + + + <Header /> + + + System.ServiceModel.Configuration.IdentityElement + + + System.ServiceModel.Configuration.UserPrincipalNameElement + + + + + + System.ServiceModel.Configuration.ServicePrincipalNameElement + + + + + + System.ServiceModel.Configuration.DnsElement + + + + + + System.ServiceModel.Configuration.RsaElement + + + + + + System.ServiceModel.Configuration.CertificateElement + + + + + + System.ServiceModel.Configuration.CertificateReferenceElement + + + My + + + LocalMachine + + + FindBySubjectDistinguishedName + + + + + + False + + + PadeTimbradoServicePort + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/wsValidaCFDi2/ConsultaCFDIService.xsd b/App_WebReferences/wsValidaCFDi2/ConsultaCFDIService.xsd index 1e54f4ce6..2b9fa47bf 100644 --- a/App_WebReferences/wsValidaCFDi2/ConsultaCFDIService.xsd +++ b/App_WebReferences/wsValidaCFDi2/ConsultaCFDIService.xsd @@ -6,6 +6,7 @@ + diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 0b6332772..5b1f83c44 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -702,7 +702,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153, 159, 160, 161, 162, 163) Then UsaGlobal = False - If CveEmpresa = 140 And Pagina.Contiene("ventas/ventas") Then + If CveEmpresa.Contiene(140, 141) And Pagina.Contiene("ventas/ventas") Then AplicaParaVenta = 1 End If diff --git a/Bancos/CatBancos.aspx.vb b/Bancos/CatBancos.aspx.vb index 9a57ab193..0aee43f9b 100644 --- a/Bancos/CatBancos.aspx.vb +++ b/Bancos/CatBancos.aspx.vb @@ -119,6 +119,7 @@ Partial Class Bancos_CatBancos Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating Dim ObjBancos As New ClsBancos + ObjBancos.IniciaTransacSQL() Dim Banco As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtBanco"), TextBox).Text.Trim Dim Ejecutivo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtEjecutivo"), TextBox).Text.Trim @@ -126,13 +127,27 @@ Partial Class Bancos_CatBancos Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked Dim CveBanco As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero + Dim TieneError As Boolean = False If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then - GvDatos.EditIndex = -1 - ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - GlobalDTBancos = ObjBancos.DtResultados - Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) + If ObjBancos.InhabilitarCuentasBancos(CveBanco, Estatus) Then + GvDatos.EditIndex = -1 + ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + GlobalDTBancos = ObjBancos.DtResultados + Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) + Else + TieneError = True + End If + Else + TieneError = True + End If + + If TieneError Then + ObjBancos.RollBack() + Else + ObjBancos.Commit() + GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing End If ObjBancos.Dispose() diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 598bfd446..7c6dcf10c 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1118,8 +1118,9 @@ Partial Class Bancos_IE End If + 'DATOS DE CANCELACION - If ObjIE.CveEstatusIE = 2 Then + If ObjIE.CveEstatusIE = 2 OrElse (ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelacion > 0) Then TabCancelacion.Visible = True LbUsuarioCancelacion.Text = ObjIE.UsuarioCancelacion LbFechaCancelacion.Text = ObjIE.FechaCancelacion.ToShortDateString @@ -4480,8 +4481,8 @@ Partial Class Bancos_IE Else ' If TxtFechaDocumento.Text.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or TxtFechaDocumento.Text.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Then - Dim GeneraCancelacionEnCero As Boolean = True - If TxtFechaDocumento.Text.ToDate >= TxtFechaCancelacion.Text.ToDate.FirstDayOfMonth Then 'si es del mismo mes, se genra cancelacion en cero + Dim GeneraCancelacionEnCero As Boolean = False + If TxtFechaCancelacion.Text.ToDate <= TxtFechaDocumento.Text.ToDate.LastDayOfMonth Then 'si es del mismo mes, se genra cancelacion en cero GeneraCancelacionEnCero = True End If @@ -5058,8 +5059,12 @@ Partial Class Bancos_IE Dim fileItem As Archivo = Filesgral(0) Dim Path As String = HttpContext.Current.Request.ApplicationPath Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") - Path = HttpContext.Current.Request.MapPath(Path) + + Path = Extensiones.DirectorioBaseEmpresas Path += String.Format("Empresas/{0}/IE", UsuarioActual.CveEmpresa) + + + If Not Directory.Exists(Path) Then Directory.CreateDirectory(Path) End If diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index c16a3ca10..b11dc7cc1 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -1832,7 +1832,7 @@ Partial Class Bancos_ProveedoresAbonar IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria 'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) - Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion) + Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioCompraValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * TipoCambioPago) 'Añadimos la diferencia de perdida en la venta diff --git a/CRM/Acercamiento.aspx b/CRM/Acercamiento.aspx index ef2aec956..4fac5eeab 100644 --- a/CRM/Acercamiento.aspx +++ b/CRM/Acercamiento.aspx @@ -405,12 +405,15 @@ <%-- style="padding-bottom: 17px;" --%>
- + <%----%>
- +
+ + +
diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs index 3890d6dc8..30c7a064f 100644 --- a/CRM/Acercamiento.aspx.cs +++ b/CRM/Acercamiento.aspx.cs @@ -234,6 +234,18 @@ public partial class CRM_Acercamiento : ClsPaginas ViewState["CveAcercamientoGasto"] = value; } } + private int CvePS + { + get + { + return ViewState["CvePS"] == null ? -1 : ViewState["CvePS"].ToString().ToEntero(); + } + + set + { + ViewState["CvePS"] = value; + } + } #endregion protected void Page_Load(object sender, EventArgs e) @@ -269,6 +281,7 @@ public partial class CRM_Acercamiento : ClsPaginas } } } + CargarPS(); } } @@ -322,6 +335,8 @@ public partial class CRM_Acercamiento : ClsPaginas CveEncuestaAplicadaProceso = (ObjCRM.DtResultados.FiltroPrimeroValor("CveEncuestaAplicadaProceso").ToEntero() > 0) ? ObjCRM.DtResultados.FiltroPrimeroValor("CveEncuestaAplicadaProceso").ToEntero() : -1; //CveEtapaBitacoraSeleccionada = CveEtapaActual; + CvePS = ObjCRM.DtResultados.FiltroPrimeroValor("CvePS").ToEntero(); + HdfEtapaSeleccionada.Value = CveEtapaActual.ToString(); //INHABILITAMOS CAMPOS QUE NO SE PUEDEN EDITAR DdlEmpresaCRM.Enabled = false; @@ -556,6 +571,17 @@ public partial class CRM_Acercamiento : ClsPaginas if (DTEtapasProceso.FiltroPrimeroValor("CveTipoEtapa", String.Format("CveEtapaProceso = {0}", DdlEtapaProceso.SelectedValue.ToEntero())).Contiene("1", "2", "3")) GuardarCambioEtapa(); } + + private void CargarPS() + { + DdlPS.setEsWebService(true); + if(CvePS > 0) + { + string productoAsignado = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS: CvePS).FiltroPrimeroValor("PSCodigo"); + DdlPS.SelectedValue = CvePS.ToString(); + DdlPS.SelectedText = productoAsignado; + } + } #endregion #region "GUARDAR" @@ -605,7 +631,7 @@ public partial class CRM_Acercamiento : ClsPaginas } if ((CveEncuestaAplicadaProceso != 0) && ObjCRM.UpdateAcercamiento(CveAcercamiento, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActualActualizar, CveVendedor, CveMedioCaptacion, CveProbabilidadAcercamiento, - NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveUsuario, CveEncuestaAplicadaProceso: CveEncuestaAplicadaProceso, FechaApertura: FechaApertura, FechaCierre: FechaCierre)) + NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveUsuario, CveEncuestaAplicadaProceso: CveEncuestaAplicadaProceso, FechaApertura: FechaApertura, FechaCierre: FechaCierre, CvePS:DdlPS.SelectedValue.ToEntero())) { //String MensajeBitacora = (CveEtapaProcesoActualActualizar != CveEtapaActual) ? String.Format("Se actualizó la etapa del acercamiento a {0}.", DTEtapasProceso.FiltroPrimeroValor("EtapaProceso", "CveEtapaProceso = " + CveEtapaProcesoActualActualizar)) : String.Format("Se actualizó el Acercamiento {0} con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text); @@ -671,7 +697,7 @@ public partial class CRM_Acercamiento : ClsPaginas int CveUsuarioIng = UsuarioActual.CveUsuario; if (ObjCRM.UpdateAcercamiento(CveAcercamiento, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActualActualizar, CveVendedor, CveMedioCaptacion, CveProbabilidadAcercamiento, - NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveUsuario, CveEncuestaAplicadaProceso: CveEncuestaAplicadaProceso, FechaApertura: FechaApertura, FechaCierre: FechaCierre)) + NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveUsuario, CveEncuestaAplicadaProceso: CveEncuestaAplicadaProceso, FechaApertura: FechaApertura, FechaCierre: FechaCierre, CvePS: DdlPS.SelectedValue.ToEntero())) { CveEtapaActual = CveEtapaProcesoActualActualizar; HdfEtapaSeleccionada.Value = CveEtapaProcesoActualActualizar.ToString(); diff --git a/CRM/EmpresaCRM.aspx b/CRM/EmpresaCRM.aspx index 9ff6a1393..24e763256 100644 --- a/CRM/EmpresaCRM.aspx +++ b/CRM/EmpresaCRM.aspx @@ -109,6 +109,11 @@ +
+ + +
+ <%-- DATOS DINAMICOS - TABLA ENCUESTA --%> @@ -676,6 +681,12 @@ +
+
+ + +
+
diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs index 85ff85b65..8c2874e1b 100644 --- a/CRM/EmpresaCRM.aspx.cs +++ b/CRM/EmpresaCRM.aspx.cs @@ -217,6 +217,19 @@ public partial class CRM_EmpresaCRM : ClsPaginas ViewState["DtProbabilidadAcercamiento"] = value; } } + + private int CveGiroClasificacion + { + get + { + return ViewState["CveGiroClasificacion"].ToString().ToEntero(); + } + + set + { + ViewState["CveGiroClasificacion"] = value; + } + } #endregion protected void Page_Load(object sender, EventArgs e) @@ -237,6 +250,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas CargaDatosTecnicos(); } VerificaPermisos(); + CargaClasificaciones(); + DdlPS.setEsWebService(true); } } @@ -274,7 +289,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas { string Mensaje = ""; //DATOS GENERALES - CveEmpresaCRM = ObjCRM.AddEmpresaCRM(NombreEmpresa, RFC, CveMedioCaptacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CveEncuestaAplicada, CveVendedorActualizar, CveSubProyecto, Correo); + CveEmpresaCRM = ObjCRM.AddEmpresaCRM(NombreEmpresa, RFC, CveMedioCaptacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CveEncuestaAplicada, CveVendedorActualizar, CveSubProyecto, Correo, DdlGiroClasificacion.SelectedValue.ToEntero()); if (CveEmpresaCRM > 0) { @@ -321,7 +336,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas CveEncuestaAplicada = GuardaDatosTecnicos(ObjDatosTecnicos, CveEncuestaAplicada); } - if ((CveEncuestaAplicada != 0) && ObjCRM.UpdateEmpresCRM(NombreEmpresa, RFC, CveMedioCaptacion, CveEmpresaCRM, CveVendedorActualizar, UsuarioActual.CveUsuario, CveSubProyecto: CveSubProyecto, Correo: Correo)) + if ((CveEncuestaAplicada != 0) && ObjCRM.UpdateEmpresCRM(NombreEmpresa, RFC, CveMedioCaptacion, CveEmpresaCRM, CveVendedorActualizar, UsuarioActual.CveUsuario, CveSubProyecto: CveSubProyecto, Correo: Correo,CveGiroClasificacion:DdlGiroClasificacion.SelectedValue.ToEntero())) { if (!ObjBitacora.AddEventoBitacora(String.Format("Se actualizó la empresa {0} con RFC {1}", NombreEmpresa, RFC), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM)) { @@ -628,8 +643,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas CveVendedor = ObjCRM.DtResultados.FiltroPrimeroValor("CveVendedorAsignado").ToEntero(); CveSubProyecto = ObjCRM.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToEntero(); CveCliente = ObjCRM.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero(); + CveGiroClasificacion = ObjCRM.DtResultados.FiltroPrimeroValor("CveGiroClasificacion") != "" ? ObjCRM.DtResultados.FiltroPrimeroValor("CveGiroClasificacion").ToEntero() : -1; - if(!(CveCliente > 0)) + if (!(CveCliente > 0)) { HplCrearCliente.Visible = true; HplCrearCliente.NavigateUrl = String.Format("/Ventas/Clientes.aspx?CveEmpresaCRM={0}", CveEmpresaCRM); @@ -652,6 +668,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas BtnEliminarEmpresa.Enabled = false; DivBitacora.Visible = false; + + CveGiroClasificacion = -1; } ObjCRM.Dispose(); @@ -665,6 +683,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas else { CreaTempDTContactos(); + CveGiroClasificacion = -1; } DdlVendedorAsignado.SelectedValueExist(CveVendedor); @@ -1429,7 +1448,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas if (ObjCRM.DtResultados.Rows.Count > 0) { CveAcercamiento = ObjCRM.AddAcercamiento(CveEmpresaCRM, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActual, CveVendedor, CveMedioCaptacion, CveRechazoMotivo, CveProbabilidadAcercamiento, - FechaApertura, NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveEmpresa, CveUsuarioIng); + FechaApertura, NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveEmpresa, CveUsuarioIng, CvePS:DdlPS.SelectedValue.ToEntero()); }else { Alert("No tiene 'Etapa Proceso' con el 'Proceso' seleccionado al agregar el Acercamiento",ModExtensiones.TipoMensaje.MsgAdvertencia); @@ -1487,7 +1506,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas BtnEliminarEmpresa.Visible = false; if (!UsuarioActual.TienePermisoProceso(251)) + { LnkAgregarAcercamiento.Visible = false; + } if ((UsuarioActual.CveVendedor != CveVendedor)) { @@ -1545,4 +1566,13 @@ public partial class CRM_EmpresaCRM : ClsPaginas CargaMetodosCaptacion(); UpDatos.Update(); } + + private void CargaClasificaciones() + { + DataTable dtGiroClasificaciones = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa); + DdlGiroClasificacion.DataSource = dtGiroClasificaciones; + DdlGiroClasificacion.DataBind(); + DdlGiroClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlGiroClasificacion.SelectedValueExist(CveGiroClasificacion); + } } \ No newline at end of file diff --git a/CRM/RepAcercamientos.aspx b/CRM/RepAcercamientos.aspx index 7ae9adb04..7b6db4b54 100644 --- a/CRM/RepAcercamientos.aspx +++ b/CRM/RepAcercamientos.aspx @@ -20,7 +20,7 @@
- <%----%> +
@@ -54,13 +54,24 @@
+ +
+
+ +
+
+
- <%--
diff --git a/CRM/RepAcercamientos.aspx.cs b/CRM/RepAcercamientos.aspx.cs index b9443e390..1eef821ff 100644 --- a/CRM/RepAcercamientos.aspx.cs +++ b/CRM/RepAcercamientos.aspx.cs @@ -5,6 +5,7 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Extensiones; +using System.Data; public partial class CRM_RepAcercamientos : ClsPaginas { @@ -41,25 +42,19 @@ public partial class CRM_RepAcercamientos : ClsPaginas protected void CargaDatos() { CveVendedor = DdlVendedor.SelectedValue.ToEntero(); - - if (CveVendedor > 0) + string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text; + string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text; + int CvePS = DdlPS.SelectedValue.ToEntero() == 0 ? -1 : DdlPS.SelectedValue.ToEntero(); + ClsCRM ObjCRM = new ClsCRM(); + if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin, CvePS: CvePS, CveGiroClasificacion:DdlGiroClasificacion.SelectedValue.ToEntero())) { - string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text; - string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text; - - ClsCRM ObjCRM = new ClsCRM(); - if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin)) - { - GVDatos.DataSource = ObjCRM.DtResultados; - GVDatos.DataBind(); - } - - ObjCRM.Dispose(); - UPDatos.Update(); - }else - { - Alert("El Campo Vendedor es requerido",ModExtensiones.TipoMensaje.MsgError); + GVDatos.DataSource = ObjCRM.DtResultados; + GVDatos.DataBind(); } + + ObjCRM.Dispose(); + UPDatos.Update(); + } protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e) @@ -84,6 +79,12 @@ public partial class CRM_RepAcercamientos : ClsPaginas //CALCULAMOS EL INTERVALO DE LA SEMANA ACTUAL TxtFechaInicio.Text = DateTime.Now.AddDays(-((int)DateTime.Now.DayOfWeek) + 1).ToShortDateString(); //TxtFechaFin.Text = DateTime.Now.AddDays((7 - (int)DateTime.Now.DayOfWeek)).ToShortDateString(); + DdlPS.setEsWebService(true); + + DataTable dtGiroClasificaciones = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa); + DdlGiroClasificacion.DataSource = dtGiroClasificaciones; + DdlGiroClasificacion.DataBind(); + DdlGiroClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1")); } #endregion } \ No newline at end of file diff --git a/CRM/RepAcercamientosProcesosDetalle.aspx b/CRM/RepAcercamientosProcesosDetalle.aspx index b54c7f46d..61d484036 100644 --- a/CRM/RepAcercamientosProcesosDetalle.aspx +++ b/CRM/RepAcercamientosProcesosDetalle.aspx @@ -266,7 +266,7 @@ - + @@ -286,7 +286,7 @@ - + diff --git a/CRM/RepAcercamientosProcesosDetalle.aspx.cs b/CRM/RepAcercamientosProcesosDetalle.aspx.cs index fe8ab3eb8..b33304729 100644 --- a/CRM/RepAcercamientosProcesosDetalle.aspx.cs +++ b/CRM/RepAcercamientosProcesosDetalle.aspx.cs @@ -85,9 +85,9 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas RcveMedioCaptacion = Request["cveMedioCaptacion"] == null ? -1 : Request["cveMedioCaptacion"].ToString().ToEntero(); RcveProbabilidadAcercamiento = Request["cveProbabilidadAcercamiento"] == null ? -1 : Request["cveProbabilidadAcercamiento"].ToString().ToEntero(); RcveEtapaProceso = Request["cveEtapaProceso"] == null ? -1 : Request["cveEtapaProceso"].ToString().ToEntero(); - RsFecha = Request["Fecha"] == null ? "" : Request["Fecha"].ToString(); - RsFechaIni = Request["FechaInicio"] == null ? "" : Request["FechaInicio"].ToString(); - RsFechaFin = Request["FechaFin"] == null ? "" : Request["FechaFin"].ToString(); + RsFecha = Request["Fecha"] == null ? Extensiones.ModExtensiones.MinFecha.ToString() : Request["Fecha"].ToString(); + RsFechaIni = Request["FechaInicio"] == null ? Extensiones.ModExtensiones.MinFecha.ToString() : Request["FechaInicio"].ToString(); + RsFechaFin = Request["FechaFin"] == null ? Extensiones.ModExtensiones.MaxFecha.ToString() : Request["FechaFin"].ToString(); try { RsFechaIni = RsFechaIni.ToDateTime().ToString("yyyy/MM/dd"); TxtFechaInicio.Text = RsFechaIni.ToDateTime().ToString("dd/MM/yyyy"); } catch (Exception) { RsFechaIni = ""; } try { RsFechaFin = RsFechaFin.ToDateTime().ToString("yyyy/MM/dd"); TxtFechaFin.Text = RsFechaFin.ToDateTime().ToString("dd/MM/yyyy"); } @@ -192,7 +192,7 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas protected void cargarDatos() { ClsCRM ObjRepA = new ClsCRM(); - ObjRepA.RepAcercamientosDetalle(UsuarioActual.CveEmpresa, RcveVendedor, RcveMedioCaptacion, RcveProbabilidadAcercamiento, RcveEtapaProceso, RsFecha, RsFechaIni, RsFechaFin); + ObjRepA.RepAcercamientosDetalle(UsuarioActual.CveEmpresa, RcveVendedor, RcveMedioCaptacion, RcveProbabilidadAcercamiento, RcveEtapaProceso, RsFecha, RsFechaIni, RsFechaFin,CveTipoProceso:DdlTipoProceso.SelectedValue.ToEntero()); GVRepAcercamientosDetalle.DataSource = ObjRepA.DtResultados; ObjRepA.Dispose(); GVRepAcercamientosDetalle.DataBind(); @@ -218,8 +218,8 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas // RsFecha = Request["CveGrupo1"] == null ? "" : Request["CveGrupo1"].ToString(); // break; //} - RsFechaIni = TxtFechaInicio.Text.Length > 0 ? TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd") : ""; - RsFechaFin = TxtFechaFin.Text.Length > 0 ? TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd") : ""; + RsFechaIni = TxtFechaInicio.Text.Length > 0 ? TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd") : Extensiones.ModExtensiones.MinFecha.ToString(); + RsFechaFin = TxtFechaFin.Text.Length > 0 ? TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd") : Extensiones.ModExtensiones.MaxFecha.ToString(); RcveVendedor = DdlVendedor.SelectedValue.ToEntero(); RcveMedioCaptacion = DdlMedioCaptacion.SelectedValue.ToEntero(); RcveProbabilidadAcercamiento = DdlProbabilidad.SelectedValue.ToEntero(); diff --git a/CRM/RepAcercamientosRechazos.aspx.cs b/CRM/RepAcercamientosRechazos.aspx.cs index 9a1efc92f..1a5d105c8 100644 --- a/CRM/RepAcercamientosRechazos.aspx.cs +++ b/CRM/RepAcercamientosRechazos.aspx.cs @@ -131,9 +131,17 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas HyperLinkField hypt = new HyperLinkField(); hypt.DataTextField = $"Total"; hypt.HeaderText = $"Total"; - hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" , "Grupo1" }; - string strfilstros = string.Format("&cveVendedor={0}&cveMedioCaptacion={1}&cveProbabilidadAcercamiento={2}", cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento); - hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}"; + string strfilstros = ""; + if (DdlGrupo1.SelectedValue == "1") { + hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2", "Grupo1", "CveVendedor" }; + strfilstros = string.Format("&cveMedioCaptacion={0}&cveProbabilidadAcercamiento={1}", cveMedioCaptacion, cveProbabilidadAcercamiento); + hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&cveVendedor={{3}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}"; + } + else { + hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" , "Grupo1" }; + strfilstros = string.Format("&cveVendedor={0}&cveMedioCaptacion={1}&cveProbabilidadAcercamiento={2}", cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento); + hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&c&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}"; + } switch (idgrupo1) { case 1: diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 9d90e76a0..172bf3174 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -1,131 +1,131 @@ -<%@ Page Title="Compras - Registro de Facturas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" ValidateRequest="false" CodeFile="Compras.aspx.vb" Inherits="Compras_Compras" EnableEventValidation="false" %> - - - - - - - -
  • - -
  • -
    -
    - - -
  • - -
  • -
  • - Agregar Concepto -
  • -
  • - Imprimir XML -
  • -
  • - Imprimir PDF -
  • -
  • - Ver Almacen -
  • -
  • - Imprimir Desglose -
  • -
  • - Agregar PS -
  • -
  • - Agregar Otros Gastos -
  • -
  • - Costo Indirecto/Importaciones -
  • - - -
  • - -
  • -
    -
    - - -
  • - -
  • -
    -
    - - - -
  • - Descontabilizar -
  • -
    - - - -
    -
  • - Contabilizar -
  • -
  • - Pagar -
  • - - -
  • - <%----%> - Solicitar Devolución -
  • -
    -
    - - +<%@ Page Title="Compras - Registro de Facturas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" ValidateRequest="false" CodeFile="Compras.aspx.vb" Inherits="Compras_Compras" EnableEventValidation="false" %> + + + + + + + +
  • + +
  • +
    +
    + + +
  • + +
  • +
  • + Agregar Concepto +
  • +
  • + Imprimir XML +
  • +
  • + Imprimir PDF +
  • +
  • + Ver Almacen +
  • +
  • + Imprimir Desglose +
  • +
  • + Agregar PS +
  • +
  • + Agregar Otros Gastos +
  • +
  • + Costo Indirecto/Importaciones +
  • + + +
  • + +
  • +
    +
    + + +
  • + +
  • +
    +
    + + + +
  • + Descontabilizar +
  • +
    + + + +
    +
  • + Contabilizar +
  • +
  • + Pagar +
  • + + +
  • + <%----%> + Solicitar Devolución +
  • +
    +
    + + -
  • - Contratos +
  • + Contratos
  • -
    - -
    - - - -
    - -
  • - Fletes -
  • -
  • - - - Complementos Pago - - - - -
  • -
  • - Actualizar Tipo Cambio -
  • - - <%-- 25/05/2018 - Link a Paqueterias Guias --%> - - -
  • - Agregar Guía -
  • -
    -
    - -
    - - - +
    + + + + + + + +
  • + Fletes +
  • +
  • + + + Complementos Pago + + + + +
  • +
  • + Actualizar Tipo Cambio +
  • + + <%-- 25/05/2018 - Link a Paqueterias Guias --%> + + +
  • + Agregar Guía +
  • +
    +
    + +
    + + + - - - Registro de Compras - - - - + + + + Registro de Compras + + + + <%-- - --%> - - -
    -
    - - -
    -
    -
    - - Datos de factura de Compra -
    -
    -
    -
    -
    - -
    - -
    -
    -
    -
    -
    + --%> + + +
    +
    + + +
    +
    +
    + + Datos de factura de Compra +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    <%-- - --%> - Proveedor: - <%--Proveedor:--%> - <%-- Proveedor:--%> -
    - - - - - -
    -
    -
    - Tipo: -
    - - - - - - -
    -
    -
    -
    - # O.C.: -
    - -
    - - -
    -
    -
    -
    -
    -
    - -
    - - - -
    - -
    - - - - - -
    -
    -
    -
    -
    - -
    - - - -
    -
    -
    -
    -
    -
    - Fecha Factura: -
    -
    - - - - - - - - - - - - - -
    -
    -
    -
    - Descripción: -
    - - - -
    -
    -
    - Refacturación: -
    - - -
    -
    -
    - ¿Es No Deducible? -
    - -
    -
    - - - + --%> + Proveedor: + <%--Proveedor:--%> + <%-- Proveedor:--%> +
    + + + + + +
    +
    +
    + Tipo: +
    + + + + + + +
    +
    +
    +
    + # O.C.: +
    + +
    + + +
    +
    +
    +
    +
    +
    + +
    + + + +
    + +
    + + + + + +
    +
    +
    +
    +
    + +
    + + + +
    +
    +
    +
    +
    +
    + Fecha Factura: +
    +
    + + + + + + + + + + + + + +
    +
    +
    +
    + Descripción: +
    + + + +
    +
    +
    + Refacturación: +
    + + +
    +
    +
    + ¿Es No Deducible? +
    + +
    +
    + + + <%--
    Tipo Gasto:
    @@ -333,1591 +333,1635 @@
    -
    --%> -
    -
    -
    - - -
    - -
    - - -
    -
    -
    - - Estatus -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - Sucursal: -
    - - -
    -
    -
    - -
    - Estatus: -
    -
    - - - - - -
    -
    -
    - Importe: -
    +
    --%> +
    +
    +
    +
    +
    +
    + +
    + + +
    +
    +
    + + Estatus +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + Sucursal: +
    + + +
    +
    +
    + +
    + Estatus: +
    +
    + + + + + +
    +
    +
    + Importe: +
    -
    -
    -
    - Saldo: -
    + +
    +
    +
    + Saldo: +
    -
    -
    -
    - Contabilizada: -
    - - <%----%> - <%----%> -
    -
    -
    - Tipo Factura: -
    - -
    -
    -
    - Validada SAT: -
    - - No - Si - -
    -
    -
    - Capturó: -
    - -
    -
    -
    - F. Captura -
    - -
    -
    -
    - Tipo Compra: -
    - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    - - -
    - - - - -
    -
    -
    -
    - - La factura no se puede registrar: - -
    -
    -
    -
    - - - - - - - - - - - -
    -
    -
    - - Presupuesto Egresos General -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    - - - -
    -
    -
    -
    - - - -
    -
    -
    -
    - - - - -
    -
    -
    -
    - - - - -
    -
    -
    -
    - - - -
    -
    -
    -
    - <%--$--%> - - -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    - -
    -
    -
    - - - -
    - - - <%--width="100%"--%> - - - - + + + +
    + Contabilizada: +
    + + <%----%> + <%----%> +
    +
    +
    + Tipo Factura: +
    + +
    +
    +
    + Validada SAT: +
    + + No + Si + +
    +
    +
    + Capturó: +
    + +
    +
    +
    + F. Captura +
    + +
    +
    +
    + Tipo Compra: +
    + + + + + + + + + + + + + + + +
    +
    + + + + + + + + + + + + +
    +
    +
    +
    + + La factura no se puede registrar: + +
    +
    +
    +
    + + + + + + + + + + + +
    +
    +
    + + Presupuesto Egresos General +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +
    + + + +
    +
    +
    +
    + + + + +
    +
    +
    +
    + + + + +
    +
    +
    +
    + + + +
    +
    +
    +
    + <%--$--%> + + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + +
    + +
    #CantUnidad
    + <%--width="100%"--%> + + + + - - + + + + + + +
    + +
    + + - - - -
    -
    - - - - - - - - - - - -
    #CantUnidad Clasificación + + + +     - -
    - -
    -
    - Producto o Servicio
    Observación - + + + + + +
    + +
    +
    + Producto o Servicio
    Observación +   - - -
    - -
    - -
    Tipo de Gasto - -
    -
    -
    P.U. % IVA Total ¿No Deducible? Comandos
    - - - - - - -
    -
    - - - -
    - <%----%> -
    -
    -
    - - - -
    -
    - -
    -
    -
    - - - - - - - -
    -
    - - - - - <%-- 0 --%> - - - - - - <%-- 1 --%> - - <%-- 2 --%> - - - - - - - <%-- 3 --%> - - -
    - - - - -
    - -
    -
    -
    - <%-- 4 --%> - - <%-- 5 --%> - - - - - - - - - <%-- 6 --%> - - <%-- 7 --%> - - <%-- 8 --%> - - - - - - <%-- 9 --%> - - - <%-- 10 --%> - - - - - - - <%-- 11 --%> - - - - - - <%-- 12 --%> - - - - - - <%-- 13 --%> - - - - - - <%-- 14 --%> - - - - - - <%-- 15 --%> - - - - - - <%-- 16 --%> - - - - - - <%-- 17 --%> - - - - - -
    -
    - - -
    - -
    -
    - - - - - - + + + + + +
    +
    + + P.U.  + % IVA  + Total  +
    + ¿No Deducible?  +
    + Comandos + + + + + + + + + + + + +
    +
    + + + +
    + <%----%> +
    +
    +
    + + + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + <%-- 0 --%> + + + + + + <%-- 1 --%> + + <%-- 2 --%> + + + + + + + <%-- 3 --%> + + +
    + + + + +
    + +
    +
    +
    + <%-- 4 --%> + + <%-- 5 --%> + + + + + + + + + <%-- 6 --%> + + <%-- 7 --%> + + <%-- 8 --%> + + + + + + <%-- 9 --%> + + + <%-- 10 --%> + + + + + + + <%-- 11 --%> + + + + + + <%-- 12 --%> + + + + + + <%-- 13 --%> + + + + + + <%-- 14 --%> + + + + + + <%-- 15 --%> + + + + + + <%-- 16 --%> + + + + + + <%-- 17 --%> + + + + + +
    +
    + + +
    + +
    +
    + + + + + +       - - - - Factura - - - - - - Fecha - - - - - - Total - - - - - - - Anticipo/NC - + + + + + Factura + + + + + + Fecha + + + + + + Total + + + + + + + Anticipo/NC +   - - - - Mon - + + + + + Mon +   - - - - - - - - - - Aux - - - - - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + Aux + + + + + + + + + + +
    +
    +
    Original
    - - - - - -
    - - - - - - -
    - - -
    -
    -
    SubTotal:
    -
    - - - -  
    Descuentos: - - -  
    Amort. Ant.: - - -
    + + + + + + + + + + + + + + + + + + + + + + +   + - - - - - - - - - - - - + + + + + + + + + + + + - + + <%----%> - - - - - - - - - - - - - --%> + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - -
    Original
    + + + + + +
    + + + + + + +
    + + +
    +
    +
    SubTotal:
    +
    + + + +  
    Descuentos: + + +  
    Amort. Ant.: + + +   -   -     - -
    SubTotal 2: - - - - -  
    IVA: - - - - - - - Deglose 6% + + + + + +
    SubTotal 2: + + + + +  
    IVA: + + + + + + + Deglose 6% <%----%> - 8% 16% 0% -
    Ret. IVA: - - - - - - - -
    Ret ISR: - - - - +
    Ret. IVA: + + + + + + + +
    Ret ISR: + + + + % - - -
    IEPS: - - -
    O.Imp: - - -
    Redondeo: - - -
    Total: - - - - - -
    - - - - - - - -
    +
    + +
    IEPS: + + +
    O.Imp: + + +
    Redondeo: + + +
    Total: + + + + + +
    + + + + + + + +
    TC: - -
    -
    -
    -
    -
    -
    - -
    - - -
    -
    - - - - - - - - - - - - - - -
    -
    -
    -
      + + + + + +
    + + + + + +
    +
    + +
    + + +
    +
    + +
    +
    + +
    +
    + + + + + + + + +
    +
    +
    +
    • Aplica consignación: - -
    • -
      -
    • - - - - -
    • + + + + + + +
      +
    • + + + + +
    • Consignación: - -
    • + + + + + + <%--
    • Folio Consignación: -
    • --%> -
    -
    -
    - - <%----%> -
    -
    -
    -
    -
    - - - - - - - - - - -
    - - Archivo -
    - -
    -
    -
    - - - - - - - - Aplica
    - Inventario
    - -
    - - - -
    - - - -
    - - -
    - -
    - - - - - - - - - Almacén
    - -
    -
    - - - - - - - - + --%> + +
    +
    + + <%----%> +
    +
    +
    +
    +
    + + + + + + + + + + +
    + + Archivo +
    + +
    +
    +
    + + + + + + + + Aplica
    + Inventario
    + +
    + + + +
    + + + +
    + + +
    + +
    + + + + + + + + + Almacén
    + +
    +
    + + + + + + + + <%-- - --%> - - - Almacén Consignación
    - -
    - - - -
    - - - - - - - - - - - - + --%> + + + Almacén Consignación
    + +
    + + + +
    + + + + + + + + + + + + <%-- - --%> -
    -
    - -
    - - - - - + --%> + + + +
    + + + + + - - - - - - - + + + + + + + - - - - - - Producto - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - -
    -
    - - Factura de la nota de Credito -
    -
    -
    -
    -
    - -
    - - - - - - -
    Compra: - - - -
    -
    -
    -
    -
    -
    - - - - - -
    Almacen: - -
    -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    - - - - - - - - - - -
    -
    - -
    - -
    -
    -
    -
    -
      + + + + + + Producto + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + +
    +
    + + Factura de la nota de Credito +
    +
    +
    +
    +
    + +
    + + + + + + +
    Compra: + + + +
    +
    +
    +
    +
    +
    + + + + + +
    Almacen: + +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + + + + + + + + + + +
    +
    + +
    + +
    +
    +
    +
    +
    • Tipo Cambio: - - - - -
    • -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    - - Advertencia: - -
    -
    -
    - -
    - -
    -
    -
    -
    - - Advertencia: - -
    -
    -
    -
    - -
    -
    -
    -
    - - Nota: - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    - Promoción: -
    -
    - -
    -
    -
    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    - -
    -
    - Ordenes de Compra con Almacén: -
    -
    - -
    -
    -
    -
    -
    -
    - -
    -
    -
    - -
    - - - - - - - - - -
    -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    -
    - - - + + + + + + + + + + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + + Advertencia: + +
    +
    +
    + +
    + +
    +
    +
    +
    + + Advertencia: + +
    +
    +
    +
    + +
    +
    +
    +
    + + Nota: + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + Promoción: +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + Ordenes de Compra con Almacén: +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    + + + + + + + + + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + + +            - -
    -
    -
    -
    -
    -
    - -
    -
    -
    - - -
    -
    - -
    -
    -
    -
    - - - - - - - - - - <%-- --%> - - - - - - - - - <%-- --%> - - - - - - - - - - <%-- --%> - - - + + +
    +
    +
    +
    +
    + +
    + +
    + + +
    +
    + +
    +
    +
    + +
    Importes VinculadosCalculados
    Tipo De Cambio - - - - - -
    Subtotal - - - - - -
    + + + + + + + + + <%-- --%> + + + + + + + + + <%-- --%> + + + + + + + + + + <%-- --%> + + + - - - - - - <%-- --%> - - - - + + + + + + + <%-- --%> + + + + - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - <%-- --%> - - - + + + + + + + <%-- --%> + + + - - - - - - <%-- --%> - - - + + + + + + + <%-- --%> + + + - - - - - - <%-- --%> - - - + + + + + + + <%-- --%> + + + - - - - - <%-- --%> - -
    Importes VinculadosCalculados
    Tipo De Cambio + + + + + +
    Subtotal + + + + + +
    Descuento - - - - -
    + + + +
    Subtotal 2 - - - - - - -
    + + + + + +
    IEPS - - - - -
    + + + +
    IVA - - - - -
    + + + +
    Ret IVA - - - - -
    + + + +
    Ret ISR - - - - -
    + + + +
    Total - - - - -
    -
    - -
    -
    -
    -
    - - Datos de la Compra - -
    -
    -
    -
    -
    -
    - -
    -
    -
    - - -
    - - - - - - - - - - -
    - -
    - + + + + + + + + + + <%-- --%> + + +
    + +
    +
    +
    +
    + + Datos de la Compra + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    + + + + + + + + + + +
    + +
    + Clasificación -
    + + + + +
    Producto/Servicio -
    -
    - - - -
    -
    -
    -
    -
    -
    -
    - - - <%----%> - - - - - - + + + + + + + + + + + + + +
    + + <%----%> + + + + + + - - - - + + + + + - - - - - + + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - - - + + + + + - - -
    Subtotal - - -
    + +
    Descuento - - -
    + +
    Subtotal 2 - - -
    + +
    IEPS - - -
    + +
    IVA - - -
    + +
    Ret IVA - - -
    + +
    Ret ISR - - -
    + +
    Anticipos: - - -
    + +
    Total - - -
    -
    - -
    - - -
    -
    - -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - + + + + + + +
    + +
    + + +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + <%-- @@ -1961,321 +2005,328 @@ - --%> - - - Activos Fijos - - - - - - - -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    #CantidadUnidadProductoObservaciónVinculación AFHorómetro / OdómetroMantenimientoDividir
    -
    -
    - - - - - -
    --%> + + + Activos Fijos + + + + + + + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    #CantidadUnidadProductoObservaciónVinculación AFHorómetro / OdómetroMantenimientoDividir
    +
    +
    + + + + + + - -
    -
    - - - - - - - - - - - - - - -
    #CantidadUnidadProductoObservaciónVinculacion AF
    -
    -
    - - - - - - - + + + + + + + + + + + + + + + +
    + +
    +
    +
    + + +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + +
    #CantidadUnidadProductoObservaciónVinculacion AF
    +
    +
    + + + + + + + - - - - - - - - - - - - - - -
    + + + + + + + + + + + + + + + +
    <%-- -
    --%> - -
    -
    -
    - - - - <%----%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - +
    --%> + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + +
    #CantidadUnidadProductoObservaciónReferencia - -
    + + + + + + + + - - -
    #CantidadUnidadProductoObservaciónReferencia + + Personal -
    - - - -
    Desglosar
    -
    -
    - - - - - - - + + + + +
    + + + + + Desglosar + + +
    +
    + + + + + + + - - - - - - - - - - - - - - -
    + + + + + + + + + + + + + + + +
    <%-- -
    --%> - -
    -
    -
    - - - - - - - - - - -
    - - -
    -
    - - - - - - - <%----%> +
    --%> + +
    +
    +
    + + + + + + + + + + +
    + + +
    +
    + + + + + + + <%----%> <%-- @@ -2283,232 +2334,234 @@ - --%> - + --%> + <%-- --%> - - - - - - - -
    -
    - -
    -
    -
    -
    - - - - - - -
    -
    -
    -
    -
    -
    - - Condiciones de la compra -
    -
    -
    -
    -
    - -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    Método Pago: -
    Fecha Pago: -
    - - - - - - - - - - - - - - -
    -
    - -
    - -
    - - - - - - Personal/Empleado - Caja Chica - - - - - - - - - - - - -
    - - - + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + + Condiciones de la compra +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + + +
    + + + + + + + + + + + + + + + + + + +
    Método Pago: +
    Fecha Pago: +
    + + + + + + + + + + + + + + +
    +
    + +
    + +
    + + + + + + Personal/Empleado + Caja Chica + + + + + + + + + + + + +
    + + + - - - - - - - - - - -
    Reembolso: - - Personal/Empleado - Caja Chica -
    #
    -
    -
    - - - - - - + + + + Personal/Empleado + Caja Chica + + + + + + + + + + + +
    - - - Crédito - Contado - Reembolsos - Crédito Financiero - -
    #
    +
    +
    + + + + + + <%-- --%> - -
    + + + Crédito + Contado + Reembolsos + Crédito Financiero + +
    Numero de Reembolso: -
    - - - -
    -
    - -
    - -
    - -
    -
    - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    - - <%--<%--Reembolsos--%> -
    + --%> + + + + + +
    +
    + +
    + +
    + +
    +
    + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + <%--<%--Reembolsos--%> +
    <%-- -
    @@ -2521,402 +2574,404 @@
    --%> - - -
    -
    -
    -
    -
    -
    -
    -
    -
    - - Observaciones -
    -
    -
    -
    -
    - -
    - -
    -
    -
    - - - - - - - - - -
    Observaciones Generales: 
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - Acciones -
    -
    -
    -
    -
    - -
    - -
    -
    -
    - - - - - - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    -
    -
    - - Facturas Aplicadas -
    -
    -
    -
    -
    - -
    - -
    -
    -
    - - - - -
    -
    -
    -
    - - +
    +
    +
    +
    +
    +
    + + Observaciones +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + + + + + + + + + +
    Observaciones Generales: 
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + Acciones +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + + + + + + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + Facturas Aplicadas +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + + + + +
    +
    +
    +
    + + - - - - <%--********* INICIAN MODALES ***********--%> - - - + + +
    + + + <%----%> - - + + + + + +
    +
    +
    + +
    +
    + <%----%> + Bitácora +
    +
    +
    <%--
    Agregar -
    --%> -
    -
    - - - -
    -
    -
    - -
    - - - - - - - Fecha - - - - - - Fecha Agenda - - - - - - Usuario - - - - - - Descripción - - - - - - Archivo - - - - - - - - - - - - - - -
    -
    -
    -
    - - + +
    + + + + + + + Fecha + + + + + + Fecha Agenda + + + + + + Usuario + + + + + + Descripción + + + + + + Archivo + + + + + + + + + + + + + + +
    +
    +
    +
    + + - - - - - - - - - - - - - - - - - - - - - <%-- MODAL SERIE-LOTE ALMACEN --%> - - - - - -
    -
    -
    -
    -
    - - Historial de Modificación -
    -
    -
    -
    -
    -
    -
    - - - - Fecha - - - - - - - - - - -
    -
    -
    -
    -
    -
    - - - - +
    +
    + + <%--MODAL PREGUNTA IEPS y Otros Impuestos--%> + + + + <%--MODAL IR A OC--%> + + + <%--FLETES--%> + + + - - + + - - + + <%-- COMPLEMENTOS PAGO --%> + + + + + + + <%-- ACTUALIZAR TIPO CAMBIO PREPOLIZA --%> + + + + + + <%-- MODAL FLETES E IMPORTACIONES --%> + + + + + + + + + + + + + + + + + + + <%-- - --%> - - - - - - - --%> + + + + + + +
    diff --git a/Contabilidad/PlantillasPolizasDetalle.aspx.vb b/Contabilidad/PlantillasPolizasDetalle.aspx.vb index d97ccd009..7449e664d 100644 --- a/Contabilidad/PlantillasPolizasDetalle.aspx.vb +++ b/Contabilidad/PlantillasPolizasDetalle.aspx.vb @@ -138,9 +138,32 @@ Partial Class Contabilidad_PlantillasPolizasDetalle Private Sub CargaCuenta() DdlCtaContable.Items.Clear() - DdlCtaContable.DataSource = DTCuentasContables - DdlCtaContable.DataBind() + DdlCtaContable.Items.Insert(0, New ListItem("Seleccione", "-1")) + + If UsuarioActual.Empresa.TipoContabilizacion = 2 Then + Dim Conta As New ClsContabilidad + Dim dtt As New DataTable + + If Conta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then + dtt = Conta.DtResultados + End If + + Conta.Dispose() + + DdlCuentas.Items.Clear() + DdlCuentas.DataSource = dtt + DdlCuentas.DataBind() + DdlCuentas.Visible = True + DdlCtaContable.Visible = False + Else + + DdlCtaContable.DataSource = DTCuentasContables + DdlCtaContable.DataBind() + End If + + + DdlCuentas.Items.Insert(0, New ListItem("Seleccione", "-1")) End Sub Private Sub CargarConcepto() @@ -229,7 +252,8 @@ 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.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal) Then + 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 = "" If Not ChkSeguirAgregando.Checked Then updatatos() diff --git a/Contabilidad/RegPrePoliza.aspx b/Contabilidad/RegPrePoliza.aspx index c29f117a8..1cb80a307 100644 --- a/Contabilidad/RegPrePoliza.aspx +++ b/Contabilidad/RegPrePoliza.aspx @@ -303,7 +303,7 @@
    - + Cuenta diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index c5b0c6618..6215cdbce 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -322,6 +322,7 @@ Partial Class ContabilidadC_RegPrePoliza .Add("ConceptoContable", Type.GetType("System.String")) .Add("TC", Type.GetType("System.Decimal")) .Add("PorcentajeImpuesto", Type.GetType("System.Decimal")) + .Add("CveCuenta", Type.GetType("System.Int32")) End With End Sub @@ -715,15 +716,20 @@ Partial Class ContabilidadC_RegPrePoliza If drr IsNot Nothing Then IdCuenta = drt("IdCtaContable").ToString.ToEntero CodigoCuenta = drr("CuentaFormato").ToString() - NombreCuenta = drr("Nombre").ToString() - 'Cuenta = drr("Nombre").ToString() + NombreCuenta = drr("Nombre").ToString() + 'Cuenta = drr("Nombre").ToString() + NombreCuenta = CodigoCuenta & "
    " & NombreCuenta End If EsComodin = 0 End If + If drt("CveCuenta").ToString.ToEntero > 0 Then + NombreCuenta = String.Format("{0}
    {1}", drt("Codigo"), drt("Nombre")) + End If + Dim dr As DataRow = DtMovimientos.NewRow dr("IdCuenta") = IdCuenta - dr("CodigoCuenta") = CodigoCuenta & "
    " & NombreCuenta + dr("CodigoCuenta") = NombreCuenta dr("Cuenta") = Cuenta 'TxtCuentaContable.Text dr("Referencia") = If(drt("CveConcepto").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial")) dr("Concepto") = TxtObservaciones.Text @@ -737,7 +743,8 @@ Partial Class ContabilidadC_RegPrePoliza dr("CvePersonal") = drt("CvePersonal") dr("CveClasificacion") = -1 dr("MultipleSubProyecto") = drt("MultipleSubProyecto") - dr("PorcentajeImpuesto") = drt("PorcentajeImpuesto") + dr("PorcentajeImpuesto") = drt("PorcentajeImpuesto") + dr("CveCuenta") = drt("CveCuenta") DtMovimientos.Rows.Add(dr) Next @@ -945,8 +952,8 @@ Partial Class ContabilidadC_RegPrePoliza CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero, ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=If(gvr.DataKey("TC").ToString.ToDecimal > 0, gvr.DataKey("TC").ToString.ToDecimal, 1), - ImporteME:=If(gvr.DataKey("TC").ToString.ToDecimal > 0, (Importe / (gvr.DataKey("TC").ToString.ToDecimal - 1)).RoundSQL, 0), - PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal) Then + ImporteME:=If(gvr.DataKey("TC").ToString.ToDecimal > 0, (Importe / (gvr.DataKey("TC").ToString.ToDecimal - 1)).RoundSQL, 0), + PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal, CveCuenta:=gvr.DataKey("CveCuenta").ToEntero) Then Else MsgError = "No se pudo insertar el detalle de la póliza2" Exit For diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index fb51b55b5..1653e71d9 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -1048,7 +1048,7 @@ Partial Class Contratos_Default TxtPorAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero TxtPorAmortizacionAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero TxtPorGarantia.Text = ObjContratos.PorGarantia.FormatoNumero - DdlProyecto.SelectedValue = ObjContratos.CveProyecto.ToString + 'DdlProyecto.SelectedValue = ObjContratos.CveProyecto.ToString CargaSubProyectoContrato(DdlProyecto.SelectedValue.ToEntero) DdlSubProyectoContrato.SelectedValue = ObjContratos.CveSubProyecto.ToString TxtPorIVA.Text = ObjContratos.PorIVA.ToString diff --git a/Contratos/ContratoObra.aspx b/Contratos/ContratoObra.aspx index ea4c94e5d..6efbb60f6 100644 --- a/Contratos/ContratoObra.aspx +++ b/Contratos/ContratoObra.aspx @@ -102,6 +102,10 @@ Agregar Gasto +
  • + Agregar Maquionaria Flotilla Herramienta +
  • + @@ -1011,19 +1015,7 @@
    - <%-- - -
    - -
    -
    - - - -
    --%> + @@ -2414,6 +2406,27 @@ + + + + + + + + + + + + + + + + + + + + +
    @@ -2720,7 +2733,7 @@ Insumos Mano de Obra - Flotillas + Maquinaria Herramienta Flotilla @@ -2764,18 +2777,30 @@
    - - + +
    + + +
    + + + + +
    +
    -
    +
    + + +
    @@ -2890,6 +2915,94 @@
    + + <%--MODAL CONTROL PRESUPUESTOS AGREGAR--%> + + + + diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index 84bf44ec2..257981658 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -436,6 +436,7 @@ Partial Class Contratos_ContratoObra LnkModalAddPSControl.Visible = True LnkModalAddPresupuestoVentas.Visible = True LnkModalAddPresupuestoControl.Visible = True + LnkModalAddMaquinariaFlotilla.Visible = True End If @@ -1824,6 +1825,7 @@ Partial Class Contratos_ContratoObra Row("Rubro") = DdlRubro.SelectedItem.Text If DdlRubro.SelectedValue.ToEntero = 3 Then + Row("CveActividad") = DdlActividades.SelectedValue.ToEntero Row("Actividad") = DdlActividades.SelectedItem.Text Row("Dias") = TxtDias.Text.ToEntero @@ -1838,6 +1840,23 @@ Partial Class Contratos_ContratoObra Row("PS") = DdlActividades.SelectedItem.Text Row("CodigoPS") = DdlActividades.SelectedItem.Text + + ElseIf DdlRubro.SelectedValue.ToEntero = 4 Then + + Row("CveActividad") = -1 + Row("Actividad") = "" + Row("Dias") = TxtDias.Text.ToEntero + Row("CveSubTipoActivoFijo") = DdlSubTipoActivoFijo.SelectedValue.ToEntero + + + Row("CveUM") = -1 + Row("UM") = "" + Row("CveClasificacion") = -1 + Row("Clasificacion") = "" + Row("CvePS") = -1 + Row("PS") = DdlSubTipoActivoFijo.SelectedItem.Text + Row("CodigoPS") = DdlSubTipoActivoFijo.SelectedItem.Text + Else Row("CveActividad") = -1 Row("Actividad") = "" @@ -1903,11 +1922,22 @@ Partial Class Contratos_ContratoObra If CveRubro = 3 Then + CveSubTipoActivoFijo = -1 CveActividad = DdlActividades.SelectedValue.ToEntero Dias = TxtDias.Text.ToEntero CvePS = -1 CveUM = -1 + + ElseIf CveRubro = 4 Then + + CveSubTipoActivoFijo = DdlSubTipoActivoFijo.SelectedValue.ToEntero + CveActividad = -1 + Dias = TxtDias.Text.ToEntero + + CvePS = -1 + CveUM = -1 + Else CvePS = DdlProductowsInsumos.SelectedValue.ToEntero CveUM = DdlUMInsumos.SelectedValue.ToEntero @@ -1923,23 +1953,45 @@ Partial Class Contratos_ContratoObra Dim ObjContratos As New ClsContratos If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, "", False, "", CveRubro:=CveRubro, CveActividad:=CveActividad, CveSubTipoActivoFijo:=CveSubTipoActivoFijo, Dias:=Dias) Then - If Autorizado Then - Dim msj As String = String.Format("Se realizaron los siguientes cambios, el Presupuesto Interno se modificó: {1} {0} {2:C2} a {3} {0} {4:C2}", - row("PS").ToString, row("Cantidad").ToString, row("PU").ToString, Cantidad, PU) - guardarBitacora(msj) - End If + 'If Autorizado Then + ' Dim msj As String = String.Format("Se realizaron los siguientes cambios, el Presupuesto Interno se modificó: {1} {0} {2:C2} a {3} {0} {4:C2}", + ' row("PS").ToString, row("Cantidad").ToString, row("PU").ToString, Cantidad, PU) + ' guardarBitacora(msj) + 'End If + + row("Cantidad") = Cantidad row("CantidadContratada") = Cantidad row("PU") = PU row("Total") = Cantidad * PU row("CveUM") = CveUM - row("UM") = DdlUMInsumos.SelectedItem.Text + row("NoIdentificacion") = "" 'NoIdentificacion row("LimitarCantidad") = False + + row("CveActividad") = CveActividad + row("CveSubTipoActivoFijo") = CveSubTipoActivoFijo + row("Dias") = Dias + + + If CveRubro = 3 Then + row("PS") = DdlActividades.SelectedItem.Text + row("CodigoPS") = DdlActividades.SelectedItem.Text + row("UM") = "" + ElseIf CveRubro = 4 Then + row("PS") = DdlSubTipoActivoFijo.SelectedItem.Text + row("CodigoPS") = DdlSubTipoActivoFijo.SelectedItem.Text + row("UM") = "" + Else + row("UM") = DdlUMInsumos.SelectedItem.Text + End If + TmpDT.AcceptChanges() + Alert("Cambios realizados correctamente.", TipoMensaje.MsgInformacion) RegistraScript("$('#ModalControlAddPS').modal('hide')") + Else Alert("Error al Actualizar Detalle", TipoMensaje.MsgError) End If @@ -2320,6 +2372,8 @@ Partial Class Contratos_ContratoObra GvDatosVentasAvance.Visible = True GvDatosVentasAvanceInterno.Visible = False + GvDatosVentasAvanceInternoRH.Visible = False + GvDatosVentasAvanceInternoMaquinaria.Visible = False 'Dim Btn = CType(sender, LinkButton) 'Dim Parametros = Btn.CommandArgument.Split("|"c) @@ -2332,7 +2386,7 @@ Partial Class Contratos_ContratoObra Dim ObjContratos As New ClsContratos - If ObjContratos.GetVentasAvanceObra(CveContrato, CveClasificacion, CvePS, 1) Then + If ObjContratos.GetVentasAvanceObra(CveContrato, CveClasificacion, CvePS, 1, -1, UsuarioActual.CveEmpresa) Then GvDatosVentasAvance.DataSource = ObjContratos.DtResultados RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;") Else @@ -2357,26 +2411,61 @@ Partial Class Contratos_ContratoObra Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow) - GvDatosVentasAvance.Visible = False - GvDatosVentasAvanceInterno.Visible = True + Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero Dim CodigoPS As String = GvRow.DataKey("CodigoPS") Dim Clasificacion As String = GvRow.DataKey("Clasificacion") + Dim CveRubro As Integer = GvRow.DataKey("CveRubro").ToEntero + + + + + GvDatosVentasAvance.Visible = False + + If CveRubro = 3 Then + GvDatosVentasAvanceInterno.Visible = False + GvDatosVentasAvanceInternoRH.Visible = True + GvDatosVentasAvanceInternoMaquinaria.Visible = False + ElseIf CveRubro = 4 Then + GvDatosVentasAvanceInterno.Visible = False + GvDatosVentasAvanceInternoRH.Visible = False + GvDatosVentasAvanceInternoMaquinaria.Visible = True + Else + GvDatosVentasAvanceInterno.Visible = True + GvDatosVentasAvanceInternoRH.Visible = False + GvDatosVentasAvanceInternoMaquinaria.Visible = False + End If Dim ObjContratos As New ClsContratos - If ObjContratos.GetVentasAvanceObra(CveContrato, CveClasificacion, CvePS, 2) Then - GvDatosVentasAvanceInterno.DataSource = ObjContratos.DtResultados + If ObjContratos.GetVentasAvanceObra(CveContrato, CveClasificacion, CvePS, 2, CveRubro, UsuarioActual.CveEmpresa) Then + + If CveRubro = 3 Then + GvDatosVentasAvanceInternoRH.DataSource = ObjContratos.DtResultados + ElseIf CveRubro = 4 Then + GvDatosVentasAvanceInternoMaquinaria.DataSource = ObjContratos.DtResultados + Else + GvDatosVentasAvanceInterno.DataSource = ObjContratos.DtResultados + End If + RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;") Else Alert("Ocurrió un error al obtener el Listado de Ventas de Avance. Por favor vuelva a intentar", TipoMensaje.MsgError) End If - ObjContratos.Dispose() - GvDatosVentasAvanceInterno.DataBind() + ObjContratos.Dispose() + + If CveRubro = 3 Then + GvDatosVentasAvanceInternoRH.DataBind() + ElseIf CveRubro = 4 Then + GvDatosVentasAvanceInternoMaquinaria.DataBind() + Else + GvDatosVentasAvanceInterno.DataBind() + End If + LbTituloModalVentasAvance.Text = "Compras de Avance" @@ -4163,22 +4252,43 @@ Partial Class Contratos_ContratoObra DVDias.Visible = True DVActividadesRH.Visible = True + DVSubTipoActivoFijo.Visible = False DVClasificacion.Visible = False DVPS.Visible = False DVUM.Visible = False DdlActividades.SelectedValueExist(gvRow.DataKey("CveActividad")) + DdlSubTipoActivoFijo.SelectedValueExist(-1) TxtDias.Text = gvRow.DataKey("Dias") + + ElseIf CveRubro = 4 Then + + + DVDias.Visible = True + DVActividadesRH.Visible = False + DVSubTipoActivoFijo.Visible = True + + + DVClasificacion.Visible = False + DVPS.Visible = False + DVUM.Visible = False + + DdlActividades.SelectedValueExist(-1) + DdlSubTipoActivoFijo.SelectedValueExist(gvRow.DataKey("CveSubTipoActivoFijo")) + TxtDias.Text = gvRow.DataKey("Dias") + Else DVDias.Visible = False DVActividadesRH.Visible = False + DVSubTipoActivoFijo.Visible = False DVClasificacion.Visible = True DVPS.Visible = True DVUM.Visible = True DdlActividades.SelectedValueExist(-1) + DdlSubTipoActivoFijo.SelectedValueExist(-1) TxtDias.Text = "0" End If @@ -4218,18 +4328,22 @@ Partial Class Contratos_ContratoObra UpModalVentasAddPS.Update() End Sub + Private Sub LimpiarModalControl() DdlActividades.Items.Clear() + DdlSubTipoActivoFijo.Items.Clear() + DdlActividades.DataSource = GlobalDTRHActividades(UsuarioActual.CveEmpresa) DdlActividades.DataBind() - DdlActividades.Items.Insert(0, New ListItem("Seleccione una", "-1")) + DdlSubTipoActivoFijo.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa) + DdlSubTipoActivoFijo.DataBind() + DdlSubTipoActivoFijo.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + TxtCantidadInsumos.Text = "" - 'ChkLimitarInsumos.Checked = False - 'TxtNoIdentificacionvInsumos.Text = "" DdlClasificacionAddInsumos.SelectedValueExist(-1) DdlProductowsInsumos.txtText.Value = "" @@ -4238,8 +4352,6 @@ Partial Class Contratos_ContratoObra TxtPUInsumos.Text = "" DdlRubro.SelectedValue = "2" - ' DdlRubro_SelectedIndexChanged(Nothing, Nothing) - DVClasificacion.Visible = True DVPS.Visible = True @@ -4263,7 +4375,33 @@ Partial Class Contratos_ContratoObra End Sub + Private Sub LimpiarModalMaquinaria() + DdlPersonal.Items.Clear() + + + + + DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) + DdlPersonal.DataBind() + DdlPersonal.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + + Dim Objcontratos As New ClsContratos + If Objcontratos.GetContratosMaquinariaFlotillaSubTipoAF(CveContrato, UsuarioActual.CveEmpresa) Then + DdlSubTipoAF.DataSource = Objcontratos.DtResultados + End If + Objcontratos.Dispose() + DdlSubTipoAF.DataBind() + DdlSubTipoAF.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + + + TxtFechaMaquinaria.Text = "" + + + + UpModalMaquinariaFlotilla.Update() + + End Sub Protected Sub BtnCargaPresupuesto_Click(sender As Object, e As EventArgs) @@ -4287,7 +4425,7 @@ Partial Class Contratos_ContratoObra DTCargaPresupuesto = CargaPreSupuestoExcel("Insumos") DTCargaPresupuestoManoObra = CargaPreSupuestoExcel("ManoObra") - DTCargaPresupuestoFlotillas = CargaPreSupuestoExcel("Flotillas") + DTCargaPresupuestoFlotillas = CargaPreSupuestoExcel("Maquinaria") ProcesaDatosCargaPresupuesto(DTCargaPresupuesto, DTCargaPresupuestoManoObra, DTCargaPresupuestoFlotillas) @@ -4579,6 +4717,7 @@ Partial Class Contratos_ContratoObra Row("Observacion") = "" DTPS.Rows.Add(Row) + Else End If End If @@ -4590,6 +4729,48 @@ Partial Class Contratos_ContratoObra If Not DTCargaPresupuestoFlotillas Is Nothing Then + For Each DrowPS As DataRow In DTCargaPresupuestoFlotillas.Rows + + Dim CveSubTipoActivoFijo As Integer = 0 + Dim SubTipoActivoFijo As String = DrowPS("SubTipoAF").ToString + + CveSubTipoActivoFijo = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubTipoActivoFijo", $" SubTipoActivoFijo = '{DrowPS("SubTipoAF").ToString }'").ToEntero + + If CveSubTipoActivoFijo > 0 Then + + Dim Row As DataRow = DTPS.NewRow() + Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble + Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble + Row("CveUM") = -1 + Row("UM") = "Maquinaria Flotilla" + Row("CveClasificacion") = -1 + Row("Clasificacion") = "" + Row("CvePS") = -1 + Row("PS") = SubTipoActivoFijo + Row("CodigoPS") = SubTipoActivoFijo + Row("PU") = DrowPS("PU").ToString.ToDouble + Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble + + Row("CveTipoPresupuesto") = 1 + Row("CveRubro") = 3 + Row("CveActividad") = -1 + Row("CveSubTipoActivoFijo") = CveSubTipoActivoFijo + Row("Dias") = DrowPS("Horas").ToString.ToEntero + + Row("NoIdentificacion") = "" + Row("OCInterna") = "" + Row("LimitarCantidad") = 0 + Row("Observacion") = "" + + DTPS.Rows.Add(Row) + Else + + End If + + + Next + + End If @@ -4643,6 +4824,7 @@ Partial Class Contratos_ContratoObra NrowTmpDT("Rubro") = Row("Rubro") NrowTmpDT("Actividad") = Row("Actividad") NrowTmpDT("SubTipoActivoFijo") = Row("SubTipoActivoFijo") + NrowTmpDT("Dias") = Row("Dias") NrowTmpDT("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle") @@ -4975,13 +5157,28 @@ Partial Class Contratos_ContratoObra Protected Sub DdlRubro_SelectedIndexChanged(sender As Object, e As EventArgs) - If DdlRubro.SelectedValue.ToEntero = 3 Then + If DdlRubro.SelectedValue.ToEntero = 3 Then 'Rubro RH DVDias.Visible = True DVActividadesRH.Visible = True DVClasificacion.Visible = False DVPS.Visible = False DVUM.Visible = False + + DVSubTipoActivoFijo.Visible = False + + + ElseIf DdlRubro.SelectedValue.ToEntero = 4 Then 'Rubro Maquinaria florilla herramienta + + DVDias.Visible = True + DVActividadesRH.Visible = False + + DVClasificacion.Visible = False + DVPS.Visible = False + DVUM.Visible = False + + DVSubTipoActivoFijo.Visible = True + Else DVDias.Visible = False DVActividadesRH.Visible = False @@ -4990,11 +5187,89 @@ Partial Class Contratos_ContratoObra DVPS.Visible = True DVUM.Visible = True + DVSubTipoActivoFijo.Visible = False + End If UpModalControlAddPS.Update() End Sub + + Protected Sub LnkModalAddMaquinariaFlotilla_Click(sender As Object, e As EventArgs) + + LimpiarModalMaquinaria() + RegistraScript("$('#ModalMaquinaria').modal('show');") + + End Sub + + + Protected Sub DdlSubTipoAF_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubTipoAF.SelectedIndexChanged + + DdlAF.Items.Clear() + + If DdlSubTipoAF.SelectedIndex > 0 Then + + + Dim CveSubTipoActivoFijo As Integer = 0 + + Dim Separador As Char() = {"-"c} + + Try + CveSubTipoActivoFijo = DdlSubTipoAF.SelectedValue.Split(Separador)(0).ToEntero + Catch ex As Exception + CveSubTipoActivoFijo = 0 + End Try + + If CveSubTipoActivoFijo > 0 Then + DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa, -1).FiltraParametros(String.Format("CveSubTipoActivoFijo IN ({0})", CveSubTipoActivoFijo)) + End If + + Else + DdlAF.DataSource = Nothing + + End If + + DdlAF.DataBind() + + + + DdlAF.Items.Insert(0, New ListItem("Todos", "-1")) + + UpModalMaquinariaFlotilla.Update() + + End Sub + + + Protected Sub BtnModalMaquinariaAdd_Click(sender As Object, e As EventArgs) + + Dim CveContratoDetalle As Integer = 0 + + Dim Separador As Char() = {"-"c} + + Try + CveContratoDetalle = DdlSubTipoAF.SelectedValue.Split(Separador)(1).ToEntero + Catch ex As Exception + CveContratoDetalle = 0 + End Try + + Dim ObjContrato As New ClsContratos + + If ObjContrato.AddContratosMaquinariaFlotilla(DdlAF.SelectedValue.ToEntero, TxtFechaMaquinaria.Text.ToDate, DdlPersonal.SelectedValue.ToEntero, TxtMaquinariaImporte.Text.ToDecimal, CveContratoDetalle) Then + + + If Not ChkModalMaquinaria.Checked Then + RegistraScript("$('#ModalMaquinaria').modal('hide');") + End If + + Alert("Registro agregado correctamente.") + + End If + + ObjContrato.Dispose() + + End Sub + + End Class diff --git a/Empresas/119/Formatos/NotaDevolucion.rdlc b/Empresas/119/Formatos/NotaDevolucion.rdlc index 01485fb10..c1f00da0f 100644 --- a/Empresas/119/Formatos/NotaDevolucion.rdlc +++ b/Empresas/119/Formatos/NotaDevolucion.rdlc @@ -3,40 +3,6 @@ - - - true - true - - - - - =Parameters!TipoRelacionTexto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - true 5.67653in 0.06096in @@ -2377,6 +2343,39 @@ 2pt + + true + true + + + + + =Parameters!TipoRelacionTexto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + true true @@ -2403,7 +2402,7 @@ 0.21692cm 0.54004cm 20.7077cm - 17 + 18 @@ -2440,7 +2439,7 @@ 17.56899cm 0.6cm 3.32021cm - 18 + 19 @@ -2623,6 +2622,7 @@ c220a38d-e45b-4e04-917e-7dfd9cc3345f + diff --git a/Empresas/140/Formatos/Factura.rdlc b/Empresas/140/Formatos/Factura.rdlc index 2ad22df67..c2e5f7e8d 100644 --- a/Empresas/140/Formatos/Factura.rdlc +++ b/Empresas/140/Formatos/Factura.rdlc @@ -2204,7 +2204,7 @@ - =Fields!Cantidad.Value * Fields!PU.Value + =(Fields!Cantidad.Value * Fields!PU.Value) - Fields!Descuento.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!Descripcion.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 +