diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx.vb b/Acumuladores/EntradasUsadosResumenRep.aspx.vb index 8e389cde6..6a4077447 100644 --- a/Acumuladores/EntradasUsadosResumenRep.aspx.vb +++ b/Acumuladores/EntradasUsadosResumenRep.aspx.vb @@ -70,14 +70,17 @@ Partial Class Acumuladores_RepEntradasUsados Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1) Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today)) - + Dim Direccion As String = String.Format("{0} {1}", UsuarioActual.Empresa.Direccion.ToString, UsuarioActual.Empresa.NoExt.ToString) Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("Direccion", "dirección")) - params.Add(New ReportParameter("FechaConFormato", FechaConFormato)) + params.Add(New ReportParameter("Direccion", Direccion)) + params.Add(New ReportParameter("FechaConFormato", Date.Now.ToString)) params.Add(New ReportParameter("FechaInicial", txtFechaI.Text)) params.Add(New ReportParameter("FechaFinal", txtFechaF.Text)) params.Add(New ReportParameter("Sucursal", "Sucursal")) + params.Add(New ReportParameter("Almacen", DdlAlmacenes.SelectedItem.ToString)) + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) + Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsados} diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 940bf0817..cd29409c4 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -485,7 +485,7 @@ Public Class ClsAcumuladores #Region " FOLIOS GARANTÍA " - Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional TipoFolio As String = "-1", Optional Area As Integer = 1) As Boolean + Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoFolio As String = "-1", Optional Area As Integer = 1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -495,6 +495,7 @@ Public Class ClsAcumuladores .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@tipoFolio", SqlDbType.VarChar).Value = TipoFolio .Add("@Area", SqlDbType.Int).Value = Area End With diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index a1169276d..69ac29dc8 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -1026,6 +1026,24 @@ Public Class ClsClientes OnError("Ocurrió un error al obtener el las Sucursales del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try + Return Retorno + End Function + + Public Function GetListaSucursales(RFC As String, CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Vta_ClientesSucursalesGet") + SqlAdapter.SelectCommand.Parameters.Add("@RFC", SqlDbType.VarChar).Value = RFC + SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente + SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el las Sucursales del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno End Function 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/ClsNominas.vb b/App_Code/ClsNominas.vb index 133cb56e1..caef462e6 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -216,7 +216,36 @@ Public Class ClsNominas End Try Return retorno End Function - + Public Function Autorizaperiodoconta(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_Nom_Autorizaperiodoconta", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al autorizar periodo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function GetDispersiondenomina(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_PA_NomDispersiondenomina", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el layout de nominas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function GetCalculoUtilidades(ejercicio As Int32, cveEmpresa As Int32, importe As Double, importeA As Double) As Boolean Dim retorno As Boolean = False DataAdapter("PA_NomCalcularUtilidades", CommandType.StoredProcedure) @@ -2093,6 +2122,29 @@ Public Class ClsNominas Return retorno End Function + Public Function PrimaRiesgoUP(CveEmpresa As Integer, Fecha As DateTime, PrimadeRiesgo As Decimal) As Boolean + Dim retorno As Boolean = False + Try + DTSet = New DataSet() + DataAdapter("PA_Nom_PrimaRiesgoUP", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Fecha", SqlDbType.Date).Value = Fecha + .Add("@PrimadeRiesgo", SqlDbType.Money).Value = PrimadeRiesgo + End With + + + SqlAdapter.Fill(DTSet) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al actualizar las tablas de nomina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al actualizar las tablas de nomina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function GetTablasNomina(CveEmpresa As Integer) As Boolean Dim retorno As Boolean = False Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 990a3e2f5..ef3c9b60c 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5444,13 +5444,13 @@ Public Class ClsPaginas ''' Opcional Nombre del archivo que se descarga ''' Optional, Formato de Generacion PDF o Excel ''' - Public Sub ImprimirPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) + Public Sub ImprimirPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing, Optional Content_Disposition As String = "attachment") Dim lrds As New List(Of ReportDataSource) Dim rds As New ReportDataSource rds.Name = RDSName rds.Value = DtDatos lrds.Add(rds) - ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR) + ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR, Content_Disposition) End Sub Public Sub ImprimirPDFMultiDS(RutaReporte As String, lrds As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR) @@ -5465,9 +5465,9 @@ Public Class ClsPaginas ''' Opcional Nombre del archivo que se descarga ''' Optional, Formato de Generacion PDF o Excel ''' - Public Sub ImprimirPDF(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing) + Public Sub ImprimirPDF(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing, Optional Content_Disposition As String = "attachment") 'limpio ReportViwer - ImprimirbytesPDF(StreamPDF(RutaReporte, DataSource, Parametros, NombreArchivo, Formato, MR), NombreArchivo, Formato) + ImprimirbytesPDF(StreamPDF(RutaReporte, DataSource, Parametros, NombreArchivo, Formato, MR), NombreArchivo, Formato, Content_Disposition:=Content_Disposition) End Sub Public Function StreamPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) As Byte() Dim lrds As New List(Of ReportDataSource) @@ -5857,7 +5857,7 @@ Public Class ClsPaginas ''' ''' ''' - Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False) + Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False, Optional Content_Disposition As String = "attachment") 'limpio ReportViwer Dim mimeType As String = Nothing Dim extension As String = Nothing @@ -5880,7 +5880,7 @@ Public Class ClsPaginas Response.Buffer = True Response.Clear() Response.ContentType = mimeType - Response.AddHeader("content-disposition", String.Format("attachment; filename={0}.{1}", NombreArchivo, If(Formato = "PDF", "pdf", "xls"))) + Response.AddHeader("content-disposition", String.Format("{0}; filename={1}.{2}", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls"))) Response.BinaryWrite(bytes) ' create the file Response.Flush() ' send it to the client to download HttpContext.Current.Response.SuppressContent = True @@ -6617,13 +6617,20 @@ Public Class ClsPaginas 'CLIENTE - If Vta.CveCliente.ToEntero > 0 Then + If Vta.CveCliente.ToEntero > 0 Or Vta.CveEmpresaCRM.ToEntero > 0 Then params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo)) params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre)))) params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion)) params.Add(New ReportParameter("ClienteLugar", ClienteLugar)) params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC)) End If + If Vta.CveEmpresaCRM.ToEntero > 0 Then + params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo)) + params.Add(New ReportParameter("ClienteNombre", Vta.Cliente.Nombre)) + params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion)) + params.Add(New ReportParameter("ClienteLugar", ClienteLugar)) + params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC)) + End If 'TOTALES params.Add(New ReportParameter("SubTotal", Vta.SubTotal.ToString.FormatoNumero(2))) diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index c9557b703..6a35f980b 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -5584,7 +5584,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno End Function - Public Function SolicitudVacacionesAdd(CvePersonal As Integer, Fecha As Date, FechaFin As Date, Estatus As Integer, CveUsuario As Integer, CveAutoriza As Integer, Folio As Integer, Optional Motivo As String = "") As Boolean + Public Function SolicitudVacacionesAdd(CvePersonal As Integer, Fecha As Date, FechaFin As Date, Estatus As Integer, CveUsuario As Integer, CveAutoriza As Integer, Folio As Integer, Optional Motivo As String = "", Optional FechaPago As String = "", Optional diasinabiles As Integer = 0, Optional PorcentajePrimaVac As Decimal = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_RH_SolicitudVacacionesAdd") @@ -5597,7 +5597,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveAutoriza", SqlDbType.Int).Value = CveAutoriza .Add("@Folio", SqlDbType.Int).Value = Folio - '.Add("@Motivo", SqlDbType.VarChar).Value = Motivo + .Add("@diasinabiles", SqlDbType.Int).Value = diasinabiles + .Add("@PorcentajePrimaVac", SqlDbType.Money).Value = PorcentajePrimaVac + .Add("@FechaPago", SqlDbType.VarChar).Value = FechaPago + '.Add("@Motivo", SqlDbType.VarChar).Value = MotivoFechaPago As String = "", Optional diasinabiles End With Try diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index 61f35a5e7..e19a7325e 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -240,7 +240,7 @@ Public Class LogicNominas For Each Row As DataRow In DtPercepciones.Rows If Row("Importe").ToString().ToDecimal > 0 AndAlso Row("SATCveConcepto").ToString().ToEntero() <> 17 Then If Row("CveSATConcepto").ToString() = "" Then cfdi.AddMsg(String.Format("Concepto No registrado ({0})", Row("Concepto").ToString())) : Exit For - ObjPercepciones.Add(New CFDINominaPercepciones With {.TipoPercepcion = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), + ObjPercepciones.Add(New CFDINominaPercepciones With {.TipoPercepcion = If(Row("SATCveConcepto").ToString() = "999", "038", Row("SATCveConcepto").ToString()), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .ImporteGravado = Row("ImporteGravado").ToString().ToDecimal(), .ImporteExento = Row("ImporteExento").ToString().ToDecimal()}) End If 'RMF, falta poner el numero de horas pagadas 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/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index da8df25b1..b7d9bbabb 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -2026,14 +2026,17 @@ Public Class Timbrado cfdi.Nomina12Percepciones(ObjCFDITimbre.Nomina.TotalSueldos, ObjCFDITimbre.Nomina.TotalIndemnizacion, ObjCFDITimbre.Nomina.TotalJubilacion, ObjCFDITimbre.Nomina.TotalPercepcionesGravado, ObjCFDITimbre.Nomina.TotalPercepcionesExento) For Each percep As CFDINominaPercepciones In ObjCFDITimbre.Nomina.Percepciones cfdi.Nomina12Percepcion(percep.TipoPercepcion, percep.Clave, percep.Concepto, Math.Round(percep.ImporteGravado, 2), Math.Round(percep.ImporteExento, 2)) + If percep.TipoPercepcion.ToEntero() = 19 Then + + If ObjCFDITimbre.Nomina.HorasExtras IsNot Nothing AndAlso ObjCFDITimbre.Nomina.HorasExtras.Count > 0 Then + For Each HoraExtra As CFDINominaHorasExtras In ObjCFDITimbre.Nomina.HorasExtras + cfdi.Nomina12HorasExtra(HoraExtra.Dias.ToEntero, HoraExtra.TipoHoras, HoraExtra.HorasExtra, HoraExtra.ImportePagado) + Next + End If + End If Next End If - If ObjCFDITimbre.Nomina.HorasExtras IsNot Nothing AndAlso ObjCFDITimbre.Nomina.HorasExtras.Count > 0 Then - For Each HoraExtra As CFDINominaHorasExtras In ObjCFDITimbre.Nomina.HorasExtras - cfdi.Nomina12HorasExtra(HoraExtra.Dias.ToEntero, HoraExtra.TipoHoras, HoraExtra.HorasExtra, HoraExtra.ImportePagado) - Next - End If 'deducciones al final If ObjCFDITimbre.Nomina.Deducciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Deducciones.Count > 0 Then cfdi.Nomina12Deducciones(ObjCFDITimbre.Nomina.TotalDeduccionesOtras, Math.Round(ObjCFDITimbre.Nomina.TotalDeduccionesImpuestosRetenidos, 2)) @@ -2041,14 +2044,6 @@ Public Class Timbrado cfdi.Nomina12Deduccion(deduc.TipoDeduccion, deduc.Clave, deduc.Concepto, Math.Round(deduc.Importe, 2)) Next End If - - - If ObjCFDITimbre.Nomina.Incapacidades IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Incapacidades.Count > 0 Then - For Each Incap As CFDINominaIncapacidades In ObjCFDITimbre.Nomina.Incapacidades - cfdi.Nomina12Incapacidad(Incap.DiasIncapacidad.ToEntero, Incap.TipoIncapacidad, Incap.Importe) - Next - End If - If ObjCFDITimbre.Nomina.OtrosPagos IsNot Nothing Then ' cfdi.agregarNominaOtrosPagosOtroPago12("002", "002", "Subsidio", "10.00"); ' cfdi.agregarNominaOtrosPagosOtroPagoSubsidioAlEmpleo12("10.00"); @@ -2068,6 +2063,11 @@ Public Class Timbrado Next End If End If + If ObjCFDITimbre.Nomina.Incapacidades IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Incapacidades.Count > 0 Then + For Each Incap As CFDINominaIncapacidades In ObjCFDITimbre.Nomina.Incapacidades + cfdi.Nomina12Incapacidad(Incap.DiasIncapacidad.ToEntero, Incap.TipoIncapacidad, Incap.Importe) + Next + End If End If #End Region diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 9a18a5716..fbe97480e 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -968,25 +968,25 @@ Namespace Extensiones - Public Function RoundAD(Valor As Double, Optional Decimales As Integer = 2) As Double - Return Math.Round(Valor, Decimales) - End Function - - Public Function RoundAD(Valor As Decimal, Optional Decimales As Integer = 2) As Decimal - Return Math.Round(Valor, Decimales) + Public Function RoundAD(Valor As Double, Optional Decimales As Integer = 2) As Double + Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) + End Function + + Public Function RoundAD(Valor As Decimal, Optional Decimales As Integer = 2) As Decimal + Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) End Function - Public Function RoundSQL(Valor As Double, Optional Decimales As Integer = 2) As Double - 'Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) - 'primero, se redondea a 4, para que concuerde al redondeo de sql, si se redondea a 2 decimales por ejemplo - Return If(Decimales < 4, Math.Round(Math.Round(Valor, 4, MidpointRounding.AwayFromZero), Decimales, MidpointRounding.AwayFromZero), Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero)) + Public Function RoundSQL(Valor As Double, Optional Decimales As Integer = 2) As Double + 'Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) + 'primero, se redondea a 4, para que concuerde al redondeo de sql, si se redondea a 2 decimales por ejemplo + Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) End Function Public Function RoundSQL(Valor As Decimal, Optional Decimales As Integer = 2) As Decimal 'primero, se redondea a 4, para que concuerde al redondeo de sql - Return If(Decimales < 4, Math.Round(Math.Round(Valor, 4, MidpointRounding.AwayFromZero), Decimales, MidpointRounding.AwayFromZero), Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero)) + Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero) End Function Public Function Abs(Valor As Double) As Double diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index ca6e8c319..801f1ab28 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -4,6 +4,7 @@ Option Strict On Option Explicit On Imports System.Data +Imports System.IO Imports System.Net.Http Imports Newtonsoft.Json Imports Newtonsoft.Json.Linq @@ -66,6 +67,203 @@ Public Class E141 : Implements IHttpHandler End Get End Property + +#Region "GLOBAL DT" + Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) + 'sino existe, recarga los datos + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then + Dim P As New ClsSubProyectos + If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados + P.Dispose() + End If + + If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then + Dim StrSQL As New StringBuilder + If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto) + If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto) + If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus) + If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa) + + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows) + GlobalDTSubProyectos = Dv.ToTable + Dv.Dispose() + + Else + GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End If + + End Get + Set(ByVal value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value + 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 @@ -88,7 +286,61 @@ Public Class E141 : Implements IHttpHandler Dim Codigo = If(context.Request("Sku") = Nothing, "", context.Request("Sku").ToString()) retorno = GetExistencia(context, Codigo) + ElseIf Metodo = "ConsultarRFC" Then + context.Response.ContentType = "application/json" + Dim Auth = ValidarSolicitud(context) + If Auth.IsSucces Then + retorno = ConsultaRFC(context) + Else + context.Response.StatusCode = Auth.StatusCode + retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) + End If + + ElseIf Metodo = "ValidarCarrito" Then + context.Response.ContentType = "application/json" + Dim Auth = ValidarSolicitud(context) + + If Auth.IsSucces Then + retorno = ValidarCarrito(context) + Else + context.Response.StatusCode = Auth.StatusCode + retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) + End If + + ElseIf Metodo = "RegistrarPedido" Then + context.Response.ContentType = "application/json" + Dim Auth = ValidarSolicitud(context) + + If Auth.IsSucces Then + retorno = RegistrarPedido(context) + Else + context.Response.StatusCode = Auth.StatusCode + retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) + End If + + ElseIf Metodo = "RegistrarCotizacion" Then + context.Response.ContentType = "application/json" + Dim Auth = ValidarSolicitud(context) + + If Auth.IsSucces Then + retorno = RegistrarCotizacion(context) + Else + context.Response.StatusCode = Auth.StatusCode + retorno = JsonConvert.SerializeObject(Auth.ErrorMessage) + End If + + ElseIf Metodo = "GetSucursales" Then + context.Response.ContentType = "application/json" + Dim Auth = ValidarSolicitud(context) + + 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 Else context.Response.ContentType = "text/html" @@ -132,11 +384,1211 @@ Public Class E141 : Implements IHttpHandler End Try End Sub + Private Function ValidarSolicitud(ByVal context As HttpContext) As AuthMessage + Dim unauthorized As Boolean = True + Dim respuesta As New AuthMessage + + Dim authHeader = context.Request.Headers("Authorization") + If authHeader IsNot Nothing Then + Dim basicAuth As String = authHeader.Replace("Basic ", "") + + Dim usernamePasswordArray = Encoding.UTF8.GetString(Convert.FromBase64String(basicAuth)).Split(":"c) + + Dim userName = usernamePasswordArray(0) + Dim password = usernamePasswordArray(1) + unauthorized = Not (userName = Me.UsuarioWSE141 AndAlso password = Me.PasswordWSE141) + + Else + respuesta.ErrorMessage = New FidelityAppsResponseError() With {.message = "el usuario y/o contraseña son requeridos"} + respuesta.IsSucces = False + respuesta.StatusCode = 200 + + Return respuesta + End If + + If unauthorized Then + respuesta.ErrorMessage = New FidelityAppsResponseError() With {.message = "el usuario y/o contraseña no son validos"} + respuesta.IsSucces = False + respuesta.StatusCode = 200 + + Return respuesta + Else + respuesta.ErrorMessage = Nothing + respuesta.IsSucces = True + respuesta.StatusCode = 200 + + Return respuesta + End If + + End Function + + Private Function ConsultaRFC(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 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" + Dim Codigo As String = "-1" + Dim NombreCorto As String = "-1" + Dim RFC As String = JsonRequest("rfc").ToString() + Dim Telefono As String = "-1" + Dim Mail As String = "-1" + + Dim DtSucursales As DataTable = Nothing + + Using ObjClientes As New ClsClientes + If ObjClientes.GetListaSucursales(RFC, CveEmpresa) Then + DtSucursales = ObjClientes.DtResultados.Copy() + End If + End Using + + If DtSucursales IsNot Nothing Then + Try + For Each Row As DataRow In DtSucursales.Rows + Dim objSucursal As New JObject( + New JProperty("Id", Row("CveCliente")), + New JProperty("rfc", Row("RFC")), + New JProperty("name", Row("SucursalCliente")), + New JProperty("phone", Row("Telefono")), + New JProperty("email", Row("Correo")), + New JProperty("address", Row("Direccion")), + New JProperty("int_number", Row("NoInt")), + New JProperty("ext_number", Row("NoExt")), + New JProperty("street", Row("Direccion")), + New JProperty("between_streets", ""), + New JProperty("city", Row("Localidad")), + New JProperty("state", Row("Estado")), + New JProperty("zip_code", Row("CP")), + New JProperty("reference", ""), + New JProperty("Branch_office_code", ""), + New JProperty("Branch_office_name", ""), + New JProperty("Branch_office_id", "") + ) + data.Add(objSucursal) + Next + Catch ex As Exception + TieneError = True + RespuestaError.message = "Ocurrió un error al obtener la sucursales" + End Try + DtSucursales.Dispose() + Else + TieneError = True + End If + + 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 + + If TieneError Then + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(RespuestaError) + Else + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(Respuesta) + End If + End Function + + Private Function ValidarCarrito(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 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 + + 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 + + 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" + End Try + DtSucursalesExistencias.Dispose() + Else + TieneError = True + End If + + Respuesta.data = data + + 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 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 + Dim Resp As New Modelos.Factura.MMensajeFactura + Dim ObjFactura As Modelos.Factura = Nothing + Dim DebeTimbrar As Boolean = False + + Dim ObjClientes As New ClsClientes() + Dim ObjInventario As New ClsInventarios(ObjClientes.IniciaTransacSQL()) + ObjClientes.IniciaTransacSQL() + + Try + If Not String.IsNullOrEmpty(JsonRequest("timbrar").ToString) Then + DebeTimbrar = CBool(JsonRequest("timbrar")) + End If + + ObjFactura = CreaFactura(ObjInventario, 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(ObjInventario As ClsInventarios, 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 JsonRequest("invoice_way_to_pay") Is Nothing Then + Resp.TieneError = False + Resp.Mensajes.Add("Debe asignar una forma de pago") + Return Nothing + End If + + 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())) + If RowFormaPago IsNot Nothing Then + ObjFactura.CveFormaPago33 = RowFormaPago("CveFormaPago").ToString().ToEntero() + ObjFactura.FormaPago33 = RowFormaPago("FormaPago").ToString() + ObjFactura.FormaPagoSAT33 = RowFormaPago("ClaveFormaPagoSAT").ToString() + Else + Resp.TieneError = False + Resp.Mensajes.Add("No se encontro la forma de pago") + Return Nothing + End If + Else + Resp.TieneError = False + Resp.Mensajes.Add("Debe asignar una forma de pago") + Return Nothing + End If + + 'USO CFDi + If JsonRequest("invoice_use") Is Nothing Then + Resp.TieneError = False + Resp.Mensajes.Add("Debe asignar un uso cfdi") + Return Nothing + End If + + If Not String.IsNullOrEmpty(JsonRequest("invoice_use").ToString()) Then + Dim RowUsoCFDi As DataRow = GlobalDTSATUsosCFDI.FiltroPrimero(String.Format("UsoCFDI = '{0}'", JsonRequest("invoice_use").ToString())) + If RowUsoCFDi IsNot Nothing Then + ObjFactura.CveUsoCFDI = RowUsoCFDi("CveUsoCFDI").ToString().ToEntero() + ObjFactura.UsoCFDI = RowUsoCFDi("Descripcion").ToString() + ObjFactura.ClaveUsoCFDI = RowUsoCFDi("UsoCFDI").ToString() + Else + Resp.TieneError = False + Resp.Mensajes.Add("No se encontro el uso cfdi") + Return Nothing + End If + Else + Resp.TieneError = False + Resp.Mensajes.Add("Debe asignar un uso cfdi") + Return Nothing + End If + + 'METODO DE PAGO + If JsonRequest("invoice_payment_method") Is Nothing Then + Resp.TieneError = False + Resp.Mensajes.Add("Debe asignar un método de pago") + Return Nothing + End If + + 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())) + If RowMetodoPago IsNot Nothing Then + ObjFactura.CveMetodoPago33 = RowMetodoPago("CveMetodoPago").ToString().ToEntero() + ObjFactura.MetodoPago33 = RowMetodoPago("MetodoPago").ToString() + ObjFactura.ClaveMetodoPagoSAT = RowMetodoPago("ClaveMetodoPagoSAT").ToString() + Else + Resp.TieneError = False + Resp.Mensajes.Add("No se encontro el método de pago") + Return Nothing + End If + Else + Resp.TieneError = False + Resp.Mensajes.Add("Debe asignar un método de pago") + Return Nothing + End If + + End If + + ObjFactura.CveAlmacen = GlobalDTAlmacen(CveEmpresa, CveTipoAlmacen:=1).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero() + + + + 'DETALLES + ObjFactura.DtDetalle = CreaDTDetalle(ObjInventario, ObjFactura, 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.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 ObjInventarios As ClsInventarios, ObjFactura As Modelos.Factura, 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 JsonPS As JObject In ListaPS + Dim Cantidad As Decimal = JsonPS("quantity").ToString.ToDecimal() + + Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=JsonPS("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", JsonPS("product_sku").ToString())) + Exit For + End If + + 'VALIDAR QUE SEA EL MISMO PRODUCTO + If DrPS("Codigo").ToString() <> JsonPS("product_sku").ToString() Then + Retorno.TieneError = True + Retorno.Mensajes.Add(String.Format("No se pudo agregar el producto/servicio: {0}", DrPS("PS").ToString())) + Exit For + End If + + 'VALIDA EXISTENCIA ANTES DE GENERAR LA FACTURA + If ObjFactura.TipoDocto = "Ing" AndAlso DrPS("CveTipoPS").ToString() = "2" Then + Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(DrPS("CvePS").ToString.ToEntero, DrPS("CveUnidadMedida").ToString.ToEntero, UsuarioActual.CveEmpresa, ObjFactura.CveAlmacen, CveSubProyecto:=ObjFactura.CveSubProyecto, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1) + + If Cantidad > Existencia Then + Retorno.TieneError = True + Retorno.Mensajes.Add(String.Format("No hay existencia suficiente para este producto: {0}, cuenta con : {1}", DrPS("PSCodigo").ToString(), Existencia)) + Exit For + End If + End If + + + Dim TotalOriginal As Decimal = JsonPS("total_cost").ToString.ToDecimal() + + Dim PUOrginal As Decimal = JsonPS("cost").ToString.ToDecimal() + + Dim PorcentajeIVADefault As Decimal = 0.16D + + Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, JsonRequest("branch_office_id").ToEntero(), CveEmpresa:=CveEmpresa).Rows(0) + + If DrSubProyecto IsNot Nothing Then + PorcentajeIVADefault = DrSubProyecto("IVA").ToString().ToDecimal() + Else + PorcentajeIVADefault = 0.16D + End If + + 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:=ObjFactura.CveSubProyecto, 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}", DrPS("PSCodigo").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 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 + Dim Resp As New Modelos.Factura.MMensajeFactura + Dim ObjClientes As New ClsClientes() + Dim ObjInventario As New ClsInventarios(ObjClientes.IniciaTransacSQL()) + + Try + Dim ObjFactura = CreaFactura(ObjInventario, 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() + ObjInventario.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 + + Private Function GetSucursales(ByVal context As HttpContext) As String + Dim Respuesta As New FidelityAppsResponse + Dim RespuestaError As New FidelityAppsResponseError + Dim TieneError As Boolean = False + + Dim data As New JArray + + Dim DtSucursales As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=CveEmpresa).FiltraParametros("EsSucursal = True") + If DtSucursales IsNot Nothing Then + Try + For Each Row As DataRow In DtSucursales.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 + DtSucursales.Dispose() + Else + TieneError = True + End If + + Respuesta.data = data + + If TieneError Then + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(RespuestaError) + Else + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(Respuesta) + End If + End Function + Private Function GetExistencia(ByVal context As HttpContext, Codigo As String) As String Dim respuesta = New With {.isSuccess = False, .message = "", .products = New JArray} If String.IsNullOrEmpty(Codigo) OrElse Codigo = "-1" Then respuesta.message = "el parametro 'Sku' es invalido" - respuesta.isSuccess = False + Respuesta.isSuccess = False Return JsonConvert.SerializeObject(respuesta) End If @@ -156,7 +1608,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 @@ -164,7 +1616,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 @@ -735,4 +2187,27 @@ Public Class E141 : Implements IHttpHandler End If 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 + End Class + + Private Class FidelityAppsResponseError + Sub New() + status = "error" + End Sub + Public Property status As String + Public Property message As String + End Class + + Private Class AuthMessage + Public Property IsSucces As Boolean + Public Property ErrorMessage As FidelityAppsResponseError + Public Property StatusCode As Integer + End Class + End Class \ No newline at end of file diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index bf115dfad..fc91d55d9 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -114,9 +114,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas { if (!IsPostBack) { - UsaComplementaria = false; - CveMonedaCuentaPago = 0; - if (UsuarioActual.CveEmpresa.Contiene(1, 119)) { UsaComplementaria = true; } + UsaComplementaria = true; + CveMonedaCuentaPago = 0; rowComisiones.Visible = UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122); CargaTipoTransaccion(); diff --git a/Bin/GoCfdi.dll b/Bin/GoCfdi.dll index 2aedb7722..e7555acea 100644 Binary files a/Bin/GoCfdi.dll and b/Bin/GoCfdi.dll differ diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 7a06ef3a6..e0306b3b0 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -18072,6 +18072,11 @@ Partial Class Compras_Compras Dim CveProyecto = If(DdlProyecto.SelectedValue.ToEntero > 0, DdlProyecto.SelectedValue.ToEntero, -1) DdlSubProyecto.Items.Clear() + 'SI NO SE VE EL PROYECTO NO FILTRAR POR PROYECTO + If Not DdlProyecto.Visible Then + CveProyecto = -1 + End If + DdlSubProyecto.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, CveProyecto, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(CveProyecto, -1, UsuarioActual.CveEmpresa, 1)) DdlSubProyecto.DataBind() diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 6bae061c3..9ec3b4e3e 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -13,7 +13,8 @@ Imports Stimulsoft.Report Imports Stimulsoft.Report.Components Imports Stimulsoft.Report.Dictionary Imports Stimulsoft.Report.Web - +Imports Newtonsoft.Json.Linq + Partial Class PopUpVerFactura Inherits ClsPaginas @@ -495,8 +496,17 @@ Partial Class PopUpVerFactura 'PDF AJUSTE If UrlParametros("OP").ToString = "AJUSTE" Then + 'SI YA ESTA GUARDADO If UrlParametros("CVEGARANTIADETALLE") IsNot Nothing Then - ImprimirPDFAjuste(UrlParametros("CVEGARANTIADETALLE").ToString.ToEntero) + ImprimirPDFAjuste(UrlParametros("CVEGARANTIADETALLE").ToString.ToEntero) + Else + ImprimirPDFAjuste(CvePSAjuste:=UrlParametros("CVEPSAJUSTE").ToString.ToEntero(), CveCliente:=UrlParametros("CVECLIENTE").ToString.ToEntero(), + CveClienteDistribuidor:=UrlParametros("CVECLIENTEDISTRIBUIDOR").ToString.ToEntero(), Consec:=UrlParametros("CONSEC").ToString, + FolioGarantia:=UrlParametros("FOLIOGARANTIA").ToString, FechaAjuste:=UrlParametros("FECHAAJUSTE").ToString.ToDateTime(), FechaReclamacion:=UrlParametros("FECHARECLAMACION").ToString.ToDateTime(), + TipoDefecto:=UrlParametros("TIPODEFECTO").ToString, CveTipoUso:=UrlParametros("CVETIPOUSO").ToString.ToEntero(), CodigoEnsamble:=UrlParametros("CODIGOENSAMBLE").ToString, + CodigoLinea:=UrlParametros("CODIGOLINEA").ToString, CodigoInspeccion:=UrlParametros("CODIGOINSPECCION").ToString, PorcentajeAjuste:=UrlParametros("PORCENTAJEAJUSTE").ToString, + BCIAjuste:=UrlParametros("BCIAJUSTE").ToString, Etiqueta:=UrlParametros("ETIQUETA").ToString, Año:=UrlParametros("AÑO").ToString, Comprobante:=UrlParametros("COMPROBANTE").ToString, + ModeloAuto:=UrlParametros("MODELOAUTO").ToString, MarcaAuto:=UrlParametros("MARCAAUTO").ToString, CodigoTD:=UrlParametros("CODIGOTD").ToString) End If End If @@ -4696,7 +4706,135 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("LogoPath", "")) End If - ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF") + ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF", Content_Disposition:="inline") + End Sub + + Private Sub ImprimirPDFAjuste(CvePSAjuste As Integer, CveCliente As Integer, CveClienteDistribuidor As Integer, Consec As String, FolioGarantia As String, FechaAjuste As DateTime, FechaReclamacion As DateTime, + TipoDefecto As String, CveTipoUso As Integer, CodigoEnsamble As String, CodigoLinea As String, CodigoInspeccion As String, PorcentajeAjuste As String, + BCIAjuste As String, Etiqueta As String, Año As String, Comprobante As String, ModeloAuto As String, MarcaAuto As String, CodigoTD As String) + + Dim MesesUso As String = "0" + + Dim MarcaPS As String = "" + Dim CveMarca As Integer = -1 + + Dim FechaI As Date = FechaAjuste.AddDays(1) + Dim FechaF As Date = FechaReclamacion + + Dim Dia As Integer = FechaI.Day + Try + 'validación adicional, para saber si el mes tiene 31 días y el actua es menor. + If FechaI.Day > Today.LastDayOfMonth.Day Then Dia = Today.LastDayOfMonth.Day + Dim FechaT As Date = String.Format("{0}/{1}/{2}", Dia, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual + + Dim MesesTrascurridos As Integer = Math.Round(DateDiff(DateInterval.Day, FechaI, FechaT) / 30.4, 2).ToEntero 'saco los meses y lo redondeo + + If FechaT > FechaF Then + 'todavía está en el mes actual. + MesesTrascurridos = MesesTrascurridos + Else + MesesTrascurridos = MesesTrascurridos + 1 + End If + + MesesUso = MesesTrascurridos.ToString + + Catch ex As Exception + OnError("Ocurrió un error al calcular los meses de uso", ex) + End Try + + + Dim ObjPS As New ClsProductosServicios + If ObjPS.GetPS(CvePSAjuste, -1, UsuarioActual.CveEmpresa) Then + MarcaPS = ObjPS.DtResultados.FiltroPrimeroValor("Marca", String.Format("CvePS = {0}", CvePSAjuste)) + End If + ObjPS.Dispose() + + 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 DtDatos As New DataTable + + Dim params As New List(Of ReportParameter) + + + 'Informacion Distribuidor + If (CveClienteDistribuidor > 0) Then + + Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", CveClienteDistribuidor)) + Dim CiudadEstado As String = "" + Dim Telefono As String = "" + Dim Nombre As String = "" + + If DatosClienteSeleccionado IsNot Nothing Then + CiudadEstado = String.Format("{0}, {1}", DatosClienteSeleccionado("Ciudad"), DatosClienteSeleccionado("Estado")) + Telefono = DatosClienteSeleccionado("Telefono").ToString + Nombre = DatosClienteSeleccionado("Nombre").ToString + End If + + params.Add(New ReportParameter("NombreDistribuidor", Nombre)) + params.Add(New ReportParameter("CiudadEstado", CiudadEstado)) + params.Add(New ReportParameter("TelCliente", Telefono)) + End If + + + params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("Consec", Consec)) + params.Add(New ReportParameter("FolioAcuse", FolioGarantia)) + + 'Informacion de Garantia o ajuste + params.Add(New ReportParameter("FechaInst", FechaAjuste.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("Fecha", FechaReclamacion.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("Defecto", TipoDefecto)) + params.Add(New ReportParameter("MesesUso", MesesUso)) + params.Add(New ReportParameter("PorcentajeAjuste", PorcentajeAjuste)) + + 'Informacion Acumulador + params.Add(New ReportParameter("CodEnsamble", CodigoEnsamble)) + params.Add(New ReportParameter("CodLinea", CodigoLinea)) + params.Add(New ReportParameter("CodInspeccion", CodigoInspeccion)) + params.Add(New ReportParameter("Tipo", BCIAjuste)) + params.Add(New ReportParameter("Marca", MarcaPS)) + params.Add(New ReportParameter("Etiqueta", Etiqueta)) + + 'Informacion Vehiculo + params.Add(New ReportParameter("MarcaAuto", MarcaAuto)) + params.Add(New ReportParameter("TipoAuto", ModeloAuto)) + + 'Informacion Consumidor + If (CveCliente > 0) Then + + Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", CveCliente)) + + Dim Nombre As String = "" + Dim Ciudad As String = "" + Dim Estado As String = "" + Dim Direccion As String = "" + Dim Telefono As String = "" + + If DatosClienteSeleccionado IsNot Nothing Then + Nombre = DatosClienteSeleccionado("Nombre").ToString + Ciudad = DatosClienteSeleccionado("Ciudad").ToString + Estado = DatosClienteSeleccionado("Estado").ToString + Direccion = DatosClienteSeleccionado("Direccion").ToString + Telefono = DatosClienteSeleccionado("Telefono").ToString + End If + + params.Add(New ReportParameter("NombreCliente", Nombre)) + params.Add(New ReportParameter("Direccion", Direccion)) + params.Add(New ReportParameter("CiudadEstadoConsumidor", String.Format("{0}, {1}", Ciudad, Estado))) + params.Add(New ReportParameter("TelConsumidor", Telefono)) + End If + + params.Add(New ReportParameter("Anio", Año)) + params.Add(New ReportParameter("Comprobante", Comprobante)) + params.Add(New ReportParameter("CodigoTD", CodigoTD)) + + If Imagen.Exists Then + params.Add(New ReportParameter("LogoPath", logouri)) + Else + params.Add(New ReportParameter("LogoPath", "")) + End If + + ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF", Content_Disposition:="inline") End Sub #End Region diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index f43caaa7a..87dd131f3 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -425,7 +425,7 @@ Partial Class Compras_ReembolsosComprobaciones End If Dim UsaSimplificacionCajaChica As Boolean = False - If UsuarioActual.CveEmpresa = 119 Then UsaSimplificacionCajaChica = True + If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaSimplificacionCajaChica = True @@ -446,7 +446,7 @@ Partial Class Compras_ReembolsosComprobaciones CveIERegistrado = DDlCheques.SelectedValue.ToEntero - If UsuarioActual.CveEmpresa.Contiene(119) Then + If UsuarioActual.CveEmpresa.Contiene(119, 158) Then CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones1", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CveCajaChica > 0 Then @@ -710,7 +710,7 @@ Partial Class Compras_ReembolsosComprobaciones If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal) Else PorcentajePago = 1 - If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119)) Then + If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158)) Then 'Si es caja chica metemos el concepto 30, si es funcionario metemos 29 If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then MsgError = "Detalle" diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 025f8b42a..659597ce7 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -189,7 +189,10 @@ public partial class Contabilidad_RepIVA : ClsPaginas if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = "-1"; } else { FechaF = $" Fecha Final: {txtFechaF.Text}"; } String FechaI; if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = "-1"; } else { FechaI = $" Fecha Inicial: {txtFechaI.Text}"; } - if (DtIVATrasladado.Rows.Count > 0 || DtIVAAcreditable.Rows.Count > 0) + String TipoMov; + if (DdlTipoMovto.SelectedItem.Text == "Todos") { TipoMov = ""; } else { TipoMov = $" Tipo Movimiento: {DdlTipoMovto.SelectedItem.Text}"; } + + if (GvT.Rows.Count > 0 || GvA.Rows.Count > 0) { System.IO.FileInfo Imagen; String logouri = ""; @@ -208,7 +211,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas List para = new List(); para.Add(new CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa)); para.Add(new CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new CrystalParametro("Filtros", $"Filtros: {FechaI}{FechaF}")); + para.Add(new CrystalParametro("Filtros", $"Filtros: {FechaI}{FechaF}{TipoMov}")); if (Imagen.Exists) { para.Add(new CrystalParametro("LogoPath", logouri)); diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index cc658606f..992646e1b 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -693,7 +693,7 @@ Partial Class Contratos_Default CargaConvenioPrecioFijo() End If - If UsuarioActual.CveEmpresa = 72 And DdlTipoContrato.SelectedValue.Contiene("7", "8", "10", "13", "28") Then + If UsuarioActual.CveEmpresa = 72 And DdlTipoContrato.SelectedValue.Contiene("7", "8", "9", "10", "13", "28") Then GetNoContratoNuevo() End If @@ -4446,8 +4446,8 @@ Partial Class Contratos_Default Dim TipoContrato As Integer = DdlTipoContrato.SelectedValue.ToEntero() - Dim SufijoContrato As String = "" - + Dim SufijoContrato As String = "" + Select Case TipoContrato Case 7 'Contrato Comodato SufijoContrato = "COMODATO" diff --git a/Empresas/119/Formatos/Nomina.rdlc b/Empresas/119/Formatos/Nomina.rdlc index 23240a972..84d07c8ba 100644 --- a/Empresas/119/Formatos/Nomina.rdlc +++ b/Empresas/119/Formatos/Nomina.rdlc @@ -179,7 +179,7 @@ Clave @@ -213,7 +213,7 @@ Concepto @@ -247,7 +247,7 @@ Importe @@ -262,7 +262,7 @@ @@ -656,8 +656,8 @@ DsOC - 8.8134cm - 0.14687cm + 7.70215cm + 0.15979cm 2.05138cm 10.0953cm @@ -773,7 +773,7 @@ Concepto @@ -807,7 +807,7 @@ Importe @@ -822,7 +822,7 @@ @@ -1100,7 +1100,6 @@ es-MX - true @@ -1235,8 +1234,8 @@ DataSet1 - 8.8156cm - 10.24218cm + 7.70435cm + 10.2551cm 2.05606cm 9.79494cm 1 @@ -1246,474 +1245,6 @@ - - - - Database - =First(Fields!ImagenByte.Value, "dsImagenes") - image/png - FitProportional - 0.27213in - 0.20622in - 1.30194in - 1.48366in - - - - - - - - - 7.3669cm - - - 7.37355cm - - - - - 0.6cm - - - - - true - true - - - - - Éste documento es una representación impresa de un CFDi - - - - - - - Textbox258 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - Sello digital del emisor - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - =Parameters!SelloDigitalEmisor.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - Sello dígital del SAT: - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - =Parameters!SelloDigitalSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - Cadena Original del timbre - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.57354cm - - - - - true - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.44125cm - - - - - true - true - - - - - Versión del comprobante: 3.3 - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Versión del complemento: 1.2 - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Usos del CFDI "P01"(Por definir) - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - dsImagenes - 0.11768cm - 5.05803cm - 5.21479cm - 14.74045cm - 1 - - - - - - true - 13.41609cm - 0.14687cm - 5.61496cm - 19.90317cm - 2 - - - - true true @@ -1738,7 +1269,7 @@ AJA850608L7A @@ -1769,7 +1300,7 @@ =Parameters!RegistroPatronal.Value @@ -1833,7 +1364,7 @@ Lugar de expedición: 83220 Hermosillo - 0.49417cm + 0.38834cm @@ -1847,7 +1378,7 @@ Lugar de expedición: 83220 Hermosillo @@ -1915,7 +1446,7 @@ Lugar de expedición: 83220 Hermosillo SubTotal @@ -1977,7 +1508,7 @@ Lugar de expedición: 83220 Hermosillo - 0.52062cm + 0.44125cm @@ -1991,7 +1522,7 @@ Lugar de expedición: 83220 Hermosillo Folio Fiscal @@ -2059,7 +1590,7 @@ Lugar de expedición: 83220 Hermosillo Descuentos @@ -2094,7 +1625,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!Descuentos.Value @@ -2121,7 +1652,7 @@ Lugar de expedición: 83220 Hermosillo - 0.6cm + 0.44125cm @@ -2135,7 +1666,7 @@ Lugar de expedición: 83220 Hermosillo No. Certificado del SAT @@ -2170,7 +1701,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!CertificadoSAT.Value @@ -2203,7 +1734,7 @@ Lugar de expedición: 83220 Hermosillo Retenciones @@ -2243,7 +1774,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!ISR.Value @@ -2274,7 +1805,7 @@ Lugar de expedición: 83220 Hermosillo - 0.6cm + 0.44125cm @@ -2288,7 +1819,7 @@ Lugar de expedición: 83220 Hermosillo Fecha de certificación @@ -2355,7 +1886,7 @@ Lugar de expedición: 83220 Hermosillo TOTAL @@ -2389,6 +1920,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!Total.Value @@ -2432,2437 +1964,11 @@ Lugar de expedición: 83220 Hermosillo DsOC - 10.97749cm - 0.14687cm - 2.21479cm + 9.86624cm + 0.15979cm + 1.71208cm 19.89025cm - 4 - - - - - - - - - 2.2642cm - - - 2.11107cm - - - 2.2102cm - - - 2.57342cm - - - 4.85068cm - - - 2.633cm - - - 3.2606cm - - - - - 0.49417cm - - - - - true - true - - - - - DATOS DEL EMPLEADO - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 7 - - - - - - - - - - - - 0.46771cm - - - - - true - true - - - - - No Empleado - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!NoEmpleado.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Nombre - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!NombreCompleto.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - NSS - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!NSS.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - RFC - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!RFC.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - Régimen - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Regimen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Departamento - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Departamento.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - CURP - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!CURP.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - Riesgo Puesto - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!RiesgoPuesto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Puesto - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Puesto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - INFORMACION LABORAL - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 7 - - - - - - - - - - - - 0.4677cm - - - - - true - true - - - - - Contrato - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Contrato.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - Jornada - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Jornada.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Salario Base - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!SalarioBase.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.52062cm - - - - - true - true - - - - - Dias Pagados - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!DiasPagados.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - Periodo - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Periodo.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Salario Diario Int - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!SalarioDiarioInt.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - Fecha ingreso - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FechaIngreso.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44124cm - - - - - true - true - - - - - PAGO - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 7 - - - - - - - - - - - - 0.44125cm - - - - - true - true - - - - - Banco - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Banco.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - Método de Pago - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!MetodoPago.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha Inicio - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FechaInicio.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.49417cm - - - - - true - true - - - - - CLABE - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!CLABE.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - Forma de Pago - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FormaPago.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha Fin - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FechaFin.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44125cm - - - - - true - true - - - - - Clave - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cantidad - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Unidad - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Moneda - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Precio Unit. - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.49416cm - - - - - true - true - - - - - =Parameters!Clave.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Cantidad.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Unidad.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - MXN - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Descripcion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!PU.Value - - - - - - - Textbox103 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Parameters!Importe.Value - - - - - - - Textbox110 - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DsOC - 2.58974cm - 0.14687cm - 6.13311cm - 19.90317cm - 5 + 3 @@ -4877,7 +1983,7 @@ Lugar de expedición: 83220 Hermosillo 0.29576cm 2.1513cm 3.93798cm - 6 + 4 @@ -4896,7 +2002,7 @@ Lugar de expedición: 83220 Hermosillo - 0.6cm + 0.51659cm @@ -4909,7 +2015,7 @@ Lugar de expedición: 83220 Hermosillo Recibo Nómina @@ -4944,7 +2050,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!ReciboNomina.Value @@ -4969,7 +2075,7 @@ Lugar de expedición: 83220 Hermosillo - 0.6cm + 0.50702cm @@ -4983,7 +2089,7 @@ Lugar de expedición: 83220 Hermosillo Serie @@ -5018,7 +2124,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!Serie.Value @@ -5058,7 +2164,7 @@ Lugar de expedición: 83220 Hermosillo Fecha @@ -5092,7 +2198,7 @@ Lugar de expedición: 83220 Hermosillo =Parameters!Fecha.Value @@ -5131,7 +2237,7 @@ Lugar de expedición: 83220 Hermosillo Tipo de comprobante @@ -5164,7 +2270,9 @@ Lugar de expedición: 83220 Hermosillo N - @@ -5241,7 +2349,7 @@ Lugar de expedición: 83220 Hermosillo Recibí de la empresa arriba mencionada, la cantidad neta a que este documento, se refiere, estando conforme con las Percepciones y deducciones que en el aparecen especificados. @@ -5259,37 +2367,10 @@ Lugar de expedición: 83220 Hermosillo 2pt + 2 - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - + @@ -5444,10 +2525,464 @@ Lugar de expedición: 83220 Hermosillo DsOC - 19.20744cm - 0.14687cm + 17.07534cm + 0.15979cm 1.12062cm 19.89024cm + 6 + + + + + + Database + =First(Fields!ImagenByte.Value, "dsImagenes") + image/png + FitProportional + 4.64173in + 0.068in + 1.30194in + 1.48366in + 7 + + + + + + + + + 7.90238cm + + + 8.04297cm + + + + + 0.6cm + + + + + true + true + + + + + Éste documento es una representación impresa de un CFDi + + + + + + + Textbox258 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Sello digital del emisor + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!SelloDigitalEmisor.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Sello dígital del SAT: + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!SelloDigitalSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Cadena Original del timbre + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.57354cm + + + + + true + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.44125cm + + + + + true + true + + + + + Versión del comprobante: 3.3 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Versión del complemento: 1.2 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Usos del CFDI "P01"(Por definir) + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + dsImagenes + 11.78999cm + 4.13053cm + 5.21479cm + 15.94535cm 8 + + + + + 2.2642cm + + + 2.11107cm + + + 2.2102cm + + + 2.57342cm + + + 2.70756cm + + + 2.08963cm + + + 2.633cm + + + 3.2606cm + + + + + 0.49417cm + + + + + true + true + + + + + DATOS DEL EMPLEADO + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 8 + + + + + + + + + + + + + 0.41479cm + + + + + true + true + + + + + No Empleado + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NoEmpleado.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Nombre + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NombreCompleto.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + NSS + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NSS.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38834cm + + + + + true + true + + + + + RFC + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!RFC.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Régimen + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Regimen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Departamento + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Departamento.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38834cm + + + + + true + true + + + + + CURP + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!CURP.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Riesgo Puesto + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!RiesgoPuesto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Puesto + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Puesto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + + + true + true + + + + + INFORMACION LABORAL + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 8 + + + + + + + + + + + + + 0.38832cm + + + + + true + true + + + + + Jornada + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Jornada.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Contrato + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Contrato.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Periodo + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Periodo.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38833cm + + + + + true + true + + + + + Dias Pagados + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!DiasPagados.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha ingreso + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FechaIngreso.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Salario Base + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SalarioBase.Value + + + + + + + Textbox166 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Salario Diario Int + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SalarioDiarioInt.Value + + + + + + + Textbox159 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44124cm + + + + + true + true + + + + + PAGO + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 8 + + + + + + + + + + + + + 0.36187cm + + + + + true + true + + + + + Banco + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Banco.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Método de Pago + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!MetodoPago.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Fecha Inicio + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FechaInicio.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38834cm + + + + + true + true + + + + + CLABE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!CLABE.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Forma de Pago + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FormaPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Fecha Fin + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FechaFin.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38833cm + + + + + true + true + + + + + Clave + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cantidad + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Moneda + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Precio Unit. + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49416cm + + + + + true + true + + + + + =Parameters!Clave.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Cantidad.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Unidad.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + MXN + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Descripcion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + =Parameters!PU.Value + + + + + + + Textbox103 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Parameters!Importe.Value + + + + + + + Textbox110 + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DsOC + 2.51578cm + 0.15979cm + 5.0304cm + 19.84967cm + 9 + + + + - 20.50445cm + 18.41425cm - - - - - - Textbox9 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Inicial - - - - - - - Textbox1 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - E.Alm - - - - - - - Textbox29 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - E.Pub - - - - - - - Textbox13 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - E.Tras - - - - - - - Textbox27 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - E.Compras - - - - - - - Textbox15 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Otrs. - - - - - - - Textbox17 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - S.Alm - - - - - - - Textbox5 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - S.Trasp - - - - - - - Textbox8 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Otrs - - - - - - - Textbox11 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Exist Actual - - - - - - - Textbox41 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.58521cm - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - TipoAgrupador - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!E_Almacen.Value - - - - - - - E_Almacen - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - Paqueteria1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!E_Traspaso.Value - - - - - - - E_Traspaso - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!E_Compra.Value - - - - - - - E_Compra - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - Fecha - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!S_Almacen.Value - - - - - - - S_Almacen - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!S_Traspaso.Value - - - - - - - S_Traspaso - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - Textbox16 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - 0 - - - - - - - Textbox42 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet1 - 0.95278cm - 0.08377cm - 1.2148cm - 20.61569cm - - - - - - true - true - - - - - Entradas - - - - - - - Textbox37 - 0.17639cm - 3.02491cm - 0.6cm - 10.33589cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Salidas - - - - - - - Textbox38 - 0.17639cm - 13.43136cm - 0.6cm - 7.2681cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - 0.9799in - - - - - 8.2362in - - - 3.1764cm - true - true - - - Embedded - Logo - Fit - 0.09927in - 0.10752in - 0.99993in - 1.6045in - - - - - - true - true - - - - - BDH BATERÍAS DISTRIBUCIONES DE - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tarjeta de Almacén Del - - - - =Parameters!FechaInicial.Value - - - - Al - - - - =Parameters!FechaFinal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaConFormato.Value - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Globals!PageNumber - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.727cm - true - true - - - 0.127cm - 0.01325cm - 0cm - 20.90669cm - - - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 0.5cm - 1cm - 0.13cm - + + + + + + Textbox9 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Inicial + + + + + + + Textbox1 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Alm + + + + + + + Textbox29 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Pub + + + + + + + Textbox13 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Tras + + + + + + + Textbox27 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Compras + + + + + + + Textbox15 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Otrs. + + + + + + + Textbox17 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + S.Alm + + + + + + + Textbox5 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + S.Trasp + + + + + + + Textbox8 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Otrs + + + + + + + Textbox11 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Exist Actual + + + + + + + Textbox41 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.58521cm + + + + + true + true + + + + + =Fields!CodigoPS.Value + + + + + + + CodigoPS + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + TipoAgrupador + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!E_Almacen.Value + + + + + + + E_Almacen + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Paqueteria1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!E_Traspaso.Value + + + + + + + E_Traspaso + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!E_Compra.Value + + + + + + + E_Compra + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!S_Almacen.Value + + + + + + + S_Almacen + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!S_Traspaso.Value + + + + + + + S_Traspaso + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Textbox16 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Textbox42 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 0.10583cm + 0.08377cm + 1.2148cm + 20.80089cm + + + + + + 0.51993in + + + + + 8.2362in + + + 3.54682cm + true + true + + + Embedded + Logo + Fit + 0.09927in + 0.10752in + 0.99993in + 1.6045in + + + + + + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tarjeta de Almacén Del + + + + =Parameters!FechaInicial.Value + + + + Al + + + + =Parameters!FechaFinal.Value + + + + + + + Textbox4 + 2.84098cm + 5.75736cm + 0.6cm + 10.1061cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Almacen.Value + + + + + + + Textbox4 + 2.09987cm + 5.75736cm + 0.6cm + 10.1061cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Direccion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 1.01804cm + true + true + + + 0.12694cm + 0.01325cm + 0cm + 20.90669cm + + + + + + true + true + + + + + Usuario imprimio: + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha impresión: + + + + =Parameters!FechaConFormato.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Pagina: + + + + =Globals!PageNumber + + + + PageNumber + 0.30333cm + 16.84241cm + 0.6cm + 4.00442cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + - - - 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 + - - true - true - - - - - =Parameters!AgrupadoPor.Value - HTML - - - - - - - Textbox1 - 0.07056cm - 0.06614cm - 0.58236cm - 19.58715cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - 0.79506in + 0.45131in @@ -912,7 +876,7 @@ 0.63528cm 2.40329cm 0.52945cm - 14.68354cm + 15.70187cm 1 + + true + true + + + + + =Parameters!AgrupadoPor.Value + HTML + + + + + + + Textbox3 + 2.31154cm + 0.03086cm + 0.6cm + 18.03902cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + - Textbox3 - 0.40041cm - 16.97887cm + Textbox31 + 0.43569cm + 16.03929cm 0.68085cm 2.06587cm + + + + + + 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 @@ -660,6 +950,9 @@ + + + @@ -679,8 +972,8 @@ DataSet1 0.17639cm 0.24474cm - 0.90897cm - 25.65193cm + 1.0148cm + 24.21186cm @@ -691,7 +984,7 @@ 0.67394in @@ -766,7 +1059,7 @@ Textbox2 1.07625cm 0.52945cm - 25.89667cm + 24.4566cm 1 - - - - - - - - - - - - - - - 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 - 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 - - - - - 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 - 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 - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.05159in - 0.29332cm - 2.09585cm - 21.10052cm - 4 - - - - - - true - true - - - - - =Parameters!NombreEmpresa.Value - - - - - - - Textbox1 - 1.97368cm - 0.29332cm - 0.6cm - 21.10052cm - 5 - - - 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 - - - - true - true - - - - - - - - - =Globals!PageNumber - - - - de - - - - =Globals!TotalPages - - - - - - 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 + + + + 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 + - - -
  • - - Volver a Consultar - -
  • -
    - -
    - - - - - - + + +
    + + - - - + + + + diff --git a/GPS/RepGeoReferencias.aspx.vb b/GPS/RepGeoReferencias.aspx.vb index b322bcf74..3c4c9a164 100644 --- a/GPS/RepGeoReferencias.aspx.vb +++ b/GPS/RepGeoReferencias.aspx.vb @@ -12,6 +12,14 @@ Partial Class GPS_RepGeoReferencias Set(value As Integer) ViewState("CveGeoReferencia") = value End Set + End Property + Private Property DtGeoReferencias As DataTable + Get + Return CType(ViewState("DtGeoReferencias"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtGeoReferencias") = value + End Set End Property Private Property DtPosiciones As DataTable Get @@ -49,13 +57,27 @@ Partial Class GPS_RepGeoReferencias Private Sub CargaGeoReferencias() Dim Estatus = If(ChkEstatusGeocerca.Checked, 1, 0) - Dim GPS As New ClsGPS - If GPS.GeoReferenciaGet(-1, Estatus, "-1", UsuarioActual.CveCliente) Then - GVGeoreferencias.DataSource = GPS.DtResultados - Else - GVGeoreferencias.DataSource = Nothing + + Using GPS As New ClsGPS + If GPS.GeoReferenciaGet(-1, Estatus, "-1", UsuarioActual.CveCliente) Then + DtGeoReferencias = GPS.DtResultados.Copy() + End If + End Using + + If DtGeoReferencias IsNot Nothing Then + Dim TotalRegistros As Integer = DtGeoReferencias.Rows.Count + Dim TotalRowsPage As Integer = GVGeoreferencias.PageSize + If TotalRegistros > TotalRowsPage Then + GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(0, TotalRowsPage - 1) + DivPaginacion.Visible = True + LblRegistros.Text = $"Distribución de datos desde 0 hasta {TotalRowsPage.ToString().ToDecimal().FormatoNumero(0)}. Total de registros: {TotalRegistros.ToString().ToDecimal().FormatoNumero(0)}" + Else + GVGeoreferencias.DataSource = DtGeoReferencias + End If + Else + GVGeoreferencias.DataSource = DtGeoReferencias End If - GPS.Dispose() + GVGeoreferencias.DataBind() End Sub Private Sub CargaDispositivos() @@ -190,16 +212,11 @@ Partial Class GPS_RepGeoReferencias TxtHoraF.Text = GvRow.DataKey("HoraFin").ToString.ToDateTime.ToString("HH:mm") Using ObjGPS As New ClsGPS - If ObjGPS.GetReferenciaDetalle(-1, CveGeoReferencia, -1, UsuarioActual.CveCliente) Then - If ObjGPS.DtResultados.Rows.Count > 0 Then - DtDetalle = ObjGPS.DtResultados - GvEquiposDetalle.DataSource = DtDetalle - Else - DtDetalle = Nothing - DtDetalleEliminar = Nothing - GvEquiposDetalle.DataSource = Nothing - End If - + If ObjGPS.GetReferenciaDetalle(-1, CveGeoReferencia, -1, UsuarioActual.CveCliente) Then + DtDetalle = ObjGPS.DtResultados.Copy() + DtDetalleEliminar = ObjGPS.DtResultados.Copy() + + GvEquiposDetalle.DataSource = DtDetalle End If End Using GvEquiposDetalle.DataBind() @@ -239,27 +256,22 @@ Partial Class GPS_RepGeoReferencias Dim HoraF As Date = ($"{Date.Now.ToString("dd/MM/yyyy")} {TxtHoraF.Text}").ToDate If ObjGPS.GeoReferenciaUpdate(CveGeoReferencia, TxtNombre.Text, -1, chkEstatus.Checked, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, chkLunes.Checked, chkMartes.Checked, chkMiercoles.Checked, chkJueves.Checked, chkViernes.Checked, - chkSabado.Checked, chkDomingo.Checked, HoraI, HoraF, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then - - For Each Dr As DataRow In DtDetalle.Rows - Dim CveGeoReferenciaDetalle = Dr("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero - If CveGeoReferenciaDetalle > 0 Then - If Not ObjGPS.UpdateReferenciaDetalle(CveGeoReferenciaDetalle, CveGeoReferencia, Dr("CveDispositivo").ToString.ToEntero) Then - TieneError = True - Exit For - End If - Else - If Not ObjGPS.AddGeoReferenciaDetalle(CveGeoReferencia, Dr("CveDispositivo").ToString.ToEntero) Then - TieneError = True - Exit For - End If - End If - Next + chkSabado.Checked, chkDomingo.Checked, HoraI, HoraF, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then If Not TieneError Then For Each DrE As DataRow In DtDetalleEliminar.Rows - TieneError = Not ObjGPS.RemoveferenciaDetalle(DrE("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero) + If DrE("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero > 0 Then + TieneError = Not ObjGPS.RemoveferenciaDetalle(DrE("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero) + End If Next End If + + For Each Dr As DataRow In DtDetalle.Rows + If Not ObjGPS.AddGeoReferenciaDetalle(CveGeoReferencia, Dr("CveDispositivo").ToString.ToEntero) Then + TieneError = True + Exit For + End If + Next + Else TieneError = True End If @@ -336,14 +348,15 @@ Partial Class GPS_RepGeoReferencias Dim Dr As DataRow = DtDetalle.Rows(e.RowIndex) Dim CveGeoReferenciaDetalle = Dr("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero If CveGeoReferenciaDetalle > 0 Then - - Dim DrEliminar = DtDetalleEliminar.NewRow - DrEliminar("CveDispositivoGeoreferenciaDetalle") = CveGeoReferenciaDetalle - DrEliminar("CveDispositivo") = Dr("CveDispositivo").ToString.ToEntero - DrEliminar("NoEconomico") = Dr("NoEconomico").ToString - DtDetalleEliminar.Rows.Add(DrEliminar) - DtDetalleEliminar.AcceptChanges() - + If DtDetalleEliminar.COUNT("CveDispositivo", $"CveDispositivoGeoreferenciaDetalle={CveGeoReferenciaDetalle}") <= 0 Then + Dim DrEliminar = DtDetalleEliminar.NewRow + DrEliminar("CveDispositivoGeoreferenciaDetalle") = CveGeoReferenciaDetalle + DrEliminar("CveDispositivo") = Dr("CveDispositivo").ToString.ToEntero + DrEliminar("NoEconomico") = Dr("NoEconomico").ToString + DtDetalleEliminar.Rows.Add(DrEliminar) + DtDetalleEliminar.AcceptChanges() + End If + End If DtDetalle.Rows.RemoveAt(e.RowIndex) @@ -415,5 +428,63 @@ Partial Class GPS_RepGeoReferencias Protected Sub ChkEstatusGeocerca_CheckedChanged(sender As Object, e As EventArgs) CargaGeoReferencias() + End Sub + + Protected Sub btnPagePrev_Click(sender As Object, e As EventArgs) + Dim TotalRegistros As Integer = DtGeoReferencias.Rows.Count + Dim TotalRowsPage As Integer = GVGeoreferencias.PageSize + Dim PrevIndex As Integer = HdnIndexPage.Value.ToEntero - 1 + Dim CurrentIndex As Integer = PrevIndex + 1 + + Dim PrevIndexDT As Integer = (TotalRowsPage) * PrevIndex + Dim CurrentIndexDT As Integer = (TotalRowsPage) * CurrentIndex + + HdnIndexPage.Value = PrevIndex.ToString + + If Not btnPageNext.Enabled Then + btnPageNext.Enabled = True + End If + + If PrevIndexDT <= 0 Then + btnPagePrev.Enabled = False + GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(0, CurrentIndexDT) + LblRegistros.Text = $"Distribución de datos desde 0 hasta {CurrentIndexDT.ToString.FormatoNumero(0)}. Total de registros: {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}" + Else + LblRegistros.Text = $"Distribución de datos desde {PrevIndexDT.ToString.FormatoNumero(0)} hasta {CurrentIndexDT.ToString.FormatoNumero(0)}. Total de registros: {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}" + GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(PrevIndexDT, CurrentIndexDT) + End If + + GVGeoreferencias.DataBind() + UPGV.Update() + + End Sub + + Protected Sub btnPageNext_Click(sender As Object, e As EventArgs) + Dim TotalRegistros As Integer = DtGeoReferencias.Rows.Count + Dim TotalRowsPage As Integer = GVGeoreferencias.PageSize + Dim Index As Integer = HdnIndexPage.Value.ToEntero + 1 + Dim NextIndex As Integer = Index + 1 + + Dim CurrentIndexDT As Integer = (TotalRowsPage) * Index + Dim NextIndexDT As Integer = (TotalRowsPage) * NextIndex + + HdnIndexPage.Value = Index.ToString + + If Not btnPagePrev.Enabled Then + btnPagePrev.Enabled = True + End If + + If NextIndexDT >= TotalRegistros Then + btnPageNext.Enabled = False + GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(CurrentIndexDT, TotalRegistros - 1) + LblRegistros.Text = $"Distribución de datos desde {CurrentIndexDT.ToString.FormatoNumero(0)} hasta {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}. Total de registros: {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}" + Else + GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(CurrentIndexDT, NextIndexDT) + LblRegistros.Text = $"Distribución de datos desde {CurrentIndexDT.ToString.FormatoNumero(0)} hasta {NextIndexDT.ToString.FormatoNumero(0)}. Total de registros: {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}" + End If + + GVGeoreferencias.DataBind() + UPGV.Update() + End Sub End Class diff --git a/General/SaldosIniciales.aspx b/General/SaldosIniciales.aspx index 880cb1253..6d8b0d9b6 100644 --- a/General/SaldosIniciales.aspx +++ b/General/SaldosIniciales.aspx @@ -37,8 +37,8 @@
    - - + + diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 0afefdaef..f37302c1c 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -72,7 +72,7 @@ Partial Class General_SaldosIniciales 'Conexion.Close() If Not ErrorArchivo Then - If RblFormato.SelectedValue = "1" Or RblFormato.SelectedValue = "2" Then + If RblFormato.SelectedValue = "1" Then If Not dt.Columns(0).ColumnName = "Codigo" Then Alert("El nombre de la primera columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError) Exit Sub @@ -215,18 +215,18 @@ Partial Class General_SaldosIniciales End If - If Not dt.Columns(14).ColumnName = "Vendedor" Then - Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) - Exit Sub - End If - If Not dt.Columns(15).ColumnName = "Clasificación" Then - Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) - Exit Sub - End If - If Not dt.Columns(16).ColumnName = "Es distribuidor" Then - Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) - Exit Sub - End If + 'If Not dt.Columns(14).ColumnName = "Vendedor" Then + ' Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) + ' Exit Sub + 'End If + 'If Not dt.Columns(15).ColumnName = "Clasificación" Then + ' Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) + ' Exit Sub + 'End If + 'If Not dt.Columns(16).ColumnName = "Es distribuidor" Then + ' Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) + ' Exit Sub + 'End If @@ -1398,7 +1398,7 @@ Partial Class General_SaldosIniciales 'If Not CveCliente > 0 Then Alert(String.Format("No se encontró el cliente con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorVentas = True : RFC.GuardaLog : Exit For - TipoDocto = IIf(TipoDocto.Contiene("INGRESO", "INGRESOS"), "Ing", IIf(TipoDocto.Contiene("EGRESO", "EGRESOS"), "Egs", "Rem")).ToString + TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESO", "INGRESOS", "ING"), "Ing", IIf(TipoDocto.ToUpper.Contiene("EGRESO", "EGRESOS", "EGS"), "Egs", "Rem")).ToString 'PrePóliza Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Venta/SaldoInicial", 1, Total, Total, 1, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -1981,7 +1981,7 @@ Partial Class General_SaldosIniciales Dim CvePrePoliza As Integer = 0 Dim Cuenta As String = "" Dim Reporte As New StringBuilder - + Dim SubProTemp As DataTable = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("SI", 1, 0, 0, 1, Now.ToDate, "Saldos Iniciales", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) For Each Row As DataRow In dt.Rows @@ -1994,12 +1994,14 @@ Partial Class General_SaldosIniciales Dim CveSubProyecto As Integer = -1 Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True) Dim YaExiste As Boolean = False + Dim DataTemp As DataTable Dim SubP As String = Row("SubProyecto").ToString If SubP <> "" Then - CveSubProyecto = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1).FiltroPrimeroValor("CveSubProyecto", "").ToEntero + DataTemp = SubProTemp.FiltraParametros(String.Format("SubProyecto = '{0}'", SubP)) + CveSubProyecto = DataTemp.FiltroPrimeroValor("CveSubProyecto", "").ToEntero End If - + Cuenta = Cuenta.Replace(" ", "") If ObjConta.GetCuentas(-1, Cuenta.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCuenta = ObjConta.DtResultados().FiltroPrimeroValor("CveCuenta").ToEntero diff --git a/Imagenes/favicongps.ico b/Imagenes/favicongps.ico new file mode 100644 index 000000000..75dc9049f Binary files /dev/null and b/Imagenes/favicongps.ico differ diff --git a/Inicio.aspx b/Inicio.aspx index 20d7705e5..297d22aa2 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -483,7 +483,7 @@
    -
    + <%--
    @@ -534,7 +534,7 @@ -
    +
    --%> <%--
    diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index d3b03624b..49cc60cf1 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -178,7 +178,7 @@ Partial Class Inicio CargaGraficas() End If - CargaTareas() + 'CargaTareas() If UsuarioActual.CveRol = 1 Then divInd.Visible = True CargaSubProyectos() @@ -463,39 +463,39 @@ Partial Class Inicio End Sub - Private Sub CargaTareas() - Dim ObjProspectos As New ClsOIEventos + 'Private Sub CargaTareas() + ' Dim ObjProspectos As New ClsOIEventos - Dim FechaI, FechaF As DateTime - Dim CveEventoEstatus As Integer = -1 - FechaI = Now.AddDays(-180) - FechaF = Now - If ObjProspectos.GetRepEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, 1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then + ' Dim FechaI, FechaF As DateTime + ' Dim CveEventoEstatus As Integer = -1 + ' FechaI = Now.AddDays(-180) + ' FechaF = Now + ' If ObjProspectos.GetRepEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, 1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then - Dim DT As DataTable = ObjProspectos.DtResultados.Clone + ' Dim DT As DataTable = ObjProspectos.DtResultados.Clone - If ChkOIPorHacer.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioPara = {0} ", UsuarioActual.CveUsuario))) - If ChkOIAsigne.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioDe = {0} ", UsuarioActual.CveUsuario))) + ' If ChkOIPorHacer.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioPara = {0} ", UsuarioActual.CveUsuario))) + ' If ChkOIAsigne.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioDe = {0} ", UsuarioActual.CveUsuario))) - GvT.DataSource = DT - End If + ' GvT.DataSource = DT + ' End If - ObjProspectos.Dispose() - GvT.DataBind() - End Sub - Protected Sub GvT_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvT.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - Select Case UsuarioActual.CveUsuario.ToString - Case e.Row.DBCampo("CveUsuarioPara") - 'etiqueta de 'asignado' - e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-warning " - e.Row.FCLabel("LblTipo").Text = "por hacer " - Case e.Row.DBCampo("CveUsuarioDe") - e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-success" - e.Row.FCLabel("LblTipo").Text = "Asigné" - End Select - End If - End Sub + ' ObjProspectos.Dispose() + ' GvT.DataBind() + 'End Sub + 'Protected Sub GvT_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvT.RowDataBound + ' If e.Row.RowType = DataControlRowType.DataRow Then + ' Select Case UsuarioActual.CveUsuario.ToString + ' Case e.Row.DBCampo("CveUsuarioPara") + ' 'etiqueta de 'asignado' + ' e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-warning " + ' e.Row.FCLabel("LblTipo").Text = "por hacer " + ' Case e.Row.DBCampo("CveUsuarioDe") + ' e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-success" + ' e.Row.FCLabel("LblTipo").Text = "Asigné" + ' End Select + ' End If + 'End Sub Private Sub MuestraIndicador(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, Comentario As String, Link As String, TitleComentario As String) Dim htmldiv As New StringBuilder htmldiv.AppendFormat("{0}
    ", DIV.InnerHtml, Color, Icono) @@ -844,9 +844,9 @@ Partial Class Inicio End Sub #End Region - Protected Sub ChkOIAsigne_CheckedChanged(sender As Object, e As EventArgs) Handles ChkOIAsigne.CheckedChanged, ChkOIPorHacer.CheckedChanged - CargaTareas() - End Sub + 'Protected Sub ChkOIAsigne_CheckedChanged(sender As Object, e As EventArgs) Handles ChkOIAsigne.CheckedChanged, ChkOIPorHacer.CheckedChanged + ' CargaTareas() + 'End Sub Protected Sub DdlFiltroIndicador_SelectedIndexChanged(sender As Object, e As EventArgs) End Sub diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 8c24fa9af..07fbf137c 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -100,6 +100,10 @@ +
  • + +
  • diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 0cbaa5b97..c6c92e476 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -335,6 +335,10 @@ Partial Class Inventarios_EntradasSalidas If Request("CveMovimiento") IsNot Nothing AndAlso Request("CveMovimiento").ToString.ToEntero > 0 Then + If UsuarioActual.CveUsuario = 100 AndAlso UsuarioActual.CveEmpresa = 140 Then + LnkGenerarVirtual.Visible = True + End If + CargaDatos(Request("CveMovimiento").ToString.ToEntero) 'CargaGvPaqueteria() Else @@ -1297,7 +1301,7 @@ Partial Class Inventarios_EntradasSalidas End Sub - Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, Serie As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String) + Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, Serie As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Optional CargarGV As Boolean = True) If DdlAlmacen.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlProducto2.SelectedText = "" : Exit Sub Dim Valido As Boolean = True @@ -1378,8 +1382,12 @@ Partial Class Inventarios_EntradasSalidas registro.Item("Observaciones") = Observaciones registro.Item("AplicaCaducidad") = RowPS("AplicaCaducidad").ToString DtMovimientos.Rows.Add(registro) - CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) - RegistraScript("playsonidito('beep-07.wav')") + + If CargarGV Then + CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) + RegistraScript("playsonidito('beep-07.wav')") + End If + End If End Sub @@ -2375,7 +2383,7 @@ Partial Class Inventarios_EntradasSalidas #Region " GVM " Private Sub CargaGVM(DtTemp As DataTable) - GvM.DataSource = DtTemp + GvM.DataSource = DtTemp '.FiltraPorIndices(0, If(DtTemp.Rows.Count > 20, 19, DtTemp.Rows.Count - 1)) GvM.DataBind() EscondeColumnasGVM(DtTemp) @@ -4567,102 +4575,105 @@ Partial Class Inventarios_EntradasSalidas End If dt.TableName = "Datos" - Dim DTSeccionesAlmacen As DataTable = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) - If Not ErrorArchivo Then - NumRow = 0 - Dim RowNoEncontrados As String = "" - Dim NumAgregados As Integer = 0 - For Each Row As DataRow In dt.Rows - Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal - Dim UM As String = Row("UM").ToString - Dim Codigo As String = Row("Código").ToString.Trim.ToUpper - 'Dim CodigoBarras As String = Row("Codigo Barras").ToString.Trim.ToUpper - Dim ProductoServicio As String = Row("Producto/Servicio").ToString.Trim.ToUpper - Dim PrecioUnitario As Decimal = Row("Precio Unitario").ToString.ToDecimal - Dim Serie As String = Row("Serie").ToString - Dim Lote As String = Row("Lote").ToString - Dim Caducidad As String = Row("Caducidad").ToString - Dim SeccionAlmacen As String = Row("SeccionAlmacen").ToString + Try + Dim DTSeccionesAlmacen As DataTable = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) + If Not ErrorArchivo Then + NumRow = 0 + Dim RowNoEncontrados As String = "" + Dim NumAgregados As Integer = 0 - Dim CvePS As Integer = 0 - Dim CveUM As Integer = 0 + For Each Row As DataRow In dt.Rows + Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal + Dim UM As String = Row("UM").ToString + Dim Codigo As String = Row("Código").ToString.Trim.ToUpper + 'Dim CodigoBarras As String = Row("Codigo Barras").ToString.Trim.ToUpper + Dim ProductoServicio As String = Row("Producto/Servicio").ToString.Trim.ToUpper + Dim PrecioUnitario As Decimal = Row("Precio Unitario").ToString.ToDecimal + Dim Serie As String = Row("Serie").ToString + Dim Lote As String = Row("Lote").ToString + Dim Caducidad As String = Row("Caducidad").ToString + Dim SeccionAlmacen As String = Row("SeccionAlmacen").ToString - NumRow = NumRow + 1 + Dim CvePS As Integer = 0 + Dim CveUM As Integer = 0 - Dim CveSeccionAlmacen As Integer = -1 - If SeccionAlmacen <> "" Then - CveSeccionAlmacen = DTSeccionesAlmacen.FiltroPrimeroValor("CveSeccion", String.Format("SeccionAlmacen = '{0}'", SeccionAlmacen)).ToEntero - End If + NumRow = NumRow + 1 - If Codigo <> "" Then - Dim StrArray() As String = GetPS("Codigo", Codigo).Split("|"c) - If StrArray.Length > 0 Then - If CBool(StrArray(0)) = True Then - CvePS = StrArray(1).ToEntero - Else - RowNoEncontrados &= StrArray(1) & "<\BR>" - End If + Dim CveSeccionAlmacen As Integer = -1 + If SeccionAlmacen <> "" Then + CveSeccionAlmacen = DTSeccionesAlmacen.FiltroPrimeroValor("CveSeccion", String.Format("SeccionAlmacen = '{0}'", SeccionAlmacen)).ToEntero End If - 'ElseIf CodigoBarras <> "" Then - ' Dim StrArray() As String = GetPS("CodigoBarras", CodigoBarras).Split("|"c) - ' If StrArray.Length > 0 Then - ' If CBool(StrArray(0)) = True Then - ' CvePS = StrArray(1).ToEntero - ' Else - ' RowNoEncontrados &= StrArray(1) & "<\BR>" - ' End If - ' End If - ElseIf ProductoServicio <> "" Then - Dim StrArray() As String = GetPS("PS", ProductoServicio).Split("|"c) - If StrArray.Length > 0 Then - If CBool(StrArray(0)) = True Then - CvePS = StrArray(1).ToEntero - Else - RowNoEncontrados &= StrArray(1) & "<\BR>" + + + + If Codigo <> "" Then + Dim StrArray() As String = GetPS("Codigo", Codigo).Split("|"c) + If StrArray.Length > 0 Then + If CBool(StrArray(0)) = True Then + CvePS = StrArray(1).ToEntero + Else + RowNoEncontrados &= StrArray(1) & "<\BR>" + End If End If + 'ElseIf CodigoBarras <> "" Then + ' Dim StrArray() As String = GetPS("CodigoBarras", CodigoBarras).Split("|"c) + ' If StrArray.Length > 0 Then + ' If CBool(StrArray(0)) = True Then + ' CvePS = StrArray(1).ToEntero + ' Else + ' RowNoEncontrados &= StrArray(1) & "<\BR>" + ' End If + ' End If + ElseIf ProductoServicio <> "" Then + Dim StrArray() As String = GetPS("PS", ProductoServicio).Split("|"c) + If StrArray.Length > 0 Then + If CBool(StrArray(0)) = True Then + CvePS = StrArray(1).ToEntero + Else + RowNoEncontrados &= StrArray(1) & "<\BR>" + End If + End If + Else + RowNoEncontrados &= "<\BR>    - En la fila " & NumRow & " no se especificó código, código de barras ó descripción." + End If + + If CvePS > 0 Then + Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).Rows(0) + + If DrPS IsNot Nothing AndAlso String.IsNullOrEmpty(UM) Then + CveUM = DrPS("CveUnidadMedida").ToString().ToEntero() + UM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("UnidadMedida", $"CveUnidadMedida={CveUM}") + End If + + AddNew(CvePS, ProductoServicio, CveUM, UM, Cantidad, PrecioUnitario, Serie.Replace(" ", String.Empty), "", "-1", "-1", "", + Lote, Caducidad.ToDate, CveSeccionAlmacen, SeccionAlmacen, CargarGV:=False) + + NumAgregados = NumAgregados + 1 + + End If + + Next + + If RowNoEncontrados.Length > 0 Then + Alert("Se Cargaron " & NumAgregados & " Productos o Servicios.<\BR>Los siguientes Productos o Servicios no se encontraron en la Base de Datos.<\BR>" & RowNoEncontrados, TipoMensaje.MsgAdvertencia) + If NumAgregados > 0 Then + RegistraScript("$('#DivCargaExcel').modal('hide')", "hidemodal") + TxtExcel.Text = "[]" End If Else - RowNoEncontrados &= "<\BR>    - En la fila " & NumRow & " no se especificó código, código de barras ó descripción." - End If - - If CvePS > 0 Then - 'CveUM = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"CvePS = '{CvePS}'").ToString.ToEntero - - txtCantidad.Text = Cantidad.ToString - DdlProducto2.SelectedValue = CvePS.ToString - DdlProducto2.SelectedText = Codigo + " - " + ProductoServicio - txtPrecio.Text = PrecioUnitario.ToString - - ElProductoChange() - TxtnSerie.Text = Serie - TxtnLote.Text = Lote - DdlSeccionAlmacen.SelectedValueExist(CveSeccionAlmacen.ToString) - TxtnFechaCaducidad.Text = If(Caducidad = "", MinFecha.ToString, Caducidad) - AgregarPS() - txtPrecio.Text = "" - DdlUnidad.SelectedItem.Text = "" - TxtnSerie.Text = "" - TxtnLote.Text = "" - TxtnFechaCaducidad.Text = "" - 'DdlSeccionAlmacen.SelectedValue = "-1" - NumAgregados = NumAgregados + 1 - - End If - - Next - - If RowNoEncontrados.Length > 0 Then - Alert("Se Cargaron " & NumAgregados & " Productos o Servicios.<\BR>Los siguientes Productos o Servicios no se encontraron en la Base de Datos.<\BR>" & RowNoEncontrados, TipoMensaje.MsgAdvertencia) - If NumAgregados > 0 Then + Alert("Se Cargaron " & NumAgregados & " Productos o Servicios correctamente.") RegistraScript("$('#DivCargaExcel').modal('hide')", "hidemodal") TxtExcel.Text = "[]" End If - Else - Alert("Se Cargaron " & NumAgregados & " Productos o Servicios correctamente.") - RegistraScript("$('#DivCargaExcel').modal('hide')", "hidemodal") - TxtExcel.Text = "[]" + + CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) + RegistraScript("playsonidito('beep-07.wav')") + End If - End If + Catch ex As Exception + OnError("Ocurrió un error al cargar los datos", ex) + End Try + End If dt.Dispose() End Sub @@ -4969,4 +4980,73 @@ Partial Class Inventarios_EntradasSalidas + Protected Sub LnkGenerarVirtual_Click(sender As Object, e As EventArgs) + If CveMovimiento > 0 Then + Dim DtPSVirtual As New DataTable("DtTamanios") + Dim ErrorMovInv As Boolean = False + + Dim CveMovimientoVirtual As Integer = -1 + Dim FolioVirtual As Integer = -1 + + Dim tCveAlmacen As Integer = -1 + Dim tOrigen As Integer = -1 + Dim ObjInventario As New ClsInventarios + ObjInventario.IniciaTransacSQL() + + Try + If ObjInventario.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then + tCveAlmacen = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen").ToEntero() + tOrigen = ObjInventario.DtResultados.FiltroPrimeroValor("Origen").ToEntero() + End If + + Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero() + + 'VERIFICA SI TIENE ALMACEN VIRTUAL + If CveAlmacenVirtual > 0 Then + If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa) Then + DtPSVirtual = ObjInventario.DtResultados + End If + + If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then + + CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(tOrigen > 0, 2, 3), 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="ES/GV") + FolioVirtual = ObjInventario.Folio + + For Each RowUsado As DataRow In DtPSVirtual.Rows + Dim CvePS = RowUsado("CvePS").ToString().ToEntero() + Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal() + Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal() + Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero() + + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + ErrorMovInv = True + Exit For + End If + Next + Else + ErrorMovInv = True + Alert("No hay usados para generar el virtual", TipoMensaje.MsgAdvertencia) + End If + Else + ErrorMovInv = True + Alert("El almacen no tiene vinculado un almacen virtual", TipoMensaje.MsgAdvertencia) + End If + Catch ex As Exception + ErrorMovInv = True + End Try + + If ErrorMovInv Then + ObjInventario.RollBack() + Else + ObjInventario.Commit() + End If + + ObjInventario.Dispose() + + If CveMovimientoVirtual > 0 AndAlso Not ErrorMovInv Then + Alert($"Se generó el movimiento virtual con el folio:{FolioVirtual}") + End If + End If + + End Sub End Class diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 304e33b82..e17e72cb9 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -412,6 +412,15 @@ Partial Class Inventarios_RecepcionAlmacen End Set End Property + Private Property ValidarRecepcionUsados As Boolean + Get + Return If(IsNothing(ViewState("ValidarRecepcionUsados")), False, CBool(ViewState("ValidarRecepcionUsados"))) + End Get + Set + ViewState("ValidarRecepcionUsados") = Value + End Set + End Property + 'Private Property DtDocumentos As DataTable ' Get ' Return CType(ViewState("DtDocumentos"), DataTable) @@ -871,6 +880,7 @@ Partial Class Inventarios_RecepcionAlmacen RealizarTraspasoAlmacenDevolucion = False RealizarMovimientoVirtual = False SumarImporteUsados = False + ValidarRecepcionUsados = False BtnGuardar.Enabled = True CargaAlmacenes(-1) @@ -925,6 +935,7 @@ Partial Class Inventarios_RecepcionAlmacen RealizarTraspasoAlmacenDevolucion = False RealizarMovimientoVirtual = False SumarImporteUsados = False + ValidarRecepcionUsados = False CveAlmacenDevolucionProveedor = -1 Dim ObjCompras As New ClsCompras @@ -981,10 +992,12 @@ Partial Class Inventarios_RecepcionAlmacen If NumProductos > 0 AndAlso NumUsados > 0 Then DtRecepcion = ObjInventario.DtResultados.FiltraParametros("EsUsado = False") SumarImporteUsados = True + ValidarRecepcionUsados = True 'SI LA COMPRA TIENE PUROS USADOS, MOSTRAR LOS USADOS Y CARGAR LOS ALMACENES ElseIf NumProductos = 0 AndAlso NumUsados > 0 Then CargaSoloUsados = True SumarImporteUsados = True + ValidarRecepcionUsados = True DtRecepcion = ObjInventario.DtResultados.Copy() If TipoMovimiento <> 3 Then 'sino es devolucion/NC CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra) @@ -997,8 +1010,10 @@ Partial Class Inventarios_RecepcionAlmacen If ObjCompras.GetCompraDetalle(pCveCompra) Then If ObjCompras.DtResultados.COUNT("Cantidad", "CveClasificacion=20519") > 0 Then SumarImporteUsados = True + ValidarRecepcionUsados = True Else SumarImporteUsados = False + ValidarRecepcionUsados = False End If End If @@ -2403,6 +2418,20 @@ Partial Class Inventarios_RecepcionAlmacen Dim CvePrePoliza = -1 Dim MensajeContabilidad = "" + + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + 'VALIDA SI SE VAN A RECIBIR TODOS LOS PRODUCTOS + If ValidarRecepcionUsados Then + For Each gvr As GridViewRow In GvInv.Rows + If gvr.FCTextBox("TbCantidadF").Text.ToDecimal() <> gvr.DataKey("CantidadC").ToDecimal() Then + ValidarRecepcionUsados = False + Exit For + End If + Next + End If + + End If + Try 'RECARGA TC CUANDO ES RECEPCION CON OC Y DOLARES If CveOCSurtir > 0 And CveMoneda <> 1 Then @@ -2825,7 +2854,7 @@ Partial Class Inventarios_RecepcionAlmacen 'VERIFICA SI TIENE ALMACEN VIRTUAL If CveAlmacenVirtual > 0 Then - If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=SumarImporteUsados) Then + If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=ValidarRecepcionUsados) Then DtPSVirtual = ObjInventario.DtResultados End If @@ -3020,7 +3049,7 @@ Partial Class Inventarios_RecepcionAlmacen CveMovimientoRef = CveMovimiento End If - If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoRef, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=SumarImporteUsados) Then + If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoRef, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=ValidarRecepcionUsados) Then DtPSVirtual = ObjInventario.DtResultados End If diff --git a/Inventarios/RepTraspasoAlmacen.aspx b/Inventarios/RepTraspasoAlmacen.aspx index 27f8bf4b6..0a1fd7f89 100644 --- a/Inventarios/RepTraspasoAlmacen.aspx +++ b/Inventarios/RepTraspasoAlmacen.aspx @@ -202,16 +202,23 @@ - + + + + + + + + diff --git a/Inventarios/RepTraspasoAlmacen.aspx.vb b/Inventarios/RepTraspasoAlmacen.aspx.vb index 816a289fb..ccc900c9c 100644 --- a/Inventarios/RepTraspasoAlmacen.aspx.vb +++ b/Inventarios/RepTraspasoAlmacen.aspx.vb @@ -77,7 +77,7 @@ Partial Class RepTraspasoAlmacen If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa) Then GvDatos.DataSource = ObjInventarios.DtResultados DtInventarios = ObjInventarios.DtResultados - GvDatos.Columns(4).Visible = DtInventarios.MAX("Serie") <> "" + GvDatos.Columns(5).Visible = DtInventarios.MAX("Serie") <> "" End If ObjInventarios.Dispose() @@ -100,23 +100,6 @@ Partial Class RepTraspasoAlmacen Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - 'Cuando es titulo - If e.Row.DBCampo("PS").ToString.Trim = "" And e.Row.DBCampo("FechaMovto") <> "" Then - - e.Row.CssClass = "Totales" - - e.Row.Cells(0).Text = String.Format("Folio: {0} ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida")) - e.Row.Cells(1).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString) - e.Row.Cells(2).Text = String.Format("{0}", e.Row.DBCampo("Almacen")) - e.Row.Cells(3).Text = String.Format("{0}", e.Row.DBCampo("AlmacenDestino")) - e.Row.Cells(4).Text = String.Format("Responsable: {0}", e.Row.DBCampo("Recibio")) - ElseIf e.Row.DBCampo("FechaMovto") = "" Then - e.Row.CssClass = "Totales" - e.Row.Cells(0).Text = "Total General" - e.Row.Cells(2).Text = String.Format("Almacen Origen") - e.Row.Cells(3).Text = String.Format("Almacen Destino") - Else - End If End If End Sub @@ -165,6 +148,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/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index bde85fdbb..887a7d687 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -608,12 +608,12 @@ Partial Class Inventarios_TraspasoAlmacen If Existencia > 0 Then 'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir 'las segunda consulta, que tenga existencia, ya con los parametros especificos - If (FechaCaducidad > MinFecha OrElse Serie <> "" OrElse Lote <> "") Then + If (FechaCaducidad > MinFecha OrElse Not Serie.Contiene("", "-1") OrElse Not Lote.Contiene("", "-1")) Then ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1) Dim StrB As New stringbuilder StrB.appendformat("CvePS = {0} AND CveUM = {1} ", CvePS, CveUnidadMedida) - If Serie <> "" Then StrB.appendformat(" AND Serie = '{0}' ", Serie) - If Lote <> "" Then StrB.appendformat(" AND Lote = '{0}' ", Lote) + If Not Serie.Contiene("", "-1") Then StrB.appendformat(" AND Serie = '{0}' ", Serie) + If Not Lote.Contiene("", "-1") Then StrB.appendformat(" AND Lote = '{0}' ", Lote) If FechaCaducidad.ToDate > MinFecha Then StrB.appendformat(" AND FechaCaducidad = '{0}' ", FechaCaducidad.ToShortDateString) Dim CantidadEspecificaEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", StrB.tostring) @@ -2891,23 +2891,21 @@ Partial Class Inventarios_TraspasoAlmacen Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal() Dim Serie As String = RowExcel("Serie").ToString() - Dim Lote As String = If(RowExcel("Lote").ToString() = "", "-1", RowExcel("Lote").ToString()) - Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString <> "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate) + Dim Lote As String = RowExcel("Lote").ToString() + Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate) Dim Observaciones As String = RowExcel("Observaciones").ToString() If CveProducto > 0 Then Dim Valido As Boolean = True - Dim CveMetodoInventario As Integer = RowPS("Inv_CveMetodoInventario").ToString().ToEntero() - - If CveMetodoInventario = 5 And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then + If RowPS("AplicaSerie").ToString() = "True" And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then Valido = False Alert($"El producto '{RowPS("PS")}' requiere 'Serie'", TipoMensaje.MsgAdvertencia) ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString()) End If - If CveMetodoInventario = 5 AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then + If RowPS("AplicaSerie").ToString() = "True" AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then NoPSConSerie = NoPSConSerie + 1 End If @@ -2919,7 +2917,7 @@ Partial Class Inventarios_TraspasoAlmacen End If If Valido Then - Valido = ValidaExistencia(Cantidad, CveProducto, CveUnidadMedida, -1, If(Not String.IsNullOrEmpty(Serie), Serie, "-1"), Lote, FechaCaducidad) + Valido = ValidaExistencia(Cantidad, CveProducto, CveUnidadMedida, -1, If(Not String.IsNullOrEmpty(Serie), Serie, "-1"), If(Not String.IsNullOrEmpty(Lote), Lote, "-1"), FechaCaducidad) End If If Valido Then @@ -3067,7 +3065,13 @@ Partial Class Inventarios_TraspasoAlmacen Dim DrAlmO As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimero("") If DrAlmO("CveTipoAlmacen").ToString.ToEntero = 26 Then 'costeados - DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen IN (26) AND Estatus = 'Activo'") + DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen IN (26) AND Estatus = 'Activo'") + DdlAlmacenDestino.DataBind() + DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1")) + + ElseIf DrAlmO("CveTipoAlmacen").ToString.ToEntero = 22 Then 'Recepcion de Usados + + DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen IN (22) AND Estatus = 'Activo'") DdlAlmacenDestino.DataBind() DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1")) Else diff --git a/LogIn.aspx b/LogIn.aspx index ec14d4d0f..d9d8a3fd6 100644 --- a/LogIn.aspx +++ b/LogIn.aspx @@ -5,7 +5,7 @@ <%= If(Request.Url.Host.ToUpper().Contains("signalsgps".ToUpper()), "", "SIG -") %> Inicio de Sesión - + diff --git a/LogIn.aspx.vb b/LogIn.aspx.vb index 0adbb361c..28fdeb150 100644 --- a/LogIn.aspx.vb +++ b/LogIn.aspx.vb @@ -72,6 +72,7 @@ Partial Class LogIn Ltlcopyright2.Text = "2019 © Sistema de Monitoreo y Telemedición SA de CV" PnlLoginB.CssClass = "logincint login-form " PnlContraB.CssClass = "logincint login-form " + lnkFavicon.Href = "/Imagenes/favicongps.ico" Else End If diff --git a/Nomina/CatPeriodos.aspx b/Nomina/CatPeriodos.aspx index 840cf8ad8..3bad19558 100644 --- a/Nomina/CatPeriodos.aspx +++ b/Nomina/CatPeriodos.aspx @@ -8,350 +8,385 @@ - Catálogo de Periodos + Catálogo de periodos - - - - - - - - - - - - - - - - - - - - <%----%> - <%-- --%> - - - - - - - - - - - - - - - - - - - - -
    - - Tipo - - - - - Ej. - - - - - Mes - - - - - No. - - - - - Fecha Ini - - - - - Fecha Fin - - - - - Ini. Mes - - - - - Fin Mes - - - - - Ini. SS - - - - - Fin SS - - - - - Ini. Año - - - - - Fin Año - - - - - Calculado - - - - - Estatus - - -   Comandos
    - - - - - - - - <%-- - --%> - - - <%-- - --%> - - - - - - -   - - - - - -   - -   - - -   - - - - - -   - -   - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- +
    +
    +
    + + Periodos +
    + +
    + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + <%----%> + <%-- --%> + + + + + + + + + + + + + + + + + + + + +
    + + Tipo + + + + + Ej. + + + + + Mes + + + + + No. + + + + + Fecha Ini + + + + + Fecha Fin + + + + + Ini. Mes + + + + + Fin Mes + + + + + Ini. SS + + + + + Fin SS + + + + + Ini. Año + + + + + Fin Año + + + + + Calculado + + + + + Estatus + + + Comandos
    + + + + + + + + <%-- + --%> + + + <%-- + --%> + + + + + + +
    + + + + +
    + + + + + + + + +
    +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> - <%-- + <%-- --%> - - -
    - -   -
    -
    - - - -
    - - - - - -
    - - -
    -
    -
    + + +
    + + +
    +
    + +
    + +
    +
    +
    + + +
    + +
    +
    +
    + + + + + + +
    +
    + diff --git a/Nomina/CatPeriodos.aspx.vb b/Nomina/CatPeriodos.aspx.vb index b718791a8..a2fff6cc9 100644 --- a/Nomina/CatPeriodos.aspx.vb +++ b/Nomina/CatPeriodos.aspx.vb @@ -62,14 +62,14 @@ Partial Class Nomina_CatPeriodos If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, ChkEsInicioSS.Checked, ChkEsFinAño.Checked, ChkEsInicioAño.Checked, ChkEsFinAño.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion) - UpTitulos.Update() - ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + UpDatos.Update() + ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados - - If ViewState("Orden").ToString() <> String.Empty Then - CargaGrid(ViewState("Orden").ToString()) - Else - CargaGrid("") + CargaDatos() + If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then + CargaGrid(ViewState("Orden").ToString()) + Else + CargaGrid("") End If End If @@ -87,22 +87,22 @@ Partial Class Nomina_CatPeriodos Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowIndex = 0 Then - e.Row.Cells(0).Width = Unit.Pixel(100) - e.Row.Cells(1).Width = Unit.Pixel(80) - e.Row.Cells(2).Width = Unit.Pixel(80) - e.Row.Cells(3).Width = Unit.Pixel(80) - e.Row.Cells(4).Width = Unit.Pixel(100) - e.Row.Cells(5).Width = Unit.Pixel(100) - e.Row.Cells(6).Width = Unit.Pixel(80) - e.Row.Cells(7).Width = Unit.Pixel(80) - e.Row.Cells(8).Width = Unit.Pixel(80) - e.Row.Cells(9).Width = Unit.Pixel(80) - e.Row.Cells(10).Width = Unit.Pixel(80) - e.Row.Cells(11).Width = Unit.Pixel(80) - e.Row.Cells(12).Width = Unit.Pixel(80) - e.Row.Cells(13).Width = Unit.Pixel(100) - e.Row.Cells(14).Width = Unit.Pixel(53) - e.Row.Cells(15).Width = Unit.Pixel(68) + 'e.Row.Cells(0).Width = Unit.Pixel(100) + 'e.Row.Cells(1).Width = Unit.Pixel(80) + 'e.Row.Cells(2).Width = Unit.Pixel(80) + 'e.Row.Cells(3).Width = Unit.Pixel(80) + 'e.Row.Cells(4).Width = Unit.Pixel(100) + 'e.Row.Cells(5).Width = Unit.Pixel(100) + 'e.Row.Cells(6).Width = Unit.Pixel(80) + 'e.Row.Cells(7).Width = Unit.Pixel(80) + 'e.Row.Cells(8).Width = Unit.Pixel(80) + 'e.Row.Cells(9).Width = Unit.Pixel(80) + 'e.Row.Cells(10).Width = Unit.Pixel(80) + 'e.Row.Cells(11).Width = Unit.Pixel(80) + 'e.Row.Cells(12).Width = Unit.Pixel(80) + 'e.Row.Cells(13).Width = Unit.Pixel(100) + 'e.Row.Cells(14).Width = Unit.Pixel(53) + 'e.Row.Cells(15).Width = Unit.Pixel(68) 'e.Row.Cells(15).Width = Unit.Pixel(100) End If e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left diff --git a/Nomina/Finiquito.aspx b/Nomina/Finiquito.aspx index c2112291a..89572f6d0 100644 --- a/Nomina/Finiquito.aspx +++ b/Nomina/Finiquito.aspx @@ -81,7 +81,9 @@ - + + +
    <%--class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1"--%> @@ -370,7 +372,7 @@
    - + + +