From 06b9f8aea5c9c6bf50d7467d8acd8c3c7ae8ffdc Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 27 Mar 2021 18:38:11 -0700 Subject: [PATCH 01/26] BDH Ocultar editar PU --- Ventas/Ventas.aspx.vb | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index f5ace049e..4607db3e3 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -19449,17 +19449,28 @@ Partial Class Ventas ViewState("CveClienteAnterior") = CveCliente - 'SI EL DETALLE NO TIENE MOVIMIENTOS DE INVENTARIO ES VISIBLE Dim CantidadFacturadaRemision = 0.0 - For Each Gvr As GridViewRow In GvPS.Rows - Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString().ToDouble > 0 - Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString().ToDouble > 0 - CantidadFacturadaRemision += Gvr.DataKey("CantidadFacturadaRem").ToString().ToDouble - 'If GvInv.Rows.Count > 0 Then - ' Gvr.FCLinkButton("imgE").Enabled = False - ' Gvr.FCLinkButton("imgE").ToolTip = "No se puede editar debido a que ya hay un movimiento de almacen." - 'End If - Next + + 'EN BDH NO DEBE PERMITIR EDITAR EL PU + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + For Each Gvr As GridViewRow In GvPS.Rows + Gvr.FCLinkButton("imgE").Visible = False + Gvr.FCLinkButton("imgD").Visible = False + CantidadFacturadaRemision += Gvr.DataKey("CantidadFacturadaRem").ToString().ToDouble + Next + Else + 'SI EL DETALLE NO TIENE MOVIMIENTOS DE INVENTARIO ES VISIBLE + For Each Gvr As GridViewRow In GvPS.Rows + Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString().ToDouble > 0 + Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString().ToDouble > 0 + CantidadFacturadaRemision += Gvr.DataKey("CantidadFacturadaRem").ToString().ToDouble + 'If GvInv.Rows.Count > 0 Then + ' Gvr.FCLinkButton("imgE").Enabled = False + ' Gvr.FCLinkButton("imgE").ToolTip = "No se puede editar debido a que ya hay un movimiento de almacen." + 'End If + Next + End If + 'ACTIVA CAMBIO DE CLIENTE - SI NO TIENE NADA FACTURADO If Not CantidadFacturadaRemision > 0 AndAlso UsuarioActual.TienePermisoProceso(284) Then From ebe59e6c1bb142594c2a432f7b8b0b43b9855990 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 27 Mar 2021 18:39:02 -0700 Subject: [PATCH 02/26] E141, API de facturacion --- App_Code/ClsInventarios.vb | 22 + App_Code/Modelos.vb | 228 +++----- Ashx/E141.ashx | 1067 +++++++++++++++++++++++++++++++++++- 3 files changed, 1167 insertions(+), 150 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index da84ed30d..45b8f3792 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1660,6 +1660,28 @@ Public Class ClsInventarios End Function + Public Function GetExistenciasSucursales(PSRequest As String, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Vta_ExistenciasSucursalesGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@PSRequest", SqlDbType.VarChar).Value = PSRequest + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch Ex1 As SqlException + Me.OnError("Ocurrió un error al obtener las existencias.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + OnError("Ocurrió un error al obtener las existencias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + + End Function + #End Region #Region " INVENTARIOS - REPORTES " diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 0f3579548..96d8c619a 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1214,6 +1214,43 @@ Namespace Modelos Return File End Function + Public Function TimbrarFactura() As Boolean + Dim SeTimbro As Boolean = False + 'TIMBRADO Y CASO ESPECIAL NOTA DE CREDITO + If (TipoDoctoDevolucion = "" OrElse Not TipoDoctoDevolucion.Contiene("Rem", "Cot", "Ped", "DPe", "PA", "Pd2")) Then + + Dim DebeTimbrar As Boolean = True + If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then + 'si tiene anticipos seleccionados y el total es cero, que no se timbre(previo empresa72) + If Me.Amortizacion > 0 And Me.Total <= 0 Then + DebeTimbrar = False + End If + End If + + If Me.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then + If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then + + If Me.FemsaFactura IsNot Nothing Then + + 'FACTURA INGRESO/EGRESO + Dim ObjTimbrado As New Timbrado + 'DOCUMENTO ACTUAL + If DebeTimbrar Then + SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, Me) + + If Not SeTimbro Then + ErrorList.Add(ObjTimbrado.MensajeErrorCFDI) + End If + + End If + End If + End If + End If + End If + + Return SeTimbro + End Function + #Region " GUARDAR - VENTA, PREPOLIZAS, INV, NC , ESTIMACIONES, AC, NOTA DE CRÉDITO " Private Function RegistrarNCAmortizacion(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjInventario As ClsInventarios, ObjContr As ClsContratos, ObjContPaq As ClsContPAQi, ByVal factura As Modelos.Factura, ObjBancos As ClsBancos, TmpDTconceptos As DataTable, ByRef ObjEventos As ClsOIEventos) As Boolean Dim ProcesoCorrecto As Boolean = True @@ -3668,141 +3705,28 @@ Namespace Modelos Dim OcurrioError As Boolean = False If UsuarioActual.Empresa.UsaInventarios AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then - If factura.CveAlmacen > 0 AndAlso DtInventario.Rows.Count > 0 Then - Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(factura.CveAlmacen, 3, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Mod/E5") - If CveMovimientoInventario <= 0 Then + If factura.GenerarSalidaAlmacen AndAlso factura.CveAlmacen > 0 AndAlso DtInventario.Rows.Count > 0 Then + Dim CveMovimientoInventario As Integer = GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, factura.DtInventario, factura.CveAlmacen, 3, factura.CveMoneda, factura.CveVenta, "Modelos/SA", MovimientoPrePoliza:=True, ObjConta:=ObjConta) + If Not CveMovimientoInventario > 0 Then OcurrioError = True - ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico") - Else - Dim Mensaje As String = "" - Dim i As Integer = 0 - Dim Cantidad As Double - Dim CveUnidad As Integer - Dim CveProducto As Integer - Dim Existencia As Double - 'Dim Pu As Double - 'DtInv.Clone() + End If + End If - Dim DtEquivalencias As DataTable - For Each Dr As DataRow In DtInventario.Rows - CveProducto = Dr("CvePS").ToString.ToEntero - CveUnidad = Dr("CveUM").ToString.ToEntero - Cantidad = Dr("Cantidad").ToString.ToDouble - - If Dr("CveTipoInvPS").ToString.ToEntero = 5 And Dr("Serie").ToString = "" Then - OcurrioError = True - ErrorList.Add("Se deben especificar las Series de los productos de almacén") - Exit For - End If - - If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) AndAlso factura.TipoDocto.Contiene("Rem", "Ing") Then - Existencia = ObjInventario.GetExistenciasPS(CveProducto, CveUnidad, UsuarioActual.CveEmpresa, CveAlmacen, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=factura.CveSubProyecto, CveVendedor:=factura.CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1) - If Existencia < Cantidad Then - OcurrioError = True - ErrorList.Add($"No cuenta con la cantidad suficiente en inventario del producto {Dr("CodigoPS")} .Cuenta con {Existencia.FormatoNumero(2)}.") - Exit For - End If - End If - - If UsuarioActual.CveEmpresa = 1 Then - DtEquivalencias = New DataTable - DtEquivalencias = GlobalDTProductosServiciosEquivalencias(CveProducto, -1, UsuarioActual.CveEmpresa) - Dim CveUnidadBase As Integer = DtEquivalencias.FiltroPrimeroValor("CveUM", "UnidadBase = 'True'").ToEntero - Dim drUMBase As DataRow = DtEquivalencias.FiltroPrimero("UnidadBase = 'True'") - - 'SI LA UNIDAD ACTUAL NO ES LA BASE SACA PROPORCION (EQUIVALENTE) - If CveUnidadBase <> CveUnidad Then - ' LO QUE PUSE LO QUE VALE UNIDAD BASE LO QUE VALE UNIDAD SELECCIONADA - Cantidad = Dr("Cantidad").ToString.ToDouble * drUMBase("Cantidad").ToString.ToDouble / DtEquivalencias.FiltraParametros(String.Format("CveUM = {0}", CveUnidad)).Rows(0)("Cantidad").ToString.ToDouble - CveUnidad = CveUnidadBase - End If - End If - - If CveProducto > 0 Then - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, 0, -1, Serie:=Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then - OcurrioError = True - ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.
") - Exit For - End If - Else - OcurrioError = True - ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.
") - Exit For - End If - - - i = i + 1 - Next - - 'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN - If Not OcurrioError Then - Dim DtCostos As DataTable = Nothing - Dim ValorInventario As Decimal = 0 - Dim TotalCosto As Decimal = 0 - If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then - DtCostos = ObjInventario.DtResultados - TotalCosto = DtCostos.SUMD("Total").RoundSQL() - Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"}) - Dim IdCtaContable As Integer = 0 - Dim CveCuenta As Integer = 0 - If tmpCostos.Rows.Count > 0 Then - Dim TotalCostoAcumulado As Decimal = 0 - Dim cont As Integer = 1 - 'Se agrega movimiento separado por la cuenta de ventas (ER) - For Each RowInv As DataRow In tmpCostos.Rows - ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL() - TotalCostoAcumulado += ValorInventario - - 'cuando es el último movimiento y hay diferencias en los importes - If cont = DtCostos.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then - ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado) - End If - - 'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString, Row2("SubProyecto").ToString) - IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero - CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero - If ValorInventario <> 0 Then - - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then - OcurrioError = True - End If - End If - cont += 1 - Next - End If - IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero - - If TotalCosto <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, True, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then - OcurrioError = True - End If - End If - - factura.Inv_CveMovimiento = CveMovimientoInventario - factura.Inv_ValorInventario = ValorInventario - - End If + If factura.CveAlmacen > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") AndAlso RemisionesLista.Count > 0 Then + For Each CveRemision As Integer In RemisionesLista + 'El almacen general es el Primer Almacen de Material en la Sucursal + If Not TraspasoAlmacen(ObjInventario, CveRemision, ObjConta, True, 9) Then + OcurrioError = True + Exit For End If - - - End If - - If RemisionesLista.Count > 0 Then - For Each CveRemision As Integer In RemisionesLista - 'El almacen general es el Primer Almacen de Material en la Sucursal - If Not TraspasoAlmacen(ObjInventario, CveRemision, ObjConta, True, 9) Then - OcurrioError = True - Exit For - End If - Next - End If + Next End If If factura.TipoDocto = "Rem" AndAlso factura.ServicioDomicilio Then Dim CveMovimientoSalida As Integer = GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenServicioDomicilio, 8, factura.CveMoneda, factura.CveVenta, "Modelos/SD1") If CveMovimientoSalida > 0 Then - If Not (GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenTraspasoDestino, 9, factura.CveMoneda, factura.CveVenta, "Modelos/SD1", CveMovimientoRelacionado:=CveMovimientoSalida) > 0) Then + If Not (GenerarMovimientoAlmacenServicioDomicilio(ObjInventario, factura, DtInventario, factura.CveAlmacenTraspasoDestino, 9, factura.CveMoneda, factura.CveVenta, "Modelos/SD2", CveMovimientoRelacionado:=CveMovimientoSalida) > 0) Then OcurrioError = True End If Else @@ -4079,7 +4003,7 @@ Namespace Modelos End Function - Private Function GenerarMovimientoAlmacenServicioDomicilio(ByRef ObjInventario As ClsInventarios, factura As Modelos.Factura, DtInventario As DataTable, CveAlmacen As Integer, CveConcepto As Integer, CveMoneda As Integer, CveVenta As Integer, Modulo As String, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1) As Integer + Private Function GenerarMovimientoAlmacenServicioDomicilio(ByRef ObjInventario As ClsInventarios, ByRef factura As Modelos.Factura, DtInventario As DataTable, CveAlmacen As Integer, CveConcepto As Integer, CveMoneda As Integer, CveVenta As Integer, Modulo As String, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1) As Integer Dim OcurrioError As Boolean = False Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, CveConcepto, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:=Modulo, CveMovimientoRelacionado:=CveMovimientoRelacionado) @@ -4167,9 +4091,18 @@ Namespace Modelos Dim DtCostos As DataTable = Nothing Dim ValorInventario As Decimal = 0 Dim TotalCosto As Decimal = 0 + + Dim TipoMovto68 As Boolean = True + Dim TipoMovto69 As Boolean = False + + If CveConcepto.Contiene(18) Then + TipoMovto68 = False + TipoMovto69 = True + End If + If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) Then DtCostos = ObjInventario.DtResultados - TotalCosto = DtCostos.SUMD("Total").RoundSQL() + TotalCosto = DtCostos.SUMD("Total").RoundSQL Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"}) Dim IdCtaContable As Integer = 0 Dim CveCuenta As Integer = 0 @@ -4178,39 +4111,41 @@ Namespace Modelos Dim cont As Integer = 1 'Se agrega movimiento separado por la cuenta de ventas (ER) For Each RowInv As DataRow In tmpCostos.Rows - ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL() + ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").RoundSQL TotalCostoAcumulado += ValorInventario 'cuando es el último movimiento y hay diferencias en los importes - If cont = DtCostos.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then + If cont = tmpCostos.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado) End If - 'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString, Row2("SubProyecto").ToString) - IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero - CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero - If ValorInventario <> 0 Then + 'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString(), Row2("SubProyecto").ToString()) + IdCtaContable = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() + 'CveCuenta = GlobalDTClasificaciones(factura.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() + 'If ValorInventario <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then - OcurrioError = True - End If + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then + OcurrioError = True End If + 'End If cont += 1 Next End If - IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero + IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() - If TotalCosto <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, True, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then - OcurrioError = True - End If + 'If TotalCosto <> 0 Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then + OcurrioError = True End If + 'End If - factura.Inv_CveMovimiento = CveMovimientoInventario - factura.Inv_ValorInventario = ValorInventario - + Else + OcurrioError = True End If + factura.Inv_CveMovimiento = CveMovimientoInventario + factura.Inv_ValorInventario = ValorInventario End If + End If Return CveMovimientoInventario @@ -5516,7 +5451,7 @@ Namespace Modelos 'ENTRADA POR TRAPASO A ENTREGA POR ADELANTADO If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaDevRem, UsuarioActual.CveEmpresa) Then For Each Dr As DataRow In ObjInventario.DtResultados.Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then ErrorCancelar = True Exit For End If @@ -5986,6 +5921,7 @@ Namespace Modelos Public Property CveAnticipo As Integer Public Property RemisionesLista As List(Of Integer) Public Property CveAlmacen As Integer + Public Property GenerarSalidaAlmacen As Boolean = False Public Property CveConceptoMovimiento As Integer Public Property ObservacionesMovimiento As String Public Property DtMovimientosUsados As DataTable diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index e139c0ecc..202b94548 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -101,8 +101,169 @@ Public Class E141 : Implements IHttpHandler End Set End Property + ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1, Optional Estatus As Integer = -1, Optional Codigo As String = "-1") As DataTable + Get + Dim ObjPS As New ClsProductosServicios + + If ObjPS.GetPS(CvePS, -1, CveEmpresa, Codigo:=Codigo, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta, pEstado:=Estatus) Then + GlobalDTPS = ObjPS.DtResultados + Else + GlobalDTPS = Nothing + End If + + ObjPS.Dispose() + End Get + End Property + + Property GlobalDTMonedas() As DataTable + Get + GlobalDTMonedas = DirectCast(HttpContext.Current.Application("GlobalDTMonedas"), DataTable) + End Get + Set(value As DataTable) + HttpContext.Current.Application("GlobalDTMonedas") = value + End Set + End Property + + Public Property GlobalDTVtaFormaPago() As DataTable + Get + GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable) + End Get + Set(value As DataTable) + HttpContext.Current.Application("GlobalDTVtaFormaPago") = value + End Set + End Property + + Property GlobalDTVtaMetodoPago() As DataTable + Get + GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable) + End Get + Set(value As DataTable) + HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value + End Set + End Property + + Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable + Get + If EsPersonaFisica <> -1 Then + Dim Tipo As String = "" + If EsPersonaFisica = 1 Then Tipo = "AplicaPersonaFisica = 1" Else Tipo = "AplicaPersonaMoral = 1" + + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows) + GlobalDTSATUsosCFDI = Dv.ToTable + Dv.Dispose() + Else + GlobalDTSATUsosCFDI = DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable) + End If + + End Get + Set(ByVal value As DataTable) + HttpContext.Current.Application("GlobalDTSATUsosCFDI") = value + End Set + End Property + + Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjUsr As New ClsInventarios + If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then HttpContext.Current.Application(AppNombre) = ObjUsr.DtResultados + ObjUsr.Dispose() + End If + + Dim Str As New StringBuilder + Str.Append("1=1 AND ") + If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) + If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) + If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) + If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) + + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTAlmacen = Dv.ToTable + Dv.Dispose() + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value + End Set + 'Get + + ' Dim Str As New StringBuilder + ' Str.Append("1=1 AND ") + ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) + ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) + ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) + ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) + + ' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + ' GlobalDTAlmacen = Dv.ToTable + ' Dv.Dispose() + + 'End Get + 'Set(value As DataTable) + ' Application("GlobalDTAlmacen") = value + 'End Set + End Property + + Property GlobalDTEstado(ClaveSATPais As String) As DataTable + Get + If HttpContext.Current.Application("GlobalDTEstado") Is Nothing Then + Dim ObjGrales As New ClsGenerales + If ObjGrales.GetSATEstado("-1") Then HttpContext.Current.Application("GlobalDTEstado") = ObjGrales.DtResultados Else HttpContext.Current.Application("GlobalDTEstado") = Nothing + ObjGrales.Dispose() + End If + + If ClaveSATPais <> "-1" Then + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable), String.Format("ClaveSATPais = '{0}'", ClaveSATPais), "", DataViewRowState.CurrentRows) + GlobalDTEstado = Dv.ToTable + Dv.Dispose() + Else + GlobalDTEstado = DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable) + End If + + End Get + Set(value As DataTable) + HttpContext.Current.Application("GlobalDTEstado") = value + End Set + End Property #End Region +#Region "V A L I D A - D A T O S" + Private Function ValidaUsuarioSistema(CveUsuario As Integer, CveEmpresa As Integer) As Usuario + Dim UsuarioActual As Usuario = Nothing + Dim ObjUsuarios As New ClsSisUsuarios + If ObjUsuarios.GetUsuarios(CveUsuario) Then + If ObjUsuarios.DtResultados.Rows.Count > 0 Then + Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString() + Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString() + UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa) + UsuarioActual.CveEmpresa = CveEmpresa + CreaObjetoEmpresa(UsuarioActual) + End If + End If + ObjUsuarios.Dispose() + Return UsuarioActual + End Function + Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario) + + Dim ObjEmpresa As New ClsSisEmpresas() + If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then + If ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then + Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados + + Dim EmpresasFuncionalidades As New HybridDictionary + For Each Row As Data.DataRow In dttmp.Rows + EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString) + Next + ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades) + End If + + UsuarioActual.Empresa = ObjEmpresa.Empresa + End If + ObjEmpresa.Dispose() + End Sub + +#End Region Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest Dim retorno As String = "" Try @@ -132,6 +293,7 @@ Public Class E141 : Implements IHttpHandler If Auth.IsSucces Then retorno = ConsultaRFC(context) Else + context.Response.StatusCode = Auth.StatusCode retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) End If @@ -142,6 +304,7 @@ Public Class E141 : Implements IHttpHandler If Auth.IsSucces Then retorno = ValidarCarrito(context) Else + context.Response.StatusCode = Auth.StatusCode retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) End If @@ -152,6 +315,7 @@ Public Class E141 : Implements IHttpHandler If Auth.IsSucces Then retorno = RegistrarPedido(context) Else + context.Response.StatusCode = Auth.StatusCode retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) End If @@ -162,6 +326,7 @@ Public Class E141 : Implements IHttpHandler If Auth.IsSucces Then retorno = RegistrarCotizacion(context) Else + context.Response.StatusCode = Auth.StatusCode retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) End If @@ -172,6 +337,7 @@ Public Class E141 : Implements IHttpHandler If Auth.IsSucces Then retorno = GetSucursales(context) Else + context.Response.StatusCode = Auth.StatusCode retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) End If context.Response.StatusCode = Auth.StatusCode @@ -235,7 +401,7 @@ Public Class E141 : Implements IHttpHandler Else respuesta.ErrorMessage = New FidelityAppsResponseError() With {.message = "el usuario y/o contraseña son requeridos"} respuesta.IsSucces = False - respuesta.StatusCode = 401 + respuesta.StatusCode = 200 Return respuesta End If @@ -243,7 +409,7 @@ Public Class E141 : Implements IHttpHandler If unauthorized Then respuesta.ErrorMessage = New FidelityAppsResponseError() With {.message = "el usuario y/o contraseña no son validos"} respuesta.IsSucces = False - respuesta.StatusCode = 401 + respuesta.StatusCode = 200 Return respuesta Else @@ -333,8 +499,10 @@ Public Class E141 : Implements IHttpHandler End If If TieneError Then + context.Response.StatusCode = 200 Return JsonConvert.SerializeObject(RespuestaError) Else + context.Response.StatusCode = 200 Return JsonConvert.SerializeObject(Respuesta) End If End Function @@ -343,37 +511,925 @@ Public Class E141 : Implements IHttpHandler Dim Respuesta As New FidelityAppsResponse Dim RespuestaError As New FidelityAppsResponseError Dim TieneError As Boolean = False + Dim JsonRequest As JObject = Nothing + If context.Request.InputStream IsNot Nothing Then + Using reader As New StreamReader(context.Request.InputStream) + Dim json = reader.ReadToEnd + + If Not String.IsNullOrEmpty(json) Then + JsonRequest = JObject.Parse(json) + If JsonRequest Is Nothing Then + TieneError = True + End If + End If + + End Using + End If + + Dim data As New JArray + Dim DtSucursalesExistencias As DataTable = Nothing + + Using ObjInv As New ClsInventarios + If ObjInv.GetExistenciasSucursales(JsonRequest("products").ToString(), CveEmpresa) Then + DtSucursalesExistencias = ObjInv.DtResultados.Copy() + End If + End Using + + If DtSucursalesExistencias IsNot Nothing Then + Try + For Each Row As DataRow In DtSucursalesExistencias.Rows + Dim objSucursal As New JObject( + New JProperty("code", Row("CveSubProyecto")), + New JProperty("name", Row("SubProyecto")), + New JProperty("street", Row("Calle")), + New JProperty("no_ext", Row("NoExt")), + New JProperty("no_int", Row("NoInt")), + New JProperty("zip", Row("CP")), + New JProperty("neighborhood", Row("Colonia")), + New JProperty("city", Row("Municipio")), + New JProperty("phone", Row("Telefono")), + New JProperty("email", Row("Correo")), + New JProperty("geo_lat", ""), + New JProperty("geo_lng", ""), + New JProperty("image", "") + ) + data.Add(objSucursal) + Next + Catch ex As Exception + TieneError = True + RespuestaError.message = "Ocurrió un error al obtener la sucursales" + End Try + DtSucursalesExistencias.Dispose() + Else + TieneError = True + End If + + If data.Count > 0 Then + Respuesta.data = data + End If If TieneError Then + context.Response.StatusCode = 200 Return JsonConvert.SerializeObject(RespuestaError) Else + context.Response.StatusCode = 200 Return JsonConvert.SerializeObject(Respuesta) End If End Function +#Region "R E G I S T R O - V E N T A " Private Function RegistrarPedido(ByVal context As HttpContext) As String Dim Respuesta As New FidelityAppsResponse Dim RespuestaError As New FidelityAppsResponseError Dim TieneError As Boolean = False + Dim JsonRequest As JObject = Nothing + If context.Request.InputStream IsNot Nothing Then + Using reader As New StreamReader(context.Request.InputStream) + Dim json = reader.ReadToEnd + + If Not String.IsNullOrEmpty(json) Then + JsonRequest = JObject.Parse(json) + If JsonRequest Is Nothing Then + TieneError = True + End If + End If + + End Using + End If + + If Not TieneError Then + Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa) + If Usuario IsNot Nothing Then + Dim Resp As New Modelos.Factura.MMensajeFactura + Dim ObjFactura As Modelos.Factura = Nothing + Dim DebeTimbrar As Boolean = False + + Dim ObjClientes As New ClsClientes() + ObjClientes.IniciaTransacSQL() + + Try + If Not String.IsNullOrEmpty(JsonRequest("timbrar").ToString) Then + DebeTimbrar = CBool(JsonRequest("timbrar")) + End If + + ObjFactura = CreaFactura(ObjClientes, "Ing", Resp, JsonRequest, Usuario) + + If ObjFactura IsNot Nothing Then + Resp = ObjFactura.EmitirFactura(False, Transac:=ObjClientes.IniciaTransacSQL()) + + If Resp.CveVenta > 0 Then + Respuesta.status = "success" + Respuesta.data = Resp.CveVenta.ToString() + Else + TieneError = True + End If + + If TieneError Then + Dim sb As New StringBuilder() + For Each msg As String In Resp.Mensajes + sb.AppendFormat("{0}. ", msg) + Next + RespuestaError.message = sb.ToString() + End If + Else + TieneError = True + Dim sb As New StringBuilder() + For Each msg As String In Resp.Mensajes + sb.AppendFormat("{0}. ", msg) + Next + RespuestaError.message = sb.ToString() + End If + + Catch ex As Exception + TieneError = True + End Try + + If TieneError Then + ObjClientes.RollBack() + ObjClientes.Dispose() + Else + ObjClientes.Commit() + ObjClientes.Dispose() + + If DebeTimbrar Then + Dim SeTimbro As Boolean = ObjFactura.TimbrarFactura() + If SeTimbro Then + Respuesta.message = "La factura se creó correctamente" + Else + Respuesta.message = "La factura se creó pero no se pudo emitir. favor de comunicarse con soporte tecnico." + End If + Else + Respuesta.message = "La factura se creó correctamente." + End If + End If + + Else + TieneError = True + RespuestaError.message = "No hay un usuario disponible" + End If + + End If If TieneError Then + context.Response.StatusCode = 200 Return JsonConvert.SerializeObject(RespuestaError) Else + context.Response.StatusCode = 200 Return JsonConvert.SerializeObject(Respuesta) End If End Function + +#Region "D E F I N I R - O B J E T O S" + Private Function CrearCliente(ObjClientes As ClsClientes, ByRef Resp As Modelos.Factura.MMensajeFactura, JsonRequest As JObject, UsuarioActual As Usuario) As Integer + Dim CveCliente As Integer = -1 + + Dim CveSubProyecto As Integer = JsonRequest("branch_office_id").ToEntero() + Dim Nombre As String = If(JsonRequest("contact_name") Is Nothing, "", JsonRequest("contact_name").ToString()) + Dim Direccion As String = If(JsonRequest("contact_address") Is Nothing, "", JsonRequest("contact_address").ToString()) + Dim NumExt As String = If(JsonRequest("contact_ext_number") Is Nothing, "", JsonRequest("contact_ext_number").ToString()) + Dim NumInt As String = If(JsonRequest("contact_int_number") Is Nothing, "", JsonRequest("contact_int_number").ToString()) + Dim Colonia As String = If(JsonRequest("contact_neighborhood") Is Nothing, "", JsonRequest("contact_neighborhood").ToString()) + Dim Localidad As String = If(JsonRequest("contact_city") Is Nothing, "", JsonRequest("contact_city").ToString()) + Dim Ciudad As String = Localidad + Dim RFC As String = If(JsonRequest("invoice_rfc") Is Nothing, "XAXX010101000", JsonRequest("invoice_rfc").ToString()) + Dim CP As String = If(JsonRequest("contact_zip_code") Is Nothing, "", JsonRequest("contact_zip_code").ToString()) + Dim Telefono As String = If(JsonRequest("contact_phone") Is Nothing, "", JsonRequest("contact_phone").ToString()) + Dim Correo As String = If(JsonRequest("contact_email") Is Nothing, "", JsonRequest("contact_email").ToString()) + + Dim CveEstado As Integer = -1 + + If Not String.IsNullOrEmpty(JsonRequest("contact_state").ToString()) Then + CveEstado = GlobalDTEstado("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{JsonRequest("contact_state").ToString().Trim}'").ToEntero() + + 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA + If CveEstado <= 0 Then + CveEstado = 26 + End If + Else + CveEstado = 26 + End If + + 'SI NO EXISTE EL RFC UTILIZA EL GENERICO + If String.IsNullOrEmpty(RFC) Then + RFC = "XAXX010101000" + End If + + 'VALIDAR QUE NO EXISTA EL RFC + If RFC <> "XAXX010101000" Then + If ObjClientes.GetClientes(-1, "-1", "-1", "-1", RFC, "-1", "-1", -1, UsuarioActual.CveEmpresa, 1, TipoCliente:=-1, TopSelect:=1) Then + If ObjClientes.DtResultados.Rows.Count > 0 Then + Resp.TieneError = False + Resp.Mensajes.Add("El RFC ya existe en el sistema") + Return -1 + End If + End If + End If + + If ObjClientes.AgregarClienteNoFrecuente(Nombre, Direccion, NumExt, NumInt, Colonia, Localidad, Ciudad, CveEstado, RFC, CP, Telefono, Correo, CveSubProyecto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1) Then + If ObjClientes.DtResultados.Rows.Count > 0 Then + CveCliente = ObjClientes.DtResultados(0)("CveCliente").ToString().ToEntero() + End If + End If + + If CveCliente <= 0 Then + Resp.TieneError = False + Resp.Mensajes.Add("Ocurrió un error al crear el cliente") + Return -1 + End If + + Return CveCliente + + End Function + + Private Function CreaFactura(ObjClientes As ClsClientes, TipoDocto As String, Resp As Modelos.Factura.MMensajeFactura, JsonRequest As JObject, UsuarioActual As Usuario) As Modelos.Factura + Try + Resp.TieneError = False + Dim Serie As String = "-1" + Dim CveMoneda As Integer = 1 + Dim CveSubProyecto As Integer = JsonRequest("branch_office_id").ToEntero() + Dim CveCliente As Integer = If(JsonRequest("user_id") Is Nothing, 0, JsonRequest("user_id").ToEntero()) + + If CveCliente <= 0 Then + CveCliente = CrearCliente(ObjClientes, Resp, JsonRequest, UsuarioActual) + End If + + If CveCliente <= 0 Then + Return Nothing + End If + + Dim ObjFactura = New Modelos.Factura(UsuarioActual) + ObjFactura.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.TextoLimpio + ObjFactura.Serie = Serie + ObjFactura.Folio = -1 + ObjFactura.Version = "3.3" + ObjFactura.FolioFiscal = "" + ObjFactura.CveUsuario = UsuarioActual.CveUsuario + ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa + ObjFactura.TipoCambio = 1 + ObjFactura.ConvertirPesos = False + ObjFactura.CveMoneda = CveMoneda + ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda)) + ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda)) + ObjFactura.TipoDocto = TipoDocto + ObjFactura.RefDocto = "" + ObjFactura.CveMesa = -1 + ObjFactura.Fecha = Now + ObjFactura.CvePrePoliza = -1 + ObjFactura.FechaPago = Now + ObjFactura.MotivoDescuento = "" + ObjFactura.FechaEjecucion = Now + ObjFactura.UsuarioCreo = UsuarioActual.Usuario + ObjFactura.CveCondicionEntrega = -1 + ObjFactura.CondicionEntrega = "" + ObjFactura.NumeroCuenta = "" + ObjFactura.CondicionesPago = 0 + ObjFactura.FormaPago = 0 + ObjFactura.PedidoContrato = "" + ObjFactura.NumeroContrato = "" + ObjFactura.DescripcionContrato = "" + ObjFactura.CveCorte = -1 + ObjFactura.TipoDocumento = ObjFactura.TipodeComprobante + ObjFactura.Alfa1 = "" + ObjFactura.Alfa2 = "" + ObjFactura.Alfa3 = "" + ObjFactura.CveContrato = -1 + ObjFactura.ConvertirPesos = False + ObjFactura.CveSubProyecto = CveSubProyecto + ObjFactura.CveSubProyectoCobranza = CveSubProyecto + ObjFactura.CveSubProyectoEjecucion = CveSubProyecto + ObjFactura.SubProyecto = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveEmpresa:=CveEmpresa).FiltroPrimero(String.Format("CveSubProyecto = {0}", CveSubProyecto))) + ObjFactura.SubProyectoMatriz = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1")) + + 'CLIENTE + ObjFactura.CveCliente = CveCliente + ObjFactura.CveClienteSucursal = -1 + + ObjFactura.SetCliente() + + If ObjFactura.TipoDocto = "Cot" Then + If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then + If ObjClientes.DtResultados.Rows.Count > 0 Then + ObjFactura.CveFormaPago33 = ObjClientes.CveFormaPago33 + ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago33)) + ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago33)) + + ObjFactura.CveMetodoPago33 = ObjClientes.CveMetodoPago33 + ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago33)) + ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago33)) + + ObjFactura.CveUsoCFDI = ObjClientes.CveUsoCFDI + ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjClientes.CveUsoCFDI)) + ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjClientes.CveUsoCFDI)) + + End If + End If + + ElseIf ObjFactura.TipoDocto = "Ing" Then + + If ObjFactura.Cliente IsNot Nothing AndAlso Not String.IsNullOrEmpty(JsonRequest("invoice_name").ToString()) Then + ObjFactura.Cliente.Nombre = JsonRequest("invoice_name").ToString() + ObjFactura.Cliente.NombreComercial = JsonRequest("invoice_name").ToString() + ObjFactura.Cliente.Direccion = JsonRequest("invoice_address").ToString() + ObjFactura.Cliente.Colonia = "" + ObjFactura.Cliente.NoInt = "" + ObjFactura.Cliente.NoExt = "" + ObjFactura.Cliente.Localidad = JsonRequest("invoice_city").ToString() + ObjFactura.Cliente.Estado = JsonRequest("invoice_state").ToString() + ObjFactura.Cliente.Mail = JsonRequest("invoice_email").ToString() + ObjFactura.Cliente.Telefono = JsonRequest("invoice_phone").ToString() + End If + + 'FORMA DE PAGO + If Not String.IsNullOrEmpty(JsonRequest("invoice_way_to_pay").ToString()) Then + Dim RowFormaPago As DataRow = GlobalDTVtaFormaPago.FiltroPrimero(String.Format("ClaveFormaPagoSAT = '{0}'", JsonRequest("invoice_way_to_pay").ToString())) + + ObjFactura.CveFormaPago33 = RowFormaPago("CveFormaPago").ToString().ToEntero() + ObjFactura.FormaPago33 = RowFormaPago("FormaPago").ToString() + ObjFactura.FormaPagoSAT33 = RowFormaPago("ClaveFormaPagoSAT").ToString() + End If + + 'USO CFDi + If Not String.IsNullOrEmpty(JsonRequest("invoice_use").ToString()) Then + Dim RowUsoCFDi As DataRow = GlobalDTSATUsosCFDI.FiltroPrimero(String.Format("UsoCFDI = '{0}'", JsonRequest("invoice_use").ToString())) + + ObjFactura.CveUsoCFDI = RowUsoCFDi("CveUsoCFDI").ToString().ToEntero() + ObjFactura.UsoCFDI = RowUsoCFDi("Descripcion").ToString() + ObjFactura.ClaveUsoCFDI = RowUsoCFDi("UsoCFDI").ToString() + End If + + 'METODO DE PAGO + If Not String.IsNullOrEmpty(JsonRequest("invoice_payment_method").ToString()) Then + Dim RowMetodoPago As DataRow = GlobalDTVtaMetodoPago.FiltroPrimero(String.Format("ClaveMetodoPagoSAT = '{0}'", JsonRequest("invoice_payment_method").ToString())) + + ObjFactura.CveMetodoPago33 = RowMetodoPago("CveMetodoPago").ToString().ToEntero() + ObjFactura.MetodoPago33 = RowMetodoPago("MetodoPago").ToString() + ObjFactura.ClaveMetodoPagoSAT = RowMetodoPago("ClaveMetodoPagoSAT").ToString() + End If + + End If + + 'DETALLES + ObjFactura.DtDetalle = CreaDTDetalle(Resp, UsuarioActual, JsonRequest) + + If Resp.TieneError Then + Resp.Mensajes.Add("No se pudieron agregar los productos/servicios") + Return Nothing + Else + If ObjFactura.DtDetalle Is Nothing OrElse ObjFactura.DtDetalle.Rows.Count = 0 Then + Resp.Mensajes.Add("No se pudieron agregar los productos/servicios") + Return Nothing + End If + End If + + + 'INVENTARIO + If TipoDocto = "Ing" Then + ObjFactura.DtInventario = ObjFactura.DtDetalle.Copy.FiltraParametros("CveTipoPS = 2") + ObjFactura.CveAlmacen = GlobalDTAlmacen(CveEmpresa, CveTipoAlmacen:=1).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero() + ObjFactura.GenerarSalidaAlmacen = True + ObjFactura.GenerarPDFFactura = False + End If + + 'IMPORTES + Dim TotalImporte As Decimal = ObjFactura.DtDetalle.SUMD("TotalImporte") + Dim ImporteIVA As Decimal = ObjFactura.DtDetalle.SUMD("ImporteIVA") + Dim ImporteRetIVA As Decimal = ObjFactura.DtDetalle.SUMD("ImporteRetIVA") + Dim ImporteRetISR As Decimal = ObjFactura.DtDetalle.SUMD("ImporteRetISR") + Dim ImporteIEPS As Decimal = ObjFactura.DtDetalle.SUMD("ImporteIEPS") + Dim Descuento As Decimal = ObjFactura.DtDetalle.SUMD("Descuento") + Dim Amortizacion As Decimal = 0 + + Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion) + + ObjFactura.SubTotal = TotalImporte + ObjFactura.Descuento = Descuento + ObjFactura.Amortizacion = Amortizacion + ObjFactura.IVA = ImporteIVA + ObjFactura.RetIVA = ImporteRetIVA + ObjFactura.RetISR = ImporteRetISR + ObjFactura.IEPS = ImporteIEPS + ObjFactura.Total = Total + ObjFactura.TotalOtrosConceptos = 0 + + 'SI HAY DIFERENCIA DE UN CENTAVO AJUSTA + If Math.Abs(JsonRequest("total").ToString().ToDecimal() - ObjFactura.Total) <= 0.01 Then + Dim diff As Decimal = (JsonRequest("total").ToString().ToDecimal() - ObjFactura.Total) + If diff <> 0 Then + 'AJUSTA EN EL ULTIMO CONCEPTO + Dim IVADetalle As Decimal = ObjFactura.DtDetalle.Rows(ObjFactura.DtDetalle.Rows.Count - 1)("ImporteIVA").ToString().ToDecimal() + + ObjFactura.DtDetalle.Rows(ObjFactura.DtDetalle.Rows.Count - 1)("ImporteIVA") = IVADetalle + diff + ObjFactura.IVA = ObjFactura.IVA + diff + ObjFactura.Total = ObjFactura.Total + diff + End If + + End If + + If ObjFactura.Total <> JsonRequest("total").ToString().ToDecimal() Then + Resp.Mensajes.Add("El total de la factura no coincide con el total enviado") + Return Nothing + End If + + If ObjFactura.Descuento <> JsonRequest("discount").ToString().ToDecimal() Then + Resp.Mensajes.Add("Los descuentos no coinciden") + Return Nothing + End If + + If (JsonRequest("subtotal").ToString().ToDecimal() - JsonRequest("discount").ToString().ToDecimal()) <> JsonRequest("total").ToString().ToDecimal() Then + Resp.Mensajes.Add("el subtotal y el descuento no coinciden con el total") + Return Nothing + End If + + If TipoDocto = "Ing" Then + ObjFactura.Observaciones = "PEDIDO PROVENIENTE DE ECOMMERCE" + ElseIf TipoDocto = "Cot" Then + ObjFactura.Observaciones = "COTIZACION PROVENIENTE DE ECOMMERCE" + End If + + ObjFactura.OrdenCompra = "" + ObjFactura.PedidoContrato = "" + ObjFactura.ObservacionesAlmacen = "" + ObjFactura.EnviarCorreo = False + + ObjFactura.Timbre = PreParaTimbre(ObjFactura) + ObjFactura.FemsaFactura = New Modelos.FemsaFactura() With { + .AplicaFEMSA = False, + .FEMSA_Version = 1 + } + Return ObjFactura + Catch ex As Exception + Resp.Mensajes.Add(ex.ToString()) + Return Nothing + End Try + + End Function + + 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 + + Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP + 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 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 Obj.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA 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 ESTAMOS AGREGANDO EL IVA + 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}) + + 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 = drr("PorcentajeRetIVA").ToString.ToDecimal, .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 = drr("PorcentajeRetISR").ToString.ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal}) + End If + + Timbre.Conceptos.Add(concepto) + i += 1 + Next + Return Timbre + End Function + Private Function CreaDTDetalle(ByRef Retorno As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, JsonRequest As JObject) As DataTable + Dim TmpDT = New DataTable + TmpDT.Columns.Add("CveVenta", GetType(Integer)) + TmpDT.Columns.Add("Consec", GetType(Integer)) + TmpDT.Columns.Add("Cantidad", GetType(Decimal)) + TmpDT.Columns.Add("Codigo", GetType(String)) + TmpDT.Columns.Add("CveUM", GetType(Integer)) + TmpDT.Columns.Add("UM", GetType(String)) + TmpDT.Columns.Add("SATClaveUM", GetType(String)) + TmpDT.Columns.Add("CveClasificacion", GetType(Integer)) + TmpDT.Columns.Add("Clasificacion", GetType(String)) + TmpDT.Columns.Add("CvePS", GetType(Integer)) + TmpDT.Columns.Add("PS", GetType(String)) + TmpDT.Columns.Add("CodigoPS", GetType(String)) + TmpDT.Columns.Add("SATClaveProdServ", GetType(String)) + TmpDT.Columns.Add("NoIdentificacion", GetType(String)) + TmpDT.Columns.Add("CveTipoPS", GetType(Integer)) + TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer)) + TmpDT.Columns.Add("Serie", GetType(String)) + TmpDT.Columns.Add("CuentaPredial", GetType(String)) + TmpDT.Columns.Add("Obs", GetType(String)) + TmpDT.Columns.Add("TiempoEntrega", GetType(String)) + TmpDT.Columns.Add("PU", GetType(Decimal)) + TmpDT.Columns.Add("IVA", GetType(Decimal)) + TmpDT.Columns.Add("ImporteIVA", GetType(Decimal)) + TmpDT.Columns.Add("PorcentajeIVA", GetType(Decimal)) + TmpDT.Columns.Add("ImporteRetIVA", GetType(Decimal)) + TmpDT.Columns.Add("ImporteRetISR", GetType(Decimal)) + TmpDT.Columns.Add("PorcentajeRetIVA", GetType(Decimal)) + TmpDT.Columns.Add("PorcentajeRetISR", GetType(Decimal)) + TmpDT.Columns.Add("ImporteIEPS", GetType(Decimal)) + TmpDT.Columns.Add("IEPS", GetType(Decimal)) + TmpDT.Columns.Add("PorcentajeIEPS", GetType(Decimal)) + TmpDT.Columns.Add("Descuento", GetType(Decimal)) + TmpDT.Columns.Add("TipoDescuento", GetType(Integer)) + TmpDT.Columns.Add("TotalImporte", GetType(Decimal)) + TmpDT.Columns.Add("Total", GetType(Decimal)) + 'Para uso del módulo contable + TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) + TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer)) + TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean)) + TmpDT.Columns.Add("CveProyecto", GetType(Integer)) + TmpDT.Columns.Add("Proyecto", GetType(String)) + TmpDT.Columns.Add("CveSubProyecto", GetType(Integer)) + TmpDT.Columns.Add("SubProyecto", GetType(String)) + 'TipoDescuento: 1 = Descuento * PU; 2 = Descuento por Total del concepto + TmpDT.Columns.Add("CvePresupuestoIngreso", GetType(Integer)) + TmpDT.Columns.Add("CveFuenteRecaudacion", GetType(Integer)) + 'Contratos + TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) + 'Remisiones a Facturas + TmpDT.Columns.Add("CveVentaDetalle", GetType(Integer)) + TmpDT.Columns.Add("CveVentaDetalleRemision", GetType(Integer)) + TmpDT.Columns.Add("CveVentaDetalleCotizacion", GetType(Integer)) + + 'Pedido2 a Facturas + TmpDT.Columns.Add("CveVentaDetallePedido2", GetType(Integer)) + + TmpDT.Columns.Add("Origen", GetType(Integer)) + 'Ordenes Servicio + TmpDT.Columns.Add("CveOS", GetType(Integer)) + TmpDT.Columns.Add("CveOSDetalle", GetType(Integer)) + TmpDT.Columns.Add("SeFacturara", GetType(Integer)) + TmpDT.Columns.Add("Folio", GetType(Integer)) + TmpDT.Columns.Add("Estatus", GetType(String)) + 'Ordenamiento + TmpDT.Columns.Add("Orden", GetType(Integer)) + TmpDT.Columns.Add("TipoDocto", GetType(String)) + 'OC + TmpDT.Columns.Add("CveOrdenCompraDetalle", GetType(Integer)) + TmpDT.Columns.Add("EntregaDirecta", GetType(Integer)) + + TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer)) + TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal)) + TmpDT.Columns.Add("CantidadFacturadaCot", GetType(Decimal)) + TmpDT.Columns.Add("CantidadInventario", GetType(Decimal)) + + TmpDT.Columns.Add("ClaveSATFraccionArancelaria", GetType(String)) + TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String)) + TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String)) + TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String)) + + TmpDT.Columns.Add("CveTamaño", GetType(Integer)) + Try + Dim ListaPS = JArray.Parse(JsonRequest("details").ToString()) + Dim DescuentoTotal As Decimal = JsonRequest("discount").ToString().ToDecimal() + Dim DescuentoPorPartida As Decimal = (DescuentoTotal / ListaPS.Count) + + Dim Consec As Integer = 1 + For Each Dr As JObject In ListaPS + Dim Cantidad As Decimal = Dr("quantity").ToString.ToDecimal() + + Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=Dr("product_sku").ToString()).FiltroPrimero("") + + If DrPS Is Nothing Then + Retorno.TieneError = True + Retorno.Mensajes.Add(String.Format("No se pudo agregar el producto/servicio: {0}, no se encontró en el sistema", Dr("product_sku").ToString())) + Exit For + End If + + 'VALIDAR QUE SEA EL MISMO PRODUCTO + If DrPS("Codigo").ToString() <> Dr("product_sku").ToString() Then + Retorno.TieneError = True + Retorno.Mensajes.Add(String.Format("No se pudo agregar el producto/servicio: {0}", Dr("PS").ToString())) + Exit For + End If + + Dim TotalOriginal As Decimal = Dr("total_cost").ToString.ToDecimal() + + Dim PUOrginal As Decimal = Dr("cost").ToString.ToDecimal() + + Dim PorcentajeIVADefault As Decimal = 0.16D + + Dim SubTotal2 As Decimal = (TotalOriginal / (1 + PorcentajeIVADefault)) + + Dim IVA As Decimal = Math.Abs(SubTotal2 - TotalOriginal) + + Dim SubTotal As Decimal = (SubTotal2 + DescuentoPorPartida) + + Dim PUCalculado As Decimal = (SubTotal / Cantidad) + + Dim Row As DataRow = AgregarProductoServicio(Retorno, UsuarioActual, TmpDT, Consec, Cantidad, DrPS("CveUnidadMedida").ToString.ToEntero, DrPS("UnidadMedida").ToString, DrPS("CveClasificacion").ToString.ToEntero, DrPS("Clasificacion").ToString, + DrPS("CvePS").ToString.ToEntero, DrPS("PS").ToString, "", PUCalculado, DescuentoPorPartida, + CveSubProyecto:=JsonRequest("branch_office_id").ToEntero(), CveVentaDetalle:=-1, CveContratoDetalle:=-1, CveVentaDetalleRemision:=-1, RegeneraIEPS:=True) + If Row IsNot Nothing Then + TmpDT.Rows.Add(Row) + Else + Retorno.TieneError = True + Retorno.Mensajes.Add(String.Format("No se pudo agregar el producto/servicio: {0}", Dr("PS").ToString())) + Exit For + End If + + Consec += 1 + Next + + Catch ex As Exception + Retorno.TieneError = True + Retorno.Mensajes.Add(ex.ToString()) + End Try + + If Retorno.TieneError = True Then + TmpDT.Clear() + TmpDT = Nothing + End If + + Return TmpDT + End Function + + Private Function AgregarProductoServicio(ByRef Retorno As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, TmpDT As DataTable, Consec As Integer, Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String, + PU As Decimal, Descuento As Decimal, CveSubProyecto As Integer, + Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0, + Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0, + Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, + Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, + Optional ClienteRetIVA As Double = 0, Optional ClienteRetISR As Double = 0, Optional ClienteDesglosaIEPS As Boolean = True) As DataRow + + + Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") + + If DrPS Is Nothing Then + Retorno.Mensajes.Add("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.") + Return Nothing + End If + + 'verifica si tiene ventaminima + If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString.ToDouble() > 0 Then + 'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15... + If Cantidad < DrPS("VentaMinima").ToString.ToDouble() Then + Retorno.Mensajes.Add("La cantidad es menor que la venta minima") + Return Nothing + End If + End If + + If (DrPS("SATClaveUnidadMedida").ToString = "" Or DrPS("SATClavePS").ToString = "") Then + 'VALIDA CLAVESAT + If DrPS("SATClavePS").ToString = "" Then + Retorno.Mensajes.Add(String.Format("{0}-{1}: Sin producto SAT
", DrPS("Codigo").ToString, DrPS("PS").ToString)) + Return Nothing + ElseIf DrPS("SATClaveUnidadMedida").ToString = "" Then + Retorno.Mensajes.Add(String.Format("{0}-{1}: Sin Unidad Medida SAT
", DrPS("Codigo").ToString, DrPS("PS").ToString)) + Return Nothing + End If + End If + + If Not ClienteDesglosaIEPS Then + If Not RegeneraIEPS Then + PU = PU * (1 + DrPS("IEPSPorcentaje").ToString.ToDecimal) + End If + DrPS("IEPSPorcentaje") = 0 + End If + + Dim Row As DataRow = Nothing + Dim TotalCalculableImpuestos As Decimal = 0 + PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos + Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0) + + Row = TmpDT.NewRow() + Row("CveProyecto") = DrSubProyecto("CveProyecto").ToString().ToEntero() + Row("Proyecto") = DrSubProyecto("Proyecto").ToString() + Row("CveSubProyecto") = CveSubProyecto + Row("SubProyecto") = DrSubProyecto("SubProyecto").ToString() + Row("Serie") = Serie + Row("TiempoEntrega") = TiempoEntrega + Row("Orden") = TmpDT.Rows.Count + 1 + Row("Cantidad") = Cantidad + Row("CveUM") = CveUM + Row("UM") = UM + Row("CveClasificacion") = CveClasificacion + Row("Clasificacion") = Clasificacion + Row("CvePS") = CvePS + Row("Obs") = Obs + + TotalCalculableImpuestos = (Cantidad * PU) - Descuento + + Row("PU") = PU + Row("Codigo") = DrPS("Codigo") + Row("NoIdentificacion") = DrPS("Codigo") + Row("ClaveSATFraccionArancelaria") = DrPS("ClaveSATFraccionArancelaria") + Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana") + Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion") + Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion") + Row("Consec") = Consec + + Row("PS") = DrPS("PS") + Row("CodigoPS") = DrPS("PSCodigo").ToString + Row("CveTipoPS") = DrPS("CveTipoPS") + Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario") + Row("CveTamaño") = DrPS("CveTamaño") + + If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion") + If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion") + + If DrPS("IVA").ToString.Contiene("-1", "") Then + Row("PorcentajeIVA") = DrSubProyecto("IVA") + Else + Row("PorcentajeIVA") = DrPS("IVA") + End If + + Row("IVA") = Row("PorcentajeIVA") + Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, 2) + Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, 2) + Row("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, 2) + Row("PorcentajeRetIVA") = ClienteRetIVA + Row("PorcentajeRetISR") = ClienteRetISR + Row("PorcentajeIEPS") = DrPS("IEPSPorcentaje") + Row("ImporteIEPS") = Math.Round(DrPS("IEPSPorcentaje").ToString.ToDecimal * TotalCalculableImpuestos, 2) + Row("IEPS") = Row("ImporteIEPS") + Row("Descuento") = Math.Round(Descuento, 2) + Row("TipoDescuento") = "2" + + Row("Total") = Cantidad * PU + Row("TotalImporte") = Math.Round(Cantidad * PU, 2) + + Row("SATClaveProdServ") = DrPS("SATClavePS") + Row("SATClaveUM") = DrPS("SATClaveUnidadMedida") + + Row("EntregaDirecta") = EntregaDirecta + 'Contratos + Row("CveContratoDetalle") = CveContratoDetalle + Row("CveVentaDetalle") = CveVentaDetalle + Row("CveMovimientoDetallePedido") = CveMovimientoDetallePedido + Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle + Row("CveVentaDetalleRemision") = CveVentaDetalleRemision + Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion + Row("CveVentaDetallePedido2") = CveVentaDetallePedido2 + Row("CuentaPredial") = CuentaPredial + + 'RECARGAR GV + Return Row + End Function +#End Region + +#End Region Private Function RegistrarCotizacion(ByVal context As HttpContext) As String Dim Respuesta As New FidelityAppsResponse Dim RespuestaError As New FidelityAppsResponseError Dim TieneError As Boolean = False + Dim JsonRequest As JObject = Nothing + If context.Request.InputStream IsNot Nothing Then + Using reader As New StreamReader(context.Request.InputStream) + Dim json = reader.ReadToEnd + + If Not String.IsNullOrEmpty(json) Then + JsonRequest = JObject.Parse(json) + If JsonRequest Is Nothing Then + TieneError = True + End If + End If + + End Using + End If + + If Not TieneError Then + Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa) + If Usuario IsNot Nothing Then + Dim Resp As New Modelos.Factura.MMensajeFactura + Dim ObjClientes As New ClsClientes() + ObjClientes.IniciaTransacSQL() + Try + Dim ObjFactura = CreaFactura(ObjClientes, "Cot", Resp, JsonRequest, Usuario) + + If ObjFactura IsNot Nothing Then + Resp = ObjFactura.EmitirFactura(False, Transac:=ObjClientes.IniciaTransacSQL()) + + If Resp.CveVenta > 0 Then + Respuesta.status = "success" + Respuesta.data = Resp.CveVenta.ToString() + Else + TieneError = True + End If + + If TieneError Then + Dim sb As New StringBuilder() + For Each msg As String In Resp.Mensajes + sb.AppendFormat("{0}. ", msg) + Next + RespuestaError.message = sb.ToString() + End If + Else + TieneError = True + Dim sb As New StringBuilder() + For Each msg As String In Resp.Mensajes + sb.AppendFormat("{0}. ", msg) + Next + RespuestaError.message = sb.ToString() + End If + + Catch ex As Exception + TieneError = True + End Try + + If TieneError Then + ObjClientes.RollBack() + Else + ObjClientes.Commit() + End If + ObjClientes.Dispose() + Else + TieneError = True + RespuestaError.message = "no hay un usuario disponible" + End If + + End If If TieneError Then + context.Response.StatusCode = 200 Return JsonConvert.SerializeObject(RespuestaError) Else + context.Response.StatusCode = 200 Return JsonConvert.SerializeObject(Respuesta) End If End Function @@ -420,8 +1476,10 @@ Public Class E141 : Implements IHttpHandler End If If TieneError Then + context.Response.StatusCode = 200 Return JsonConvert.SerializeObject(RespuestaError) Else + context.Response.StatusCode = 200 Return JsonConvert.SerializeObject(Respuesta) End If End Function @@ -450,7 +1508,7 @@ Public Class E141 : Implements IHttpHandler Else respuesta.message = "el usuario y/o contraseña son requeridos" respuesta.isSuccess = False - 'context.Response.StatusCode = 401 + context.Response.StatusCode = 200 Return JsonConvert.SerializeObject(respuesta) End If @@ -458,7 +1516,7 @@ Public Class E141 : Implements IHttpHandler If unauthorized Then respuesta.message = "el usuario y/o contraseña no son validos" respuesta.isSuccess = False - 'context.Response.StatusCode = 401 + context.Response.StatusCode = 200 Return JsonConvert.SerializeObject(respuesta) End If @@ -1032,6 +2090,7 @@ Public Class E141 : Implements IHttpHandler Private Class FidelityAppsResponse Public Property status As String Public Property data As Object + Public Property message As String End Class Private Class FidelityAppsResponseError From 54272e8c6a5fde7a8386429b3a26da04a0ff2b80 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 27 Mar 2021 18:39:16 -0700 Subject: [PATCH 03/26] Cambios RDLC E72 Factura --- Empresas/72/Formatos/Factura.rdlc | 12212 ++++++++++++++-------------- 1 file changed, 6106 insertions(+), 6106 deletions(-) diff --git a/Empresas/72/Formatos/Factura.rdlc b/Empresas/72/Formatos/Factura.rdlc index fef85c978..1bcea8d5b 100644 --- a/Empresas/72/Formatos/Factura.rdlc +++ b/Empresas/72/Formatos/Factura.rdlc @@ -1,6107 +1,6107 @@ - - - 0 - - - - System.Data.DataSet - /* Local Connection */ - - 06ae5329-8ff5-42b5-b7f4-6d68e5186420 - - - - System.Data.DataSet - /* Local Connection */ - - 3fde81d4-b9ca-4175-9160-5293ca8b9aa9 - - - - System.Data.DataSet - /* Local Connection */ - - c220a38d-e45b-4e04-917e-7dfd9cc3345f - - - - System.Data.DataSet - /* Local Connection */ - - c220a38d-e45b-4e04-917e-7dfd9cc3345f - - - - System.Data.DataSet - /* Local Connection */ - - c220a38d-e45b-4e04-917e-7dfd9cc3345f - - - - System.Data.DataSet - /* Local Connection */ - - c220a38d-e45b-4e04-917e-7dfd9cc3345f - - - - - - DsOC - /* Local Query */ - - - - CveOrdenCompraDetalle - System.Int64 - - - CveOrdenCompra - System.Int64 - - - Cantidad - System.Double - - - CveUnidadMedida - System.Int64 - - - Abreviatura - System.String - - - PS - System.String - - - CveClasificacion - System.Int64 - - - Clasificacion - System.String - - - CveActivoFijo - System.Int64 - - - Codigo - System.String - - - TipoDato - System.Int64 - - - CodigoAF - System.String - - - CodigoPS - System.String - - - UnidadMedida - System.String - - - Importe - System.Decimal - - - Total - System.Decimal - - - UM - System.String - - - Obs - System.String - - - SubProyecto - System.String - - - PU - System.String - - - Descuento - System.String - - - Marca - System.String - - - SATClaveProdServ - System.String - - - - DsOC - C:\Users\Orlando Bojorquez\Documents\Visual Studio 2013\WebSites\WebSite1\App_Code\DsOC.xsd - DtOCDetalle - - - - - - - - DataSet2 - /* Local Query */ - - - - ImpuestoLocal - System.String - - - Importe - System.Double - - - Nombre - System.String - - - ImporteT - System.String - - - Orden - System.String - - - - DataSet2 - C:\Users\jesus\Documents\Visual Studio 2015\WebSites\WebSite2\App_Code\DataSet2.xsd - DataTable1 - - - - - - - - DsFirmas - /* Local Query */ - - - - Titulo - System.String - - - Nombre - System.String - - - Puesto - System.String - - - Lado - System.String - - - - DsFirmas - C:\Users\Jesus Murua\Documents\Visual Studio 2015\WebSites\WebSite2\App_Code\DsFirmas.xsd - DataTable1 - - - - - - - - DsDesgloseImpuestos - /* Local Query */ - - - - Impuesto - System.String - - - tasa - System.String - - - Importe - System.String - - - Orden - System.String - - - - DsDesgloseImpuestos - C:\Users\Jesus Murua\Documents\Visual Studio 2015\WebSites\WebSite2\App_Code\DsFirmas.xsd - DataTable1 - - - - - - - - DsDesgloseImpuestos - /* Local Query */ - - - - SerieFolio - System.String - - - Fecha - System.String - - - Importe - System.String - - - FolioFiscal - System.String - - - - DsDocumentosRelacionados - C:\Users\Jesus Murua\Documents\Visual Studio 2015\WebSites\WebSite2\App_Code\DsFirmas.xsd - DataTable1 - - - - - - - - DsDesgloseImpuestos - /* Local Query */ - - - - SerieFolio - System.String - - - Fecha - System.String - - - SubTotal - System.String - - - Importe - System.String - - - Moneda - System.String - - - - DsNCVinculadas - C:\Users\Jesus Murua\Documents\Visual Studio 2015\WebSites\WebSite2\App_Code\DsFirmas.xsd - DataTable1 - - - - - - - - - - - - - - true - true - - - - - Por este pagaré prometo (emos) pagar incondicionalmente a la orden de - - - - COMPUPROVEEDORES, S.A. DE C.V. - - - - , el día - - - - =Parameters!Vencimiento.Value - - - - en Hermosillo, Sonora o en el domicilio que se me requiera, la cantidad de: - - - - $ - - - - =Parameters!Total.Value - - - - ( - - - - =UCase(Parameters!ImporteLetra.Value) - - - - ) - - - - la falta de pago de este documento dará derecho a - - - - COMPUPROVEEDORES, S.A. DE C.V. - - - - a cobrar 5% mensual de intereses moratorios hasta su total liquidación. - - - - - - - true - true - - - - - ACEPTO (NOMBRE Y FIRMA) - - - - - - - - - Día: - - - - =cdate(Parameters!Fecha.Value) - - - - en - - - - =Parameters!CiudadSucursal.Value - - - - - - - Textbox79 - 1.14166in - 4.99717in - 0.33472in - 3.15252in - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - 1.11389in - 5.27495in - 0in - 2.29784in - 2 - - - - - - true - true - - - - - =Parameters!ClienteNombre.Value - - - - - - - - =Parameters!ClienteRFC.Value - - - - - - - - - - - - =Parameters!ClienteCiudad.Value - - - - , - - - - =Parameters!ClienteEstado.Value - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Serie: - - - - - - - - =Parameters!Serie.Value - - - - - - - - Folio: - - - - =Parameters!Folio.Value - - - - - - - Textbox81 - 0.18054in - 6.0962in - 0.18682in - 2.05349in - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - Start - - true - 9.18657in - 0.06548in - 1.67778in - 8.23221in - - - - - - true - true - - - - - Facturado a: - - - - - - - - - Cliente - - - - : - - - - =Parameters!ClienteNombre.Value - - - - - - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - Calle: - - - - =Parameters!ClienteCalle.Value & IIF(Parameters!ClienteNoExt.Value <> "", " No.Ext: " & Parameters!ClienteNoExt.Value & iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,""),iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,"")) - - - - - - - - - Colonia: - - - - - - - - - - - - =Parameters!ClienteColonia.Value - - - - - - - - - Ciudad: - - - - - - - - =Parameters!ClienteCiudad.Value - - - - - - - - Estado: - - - - - - - - =Parameters!ClienteEstado.Value - - - - - - - - - Municipio y/o Delegación: - - - - =Parameters!ClienteMunicipio.Value - - - - - - - - - - - - - País: - - - - - - - - =Parameters!ClientePais.Value - - - - - - - - CP: - - - - =Parameters!ClienteCP.Value - - - - - - - - - Teléfono: - - - - =Parameters!ClienteTelefono.Value - - - - - - - - - Contacto: - - - - =Parameters!ClienteContacto.Value - - - - - - - Textbox2 - 1.86951in - 0.16632cm - 1.93071in - 3.6362in - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - "Este documento es una representación impresa de un CFDI" - - - - - - - - - Folio fiscal: - - - - =Parameters!FolioFiscal.Value - - - - - - - =Parameters!FechaCertificacion.Value - - - - Número de serie del Certificado de Sello Digital: - - - - =Parameters!CertificadoContribuyente.Value - - - - - - - =Parameters!SerieCertificadoSAT.Value - - - - - - - - - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!QR.Value - FitProportional - 0.0444in - 6.56646in - 1.2939in - 1.53682in - 1 - - - - - - true - 6.61787in - 0.05817in - 1.3508in - 8.23035in - 2 - - - - - - true - true - - - - - Domicilio fiscal: - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - =Parameters!Sucursal.Value - - - - - - - - - Tel. - - - - =Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Hermosillo", "(662) 214 2200", Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Tijuana", "(664) 645 1814", Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Culiacán", "(667) 715 8533", Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Aguascalientes", "(449) 913 4418", "")))) - - - - - - - - - SUCURSALES - - - - - - - - - - - - - Culiacán, Sin. - - - - - - - - - - - - Tijuana, B.C - - - - . - - - - - - - - Aguascalientes, Ags. - - - - - - - - - - - - - (667) - - - - 715 8533 - - - - - - - - - - - - (664) - - - - 645 1814 - - - - - - - - - - - - (449) - - - - 913 4418 - - - - - - - Textbox10 - 0.13457cm - 3.45239cm - 2.14312cm - 9.51761cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - www. - - - - compuproveedores - - - - .com - - - - - - - Textbox2 - 1.99194cm - 3.45239cm - 0.58527cm - 9.51761cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - - - - ="Factura" - - - - - - - - - - - - - Serie: - - - - =Parameters!Serie.Value - - - - - - - - Folio: - - - - - - - - =Parameters!Folio.Value - - - - - - - - - Fecha: - - - - - - - - =CDate(Parameters!Fecha.Value).ToString("dd/MM/yyyy") & " " & CDate(Parameters!Fecha.Value).ToString("hh:mm:ss") - - - - - - - - - - - - - =IIF(Parameters!CondicionPago.Value = "crédito",("Fecha Vencimiento: ") & (Parameters!Vencimiento.Value),"") - - - - - - - - - Forma de pago: - - - - =Parameters!FormaPago.Value - - - - - - - - - Método de pago: - - - - - - - - =Parameters!MetodoPago.Value - - - - - - - - - Cuenta: - - - - - - - - =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) - - - - - - - - - Uso CFDi: - - - - = Parameters!UsoCFDI.Value - - - - - - - - - Condiciones de pago: - - - - - - - - =IIF(Parameters!CondicionPago.Value.ToString="","No Identificado",Parameters!CondicionPago.Value) - - - - - - - Textbox4 - 0.04256in - 5.30626in - 1.7478in - 2.98226in - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - 1.69886cm - 6.87784cm - 0.38833cm - 0cm - 7 - - - - - - 1.73061cm - 9.54339cm - 0.38833cm - 0cm - 8 - - - - - - true - true - - - - - Enviar a: - - - - - - - - - Contacto: - - - - =Parameters!EnvioContacto.Value - - - - - - - - - Departamento: - - - - =Parameters!EnvioDepartamento.Value - - - - - - - - - Calle: - - - - - - - - =Parameters!EnvioDireccion.Value - - - - - - - - - Colonia: - - - - - - - - =Parameters!EnvioColonia.Value - - - - - - - - - Ciudad: - - - - =Parameters!EnvioCiudad.Value - - - - - - - - - Municipio y/o Delegación: - - - - =Parameters!EnvioCiudad.Value - - - - - - - - - Estado: - - - - - - - - =Parameters!EnvioEstado.Value - - - - - - - - - - - - - Pais: - - - - =Parameters!ClientePais.Value - - - - - - - - CP: - - - - - - - - =Parameters!EnvioCP.Value - - - - - - - - - Teléfono: - - - - - - - - =Parameters!EnvioTel.Value - - - - - - - - - Pedido/Contrato: - - - - =Parameters!PedidoContrato.Value - - - - - - - - - Orden Compra: - - - - =Parameters!OrdenCompra.Value - - - - - - - - - - - - - - - - Textbox36 - 4.7239cm - 9.5081cm - 4.92865cm - 6.9701cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Expedido en: - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - - - COM890602EE8 - - - - - - - - - - - - - - - - - - Coordinador Empresarial: - - - - - - - - - - - - - =Parameters!VendedorNombre.Value - - - - - - - - - - - - - - - - - - Régimen fiscal: - - - - - - - - - - - - - Regimen General de Ley Personas Morales - - - - - - - Textbox40 - 4.7239cm - 16.61931cm - 4.92865cm - 4.43353cm - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 0.63263in - - - 0.58129in - - - 0.90001in - - - 0.65422in - - - 3.10916in - - - 0.63048in - - - 0.68106in - - - 1.03419in - - - - - 0.19645in - - - - - true - true - - - - - CANT. - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - U.M - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CLAVE - - - - - - - Textbox29 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - C. PROD. - - - - - - - Textbox2 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - DESCRIPCIÓN - - - - - - - Textbox17 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - %DESC - - - - - - - Textbox21 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - P/U - - - - - - - Textbox23 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - IMPORTE - - - - - - - Textbox1 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.14436in - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - - UM - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SATClaveProdServ.Value - - - - - - - SATClaveProdServ - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value & " " & Fields!Obs.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Descuento.Value - - - - - - - Descuento - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - PU - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value * Fields!PU.Value - - - - - - - TiempoEntrega - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 3.86966in - 0.06548in - 0.34081in - 8.22304in - 11 - - - - - - true - true - - - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - BBVA Bancomer CTA.0446 9111 53 CLABE 0127 6000 446 9111 534 - - - - - - - =Parameters!ClienteCodigo.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - No hay cancelación de factura después de 7 días - - - - - - - Textbox33 - 15.51477cm - 12.71485cm - 0.44794cm - 8.33799cm - 15 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 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 - 11.04238cm - 15.13931cm - 0.48004cm - 5.93682cm - 18 - - - - - - true - true - - - - - =Parameters!EstatusFactura.Value - - - - - - - EstatusFactura - 2.91077cm - 5.58063cm - 0.6cm - 5.12357cm - 19 - - =iif(Parameters!EstatusFactura.Value<>"",False,True) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!EstatusEntrega.Value - - - - - - - EstatusEntrega - 3.67806cm - 5.58063cm - 0.6cm - 5.12357cm - 20 - - =iif(Parameters!EstatusEntrega.Value<>"",False,True) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - 5.12978cm - - - 5.14254cm - - - 4.76916cm - - - - - 0.6cm - - - - - true - true - - - - - Informacion Complementaria del Comprobante (INE): - - - - - - - Textbox3 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.6cm - - - - - true - true - - - - - Tipo Proceso: - - - - - - - Textbox22 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Tipo de Comité: - - - - - - - Textbox25 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Id. de Contabilidad - - - - - - - Textbox26 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.41479cm - - - - - true - true - - - - - =Parameters!INETipoProceso.Value - - - - - - - Textbox27 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!INETipoComite.Value - - - - - - - Textbox28 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!INEIdContabilidad.Value - - - - - - - Textbox34 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - DsOC - 13.27822cm - 3.16661cm - 1.61479cm - 15.04148cm - 22 - - =IIF(Parameters!INETipoProceso.Value = "" OR Parameters!INETipoProceso.Value Is Nothing,True,False) - - - - - - - true - true - - - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo1 - FitProportional - 0.06548in - 1.09458in - 1.14765in - 24 - - - - - - true - true - - - - - =UCase(Parameters!ImporteLetra.Value) - - - - - - - ImporteLetra - 4.68997in - 2.22035in - 0.18861in - 6.06817in - 25 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 0.78719in - - - 0.58129in - - - 0.71694in - - - - - 0.19645in - - - - - true - true - - - - - IMPUESTO - - - - - - - Textbox22 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - TASA - - - - - - - Textbox15 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - IMPORTE - - - - - - - Textbox29 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.14436in - - - - - true - true - - - - - =Fields!Impuesto.Value - - - - - - - Cantidad1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!tasa.Value - - - - - - - UM - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Codigo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet3 - 4.3335in - 0.06548in - 0.34081in - 2.08542in - 26 - - - - - - - - true - true - - - - - CFDI Relacionados - - - - - - - Textbox5 - 0.11382cm - 0.05336cm - 0.54004cm - 20.58578cm - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo Relación: - - - - - - - Textbox29 - 0.83025cm - 4.84153cm - 0.41981cm - 5.31841cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!TipoRelacionTexto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.42456cm - - - 2.05585cm - - - 3.03631cm - - - 7.7847cm - - - - - 0.44125cm - - - - - true - true - - - - - Folio - - - - - - - Textbox10 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox21 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio Fiscal - - - - - - - Textbox11 - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.41479cm - - - - - true - true - - - - - =Fields!SerieFolio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet4 - 1.39643cm - 3.33979cm - 0.85604cm - 15.30142cm - 3 - - - - - - true - true - - - - - VERSION 3.3 - - - - - - - Textbox5 - 2.32303cm - 17.4509cm - 0.6cm - 3.06609cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - 20.33637cm - 0.14775cm - 2.97096cm - 20.69254cm - 27 - - =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) - - - - - - - 27.72404cm - - - - - - true - true - - - - - Usuario: - - - - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - IMPRESO EN SIG, Ventas - - - - - - 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 - 0.10583cm - 18.35724cm - 0.41981cm - 2.5cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + COMPUPROVEEDORES, S.A. DE C.V. + + + + , el día + + + + =Parameters!Vencimiento.Value + + + + en Hermosillo, Sonora o en el domicilio que se me requiera, la cantidad de: + + + + $ + + + + =Parameters!Total.Value + + + + ( + + + + =UCase(Parameters!ImporteLetra.Value) + + + + ) + + + + la falta de pago de este documento dará derecho a + + + + COMPUPROVEEDORES, S.A. DE C.V. + + + + a cobrar 5% mensual de intereses moratorios hasta su total liquidación. + + + + + + + true + true + + + + + ACEPTO (NOMBRE Y FIRMA) + + + + + + + + + Día: + + + + =cdate(Parameters!Fecha.Value) + + + + en + + + + =Parameters!CiudadSucursal.Value + + + + + + + Textbox79 + 1.14166in + 4.99717in + 0.33472in + 3.15252in + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + 1.11389in + 5.27495in + 0in + 2.29784in + 2 + + + + + + true + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + =Parameters!ClienteRFC.Value + + + + + + + + + + + + =Parameters!ClienteCiudad.Value + + + + , + + + + =Parameters!ClienteEstado.Value + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Serie: + + + + + + + + =Parameters!Serie.Value + + + + + + + + Folio: + + + + =Parameters!Folio.Value + + + + + + + Textbox81 + 0.18054in + 6.0962in + 0.18682in + 2.05349in + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + Start + + true + 9.18657in + 0.06548in + 1.67778in + 8.23221in + + + + + + true + true + + + + + Facturado a: + + + + + + + + + Cliente + + + + : + + + + =Parameters!ClienteNombre.Value + + + + + + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + Calle: + + + + =Parameters!ClienteCalle.Value & IIF(Parameters!ClienteNoExt.Value <> "", " No.Ext: " & Parameters!ClienteNoExt.Value & iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,""),iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,"")) + + + + + + + + + Colonia: + + + + + + + + + + + + =Parameters!ClienteColonia.Value + + + + + + + + + Ciudad: + + + + + + + + =Parameters!ClienteCiudad.Value + + + + + + + + Estado: + + + + + + + + =Parameters!ClienteEstado.Value + + + + + + + + + Municipio y/o Delegación: + + + + =Parameters!ClienteMunicipio.Value + + + + + + + + + + + + + País: + + + + + + + + =Parameters!ClientePais.Value + + + + + + + + CP: + + + + =Parameters!ClienteCP.Value + + + + + + + + + Teléfono: + + + + =Parameters!ClienteTelefono.Value + + + + + + + + + Contacto: + + + + =Parameters!ClienteContacto.Value + + + + + + + Textbox2 + 1.86951in + 0.16632cm + 1.93071in + 3.6362in + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + "Este documento es una representación impresa de un CFDI" + + + + + + + + + Folio fiscal: + + + + =Parameters!FolioFiscal.Value + + + + + + + =Parameters!FechaCertificacion.Value + + + + Número de serie del Certificado de Sello Digital: + + + + =Parameters!CertificadoContribuyente.Value + + + + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + + + + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 0.0444in + 6.56646in + 1.2939in + 1.53682in + 1 + + + + + + true + 6.61787in + 0.05817in + 1.3508in + 8.23035in + 2 + + + + + + true + true + + + + + Domicilio fiscal: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + =Parameters!Sucursal.Value + + + + + + + + + Tel. + + + + =Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Hermosillo", "(662) 214 2200", Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Tijuana", "(664) 645 1814", Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Culiacán", "(667) 715 8533", Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Aguascalientes", "(449) 913 4418", "")))) + + + + + + + + + SUCURSALES + + + + + + + + + + + + + Culiacán, Sin. + + + + + + + + + + + + Tijuana, B.C + + + + . + + + + + + + + Aguascalientes, Ags. + + + + + + + + + + + + + (667) + + + + 715 8533 + + + + + + + + + + + + (664) + + + + 645 1814 + + + + + + + + + + + + (449) + + + + 913 4418 + + + + + + + Textbox10 + 0.13457cm + 3.45239cm + 2.14312cm + 9.51761cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + www. + + + + compuproveedores + + + + .com + + + + + + + Textbox2 + 1.99194cm + 3.45239cm + 0.58527cm + 9.51761cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + + ="Factura" + + + + + + + + + + + + + Serie: + + + + =Parameters!Serie.Value + + + + + + + + Folio: + + + + + + + + =Parameters!Folio.Value + + + + + + + + + Fecha: + + + + + + + + =CDate(Parameters!Fecha.Value).ToString("dd/MM/yyyy") & " " & CDate(Parameters!Fecha.Value).ToString("hh:mm:ss") + + + + + + + + + + + + + =IIF(Parameters!CondicionPago.Value = "crédito",("Fecha Vencimiento: ") & (Parameters!Vencimiento.Value),"") + + + + + + + + + Forma de pago: + + + + =Parameters!FormaPago.Value + + + + + + + + + Método de pago: + + + + + + + + =Parameters!MetodoPago.Value + + + + + + + + + Cuenta: + + + + + + + + =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) + + + + + + + + + Uso CFDi: + + + + = Parameters!UsoCFDI.Value + + + + + + + + + Condiciones de pago: + + + + + + + + =IIF(Parameters!CondicionPago.Value.ToString="","No Identificado",Parameters!CondicionPago.Value) + + + + + + + Textbox4 + 0.04256in + 5.30626in + 1.7478in + 2.98226in + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + 1.69886cm + 6.87784cm + 0.38833cm + 0cm + 7 + + + + + + 1.73061cm + 9.54339cm + 0.38833cm + 0cm + 8 + + + + + + true + true + + + + + Enviar a: + + + + + + + + + Contacto: + + + + =Parameters!EnvioContacto.Value + + + + + + + + + Departamento: + + + + =Parameters!EnvioDepartamento.Value + + + + + + + + + Calle: + + + + + + + + =Parameters!EnvioDireccion.Value + + + + + + + + + Colonia: + + + + + + + + =Parameters!EnvioColonia.Value + + + + + + + + + Ciudad: + + + + =Parameters!EnvioCiudad.Value + + + + + + + + + Municipio y/o Delegación: + + + + =Parameters!EnvioCiudad.Value + + + + + + + + + Estado: + + + + + + + + =Parameters!EnvioEstado.Value + + + + + + + + + + + + + Pais: + + + + =Parameters!ClientePais.Value + + + + + + + + CP: + + + + + + + + =Parameters!EnvioCP.Value + + + + + + + + + Teléfono: + + + + + + + + =Parameters!EnvioTel.Value + + + + + + + + + Pedido/Contrato: + + + + =Parameters!PedidoContrato.Value + + + + + + + + + Orden Compra: + + + + =Parameters!OrdenCompra.Value + + + + + + + + + + + + + + + + Textbox36 + 4.7239cm + 9.5081cm + 4.92865cm + 6.9701cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Expedido en: + + + + + + + + + =Parameters!DomicilioSucursal.Value + + + + + + + + + COM890602EE8 + + + + + + + + + + + + + + + + + + Coordinador Empresarial: + + + + + + + + + + + + + =Parameters!VendedorNombre.Value + + + + + + + + + + + + + + + + + + Régimen fiscal: + + + + + + + + + + + + + Regimen General de Ley Personas Morales + + + + + + + Textbox40 + 4.7239cm + 16.61931cm + 4.92865cm + 4.43353cm + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 0.63263in + + + 0.58129in + + + 0.90001in + + + 0.65422in + + + 3.10916in + + + 0.63048in + + + 0.68106in + + + 1.03419in + + + + + 0.19645in + + + + + true + true + + + + + CANT. + + + + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + U.M + + + + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CLAVE + + + + + + + Textbox29 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + C. PROD. + + + + + + + Textbox2 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESCRIPCIÓN + + + + + + + Textbox17 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + %DESC + + + + + + + Textbox21 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P/U + + + + + + + Textbox23 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IMPORTE + + + + + + + Textbox1 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.14436in + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + + UM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SATClaveProdServ.Value + + + + + + + SATClaveProdServ + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value & " " & Fields!Obs.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value * Fields!PU.Value + + + + + + + TiempoEntrega + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 3.86966in + 0.06548in + 0.34081in + 8.22304in + 11 + + + + + + true + true + + + + + + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + BBVA Bancomer CTA.0446 9111 53 CLABE 0127 6000 446 9111 534 + + + + + + + =Parameters!ClienteCodigo.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No hay cancelación de factura después de 7 días + + + + + + + Textbox33 + 15.51477cm + 12.71485cm + 0.44794cm + 8.33799cm + 15 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 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 + 11.04238cm + 15.13931cm + 0.48004cm + 5.93682cm + 18 + + + + + + true + true + + + + + =Parameters!EstatusFactura.Value + + + + + + + EstatusFactura + 2.91077cm + 5.58063cm + 0.6cm + 5.12357cm + 19 + + =iif(Parameters!EstatusFactura.Value<>"",False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!EstatusEntrega.Value + + + + + + + EstatusEntrega + 3.67806cm + 5.58063cm + 0.6cm + 5.12357cm + 20 + + =iif(Parameters!EstatusEntrega.Value<>"",False,True) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + 5.12978cm + + + 5.14254cm + + + 4.76916cm + + + + + 0.6cm + + + + + true + true + + + + + Informacion Complementaria del Comprobante (INE): + + + + + + + Textbox3 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.6cm + + + + + true + true + + + + + Tipo Proceso: + + + + + + + Textbox22 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tipo de Comité: + + + + + + + Textbox25 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Id. de Contabilidad + + + + + + + Textbox26 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Parameters!INETipoProceso.Value + + + + + + + Textbox27 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!INETipoComite.Value + + + + + + + Textbox28 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!INEIdContabilidad.Value + + + + + + + Textbox34 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + DsOC + 13.27822cm + 3.16661cm + 1.61479cm + 15.04148cm + 22 + + =IIF(Parameters!INETipoProceso.Value = "" OR Parameters!INETipoProceso.Value Is Nothing,True,False) + + + + + + + true + true + + + + + + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo1 + FitProportional + 0.06548in + 1.09458in + 1.14765in + 24 + + + + + + true + true + + + + + =UCase(Parameters!ImporteLetra.Value) + + + + + + + ImporteLetra + 4.68997in + 2.22035in + 0.18861in + 6.06817in + 25 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 0.78719in + + + 0.58129in + + + 0.71694in + + + + + 0.19645in + + + + + true + true + + + + + IMPUESTO + + + + + + + Textbox22 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TASA + + + + + + + Textbox15 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IMPORTE + + + + + + + Textbox29 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.14436in + + + + + true + true + + + + + =Fields!Impuesto.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!tasa.Value + + + + + + + UM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Codigo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet3 + 4.3335in + 0.06548in + 0.34081in + 2.08542in + 26 + + + + + + + + true + true + + + + + CFDI Relacionados + + + + + + + Textbox5 + 0.11382cm + 0.05336cm + 0.54004cm + 20.58578cm + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo Relación: + + + + + + + Textbox29 + 0.83025cm + 4.84153cm + 0.41981cm + 5.31841cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoRelacionTexto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.42456cm + + + 2.05585cm + + + 3.03631cm + + + 7.7847cm + + + + + 0.44125cm + + + + + true + true + + + + + Folio + + + + + + + Textbox10 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox21 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox11 + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet4 + 1.39643cm + 3.33979cm + 0.85604cm + 15.30142cm + 3 + + + + + + true + true + + + + + VERSION 3.3 + + + + + + + Textbox5 + 2.32303cm + 17.4509cm + 0.6cm + 3.06609cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 20.33637cm + 0.14775cm + 2.97096cm + 20.69254cm + 27 + + =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) + + + + + + + 27.72404cm + + + + + + true + true + + + + + Usuario: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + IMPRESO EN SIG, Ventas + + + + + + 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 + 0.10583cm + 18.35724cm + 0.41981cm + 2.5cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + @@ -801,7 +801,7 @@ 0.45131in @@ -691,7 +695,7 @@ 0.67394in @@ -766,7 +770,7 @@ Textbox2 1.07625cm 0.52945cm - 25.89667cm + 22.55159cm 1 - - - - - - - - - - - - - - - - - - Textbox4 0.05159in 0.29332cm 0.96167in - 8.30729in + 7.42452in @@ -125,13 +95,13 @@ 3.8335cm - 5.14583cm + 4.69604cm - 7.47417cm + 6.62753cm - 4.36267cm + 3.70121cm @@ -353,7 +323,9 @@ =Fields!Direccion.Value - - 15.1387cm + 5.95766cm @@ -634,7 +605,6 @@ @@ -643,9 +613,9 @@ Textbox31 0.17639cm - 10.14852cm + 8.03185cm 0.41981cm - 6.02198cm + 6.86865cm 1 27.94cm - 21.59cm + 20cm 0cm 0cm 0.5cm @@ -779,6 +749,7 @@ ReportParameter1 + image/png diff --git a/GPS/Rastreo.aspx.vb b/GPS/Rastreo.aspx.vb index fa6aa8c9a..198f033d1 100644 --- a/GPS/Rastreo.aspx.vb +++ b/GPS/Rastreo.aspx.vb @@ -1616,6 +1616,11 @@ Partial Class GPS_Rastreo NombreReporte = "ReporteExcesosVelocidad" Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim dtt As DataTable = GlobalDTUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.CveCliente).FiltraParametros("CveRol <> 1") + Dim nombreCliente As String = "" + For Each dr As DataRow In dtt.Rows + nombreCliente = dr.Item("Cliente").ToString + Next Dim RptParametro As New List(Of ReportParameter) Dim DtDatos As New DataTable() @@ -1629,10 +1634,9 @@ Partial Class GPS_Rastreo RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString)) RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString)) RptParametro.Add(New ReportParameter("MapaURL", "")) - RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString)) RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - RptParametro.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + RptParametro.Add(New ReportParameter("NombreEmpresa", nombreCliente)) If Imagen.Exists Then RptParametro.Add(New ReportParameter("LogoPath", logouri)) Else @@ -1682,7 +1686,6 @@ Partial Class GPS_Rastreo RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString)) RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString)) RptParametro.Add(New ReportParameter("MapaURL", "")) - RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString)) RptParametro.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) @@ -1834,13 +1837,17 @@ Partial Class GPS_Rastreo Dim RptParametro As New List(Of CrystalParametro) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - + Dim dtt As DataTable = GlobalDTUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.CveCliente).FiltraParametros("CveRol <> 1") + Dim nombreCliente As String = "" + For Each dr As DataRow In dtt.Rows + nombreCliente = dr.Item("Cliente").ToString + Next RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString)) RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString)) RptParametro.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Usuario)) RptParametro.Add(New CrystalParametro("FechaImpresion", DateTime.Now.ToString)) RptParametro.Add(New CrystalParametro("KMRecorridos", $"{DtPosiciones.SUM("KMRecorridos").ToString} KM")) - RptParametro.Add(New CrystalParametro("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + RptParametro.Add(New CrystalParametro("NombreEmpresa", nombreCliente)) If Imagen.Exists Then RptParametro.Add(New CrystalParametro("LogoPath", logouri)) Else diff --git a/Inventarios/RepTraspasoAlmacen.aspx.vb b/Inventarios/RepTraspasoAlmacen.aspx.vb index 816a289fb..96dd301bb 100644 --- a/Inventarios/RepTraspasoAlmacen.aspx.vb +++ b/Inventarios/RepTraspasoAlmacen.aspx.vb @@ -165,6 +165,8 @@ Partial Class RepTraspasoAlmacen params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) + params.Add(New ReportParameter("FechaImprimio", DateTime.Now.ToString)) + If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", logouri)) Else diff --git a/OI/RepTareas.aspx.vb b/OI/RepTareas.aspx.vb index 26151b487..bafe8cf97 100644 --- a/OI/RepTareas.aspx.vb +++ b/OI/RepTareas.aspx.vb @@ -176,7 +176,7 @@ Partial Class OI_RepTareas If DdlEventoEstatus.SelectedValue > "0" Then CveEventoEstatus = DdlEventoEstatus.SelectedValue.ToEntero Else CveEventoEstatus = -1 If ObjProspectos.GetEventosUsuarioCCP(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, DdlRevision.SelectedValue.ToEntero, FechaI, FechaF, CveEventoEstatus) Then - DTOIEventosTareasCCP = ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioIng = {0} And CveTipoEvento In (1,3)", UsuarioActual.CveUsuario)) + DTOIEventosTareasCCP = ObjProspectos.DtResultados.FiltraParametros("CveTipoEvento In (1,3)") DTOIEventosTareasCCP = DTOIEventosTareasCCP.FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa)) ltlgrafCcp.Text = DTOIEventosTareasCCP.Rows.Count.ToString() 'BURBUJITAS - BADGE From 308d4a9d8f7fcc120df7f03f8bfd950a7e8fcf51 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 30 Mar 2021 10:07:30 -0700 Subject: [PATCH 11/26] Mejoras Servicio E141 --- Ashx/E141.ashx | 49 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index 202b94548..e6995fe0d 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -442,7 +442,13 @@ Public Class E141 : Implements IHttpHandler End Using End If - If Not TieneError AndAlso Not String.IsNullOrEmpty(JsonRequest("rfc").ToString().Trim()) Then + If TieneError Then + RespuestaError.message = "Ocurrió un error al obtener el cuerpo de los parametros" + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(RespuestaError) + End If + + If Not TieneError AndAlso Not String.IsNullOrEmpty(If(JsonRequest("rfc") Is Nothing, "", JsonRequest("rfc").ToString().Trim())) Then Dim data As New JArray Dim Nombre As String = "-1" @@ -493,8 +499,11 @@ Public Class E141 : Implements IHttpHandler TieneError = True End If - If data.Count > 0 Then - Respuesta.data = data + Respuesta.data = data + Else + If String.IsNullOrEmpty(If(JsonRequest("rfc") Is Nothing, "", JsonRequest("rfc").ToString().Trim())) Then + TieneError = True + RespuestaError.message = "Debe ingresar un RFC" End If End If @@ -527,6 +536,12 @@ Public Class E141 : Implements IHttpHandler End Using End If + If TieneError Then + RespuestaError.message = "Ocurrió un error al obtener el cuerpo de los parametros" + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(RespuestaError) + End If + Dim data As New JArray Dim DtSucursalesExistencias As DataTable = Nothing @@ -556,6 +571,11 @@ Public Class E141 : Implements IHttpHandler ) data.Add(objSucursal) Next + + If DtSucursalesExistencias.Rows.Count = 0 Then + Respuesta.message = "No se encontraron resultados" + End If + Catch ex As Exception TieneError = True RespuestaError.message = "Ocurrió un error al obtener la sucursales" @@ -565,9 +585,7 @@ Public Class E141 : Implements IHttpHandler TieneError = True End If - If data.Count > 0 Then - Respuesta.data = data - End If + Respuesta.data = data If TieneError Then context.Response.StatusCode = 200 @@ -599,6 +617,12 @@ Public Class E141 : Implements IHttpHandler End Using End If + If TieneError Then + RespuestaError.message = "Ocurrió un error al obtener el cuerpo de los parametros" + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(RespuestaError) + End If + If Not TieneError Then Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa) If Usuario IsNot Nothing Then @@ -1373,6 +1397,12 @@ Public Class E141 : Implements IHttpHandler End Using End If + If TieneError Then + RespuestaError.message = "Ocurrió un error al obtener el cuerpo de los parametros" + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(RespuestaError) + End If + If Not TieneError Then Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa) If Usuario IsNot Nothing Then @@ -1471,9 +1501,7 @@ Public Class E141 : Implements IHttpHandler TieneError = True End If - If data.Count > 0 Then - Respuesta.data = data - End If + Respuesta.data = data If TieneError Then context.Response.StatusCode = 200 @@ -2088,6 +2116,9 @@ Public Class E141 : Implements IHttpHandler End Function Private Class FidelityAppsResponse + Sub New() + status = "success" + End Sub Public Property status As String Public Property data As Object Public Property message As String From 7f8a2b6b8a19c15b9b6452ad57ec680b8271c2de Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 30 Mar 2021 10:08:17 -0700 Subject: [PATCH 12/26] Exportar Historico Excel, liga gps --- GPS/Rastreo.aspx | 6 +- GPS/Rastreo.aspx.vb | 169 ++++++++++++++++++++++++++++++- Sistemas/PopUpAddUsuario.aspx.vb | 12 ++- 3 files changed, 179 insertions(+), 8 deletions(-) diff --git a/GPS/Rastreo.aspx b/GPS/Rastreo.aspx index c39b71cc2..cf22ac1a7 100644 --- a/GPS/Rastreo.aspx +++ b/GPS/Rastreo.aspx @@ -551,7 +551,7 @@ - + @@ -1796,7 +1796,7 @@ var largo; var url = '<%= ClsPaginas.UrlDirecciones%>' + 'nominatim/reverse.php?format=jsonv2&lat=' + lat + '&lon=' + lng; - if ($("#HdnOpcion").val() === 'All' || $("#HdnOpcion").val() === 'TPS') { largo = 37 } else { largo = 74 } + if ($("#HdnOpcion").val() === 'All' || $("#HdnOpcion").val() === 'TPS') { largo = 150 } else { largo = 150 } if ($()) $.getJSON(url, function (data) { if (typeof (data.error) === 'undefined') { @@ -1880,7 +1880,7 @@ if (indice > -1) { if (data.display_name.length > 74) { if (typeof (tr) !== 'undefined') { - tr.cells[2].innerHTML = data.display_name.substring(0, 74) + '...' + tr.cells[2].innerHTML = data.display_name.substring(0, 150) + '...' } } else { if (typeof (tr) !== 'undefined') { diff --git a/GPS/Rastreo.aspx.vb b/GPS/Rastreo.aspx.vb index fa6aa8c9a..c7d3c2ea3 100644 --- a/GPS/Rastreo.aspx.vb +++ b/GPS/Rastreo.aspx.vb @@ -1599,9 +1599,9 @@ Partial Class GPS_Rastreo End If ElseIf Opcion = "Last" AndAlso Format = "EXCEL" Then GenerarReporteUltimaPosicionExcel("UltimaPosicion.xlsx") - ElseIf Opcion = "All" Then + ElseIf Opcion = "All" AndAlso Format = "PDF" Then If GvBarra.Rows.Count > 0 Then - RutaReporte = "Empresas/Grales/ReportesProgramados/RPTHistorico.rdlc" + RutaReporte = "" NombreReporte = "ReporteHistorico" Try ImprimirCrystal(NombreReporte, Format) @@ -1610,6 +1610,19 @@ Partial Class GPS_Rastreo End Try Else Alert("No se pudo imprimir el pdf, ya que no se ha hecho una consulta, o ésta no arrojó resultados.", TipoMensaje.MsgInformacion) + End If + + ElseIf Opcion = "All" AndAlso Format = "EXCEL" Then + If GvBarra.Rows.Count > 0 Then + RutaReporte = "" + NombreReporte = "ReporteHistorico" + Try + ImprimirExcelGembox("Reporte Historico", NombreReporte, txtFechaI.Text, txtFechaF.Text) + Catch ex As Exception + GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex)) + End Try + Else + Alert("No se pudo imprimir el pdf, ya que no se ha hecho una consulta, o ésta no arrojó resultados.", TipoMensaje.MsgInformacion) End If ElseIf Opcion = "Speed" Then RutaReporte = "Empresas/Grales/ReportesProgramados/RPVelocidad.rdlc" @@ -1882,6 +1895,157 @@ Partial Class GPS_Rastreo ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/ReportesProgramados/RPTHistorico.rpt"), DtDatos, RptParametro, NombreReporte, Format), NombreReporte, Format) DtDatos.Clear() + End Sub + + Private Sub ImprimirExcelGembox(Titulo As String, NombreReporte As String, FechaI As String, FechaF As String) + + Dim DtDatos As New DataTable() + + DtDatos.Columns.Add("Vehiculo", GetType(String)) + DtDatos.Columns.Add("Fecha", GetType(String)) + DtDatos.Columns.Add("Direccion", GetType(String)) + DtDatos.Columns.Add("TiempoDetenido", GetType(String)) + DtDatos.Columns.Add("Conductor", GetType(String)) + DtDatos.Columns.Add("Velocidad", GetType(String)) + DtDatos.Columns.Add("Evento", GetType(String)) + DtDatos.Columns.Add("LatLng", GetType(String)) + + Try + Dim Direcciones As JArray = ConsultarDirecciones(DtPosiciones) + For Each row As DataRow In DtPosiciones.Rows + Dim DrNew = DtDatos.NewRow() + DrNew("Vehiculo") = row("Vehiculo") + DrNew("Fecha") = row("Fecha") + DrNew("TiempoDetenido") = row("TiempoDetenido") + DrNew("Evento") = row("Evento") + DrNew("Velocidad") = row("Velocidad") + DrNew("Direccion") = "Dirección no encontrada" + DrNew("LatLng") = row("Posicion").ToString.Replace("{", "").Replace("}", "") + DtDatos.Rows.Add(DrNew) + Next + For Each Dir As JObject In Direcciones + DtDatos.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString() + Next + Catch ex As Exception + GuardaLog(String.Format("Ocurrio un error al generar el reporte RLDC {0}", ex)) + End Try + + Dim DtExcel As DataTable = DtDatos.Copy() + + If DtExcel.Rows.Count < 1 Then + Alert("No hay resutados en la busqueda.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + DtExcel.TableName = "Historico" + SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) + + Dim Divisor As Integer = 1 + + Dim FileExcel As New ExcelFile() + + Dim worksheet = FileExcel.Worksheets.Add(DtExcel.TableName) + worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With + { + .ColumnHeaders = True, + .StartRow = 0, + .StartColumn = 0 + }) + + Dim TotalRowHeader As Integer = 8 + Dim TotalRowFooter As Integer = 2 + + worksheet.Rows.InsertEmpty(0, TotalRowHeader) + Dim celdasConTexto = worksheet.GetUsedCellRange(True) + celdasConTexto.Style.Font.Name = "Calibri Light" + + Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex) + RangoNombreEmpresa.Merged = True + RangoNombreEmpresa.Value = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=UsuarioActual.CveCliente).FiltroPrimeroValor("Nombre") + RangoNombreEmpresa.Style.Font.Size = 18 * 20 + RangoNombreEmpresa.Style.Font.Name = "Calibri Light" + RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center + RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + + + Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex) + RangoTitulo.Merged = True + RangoTitulo.Value = Titulo + RangoTitulo.Style.Font.Size = 20 * 20 + RangoTitulo.Style.Font.Name = "Calibri Light" + RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center + RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + + + If FechaI.Length > 0 And FechaF.Length > 0 Then + Dim RangoFechas = worksheet.Cells.GetSubrangeAbsolute(4, celdasConTexto.FirstColumnIndex, 4, celdasConTexto.LastColumnIndex) + RangoFechas.Merged = True + RangoFechas.Value = $"Fechas: {FechaI} a {FechaF}" + RangoFechas.Style.Font.Size = 15 * 20 + RangoFechas.Style.Font.Name = "Calibri Light" + RangoFechas.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center + RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + End If + + + For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex + + worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20 + worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center + worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + + worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255) + + + If i > 0 Then + Try + worksheet.Columns(i).AutoFit(1) + Catch ex As Exception + End Try + End If + + Next + + Dim IndexEndTable As Integer = DtExcel.Rows.Count + TotalRowHeader + TotalRowFooter + + worksheet.Rows(IndexEndTable).Cells(0).Value = "Usuario Imprimió" + worksheet.Rows(IndexEndTable + 1).Cells(0).Value = UsuarioActual.Nombre + + worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión" + worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy") + + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + + If Imagen.Exists Then + Dim Ruta As String = String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta) + Using sr As New StreamReader(Ruta) + Dim ms As New MemoryStream() + sr.BaseStream.CopyTo(ms) + worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", 100, 100, LengthUnit.Pixel) + End Using + End If + + + For I As Integer = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex + + If I > 0 Then + + If Divisor = 1 Then + worksheet.Columns(I + 1).Style.NumberFormat = "#,##0.00" + Else + worksheet.Columns(I + 1).Style.NumberFormat = "#,##" + End If + + Try + worksheet.Columns(I).AutoFit(1) + Catch ex As Exception + End Try + + End If + Next + + FileExcel.Save(Response, $"{NombreReporte}.xlsx", SaveOptions.XlsxDefault) End Sub Private Sub ImprimirRDLC(NombreReporte As String, Format As String, RutaReporte As String) Dim RptParametro As New List(Of ReportParameter) @@ -2233,6 +2397,7 @@ Partial Class GPS_Rastreo Using wc As New HttpClient() Try + wc.Timeout = New TimeSpan(0, 6, 0) Dim Url = New Uri(String.Format("{0}nominatim/reverseMultiple.php", ClsPaginas.UrlDirecciones)) Dim FormStuff = String.Format("formato=json&posiciones={0}", Base64array) Dim content = New StringContent(FormStuff, Encoding.UTF8, "application/x-www-form-urlencoded") diff --git a/Sistemas/PopUpAddUsuario.aspx.vb b/Sistemas/PopUpAddUsuario.aspx.vb index 7f11c7288..b48a4fd17 100644 --- a/Sistemas/PopUpAddUsuario.aspx.vb +++ b/Sistemas/PopUpAddUsuario.aspx.vb @@ -576,12 +576,18 @@ Partial Class Sistemas_PopUpAddUsuario Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados.FiltraParametros("ProveedoresResponsables > 0") End If ObjUsuarios.Dispose() - End Sub - + End Sub + #Region "MANDAR CORREOS" Private Function EnviaCorreo(Liga As String, LigaActivar As String) As String Dim Retorno As String = "" Try + Dim URL As String = UrlSitio + + If UsuarioActual.Empresa.CvePlataforma = 3 Then + URL = "https://gps.signalsgps.com/" + End If + Dim Para = TxtEmail.Text.Trim Dim Asunto = "" If CveCliente > 0 Then @@ -621,7 +627,7 @@ Partial Class Sistemas_PopUpAddUsuario SBBody.Append("
") SBBody.Append("Nota Favor de NO responder este correo. ") SBBody.Append("


") - SBBody.AppendFormat("", UrlSitio) + SBBody.AppendFormat("", URL) SBBody.Append("") SBBody.Append("") 'Termino Cuerpo del correo From 1b7c0e0e03c1c366442504081a998a8f50d0e5a4 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 30 Mar 2021 10:08:40 -0700 Subject: [PATCH 13/26] =?UTF-8?q?=E2=80=A2=20Cajas=20no=20puede=20editar?= =?UTF-8?q?=20clientes=20distribuidores=20solo=20los=20que=20provienen=20d?= =?UTF-8?q?e=20piso=20o=20bien=20no=20est=C3=A1n=20clasificados=20como=20d?= =?UTF-8?q?istribuidor.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Clientes.aspx.vb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 9919a0dcb..2097ade7e 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -788,7 +788,7 @@ Partial Class Clientes UpAccionesCRM.Update() End If - If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(309) Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso UsuarioActual.CveRol = 1280 Then DeshabilitarDatosClienteCajas() End If @@ -943,6 +943,10 @@ Partial Class Clientes TxtCorreoEntregaAlmacen.Enabled = False ChkCargoUsado.Enabled = False ChkBonificacionUsado.Enabled = False + + If Not ChkEsDistribuidor.Checked Then + BtnGuardar.Visible = PermiteEditar() + End If End Sub From 3e84c752fb05a0c06b648d55c0207f5b17e54f62 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 30 Mar 2021 10:12:17 -0700 Subject: [PATCH 14/26] =?UTF-8?q?BDH.No=20arroja=20total=20o=20cambio=20en?= =?UTF-8?q?=20pago=20diferido,=20ejemplo=20si=20el=20pago=20se=20va=20hace?= =?UTF-8?q?r=2050%=20con=20tarjeta=20y=20el=20otro=2050%=20en=20efectiv?= =?UTF-8?q?=C3=B3.Usados=20no=20se=20ordenan=20al=20momento=20de=20registr?= =?UTF-8?q?ar=20una=20venta.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/PV.aspx | 10 ++++++++-- Ventas/Ventas.aspx | 12 +++++++++--- Ventas/Ventas.aspx.vb | 17 +++++++++++++++-- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index 785aa3c2f..2786cb0f2 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -1229,7 +1229,7 @@
- +
$ @@ -3483,9 +3483,15 @@ var totalVenta = ToDouble($get('TxtTotal').value); if (total > totalVenta) { + lblCambio.innerHTML = "Cambio:" $get("TxtCambio").value = FormatoNumero(total - totalVenta); } else { - $get("TxtCambio").value = "0.00"; + if ('<%= UsuarioActual.Empresa.Funcionalidad(531) %>' == '1') { + lblCambio.innerHTML = "Faltante:" + $get("TxtCambio").value = FormatoNumero(total - totalVenta); + } else { + $get("TxtCambio").value = "$0.00" + } } $get("TxtImporteContado").value = total; diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index f7efff712..c0658934e 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -3366,7 +3366,7 @@
- +
$ @@ -7827,12 +7827,18 @@ var totalVenta = ToDouble($get('TxtTotal').value); if (total > totalVenta) { + lblCambio.innerHTML = "Cambio:" $get("TxtCambio").value = FormatoNumero(total - totalVenta); } else { - $get("TxtCambio").value = "0.00"; + if ('<%= UsuarioActual.Empresa.Funcionalidad(531) %>' == '1') { + lblCambio.innerHTML = "Faltante:" + $get("TxtCambio").value = FormatoNumero(total - totalVenta, 2); + } else { + $get("TxtCambio").value = "$0.00" + } } - $get("TxtImporteContado").value = total - totalRNC - totalAmortizado - totalProntoPago; + $get("TxtImporteContado").value = FormatoNumero(total - totalRNC - totalAmortizado - totalProntoPago,2); } // **************************************************************************************************************************************************************************** diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 91f8bf7fb..360018adf 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -16743,7 +16743,16 @@ Partial Class Ventas Row("SubProyecto") = SubProyecto Row("Serie") = Serie Row("TiempoEntrega") = TiempoEntrega - Row("Orden") = TmpDT.Rows.Count + 1 + If Modalidad = "U" Then + Row("Orden") = Index + Else + Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero() + If ConsecutivoActual < 0 Then + ConsecutivoActual = 0 + End If + Row("Orden") = ConsecutivoActual + 1 + End If + Row("Cantidad") = Cantidad Row("CveUM") = CveUM Row("UM") = UM @@ -16823,7 +16832,11 @@ Partial Class Ventas If Modalidad = "U" Then Row("Consec") = Index Else - Row("Consec") = TmpDT.Rows.Count + 1 + Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero() + If ConsecutivoActual < 0 Then + ConsecutivoActual = 0 + End If + Row("Consec") = ConsecutivoActual + 1 End If Row("PS") = DrPS("PS") From 4a092a64be7bdac631a6a37b0d66427301fd0680 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 30 Mar 2021 10:13:04 -0700 Subject: [PATCH 15/26] BDH. Autoapertura de pdf de ajuste --- Ventas/PV.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index bbe7b6029..f745add95 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -3266,10 +3266,10 @@ Partial Class PV If ObjAcum.GetGarantiasDetalle(Retorno.CveVenta) Then Dim RowGarantia As DataRow = ObjAcum.DtResultados.FiltroPrimero("") If RowGarantia IsNot Nothing Then - SbAlert.AppendFormat("
", Encripta(String.Format("OP=AJUSTE&CVEGARANTIADETALLE={0}", RowGarantia("CveGarantiaDetalle")))) + 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") + RegistraScript($"window.open('/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AJUSTE&CVEGARANTIADETALLE={0}", RowGarantia("CveGarantiaDetalle")))}', '_blank');", "Imprimir") End If End If End Using From b4744cc504a876e91d7c1a6e1043b276af42d537 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 30 Mar 2021 10:50:37 -0700 Subject: [PATCH 16/26] Quitar logo de reportes de GPS --- .../ReportesProgramados/RPTHistorico.rdlc | 4323 +++++++------ .../ReportesProgramados/RPTHistorico.rpt | Bin 76800 -> 16384 bytes .../ReportesProgramados/RPTKmRecorridos.rdlc | 3862 ++++++------ .../ReportesProgramados/RPTParadas.rdlc | 5455 ++++++++--------- .../ReportesProgramados/RPTPasajeros.rdlc | 4727 +++++++------- .../ReportesProgramados/RPTRalenti.rdlc | 3827 ++++++------ .../ReportesProgramados/RPTiempoMuerto.rdlc | 3845 ++++++------ .../ReportesProgramados/RPVelocidad.rdlc | 3906 ++++++------ .../ReporteGRDetallado.rdlc | 3991 ++++++------ 9 files changed, 16907 insertions(+), 17029 deletions(-) diff --git a/Empresas/Grales/ReportesProgramados/RPTHistorico.rdlc b/Empresas/Grales/ReportesProgramados/RPTHistorico.rdlc index 23f39e534..a4804c55d 100644 --- a/Empresas/Grales/ReportesProgramados/RPTHistorico.rdlc +++ b/Empresas/Grales/ReportesProgramados/RPTHistorico.rdlc @@ -1,2170 +1,2155 @@ - - - - - - true - true - - - - - Reporte de Rastreo Histórico - - - - - - - - - - - - - - - - Textbox4 - 0.05159in - 0.29332cm - 0.96167in - 8.30729in - - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.32517cm - - - 2.1721cm - - - 1.73107cm - - - 4.25684cm - - - 2.63769cm - - - 5.24248cm - - - 2.73517cm - - - - - 0.6cm - - - - - true - true - - - - - Unidad - - - - - - - Textbox2 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox4 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Velocidad - - - - - - - Textbox11 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Evento - - - - - - - Textbox6 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Tiempo Detenido - - - - - - - Textbox10 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Dirección - - - - - - - Posicion - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Posición - - - - - - - Textbox7 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Fields!Vehiculo.Value - - - - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Velocidad.Value - - - - - - - Velocidad - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Evento.Value - - - - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TiempoDetenido.Value - - - - - - - TiempoDetenido - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Posicion.Value - - - - - - - Posicion1 - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!LatLng.Value - - - - - - - LatLng - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - =IIf(Len(First(Fields!Posicion.Value, "DsOC")) > 1, False, True) - - - - - - - - - - - - - - DsOC - 5.43137cm - 0.29332cm - 1.2cm - 21.10052cm - 1 - - - - - - Embedded - LogoSinFondo - FitProportional - 0.13104cm - 1.07649cm - 2.44264cm - 2.74883cm - 2 - - - - - - true - true - - - - - Fecha Inicio: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Fin: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Distancia Recorrida en el Periodo: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 15.1387cm - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + + + + + + + + + + Textbox4 + 0.05159in + 0.29332cm + 0.96167in + 8.30729in + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.32517cm + + + 2.1721cm + + + 1.73107cm + + + 4.25684cm + + + 2.63769cm + + + 5.24248cm + + + 2.73517cm + + + + + 0.6cm + + + + + true + true + + + + + Unidad + + + + + + + Textbox2 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox4 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Velocidad + + + + + + + Textbox11 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Evento + + + + + + + Textbox6 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tiempo Detenido + + + + + + + Textbox10 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Dirección + + + + + + + Posicion + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Posición + + + + + + + Textbox7 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Vehiculo.Value + + + + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Velocidad.Value + + + + + + + Velocidad + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Evento.Value + + + + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TiempoDetenido.Value + + + + + + + TiempoDetenido + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Posicion.Value + + + + + + + Posicion1 + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!LatLng.Value + + + + + + + LatLng + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + =IIf(Len(First(Fields!Posicion.Value, "DsOC")) > 1, False, True) + + + + + + + + + + + + + + DsOC + 5.43137cm + 0.29332cm + 1.2cm + 21.10052cm + 1 + + + + + + true + true + + + + + Fecha Inicio: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Fin: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Distancia Recorrida en el Periodo: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 15.1387cm + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + - - - - - - - - - - - - - - - - - - - - - - - - Textbox4 - 0.05159in - 0.29332cm - 0.96167in - 8.30729in - - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - 7.82435cm - - - 5.802cm - - - 7.34717cm - - - - - 0.6cm - - - - - true - true - - - - - Vehículo - - - - - - - Textbox2 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Tiempo Operativo - - - - - - - Textbox4 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Kilometros Recorridos - - - - - - - Textbox6 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Total - - - - - - =iif(Fields!Vehiculo.Value = "","#67809F",iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White")) - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =CStr(Round((Sum(Fields!TiempoOperativo.Value) - First(Fields!TiempoOperativo.Value, "DsOC")) / 60 ,2)) & " Hrs" & "(" & Format(Round((Sum(Fields!TiempoOperativo.Value) - First(Fields!TiempoOperativo.Value, "DsOC")),1),"N") & " minutos)" - - - - - - - Textbox23 - - - =iif(Fields!Vehiculo.Value = "","#67809F",iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White")) - 2pt - 2pt - 2pt - 2pt - - - true - - - - - - true - true - - - - - =Sum(Fields!Dist.Value) - First(Fields!Dist.Value, "DsOC") - - - - - - - Textbox24 - - - =iif(Fields!Vehiculo.Value = "","#67809F",iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White")) - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =IIf(Fields!Vehiculo.Value = "", "Total", Fields!Vehiculo.Value) - - - - - - =iif(Fields!Vehiculo.Value = "","#67809F",iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White")) - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =CStr(Round(Fields!TiempoOperativo.Value / 60 ,2)) & " Hrs" & " (" & Format(Round(Fields!TiempoOperativo.Value,1),"N") & " minutos)" - - - - - - - TiempoOperativo - - - =iif(Fields!Vehiculo.Value = "","#67809F",iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White")) - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Dist.Value - - - - - - - Dist - - - =iif(Fields!Vehiculo.Value = "","#67809F",iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White")) - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - After - - - - - - - - =IIf(Fields!Vehiculo.Value = "", true, false) - - - - - DsOC - 4.47887cm - 0.29332cm - 1.8cm - 20.97352cm - 1 - - - - - - Embedded - LogoSinFondo - FitProportional - 0.13104cm - 1.07649cm - 2.44264cm - 2.74883cm - 2 - - - - - - true - true - - - - - Fecha Inicio: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Fin: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 15.1387cm - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + + + + + + + + + + + + + + + + + + + Textbox4 + 0.05159in + 0.29332cm + 0.96167in + 8.30729in + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 7.82435cm + + + 5.802cm + + + 7.34717cm + + + + + 0.6cm + + + + + true + true + + + + + Vehículo + + + + + + + Textbox2 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tiempo Operativo + + + + + + + Textbox4 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Kilometros Recorridos + + + + + + + Textbox6 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Total + + + + + + =iif(Fields!Vehiculo.Value = "","#67809F",iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White")) + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =CStr(Round((Sum(Fields!TiempoOperativo.Value) - First(Fields!TiempoOperativo.Value, "DsOC")) / 60 ,2)) & " Hrs" & "(" & Format(Round((Sum(Fields!TiempoOperativo.Value) - First(Fields!TiempoOperativo.Value, "DsOC")),1),"N") & " minutos)" + + + + + + + Textbox23 + + + =iif(Fields!Vehiculo.Value = "","#67809F",iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White")) + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!Dist.Value) - First(Fields!Dist.Value, "DsOC") + + + + + + + Textbox24 + + + =iif(Fields!Vehiculo.Value = "","#67809F",iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White")) + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =IIf(Fields!Vehiculo.Value = "", "Total", Fields!Vehiculo.Value) + + + + + + =iif(Fields!Vehiculo.Value = "","#67809F",iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White")) + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =CStr(Round(Fields!TiempoOperativo.Value / 60 ,2)) & " Hrs" & " (" & Format(Round(Fields!TiempoOperativo.Value,1),"N") & " minutos)" + + + + + + + TiempoOperativo + + + =iif(Fields!Vehiculo.Value = "","#67809F",iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White")) + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Dist.Value + + + + + + + Dist + + + =iif(Fields!Vehiculo.Value = "","#67809F",iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White")) + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + After + + + + + + + + =IIf(Fields!Vehiculo.Value = "", true, false) + + + + + DsOC + 4.47887cm + 0.29332cm + 1.8cm + 20.97352cm + 1 + + + + + + true + true + + + + + Fecha Inicio: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Fin: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 15.1387cm + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + - - - - - - Textbox4 - 0.05159in - 0.29332cm - 0.96167in - 8.30729in - - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.7616cm - - - 2.78714cm - - - 3.71412cm - - - 2.99048cm - - - 3.11107cm - - - 3.23611cm - - - 2.5cm - - - - - 0.6cm - - - - - true - true - - - - - Vehículo - - - - - - - NoEconomico - - - #dddddd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Conductor - - - - - - - Textbox16 - - - #dddddd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Parada - - - - - - - Fecha1 - - - #dddddd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Clasifcación - - - - - - - Textbox11 - - - #dddddd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Número de Eventos - - - - - - - Textbox6 - - - #dddddd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox10 - - - #dddddd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox19 - - - #dddddd - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - - - #67809f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - #67809f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox47 - - - #67809f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox48 - - - #67809f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TotalEventos.Value - - - - - - - TotalEventos1 - - - #67809f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe1 - - - #67809f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox51 - - - #67809f - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Fields!NoEconomico.Value - - - - - - =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Conductor.Value - - - - - - =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!GeoReferencia.Value - - - - - - - GeoReferencia1 - - - =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Clasificacion.Value - - - - - - - Clasificacion1 - - - =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TotalEventos.Value - - - - - - - TotalEventos2 - - - =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe2 - - - =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha2 - - - =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - - =Fields!TipoColumna.Value - Equal - - 1 - - - - - - - - - - =Fields!TipoColumna.Value - NotEqual - - 1 - - - - - - - =Fields!CveConductor.Value - - - =Fields!CveGeoReferencia.Value - - - - - - DsOC - - - =Fields!Importe.Value - Descending - - - 5.43137cm - 0.19573cm - 1.8cm - 21.10052cm - 1 - - - - - - Embedded - LogoSinFondo - FitProportional - 0.13104cm - 1.07649cm - 2.44264cm - 2.74883cm - 2 - - - - - - true - true - - - - - Fecha Inicio: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Fin: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!NumEventos.Value - - - - - - - - - - - Textbox2 - 3.44643cm - 8.15038cm - 1.25117cm - 5.29633cm - 5 - - 0.5pt - - - Black - - - Black - - - Black - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - Número de Eventos - - - - - - - Textbox9 - 0.6cm - 5.29633cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - 2.93137cm - 8.15038cm - 0.6cm - 5.29633cm - 6 - - 0.5pt - - #c49f47 - - - - true - true - - - - - =Parameters!MejorConductor.Value - - - - - - - - - - - Textbox2 - 3.44643cm - 15.40139cm - 1.25117cm - 5.29633cm - 7 - - 0.5pt - - - Black - - - Black - - - Black - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - Mejor Conductor - - - - - - - Textbox9 - 0.6cm - 5.29633cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - 2.93137cm - 15.40139cm - 0.6cm - 5.29633cm - 8 - - 0.5pt - - #4b77be - - - - true - true - - - - - =Parameters!TotalGeneral.Value - - - - - - - - - - - Textbox2 - 3.3913cm - 0.83397cm - 1.25117cm - 5.29633cm - 9 - - 0.5pt - - - Black - - - Black - - - Black - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - Total General - - - - - - - Textbox9 - 0.6cm - 5.29633cm - - - Green - 2pt - 2pt - 2pt - 2pt - - - - true - 2.87624cm - 0.83397cm - 0.6cm - 5.29633cm - 10 - - 0.5pt - - #c49f47 - - - - 15.1387cm - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + Textbox4 + 0.05159in + 0.29332cm + 0.96167in + 8.30729in + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.7616cm + + + 2.78714cm + + + 3.71412cm + + + 2.99048cm + + + 3.11107cm + + + 3.23611cm + + + 2.5cm + + + + + 0.6cm + + + + + true + true + + + + + Vehículo + + + + + + + NoEconomico + + + #dddddd + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Conductor + + + + + + + Textbox16 + + + #dddddd + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Parada + + + + + + + Fecha1 + + + #dddddd + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Clasifcación + + + + + + + Textbox11 + + + #dddddd + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Número de Eventos + + + + + + + Textbox6 + + + #dddddd + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox10 + + + #dddddd + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox19 + + + #dddddd + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + #67809f + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + #67809f + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox47 + + + #67809f + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox48 + + + #67809f + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TotalEventos.Value + + + + + + + TotalEventos1 + + + #67809f + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe1 + + + #67809f + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox51 + + + #67809f + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!NoEconomico.Value + + + + + + =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Conductor.Value + + + + + + =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!GeoReferencia.Value + + + + + + + GeoReferencia1 + + + =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Clasificacion.Value + + + + + + + Clasificacion1 + + + =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TotalEventos.Value + + + + + + + TotalEventos2 + + + =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe2 + + + =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha2 + + + =iif(Fields!TipoColumna.Value = 2, "#CCCCCC", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + =Fields!TipoColumna.Value + Equal + + 1 + + + + + + + + + + =Fields!TipoColumna.Value + NotEqual + + 1 + + + + + + + =Fields!CveConductor.Value + + + =Fields!CveGeoReferencia.Value + + + + + + DsOC + + + =Fields!Importe.Value + Descending + + + 5.43137cm + 0.19573cm + 1.8cm + 21.10052cm + 1 + + + + + + true + true + + + + + Fecha Inicio: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Fin: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NumEventos.Value + + + + + + + + + + + Textbox2 + 3.44643cm + 8.15038cm + 1.25117cm + 5.29633cm + 4 + + 0.5pt + + + Black + + + Black + + + Black + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + Número de Eventos + + + + + + + Textbox9 + 0.6cm + 5.29633cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + 2.93137cm + 8.15038cm + 0.6cm + 5.29633cm + 5 + + 0.5pt + + #c49f47 + + + + true + true + + + + + =Parameters!MejorConductor.Value + + + + + + + + + + + Textbox2 + 3.44643cm + 15.40139cm + 1.25117cm + 5.29633cm + 6 + + 0.5pt + + + Black + + + Black + + + Black + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + Mejor Conductor + + + + + + + Textbox9 + 0.6cm + 5.29633cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + 2.93137cm + 15.40139cm + 0.6cm + 5.29633cm + 7 + + 0.5pt + + #4b77be + + + + true + true + + + + + =Parameters!TotalGeneral.Value + + + + + + + + + + + Textbox2 + 3.3913cm + 0.83397cm + 1.25117cm + 5.29633cm + 8 + + 0.5pt + + + Black + + + Black + + + Black + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + Total General + + + + + + + Textbox9 + 0.6cm + 5.29633cm + + + Green + 2pt + 2pt + 2pt + 2pt + + + + true + 2.87624cm + 0.83397cm + 0.6cm + 5.29633cm + 9 + + 0.5pt + + #c49f47 + + + + 15.1387cm + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + - - - - - - Textbox4 - 0.05159in - 0.29332cm - 0.96167in - 8.30729in - - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - 5.85282cm - - - 3.75884cm - - - 3.9959cm - - - 4.25684cm - - - 3.23611cm - - - - - 0.6cm - - - - - true - true - - - - - Vehiculo - - - - - - - NoEconomico - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Fecha1 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Ascensos - - - - - - - Textbox11 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descensos - - - - - - - Textbox6 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Acumulado - - - - - - - Textbox10 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Fields!NoEconomico.Value - - - - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Ascensos.Value - - - - - - - Ascensos - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Descensos.Value - - - - - - - Descensos - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Acumulado.Value - - - - - - - Acumulado - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - - - #67809f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox7 - - - #67809f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Ascensos.Value - - - - - - - Ascensos1 - - - #67809f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Descensos.Value - - - - - - - Descensos1 - - - #67809f - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox14 - - - #67809f - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - - =iif(Fields!NoEconomico.Value = "", True, False) - - - - - =iif(Fields!NoEconomico.Value = "", False, True) - - Before - - - - DsOC - 5.43137cm - 0.29332cm - 1.8cm - 21.10051cm - 1 - - - - - - Embedded - LogoSinFondo - FitProportional - 0.13104cm - 1.07649cm - 2.44264cm - 2.74883cm - 2 - - - - - - true - true - - - - - Fecha Inicio: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Fin: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!TotalAscensos.Value - - - - - - - - - - - Textbox2 - 3.44643cm - 3.89588cm - 1.25117cm - 5.29633cm - 5 - - 0.5pt - - - Black - - - Black - - - Black - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - T - - - - otal Ascensos - - - - - - - Textbox9 - 0.6cm - 5.29633cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - 2.93137cm - 3.89588cm - 0.6cm - 5.29633cm - 6 - - 0.5pt - - #c49f47 - - - - true - true - - - - - =Parameters!TotalDescensos.Value - - - - - - - - - - - Textbox2 - 3.44643cm - 12.86139cm - 1.25117cm - 5.29633cm - 7 - - 0.5pt - - - Black - - - Black - - - Black - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - T - - - - otal Descensos - - - - - - - Textbox9 - 0.6cm - 5.29633cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - 2.93137cm - 12.86139cm - 0.6cm - 5.29633cm - 8 - - 0.5pt - - #4b77be - - - - 15.1387cm - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + Textbox4 + 0.05159in + 0.29332cm + 0.96167in + 8.30729in + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 5.85282cm + + + 3.75884cm + + + 3.9959cm + + + 4.25684cm + + + 3.23611cm + + + + + 0.6cm + + + + + true + true + + + + + Vehiculo + + + + + + + NoEconomico + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Fecha1 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Ascensos + + + + + + + Textbox11 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descensos + + + + + + + Textbox6 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Acumulado + + + + + + + Textbox10 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!NoEconomico.Value + + + + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ascensos.Value + + + + + + + Ascensos + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Descensos.Value + + + + + + + Descensos + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Acumulado.Value + + + + + + + Acumulado + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + #67809f + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox7 + + + #67809f + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ascensos.Value + + + + + + + Ascensos1 + + + #67809f + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Descensos.Value + + + + + + + Descensos1 + + + #67809f + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox14 + + + #67809f + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + =iif(Fields!NoEconomico.Value = "", True, False) + + + + + =iif(Fields!NoEconomico.Value = "", False, True) + + Before + + + + DsOC + 5.43137cm + 0.29332cm + 1.8cm + 21.10051cm + 1 + + + + + + true + true + + + + + Fecha Inicio: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Fin: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TotalAscensos.Value + + + + + + + + + + + Textbox2 + 3.44643cm + 3.89588cm + 1.25117cm + 5.29633cm + 4 + + 0.5pt + + + Black + + + Black + + + Black + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + T + + + + otal Ascensos + + + + + + + Textbox9 + 0.6cm + 5.29633cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + 2.93137cm + 3.89588cm + 0.6cm + 5.29633cm + 5 + + 0.5pt + + #c49f47 + + + + true + true + + + + + =Parameters!TotalDescensos.Value + + + + + + + + + + + Textbox2 + 3.44643cm + 12.86139cm + 1.25117cm + 5.29633cm + 6 + + 0.5pt + + + Black + + + Black + + + Black + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + T + + + + otal Descensos + + + + + + + Textbox9 + 0.6cm + 5.29633cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + 2.93137cm + 12.86139cm + 0.6cm + 5.29633cm + 7 + + 0.5pt + + #4b77be + + + + 15.1387cm + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + - - - - - - - - - - - - - - - - - - - - - - - - Textbox4 - 0.05159in - 0.29332cm - 0.96167in - 8.30729in - - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - 3.8335cm - - - 5.14583cm - - - 7.47417cm - - - 4.36267cm - - - - - 0.6cm - - - - - true - true - - - - - Unidad - - - - - - - Textbox2 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox4 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Dirección - - - - - - - Textbox6 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Tiempo Ralentí - - - - - - - Textbox10 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Fields!Unidad.Value - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Direccion.Value - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TiempoDetenido.Value - - - - TiempoDetenido - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - DsOC - 5.11387cm - 0.29332cm - 1.2cm - 20.81617cm - 1 - - - - - - Embedded - LogoSinFondo - FitProportional - 0.13104cm - 1.07649cm - 2.44264cm - 2.74883cm - 2 - - - - - - true - true - - - - - Fecha Inicio: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Fin: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Criterio Ralentí: - - - - Encendido sin movimiento por más de 3 minutos. - - - 2pt - 2pt - 2pt - 2pt - - - - 15.1387cm - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + + + + + + + + + + + + + + + + + + + Textbox4 + 0.05159in + 0.29332cm + 0.96167in + 8.30729in + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.8335cm + + + 5.14583cm + + + 7.47417cm + + + 4.36267cm + + + + + 0.6cm + + + + + true + true + + + + + Unidad + + + + + + + Textbox2 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox4 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Dirección + + + + + + + Textbox6 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tiempo Ralentí + + + + + + + Textbox10 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Unidad.Value + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Direccion.Value + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TiempoDetenido.Value + + + + TiempoDetenido + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + DsOC + 5.11387cm + 0.29332cm + 1.2cm + 20.81617cm + 1 + + + + + + true + true + + + + + Fecha Inicio: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Fin: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Criterio Ralentí: + + + + Encendido sin movimiento por más de 3 minutos. + + + 2pt + 2pt + 2pt + 2pt + + + + 15.1387cm + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + - - - - - - - - - - - - - - - - - - - - - - - - Textbox4 - 0.05159in - 0.29332cm - 0.96167in - 8.30729in - - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - 3.8335cm - - - 5.14583cm - - - 7.47417cm - - - 4.36267cm - - - - - 0.6cm - - - - - true - true - - - - - Unidad - - - - - - - Textbox2 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox4 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Dirección - - - - - - - Textbox6 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Tiempo Detenido - - - - - - - Textbox10 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Fields!Unidad.Value - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Direccion.Value - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TiempoDetenido.Value - - - - TiempoDetenido - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - DsOC - 5.11387cm - 0.29332cm - 1.2cm - 20.81617cm - 1 - - - - - - Embedded - LogoSinFondo - FitProportional - 0.13104cm - 1.07649cm - 2.44264cm - 2.74883cm - 2 - - - - - - true - true - - - - - Fecha Inicio: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Fin: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tiempo Muerto A Partir de: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 15.1387cm - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + + + + + + + + + + + + + + + + + + + Textbox4 + 0.05159in + 0.29332cm + 0.96167in + 8.30729in + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.8335cm + + + 5.14583cm + + + 7.47417cm + + + 4.36267cm + + + + + 0.6cm + + + + + true + true + + + + + Unidad + + + + + + + Textbox2 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox4 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Dirección + + + + + + + Textbox6 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tiempo Detenido + + + + + + + Textbox10 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Unidad.Value + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Direccion.Value + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TiempoDetenido.Value + + + + TiempoDetenido + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + DsOC + 5.11387cm + 0.29332cm + 1.2cm + 20.81617cm + 1 + + + + + + true + true + + + + + Fecha Inicio: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Fin: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tiempo Muerto A Partir de: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 15.1387cm + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + - - - - - - Textbox4 - 0.05159in - 0.29332cm - 0.96167in - 7.42452in - - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - 3.8335cm - - - 4.69604cm - - - 6.62753cm - - - 3.70121cm - - - - - 0.6cm - - - - - true - true - - - - - Unidad - - - - - - - Textbox2 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox4 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Dirección - - - - - - - Textbox6 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Velocidad - - - - - - - Textbox10 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Fields!Unidad.Value - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Direccion.Value - - - - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Velocidad.Value - - - - Velocidad - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - DsOC - 3.97616cm - 0.29332cm - 1.2cm - 18.85828cm - 1 - - - - - - true - true - - - - - Fecha Inicio: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Fin: - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.05159in - 0.29332cm - 2.09585cm - 18.85828cm - 4 - - - - - - true - true - - - - - =Parameters!NombreEmpresa.Value - - - - - - - Textbox1 - 1.97368cm - 0.29332cm - 0.6cm - 18.85828cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - 5.95766cm - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - =Globals!PageNumber - - - - de - - - - =Globals!TotalPages - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 20cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + Textbox4 + 0.05159in + 0.29332cm + 0.96167in + 7.42452in + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.8335cm + + + 4.69604cm + + + 6.62753cm + + + 3.70121cm + + + + + 0.6cm + + + + + true + true + + + + + Unidad + + + + + + + Textbox2 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox4 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Dirección + + + + + + + Textbox6 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Velocidad + + + + + + + Textbox10 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Unidad.Value + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Direccion.Value + + + + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Velocidad.Value + + + + Velocidad + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + DsOC + 3.97616cm + 0.29332cm + 1.2cm + 18.85828cm + 1 + + + + + + true + true + + + + + Fecha Inicio: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Fin: + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NombreEmpresa.Value + + + + + + + Textbox1 + 1.97368cm + 0.29332cm + 0.6cm + 18.85828cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 5.95766cm + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + =Globals!PageNumber + + + + de + + + + =Globals!TotalPages + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 20cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + - - - - - - - - - - - - De: - - - - =Parameters!FechaInicio.Value - - - - Al: - - - - =Parameters!FechaFin.Value - - - - - - - - - - - - - - - - Textbox4 - 0.05159in - 0.29332cm - 0.96167in - 8.30729in - - - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.32517cm - - - 2.1721cm - - - 3.50378cm - - - 4.25684cm - - - 3.60015cm - - - 5.24248cm - - - - - 0.6cm - - - - - true - true - - - - - Unidad - - - - - - - Textbox2 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox4 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Conductor - - - - - - - Textbox11 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Evento - - - - - - - Textbox6 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Geocerca - - - - - - - Textbox10 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Dirección - - - - - - - Posicion - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Fields!Unidad.Value - - - - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Conductor.Value - - - - - - - Conductor - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Evento.Value - - - - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Geocerca.Value - - - - - - - Geocerca - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Direccion.Value - - - - - - - Direccion - - - =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - - DsOC - 3.52637cm - 0.29332cm - 1.2cm - 21.10052cm - 1 - - - - - - Embedded - LogoSinFondo - FitProportional - 0.13104cm - 1.07649cm - 2.44264cm - 2.74883cm - 2 - - - - - - 15.1387cm - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + + + + + + + De: + + + + =Parameters!FechaInicio.Value + + + + Al: + + + + =Parameters!FechaFin.Value + + + + + + + + + + + + + + + + Textbox4 + 0.05159in + 0.29332cm + 0.96167in + 8.30729in + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.32517cm + + + 2.1721cm + + + 3.50378cm + + + 4.25684cm + + + 3.60015cm + + + 5.24248cm + + + + + 0.6cm + + + + + true + true + + + + + Unidad + + + + + + + Textbox2 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox4 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Conductor + + + + + + + Textbox11 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Evento + + + + + + + Textbox6 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Geocerca + + + + + + + Textbox10 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Dirección + + + + + + + Posicion + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Unidad.Value + + + + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Conductor.Value + + + + + + + Conductor + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Evento.Value + + + + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Geocerca.Value + + + + + + + Geocerca + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Direccion.Value + + + + + + + Direccion + + + =iif(RowNumber("DsOC") Mod 2 = 0,"WhiteSmoke","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + DsOC + 3.52637cm + 0.29332cm + 1.2cm + 21.10052cm + 1 + + + + + + 15.1387cm + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + + + + + + + Textbox27 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + @@ -113,6 +178,7 @@ Disponible @@ -168,6 +234,7 @@ Unidad @@ -223,6 +290,7 @@ Código @@ -278,6 +346,7 @@ Producto @@ -331,8 +400,9 @@ - SerieLote + Valor @@ -379,15 +449,16 @@ - + true true - Valor + Alm. Origen @@ -397,7 +468,119 @@ - Textbox6 + Textbox11 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Alm. Destino + + + + + + + Textbox21 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Responsable + + + + + + + Textbox14 + + + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + @@ -446,9 +663,9 @@ - =IIf(Fields!PS.Value = "", IIf(Fields!FolioSalida.Value > 0,"Folio: " & Fields!FolioSalida.Value,"Total General"), Fields!Cantidad.Value) + =Fields!Cantidad.Value @@ -552,9 +769,9 @@ - =IIf(Fields!PS.Value = "", IIf(Fields!FolioSalida.Value > 0,"Almacén Origen: " & Fields!Almacen.Value & " Almacén Destino: " & Fields!AlmacenDestino.Value & " Responsable: " & Fields!Recibio.Value,""), Fields!PS.Value) + =Fields!PS.Value @@ -579,26 +796,27 @@ - + true true - =Fields!SerieLote.Value + =Fields!Valor.Value - SerieLote + Valor1 @@ -614,27 +832,99 @@ - + true true - =Fields!Valor.Value + =Fields!Almacen.Value - Valor + Almacen + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!AlmacenDestino.Value + + + + + + + AlmacenDestino + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Recibio.Value + + + + + + + Recibio @@ -658,11 +948,10 @@ - - - true - - + + + + @@ -683,8 +972,8 @@ DataSet1 0.17639cm 0.24474cm - 0.90897cm - 24.11735cm + 1.0148cm + 24.21186cm @@ -695,7 +984,7 @@ 0.67394in @@ -770,7 +1059,7 @@ Textbox2 1.07625cm 0.52945cm - 22.55159cm + 24.4566cm 1 + + true + true + + + + + REVISAR BIEN EL PRODUCTO, UNA VEZ ENTREGADO EL MATERIAL NO SE ACEPTAN DEVOLUCIONES. + + + 2pt + 2pt + 2pt + 2pt + + - 10.69327cm + 11.48171cm