diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index ccf45d815..10b6cbae5 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -1065,11 +1065,11 @@ Public Class ClsContPAQi StrSQL.Clear() StrSQL.AppendLine(" SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; ") StrSQL.AppendLine(" ") - StrSQL.AppendLine(" SELECT mp.id, mp.IdPoliza, mp.NumMovto, mp.IdCuenta , mp.IdCuenta as CveCuenta, c.CODIGO, c.NOMBRE as Cuenta , T.Codigo as CodigoTipoPoliza, T.Nombre AS TipoPoliza, mp.Folio, mp.Importe, mp.Concepto, mp.Referencia, mp.SIGReferencia, mp.Fecha, mp.IdSegNeg, p.IdUsuario, s.Nombre AS SegNeg, p.Fecha AS FechaPol, p.Cargos, p.Abonos, p.Concepto AS ConceptoPoliza, ") + StrSQL.AppendLine(" SELECT mp.id, mp.IdPoliza, mp.NumMovto, mp.IdCuenta , mp.IdCuenta as CveCuenta, c.CODIGO, c.NOMBRE as Cuenta , c.NOMBRE as NombreCuenta , T.Codigo as CodigoTipoPoliza, T.Nombre AS TipoPoliza, mp.Folio, mp.Folio as Numero, mp.Importe, mp.Concepto, mp.Referencia, mp.SIGReferencia, mp.Fecha, mp.IdSegNeg, p.IdUsuario, s.Nombre AS SegNeg, p.Fecha AS FechaPol, p.Cargos, p.Abonos, p.Concepto AS ConceptoPoliza, ") StrSQL.AppendLine(" CASE WHEN ISNUMERIC(c.Codigo) = 1 THEN FORMAT(CAST (c.Codigo AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.Codigo END + ' - ' + c.Nombre + ' ' AS CtaCodigo, ") 'Roberto 8/Nov/2014 StrSQL.AppendLine(" SUM (CASE WHEN mp.TipoMovto = 0 THEN mp.Importe ELSE 0 END) AS Cargo, SUM (CASE WHEN mp.TipoMovto = 1 THEN mp.Importe ELSE 0 END) AS Abono, ") StrSQL.AppendLine(" SUM (CASE WHEN mp.TipoMovto = 0 THEN mp.ImporteME ELSE 0 END) AS CargoME, SUM (CASE WHEN mp.TipoMovto = 1 THEN mp.ImporteME ELSE 0 END) AS AbonoME, ") - StrSQL.AppendLine(" mp.TipoMovto, CASE WHEN ISNUMERIC(c.CODIGO) = 1 THEN FORMAT(CAST (c.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.CODIGO END CuentaFormato, '' as Estado,MAX(U.Nombre) AS UsuarioRegistro ") + StrSQL.AppendLine(" mp.TipoMovto, CASE WHEN ISNUMERIC(c.CODIGO) = 1 THEN FORMAT(CAST (c.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.CODIGO END CuentaFormato, CASE WHEN ISNUMERIC(c.CODIGO) = 1 THEN FORMAT(CAST (c.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.CODIGO END CodigoCuenta, '' as Estado,MAX(U.Nombre) AS UsuarioRegistro, MAX(U.Nombre) AS NombreUsuario ") StrSQL.AppendLine(" FROM MovimientosPoliza mp ") StrSQL.AppendLine(" INNER JOIN Polizas p ON mp.IdPoliza = p.Id ") StrSQL.AppendLine(" INNER JOIN Cuentas c ON c.Id = mp.IdCuenta ") diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index e7907959b..23f649d54 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5723,7 +5723,7 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1, + Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1) As Boolean Dim Retorno = False @@ -5732,6 +5732,7 @@ Public Class ClsContabilidad With SqlAdapter.SelectCommand.Parameters .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta .Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor diff --git a/App_Code/ClsGPS.vb b/App_Code/ClsGPS.vb index d19cb9541..6ef6a9114 100644 --- a/App_Code/ClsGPS.vb +++ b/App_Code/ClsGPS.vb @@ -3137,6 +3137,24 @@ Public Class ClsGPS Return Retorno End Function + Public Function ReporteUnidadesnoTransmitenGet(NoHoras As Integer, CveEstatus As Integer, CveCliente As Integer, Optional CveEmpresa As Integer = -1, Optional TipoDispositivo As Integer = -1) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_GPS_ReporteUnidadesnoTransmitenGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@NoHoras", SqlDbType.Int).Value = NoHoras + .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@TipoDispositivo", SqlDbType.Int).Value = TipoDispositivo + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los dispositivos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function Public Function DispositivosGet(CveDispositivo As Integer, CveEstatus As Integer, CveCliente As Integer, Optional CveEmpresa As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_GPS_DispositivosGet") diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index c4c0b3881..45f22427f 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1249,7 +1249,7 @@ Public Class ClsInventarios ''' ''' Cuando sea cancelacion/devolucion hay que mandar este dato que seria la salida de almacen ''' - Public Function GetMovimientosDetalleVirtual(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoRelacionado As Integer = -1) As Boolean + Public Function GetMovimientosDetalleVirtual(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoRelacionado As Integer = -1, Optional ValidaUsadosCompra As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_MovimientosDetalleVirtualGet") @@ -1258,12 +1258,18 @@ Public Class ClsInventarios .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCompra", SqlDbType.Int).Value = CveCompra .Add("@CveMovimientoRelacionado", SqlDbType.Int).Value = CveMovimientoRelacionado + .Add("@ValidaUsadosCompra", SqlDbType.Bit).Value = ValidaUsadosCompra End With Try SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener los movimientos virtuales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + If ex.Message.Contains("Usados sistema") Then + OnError($"Los usados de la compra no coinciden. {ex.Message}", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Else + OnError("Ocurrió un error al obtener los movimientos virtuales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + End Try Return Retorno @@ -1628,7 +1634,7 @@ Public Class ClsInventarios End Function - Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer) As Boolean + Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_ProductosCaducidadGet") @@ -1639,6 +1645,8 @@ Public Class ClsInventarios .Add("@FechaFin", SqlDbType.Date).Value = FechaFin .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index b1a8ffaf3..148b96b30 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3821,6 +3821,8 @@ Public Class ClsPaginas PaginaDict.Add("/Inicio.aspx".ToUpper(), -1) PaginaDict.Add("/reporteador.aspx".ToUpper(), -1) PaginaDict.Add("/General/CATIEPSxEntidadFed.aspx".ToUpper(), 719) + PaginaDict.Add("/GPS/ReporteUnidadesnoTransmiten.aspx".ToUpper(), 917) + PaginaDict.Add("/GPS/RepArrastre.aspx".ToUpper(), 718) PaginaDict.Add("/Ventas/RepConciliacionEmitidosSat.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/RepConciliacionSat.aspx".ToUpper(), 716) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 8afea1057..0a9d5aca9 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -1409,6 +1409,30 @@ Public Class ClsProductosServicios Return Retorno End Function + + Public Function UpdateAplicaLoteCaducidadAlmacen(CvePS As Integer, CveEmpresa As Integer, AplicaLoteAlmacen As Boolean, AplicaCaducidadAlmacen As Boolean) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Gral_ProductosServiciosLoteCaducidadAlmacenUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@AplicaLoteAlmacen", SqlDbType.Bit).Value = AplicaLoteAlmacen + .Add("@AplicaCaducidadAlmacen", SqlDbType.Bit).Value = AplicaCaducidadAlmacen + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch Ex1 As SqlException + + Catch ex As Exception + OnError("Ocurrió un error al actualizar aplicar lote/caducidad almacen.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function GetMarcas(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_MarcasGet") diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index e864519ea..79a6ab882 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -341,7 +341,7 @@ Public Class ClsVentas Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0, Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0, - Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False) As Boolean + Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasAdd") @@ -434,6 +434,7 @@ Public Class ClsVentas .Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria .Add("@FacturarSucursal", SqlDbType.Bit).Value = FacturarSucursal .Add("@VentaDesglosaIEPS", SqlDbType.Bit).Value = VentaDesglosaIEPS + .Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With @@ -462,7 +463,7 @@ Public Class ClsVentas Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1, Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1, - Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1) As Boolean + Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasUpdate") @@ -494,6 +495,7 @@ Public Class ClsVentas .Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra .Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje .Add("@CveUsoCFDi", SqlDbType.SmallInt).Value = CveUsoCFDi + .Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio End With Try @@ -1452,7 +1454,7 @@ Public Class ClsVentas Public Function GetRepVentasPeriodos(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1, - Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean + Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasGetRepPeriodo") @@ -1480,6 +1482,7 @@ Public Class ClsVentas .Add("@VerEn", SqlDbType.Int).Value = VerEn .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente + .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable End With Try @@ -1549,7 +1552,7 @@ Public Class ClsVentas CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, - Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1) As Boolean + Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_GetRepPS") @@ -1579,6 +1582,8 @@ Public Class ClsVentas .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@MostrarLitraje", SqlDbType.Bit).Value = MostrarLitraje .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente + .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable + End With @@ -1597,7 +1602,7 @@ Public Class ClsVentas CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional GPO As Integer = -1, Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1, - Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean + Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_GetRepPSDetalle") @@ -1630,7 +1635,7 @@ Public Class ClsVentas .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveClasificacionDetalle", SqlDbType.Int).Value = CveClasificacionDetalle .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente - + .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable End With @@ -2156,7 +2161,7 @@ Public Class ClsVentas #End Region #Region " PROMOCIONES DETALLE " - Public Function GetPromocionesPS(CvePS As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveCliente As Integer, CveVendedor As Integer, CveEmpresa As Integer) As Boolean + Public Function GetPromocionesPS(CvePS As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveCliente As Integer, CveVendedor As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_PromocionesPSGet") @@ -2166,6 +2171,7 @@ Public Class ClsVentas .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With @@ -3789,8 +3795,8 @@ Public Class ClsVentas Public Function GetRepPSPeriodo(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, - Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1, Optional CvePS As Integer = -1, Optional CveClasificacion As Integer = -1, - Optional CveCategoria As Integer = -1, Optional TipoFecha As Integer = 1, Optional CveClienteClasificacion As Integer = -1) As Boolean + Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1, Optional CvePS As Integer = -1, Optional CveClasificacion As Integer = -1, + Optional CveCategoria As Integer = -1, Optional TipoFecha As Integer = 1, Optional CveClienteClasificacion As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasGetRepPeriodoPS") With SqlAdapter.SelectCommand.Parameters @@ -3819,6 +3825,7 @@ Public Class ClsVentas .Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria .Add("@TipoFecha", SqlDbType.Int).Value = TipoFecha .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion + .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable End With Try SqlAdapter.Fill(Data) @@ -4753,7 +4760,7 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetVentasUsados(CveVenta As Integer, CveSubProyecto As Integer, Fecha As DateTime, CveEmpresa As Integer) As Boolean + Public Function GetVentasUsados(CveVenta As Integer, CveSubProyecto As Integer, Fecha As DateTime, CveEmpresa As Integer, Optional ServicioDomicilio As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasUsadosGet", CommandType.StoredProcedure) @@ -4763,6 +4770,7 @@ Public Class ClsVentas .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@Fecha", SqlDbType.DateTime).Value = Fecha .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio End With Try diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index e378f3aae..61f35a5e7 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -256,7 +256,7 @@ Public Class LogicNominas 'subsidio al empleo If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo - .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal}) + .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal, .Subsidiocausado = Row("Importe").ToString().ToDecimal().Abs()}) End If Next End If @@ -286,7 +286,7 @@ Public Class LogicNominas 'subsidio al empleo If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo - .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal}) + .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal(), .Subsidiocausado = Row("Importe").ToString().ToDecimal().Abs()}) End If Next End If @@ -300,7 +300,13 @@ Public Class LogicNominas If Row("CveSATConcepto").ToString() = "" Then cfdi.AddMsg(String.Format("Concepto No registrado ({0})", Row("Concepto").ToString())) : Exit For Dim otrp = New CFDINominaOtrosPagos With {.TipoOtroPago = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), - .Importe = Row("Importe").ToString().ToDecimal().Abs(), .Subsidiocausado = Row("ImporteGravado").ToString().ToDecimal().Abs()} + .Importe = Row("Importe").ToString().ToDecimal().Abs(), .Subsidiocausado = Row("Importe").ToString().ToDecimal().Abs()} + If Row("SATCveConcepto").ToString().ToEntero() = 4 Then + otrp.ejercicio = DateTime.Now.Year - 1 + otrp.SaldoAFavor = Row("ImporteValor").ToString().ToDecimal().Abs() + otrp.RemanenteSalFav = Row("ImporteValor").ToString().ToDecimal().Abs() - Row("Importe").ToString().ToDecimal().Abs() + End If + ObjOtrosPagos.Add(otrp) @@ -316,6 +322,13 @@ Public Class LogicNominas Next End If + If CveRegimenContratacion.ToEntero() = 2 AndAlso ((ObjOtrosPagos.FirstOrDefault(Function(m) m.TipoOtroPago.ToEntero().Contiene(2, 7, 8))) Is Nothing) Then + + ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo + .Clave = "D051", .Concepto = "Subs al Empleo acreditado", .Importe = 0D, .Subsidiocausado = 0D}) + + End If + If ObjPercepciones IsNot Nothing AndAlso ObjPercepciones.Count > 0 Then cfdi.Nomina.Percepciones = ObjPercepciones If ObjHorasExtras IsNot Nothing AndAlso ObjHorasExtras.Count > 0 Then cfdi.Nomina.HorasExtras = ObjHorasExtras If ObjOtrosPagos IsNot Nothing AndAlso ObjOtrosPagos.Count > 0 Then cfdi.Nomina.OtrosPagos = ObjOtrosPagos diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 37f285efa..d9dd46a07 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -526,7 +526,7 @@ Namespace Modelos Dim ObjVentas As New ClsVentas 'CARGA PROMOCIONES - If ObjVentas.GetPromocionesPS(-1, Me.Fecha, Me.CveSubProyecto, CveCliente, Me.CveVendedor, Me.CveEmpresa) Then + If ObjVentas.GetPromocionesPS(-1, Me.Fecha, Me.CveSubProyecto, CveCliente, Me.CveVendedor, 1, Me.CveEmpresa) Then Me.DtPromociones = ObjVentas.DtResultados.Copy() End If @@ -1422,7 +1422,7 @@ Namespace Modelos PedidoContrato:=factura.PedidoContrato, ObservacionesAlmacen:=factura.ObservacionesAlmacen, CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago33, CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal, CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)), - CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno) Then + CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio) Then ErrorList.Add("Ocurrió un error al Generar la Venta.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico") @@ -5775,6 +5775,7 @@ Namespace Modelos #Region "P R O P I E D A D E S" + Public Property ServicioDomicilio As Boolean Public Property CveEstatusRefacturacion As Integer = 0 Public Property NuevaFactura As Integer Public Property EnviarCorreo As Boolean = False diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 94768effd..9a18a5716 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -961,6 +961,8 @@ Namespace Extensiones Retorno = "" End If + Retorno = UCase(Mid(Retorno, 1, 1)) + Mid(Retorno, 2, Len(Retorno)) + Return Retorno End Function diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx index eb3f2fa7d..cf37bb840 100644 --- a/Ashx/SIGFacturacion.ashx +++ b/Ashx/SIGFacturacion.ashx @@ -362,14 +362,14 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) - ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago + 'ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago - If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then - ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString - Else - ObjFactura.CveMetodoPago = 1 - ObjFactura.MetodoPago = "Efectivo" - End If + 'If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then + ' ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString + 'Else + ' ObjFactura.CveMetodoPago = 1 + ' ObjFactura.MetodoPago = "Efectivo" + 'End If End If End If If ObjCliente.GetSucursales(CveCliente) Then diff --git a/Ashx/SIGFacturacionCiclica.ashx b/Ashx/SIGFacturacionCiclica.ashx index efa477a6f..35541349c 100644 --- a/Ashx/SIGFacturacionCiclica.ashx +++ b/Ashx/SIGFacturacionCiclica.ashx @@ -425,14 +425,14 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) - ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago + 'ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago - If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then - ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString - Else - ObjFactura.CveMetodoPago = 1 - ObjFactura.MetodoPago = "Efectivo" - End If + 'If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then + ' ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString + 'Else + ' ObjFactura.CveMetodoPago = 1 + ' ObjFactura.MetodoPago = "Efectivo" + 'End If End If End If diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index 65a91d93d..acc3565c3 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -433,7 +433,7 @@ public partial class Bancos_Devoluciones : ClsPaginas } // OTROS INGRESOS - if (gvr.FCTextBox("TxtComision").Text.ToDecimal() > 0) + if (gvr.FCTextBox("TxtComision").Text.ToDecimal() != 0) { if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtComision").Text.ToDecimal(), Ref, 78, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtComision").Text.ToDecimal(), CveIEDevolucion: CveIE)) { diff --git a/Bancos/RepCortes.aspx b/Bancos/RepCortes.aspx index 2f90c1b90..3ccba8aaf 100644 --- a/Bancos/RepCortes.aspx +++ b/Bancos/RepCortes.aspx @@ -323,7 +323,12 @@ - + + + + + + <%----%> diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index df363cc2c..3109668a4 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -100,6 +100,9 @@ Partial Class Bancos_RepCortes If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.DBCampo("CveVenta").ToString = "" Then e.Row.CssClass = "Totales" + End If + If e.Row.DBCampo("ImportePagado").ToDecimal() < 0 Then + e.Row.FCLabel("LblTotal").CssClass = "badge badge-danger" End If End If End Sub diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 283f3403f..7064cbbec 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -157,15 +157,14 @@ } .GastoIndirectoOpciones { - margin-left:auto; - margin-right:auto; - width:400px; + margin-left: auto; + margin-right: auto; + width: 400px; } - .GastoIndirectoOpciones td - { - text-align:right /* Or any other value */ - } + .GastoIndirectoOpciones td { + text-align: right; /* Or any other value */ + } /*IPP*/ @@ -3217,12 +3216,12 @@ -
- -
- -
-
+
+ +
+ +
+

-
Subcuenta de
@@ -171,7 +170,6 @@

-
Concepto
diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb index 40341986f..c863ad3d2 100644 --- a/Contabilidad2/CatCuentas.aspx.vb +++ b/Contabilidad2/CatCuentas.aspx.vb @@ -154,6 +154,7 @@ Partial Class Contabilidad2_CatCuentas ArbolCuentas.nodoid = "CveCuenta" ArbolCuentas.padre = "CvePadre" ArbolCuentas.titulo = "CtaCodigo" + ArbolCuentas.DataBind() End Sub @@ -175,7 +176,7 @@ Partial Class Contabilidad2_CatCuentas dt = getNodospadreHijos(IDSelected) If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then Dim dr As DataRow = dt.Rows(0) - TxtCuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString) + 'TxtCuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString) 'Tcuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString) Tsubcuenta.Text = dr("CuentaFormato").ToString() DTcuenta.SelectedValue = dr("Tipo").ToString() @@ -371,7 +372,6 @@ Partial Class Contabilidad2_CatCuentas 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad - Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) Dim CuentaEfectivo As Integer = 0 Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable @@ -386,65 +386,69 @@ Partial Class Contabilidad2_CatCuentas End If If idnew > 0 Then + If UsuarioActual.Empresa.TipoContabilidad <> 1 Then + Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) + Dim codigoPadre As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text + If ObjConta2.GetCuentas(-1, "-1", -1) Then + Dim IdPadre As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero + Dim IdAgrupador As Integer - Dim codigoPadre As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text - If ObjConta2.GetCuentas(-1, "-1", -1) Then - Dim IdPadre As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero - Dim IdAgrupador As Integer - - If ObjConta2.GetAgrupadoresSAT() Then - IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero - End If - - If IdPadre > 0 Then - Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, Afectable, IdPadre, IdAgrupador) - - If idnew2 > 0 Then - If ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then - End If + If ObjConta2.GetAgrupadoresSAT() Then + IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero End If + If IdPadre > 0 Then + Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, Afectable, IdPadre, IdAgrupador) + + If idnew2 > 0 Then + If ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then + End If + End If + + End If End If + ObjConta2.Dispose() End If - Dim dr As DataRow = DtDatos.NewRow - dr("CveCuenta") = idnew - dr("CuentaFormato") = TxtCuenta.Text - 'dr("CuentaFormato") = Tcuenta.Text - dr("Nombre") = Tnombre.Text - dr("CtaCodigo") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text) - 'dr("CtaCodigo") = String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text) - dr("Tipo") = DTcuenta.SelectedValue.ToString - dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString - dr("CvePadre") = IDSelected - dr("Codigo") = Tnombre.Text - dr("CveMoneda") = DdlMoneda.SelectedValue.ToEntero - dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero - dr("NomIdioma") = TxtNomIngles.Text.Trim - DtDatos.Rows.Add(dr) - ArbolCuentas.DataSource = DtDatos - '.Attributes.Add("data-hijos","0"); - Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) - item.Attributes.Item("data-hijos") = item.Attributes.Item("data-hijos").ToEntero + 1 - Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL) - If (IsNothing(objul)) Then - objul = New ADServerControl.DragableUL - objul.ID = String.Format("ul{0}", item.Cve) - item.Controls.Add(objul) - End If - ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)) - 'ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text)) - 'updatos.Visible = False - 'nuevacuenta.Visible = False + 'Dim dr As DataRow = DtDatos.NewRow + 'dr("CveCuenta") = idnew + 'dr("CuentaFormato") = TxtCuenta.Text + ''dr("CuentaFormato") = Tcuenta.Text + 'dr("Nombre") = Tnombre.Text + 'dr("CtaCodigo") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text) + ''dr("CtaCodigo") = String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text) + 'dr("Tipo") = DTcuenta.SelectedValue.ToString + 'dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString + 'dr("CvePadre") = IDSelected + 'dr("Codigo") = Tnombre.Text + 'dr("CveMoneda") = DdlMoneda.SelectedValue.ToEntero + 'dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero + 'dr("NomIdioma") = TxtNomIngles.Text.Trim + 'DtDatos.Rows.Add(dr) + 'ArbolCuentas.DataSource = DtDatos + ''.Attributes.Add("data-hijos","0"); + 'Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) + 'item.Attributes.Item("data-hijos") = item.Attributes.Item("data-hijos").ToEntero + 1 + 'Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL) + 'If (IsNothing(objul)) Then + ' objul = New ADServerControl.DragableUL + ' objul.ID = String.Format("ul{0}", item.Cve) + ' item.Controls.Add(objul) + 'End If + 'ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)) + ''ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text)) + + ''updatos.Visible = False + ''nuevacuenta.Visible = False LimpiarCampos() updatos.Update() CargaDatos() + Alert("La cuenta se guardo correctamente") End If ObjConta.Dispose() - ObjConta2.Dispose() End Sub Private Sub LimpiarCampos() TxtCuenta.Text = "" @@ -469,7 +473,6 @@ Partial Class Contabilidad2_CatCuentas Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad - Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) 'ObjConta.IniciaTransacSQL() If ObjConta.RemoveCuenta(IDSelected.ToEntero) Then @@ -492,21 +495,27 @@ Partial Class Contabilidad2_CatCuentas Alert("La Cuenta ha sido eliminada", TipoMensaje.MsgInformacion) Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") - If ObjConta2.GetCuentas(-1, "-1", -1) Then - Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero - If Id > 0 Then - If ObjConta2.RemoveCuenta(Id) Then + If UsuarioActual.Empresa.TipoContabilidad <> 1 Then + Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) + If ObjConta2.GetCuentas(-1, "-1", -1) Then + Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero + + If Id > 0 Then + If ObjConta2.RemoveCuenta(Id) Then + End If End If End If + ObjConta2.Dispose() + End If + Else Alert("La Cuenta no pudo ser eliminada", TipoMensaje.MsgError) ' ObjConta.RollBack() End If ObjConta.Dispose() - ObjConta2.Dispose() End Sub 'Protected Sub BtnCambiaAgrupadorSAT_Click(sender As Object, e As EventArgs) diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb index 762edbba8..ebbef86ba 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb +++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb @@ -146,7 +146,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones Dim ObjConta As New ClsContabilidad Dim ErrorString As String = "" If LbAgregar.Text = "Agregar" Then - If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero, + If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal) Then ErrorString = "Error al agregar" diff --git a/Empresas/119/Formatos/DevolucionCliente.rdlc b/Empresas/119/Formatos/DevolucionCliente.rdlc index 632029f71..6aca3ed7e 100644 --- a/Empresas/119/Formatos/DevolucionCliente.rdlc +++ b/Empresas/119/Formatos/DevolucionCliente.rdlc @@ -1,1367 +1,5 @@ - - - - - - - - 1.57047cm - - - 1.91752cm - - - 2.5cm - - - 11.58874cm - - - 2.43607cm - - - - - 0.44125cm - - - - - true - true - - - - - Cant. - - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UM - - - - - - - Textbox29 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox11 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Serie Lote - - - - - - - Textbox6 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.36717cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!UnidadMedida.Value - - - - - - - UnidadMedida - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsInventarios - 0.17639cm - 0.12931cm - 0.80842cm - 20.0128cm - - - - - - 0.48958in - - - - - - true - true - - - - - AJA850608L7A -Carretera a Bahia Kino KM. 12 S/N -C.P. 83220 Col. La Manga -Hermosillo, Sonora, Mexico - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - AGROQUÍMICOS JAM, S.A. DE C.V. - - - - - - - Textbox2 - 0.06702cm - 4.68492cm - 0.67056cm - 8.09487cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Concepto.Value - - - - - - - Textbox2 - 0.06702cm - 13.11647cm - 0.38833cm - 7.02564cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio - - - - - - - Textbox12 - 0.58694cm - 15.81223cm - 0.44478cm - 4.32987cm - 4 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Folio.Value - - - - - - - Textbox12 - 1.03172cm - 15.81223cm - 0.44478cm - 4.32987cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - 1.4765cm - 15.81224cm - 0.44478cm - 4.32987cm - 6 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox12 - 1.92128cm - 15.81223cm - 0.44478cm - 4.32987cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - Almacén: - - - - =Parameters!Almacen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Factura: - - - - =Parameters!FacturaProveedor.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Detalles del Movimiento: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Proveedor: - - - - =Parameters!FacturadoA.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 3.05886cm - 0.09321cm - 1.65711cm - 20.04889cm - 8 - - - - - - - - - - - 6.02294cm - true - true - - - true - true - - - - - Observaciones: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 1.83538cm - 0.16541cm - 0cm - 19.97669cm - 2 - - - - - - 0.3496cm - 0.16541cm - 0cm - 19.97669cm - 3 - - - - - - true - true - - - - - =Parameters!NombreRecibio.Value - - - - Textbox21 - 2.74871cm - 2.96497cm - 0.63472cm - 5.79375cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Almacen.Value - - - - Textbox21 - 2.74871cm - 11.67978cm - 0.63528cm - 5.78664cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________ - - - - - - - - - Nombre y Firma - - - - - - - Textbox21 - 3.96084cm - 2.97292cm - 1.2cm - 5.78664cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________ - - - - - - - - - Firma - - - - - - - Textbox21 - 3.96029cm - 11.68688cm - 1.2cm - 5.78664cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Recibió - - - - - - - Textbox22 - 2.3704cm - 2.97292cm - 0.6cm - 5.78664cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Almacén - - - - - - - Textbox22 - 2.3704cm - 11.68688cm - 0.6cm - 5.78664cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 5.26256cm - 0.12931cm - 0cm - 20.0128cm - 12 - - - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox10 - 5.36839cm - 15.09787cm - 0.41981cm - 5.04423cm - 13 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UM + + + + + + + Textbox29 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox11 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Lote + + + + + + + Textbox6 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha Elaboración + + + + + + + Textbox1 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.36717cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!UnidadMedida.Value + + + + + + + UnidadMedida + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Lote.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!FechaCaducidad.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsInventarios + 0.17639cm + 0.12931cm + 0.80842cm + 20.01279cm + + + + + + 0.48958in + + + + + + true + true + + + + + AJA850608L7A +Carretera a Bahia Kino KM. 12 S/N +C.P. 83220 Col. La Manga +Hermosillo, Sonora, Mexico + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + AGROQUÍMICOS JAM, S.A. DE C.V. + + + + + + + Textbox2 + 0.06702cm + 4.68492cm + 0.67056cm + 8.09487cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Concepto.Value + + + + + + + Textbox2 + 0.06702cm + 13.11647cm + 0.38833cm + 7.02564cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio + + + + + + + Textbox12 + 0.58694cm + 15.81223cm + 0.44478cm + 4.32987cm + 4 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox12 + 1.03172cm + 15.81223cm + 0.44478cm + 4.32987cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + 1.4765cm + 15.81224cm + 0.44478cm + 4.32987cm + 6 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox12 + 1.92128cm + 15.81223cm + 0.44478cm + 4.32987cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + Almacén: + + + + =Parameters!Almacen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Factura: + + + + =Parameters!FacturaProveedor.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Detalles del Movimiento: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Proveedor: + + + + =Parameters!FacturadoA.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 3.05886cm + 0.09321cm + 1.65711cm + 20.04889cm + 8 + + + + + + + + + + + 6.02294cm + true + true + + + true + true + + + + + Observaciones: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 1.83538cm + 0.16541cm + 0cm + 19.97669cm + 2 + + + + + + 0.3496cm + 0.16541cm + 0cm + 19.97669cm + 3 + + + + + + true + true + + + + + =Parameters!NombreRecibio.Value + + + + Textbox21 + 2.74871cm + 2.96497cm + 0.63472cm + 5.79375cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Almacen.Value + + + + Textbox21 + 2.74871cm + 11.67978cm + 0.63528cm + 5.78664cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.96084cm + 2.97292cm + 1.2cm + 5.78664cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Firma + + + + + + + Textbox21 + 3.96029cm + 11.68688cm + 1.2cm + 5.78664cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Recibió + + + + + + + Textbox22 + 2.3704cm + 2.97292cm + 0.6cm + 5.78664cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Almacén + + + + + + + Textbox22 + 2.3704cm + 11.68688cm + 0.6cm + 5.78664cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 5.26256cm + 0.12931cm + 0cm + 20.0128cm + 12 + + + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox10 + 5.36839cm + 15.09787cm + 0.41981cm + 5.04423cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm + - - - - - - Textbox1 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Código - - - - - - - Textbox3 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - U.M. - - - - - - - - - - - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Descripción - - - - - - - Textbox5 - - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Serie/Lote - - - - - - - Textbox8 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.4095cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!UnidadMedida.Value - - - - - - - UnidadMedida - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - true - - - - - =Fields!PS.Value - - - - - - - PS - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - - SerieLote - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsInventarios - 0.17639cm - 0.35277cm - 0.84327cm - 19.91424cm - - - - - - 0.57292in - - - - - - true - true - - - - - AGROQUÍMICOS JAM, S.A. DE C.V. - - - - - - - Textbox2 - 0.29104cm - 4.73199cm - 0.67056cm - 7.98022cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - AJA850608L7A -Carretera a Bahia Kino KM. 12 S/N -C.P. 83220 Col. La Manga -Hermosillo, Sonora, Mexico - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Parameters!CveConcepto.Value = 12, "DEVOLUCIÓN POR CONSIGNACIÓN", " ") - - - - - - - Textbox2 - 0.29104cm - 12.74748cm - 0.38833cm - 7.51953cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio - - - - - - - Textbox12 - 0.81096cm - 15.93713cm - 0.44478cm - 4.32987cm - 4 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Folio.Value - - - - - - - Textbox12 - 1.25574cm - 15.93713cm - 0.44478cm - 4.32987cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - 1.70052cm - 15.93714cm - 0.44478cm - 4.32987cm - 6 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox12 - 2.1453cm - 15.93713cm - 0.44478cm - 4.32987cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - Almacén: - - - - =Parameters!Almacen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Detalles del Movimiento: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Proveedor: - - - - =Parameters!NombreProveedor.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Consignación: - - - - =Parameters!Consignacion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 3.35724cm - 0.35277cm - 1.81764cm - 19.91423cm - 8 - - - - - - - - - - - 5.62703cm - true - true - - - true - true - - - - - Observaciones: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - Textbox21 - 2.25174cm - 3.22556cm - 0.63472cm - 5.79375cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - Textbox21 - 2.25174cm - 11.94037cm - 0.63528cm - 5.78664cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________ - - - - - - - - - Nombre y Firma - - - - - - - Textbox21 - 3.46388cm - 3.23351cm - 1.2cm - 5.78664cm - 4 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________ - - - - - - - - - Nombre y Firma - - - - - - - Textbox21 - 3.46332cm - 11.94747cm - 1.2cm - 5.78664cm - 5 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Envió - - - - - - - Textbox22 - 1.87344cm - 3.23351cm - 0.6cm - 5.78664cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Recibió - - - - - - - Textbox22 - 1.87344cm - 11.94747cm - 0.6cm - 5.78664cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 1.69649cm - 0.21248cm - 0cm - 20.05452cm - 10 - - - - - - 0.21071cm - 0.21248cm - 0cm - 20.05453cm - 11 - - - - - - 5.0661cm - 0.17638cm - 0cm - 20.09063cm - 12 - - - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox10 - 5.17193cm - 17.22375cm - 0.41981cm - 2.55292cm - 13 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox1 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Código + + + + + + + Textbox3 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + U.M. + + + + + + + + + + + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Descripción + + + + + + + Textbox5 + + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Lote + + + + + + + Textbox8 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha Elaboración + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.4095cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!UnidadMedida.Value + + + + + + + UnidadMedida + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + true + + + + + =Fields!PS.Value + + + + + + + PS + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!Lote.Value + + + + + + + Lote + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!FechaCaducidad.Value + + + + + + + FechaCaducidad + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsInventarios + 0.17639cm + 0.35277cm + 0.84327cm + 19.91424cm + + + + + + 0.57292in + + + + + + true + true + + + + + AGROQUÍMICOS JAM, S.A. DE C.V. + + + + + + + Textbox2 + 0.29104cm + 4.73199cm + 0.67056cm + 7.98022cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + AJA850608L7A +Carretera a Bahia Kino KM. 12 S/N +C.P. 83220 Col. La Manga +Hermosillo, Sonora, Mexico + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!CveConcepto.Value = 12, "DEVOLUCIÓN POR CONSIGNACIÓN", " ") + + + + + + + Textbox2 + 0.29104cm + 12.74748cm + 0.38833cm + 7.51953cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio + + + + + + + Textbox12 + 0.81096cm + 15.93713cm + 0.44478cm + 4.32987cm + 4 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox12 + 1.25574cm + 15.93713cm + 0.44478cm + 4.32987cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + 1.70052cm + 15.93714cm + 0.44478cm + 4.32987cm + 6 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox12 + 2.1453cm + 15.93713cm + 0.44478cm + 4.32987cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + Almacén: + + + + =Parameters!Almacen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Detalles del Movimiento: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Proveedor: + + + + =Parameters!NombreProveedor.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Consignación: + + + + =Parameters!Consignacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 3.35724cm + 0.35277cm + 1.81764cm + 19.91423cm + 8 + + + + + + + + + + + 5.62703cm + true + true + + + true + true + + + + + Observaciones: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + Textbox21 + 2.25174cm + 3.22556cm + 0.63472cm + 5.79375cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + Textbox21 + 2.25174cm + 11.94037cm + 0.63528cm + 5.78664cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.46388cm + 3.23351cm + 1.2cm + 5.78664cm + 4 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.46332cm + 11.94747cm + 1.2cm + 5.78664cm + 5 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Envió + + + + + + + Textbox22 + 1.87344cm + 3.23351cm + 0.6cm + 5.78664cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Recibió + + + + + + + Textbox22 + 1.87344cm + 11.94747cm + 0.6cm + 5.78664cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 1.69649cm + 0.21248cm + 0cm + 20.05452cm + 10 + + + + + + 0.21071cm + 0.21248cm + 0cm + 20.05453cm + 11 + + + + + + 5.0661cm + 0.17638cm + 0cm + 20.09063cm + 12 + + + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox10 + 5.17193cm + 17.22375cm + 0.41981cm + 2.55292cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm + - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UM - - - - - - - Textbox41 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox11 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Observaciones - - - - - - - Textbox1 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Serie Lote - - - - - - - Textbox6 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.36717cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!UnidadMedida.Value - - - - - - - UnidadMedida - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - - PS - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!Observaciones.Value - - - - - - - Observaciones - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - - SerieLote - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsInventarios - 0.17639cm - 0.07216cm - 0.80842cm - 20.17403cm - - - - - - 0.5625in - - - - - - true - true - - - - - AGROQUÍMICOS JAM, S.A. DE C.V. - - - - - - - Textbox2 - 0.07023cm - 4.60107cm - 0.67056cm - 8.54466cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - AJA850608L7A -Carretera a Bahia Kino KM. 12 S/N -C.P. 83220 Col. La Manga -Hermosillo, Sonora, Mexico - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Concepto.Value - - - - - - - Textbox2 - 0.07023cm - 13.67036cm - 0.38833cm - 6.57584cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio - - - - - - - Textbox12 - 0.59015cm - 15.91632cm - 0.44478cm - 4.32987cm - 4 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Folio.Value - - - - - - - Textbox12 - 1.03493cm - 15.91632cm - 0.44478cm - 4.32987cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - 1.47971cm - 15.91633cm - 0.44478cm - 4.32987cm - 6 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox12 - 1.92449cm - 15.91632cm - 0.44478cm - 4.32987cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - Factura: - - - - =Parameters!FacturaProveedor.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Proveedor: - - - - =IIF(Parameters!RazonSocialOC.Value = "",IIF(Parameters!NombreProveedor.Value = "",Parameters!RazonSocial.Value,Parameters!NombreProveedor.Value),Parameters!RazonSocialOC.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Almacén: - - - - =Parameters!Almacen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Detalles del Movimiento: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Remisión: - - - - =Parameters!Remision.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio OC: - - - - =Parameters!FolioOC.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 2.92068cm - 0.02658cm - 2.35385cm - 20.21962cm - 8 - - - - - - - - - - - 5.90278cm - true - true - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 1.37639cm - 0cm - 20.24619cm - 1 - - - - - - 0.17639cm - 0.07216cm - 0cm - 20.17403cm - 2 - - - - - - true - true - - - - - Observaciones: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!NombreRecibio.Value - - - - - - - Textbox21 - 1.87056cm - 1.61869cm - 0.63528cm - 7.11779cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________________ - - - - - - Nombre y Firma - - - - - - - Textbox21 - 3.52368cm - 1.61869cm - 0.90367cm - 7.11779cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Recibió - - - - - - - Textbox22 - 1.55278cm - 1.62495cm - 0.6cm - 7.11153cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - _________________________________ - - - - - - Firma - - - - - - - Textbox21 - 3.52368cm - 11.92782cm - 0.90367cm - 7.11779cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Entregó - - - - - - - Textbox22 - 1.55278cm - 11.92782cm - 0.6cm - 7.11779cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Globals!ExecutionTime - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 5.09763cm - 17.61867cm - 0.41981cm - 2.5cm - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - 4.95652cm - 0.03606cm - 0cm - 20.40011cm - 12 - - - - - - true - true - - - - - IMPRESO EN SIG, Entradas / Salidas - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UM + + + + + + + Textbox41 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox11 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Observaciones + + + + + + + Textbox1 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Lote + + + + + + + Textbox6 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha Elaboración + + + + + + + Textbox2 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.36717cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!UnidadMedida.Value + + + + + + + UnidadMedida + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + + PS + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Observaciones.Value + + + + + + + Observaciones + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Lote.Value + + + + + + + Lote + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!FechaCaducidad.Value + + + + + + + FechaCaducidad + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + true + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsInventarios + 0.17639cm + 0.07216cm + 0.80842cm + 20.17404cm + + + + + + 0.5625in + + + + + + true + true + + + + + AGROQUÍMICOS JAM, S.A. DE C.V. + + + + + + + Textbox2 + 0.07023cm + 4.60107cm + 0.67056cm + 8.54466cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + AJA850608L7A +Carretera a Bahia Kino KM. 12 S/N +C.P. 83220 Col. La Manga +Hermosillo, Sonora, Mexico + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Concepto.Value + + + + + + + Textbox2 + 0.07023cm + 13.67036cm + 0.38833cm + 6.57584cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio + + + + + + + Textbox12 + 0.59015cm + 15.91632cm + 0.44478cm + 4.32987cm + 4 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox12 + 1.03493cm + 15.91632cm + 0.44478cm + 4.32987cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + 1.47971cm + 15.91633cm + 0.44478cm + 4.32987cm + 6 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox12 + 1.92449cm + 15.91632cm + 0.44478cm + 4.32987cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + Factura: + + + + =Parameters!FacturaProveedor.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Proveedor: + + + + =IIF(Parameters!RazonSocialOC.Value = "",IIF(Parameters!NombreProveedor.Value = "",Parameters!RazonSocial.Value,Parameters!NombreProveedor.Value),Parameters!RazonSocialOC.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Almacén: + + + + =Parameters!Almacen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Detalles del Movimiento: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Remisión: + + + + =Parameters!Remision.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio OC: + + + + =Parameters!FolioOC.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 2.92068cm + 0.02658cm + 2.35385cm + 20.21962cm + 8 + + + + + + + + + + + 5.90278cm + true + true + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 1.37639cm + 0cm + 20.24619cm + 1 + + + + + + 0.17639cm + 0.07216cm + 0cm + 20.17403cm + 2 + + + + + + true + true + + + + + Observaciones: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NombreRecibio.Value + + + + + + + Textbox21 + 1.87056cm + 1.61869cm + 0.63528cm + 7.11779cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________________ + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.52368cm + 1.61869cm + 0.90367cm + 7.11779cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Recibió + + + + + + + Textbox22 + 1.55278cm + 1.62495cm + 0.6cm + 7.11153cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + _________________________________ + + + + + + Firma + + + + + + + Textbox21 + 3.52368cm + 11.92782cm + 0.90367cm + 7.11779cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Entregó + + + + + + + Textbox22 + 1.55278cm + 11.92782cm + 0.6cm + 7.11779cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Globals!ExecutionTime + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 5.09763cm + 17.61867cm + 0.41981cm + 2.5cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + 4.95652cm + 0.03606cm + 0cm + 20.40011cm + 12 + + + + + + true + true + + + + + IMPRESO EN SIG, Entradas / Salidas + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm + - - - - - - Textbox1 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox3 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UM - - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox5 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Serie/Lote - - - - - - - Textbox8 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.32484cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "1pt", "0pt") - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "1pt", "0pt") - - - - - - - - true - true - - - - - =Fields!UnidadMedida.Value - - - - - - - UnidadMedida - - - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "1pt", "0pt") - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - - PS - - - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "1pt", "0pt") - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - - SerieLote - - - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "1pt", "0pt") - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsInventarios - 0.07761cm - 0.75551cm - 19.7404cm - - - - - - 0.36967in - - - - - - - Textbox2 - 0.09539cm - 4.4788cm - 0.67056cm - 8.54466cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif (Parameters!NombreRecibio.Value = "", "", "Personal Asignado: " & Parameters!NombreRecibio.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Parameters!CveConcepto.Value = 6 OR Parameters!CveConcepto.Value = 23, "ENTRADA", "SALIDA") & " DE RESGUARDO" - - - - - - - Textbox2 - 0.09539cm - 13.16457cm - 0.38833cm - 6.57584cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio - - - - - - - Textbox12 - 0.61531cm - 15.41054cm - 0.44478cm - 4.32987cm - 3 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Folio.Value - - - - - - - Textbox12 - 1.06009cm - 15.41053cm - 0.44478cm - 4.32987cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - 1.50487cm - 15.41054cm - 0.44478cm - 4.32987cm - 5 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox12 - 1.94965cm - 15.41053cm - 0.44478cm - 4.32987cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - Almacén Origen: - - - - =Parameters!AlmacenOrigen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Almacén Destino: - - - - =Parameters!AlmacenDestino.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Proveedor: - - - - =Parameters!NombreProveedor.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Detalles del Movimiento: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 2.82483cm - 0.00485cm - 1.65711cm - 19.73555cm - 7 - - - - - - Embedded - jam3 - FitProportional - 0.09539cm - 0.03608cm - 2.58833cm - 4.20283cm - 8 - - - - - - true - true - - - - - AJA850608L7A -Carretera a Bahia Kino KM. 12 S/N -C.P. 83220 Col. La Manga -Hermosillo, Sonora, Mexico - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 5.87049cm - true - true - - - true - true - - - - - =Parameters!NombreRecibio.Value - - - - - - - Textbox21 - 1.85292cm - 1.00631cm - 0.63528cm - 7.11779cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________________ - - - - - - Nombre y Firma - - - - - - - Textbox21 - 3.50604cm - 1.00631cm - 0.90367cm - 7.11779cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Observaciones: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 1.37639cm - 0.00485cm - 0cm - 19.73556cm - 4 - - - - - - 0.17639cm - 0.07701cm - 0cm - 19.6634cm - 5 - - - - - - true - true - - - - - Recibió - - - - - - - Textbox22 - 1.53514cm - 1.01257cm - 0.6cm - 7.11153cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!NombreEntrego.Value - - - - - - - Textbox21 - 1.85292cm - 11.31544cm - 0.63528cm - 7.11779cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________________ - - - - - - Nombre y Firma - - - - - - - Textbox21 - 3.50604cm - 11.31544cm - 0.90367cm - 7.11779cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Entregó - - - - - - - Textbox22 - 1.53514cm - 11.31544cm - 0.6cm - 7.11779cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 5.28311cm - 17.2404cm - 0.41981cm - 2.5cm - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - 5.142cm - 0cm - 19.7404cm - 13 - - - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox1 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox3 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UM + + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox5 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Lote + + + + + + + Textbox8 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha Elaboración + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.32484cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "1pt", "0pt") + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "1pt", "0pt") + + + + + + + + true + true + + + + + =Fields!UnidadMedida.Value + + + + + + + UnidadMedida + + + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "1pt", "0pt") + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + + PS + + + + + + + + true + true + + + + + =Fields!Lote.Value + + + + + + + Lote + + + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "1pt", "0pt") + + + + + + + + true + true + + + + + =Fields!FechaCaducidad.Value + + + + + + + FechaCaducidad + + + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "1pt", "0pt") + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsInventarios + 0.07761cm + 0.75551cm + 19.74041cm + + + + + + 0.36967in + + + + + + + Textbox2 + 0.09539cm + 4.4788cm + 0.67056cm + 8.54466cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif (Parameters!NombreRecibio.Value = "", "", "Personal Asignado: " & Parameters!NombreRecibio.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!CveConcepto.Value = 6 OR Parameters!CveConcepto.Value = 23, "ENTRADA", "SALIDA") & " DE RESGUARDO" + + + + + + + Textbox2 + 0.09539cm + 13.16457cm + 0.38833cm + 6.57584cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio + + + + + + + Textbox12 + 0.61531cm + 15.41054cm + 0.44478cm + 4.32987cm + 3 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox12 + 1.06009cm + 15.41053cm + 0.44478cm + 4.32987cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + 1.50487cm + 15.41054cm + 0.44478cm + 4.32987cm + 5 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox12 + 1.94965cm + 15.41053cm + 0.44478cm + 4.32987cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + Almacén Origen: + + + + =Parameters!AlmacenOrigen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Almacén Destino: + + + + =Parameters!AlmacenDestino.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Proveedor: + + + + =Parameters!NombreProveedor.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Detalles del Movimiento: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 2.82483cm + 0.00485cm + 1.65711cm + 19.73555cm + 7 + + + + + + Embedded + jam3 + FitProportional + 0.09539cm + 0.03608cm + 2.58833cm + 4.20283cm + 8 + + + + + + true + true + + + + + AJA850608L7A +Carretera a Bahia Kino KM. 12 S/N +C.P. 83220 Col. La Manga +Hermosillo, Sonora, Mexico + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 5.87049cm + true + true + + + true + true + + + + + =Parameters!NombreRecibio.Value + + + + + + + Textbox21 + 1.85292cm + 1.00631cm + 0.63528cm + 7.11779cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________________ + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.50604cm + 1.00631cm + 0.90367cm + 7.11779cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Observaciones: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 1.37639cm + 0.00485cm + 0cm + 19.73556cm + 4 + + + + + + 0.17639cm + 0.07701cm + 0cm + 19.6634cm + 5 + + + + + + true + true + + + + + Recibió + + + + + + + Textbox22 + 1.53514cm + 1.01257cm + 0.6cm + 7.11153cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NombreEntrego.Value + + + + + + + Textbox21 + 1.85292cm + 11.31544cm + 0.63528cm + 7.11779cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________________ + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.50604cm + 11.31544cm + 0.90367cm + 7.11779cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Entregó + + + + + + + Textbox22 + 1.53514cm + 11.31544cm + 0.6cm + 7.11779cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 5.28311cm + 17.2404cm + 0.41981cm + 2.5cm + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + 5.142cm + 0cm + 19.7404cm + 13 + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm + - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UM - - - - - - - Textbox29 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox11 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Serie Lote - - - - - - - Textbox6 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.36717cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!UnidadMedida.Value - - - - - - - UnidadMedida - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsInventarios - 0.17639cm - 0.12931cm - 0.80842cm - 20.0128cm - - - - - - 0.48958in - - - - - - true - true - - - - - AJA850608L7A -Carretera a Bahia Kino KM. 12 S/N -C.P. 83220 Col. La Manga -Hermosillo, Sonora, Mexico - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - AGROQUÍMICOS JAM, S.A. DE C.V. - - - - - - - Textbox2 - 0.06702cm - 4.68492cm - 0.67056cm - 8.09487cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Concepto.Value - - - - - - - Textbox2 - 0.06702cm - 13.11647cm - 0.38833cm - 7.02564cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio - - - - - - - Textbox12 - 0.58694cm - 15.81223cm - 0.44478cm - 4.32987cm - 4 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Folio.Value - - - - - - - Textbox12 - 1.03172cm - 15.81223cm - 0.44478cm - 4.32987cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - 1.4765cm - 15.81224cm - 0.44478cm - 4.32987cm - 6 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox12 - 1.92128cm - 15.81223cm - 0.44478cm - 4.32987cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - Almacén: - - - - =Parameters!Almacen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Detalles del Movimiento: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 3.05886cm - 0.09321cm - 1.21261cm - 20.04889cm - 8 - - - - - - - - - - - 6.02294cm - true - true - - - true - true - - - - - Observaciones: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 1.83538cm - 0.16541cm - 0cm - 19.97669cm - 2 - - - - - - 0.3496cm - 0.16541cm - 0cm - 19.97669cm - 3 - - - - - - true - true - - - - - =Parameters!NombreRecibio.Value - - - - Textbox21 - 2.74871cm - 2.96497cm - 0.63472cm - 5.79375cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Almacen.Value - - - - Textbox21 - 2.74871cm - 11.67978cm - 0.63528cm - 5.78664cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________ - - - - - - - - - Nombre y Firma - - - - - - - Textbox21 - 3.96084cm - 2.97292cm - 1.2cm - 5.78664cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________ - - - - - - - - - Firma - - - - - - - Textbox21 - 3.96029cm - 11.68688cm - 1.2cm - 5.78664cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Recibió - - - - - - - Textbox22 - 2.3704cm - 2.97292cm - 0.6cm - 5.78664cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Almacén - - - - - - - Textbox22 - 2.3704cm - 11.68688cm - 0.6cm - 5.78664cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 5.26256cm - 0.12931cm - 0cm - 20.0128cm - 12 - - - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox10 - 5.36839cm - 15.09787cm - 0.41981cm - 5.04423cm - 13 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UM + + + + + + + Textbox29 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox11 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Lote + + + + + + + Textbox6 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha Elaboración + + + + + + + Textbox4 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.36717cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!UnidadMedida.Value + + + + + + + UnidadMedida + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + + + + + + true + true + + + + + =Fields!SerieLote.Value + + + + + + + + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsInventarios + 0.17639cm + 0.12931cm + 0.80842cm + 20.01279cm + + + + + + 0.48958in + + + + + + true + true + + + + + AJA850608L7A +Carretera a Bahia Kino KM. 12 S/N +C.P. 83220 Col. La Manga +Hermosillo, Sonora, Mexico + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + AGROQUÍMICOS JAM, S.A. DE C.V. + + + + + + + Textbox2 + 0.06702cm + 4.68492cm + 0.67056cm + 8.09487cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Concepto.Value + + + + + + + Textbox2 + 0.06702cm + 13.11647cm + 0.38833cm + 7.02564cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio + + + + + + + Textbox12 + 0.58694cm + 15.81223cm + 0.44478cm + 4.32987cm + 4 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox12 + 1.03172cm + 15.81223cm + 0.44478cm + 4.32987cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + 1.4765cm + 15.81224cm + 0.44478cm + 4.32987cm + 6 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox12 + 1.92128cm + 15.81223cm + 0.44478cm + 4.32987cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + Almacén: + + + + =Parameters!Almacen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Detalles del Movimiento: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 3.05886cm + 0.09321cm + 1.21261cm + 20.04889cm + 8 + + + + + + + + + + + 6.02294cm + true + true + + + true + true + + + + + Observaciones: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 1.83538cm + 0.16541cm + 0cm + 19.97669cm + 2 + + + + + + 0.3496cm + 0.16541cm + 0cm + 19.97669cm + 3 + + + + + + true + true + + + + + =Parameters!NombreRecibio.Value + + + + Textbox21 + 2.74871cm + 2.96497cm + 0.63472cm + 5.79375cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Almacen.Value + + + + Textbox21 + 2.74871cm + 11.67978cm + 0.63528cm + 5.78664cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.96084cm + 2.97292cm + 1.2cm + 5.78664cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Firma + + + + + + + Textbox21 + 3.96029cm + 11.68688cm + 1.2cm + 5.78664cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Recibió + + + + + + + Textbox22 + 2.3704cm + 2.97292cm + 0.6cm + 5.78664cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Almacén + + + + + + + Textbox22 + 2.3704cm + 11.68688cm + 0.6cm + 5.78664cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 5.26256cm + 0.12931cm + 0cm + 20.0128cm + 12 + + + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox10 + 5.36839cm + 15.09787cm + 0.41981cm + 5.04423cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm + - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UM - - - - - - - Textbox55 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox11 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Serie/Lote - - - - - - - Textbox13 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.36717cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!UnidadMedida.Value - - - - - - - UnidadMedida - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsInventarios - 0.17639cm - 0.07701cm - 0.78196cm - 19.71022cm - - - - - - 0.58708in - - - - - - true - true - - - - - AJA850608L7A -Carretera a Bahia Kino KM. 12 S/N -C.P. 83220 Col. La Manga -Hermosillo, Sonora, Mexico - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Concepto.Value - - - - - - - Textbox2 - 0.12668cm - 13.21139cm - 0.38833cm - 6.57584cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio - - - - - - - Textbox12 - 0.6466cm - 15.45735cm - 0.44478cm - 4.32987cm - 3 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Folio.Value - - - - - - - Textbox12 - 1.09138cm - 15.45735cm - 0.44478cm - 4.32987cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - 1.53616cm - 15.45736cm - 0.44478cm - 4.32987cm - 5 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox12 - 1.98094cm - 15.45735cm - 0.44478cm - 4.32987cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - Almacén: - - - - =Parameters!Almacen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Detalles del Movimiento: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Proveedor: - - - - =Parameters!FacturadoA.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Factura: - - - - =Parameters!FacturaProveedor.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 3.05042cm - 0.07701cm - 1.76294cm - 19.7102cm - 7 - - - - - - true - true - - - - - AGROQUÍMICOS JAM, S.A. DE C.V. - - - - - - - Textbox2 - 0.12668cm - 4.45623cm - 0.67056cm - 8.54466cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 6.20815cm - true - true - - - true - true - - - - - Observaciones: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 1.68944cm - 0.07701cm - 0cm - 19.7102cm - 2 - - - - - - 0.22486cm - 0.07701cm - 0cm - 19.7102cm - 3 - - - - - - true - true - - - - - =Parameters!NombreEntrego.Value - - - - - - - Textbox21 - 2.34441cm - 1.26513cm - 0.63528cm - 7.11779cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________________ - - - - - - Nombre y Firma - - - - - - - Textbox21 - 3.99753cm - 1.26513cm - 0.90367cm - 7.11779cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Entregó - - - - - - - Textbox22 - 2.02663cm - 1.27139cm - 0.6cm - 7.11153cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!NombreRecibio.Value - - - - - - - Textbox21 - 2.34441cm - 11.57426cm - 0.63528cm - 7.11779cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - _________________________________ - - - - - - Nombre y Firma - - - - - - - Textbox21 - 3.99753cm - 11.57426cm - 0.90367cm - 7.11779cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Recibió - - - - - - - Textbox22 - 2.02663cm - 11.57426cm - 0.6cm - 7.11779cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 5.5362cm - 17.28722cm - 0.45509cm - 2.5cm - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - 5.43036cm - 0cm - 19.78722cm - 13 - - - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UM + + + + + + + Textbox55 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox11 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Lote + + + + + + + Textbox13 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha Elaboracion + + + + + + + Textbox1 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.36717cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!UnidadMedida.Value + + + + + + + UnidadMedida + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + + + + + + true + true + + + + + =Fields!Lote.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!FechaCaducidad.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsInventarios + 0.17639cm + 0.07701cm + 0.83488cm + 19.71019cm + + + + + + 0.58708in + + + + + + true + true + + + + + AJA850608L7A +Carretera a Bahia Kino KM. 12 S/N +C.P. 83220 Col. La Manga +Hermosillo, Sonora, Mexico + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Concepto.Value + + + + + + + Textbox2 + 0.12668cm + 13.21139cm + 0.38833cm + 6.57584cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio + + + + + + + Textbox12 + 0.6466cm + 15.45735cm + 0.44478cm + 4.32987cm + 3 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox12 + 1.09138cm + 15.45735cm + 0.44478cm + 4.32987cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + 1.53616cm + 15.45736cm + 0.44478cm + 4.32987cm + 5 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox12 + 1.98094cm + 15.45735cm + 0.44478cm + 4.32987cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + Almacén: + + + + =Parameters!Almacen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Detalles del Movimiento: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Proveedor: + + + + =Parameters!FacturadoA.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Factura: + + + + =Parameters!FacturaProveedor.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 3.05042cm + 0.07701cm + 1.76294cm + 19.7102cm + 7 + + + + + + true + true + + + + + AGROQUÍMICOS JAM, S.A. DE C.V. + + + + + + + Textbox2 + 0.12668cm + 4.45623cm + 0.67056cm + 8.54466cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 6.20815cm + true + true + + + true + true + + + + + Observaciones: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 1.68944cm + 0.07701cm + 0cm + 19.7102cm + 2 + + + + + + 0.22486cm + 0.07701cm + 0cm + 19.7102cm + 3 + + + + + + true + true + + + + + =Parameters!NombreEntrego.Value + + + + + + + Textbox21 + 2.34441cm + 1.26513cm + 0.63528cm + 7.11779cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________________ + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.99753cm + 1.26513cm + 0.90367cm + 7.11779cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Entregó + + + + + + + Textbox22 + 2.02663cm + 1.27139cm + 0.6cm + 7.11153cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NombreRecibio.Value + + + + + + + Textbox21 + 2.34441cm + 11.57426cm + 0.63528cm + 7.11779cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + _________________________________ + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.99753cm + 11.57426cm + 0.90367cm + 7.11779cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Recibió + + + + + + + Textbox22 + 2.02663cm + 11.57426cm + 0.6cm + 7.11779cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 5.5362cm + 17.28722cm + 0.45509cm + 2.5cm + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + 5.43036cm + 0cm + 19.78722cm + 13 + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm + - - - - - - Textbox1 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Código - - - - - - - Textbox3 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - U.M. - - - - - - - - - - - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Descripción - - - - - - - Textbox5 - - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Serie/Lote - - - - - - - Textbox8 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Observaciones - - - - - - - Textbox12 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.4095cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!UnidadMedida.Value - - - - - - - UnidadMedida - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - true - - - - - =Fields!PS.Value - - - - - - - PS - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - - SerieLote - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!Observaciones.Value - - - - - - - Observaciones - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsInventarios - 0.14111cm - 0.10068cm - 0.84327cm - 20.22724cm - - - - - - 0.43055in - - - - - - true - true - - - - - AGROQUÍMICOS JAM, S.A. DE C.V. - - - - - - - Textbox2 - 0.07163cm - 4.74215cm - 0.38833cm - 8.54466cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - AJA850608L7A -Carretera a Bahia Kino KM. 12 S/N -C.P. 83220 Col. La Manga -Hermosillo, Sonora, Mexico - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Microsoft.VisualBasic.Interaction.iif(Parameters!CveConcepto.Value = 8, "AVISO", "ENTRADA") & " DE TRASLADO " - - - - - - - Textbox2 - 0.07163cm - 13.61141cm - 0.38833cm - 6.81397cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio - - - - - - - Textbox12 - 0.88084cm - 16.09549cm - 0.44478cm - 4.32987cm - 4 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Folio.Value - - - - - - - Textbox12 - 1.32562cm - 16.09549cm - 0.44478cm - 4.32987cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - 1.7704cm - 16.0955cm - 0.44478cm - 4.32987cm - 6 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox12 - 2.21518cm - 16.09549cm - 0.44478cm - 4.32987cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - =IIf(Parameters!CveConcepto.Value = 8, "Almacén Origen:", "Almacén que recibe:") - - - - - - - - =Parameters!AlmacenOrigen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIf(Parameters!CveConcepto.Value = 8, "Almacén Destino:", "Almacén que envía:") - - - - - - - - =Parameters!AlmacenDestino.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Detalles del Movimiento: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!DireccionOrigen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!DireccionDestino.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 2.39157cm - 2.59353cm - 20.32792cm - 8 - - - - - - true - true - - - - - =iif(Parameters!CveConcepto.Value = 8, "Carga Privada", " ") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 5.83773cm - true - true - - - true - true - - - - - Observaciones: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ResponsableCarga.Value - - - - - - - Textbox21 - 3.28266cm - 3.14986cm - 0.50243cm - 5.79375cm - 2 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ResponsableRecibio.Value - - - - - - - Textbox21 - 3.28266cm - 11.86467cm - 0.50243cm - 5.78664cm - 3 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________ - - - - - - - - - Nombre y Firma - - - - - - - Textbox21 - 3.56875cm - 3.15781cm - 1.2cm - 5.78664cm - 4 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________ - - - - - - - - - Nombre y Firma - - - - - - - Textbox21 - 3.5682cm - 11.87177cm - 1.2cm - 5.78664cm - 5 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Envió - - - - - - - Textbox22 - 1.97831cm - 3.15781cm - 0.6cm - 5.78664cm - 6 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Accion.Value - - - - - - - Textbox22 - 1.97831cm - 11.87177cm - 0.6cm - 5.78664cm - 7 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIF(Parameters!NombreAccion.Value = "","",Parameters!NombreAccion.Value) - - - - Textbox21 - 2.35606cm - 7.50017cm - 0.63528cm - 5.78664cm - 8 - - =iif(Parameters!CveConcepto.Value = 8, True, False) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________ - - - - - - - - - Nombre y Firma - - - - - - - Textbox21 - 3.5682cm - 7.50727cm - 1.2cm - 5.78664cm - 9 - - =iif(Parameters!CveConcepto.Value = 8, True, False) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Accion.Value - - - - - - - Textbox22 - 1.97831cm - 7.50727cm - 0.6cm - 5.78664cm - 10 - - =iif(Parameters!CveConcepto.Value = 8, True, False) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 1.80136cm - 0.13678cm - 0cm - 20.28859cm - 13 - - - - - - 0.31558cm - 0.13678cm - 0cm - 20.28859cm - 14 - - - - - - 5.17097cm - 0.10068cm - 0cm - 20.3247cm - 15 - - - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox10 - 5.31209cm - 17.60787cm - 0.41981cm - 2.55292cm - 16 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox1 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Código + + + + + + + Textbox3 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + U.M. + + + + + + + + + + + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Descripción + + + + + + + Textbox5 + + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Lote + + + + + + + Textbox8 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha Elaboracion + + + + + + + Textbox16 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Observaciones + + + + + + + Textbox12 + + + + Black + + 1pt + + + Black + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.4095cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!UnidadMedida.Value + + + + + + + UnidadMedida + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + true + + + + + =Fields!PS.Value + + + + + + + PS + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!Lote.Value + + + + + + + Lote + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!FechaCaducidad.Value + + + + + + + FechaCaducidad + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + true + + + + + + true + true + + + + + =Fields!Observaciones.Value + + + + + + + Observaciones + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsInventarios + 0.14111cm + 0.10068cm + 0.84327cm + 20.3247cm + + + + + + 0.43055in + + + + + + true + true + + + + + AGROQUÍMICOS JAM, S.A. DE C.V. + + + + + + + Textbox2 + 0.07163cm + 4.74215cm + 0.38833cm + 8.54466cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + AJA850608L7A +Carretera a Bahia Kino KM. 12 S/N +C.P. 83220 Col. La Manga +Hermosillo, Sonora, Mexico + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.iif(Parameters!CveConcepto.Value = 8, "AVISO", "ENTRADA") & " DE TRASLADO " + + + + + + + Textbox2 + 0.07163cm + 13.61141cm + 0.38833cm + 6.81397cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio + + + + + + + Textbox12 + 0.88084cm + 16.09549cm + 0.44478cm + 4.32987cm + 4 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox12 + 1.32562cm + 16.09549cm + 0.44478cm + 4.32987cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + 1.7704cm + 16.0955cm + 0.44478cm + 4.32987cm + 6 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox12 + 2.21518cm + 16.09549cm + 0.44478cm + 4.32987cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + =IIf(Parameters!CveConcepto.Value = 8, "Almacén Origen:", "Almacén que recibe:") + + + + + + + + =Parameters!AlmacenOrigen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIf(Parameters!CveConcepto.Value = 8, "Almacén Destino:", "Almacén que envía:") + + + + + + + + =Parameters!AlmacenDestino.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Detalles del Movimiento: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!DireccionOrigen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!DireccionDestino.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 2.39157cm + 2.59353cm + 20.32792cm + 8 + + + + + + true + true + + + + + =iif(Parameters!CveConcepto.Value = 8, "Carga Privada", " ") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 5.83773cm + true + true + + + true + true + + + + + Observaciones: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ResponsableCarga.Value + + + + + + + Textbox21 + 3.28266cm + 3.14986cm + 0.50243cm + 5.79375cm + 2 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ResponsableRecibio.Value + + + + + + + Textbox21 + 3.28266cm + 11.86467cm + 0.50243cm + 5.78664cm + 3 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.56875cm + 3.15781cm + 1.2cm + 5.78664cm + 4 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.5682cm + 11.87177cm + 1.2cm + 5.78664cm + 5 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Envió + + + + + + + Textbox22 + 1.97831cm + 3.15781cm + 0.6cm + 5.78664cm + 6 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Accion.Value + + + + + + + Textbox22 + 1.97831cm + 11.87177cm + 0.6cm + 5.78664cm + 7 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!NombreAccion.Value = "","",Parameters!NombreAccion.Value) + + + + Textbox21 + 2.35606cm + 7.50017cm + 0.63528cm + 5.78664cm + 8 + + =iif(Parameters!CveConcepto.Value = 8, True, False) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.5682cm + 7.50727cm + 1.2cm + 5.78664cm + 9 + + =iif(Parameters!CveConcepto.Value = 8, True, False) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Accion.Value + + + + + + + Textbox22 + 1.97831cm + 7.50727cm + 0.6cm + 5.78664cm + 10 + + =iif(Parameters!CveConcepto.Value = 8, True, False) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 1.80136cm + 0.13678cm + 0cm + 20.28859cm + 13 + + + + + + 0.31558cm + 0.13678cm + 0cm + 20.28859cm + 14 + + + + + + 5.17097cm + 0.10068cm + 0cm + 20.3247cm + 15 + + + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox10 + 5.31209cm + 17.60787cm + 0.41981cm + 2.55292cm + 16 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm + + + + + + 2.99824cm + + + + + 0.48004cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 2.93858cm + + + true + true + + + + + =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 8.14637cm + 15.11602cm + 0.48004cm + 5.93682cm + 10 + + + + 18.12046cm + =Parameters!Observaciones.Value - + true true - = "Total: " & FormatNumber(Sum(Fields!Cantidad.Value, "DsInventarios"),0) + Total Productos : + + =Sum(iif(Not Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") + + + + true + true + + + + + Total Usados: + + + + =Sum(iif(Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") + + + + + + 2pt + 2pt + 2pt + 2pt + + 1.05208in + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Beneficiario.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Folio.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Importe.Value + + + + + + + Textbox1 + 3.15903cm + 17.62925cm + 0.6cm + 3.12778cm + 3 + + + Bottom + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Fecha.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ImporteLetra.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 1.72024cm + 2.98488cm + 0.99076cm + 8.50604cm + 7 + + + + + + true + 3.41684cm + 2.98488cm + 0.99076cm + 8.50604cm + 8 + + + + + + true + 4.88413cm + 2.98488cm + 0.99076cm + 8.50604cm + 9 + + + + + + true + 5.91016cm + 2.98488cm + 0.99076cm + 8.50604cm + 10 + + + + + + true + 6.9362cm + 2.98488cm + 0.99076cm + 8.50604cm + 11 + + + + + + true + 7.96224cm + 2.98488cm + 0.99076cm + 8.50604cm + 12 + + + + + + true + 8.98828cm + 2.98488cm + 0.99076cm + 8.50604cm + 13 + + + + + + + + + 3.21438cm + + + + + 0.44125cm + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + + + true + true + + + + + =Fields!CODIGO.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 12.24622cm + 0.58123cm + 0.8825cm + 3.21438cm + 14 + + + + + + + + + 9.3004cm + + + + + 0.44125cm + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + + + true + true + + + + + =Fields!Cuenta.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 12.24622cm + 4.68061cm + 0.8825cm + 9.3004cm + 15 + + + + + + + + + 2.5cm + + + + + 0.43958cm + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.43958cm + + + + + true + true + + + + + =IIF(Fields!Cargo.Value = 0,"",Fields!Cargo.Value) + + + + + + + Cuenta + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 12.24622cm + 15.84545cm + 0.87916cm + 2.5cm + 16 + + + + + + + + + 2.84396cm + + + + + 0.43958cm + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.43958cm + + + + + true + true + + + + + =IIF(Fields!Abono.Value = 0,"",Fields!Abono.Value) + + + + + + + Cuenta + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 12.24622cm + 18.3247cm + 0.87916cm + 2.84396cm + 17 + + + + + + 5.30706in + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + JOC + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + FLR + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TotalCargo.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TotalAbono.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0cm + 0cm + 0.13cm + - - - - - - Textbox3 - - - - Black - 3pt - - - Black - 3pt - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - U. M. - - - - - - - Textbox7 - - - - Black - 3pt - - - Black - 3pt - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Producto o Servicio - - - - - - - Textbox9 - - - - Black - 3pt - - - Black - 3pt - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Observaciones - - - - - - - Textbox68 - - - - Black - 3pt - - - Black - 3pt - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Sub Proyecto - - - - - - - Textbox71 - - - - Black - 3pt - - - Black - 3pt - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Activo Fijo - - - - - - - Textbox11 - - - - Black - 3pt - - - Black - 3pt - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - P. Unitario - - - - - - - Textbox13 - - - - Black - 3pt - - - Black - 3pt - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox5 - - - - Black - 3pt - - - Black - 3pt - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.473cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - - UM - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - - PS - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Observacion.Value - - - - - - - Observacion - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!SubProyecto.Value - - - - - - - SubProyecto - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Total.Value - - - - - - - Total - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 1pt - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 4.45714cm - 0.37406cm - 0.96717cm - 20.25838cm - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - - - true - true - - - - - IVA - - - - - - - Textbox20 - 6.29242cm - 16.30259cm - 0.45183cm - 2.06968cm - 1 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Total " & Parameters!Moneda.Value - - - - - - - Textbox20 - 6.74425cm - 16.30259cm - 0.45183cm - 2.06968cm - 2 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Descuento - - - - - - - Textbox20 - 5.86881cm - 16.30259cm - 0.42361cm - 2.06968cm - 3 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!IVA.Value - - - - - - - Textbox20 - 6.29242cm - 18.37226cm - 0.45183cm - 2.26019cm - 4 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Total.Value - - - - - - - Textbox20 - 6.74425cm - 18.37225cm - 0.45183cm - 2.26019cm - 5 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Descuento.Value - - - - - - - Textbox20 - 5.86881cm - 18.37225cm - 0.42361cm - 2.26019cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ImporteLetra.Value - - - - - - - Textbox46 - 6.74425cm - 0.37406cm - 0.45183cm - 15.92855cm - 7 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ORDEN DE COMPRA DE MATERIALES Y SERVICIOS - - - - - - - Textbox8 - 1.24262cm - 5.09642cm - 0.5365cm - 10.29733cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!TipoOC.Value - - - - - - - Textbox12 - 16.30259cm - 0.44478cm - 4.32987cm - 9 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Folio.Value - - - - - - - Textbox12 - 0.44478cm - 16.30259cm - 0.44478cm - 4.32987cm - 10 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresion - - - - - - - Textbox12 - 0.88956cm - 16.3026cm - 0.44478cm - 4.32987cm - 11 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Format(Globals!ExecutionTime,"dd/MM/yyyy") - - - - - - - Textbox12 - 1.33434cm - 16.30259cm - 0.44478cm - 4.32987cm - 12 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Proveedor - - - - - - - Textbox12 - 2.41498cm - 0.37406cm - 0.44478cm - 2.34596cm - 13 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Descripción - - - - - - - Textbox12 - 2.85976cm - 0.37406cm - 0.44478cm - 2.34596cm - 14 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Justificación - - - - - - - Textbox12 - 3.30454cm - 0.37406cm - 0.44478cm - 2.34596cm - 15 - - - Black - Middle - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Entrega - - - - - - - Textbox12 - 2.85976cm - 13.78003cm - 0.44478cm - 2.52258cm - 16 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Lugar de Entrega - - - - - - - Textbox12 - 3.30454cm - 13.78003cm - 0.44478cm - 2.52258cm - 17 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Estatus - - - - - - - Textbox12 - 2.41498cm - 13.78003cm - 0.44478cm - 2.52258cm - 18 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Parameters!FechaEntrega.Value="01/01/0001","",Parameters!FechaEntrega.Value) - - - - - - - Textbox12 - 2.85976cm - 16.30259cm - 0.44478cm - 4.32987cm - 19 - - - White - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ProveedorLugar.Value - - - - - - - Textbox12 - 3.30454cm - 16.30259cm - 0.44478cm - 4.32987cm - 20 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Estatus.Value - - - - - - - Textbox12 - 2.41498cm - 16.30259cm - 0.44478cm - 4.32987cm - 21 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Descripcion.Value - - - - - - - Textbox12 - 2.85976cm - 2.72002cm - 0.44478cm - 11.06001cm - 22 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Asunto.Value - - - - - - - Textbox12 - 3.30454cm - 2.72002cm - 0.44478cm - 11.06001cm - 23 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - White - Middle - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ProveedorNombre.Value - - - - - - - Textbox12 - 2.41498cm - 2.72002cm - 0.44478cm - 11.06001cm - 24 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - SERVICIOS ELECTRICOS Y CONTROL DE HERMOSILLO S.A. DE C.V. - - - - - - - Textbox8 - 0.48034cm - 5.09642cm - 0.76228cm - 10.29733cm - 25 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Solicitante - - - - - - - Textbox12 - 8.9744cm - 3.24661cm - 0.44478cm - 5.83844cm - 26 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - - - Textbox12 - 9.41918cm - 3.24661cm - 0.4095cm - 5.83844cm - 27 - - - - Black - - 1pt - - Top - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!NombreSolicito.Value - - - - - - - Textbox12 - 9.86396cm - 3.24661cm - 0.44478cm - 5.83844cm - 28 - - - White - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Autorizó - - - - - - - Textbox12 - 8.9744cm - 11.64269cm - 0.44478cm - 5.83844cm - 29 - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - - - Textbox12 - 9.41918cm - 11.64269cm - 0.4095cm - 5.83844cm - 30 - - - - Black - - 1pt - - Top - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!NombreAutorizo.Value - - - - - - - Textbox12 - 9.86396cm - 11.64269cm - 0.44478cm - 5.83844cm - 31 - - - White - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!FirmaAutorizo.Value - Fit - 7.40422cm - 12.66192cm - 3.5cm - 3.5cm - 32 - - =iif(Parameters!FirmaAutorizo.Value <> "", False, True) - - - - - - - External - =Parameters!FirmaSolicito.Value - Fit - 7.40422cm - 4.4049cm - 3.5cm - 3.5cm - 33 - - =iif(Parameters!FirmaSolicito.Value <> "", False, True) - - - - - - - true - true - - - - - Uso CFDI 3.3: - - - - - - - Textbox12 - 3.74932cm - 0.37406cm - 0.44478cm - 2.34596cm - 34 - - - Black - Middle - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsoCFDI.Value - - - - - - - Textbox12 - 3.74932cm - 2.72002cm - 0.44478cm - 11.06001cm - 35 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - White - Middle - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - SubTotal - - - - - - - Textbox20 - 5.43618cm - 16.3026cm - 0.42361cm - 2.0597cm - 36 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SubTotal.Value - - - - - - - Textbox20 - 5.43618cm - 18.36228cm - 0.42361cm - 2.26019cm - 37 - - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - - LightGrey - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - LOGOSERVECENJPG - FitProportional - 0.44478cm - 0.37406cm - 1.60584cm - 4.54597cm - 38 - - - - - - 4.55973in - - - - - - - - =Now() - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 0.07056cm - 18.12247cm - 0.50624cm - 2.5cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox3 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + U. M. + + + + + + + Textbox7 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Producto o Servicio + + + + + + + Textbox9 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Observaciónes + + + + + + + Textbox68 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Sub Proyecto + + + + + + + Textbox71 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Activo Fijo + + + + + + + Textbox11 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P. Unitario + + + + + + + Textbox13 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox5 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.473cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + + UM + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + + PS + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Observacion.Value + + + + + + + Observacion + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!SubProyecto.Value + + + + + + + SubProyecto + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 4.45714cm + 0.37406cm + 0.96717cm + 20.25838cm + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + + + true + true + + + + + IVA + + + + + + + Textbox20 + 6.29242cm + 16.30259cm + 0.45183cm + 2.06968cm + 1 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Total " & Parameters!Moneda.Value + + + + + + + Textbox20 + 6.74425cm + 16.30259cm + 0.45183cm + 2.06968cm + 2 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Descuento + + + + + + + Textbox20 + 5.86881cm + 16.30259cm + 0.42361cm + 2.06968cm + 3 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!IVA.Value + + + + + + + Textbox20 + 6.29242cm + 18.37226cm + 0.45183cm + 2.26019cm + 4 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox20 + 6.74425cm + 18.37225cm + 0.45183cm + 2.26019cm + 5 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Descuento.Value + + + + + + + Textbox20 + 5.86881cm + 18.37225cm + 0.42361cm + 2.26019cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ImporteLetra.Value + + + + + + + Textbox46 + 6.74425cm + 0.37406cm + 0.45183cm + 15.92855cm + 7 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ORDEN DE COMPRA DE MATERIALES Y SERVICIOS + + + + + + + Textbox8 + 1.24262cm + 5.09642cm + 0.5365cm + 10.29733cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoOC.Value + + + + + + + Textbox12 + 16.30259cm + 0.44478cm + 4.32987cm + 9 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox12 + 0.44478cm + 16.30259cm + 0.44478cm + 4.32987cm + 10 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresion + + + + + + + Textbox12 + 0.88956cm + 16.3026cm + 0.44478cm + 4.32987cm + 11 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Format(Globals!ExecutionTime,"dd/MM/yyyy") + + + + + + + Textbox12 + 1.33434cm + 16.30259cm + 0.44478cm + 4.32987cm + 12 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Proveedor + + + + + + + Textbox12 + 2.41498cm + 0.37406cm + 0.44478cm + 2.34596cm + 13 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Descripción + + + + + + + Textbox12 + 2.85976cm + 0.37406cm + 0.44478cm + 2.34596cm + 14 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Justificación + + + + + + + Textbox12 + 3.30454cm + 0.37406cm + 0.44478cm + 2.34596cm + 15 + + + Black + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Entrega + + + + + + + Textbox12 + 2.85976cm + 13.78003cm + 0.44478cm + 2.52258cm + 16 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Lugar de Entrega + + + + + + + Textbox12 + 3.30454cm + 13.78003cm + 0.44478cm + 2.52258cm + 17 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Estatus + + + + + + + Textbox12 + 2.41498cm + 13.78003cm + 0.44478cm + 2.52258cm + 18 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!FechaEntrega.Value="01/01/0001","",Parameters!FechaEntrega.Value) + + + + + + + Textbox12 + 2.85976cm + 16.30259cm + 0.44478cm + 4.32987cm + 19 + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ProveedorLugar.Value + + + + + + + Textbox12 + 3.30454cm + 16.30259cm + 0.44478cm + 4.32987cm + 20 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Estatus.Value + + + + + + + Textbox12 + 2.41498cm + 16.30259cm + 0.44478cm + 4.32987cm + 21 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Descripcion.Value + + + + + + + Textbox12 + 2.85976cm + 2.72002cm + 0.44478cm + 11.06001cm + 22 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Asunto.Value + + + + + + + Textbox12 + 3.30454cm + 2.72002cm + 0.44478cm + 11.06001cm + 23 + + + White + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ProveedorNombre.Value + + + + + + + Textbox12 + 2.41498cm + 2.72002cm + 0.44478cm + 11.06001cm + 24 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + SERVICIOS ELECTRICOS Y CONTROL DE HERMOSILLO S.A. DE C.V. + + + + + + + Textbox8 + 0.48034cm + 5.09642cm + 0.76228cm + 10.29733cm + 25 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Solicitante + + + + + + + Textbox12 + 8.9744cm + 3.24661cm + 0.44478cm + 5.83844cm + 26 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + Textbox12 + 9.41918cm + 3.24661cm + 0.4095cm + 5.83844cm + 27 + + + + Black + + 1pt + + Top + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NombreSolicito.Value + + + + + + + Textbox12 + 9.86396cm + 3.24661cm + 0.44478cm + 5.83844cm + 28 + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Autorizó + + + + + + + Textbox12 + 8.9744cm + 11.64269cm + 0.44478cm + 5.83844cm + 29 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + Textbox12 + 9.41918cm + 11.64269cm + 0.4095cm + 5.83844cm + 30 + + + + Black + + 1pt + + Top + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NombreAutorizo.Value + + + + + + + Textbox12 + 9.86396cm + 11.64269cm + 0.44478cm + 5.83844cm + 31 + + + White + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!FirmaAutorizo.Value + Fit + 7.40422cm + 12.66192cm + 3.5cm + 3.5cm + 32 + + =iif(Parameters!FirmaAutorizo.Value <> "", False, True) + + + + + + + External + =Parameters!FirmaSolicito.Value + Fit + 7.40422cm + 4.4049cm + 3.5cm + 3.5cm + 33 + + =iif(Parameters!FirmaSolicito.Value <> "", False, True) + + + + + + + true + true + + + + + Uso CFDI 3.3: + + + + + + + Textbox12 + 3.74932cm + 0.37406cm + 0.44478cm + 2.34596cm + 34 + + + Black + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsoCFDI.Value + + + + + + + Textbox12 + 3.74932cm + 2.72002cm + 0.44478cm + 11.06001cm + 35 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + SubTotal + + + + + + + Textbox20 + 5.43618cm + 16.3026cm + 0.42361cm + 2.0597cm + 36 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SubTotal.Value + + + + + + + Textbox20 + 5.43618cm + 18.36228cm + 0.42361cm + 2.26019cm + 37 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + LOGOSERVECENJPG + FitProportional + 0.44478cm + 0.37406cm + 1.60584cm + 4.54597cm + 38 + + + + + + 4.55973in + + + + + + + + =Now() + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 0.07056cm + 18.12247cm + 0.50624cm + 2.5cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 1cm + 1cm + 0.13cm + - - - - - - Textbox1 - 0.70708in - 0.23958in - 2.72234in - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información de Distribuidor - - - - - - - Textbox2 - 0.30083in - 0.43625in - 0.20139in - 3.41668in - 1 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre del distribuidor: - - - - =Parameters!NombreDistribuidor.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad, Estado: - - - - =Parameters!CiudadEstado.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tel. - - - - =Parameters!TelCliente.Value - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre del mayorista que lo atiende: - - - - =Parameters!NombreEmpresa.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Consecutivo acuse de acumuladores: - - - - =Parameters!Consec.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio acuse: - - - - =Parameters!FolioAcuse.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información de Garantía o Ajuste - - - - - - - Textbox2 - 1.06055in - 0.43623in - 0.17014in - 3.41668in - 8 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha de instalación: - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Año: - - - - =Year(Parameters!FechaInst.Value) - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Día: - - - - =Day(Parameters!FechaInst.Value) - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Mes: - - - - = MonthName(Month(Parameters!FechaInst.Value)) - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha de Reclamación: - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Año: - - - - = Year(Parameters!Fecha.Value) - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Día: - - - - =Day(Parameters!Fecha.Value) - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Mes: - - - - = MonthName(Month(Parameters!Fecha.Value)) - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Defecto: - - - - =Parameters!Defecto.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - %Ajuste: - - - - =Parameters!PorcentajeAjuste.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Meses de uso: - - - - =Parameters!MesesUso.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información Acumulador - - - - - - - Textbox2 - 1.64736in - 0.43625in - 0.17014in - 3.4167in - 20 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo: - - - - =Parameters!Tipo.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Etiqueta: - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Marca: - - - - =Parameters!Marca.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CodEnsamble.Value - - - - - - - Textbox3 - 1.95639in - 0.43623in - 0.13889in - 1.00004in - 24 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CodInspeccion.Value - - - - - - - Textbox3 - 1.95639in - 2.61332in - 0.13889in - 1.23961in - 25 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CodLinea.Value - - - - - - - Textbox3 - 1.95639in - 1.43627in - 0.125in - 1.17707in - 26 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ensamble (primeros 7 dígitos) - - - - - - - Textbox3 - 2.09528in - 0.43623in - 0.125in - 1.39934in - 27 - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Inspección (4 dígitos) - - - - - - - Textbox3 - 2.09528in - 2.81123in - 0.125in - 1.04174in - 28 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Linea (4 dígitos) - - - - - - - Textbox3 - 2.09528in - 1.83557in - 0.125in - 0.97566in - 29 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información del Consumidor - - - - - - - Textbox2 - 2.22028in - 0.43627in - 0.17014in - 3.41668in - 30 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información Vehículo - - - - - - - Textbox2 - 2.39042in - 0.43627in - 0.17014in - 3.41668in - 31 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Marca: - - - - =Parameters!MarcaAuto.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo: - - - - =Parameters!TipoAuto.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Año: - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información Consumidor - - - - - - - Textbox2 - 2.69945in - 0.4362in - 0.17014in - 3.4167in - 35 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre del consumidor: - - - - =Parameters!NombreCliente.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección: - - - - =Parameters!Direccion.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad, Estado: - - - - =Parameters!CiudadEstado.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tel. - - - - =Parameters!TelCliente.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Por medio de la presente acepto de conformidad el ajuste o garantía según información arriba mencionada. - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 4.16824in - 0.70712in - 0in - 1.26042in - 42 - - - - - - 4.16824in - 2.29046in - 0in - 1.25567in - 43 - - - - - - true - true - - - - - Fecha - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Firma del Consumidor - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox46 - 3.98421in - 0.70712in - 0.15625in - 1.26042in - 46 - - - 2pt - 2pt - 2pt - 2pt - - - - 4.48893in - - - - =FormatDateTime(Today, DateFormat.ShortDate) - - - - - - - - - - - - - - - 14cm - 10.75cm - 0.02cm - 0.02cm - 0.02cm - 0.02cm - + + + + + + Textbox1 + 0.65708in + 0.23958in + 2.72234in + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información de Distribuidor + + + + + + + Textbox2 + 0.30083in + 0.38625in + 0.20139in + 3.41668in + 1 + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Nombre del distribuidor: + + + + =Parameters!NombreDistribuidor.Value + + + + + + + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Ciudad, Estado: + + + + =Parameters!CiudadEstado.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Tel. + + + + =Parameters!TelCliente.Value + + + + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Nombre del mayorista que lo atiende: + + + + =Parameters!NombreEmpresa.Value + + + + + + + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Consecutivo acuse de acumuladores: + + + + =Parameters!Consec.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Folio acuse: + + + + =Parameters!FolioAcuse.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información de Garantía o Ajuste + + + + + + + Textbox2 + 1.14805in + 0.38623in + 0.17014in + 3.41668in + 8 + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha de instalación: + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Año: + + + + =Year(Parameters!FechaInst.Value) + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Día: + + + + =Day(Parameters!FechaInst.Value) + + + + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Mes: + + + + = MonthName(Month(Parameters!FechaInst.Value)) + + + + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha de Reclamación: + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Año: + + + + = Year(Parameters!Fecha.Value) + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Día: + + + + =Day(Parameters!Fecha.Value) + + + + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Mes: + + + + = MonthName(Month(Parameters!Fecha.Value)) + + + + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Defecto: + + + + =Parameters!Defecto.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + %Ajuste: + + + + =Parameters!PorcentajeAjuste.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Meses de uso: + + + + =Parameters!MesesUso.Value + + + + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información Acumulador + + + + + + + Textbox2 + 1.78486in + 0.38625in + 0.17014in + 3.4167in + 20 + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Tipo: + + + + =Parameters!Tipo.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Etiqueta: + + + + =Parameters!Etiqueta.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Marca: + + + + =Parameters!Marca.Value + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!CodEnsamble.Value + + + + + + + Textbox3 + 2.28139in + 0.38623in + 0.19445in + 1.00004in + 24 + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!CodInspeccion.Value + + + + + + + Textbox3 + 2.28139in + 2.56332in + 0.19445in + 1.23961in + 25 + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!CodLinea.Value + + + + + + + Textbox3 + 2.28139in + 1.38627in + 0.18056in + 1.17707in + 26 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Ensamble (primeros 7 dígitos) + + + + + + + Textbox3 + 2.46611in + 0.38623in + 0.16667in + 1.39934in + 27 + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Inspección (4 dígitos) + + + + + + + Textbox3 + 2.46611in + 2.76123in + 0.16667in + 1.04174in + 28 + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Linea (4 dígitos) + + + + + + + Textbox3 + 2.46611in + 1.78557in + 0.16667in + 0.97566in + 29 + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información del Consumidor + + + + + + + Textbox2 + 2.63278in + 0.38627in + 0.17014in + 3.41668in + 30 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información Vehículo + + + + + + + Textbox2 + 2.80292in + 0.38627in + 0.17014in + 3.41668in + 31 + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Marca: + + + + =Parameters!MarcaAuto.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Tipo: + + + + =Parameters!TipoAuto.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Año: + + + + =Parameters!Anio.Value + + + + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información Consumidor + + + + + + + Textbox2 + 3.12445in + 0.3862in + 0.17014in + 3.4167in + 35 + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Nombre del consumidor: + + + + =Parameters!NombreCliente.Value + + + + + + + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Dirección: + + + + =Parameters!Direccion.Value + + + + + + + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Ciudad, Estado: + + + + =Parameters!CiudadEstadoConsumidor.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Tel. + + + + =Parameters!TelConsumidor.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Por medio de la presente acepto de conformidad el ajuste o garantía según información arriba mencionada. + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 4.64324in + 0.65712in + 0in + 1.26042in + 42 + + + + + + 4.64324in + 2.24046in + 0in + 1.25567in + 43 + + + + + + true + true + + + + + Fecha + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Firma del Consumidor + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox46 + 4.47171in + 0.65712in + 0.15625in + 1.26042in + 46 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Póliza: + + + + =Parameters!Comprobante.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + 5.0181in + + + + =FormatDateTime(Today, DateFormat.ShortDate) + + + + + + + + + + + + + + + 14cm + 10.75cm + 0.02cm + 0.02cm + 0.02cm + 0.02cm + - - - - - - Textbox4 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cantidad - - - - - - - Textbox6 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Sub Total - - - - - - - Textbox13 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descuento - - - - - - - Textbox15 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Amortización - - - - - - - Textbox18 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total Impuestos - - - - - - - Textbox19 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - IVA - - - - - - - Textbox21 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total - - - - - - - Textbox23 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.49417cm - - - - - true - true - - - - - =Fields!GPO.Value - - - - - - - =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad1 - - - =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SubTotal.Value - - - - - - - SubTotal1 - - - =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Descuento.Value - - - - - - - Descuento1 - - - =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Amortizacion.Value - - - - - - - Amortizacion1 - - - =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TotalImpuestos.Value - - - - - - - TotalImpuestos1 - - - =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!IVA.Value - - - - - - - IVA1 - - - =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Total.Value - - - - - - - Total1 - - - =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet1 - 0.24694cm - 0.08599cm - 1.04125cm - 20.78593cm - - - - - - 0cm - 0.08599cm - 0cm - 20.80578cm - 1 - - - - - - 0.56284in - - - - - - - Textbox1 - 0.18521cm - 6.3909cm - 0.6cm - 10.83028cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE VENTAS - - - - - - - - - - - - - - - - Textbox2 - 0.78521cm - 6.3909cm - 0.52945cm - 10.83028cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.06614cm - 2.22362cm - 6.08487cm - 2 - - - - - - true - true - true - - - - - =Parameters!Filtros.Value - HTML - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 1.18709cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.27341cm - 17.20586cm - 0.38981cm - 3.61081cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.15875cm - 0.08599cm - 0cm - 20.78593cm - 4 - - - - - - true - true - - - - - =Globals!ExecutionTime - - - - - - - Textbox11 - 0.27341cm - 10.49455cm - 0.38981cm - 4.50094cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - IMPRESO EN SIG, Rep. Ventas - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox4 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cantidad + + + + + + + Textbox6 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Sub Total + + + + + + + Textbox13 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descuento + + + + + + + Textbox15 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Amortización + + + + + + + Textbox18 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total Impuestos + + + + + + + Textbox19 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IVA + + + + + + + Textbox21 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + IEPS + + + + + + + Textbox3 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total + + + + + + + Textbox23 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + + + true + true + + + + + =Fields!GPO.Value + + + + + + =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SubTotal.Value + + + + + + + SubTotal1 + + + =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento1 + + + =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Amortizacion.Value + + + + + + + Amortizacion1 + + + =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TotalImpuestos.Value + + + + + + + TotalImpuestos1 + + + =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!IVA.Value + + + + + + + IVA1 + + + =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!IEPS.Value + + + + + + + IEPS + + + =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total1 + + + =Switch(Fields!TipoFila.Value = 0 , "#67809F", Fields!TipoFila.Value = 1, "#CCCCCC",Fields!TipoFila.Value = 2, "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + =iif(Sum(Fields!IEPS.Value, "DataSet1") > 0, false, true) + + + + + + + + + After + + + + + + + DataSet1 + 0.24694cm + 0.08599cm + 1.04125cm + 20.80578cm + + + + + + 0.08599cm + 0cm + 20.80578cm + 1 + + + + + + 0.56284in + + + + + + + Textbox1 + 0.18521cm + 6.3909cm + 0.6cm + 10.83028cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE VENTAS + + + + + + + + + + + + + + + + Textbox2 + 0.78521cm + 6.3909cm + 0.52945cm + 10.83028cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 6.08487cm + 2 + + + + + + true + true + true + + + + + =Parameters!Filtros.Value + HTML + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 1.18709cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.27341cm + 17.20586cm + 0.38981cm + 3.61081cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.15875cm + 0.08599cm + 0cm + 20.78593cm + 4 + + + + + + true + true + + + + + =Globals!ExecutionTime + + + + + + + Textbox11 + 0.27341cm + 10.49455cm + 0.38981cm + 4.50094cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + IMPRESO EN SIG, Rep. Ventas + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 1cm + 1cm + 0.13cm + @@ -84,10 +84,11 @@ Actual Nuevo + + DataKeyNames="CvePersonal,Codigo,Nombre,FechaInicio,Antiguedad,Incapacitado,NumeroSS,CveTipodeSalario,TipodeSalario,SalarioDiario,SDINuevo,SalarioVariableNuevo,SalarioDiarioSSNuevo,SDI,SalarioVariable,SalarioDiarioSS,PorPrimaVacacional,NumDiasAguinaldo,Acumulado,diasBimestre,Faltas,Incapaciadad,diaslaborados,Movtotxt"> @@ -187,6 +188,14 @@ + + + Modificación + + + + + diff --git a/RH/CalculoSBC.aspx.cs b/RH/CalculoSBC.aspx.cs index 15374b256..c7593dea4 100644 --- a/RH/CalculoSBC.aspx.cs +++ b/RH/CalculoSBC.aspx.cs @@ -5,8 +5,19 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Extensiones; -public partial class RH_CalculoSBC : ClsPaginas +public partial class RH_CalculoSBC : ClsPaginas { + + //private DataTable dtPeriodos + //{ + // get + // { + // if (ViewState["dtPeriodos"] == null) { return null; } + // else { return (DataTable)ViewState["dtPeriodos"]; } + // } + + // set { ViewState["dtPeriodos"] = value; } + //} protected void Page_Load(object sender, EventArgs e) { @@ -14,9 +25,9 @@ public partial class RH_CalculoSBC : ClsPaginas protected void LnkCalcular_Click(object sender, EventArgs e) { - using(ClsNominas objnom = new ClsNominas() ) + using (ClsNominas objnom = new ClsNominas()) { - if( objnom.GetCalculoSBC(UsuarioActual.CveEmpresa,TxtFechaPago.Text)) + if (objnom.GetCalculoSBC(UsuarioActual.CveEmpresa, TxtFechaPago.Text)) { GVCalculosSBC.DataSource = objnom.DTSetResultados.Tables[0]; GVCFija.DataSource = objnom.DTSetResultados.Tables[0]; @@ -32,46 +43,95 @@ public partial class RH_CalculoSBC : ClsPaginas { string concater = ""; - string MovtosAfil = ""; + //string MovtosAfil = ""; string MovtosmodSalario = ""; - string movtosBajas = ""; + //string movtosBajas = ""; using (ClsRH ObjPersonal = new ClsRH()) { - if (ObjPersonal.GetMovimientosToSUA(UsuarioActual.CveEmpresa,"2021-01-01", "2021-02-28")) + if (ObjPersonal.GetMovimientosToSUA(UsuarioActual.CveEmpresa, "2021-03-01", "2021-03-03")) { - //01: MovtosAfil - concater = ""; - foreach (var item in ObjPersonal.DtResultados.Select("Tipo=1")) - { - MovtosAfil = string.Format("{0}{1}{2}", MovtosAfil, concater, item["Movtotxt"]); - concater = "\\r\\n"; - } + ////01: MovtosAfil + //concater = ""; + //foreach (var item in ObjPersonal.DtResultados.Select("Tipo=1")) + //{ + // MovtosAfil = string.Format("{0}{1}{2}", MovtosAfil, concater, item["Movtotxt"]); + // concater = "\\r\\n"; + //} - //02: MovtosmodSalario + //02: MovtosmodSalario GVCalculosSBC concater = ""; + int contador = 0; foreach (var item in ObjPersonal.DtResultados.Select("Tipo=2")) { MovtosmodSalario = string.Format("{0}{1}{2}", MovtosmodSalario, concater, item["Movtotxt"]); concater = "\\r\\n"; + contador++; } - //03: movtosBajas - concater = ""; - foreach (var item in ObjPersonal.DtResultados.Select("Tipo=3")) + foreach (GridViewRow item in GVCalculosSBC.Rows) { - movtosBajas = string.Format("{0}{1}{2}", movtosBajas, concater, item["Movtotxt"]); - concater = "\\r\\n"; + double SalarioDiarioSSNuevo =Math.Round( item.DataKey("SalarioDiarioSSNuevo").ToDouble(),2); + double SalarioDiarioSS = Math.Round(item.DataKey("SalarioDiarioSS").ToDouble(),2); + if (SalarioDiarioSSNuevo != SalarioDiarioSS) + { + MovtosmodSalario = string.Format("{0}{1}{2}", MovtosmodSalario, concater, item.DataKey("Movtotxt")); + concater = "\\r\\n"; + contador++; + } } + MovtosmodSalario = string.Format("{0}{1}{2}", MovtosmodSalario, concater, + $"************* 00{(contador < 1000 ? "0" : "")}{(contador < 100 ? "0" : "")}{(contador < 10 ? "0" : "")}{contador} 00001 9"); + ////03: movtosBajas + //concater = ""; + //foreach (var item in ObjPersonal.DtResultados.Select("Tipo=3")) + //{ + // movtosBajas = string.Format("{0}{1}{2}", movtosBajas, concater, item["Movtotxt"]); + // concater = "\\r\\n"; + //} } - RegistraScript(string.Format("SaveCsv(\"MovtosAfil.txt\", '{0}');SaveCsv(\"MovtosmodSalario.txt\", '{1}');SaveCsv(\"movtosBajas.txt\", '{2}');", MovtosAfil.Replace("'", "\\'"), MovtosmodSalario.Replace("'", "\\'"), movtosBajas.Replace("'", "\\'"))); - RegistraScript("$('#DmodalGetSua').modal('hide');"); + RegistraScript(string.Format("SaveCsv(\"MovtosmodSalario{1:ddMMMyyyy}.txt\", '{0}');", MovtosmodSalario, TxtFechaPago.Text.ToDateTimeExcat("dd/MM/yyyy"))); + //RegistraScript(string.Format("SaveCsv(\"MovtosAfil.txt\", '{0}');SaveCsv(\"MovtosmodSalario.txt\", '{1}');SaveCsv(\"movtosBajas.txt\", '{2}');", MovtosAfil.Replace("'", "\\'"), MovtosmodSalario.Replace("'", "\\'"), movtosBajas.Replace("'", "\\'"))); + //RegistraScript("$('#DmodalGetSua').modal('hide');"); } } protected void LnkGuardarCambios_Click(object sender, EventArgs e) { - Alert("Se registro la modificación de salario correctamente."); + string fecha = TxtFechaPago.Text.ToDateTimeExcat("dd/MM/yyyy").ToString("yyyy/MM/dd"); + bool continuar = true; + using (ClsRH objrh = new ClsRH()) + { + + foreach (GridViewRow item in GVCalculosSBC.Rows) + { + int CvePersonal = item.DataKey("Movtotxt").ToEntero();//,,, + double SalarioDiario = item.DataKey("SalarioDiario").ToDouble(); + double SDINuevo = item.DataKey("SDINuevo").ToDouble(); + double SalarioDiarioSSNuevo = Math.Round(item.DataKey("SalarioDiarioSSNuevo").ToDouble(),2); + double SalarioVariableNuevo = item.DataKey("SalarioVariableNuevo").ToDouble(); + double SalarioDiarioSS = Math.Round(item.DataKey("SalarioDiarioSS").ToDouble(),2); + if (continuar && SalarioDiarioSSNuevo != SalarioDiarioSS && (continuar = objrh.UpdateSalarios(CvePersonal, fecha, UsuarioActual.CveEmpresa, SalarioDiario, SDINuevo, SalarioDiarioSSNuevo, SalarioDiario))) + { + + } + } + } + if (continuar) + { + Alert("Se registro la modificación de salario correctamente."); + LnkDownArchivosSua_Click(null, null); + } + else + { + + } + /* + + Using ObjPersonal As ClsRH = New ClsRH() + If ObjPersonal.UpdateSalarios(CvePersonal, TxtFechamodSalario.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, TxtSalarioDiarioM.Text.ToDecimal(), TxtFISalarioDiarioIntegrado.Text.ToDecimal(), TxtFISalarioDiarioIntegrado.Text.ToDecimal(), TxtSalarioDiarioM.Text.ToDecimal()) Then + + * */ } protected void LnkDescargar_Click(object sender, EventArgs e) diff --git a/RH/CatPersonal.aspx b/RH/CatPersonal.aspx index e65ec1a90..7fd4e727e 100644 --- a/RH/CatPersonal.aspx +++ b/RH/CatPersonal.aspx @@ -471,10 +471,10 @@   - + FechaIngreso - + @@ -603,7 +603,7 @@ - + Fecha registro @@ -708,7 +708,7 @@
- +
diff --git a/Scripts/custom.js b/Scripts/custom.js index b293b0e02..afe9649fa 100644 --- a/Scripts/custom.js +++ b/Scripts/custom.js @@ -1,7 +1,7 @@ var IHAVEALLTHEPOWER = false; var objscollapse = null; var objsexpand = null; -var adscrollerposition =[]; +var adscrollerposition = []; conf = { error: console.error, info: console.info, @@ -78,10 +78,10 @@ function FiltrarTabla(idtxt, idtable, idcontador) { } function FiltrarTablaV2(idtxt, idtable, idcontador) { - if ($( idtxt).val() == '') { $(idtable + ' tr').css('display', 'table-row'); } - else { $(idtable + ' tr:not(.ADtr)').css('display', 'none'); $(idtable + ' tr:contains("' + $( idtxt).val() + '")').css('display', 'table-row'); } + if ($(idtxt).val() == '') { $(idtable + ' tr').css('display', 'table-row'); } + else { $(idtable + ' tr:not(.ADtr)').css('display', 'none'); $(idtable + ' tr:contains("' + $(idtxt).val() + '")').css('display', 'table-row'); } if ($('#' + idcontador).length > 0) { - $('#' + idcontador).html($( idtable + ' tr:visible').length); + $('#' + idcontador).html($(idtable + ' tr:visible').length); } } @@ -354,7 +354,7 @@ function ADScroller2() { var heightGral = $(window).height() - HeightMenos; if (Heightfijo > 0) { heightGral = Heightfijo; } if (widthGral < 300) { widthGral = 300; } - if (heightGral < 300) { heightGral =300; } + if (heightGral < 300) { heightGral = 300; } widthGral = Tthis.parent().parent().width(); Tthis.removeClass('ADSCROLLER2'); @@ -426,8 +426,8 @@ function ADScroller2() { var contenedor = $('
'); - var divheader = $('
'); - var divcenter = $('
'); + var divheader = $('
'); + var divcenter = $('
'); var divheader1 = $('
'); var divheader2 = $('
'); var divcenterCols = $('
'); @@ -451,6 +451,11 @@ function ADScroller2() { divheader1.append(THeader1); var anchoc1 = divheader1.outerWidth(); + + var divheader1button = $('
'); + divheader1button.width(anchoc1); + divheader1.append(divheader1button); + divheader1button.append(THeader1); var altoc1 = divheader1.outerHeight() + 15; divheaderScroll = $('
').append(THeader2); divheader2.append(divheaderScroll); @@ -483,6 +488,11 @@ function ADScroller2() { divcolsScroll.unbind('scroll'); }); let sizeoftablefunc = function () { + let widthtx = divheader1.outerWidth() + divheader2.outerWidth(); + let widthtxb = divcenterCols.outerWidth() + divcenterbody.outerWidth(); + divheader.css('width', widthtx); + divcenter.css('width', widthtx); + let sizetable = Tthis.outerHeight(); if (sizetable < divbodyScroll.height()) { sizetable = sizetable + 20; @@ -493,10 +503,11 @@ function ADScroller2() { }; let resizefncscroller = function () { - var widthGral = $(window).width() - WidthMenos; + //var widthGral = $(window).width() - WidthMenos; /*console.log(widthGral);*/ - contenedor.css('width', 1); - widthGral = Tthis.parent().parent().parent().parent().parent().width(); + //contenedor.css('width', 1); + //widthGral = Tthis.parent().parent().parent().parent().parent().width(); + widthGral = Tthis.parent().parent().width(); /* console.log(widthGral);*/ var heightGral = $(window).height() - HeightMenos; //console.log(heightGral); @@ -510,6 +521,8 @@ function ADScroller2() { divcolsScroll.css('height', (heightGral - altoc1 + 20)); divbodyScroll.css('width', (widthGral - anchoc1)); divbodyScroll.css('height', (heightGral - altoc1 + 20)); + + setTimeout(sizeoftablefunc, 100); }; //$(window).resize(function () { // setTimeout(resizefncscroller, 50); @@ -517,14 +530,16 @@ function ADScroller2() { //}); $('table#ADCol' + Tid + ' tr').hover( - function () { $('table#' + Tid + ' tr:nth-child(' + ($(this).index() + 1) + ')').addClass('hover');}, - function () { $('table#' + Tid + ' tr:nth-child(' + ($(this).index() + 1) + ')').removeClass('hover');}); + function () { $('table#' + Tid + ' tr:nth-child(' + ($(this).index() + 1) + ')').addClass('hover'); }, + function () { $('table#' + Tid + ' tr:nth-child(' + ($(this).index() + 1) + ')').removeClass('hover'); }); $('table#' + Tid + ' tr').hover( - function () { $('table#ADCol' + Tid + ' tr:nth-child(' + ($(this).index() + 1) + ')').addClass('hover');}, + function () { $('table#ADCol' + Tid + ' tr:nth-child(' + ($(this).index() + 1) + ')').addClass('hover'); }, function () { $('table#ADCol' + Tid + ' tr:nth-child(' + ($(this).index() + 1) + ')').removeClass('hover'); }); setTimeout(sizeoftablefunc, 100); - - + + Tthis.parent().parent().bind('resize', function () { + setTimeout(resizefncscroller, 100); + }) let found = adscrollerposition.find(element => element.id = 'C_Tab_TabNominas_GvNominas'); if (found != null) { @@ -784,7 +799,7 @@ function loadadscroll() { var colVisibles = isNaN(Number(TThis.data('cols'))) ? 0 : Number(TThis.data('cols')); if (colVisibles > 0) { - if ((Number(TThis.data('heighterror'))) && !(Number(TThis.data('heightmenos')))) { TThis.data('heightmenos', TThis.data('heighterror'));} + if ((Number(TThis.data('heighterror'))) && !(Number(TThis.data('heightmenos')))) { TThis.data('heightmenos', TThis.data('heighterror')); } TThis.removeClass("ScrollAD"); TThis.addClass("ADSCROLLER2"); } else { @@ -862,7 +877,7 @@ ADSScroll = function (tablescroll) { } } let firsttr = null; - tablescroll.find('> tbody > tr' + scrollwidthrow + ',> thead > tr' + scrollwidthrow + ',> tr' + scrollwidthrow +'').each(function () { + tablescroll.find('> tbody > tr' + scrollwidthrow + ',> thead > tr' + scrollwidthrow + ',> tr' + scrollwidthrow + '').each(function () { var retorno = false; firsttr = $(this); if (firsttr.find(' > td[colspan], > th[colspan]').length) { retorno = true; } @@ -1186,7 +1201,7 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) { Pagina: (!(DdlWS.data('pagina')) || DdlWS.data('pagina') == '') ? '-2' : DdlWS.data('pagina'), ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto'), aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa') - + //Metodo: metodo }; }, diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 78c15c76b..590b08157 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -631,7 +631,7 @@
- + Frecuente Venta Mostrador @@ -906,7 +906,7 @@
- <%--
+ <%--
--%> @@ -914,12 +914,12 @@
- <%--
+ <%--
--%> - <%--
+ <%--
@@ -3215,9 +3215,10 @@ --%> -
- " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
+ <%=GvDatosGPS.Rows.Count %> dispositivos + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
@@ -3225,8 +3226,15 @@ - + + + + + + @@ -6428,7 +6436,10 @@ } - + function SetTabVisibility(index) { + $find('<%=Tab.ClientID%>').get_tabs()[index].set_enabled(true); + return false; + } function pageLoad(sender, e) { diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index f65900d88..4b1283c3a 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -9,9 +9,9 @@ Imports System.Data Imports System.Globalization Partial Class Clientes - Inherits ClsPaginas - - 'Configuración + Inherits ClsPaginas + + 'Configuración #Region "P R O P I E D A D E S" Private Const NumeroDecimales As Integer = 2 Private CveVentaDeduccion As Integer @@ -20,7 +20,7 @@ Partial Class Clientes Public ReadOnly Property RowStyle As TableItemStyle Private ReadOnly Property CveCliente As Integer Get - Return ViewState("CveCliente").ToString.ToEntero + Return ViewState("CveCliente").ToString().ToEntero() End Get End Property Private Property DTCuentasBancos As DataTable @@ -50,7 +50,7 @@ Partial Class Clientes Private Property CveClientePersonalEntrega As Integer Get - Return ViewState("CveClientePersonalEntrega").ToString.ToEntero + Return ViewState("CveClientePersonalEntrega").ToString().ToEntero() End Get Set(value As Integer) ViewState("CveClientePersonalEntrega") = value @@ -59,7 +59,7 @@ Partial Class Clientes Private Property Modalidad As String Get - Return ViewState("Modalidad").ToString + Return ViewState("Modalidad").ToString() End Get Set(value As String) ViewState("Modalidad") = value @@ -68,7 +68,7 @@ Partial Class Clientes Private Property IdCtaCliente As String Get - Return If(IsNothing(ViewState("IdCtaCliente")), "", ViewState("IdCtaCliente").ToString) + Return If(IsNothing(ViewState("IdCtaCliente")), "", ViewState("IdCtaCliente").ToString()) End Get Set(value As String) ViewState("IdCtaCliente") = value @@ -77,7 +77,7 @@ Partial Class Clientes Private Property IdCtaAnticipos As String Get - Return If(IsNothing(ViewState("IdCtaAnticipos")), "", ViewState("IdCtaAnticipos").ToString) + Return If(IsNothing(ViewState("IdCtaAnticipos")), "", ViewState("IdCtaAnticipos").ToString()) End Get Set(value As String) ViewState("IdCtaAnticipos") = value @@ -85,7 +85,7 @@ Partial Class Clientes End Property Private Property IdCtaRetIVA As String Get - Return If(IsNothing(ViewState("IdCtaRetIVA")), "", ViewState("IdCtaRetIVA").ToString) + Return If(IsNothing(ViewState("IdCtaRetIVA")), "", ViewState("IdCtaRetIVA").ToString()) End Get Set(value As String) ViewState("IdCtaRetIVA") = value @@ -93,7 +93,7 @@ Partial Class Clientes End Property Private Property IdCtaFondoGarantia As String Get - Return If(IsNothing(ViewState("IdCtaFondoGarantia")), "", ViewState("IdCtaFondoGarantia").ToString) + Return If(IsNothing(ViewState("IdCtaFondoGarantia")), "", ViewState("IdCtaFondoGarantia").ToString()) End Get Set(value As String) ViewState("IdCtaFondoGarantia") = value @@ -101,7 +101,7 @@ Partial Class Clientes End Property Private Property IdCtaRetISR As String Get - Return If(IsNothing(ViewState("IdCtaRetISR")), "", ViewState("IdCtaRetISR").ToString) + Return If(IsNothing(ViewState("IdCtaRetISR")), "", ViewState("IdCtaRetISR").ToString()) End Get Set(value As String) ViewState("IdCtaRetISR") = value @@ -110,7 +110,7 @@ Partial Class Clientes Private Property CveCuentaBancaria As Integer Get - Return ViewState("CveCuentaBancaria").ToString.ToEntero + Return ViewState("CveCuentaBancaria").ToString().ToEntero() End Get Set(value As Integer) ViewState("CveCuentaBancaria") = value @@ -122,7 +122,7 @@ Partial Class Clientes If ViewState("CveClienteSuc") Is Nothing Then Return -1 Else - Return ViewState("CveClienteSuc").ToString.ToEntero + Return ViewState("CveClienteSuc").ToString().ToEntero() End If End Get Set(value As Integer) @@ -150,7 +150,7 @@ Partial Class Clientes Private Property IdCtaCompCliente As String Get - Return If(IsNothing(ViewState("IdCtaCompCliente")), "", ViewState("IdCtaCompCliente").ToString) + Return If(IsNothing(ViewState("IdCtaCompCliente")), "", ViewState("IdCtaCompCliente").ToString()) End Get Set(value As String) ViewState("IdCtaCompCliente") = value @@ -159,7 +159,7 @@ Partial Class Clientes Private Property ArrayDisp As String Get - Return If(IsNothing(ViewState("ArrayDisp")), "", ViewState("ArrayDisp").ToString) + Return If(IsNothing(ViewState("ArrayDisp")), "", ViewState("ArrayDisp").ToString()) End Get Set(value As String) ViewState("ArrayDisp") = value @@ -167,7 +167,7 @@ Partial Class Clientes End Property Private Property NombreDispositivo As String Get - Return If(IsNothing(ViewState("NombreDispositivo")), "", ViewState("NombreDispositivo").ToString) + Return If(IsNothing(ViewState("NombreDispositivo")), "", ViewState("NombreDispositivo").ToString()) End Get Set(value As String) ViewState("NombreDispositivo") = value @@ -176,7 +176,7 @@ Partial Class Clientes Private Property IdCtaCompAnticipo As String Get - Return If(IsNothing(ViewState("IdCtaCompAnticipo")), "", ViewState("IdCtaCompAnticipo").ToString) + Return If(IsNothing(ViewState("IdCtaCompAnticipo")), "", ViewState("IdCtaCompAnticipo").ToString()) End Get Set(value As String) ViewState("IdCtaCompAnticipo") = value @@ -188,7 +188,7 @@ Partial Class Clientes If ViewState("CveDireccionEnvio") Is Nothing Then Return -1 Else - Return ViewState("CveDireccionEnvio").ToString.ToEntero + Return ViewState("CveDireccionEnvio").ToString().ToEntero() End If End Get Set(value As Integer) @@ -201,7 +201,7 @@ Partial Class Clientes If ViewState("CveCuentaEquipo") Is Nothing Then Return -1 Else - Return ViewState("CveCuentaEquipo").ToString.ToEntero + Return ViewState("CveCuentaEquipo").ToString().ToEntero() End If End Get Set(value As Integer) @@ -212,7 +212,7 @@ Partial Class Clientes Private Property IdCtaMonedaExtranjera As String Get - Return If(IsNothing(ViewState("IdCtaMonedaExtranjera")), "", ViewState("IdCtaMonedaExtranjera").ToString) + Return If(IsNothing(ViewState("IdCtaMonedaExtranjera")), "", ViewState("IdCtaMonedaExtranjera").ToString()) End Get Set(value As String) ViewState("IdCtaMonedaExtranjera") = value @@ -221,7 +221,7 @@ Partial Class Clientes Private Property IdCtaMonedaExtranjeraAnticipos As String Get - Return If(IsNothing(ViewState("IdCtaMonedaExtranjeraAnticipos")), "", ViewState("IdCtaMonedaExtranjeraAnticipos").ToString) + Return If(IsNothing(ViewState("IdCtaMonedaExtranjeraAnticipos")), "", ViewState("IdCtaMonedaExtranjeraAnticipos").ToString()) End Get Set(value As String) ViewState("IdCtaMonedaExtranjeraAnticipos") = value @@ -242,7 +242,7 @@ Partial Class Clientes If ViewState("EstatusAnteriorCliente") Is Nothing Then Return True Else - Return Boolean.Parse(ViewState("EstatusAnteriorCliente").ToString) + Return Boolean.Parse(ViewState("EstatusAnteriorCliente").ToString()) End If End Get Set(value As Boolean) @@ -263,7 +263,7 @@ Partial Class Clientes If ViewState("CveSucursal") Is Nothing Then Return -1 Else - Return ViewState("CveSucursal").ToString.ToEntero + Return ViewState("CveSucursal").ToString().ToEntero() End If End Get Set(value As Integer) @@ -296,7 +296,7 @@ Partial Class Clientes Private Property CobranzaTelefono As String Get - CobranzaTelefono = ViewState("CobranzaTelefono").ToString + CobranzaTelefono = ViewState("CobranzaTelefono").ToString() End Get Set(value As String) ViewState("CobranzaTelefono") = value @@ -304,7 +304,7 @@ Partial Class Clientes End Property Private Property CodigoCliente As String Get - CodigoCliente = ViewState("CodigoCliente").ToString + CodigoCliente = ViewState("CodigoCliente").ToString() End Get Set(value As String) ViewState("CodigoCliente") = value @@ -347,7 +347,7 @@ Partial Class Clientes If ViewState("CveEmpresaCRM") Is Nothing Then Return -1 Else - Return ViewState("CveEmpresaCRM").ToString.ToEntero + Return ViewState("CveEmpresaCRM").ToString().ToEntero() End If End Get Set(value As Integer) @@ -369,7 +369,7 @@ Partial Class Clientes If ViewState("CveEmpresaCRMUnificar") Is Nothing Then Return -1 Else - Return ViewState("CveEmpresaCRMUnificar").ToString.ToEntero + Return ViewState("CveEmpresaCRMUnificar").ToString().ToEntero() End If End Get Set(value As Integer) @@ -455,7 +455,7 @@ Partial Class Clientes ' If ViewState("EstatusAnteriorCliente") Is Nothing Then ' Return True ' Else - ' Return Boolean.Parse(ViewState("EstatusAnteriorCliente").ToString) + ' Return Boolean.Parse(ViewState("EstatusAnteriorCliente").ToString()) ' End If ' End Get ' Set(value As Boolean) @@ -468,7 +468,7 @@ Partial Class Clientes If ViewState("CargoUsado") Is Nothing Then Return True Else - Return Boolean.Parse(ViewState("CargoUsado").ToString) + Return Boolean.Parse(ViewState("CargoUsado").ToString()) End If End Get Set(value As Boolean) @@ -481,7 +481,7 @@ Partial Class Clientes If ViewState("BonificacionUsado") Is Nothing Then Return True Else - Return Boolean.Parse(ViewState("BonificacionUsado").ToString) + Return Boolean.Parse(ViewState("BonificacionUsado").ToString()) End If End Get Set(value As Boolean) @@ -491,15 +491,15 @@ Partial Class Clientes Private Property linkDescargaPagare As String Get - Return If(IsNothing(ViewState("linkDescargaPagare")), "", ViewState("linkDescargaPagare").ToString) + Return If(IsNothing(ViewState("linkDescargaPagare")), "", ViewState("linkDescargaPagare").ToString()) End Get Set(value As String) ViewState("linkDescargaPagare") = value End Set - End Property - + End Property + #End Region - + #Region "Documentacion" Private Property DTDocumentacion As DataTable Get @@ -519,7 +519,7 @@ Partial Class Clientes If ViewState("Documentacion") Is Nothing Then Return "-1" Else - Return ViewState("Documentacion").ToString + Return ViewState("Documentacion").ToString() End If End Get Set(value As String) @@ -567,7 +567,7 @@ Partial Class Clientes If ViewState("FechaLimite") Is Nothing Then Return Date.Now.AddDays(15) Else - Return ViewState("FechaLimite").ToString.ToDate + Return ViewState("FechaLimite").ToString().ToDate() End If End Get Set(value As Date) @@ -592,7 +592,7 @@ Partial Class Clientes If ViewState("ObservacionDocumentacion") Is Nothing Then Return "" Else - Return ViewState("ObservacionDocumentacion").ToString + Return ViewState("ObservacionDocumentacion").ToString() End If End Get Set(value As String) @@ -604,34 +604,34 @@ Partial Class Clientes If ViewState("AdjuntoDocumentacion") Is Nothing Then Return "" Else - Return ViewState("AdjuntoDocumentacion").ToString + Return ViewState("AdjuntoDocumentacion").ToString() End If End Get Set(value As String) ViewState("AdjuntoDocumentacion") = value End Set - End Property - 'Private ReadOnly Property CvePersonal As Integer - ' Get - ' If ViewState("CvePersonal") Is Nothing Then - ' Return -1 - ' Else - ' Return ViewState("CvePersonal").ToString.ToEntero - ' End If - ' End Get - 'End Property - + End Property + 'Private ReadOnly Property CvePersonal As Integer + ' Get + ' If ViewState("CvePersonal") Is Nothing Then + ' Return -1 + ' Else + ' Return ViewState("CvePersonal").ToString().Toentero() + ' End If + ' End Get + 'End Property + #End Region - - - + + + #Region " A C U M U L A D O R E S" Property CveVentaNota As Integer Get If ViewState("CveVentaNota") Is Nothing Then Return 0 Else - Return ViewState("CveVentaNota").ToString.ToEntero + Return ViewState("CveVentaNota").ToString().ToEntero() End If End Get Set(value As Integer) @@ -645,7 +645,7 @@ Partial Class Clientes If ViewState("FolioNotaAcumulador") Is Nothing Then Return 0 Else - Return ViewState("FolioNotaAcumulador").ToString.ToEntero + Return ViewState("FolioNotaAcumulador").ToString().ToEntero() End If End Get Set(value As Integer) @@ -658,16 +658,16 @@ Partial Class Clientes Return "" Else - Return ViewState("SerieNotaAcumulador").ToString + Return ViewState("SerieNotaAcumulador").ToString() End If End Get Set(value As String) ViewState("SerieNotaAcumulador") = value End Set - End Property - + End Property + #End Region - + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then @@ -727,7 +727,7 @@ Partial Class Clientes TabCuentasEquipos.Visible = True End If - If UsuarioActual.Empresa.Funcionalidad(504).ToEntero > 0 Then + If UsuarioActual.Empresa.Funcionalidad(504).ToEntero() > 0 Then If UsuarioActual.TienePermisoProceso(162) Then ChkPermiteCredito.Enabled = True TxtLimiteCreditoSucursal.Enabled = True @@ -746,7 +746,7 @@ Partial Class Clientes DivRetIVA.Visible = False End If - If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero > 0 Then + If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero() > 0 Then 'If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not Request("CveCliente").Contiene("10450", "10460", "10458") Then ' BtnGuardar.Enabled = False : BtnEliminar.Enabled = False : LbAgregarSucursal.Enabled = False : LbEnviarActivacionPortal.Enabled = False ' Exit Sub @@ -767,7 +767,7 @@ Partial Class Clientes HplAddVenta.NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveCliente={0}", CveCliente) HplAddCotizacion.NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveCliente={0}&Op=Cot", CveCliente) 'ImgAddObs.Attributes.Add("onclick", "javascript:PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ") - If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero + If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero() CargaDireccionesEnvio() CargaAFAsignados() @@ -803,7 +803,7 @@ Partial Class Clientes End If If Request("ATI") IsNot Nothing AndAlso IsNumeric(Request("ATI")) Then - Tab.ActiveTabIndex = Request("ATI").ToEntero + Tab.ActiveTabIndex = Request("ATI").ToEntero() End If 'CargaCuentasyConceptos() Else @@ -811,7 +811,7 @@ Partial Class Clientes If UsuarioActual.Empresa.Funcionalidad(525) = "1" Then Dim ObjClientes As New ClsClientes - TxtCodigo.Text = ObjClientes.GetSiguienteCodigoCliente(UsuarioActual.CveEmpresa).ToString + TxtCodigo.Text = ObjClientes.GetSiguienteCodigoCliente(UsuarioActual.CveEmpresa).ToString() ObjClientes.Dispose() End If @@ -851,7 +851,7 @@ Partial Class Clientes UpFiscalContable.Update() End If - If Request("CveEmpresaCRM") IsNot Nothing AndAlso IsNumeric(Request("CveEmpresaCRM")) AndAlso Request("CveEmpresaCRM").ToEntero > 0 Then + If Request("CveEmpresaCRM") IsNot Nothing AndAlso IsNumeric(Request("CveEmpresaCRM")) AndAlso Request("CveEmpresaCRM").ToEntero() > 0 Then ViewState("CveEmpresaCRM") = Request("CveEmpresaCRM") CargaDatosCRM() End If @@ -892,8 +892,8 @@ Partial Class Clientes InicializaDevolverDinero() - TxtFechaICredito.Text = Now.AddYears(-2).ToShortDateString - TxtFechaFCredito.Text = Now.ToShortDateString + TxtFechaICredito.Text = Now.AddYears(-2).ToShortDateString() + TxtFechaFCredito.Text = Now.ToShortDateString() @@ -910,8 +910,8 @@ Partial Class Clientes ChkPermiso5.Enabled = False ChkPermiso6.Enabled = False - End Sub - + End Sub + #Region " PERMISOS PAGINAS " Private Function PermiteGuardar() As Boolean Return UsuarioActual.TienePermisoProceso(192) @@ -936,18 +936,18 @@ Partial Class Clientes TxtCorreoEntregaAlmacen.Enabled = False ChkCargoUsado.Enabled = False ChkBonificacionUsado.Enabled = False - End Sub - - + End Sub + + #End Region - - + + #Region "C A R G A S" - - - - - + + + + + Private Sub CreaDtPago() DtPagos = New DataTable DtPagos.Columns.Add("CveTipoMovimiento", GetType(String)) @@ -1091,11 +1091,11 @@ Partial Class Clientes DdlMonedaExtranjeraClientes.AutoPostBack = True DdlMonedaExtranjeraAnticipos.AutoPostBack = True - If UsuarioActual.Empresa.Funcionalidad(246).ToEntero > 0 Then + If UsuarioActual.Empresa.Funcionalidad(246).ToEntero() > 0 Then DdlCtaContableClientes.Attributes.Add("onclick", "CargaCuentas(1);") End If - If UsuarioActual.Empresa.Funcionalidad(237).ToEntero > 0 Then + If UsuarioActual.Empresa.Funcionalidad(237).ToEntero() > 0 Then DdlCtaContableAnticipos.Attributes.Add("onclick", "CargaCuentas(2);") End If @@ -1103,13 +1103,13 @@ Partial Class Clientes 'DdlCtaContableRetISR.Attributes.Add("onclick", "CargaCuentas(4);") 'DdlCtaContableFondoGarantia.Attributes.Add("onclick", "CargaCuentas(5);") - If UsuarioActual.Empresa.Funcionalidad(248).ToEntero > 0 Then + If UsuarioActual.Empresa.Funcionalidad(248).ToEntero() > 0 Then DdlCtaContableCompClientes.Attributes.Add("onclick", "CargaCuentas(6);") End If DdlCtaContableCompAnticipos.Attributes.Add("onclick", "CargaCuentas(7);") - If UsuarioActual.Empresa.Funcionalidad(247).ToEntero > 0 Then + If UsuarioActual.Empresa.Funcionalidad(247).ToEntero() > 0 Then DdlMonedaExtranjeraClientes.Attributes.Add("onclick", "CargaCuentas(8);") End If DdlMonedaExtranjeraAnticipos.Attributes.Add("onclick", "CargaCuentas(9);") @@ -1129,9 +1129,9 @@ Partial Class Clientes Select Case HdnCuenta.Value Case "1" - CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).ToEntero + CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero() Case "2" - CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).ToEntero + CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero() Case "3" CargaDdlCuentasContables(DdlCtaContableRetIVA, -1) Case "4" @@ -1139,13 +1139,13 @@ Partial Class Clientes Case "5" CargaDdlCuentasContables(DdlCtaContableFondoGarantia, -1) Case "6" - CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).ToEntero + CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero() Case "7" CargaDdlCuentasContables(DdlCtaContableCompAnticipos, -1) Case "8" - CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).ToEntero + CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero() Case "9" - CargaDdlCuentasContables(DdlMonedaExtranjeraAnticipos, 1) 'UsuarioActual.Empresa.Funcionalidad(542).ToEntero + CargaDdlCuentasContables(DdlMonedaExtranjeraAnticipos, 1) 'UsuarioActual.Empresa.Funcionalidad(542).Toentero() End Select UpFiscalContable.Update() @@ -1160,8 +1160,8 @@ Partial Class Clientes ' ' Verifica si la empresas tienen las funcionalidades 246, 247 y 248 ' Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa) - ' If UsuarioActual.Empresa.Funcionalidad(246).ToEntero > 0 Then - ' If ObjContabilidad.GetCuentas(UsuarioActual.Empresa.Funcionalidad(246).ToEntero, "-1", 1) Then + ' If UsuarioActual.Empresa.Funcionalidad(246).Toentero() > 0 Then + ' If ObjContabilidad.GetCuentas(UsuarioActual.Empresa.Funcionalidad(246).Toentero(), "-1", 1) Then ' DdlCtaContableClientes.Items.Clear() ' DdlCtaContableClientes.Items.Add(New ListItem("Seleccione", "0")) ' DdlCtaContableClientes.DataSource = ObjContabilidad.DtResultados @@ -1169,8 +1169,8 @@ Partial Class Clientes ' End If ' End If - ' If UsuarioActual.Empresa.Funcionalidad(247).ToEntero > 0 Then - ' If ObjContabilidad.GetCuentas(UsuarioActual.Empresa.Funcionalidad(247).ToEntero, "-1", 1) Then + ' If UsuarioActual.Empresa.Funcionalidad(247).Toentero() > 0 Then + ' If ObjContabilidad.GetCuentas(UsuarioActual.Empresa.Funcionalidad(247).Toentero(), "-1", 1) Then ' DdlMonedaExtranjeraClientes.Items.Clear() ' DdlMonedaExtranjeraClientes.Items.Add(New ListItem("Seleccione", "0")) ' DdlMonedaExtranjeraClientes.DataSource = ObjContabilidad.DtResultados @@ -1178,8 +1178,8 @@ Partial Class Clientes ' End If ' End If - ' If UsuarioActual.Empresa.Funcionalidad(248).ToEntero > 0 Then - ' If ObjContabilidad.GetCuentas(UsuarioActual.Empresa.Funcionalidad(248).ToEntero, "-1", 1) Then + ' If UsuarioActual.Empresa.Funcionalidad(248).Toentero() > 0 Then + ' If ObjContabilidad.GetCuentas(UsuarioActual.Empresa.Funcionalidad(248).Toentero(), "-1", 1) Then ' DdlCtaContableCompClientes.Items.Clear() ' DdlCtaContableCompClientes.Items.Add(New ListItem("Seleccione", "0")) ' DdlCtaContableCompClientes.DataSource = ObjContabilidad.DtResultados @@ -1277,56 +1277,56 @@ Partial Class Clientes DdlMonedaExtranjeraAnticipos.DataSource = Nothing End If - If UsuarioActual.Empresa.Funcionalidad(211).ToEntero > 0 Then - If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(211).ToEntero) Then + If UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 Then + If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(211).ToEntero()) Then DdlCtaContableClientes.DataSource = ObjContabilidad.DtResultados End If End If - If UsuarioActual.Empresa.Funcionalidad(212).ToEntero > 0 Then - If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(212).ToEntero) Then + If UsuarioActual.Empresa.Funcionalidad(212).ToEntero() > 0 Then + If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(212).ToEntero()) Then DdlCtaContableAnticipos.DataSource = ObjContabilidad.DtResultados End If End If - If UsuarioActual.Empresa.Funcionalidad(213).ToEntero > 0 Then - If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(213).ToEntero) Then + If UsuarioActual.Empresa.Funcionalidad(213).ToEntero() > 0 Then + If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(213).ToEntero()) Then DdlCtaContableRetIVA.DataSource = ObjContabilidad.DtResultados End If End If - If UsuarioActual.Empresa.Funcionalidad(214).ToEntero > 0 Then - If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(214).ToEntero) Then + If UsuarioActual.Empresa.Funcionalidad(214).ToEntero() > 0 Then + If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(214).ToEntero()) Then DdlCtaContableRetISR.DataSource = ObjContabilidad.DtResultados End If End If - If UsuarioActual.Empresa.Funcionalidad(214).ToEntero > 0 Then - If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(214).ToEntero) Then + If UsuarioActual.Empresa.Funcionalidad(214).ToEntero() > 0 Then + If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(214).ToEntero()) Then DdlCtaContableFondoGarantia.DataSource = ObjContabilidad.DtResultados End If End If - If UsuarioActual.Empresa.Funcionalidad(211).ToEntero > 0 Then - If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(214).ToEntero) Then + If UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 Then + If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(214).ToEntero()) Then DdlCtaContableCompClientes.DataSource = ObjContabilidad.DtResultados End If End If - If UsuarioActual.Empresa.Funcionalidad(212).ToEntero > 0 Then - If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(214).ToEntero) Then + If UsuarioActual.Empresa.Funcionalidad(212).ToEntero() > 0 Then + If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(214).ToEntero()) Then DdlCtaContableCompAnticipos.DataSource = ObjContabilidad.DtResultados End If End If - If UsuarioActual.Empresa.Funcionalidad(211).ToEntero > 0 Then - If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(214).ToEntero) Then + If UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 Then + If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(214).ToEntero()) Then DdlMonedaExtranjeraClientes.DataSource = ObjContabilidad.DtResultados End If End If - If UsuarioActual.Empresa.Funcionalidad(212).ToEntero > 0 Then - If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(214).ToEntero) Then + If UsuarioActual.Empresa.Funcionalidad(212).ToEntero() > 0 Then + If ObjContabilidad.GetCuentas(-1, "-1", 1, IdPadre:=UsuarioActual.Empresa.Funcionalidad(214).ToEntero()) Then DdlMonedaExtranjeraAnticipos.DataSource = ObjContabilidad.DtResultados End If End If @@ -1458,7 +1458,7 @@ Partial Class Clientes 'TxtPais.Text = ObjClientes.Pais TxtRFC.Text = ObjClientes.RFC - TxtCP.Text = ObjClientes.CP.ToString + TxtCP.Text = ObjClientes.CP.ToString() TxtTelefono.Text = ObjClientes.Telefono TxtContacto.Text = ObjClientes.Contacto TxtEmail.Text = ObjClientes.Mail @@ -1466,40 +1466,40 @@ Partial Class Clientes TxtNotificar.Text = ObjClientes.NotificarA TxtPagina.Text = ObjClientes.Pagina 'TxtGiro.Text = ObjClientes.Giro - DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString + DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString() TxtCC.Text = ObjClientes.NotificarA ChkMail.Checked = ObjClientes.EnviarFactura - DdlTipoRetencion.SelectedValueExist(ObjClientes.DtResultados(0)("CveTipoRetencion").ToString) + DdlTipoRetencion.SelectedValueExist(ObjClientes.DtResultados(0)("CveTipoRetencion").ToString()) DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty) - TxtRetIVA.Text = ObjClientes.RetIVA.ToString - TxtRetISR.Text = ObjClientes.RetISR.ToString + TxtRetIVA.Text = ObjClientes.RetIVA.ToString() + TxtRetISR.Text = ObjClientes.RetISR.ToString() ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes - DdlSubProyecto.SelectedValue = ObjClientes.CveSubProyecto.ToString - DdlZonaHoraria.SelectedValueExist(ObjClientes.DtResultados(0)("CveZonaHoraria").ToString) + DdlSubProyecto.SelectedValue = ObjClientes.CveSubProyecto.ToString() + DdlZonaHoraria.SelectedValueExist(ObjClientes.DtResultados(0)("CveZonaHoraria").ToString()) ChkEstado.Checked = ObjClientes.Estatus EstatusAnteriorCliente = ObjClientes.Estatus - LblFechaCaptura.Text = ObjClientes.FechaIng.ToShortDateString + LblFechaCaptura.Text = ObjClientes.FechaIng.ToShortDateString() LblUsuarioCapturo.Text = ObjClientes.Usuario TxtNombreCorto.Text = ObjClientes.NombreCorto - DdlVendedor.SelectedValueExist(ObjClientes.Vendedor.ToString) + DdlVendedor.SelectedValueExist(ObjClientes.Vendedor.ToString()) 'TxtVendedor.Text = ObjClientes.Vendedor - TxtPlazoCobranza.Text = ObjClientes.PlazoCobranza.ToString - TxtPlazoCobranzaRemision.Text = ObjClientes.PlazoCobranzaRemision.ToString + TxtPlazoCobranza.Text = ObjClientes.PlazoCobranza.ToString() + TxtPlazoCobranzaRemision.Text = ObjClientes.PlazoCobranzaRemision.ToString() ' TxtSucursalCliente.Text = ObjClientes.Sucursal 'TxtRecepcionPago.Text = ObjClientes.RecepcionPagos DdlTipoPago.SelectedValueExist(ObjClientes.TipoPago) 'TxtCuentaContable.Text = ObjClientes.CuentaContable TxtExtension.Text = ObjClientes.TelefonoExtension TxtTelefonoOtro.Text = ObjClientes.TelefonoOtros - IdCtaCliente = ObjClientes.IdCtaContClientes.ToString - IdCtaAnticipos = ObjClientes.IdCtaContAnticipos.ToString - IdCtaRetIVA = ObjClientes.IdCtaContRetIVA.ToString - IdCtaRetISR = ObjClientes.IdCtaContRetISR.ToString - IdCtaFondoGarantia = ObjClientes.IdCtaContFondoGarantia.ToString - 'DdlMetodoPago.SelectedValue = ObjClientes.CveMetodoPago.ToString + IdCtaCliente = ObjClientes.IdCtaContClientes.ToString() + IdCtaAnticipos = ObjClientes.IdCtaContAnticipos.ToString() + IdCtaRetIVA = ObjClientes.IdCtaContRetIVA.ToString() + IdCtaRetISR = ObjClientes.IdCtaContRetISR.ToString() + IdCtaFondoGarantia = ObjClientes.IdCtaContFondoGarantia.ToString() + 'DdlMetodoPago.SelectedValue = ObjClientes.CveMetodoPago.ToString() TxtFormaFacturacion.Text = ObjClientes.FormaFacturacion ChkPermiteCredito.Checked = ObjClientes.PermiteCredito - TxtLimiteCredito.Text = ObjClientes.LimiteCredito.FormatoNumero + TxtLimiteCredito.Text = ObjClientes.LimiteCredito.FormatoNumero() ChkAplicaFEMSA.Checked = ObjClientes.AplicaFEMSA TxtFEMSA_NumSociedad.Text = ObjClientes.FEMSA_NumSociedad TxtFEMSA_NumProveedor.Text = ObjClientes.FEMSA_NumProveedor @@ -1517,7 +1517,7 @@ Partial Class Clientes TxtCobranzaContacto.Text = ObjClientes.CobranzaContacto TxtCobranzaTelefono.Text = ObjClientes.CobranzaTelefono ChkRequiereOC.Checked = ObjClientes.RequiereOC - ChkEsDistribuidor.Checked = Boolean.Parse(ObjClientes.DtResultados(0)("EsDistribuidor").ToString) + ChkEsDistribuidor.Checked = Boolean.Parse(ObjClientes.DtResultados(0)("EsDistribuidor").ToString()) CobranzaTelefono = ObjClientes.CobranzaTelefono If CobranzaTelefono.Length = 10 Then BtnCobranzaSMS.ToolTip = $"El mensaje SMS será enviado al número celular {CobranzaTelefono}
con #referencia ""{If(UsuarioActual.CveEmpresa = 4, TxtNombreCorto.Text, CodigoCliente)}""" @@ -1532,21 +1532,21 @@ Partial Class Clientes TxtUsuarioPortalFacturacion.Text = ObjClientes.UsuarioPortal TxtContraseñaPortalFacturacion.Text = ObjClientes.ContraseñaPortal - IdCtaCompCliente = ObjClientes.IdCtaContComplementaria.ToString - IdCtaCompAnticipo = ObjClientes.IdCtaContCompAnticipos.ToString + IdCtaCompCliente = ObjClientes.IdCtaContComplementaria.ToString() + IdCtaCompAnticipo = ObjClientes.IdCtaContCompAnticipos.ToString() - IdCtaMonedaExtranjera = ObjClientes.IdCtaMonedaExtranjera.ToString - IdCtaMonedaExtranjeraAnticipos = ObjClientes.IdCtaMonedaExtranjeraAnticipos.ToString + IdCtaMonedaExtranjera = ObjClientes.IdCtaMonedaExtranjera.ToString() + IdCtaMonedaExtranjeraAnticipos = ObjClientes.IdCtaMonedaExtranjeraAnticipos.ToString() ChkMuestraNombre.Checked = ObjClientes.ImprimeNombreSucursal - DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString) - DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago33.ToString) - DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString) + DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString()) + DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago33.ToString()) + DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString()) ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS - DdlCorporativo.SelectedValueExist(ObjClientes.CveClienteCorporativo.ToString) + DdlCorporativo.SelectedValueExist(ObjClientes.CveClienteCorporativo.ToString()) ChkCargoUsado.Checked = ObjClientes.CargoUsados ChkBonificacionUsado.Checked = ObjClientes.BonificacionUsado 'COMERCIO EXTERIOR @@ -1571,16 +1571,16 @@ Partial Class Clientes End If End If - HDLT.Value = If(ObjClientes.DtResultados(0)("LT").ToString = "", "0", ObjClientes.DtResultados(0)("LT").ToString) - HDLG.Value = If(ObjClientes.DtResultados(0)("LG").ToString = "", "0", ObjClientes.DtResultados(0)("LG").ToString) + HDLT.Value = If(ObjClientes.DtResultados(0)("LT").ToString() = "", "0", ObjClientes.DtResultados(0)("LT").ToString()) + HDLG.Value = If(ObjClientes.DtResultados(0)("LG").ToString() = "", "0", ObjClientes.DtResultados(0)("LG").ToString()) DdlPais.SelectedValueExist(ObjClientes.CvePais) CargaEstado() - CargaEstados(ObjClientes.DtResultados(0)("SATPais").ToString) + CargaEstados(ObjClientes.DtResultados(0)("SATPais").ToString()) - DdlSATPais.SelectedValueExist(ObjClientes.DtResultados(0)("SATPais").ToString) + DdlSATPais.SelectedValueExist(ObjClientes.DtResultados(0)("SATPais").ToString()) DdlEstadoSAT.SelectedValueExist(ObjClientes.CveSATEstado) @@ -1669,21 +1669,21 @@ Partial Class Clientes TxtExtOtro.Text = ObjClientes.ExtOtros - If ObjClientes.IdCtaContClientes > 0 Then DdlCtaContableClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContClientes), ObjClientes.IdCtaContClientes.ToString)) : DdlCtaContableClientes.SelectedValue = ObjClientes.IdCtaContClientes.ToString + If ObjClientes.IdCtaContClientes > 0 Then DdlCtaContableClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContClientes), ObjClientes.IdCtaContClientes.ToString())) : DdlCtaContableClientes.SelectedValue = ObjClientes.IdCtaContClientes.ToString() If ObjClientes.IdCtaContAnticipos > 0 Then - DdlCtaContableAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContAnticipos), ObjClientes.IdCtaContAnticipos.ToString)) - DdlCtaContableAnticipos.SelectedValue = ObjClientes.IdCtaContAnticipos.ToString + DdlCtaContableAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContAnticipos), ObjClientes.IdCtaContAnticipos.ToString())) + DdlCtaContableAnticipos.SelectedValue = ObjClientes.IdCtaContAnticipos.ToString() End If - If ObjClientes.IdCtaContRetISR > 0 Then DdlCtaContableRetISR.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContRetISR), ObjClientes.IdCtaContRetISR.ToString)) : DdlCtaContableRetISR.SelectedValue = ObjClientes.IdCtaContRetISR.ToString - If ObjClientes.IdCtaContRetIVA > 0 Then DdlCtaContableRetIVA.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContRetIVA), ObjClientes.IdCtaContRetIVA.ToString)) : DdlCtaContableRetIVA.SelectedValue = ObjClientes.IdCtaContRetIVA.ToString - If ObjClientes.IdCtaContFondoGarantia > 0 Then DdlCtaContableFondoGarantia.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContFondoGarantia), ObjClientes.IdCtaContFondoGarantia.ToString)) : DdlCtaContableFondoGarantia.SelectedValue = ObjClientes.IdCtaContFondoGarantia.ToString + If ObjClientes.IdCtaContRetISR > 0 Then DdlCtaContableRetISR.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContRetISR), ObjClientes.IdCtaContRetISR.ToString())) : DdlCtaContableRetISR.SelectedValue = ObjClientes.IdCtaContRetISR.ToString() + If ObjClientes.IdCtaContRetIVA > 0 Then DdlCtaContableRetIVA.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContRetIVA), ObjClientes.IdCtaContRetIVA.ToString())) : DdlCtaContableRetIVA.SelectedValue = ObjClientes.IdCtaContRetIVA.ToString() + If ObjClientes.IdCtaContFondoGarantia > 0 Then DdlCtaContableFondoGarantia.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContFondoGarantia), ObjClientes.IdCtaContFondoGarantia.ToString())) : DdlCtaContableFondoGarantia.SelectedValue = ObjClientes.IdCtaContFondoGarantia.ToString() - If ObjClientes.IdCtaContComplementaria > 0 Then DdlCtaContableCompClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContComplementaria), ObjClientes.IdCtaContComplementaria.ToString)) : DdlCtaContableCompClientes.SelectedValue = ObjClientes.IdCtaContComplementaria.ToString - If ObjClientes.IdCtaContCompAnticipos > 0 Then DdlCtaContableCompAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContCompAnticipos), ObjClientes.IdCtaContCompAnticipos.ToString)) : DdlCtaContableCompAnticipos.SelectedValue = ObjClientes.IdCtaContCompAnticipos.ToString + If ObjClientes.IdCtaContComplementaria > 0 Then DdlCtaContableCompClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContComplementaria), ObjClientes.IdCtaContComplementaria.ToString())) : DdlCtaContableCompClientes.SelectedValue = ObjClientes.IdCtaContComplementaria.ToString() + If ObjClientes.IdCtaContCompAnticipos > 0 Then DdlCtaContableCompAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaContCompAnticipos), ObjClientes.IdCtaContCompAnticipos.ToString())) : DdlCtaContableCompAnticipos.SelectedValue = ObjClientes.IdCtaContCompAnticipos.ToString() - If ObjClientes.IdCtaMonedaExtranjera > 0 Then DdlMonedaExtranjeraClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaMonedaExtranjera), ObjClientes.IdCtaMonedaExtranjera.ToString)) : DdlMonedaExtranjeraClientes.SelectedValue = ObjClientes.IdCtaMonedaExtranjera.ToString - If ObjClientes.IdCtaMonedaExtranjeraAnticipos > 0 Then DdlMonedaExtranjeraAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaMonedaExtranjeraAnticipos), ObjClientes.IdCtaMonedaExtranjeraAnticipos.ToString)) : DdlMonedaExtranjeraAnticipos.SelectedValue = ObjClientes.IdCtaMonedaExtranjeraAnticipos.ToString + If ObjClientes.IdCtaMonedaExtranjera > 0 Then DdlMonedaExtranjeraClientes.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaMonedaExtranjera), ObjClientes.IdCtaMonedaExtranjera.ToString())) : DdlMonedaExtranjeraClientes.SelectedValue = ObjClientes.IdCtaMonedaExtranjera.ToString() + If ObjClientes.IdCtaMonedaExtranjeraAnticipos > 0 Then DdlMonedaExtranjeraAnticipos.Items.Add(New ListItem(NombreCuenta(ObjClientes.IdCtaMonedaExtranjeraAnticipos), ObjClientes.IdCtaMonedaExtranjeraAnticipos.ToString())) : DdlMonedaExtranjeraAnticipos.SelectedValue = ObjClientes.IdCtaMonedaExtranjeraAnticipos.ToString() ActivarRegistroAutomatico() '7eleven @@ -1746,7 +1746,7 @@ Partial Class Clientes TabOtros.Visible = False TabRH.Visible = False TabCuentasEquipos.Visible = False - TabSistema.Visible = False + TabSistema.Enabled = False DivPortletSucursales.Visible = False DivPortletDireccionEnvio.Visible = False @@ -1757,8 +1757,8 @@ Partial Class Clientes DivProtletRegistrar.Visible = True End If - TxtCorreoEntregaCompras.Text = ObjClientes.DtResultados(0)("CorreoEntregaCompras").ToString - TxtCorreoEntregaAlmacen.Text = ObjClientes.DtResultados(0)("CorreoEntregaAlmacen").ToString + TxtCorreoEntregaCompras.Text = ObjClientes.DtResultados(0)("CorreoEntregaCompras").ToString() + TxtCorreoEntregaAlmacen.Text = ObjClientes.DtResultados(0)("CorreoEntregaAlmacen").ToString() CargarClientePersonalEntrega() Else @@ -1792,20 +1792,20 @@ Partial Class Clientes watch.Stop() - 'Alert(watch.ElapsedMilliseconds.ToString) + 'Alert(watch.ElapsedMilliseconds.ToString()) Return Retorno End Function Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1) Dim ObjClientes As New ClsClientes() - If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then + If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then If ObjClientes.DtResultados.Rows.Count > 0 Then 'Carga Generales - LtlCantidad.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString.FormatoNumero(0) - LtlTotalVendido.Text = ObjClientes.DtResultados.Rows(0)("Total").ToString.FormatoNumero(2) - LtlMinima.Text = ObjClientes.DtResultados.Rows(0)("MIN_Total").ToString.FormatoNumero(2) - LtlPromedio.Text = ObjClientes.DtResultados.Rows(0)("AVG_Total").ToString.FormatoNumero(2) - LtlMaxima.Text = ObjClientes.DtResultados.Rows(0)("MAX_Total").ToString.FormatoNumero(2) + LtlCantidad.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString().FormatoNumero()(0) + LtlTotalVendido.Text = ObjClientes.DtResultados.Rows(0)("Total").ToString().FormatoNumero()(2) + LtlMinima.Text = ObjClientes.DtResultados.Rows(0)("MIN_Total").ToString().FormatoNumero()(2) + LtlPromedio.Text = ObjClientes.DtResultados.Rows(0)("AVG_Total").ToString().FormatoNumero()(2) + LtlMaxima.Text = ObjClientes.DtResultados.Rows(0)("MAX_Total").ToString().FormatoNumero()(2) 'Carga Grid DTHistorialVentas = ObjClientes.DtResultados GVHistorial.DataSource = ObjClientes.DtResultados @@ -1823,7 +1823,7 @@ Partial Class Clientes Dim ObjMovtos As New ClsMovimientos() 'Dim ObjClientesVentas As New ClsMovimientos 'CxC Clientes - If ObjMovtos.GetCxCClienteDetalle(CveCliente, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero) Then + If ObjMovtos.GetCxCClienteDetalle(CveCliente, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero()) Then DtCxCActivas = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda, OrdenVencimiento, FechaVencimiento") GvCxC.DataSource = DtCxCActivas 'solo tomo los 10 ultimos mas el totalizador general @@ -1849,7 +1849,7 @@ Partial Class Clientes End Function Private Sub CargaAnticipos(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1) Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then + If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then DtClientesAnticipo = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0 ") GVAnticipos.DataSource = DtClientesAnticipo DtAnticipoHistorial = ObjMovtos.DtResultados.FiltraParametros("Saldo <= 0 ") @@ -1904,9 +1904,9 @@ Partial Class Clientes Dim dr As DataRow = dtUsr.FiltroPrimero("Nombre = 'Admin'") If dr IsNot Nothing Then - HdnCveUsuarioPortalAdmin.Value = dr("CveUsuario").ToString + HdnCveUsuarioPortalAdmin.Value = dr("CveUsuario").ToString() - If Convert.ToBoolean(dr("Estatus").ToString) Then + If Convert.ToBoolean(dr("Estatus").ToString()) Then LblUsuarioActivo.Text = "Si" 'divUsuariosPortal.Visible = True HdnCveUsuarioPortalActivado.Value = "1" @@ -1917,7 +1917,7 @@ Partial Class Clientes End If - If HdnCveUsuarioPortalActivado.Value.ToEntero > 0 Then + If HdnCveUsuarioPortalActivado.Value.ToEntero() > 0 Then trEnviarActivacion.Visible = False End If @@ -1994,11 +1994,11 @@ Partial Class Clientes DdlSucursalUsoCFDI.Items.Clear() DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica) DdlSucursalUsoCFDI.DataBind() - End Sub + End Sub #End Region - + #Region "V E R M Á S" - + Protected Sub BtnVerMasVentas_Click(sender As Object, e As EventArgs) If BtnVerMasVentas.Text = "Ver Más" Then CargaHistorial(-1) @@ -2028,16 +2028,16 @@ Partial Class Clientes CargaBancos(51) BtnVerMasBancos.Text = "Ver Más" End If - End Sub - + End Sub + #End Region - + #Region "B A N C O S" - 'CuentasxCobrar Activas (Pagos Recibidos) + 'CuentasxCobrar Activas (Pagos Recibidos) Private Sub CargaBancos(Optional SelectTop As Integer = 51, Optional CveClienteSucursal As Integer = -1) Dim ObjMovtos As New ClsMovimientos() 'CxC Activas - If ObjMovtos.GetClienteAbonos(CveCliente, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero, SelectTop:=SelectTop) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then + If ObjMovtos.GetClienteAbonos(CveCliente, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero(), SelectTop:=SelectTop) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then GvBancos.DataSource = ObjMovtos.DtResultados DTCobrosRealizados = ObjMovtos.DtResultados DTCobrosRealizados.Rows.Remove(DTCobrosRealizados.Rows(0)) @@ -2057,18 +2057,18 @@ Partial Class Clientes Dim ObjBancos As New ClsBancos e.Row.Cells(0).Text = String.Format("{0} - {1}", e.Row.DBCampo("Banco"), e.Row.DBCampo("NumCuenta")) - e.Row.FCLiteral("LtlFechaVenci").Text = e.Row.DBCampo("FechaDocumento").ToDate.ToShortDateString + e.Row.FCLiteral("LtlFechaVenci").Text = e.Row.DBCampo("FechaDocumento").ToDate().ToShortDateString() e.Row.FCHyperLink("HplCheque").Visible = True - e.Row.FCLiteral("LtlImp").Text = e.Row.DBCampo("ImporteIE").FormatoNumero + e.Row.FCLiteral("LtlImp").Text = e.Row.DBCampo("ImporteIE").FormatoNumero() e.Row.FCLiteral("LtlMon").Text = e.Row.DBCampo("MonedaIE") 'HLSendMail.HRef = String.Format("javascript:$get('HdnCveIE').value='{0}';$get('HdnSerieFolio').value='{1}';$get('HdnFolioPago').value='{2}';$get('TxtParaMail').value='{3}';$('#ModalDivMail').modal();", e.Row.DBCampo("CveIE"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("FolioCobro"), TxtCobranzaCorreo.Text) - If ObjBancos.GetComplementoPagos(-1, e.Row.DBCampo("CveIE").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then + If ObjBancos.GetComplementoPagos(-1, e.Row.DBCampo("CveIE").ToString().ToEntero(), -1, UsuarioActual.CveEmpresa) Then If ObjBancos.DtResultados.Rows.Count > 0 Then - e.Row.FCHyperLink("HplXML").Visible = True : e.Row.FCHyperLink("HplXML").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=xml&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", ObjBancos.DtResultados(0)("CveComplementoPago").ToString, ObjBancos.DtResultados(0)("SerieFolio").ToString, ObjBancos.DtResultados(0)("CveIE").ToString))) - e.Row.FCHyperLink("HplPDF").Visible = True : e.Row.FCHyperLink("HplPDF").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=pdf&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", ObjBancos.DtResultados(0)("CveComplementoPago").ToString, ObjBancos.DtResultados(0)("SerieFolio").ToString, ObjBancos.DtResultados(0)("CveIE").ToString))) + e.Row.FCHyperLink("HplXML").Visible = True : e.Row.FCHyperLink("HplXML").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=xml&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", ObjBancos.DtResultados(0)("CveComplementoPago").ToString(), ObjBancos.DtResultados(0)("SerieFolio").ToString(), ObjBancos.DtResultados(0)("CveIE").ToString()))) + e.Row.FCHyperLink("HplPDF").Visible = True : e.Row.FCHyperLink("HplPDF").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=pdf&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", ObjBancos.DtResultados(0)("CveComplementoPago").ToString(), ObjBancos.DtResultados(0)("SerieFolio").ToString(), ObjBancos.DtResultados(0)("CveIE").ToString()))) e.Row.FCLinkButton("LnkSendMail").Visible = True End If @@ -2088,13 +2088,13 @@ Partial Class Clientes Protected Sub LnkSendMail_Click(sender As Object, e As EventArgs) Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) - HdnSerieFolioPago.Value = gvRow.DataKey("SerieFolioCP").ToString + HdnSerieFolioPago.Value = gvRow.DataKey("SerieFolioCP").ToString() TxtParaMail.Text = TxtCobranzaCorreo.Text UpSendMail.Update() RegistraScript("$('#ModalDivMail').modal('show');") - End Sub + End Sub #End Region - + #Region "B T N ´ S" Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click Dim ObjClientes As New ClsClientes() @@ -2115,19 +2115,19 @@ Partial Class Clientes Dim Asunto As String = "" Dim TipoComprobante = "" - If HdnTipoDocto.Value.ToString = "Ing" Then TipoComprobante = "Factura" - If HdnTipoDocto.Value.ToString = "Egs" Then TipoComprobante = "Nota de Crédito" - If HdnTipoDocto.Value.ToString = "Dev" Then TipoComprobante = "Nota de Devolución" - If HdnTipoDocto.Value.ToString = "Rem" Then TipoComprobante = "Remisión" - If HdnTipoDocto.Value.ToString = "Cot" Then TipoComprobante = "Cotización" - If HdnTipoDocto.Value.ToString = "Ant" Then TipoComprobante = "Anticipo" + If HdnTipoDocto.Value.ToString() = "Ing" Then TipoComprobante = "Factura" + If HdnTipoDocto.Value.ToString() = "Egs" Then TipoComprobante = "Nota de Crédito" + If HdnTipoDocto.Value.ToString() = "Dev" Then TipoComprobante = "Nota de Devolución" + If HdnTipoDocto.Value.ToString() = "Rem" Then TipoComprobante = "Remisión" + If HdnTipoDocto.Value.ToString() = "Cot" Then TipoComprobante = "Cotización" + If HdnTipoDocto.Value.ToString() = "Ant" Then TipoComprobante = "Anticipo" Dim DisplayName As String = "" If UsuarioActual.CveEmpresa = 119 Then DisplayName = "Facturación Agroquímicos JAM" Dim ObjVenta As New ClsVentas Dim Dr As DataRow = Nothing - If ObjVenta.GetVenta(HdnCveVenta.Value.ToEntero, UsuarioActual.CveEmpresa) Then + If ObjVenta.GetVenta(HdnCveVenta.Value.ToEntero(), UsuarioActual.CveEmpresa) Then If ObjVenta.DtResultados.Rows.Count > 0 Then Dr = ObjVenta.DtResultados.Rows(0) End If @@ -2139,11 +2139,11 @@ Partial Class Clientes Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) - Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio.Value.ToString) + Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio.Value.ToString()) If Dr IsNot Nothing Then - Cuerpo = Cuerpo.Replace("{""Fecha""}", Dr("Fecha").ToString.ToDate.ToShortDateString) - Cuerpo = Cuerpo.Replace("{""Total""}", Dr("Total").ToString.FormatoNumero) - Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", Dr("FechaVencimiento").ToString.ToDate.ToShortDateString) + Cuerpo = Cuerpo.Replace("{""Fecha""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) + Cuerpo = Cuerpo.Replace("{""Total""}", Dr("Total").ToString().FormatoNumero()) + Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", Dr("FechaVencimiento").ToString().ToDate().ToShortDateString()) End If End If @@ -2151,8 +2151,8 @@ Partial Class Clientes If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) - Asunto = Asunto.Replace("{""Sucursal""}", HdnSubProyecto.Value.ToString) - Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio.Value.ToString) + Asunto = Asunto.Replace("{""Sucursal""}", HdnSubProyecto.Value.ToString()) + Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio.Value.ToString()) End If If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso HdnTipoDocto.Value.Contiene("Ing", "Egs", "Ant", "Dev") Then @@ -2181,7 +2181,7 @@ Partial Class Clientes End If Dim ObjVentas As New ClsVentas - ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta.Value.ToEntero) + ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta.Value.ToEntero()) ObjVentas.Dispose() Else Alert("No se pudo adjuntar el correo electrónico.", TipoMensaje.MsgError) @@ -2209,7 +2209,7 @@ Partial Class Clientes End If Dim ObjVentas As New ClsVentas - ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta.Value.ToEntero) + ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta.Value.ToEntero()) ObjVentas.Dispose() Else Alert("No se pudo adjuntar el correo electrónico.", TipoMensaje.MsgError) @@ -2236,7 +2236,7 @@ Partial Class Clientes End If Dim ObjVentas As New ClsVentas - ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta.Value.ToEntero) + ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta.Value.ToEntero()) ObjVentas.Dispose() Else Alert("No se pudo adjuntar el correo electrónico.", TipoMensaje.MsgError) @@ -2275,7 +2275,7 @@ Partial Class Clientes Catch ex As Exception OnError("Ocurrió error al mandar MAIL", ex) Dim ObjVentas As New ClsVentas - ObjVentas.UpdateVentaMail(3, HdnCveVenta.Value.ToEntero) + ObjVentas.UpdateVentaMail(3, HdnCveVenta.Value.ToEntero()) ObjVentas.Dispose() End Try End Sub @@ -2283,7 +2283,7 @@ Partial Class Clientes Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.AddMovimiento(2, "Cli", CveCliente.ToString, HdnCveVentaAbono.Value, 1, 0, TxtCantidad.Text.Trim.ToDouble, Now, TxtFechaPago.Text.ToDate, TxtReferencia.Text.Trim, DdlCtaContableClientes.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If ObjMovtos.AddMovimiento(2, "Cli", CveCliente.ToString(), HdnCveVentaAbono.Value, 1, 0, TxtCantidad.Text.Trim.ToDouble, Now, TxtFechaPago.Text.ToDate(), TxtReferencia.Text.Trim, DdlCtaContableClientes.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then Alert("El abono se guardó correctamente", TipoMensaje.MsgInformacion, "$get(""DivAddPago"").style.display=""none"";") CargaCxC() TxtCantidad.Text = "" @@ -2297,12 +2297,12 @@ Partial Class Clientes End Sub Private Function AsignaCuentasAutomaticas(ObjClientes As ClsClientes) As Boolean - Dim IdCtaContableClientes As Integer = UsuarioActual.Empresa.Funcionalidad(246).ToEntero - Dim IdCtaContableAnticipos As Integer = UsuarioActual.Empresa.Funcionalidad(319).ToEntero - Dim IdCtaContableComplementaria As Integer = UsuarioActual.Empresa.Funcionalidad(320).ToEntero - Dim IdCtaContMonedaExtranjera As Integer = UsuarioActual.Empresa.Funcionalidad(331).ToEntero - Dim IdCtaContMonedaExtranjeraAnticipos As Integer = UsuarioActual.Empresa.Funcionalidad(332).ToEntero - Dim IdCtaContCompAnticipos As Integer = UsuarioActual.Empresa.Funcionalidad(333).ToEntero + Dim IdCtaContableClientes As Integer = UsuarioActual.Empresa.Funcionalidad(246).ToEntero() + Dim IdCtaContableAnticipos As Integer = UsuarioActual.Empresa.Funcionalidad(319).ToEntero() + Dim IdCtaContableComplementaria As Integer = UsuarioActual.Empresa.Funcionalidad(320).ToEntero() + Dim IdCtaContMonedaExtranjera As Integer = UsuarioActual.Empresa.Funcionalidad(331).ToEntero() + Dim IdCtaContMonedaExtranjeraAnticipos As Integer = UsuarioActual.Empresa.Funcionalidad(332).ToEntero() + Dim IdCtaContCompAnticipos As Integer = UsuarioActual.Empresa.Funcionalidad(333).ToEntero() If Not ObjClientes.VincularCuentasContables(IdCtaContableClientes, IdCtaContableAnticipos, 0, 0, CveCliente, IdCtaContableComplementaria, IdCtaContMonedaExtranjera, IdCtaContMonedaExtranjeraAnticipos, IdCtaContCompAnticipos) Then Return False @@ -2317,43 +2317,43 @@ Partial Class Clientes End If If ChkAplicaComercioExterior.Checked Then - If Not DdlTipoOperacion.SelectedValue.ToEntero > 0 Then + If Not DdlTipoOperacion.SelectedValue.ToEntero() > 0 Then Alert("Tiene que seleccionar un tipo de operacion para comercio exterior.", TipoMensaje.MsgAdvertencia) Exit Sub End If - If Not DdlClavePedimento.SelectedValue.ToEntero > 0 Then + If Not DdlClavePedimento.SelectedValue.ToEntero() > 0 Then Alert("Tiene que seleccionar una clave de pedimento para comercio exterior.", TipoMensaje.MsgAdvertencia) Exit Sub End If - If Not DdlIncoterm.SelectedValue.ToEntero > 0 Then + If Not DdlIncoterm.SelectedValue.ToEntero() > 0 Then Alert("Tiene que seleccionar un incoterm para comercio exterior.", TipoMensaje.MsgAdvertencia) Exit Sub End If - If Not DdlPais.SelectedValue.ToEntero > 0 Then + If Not DdlPais.SelectedValue.ToEntero() > 0 Then Alert("Tiene que seleccionar un pais para comercio exterior.", TipoMensaje.MsgAdvertencia) Exit Sub End If - If Not DdlPais.SelectedValue.ToEntero > 0 Then + If Not DdlPais.SelectedValue.ToEntero() > 0 Then Alert("Tiene que seleccionar un pais para comercio exterior.", TipoMensaje.MsgAdvertencia) Exit Sub End If - If (Not DdlEstado.SelectedValue.ToEntero > 0 And DdlEstado.Visible) Or (Not DdlEstado.Visible And TxtComExtEstado.Text = "") Then + If (Not DdlEstado.SelectedValue.ToEntero() > 0 And DdlEstado.Visible) Or (Not DdlEstado.Visible And TxtComExtEstado.Text = "") Then Alert("Tiene que seleccionar un estado para comercio exterior.", TipoMensaje.MsgAdvertencia) Exit Sub End If - If DdlPais.SelectedValue.ToEntero = 151 Then - If Not DdlMunicipio.SelectedValue.ToEntero > 0 Then + If DdlPais.SelectedValue.ToEntero() = 151 Then + If Not DdlMunicipio.SelectedValue.ToEntero() > 0 Then Alert("Tiene que seleccionar un municipio para comercio exterior si el pais es mexico.", TipoMensaje.MsgAdvertencia) Exit Sub End If - If Not DdlColonia.SelectedValue.ToEntero > 0 Then + If Not DdlColonia.SelectedValue.ToEntero() > 0 Then Alert("Tiene que seleccionar una colonia para comercio exterior si el pais es mexico.", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -2368,7 +2368,7 @@ Partial Class Clientes 'End If 'Dim rowcodigo As DataTable = GlobalDTCliente.FiltraParametros(String.Format("Codigo='{0}' AND CveEmpresa={1} ", TxtCodigo.Text.Trim, UsuarioActual.CveEmpresa)) - 'If (Not IsNothing(rowcodigo)) AndAlso (rowcodigo.Rows.Count > 0) AndAlso (rowcodigo.Rows(0)("CveCliente").ToString.ToEntero <> CveCliente) Then + 'If (Not IsNothing(rowcodigo)) AndAlso (rowcodigo.Rows.Count > 0) AndAlso (rowcodigo.Rows(0)("CveCliente").ToString().Toentero() <> CveCliente) Then ' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia) ' Exit Sub 'End If @@ -2386,7 +2386,7 @@ Partial Class Clientes If ChkJueves.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-") If ChkViernes.Checked Then SBDiasPago.AppendFormat("1-") Else SBDiasPago.AppendFormat("0-") If ChkSabado.Checked Then SBDiasPago.AppendFormat("1") Else SBDiasPago.AppendFormat("0") - DiasPago = SBDiasPago.ToString + DiasPago = SBDiasPago.ToString() 'Dias de Revision Dim SBDiasRevision As New StringBuilder() @@ -2397,96 +2397,96 @@ Partial Class Clientes If ChkRevJueves.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-") If ChkRevViernes.Checked Then SBDiasRevision.AppendFormat("1-") Else SBDiasRevision.AppendFormat("0-") If ChkRevSabado.Checked Then SBDiasRevision.AppendFormat("1") Else SBDiasRevision.AppendFormat("0") - DiasRevision = SBDiasRevision.ToString + DiasRevision = SBDiasRevision.ToString() Dim errorContPaq As Boolean = False Dim IdContPaqi As Integer = 0 - Dim CodigoPersona As Integer = 0 - - + Dim CodigoPersona As Integer = 0 + + #Region "comentado" - 'If UsuarioActual.Empresa.Funcionalidad(522).ToString = "1" Then - - ' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa) - - ' If ObjContPaqi.GetPersona(TxtRFC.Text) Then - - ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then - - ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString.ToEntero - ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString.ToEntero - - ' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString), 1, 0) - ' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString - ' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString - - ' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - - ' Else - ' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then - - ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString.ToEntero - ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString.ToEntero - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - ' End If - ' End If - - - ' If Not errorContPaq Then - ' Dim IdContPaqiCliente As Integer - - ' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then - - ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then - - ' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString.ToEntero - - ' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - ' Else - ' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - ' End If - ' Else - ' errorContPaq = True - ' End If - ' End If - - - ' If Not errorContPaq Then - ' ObjContPaqi.Commit() - ' ObjContPaqi.Dispose() - ' Else - ' ObjContPaqi.RollBack() - ' ObjContPaqi.Dispose() - ' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError) - ' Exit Sub - ' End If - - - 'End If + 'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then + + ' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa) + + ' If ObjContPaqi.GetPersona(TxtRFC.Text) Then + + ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then + + ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString().Toentero() + ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero() + + ' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString()), 1, 0) + ' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString() + ' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString() + + ' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then + ' errorContPaq = False + ' Else + ' errorContPaq = True + ' End If + + ' Else + ' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then + + ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero() + ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero() + ' errorContPaq = False + ' Else + ' errorContPaq = True + ' End If + ' End If + ' End If + + + ' If Not errorContPaq Then + ' Dim IdContPaqiCliente As Integer + + ' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then + + ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then + + ' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero() + + ' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then + ' errorContPaq = False + ' Else + ' errorContPaq = True + ' End If + ' Else + ' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then + ' errorContPaq = False + ' Else + ' errorContPaq = True + ' End If + ' End If + ' Else + ' errorContPaq = True + ' End If + ' End If + + + ' If Not errorContPaq Then + ' ObjContPaqi.Commit() + ' ObjContPaqi.Dispose() + ' Else + ' ObjContPaqi.RollBack() + ' ObjContPaqi.Dispose() + ' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError) + ' Exit Sub + ' End If + + + 'End If #End Region - + Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0") Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0") If CveCliente = -1 Then Dim ErrorAC As Boolean = False - Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero + Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero() ' si tiene la funcionalidad de la cuenta contable padre If UsuarioActual.Empresa.Funcionalidad(114) <> "" Then @@ -2496,12 +2496,12 @@ Partial Class Clientes ObjContaAC.IniciaTransacSQL() 'se registra la cuenta contable automaticamente - CtaCliente = ObjContaAC.AddSiguienteCuentaHijo(UsuarioActual.Empresa.Funcionalidad(114).ToEntero, TxtNombreComercial.Text.Trim, "A", 2) + CtaCliente = ObjContaAC.AddSiguienteCuentaHijo(UsuarioActual.Empresa.Funcionalidad(114).ToEntero(), TxtNombreComercial.Text.Trim, "A", 2) If CtaCliente > 0 Then ObjContaAC.Commit() - DdlCtaContableClientes.Items.Add(New ListItem(TxtNombreComercial.Text.Trim, CtaCliente.ToString)) - DdlCtaContableClientes.SelectedValue = CtaCliente.ToString + DdlCtaContableClientes.Items.Add(New ListItem(TxtNombreComercial.Text.Trim, CtaCliente.ToString())) + DdlCtaContableClientes.SelectedValue = CtaCliente.ToString() 'MsgCuentaContable = String.Format("
Con la cuenta contable: {0}", NewCuenta) Else @@ -2516,13 +2516,13 @@ Partial Class Clientes End If 'Si tiene contabilizacion automatica y la funcionalidad de carga cuenta automatica o UsaAC le agregamos automaticamente una cuenta al cliente - If UsuarioActual.Empresa.Funcionalidad(211).ToEntero > 0 AndAlso (UsuarioActual.Empresa.Funcionalidad(200).ToEntero > 0 Or UsuarioActual.Empresa.UsaAC) AndAlso DdlCtaContableClientes.SelectedValue.ToEntero < 1 Then + If UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 AndAlso (UsuarioActual.Empresa.Funcionalidad(200).ToEntero() > 0 Or UsuarioActual.Empresa.UsaAC) AndAlso DdlCtaContableClientes.SelectedValue.ToEntero() < 1 Then If Not AgregarCuentaContable(BtnActivaRegistroClientes, DdlCtaContableClientes) Then ErrorProceso = True End If End If - 'Dim MetodoPago = DdlMetodoPago.SelectedValue.ToEntero + 'Dim MetodoPago = DdlMetodoPago.SelectedValue.Toentero() 'If UsuarioActual.Empresa.CvePlataforma = 3 Then ' MetodoPago = 1 'End If @@ -2531,22 +2531,22 @@ Partial Class Clientes If ObjClientes.AddCliente(TxtNombre.Text.Trim, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, TxtTelefono.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), - TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text.Trim, Giro, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble, - TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero, TxtPlazoCobranza.Text.Trim.ToEntero, TxtPlazoCobranzaRemision.Text.Trim.ToEntero, - DiasPago, DdlTipoPago.SelectedValue, DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero, - DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero, - DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableCompClientes.SelectedValue.ToEntero, DdlCtaContableCompClientes.SelectedItem.Text, DdlCtaContableCompAnticipos.SelectedValue.ToEntero, DdlCtaContableCompAnticipos.SelectedItem.Text, + TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text.Trim, Giro, DdlPrecioLista.SelectedValue.ToEntero(), ChkMail.Checked, TxtRetIVA.Text.ToDouble, + TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero(), TxtPlazoCobranza.Text.Trim.ToEntero(), TxtPlazoCobranzaRemision.Text.Trim.ToEntero(), + DiasPago, DdlTipoPago.SelectedValue, DdlCtaContableClientes.SelectedValue.ToEntero(), DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero(), + DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero(), DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero(), DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero(), + DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableCompClientes.SelectedValue.ToEntero(), DdlCtaContableCompClientes.SelectedItem.Text, DdlCtaContableCompAnticipos.SelectedValue.ToEntero(), DdlCtaContableCompAnticipos.SelectedItem.Text, TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim, TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim, ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim, - TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero, DdlCorporativo.SelectedValue.ToEntero, - CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero, CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero, - CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero, ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero, CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), + TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero(), DdlCorporativo.SelectedValue.ToEntero(), + CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero(), CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero(), + CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text, CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text, - DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, - CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero, - CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), + DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(), + CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), + CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, - TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero) Then + TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero()) Then ViewState("CveCliente") = ObjClientes.CveCliente @@ -2554,7 +2554,7 @@ Partial Class Clientes 'For Each gvr As GridViewRow In GvDocsVentas.Rows ' If gvr.FCCheckBox("ChkDoc").Checked Then - ' objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").ToEntero, -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, Now, Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate) + ' objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, Now, Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate()) ' End If @@ -2567,16 +2567,16 @@ Partial Class Clientes For Each GVR As GridViewRow In GvImpuestosLocales.Rows If GVR.FCCheckBox("ChkDeduccion").Checked Then - ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero) + ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero()) End If Next For Each Row As DataRow In TempDTSucursales.Rows If Not CveCliente > 0 Then - If ObjClientes.AddSucursal(ObjClientes.CveCliente, Row("SucursalCliente").ToString, UsuarioActual.CveUsuario, Row("CiudadSucursal").ToString, Row("ColoniaSucursal").ToString, Row("CPSucursal").ToString, Row("DireccionSucursal").ToString, Row("EstadoSucursal").ToString, Row("LocalidadSucursal").ToString, - Row("PaisSucursal").ToString, Row("NumExtSucursal").ToString, Row("NumIntSucursal").ToString, Row("TelefonoSucursal").ToString, Row("CorreoSucursal").ToString, Row("CorreoCotiziacionSucursal").ToString, Row("ContactoSucursal").ToString, - Row("CveVendedorSucursal").ToString.ToEntero, Row("NumCuenta").ToString, Row("CveMetodoPago").ToString.ToEntero, Row("LimiteCredito").ToString.ToDecimal, Row("CveResponsableCobranza").ToString.ToEntero, - Row("CveUsoCFDI").ToString.ToEntero, Row("CveFormaPago33").ToString.ToEntero, Row("CveMetodoPago33").ToString.ToEntero, LT:=Row("LT").ToString, LG:=Row("LG").ToString) Then + If ObjClientes.AddSucursal(ObjClientes.CveCliente, Row("SucursalCliente").ToString(), UsuarioActual.CveUsuario, Row("CiudadSucursal").ToString(), Row("ColoniaSucursal").ToString(), Row("CPSucursal").ToString(), Row("DireccionSucursal").ToString(), Row("EstadoSucursal").ToString(), Row("LocalidadSucursal").ToString(), + Row("PaisSucursal").ToString(), Row("NumExtSucursal").ToString(), Row("NumIntSucursal").ToString(), Row("TelefonoSucursal").ToString(), Row("CorreoSucursal").ToString(), Row("CorreoCotiziacionSucursal").ToString(), Row("ContactoSucursal").ToString(), + Row("CveVendedorSucursal").ToString().ToEntero(), Row("NumCuenta").ToString(), Row("CveMetodoPago").ToString().ToEntero(), Row("LimiteCredito").ToString().ToDecimal(), Row("CveResponsableCobranza").ToString().ToEntero(), + Row("CveUsoCFDI").ToString().ToEntero(), Row("CveFormaPago33").ToString().ToEntero(), Row("CveMetodoPago33").ToString().ToEntero(), LT:=Row("LT").ToString(), LG:=Row("LG").ToString()) Then End If End If Next @@ -2584,8 +2584,8 @@ Partial Class Clientes If UsuarioActual.Empresa.CvePlataforma = 3 AndAlso Not ErrorProceso Then Dim GPS As New ClsGPS GPS.IniciaTransacSQL() - For Each GvRow As GridViewRow In GvDatos.Rows - If Not GPS.DispositivosClienteUpdate(GvRow.DataKey("CveDispositivo").ToString.ToEntero, ObjClientes.CveCliente) Then + For Each GvRow As GridViewRow In GvDatosGPS.Rows + If Not GPS.DispositivosClienteUpdate(GvRow.DataKey("CveDispositivo").ToString().ToEntero(), ObjClientes.CveCliente) Then ErrorProceso = True End If Next @@ -2626,29 +2626,29 @@ Partial Class Clientes End If Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "") If ObjClientes.UpdateCliente(NombreCliente, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, - TxtTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text, Giro, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, - ChkEstado.Checked, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero, TxtPlazoCobranza.Text.Trim.ToEntero, TxtPlazoCobranzaRemision.Text.Trim.ToEntero, DiasPago, DdlTipoPago.SelectedValue, - DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero, DdlCtaContableAnticipos.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero, - DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableCompClientes.SelectedValue.ToEntero, DdlCtaContableCompClientes.SelectedItem.Text, DdlCtaContableCompAnticipos.SelectedValue.ToEntero, DdlCtaContableCompAnticipos.SelectedItem.Text, - DdlMonedaExtranjeraClientes.SelectedValue.ToEntero, DdlMonedaExtranjeraClientes.SelectedItem.Text, DdlMonedaExtranjeraAnticipos.SelectedValue.ToEntero, DdlMonedaExtranjeraAnticipos.SelectedItem.Text, + TxtTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text, Giro, DdlPrecioLista.SelectedValue.ToEntero(), ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, + ChkEstado.Checked, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero(), TxtPlazoCobranza.Text.Trim.ToEntero(), TxtPlazoCobranzaRemision.Text.Trim.ToEntero(), DiasPago, DdlTipoPago.SelectedValue, + DdlCtaContableClientes.SelectedValue.ToEntero(), DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero(), DdlCtaContableAnticipos.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero(), DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero(), + DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero(), DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableCompClientes.SelectedValue.ToEntero(), DdlCtaContableCompClientes.SelectedItem.Text, DdlCtaContableCompAnticipos.SelectedValue.ToEntero(), DdlCtaContableCompAnticipos.SelectedItem.Text, + DdlMonedaExtranjeraClientes.SelectedValue.ToEntero(), DdlMonedaExtranjeraClientes.SelectedItem.Text, DdlMonedaExtranjeraAnticipos.SelectedValue.ToEntero(), DdlMonedaExtranjeraAnticipos.SelectedItem.Text, TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim, TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim, ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim, UsuarioActual.CveUsuario, - CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero, DdlCorporativo.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero, CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero, - CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero, ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero, CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text, + CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero(), DdlCorporativo.SelectedValue.ToEntero(), CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero(), CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero(), + CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text, CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text, - DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, DesglosaIEPS:=ChkDesglosarIEPS.Checked, - AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero, CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, - CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), + DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, + AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), + CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(), - RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero) Then + RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero()) Then ObjClientes.LimpiaImpuestosLocales(CveCliente) For Each GVR As GridViewRow In GvImpuestosLocales.Rows If GVR.FCCheckBox("ChkDeduccion").Checked Then - ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero) + ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero()) End If Next @@ -2656,16 +2656,16 @@ Partial Class Clientes 'For Each gvr As GridViewRow In GvDocsVentas.Rows ' 'sino está registrada y se selecciona, se va a insertar - ' If gvr.DataKey("CveDocumentacionElectronica").ToEntero <= 0 Then - ' objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").ToEntero, -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, Now, Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate) + ' If gvr.DataKey("CveDocumentacionElectronica").Toentero() <= 0 Then + ' objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, Now, Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate()) ' Else ' ', Observacion2:=gvr.FCTextBox("TxtObs2").Text - ' objDoc.DocumentacionElectronicaUpdate(gvr.DataKey("CveDocumentacionElectronica").ToEntero, gvr.DataKey("CveDocumentacion").ToEntero, -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, gvr.DataKey("FechaLimite").ToDate, Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate) + ' objDoc.DocumentacionElectronicaUpdate(gvr.DataKey("CveDocumentacionElectronica").Toentero(), gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, gvr.DataKey("FechaLimite").ToDate(), Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate()) ' End If ' 'si ya estaba registrada y no se selecciona, se va a insertar - ' If gvr.DataKey("CveDocumentacionElectronica").ToEntero > 0 AndAlso Not gvr.FCCheckBox("ChkDoc").Checked Then - ' objDoc.DocumentacionElectronicaRemove(gvr.DataKey("CveDocumentacionElectronica").ToEntero, -1) + ' If gvr.DataKey("CveDocumentacionElectronica").Toentero() > 0 AndAlso Not gvr.FCCheckBox("ChkDoc").Checked Then + ' objDoc.DocumentacionElectronicaRemove(gvr.DataKey("CveDocumentacionElectronica").Toentero(), -1) ' End If 'Next @@ -2677,7 +2677,7 @@ Partial Class Clientes If EstatusAnteriorCliente <> ChkEstado.Checked Then Dim DTVendedor As New DataTable - DTVendedor = GlobalDTVendedores(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" CveVendedor = " & DdlVendedor.SelectedValue.ToEntero) + DTVendedor = GlobalDTVendedores(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" CveVendedor = " & DdlVendedor.SelectedValue.ToEntero()) Dim ObjVendedores As New ClsVtaVendedores Dim DtVendedores As DataTable = Nothing @@ -2687,17 +2687,17 @@ Partial Class Clientes ObjVendedores.Dispose() If DTVendedor.Rows.Count > 0 Then - Dim _CorreoVendedor As String = DTVendedor(0)("Correo").ToString + Dim _CorreoVendedor As String = DTVendedor(0)("Correo").ToString() Dim _CorreoAsistente As String = "" Dim _CorreoCoordinador As String = "" - Dim CveSuperior As Integer = DTVendedor(0)("CveSuperior").ToString.ToEntero + Dim CveSuperior As Integer = DTVendedor(0)("CveSuperior").ToString().ToEntero() If DTVendedor.Rows.Count > 0 Then - _CorreoAsistente = DtVendedores.FiltroPrimeroValor("Correo", "CveSuperior = " & DdlVendedor.SelectedValue.ToEntero) + _CorreoAsistente = DtVendedores.FiltroPrimeroValor("Correo", "CveSuperior = " & DdlVendedor.SelectedValue.ToEntero()) _CorreoCoordinador = DtVendedores.FiltroPrimeroValor("Correo", "CveVendedor = " & CveSuperior) End If - If (_CorreoVendedor.Length > 0 Or _CorreoAsistente.Length > 0 Or _CorreoCoordinador.Length > 0) And UsuarioActual.Empresa.Funcionalidad(571).ToEntero > 0 Then + If (_CorreoVendedor.Length > 0 Or _CorreoAsistente.Length > 0 Or _CorreoCoordinador.Length > 0) And UsuarioActual.Empresa.Funcionalidad(571).ToEntero() > 0 Then Dim Asunto As String = "" Dim Para As String = If(_CorreoVendedor.Length > 0, _CorreoVendedor & ";", "") & If(_CorreoAsistente.Length > 0, _CorreoAsistente & ";", "") & _CorreoCoordinador @@ -2710,7 +2710,7 @@ Partial Class Clientes Asunto = "Desactivación de cliente " & TxtNombre.Text SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido desactivado.", TxtNombre.Text)) End If - MandaCorreo(Asunto, Para + "", SBBody.ToString) + MandaCorreo(Asunto, Para + "", SBBody.ToString()) End If End If @@ -2726,11 +2726,11 @@ Partial Class Clientes ObjClientes.Dispose() objDoc.Dispose() RecargaGlobal() - End Sub - + End Sub + #End Region - - + + #Region "G L O B L A L" Private Sub RecargaGlobal() 'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT) @@ -2744,10 +2744,10 @@ Partial Class Clientes ' Application("GlobalDTCliente") = Objclientes.DtResultados 'End If 'Objclientes.Dispose() - End Sub + End Sub #End Region - - + + #Region "G R I D V I E W S" Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -2823,7 +2823,7 @@ Partial Class Clientes e.Row.Cells(9).Visible = True e.Row.Cells(9).Font.Bold = True Dim OBjClientes As New ClsClientes - If OBjClientes.GetVisitasCobranza(-1, e.Row.DBCampo("CveVenta").ToEntero, -1) Then + If OBjClientes.GetVisitasCobranza(-1, e.Row.DBCampo("CveVenta").ToEntero(), -1) Then If OBjClientes.DtResultados.Rows.Count > 0 Then e.Row.FCLinkButton("ImgVisitas").Visible = True GvVisitas.DataSource = OBjClientes.DtResultados @@ -2891,7 +2891,7 @@ Partial Class Clientes If e.Row.DBCampo("Folio") = "N/D" Then e.Row.FCLiteral("LtlFactura").Text = e.Row.DataKey("Folio") Else - If e.Row.DataKey("CveIE").ToString.ToEntero > 0 Then + If e.Row.DataKey("CveIE").ToString().ToEntero() > 0 Then e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DataKey("CveIE"), e.Row.DataKey("Folio")) Else e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DataKey("CveVenta"), e.Row.DataKey("Folio")) @@ -2900,19 +2900,19 @@ Partial Class Clientes End If If UsuarioActual.TienePermisoProceso(247) Then - If CType(sender, GridView).ID = "GVAnticipos" And e.Row.DBCampo("CveVenta").ToEntero > 0 And e.Row.DBCampo("Tipo") = "NC" Then - Dim Parametros = Encripta($"CveVenta={e.Row.DBCampo("CveVenta").ToEntero}&SerieFolio={e.Row.DBCampo("Folio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveCliente={CveCliente}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}") + If CType(sender, GridView).ID = "GVAnticipos" And e.Row.DBCampo("CveVenta").ToEntero() > 0 And e.Row.DBCampo("Tipo") = "NC" Then + Dim Parametros = Encripta($"CveVenta={e.Row.DBCampo("CveVenta").ToEntero()}&SerieFolio={e.Row.DBCampo("Folio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveCliente={CveCliente}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}") e.Row.FCHyperLink("HLDevolverDinero").Visible = True e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinV&P={Parametros}" End If End If End If - End Sub + End Sub #End Region - + #Region "R H" - + Private Sub CargaPersonalAsignado() Dim ObjPersonal As New ClsRH If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, CveCliente, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then @@ -2949,7 +2949,7 @@ Partial Class Clientes Protected Sub BtnConsultarAsistencia_Click(sender As Object, e As System.EventArgs) Handles BtnConsultarAsistencia.Click Dim objpersonal As New ClsRH - If objpersonal.GetAsistencias(-1, CveCliente, -1, -1, -1, 1, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, UsuarioActual.CveEmpresa) Then + If objpersonal.GetAsistencias(-1, CveCliente, -1, -1, -1, 1, txtFechaI.Text.Trim.ToDate(), txtFechaF.Text.Trim.ToDate(), UsuarioActual.CveEmpresa) Then GVAsistencia.DataSource = objpersonal.DtResultados.FiltraParametros("Fecha IS NOT NULL") Else GVAsistencia.DataSource = Nothing @@ -2976,7 +2976,7 @@ Partial Class Clientes e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Left - If IsDate(e.Row.DBCampo("Fecha")) Then e.Row.FCLiteral("LtlFecha").Text = e.Row.DBCampo("Fecha").ToDate.ToShortDateString + If IsDate(e.Row.DBCampo("Fecha")) Then e.Row.FCLiteral("LtlFecha").Text = e.Row.DBCampo("Fecha").ToDate().ToShortDateString() If e.Row.DBCampo("SeModifico") = "0" Then e.Row.BackColor = Drawing.Color.LightBlue @@ -2985,9 +2985,9 @@ Partial Class Clientes End If End If - End Sub + End Sub #End Region - + #Region "S U C U R S A L E S" Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click ChkEstatusSucursal.Checked = True @@ -3039,8 +3039,8 @@ Partial Class Clientes Dim Estatus As Boolean = ChkEstatusSucursal.Checked If ObjCliente.UpdateSucursal(TxtNombreSucursal.Text.Trim, Estatus, CveCliente, CveClienteSuc, TxtCiudadSucursal.Text.Trim, TxtColoniaSucursal.Text.Trim, TxtCPSucursal.Text.Trim, TxtDireccionSucursal.Text.Trim, TxtEstadoSucursal.Text.Trim, TxtLocalidadSucursal.Text.Trim, TxtPaisSucursal.Text.Trim, TxtNumExtSucursal.Text.Trim, TxtNumIntSucursal.Text.Trim, - TxtTelefonoSucursal.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtCorreoSucursal.Text.Trim, TxtCorreoSucursalCotizacion.Text.Trim, TxtContactoSucursal.Text.Trim, DdlVendedorSucursal.SelectedValue.ToEntero, TxtNumeroCuenta.Text, DdlMetodoPagoSucursal.SelectedValue.ToEntero, TxtLimiteCreditoSucursal.Text.ToDecimal, DdlResponsableSucursal.SelectedValue.ToEntero, - DdlSucursalUsoCFDI.SelectedValue.ToEntero, DdlSucursalFormaPago33.SelectedValue.ToEntero, DdlSucursalMetodoPago33.SelectedValue.ToEntero, LT:=LT, LG:=LG) Then + TxtTelefonoSucursal.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtCorreoSucursal.Text.Trim, TxtCorreoSucursalCotizacion.Text.Trim, TxtContactoSucursal.Text.Trim, DdlVendedorSucursal.SelectedValue.ToEntero(), TxtNumeroCuenta.Text, DdlMetodoPagoSucursal.SelectedValue.ToEntero(), TxtLimiteCreditoSucursal.Text.ToDecimal(), DdlResponsableSucursal.SelectedValue.ToEntero(), + DdlSucursalUsoCFDI.SelectedValue.ToEntero(), DdlSucursalFormaPago33.SelectedValue.ToEntero(), DdlSucursalMetodoPago33.SelectedValue.ToEntero(), LT:=LT, LG:=LG) Then GVSucursales.EditIndex = -1 ViewState("DTSucursalesCliente") = ObjCliente.DtResultados Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) @@ -3055,8 +3055,8 @@ Partial Class Clientes Else If ObjCliente.AddSucursal(CveCliente, TxtNombreSucursal.Text.Trim, UsuarioActual.CveUsuario, TxtCiudadSucursal.Text.Trim, TxtColoniaSucursal.Text.Trim, TxtCPSucursal.Text.Trim, TxtDireccionSucursal.Text.Trim, TxtEstadoSucursal.Text.Trim, TxtLocalidadSucursal.Text.Trim, TxtPaisSucursal.Text.Trim, TxtNumExtSucursal.Text.Trim, TxtNumIntSucursal.Text.Trim, TxtTelefonoSucursal.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", ""), TxtCorreoSucursal.Text.Trim, TxtCorreoSucursalCotizacion.Text.Trim, TxtContactoSucursal.Text.Trim, - DdlVendedorSucursal.SelectedValue.ToEntero, TxtNumeroCuenta.Text, DdlMetodoPagoSucursal.SelectedValue.ToEntero, TxtLimiteCreditoSucursal.Text.ToDecimal, DdlResponsableSucursal.SelectedValue.ToEntero, - DdlSucursalUsoCFDI.SelectedValue.ToEntero, DdlSucursalFormaPago33.SelectedValue.ToEntero, DdlSucursalMetodoPago33.SelectedValue.ToEntero, LT:=LT, LG:=LG) Then + DdlVendedorSucursal.SelectedValue.ToEntero(), TxtNumeroCuenta.Text, DdlMetodoPagoSucursal.SelectedValue.ToEntero(), TxtLimiteCreditoSucursal.Text.ToDecimal(), DdlResponsableSucursal.SelectedValue.ToEntero(), + DdlSucursalUsoCFDI.SelectedValue.ToEntero(), DdlSucursalFormaPago33.SelectedValue.ToEntero(), DdlSucursalMetodoPago33.SelectedValue.ToEntero(), LT:=LT, LG:=LG) Then TxtNombreSucursal.Text = "" TxtCiudadSucursal.Text = "" TxtColoniaSucursal.Text = "" @@ -3119,7 +3119,7 @@ Partial Class Clientes UpModalDivMapa.Update() - End Sub + End Sub #Region "G V S U C U R S A L E S" Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVSucursales.RowDataBound @@ -3144,7 +3144,7 @@ Partial Class Clientes Dim ObjCliente As New ClsClientes If CveCliente > 0 Then - If ObjCliente.RemoveSucursal(CveCliente, GVSucursales.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then + If ObjCliente.RemoveSucursal(CveCliente, GVSucursales.DataKeys(e.RowIndex).Value.ToString().ToEntero()) Then GVSucursales.EditIndex = -1 ViewState("DTSucursalesCliente") = ObjCliente.DtResultados Alert("La Sucursal del Cliente se eliminó correctamente.", TipoMensaje.MsgInformacion) @@ -3180,7 +3180,7 @@ Partial Class Clientes Me.Actualizar = True Me.DivRFCSucursal.Visible = False - Me.CveClienteSuc = GVSucursales.DataKeys(e.NewEditIndex).Value.ToString.ToEntero + Me.CveClienteSuc = GVSucursales.DataKeys(e.NewEditIndex).Value.ToString().ToEntero() Dim ObjCliente As New ClsClientes @@ -3188,37 +3188,37 @@ Partial Class Clientes If ObjCliente.GetSucursales(CveCliente, CveClienteSuc) Then DivEstatusSucursal.Visible = True - TxtNombreSucursal.Text = ObjCliente.DtResultados.Rows(0)("SucursalCliente").ToString - ChkEstatusSucursal.Checked = If(ObjCliente.DtResultados.Rows(0)("Estatus").ToString = "Activo", True, False) - TxtCiudadSucursal.Text = ObjCliente.DtResultados.Rows(0)("Ciudad").ToString - TxtColoniaSucursal.Text = ObjCliente.DtResultados.Rows(0)("Colonia").ToString - TxtCPSucursal.Text = ObjCliente.DtResultados.Rows(0)("CP").ToString - TxtDireccionSucursal.Text = ObjCliente.DtResultados.Rows(0)("Direccion").ToString - TxtEstadoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Estado").ToString - TxtLocalidadSucursal.Text = ObjCliente.DtResultados.Rows(0)("Localidad").ToString - TxtPaisSucursal.Text = ObjCliente.DtResultados.Rows(0)("Pais").ToString - TxtNumExtSucursal.Text = ObjCliente.DtResultados.Rows(0)("NoExt").ToString - TxtNumIntSucursal.Text = ObjCliente.DtResultados.Rows(0)("NoInt").ToString - TxtTelefonoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Telefono").ToString - TxtRFCSucursal.Text = ObjCliente.DtResultados.Rows(0)("RFC").ToString + TxtNombreSucursal.Text = ObjCliente.DtResultados.Rows(0)("SucursalCliente").ToString() + ChkEstatusSucursal.Checked = If(ObjCliente.DtResultados.Rows(0)("Estatus").ToString() = "Activo", True, False) + TxtCiudadSucursal.Text = ObjCliente.DtResultados.Rows(0)("Ciudad").ToString() + TxtColoniaSucursal.Text = ObjCliente.DtResultados.Rows(0)("Colonia").ToString() + TxtCPSucursal.Text = ObjCliente.DtResultados.Rows(0)("CP").ToString() + TxtDireccionSucursal.Text = ObjCliente.DtResultados.Rows(0)("Direccion").ToString() + TxtEstadoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Estado").ToString() + TxtLocalidadSucursal.Text = ObjCliente.DtResultados.Rows(0)("Localidad").ToString() + TxtPaisSucursal.Text = ObjCliente.DtResultados.Rows(0)("Pais").ToString() + TxtNumExtSucursal.Text = ObjCliente.DtResultados.Rows(0)("NoExt").ToString() + TxtNumIntSucursal.Text = ObjCliente.DtResultados.Rows(0)("NoInt").ToString() + TxtTelefonoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Telefono").ToString() + TxtRFCSucursal.Text = ObjCliente.DtResultados.Rows(0)("RFC").ToString() DivRFCSucursal.Visible = Not String.IsNullOrEmpty(TxtRFCSucursal.Text.Trim()) - TxtCorreoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Correo").ToString - TxtCorreoSucursalCotizacion.Text = ObjCliente.DtResultados(0)("CorreoCotizacion").ToString - TxtContactoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Contacto").ToString - DdlVendedorSucursal.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveVendedor").ToString) - DdlMetodoPagoSucursal.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString) - TxtNumeroCuenta.Text = ObjCliente.DtResultados.Rows(0)("NumCtaPago").ToString - LblUsuarioSucursal.Text = String.Format("Usuario Registró: {0}", ObjCliente.DtResultados.Rows(0)("Usuario").ToString) - LblFechaSucursal.Text = String.Format("Fecha de Registro: {0}", ObjCliente.DtResultados.Rows(0)("FechaIng").ToString.ToDate.ToShortDateString) - TxtLimiteCreditoSucursal.Text = ObjCliente.DtResultados.Rows(0)("LimiteCredito").ToString.FormatoNumero - DdlResponsableSucursal.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveResponsableCobranza").ToString) + TxtCorreoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Correo").ToString() + TxtCorreoSucursalCotizacion.Text = ObjCliente.DtResultados(0)("CorreoCotizacion").ToString() + TxtContactoSucursal.Text = ObjCliente.DtResultados.Rows(0)("Contacto").ToString() + DdlVendedorSucursal.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveVendedor").ToString()) + DdlMetodoPagoSucursal.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString()) + TxtNumeroCuenta.Text = ObjCliente.DtResultados.Rows(0)("NumCtaPago").ToString() + LblUsuarioSucursal.Text = String.Format("Usuario Registró: {0}", ObjCliente.DtResultados.Rows(0)("Usuario").ToString()) + LblFechaSucursal.Text = String.Format("Fecha de Registro: {0}", ObjCliente.DtResultados.Rows(0)("FechaIng").ToString().ToDate().ToShortDateString()) + TxtLimiteCreditoSucursal.Text = ObjCliente.DtResultados.Rows(0)("LimiteCredito").ToString().FormatoNumero() + DdlResponsableSucursal.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveResponsableCobranza").ToString()) - DdlSucursalUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString) - DdlSucursalMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString) - DdlSucursalFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString) + DdlSucursalUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString()) + DdlSucursalMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString()) + DdlSucursalFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString()) - txtLg.Text = ObjCliente.DtResultados.Rows(0)("LG").ToString - txtLt.Text = ObjCliente.DtResultados.Rows(0)("LT").ToString + txtLg.Text = ObjCliente.DtResultados.Rows(0)("LG").ToString() + txtLt.Text = ObjCliente.DtResultados.Rows(0)("LT").ToString() HDMAPOP.Value = "2" @@ -3241,18 +3241,18 @@ Partial Class Clientes Else CargaGrid("", 0) End If - End Sub + End Sub #End Region - + #Region "G V U S U A R I O S P O R T A L" Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand If e.CommandName = "RestablecerContraseña" Then - Dim cveUsuarioPortal As Integer = e.CommandArgument.ToString.ToEntero + Dim cveUsuarioPortal As Integer = e.CommandArgument.ToString().ToEntero() Dim Usuario As New ClsSisUsuarios If Usuario.GetUsuariosPortal(cveUsuarioPortal, -1, -1) Then Dim dr As DataRow = Usuario.DtResultados.FiltroPrimero("") - If Usuario.UpdateUsuarioPortal(dr("Usuario").ToString, dr("Nombre").ToString, dr("Correo").ToString, CType(dr("Estatus"), Boolean), ContraseñaPredeterminadaEncriptada, CveCliente, -1, cveUsuarioPortal, UsuarioActual.CveUsuario) Then + If Usuario.UpdateUsuarioPortal(dr("Usuario").ToString(), dr("Nombre").ToString(), dr("Correo").ToString(), CType(dr("Estatus"), Boolean), ContraseñaPredeterminadaEncriptada, CveCliente, -1, cveUsuarioPortal, UsuarioActual.CveUsuario) Then GvUsuariosPortal.EditIndex = -1 ViewState("DTUsuariosCliente") = Usuario.DtResultados.FiltraParametros("Usuario <> 'Admin'") @@ -3323,8 +3323,8 @@ Partial Class Clientes Dim Nombre As String = gvr.FCTextBox("TxtUsuarioPortalEdit").Text.Trim Dim Correo As String = gvr.FCTextBox("TxtCorreoUsuarioPortalEdit").Text.Trim Dim Estatus As Boolean = gvr.FCCheckBox("ChkEstatus").Checked - Dim CveUsuario As Integer = gvr.DataKey("CveUsuario").ToEntero - Dim pCveCliente As Integer = gvr.DataKey("CveCliente").ToEntero + Dim CveUsuario As Integer = gvr.DataKey("CveUsuario").ToEntero() + Dim pCveCliente As Integer = gvr.DataKey("CveCliente").ToEntero() Dim PermisoHistorialCompras As Boolean = gvr.FCCheckBox("ChkPermiso1").Checked Dim PermisoCxP As Boolean = gvr.FCCheckBox("ChkPermiso2").Checked @@ -3395,9 +3395,9 @@ Partial Class Clientes CargaGrid("", 1) End If - End Sub + End Sub #End Region - + #Region "O R D E N A M I E N T O" Private Sub CargaGrid(Orden As String, gvi As Integer) If gvi = 0 Then @@ -3429,16 +3429,16 @@ Partial Class Clientes UPPUsuarios.Update() End If - End Sub + End Sub #End Region - - + + #End Region - + #Region "U S U A R I O S" Protected Sub LbSolicitudPortal_Click(sender As Object, e As EventArgs) Handles LbEnviarActivacionPortal.Click Dim ObjUsuario As New ClsSisUsuarios - Dim CveUsr As Integer = HdnCveUsuarioPortalAdmin.Value.ToEntero + Dim CveUsr As Integer = HdnCveUsuarioPortalAdmin.Value.ToEntero() Dim Usuario As String = TxtEmail.Text Dim NomUsuario As String = "Admin" Dim CorreoUsuario As String = TxtEmail.Text @@ -3470,7 +3470,7 @@ Partial Class Clientes ErrorUsuario = False Next If Not ErrorUsuario Then - HdnCveUsuarioPortalAdmin.Value = CveUsr.ToString + HdnCveUsuarioPortalAdmin.Value = CveUsr.ToString() trDesactivarUsuario.Visible = True trEnviarActivacion.Visible = False LblUsuarioActivo.Text = "Si" @@ -3491,7 +3491,7 @@ Partial Class Clientes ErrorUsuario = False Next If Not ErrorUsuario Then - HdnCveUsuarioPortalAdmin.Value = CveUsr.ToString + HdnCveUsuarioPortalAdmin.Value = CveUsr.ToString() trDesactivarUsuario.Visible = True trEnviarActivacion.Visible = False LblUsuarioActivo.Text = "Si" @@ -3616,9 +3616,9 @@ Partial Class Clientes ChkPermiso5.Checked = False ChkPermiso6.Checked = False ChkPermiso7.Checked = False - End Sub + End Sub #End Region - + #Region "E V E N T O - B I T A C O R A" Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -3629,9 +3629,9 @@ Partial Class Clientes e.Row.Cells(4).Width = Unit.Pixel(30) End If - If e.Row.DBCampo("Archivo").ToString <> "" Then + If e.Row.DBCampo("Archivo").ToString() <> "" Then e.Row.FCLinkButton("LinkArchivo").Visible = True - e.Row.FCLinkButton("LinkArchivo").CommandArgument = String.Format("OI\{0}", e.Row.DBCampo("Archivo").ToString) + e.Row.FCLinkButton("LinkArchivo").CommandArgument = String.Format("OI\{0}", e.Row.DBCampo("Archivo").ToString()) ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LinkArchivo")) 'Registro un evento Postbacktrigger, que recargue toda la pagina para que funcione End If @@ -3651,7 +3651,7 @@ Partial Class Clientes If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then If filemove <> "" Then - filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) + filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa)) End If GvEB.DataSource = ObjEventoBitacora.DtResultados @@ -3700,7 +3700,7 @@ Partial Class Clientes End Sub Public Sub BtnAgregaCuentaContable(sender As Object, e As EventArgs) Handles BtnActivaRegistroClientes.Click, BtnActivaRegistroAnticipos.Click, BtnActivaRegistroIVA.Click, BtnActivaRegistroISR.Click - Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString + Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString() Dim Button = DirectCast(sender, Button) Select Case CuentaContable Case "Clientes" @@ -3728,15 +3728,15 @@ Partial Class Clientes Dim CuentaPadre = -1 - Select Case btn.CommandArgument.ToString + Select Case btn.CommandArgument.ToString() Case "Clientes" - CuentaPadre = UsuarioActual.Empresa.Funcionalidad(211).ToEntero + CuentaPadre = UsuarioActual.Empresa.Funcionalidad(211).ToEntero() Case "Anticipos" - CuentaPadre = UsuarioActual.Empresa.Funcionalidad(212).ToEntero + CuentaPadre = UsuarioActual.Empresa.Funcionalidad(212).ToEntero() Case "RetIVA" - CuentaPadre = UsuarioActual.Empresa.Funcionalidad(213).ToEntero + CuentaPadre = UsuarioActual.Empresa.Funcionalidad(213).ToEntero() Case "RetISR" - CuentaPadre = UsuarioActual.Empresa.Funcionalidad(214).ToEntero + CuentaPadre = UsuarioActual.Empresa.Funcionalidad(214).ToEntero() End Select @@ -3754,7 +3754,7 @@ Partial Class Clientes Dim row As DataRow = dt.Rows(0) CtaCodigo = CStr(row("CtaCodigo")) - Select Case btn.CommandArgument.ToString + Select Case btn.CommandArgument.ToString() Case "Clientes" IdCtaContableClientes = IdCuentaContable Case "Anticipos" @@ -3784,7 +3784,7 @@ Partial Class Clientes If Not TieneError Then ObjContaAC.Commit() Alert(String.Format("Se registo la Cuenta Contable: {0}", CtaCodigo, TipoMensaje.MsgInformacion)) - ddl.Items.Add(New ListItem(CtaCodigo, IdCuentaContable.ToString)) : ddl.SelectedValueExist(IdCuentaContable.ToString) + ddl.Items.Add(New ListItem(CtaCodigo, IdCuentaContable.ToString())) : ddl.SelectedValueExist(IdCuentaContable.ToString()) btn.Visible = False ddl.Width = 206 ProcesoCorrecto = True @@ -3805,30 +3805,30 @@ Partial Class Clientes Private Sub ActivarRegistroAutomatico() 'Clientes - If DdlCtaContableClientes.SelectedValue.ToEntero <= 0 And UsuarioActual.Empresa.Funcionalidad(211).ToEntero > 0 Then + If DdlCtaContableClientes.SelectedValue.ToEntero() <= 0 And UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 Then BtnActivaRegistroClientes.Visible = True End If 'Anticipos - If DdlCtaContableAnticipos.SelectedValue.ToEntero <= 0 And UsuarioActual.Empresa.Funcionalidad(212).ToEntero > 0 Then + If DdlCtaContableAnticipos.SelectedValue.ToEntero() <= 0 And UsuarioActual.Empresa.Funcionalidad(212).ToEntero() > 0 Then BtnActivaRegistroAnticipos.Visible = True End If 'Ret IVA - If DdlCtaContableRetIVA.SelectedValue.ToEntero <= 0 And UsuarioActual.Empresa.Funcionalidad(213).ToEntero > 0 Then + If DdlCtaContableRetIVA.SelectedValue.ToEntero() <= 0 And UsuarioActual.Empresa.Funcionalidad(213).ToEntero() > 0 Then BtnActivaRegistroIVA.Visible = True End If 'Ret ISR - If DdlCtaContableRetISR.SelectedValue.ToEntero <= 0 And UsuarioActual.Empresa.Funcionalidad(214).ToEntero > 0 Then + If DdlCtaContableRetISR.SelectedValue.ToEntero() <= 0 And UsuarioActual.Empresa.Funcionalidad(214).ToEntero() > 0 Then BtnActivaRegistroISR.Visible = True End If - End Sub + End Sub #End Region - + #Region " I M P R I M I R P D F" - + Protected Sub ChkAntIXCNC_CheckedChanged(sender As Object, e As EventArgs) DdlTipoDocto.ClearSelection() If ChkAntIXCNC.Checked Then @@ -3900,14 +3900,14 @@ Partial Class Clientes Dim TotalAnt As Double = 0 Dim ContaIng As Integer = 0 Dim ContaAnt As Integer = 0 - Dim FechaCorte As Date = ("9999/01/01").ToDate + Dim FechaCorte As Date = ("9999/01/01").ToDate() Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM) Dim TipoDocto2 As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM(True)) - Dim FechaVencimientoI As String = If(TxtFechaVICxP.Text = "", "-1", TxtFechaVICxP.Text).ToString - Dim FechaVencimientoF As String = If(TxtFechaVFCxP.Text = "", "-1", TxtFechaVFCxP.Text).ToString + Dim FechaVencimientoI As String = If(TxtFechaVICxP.Text = "", "-1", TxtFechaVICxP.Text).ToString() + Dim FechaVencimientoF As String = If(TxtFechaVFCxP.Text = "", "-1", TxtFechaVFCxP.Text).ToString() Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.GetCxCClienteDetalle(CveCliente, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero) Then + If ObjMovtos.GetCxCClienteDetalle(CveCliente, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero()) Then DtCxCFact = If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("", "TipoDocto").Copy, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "TipoDocto")) 'cargo los anticipos NC DtCxCFact.Columns.Add("SaldoAnticipo", GetType(Decimal)) @@ -3940,26 +3940,26 @@ Partial Class Clientes If DtCxCFact IsNot Nothing Then For Each Row As DataRow In DtCxCFact.FiltraParametros($"TipoDocto IN ({TipoDocto2})").Rows - If Row("TipoDocto").ToString = "Ing" Or Row("TipoDocto").ToString = "Rem" Or (Row("TipoDocto").ToString = "Ant" And Row("Saldo").ToString.ToDouble > 0) Then 'Ingresos + If Row("TipoDocto").ToString() = "Ing" Or Row("TipoDocto").ToString() = "Rem" Or (Row("TipoDocto").ToString() = "Ant" And Row("Saldo").ToString().ToDouble > 0) Then 'Ingresos ContaIng = ContaIng + 1 - If Row("CveMoneda").ToString.ToEntero = 1 Then - SaldoIngPesos = SaldoIngPesos + Row("Saldo").ToString.ToDouble - ElseIf Row("CveMoneda").ToString.ToEntero = 2 Then - SaldoIngDolares = SaldoIngDolares + Row("Saldo").ToString.ToDouble - SaldoIngDolaresPesos = SaldoIngDolaresPesos + (Row("Saldo").ToString.ToDouble * Row("TipoCambio").ToString.ToDouble) + If Row("CveMoneda").ToString().ToEntero() = 1 Then + SaldoIngPesos = SaldoIngPesos + Row("Saldo").ToString().ToDouble + ElseIf Row("CveMoneda").ToString().ToEntero() = 2 Then + SaldoIngDolares = SaldoIngDolares + Row("Saldo").ToString().ToDouble + SaldoIngDolaresPesos = SaldoIngDolaresPesos + (Row("Saldo").ToString().ToDouble * Row("TipoCambio").ToString().ToDouble) End If - ElseIf (Row("TipoDocto").ToString = "Ant" And Row("Saldo").ToString.ToDouble = 0) Or Row("TipoDocto").ToString = "IxC" Or Row("TipoDocto").ToString = "NC" Or Row("TipoDocto").ToString = "Dev" Or Row("TipoDocto").ToString = "RNC" Then 'Anticipos, NC, IxC + ElseIf (Row("TipoDocto").ToString() = "Ant" And Row("Saldo").ToString().ToDouble = 0) Or Row("TipoDocto").ToString() = "IxC" Or Row("TipoDocto").ToString() = "NC" Or Row("TipoDocto").ToString() = "Dev" Or Row("TipoDocto").ToString() = "RNC" Then 'Anticipos, NC, IxC ContaAnt = ContaAnt + 1 - If Row("CveMoneda").ToString.ToEntero = 1 Then - If Row("TipoDocto").ToString = "Dev" Then - SaldoAntPesos = SaldoAntPesos + Row("Saldo").ToString.ToDouble + If Row("CveMoneda").ToString().ToEntero() = 1 Then + If Row("TipoDocto").ToString() = "Dev" Then + SaldoAntPesos = SaldoAntPesos + Row("Saldo").ToString().ToDouble Else - SaldoAntPesos = SaldoAntPesos + Row("SaldoAnticipo").ToString.ToDouble + SaldoAntPesos = SaldoAntPesos + Row("SaldoAnticipo").ToString().ToDouble End If - ElseIf Row("CveMoneda").ToString.ToEntero = 2 Then - SaldoAntDolares = SaldoAntDolares + Row("Saldo").ToString.ToDouble - SaldoAntDolaresPesos = SaldoAntDolaresPesos + (Row("SaldoAnticipo").ToString.ToDouble * Row("TipoCambio").ToString.ToDouble) + ElseIf Row("CveMoneda").ToString().ToEntero() = 2 Then + SaldoAntDolares = SaldoAntDolares + Row("Saldo").ToString().ToDouble + SaldoAntDolaresPesos = SaldoAntDolaresPesos + (Row("SaldoAnticipo").ToString().ToDouble * Row("TipoCambio").ToString().ToDouble) End If End If Next @@ -4015,13 +4015,13 @@ Partial Class Clientes Dim lista = New List(Of CrystalParametro) Dim SaldoDisponible As String = "0.00" If TxtLimiteCredito.Text.ToDouble > 0 Then - SaldoDisponible = (TxtLimiteCredito.Text.ToDouble - DtCxCFact2.SUM("Saldo", "Tipo = 'Act'").ToString.ToDouble).FormatoNumero + SaldoDisponible = (TxtLimiteCredito.Text.ToDouble - DtCxCFact2.SUM("Saldo", "Tipo = 'Act'").ToString().ToDouble).FormatoNumero() End If lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa)) lista.Add(New CrystalParametro("TipoCuentas", DdlTipoCuentasCxC.SelectedItem.Text)) lista.Add(New CrystalParametro("NombreCliente", LtlCliente.Text)) lista.Add(New CrystalParametro("FechaInicio", If(FI = "-1", "-", FI))) - lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", DateTime.Now.ToShortDateString, FF))) + lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", DateTime.Now.ToShortDateString(), FF))) lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre)) lista.Add(New CrystalParametro("DireccionCliente", String.Format("Calle {0} #{1} Colonia {2}", TxtDireccion.Text, If(TxtNoExt.Text = "", "S/N", TxtNoExt.Text), TxtColonia.Text))) lista.Add(New CrystalParametro("ClienteCP", TxtCP.Text)) @@ -4032,15 +4032,15 @@ Partial Class Clientes lista.Add(New CrystalParametro("LimiteCredito", TxtLimiteCredito.Text)) lista.Add(New CrystalParametro("SaldoDisponible", SaldoDisponible)) - lista.Add(New CrystalParametro("SaldoIngDolares", SaldoIngDolares.FormatoNumero)) - lista.Add(New CrystalParametro("SaldoIngPesos", SaldoIngPesos.FormatoNumero)) - lista.Add(New CrystalParametro("TotalIng", TotalIng.FormatoNumero)) - lista.Add(New CrystalParametro("SaldoAntDolares", SaldoAntDolares.FormatoNumero)) - lista.Add(New CrystalParametro("SaldoAntPesos", SaldoAntPesos.FormatoNumero)) - lista.Add(New CrystalParametro("TotalAnt", TotalAnt.FormatoNumero)) + lista.Add(New CrystalParametro("SaldoIngDolares", SaldoIngDolares.FormatoNumero())) + lista.Add(New CrystalParametro("SaldoIngPesos", SaldoIngPesos.FormatoNumero())) + lista.Add(New CrystalParametro("TotalIng", TotalIng.FormatoNumero())) + lista.Add(New CrystalParametro("SaldoAntDolares", SaldoAntDolares.FormatoNumero())) + lista.Add(New CrystalParametro("SaldoAntPesos", SaldoAntPesos.FormatoNumero())) + lista.Add(New CrystalParametro("TotalAnt", TotalAnt.FormatoNumero())) lista.Add(New CrystalParametro("ContaIng", ContaIng)) - lista.Add(New CrystalParametro("ContaAnt", ContaAnt)) - + lista.Add(New CrystalParametro("ContaAnt", ContaAnt)) + If Imagen.Exists Then lista.Add(New CrystalParametro("LogoPath", logouri)) Else @@ -4090,7 +4090,7 @@ Partial Class Clientes lista.Add(New CrystalParametro("TipoCuentas", DdlTipoCuentasCxC.SelectedItem.Text)) lista.Add(New CrystalParametro("NombreCliente", LtlCliente.Text)) lista.Add(New CrystalParametro("FechaInicio", If(FI = "-1", "-", FI))) - lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", DateTime.Now.ToShortDateString, FF))) + lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", DateTime.Now.ToShortDateString(), FF))) lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre)) lista.Add(New CrystalParametro("DireccionCliente", String.Format("Calle {0} #{1} Colonia {2}", TxtDireccion.Text, If(TxtNoExt.Text = "", "S/N", TxtNoExt.Text), TxtColonia.Text))) lista.Add(New CrystalParametro("ClienteCP", TxtCP.Text)) @@ -4099,14 +4099,14 @@ Partial Class Clientes lista.Add(New CrystalParametro("ClienteTelefono", TxtTelefono.Text)) lista.Add(New CrystalParametro("DiasCredito", TxtPlazoCobranza.Text)) lista.Add(New CrystalParametro("LimiteCredito", TxtLimiteCredito.Text)) - lista.Add(New CrystalParametro("SaldoDisponible", (TxtLimiteCredito.Text.ToDouble).FormatoNumero)) + lista.Add(New CrystalParametro("SaldoDisponible", (TxtLimiteCredito.Text.ToDouble).FormatoNumero())) - lista.Add(New CrystalParametro("SaldoIngDolares", SaldoIngDolares.FormatoNumero)) - lista.Add(New CrystalParametro("SaldoIngPesos", SaldoIngPesos.FormatoNumero)) - lista.Add(New CrystalParametro("TotalIng", TotalIng.FormatoNumero)) - lista.Add(New CrystalParametro("SaldoAntDolares", SaldoAntDolares.FormatoNumero)) - lista.Add(New CrystalParametro("SaldoAntPesos", SaldoAntPesos.FormatoNumero)) - lista.Add(New CrystalParametro("TotalAnt", TotalAnt.FormatoNumero)) + lista.Add(New CrystalParametro("SaldoIngDolares", SaldoIngDolares.FormatoNumero())) + lista.Add(New CrystalParametro("SaldoIngPesos", SaldoIngPesos.FormatoNumero())) + lista.Add(New CrystalParametro("TotalIng", TotalIng.FormatoNumero())) + lista.Add(New CrystalParametro("SaldoAntDolares", SaldoAntDolares.FormatoNumero())) + lista.Add(New CrystalParametro("SaldoAntPesos", SaldoAntPesos.FormatoNumero())) + lista.Add(New CrystalParametro("TotalAnt", TotalAnt.FormatoNumero())) lista.Add(New CrystalParametro("ContaIng", ContaIng)) lista.Add(New CrystalParametro("ContaAnt", ContaAnt)) @@ -4149,9 +4149,9 @@ Partial Class Clientes End Using End If - End Sub + End Sub #End Region - + #Region "E N V I O C O R R E O" Private Sub EnviaCorreo(Liga As String, LigaActivar As String) @@ -4205,7 +4205,7 @@ Partial Class Clientes SBBody.Append("
") 'Termino Cuerpo del correo - Dim Hilo As New System.Threading.Thread(Sub() MandaCorreo(Asunto, Para, SBBody.ToString)) + Dim Hilo As New System.Threading.Thread(Sub() MandaCorreo(Asunto, Para, SBBody.ToString())) Hilo.Start() Alert("El correo se ha enviado correctamente a: " + TxtEmail.Text + ".", TipoMensaje.MsgInformacion) Catch ex As Exception @@ -4219,11 +4219,11 @@ Partial Class Clientes a.GuardaLog() Dim Mail As New ClsSisMail() Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) - End Sub + End Sub #End Region - + #Region " COTIZACIONES " - + Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs) If BtnVerMasCot.Text = "Ver Más" Then CargaCotizaciones(-1) @@ -4236,11 +4236,11 @@ Partial Class Clientes Private Function CargaCotizaciones(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1) As Boolean Dim Retorno As Boolean = False Dim ObjClientes As New ClsClientes() - If ObjClientes.GetCotizaciones(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then + If ObjClientes.GetCotizaciones(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then If ObjClientes.DtResultados.Rows.Count > 0 Then 'Carga Generales - LtlCantidadCotizaciones.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString.FormatoNumero(2) - LtlFactorCotVentas.Text = If(LtlCantidad.Text.ToEntero > 0, (LtlCantidadCotizaciones.Text.ToEntero / LtlCantidad.Text.ToEntero).FormatoNumero, "0.00") + LtlCantidadCotizaciones.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString().FormatoNumero()(2) + LtlFactorCotVentas.Text = If(LtlCantidad.Text.ToEntero() > 0, (LtlCantidadCotizaciones.Text.ToEntero() / LtlCantidad.Text.ToEntero()).FormatoNumero(), "0.00") 'Carga Grid GvCot.DataSource = ObjClientes.DtResultados DtCotizaciones = ObjClientes.DtResultados @@ -4293,13 +4293,13 @@ Partial Class Clientes HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}" End If End If - End Sub + End Sub #End Region - + #Region "D I R E C C I O N E N V I O " Public Sub Edit_Click(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - CveDireccionEnvio = GvRow.DataKey("CveDireccionEnvio").ToEntero + CveDireccionEnvio = GvRow.DataKey("CveDireccionEnvio").ToEntero() TxtEnvioDireccion.Text = GvRow.DataKey("EnvioDireccion") TxtEnvioNoExt.Text = GvRow.DataKey("EnvioNoExt") TxtEnvioNoInt.Text = GvRow.DataKey("EnvioNoInt") @@ -4310,8 +4310,8 @@ Partial Class Clientes 'TxtDepartamento.Text = GvRow.DataKey("EnvioDepartamento") TxtEnvioCP.Text = GvRow.DataKey("EnvioCP") TxtEnvioTel.Text = GvRow.DataKey("EnvioTel") - ChkEstatus.Checked = If(GvRow.DataKey("Estatus").ToString = "True", True, False) - If GvRow.DataKey("CveClienteSucursal").ToEntero > 0 Then DdlClienteSucursalEnvio.SelectedValueExist(GvRow.DataKey("CveClienteSucursal")) Else DdlClienteSucursalEnvio.SelectedValueExist("-1") + ChkEstatus.Checked = If(GvRow.DataKey("Estatus").ToString() = "True", True, False) + If GvRow.DataKey("CveClienteSucursal").ToEntero() > 0 Then DdlClienteSucursalEnvio.SelectedValueExist(GvRow.DataKey("CveClienteSucursal")) Else DdlClienteSucursalEnvio.SelectedValueExist("-1") UpAddDireccion.Update() RegistraScript("$('#divAddDireccionEnvio').modal();") End Sub @@ -4321,14 +4321,14 @@ Partial Class Clientes Dim Estatus = If(ChkEstatus.Checked, 1, 0) If CveDireccionEnvio < 0 Then - CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.ToEntero, TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero, EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", "")) + CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.ToEntero(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", "")) If CveDireccionEnvio < 0 Then TieneError = True End If Else - If Not ObjClientes.DireccionEnvioUpdate(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.ToEntero, TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveDireccionEnvio, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero, EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", "")) Then + If Not ObjClientes.DireccionEnvioUpdate(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.ToEntero(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveDireccionEnvio, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", "")) Then TieneError = True End If @@ -4361,7 +4361,7 @@ Partial Class Clientes Dim ObjClientes As New ClsClientes Dim TieneError = False - Dim CveDireccionEnvio As Integer = GvDireccionesEnvio.Rows(e.RowIndex).DataKey("CveDireccionEnvio").ToEntero + Dim CveDireccionEnvio As Integer = GvDireccionesEnvio.Rows(e.RowIndex).DataKey("CveDireccionEnvio").ToEntero() If Not ObjClientes.DireccionEnvioRemove(CveDireccionEnvio) Then TieneError = True @@ -4375,12 +4375,12 @@ Partial Class Clientes End If CargaDireccionesEnvio() - End Sub - + End Sub + #End Region - + #Region " IMPORTAR SALDOS " - + Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click CargaClientesImportarSaldos() RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos")) @@ -4398,7 +4398,7 @@ Partial Class Clientes End Sub Private Sub ConsultarAnticiposSaldosClientes() Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.GetAnticiposNCIxCCliente(DdlClienteImportarSaldos.SelectedValue.ToEntero) Then + If ObjMovtos.GetAnticiposNCIxCCliente(DdlClienteImportarSaldos.SelectedValue.ToEntero()) Then GvImportarSaldos.DataSource = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0 AND Saldo > 0 AND CveIE > 0") Else GvImportarSaldos.DataSource = Nothing @@ -4429,7 +4429,7 @@ Partial Class Clientes Dim TieneError = False - Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Clientes/ImportarSaldos", 53, TxtCantidad.Text.Trim.ToDouble, TxtCantidad.Text.Trim.ToDouble, 1, TxtFechaImportarSaldos.Text.ToDate, "Traspaso de saldos de anticipos", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Clientes/ImportarSaldos", 53, TxtCantidad.Text.Trim.ToDouble, TxtCantidad.Text.Trim.ToDouble, 1, TxtFechaImportarSaldos.Text.ToDate(), "Traspaso de saldos de anticipos", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim IVA As Decimal = 0 Dim Importe As Decimal = 0 Dim ImporteAplicar As Decimal = 0 @@ -4437,11 +4437,11 @@ Partial Class Clientes For Each Gvr As GridViewRow In GvImportarSaldos.Rows If Gvr.FCCheckBox("Chk").Checked AndAlso Gvr.FCTextBox("TxtImporte").Text.ToDouble > 0 Then - Importe = Gvr.FCTextBox("TxtImporte").Text.ToDecimal - IVA = Importe / Gvr.DataKey("Original").ToString.ToDecimal * Gvr.DataKey("IVA").ToString.ToDecimal 'TOMA EN CUENTA EL IVA - CONCEPTO DIFERENTE + Importe = Gvr.FCTextBox("TxtImporte").Text.ToDecimal() + IVA = Importe / Gvr.DataKey("Original").ToString().ToDecimal() * Gvr.DataKey("IVA").ToString().ToDecimal() 'TOMA EN CUENTA EL IVA - CONCEPTO DIFERENTE ImporteAplicar = -(Importe - IVA) - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, "Traspaso de saldos de anticipos", 92, "Traspaso de saldos de anticipos.IVA", Now, 0, -1, CveCliente:=Gvr.DataKey("CveCliente").ToString.ToEntero, CveIE:=Gvr.DataKey("CveIE").ToString.ToEntero, ImporteMX:=ImporteAplicar) Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAplicar, "Traspaso de saldos de anticipos", 66, "Traspaso de saldos de anticipos.IVA", Now, 0, -1, CveCliente:=CveCliente, CveIE:=Gvr.DataKey("CveIE").ToString.ToEntero, ImporteMX:=ImporteAplicar) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, "Traspaso de saldos de anticipos", 92, "Traspaso de saldos de anticipos.IVA", Now, 0, -1, CveCliente:=Gvr.DataKey("CveCliente").ToString().ToEntero(), CveIE:=Gvr.DataKey("CveIE").ToString().ToEntero(), ImporteMX:=ImporteAplicar) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAplicar, "Traspaso de saldos de anticipos", 66, "Traspaso de saldos de anticipos.IVA", Now, 0, -1, CveCliente:=CveCliente, CveIE:=Gvr.DataKey("CveIE").ToString().ToEntero(), ImporteMX:=ImporteAplicar) Then TieneError = True End If Else @@ -4450,8 +4450,8 @@ Partial Class Clientes If Not TieneError Then If IVA > 0 Then - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -IVA, "Traspaso de saldos de anticipos.IVA", 61, "Traspaso de saldos de anticipos.IVA", Now, 0, -1, CveCliente:=Gvr.DataKey("CveCliente").ToString.ToEntero, CveIE:=Gvr.DataKey("CveIE").ToString.ToEntero, ImporteMX:=-IVA) Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, "Traspaso de saldos de anticipos. IVA", 61, "Traspaso de saldos de anticipos.IVA", Now, 0, -1, CveCliente:=CveCliente, CveIE:=Gvr.DataKey("CveIE").ToString.ToEntero, ImporteMX:=IVA) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -IVA, "Traspaso de saldos de anticipos.IVA", 61, "Traspaso de saldos de anticipos.IVA", Now, 0, -1, CveCliente:=Gvr.DataKey("CveCliente").ToString().ToEntero(), CveIE:=Gvr.DataKey("CveIE").ToString().ToEntero(), ImporteMX:=-IVA) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, "Traspaso de saldos de anticipos. IVA", 61, "Traspaso de saldos de anticipos.IVA", Now, 0, -1, CveCliente:=CveCliente, CveIE:=Gvr.DataKey("CveIE").ToString().ToEntero(), ImporteMX:=IVA) Then TieneError = True End If Else @@ -4486,9 +4486,9 @@ Partial Class Clientes e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ChkSaldo(this,{0},{1});", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.DBCampo("Saldo"))) e.Row.FCTextBox("TxtImporte").Attributes.Add("onKeyUp", String.Format("CambiaSaldo({0},this,{1});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"))) End If - End Sub + End Sub #End Region - + #Region "Cuentas/Equipos" Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs) HdnModalidad.Value = "I" @@ -4509,21 +4509,21 @@ Partial Class Clientes objCuentasEquipos.IniciaTransacSQL() If HdnModalidad.Value = "I" Then - If Not objCuentasEquipos.AddCuentaEquipo(CveCliente, DdlTipoCuentaDetalle.SelectedValue.ToEntero, TxtIdentificador.Text.Trim, TxtNoSerie.Text.Trim, DdlClienteSucursal.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If Not objCuentasEquipos.AddCuentaEquipo(CveCliente, DdlTipoCuentaDetalle.SelectedValue.ToEntero(), TxtIdentificador.Text.Trim, TxtNoSerie.Text.Trim, DdlClienteSucursal.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then TieneError = True End If - If Not GuardaCaracteristicas(HdnModalidad.Value.ToString, objCuentasEquipos.CveCuentaEquipo, objCuentasEquipos) Then + If Not GuardaCaracteristicas(HdnModalidad.Value.ToString(), objCuentasEquipos.CveCuentaEquipo, objCuentasEquipos) Then TieneError = True End If ElseIf HdnModalidad.Value = "U" Then - If Not objCuentasEquipos.UpdateCuentaEquipo(TxtIdentificador.Text, TxtNoSerie.Text, True, DdlClienteSucursal.SelectedValue.ToEntero, CveCuentaEquipo) Then + If Not objCuentasEquipos.UpdateCuentaEquipo(TxtIdentificador.Text, TxtNoSerie.Text, True, DdlClienteSucursal.SelectedValue.ToEntero(), CveCuentaEquipo) Then TieneError = True End If - If Not GuardaCaracteristicas(HdnModalidad.Value.ToString, CveCuentaEquipo, objCuentasEquipos) Then + If Not GuardaCaracteristicas(HdnModalidad.Value.ToString(), CveCuentaEquipo, objCuentasEquipos) Then TieneError = True End If @@ -4562,7 +4562,7 @@ Partial Class Clientes End Sub Private Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Handles BtnAgregarPS.Click Dim Objeto As New ClsGenerales - If Objeto.AddCuentaEquipoPS(DdlPS.SelectedValue.ToEntero, CveCuentaEquipo) Then + If Objeto.AddCuentaEquipoPS(DdlPS.SelectedValue.ToEntero(), CveCuentaEquipo) Then Alert("Se ha agregado correctamente.", TipoMensaje.MsgInformacion) CargaGridPS() End If @@ -4583,7 +4583,7 @@ Partial Class Clientes Dim Objeto As New ClsGenerales() HdnModalidad.Value = "U" - CveCuentaEquipo = GvRow.DataKey("CveCuentaEquipo").ToString.ToEntero + CveCuentaEquipo = GvRow.DataKey("CveCuentaEquipo").ToString().ToEntero() TxtIdentificador.Text = GvRow.DataKey("CuentaEquipo") TxtNoSerie.Text = GvRow.DataKey("NoSerie") DdlTipoCuentaDetalle.SelectedValueExist(GvRow.DataKey("CveTipoCuentaEquipo")) @@ -4624,7 +4624,7 @@ Partial Class Clientes Protected Sub GvCuentasEquipos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvCuentasEquipos.RowDeleting Dim Objeto As New ClsGenerales Dim TieneError = False - If Objeto.RemoveCuentaEquipo(GvCuentasEquipos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then + If Objeto.RemoveCuentaEquipo(GvCuentasEquipos.DataKeys(e.RowIndex).Value.ToString().ToEntero()) Then Alert("La cuenta Equipo se eliminó correctamente.", TipoMensaje.MsgInformacion) Else TieneError = True @@ -4640,8 +4640,8 @@ Partial Class Clientes Dim Objeto As New ClsGenerales Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim CveCtaEq As Integer = GvRow.DataKey("CveCuentaEquipo").ToString.ToEntero - Dim CvePS As Integer = GvRow.DataKey("CvePS").ToString.ToEntero + Dim CveCtaEq As Integer = GvRow.DataKey("CveCuentaEquipo").ToString().ToEntero() + Dim CvePS As Integer = GvRow.DataKey("CvePS").ToString().ToEntero() If Objeto.RemoveCuentaEquipoPS(CvePS, CveCtaEq) Then Alert("El PS se eliminó correctamente.", TipoMensaje.MsgInformacion) @@ -4670,15 +4670,15 @@ Partial Class Clientes End Sub Private Sub GvCuentasCaracteristicas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCuentasCaracteristicas.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - Dim CveCaracteristicaTipo As Integer = e.Row.DataKey("CveCaracteristicaTipo").ToEntero + Dim CveCaracteristicaTipo As Integer = e.Row.DataKey("CveCaracteristicaTipo").ToEntero() Dim dtTemp As New DataTable Dim objCaracteristicas As New ClsGenerales - Dim CveCaracteristica As Integer = e.Row.DataKey("CveCaracteristica").ToEntero - Dim CveCaracteristicaValor As Integer = e.Row.DataKey("CveCaracteristicaValor").ToEntero - Dim CveCaracteristicaOpcion As Integer = e.Row.DataKey("CveCaracteristicaOpcion").ToEntero + Dim CveCaracteristica As Integer = e.Row.DataKey("CveCaracteristica").ToEntero() + Dim CveCaracteristicaValor As Integer = e.Row.DataKey("CveCaracteristicaValor").ToEntero() + Dim CveCaracteristicaOpcion As Integer = e.Row.DataKey("CveCaracteristicaOpcion").ToEntero() Dim CaracteristicaValor As String = e.Row.DataKey("CaracteristicaValor") - Dim Logitud As Integer = e.Row.DataKey("Longitud").ToString.ToEntero + Dim Logitud As Integer = e.Row.DataKey("Longitud").ToString().ToEntero() Dim DdlCarcateristicaOpcion As DropDownList = e.Row.FCDropDownList("DdlCarcateristicaOpcion") Dim TxtCuentaValor As TextBox = e.Row.FCTextBox("TxtCuentaValor") @@ -4686,7 +4686,7 @@ Partial Class Clientes Dim chkCaracteristicaValor As CheckBox = e.Row.FCCheckBox("chkCaracteristicaValor") Dim Requerido As Integer - If e.Row.DataKey("Requerido").ToString.ToUpper = "TRUE" Then + If e.Row.DataKey("Requerido").ToString().ToUpper = "TRUE" Then Requerido = 1 Else Requerido = 0 @@ -4752,7 +4752,7 @@ Partial Class Clientes RdlCarcateristicaOpcion.DataBind() If CveCaracteristicaValor <> -1 Then - RdlCarcateristicaOpcion.SelectedValuesIfExist(CveCaracteristicaOpcion.ToString) + RdlCarcateristicaOpcion.SelectedValuesIfExist(CveCaracteristicaOpcion.ToString()) End If If Requerido = 1 Then @@ -4803,12 +4803,12 @@ Partial Class Clientes End Sub Private Sub GvAddCuentaCaracteristica_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAddCuentaCaracteristica.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - Dim CveCaracteristicaTipo As Integer = e.Row.DataKey("CveCaracteristicaTipo").ToEntero + Dim CveCaracteristicaTipo As Integer = e.Row.DataKey("CveCaracteristicaTipo").ToEntero() Dim dtTemp As New DataTable Dim objCaracteristicas As New ClsGenerales - Dim CveCaracteristica As Integer = e.Row.DataKey("CveCaracteristica").ToEntero - Dim Logitud As Integer = e.Row.DataKey("Longitud").ToString.ToEntero + Dim CveCaracteristica As Integer = e.Row.DataKey("CveCaracteristica").ToEntero() + Dim Logitud As Integer = e.Row.DataKey("Longitud").ToString().ToEntero() Dim DdlCarcateristicaOpcion As DropDownList = e.Row.FCDropDownList("DdlCarcateristicaOpcion") Dim TxtCuentaValor As TextBox = e.Row.FCTextBox("TxtCuentaValor") @@ -4820,7 +4820,7 @@ Partial Class Clientes End If Dim Requerido As Integer - If e.Row.DataKey("Requerido").ToString.ToUpper = "TRUE" Then + If e.Row.DataKey("Requerido").ToString().ToUpper = "TRUE" Then Requerido = 1 Else Requerido = 0 @@ -4913,10 +4913,10 @@ Partial Class Clientes Private Function GuardaCaracteristicas(Modalidad As String, CveCuentaEquipo As Integer, ByRef ObjCarac As ClsGenerales) As Boolean Dim Retorno = False - If Modalidad.ToString = "I" Then + If Modalidad.ToString() = "I" Then For Each gvr As GridViewRow In GvAddCuentaCaracteristica.Rows - Dim CveCaracteristica As Integer = gvr.DataKey("CveCaracteristica").ToEntero - Dim CveCaracteristicaTipo As Integer = gvr.DataKey("CveCaracteristicaTipo").ToEntero + Dim CveCaracteristica As Integer = gvr.DataKey("CveCaracteristica").ToEntero() + Dim CveCaracteristicaTipo As Integer = gvr.DataKey("CveCaracteristicaTipo").ToEntero() Dim _DdlCarcateristicaOpcion As DropDownList = gvr.FCDropDownList("DdlCarcateristicaOpcion") Dim _TxtCaracteristicaOpcion As TextBox = gvr.FCTextBox("TxtCuentaValor") @@ -4943,7 +4943,7 @@ Partial Class Clientes Exit Select Case 1 'drop - CveCaracteristicaOpcion = _DdlCarcateristicaOpcion.SelectedValue.ToEntero + CveCaracteristicaOpcion = _DdlCarcateristicaOpcion.SelectedValue.ToEntero() If CveCaracteristicaOpcion > 0 Then AgregaCaracteristica = True @@ -4953,7 +4953,7 @@ Partial Class Clientes Exit Select Case 2 'radio - CveCaracteristicaOpcion = _RdlCarcateristicaOpcion.SelectedValue.ToEntero + CveCaracteristicaOpcion = _RdlCarcateristicaOpcion.SelectedValue.ToEntero() If CveCaracteristicaOpcion > 0 Then AgregaCaracteristica = True @@ -4964,10 +4964,10 @@ Partial Class Clientes Case 3 'Fecha txt Fecha If _TxtCaracteristicaOpcion.Text.Trim.Length > 0 Then - CaracteristicaValorDate = _TxtCaracteristicaOpcion.Text.Trim.ToDate + CaracteristicaValorDate = _TxtCaracteristicaOpcion.Text.Trim.ToDate() CaracteristicaValor = CaracteristicaValorDate.ToString("dd/MM/yyyy") - If CaracteristicaValor.Trim.ToDate.ToString("dd/MM/yyyy").ToString.Length > 0 Then + If CaracteristicaValor.Trim.ToDate().ToString("dd/MM/yyyy").ToString().Length > 0 Then AgregaCaracteristica = True Else AgregaCaracteristica = False @@ -4997,7 +4997,7 @@ Partial Class Clientes Case 6 'txt numerico 'txt - CaracteristicaValor = _TxtCaracteristicaOpcion.Text.ToEntero.ToString + CaracteristicaValor = _TxtCaracteristicaOpcion.Text.ToEntero().ToString() AgregaCaracteristica = True Exit Select @@ -5011,12 +5011,12 @@ Partial Class Clientes End If End If Next - ElseIf Modalidad.ToString = "U" Then + ElseIf Modalidad.ToString() = "U" Then For Each gvr As GridViewRow In GvCuentasCaracteristicas.Rows - Dim _CaracteristicaValor As Integer = gvr.DataKey("CaracteristicaValor").ToEntero - Dim _CveCaracteristica As Integer = gvr.DataKey("CveCaracteristica").ToEntero - Dim _CveCaracteristicaValor As Integer = gvr.DataKey("CveCaracteristicaValor").ToEntero - Dim _CveCaracteristicaTipo As Integer = gvr.DataKey("CveCaracteristicaTipo").ToEntero + Dim _CaracteristicaValor As Integer = gvr.DataKey("CaracteristicaValor").ToEntero() + Dim _CveCaracteristica As Integer = gvr.DataKey("CveCaracteristica").ToEntero() + Dim _CveCaracteristicaValor As Integer = gvr.DataKey("CveCaracteristicaValor").ToEntero() + Dim _CveCaracteristicaTipo As Integer = gvr.DataKey("CveCaracteristicaTipo").ToEntero() Dim _DdlCarcateristicaOpcion As DropDownList = gvr.FCDropDownList("DdlCarcateristicaOpcion") Dim _TxtCaracteristicaOpcion As TextBox = gvr.FCTextBox("TxtCuentaValor") @@ -5035,16 +5035,16 @@ Partial Class Clientes Exit Select Case 1 'drop - CveCaracteristicaOpcion = _DdlCarcateristicaOpcion.SelectedValue.ToEntero + CveCaracteristicaOpcion = _DdlCarcateristicaOpcion.SelectedValue.ToEntero() Exit Select Case 2 'radio - CveCaracteristicaOpcion = _RdlCarcateristicaOpcion.SelectedValue.ToEntero + CveCaracteristicaOpcion = _RdlCarcateristicaOpcion.SelectedValue.ToEntero() Exit Select Case 3 'Fecha txt Fecha If _TxtCaracteristicaOpcion.Text.Trim.Length > 0 Then - CaracteristicaValorDate = _TxtCaracteristicaOpcion.Text.Trim.ToDate + CaracteristicaValorDate = _TxtCaracteristicaOpcion.Text.Trim.ToDate() CaracteristicaValor = CaracteristicaValorDate.ToString("dd/MM/yyyy") Exit Select End If @@ -5063,7 +5063,7 @@ Partial Class Clientes Case 6 'txt numerico 'txt - CaracteristicaValor = _TxtCaracteristicaOpcion.Text.ToEntero.ToString + CaracteristicaValor = _TxtCaracteristicaOpcion.Text.ToEntero().ToString() Exit Select End Select @@ -5076,9 +5076,9 @@ Partial Class Clientes End If Return Retorno - End Function + End Function #End Region - + #Region "GPS" Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click If hdnArrayDispositivo.Value.Length > 0 Then @@ -5091,12 +5091,12 @@ Partial Class Clientes Private Sub CargaDispositivos(Optional Estatus As Integer = 1) Dim ObjGPS As New ClsGPS If ObjGPS.DispositivosGet(-1, Estatus, CveCliente) Then - GvDatos.DataSource = ObjGPS.DtResultados + GvDatosGPS.DataSource = ObjGPS.DtResultados Else - GvDatos.DataSource = Nothing + GvDatosGPS.DataSource = Nothing End If ObjGPS.Dispose() - GvDatos.DataBind() + GvDatosGPS.DataBind() UpDispositivos.Update() End Sub Private Sub CargaGlobalDispositos() @@ -5112,29 +5112,49 @@ Partial Class Clientes ObjGPS.Dispose() End Sub - Protected Sub GvDispositivos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound + Protected Sub GvDatosGPS_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatosGPS.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - e.Row.VerticalAlign = VerticalAlign.Middle - If e.Row.DBCampo("Estatus").ToString.ToEntero = 1 Then + e.Row.VerticalAlign = VerticalAlign.Middle + e.Row.FCLabel("Lblnumero").Text = (e.Row.RowIndex + 1).ToString() + + If e.Row.DBCampo("Estatus").ToString().ToEntero() = 1 Then e.Row.FCLabel("LblEstatus").Text = "Activo" - e.Row.FCLabel("LblEstatus").CssClass = "label label-success" + e.Row.FCLabel("LblEstatus").CssClass = "label label-success" + e.Row.FindControl("imgD").Visible = True Else e.Row.FCLabel("LblEstatus").Text = "Inactivo" - e.Row.FCLabel("LblEstatus").CssClass = "label label-danger" + e.Row.FCLabel("LblEstatus").CssClass = "label label-danger" + e.Row.FindControl("imgD").Visible = False + End If - e.Row.FCLinkButton("imgE").Attributes.Add("onclick", $"javascript:AbrirVentana('/GPS/WizardDispositivos.aspx?CveDispositivo={e.Row.DBCampo("CveDispositivo").ToString}&CveCliente={CveCliente}&EsPopup=1', 801, 701);") + e.Row.FCLinkButton("imgE").Attributes.Add("onclick", $"javascript:AbrirVentana('/GPS/WizardDispositivos.aspx?CveDispositivo={e.Row.DBCampo("CveDispositivo").ToString()}&CveCliente={CveCliente}&EsPopup=1', 801, 701);") End If End Sub - Protected Sub GvDispositivos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting - Dim GPS As New ClsGPS - Dim CveDispositivo As Integer = GvDatos.Rows(e.RowIndex).DataKey("CveDispositivo").ToEntero - If GPS.DispositivosDelete(CveDispositivo) Then - Alert("El Dispositivo se eliminó correctamente", TipoMensaje.MsgInformacion) + Protected Sub GvDatosGPS_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatosGPS.RowDeleting + Dim continuar As Boolean = False + Using GPS As New ClsGPS() + Using ObjBitacora As New ClsOIEventos(GPS.IniciaTransacSQL()) + Dim CveDispositivo As Integer = GvDatosGPS.Rows(e.RowIndex).DataKey("CveDispositivo").ToEntero() + If GPS.DispositivosDelete(CveDispositivo) Then + If ObjBitacora.AddEventoBitacora(String.Format("Se eliminó el dispositivo ""{1} - {2} - {0}""", GvDatosGPS.Rows(e.RowIndex).DataKey("Display"), GvDatosGPS.Rows(e.RowIndex).DataKey("Modelo"), GvDatosGPS.Rows(e.RowIndex).DataKey("IMEI")), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCliente:=CveCliente) Then + continuar = True + End If + End If + If continuar Then + GPS.Commit() + Alert("El Dispositivo se eliminó correctamente", TipoMensaje.MsgInformacion) + Else + GPS.RollBack() + End If + End Using + End Using + If continuar Then + CargaDispositivos() + CargaGlobalDispositos() + CargaEventoBitacora() + End If - GPS.Dispose() - CargaDispositivos() - CargaGlobalDispositos() UpDispositivos.Update() End Sub Private Sub CargaEmpresasUsuario(CveEmpresa As Integer) @@ -5181,10 +5201,10 @@ Partial Class Clientes UpMoverDispositivo.Update() RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});") - End Sub - + End Sub + #End Region - + #Region "Sucursales" Public Sub CreaDTSucursales() @@ -5237,15 +5257,15 @@ Partial Class Clientes RowSucursal("CorreoCotiziacionSucursal") = TxtCorreoSucursalCotizacion.Text.Trim RowSucursal("ContactoSucursal") = TxtContactoSucursal.Text.Trim RowSucursal("NumCuenta") = TxtNumeroCuenta.Text - RowSucursal("CveVendedorSucursal") = DdlVendedorSucursal.SelectedValue.ToEntero - RowSucursal("CveMetodoPago") = DdlMetodoPagoSucursal.SelectedValue.ToEntero + RowSucursal("CveVendedorSucursal") = DdlVendedorSucursal.SelectedValue.ToEntero() + RowSucursal("CveMetodoPago") = DdlMetodoPagoSucursal.SelectedValue.ToEntero() RowSucursal("CveUsuario") = UsuarioActual.CveUsuario - RowSucursal("FechaIng") = Now.ToShortDateString + RowSucursal("FechaIng") = Now.ToShortDateString() RowSucursal("Usuario") = UsuarioActual.Usuario - RowSucursal("CveUsoCFDI") = DdlSucursalUsoCFDI.SelectedValue.ToEntero - RowSucursal("CveFormaPago33") = DdlSucursalFormaPago33.SelectedValue.ToEntero - RowSucursal("CveMetodoPago33") = DdlSucursalMetodoPago33.SelectedValue.ToEntero + RowSucursal("CveUsoCFDI") = DdlSucursalUsoCFDI.SelectedValue.ToEntero() + RowSucursal("CveFormaPago33") = DdlSucursalFormaPago33.SelectedValue.ToEntero() + RowSucursal("CveMetodoPago33") = DdlSucursalMetodoPago33.SelectedValue.ToEntero() RowSucursal("LT") = If(txtLt.Text.ToDouble <> 0, txtLt.Text, "0") RowSucursal("LG") = If(txtLg.Text.ToDouble <> 0, txtLg.Text, "0") @@ -5268,17 +5288,17 @@ Partial Class Clientes Dim Asunto As String = "" Dim TipoComprobante = "" - If HdnTipoDocto2.Value.ToString = "Ing" Then TipoComprobante = "Factura" - If HdnTipoDocto2.Value.ToString = "Egs" Then TipoComprobante = "Nota de Crédito" - If HdnTipoDocto2.Value.ToString = "Dev" Then TipoComprobante = "Nota de Devolución" - If HdnTipoDocto2.Value.ToString = "Rem" Then TipoComprobante = "Remisión" - If HdnTipoDocto2.Value.ToString = "Cot" Then TipoComprobante = "Cotización" - If HdnTipoDocto2.Value.ToString = "Ant" Then TipoComprobante = "Anticipo" + If HdnTipoDocto2.Value.ToString() = "Ing" Then TipoComprobante = "Factura" + If HdnTipoDocto2.Value.ToString() = "Egs" Then TipoComprobante = "Nota de Crédito" + If HdnTipoDocto2.Value.ToString() = "Dev" Then TipoComprobante = "Nota de Devolución" + If HdnTipoDocto2.Value.ToString() = "Rem" Then TipoComprobante = "Remisión" + If HdnTipoDocto2.Value.ToString() = "Cot" Then TipoComprobante = "Cotización" + If HdnTipoDocto2.Value.ToString() = "Ant" Then TipoComprobante = "Anticipo" Dim ObjVenta As New ClsVentas Dim Dr As DataRow = Nothing - If ObjVenta.GetVenta(HdnCveVenta2.Value.ToEntero, UsuarioActual.CveEmpresa) Then + If ObjVenta.GetVenta(HdnCveVenta2.Value.ToEntero(), UsuarioActual.CveEmpresa) Then If ObjVenta.DtResultados.Rows.Count > 0 Then Dr = ObjVenta.DtResultados.Rows(0) End If @@ -5290,11 +5310,11 @@ Partial Class Clientes Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) - Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString) + Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString()) If Dr IsNot Nothing Then - Cuerpo = Cuerpo.Replace("{""Fecha""}", Dr("Fecha").ToString.ToDate.ToShortDateString) - Cuerpo = Cuerpo.Replace("{""Total""}", Dr("Total").ToString.FormatoNumero) - Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", Dr("FechaVencimiento").ToString.ToDate.ToShortDateString) + Cuerpo = Cuerpo.Replace("{""Fecha""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) + Cuerpo = Cuerpo.Replace("{""Total""}", Dr("Total").ToString().FormatoNumero()) + Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", Dr("FechaVencimiento").ToString().ToDate().ToShortDateString()) End If End If @@ -5302,8 +5322,8 @@ Partial Class Clientes If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) - Asunto = Asunto.Replace("{""Sucursal""}", HdnSubProyecto2.Value.ToString) - Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString) + Asunto = Asunto.Replace("{""Sucursal""}", HdnSubProyecto2.Value.ToString()) + Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString()) End If If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso HdnTipoDocto2.Value.Contiene("Ing", "Egs") Then @@ -5335,7 +5355,7 @@ Partial Class Clientes End If Dim ObjVentas As New ClsVentas - ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta2.Value.ToEntero) + ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta2.Value.ToEntero()) ObjVentas.Dispose() Else Alert("No se pudo adjuntar el correo electrónico.", TipoMensaje.MsgError) @@ -5362,7 +5382,7 @@ Partial Class Clientes End If Dim ObjVentas As New ClsVentas - ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta2.Value.ToEntero) + ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta2.Value.ToEntero()) ObjVentas.Dispose() Else Alert("No se pudo adjuntar el correo electrónico.", TipoMensaje.MsgError) @@ -5389,7 +5409,7 @@ Partial Class Clientes End If Dim ObjVentas As New ClsVentas - ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta2.Value.ToEntero) + ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta2.Value.ToEntero()) ObjVentas.Dispose() Else Alert("No se pudo adjuntar el correo electrónico.", TipoMensaje.MsgError) @@ -5404,28 +5424,28 @@ Partial Class Clientes Catch ex As Exception OnError("Ocurrió error al mandar MAIL", ex) Dim ObjVentas As New ClsVentas - ObjVentas.UpdateVentaMail(3, HdnCveVenta2.Value.ToEntero) + ObjVentas.UpdateVentaMail(3, HdnCveVenta2.Value.ToEntero()) ObjVentas.Dispose() End Try End Sub Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) - If DdlSubProyecto.SelectedValue.ToEntero > 0 Then - Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).Rows(0) + If DdlSubProyecto.SelectedValue.ToEntero() > 0 Then + Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa).Rows(0) If Dr IsNot Nothing Then - If Dr("CvePrecioLista").ToString.ToEntero > 0 Then - DdlPrecioLista.SelectedValueExist(Dr("CvePrecioLista").ToString) + If Dr("CvePrecioLista").ToString().ToEntero() > 0 Then + DdlPrecioLista.SelectedValueExist(Dr("CvePrecioLista").ToString()) End If End If End If - End Sub - + End Sub + #End Region - + #Region "G P S" - - - + + + Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String) Try @@ -5480,7 +5500,7 @@ Partial Class Clientes SBBody.Append("
") 'Termino Cuerpo del correo - Dim Hilo As New System.Threading.Thread(Sub() MandaCorreo(Asunto, Para, SBBody.ToString)) + Dim Hilo As New System.Threading.Thread(Sub() MandaCorreo(Asunto, Para, SBBody.ToString())) Hilo.Start() Alert("El correo de activación se ha enviado correctamente a: " + TxtEmail.Text + ".", TipoMensaje.MsgInformacion) Catch ex As Exception @@ -5496,11 +5516,11 @@ Partial Class Clientes End If ObjClientes.Dispose() - End Sub - - + End Sub + + #End Region - + #Region "C O N T R A T O S" Private Sub CargaDatosContrato() If CveCliente <= 0 Then @@ -5532,7 +5552,7 @@ Partial Class Clientes Private Sub GvDatosAvance_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAvance.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("CveContrato").ToString.ToEntero = 0 Then + If e.Row.DBCampo("CveContrato").ToString().ToEntero() = 0 Then e.Row.Cells(0).Text = "Total:" e.Row.CssClass = "Totales white" End If @@ -5541,15 +5561,15 @@ Partial Class Clientes Private Sub GvContratosClienteInactivos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratosClienteInactivos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("CveContrato").ToString.ToEntero = 0 Then + If e.Row.DBCampo("CveContrato").ToString().ToEntero() = 0 Then e.Row.Cells(0).Text = "Total:" e.Row.CssClass = "Totales white" End If End If - End Sub - + End Sub + #End Region - + #Region "M E T O D O S " Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then @@ -5581,11 +5601,11 @@ Partial Class Clientes GVHistorial.DataBind() End Sub Private Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged - CargaCotizaciones(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) 'listo - CargaHistorial(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) 'listo - CargaCxC(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) 'listo - CargaAnticipos(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) 'listo - CargaBancos(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) 'listo + CargaCotizaciones(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) 'listo + CargaHistorial(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) 'listo + CargaCxC(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) 'listo + CargaAnticipos(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) 'listo + CargaBancos(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) 'listo UpDatos.Update() End Sub @@ -5598,7 +5618,7 @@ Partial Class Clientes For Each Dr As DataRow In DirectCast(ViewState("DTUsuariosCliente"), DataTable).Rows 'se desactiva el usuario y se restablece la contraseña - If Not ObjUsuario.UpdateUsuarioPortal(Dr("Usuario").ToString, Dr("Nombre").ToString, Dr("Correo").ToString, False, ContraseñaPredeterminadaEncriptada, Dr("CveCliente").ToString.ToEntero, Dr("CveProveedor").ToString.ToEntero, Dr("CveUsuario").ToString.ToEntero, UsuarioActual.CveUsuario) Then + If Not ObjUsuario.UpdateUsuarioPortal(Dr("Usuario").ToString(), Dr("Nombre").ToString(), Dr("Correo").ToString(), False, ContraseñaPredeterminadaEncriptada, Dr("CveCliente").ToString().ToEntero(), Dr("CveProveedor").ToString().ToEntero(), Dr("CveUsuario").ToString().ToEntero(), UsuarioActual.CveUsuario) Then ErrorUsuario = True End If Next @@ -5640,11 +5660,11 @@ Partial Class Clientes Dim ObjMov As New ClsContabilidad ObjMov.IniciaTransacSQL() - Dim CvePrePoliza As Integer = ObjMov.AddPrePolizas("Cli", 2, TxtCantidad.Text.Trim.ToDouble, TxtCantidad.Text.Trim.ToDouble, 1, TxtFechaPago.Text.ToDate, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = ObjMov.AddPrePolizas("Cli", 2, TxtCantidad.Text.Trim.ToDouble, TxtCantidad.Text.Trim.ToDouble, 1, TxtFechaPago.Text.ToDate(), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CvePrePoliza > 0 Then - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtCantidad.Text.ToDecimal, TxtReferencia.Text, 2, TxtReferencia.Text, Now, 0, -1, -1, CveVenta:=HdnCveVentaAbono.Value.ToEntero, CveCliente:=CveCliente) Then - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCantidad.Text.ToDecimal, TxtReferencia.Text, 4, TxtReferencia.Text, Now, 0, -1, -1, CveVenta:=HdnCveVentaAbono.Value.ToEntero, CveCliente:=CveCliente) Then + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtCantidad.Text.ToDecimal(), TxtReferencia.Text, 2, TxtReferencia.Text, Now, 0, -1, -1, CveVenta:=HdnCveVentaAbono.Value.ToEntero(), CveCliente:=CveCliente) Then + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCantidad.Text.ToDecimal(), TxtReferencia.Text, 4, TxtReferencia.Text, Now, 0, -1, -1, CveVenta:=HdnCveVentaAbono.Value.ToEntero(), CveCliente:=CveCliente) Then Else MsgError = "no se pudo insertar el detalle de la póliza2" @@ -5726,12 +5746,12 @@ Partial Class Clientes Private Sub SetValues() ViewState("Orden") = "" ViewState("OrdenUsuarios") = "" - TxtFechaPago.Text = Now.ToShortDateString - txtFechaI.Text = Now.ToShortDateString - txtFechaF.Text = Now.ToShortDateString - TxtFechaImportarSaldos.Text = Now.ToShortDateString - TxtFechaIUsados.Text = Now.FirstDayOfMonth.ToShortDateString - TxtFechaFUsados.Text = Now.LastDayOfMonth.ToShortDateString + TxtFechaPago.Text = Now.ToShortDateString() + txtFechaI.Text = Now.ToShortDateString() + txtFechaF.Text = Now.ToShortDateString() + TxtFechaImportarSaldos.Text = Now.ToShortDateString() + TxtFechaIUsados.Text = Now.FirstDayOfMonth.ToShortDateString() + TxtFechaFUsados.Text = Now.LastDayOfMonth.ToShortDateString() CobranzaTelefono = "" CodigoCliente = "" @@ -5893,7 +5913,7 @@ Partial Class Clientes SBBody.Append("
") 'Termino Cuerpo del correo - Dim Hilo As New System.Threading.Thread(Sub() MandaCorreo2(Asunto, Para, SBBody.ToString)) + Dim Hilo As New System.Threading.Thread(Sub() MandaCorreo2(Asunto, Para, SBBody.ToString())) Hilo.Start() Alert("El correo se ha enviado correctamente a: " + TxtCorreoUsuarioPortal.Text + ".", TipoMensaje.MsgInformacion) Catch ex As Exception @@ -5920,14 +5940,14 @@ Partial Class Clientes Dim StrSaldo As String = "" Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, -1) Then + If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString().ToEntero(), "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, -1) Then DtCxC = If(DdlTipoCuentasCxC.SelectedValue = "-1", If(DdlTipoDocto.SelectedValue = "-1", ObjMovtos.DtResultados, ObjMovtos.DtResultados.FiltraParametros($"TipoDocto = '{DdlTipoDocto.SelectedValue}'")), If(DdlTipoDocto.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act' ", "Moneda, OrdenVencimiento ,FechaVencimiento"), ObjMovtos.DtResultados.FiltraParametros($"Tipo = 'Act' AND TipoDocto = '{DdlTipoDocto.SelectedValue}'", "Moneda, OrdenVencimiento ,FechaVencimiento"))) Dim Pesos As Double = DtCxC.SUM("Saldo", "CveMoneda = 1 and CveVenta > 0") Dim Dolares As Double = DtCxC.SUM("Saldo", "CveMoneda = 2 and CveVenta > 0") - If Pesos > 0 Then StrSaldo = $" $ {Pesos.FormatoNumero} pesos" - If Dolares > 0 Then StrSaldo = $"{StrSaldo} ${Dolares.FormatoNumero} dólares" + If Pesos > 0 Then StrSaldo = $" $ {Pesos.FormatoNumero()} pesos" + If Dolares > 0 Then StrSaldo = $"{StrSaldo} ${Dolares.FormatoNumero()} dólares" ObjMovtos.Dispose() Else DtCxC = Nothing @@ -5959,13 +5979,13 @@ Partial Class Clientes End If - End Sub - + End Sub + #End Region - + #Region "IMPRIMIR GVHistorial" - - + + Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs) Dim retorno As Byte() = Nothing Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) @@ -6044,21 +6064,21 @@ Partial Class Clientes ObjClientes.Dispose() Return retorno - End Function - - + End Function + + #End Region - + #Region "C O B R A N Z A" Public Sub Visitas_Click(sender As Object, e As EventArgs) RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas")) - End Sub - + End Sub + #End Region - + #Region "Usuarios" Protected Sub GvUsuarios_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvUsuarios.RowDeleting - Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero + Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero() Dim ObjUsuarios As New ClsSisUsuarios If ObjUsuarios.DeleteClienteUsuario(CveUsuario, CveCliente) Then Alert("El Usuario se eliminó correctamente", TipoMensaje.MsgInformacion) @@ -6079,7 +6099,7 @@ Partial Class Clientes Protected Sub GvUsuarios_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvUsuarios.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - e.Row.FCLinkButton("imgE").Attributes.Add("onclick", $"javascript:AbrirVentana('/Sistemas/PopUpAddUsuario.aspx?CveUsuario={e.Row.DBCampo("CveUsuario").ToString}&CveCliente={CveCliente}', 801, 701);") + e.Row.FCLinkButton("imgE").Attributes.Add("onclick", $"javascript:AbrirVentana('/Sistemas/PopUpAddUsuario.aspx?CveUsuario={e.Row.DBCampo("CveUsuario").ToString()}&CveCliente={CveCliente}', 801, 701);") If UsuarioActual.Empresa.CvePlataforma = 1 Then e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(5).Visible = False @@ -6090,12 +6110,12 @@ Partial Class Clientes e.Row.Cells(5).Visible = False End If End If - End Sub + End Sub #End Region - - + + #Region "C U E N T A S - B A N C A R I A S" - + Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False) If CveCliente <= 0 Then Exit Sub @@ -6179,7 +6199,7 @@ Partial Class Clientes Dim Estatus As Boolean If ChkEstatus2.Checked = True Then Estatus = True Else Estatus = False - AgregarCuentaBanco(TxtNombreBanco.Text.Trim, TxtNumeroSucursal.Text.Trim, TxtCLABE.Text.Trim, TxtSWIFT.Text.Trim, TxtPlaza.Text.Trim, TxtNumeroCuenta2.Text.Trim, TxtConvenioCIE2.Text.Trim, TxtReferencia2.Text.Trim, "", DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, Estatus) + AgregarCuentaBanco(TxtNombreBanco.Text.Trim, TxtNumeroSucursal.Text.Trim, TxtCLABE.Text.Trim, TxtSWIFT.Text.Trim, TxtPlaza.Text.Trim, TxtNumeroCuenta2.Text.Trim, TxtConvenioCIE2.Text.Trim, TxtReferencia2.Text.Trim, "", DdlMoneda.SelectedValue.ToEntero(), DdlMoneda.SelectedItem.Text, Estatus) End Sub Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, RefCrediProveedor As String, CveMoneda As Integer, Moneda As String, Estatus As Boolean) Dim ObjCuentasBancos As New ClsGenerales @@ -6224,7 +6244,7 @@ Partial Class Clientes If CveCliente > 0 Then - If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, Estatus, CveMoneda) Then + If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, Estatus, CveMoneda) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente))) Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion) @@ -6268,8 +6288,8 @@ Partial Class Clientes TxtNumeroCuenta2.Text = "" TxtConvenioCIE2.Text = "" TxtReferencia2.Text = "" - End Sub - + End Sub + #Region "GRIDVIEW - CUENTAS BANCARIAS" Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -6297,7 +6317,7 @@ Partial Class Clientes Dim ObjCuentasBancos As New ClsGenerales If CveCliente > 0 Then - If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero) Then + If ObjCuentasBancos.RemoveCuentasDepositos(GvRow.DataKey("CveCuentaDeposito").ToEntero()) Then DTCuentasBancos.Clear() DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente))) @@ -6325,10 +6345,10 @@ Partial Class Clientes GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing End If - End Sub - + End Sub + #End Region - + Private Sub CargaPSGridCuentasBancos() If CveCliente > 0 Then GvBancosCuentas.DataSource = DTCuentasBancos @@ -6386,9 +6406,9 @@ Partial Class Clientes divestatus.Visible = True UpAddBancos.Update() RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias")) - End Sub + End Sub #End Region - + #Region "C L I E N T E S P A G O S R E A L I Z A D O S I M P R I M I R P D F/Excel" Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click GenerarPDF("Excel") @@ -6404,7 +6424,7 @@ Partial Class Clientes params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("AgrupadoPor", String.Format("Cliente: {0}", TxtNombreComercial.Text))) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime().ToShortDateString())) If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", logouri)) @@ -6414,11 +6434,11 @@ Partial Class Clientes ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato) - End Sub + End Sub #End Region - + #Region "VENTAS" - + Public Function imprimirFacturaVenta(CveVenta As Integer) As Byte() Dim ObjVentas As New ClsVentas Dim Vta As Modelos.Factura = Nothing @@ -6440,98 +6460,98 @@ Partial Class Clientes ' se rellenan los campos de la factura Vta = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.Factura) - Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString + Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString() 'se rellena la sucursal 'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel) Vta.SubProyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel) Vta.Cliente = New Modelos.ClienteModel - Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString - Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString - Vta.Cliente.Direccion = dtVentas(0)("ClienteDireccion").ToString - Vta.Cliente.CP = dtVentas(0)("CPCliente").ToString - Vta.Cliente.Ciudad = dtVentas(0)("ClienteCiudad").ToString - Vta.Cliente.Localidad = dtVentas(0)("ClienteLocalidad").ToString - Vta.Cliente.Estado = dtVentas(0)("ClienteEstado").ToString - Vta.Cliente.Pais = dtVentas(0)("ClientePais").ToString - Vta.Cliente.RFC = dtVentas(0)("ClienteRFC").ToString - Vta.Cliente.Colonia = dtVentas(0)("ColoniaCliente").ToString - Vta.AtencionA = dtVentas(0)("AtencionA").ToString - Vta.Cliente.NoExt = dtVentas(0)("ClienteNoExt").ToString - Vta.Cliente.NoInt = dtVentas(0)("ClienteNoInt").ToString - Vta.Cliente.Codigo = dtVentas(0)("ClienteCodigo").ToString - Vta.Cliente.Mail = dtVentas(0)("Mail").ToString - Vta.RefDocto = dtVentas(0)("Ref").ToString - Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero - Vta.Version = dtVentas(0)("Version").ToString + Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString() + Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString() + Vta.Cliente.Direccion = dtVentas(0)("ClienteDireccion").ToString() + Vta.Cliente.CP = dtVentas(0)("CPCliente").ToString() + Vta.Cliente.Ciudad = dtVentas(0)("ClienteCiudad").ToString() + Vta.Cliente.Localidad = dtVentas(0)("ClienteLocalidad").ToString() + Vta.Cliente.Estado = dtVentas(0)("ClienteEstado").ToString() + Vta.Cliente.Pais = dtVentas(0)("ClientePais").ToString() + Vta.Cliente.RFC = dtVentas(0)("ClienteRFC").ToString() + Vta.Cliente.Colonia = dtVentas(0)("ColoniaCliente").ToString() + Vta.AtencionA = dtVentas(0)("AtencionA").ToString() + Vta.Cliente.NoExt = dtVentas(0)("ClienteNoExt").ToString() + Vta.Cliente.NoInt = dtVentas(0)("ClienteNoInt").ToString() + Vta.Cliente.Codigo = dtVentas(0)("ClienteCodigo").ToString() + Vta.Cliente.Mail = dtVentas(0)("Mail").ToString() + Vta.RefDocto = dtVentas(0)("Ref").ToString() + Vta.CveVenta = dtVentas(0)("CveVenta").ToString().ToEntero() + Vta.Version = dtVentas(0)("Version").ToString() - Vta.NumeroContrato = dtVentas(0)("NumeroContrato").ToString - Vta.DescripcionContrato = dtVentas(0)("DescripcionContrato").ToString - Vta.NumeroDescripcionContrato = If($"{dtVentas(0)("NumeroContrato").ToString} - {dtVentas(0)("NumeroLicitacion").ToString}" = " - ", "", $"{dtVentas(0)("NumeroContrato").ToString} {If(dtVentas(0)("NumeroLicitacion").ToString = "", "", $" - Licitación: {dtVentas(0)("NumeroLicitacion").ToString}")}") + Vta.NumeroContrato = dtVentas(0)("NumeroContrato").ToString() + Vta.DescripcionContrato = dtVentas(0)("DescripcionContrato").ToString() + Vta.NumeroDescripcionContrato = If($"{dtVentas(0)("NumeroContrato").ToString()} - {dtVentas(0)("NumeroLicitacion").ToString()}" = " - ", "", $"{dtVentas(0)("NumeroContrato").ToString()} {If(dtVentas(0)("NumeroLicitacion").ToString() = "", "", $" - Licitación: {dtVentas(0)("NumeroLicitacion").ToString()}")}") - Vta.PedidoContrato = If(dtVentas(0)("PedidoContrato").ToString = "", Vta.NumeroDescripcionContrato, $"{dtVentas(0)("PedidoContrato").ToString} {If(Vta.NumeroDescripcionContrato = "", "", $" / {Vta.NumeroDescripcionContrato}") }") - 'Vta.PedidoContrato = dtVentas(0)("PedidoContrato").ToString + Vta.PedidoContrato = If(dtVentas(0)("PedidoContrato").ToString() = "", Vta.NumeroDescripcionContrato, $"{dtVentas(0)("PedidoContrato").ToString()} {If(Vta.NumeroDescripcionContrato = "", "", $" / {Vta.NumeroDescripcionContrato}") }") + 'Vta.PedidoContrato = dtVentas(0)("PedidoContrato").ToString() Vta.ClienteSucursal = New Modelos.SucursalModel - Vta.ClienteSucursal.Direccion = dtVentas(0)("SucClienteDireccion").ToString - Vta.ClienteSucursal.NoExt = dtVentas(0)("SucClienteNoExt").ToString - Vta.ClienteSucursal.NoInt = dtVentas(0)("SucClienteNoInt").ToString - Vta.ClienteSucursal.Colonia = dtVentas(0)("SucClienteColonia").ToString - Vta.ClienteSucursal.CP = dtVentas(0)("SucClienteCP").ToString - Vta.ClienteSucursal.Municipio = dtVentas(0)("SucClienteCiudad").ToString - Vta.ClienteSucursal.Estado = dtVentas(0)("SucClienteEstado").ToString - Vta.ClienteSucursal.Pais = dtVentas(0)("SucClientePais").ToString - Vta.ClienteSucursal.Localidad = dtVentas(0)("SucClienteLocalidad").ToString - Vta.ClienteSucursal.CorreoSucursal = dtVentas(0)("SucClienteCorreo").ToString - Vta.ClienteSucursal.TelefonoSucursal = dtVentas(0)("SucClienteTelefono").ToString - Vta.ClienteSucursal.Sucursal = dtVentas(0)("SucursalCliente").ToString - Vta.ClienteSucursal.ImprimeNombreSucursal = dtVentas(0)("ImprimeNombreSucursal").ToString + Vta.ClienteSucursal.Direccion = dtVentas(0)("SucClienteDireccion").ToString() + Vta.ClienteSucursal.NoExt = dtVentas(0)("SucClienteNoExt").ToString() + Vta.ClienteSucursal.NoInt = dtVentas(0)("SucClienteNoInt").ToString() + Vta.ClienteSucursal.Colonia = dtVentas(0)("SucClienteColonia").ToString() + Vta.ClienteSucursal.CP = dtVentas(0)("SucClienteCP").ToString() + Vta.ClienteSucursal.Municipio = dtVentas(0)("SucClienteCiudad").ToString() + Vta.ClienteSucursal.Estado = dtVentas(0)("SucClienteEstado").ToString() + Vta.ClienteSucursal.Pais = dtVentas(0)("SucClientePais").ToString() + Vta.ClienteSucursal.Localidad = dtVentas(0)("SucClienteLocalidad").ToString() + Vta.ClienteSucursal.CorreoSucursal = dtVentas(0)("SucClienteCorreo").ToString() + Vta.ClienteSucursal.TelefonoSucursal = dtVentas(0)("SucClienteTelefono").ToString() + Vta.ClienteSucursal.Sucursal = dtVentas(0)("SucursalCliente").ToString() + Vta.ClienteSucursal.ImprimeNombreSucursal = dtVentas(0)("ImprimeNombreSucursal").ToString() Vta.EnviarA = New Modelos.EnviarAModel - Vta.EnviarA.CveDireccionEnvio = dtVentas(0)("CveDireccionEnvio").ToString.ToEntero - Vta.EnviarA.EnvioDireccion = dtVentas(0)("EnvioDireccion").ToString - Vta.EnviarA.EnvioColonia = dtVentas(0)("EnvioColonia").ToString - Vta.EnviarA.EnvioCiudad = dtVentas(0)("EnvioCiudad").ToString - Vta.EnviarA.EnvioEstado = dtVentas(0)("EnvioEstado").ToString - Vta.EnviarA.EnvioCP = dtVentas(0)("EnvioCP").ToString + Vta.EnviarA.CveDireccionEnvio = dtVentas(0)("CveDireccionEnvio").ToString().ToEntero() + Vta.EnviarA.EnvioDireccion = dtVentas(0)("EnvioDireccion").ToString() + Vta.EnviarA.EnvioColonia = dtVentas(0)("EnvioColonia").ToString() + Vta.EnviarA.EnvioCiudad = dtVentas(0)("EnvioCiudad").ToString() + Vta.EnviarA.EnvioEstado = dtVentas(0)("EnvioEstado").ToString() + Vta.EnviarA.EnvioCP = dtVentas(0)("EnvioCP").ToString() - Vta.EnviarA.EnvioNoExt = dtVentas(0)("EnvioNoExt").ToString - Vta.EnviarA.EnvioNoInt = dtVentas(0)("EnvioNoInt").ToString - Vta.EnviarA.EnvioContacto = dtVentas(0)("EnvioContacto").ToString - 'Vta.EnviarA.EnvioPedidoContrato = dtVentas(0)("EnvioPedidoContrato").ToString + Vta.EnviarA.EnvioNoExt = dtVentas(0)("EnvioNoExt").ToString() + Vta.EnviarA.EnvioNoInt = dtVentas(0)("EnvioNoInt").ToString() + Vta.EnviarA.EnvioContacto = dtVentas(0)("EnvioContacto").ToString() + 'Vta.EnviarA.EnvioPedidoContrato = dtVentas(0)("EnvioPedidoContrato").ToString() 'INE COMPLEMENTO - If dtVentas(0)("TipoComite").ToString <> "" Then + If dtVentas(0)("TipoComite").ToString() <> "" Then Dim INE As New Modelos.ComplementoINE - INE.INETipoComite = dtVentas(0)("TipoComite").ToString - INE.INETipoProceso = dtVentas(0)("TipoProceso").ToString - INE.INEIdContabilidad = dtVentas(0)("IdContabilidad").ToString.ToEntero + INE.INETipoComite = dtVentas(0)("TipoComite").ToString() + INE.INETipoProceso = dtVentas(0)("TipoProceso").ToString() + INE.INEIdContabilidad = dtVentas(0)("IdContabilidad").ToString().ToEntero() Vta.ComplementoINE = INE End If Dim DR As DataRow = TmpDTImpuestos.NewRow() - If dtVentas(0)("SubTotal").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Subtotal" : DR("Importe") = dtVentas(0)("SubTotal").ToString.ToDouble : DR("Orden") = 10 : TmpDTImpuestos.Rows.Add(DR) + If dtVentas(0)("SubTotal").ToString().ToDouble <> 0 Then DR("ImpuestoLocal") = "Subtotal" : DR("Importe") = dtVentas(0)("SubTotal").ToString().ToDouble : DR("Orden") = 10 : TmpDTImpuestos.Rows.Add(DR) DR = TmpDTImpuestos.NewRow() - If dtVentas(0)("Descuento").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Descuentos" : DR("Importe") = dtVentas(0)("Descuento").ToString.ToDouble : DR("Orden") = 20 : TmpDTImpuestos.Rows.Add(DR) + If dtVentas(0)("Descuento").ToString().ToDouble <> 0 Then DR("ImpuestoLocal") = "Descuentos" : DR("Importe") = dtVentas(0)("Descuento").ToString().ToDouble : DR("Orden") = 20 : TmpDTImpuestos.Rows.Add(DR) DR = TmpDTImpuestos.NewRow() - If dtVentas(0)("Amortizacion").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Amort.Ant" : DR("Importe") = dtVentas(0)("Amortizacion").ToString.ToDouble : DR("Orden") = 30 : TmpDTImpuestos.Rows.Add(DR) + If dtVentas(0)("Amortizacion").ToString().ToDouble <> 0 Then DR("ImpuestoLocal") = "Amort.Ant" : DR("Importe") = dtVentas(0)("Amortizacion").ToString().ToDouble : DR("Orden") = 30 : TmpDTImpuestos.Rows.Add(DR) DR = TmpDTImpuestos.NewRow() - If dtVentas(0)("SubTotal").ToString.ToDouble <> (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) Then DR("ImpuestoLocal") = "SubTotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) : DR("Orden") = 40 : TmpDTImpuestos.Rows.Add(DR) + If dtVentas(0)("SubTotal").ToString().ToDouble <> (dtVentas(0)("SubTotal").ToString().ToDouble - dtVentas(0)("Descuento").ToString().ToDouble - dtVentas(0)("Amortizacion").ToString().ToDouble) Then DR("ImpuestoLocal") = "SubTotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString().ToDouble - dtVentas(0)("Descuento").ToString().ToDouble - dtVentas(0)("Amortizacion").ToString().ToDouble) : DR("Orden") = 40 : TmpDTImpuestos.Rows.Add(DR) DR = TmpDTImpuestos.NewRow() - If dtVentas(0)("IVA").ToString.ToDouble >= 0 Then DR("ImpuestoLocal") = "IVA" : DR("Importe") = dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 50 : TmpDTImpuestos.Rows.Add(DR) + If dtVentas(0)("IVA").ToString().ToDouble >= 0 Then DR("ImpuestoLocal") = "IVA" : DR("Importe") = dtVentas(0)("IVA").ToString().ToDouble : DR("Orden") = 50 : TmpDTImpuestos.Rows.Add(DR) 'solo para eclipse, que muesre un subtotal debajo de IVA - If UsuarioActual.CveEmpresa = 15 Then DR = TmpDTImpuestos.NewRow() : DR("ImpuestoLocal") = "Subtotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) + dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 51 : TmpDTImpuestos.Rows.Add(DR) + If UsuarioActual.CveEmpresa = 15 Then DR = TmpDTImpuestos.NewRow() : DR("ImpuestoLocal") = "Subtotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString().ToDouble - dtVentas(0)("Descuento").ToString().ToDouble - dtVentas(0)("Amortizacion").ToString().ToDouble) + dtVentas(0)("IVA").ToString().ToDouble : DR("Orden") = 51 : TmpDTImpuestos.Rows.Add(DR) DR = TmpDTImpuestos.NewRow() - If dtVentas(0)("RetIVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.IVA" : DR("Importe") = dtVentas(0)("RetIVA").ToString.ToDouble : DR("Orden") = 60 : TmpDTImpuestos.Rows.Add(DR) + If dtVentas(0)("RetIVA").ToString().ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.IVA" : DR("Importe") = dtVentas(0)("RetIVA").ToString().ToDouble : DR("Orden") = 60 : TmpDTImpuestos.Rows.Add(DR) DR = TmpDTImpuestos.NewRow() - If dtVentas(0)("RetISR").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.ISR" : DR("Importe") = dtVentas(0)("RetISR").ToString.ToDouble : DR("Orden") = 70 : TmpDTImpuestos.Rows.Add(DR) + If dtVentas(0)("RetISR").ToString().ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.ISR" : DR("Importe") = dtVentas(0)("RetISR").ToString().ToDouble : DR("Orden") = 70 : TmpDTImpuestos.Rows.Add(DR) DR = TmpDTImpuestos.NewRow() - If dtVentas(0)("IEPS").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "IEPS" : DR("Importe") = dtVentas(0)("IEPS").ToString.ToDouble : DR("Orden") = 80 : TmpDTImpuestos.Rows.Add(DR) + If dtVentas(0)("IEPS").ToString().ToDouble <> 0 Then DR("ImpuestoLocal") = "IEPS" : DR("Importe") = dtVentas(0)("IEPS").ToString().ToDouble : DR("Orden") = 80 : TmpDTImpuestos.Rows.Add(DR) DR = TmpDTImpuestos.NewRow() - If dtVentas(0)("Total").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Total" : DR("Importe") = dtVentas(0)("Total").ToString.ToDouble : DR("Orden") = 100 : TmpDTImpuestos.Rows.Add(DR) + If dtVentas(0)("Total").ToString().ToDouble <> 0 Then DR("ImpuestoLocal") = "Total" : DR("Importe") = dtVentas(0)("Total").ToString().ToDouble : DR("Orden") = 100 : TmpDTImpuestos.Rows.Add(DR) DR = TmpDTImpuestos.NewRow() If ObjVentas.GetVentaDetalle(CveVenta) Then 'Obtenemos el Detalle de la Oorden de Compra @@ -6544,9 +6564,9 @@ Partial Class Clientes If dtImpuesto.Rows.Count > 0 Then For Each Row As DataRow In dtImpuesto.Rows Dim Orden = 80 - If Row("Importe").ToString.ToDouble <> 0 Then - DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString - DR("Importe") = Row("Importe").ToString.ToDouble + If Row("Importe").ToString().ToDouble <> 0 Then + DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString() + DR("Importe") = Row("Importe").ToString().ToDouble DR("Orden") = Orden TmpDTImpuestos.Rows.Add(DR) DR = TmpDTImpuestos.NewRow() @@ -6570,30 +6590,30 @@ Partial Class Clientes End Try If DrIVA IsNot Nothing Then - DrIVA("Importe") = DrIVA("Importe").ToString.ToDouble + dr1("ImporteIVA").ToString.ToDouble + DrIVA("Importe") = DrIVA("Importe").ToString().ToDouble + dr1("ImporteIVA").ToString().ToDouble TmpDTImpuestosIVAIEPS.AcceptChanges() Else Dim DR2 As DataRow = TmpDTImpuestosIVAIEPS.NewRow() - If dr1("PorcentajeIVA").ToString.ToDouble >= 0 Then - DR2("Impuesto") = "IVA" : DR2("tasa") = "16 %" : DR2("Importe") = dr1("ImporteIVA").ToString.ToDouble : DR2("Orden") = "1" + If dr1("PorcentajeIVA").ToString().ToDouble >= 0 Then + DR2("Impuesto") = "IVA" : DR2("tasa") = "16 %" : DR2("Importe") = dr1("ImporteIVA").ToString().ToDouble : DR2("Orden") = "1" TmpDTImpuestosIVAIEPS.Rows.Add(DR2) TmpDTImpuestosIVAIEPS.AcceptChanges() End If End If Try - DrIEPS = TmpDTImpuestosIVAIEPS.Select($"Impuesto = 'IEPS' AND tasa = '{dr1("PorcentajeIEPS").ToString.ToDouble * 100} %'")(0) + DrIEPS = TmpDTImpuestosIVAIEPS.Select($"Impuesto = 'IEPS' AND tasa = '{dr1("PorcentajeIEPS").ToString().ToDouble * 100} %'")(0) Catch ex As Exception DrIEPS = Nothing End Try If DrIEPS IsNot Nothing Then - DrIEPS("Importe") = DrIEPS("Importe").ToString.ToDouble + dr1("ImporteIEPS").ToString.ToDouble + DrIEPS("Importe") = DrIEPS("Importe").ToString().ToDouble + dr1("ImporteIEPS").ToString().ToDouble TmpDTImpuestosIVAIEPS.AcceptChanges() Else Dim DR2 As DataRow = TmpDTImpuestosIVAIEPS.NewRow() - If dr1("PorcentajeIEPS").ToString.ToDouble > 0 Then - DR2("Impuesto") = "IEPS" : DR2("tasa") = String.Format("{0} {1}", dr1("PorcentajeIEPS").ToString.ToDouble * 100, "%") : DR2("Importe") = dr1("ImporteIEPS").ToString.ToDouble : DR2("Orden") = If(dr1("PorcentajeIEPS").ToString = "0.03", "2", If(dr1("PorcentajeIEPS").ToString = "0.06", "3", If(dr1("PorcentajeIEPS").ToString = "0.07", "4", If(dr1("PorcentajeIEPS").ToString = "0.09", "5", "")))) + If dr1("PorcentajeIEPS").ToString().ToDouble > 0 Then + DR2("Impuesto") = "IEPS" : DR2("tasa") = String.Format("{0} {1}", dr1("PorcentajeIEPS").ToString().ToDouble * 100, "%") : DR2("Importe") = dr1("ImporteIEPS").ToString().ToDouble : DR2("Orden") = If(dr1("PorcentajeIEPS").ToString() = "0.03", "2", If(dr1("PorcentajeIEPS").ToString() = "0.06", "3", If(dr1("PorcentajeIEPS").ToString() = "0.07", "4", If(dr1("PorcentajeIEPS").ToString() = "0.09", "5", "")))) TmpDTImpuestosIVAIEPS.Rows.Add(DR2) TmpDTImpuestosIVAIEPS.AcceptChanges() End If @@ -6607,7 +6627,7 @@ Partial Class Clientes End If If UsuarioActual.CveEmpresa.Contiene(119) Then - If dtVentas(0)("TipoDocto").ToString.Contiene("Ing", "Ant", "Rem") Then + If dtVentas(0)("TipoDocto").ToString().Contiene("Ing", "Ant", "Rem") Then 'carga as notas de credito vinculadas If ObjVentas.GetVentasAntNC(CveVenta, -1) Then Vta.DtDocumentosRelacionados = ObjVentas.DtResultados @@ -6615,7 +6635,7 @@ Partial Class Clientes End If End If - If dtVentas(0)("TipoDocto").ToString.Contiene("Egs", "Dev", "Ant") Then + If dtVentas(0)("TipoDocto").ToString().Contiene("Egs", "Dev", "Ant") Then If ObjVentas.GetVentasAntNC(-1, CveVenta) Then Vta.DtDocumentosRelacionados = ObjVentas.DtResultados End If @@ -6624,7 +6644,7 @@ Partial Class Clientes 'CFDI RELACIONADO - If dtVentas(0)("CveTipoRelacion").ToString.ToEntero > 0 Then + If dtVentas(0)("CveTipoRelacion").ToString().ToEntero() > 0 Then Vta.Timbre.Comprobante.TipoComprobante = If(Vta.TipoDocto.Contiene("Ing", "Ant"), "I", If(Vta.TipoDocto.Contiene("Egs", "Dev"), "E", "")) If Vta.Timbre.Comprobante.TipoComprobante = "E" Then If Vta.TipoDocto.Contiene("Egs") Then @@ -6635,12 +6655,12 @@ Partial Class Clientes Vta.Timbre.CFDIRelacionados.TipoRelacion = "03" Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso" End If - Vta.Timbre.CFDIRelacionados.UUID.Add(dtVentas(0)("FolioFiscalPadre").ToString) + Vta.Timbre.CFDIRelacionados.UUID.Add(dtVentas(0)("FolioFiscalPadre").ToString()) End If ' cuando es refacturacoin es cfdirelacionado, con relacion 04 - If Vta.Timbre.Comprobante.TipoComprobante = "I" AndAlso (dtVentas(0)("Total").ToString.ToDouble = dtVentas(0)("TotalPadre").ToString.ToDouble) Then + If Vta.Timbre.Comprobante.TipoComprobante = "I" AndAlso (dtVentas(0)("Total").ToString().ToDouble = dtVentas(0)("TotalPadre").ToString().ToDouble) Then Vta.Timbre.CFDIRelacionados.TipoRelacion = "04" - Vta.Timbre.CFDIRelacionados.UUID.Add(dtVentas(0)("FolioFiscalPadre").ToString) + Vta.Timbre.CFDIRelacionados.UUID.Add(dtVentas(0)("FolioFiscalPadre").ToString()) Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Refacturación de Ingreso" End If End If @@ -6649,10 +6669,10 @@ Partial Class Clientes ObjVentas.Dispose() Return PdfFactura(Vta) - End Function - + End Function + #End Region - + #Region "COMERCIO EXTERIOR" Public Sub CargaCombosComercioExterior() @@ -6693,8 +6713,8 @@ Partial Class Clientes Private Sub CargaEstado() DdlEstado.Items.Clear() - If DdlPais.SelectedValue.ToEntero > 0 Then - DdlEstado.DataSource = GlobalDTEstado(GlobalDTPais.FiltraParametros($"CvePais = {DdlPais.SelectedValue.ToEntero}")(0)("ClaveSATPais").ToString) + If DdlPais.SelectedValue.ToEntero() > 0 Then + DdlEstado.DataSource = GlobalDTEstado(GlobalDTPais.FiltraParametros($"CvePais = {DdlPais.SelectedValue.ToEntero()}")(0)("ClaveSATPais").ToString()) End If DdlEstado.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlEstado.DataBind() @@ -6702,8 +6722,8 @@ Partial Class Clientes Private Sub CargaMunicipio() DdlMunicipio.Items.Clear() - If DdlEstado.SelectedValue.ToEntero > 0 Then - DdlMunicipio.DataSource = GlobalDTMunicipio(GlobalDTEstado(GlobalDTPais.FiltraParametros($"CvePais = {DdlPais.SelectedValue.ToEntero}")(0)("ClaveSATPais").ToString).FiltraParametros($"CveEstado = {DdlEstado.SelectedValue.ToEntero}")(0)("ClaveSATEstado").ToString) + If DdlEstado.SelectedValue.ToEntero() > 0 Then + DdlMunicipio.DataSource = GlobalDTMunicipio(GlobalDTEstado(GlobalDTPais.FiltraParametros($"CvePais = {DdlPais.SelectedValue.ToEntero()}")(0)("ClaveSATPais").ToString()).FiltraParametros($"CveEstado = {DdlEstado.SelectedValue.ToEntero()}")(0)("ClaveSATEstado").ToString()) End If DdlMunicipio.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlMunicipio.DataBind() @@ -6711,8 +6731,8 @@ Partial Class Clientes Private Sub CargaColonia() DdlColonia.Items.Clear() - If DdlMunicipio.SelectedValue.ToEntero > 0 Then - DdlColonia.DataSource = GlobalDTColonia(GlobalDTMunicipio(GlobalDTEstado(GlobalDTPais.FiltraParametros($"CvePais = {DdlPais.SelectedValue.ToEntero}")(0)("ClaveSATPais").ToString).FiltraParametros($"CveEstado = {DdlEstado.SelectedValue.ToEntero}")(0)("ClaveSATEstado").ToString).FiltraParametros($"CveMunicipio = {DdlMunicipio.SelectedValue.ToEntero}")(0)("ClaveSATMunicipio").ToString) + If DdlMunicipio.SelectedValue.ToEntero() > 0 Then + DdlColonia.DataSource = GlobalDTColonia(GlobalDTMunicipio(GlobalDTEstado(GlobalDTPais.FiltraParametros($"CvePais = {DdlPais.SelectedValue.ToEntero()}")(0)("ClaveSATPais").ToString()).FiltraParametros($"CveEstado = {DdlEstado.SelectedValue.ToEntero()}")(0)("ClaveSATEstado").ToString()).FiltraParametros($"CveMunicipio = {DdlMunicipio.SelectedValue.ToEntero()}")(0)("ClaveSATMunicipio").ToString()) End If DdlColonia.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlColonia.DataBind() @@ -6766,12 +6786,12 @@ Partial Class Clientes End Sub Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs) CargaColonia() - End Sub - + End Sub + #End Region - + #Region "D O C U M E N T A C I O N " - + Private Sub CargaDocumentacionCliente() Dim objRH As New ClsEdocumentacion() @@ -6794,17 +6814,17 @@ Partial Class Clientes Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim chkEstatus As CheckBox - CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero - CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString.ToEntero + CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero() + CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString().ToEntero() Documentacion = GvRow.DataKey("Documentacion") - AdjuntoDocumentacion = GvRow.DataKey("Adjunto").ToString + AdjuntoDocumentacion = GvRow.DataKey("Adjunto").ToString() chkEstatus = GvRow.FCCheckBox("chkEstatus") ObservacionDocumentacion = GvRow.FCTextBox("TxtObservaciones").Text.Trim.ToUpper - FechaLimite = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate + FechaLimite = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate() AdjuntoDocumentacion = GvRow.DataKey("Adjunto") @@ -6821,10 +6841,10 @@ Partial Class Clientes For Each dRow As GridViewRow In GvDocumentosCliente.Rows - Dim _CveDocumentacion As Integer = dRow.DataKey("CveDocumentacion").ToString.ToEntero + Dim _CveDocumentacion As Integer = dRow.DataKey("CveDocumentacion").ToString().ToEntero() Dim _Adjunto As String = dRow.DataKey("Adjunto") 'Dim _Documentacion As String = dRow.DataKey("Documentacion") - Dim _CveDocumentacionElectronica As Integer = dRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero + Dim _CveDocumentacionElectronica As Integer = dRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero() Dim _txtObservaciones As TextBox = dRow.FCTextBox("TxtObservaciones") Dim _TxtFechaLimite As TextBox = dRow.FCTextBox("TxtFechaLimite") Dim _TxtFechaVigencia As TextBox = dRow.FCTextBox("TxtFechaVigencia") @@ -6836,12 +6856,12 @@ Partial Class Clientes Dim _FechaVigencia As Date Dim _FechaLimite As Date - Dim DiasLimite As Integer = dRow.DataKey("DiasLimite").ToString.ToEntero - Dim AplicaDiasLimite As Boolean = If(dRow.DataKey("AplicaDiasLimite").ToString = "1", True, False) - Dim AplicaFechaVencimiento As Boolean = If(dRow.DataKey("AplicaFechaVencimiento").ToString = "1", True, False) + Dim DiasLimite As Integer = dRow.DataKey("DiasLimite").ToString().ToEntero() + Dim AplicaDiasLimite As Boolean = If(dRow.DataKey("AplicaDiasLimite").ToString() = "1", True, False) + Dim AplicaFechaVencimiento As Boolean = If(dRow.DataKey("AplicaFechaVencimiento").ToString() = "1", True, False) If _TxtFechaVigencia.Text.Length = 10 Then - _FechaVigencia = _TxtFechaVigencia.Text.ToDate + _FechaVigencia = _TxtFechaVigencia.Text.ToDate() Else _FechaVigencia = Nothing End If @@ -6849,7 +6869,7 @@ Partial Class Clientes If Not AplicaDiasLimite Then _FechaLimite = MinFecha Else - _FechaLimite = _TxtFechaLimite.Text.ToDate + _FechaLimite = _TxtFechaLimite.Text.ToDate() End If If Not AplicaFechaVencimiento Then @@ -6962,10 +6982,10 @@ Partial Class Clientes Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim activo As Boolean = False - Dim _CveDocumentacionElectronica As Integer = GvRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero - Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString.ToEntero - Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString - Dim _fechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate + Dim _CveDocumentacionElectronica As Integer = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero() + Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero() + Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString() + Dim _fechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate() Dim obserbaciones As String = DirectCast(GvRow.FindControl("TxtObservaciones"), TextBox).Text 'Dim DDLEstatus As DropDownList = DirectCast(GvRow.FindControl("DDLEstatus"), DropDownList) @@ -7000,10 +7020,10 @@ Partial Class Clientes Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim activo As Boolean = False - Dim _CveDocumentacionElectronica As Integer = GvRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero - Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString.ToEntero - Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString - Dim _fechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate + Dim _CveDocumentacionElectronica As Integer = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero() + Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero() + Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString() + Dim _fechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate() Dim obserbaciones As String = DirectCast(GvRow.FindControl("TxtObservaciones"), TextBox).Text 'Dim DDLEstatus As DropDownList = DirectCast(GvRow.FindControl("DDLEstatus"), DropDownList) Dim chkCompleto As CheckBox = DirectCast(GvRow.FindControl("chkEstatus"), CheckBox) @@ -7115,7 +7135,7 @@ Partial Class Clientes If e.Row.RowType = DataControlRowType.DataRow Then - Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString + Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString() Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato") 'Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad") Dim LnkDownLoadDoc As LinkButton = e.Row.FCLinkButton("LnkDownLoadDoc") @@ -7123,10 +7143,10 @@ Partial Class Clientes Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite") Dim requerido As Boolean = If(e.Row.DBCampo("Requerido").ToUpper = "TRUE", True, False) Dim chkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus") - Dim documentacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString - Dim Documentacion As String = e.Row.DBCampo("Documentacion").ToString - Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero - Dim separado As Char() = ".".ToString.ToCharArray + Dim documentacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString() + Dim Documentacion As String = e.Row.DBCampo("Documentacion").ToString() + Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString().ToEntero() + Dim separado As Char() = ".".ToString().ToCharArray Dim array() As String = Adjunto.Split(separado) Dim extencion As String = "" Dim existeAdjunto As Boolean = False @@ -7141,9 +7161,9 @@ Partial Class Clientes ' FechaVigencia - Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString.ToEntero - Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString = "1", True, False) - Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString = "1", True, False) + Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString().ToEntero() + Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString() = "1", True, False) + Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString() = "1", True, False) txtFechaLimite.Visible = If(AplicaDiasLimite, True, False) TxtFechaVigencia.Visible = If(AplicaFechaVencimiento, True, False) @@ -7154,14 +7174,14 @@ Partial Class Clientes ' RegistraScript(scripMascara) If TxtFechaVigencia.Text.Length = 10 Then - TxtFechaVigencia.Text = TxtFechaVigencia.Text.ToDate.ToString("dd/MM/yyyy") + TxtFechaVigencia.Text = TxtFechaVigencia.Text.ToDate().ToString("dd/MM/yyyy") End If If array.Length > 0 Then extencion = array(array.Length - 1) End If - If e.Row.DBCampo("Estatus").ToString.ToEntero = 1 Then + If e.Row.DBCampo("Estatus").ToString().ToEntero() = 1 Then chkEstatus.Checked = True Else chkEstatus.Checked = False @@ -7175,7 +7195,7 @@ Partial Class Clientes LnkDownLoadDoc.Visible = True End If - txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString.ToDate.ToString("dd/MM/yyyy") + txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString().ToDate().ToString("dd/MM/yyyy") If Adjunto.Trim.Length > 0 Or (Documentacion = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140) Then @@ -7203,7 +7223,7 @@ Partial Class Clientes ' ImgRequired.Text = " " End If - If UsuarioActual.TienePermisoProceso(248) And e.Row.DBCampo("Estatus").ToString.ToEntero = 1 And LnkDownLoadDoc.Visible Then + If UsuarioActual.TienePermisoProceso(248) And e.Row.DBCampo("Estatus").ToString().ToEntero() = 1 And LnkDownLoadDoc.Visible Then e.Row.FCLinkButton("LnkGvDocumentosEliminar").Visible = True End If @@ -7214,7 +7234,7 @@ Partial Class Clientes Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString.ToEntero + Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero() Dim DocumentacionFormato As String = CveDocumentacion & "_" & GvRow.DataKey("DocumentacionFormato") DescarFormato(DocumentacionFormato) @@ -7237,7 +7257,7 @@ Partial Class Clientes Dim objDoc As New clsGemBoxDocument(pathDesti) Dim objRH As New ClsRH - Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString & " del " & Now.Year.ToString() + Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString() objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(-1, UsuarioActual.CveEmpresa)) ' Pendiente @@ -7269,20 +7289,20 @@ Partial Class Clientes ' If objRH.PersonalReclutamientoGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{APaterno}", objRH.DtResultados(0)("APaterno").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{APaterno}", objRH.DtResultados(0)("APaterno").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{AMaterno}", objRH.DtResultados(0)("AMaterno").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{AMaterno}", objRH.DtResultados(0)("AMaterno").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{RFC}", objRH.DtResultados(0)("RFC").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{RFC}", objRH.DtResultados(0)("RFC").ToString())) @@ -7291,105 +7311,105 @@ Partial Class Clientes - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", objRH.DtResultados(0)("Peso").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", objRH.DtResultados(0)("Peso").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", objRH.DtResultados(0)("LugarNacimiento").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", objRH.DtResultados(0)("LugarNacimiento").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", objRH.DtResultados(0)("Edad").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", objRH.DtResultados(0)("Edad").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", objRH.DtResultados(0)("NombreTelEmergencia").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", objRH.DtResultados(0)("NombreTelEmergencia").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", objRH.DtResultados(0)("TipoSangre").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", objRH.DtResultados(0)("TipoSangre").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Vivienda}", objRH.DtResultados(0)("Vivienda").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Vivienda}", objRH.DtResultados(0)("Vivienda").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{ViviendaDueno}", objRH.DtResultados(0)("ViviendaDueno").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{ViviendaDueno}", objRH.DtResultados(0)("ViviendaDueno").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{CreditoInfonavit}", objRH.DtResultados(0)("CreditoInfonavit").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{CreditoInfonavit}", objRH.DtResultados(0)("CreditoInfonavit").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString.ToDecimal.ToString("###,###,###.00"))) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString().ToDecimal().ToString("###,###,###.00"))) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormente}", objRH.DtResultados(0)("TrabajadoAnteriormente").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormente}", objRH.DtResultados(0)("TrabajadoAnteriormente").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormenteObservaciones}", objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormenteObservaciones}", objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelito}", objRH.DtResultados(0)("AcusadoDelito").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelito}", objRH.DtResultados(0)("AcusadoDelito").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelitoObservaciones}", objRH.DtResultados(0)("AcusadoDelitoObservaciones").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelitoObservaciones}", objRH.DtResultados(0)("AcusadoDelitoObservaciones").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Calle}", objRH.DtResultados(0)("Calle").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Calle}", objRH.DtResultados(0)("Calle").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Colonia}", objRH.DtResultados(0)("Colonia").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Colonia}", objRH.DtResultados(0)("Colonia").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{CP}", objRH.DtResultados(0)("CP").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{CP}", objRH.DtResultados(0)("CP").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Telefono}", objRH.DtResultados(0)("Telefono").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Telefono}", objRH.DtResultados(0)("Telefono").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Celular}", objRH.DtResultados(0)("Celular").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Celular}", objRH.DtResultados(0)("Celular").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Correo}", objRH.DtResultados(0)("Correo").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Correo}", objRH.DtResultados(0)("Correo").ToString())) ' 'If Not IsDBNull(objRH.DtResultados(0)("CveSucursal")) Then @@ -7399,45 +7419,45 @@ Partial Class Clientes - ' ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Licencia}", objRH.DtResultados(0)("Licencia").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Licencia}", objRH.DtResultados(0)("Licencia").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{CartillaMilitar}", objRH.DtResultados(0)("CartillaMilitar").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{CartillaMilitar}", objRH.DtResultados(0)("CartillaMilitar").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{CURP}", objRH.DtResultados(0)("CURP").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{CURP}", objRH.DtResultados(0)("CURP").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{AutorizaAntidoping}", objRH.DtResultados(0)("AutorizaAntidoping").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{AutorizaAntidoping}", objRH.DtResultados(0)("AutorizaAntidoping").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Observaciones}", objRH.DtResultados(0)("Observaciones").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Observaciones}", objRH.DtResultados(0)("Observaciones").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{FechaIngreso}", objRH.DtResultados(0)("FechaIngreso").ToString.ToDate.ToShortDateString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{FechaIngreso}", objRH.DtResultados(0)("FechaIngreso").ToString().ToDate().ToShortDateString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString.ToDate.ToShortDateString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString().ToDate().ToShortDateString())) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Puesto}", objRH.DtResultados(0)("Puesto").ToString)) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Puesto}", objRH.DtResultados(0)("Puesto").ToString())) ' ListaTagsDocumentost.Add(New TagsDocumentos("{CUIP}", "")) ' ListaTagsDocumentost.Add(New TagsDocumentos("{Denominacion}", "")) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", objRH.DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("dd/MM/yyyy"))) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", objRH.DtResultados(0)("FechaNacimiento").ToString().ToDate().ToString("dd/MM/yyyy"))) ' Dim fechaActual As String = " " & Now.Day & " del mes " & Now.Month & " del año " & Now.Year @@ -7472,117 +7492,117 @@ Partial Class Clientes '' If objRH.PersonalReclutamientoGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then '' If Not IsDBNull(objRH.DtResultados(0)("Nombres")) Then - '' ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").ToString)) + '' ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").ToString())) '' End If '' If Not objRH.DtResultados(0)("APaterno") Is Nothing Then - '' ListaTagsDocumentost.Add(New TagsDocumentos("{APaterno}", objRH.DtResultados(0)("APaterno").ToString)) + '' ListaTagsDocumentost.Add(New TagsDocumentos("{APaterno}", objRH.DtResultados(0)("APaterno").ToString())) '' End If '' If Not objRH.DtResultados(0)("AMaterno") Is Nothing Then - '' ListaTagsDocumentost.Add(New TagsDocumentos("{AMaterno}", objRH.DtResultados(0)("AMaterno").ToString)) + '' ListaTagsDocumentost.Add(New TagsDocumentos("{AMaterno}", objRH.DtResultados(0)("AMaterno").ToString())) '' End If '' If Not objRH.DtResultados(0)("NombreCompleto") Is Nothing Then - '' ListaTagsDocumentost.Add(New TagsDocumentos("{NombreCompleto}", objRH.DtResultados(0)("NombreCompleto").ToString)) + '' ListaTagsDocumentost.Add(New TagsDocumentos("{NombreCompleto}", objRH.DtResultados(0)("NombreCompleto").ToString())) '' End If '' If Not IsDBNull(objRH.DtResultados(0)("Estatura")) Then - '' ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").ToString)) + '' ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").ToString())) '' End If '' If Not IsDBNull(objRH.DtResultados(0)("Peso")) Then - '' ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", objRH.DtResultados(0)("Peso").ToString)) + '' ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", objRH.DtResultados(0)("Peso").ToString())) '' End If '' If Not IsDBNull(objRH.DtResultados(0)("LugarNacimiento")) Then - '' ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", objRH.DtResultados(0)("LugarNacimiento").ToString)) + '' ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", objRH.DtResultados(0)("LugarNacimiento").ToString())) '' End If '' If Not IsDBNull(objRH.DtResultados(0)("Edad")) Then - '' ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", objRH.DtResultados(0)("Edad").ToString)) + '' ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", objRH.DtResultados(0)("Edad").ToString())) '' End If '' If Not IsDBNull(objRH.DtResultados(0)("NombreTelEmergencia")) Then - '' ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", objRH.DtResultados(0)("NombreTelEmergencia").ToString)) + '' ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", objRH.DtResultados(0)("NombreTelEmergencia").ToString())) '' End If '' If Not IsDBNull(objRH.DtResultados(0)("TipoSangre")) Then - '' ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", objRH.DtResultados(0)("TipoSangre").ToString)) + '' ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", objRH.DtResultados(0)("TipoSangre").ToString())) '' End If - '' If Not IsDBNull(objRH.DtResultados(0)("Vivienda")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Vivienda}", objRH.DtResultados(0)("Vivienda").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("Vivienda")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Vivienda}", objRH.DtResultados(0)("Vivienda").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("ViviendaDueno")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{ViviendaDueno}", objRH.DtResultados(0)("ViviendaDueno").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("ViviendaDueno")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{ViviendaDueno}", objRH.DtResultados(0)("ViviendaDueno").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("CreditoInfonavit")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CreditoInfonavit}", objRH.DtResultados(0)("CreditoInfonavit").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("CreditoInfonavit")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CreditoInfonavit}", objRH.DtResultados(0)("CreditoInfonavit").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("RentaMensual")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString.ToDecimal.ToString("###,###,###.00"))) + '' If Not IsDBNull(objRH.DtResultados(0)("RentaMensual")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString().ToDecimal().ToString("###,###,###.00"))) - '' If Not IsDBNull(objRH.DtResultados(0)("TransportePublico")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("TransportePublico")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("TrabajadoAnteriormente")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormente}", objRH.DtResultados(0)("TrabajadoAnteriormente").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("TrabajadoAnteriormente")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormente}", objRH.DtResultados(0)("TrabajadoAnteriormente").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormenteObservaciones}", objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormenteObservaciones}", objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("ParientesEmpresa")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("ParientesEmpresa")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("AcusadoDelito")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelito}", objRH.DtResultados(0)("AcusadoDelito").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("AcusadoDelito")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelito}", objRH.DtResultados(0)("AcusadoDelito").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("AcusadoDelitoObservaciones")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelitoObservaciones}", objRH.DtResultados(0)("AcusadoDelitoObservaciones").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("AcusadoDelitoObservaciones")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelitoObservaciones}", objRH.DtResultados(0)("AcusadoDelitoObservaciones").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("Direccion")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("Direccion")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("Calle")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Calle}", objRH.DtResultados(0)("Calle").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("Calle")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Calle}", objRH.DtResultados(0)("Calle").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("Colonia")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Colonia}", objRH.DtResultados(0)("Colonia").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("Colonia")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Colonia}", objRH.DtResultados(0)("Colonia").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("CP")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CP}", objRH.DtResultados(0)("CP").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("CP")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CP}", objRH.DtResultados(0)("CP").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("Telefono")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Telefono}", objRH.DtResultados(0)("Telefono").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("Telefono")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Telefono}", objRH.DtResultados(0)("Telefono").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("Celular")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Celular}", objRH.DtResultados(0)("Celular").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("Celular")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Celular}", objRH.DtResultados(0)("Celular").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("Correo")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Correo}", objRH.DtResultados(0)("Correo").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("Correo")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Correo}", objRH.DtResultados(0)("Correo").ToString())) '' If Not IsDBNull(objRH.DtResultados(0)("CveSucursal")) Then '' ' ListaTagsDocumentost.Add(New TagsDocumentos("{CveSucursal}", DDLSucursal4.Text)) '' End If - '' If Not IsDBNull(objRH.DtResultados(0)("NumeroSS")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("NumeroSS")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("Licencia")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Licencia}", objRH.DtResultados(0)("Licencia").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("Licencia")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Licencia}", objRH.DtResultados(0)("Licencia").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("CartillaMilitar")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CartillaMilitar}", objRH.DtResultados(0)("CartillaMilitar").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("CartillaMilitar")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CartillaMilitar}", objRH.DtResultados(0)("CartillaMilitar").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("CURP")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CURP}", objRH.DtResultados(0)("CURP").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("CURP")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CURP}", objRH.DtResultados(0)("CURP").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("AutorizaAntidoping")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{AutorizaAntidoping}", objRH.DtResultados(0)("AutorizaAntidoping").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("AutorizaAntidoping")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{AutorizaAntidoping}", objRH.DtResultados(0)("AutorizaAntidoping").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("Observaciones")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Observaciones}", objRH.DtResultados(0)("Observaciones").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("Observaciones")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Observaciones}", objRH.DtResultados(0)("Observaciones").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("CredencialElector")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CredencialElector}", objRH.DtResultados(0)("CredencialElector").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("CredencialElector")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{CredencialElector}", objRH.DtResultados(0)("CredencialElector").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("Sucursal")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Sucursal}", objRH.DtResultados(0)("Sucursal").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("Sucursal")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Sucursal}", objRH.DtResultados(0)("Sucursal").ToString())) - '' If Not IsDBNull(objRH.DtResultados(0)("Puesto")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Puesto}", objRH.DtResultados(0)("Puesto").ToString)) + '' If Not IsDBNull(objRH.DtResultados(0)("Puesto")) Then ListaTagsDocumentost.Add(New TagsDocumentos("{Puesto}", objRH.DtResultados(0)("Puesto").ToString())) '' 'If Not IsDBNull(objRH.DtResultados(0)("InformacionFidedigno")) Then chkFidedigna4.Checked = objRH.DtResultados(0)("InformacionFidedigno") - '' ListaTagsDocumentost.Add(New TagsDocumentos("{InformacionFidedigno}", objRH.DtResultados(0)("InformacionFidedigno").ToString)) + '' ListaTagsDocumentost.Add(New TagsDocumentos("{InformacionFidedigno}", objRH.DtResultados(0)("InformacionFidedigno").ToString())) '' End If '' If Not IsDBNull(objRH.DtResultados(0)("FechaNacimiento")) Then - '' ListaTagsDocumentost.Add(New TagsDocumentos("{InformacionFidedigno}", objRH.DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("dd/MM/yyyy"))) + '' ListaTagsDocumentost.Add(New TagsDocumentos("{InformacionFidedigno}", objRH.DtResultados(0)("FechaNacimiento").ToString().ToDate().ToString("dd/MM/yyyy"))) '' End If @@ -7602,12 +7622,12 @@ Partial Class Clientes RegistraScript("Download('" & baseUrl & "')") - End Sub - + End Sub + #End Region - + #Region "D O C U M E N T O S V E N T A S" - + Private Sub CargaDocumentosVenta(tCveCliente As Integer) Dim objInv As New ClsEdocumentacion @@ -7633,7 +7653,7 @@ Partial Class Clientes For Each gvr As GridViewRow In GvDocsVentas.Rows If gvr.FCCheckBox("ChkDoc").Checked Then - If objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").ToEntero, -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, Now, Observacion2:=gvr.FCTextBox("TxtObs2").Text) <= 0 Then HuboError = True + If objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").ToEntero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, Now, Observacion2:=gvr.FCTextBox("TxtObs2").Text) <= 0 Then HuboError = True End If @@ -7642,16 +7662,16 @@ Partial Class Clientes Else For Each gvr As GridViewRow In GvDocsVentas.Rows 'sino está registrada y se selecciona, se va a insertar - If gvr.DataKey("CveDocumentacionElectronica").ToEntero <= 0 AndAlso gvr.FCCheckBox("ChkDoc").Checked Then - If objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").ToEntero, -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, Now, Observacion2:=gvr.FCTextBox("TxtObs2").Text) <= 0 Then HuboError = True + If gvr.DataKey("CveDocumentacionElectronica").ToEntero() <= 0 AndAlso gvr.FCCheckBox("ChkDoc").Checked Then + If objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").ToEntero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, Now, Observacion2:=gvr.FCTextBox("TxtObs2").Text) <= 0 Then HuboError = True Else ', Observacion2:=gvr.FCTextBox("TxtObs2").Text - If Not objDoc.DocumentacionElectronicaUpdate(gvr.DataKey("CveDocumentacionElectronica").ToEntero, gvr.DataKey("CveDocumentacion").ToEntero, -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, gvr.DataKey("FechaLimite").ToDate, Observacion2:=gvr.FCTextBox("TxtObs2").Text) Then HuboError = True + If Not objDoc.DocumentacionElectronicaUpdate(gvr.DataKey("CveDocumentacionElectronica").ToEntero(), gvr.DataKey("CveDocumentacion").ToEntero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, gvr.DataKey("FechaLimite").ToDate(), Observacion2:=gvr.FCTextBox("TxtObs2").Text) Then HuboError = True End If 'si ya estaba registrada y no se selecciona, se va a insertar - If gvr.DataKey("CveDocumentacionElectronica").ToEntero > 0 AndAlso Not gvr.FCCheckBox("ChkDoc").Checked Then - If Not objDoc.DocumentacionElectronicaRemove(gvr.DataKey("CveDocumentacionElectronica").ToEntero, -1) Then HuboError = True + If gvr.DataKey("CveDocumentacionElectronica").ToEntero() > 0 AndAlso Not gvr.FCCheckBox("ChkDoc").Checked Then + If Not objDoc.DocumentacionElectronicaRemove(gvr.DataKey("CveDocumentacionElectronica").ToEntero(), -1) Then HuboError = True End If Next @@ -7675,10 +7695,10 @@ Partial Class Clientes Protected Sub BtnModalCXCDocumentoClienteUpload_Click(sender As Object, e As EventArgs) Handles BtnModalCXCDocumentoClienteUpload.Click Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim _CveDocumentacionElectronica As Integer = GvRow.DataKey("CveDocumentacion").ToEntero - Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToEntero + Dim _CveDocumentacionElectronica As Integer = GvRow.DataKey("CveDocumentacion").ToEntero() + Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToEntero() Dim _Obserbaciones As String = GvRow.FCTextBox("TxtObservaciones").Text.Trim - Dim _FechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate + Dim _FechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate() SubirComprobante(_CveDocumentacionElectronica, _CveDocumentacion, _Obserbaciones, _FechaLimite) 'CargaDocs() @@ -7753,9 +7773,9 @@ Partial Class Clientes Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim activo As Boolean = False - Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToEntero - Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString - Dim _fechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate + Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToEntero() + Dim _Adjunto As String = GvRow.DataKey("Adjunto").ToString() + Dim _fechaLimite As Date = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate() Dim observaciones As String = GvRow.FCTextBox("TxtObservaciones").Text ' DirectCast(GvRow.FindControl("TxtObservaciones"), TextBox).Text 'Dim DDLEstatus As DropDownList = DirectCast(GvRow.FindControl("DDLEstatus"), DropDownList) @@ -7766,23 +7786,23 @@ Partial Class Clientes Dim objRH As New ClsEdocumentacion - If Not GvRow.DataKey("CveDocumentacionElectronica").ToEntero = -1 Then - If objRH.DocumentacionElectronicaUpdate(GvRow.DataKey("CveDocumentacionElectronica").ToEntero, _CveDocumentacion, -1, CveCliente, -1, _Estatus, observaciones, _Adjunto, UsuarioActual.CveUsuario, GvRow.FCTextBox("TxtFechaLimite").Text.ToDate) Then + If Not GvRow.DataKey("CveDocumentacionElectronica").ToEntero() = -1 Then + If objRH.DocumentacionElectronicaUpdate(GvRow.DataKey("CveDocumentacionElectronica").ToEntero(), _CveDocumentacion, -1, CveCliente, -1, _Estatus, observaciones, _Adjunto, UsuarioActual.CveUsuario, GvRow.FCTextBox("TxtFechaLimite").Text.ToDate()) Then Alert("Documento actualizado correctamente.", TipoMensaje.MsgInformacion) End If Else - If objRH.DocumentacionElectronicaAdd(_CveDocumentacion, -1, CveCliente, -1, _Estatus, observaciones, _Adjunto, UsuarioActual.CveUsuario, GvRow.FCTextBox("TxtFechaLimite").Text.ToDate) > 0 Then + If objRH.DocumentacionElectronicaAdd(_CveDocumentacion, -1, CveCliente, -1, _Estatus, observaciones, _Adjunto, UsuarioActual.CveUsuario, GvRow.FCTextBox("TxtFechaLimite").Text.ToDate()) > 0 Then Alert("Documento actualizado correctamente.", TipoMensaje.MsgInformacion) End If End If objRH.Dispose() - End Sub - - + End Sub + + #End Region - + #Region "PERSONA FISICA" Protected Sub LnkPersonaFisica_Click(sender As Object, e As EventArgs) RegistraScript("$('#DivModalPersonaFisica').modal();") @@ -7807,9 +7827,9 @@ Partial Class Clientes ObjCliente.Dispose() UpDatos.Update() - End Sub + End Sub #End Region - + #Region "USUARIOS PLATAFORMA CLIENTE - 6 " Protected Sub CargaUsuariosPortalCliente() Dim objUsuario As ClsSisUsuarios = New ClsSisUsuarios @@ -7818,19 +7838,19 @@ Partial Class Clientes GvUsuarios.DataBind() End If objUsuario.Dispose() - End Sub + End Sub #End Region - + #Region " DEVOLVER DINERO ANT/NC " Private Sub InicializaDevolverDinero() If UsuarioActual.TienePermisoProceso(247) Then GVAnticipos.Columns(6).Visible = True End If - End Sub + End Sub #End Region - + #Region "MODAL GRAFICA/PEDIDOS" - + Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs) If CargaDatatables() Then RegistraScript("$('#DivModalGrafica').modal('show')") @@ -7841,7 +7861,7 @@ Partial Class Clientes Protected Sub LnkCancelar_Click(sender As Object, e As EventArgs) Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) Dim ObjCliente As New ClsClientes - If ObjCliente.UpdateEstatusPedido(gvRow.DataKey("CveVenta").ToEntero, 17, -1, UsuarioActual.CveUsuario) Then + If ObjCliente.UpdateEstatusPedido(gvRow.DataKey("CveVenta").ToEntero(), 17, -1, UsuarioActual.CveUsuario) Then Alert("Cancelado correctamente.") CargaPedido() End If @@ -7867,10 +7887,10 @@ Partial Class Clientes Dim CveU As Integer = 0 Dim MsgAut As String = "" - If ObjCliente.UpdateEstatusPedido(gvRow.DataKey("CveVenta").ToEntero, 16, gvRow.FCTextBox("TxtDiasCredito").Text.ToEntero, UsuarioActual.CveUsuario) Then - CveU = gvRow.DataKey("CveUsuario").ToEntero + If ObjCliente.UpdateEstatusPedido(gvRow.DataKey("CveVenta").ToEntero(), 16, gvRow.FCTextBox("TxtDiasCredito").Text.ToEntero(), UsuarioActual.CveUsuario) Then + CveU = gvRow.DataKey("CveUsuario").ToEntero() MsgAut = String.Format(" Solicitud Autorizada {0} ", gvRow.DataKey("SerieFolio")) - 'If Not ObjCliente.UpdateFechaPedido(gvRow.DataKey("CveVenta").ToEntero, gvRow.FCTextBox("TxtDiasCredito").Text.ToEntero) Then + 'If Not ObjCliente.UpdateFechaPedido(gvRow.DataKey("CveVenta").Toentero(), gvRow.FCTextBox("TxtDiasCredito").Text.Toentero()) Then ' ErrorTrans = True 'End If Else @@ -7896,19 +7916,19 @@ Partial Class Clientes Private Function CargaDatatables() As Boolean Dim ObjClientes As New ClsClientes - If ObjClientes.GetClienteVencido(CveCliente, UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate) Then + If ObjClientes.GetClienteVencido(CveCliente, UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate(), TxtFechaFCredito.Text.ToDate()) Then DtVencido = ObjClientes.DtResultados End If - If ObjClientes.GetRotacionCartera(CveCliente, UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate) Then + If ObjClientes.GetRotacionCartera(CveCliente, UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate(), TxtFechaFCredito.Text.ToDate()) Then DtRotacion = ObjClientes.DtResultados End If - If ObjClientes.GetClienteSaldoMensual(CveCliente, UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate) Then + If ObjClientes.GetClienteSaldoMensual(CveCliente, UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate(), TxtFechaFCredito.Text.ToDate()) Then DtSaldoMensual = ObjClientes.DtResultados End If - If ObjClientes.GetClienteComportamientoVentaMensual(CveCliente, UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate) Then + If ObjClientes.GetClienteComportamientoVentaMensual(CveCliente, UsuarioActual.CveEmpresa, TxtFechaICredito.Text.ToDate(), TxtFechaFCredito.Text.ToDate()) Then DtComportamientoVentas = ObjClientes.DtResultados End If @@ -7929,9 +7949,9 @@ Partial Class Clientes Dim LimiteCredito As Double = 0 If DtVencido.Rows.Count > 0 Then Saldo = DtVencido.SUM("Saldo") - LimiteCredito = DtVencido.Rows(0)("LimiteCredito").ToString.ToDouble - LblVencido.Text = DtVencido.SUM("Total", "DiasVencidos > 0").FormatoNumero - LblPorVencer.Text = DtVencido.SUM("Total", "DiasVencidos <= 0").FormatoNumero + LimiteCredito = DtVencido.Rows(0)("LimiteCredito").ToString().ToDouble + LblVencido.Text = DtVencido.SUM("Total", "DiasVencidos > 0").FormatoNumero() + LblPorVencer.Text = DtVencido.SUM("Total", "DiasVencidos <= 0").FormatoNumero() Else LimiteCredito = TxtLimiteCredito.Text.ToDouble LblVencido.Text = "0" @@ -7943,9 +7963,9 @@ Partial Class Clientes For Each Dr As DataRow In DtVencido.Rows Dim Row As DataRow = Nothing Row = Dt.NewRow() - Row("value") = Dr("DiasVencidos").ToString + Row("value") = Dr("DiasVencidos").ToString() Dt.Rows.Add(Row) - If Dr("DiasVencidos").ToString.ToEntero > 0 And Dr("Saldo").ToString.ToDouble > 0 Then + If Dr("DiasVencidos").ToString().ToEntero() > 0 And Dr("Saldo").ToString().ToDouble > 0 Then FactVencida = True End If Next @@ -7960,7 +7980,7 @@ Partial Class Clientes Dt2.Columns.Add("saldo") Dim Row2 As DataRow = Nothing Row2 = Dt2.NewRow() - LtlLimiteCreditoModal.Text = LimiteCredito.FormatoNumero + LtlLimiteCreditoModal.Text = LimiteCredito.FormatoNumero() Row2("limite") = LimiteCredito - Saldo Row2("saldo") = Saldo Dt2.Rows.Add(Row2) @@ -7970,11 +7990,11 @@ Partial Class Clientes RegistraScript($"CargaGraficaLimiteCredito({json2})", "33") If DtRotacion.Rows.Count > 0 Then - LblVentasModal.Text = DtRotacion.Rows(0)("Ventas").ToString.FormatoNumero - LblPagadoModal.Text = DtRotacion.Rows(0)("Pagado").ToString.FormatoNumero - LblRotacionModal.Text = DtRotacion.Rows(0)("Rotacion").ToString.FormatoNumero - LblDiasModal.Text = DtRotacion.Rows(0)("Dias").ToString.FormatoNumero - LblDiasCreditoModal.Text = DtRotacion.Rows(0)("DiasCredito").ToString.FormatoNumero + LblVentasModal.Text = DtRotacion.Rows(0)("Ventas").ToString().FormatoNumero() + LblPagadoModal.Text = DtRotacion.Rows(0)("Pagado").ToString().FormatoNumero() + LblRotacionModal.Text = DtRotacion.Rows(0)("Rotacion").ToString().FormatoNumero() + LblDiasModal.Text = DtRotacion.Rows(0)("Dias").ToString().FormatoNumero() + LblDiasCreditoModal.Text = DtRotacion.Rows(0)("DiasCredito").ToString().FormatoNumero() Else LblVentasModal.Text = "0" LblPagadoModal.Text = "0" @@ -8005,13 +8025,13 @@ Partial Class Clientes Dim Cont As Integer = 1 For Each Dr As DataRow In DtComportamientoVentas.Rows - Dt3.Columns.Add(Dr("Ano").ToString) + Dt3.Columns.Add(Dr("Ano").ToString()) Dim Row4 As DataRow = Nothing Row4 = Dt4.NewRow() Row4("balloonText") = "Ventas [[category]]: [[value]]" Row4("bullet") = "round" - Row4("title") = Dr("Ano").ToString - Row4("valueField") = Dr("Ano").ToString + Row4("title") = Dr("Ano").ToString() + Row4("valueField") = Dr("Ano").ToString() Row4("fillAlphas") = 0 Row4("hidden") = If(Cont > DtComportamientoVentas.Rows.Count - 3, False, True) Dt4.Rows.Add(Row4) @@ -8043,29 +8063,29 @@ Partial Class Clientes Dim RowDiciembre As DataRow = Nothing RowDiciembre = Dt3.NewRow() For Each Dr As DataRow In DtComportamientoVentas.Rows - RowEnero(Dr("Ano").ToString) = Dr("Enero").ToString + RowEnero(Dr("Ano").ToString()) = Dr("Enero").ToString() RowEnero("mes") = "Enero" - RowFebrero(Dr("Ano").ToString) = Dr("Febrero").ToString + RowFebrero(Dr("Ano").ToString()) = Dr("Febrero").ToString() RowFebrero("mes") = "Febrero" - RowMarzo(Dr("Ano").ToString) = Dr("Marzo").ToString + RowMarzo(Dr("Ano").ToString()) = Dr("Marzo").ToString() RowMarzo("mes") = "Marzo" - RowAbril(Dr("Ano").ToString) = Dr("Abril").ToString + RowAbril(Dr("Ano").ToString()) = Dr("Abril").ToString() RowAbril("mes") = "Abril" - RowMayo(Dr("Ano").ToString) = Dr("Mayo").ToString + RowMayo(Dr("Ano").ToString()) = Dr("Mayo").ToString() RowMayo("mes") = "Mayo" - RowJunio(Dr("Ano").ToString) = Dr("Junio").ToString + RowJunio(Dr("Ano").ToString()) = Dr("Junio").ToString() RowJunio("mes") = "Junio" - RowJulio(Dr("Ano").ToString) = Dr("Julio").ToString + RowJulio(Dr("Ano").ToString()) = Dr("Julio").ToString() RowJulio("mes") = "Julio" - RowAgosto(Dr("Ano").ToString) = Dr("Agosto").ToString + RowAgosto(Dr("Ano").ToString()) = Dr("Agosto").ToString() RowAgosto("mes") = "Agosto" - RowSeptiembre(Dr("Ano").ToString) = Dr("Septiembre").ToString + RowSeptiembre(Dr("Ano").ToString()) = Dr("Septiembre").ToString() RowSeptiembre("mes") = "Septiembre" - RowOctubre(Dr("Ano").ToString) = Dr("Octubre").ToString + RowOctubre(Dr("Ano").ToString()) = Dr("Octubre").ToString() RowOctubre("mes") = "Octubre" - RowNoviembre(Dr("Ano").ToString) = Dr("Noviembre").ToString + RowNoviembre(Dr("Ano").ToString()) = Dr("Noviembre").ToString() RowNoviembre("mes") = "Noviembre" - RowDiciembre(Dr("Ano").ToString) = Dr("Diciembre").ToString + RowDiciembre(Dr("Ano").ToString()) = Dr("Diciembre").ToString() RowDiciembre("mes") = "Diciembre" Next Dt3.Rows.Add(RowEnero) @@ -8096,13 +8116,13 @@ Partial Class Clientes Cont = 1 For Each Dr As DataRow In DtSaldoMensual.Rows - Dt5.Columns.Add(Dr("Ano").ToString) + Dt5.Columns.Add(Dr("Ano").ToString()) Dim Row6 As DataRow = Nothing Row6 = Dt6.NewRow() Row6("balloonText") = "Saldo [[category]]: [[value]]" Row6("bullet") = "round" - Row6("title") = Dr("Ano").ToString - Row6("valueField") = Dr("Ano").ToString + Row6("title") = Dr("Ano").ToString() + Row6("valueField") = Dr("Ano").ToString() Row6("fillAlphas") = 0 Row6("hidden") = If(Cont > DtSaldoMensual.Rows.Count - 3, False, True) Dt6.Rows.Add(Row6) @@ -8121,29 +8141,29 @@ Partial Class Clientes RowNoviembre = Dt5.NewRow() RowDiciembre = Dt5.NewRow() For Each Dr As DataRow In DtSaldoMensual.Rows - RowEnero(Dr("Ano").ToString) = Dr("Enero").ToString + RowEnero(Dr("Ano").ToString()) = Dr("Enero").ToString() RowEnero("mes") = "Enero" - RowFebrero(Dr("Ano").ToString) = Dr("Febrero").ToString + RowFebrero(Dr("Ano").ToString()) = Dr("Febrero").ToString() RowFebrero("mes") = "Febrero" - RowMarzo(Dr("Ano").ToString) = Dr("Marzo").ToString + RowMarzo(Dr("Ano").ToString()) = Dr("Marzo").ToString() RowMarzo("mes") = "Marzo" - RowAbril(Dr("Ano").ToString) = Dr("Abril").ToString + RowAbril(Dr("Ano").ToString()) = Dr("Abril").ToString() RowAbril("mes") = "Abril" - RowMayo(Dr("Ano").ToString) = Dr("Mayo").ToString + RowMayo(Dr("Ano").ToString()) = Dr("Mayo").ToString() RowMayo("mes") = "Mayo" - RowJunio(Dr("Ano").ToString) = Dr("Junio").ToString + RowJunio(Dr("Ano").ToString()) = Dr("Junio").ToString() RowJunio("mes") = "Junio" - RowJulio(Dr("Ano").ToString) = Dr("Julio").ToString + RowJulio(Dr("Ano").ToString()) = Dr("Julio").ToString() RowJulio("mes") = "Julio" - RowAgosto(Dr("Ano").ToString) = Dr("Agosto").ToString + RowAgosto(Dr("Ano").ToString()) = Dr("Agosto").ToString() RowAgosto("mes") = "Agosto" - RowSeptiembre(Dr("Ano").ToString) = Dr("Septiembre").ToString + RowSeptiembre(Dr("Ano").ToString()) = Dr("Septiembre").ToString() RowSeptiembre("mes") = "Septiembre" - RowOctubre(Dr("Ano").ToString) = Dr("Octubre").ToString + RowOctubre(Dr("Ano").ToString()) = Dr("Octubre").ToString() RowOctubre("mes") = "Octubre" - RowNoviembre(Dr("Ano").ToString) = Dr("Noviembre").ToString + RowNoviembre(Dr("Ano").ToString()) = Dr("Noviembre").ToString() RowNoviembre("mes") = "Noviembre" - RowDiciembre(Dr("Ano").ToString) = Dr("Diciembre").ToString + RowDiciembre(Dr("Ano").ToString()) = Dr("Diciembre").ToString() RowDiciembre("mes") = "Diciembre" Next Dt5.Rows.Add(RowEnero) @@ -8163,13 +8183,13 @@ Partial Class Clientes RegistraScript($"CargaGraficaCompratamientoSaldoMensual({Dt5.ToJson},{Dt6.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "55") UPModalProd.Update() - End Sub - - + End Sub + + #End Region - + #Region "TAB - COMPORTAMIENTO DE VENTAS" - + Private Sub CargaGrupo() DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3")) DdlGrupo.Items.Insert(1, New ListItem("Clasificacion", "4")) @@ -8274,7 +8294,7 @@ Partial Class Clientes DdlPSFiltro.SelectedValue = "-1" Else DdlPSFiltro.ddl.Items.Clear() - DdlPSFiltro.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionFilto.SelectedValue.ToEntero) + DdlPSFiltro.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionFilto.SelectedValue.ToEntero()) DdlPSFiltro.ddl.DataBind() DdlPSFiltro.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1")) End If @@ -8291,7 +8311,7 @@ Partial Class Clientes Private Sub CargaSubProyecto() DdlSubProyectoFiltro.Items.Clear() If DdlProyecto.SelectedValue <> "-1" Then - DdlSubProyectoFiltro.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1, 1) + DdlSubProyectoFiltro.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, -1, 1) DdlSubProyectoFiltro.DataBind() End If DdlSubProyectoFiltro.Items.Insert(0, New ListItem("Todos", "-1")) @@ -8299,7 +8319,7 @@ Partial Class Clientes Protected Sub DdlClasificacionFilto_SelectedIndexChanged(sender As Object, e As EventArgs) If UsuarioActual.Empresa.Funcionalidad(105) = "" Then - DdlPSFiltro.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionFilto.SelectedValue.ToEntero) + DdlPSFiltro.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionFilto.SelectedValue.ToEntero()) DdlPSFiltro.DataBind() DdlPSFiltro.ddl.Items.Insert(0, New ListItem("Todos", "-1")) Else @@ -8312,14 +8332,14 @@ Partial Class Clientes Protected Sub GvComportamientoVenta_RowDataBound(sender As Object, e As GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then - If DdlGrupo.SelectedValue.ToEntero = 20 Then + If DdlGrupo.SelectedValue.ToEntero() = 20 Then - If e.Row.DBCampo("PS").ToString = "" Then + If e.Row.DBCampo("PS").ToString() = "" Then e.Row.CssClass = "Totales" End If Else - If Not e.Row.DBCampo("CveVenta").ToEntero > 0 Then - e.Row.Cells(5).Text = e.Row.DBCampo("Gpo").ToString + If Not e.Row.DBCampo("CveVenta").ToEntero() > 0 Then + e.Row.Cells(5).Text = e.Row.DBCampo("Gpo").ToString() e.Row.CssClass = "Totales" End If @@ -8334,13 +8354,13 @@ Partial Class Clientes Private Sub CargaGvComportamientoVenta() Dim ObjVentas As New ClsVentas() Dim FechaI, FechaF As Date - FechaI = If(IsDate(TxtFechaIFiltro.Text.Trim()), TxtFechaIFiltro.Text.ToDate, MinFecha) - FechaF = If(IsDate(TxtFechaFFiltro.Text.Trim()), TxtFechaFFiltro.Text.ToDate, MaxFecha) + FechaI = If(IsDate(TxtFechaIFiltro.Text.Trim()), TxtFechaIFiltro.Text.ToDate(), MinFecha) + FechaF = If(IsDate(TxtFechaFFiltro.Text.Trim()), TxtFechaFFiltro.Text.ToDate(), MaxFecha) - If ObjVentas.GetRepProductosServiciosDetalle(DdlProyecto.SelectedValue.ToEntero, DdlSubProyectoFiltro.SelectedValue.ToEntero, -1, DdlClasificacionFilto.SelectedValue.ToEntero, - DdlPSFiltro.SelectedValue.ToEntero, FechaI, FechaF, -1, MinFecha, MaxFecha, -1, - CveCliente, -1, DdlVendedorFiltro.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1, - UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing", GPO:=DdlGrupo.SelectedValue.ToEntero) Then + If ObjVentas.GetRepProductosServiciosDetalle(DdlProyecto.SelectedValue.ToEntero(), DdlSubProyectoFiltro.SelectedValue.ToEntero(), -1, DdlClasificacionFilto.SelectedValue.ToEntero(), + DdlPSFiltro.SelectedValue.ToEntero(), FechaI, FechaF, -1, MinFecha, MaxFecha, -1, + CveCliente, -1, DdlVendedorFiltro.SelectedValue.ToEntero(), DdlUsuario.SelectedValue.ToEntero(), -1, + UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing", GPO:=DdlGrupo.SelectedValue.ToEntero()) Then GvComportamientoVenta.DataSource = ObjVentas.DtResultados Else GvComportamientoVenta.DataSource = Nothing @@ -8349,12 +8369,12 @@ Partial Class Clientes ObjVentas.Dispose() GvComportamientoVenta.DataBind() UpDatosComportamientoVenta.Update() - End Sub - + End Sub + #End Region - + #Region "DISPOSITIVOS" - + Protected Sub LnkMoverDispositivo_Click(sender As Object, e As EventArgs) Dim CveDispositivo As Integer = HdnCveDispositivoMover.Value.ToEntero() Dim CveCliente As Integer = DdlClienteDispositivo.SelectedValue.ToEntero() @@ -8392,24 +8412,24 @@ Partial Class Clientes CargaEventoBitacora() NombreDispositivo = "" RegistraScript("$('#DivMoverDispositivo').modal('hide');") - End Sub - + End Sub + #End Region - + #Region "CRM" Protected Sub CargaDatosCRM() Dim ObjCRM = New ClsCRM() If ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa, CveEmpresaCRM) And ObjCRM.DtResultados.Rows.Count > 0 Then - TxtNombre.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Empresa").ToString - TxtNombreComercial.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Empresa").ToString - TxtRFC.Text = ObjCRM.DtResultados.FiltroPrimeroValor("RFC").ToString + TxtNombre.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Empresa").ToString() + TxtNombreComercial.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Empresa").ToString() + TxtRFC.Text = ObjCRM.DtResultados.FiltroPrimeroValor("RFC").ToString() - TxtEmail.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Correo").ToString - TxtEmailCotizacion.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Correo").ToString + TxtEmail.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Correo").ToString() + TxtEmailCotizacion.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Correo").ToString() - DdlVendedor.SelectedValueExist(ObjCRM.DtResultados.FiltroPrimeroValor("CveVendedorAsignado").ToString) - DdlSubProyecto.SelectedValueExist(ObjCRM.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToString) + DdlVendedor.SelectedValueExist(ObjCRM.DtResultados.FiltroPrimeroValor("CveVendedorAsignado").ToString()) + DdlSubProyecto.SelectedValueExist(ObjCRM.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToString()) Else Alert("La empresa CRM solicitada no existe, porfavor verifique", TipoMensaje.MsgAdvertencia) CveEmpresaCRM = -1 @@ -8482,7 +8502,7 @@ Partial Class Clientes For Each row As GridViewRow In GvEmpresasCRM.Rows Dim chkSeleccionado As RadioButton = CType(row.FindControl("RBSeleccion"), RadioButton) If chkSeleccionado.Checked Then - CveEmpresaCRMUnificar = row.DataKey("CveEmpresaCRM").ToEntero + CveEmpresaCRMUnificar = row.DataKey("CveEmpresaCRM").ToEntero() End If Next @@ -8495,9 +8515,9 @@ Partial Class Clientes Alert("Se Unificó correctamente al Cliente con la Empresa CRM.") End If End If - End Sub + End Sub #End Region - + #Region "PORCENTAJE PRECIO DE MARCAS" Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas")) @@ -8571,18 +8591,18 @@ Partial Class Clientes End Sub Protected Sub LbAgregarMarca_Click(sender As Object, e As EventArgs) Handles LbAgregarMarca.Click - If txtPorcentaje.Text.ToDecimal > 0 And txtPorcentaje.Text.ToDecimal <= 100 And txtPorcentaje2.Text.ToDecimal >= 0 And txtPorcentaje2.Text.ToDecimal <= 100 And txtPorcentaje3.Text.ToDecimal >= 0 And txtPorcentaje3.Text.ToDecimal <= 100 Then + If txtPorcentaje.Text.ToDecimal() > 0 And txtPorcentaje.Text.ToDecimal() <= 100 And txtPorcentaje2.Text.ToDecimal() >= 0 And txtPorcentaje2.Text.ToDecimal() <= 100 And txtPorcentaje3.Text.ToDecimal() >= 0 And txtPorcentaje3.Text.ToDecimal() <= 100 Then Dim registro As DataRow = DTPorcentajePrecios.NewRow registro.Item("No") = DTPorcentajePrecios.Rows.Count + 1 - registro.Item("CveMarca") = DdlMarcaPS.SelectedValue.ToEntero + registro.Item("CveMarca") = DdlMarcaPS.SelectedValue.ToEntero() registro.Item("Marca") = DdlMarcaPS.SelectedItem.Text - registro.Item("PorcentajeProducto") = txtPorcentaje.Text.ToDecimal - registro.Item("PorcentajeProducto2") = txtPorcentaje2.Text.ToDecimal - registro.Item("PorcentajeProducto3") = txtPorcentaje3.Text.ToDecimal - registro.Item("ProntoPago") = txtProntoPago.Text.ToDecimal - registro.Item("Plazo") = txtPlazo.Text.ToEntero + registro.Item("PorcentajeProducto") = txtPorcentaje.Text.ToDecimal() + registro.Item("PorcentajeProducto2") = txtPorcentaje2.Text.ToDecimal() + registro.Item("PorcentajeProducto3") = txtPorcentaje3.Text.ToDecimal() + registro.Item("ProntoPago") = txtProntoPago.Text.ToDecimal() + registro.Item("Plazo") = txtPlazo.Text.ToEntero() registro.Item("Estatus") = "I" DTPorcentajePrecios.Rows.Add(registro) CargaDTPorcentajePrecios(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' ")) @@ -8598,12 +8618,12 @@ Partial Class Clientes Dim lnkRemove As LinkButton = DirectCast(sender, LinkButton) - If DTPorcentajePrecios.Rows.Count > 0 And lnkRemove.CommandArgument.ToString.Length > 0 Then + If DTPorcentajePrecios.Rows.Count > 0 And lnkRemove.CommandArgument.ToString().Length > 0 Then Dim i As Integer - i = lnkRemove.CommandArgument.ToString.ToEntero + i = lnkRemove.CommandArgument.ToString().ToEntero() Dim Drs As DataRow() = DTPorcentajePrecios.Select(String.Format("No = {0}", i)) If Drs.Count > 0 Then - If CveCliente > 0 AndAlso Drs(0)("CveMarca").ToString.ToEntero > 0 Then + If CveCliente > 0 AndAlso Drs(0)("CveMarca").ToString().ToEntero() > 0 Then Drs(0)("Estatus") = "D" Else Drs(0).Delete() @@ -8638,7 +8658,7 @@ Partial Class Clientes Dim Plazo As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPlazoP").Text.ToDouble If PorcentajeProducto > 0 And PorcentajeProducto <= 100 And PorcentajeProducto2 >= 0 And PorcentajeProducto2 <= 100 And PorcentajeProducto3 >= 0 And PorcentajeProducto3 <= 100 Then - Dim No As Integer = GvM.Rows(e.RowIndex).DataKey("No").ToEntero + Dim No As Integer = GvM.Rows(e.RowIndex).DataKey("No").ToEntero() Dim Drs As DataRow() = DTPorcentajePrecios.Select(String.Format("No = {0}", No)) @@ -8648,7 +8668,7 @@ Partial Class Clientes Drs(0)("PorcentajeProducto3") = PorcentajeProducto3 Drs(0)("ProntoPago") = ProntoPago Drs(0)("Plazo") = Plazo - If Drs(0)("Estatus").ToString <> "I" Then + If Drs(0)("Estatus").ToString() <> "I" Then Drs(0)("Estatus") = "U" End If End If @@ -8672,18 +8692,18 @@ Partial Class Clientes For Each Dr As DataRow In DTPorcentajePrecios.Rows - If Dr("Estatus").ToString <> "" Then + If Dr("Estatus").ToString() <> "" Then - If Dr("Estatus").ToString = "I" Then - If Not ObjPS.AddPorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal, Dr("PorcentajeProducto2").ToString.ToDecimal, Dr("PorcentajeProducto3").ToString.ToDecimal, UsuarioActual.CveUsuario, Dr("ProntoPago").ToString.ToDecimal, Dr("Plazo").ToString.ToEntero) Then + If Dr("Estatus").ToString() = "I" Then + If Not ObjPS.AddPorcentajeMarcas(CveCliente, Dr("CveMarca").ToString().ToEntero(), Dr("PorcentajeProducto").ToString().ToDecimal(), Dr("PorcentajeProducto2").ToString().ToDecimal(), Dr("PorcentajeProducto3").ToString().ToDecimal(), UsuarioActual.CveUsuario, Dr("ProntoPago").ToString().ToDecimal(), Dr("Plazo").ToString().ToEntero()) Then TieneError = True End If - ElseIf Dr("Estatus").ToString = "U" Then - If Not ObjPS.UpdatePorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal, Dr("PorcentajeProducto2").ToString.ToDecimal, Dr("PorcentajeProducto3").ToString.ToDecimal, Dr("ProntoPago").ToString.ToDecimal, Dr("Plazo").ToString.ToEntero) Then + ElseIf Dr("Estatus").ToString() = "U" Then + If Not ObjPS.UpdatePorcentajeMarcas(CveCliente, Dr("CveMarca").ToString().ToEntero(), Dr("PorcentajeProducto").ToString().ToDecimal(), Dr("PorcentajeProducto2").ToString().ToDecimal(), Dr("PorcentajeProducto3").ToString().ToDecimal(), Dr("ProntoPago").ToString().ToDecimal(), Dr("Plazo").ToString().ToEntero()) Then TieneError = True End If - ElseIf Dr("Estatus").ToString = "D" Then - If Not ObjPS.RemovePorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero) Then + ElseIf Dr("Estatus").ToString() = "D" Then + If Not ObjPS.RemovePorcentajeMarcas(CveCliente, Dr("CveMarca").ToString().ToEntero()) Then TieneError = True End If End If @@ -8701,9 +8721,9 @@ Partial Class Clientes ObjPS.Dispose() - End Sub + End Sub #End Region - + #Region "PORCENTAJE PRECIO DE PRODUCTOS" Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios")) @@ -8770,15 +8790,15 @@ Partial Class Clientes End Sub Protected Sub DdlProducto2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlProducto2.selectedindexchange - DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2) + DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero(), DdlProducto2) End Sub Private Sub DdlProducto2IndexChange(CvePSParametro As Integer, Ddl As ADServerControl.Dropdownlost) Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("") If drPS IsNot Nothing Then - Dim Precio = drPS("Precio").ToString.ToDouble + Dim Precio = drPS("Precio").ToString().ToDouble LbPrecioG.Text = Precio.FormatoNumero() - LbPrecioA.Text = ((Precio * TxtPorcentajePS.Text.ToDecimal) / 100).FormatoNumero + LbPrecioA.Text = ((Precio * TxtPorcentajePS.Text.ToDecimal()) / 100).FormatoNumero() End If End Sub @@ -8811,16 +8831,16 @@ Partial Class Clientes Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click If DdlProducto2.SelectedText <> "" Then - If TxtPorcentajePS.Text.ToDecimal >= 0 And TxtPorcentajePS.Text.ToDecimal <= 100 Then + If TxtPorcentajePS.Text.ToDecimal() >= 0 And TxtPorcentajePS.Text.ToDecimal() <= 100 Then Dim registro As DataRow = DTPorcentajePrecios.NewRow registro.Item("No") = DTPorcentajePrecios.Rows.Count + 1 - registro.Item("CvePS") = DdlProducto2.SelectedValue.ToEntero + registro.Item("CvePS") = DdlProducto2.SelectedValue.ToEntero() registro.Item("Producto") = DdlProducto2.SelectedText - registro.Item("PrecioG") = LbPrecioG.Text.ToDecimal - registro.Item("PrecioA") = LbPrecioG.Text.ToDecimal * TxtPorcentajePS.Text.ToDecimal / 100 - registro.Item("PorcentajeProducto") = TxtPorcentajePS.Text.ToDecimal + registro.Item("PrecioG") = LbPrecioG.Text.ToDecimal() + registro.Item("PrecioA") = LbPrecioG.Text.ToDecimal() * TxtPorcentajePS.Text.ToDecimal() / 100 + registro.Item("PorcentajeProducto") = TxtPorcentajePS.Text.ToDecimal() registro.Item("Estatus") = "I" DTPorcentajePrecios.Rows.Add(registro) CargaDTPorcentajePrecios2(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' ")) @@ -8839,12 +8859,12 @@ Partial Class Clientes Dim lnkRemove As LinkButton = DirectCast(sender, LinkButton) - If DTPorcentajePrecios.Rows.Count > 0 And lnkRemove.CommandArgument.ToString.Length > 0 Then + If DTPorcentajePrecios.Rows.Count > 0 And lnkRemove.CommandArgument.ToString().Length > 0 Then Dim i As Integer - i = lnkRemove.CommandArgument.ToString.ToEntero + i = lnkRemove.CommandArgument.ToString().ToEntero() Dim Drs As DataRow() = DTPorcentajePrecios.Select(String.Format("No = {0}", i)) If Drs.Count > 0 Then - If CveCliente > 0 AndAlso Drs(0)("CvePS").ToString.ToEntero > 0 Then + If CveCliente > 0 AndAlso Drs(0)("CvePS").ToString().ToEntero() > 0 Then Drs(0)("Estatus") = "D" Else Drs(0).Delete() @@ -8875,14 +8895,14 @@ Partial Class Clientes Dim PorcentajeProducto As Double = GvP.Rows(e.RowIndex).FCTextBox("TxtPorcentajeP").Text.ToDouble If PorcentajeProducto >= 0 And PorcentajeProducto <= 100 Then - Dim No As Integer = GvP.Rows(e.RowIndex).DataKey("No").ToEntero + Dim No As Integer = GvP.Rows(e.RowIndex).DataKey("No").ToEntero() Dim Drs As DataRow() = DTPorcentajePrecios.Select(String.Format("No = {0}", No)) If Drs.Count > 0 Then Drs(0)("PorcentajeProducto") = PorcentajeProducto - Drs(0)("PrecioA") = Drs(0)("PrecioG").ToString.ToDouble * PorcentajeProducto / 100 - If Drs(0)("Estatus").ToString <> "I" Then + Drs(0)("PrecioA") = Drs(0)("PrecioG").ToString().ToDouble * PorcentajeProducto / 100 + If Drs(0)("Estatus").ToString() <> "I" Then Drs(0)("Estatus") = "U" End If End If @@ -8906,18 +8926,18 @@ Partial Class Clientes For Each Dr As DataRow In DTPorcentajePrecios.Rows - If Dr("Estatus").ToString <> "" Then + If Dr("Estatus").ToString() <> "" Then - If Dr("Estatus").ToString = "I" Then - If Not ObjPS.AddPorcentajeProductos(CveCliente, Dr("CvePS").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal, UsuarioActual.CveUsuario) Then + If Dr("Estatus").ToString() = "I" Then + If Not ObjPS.AddPorcentajeProductos(CveCliente, Dr("CvePS").ToString().ToEntero(), Dr("PorcentajeProducto").ToString().ToDecimal(), UsuarioActual.CveUsuario) Then TieneError = True End If - ElseIf Dr("Estatus").ToString = "U" Then - If Not ObjPS.UpdatePorcentajeProductos(CveCliente, Dr("CvePS").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal) Then + ElseIf Dr("Estatus").ToString() = "U" Then + If Not ObjPS.UpdatePorcentajeProductos(CveCliente, Dr("CvePS").ToString().ToEntero(), Dr("PorcentajeProducto").ToString().ToDecimal()) Then TieneError = True End If - ElseIf Dr("Estatus").ToString = "D" Then - If Not ObjPS.RemovePorcentajeProductos(CveCliente, Dr("CvePS").ToString.ToEntero) Then + ElseIf Dr("Estatus").ToString() = "D" Then + If Not ObjPS.RemovePorcentajeProductos(CveCliente, Dr("CvePS").ToString().ToEntero()) Then TieneError = True End If End If @@ -8938,13 +8958,13 @@ Partial Class Clientes End Sub Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs) - DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2) - End Sub + DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero(), DdlProducto2) + End Sub #End Region - + #Region " A C U M U L A D O R E S" - - + + Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs) 'CveVentaNota = 0 @@ -8953,12 +8973,12 @@ Partial Class Clientes 'For Each GvRow As GridViewRow In GvAcum.Rows - ' If GvRow.DataKey("CveConcepto").ToEntero = 1 And GvRow.FCCheckBox("ChkCargo").Checked Then - ' Cargos = Cargos + GvRow.DataKey("ImporteCargo").ToDecimal + ' If GvRow.DataKey("CveConcepto").Toentero() = 1 And GvRow.FCCheckBox("ChkCargo").Checked Then + ' Cargos = Cargos + GvRow.DataKey("ImporteCargo").ToDecimal() ' End If 'Next - 'Dim CvePS As Integer = UsuarioActual.Empresa.Funcionalidad(534).ToEntero 'CvePS Distruibuidor Cargo Nota + 'Dim CvePS As Integer = UsuarioActual.Empresa.Funcionalidad(534).Toentero() 'CvePS Distruibuidor Cargo Nota 'Dim CveUnidadMedida As Integer 'Dim CveClasificacion As Integer @@ -8966,8 +8986,8 @@ Partial Class Clientes ' If Cargos > 0 Then - ' CveUnidadMedida = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimeroValor("CveUnidadMedida").ToString.ToEntero - ' CveClasificacion = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimeroValor("CveClasificacion").ToString.ToEntero + ' CveUnidadMedida = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimeroValor("CveUnidadMedida").ToString().Toentero() + ' CveClasificacion = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimeroValor("CveClasificacion").ToString().Toentero() ' Iva = Cargos * 0.16D ' If GenerarNotaCredito(CvePS, 1, CveUnidadMedida, Cargos, Iva, "Clientes/Usados", CveClasificacion) Then @@ -9002,20 +9022,20 @@ Partial Class Clientes 'Dim Iva As Decimal = 0D 'For Each GvRow As GridViewRow In GvAcum.Rows - ' If GvRow.DataKey("CveConcepto").ToEntero = 1 And GvRow.FCCheckBox("ChkBonificacion").Checked Then - ' Bonificacion = Bonificacion + GvRow.DataKey("ImporteBonificacion").ToDecimal + ' If GvRow.DataKey("CveConcepto").Toentero() = 1 And GvRow.FCCheckBox("ChkBonificacion").Checked Then + ' Bonificacion = Bonificacion + GvRow.DataKey("ImporteBonificacion").ToDecimal() ' End If 'Next - 'Dim CvePS As Integer = UsuarioActual.Empresa.Funcionalidad(534).ToEntero 'CvePS Distruibuidor Bonificación Nota + 'Dim CvePS As Integer = UsuarioActual.Empresa.Funcionalidad(534).Toentero() 'CvePS Distruibuidor Bonificación Nota 'Dim CveUnidadMedida As Integer 'Dim CveClasificacion As Integer 'If CvePS > 0 Then ' If Bonificacion > 0 Then - ' CveUnidadMedida = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimeroValor("CveUnidadMedida").ToString.ToEntero - ' CveClasificacion = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimeroValor("CveClasificacion").ToString.ToEntero + ' CveUnidadMedida = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimeroValor("CveUnidadMedida").ToString().Toentero() + ' CveClasificacion = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimeroValor("CveClasificacion").ToString().Toentero() ' Iva = Bonificacion * 0.16D ' If GenerarNotaCredito(CvePS, 2, CveUnidadMedida, Bonificacion, Iva, "Clientes/Usados", CveClasificacion) Then @@ -9062,7 +9082,7 @@ Partial Class Clientes If DTSucursales.Rows.Count > 0 Then If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa) Then - Dim CveSubProyecto As Integer = DTSucursales.FiltroPrimeroValor("CveSubProyecto", "").ToEntero + Dim CveSubProyecto As Integer = DTSucursales.FiltroPrimeroValor("CveSubProyecto", "").ToEntero() Dim DT As DataTable If CveSubProyecto > 0 Then DT = ObjFolios.DtResultados.FiltraParametros(" Estado = 'Activo' AND LEN(Serie) > 0 AND CveSubProyecto = " & CveSubProyecto) @@ -9071,8 +9091,8 @@ Partial Class Clientes End If If DT.Rows.Count > 0 Then - FolioNotaAcumulador = DT.Rows(0)("FActual").ToString.ToEntero - SerieNotaAcumulador = DT.Rows(0)("Serie").ToString + FolioNotaAcumulador = DT.Rows(0)("FActual").ToString().ToEntero() + SerieNotaAcumulador = DT.Rows(0)("Serie").ToString() Respuesta = True End If @@ -9089,7 +9109,7 @@ Partial Class Clientes If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DataKey("CveConcepto").ToEntero = 1 Then + If e.Row.DataKey("CveConcepto").ToEntero() = 1 Then Dim FacturadoCargo As Boolean = Boolean.Parse(e.Row.DataKey("FacturadoCargo")) Dim FacturadoBonificacion As Boolean = Boolean.Parse(e.Row.DataKey("FacturadoBonificacion")) @@ -9143,7 +9163,7 @@ Partial Class Clientes Dim ObjAcum As New ClsAcumuladores Dim ImporteCargo As Decimal = 0D - If ObjAcum.DistribuidorMovtosGet(CveCliente, UsuarioActual.CveEmpresa, TxtFechaIUsados.Text.ToDate, TxtFechaFUsados.Text.ToDate, CveConcepto:=DdlConceptoUsado.SelectedValue.ToEntero()) Then + If ObjAcum.DistribuidorMovtosGet(CveCliente, UsuarioActual.CveEmpresa, TxtFechaIUsados.Text.ToDate(), TxtFechaFUsados.Text.ToDate(), CveConcepto:=DdlConceptoUsado.SelectedValue.ToEntero()) Then GvAcum.DataSource = ObjAcum.DtResultados End If @@ -9314,10 +9334,10 @@ Partial Class Clientes DrPS("IEPSPorcentaje") = 0 'verifica si tiene ventaminima - If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString.ToDecimal > 0 Then + If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString().ToDecimal() > 0 Then 'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15... - If Cantidad Mod DrPS("VentaMinima").ToString.ToDecimal <> 0 Then - Alert(String.Format("El producto se vende solo en cantidades de {0}", DrPS("VentaMinima").ToString)) + If Cantidad Mod DrPS("VentaMinima").ToString().ToDecimal() <> 0 Then + Alert(String.Format("El producto se vende solo en cantidades de {0}", DrPS("VentaMinima").ToString())) Return False End If End If @@ -9334,7 +9354,7 @@ Partial Class Clientes Row("Consec") = TmpDT.Rows.Count + 1 Row("PS") = DrPS("PS") - Row("CodigoPS") = DrPS("PSCodigo").ToString + Row("CodigoPS") = DrPS("PSCodigo").ToString() Row("CveTipoPS") = DrPS("CveTipoPS") Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario") Row("CveTamaño") = DrPS("CveTamaño") @@ -9345,7 +9365,7 @@ Partial Class Clientes Row("PorcentajeIVA") = PorcentajeIVA Row("IVA") = Row("PorcentajeIVA") - Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales) + Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString().ToDecimal() * TotalCalculableImpuestos, NumeroDecimales) Row("ImporteRetIVA") = 0 @@ -9353,7 +9373,7 @@ Partial Class Clientes Row("PorcentajeRetIVA") = 0 Row("PorcentajeRetISR") = 0 Row("PorcentajeIEPS") = DrPS("IEPSPorcentaje") - Row("ImporteIEPS") = Math.Round(DrPS("IEPSPorcentaje").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales) + Row("ImporteIEPS") = Math.Round(DrPS("IEPSPorcentaje").ToString().ToDecimal() * TotalCalculableImpuestos, NumeroDecimales) Row("IEPS") = Row("ImporteIEPS") Row("Descuento") = Math.Round(Descuento, NumeroDecimales) Row("TipoDescuento") = 0 @@ -9394,19 +9414,19 @@ Partial Class Clientes For Each GvRow As GridViewRow In GvAcum.Rows If Tipo = 1 Then - If GvRow.DataKey("CveConcepto").ToEntero = 1 And GvRow.FCCheckBox("ChkCargo").Checked Then - SubTotal = SubTotal + GvRow.DataKey("ImporteCargo").ToDecimal + If GvRow.DataKey("CveConcepto").ToEntero() = 1 And GvRow.FCCheckBox("ChkCargo").Checked Then + SubTotal = SubTotal + GvRow.DataKey("ImporteCargo").ToDecimal() End If ElseIf Tipo = 2 Then - If GvRow.DataKey("CveConcepto").ToEntero = 1 And GvRow.FCCheckBox("ChkBonificacion").Checked Then - SubTotal = SubTotal + GvRow.DataKey("ImporteBonificacion").ToDecimal + If GvRow.DataKey("CveConcepto").ToEntero() = 1 And GvRow.FCCheckBox("ChkBonificacion").Checked Then + SubTotal = SubTotal + GvRow.DataKey("ImporteBonificacion").ToDecimal() End If End If - CveSubProyecto = GvRow.DataKey("CveSubProyecto").ToEntero + CveSubProyecto = GvRow.DataKey("CveSubProyecto").ToEntero() Next - Dim CvePS As Integer = UsuarioActual.Empresa.Funcionalidad(534).ToEntero 'CvePS Distruibuidor Bonificación Nota + Dim CvePS As Integer = UsuarioActual.Empresa.Funcionalidad(534).ToEntero() 'CvePS Distruibuidor Bonificación Nota Dim CveUnidadMedida As Integer = 0 Dim CveClasificacion As Integer = 0 Dim UnidadMedida As String = "" @@ -9417,11 +9437,11 @@ Partial Class Clientes If SubTotal > 0 Then Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).Rows(0) If Dr IsNot Nothing Then - CveUnidadMedida = Dr("CveUnidadMedida").ToString.ToEntero - CveClasificacion = Dr("CveClasificacion").ToString.ToEntero - PS = Dr("PSCodigo").ToString - UnidadMedida = Dr("UnidadMedida").ToString - Clasificacion = Dr("Clasificacion").ToString + CveUnidadMedida = Dr("CveUnidadMedida").ToString().ToEntero() + CveClasificacion = Dr("CveClasificacion").ToString().ToEntero() + PS = Dr("PSCodigo").ToString() + UnidadMedida = Dr("UnidadMedida").ToString() + Clasificacion = Dr("Clasificacion").ToString() End If PorcentajeIVA = 0.16D IVA = SubTotal * PorcentajeIVA @@ -9430,7 +9450,7 @@ Partial Class Clientes TmpDT.Rows.Clear() TmpDT.AcceptChanges() - AgregarProductoServicio(1, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "Clientes/Usados", SubTotal, 0, -1, "", DdlSubProyecto.SelectedValue.ToEntero, + AgregarProductoServicio(1, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "Clientes/Usados", SubTotal, 0, -1, "", DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text, PorcentajeIVA:=PorcentajeIVA) Dim Folio As Integer = -1 @@ -9465,21 +9485,21 @@ Partial Class Clientes ObjFactura.Fecha = Now ObjFactura.CvePrePoliza = -1 - 'ObjFactura.CveMetodoPago = DdlMetodoPago.SelectedValue.ToEntero + 'ObjFactura.CveMetodoPago = DdlMetodoPago.SelectedValue.Toentero() 'ObjFactura.MetodoPago = DdlMetodoPago.SelectedItem.Text 'ObjFactura.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {DdlMetodoPago.SelectedValue}") - ObjFactura.FechaVencimiento = TxtFechaPago.Text.ToDate + ObjFactura.FechaVencimiento = TxtFechaPago.Text.ToDate() - ObjFactura.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero - ObjFactura.MetodoPago33 = If(DdlMetodoPago33.SelectedValue.ToEntero > 0, DdlMetodoPago33.SelectedItem.Text, "") + ObjFactura.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero() + ObjFactura.MetodoPago33 = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "") ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {DdlMetodoPago33.SelectedValue}") - ObjFactura.CveFormaPago33 = DdlFormaPago33.SelectedValue.ToEntero - ObjFactura.FormaPago33 = If(DdlFormaPago33.SelectedValue.ToEntero > 0, DdlFormaPago33.SelectedItem.Text, "") + ObjFactura.CveFormaPago33 = DdlFormaPago33.SelectedValue.ToEntero() + ObjFactura.FormaPago33 = If(DdlFormaPago33.SelectedValue.ToEntero() > 0, DdlFormaPago33.SelectedItem.Text, "") ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {DdlFormaPago33.SelectedValue}") - ObjFactura.CveUsoCFDI = DdlUsoCFDI.SelectedValue.ToEntero - ObjFactura.UsoCFDI = If(DdlUsoCFDI.SelectedValue.ToEntero > 0, DdlUsoCFDI.SelectedItem.Text, "") + ObjFactura.CveUsoCFDI = DdlUsoCFDI.SelectedValue.ToEntero() + ObjFactura.UsoCFDI = If(DdlUsoCFDI.SelectedValue.ToEntero() > 0, DdlUsoCFDI.SelectedItem.Text, "") ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}") ObjFactura.UsuarioCreo = UsuarioActual.Nombre @@ -9537,14 +9557,14 @@ Partial Class Clientes ObjFactura.NumeroPersonas = 0 ObjFactura.CveContrato = -1 - ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero + ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero() ObjFactura.Entrega = "" ObjFactura.Vigencia = Now ObjFactura.CveVentaPadre = -1 - ObjFactura.CveVendedor = DdlVendedor.SelectedValue.ToEntero - If DdlVendedor.SelectedValue.ToEntero > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then + ObjFactura.CveVendedor = DdlVendedor.SelectedValue.ToEntero() + If DdlVendedor.SelectedValue.ToEntero() > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then DdlVendedor.Enabled = False End If @@ -9599,7 +9619,7 @@ Partial Class Clientes Dim UsadosBonificacion As List(Of Integer) = New List(Of Integer) For Each GvRow As GridViewRow In GvAcum.Rows - Dim CveMovto As Integer = GvRow.DataKey("CveMovto").ToEntero + Dim CveMovto As Integer = GvRow.DataKey("CveMovto").ToEntero() If (Tipo = 1 And GvRow.FCCheckBox("ChkCargo").Checked) Or (Tipo = 2 And GvRow.FCCheckBox("ChkBonificacion").Checked) Then UsadosBonificacion.Add(CveMovto) End If @@ -9618,496 +9638,496 @@ Partial Class Clientes ' ObjFactura.Timbre = PreParaTimbre(ObjFactura) - End Sub - - 'Private Sub PrepararTimbrado(ByRef FM As Modelos.FemsaFactura, ByRef TmpDT7Eleven As DataTable, ByRef TmpDTComplementosTimbrado As DataTable) - ' FM.AplicaFEMSA = ChkAplicaFEMSA.Checked - ' FM.FEMSA_NumSociedad = "" - ' FM.FEMSA_NumProveedor = "" - ' FM.FEMSA_Mail = "" - ' FM.FEMSA_Version = "".ToEntero - ' FM.FEMSA_NumPedido = "".ToEntero - ' FM.FEMSA_NumEntrada = "" - ' FM.FEMSA_NumRemision = "" - ' FM.FEMSA_NumSocio = "" - ' FM.FEMSA_CentroCosto = "" - ' FM.FEMSA_IPeriodoLiquidacion = "" - ' FM.FEMSA_FPeriodoLiquidacion = "" - ' FM.FEMSA_CodRetencion1 = "" - ' FM.FEMSA_CodRetencion2 = "" - - ' TmpDT7Eleven.Columns.Add("sevenElevenNumProveedor") - ' TmpDT7Eleven.Columns.Add("sevenElevenFolio") - ' TmpDT7Eleven.Columns.Add("sevenElevenTienda") - ' TmpDT7Eleven.Columns.Add("sevenElevenFecha") - - ' Dim Row As DataRow = TmpDT7Eleven.NewRow - ' Row("sevenElevenNumProveedor") = "" - ' Row("sevenElevenFolio") = "" - ' Row("sevenElevenTienda") = "" - ' Row("sevenElevenFecha") = "" - - ' TmpDT7Eleven.Rows.Add(Row) - - ' TmpDTComplementosTimbrado.Columns.Add("CveComplemento") - ' TmpDTComplementosTimbrado.Columns.Add("IdContabilidad") - ' TmpDTComplementosTimbrado.Columns.Add("TipoProceso") - ' TmpDTComplementosTimbrado.Columns.Add("TipoAmbito") - ' TmpDTComplementosTimbrado.Columns.Add("Entidad") - - ' Dim Row2 As DataRow = TmpDTComplementosTimbrado.NewRow - ' Row2("CveComplemento") = -1 - ' Row2("IdContabilidad") = -1 - ' Row2("TipoProceso") = -1 - ' Row2("TipoAmbito") = -1 - ' Row2("Entidad") = -1 - - ' TmpDTComplementosTimbrado.Rows.Add(Row2) - 'End Sub - - 'Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre - ' Dim Timbre As New CFDITimbre - ' Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", "")) - ' Timbre.Comprobante.Folio = Obj.Folio.ToString - ' Timbre.Comprobante.Serie = Obj.Serie - ' Timbre.Comprobante.Fecha = Obj.FechaCP - ' Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33 - ' Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33 - ' Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT - ' Timbre.Comprobante.Subtotal = Obj.SubTotal - ' Timbre.Comprobante.Descuentos = Obj.Descuento - ' Timbre.Comprobante.Moneda = Obj.MonedaSAT - ' Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString) - ' Timbre.Comprobante.Total = Obj.Total - - ' Try - ' Obj.SetSubProyecto(Me) - ' Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP - ' Catch ex As Exception - - ' End Try - - ' Timbre.Comprobante.Confirmacion = "" - - ' Timbre.Receptor.RFC = Obj.Cliente.RFC - ' Timbre.Receptor.Nombre = Obj.Cliente.Nombre - ' Timbre.Receptor.ResidenciaFiscal = "" - ' Timbre.Receptor.NumeroRegistroTributario = "" - ' Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI - - - ' If Obj.CveTipoRelacion > 0 Then - ' Select Case Obj.CveTipoRelacion - ' Case 1 - ' Timbre.CFDIRelacionados.TipoRelacion = "01" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "01-Nota de Crédito aplicada a Ingreso" - ' Case 2 - ' Timbre.CFDIRelacionados.TipoRelacion = "02" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "02-Nota de débito de los documentos relacionados" - ' Case 3 - ' Timbre.CFDIRelacionados.TipoRelacion = "03" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "03-Devolución aplicada a Ingreso" - ' Case 4 - ' Timbre.CFDIRelacionados.TipoRelacion = "04" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "04-Refacturación de Ingreso" - ' Case 7 - ' Timbre.CFDIRelacionados.TipoRelacion = "07" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo" - ' Case 8 - ' Timbre.CFDIRelacionados.TipoRelacion = "08" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "08-Factura generada por pagos en parcialidades " - ' Case 9 - ' Timbre.CFDIRelacionados.TipoRelacion = "09" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "09-Factura generada por pagos diferidos" - - ' End Select - ' End If - - ' Dim totSubTotal As Decimal = Obj.SubTotal - ' Dim totIVA As Decimal = Obj.IVA - ' Dim totRetIVA As Decimal = Obj.RetIVA - ' Dim totRetISR As Decimal = Obj.RetISR - ' Dim TasaRetIVA As Decimal = 0 - ' Dim TasaRetISR As Decimal = 0 - ' Dim i As Integer = 1 - - ' 'detalles - ' Dim tPS As String = "" - - ' For Each drr As DataRow In Obj.DtDetalle.Rows - ' If drr("PS").ToString.Length = 1 Then - ' tPS = drr("Obs").ToString - ' Else - ' If drr("PS").ToString.Length = 0 Then - ' tPS = "" - ' Else - ' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs")) - ' End If - ' End If - ' 'condicionante, especial - ' If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto - - ' Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal, - ' .Descripcion = tPS, - ' .ValorUnitario = drr("PU").ToString.ToDecimal, - ' .Importe = drr("TotalImporte").ToString.ToDecimal, - ' .Descuento = drr("Descuento").ToString.ToDecimal, - ' .Unidad = drr("UM").ToString, - ' .ClaveUnidad = drr("SATClaveUM").ToString, - ' .ClaveProdServ = drr("SATClaveProdServ").ToString, - ' .Noidentificacion = drr("Noidentificacion").ToString, - ' .CuentaPredial = drr("CuentaPredial").ToString} - ' 'verifica suma subtotales - ' If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales - ' concepto.Importe = totSubTotal - ' End If - ' totSubTotal = totSubTotal - concepto.Importe - - ' 'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura - ' ' If drr("ImporteIVA").ToString.ToDouble > 0 Then - - ' 'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos - ' If Timbre.Comprobante.Total > 0 Then - ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal}) - ' End If - - ' If drr("ImporteIEPS").ToString.ToDouble > 0 Then - ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal}) - ' End If - - ' If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones - ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetIVA, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal}) - ' End If - - ' If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR - ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetISR, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal}) - ' End If - - ' Timbre.Conceptos.Add(concepto) - ' i += 1 - ' Next - - ' Return Timbre - 'End Function - - 'Private Function GenerarNotaCredito(CvePS As Integer, Tipo As Integer, CveUnidadMedida As Integer, Importe As Decimal, Iva As Decimal, Descripcion As String, CveClasificacion As Integer) As Boolean - - ' Dim Respuesta As Boolean = False - - ' Dim ObjVentas As New ClsVentas - ' Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL()) - ' Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL()) - - ' Dim ErrorVentas As Boolean = False - ' Dim SubTotal As Decimal = Importe - ' Dim Total As Decimal = Importe + Iva - - ' Dim RetIVA As Decimal = 0 - ' Dim RetISR As Decimal = 0 - ' Dim TipoCambio As Decimal = 0 - ' Dim FechaVencimiento As Date = Now - ' Dim fecha As Date = Now - - ' Dim Folio As Integer = 0 - ' Dim Serie As String = "" - - ' If FolioNotaCredito() Then - ' Folio = FolioNotaAcumulador - ' Serie = SerieNotaAcumulador - ' End If - - ' Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero - - ' Dim CveVenta As Integer - - ' If Folio > 0 Then - - ' Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas($"Clientes/{Descripcion}", 1, Total, Total, 1, fecha, "Nota de crédito por Cargo", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - - ' If ObjVentas.AddVenta("Egs", Folio, CveCliente.ToEntero, -1, SubTotal, 0, 0, Iva, RetIVA, RetISR, Total, 1, TipoCambio, - ' 0, 0, 0, FechaVencimiento, fecha, "", "", fecha, -1, "", "", "", 0, 0, 0, "-1".ToDate, "-1".ToDate, "-1".ToDate, -1, -1, 0, CvePrePoliza, - ' UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Serie:=Serie, CveSubProyecto:=CveSubProyecto, CveSubProyectoEjecucion:=CveSubProyecto) Then - - ' CveVenta = ObjVentas.CveVenta - - ' If CveVenta > 0 Then - ' If ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, 0.16, SubTotal * 0.16, Descripcion, 0, 0, -1, 0) Then - - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, SubTotal, Folio.ToString, 150, String.Format("{0}-{1}", Serie, Folio), fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=CveSubProyecto) Then - ' ErrorVentas = True - ' End If - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Folio.ToString, 12, String.Format("{0}-{1}", Serie, Folio), fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total) Then - ' ErrorVentas = True - ' End If - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Iva, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Iva) Then - ' ErrorVentas = True - ' End If - - ' If Not ErrorVentas Then - ' For Each GvRow As GridViewRow In GvAcum.Rows - ' Dim CveMovto As Integer = GvRow.DataKey("CveMovto").ToEntero - - ' If (Tipo = 1 And GvRow.FCCheckBox("ChkCargo").Checked) Or (Tipo = 2 And GvRow.FCCheckBox("ChkBonificacion").Checked) Then - - ' If ObjAcum.DistribuidorActualizarFacturados(CveMovto, UsuarioActual.CveEmpresa, Tipo, CveVenta) Then - ' Respuesta = True - ' ErrorVentas = False - ' CveVentaNota = CveVenta - ' Else - ' Respuesta = False - ' ErrorVentas = True - ' CveVentaNota = 0 - ' Exit For - ' End If - - ' End If - ' Next - ' End If - - - ' If Not ErrorVentas Then - ' Alert($"Nota de crédito generada correctamente {Serie}-{Folio}") - ' End If - - - ' Else - ' ErrorVentas = True - ' End If - ' Else - ' ErrorVentas = True - ' End If - - ' Else - ' ErrorVentas = True - ' End If - ' Else - ' Alert("No se pudo obtener el Folio.", TipoMensaje.MsgError) - ' End If - - - - ' If ErrorVentas Then - ' ObjVentas.RollBack() - ' Else - - ' ObjVentas.Commit() - ' CargaUsados() - - ' 'Dim DtDetallesVenta As New DataTable - - ' 'If ObjVentas.GetVentaDetalle(CveVenta) Then - - ' ' DtDetallesVenta = ObjVentas.DtResultados - ' ' 'CreaObjetosVenta(CveVenta, Serie, Folio, SubTotal, Iva, DtDetallesVenta) - - ' ' ObjFactura.Timbre = PreParaTimbre(ObjFactura, ObjFactura.CveSubProyecto) - - ' ' Dim ObjTimbrado As New Timbrado - ' ' Dim SeTimbro As Boolean = False - - ' ' SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) - - ' ' If SeTimbro Then - ' ' Alert("Se timbro correctamente") - ' ' Else - ' ' Alert("No se pudo timbrar, intente mas tarde.", TipoMensaje.MsgError) - ' ' End If - - ' 'Else - ' ' Alert("No se pudo timbrar, no se pudieron obtener los detalles de la venta.", TipoMensaje.MsgError) - ' 'End If - - ' End If - - - - ' ObjVentas.Dispose() - ' Return Respuesta - - 'End Function - 'Private Function generaNC(CveVenta As Integer, ByRef ObjVentas As ClsVentas, ByVal factura As Modelos.Factura) As List(Of Object) - - ' Dim Obj As New List(Of Object) - ' Dim CveVentaNueva As Integer = ObjVentas.CveVenta - ' Dim BanderaGeneraNC As Boolean = False - ' If UsuarioActual.CveEmpresa.Contiene(1, 119) Then BanderaGeneraNC = True - - ' If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then - ' If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then - ' Dim drv As DataRow = ObjVentas.DtResultados.Rows(0) - ' Dim TmpDTconceptos As DataTable = Nothing - - ' ''CargaCliente - - ' Dim CveCliente As Integer = drv("CveCliente").ToString.ToEntero - ' If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not CveCliente.Contiene(10450, 10460, 10458) Then - ' Return Nothing - ' ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 AndAlso Not CveCliente.Contiene(27448) Then - ' Return Nothing - ' End If - ' factura.TipoDocto = drv("TipoDocto").ToString - ' factura.Serie = drv("Serie").ToString - ' factura.FechaEjecucion = drv("FechaEjecucion").ToString.ToDateTime - ' factura.Fecha = drv("Fecha").ToString.ToDateTime - ' factura.CveSubProyectoEjecucion = drv("CveSubProyectoEjecucion").ToString.ToEntero - ' factura.CveSubProyectoCobranza = drv("CveSubProyectoCobranza").ToString.ToEntero - ' factura.CveClienteSucursal = drv("CveClienteSucursal").ToString.ToEntero - ' factura.CveSubProyecto = drv("CveSubProyecto").ToString.ToEntero - - - ' ''CargaDetalle - ' If ObjVentas.GetVentaDetalle(CveVenta) Then - ' TmpDTconceptos = ObjVentas.DtResultados - ' TmpDTconceptos.Columns.Add("CveMovimientoDetallePedido", GetType(Integer)) - ' GvPS.DataSource = TmpDTconceptos - ' GvPS.DataBind() - ' End If - - ' '' Carga Totales - ' factura.SubTotal = drv("SubTotal").ToString.ToDecimal - ' factura.Descuento = drv("Descuento").ToString.ToDecimal - ' factura.Amortizacion = drv("Amortizacion").ToString.ToDecimal - ' factura.IVA = drv("IVA").ToString.ToDecimal - ' factura.RetIVA = drv("RetIVA").ToString.ToDecimal - ' factura.RetISR = drv("RetISR").ToString.ToDecimal - ' factura.Total = drv("Total").ToString.ToDecimal - ' factura.MotivoDescuento = drv("MotivoDescuento").ToString - ' factura.Observaciones = drv("Observaciones").ToString - ' factura.CveMoneda = drv("CveMoneda").ToString.ToEntero - ' factura.TipoCambio = drv("TipoCambio").ToString.ToDecimal - ' factura.CveVendedor = drv("CveVendedor").ToString.ToEntero - ' factura.RefDocto = drv("Ref").ToString - - ' If factura.CveCliente > 0 Then - ' If Not IsNothing(TmpDTconceptos) AndAlso TmpDTconceptos.Rows.Count > 0 Then - - ' If Not drv("Total").ToString.ToDecimal = factura.Total Then - ' Return Nothing - ' End If - - - - ' End If - ' End If - ' End If - ' End If - - ' If Obj.Count > 0 Then - ' Return Obj - ' Else - ' Return Nothing - ' End If - - 'End Function - - 'Private Function PreParaTimbre(Obj As Modelos.Factura, CveSubProyecto As Integer) As CFDITimbre - - ' Dim Timbre As New CFDITimbre - ' Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", "")) - ' Timbre.Comprobante.Folio = Obj.Folio.ToString - ' Timbre.Comprobante.Serie = Obj.Serie - ' Timbre.Comprobante.Fecha = Obj.Fecha - ' Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33 - ' Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33 - ' Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT - ' Timbre.Comprobante.Subtotal = Obj.SubTotal - - ' Timbre.Comprobante.Descuentos = Obj.Descuento - ' Timbre.Comprobante.Moneda = Obj.MonedaSAT - ' Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString) - ' Timbre.Comprobante.Total = Obj.Total - - ' Try - ' Obj.SetSubProyecto(Me) - ' Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP - ' Catch ex As Exception - - ' End Try - - ' Timbre.Comprobante.Confirmacion = "" - - ' Timbre.Receptor.RFC = TxtRFC.Text - ' Timbre.Receptor.Nombre = TxtNombre.Text - ' Timbre.Receptor.ResidenciaFiscal = "" - ' Timbre.Receptor.NumeroRegistroTributario = "" - ' Timbre.Receptor.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}") - - ' Dim totSubTotal As Decimal = Obj.SubTotal - ' Dim totIVA As Decimal = Obj.IVA - ' Dim totRetIVA As Decimal = Obj.RetIVA - ' Dim totRetISR As Decimal = Obj.RetISR - ' Dim TasaRetIVA As Decimal = 0 - ' Dim TasaRetISR As Decimal = 0 - ' Dim i As Integer = 1 - - ' ''detalles - ' Dim tPS As String = "" - - ' For Each drr As DataRow In Obj.DtDetalle.Rows - ' If drr("PS").ToString.Length = 1 Then - ' tPS = drr("Obs").ToString - ' Else - ' If drr("PS").ToString.Length = 0 Then - ' tPS = "" - ' Else - ' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs")) - ' End If - ' End If - ' '' condicionante, especial - ' If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto - - ' Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal, - ' .Descripcion = tPS, - ' .ValorUnitario = drr("PU").ToString.ToDecimal, - ' .Importe = drr("TotalImporte").ToString.ToDecimal, - ' .Descuento = drr("Descuento").ToString.ToDecimal, - ' .Unidad = drr("UM").ToString, - ' .ClaveUnidad = drr("SATClaveUM").ToString, - ' .ClaveProdServ = drr("SATClaveProdServ").ToString, - ' .Noidentificacion = drr("Noidentificacion").ToString, - ' .CuentaPredial = drr("CuentaPredial").ToString} - ' '' verifica suma subtotales - ' If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales - ' concepto.Importe = totSubTotal - ' End If - ' totSubTotal = totSubTotal - concepto.Importe - - ' ''siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura - ' If drr("ImporteIVA").ToString.ToDouble > 0 Then - ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal}) - ' End If - - ' If drr("ImporteIEPS").ToString.ToDouble > 0 Then - ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal}) - ' End If - - ' If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones - ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetIVA, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal}) - ' End If - - ' If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR - ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetISR, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal}) - ' End If - - ' Timbre.Conceptos.Add(concepto) - ' i += 1 - ' Next - - ' Dim AplicaComercioExteriorSubProyecto As Boolean = If(GlobalDTSubProyectos(-1, Obj.CveSubProyecto)(0)("AplicaComercioExterior").ToString = "True", True, False) - ' Timbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto = AplicaComercioExteriorSubProyecto - - ' If Obj.Cliente.AplicaComercioExterior And AplicaComercioExteriorSubProyecto Then - - ' Timbre.Receptor.ResidenciaFiscal = Obj.Cliente.ClaveSATPais - ' Timbre.Receptor.NumeroRegistroTributario = Obj.Cliente.NumRegIdTrib - - ' End If - - ' Return Timbre - 'End Function - + End Sub + + 'Private Sub PrepararTimbrado(ByRef FM As Modelos.FemsaFactura, ByRef TmpDT7Eleven As DataTable, ByRef TmpDTComplementosTimbrado As DataTable) + ' FM.AplicaFEMSA = ChkAplicaFEMSA.Checked + ' FM.FEMSA_NumSociedad = "" + ' FM.FEMSA_NumProveedor = "" + ' FM.FEMSA_Mail = "" + ' FM.FEMSA_Version = "".Toentero() + ' FM.FEMSA_NumPedido = "".Toentero() + ' FM.FEMSA_NumEntrada = "" + ' FM.FEMSA_NumRemision = "" + ' FM.FEMSA_NumSocio = "" + ' FM.FEMSA_CentroCosto = "" + ' FM.FEMSA_IPeriodoLiquidacion = "" + ' FM.FEMSA_FPeriodoLiquidacion = "" + ' FM.FEMSA_CodRetencion1 = "" + ' FM.FEMSA_CodRetencion2 = "" + + ' TmpDT7Eleven.Columns.Add("sevenElevenNumProveedor") + ' TmpDT7Eleven.Columns.Add("sevenElevenFolio") + ' TmpDT7Eleven.Columns.Add("sevenElevenTienda") + ' TmpDT7Eleven.Columns.Add("sevenElevenFecha") + + ' Dim Row As DataRow = TmpDT7Eleven.NewRow + ' Row("sevenElevenNumProveedor") = "" + ' Row("sevenElevenFolio") = "" + ' Row("sevenElevenTienda") = "" + ' Row("sevenElevenFecha") = "" + + ' TmpDT7Eleven.Rows.Add(Row) + + ' TmpDTComplementosTimbrado.Columns.Add("CveComplemento") + ' TmpDTComplementosTimbrado.Columns.Add("IdContabilidad") + ' TmpDTComplementosTimbrado.Columns.Add("TipoProceso") + ' TmpDTComplementosTimbrado.Columns.Add("TipoAmbito") + ' TmpDTComplementosTimbrado.Columns.Add("Entidad") + + ' Dim Row2 As DataRow = TmpDTComplementosTimbrado.NewRow + ' Row2("CveComplemento") = -1 + ' Row2("IdContabilidad") = -1 + ' Row2("TipoProceso") = -1 + ' Row2("TipoAmbito") = -1 + ' Row2("Entidad") = -1 + + ' TmpDTComplementosTimbrado.Rows.Add(Row2) + 'End Sub + + 'Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre + ' Dim Timbre As New CFDITimbre + ' Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", "")) + ' Timbre.Comprobante.Folio = Obj.Folio.ToString() + ' Timbre.Comprobante.Serie = Obj.Serie + ' Timbre.Comprobante.Fecha = Obj.FechaCP + ' Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33 + ' Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33 + ' Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT + ' Timbre.Comprobante.Subtotal = Obj.SubTotal + ' Timbre.Comprobante.Descuentos = Obj.Descuento + ' Timbre.Comprobante.Moneda = Obj.MonedaSAT + ' Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString()) + ' Timbre.Comprobante.Total = Obj.Total + + ' Try + ' Obj.SetSubProyecto(Me) + ' Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP + ' Catch ex As Exception + + ' End Try + + ' Timbre.Comprobante.Confirmacion = "" + + ' Timbre.Receptor.RFC = Obj.Cliente.RFC + ' Timbre.Receptor.Nombre = Obj.Cliente.Nombre + ' Timbre.Receptor.ResidenciaFiscal = "" + ' Timbre.Receptor.NumeroRegistroTributario = "" + ' Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI + + + ' If Obj.CveTipoRelacion > 0 Then + ' Select Case Obj.CveTipoRelacion + ' Case 1 + ' Timbre.CFDIRelacionados.TipoRelacion = "01" + ' Timbre.CFDIRelacionados.TipoRelacionTexto = "01-Nota de Crédito aplicada a Ingreso" + ' Case 2 + ' Timbre.CFDIRelacionados.TipoRelacion = "02" + ' Timbre.CFDIRelacionados.TipoRelacionTexto = "02-Nota de débito de los documentos relacionados" + ' Case 3 + ' Timbre.CFDIRelacionados.TipoRelacion = "03" + ' Timbre.CFDIRelacionados.TipoRelacionTexto = "03-Devolución aplicada a Ingreso" + ' Case 4 + ' Timbre.CFDIRelacionados.TipoRelacion = "04" + ' Timbre.CFDIRelacionados.TipoRelacionTexto = "04-Refacturación de Ingreso" + ' Case 7 + ' Timbre.CFDIRelacionados.TipoRelacion = "07" + ' Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo" + ' Case 8 + ' Timbre.CFDIRelacionados.TipoRelacion = "08" + ' Timbre.CFDIRelacionados.TipoRelacionTexto = "08-Factura generada por pagos en parcialidades " + ' Case 9 + ' Timbre.CFDIRelacionados.TipoRelacion = "09" + ' Timbre.CFDIRelacionados.TipoRelacionTexto = "09-Factura generada por pagos diferidos" + + ' End Select + ' End If + + ' Dim totSubTotal As Decimal = Obj.SubTotal + ' Dim totIVA As Decimal = Obj.IVA + ' Dim totRetIVA As Decimal = Obj.RetIVA + ' Dim totRetISR As Decimal = Obj.RetISR + ' Dim TasaRetIVA As Decimal = 0 + ' Dim TasaRetISR As Decimal = 0 + ' Dim i As Integer = 1 + + ' 'detalles + ' Dim tPS As String = "" + + ' For Each drr As DataRow In Obj.DtDetalle.Rows + ' If drr("PS").ToString().Length = 1 Then + ' tPS = drr("Obs").ToString() + ' Else + ' If drr("PS").ToString().Length = 0 Then + ' tPS = "" + ' Else + ' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs")) + ' End If + ' End If + ' 'condicionante, especial + ' If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto + + ' Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString().ToDecimal(), + ' .Descripcion = tPS, + ' .ValorUnitario = drr("PU").ToString().ToDecimal(), + ' .Importe = drr("TotalImporte").ToString().ToDecimal(), + ' .Descuento = drr("Descuento").ToString().ToDecimal(), + ' .Unidad = drr("UM").ToString(), + ' .ClaveUnidad = drr("SATClaveUM").ToString(), + ' .ClaveProdServ = drr("SATClaveProdServ").ToString(), + ' .Noidentificacion = drr("Noidentificacion").ToString(), + ' .CuentaPredial = drr("CuentaPredial").ToString()} + ' 'verifica suma subtotales + ' If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales + ' concepto.Importe = totSubTotal + ' End If + ' totSubTotal = totSubTotal - concepto.Importe + + ' 'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura + ' ' If drr("ImporteIVA").ToString().ToDouble > 0 Then + + ' 'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos + ' If Timbre.Comprobante.Total > 0 Then + ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString().ToDecimal(), .Impuesto = "002", .Importe = drr("ImporteIVA").ToString().ToDecimal()}) + ' End If + + ' If drr("ImporteIEPS").ToString().ToDouble > 0 Then + ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString().ToDecimal(), .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString().ToDecimal()}) + ' End If + + ' If drr("ImporteRetIVA").ToString().ToDouble > 0 Then 'si hay retenciones + ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetIVA, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString().ToDecimal()}) + ' End If + + ' If drr("ImporteRetISR").ToString().ToDouble > 0 Then 'retención de ISR + ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetISR, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString().ToDecimal()}) + ' End If + + ' Timbre.Conceptos.Add(concepto) + ' i += 1 + ' Next + + ' Return Timbre + 'End Function + + 'Private Function GenerarNotaCredito(CvePS As Integer, Tipo As Integer, CveUnidadMedida As Integer, Importe As Decimal, Iva As Decimal, Descripcion As String, CveClasificacion As Integer) As Boolean + + ' Dim Respuesta As Boolean = False + + ' Dim ObjVentas As New ClsVentas + ' Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL()) + ' Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL()) + + ' Dim ErrorVentas As Boolean = False + ' Dim SubTotal As Decimal = Importe + ' Dim Total As Decimal = Importe + Iva + + ' Dim RetIVA As Decimal = 0 + ' Dim RetISR As Decimal = 0 + ' Dim TipoCambio As Decimal = 0 + ' Dim FechaVencimiento As Date = Now + ' Dim fecha As Date = Now + + ' Dim Folio As Integer = 0 + ' Dim Serie As String = "" + + ' If FolioNotaCredito() Then + ' Folio = FolioNotaAcumulador + ' Serie = SerieNotaAcumulador + ' End If + + ' Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.Toentero() + + ' Dim CveVenta As Integer + + ' If Folio > 0 Then + + ' Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas($"Clientes/{Descripcion}", 1, Total, Total, 1, fecha, "Nota de crédito por Cargo", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + ' If ObjVentas.AddVenta("Egs", Folio, CveCliente.Toentero(), -1, SubTotal, 0, 0, Iva, RetIVA, RetISR, Total, 1, TipoCambio, + ' 0, 0, 0, FechaVencimiento, fecha, "", "", fecha, -1, "", "", "", 0, 0, 0, "-1".ToDate(), "-1".ToDate(), "-1".ToDate(), -1, -1, 0, CvePrePoliza, + ' UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Serie:=Serie, CveSubProyecto:=CveSubProyecto, CveSubProyectoEjecucion:=CveSubProyecto) Then + + ' CveVenta = ObjVentas.CveVenta + + ' If CveVenta > 0 Then + ' If ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, 0.16, SubTotal * 0.16, Descripcion, 0, 0, -1, 0) Then + + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, SubTotal, Folio.ToString(), 150, String.Format("{0}-{1}", Serie, Folio), fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=CveSubProyecto) Then + ' ErrorVentas = True + ' End If + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Folio.ToString(), 12, String.Format("{0}-{1}", Serie, Folio), fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total) Then + ' ErrorVentas = True + ' End If + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Iva, Folio.ToString(), 13, String.Format("{0}-{1}", Serie, Folio), fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Iva) Then + ' ErrorVentas = True + ' End If + + ' If Not ErrorVentas Then + ' For Each GvRow As GridViewRow In GvAcum.Rows + ' Dim CveMovto As Integer = GvRow.DataKey("CveMovto").Toentero() + + ' If (Tipo = 1 And GvRow.FCCheckBox("ChkCargo").Checked) Or (Tipo = 2 And GvRow.FCCheckBox("ChkBonificacion").Checked) Then + + ' If ObjAcum.DistribuidorActualizarFacturados(CveMovto, UsuarioActual.CveEmpresa, Tipo, CveVenta) Then + ' Respuesta = True + ' ErrorVentas = False + ' CveVentaNota = CveVenta + ' Else + ' Respuesta = False + ' ErrorVentas = True + ' CveVentaNota = 0 + ' Exit For + ' End If + + ' End If + ' Next + ' End If + + + ' If Not ErrorVentas Then + ' Alert($"Nota de crédito generada correctamente {Serie}-{Folio}") + ' End If + + + ' Else + ' ErrorVentas = True + ' End If + ' Else + ' ErrorVentas = True + ' End If + + ' Else + ' ErrorVentas = True + ' End If + ' Else + ' Alert("No se pudo obtener el Folio.", TipoMensaje.MsgError) + ' End If + + + + ' If ErrorVentas Then + ' ObjVentas.RollBack() + ' Else + + ' ObjVentas.Commit() + ' CargaUsados() + + ' 'Dim DtDetallesVenta As New DataTable + + ' 'If ObjVentas.GetVentaDetalle(CveVenta) Then + + ' ' DtDetallesVenta = ObjVentas.DtResultados + ' ' 'CreaObjetosVenta(CveVenta, Serie, Folio, SubTotal, Iva, DtDetallesVenta) + + ' ' ObjFactura.Timbre = PreParaTimbre(ObjFactura, ObjFactura.CveSubProyecto) + + ' ' Dim ObjTimbrado As New Timbrado + ' ' Dim SeTimbro As Boolean = False + + ' ' SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) + + ' ' If SeTimbro Then + ' ' Alert("Se timbro correctamente") + ' ' Else + ' ' Alert("No se pudo timbrar, intente mas tarde.", TipoMensaje.MsgError) + ' ' End If + + ' 'Else + ' ' Alert("No se pudo timbrar, no se pudieron obtener los detalles de la venta.", TipoMensaje.MsgError) + ' 'End If + + ' End If + + + + ' ObjVentas.Dispose() + ' Return Respuesta + + 'End Function + 'Private Function generaNC(CveVenta As Integer, ByRef ObjVentas As ClsVentas, ByVal factura As Modelos.Factura) As List(Of Object) + + ' Dim Obj As New List(Of Object) + ' Dim CveVentaNueva As Integer = ObjVentas.CveVenta + ' Dim BanderaGeneraNC As Boolean = False + ' If UsuarioActual.CveEmpresa.Contiene(1, 119) Then BanderaGeneraNC = True + + ' If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then + ' If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then + ' Dim drv As DataRow = ObjVentas.DtResultados.Rows(0) + ' Dim TmpDTconceptos As DataTable = Nothing + + ' ''CargaCliente + + ' Dim CveCliente As Integer = drv("CveCliente").ToString().Toentero() + ' If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not CveCliente.Contiene(10450, 10460, 10458) Then + ' Return Nothing + ' ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 AndAlso Not CveCliente.Contiene(27448) Then + ' Return Nothing + ' End If + ' factura.TipoDocto = drv("TipoDocto").ToString() + ' factura.Serie = drv("Serie").ToString() + ' factura.FechaEjecucion = drv("FechaEjecucion").ToString().ToDate()Time + ' factura.Fecha = drv("Fecha").ToString().ToDate()Time + ' factura.CveSubProyectoEjecucion = drv("CveSubProyectoEjecucion").ToString().Toentero() + ' factura.CveSubProyectoCobranza = drv("CveSubProyectoCobranza").ToString().Toentero() + ' factura.CveClienteSucursal = drv("CveClienteSucursal").ToString().Toentero() + ' factura.CveSubProyecto = drv("CveSubProyecto").ToString().Toentero() + + + ' ''CargaDetalle + ' If ObjVentas.GetVentaDetalle(CveVenta) Then + ' TmpDTconceptos = ObjVentas.DtResultados + ' TmpDTconceptos.Columns.Add("CveMovimientoDetallePedido", GetType(Integer)) + ' GvPS.DataSource = TmpDTconceptos + ' GvPS.DataBind() + ' End If + + ' '' Carga Totales + ' factura.SubTotal = drv("SubTotal").ToString().ToDecimal() + ' factura.Descuento = drv("Descuento").ToString().ToDecimal() + ' factura.Amortizacion = drv("Amortizacion").ToString().ToDecimal() + ' factura.IVA = drv("IVA").ToString().ToDecimal() + ' factura.RetIVA = drv("RetIVA").ToString().ToDecimal() + ' factura.RetISR = drv("RetISR").ToString().ToDecimal() + ' factura.Total = drv("Total").ToString().ToDecimal() + ' factura.MotivoDescuento = drv("MotivoDescuento").ToString() + ' factura.Observaciones = drv("Observaciones").ToString() + ' factura.CveMoneda = drv("CveMoneda").ToString().Toentero() + ' factura.TipoCambio = drv("TipoCambio").ToString().ToDecimal() + ' factura.CveVendedor = drv("CveVendedor").ToString().Toentero() + ' factura.RefDocto = drv("Ref").ToString() + + ' If factura.CveCliente > 0 Then + ' If Not IsNothing(TmpDTconceptos) AndAlso TmpDTconceptos.Rows.Count > 0 Then + + ' If Not drv("Total").ToString().ToDecimal() = factura.Total Then + ' Return Nothing + ' End If + + + + ' End If + ' End If + ' End If + ' End If + + ' If Obj.Count > 0 Then + ' Return Obj + ' Else + ' Return Nothing + ' End If + + 'End Function + + 'Private Function PreParaTimbre(Obj As Modelos.Factura, CveSubProyecto As Integer) As CFDITimbre + + ' Dim Timbre As New CFDITimbre + ' Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", "")) + ' Timbre.Comprobante.Folio = Obj.Folio.ToString() + ' Timbre.Comprobante.Serie = Obj.Serie + ' Timbre.Comprobante.Fecha = Obj.Fecha + ' Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33 + ' Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33 + ' Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT + ' Timbre.Comprobante.Subtotal = Obj.SubTotal + + ' Timbre.Comprobante.Descuentos = Obj.Descuento + ' Timbre.Comprobante.Moneda = Obj.MonedaSAT + ' Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString()) + ' Timbre.Comprobante.Total = Obj.Total + + ' Try + ' Obj.SetSubProyecto(Me) + ' Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP + ' Catch ex As Exception + + ' End Try + + ' Timbre.Comprobante.Confirmacion = "" + + ' Timbre.Receptor.RFC = TxtRFC.Text + ' Timbre.Receptor.Nombre = TxtNombre.Text + ' Timbre.Receptor.ResidenciaFiscal = "" + ' Timbre.Receptor.NumeroRegistroTributario = "" + ' Timbre.Receptor.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}") + + ' Dim totSubTotal As Decimal = Obj.SubTotal + ' Dim totIVA As Decimal = Obj.IVA + ' Dim totRetIVA As Decimal = Obj.RetIVA + ' Dim totRetISR As Decimal = Obj.RetISR + ' Dim TasaRetIVA As Decimal = 0 + ' Dim TasaRetISR As Decimal = 0 + ' Dim i As Integer = 1 + + ' ''detalles + ' Dim tPS As String = "" + + ' For Each drr As DataRow In Obj.DtDetalle.Rows + ' If drr("PS").ToString().Length = 1 Then + ' tPS = drr("Obs").ToString() + ' Else + ' If drr("PS").ToString().Length = 0 Then + ' tPS = "" + ' Else + ' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs")) + ' End If + ' End If + ' '' condicionante, especial + ' If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto + + ' Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString().ToDecimal(), + ' .Descripcion = tPS, + ' .ValorUnitario = drr("PU").ToString().ToDecimal(), + ' .Importe = drr("TotalImporte").ToString().ToDecimal(), + ' .Descuento = drr("Descuento").ToString().ToDecimal(), + ' .Unidad = drr("UM").ToString(), + ' .ClaveUnidad = drr("SATClaveUM").ToString(), + ' .ClaveProdServ = drr("SATClaveProdServ").ToString(), + ' .Noidentificacion = drr("Noidentificacion").ToString(), + ' .CuentaPredial = drr("CuentaPredial").ToString()} + ' '' verifica suma subtotales + ' If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales + ' concepto.Importe = totSubTotal + ' End If + ' totSubTotal = totSubTotal - concepto.Importe + + ' ''siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura + ' If drr("ImporteIVA").ToString().ToDouble > 0 Then + ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString().ToDecimal(), .Impuesto = "002", .Importe = drr("ImporteIVA").ToString().ToDecimal()}) + ' End If + + ' If drr("ImporteIEPS").ToString().ToDouble > 0 Then + ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString().ToDecimal(), .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString().ToDecimal()}) + ' End If + + ' If drr("ImporteRetIVA").ToString().ToDouble > 0 Then 'si hay retenciones + ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetIVA, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString().ToDecimal()}) + ' End If + + ' If drr("ImporteRetISR").ToString().ToDouble > 0 Then 'retención de ISR + ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetISR, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString().ToDecimal()}) + ' End If + + ' Timbre.Conceptos.Add(concepto) + ' i += 1 + ' Next + + ' Dim AplicaComercioExteriorSubProyecto As Boolean = If(GlobalDTSubProyectos(-1, Obj.CveSubProyecto)(0)("AplicaComercioExterior").ToString() = "True", True, False) + ' Timbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto = AplicaComercioExteriorSubProyecto + + ' If Obj.Cliente.AplicaComercioExterior And AplicaComercioExteriorSubProyecto Then + + ' Timbre.Receptor.ResidenciaFiscal = Obj.Cliente.ClaveSATPais + ' Timbre.Receptor.NumeroRegistroTributario = Obj.Cliente.NumRegIdTrib + + ' End If + + ' Return Timbre + 'End Function + #End Region - + #Region "C L I E N T E S G R I D S I M P R I M I R P D F/Excel" Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones") @@ -10182,7 +10202,7 @@ Partial Class Clientes End If Acum.Dispose() - End Sub + End Sub #End Region Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs) If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then @@ -10266,7 +10286,7 @@ Partial Class Clientes Protected Sub EditClientesPersonalEntrega_Click(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow) - CveClientePersonalEntrega = GvRow.DataKey("CvePersonalEntrega").ToEntero + CveClientePersonalEntrega = GvRow.DataKey("CvePersonalEntrega").ToEntero() TxtPersonalEntrega.Text = GvRow.DataKey("PersonalEntrega") ChkPersonalEntrega.Checked = GvRow.DataKey("Estatus") = "True" LnkClientePersonalEntrega.Text = "Actualizar" @@ -10277,12 +10297,17 @@ Partial Class Clientes Protected Sub DeleteClientesPersonalEntrega_Click(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow) Dim ObjVentas As New ClsVentas() - If ObjVentas.RemoveClientesPersonalEntrega(GvRow.DataKey("CvePersonalEntrega").ToEntero) Then + If ObjVentas.RemoveClientesPersonalEntrega(GvRow.DataKey("CvePersonalEntrega").ToEntero()) Then Alert("Usuario para entregar eliminado correctamente") End If ObjVentas.Dispose() CargarClientePersonalEntrega() UpClentesPersonalEntrega.Update() - End Sub + End Sub + Protected Sub DdlTipoCliente_SelectedIndexChanged(sender As Object, e As EventArgs) + TabSistema.Enabled = DdlTipoCliente.SelectedValue = "1" + + UpDatos.Update() + End Sub End Class diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index d324631b7..b54300575 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -491,6 +491,12 @@ + + Servicio a Domicilio:  + + + +
@@ -827,7 +833,7 @@ - + @@ -2742,6 +2748,7 @@
+ <%----%> @@ -2938,7 +2945,7 @@
- + @@ -2967,7 +2974,7 @@
- + @@ -3001,7 +3008,7 @@
- + diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 5e4698a5b..245f2ca89 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -1123,6 +1123,9 @@ Partial Class PV End If LimpiaEscondeContado() + If UsuarioActual.TienePermisoProceso(316) Then + TrServicioDomicilio.Visible = True + End If 'Carga cliente If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero > 0 AndAlso Request("CveFactura") Is Nothing Then @@ -1500,6 +1503,8 @@ Partial Class PV End If + ChkServicioDomicilio.Checked = CBool(DbRowVenta("ServicioDomicilio").ToString()) + If UsuarioActual.CveEmpresa = 48 Then TxtFecha.AutoPostBack = True End If @@ -1620,7 +1625,7 @@ Partial Class PV TxtRetIVA.ReadOnly = False TxtRetISR.ReadOnly = False TxtIEPS.ReadOnly = False - TxtTotal.ReadOnly = False + 'TxtTotal.ReadOnly = False 'Sección Detalle DdlMoneda.Enabled = True @@ -3195,6 +3200,9 @@ Partial Class PV Dim RowGarantia As DataRow = ObjAcum.DtResultados.FiltroPrimero("") If RowGarantia IsNot Nothing Then SbAlert.AppendFormat("
", Encripta(String.Format("OP=AJUSTE&CVEGARANTIADETALLE={0}", RowGarantia("CveGarantiaDetalle")))) + + 'AUTO DESCARGAR PDF AJUSTE + RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AJUSTE&CVEGARANTIADETALLE={0}", RowGarantia("CveGarantiaDetalle")))}'", "Imprimir") End If End If End Using @@ -3205,11 +3213,11 @@ Partial Class PV For Each Mensaje In Retorno.Mensajes Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), If(Retorno.TieneError, "", Retorno.LigaPV)) Next - - 'Dim facBytes = DescargarFactura(Retorno.CveVenta, UsuarioActual.CveEmpresa) - 'ImprimirbytesPDF(facBytes, ObjFactura.SerieFolio) - + Else + Alert("No hay partidas agregadas a la factura", TipoMensaje.MsgAdvertencia) End If + Else + Alert("No hay ningun cliente seleccionado", TipoMensaje.MsgAdvertencia) End If End Sub @@ -3474,6 +3482,8 @@ Partial Class PV End If End If + ObjFactura.ServicioDomicilio = ChkServicioDomicilio.Checked + End Sub #End Region @@ -4720,7 +4730,7 @@ Partial Class PV TxtObsPS.Text = GvRow.DataKey("Obs") '.Replace(StrTamanios.ToString(), "") - TxtPrecio.Text = GvRow.DataKey("PU") + TxtPrecio.Text = GvRow.DataKey("PU").ToDecimal().FormatoNumero TxtDescuento.Text = GvRow.DataKey("Descuento") LblTotalPS.Text = GvRow.DataKey("Total") ChkAgregar.Checked = False @@ -6300,7 +6310,7 @@ Partial Class PV TxtPorcentajeAjuste.Text = Dr("PorcentajeAjuste").ToString DdlTipoComprobanteAjuste.SelectedValueExist(Dr("TipoComprobante").ToString()) TxtComprobante.Text = Dr("Comprobante").ToString - TxtImporteAjuste.Text = Dr("Importe").ToString + TxtImporteAjuste.Text = Dr("Importe").ToString().ToDecimal().FormatoNumero(2) DdlFacturas.SelectedValueExist(Dr("CveVenta").ToString) If TxtDescuento.Text.ToDecimal() > 0 AndAlso Dr("Importe").ToString.ToDecimal() > 0 Then diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 0cefc9834..d9c454177 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -846,8 +846,6 @@ Partial Class ProductosyServicios DdlMoneda.SelectedValueExist(ObjProductosServicios.CveMoneda) TxtRetISR.Text = (ObjProductosServicios.RetISR * 100).ToString - DdlTamanio.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTamaño").ToString) - DdlModelo.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveModelo").ToString) DdlMedida.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveMedida").ToString) DdlRin.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveRinTamaño").ToString) @@ -862,6 +860,34 @@ Partial Class ProductosyServicios Try DdlClasificacion_SelectedIndexChanged(DdlClasificacion, Nothing) + + DdlTamanio.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTamaño").ToString) + If DdlTamanio.SelectedValue.ToEntero() > 0 Then + Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0) + + Dim DebeTenerTamanio As Boolean = Boolean.Parse(Dr("EsAcumulador").ToString) + + 'SI ES MOTOBATERIA + If DdlClasificacion.SelectedValue = "20517" Then + DebeTenerTamanio = True + End If + + 'VALIDA QUE EL PRODUCTO, NO ES ACUMULADOR QUE NO TENGA TAMAÑO + If Not DebeTenerTamanio AndAlso DdlTamanio.SelectedValue.ToEntero() > 0 Then + Alert($"Un producto/servicio con la clasificación '{Dr("Clasificacion")}' no debe tener especificado un tamaño.", TipoMensaje.MsgAdvertencia) + RfvDdlTamanio.Visible = False + CERfvDdlTamanio.Enabled = False + End If + + 'VALIDA QUE EL PRODUCTO, SI ES ACUMULADOR QUE TENGA TAMAÑO + If DebeTenerTamanio AndAlso DdlTamanio.SelectedValue.ToEntero() <= 0 Then + Alert($"Un producto/servicio con la clasificación '{Dr("Clasificacion")}' debe tener especificado un tamaño.", TipoMensaje.MsgAdvertencia) + End If + + DvTamanio.Visible = True + End If + + Catch ex As Exception End Try @@ -1195,182 +1221,209 @@ Partial Class ProductosyServicios End If + Dim CveTamaño As Integer = DdlTamanio.SelectedValue.ToEntero + 'VALIDAR TAMAÑOS Y ACUMULADORES + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0) + + Dim DebeTenerTamanio As Boolean = Boolean.Parse(Dr("EsAcumulador").ToString) + + 'SI ES MOTOBATERIA + If DdlClasificacion.SelectedValue = "20517" Then + DebeTenerTamanio = True + End If + + 'VALIDA QUE EL PRODUCTO, NO ES ACUMULADOR QUE NO TENGA TAMAÑO + If Not DebeTenerTamanio AndAlso CveTamaño > 0 Then + Alert($"Un producto/servicio con la clasificación '{Dr("Clasificacion")}' no debe tener especificado un tamaño.", TipoMensaje.MsgAdvertencia) + Return + End If + 'VALIDA QUE EL PRODUCTO, SI ES ACUMULADOR QUE TENGA TAMAÑO + If DebeTenerTamanio AndAlso CveTamaño <= 0 Then + Alert($"Un producto/servicio con la clasificación '{Dr("Clasificacion")}' debe tener especificado un tamaño.", TipoMensaje.MsgAdvertencia) + Return + End If + + End If Dim ObjProductosServicios As New ClsProductosServicios() Dim ObjInv As New ClsInventarios(ObjProductosServicios.IniciaTransacSQL()) Dim TieneError = False Dim AccionJS = "" - Dim EsPaquete As Integer = If(gvPaqueteDetalle.Rows.Count = 0, 0, 1) - Dim CveMetodoInv As Integer = If(UsuarioActual.Empresa.UsaInventarios, ddlMetodos.SelectedValue.ToEntero, -1) + Try - Dim CveProveedor As Integer = -1 - If DdlProveedor.txtValue.Value.ToEntero > 0 Then - CveProveedor = DdlProveedor.txtValue.Value.ToEntero - End If + Dim EsPaquete As Integer = If(gvPaqueteDetalle.Rows.Count = 0, 0, 1) + Dim CveMetodoInv As Integer = If(UsuarioActual.Empresa.UsaInventarios, ddlMetodos.SelectedValue.ToEntero, -1) - - Dim CveMarca As Integer = 0 - If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) And CvePS = -1 Then CveMarca = DdlMarcaPSDes.SelectedValue.ToEntero Else CveMarca = DdlMarca.SelectedValue.ToEntero - - Dim TiempoCaducidad As Integer = -1 - If ChkCaducidad.Checked Then - If TxtTiempoCaducidad.Text.Length > 0 AndAlso IsNumeric(TxtTiempoCaducidad.Text) Then - TiempoCaducidad = TxtTiempoCaducidad.Text.ToEntero() - Else - Alert("Falta indicar el tiempo de caducidad", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - End If - - If CvePS = -1 Then - Dim PSS As String = TxtPS.Text.Trim.Replace("|", "") - If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper - If ObjProductosServicios.AddPS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, "", TxtCodigoBarras.Text.Trim, PSS, - TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True, - ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, - FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, - AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, - CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, - CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, - CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, - CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, - CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(), - ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, - ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked) > 0 Then - ViewState("CvePS") = ObjProductosServicios.CvePS - For Each GVR As GridViewRow In GvImpuestosLocales.Rows - If GVR.FCCheckBox("ChkDeduccion").Checked Then - ObjProductosServicios.AddPSImpuestosLocales(CvePS, GVR.DataKey("CveImpuestoLocal").ToEntero) - End If - Next - 'Alert("El Producto o Servicio se guardó correctamente.", TipoMensaje.MsgInformacion, "document.location.href= "" / ProductosServicios.aspx?CvePS=" & ObjProductosServcios.CvePS.ToString & """;") - AccionJS = "document.location.href=""/Ventas/CatPS.aspx"";" - - - If Not TieneError Then - For Each Dr As DataRow In DtSeccionAlmacen.Rows - If Dr("CveAlmacen").ToString.ToEntero > 0 Then - If Not ObjInv.AddProductosServiciosAlmacenSeccion(CvePS, Dr("CveAlmacen").ToString.ToEntero, Dr("CveAlmacenSeccion").ToString.ToEntero) Then - TieneError = True - End If - End If - Next - End If - If UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso ChkAplicaParaVenta.Checked Then - TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, True) - End If - - Else - TieneError = True - Alert("Ocurrió un Error al agregar el Producto o Servicio. Por favor vuelva a intentar.", TipoMensaje.MsgError) - End If - Else - - If CodigoBarrasCargado.Length > 0 And TxtCodigoBarras.Text.Length = 0 Then - TxtCodigoBarras.Text = CodigoBarrasCargado + Dim CveProveedor As Integer = -1 + If DdlProveedor.txtValue.Value.ToEntero > 0 Then + CveProveedor = DdlProveedor.txtValue.Value.ToEntero End If - Dim PSS As String = TxtPS.Text.Trim.Replace("|", "") - If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper + Dim CveMarca As Integer = 0 + If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) And CvePS = -1 Then CveMarca = DdlMarcaPSDes.SelectedValue.ToEntero Else CveMarca = DdlMarca.SelectedValue.ToEntero - If ObjProductosServicios.UpdatePS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, txtcodigo2.text.trim, TxtCodigoBarras.Text.Trim, PSS, - TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True, - ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, - CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, - AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, - CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, - CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, - CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, - CveUsuarioModifico:=UsuarioActual.CveUsuario, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, - CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(), - ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, - ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, - AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked) Then - - If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then - TieneError = True - Alert("Ocurrió un Error al regenerar los impuestos locales. Por favor vuelva a intentar.", TipoMensaje.MsgError) + Dim TiempoCaducidad As Integer = -1 + If ChkCaducidad.Checked Then + If TxtTiempoCaducidad.Text.Length > 0 AndAlso IsNumeric(TxtTiempoCaducidad.Text) Then + TiempoCaducidad = TxtTiempoCaducidad.Text.ToEntero() + Else + Alert("Falta indicar el tiempo de caducidad", TipoMensaje.MsgAdvertencia) + Exit Sub End If + End If - If Not TieneError Then + If CvePS = -1 Then + Dim PSS As String = TxtPS.Text.Trim.Replace("|", "") + If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper + If ObjProductosServicios.AddPS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, "", TxtCodigoBarras.Text.Trim, PSS, + TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True, + ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, + FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, + AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, + CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, + CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, + CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, + CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=CveTamaño, + CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(), + ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, + ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked) > 0 Then + ViewState("CvePS") = ObjProductosServicios.CvePS For Each GVR As GridViewRow In GvImpuestosLocales.Rows If GVR.FCCheckBox("ChkDeduccion").Checked Then - If Not ObjProductosServicios.AddPSImpuestosLocales(CvePS, GVR.DataKey("CveImpuestoLocal").ToEntero) Then + ObjProductosServicios.AddPSImpuestosLocales(CvePS, GVR.DataKey("CveImpuestoLocal").ToEntero) + End If + Next + 'Alert("El Producto o Servicio se guardó correctamente.", TipoMensaje.MsgInformacion, "document.location.href= "" / ProductosServicios.aspx?CvePS=" & ObjProductosServcios.CvePS.ToString & """;") + AccionJS = "document.location.href=""/Ventas/CatPS.aspx"";" + + + If Not TieneError Then + For Each Dr As DataRow In DtSeccionAlmacen.Rows + If Dr("CveAlmacen").ToString.ToEntero > 0 Then + If Not ObjInv.AddProductosServiciosAlmacenSeccion(CvePS, Dr("CveAlmacen").ToString.ToEntero, Dr("CveAlmacenSeccion").ToString.ToEntero) Then + TieneError = True + End If + End If + Next + End If + If UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso ChkAplicaParaVenta.Checked Then + TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, True) + End If + + Else + TieneError = True + Alert("Ocurrió un Error al agregar el Producto o Servicio. Por favor vuelva a intentar.", TipoMensaje.MsgError) + End If + Else + + If CodigoBarrasCargado.Length > 0 And TxtCodigoBarras.Text.Length = 0 Then + TxtCodigoBarras.Text = CodigoBarrasCargado + End If + + Dim PSS As String = TxtPS.Text.Trim.Replace("|", "") + If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper + + If ObjProductosServicios.UpdatePS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtCodigo2.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, + TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True, + ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, + CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, + AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, + CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, + CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, + CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, + CveUsuarioModifico:=UsuarioActual.CveUsuario, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=CveTamaño, + CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(), + ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, + ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, + AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked) Then + + If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then + TieneError = True + Alert("Ocurrió un Error al regenerar los impuestos locales. Por favor vuelva a intentar.", TipoMensaje.MsgError) + End If + + If Not TieneError Then + For Each GVR As GridViewRow In GvImpuestosLocales.Rows + If GVR.FCCheckBox("ChkDeduccion").Checked Then + If Not ObjProductosServicios.AddPSImpuestosLocales(CvePS, GVR.DataKey("CveImpuestoLocal").ToEntero) Then + TieneError = True + Alert("Ocurrió un Error al agregar los impuestos locales. Por favor vuelva a intentar.", TipoMensaje.MsgError) + Exit For + End If + End If + Next + End If + + AccionJS = If(Ret = "Comp", "ircompras();", "document.location.href=""/Ventas/CatPS.aspx"";") + 'UpDatos.Update() + 'Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, AccionJS) + + If Not TieneError Then + For Each Dr As DataRow In DtSeccionAlmacen.Rows + If Dr("CveAlmacen").ToString.ToEntero > 0 AndAlso Not Dr("CvePSAlmacenSeccion").ToString.ToEntero > 0 Then + If Not ObjInv.AddProductosServiciosAlmacenSeccion(CvePS, Dr("CveAlmacen").ToString.ToEntero, Dr("CveAlmacenSeccion").ToString.ToEntero) Then + TieneError = True + End If + ElseIf Not Dr("CveAlmacen").ToString.ToEntero > 0 AndAlso Dr("CvePSAlmacenSeccion").ToString.ToEntero > 0 Then + If Not ObjInv.RemoveProductosServiciosAlmacenSeccion(Dr("CvePSAlmacenSeccion").ToString.ToEntero) Then + TieneError = True + End If + End If + Next + End If + + If UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso ChkAplicaParaVenta.Checked Then + TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, False) + End If + + Else + TieneError = True + Alert("Ocurrió un Error al actualizar el Producto o Servicio. Por favor vuelva a intentar.", TipoMensaje.MsgError) + End If + ObjProductosServicios.CvePS = CvePS + End If + + If ObjProductosServicios.CvePS > 0 And Not TieneError Then + For i As Integer = 0 To gvSucursal.Rows.Count - 1 + If gvSucursal.Rows(i).FCCheckBox("chkSucursal").Checked = False Then + If Not ObjProductosServicios.RemovePSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).DataKey("CveSubProyecto").ToEntero) Then + TieneError = True + Alert("Ocurrió un Error al eliminar sucursales del producto. Por favor vuelva a intentar.", TipoMensaje.MsgError) + Exit For + End If + Else + If gvSucursal.Rows(i).FCHiddenField("hdnEnBD").Value.ToEntero = 1 Then + 'Actualizarlo + If Not ObjProductosServicios.UpdatePSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).FCTextBox("txtImporte").Text.ToDouble, gvSucursal.Rows(i).FCTextBox("TxtMinimo").Text.ToDouble, gvSucursal.Rows(i).FCTextBox("TxtMaximo").Text.ToDouble, UsuarioActual.CveUsuario, gvSucursal.Rows(i).DataKey("CveSubProyecto").ToEntero, PrecioMinimo:=gvSucursal.Rows(i).FCTextBox("TxtPrecioMinimo").Text.ToDecimal) Then TieneError = True - Alert("Ocurrió un Error al agregar los impuestos locales. Por favor vuelva a intentar.", TipoMensaje.MsgError) + Alert("Ocurrió un Error al actualizar sucursales del producto. Por favor vuelva a intentar.", TipoMensaje.MsgError) + Exit For + End If + 'ObjProductosServicios.UpdatePSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).FCHiddenField("hdnCveSucursal").Value.ToEntero, gvSucursal.Rows(i).FCTextBox("txtImporte").Text.ToDouble, UsuarioActual.CveUsuario) + Else + 'Insertarlo + 'ObjProductosServicios.AddPSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).FCHiddenField("hdnCveSucursal").Value.ToEntero, gvSucursal.Rows(i).FCTextBox("txtImporte").Text.ToDouble, UsuarioActual.CveUsuario) + If Not ObjProductosServicios.AddPSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).FCTextBox("txtImporte").Text.ToDouble, gvSucursal.Rows(i).FCTextBox("TxtMinimo").Text.ToDouble, gvSucursal.Rows(i).FCTextBox("TxtMaximo").Text.ToDouble, UsuarioActual.CveUsuario, gvSucursal.Rows(i).DataKey("CveSubProyecto").ToEntero, PrecioMinimo:=gvSucursal.Rows(i).FCTextBox("TxtPrecioMinimo").Text.ToDecimal) Then + TieneError = True + Alert("Ocurrió un Error al agregar sucursales del producto. Por favor vuelva a intentar.", TipoMensaje.MsgError) Exit For End If End If - Next - End If - - AccionJS = If(Ret = "Comp", "ircompras();", "document.location.href=""/Ventas/CatPS.aspx"";") - 'UpDatos.Update() - 'Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, AccionJS) - - If Not TieneError Then - For Each Dr As DataRow In DtSeccionAlmacen.Rows - If Dr("CveAlmacen").ToString.ToEntero > 0 AndAlso Not Dr("CvePSAlmacenSeccion").ToString.ToEntero > 0 Then - If Not ObjInv.AddProductosServiciosAlmacenSeccion(CvePS, Dr("CveAlmacen").ToString.ToEntero, Dr("CveAlmacenSeccion").ToString.ToEntero) Then - TieneError = True - End If - ElseIf Not Dr("CveAlmacen").ToString.ToEntero > 0 AndAlso Dr("CvePSAlmacenSeccion").ToString.ToEntero > 0 Then - If Not ObjInv.RemoveProductosServiciosAlmacenSeccion(Dr("CvePSAlmacenSeccion").ToString.ToEntero) Then - TieneError = True - End If - End If - Next - End If - - If UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso ChkAplicaParaVenta.Checked Then - TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, False) - End If - - Else - TieneError = True - Alert("Ocurrió un Error al actualizar el Producto o Servicio. Por favor vuelva a intentar.", TipoMensaje.MsgError) + End If + Next End If - ObjProductosServicios.CvePS = CvePS - End If - - If ObjProductosServicios.CvePS > 0 And Not TieneError Then - For i As Integer = 0 To gvSucursal.Rows.Count - 1 - If gvSucursal.Rows(i).FCCheckBox("chkSucursal").Checked = False Then - If Not ObjProductosServicios.RemovePSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).DataKey("CveSubProyecto").ToEntero) Then - TieneError = True - Alert("Ocurrió un Error al eliminar sucursales del producto. Por favor vuelva a intentar.", TipoMensaje.MsgError) - Exit For - End If - Else - If gvSucursal.Rows(i).FCHiddenField("hdnEnBD").Value.ToEntero = 1 Then - 'Actualizarlo - If Not ObjProductosServicios.UpdatePSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).FCTextBox("txtImporte").Text.ToDouble, gvSucursal.Rows(i).FCTextBox("TxtMinimo").Text.ToDouble, gvSucursal.Rows(i).FCTextBox("TxtMaximo").Text.ToDouble, UsuarioActual.CveUsuario, gvSucursal.Rows(i).DataKey("CveSubProyecto").ToEntero, PrecioMinimo:=gvSucursal.Rows(i).FCTextBox("TxtPrecioMinimo").Text.ToDecimal) Then - TieneError = True - Alert("Ocurrió un Error al actualizar sucursales del producto. Por favor vuelva a intentar.", TipoMensaje.MsgError) - Exit For - End If - 'ObjProductosServicios.UpdatePSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).FCHiddenField("hdnCveSucursal").Value.ToEntero, gvSucursal.Rows(i).FCTextBox("txtImporte").Text.ToDouble, UsuarioActual.CveUsuario) - Else - 'Insertarlo - 'ObjProductosServicios.AddPSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).FCHiddenField("hdnCveSucursal").Value.ToEntero, gvSucursal.Rows(i).FCTextBox("txtImporte").Text.ToDouble, UsuarioActual.CveUsuario) - If Not ObjProductosServicios.AddPSSucursales(ObjProductosServicios.CvePS, gvSucursal.Rows(i).FCTextBox("txtImporte").Text.ToDouble, gvSucursal.Rows(i).FCTextBox("TxtMinimo").Text.ToDouble, gvSucursal.Rows(i).FCTextBox("TxtMaximo").Text.ToDouble, UsuarioActual.CveUsuario, gvSucursal.Rows(i).DataKey("CveSubProyecto").ToEntero, PrecioMinimo:=gvSucursal.Rows(i).FCTextBox("TxtPrecioMinimo").Text.ToDecimal) Then - TieneError = True - Alert("Ocurrió un Error al agregar sucursales del producto. Por favor vuelva a intentar.", TipoMensaje.MsgError) - Exit For - End If - End If - End If - Next - End If - - - If ObjProductosServicios.CvePS > 0 And Not TieneError Then - TieneError = GuardaEcommerce() - End If + If ObjProductosServicios.CvePS > 0 And Not TieneError Then + TieneError = GuardaEcommerce() + End If + Catch ex As Exception + TieneError = True + OnError("Ocurrió un error al guardar al guardar el producto/servicio.", ex) + End Try If Not TieneError Then ObjProductosServicios.Commit() @@ -2103,13 +2156,11 @@ Partial Class ProductosyServicios MostarOcultarDivTamanio(True) End If Catch ex As Exception - + OnError("Ocurrió un error al mostrar los tamaños", ex) End Try End Sub - Sub MostarOcultarDivTamanio(Mostrar As Boolean) - - + Private Sub MostarOcultarDivTamanio(Mostrar As Boolean) If Mostrar And UsuarioActual.Empresa.Funcionalidad(531) = "1" Then DvTamanio.Visible = True Else @@ -2117,7 +2168,6 @@ Partial Class ProductosyServicios DdlTamanio.SelectedValueExist("-1") End If - UpDatos.Update() End Sub @@ -2786,14 +2836,14 @@ Partial Class ProductosyServicios Private Function GuardarProductoEnFranquicia(ObjPS As ClsProductosServicios, PSS As String, CveMetodoInv As Integer, EsPaquete As Integer, Agregar As Boolean) As Boolean Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563) Dim EmpresasFranquicia As List(Of Integer) = StrEmpresas.Split(","c).ToList().ConvertAll(Function(x) Convert.ToInt32(x)) - For Each Franquicia As Integer In EmpresasFranquicia - Dim nombreEmpresa As String = GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa") - Dim CveClasificacion As Integer = GlobalDTClasificaciones(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion.SelectedItem.Text)).ToEntero - Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveUnidadMedida", String.Format("UnidadMedida = '{0}'", DdlUnidadMedida.SelectedItem.Text)).ToEntero - Dim CveClasificacion2 As Integer = GlobalDTClasificaciones(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion2.SelectedItem.Text)).ToEntero - Dim CveTipo As Integer = GlobalDTClasificacionesDetalle(CveEmpresa:=Franquicia).FiltroPrimeroValor("CveClasificacionDetalle", String.Format("ClasificacionDetalle = '{0}'", DdlTipoPSDes.SelectedItem.Text)).ToEntero + For Each CveEmpresaFranquicia As Integer In EmpresasFranquicia + Dim nombreEmpresa As String = GlobalDTEmpresas(CveEmpresaFranquicia).FiltroPrimeroValor("Empresa") + Dim CveClasificacion As Integer = GlobalDTClasificaciones(CveEmpresa:=CveEmpresaFranquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion.SelectedItem.Text)).ToEntero + Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(CveEmpresa:=CveEmpresaFranquicia).FiltroPrimeroValor("CveUnidadMedida", String.Format("UnidadMedida = '{0}'", DdlUnidadMedida.SelectedItem.Text)).ToEntero + Dim CveClasificacion2 As Integer = GlobalDTClasificaciones(CveEmpresa:=CveEmpresaFranquicia).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DdlClasificacion2.SelectedItem.Text)).ToEntero + Dim CveTipo As Integer = GlobalDTClasificacionesDetalle(CveEmpresa:=CveEmpresaFranquicia).FiltroPrimeroValor("CveClasificacionDetalle", String.Format("ClasificacionDetalle = '{0}'", DdlTipoPSDes.SelectedItem.Text)).ToEntero Dim CveMarcaFranquicia As Integer = -1 - If ObjPS.GetMarcas(Franquicia) Then + If ObjPS.GetMarcas(CveEmpresaFranquicia) Then CveMarcaFranquicia = ObjPS.DtResultados.FiltroPrimeroValor("CveMarca", String.Format("Marca = '{0}'", DdlMarca.SelectedItem.Text)).ToEntero End If Dim CveModelo As Integer = -1 @@ -2801,13 +2851,13 @@ Partial Class ProductosyServicios Dim CveRin As Integer = -1 Dim ObjGral As New ClsGenerales() - If ObjGral.GetModelos(Franquicia) Then + If ObjGral.GetModelos(CveEmpresaFranquicia) Then CveModelo = ObjGral.DtResultados.FiltroPrimeroValor("CveModelo", String.Format("Modelo = '{0}'", DdlModelo.SelectedItem.Text)).ToEntero End If - If ObjGral.GetMedidas(Franquicia) Then + If ObjGral.GetMedidas(CveEmpresaFranquicia) Then CveMedida = ObjGral.DtResultados.FiltroPrimeroValor("CveMedida", String.Format("Medida = '{0}'", DdlMedida.SelectedItem.Text)).ToEntero End If - If ObjGral.GetRimTamanios(Franquicia) Then + If ObjGral.GetRimTamanios(CveEmpresaFranquicia) Then CveRin = ObjGral.DtResultados.FiltroPrimeroValor("CveRinTamaño", String.Format("RinTamaño = '{0}'", DdlRin.SelectedItem.Text)).ToEntero End If @@ -2845,7 +2895,7 @@ Partial Class ProductosyServicios If Agregar Then If Not ObjPS.AddPS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, txtcodigo2.text.trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, DdlProveedor.txtValue.Value.ToEntero, True, ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, - Franquicia, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, + CveEmpresaFranquicia, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), @@ -2860,7 +2910,7 @@ Partial Class ProductosyServicios End If Else - If ObjPS.GetPS(-1, -1, Franquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then + If ObjPS.GetPS(-1, -1, CveEmpresaFranquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS").ToEntero() If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, txtcodigo2.text.trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, @@ -2878,7 +2928,7 @@ Partial Class ProductosyServicios End If Else - Alert(String.Format("El producto no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia) + Alert(String.Format("El producto no existe en la franquicia: '{0}'", GlobalDTEmpresas(CveEmpresaFranquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia) Return True End If End If diff --git a/Ventas/RepConciliacionEmitidosSat.aspx.cs b/Ventas/RepConciliacionEmitidosSat.aspx.cs index dfd5237a1..d6ffee4e0 100644 --- a/Ventas/RepConciliacionEmitidosSat.aspx.cs +++ b/Ventas/RepConciliacionEmitidosSat.aspx.cs @@ -224,7 +224,7 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas ClsCGame ObjCGame = new ClsCGame(ObjVentas.IniciaTransacSQL()); ClsEdocumentacion ObjDocCliente = new ClsEdocumentacion(ObjVentas.IniciaTransacSQL()); ClsAcumuladores ObjAcum = new ClsAcumuladores(ObjVentas.IniciaTransacSQL()); - ClsContPAQi ObjContPaq = null; + //ClsContPAQi ObjContPaq = null; //StringBuilder MensajeAlert = new StringBuilder() ; Modelos.Factura.MMensajeFactura Resp = new Modelos.Factura.MMensajeFactura(); DataTable DtDetalle = objfact.DtDetalle; diff --git a/Ventas/RepProductosServicios.aspx b/Ventas/RepProductosServicios.aspx index 2b700023e..164701780 100644 --- a/Ventas/RepProductosServicios.aspx +++ b/Ventas/RepProductosServicios.aspx @@ -1,122 +1,122 @@ -<%@ Page Title="Reporte de Productos Servicios" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProductosServicios.aspx.vb" Inherits="Ventas_RepProductosServicios" %> - -<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> - - - - - - - - -
- <%-- --%> -
-
-
-
- -
  • - PDF +<%@ Page Title="Reporte de Productos Servicios" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProductosServicios.aspx.vb" Inherits="Ventas_RepProductosServicios" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + + + +
    + <%-- --%> +
    +
    +
    +
    + +
  • + PDF <%----%> -
  • -
  • - Excel +
  • +
  • + Excel <%----%> -
  • -
  • - Personalizar -
  • -
  • - Ver Dlls en pesos -
  • - - -
  • - Ver Gráfica -
  • -
    -
    -
    - - Reporte de Productos Servicios - - - - - - -
    -
    -
    - - -
    -
    -
    - -
    - - - - - - - - - - + +
  • + Personalizar +
  • +
  • + Ver Dlls en pesos +
  • + + +
  • + Ver Gráfica +
  • +
    +
    + + + Reporte de Productos Servicios + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + + + + + + + + + + <%-- @@ -126,45 +126,47 @@ - --%> -
    -
    + --%> +
    +
    Fecha Inicio: -
    -
    -
    - - - - -
    - - - - - - -
    -
    + +
    +
    +
    + + + + +
    + + + + + + +
    +
    Fecha Fin: -
    -
    -
    - - - - -
    - - - - - - -
    - -
    - + +
    +
    +
    + + + + +
    + + + + + + +
    + +
    + <%-- @@ -184,357 +186,361 @@ - --%> - -
    -
    -
    -
    - +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + <%----%> + + <%----%> + <%----%> + + + + + + + + + + + + + -
    -
    -
    - - - - - - - - - - - - - - - - - - - <%----%> - - <%----%> - <%----%> - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + + diff --git a/Ventas/RepProductosServicios.aspx.vb b/Ventas/RepProductosServicios.aspx.vb index 961687d51..8dc9a06ac 100644 --- a/Ventas/RepProductosServicios.aspx.vb +++ b/Ventas/RepProductosServicios.aspx.vb @@ -273,7 +273,7 @@ Partial Class Ventas_RepProductosServicios DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra, - CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then + CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ChkModalidadContable.Checked) Then GvDatos.DataSource = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados Else @@ -353,11 +353,11 @@ Partial Class Ventas_RepProductosServicios FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1") FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1") - Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}", + Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}&ModalidadContable={32}", e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"), - FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca, CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)) + FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca, CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), If(ChkModalidadContable.Checked, 1, 0)) e.Row.FCLiteral("LtlGrupo").Text = String.Format("{2}", Css, Liga, e.Row.DBCampo("Gpo")) diff --git a/Ventas/RepProductosServiciosDetalle.aspx b/Ventas/RepProductosServiciosDetalle.aspx index f0fb503c3..76efe3b18 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx +++ b/Ventas/RepProductosServiciosDetalle.aspx @@ -1,123 +1,123 @@ -<%@ Page Title="Reporte de Productos Servicios" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProductosServiciosDetalle.aspx.vb" Inherits="Ventas_RepProductosServiciosDetalle" %> - -<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> - - - - - - +<%@ Page Title="Reporte de Productos Servicios" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProductosServiciosDetalle.aspx.vb" Inherits="Ventas_RepProductosServiciosDetalle" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + <%--
    -
    --%> -
    - -
  • - Generar -
  • -
  • - Personalizar -
  • -
  • - Ver Dlls en pesos -
  • -
  • - Imprimir -
  • - - -
  • - Ver Grafica -
  • -
    -
    - - - + --%> +
    + +
  • + Generar +
  • +
  • + Personalizar +
  • +
  • + Ver Dlls en pesos +
  • +
  • + Imprimir +
  • + +
  • - Descargar Facturas -
  • -
    - - - -
    - - - - - -
    - - Reporte de Productos Servicios - - - - - - -
    -
    -
    - - -
    -
    -
    - -
    - - - - - - - - - - + Ver Grafica + + + + + + +
  • + Descargar Facturas +
  • +
    + + + +
    + + + + + + + + Reporte de Productos Servicios + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + + + + + + + + + + <%-- @@ -127,45 +127,47 @@ - --%> -
    -
    + --%> +
    +
    Fecha Inicio: -
    -
    -
    - - - - -
    - - - - - - -
    -
    + +
    +
    +
    + + + + +
    + + + + + + +
    +
    Fecha Fin: -
    -
    -
    - - - - -
    - - - - - - -
    - -
    - + +
    +
    +
    + + + + +
    + + + + + + +
    + +
    + <%-- @@ -185,339 +187,342 @@ - --%> - -
    -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - -
    - - - - - - - - + + +
    + + +
    + +
    +
    +
    +
    +
    + + + +
    + + + + + + + + - - + +
    + diff --git a/Ventas/RepProductosServiciosDetalle.aspx.vb b/Ventas/RepProductosServiciosDetalle.aspx.vb index 989d36af3..2a8e14c21 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx.vb +++ b/Ventas/RepProductosServiciosDetalle.aspx.vb @@ -373,7 +373,8 @@ Partial Class Ventas_RepProductosServiciosDetalle TxtFechaIEjec.Text = If(AnioEjec <> "-1", String.Format("01/01/{0}", AnioEjec), TxtFechaIEjec.Text) TxtFechaIEjec.Text = If(MesEjec <> "-1", String.Format("01/{0}/0001", MesEjec), TxtFechaIEjec.Text) - + Dim ModalidadContable As Boolean = CBool(If(Request("ModalidadContable") IsNot Nothing, Request("ModalidadContable").ToEntero(), 0)) + ChkModalidadContable.Checked = ModalidadContable CveMoneda = If(Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero() > 0, Request("CveMoneda").ToEntero(), -1).ToEntero DdlProyecto.SelectedValueExist(CveProyecto) @@ -403,7 +404,7 @@ Partial Class Ventas_RepProductosServiciosDetalle CargaProvedores(CveProveedorCompra) 'If CveProveedorCompra.ToEntero > 0 Then DdlProveedor.SelectedValue = CveProveedorCompra DdlTipoPSDes.SelectedValueExist(CveClasificacionDetalle) - CargaDatos(CveProyecto, CveSubProyecto, CveCategoria, CveClasificacion, CvePS, Mes, MesEjec, CveCliente, CveSubProyectoEjecucion, CveVendedor, CveUsuario, CveEstatus, GPO.ToEntero, TipoDocto, CveMarca) + CargaDatos(CveProyecto, CveSubProyecto, CveCategoria, CveClasificacion, CvePS, Mes, MesEjec, CveCliente, CveSubProyectoEjecucion, CveVendedor, CveUsuario, CveEstatus, GPO.ToEntero, TipoDocto, CveMarca, ModalidadContable) CargarMarcas(CveMarca) End Sub #End Region @@ -432,7 +433,8 @@ Partial Class Ventas_RepProductosServiciosDetalle DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, GPO:=DdlGrupo.SelectedValue.ToEntero, CveMoneda:=CveMoneda, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProveedorCompra:=CveProveedorCompra, - CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then + CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, + ModalidadContable:=ChkModalidadContable.Checked) Then GvDatos.DataSource = ObjVentas.DtResultados TmpDT = ObjVentas.DtResultados Else @@ -444,7 +446,7 @@ Partial Class Ventas_RepProductosServiciosDetalle Agrupador = DdlGrupo.SelectedItem.Text End Sub - Private Sub CargaDatos(CveProyecto As String, CveSubProyecto As String, CveCategoria As String, CveClasificacion As String, CvePS As String, Mes As String, MesEjec As String, CveCliente As Integer, CveSubProyectoEjecucion As String, CveVendedor As Integer, CveUsuario As String, CveEstatus As String, Gpo As Integer, TipoDocto As String, CveMarca As Integer) + Private Sub CargaDatos(CveProyecto As String, CveSubProyecto As String, CveCategoria As String, CveClasificacion As String, CvePS As String, Mes As String, MesEjec As String, CveCliente As Integer, CveSubProyectoEjecucion As String, CveVendedor As Integer, CveUsuario As String, CveEstatus As String, Gpo As Integer, TipoDocto As String, CveMarca As Integer, ModalidadContable As Boolean) Dim ObjVentas As New ClsVentas() Dim FechaI, FechaF, FechaIEjec, FechaFEjec As Date FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha) diff --git a/Ventas/RepProductosServiciosPeriodo.aspx b/Ventas/RepProductosServiciosPeriodo.aspx index b9ab53565..d35327acb 100644 --- a/Ventas/RepProductosServiciosPeriodo.aspx +++ b/Ventas/RepProductosServiciosPeriodo.aspx @@ -236,6 +236,12 @@
    +
    + +
    + +
    +
    diff --git a/Ventas/RepProductosServiciosPeriodo.aspx.cs b/Ventas/RepProductosServiciosPeriodo.aspx.cs index efb83532f..5a4f308cf 100644 --- a/Ventas/RepProductosServiciosPeriodo.aspx.cs +++ b/Ventas/RepProductosServiciosPeriodo.aspx.cs @@ -353,8 +353,8 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas DdlVendedor.SelectedValue.ToEntero(), DdlUsuario.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero(), "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero(), DdlTipoComprobante.SelectedValue, DdlProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedValue.ToEntero(), RblTipoCambio.SelectedValue.ToEntero(), TCEspecifico, CveUsuarioConsulta: UsuarioActual.CveUsuario, VerEn: VerEn, CvePS: DdlPS.SelectedValue.ToEntero(), - CveClasificacion: DdlClasificacion.SelectedValue.ToEntero(), CveCategoria: DdlCategoria.SelectedValue.ToEntero(),TipoFecha:DdlTipoFecha.SelectedValue.ToEntero(), - CveClienteClasificacion:DdlClienteClasificacion.SelectedValue.ToEntero())) + CveClasificacion: DdlClasificacion.SelectedValue.ToEntero(), CveCategoria: DdlCategoria.SelectedValue.ToEntero(), TipoFecha: DdlTipoFecha.SelectedValue.ToEntero(), + CveClienteClasificacion: DdlClienteClasificacion.SelectedValue.ToEntero(), ModalidadContable: ChkModalidadContable.Checked)) { GvDatos.DataSource = ObjVentas.DtResultados; DtVentas = ObjVentas.DtResultados; diff --git a/Ventas/RepVentas.aspx b/Ventas/RepVentas.aspx index 10ce64ea8..b88991d67 100644 --- a/Ventas/RepVentas.aspx +++ b/Ventas/RepVentas.aspx @@ -299,7 +299,7 @@
    -
    +
    diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index 40f0622e7..e6d31ad7c 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -98,6 +98,11 @@ Partial Class Ventas_RepVentas liRepHP.Visible = True End If + 'SI ES EL USUARIO SISTEMA MOSTRAR LA MODALIDAD CONTABLE (TEMPORAL) + If UsuarioActual.CveUsuario = 100 Then + divModalidadcontable.Visible = True + End If + 'Modalidad Cotizacion If Opcion = "Cot" Then DdlTipoComprobante.SelectedValuesIfExistM(Opcion) diff --git a/Ventas/RepVentasPeriodo.aspx b/Ventas/RepVentasPeriodo.aspx index 6a8b81c5a..ace8783f1 100644 --- a/Ventas/RepVentasPeriodo.aspx +++ b/Ventas/RepVentasPeriodo.aspx @@ -1,538 +1,560 @@ -<%@ Page Title="Reporte de Ventas Por Periodo" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepVentasPeriodo.aspx.vb" Inherits="RepVentasPeriodo" %> - - - - - - - - - - - - -
  • - PDF -
  • - -
    - - - -
    - -
  • - Excel -
  • - - -
  • - Personalizar -
  • -
    -
    - +<%@ Page Title="Reporte de Ventas Por Periodo" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepVentasPeriodo.aspx.vb" Inherits="RepVentasPeriodo" %> + + + + + + + + + + + + +
  • + PDF +
  • + +
    + + + +
    + +
  • + Excel +
  • + + +
  • + Personalizar +
  • +
    +
    + <%--
  • Personalizar
  • -
    --%> -
  • - Generar Reporte HP -
  • -
  • - Ver Dlls en pesos -
  • -
    - - Reporte de Ventas - - - - - - - - -
    -
    -
    - - -
    -
    -
    - -
    - - - - - - - - - - -
    - - -
    - - - -
    - - -
    - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    -
    - -
    -
    -
    - -
    - - - -
    - -
    -
    - - - - - - - - - - -
    -
    - -
    -
    - - - - - - - - - - -
    -
    - -
    - - - -
    -
    -
    - -
    - - - -
    - -
    -
    - - - - - - - - - - -
    -
    - -
    -
    - - - - - - - - - - -
    -
    - -
    - - - -
    -
    -
    - -
    - - - -
    - -
    - - - -
    - -
    - -
    - - -
    - - - - - -
    - -
    -
    -
    -
    -
    - - - - - - - - - + --%> +
  • + Generar Reporte HP +
  • +
  • + Ver Dlls en pesos +
  • +
    + + Reporte de Ventas + + + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + + + + + + + + + + +
    + + +
    + + + +
    + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + +
    +
    +
    + +
    + + + +
    + +
    +
    + + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + + +
    +
    + +
    + + + +
    +
    +
    + +
    + + + +
    + +
    +
    + + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + + +
    +
    + +
    + + + +
    +
    +
    + +
    + + + +
    + +
    + + + +
    + +
    + +
    + + +
    + + + + + +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + Grupo - - - - - - - + + + + + + + + Cantidad - - - - - - - + + + + + + + + Ene - - - - - - - + + + + + + + + Feb - - - - - - - + + + + + + + + Mar - - - - - - - + + + + + + + + Abr - - - - - - - + + + + + + + + May - - - - - - - + + + + + + + + Jun - - - - - - - + + + + + + + + Jul - - - - - - - + + + + + + + + Ago - - - - - - - + + + + + + + + Sep - - - - - - - + + + + + + + + Oct - - - - - - - + + + + + + + + Nov - - - - - - - + + + + + + + + Dic - - - - - - - + + + + + + + + Total - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + +
    +
    + +
    +
    +
    + + Grafica +
    +
    + + + +
    +
    +
    +
    + loading +
    +
    +
    + +
    +
    +
    + - + + - - + + +
    diff --git a/Ventas/RepVentasPeriodo.aspx.vb b/Ventas/RepVentasPeriodo.aspx.vb index 9b733053f..abe6d2712 100644 --- a/Ventas/RepVentasPeriodo.aspx.vb +++ b/Ventas/RepVentasPeriodo.aspx.vb @@ -195,7 +195,7 @@ Partial Class RepVentasPeriodo If ObjVentas.GetRepVentasPeriodos(FechaI, FechaF, FechaIEjec, FechaFEjec, DdlClientes.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario, - VerEn:=VerEn, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then + VerEn:=VerEn, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ChkModalidadContable.Checked) Then GvDatos.DataSource = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados diff --git a/Ventas/RepVentasUtilidadDetalle.aspx b/Ventas/RepVentasUtilidadDetalle.aspx index 5a9551967..cdaae3089 100644 --- a/Ventas/RepVentasUtilidadDetalle.aspx +++ b/Ventas/RepVentasUtilidadDetalle.aspx @@ -413,11 +413,11 @@
    - - - - - +
    ProductoVentaCostoUtilidad/Pérdida
    + + + +
    ProductoVentaCostoUtilidad/Pérdida
    @@ -426,10 +426,11 @@ - + - + @@ -443,7 +444,7 @@ - + @@ -476,7 +477,7 @@ - + diff --git a/Ventas/RepVentasUtilidadDetalle.aspx.vb b/Ventas/RepVentasUtilidadDetalle.aspx.vb index 3b8c091f6..0b72e1c81 100644 --- a/Ventas/RepVentasUtilidadDetalle.aspx.vb +++ b/Ventas/RepVentasUtilidadDetalle.aspx.vb @@ -109,7 +109,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle ImgCosto.Visible = True Else UPFiltros.Visible = False - GvDatos.CssClass = "gvFull" + GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvFull" End If End If diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 94e2c239f..4ff849a57 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2089,7 +2089,7 @@ Partial Class Ventas TrSinExistencia.Visible = UsuarioActual.TienePermisoProceso(276) - If UsuarioActual.CveEmpresa.Contiene(119, 1) Then + If UsuarioActual.Empresa.Funcionalidad(595) = "1" Then ImgDescPU.Visible = False ImgDescConcepto.Visible = False DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Autorización", "PA")) @@ -4387,7 +4387,7 @@ Partial Class Ventas HdnIVAOriginal.Value = TxtIVA.Text TxtPedidoContrato.Text = DbRowVenta("PedidoContrato").ToString() TxtPedidoContrato.Enabled = False - TxtKilometraje.Text = DbRowVenta("Kilometraje").ToString() + TxtKilometraje.Text = DbRowVenta("Kilometraje").ToString().PadLeft(6, "0"c) HdnAmortizacion.Value = LblAmort.Text.ToDouble.ToString() HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2) @@ -5241,16 +5241,26 @@ Partial Class Ventas Else Dim DTAlmacen As DataTable ddlAlmacen.Items.Clear() + DTAlmacen = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}") ddlAlmacen.DataSource = DTAlmacen - If DTAlmacen Is Nothing Or DTAlmacen.Rows.Count = 0 Then - ddlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1")) - ddlAlmacen.SelectedValue = "-1" - End If + + ddlAlmacen.Items.Insert(0, New ListItem("Seleccione ", "-1")) + ddlAlmacen.SelectedValueExist("-1") + ddlAlmacen.DataBind() + If GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}").Rows.Count > 0 Then - ddlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) + 'SI ES DEL MISMO SUB PROYECTO SUGIERE EL ALMACEN ASIGNADO AL USUARIO + If UsuarioActual.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero() Then + ddlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) + Else + Dim CveAlmacen As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}").ToEntero() + ddlAlmacen.SelectedValueExist(CveAlmacen) + End If + End If + End If 'SI TIENE CONTRATO NO SE MUEVE @@ -5351,8 +5361,11 @@ Partial Class Ventas If EstatusCliente = False And Not DdlTipoComprobante.SelectedValue.Contiene("Cot", "DPe") And (CveVenta <= 0 Or EsCreaApartirDe) Then Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia) + BtnEmitirImprimir.Visible = EstatusCliente + TrVistaPrevia.Visible = EstatusCliente End If + 'CUANDO SEA COTIZACION Y SEA COMPUPROVEEDORES (EMPRESA 72) NO DEBE ENVIAR CORREO AL CLIENTE If UsuarioActual.CveEmpresa = 72 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then ChkEnviarFactura.Checked = False @@ -5935,7 +5948,8 @@ Partial Class Ventas RBLPago.SelectedValue = "2" RBLPago.Items(0).Enabled = False RBLPago_SelectedIndexChanged(Nothing, Nothing) - If UsuarioActual.CveEmpresa.Contiene(119) AndAlso Not UsuarioActual.TienePermisoProceso(268) Then + 'GENERAR UNA AUTORIZACIÓN SI EL CLIENTE NO PERMITE CREDITO + If UsuarioActual.Empresa.Funcionalidad(595) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) Then DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización") DdlTipoComprobante.SelectedValue = "PA" TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString @@ -5948,7 +5962,8 @@ Partial Class Ventas LnkCotizaciones.Visible = False End If UPCondicionesPago.Update() - ElseIf UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 146, 158, 140) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta < 1 Then + 'CARGAR CREDITO DISPONIBLE AL GENERAR UNA FACTURA + ElseIf UsuarioActual.Empresa.Funcionalidad(596) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta < 1 Then RBLPago.SelectedValue = "1" RBLPago_SelectedIndexChanged(Nothing, Nothing) UPCondicionesPago.Update() @@ -5958,7 +5973,7 @@ Partial Class Ventas TrCreditoDisponible.Visible = True LblCreditoDisponible.Text = CreditoDispo.FormatoNumero If PorcentajeCredito > 80 Then TrPorcentajeCredito.Visible = True : LblPorcentajeCredito.Text = $"{PorcentajeCredito.FormatoNumero}%" - If UsuarioActual.CveEmpresa = 119 AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then + If UsuarioActual.Empresa.Funcionalidad(597) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then 'If LblRFC.Text.Trim <> "XAXX010101000" Then @@ -6010,19 +6025,23 @@ Partial Class Ventas End If Else + 'GENERAR AUTORIZACION SI TIENE EXCEDIO EL LIMITE DE CREDITO + If UsuarioActual.Empresa.Funcionalidad(595) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "Ant", "PA") Then - If UsuarioActual.CveEmpresa = 119 AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "Ant", "PA") Then - Dim Vta As New ClsVentas - Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa) - Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón:

    {0}", Vta.SerieVenta) - Vta.Dispose() - If Opcion > 0 Then - If Opcion = 1 Then - BtnEmitirImprimir.Visible = False + 'VERIFICAR CANDADOS DE VENTA, REMISIONES SIN FACTURAR, FACTURAS QUE NO TENGAN VENCIDAS + If UsuarioActual.Empresa.Funcionalidad(597) = "1" Then + Dim Vta As New ClsVentas + Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa) + Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón:

    {0}", Vta.SerieVenta) + Vta.Dispose() + If Opcion > 0 Then + If Opcion = 1 Then + BtnEmitirImprimir.Visible = False + End If + If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia) + Else + If Alertas AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia) End If - If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia) - Else - If Alertas AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia) End If 'RBLPago.SelectedValue = "2" @@ -6049,7 +6068,7 @@ Partial Class Ventas End If End If UPPCreditoDisponible.Update() - ElseIf UsuarioActual.CveEmpresa.Contiene(119, 1) AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso CveVenta > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Pd2", "Cot") Or (DdlTipoComprobante.SelectedValue = "Rem" And ModalidadEdicion And ViewState("CveClienteAnterior").ToString().ToEntero() > 0 And LblRFC.Text.Trim <> "XAXX010101000")) Then + ElseIf UsuarioActual.Empresa.Funcionalidad(597) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso CveVenta > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Pd2", "Cot") Or (DdlTipoComprobante.SelectedValue = "Rem" And ModalidadEdicion And ViewState("CveClienteAnterior").ToString().ToEntero() > 0 And LblRFC.Text.Trim <> "XAXX010101000")) Then Dim CreditoDispo As Decimal = CargaCreditoDisponible(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero()) If CreditoDispo > 0 Then Dim Vta As New ClsVentas @@ -7376,7 +7395,7 @@ Partial Class Ventas 'VALIDA PROMOCIONES Y EXISTENCIAS Dim ObjVentas As New ClsVentas - If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then + If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), 1, UsuarioActual.CveEmpresa) Then DtPromociones = ObjVentas.DtResultados End If ObjVentas.Dispose() @@ -8440,7 +8459,7 @@ Partial Class Ventas ObjFacturaDevolucion.TipoDocto = "Egs" - If UsuarioActual.CveEmpresa = 140 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then Dim ObjFolios As New ClsGralFolios() Dim TipoDoctoConsulta As String = If(ObjFacturaDevolucion.TipoDocto = "Ant", "Ing", If(ObjFacturaDevolucion.TipoDocto = "PA", "Rem", ObjFacturaDevolucion.TipoDocto)) @@ -8718,7 +8737,7 @@ Partial Class Ventas ObjFacturaBonificacion.TipoDocto = "Egs" - If UsuarioActual.CveEmpresa = 140 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then Dim ObjFolios As New ClsGralFolios() Dim TipoDoctoConsulta As String = If(ObjFacturaBonificacion.TipoDocto = "Ant", "Ing", If(ObjFacturaBonificacion.TipoDocto = "PA", "Rem", ObjFacturaBonificacion.TipoDocto)) @@ -9147,7 +9166,7 @@ Partial Class Ventas ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text) - If UsuarioActual.CveEmpresa = 140 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then Dim ObjFolios As New ClsGralFolios() Dim TipoDoctoConsulta As String = If(ObjFactura.TipoDocto = "Ant", "Ing", If(ObjFactura.TipoDocto = "PA", "Rem", ObjFactura.TipoDocto)) @@ -9808,7 +9827,7 @@ Partial Class Ventas 'ObjFacturaDevolucion.SerieFolio = String.Format("{0}-{1}", LblSerie.Text, TxtFolio.Text) ObjFacturaDevolucion.TipoDocto = "Egs" - If UsuarioActual.CveEmpresa = 140 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then Dim ObjFolios As New ClsGralFolios() Dim TipoDoctoConsulta As String = If(ObjFacturaDevolucion.TipoDocto = "Ant", "Ing", If(ObjFacturaDevolucion.TipoDocto = "PA", "Rem", ObjFacturaDevolucion.TipoDocto)) @@ -11073,17 +11092,26 @@ Partial Class Ventas End If - If DTRemisiones IsNot Nothing AndAlso DTRemisiones.Rows.Count > 0 AndAlso ErrorList.Count = 0 AndAlso factura.TipoDocto.Contiene("Ing", "Ant") Then + 'If DTRemisiones IsNot Nothing AndAlso DTRemisiones.Rows.Count > 0 AndAlso ErrorList.Count = 0 AndAlso factura.TipoDocto.Contiene("Ing", "Ant") Then - Dim dt As DataTable = DTRemisiones.FiltraParametros("Aplicado = True") - If dt.Rows.Count > 0 Then - For Each row As DataRow In dt.Rows - If Not ObjVentas.UpdateVentaRemision(row("CveVenta").ToString().ToEntero(), ObjFactura.CveVenta) Then - ErrorList.Add("Ocurrió un error al actualizar la remisión") - End If - Next - End If + ' Dim dt As DataTable = DTRemisiones.FiltraParametros("Aplicado = True") + ' If dt.Rows.Count > 0 Then + ' For Each row As DataRow In dt.Rows + ' If Not ObjVentas.UpdateVentaRemision(row("CveVenta").ToString().ToEntero(), ObjFactura.CveVenta) Then + ' ErrorList.Add("Ocurrió un error al actualizar la remisión") + ' End If + ' Next + ' End If + 'End If + + If RemisionesLista IsNot Nothing AndAlso RemisionesLista.Count > 0 AndAlso ErrorList.Count = 0 AndAlso factura.TipoDocto.Contiene("Ing", "Ant") Then + For Each CveRemision As Integer In RemisionesLista + If Not ObjVentas.UpdateVentaRemision(CveRemision, ObjFactura.CveVenta) Then + ErrorList.Add("Ocurrió un error al actualizar la remisión") + End If + Next End If + End If If ErrorList.Count = 0 Then @@ -12840,6 +12868,12 @@ Partial Class Ventas End If Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero() + + If CveAlmacen <= 0 Then + OcurrioError = True + ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.
    No ha seleccionado ningun almacen o no tiene permiso para el almacen de esta sucursal.") + End If + Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E1") If CveMovimientoInventario <= 0 Then @@ -15899,7 +15933,7 @@ Partial Class Ventas GvPS.DataBind() UpPS.Update() End Sub - Private Sub CargaFolios() + Private Sub CargaFolios(Optional FacturarDocumentoNuevo As Boolean = False) If ExFolioFactura Then Exit Sub End If @@ -15921,15 +15955,19 @@ Partial Class Ventas 'ViewState("NumAprobacion") = CLng(DT.Rows(0)("Aprobacion").ToString()) 'ViewState("FechaAprobacion") = DT.Rows(0)("FechaAprobacion").ToString().ToDate ViewState("FolioActual") = DT.Rows(0)("FActual").ToString() - If UsuarioActual.CveEmpresa = 140 AndAlso CveVenta > 0 AndAlso Not EsCreaApartirDe AndAlso Not String.IsNullOrEmpty(SerieVenta) Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveVenta > 0 AndAlso Not EsCreaApartirDe AndAlso Not String.IsNullOrEmpty(SerieVenta) Then LblSerie.Text = SerieVenta Else LblSerie.Text = DT.Rows(0)("Serie").ToString() End If TxtFolio.Text = DT.Rows(0)("FActual").ToString() - BtnCrearApartirDe.Enabled = True - BtnEmitirImprimir.Visible = True - TrVistaPrevia.Visible = True + + If Not FacturarDocumentoNuevo Then + BtnCrearApartirDe.Enabled = EstatusCliente + BtnEmitirImprimir.Visible = EstatusCliente + TrVistaPrevia.Visible = EstatusCliente + End If + UpFacturar.Update() Else @@ -16092,7 +16130,7 @@ Partial Class Ventas 'VALIDA PROMOCIONES Dim ObjVentas As New ClsVentas - If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then + If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), 1, UsuarioActual.CveEmpresa) Then DtPromociones = ObjVentas.DtResultados End If ObjVentas.Dispose() @@ -22806,11 +22844,6 @@ Partial Class Ventas Return False End If - 'If AplicaSeccion Then - ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero - 'Else - ' CveSeccionAlmacen = -1 - 'End If CveSeccionAlmacen = -3 If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, 1, CveUnidad, CveProducto, 0, -1, Serie:=Dr2("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then @@ -22823,11 +22856,6 @@ Partial Class Ventas Return False End If - 'If AplicaSeccion Then - ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero - 'Else - ' CveSeccionAlmacen = -1 - 'End If CveSeccionAlmacen = -3 If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, Cantidad, CveUnidad, CveProducto, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then @@ -22894,7 +22922,7 @@ Partial Class Ventas dtvirtual = ObjInventario.DtResultados If dtvirtual.Rows.Count > 0 Then - CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", Modulo:="VV2", CveMovimientoRelacionado:=CveMovimientoSalidaGeneral) + CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta, -1, -1, Observaciones:="", Modulo:="VV2", CveMovimientoRelacionado:=CveMovimientoSalidaGeneral) 'FolioVirtualSalida = ObjInventario.Folio For Each RowVirtual As DataRow In dtvirtual.Rows @@ -22907,10 +22935,14 @@ Partial Class Ventas Return False End If Next + Else + Return False End If Else Return False End If + Else + Return False End If End If @@ -24310,7 +24342,7 @@ Partial Class Ventas Private Sub CargaCxC() Dim ObjMovtos As New ClsMovimientos() If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString().ToEntero(), "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero()) Then - Dim DtTemporal As DataTable = ObjMovtos.DtResultados.FiltraParametros("TipoDocto <> 'RNC' AND Tipo = 'Act' AND CveVenta > 0", "Moneda, OrdenVencimiento, FechaVencimiento") + Dim DtTemporal As DataTable = ObjMovtos.DtResultados.FiltraParametros("TipoDocto NOT IN ('RNC','Rem') AND Tipo = 'Act' AND CveVenta > 0", "Moneda, OrdenVencimiento, FechaVencimiento") GvCxC.DataSource = DtTemporal End If ObjMovtos.Dispose() @@ -28214,7 +28246,7 @@ Partial Class Ventas End If End If - If FolioFijo = 0 Then CargaFolios() 'RECARGA FOLIOS CON EL NUEVO TIPO DOCTO + If FolioFijo = 0 Then CargaFolios(FacturarDocumentoNuevo:=True) 'RECARGA FOLIOS CON EL NUEVO TIPO DOCTO EmitirImprimir(TipoDoctoViejo) 'MANDA A EMITIR - PROCESO VIEJO End If @@ -28275,7 +28307,7 @@ Partial Class Ventas Private Sub CalculaUsados(Optional DtUsadosDevolucion As DataTable = Nothing) - If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev") Then + If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev", "PA") Then If ViewState("CargoUsado").ToString() = "False" Then Exit Sub End If diff --git a/WebBase.config b/WebBase.config index 544610b9d..a5bcb93b5 100644 --- a/WebBase.config +++ b/WebBase.config @@ -1,4 +1,4 @@ - + -
    +
    -
    -
    +
    +
    - + - + - + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - + - + + - + @@ -66,170 +68,193 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - + + + + + + + - - + + + @@ -267,34 +294,39 @@ --> - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - + - + - + - - + + - + @@ -345,32 +377,25 @@ - - - - - - - - - - + + + + + + + + + + + - - - - - + + + +