From bab024f44049a7a2224cab35ca8aa5a7085cc06c Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 11 Feb 2025 19:22:03 -0700 Subject: [PATCH] --Sincronizar cambios con productivo 11/02/2025 --- Acumuladores/EntradasUsadosResumenRep.aspx.vb | 9 + Acumuladores/Tamaños.aspx.vb | 4 +- Ashx/CargaEventos2.ashx | 663 ++++ Ashx/GenerarPDFFactura.ashx | 4 +- Ashx/SIGWeb.ashx | 31 +- Bancos/Creditos.aspx.vb | 2 +- Bancos/CuentasBancarias.aspx | 12 +- Bancos/CuentasBancariasDetalle.aspx | 2 +- Bancos/DepositosCaja.aspx.vb | 8 +- Bancos/Devoluciones.aspx | 4 +- Bancos/Devoluciones.aspx.cs | 2 +- Bancos/IE.aspx | 11 +- Bancos/IE.aspx.vb | 2 - Bancos/PopIECompras.aspx | 2 +- Bancos/PopIECompras.aspx.vb | 8 - Bancos/RepCortes.aspx | 4 +- Bancos/RepSaldosDetalle.aspx | 1 + Compras/Compras.aspx | 46 +- Compras/Compras.aspx.vb | 715 ++-- Compras/PopUpVerFactura.aspx.vb | 39 +- Compras/Proveedores.aspx | 19 +- Compras/ReembolsosComprobaciones.aspx.vb | 9 + Compras/RepCompras.aspx | 97 +- Compras/RepCxPDetalle.aspx.vb | 3 +- Compras/RepNotasCredito.aspx.vb | 4 +- Compras/RepProductosServiciosDetalle.aspx | 12 +- Compras/RepProductosServiciosDetalle.aspx.vb | 1 - Compras/eFacturas.aspx | 1 + Compras/eFacturas.aspx.vb | 44 +- Contabilidad/ContabilidadElectronica.aspx.vb | 8 +- Contabilidad/DiarioPagos.aspx.vb | 6 +- Contabilidad/FiltraPolizas.aspx | 2 +- Contabilidad/LibroDiario.aspx | 114 + Contabilidad/LibroDiario.aspx.vb | 261 ++ Contabilidad/RegPoliza.aspx.vb | 2 +- Contabilidad/RegPrePoliza.aspx | 2 +- Contabilidad/RepIVA.aspx | 2 +- Contabilidad/RepIVA.aspx.cs | 6 +- .../RepMovimientosAuxiliaresCatalogo.rdlc | 695 +++- .../Reportes/RepSituacionFinanciera.rdlc | 3081 ++++++++++++++++ Contabilidad/Reportes/_RepAnexoCatalogo.rdlc | 1409 ++++++++ Contabilidad/Reportes/_RepBalanceGeneral.rdlc | 3091 +++++++++++++++++ .../Reportes/_RepBalanzaComprobacion.rdlc | 1665 +++++++++ .../Reportes/_RepBalanzaComprobacion.rpt | Bin 0 -> 131072 bytes Contratos/FacturacionMasiva.aspx.vb | 12 +- Contratos/ModificarPresupuesto.aspx.vb | 2 - Contratos/RepPresupuestosDetalleCompras.aspx | 2 +- CxC/RepCxC.aspx | 2 +- CxC/RepCxC.aspx.vb | 9 +- General/TimbraRetencion.aspx | 7 +- Inventarios/CartaPorteManual.aspx.vb | 29 +- Inventarios/EntradasSalidas.aspx | 12 +- Inventarios/EntradasSalidas.aspx.vb | 9 + Inventarios/EntregaAlmacen.aspx.vb | 9 + Inventarios/RecepcionAlmacen.aspx.vb | 6 +- Inventarios/RepAlmacenCompras.aspx.vb | 3 +- Inventarios/RepEntregaAlmacenRuta.aspx.cs | 31 +- Inventarios/RepNotasSinAlmacen.aspx.vb | 6 +- Inventarios/TraspasoAlmacen.aspx.vb | 38 +- Nomina/Aguinaldo.aspx.cs | 4 +- Nomina/CalculoISRAnual.aspx.cs | 6 +- Nomina/Finiquito.aspx.cs | 2 +- Nomina/Nomina.aspx.cs | 2 +- Nomina/ReporteVacaciones.aspx | 267 +- Nomina/ReporteVacaciones.aspx.cs | 255 +- Nomina/RobloxPlayerInstaller.exe | Bin 0 -> 4458824 bytes OC/OC2.aspx.vb | 2 +- OI/CircularDetalleB.aspx.cs | 2 +- OI/Proyecto.aspx | 1 - OI/TareaDetalle.aspx | 1 - Planeacion/CatFolios.aspx.vb | 1 - Planeacion/CatSubProyectos.aspx | 16 +- Planeacion/CatSubProyectos.aspx.vb | 2 + RH/CalculoSBC.aspx.cs | 4 +- RH/CatAsistenciasInasistencias.aspx | 20 +- RH/CatAsistenciasInasistencias.aspx.vb | 25 +- RH/CatTurno.aspx.vb | 39 +- RH/PopUpBuscarPersonal.aspx | 30 +- Sistemas/CatContrasenia.aspx | 5 - Sistemas/Usuarios.aspx | 9 + Ventas/CatAutorizacionLimites.aspx.vb | 71 +- Ventas/CatMotivosCancelacion.aspx.vb | 3 +- Ventas/CatPreciosLista.aspx | 14 +- Ventas/CatPromociones.aspx.vb | 2 +- Ventas/PVCobranza.aspx | 325 +- Ventas/RepPS.aspx | 4 +- Ventas/RepPedidosSTF.aspx | 4 +- Ventas/RepPedidosSTF.aspx.vb | 2 + Ventas/RepProductosServiciosDetalle.aspx | 173 +- Ventas/RepProductosServiciosDetalle.aspx.vb | 4 +- Ventas/RepProductosServiciosPeriodo.aspx.cs | 2 +- Ventas/RepVentas.aspx | 260 +- Ventas/RepVentas.aspx.vb | 64 +- Ventas/RepVentas.aspx.vb2 | 2 +- Ventas/Ventas.aspx | 18 +- Ventas/Ventas.aspx.vb | 2 +- 96 files changed, 12531 insertions(+), 1392 deletions(-) create mode 100644 Ashx/CargaEventos2.ashx create mode 100644 Contabilidad/LibroDiario.aspx create mode 100644 Contabilidad/LibroDiario.aspx.vb create mode 100644 Contabilidad/Reportes/RepSituacionFinanciera.rdlc create mode 100644 Contabilidad/Reportes/_RepAnexoCatalogo.rdlc create mode 100644 Contabilidad/Reportes/_RepBalanceGeneral.rdlc create mode 100644 Contabilidad/Reportes/_RepBalanzaComprobacion.rdlc create mode 100644 Contabilidad/Reportes/_RepBalanzaComprobacion.rpt create mode 100644 Nomina/RobloxPlayerInstaller.exe diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx.vb b/Acumuladores/EntradasUsadosResumenRep.aspx.vb index 335c7881f..3a33a5241 100644 --- a/Acumuladores/EntradasUsadosResumenRep.aspx.vb +++ b/Acumuladores/EntradasUsadosResumenRep.aspx.vb @@ -169,15 +169,24 @@ Partial Class Acumuladores_RepEntradasUsados ObjAcum.Dispose() RegistraScript("$('#DModalEditarFecha').modal('hide')") + + + End Sub Protected Sub GvAcum_RowDataBound(sender As Object, e As GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DataKey("CvePSCargo").ToEntero <= 0 Then + e.Row.CssClass = "Totales" + End If + + End If + End Sub End Class diff --git a/Acumuladores/Tamaños.aspx.vb b/Acumuladores/Tamaños.aspx.vb index 1ad466ef6..35f7d9195 100644 --- a/Acumuladores/Tamaños.aspx.vb +++ b/Acumuladores/Tamaños.aspx.vb @@ -137,7 +137,7 @@ Partial Class Acumuladores_Tamaños UpGral.Update() Alert("Tamaño Agregado Correctamente", TipoMensaje.MsgInformacion) - GlobalDTAcumTamaños(UsuarioActual.CveEmpresa) = Nothing + GlobalDTAcumTamaños(UsuarioActual.CveEmpresa) = Nothing Else Alert("Ocurrio un error al guardar el Tamaño", TipoMensaje.MsgError) End If @@ -157,7 +157,7 @@ Partial Class Acumuladores_Tamaños UpGral.Update() Alert("Tamaño Actualizado Correctamente", TipoMensaje.MsgInformacion) - GlobalDTAcumTamaños(UsuarioActual.CveEmpresa) = Nothing + GlobalDTAcumTamaños(UsuarioActual.CveEmpresa) = Nothing Else Alert("Ocurrio un error al Actualizar el Tamaño", TipoMensaje.MsgError) End If diff --git a/Ashx/CargaEventos2.ashx b/Ashx/CargaEventos2.ashx new file mode 100644 index 000000000..65bf9f131 --- /dev/null +++ b/Ashx/CargaEventos2.ashx @@ -0,0 +1,663 @@ +<%@ WebHandler Language="VB" Class="CargaEventos" %> +Option Explicit Off +Option Strict On + +Imports System.Data +Imports Extensiones + +Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState + + Public Property events As List(Of CalendarEvent) + + Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest + context.Response.ContentType = "text/plain" + + Dim CveUsuario As Integer = -1 + Dim CveEmpresa As Integer = -1 + Dim FI As Date + Dim FF As Date + If UsuarioActual(context) Is Nothing Then Exit Sub + + If context.Request("METODO") IsNot Nothing Then + + Select Case context.Request("METODO") + Case "servicio_domicilio" + + If context.Request("U").ToEntero > 0 Then + + CveUsuario = context.Request("U").ToEntero + CveEmpresa = context.Request("E").ToEntero + + Dim CveSubProyecto As Integer = If(context.Request("CveSubProyecto") IsNot Nothing, context.Request("CveSubProyecto").ToEntero, -1) + Dim CveUsuarioPara As Integer = If(context.Request("CveUsuarioPara") IsNot Nothing, context.Request("CveUsuarioPara").ToEntero, -1) + + + FI = context.Request("start").ToDate + FF = context.Request("end").ToDate + + If Not GetEventos(CveUsuario, CveEmpresa, FI, FF, CveOS:=-2, CveUsuarioPara:=CveUsuarioPara, CveSubProyecto:=CveSubProyecto, context:=context) Then + 'Convierte el objeto de Eventos en JSON + 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer + Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events) + + context.Response.Write(sJSON) + End If + End If + + Exit Select + Case "servicio_medicos" + + If context.Request("U").ToEntero > 0 Then + + CveUsuario = context.Request("U").ToEntero + CveEmpresa = context.Request("E").ToEntero + + Dim CveSubProyecto As Integer = If(context.Request("CveSubProyecto") IsNot Nothing, context.Request("CveSubProyecto").ToEntero, -1) + Dim CveUsuarioPara As Integer = If(context.Request("CveUsuarioPara") IsNot Nothing, context.Request("CveUsuarioPara").ToEntero, -1) + Dim FechaI As Date = context.Request("start").ToDate + Dim FechaF As Date = context.Request("end").ToDate + Dim Cvecliente As Integer = -1 'DdlClienteSucursalCliente() + Dim CveClienteSucursal As Integer = -1 ' DdlClienteSucursalSucursal() + Dim CveVendedor As Integer = -1 + Dim CveEstatus As Integer = -1 + Dim ObjOS As New ClsOS + + If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, CveVendedor, CveEstatus, CveUsuarioPara, -1, CveEmpresa, + CveMedico:=-1, CveProcedimiento:=-1, CveEspecialidad:=-1, + CveClienteSucursal:=CveClienteSucursal, CveUsuario:=CveUsuario) Then + + If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then + events = New List(Of CalendarEvent) + For Each dr As DataRow In ObjOS.DtResultados.Rows + Dim cevent As CalendarEvent = New CalendarEvent() + cevent.id = dr("CveOS").ToString.ToEntero + cevent.title = $" {dr("Tecnico")}-{dr("NombreCliente")}" + cevent.description = $" {dr("Tecnico")} -{dr("NombreCliente")} OS# {dr("Folio")}" + cevent.start = String.Format("{0:s}", dr("FechaCita").ToString.ToDateTime) + cevent.end = String.Format("{0:s}", dr("FechaCita").ToString.ToDateTime.AddHours(1)) + cevent.CveOS = dr("CveOS").ToString.ToEntero + cevent.allDay = False + If dr("EstatusOSGral").ToString.Contiene("Levantamiento") Then + cevent.backgroundColor = "#3598dc" + ElseIf dr("EstatusOSGral").ToString.Contiene("Surtido") Then + cevent.backgroundColor = "#002699" + ElseIf dr("EstatusOSGral").ToString.Contiene("Asignado") Then + cevent.backgroundColor = "#8E44AD" + ElseIf dr("EstatusOSGral").ToString.Contiene("Finalizado") Then + cevent.backgroundColor = "#26C281" + ElseIf dr("EstatusOSGral").ToString.Contiene("Facturado") Then + cevent.backgroundColor = "#4B77BE" + ElseIf dr("EstatusOSGral").ToString.Contiene("Cobrado") Then + cevent.backgroundColor = "#29b4b6" + ElseIf dr("EstatusOSGral").ToString.Contiene("Cancelado") Then + cevent.backgroundColor = "#e43a45" + End If + events.Add(cevent) + Next + + context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(events)) + End If + End If + ObjOS.Dispose() + + End If + Exit Select + Case "contrato_transportes" + + If context.Request("U").ToEntero > 0 Then + + CveUsuario = context.Request("U").ToEntero + CveEmpresa = context.Request("E").ToEntero + + Dim CveSubProyecto As Integer = If(context.Request("CveSubProyecto") IsNot Nothing, context.Request("CveSubProyecto").ToEntero, -1) + Dim CveUsuarioPara As Integer = If(context.Request("CveUsuarioPara") IsNot Nothing, context.Request("CveUsuarioPara").ToEntero, -1) + + + FI = context.Request("start").ToDate + FF = context.Request("end").ToDate + + If Not GetContratos(context:=context) Then + 'Convierte el objeto de Eventos en JSON + 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer + Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events) + + context.Response.Write(sJSON) + End If + End If + Exit Select + Case Else + Exit Select + End Select + + Else + If context.Request("U").ToEntero > 0 Then + CveUsuario = context.Request("U").ToEntero + CveEmpresa = context.Request("E").ToEntero + FI = context.Request("start").ToDate + + FF = context.Request("end").ToDate + If Not GetEventos(CveUsuario, CveEmpresa, FI, FF, context:=context) Then + 'Convierte el objeto de Eventos en JSON + 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer + Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events) + + context.Response.Write(sJSON) + End If + + End If + End If + End Sub + + Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable + Get + Return False + End Get + End Property + + + Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date, Optional CveOS As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional context As HttpContext = Nothing) As Boolean + + Dim ErrorEventos As Boolean = False + Dim CveEmpresaCRM As Integer = 0 + Dim DT_SubProyectos As New System.Data.DataTable + DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer)) + DT_SubProyectos.Columns.Add("backgroundColor") + Dim DT_EstatusOS As New DataTable + DT_EstatusOS.Columns.Add("", GetType(Integer)) + Dim ObjEventos As New ClsOIEventos + + 'son 26 + Dim Colores() As String = {"#006699", "#0099cc", "#0066cc", "#0033cc", "#0000ff", "#3333ff", "#3333ff", "#6600ff", "#9933ff", "#cc00ff", "#cc00cc", "#cc0099", "#cc3399", "#cc6699", "#cc0066", "#009933", "#00cc00", "#00cc66", "#009999", "#669900", "#99cc00", "#cccc00", "#cc9900", "#ff9900", "#006666", "#669999"} + + If CveOS = -2 Then + + Dim objSub As New ClsSubProyectos + Dim DtTempSubproyectos As New DataTable + + If objSub.GetSubProyectos(CveEmpresa) Then + DtTempSubproyectos = objSub.DtResultados.FiltraParametros("", "CveSubProyecto") + End If + + objSub.Dispose() + + Dim ColorIndex As Integer = 0 + + If DtTempSubproyectos.Rows.Count > 0 Then + For Each drow As DataRow In DtTempSubproyectos.Rows + + Dim Subrow As DataRow = DT_SubProyectos.NewRow + Subrow("CveSubProyecto") = drow("CveSubProyecto").ToString.ToEntero + Subrow("backgroundColor") = Colores(ColorIndex) + + DT_SubProyectos.Rows.Add(Subrow) + + ColorIndex = ColorIndex + 1 + If ColorIndex >= 25 Then + ColorIndex = 0 + End If + + Next + End If + + End If + + Dim EsCoordinador As Boolean = False + Dim usuarioActual_ As Usuario = UsuarioActual(context) + If context IsNot Nothing AndAlso CveOS = -2 Then + If usuarioActual_.TienePermisoProceso(348) Then + EsCoordinador = True + End If + End If + + If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuarioPara, -1, -1, -1, "-1", -1, -1, -1, -1, CveOS, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF, CveSubProyecto:=CveSubProyecto, EsCoordinador:=EsCoordinador) Then + + If ObjEventos.DtResultados.Rows.Count > 0 Then + events = New List(Of CalendarEvent) + + Try + For Each dr As DataRow In ObjEventos.DtResultados.Rows + + If dr("CveEventoEstatus").ToString.ToEntero <> 5 Then + + Dim cevent As CalendarEvent = New CalendarEvent() + cevent.id = dr("CveEvento").ToString.ToEntero + cevent.title = dr("Asunto").ToString + cevent.description = dr("Descripcion").ToString + cevent.start = String.Format("{0:s}", dr("FechaInicio").ToString.ToDateTime) + cevent.end = String.Format("{0:s}", dr("FechaFin").ToString.ToDateTime) + cevent.allDay = False + cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero + cevent.cveagendatipo = dr("CveAgendaTipo").ToString + cevent.prioridad = dr("CvePrioridad").ToString.ToEntero + cevent.backgroundColor = dr("BackGroundColor").ToString + cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero + cevent.frecuencia = dr("Frecuencia").ToString.ToEntero + cevent.diassemana = dr("DiasSemana").ToString + cevent.dia = dr("Dia").ToString.ToEntero + cevent.mes = dr("Mes").ToString.ToEntero + cevent.recurrenciafin = dr("RecurrenciaFin").ToString + cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero + cevent.Prospecto = dr("Prospecto").ToString + cevent.CveTipoEvento = dr("Prospecto").ToString.ToEntero + cevent.EmpresaCRM = dr("EmpresaCRM").ToString + cevent.SubProyecto = dr("SubProyecto").ToString + cevent.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero + cevent.Direccion = dr("Direccion").ToString + + cevent.CveEmpresaCRM = dr("CveEmpresaCRM").ToString + cevent.CveContactoCRM = dr("CveContactoCRM").ToString + cevent.CveAcercamientoCRM = dr("CveAcercamientoCRM").ToString + + cevent.CvePersonal = dr("CvePersonal").ToString.ToEntero + cevent.CveCliente = dr("CveCliente").ToString.ToEntero + cevent.CveProveedor = dr("CveProveedor").ToString.ToEntero + cevent.NombreCliente = dr("NombreCliente").ToString + cevent.NombreProveedor = dr("NombreProveedor").ToString + cevent.NomprePersonal = dr("NomprePersonal").ToString + + cevent.CveCompra = dr("CveCompra").ToString.ToEntero + cevent.SerieFolioCompra = dr("SerieFolioCompra").ToString + + cevent.CveVenta = dr("CveVenta").ToString.ToEntero + cevent.SerieFolioVenta = dr("SerieFolioVenta").ToString + + cevent.CveOS = dr("CveOS").ToString.ToEntero + cevent.CveOSDetalle = dr("CveOSDetalle").ToString.ToEntero + cevent.CveUsuarioAtendio = dr("CveUsuarioAtendio").ToString.ToEntero + cevent.CveSubProyectoUsuarioAtendio = dr("CveSubProyectoUsuarioAtendio").ToString.ToEntero + + cevent.NombreAcercamiento = dr("NombreAcercamiento").ToString + + cevent.CveActivoFijo = dr("CveActivoFijo").ToString.ToEntero + cevent.AFCodigo = dr("AFCodigo").ToString + + cevent.CveMovimiento = dr("CveMovimientoAlmacen").ToString.ToEntero + cevent.MovimientoFolio = dr("MovimientoFolio").ToString + + cevent.CveIE = dr("CveIE").ToString.ToEntero + cevent.FolioIE = dr("FolioIE").ToString + + + '11/05/2018 - Evento Gasto Recurrente + cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero + If cevent.CveTipoEvento = 10 Then + cevent.Importe = dr("Importe").ToString.ToDouble + End If + + If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then + cevent.backgroundColor = "#1BBC9B" + End If + + If CveOS = -2 Then + cevent.backgroundColor = DT_SubProyectos.FiltroPrimeroValor("backgroundColor", $" CveSubProyecto = {cevent.CveSubProyectoUsuarioAtendio } ") + cevent.backgroundColor = If(cevent.backgroundColor.Trim = "", "#1BBC9B", cevent.backgroundColor.Trim) + End If + + + If usuarioActual_.Empresa.Funcionalidad(578) = "1" Then + + Dim colorString As String = dr("BackgroundColorOS").ToString.Trim + + If colorString.Length > 0 AndAlso IsValidHtmlColor(colorString) Then + cevent.backgroundColor = $"#{colorString}" + Else + If dr("TipoEstatusOS").ToString.ToEntero.Contiene(1, 2, 3) Then + cevent.backgroundColor = "#006699" + ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(4) Then + cevent.backgroundColor = "#025716" + ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(5) Then + cevent.backgroundColor = "#730505" + Else + cevent.backgroundColor = "#006699" + End If + End If + + + + End If + + 'VERIFICAMOS SI TIENE O NO RECURRENCIA + If Not cevent.recurrenciatipo > 0 Then + + 'AGREGAMOS CUANDO NO ES RECURRENTE + Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) + 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA + If dr("FechaFin").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then + events.Add(cevent) + End If + Else + + 'EMPIEZA METODO PARA AGREGAR CUANDO SI ES RECURRENTE + + Dim FinRecurrencia As Integer = cevent.recurrenciafin.ToEntero + Dim FI As DateTime, FF As DateTime, FT As DateTime + Dim DiasSemana As String() = cevent.diassemana.Split(","c) + FI = cevent.start.ToDateTime + FF = cevent.end.ToDateTime + + 'OBTENEMOS LA FECHA TERMINO (FT) DE LA RECURRENCIA + Select Case FinRecurrencia + Case -1 + FT = DateAdd(DateInterval.Year, 2, dr("FechaInicio").ToString.ToDateTime) + Case 0 + FT = dr("RecurrenciaFin").ToString.ToDate + Case Is > 0 + FinRecurrencia -= 1 + Select Case cevent.recurrenciatipo + Case 1 + FT = DateAdd(DateInterval.Hour, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime) + Case 2 + FT = DateAdd(DateInterval.Day, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime) + Case 3 + FT = DateAdd(DateInterval.WeekOfYear, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime) + FT = DateAdd(DateInterval.Day, (7 - Weekday(FT)).ToString.ToDouble, FT) + Case 4 + FT = DateAdd(DateInterval.Month, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime) + Case 5 + FT = DateAdd(DateInterval.Year, FinRecurrencia * cevent.frecuencia, dr("FechaInicio").ToString.ToDateTime) + End Select + End Select + + 'SI ES TIPO SEMANAL Y DIASSEMANA TIENE VALORES CHECKEA ESTOS VALORES + Do + If DiasSemana.Length > 0 AndAlso DiasSemana(0) <> "" Then + For Each drDias As String In DiasSemana + Dim FIT As Date = FI, FFT As Date = FF + + FIT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FI)).ToString.ToDouble, FI) + FFT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FF)).ToString.ToDouble, FF) + + cevent = New CalendarEvent() + cevent.id = dr("CveEvento").ToString.ToEntero + cevent.title = dr("Asunto").ToString + cevent.description = dr("Descripcion").ToString + cevent.start = String.Format("{0:s}", FIT) + cevent.end = String.Format("{0:s}", FFT) + cevent.allDay = False + cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero + cevent.cveagendatipo = dr("CveAgendaTipo").ToString + cevent.prioridad = dr("CvePrioridad").ToString.ToEntero + cevent.backgroundColor = dr("BackGroundColor").ToString + + cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero + cevent.frecuencia = dr("Frecuencia").ToString.ToEntero + cevent.diassemana = dr("DiasSemana").ToString + cevent.dia = dr("Dia").ToString.ToEntero + cevent.mes = dr("Mes").ToString.ToEntero + cevent.recurrenciafin = dr("RecurrenciaFin").ToString + cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero + cevent.Prospecto = dr("Prospecto").ToString + + + + '11/05/2018 - Evento Gasto Recurrente + cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero + If cevent.CveTipoEvento = 10 Then + cevent.Importe = dr("Importe").ToString.ToDouble + End If + + If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then + cevent.backgroundColor = "#1BBC9B" + End If + + 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL Y/0 SI LA FECHA INICIAL DE LA RECURRENCIA ES MENOR A LA FECHA QUE SE CREO EL EVENTO NO LO AGREGA + If FIT > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) And FIT >= dr("FechaInicio").ToString.ToDateTime Then + events.Add(cevent) + End If + Next + Else + cevent = New CalendarEvent() + cevent.id = dr("CveEvento").ToString.ToEntero + cevent.title = dr("Asunto").ToString + cevent.description = dr("Descripcion").ToString + cevent.start = String.Format("{0:s}", FI) + cevent.end = String.Format("{0:s}", FF) + cevent.allDay = False + cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero + cevent.cveagendatipo = dr("CveAgendaTipo").ToString + cevent.prioridad = dr("CvePrioridad").ToString.ToEntero + cevent.backgroundColor = dr("BackGroundColor").ToString + + cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero + cevent.frecuencia = dr("Frecuencia").ToString.ToEntero + cevent.diassemana = dr("DiasSemana").ToString + cevent.dia = dr("Dia").ToString.ToEntero + cevent.mes = dr("Mes").ToString.ToEntero + cevent.recurrenciafin = dr("RecurrenciaFin").ToString + cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero + cevent.Prospecto = dr("Prospecto").ToString + + '11/05/2018 - Evento Gasto Recurrente + cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero + If cevent.CveTipoEvento = 10 Then + cevent.Importe = dr("Importe").ToString.ToDouble + End If + + If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then + cevent.backgroundColor = "#1BBC9B" + End If + + 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA + If FI > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) Then + events.Add(cevent) + End If + End If + + Select Case cevent.recurrenciatipo + Case 1 + FI = DateAdd(DateInterval.Hour, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.Hour, cevent.frecuencia, FF) + Case 2 + FI = DateAdd(DateInterval.Day, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.Day, cevent.frecuencia, FF) + Case 3 + FI = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FF) + Case 4 + FI = DateAdd(DateInterval.Month, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.Month, cevent.frecuencia, FF) + Case 5 + FI = DateAdd(DateInterval.Year, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.Year, cevent.frecuencia, FF) + End Select + + Loop Until FI > FT + End If + End If + Next + Catch ex As Exception + GuardaLog(ex.ToString()) + End Try + End If + + End If + ObjEventos.Dispose() + Return ErrorEventos + End Function + + Private Function GetContratos(Optional context As HttpContext = Nothing) As Boolean + Dim ObjContratos As New ClsContratos + + events = New List(Of CalendarEvent) + + Dim DT_SubProyectos As New DataTable + Dim DT_EstatusOS As New DataTable + Dim usuarioActual_ As Usuario = UsuarioActual(context) + Dim ErrorEventos As Boolean = False + Dim tipoVista As String = context.Request("tipoVista") + DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer)) + DT_SubProyectos.Columns.Add("backgroundColor") + DT_EstatusOS.Columns.Add("", GetType(Integer)) + + If ObjContratos.GetContratos(-1, usuarioActual_.CveEmpresa, TipoContrato:=34) Then + + If ObjContratos.DtResultados.Rows.Count > 0 Then + + Try + For Each dr As DataRow In ObjContratos.DtResultados.Rows + Dim cevent As CalendarEvent = New CalendarEvent() + + cevent.id = dr("CveContrato").ToString.ToEntero + cevent.title = dr("DescripcionContrato").ToString + cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) + cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) + cevent.FechaFinal = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime) + cevent.allDay = False + cevent.NombreAcercamiento = dr("Ubicacion").ToString + cevent.CveCliente = dr("CveCliente").ToString.ToEntero + cevent.NombreComercial = dr("NombreComercial").ToString + cevent.CvePersonal = dr("CveChofer").ToString.ToEntero + cevent.CvePersonal2 = dr("CveChofer2").ToString.ToEntero + cevent.CveEventoEstatus = dr("CveContratosEstatus").ToString.ToEntero + cevent.Dolares = dr("Importe").ToString.ToDecimal + cevent.Pesos = dr("ImporteMax").ToString.ToDecimal + cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal + cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero + cevent.backgroundColor = dr("BackgroundColor").ToString + cevent.CantidadPasajeros = dr("CantidadPasajeros").ToString + cevent.NumeroContrato = dr("NumeroContrato").ToString + + If Not cevent.recurrenciatipo > 0 Then + + 'AGREGAMOS CUANDO NO ES RECURRENTE + Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) + 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA + If dr("FechaFinal").ToString.ToDateTime > tFecha Or dr("FechaInicial").ToString.ToDateTime > tFecha Then + events.Add(cevent) + End If + Else + + 'EMPIEZA METODO PARA AGREGAR CUANDO SI ES RECURRENTE + + Dim FinRecurrencia As Integer = cevent.recurrenciafin.ToEntero + Dim FI As DateTime, FF As DateTime, FT As DateTime + Dim DiasSemana As String() = cevent.diassemana.Split(","c) + FI = cevent.start.ToDateTime + FF = cevent.end.ToDateTime + + 'OBTENEMOS LA FECHA TERMINO (FT) DE LA RECURRENCIA + Select Case FinRecurrencia + Case -1 + FT = DateAdd(DateInterval.Year, 2, dr("FechaInicial").ToString.ToDateTime) + Case Is > 0 + FinRecurrencia -= 1 + Select Case cevent.recurrenciatipo + Case 1 + FT = DateAdd(DateInterval.Hour, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) + Case 2 + FT = DateAdd(DateInterval.Day, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) + Case 3 + FT = DateAdd(DateInterval.WeekOfYear, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) + FT = DateAdd(DateInterval.Day, (7 - Weekday(FT)).ToString.ToDouble, FT) + Case 4 + FT = DateAdd(DateInterval.Month, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) + Case 5 + FT = DateAdd(DateInterval.Year, FinRecurrencia * cevent.frecuencia, dr("FechaInicial").ToString.ToDateTime) + End Select + End Select + + 'SI ES TIPO SEMANAL Y DIASSEMANA TIENE VALORES CHECKEA ESTOS VALORES + Do + If DiasSemana.Length > 0 AndAlso DiasSemana(0) <> "" Then + For Each drDias As String In DiasSemana + Dim FIT As Date = FI, FFT As Date = FF + + FIT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FI)).ToString.ToDouble, FI) + FFT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FF)).ToString.ToDouble, FF) + + cevent = New CalendarEvent() + cevent.id = dr("CveContrato").ToString.ToEntero + cevent.description = dr("DescripcionContrato").ToString + cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) + cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) + cevent.allDay = False + cevent.CveCliente = dr("CveCliente").ToString.ToEntero + cevent.NombreComercial = dr("NombreComercial").ToString + cevent.NombreAcercamiento = dr("Ubicacion").ToString + cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero + cevent.CvePersonal = dr("CveChofer").ToString.ToEntero + + + '11/05/2018 - Evento Gasto Recurrente + cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero + If cevent.CveTipoEvento = 10 Then + cevent.Importe = dr("Importe").ToString.ToDouble + End If + + If cevent.CveEventoEstatus.ToString.ToEntero = 3 Then + cevent.backgroundColor = "#1BBC9B" + End If + + 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL Y/0 SI LA FECHA INICIAL DE LA RECURRENCIA ES MENOR A LA FECHA QUE SE CREO EL EVENTO NO LO AGREGA + If FIT > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) And FIT >= dr("FechaInicial").ToString.ToDateTime Then + events.Add(cevent) + End If + Next + Else + cevent = New CalendarEvent() + cevent.id = dr("CveContrato").ToString.ToEntero + cevent.description = dr("DescripcionContrato").ToString + cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) + cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) + cevent.NombreAcercamiento = dr("Ubicacion").ToString + cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero + cevent.allDay = False + + + + 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA + If FI > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) Then + events.Add(cevent) + End If + End If + + Select Case cevent.recurrenciatipo + Case 1 + FI = DateAdd(DateInterval.Hour, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.Hour, cevent.frecuencia, FF) + Case 2 + FI = DateAdd(DateInterval.Day, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.Day, cevent.frecuencia, FF) + Case 3 + FI = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.WeekOfYear, cevent.frecuencia, FF) + Case 4 + FI = DateAdd(DateInterval.Month, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.Month, cevent.frecuencia, FF) + Case 5 + FI = DateAdd(DateInterval.Year, cevent.frecuencia, FI) + FF = DateAdd(DateInterval.Year, cevent.frecuencia, FF) + End Select + + Loop Until FI > FT + End If + Next + Catch ex As Exception + GuardaLog(ex.ToString()) + End Try + End If + + End If + ObjContratos.Dispose() + Return ErrorEventos + End Function + + ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario + Get + UsuarioActual = DirectCast(If(context IsNot Nothing, context.Session("UsuarioSIG"), Nothing), Usuario) + End Get + End Property + + Private Function IsValidHtmlColor(colorString As String) As Boolean + Try + Dim color As System.Drawing.Color = System.Drawing.ColorTranslator.FromHtml(colorString) + ' Si no se produce una excepción, el color es válido + Return True + Catch ex As Exception + ' Se produce una excepción, el color no es válido + Return False + End Try + End Function + + +End Class diff --git a/Ashx/GenerarPDFFactura.ashx b/Ashx/GenerarPDFFactura.ashx index 0ccfd7b5e..c6d59baaf 100644 --- a/Ashx/GenerarPDFFactura.ashx +++ b/Ashx/GenerarPDFFactura.ashx @@ -161,8 +161,8 @@ Public Class GenerarPDFFactura : Implements IHttpHandler Dim rutaReporte As String = "Empresas\Grales\Formatos\FacturaSALI.rdlc" - Dim cQr As Byte() = ClsPaginas.GeneraQRSAT(objxml.emisor.Rfc, objxml.receptor.Rfc, objxml.comprobante.Total, objxml.complemento.UUID) - + Dim QR As ClbNegBICFDv3_2.ClsNegCBBGenerar = New ClbNegBICFDv3_2.ClsNegCBBGenerar() + Dim cQr As Byte() = QR.GenerarCBBBytes(objxml.emisor.Rfc, objxml.receptor.Rfc, objxml.comprobante.Total, objxml.complemento.UUID) Dim parametros As List(Of ReportParameter) = New List(Of ReportParameter)() parametros.Add(New ReportParameter("comprobante_Certificado", objxml.comprobante.Certificado)) parametros.Add(New ReportParameter("comprobante_CondicionesDePago", objxml.comprobante.CondicionesDePago)) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 47b1d2821..6985e8f7f 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -759,7 +759,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState End If Dim EsDistribuidor As Integer = IfNull(context.Request("esdistribuidor"), "-1").ToString.ToEntero + Dim cveclienteclasificacion = IfNull(context.Request("cveclienteclasificacion"), "-1").ToString.ToEntero + Dim usuario As Usuario = UsuarioActual(context) Dim CveEmpresa As Integer If IsNothing(usuario) Then @@ -797,7 +799,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Else context.Response.Write("[]") End If - If DtRetorno IsNot Nothing Then DtRetorno.Dispose() + DtRetorno.Dispose() DtRetorno = Nothing Return retorno @@ -810,17 +812,17 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Dim DtRetorno As DataTable = Nothing - Dim Estatus = IfNull(context.Request("estatus"), "-1").ToString.ToEntero + Dim Estatus = IfNull(context.Request("estatus"), "-1").ToString.ToEntero - Dim filtro As String = "" + Dim filtro As String = "" - If Estatus = 1 Then - filtro = " Estatus = 'Activo' " - End If + If Estatus = 1 Then + filtro = " Estatus = 'Activo' " + End If - If Estatus = 0 Then - filtro = " Estatus = 'Inactivo' " - End If + If Estatus = 0 Then + filtro = " Estatus = 'Inactivo' " + End If Dim usuario As Usuario = UsuarioActual(context) Dim CveEmpresa As Integer @@ -995,12 +997,11 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState End Try End If - - If usuario.Empresa.Funcionalidad(578) = "1" AndAlso DtPSRetorno IsNot Nothing Then - 'solo muestar productos con existencia. - DtPSRetorno = DtPSRetorno.FiltraParametros("ExistenciaTotal > 0") - End If - If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Columns("ExistenciaTotal") IsNot Nothing Then DtPSRetorno.Columns.Remove("ExistenciaTotal") + If usuario.Empresa.Funcionalidad(578) = "10" AndAlso DtPSRetorno IsNot Nothing Then + 'solo muestar productos con existencia. + DtPSRetorno = DtPSRetorno.FiltraParametros("ExistenciaTotal > 0") + End If + If DtPSRetorno IsNot Nothing ANDALSO DtPSRetorno.Columns("ExistenciaTotal") IsNot Nothing Then DtPSRetorno.Columns.Remove("ExistenciaTotal") If UsaGlobal Then 'se recarga el global, y el clspaginas, son los unicos 2 lugares diff --git a/Bancos/Creditos.aspx.vb b/Bancos/Creditos.aspx.vb index 6d1bb5b0a..4cee9e5da 100644 --- a/Bancos/Creditos.aspx.vb +++ b/Bancos/Creditos.aspx.vb @@ -965,7 +965,7 @@ Partial Class Bancos_Creditos If CveCredito > 0 Then If ObjCredito.UpdateCreditos(CveCredito, DdlTipoCredito.SelectedValue.ToEntero, TxtReferencia.Text, TxtObservaciones.Text, -1, -1, -1, DdlTipoMoneda.SelectedValue.ToEntero, TxtFechaInicio.Text.ToString.ToDate, FechaVencimiento, TxtTasa.Text.Trim.ToDouble, TxtSobreTasa.Text.Trim.ToDouble, TxtIVA.Text.ToDouble / 100, TxtPlazo.Text.Trim.ToEntero, -1, TxtVehiculoValor.Text.ToString.ToDouble, TxtComisionValor.Text.ToString.ToDouble, TxtSeguroMensual.Text.ToString.ToDouble, TxtOtrosGastosValor.Text.ToString.ToDouble, - DdlProveedores.SelectedValue.ToEntero, RBLClasificacionContable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, AplicaAnticipo:=If(RBLAnticipo.SelectedValue.ToEntero = 1, True, False), + DdlProveedores.SelectedValue.ToEntero, RBLClasificacionContable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, AplicaAnticipo:=If(RBLAnticipo.SelectedValue.ToEntero = 1, True, False), CreditoAnticipo:=TxtVehiculoAnticipo.Text.ToDouble, ComisionAnticipo:=TxtComisionAnticipo.Text.ToDouble, SeguroAnticipo:=TxtSeguroAnticipo.Text.ToDouble, OtrosGastosAnticipo:=TxtOtrosGastosAnticipo.Text.ToDouble, FondoGarantia:=TxtFondoGarantia.Text.ToDouble, SeguroValor:=TxtSeguroValor.Text.ToDouble, TipoInteres:=ChkTipoInteres.Checked) Then If RegeneraTablaAmortizacion Then diff --git a/Bancos/CuentasBancarias.aspx b/Bancos/CuentasBancarias.aspx index 400814a62..e1edc5be1 100644 --- a/Bancos/CuentasBancarias.aspx +++ b/Bancos/CuentasBancarias.aspx @@ -25,15 +25,15 @@ -
- " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
- +
+ " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
+ + CssClass="table table-striped table-advance table-hover ScrollAD" Style="text-align: center;" GridLines="None" Width="100%"> diff --git a/Bancos/CuentasBancariasDetalle.aspx b/Bancos/CuentasBancariasDetalle.aspx index 2f73ed70c..3dfb2c2d0 100644 --- a/Bancos/CuentasBancariasDetalle.aspx +++ b/Bancos/CuentasBancariasDetalle.aspx @@ -396,7 +396,7 @@ - + diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 9d74f52cc..355064115 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -84,10 +84,10 @@ Partial Class Bancos_DepositosCaja Else DivRowCuenta.Visible = False DivDescuentocheck.Visible = False - End If - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - DivRowCuenta.Visible = True - End If + End If + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + DivRowCuenta.Visible = True + End If End If If UsuarioActual.CveEmpresa.Contiene(140, 141) Then divTipoPago.Visible = False : divTipoPago1.Visible = False diff --git a/Bancos/Devoluciones.aspx b/Bancos/Devoluciones.aspx index 512e5d298..e495ba9a0 100644 --- a/Bancos/Devoluciones.aspx +++ b/Bancos/Devoluciones.aspx @@ -159,8 +159,8 @@
-
- +
+
diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index 67049b026..4ab715711 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -24,7 +24,7 @@ public partial class Bancos_Devoluciones : ClsPaginas TxtComisiones.Attributes.Add("disabled", "disabled"); TxtTotal.Attributes.Add("disabled", "disabled"); TipoDevolucion.SelectedValue = "1"; - CargarCentrosDeCosto(null, null, null, LblSubProyecto); + CargarCentrosDeCosto(null, null, null, LblSubProyecto); } } diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 12275d7f1..37fce5bfc 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -26,7 +26,9 @@ - +
  • + Póliza +
  • @@ -60,12 +62,7 @@
  • Envíar Comprobante Mail
  • -
  • - Ver Póliza -
  • -
  • - Imprimir Póliza -
  • +
  • diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 8cec942a6..b419b6dd1 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -863,8 +863,6 @@ Partial Class Bancos_IE ViewState("CvePrePoliza") = ObjIE.DtResultados.Rows(0)("CvePrePoliza").ToString.ToEntero HpLPrePoliza.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ViewState("CvePrePoliza")) HpLPrePoliza.Visible = True - LnkDescargaPoliza.Visible = True - LnkDescargaPoliza.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=PREPO&CvePrePoliza={0}", ViewState("CvePrePoliza")))}" TxtFechaDocumento.Text = ObjIE.FechaDocumento.ToShortDateString TxtFolio.Text = ObjIE.Folio LblBeneficiario.Text = ObjIE.PagueseA diff --git a/Bancos/PopIECompras.aspx b/Bancos/PopIECompras.aspx index 09ee2d437..862cb5f76 100644 --- a/Bancos/PopIECompras.aspx +++ b/Bancos/PopIECompras.aspx @@ -707,7 +707,7 @@ if ($("#" + Chk.id).is(":checked")) { $('#' + Obj).attr('disabled', false); if (ToDouble($get('TxtImporte').value) != total) { - + debugger; if ((ToDouble($get('TxtImporte').value) + saldo) > total) { $('#' + Obj).val(saldo - (ToDouble($get('TxtImporte').value) + saldo - total)); $get('TxtImporte').value = (total / TC).toFixed(2) diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 8e54d2bb1..5d3eb3332 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -351,14 +351,6 @@ Partial Class Bancos_PopIECompras TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) End If UpDatos.Update() - - If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then - If Not UsuarioActual.TienePermisoProceso(404) Then - TxtFechaDocumento.Enabled = False - ImgCalendario.Visible = False - End If - End If - End If End Sub diff --git a/Bancos/RepCortes.aspx b/Bancos/RepCortes.aspx index c6a670687..0f8f26f74 100644 --- a/Bancos/RepCortes.aspx +++ b/Bancos/RepCortes.aspx @@ -80,7 +80,7 @@
  • - F.Inicio.: + F.I.:
    @@ -98,7 +98,7 @@
    - F.Fin.: + F.F.:
    diff --git a/Bancos/RepSaldosDetalle.aspx b/Bancos/RepSaldosDetalle.aspx index 6cf7d727c..fa04bace0 100644 --- a/Bancos/RepSaldosDetalle.aspx +++ b/Bancos/RepSaldosDetalle.aspx @@ -55,6 +55,7 @@ + diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 9d519cff9..8a318b45f 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -511,7 +511,7 @@ - + <%-- Ocuoado usado en Garantía--%> @@ -1496,22 +1496,8 @@
    - +
    -
    -
    -
    - - - - - -
    Almacen: - -
    -
    -
    -
    Compra: @@ -1523,17 +1509,31 @@
    -
    - +
    +
    +
    + + + + + +
    Almacen: + +
    +
    +
    + +
    + - - - + + + @@ -1541,7 +1541,7 @@ - + @@ -1549,7 +1549,7 @@ - + diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 33ca7e62f..908a8771d 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1688,8 +1688,10 @@ Partial Class Compras_Compras 'End If End If - 'SE OCUPAN AFUERA DEL POSTBACK ?? + 'SE OCUPAN AFUERA DEL POSTBACK ?? + cargaddlVinculacionServcios() If UsuarioActual.TienePermisoProceso(117) Then + HplAddClasificacion.Visible = False ImgClasificacion.Visible = False End If @@ -2009,8 +2011,6 @@ Partial Class Compras_Compras SubTotalConceptos = TmpDT.SUMD("Total").RoundSQL If Not TmpDT.Columns.Contains("Amortizacion") Then TmpDT.Columns.Add("Amortizacion", GetType(Decimal)) - - If Not TmpDT.Columns.Contains("AplicaSerie") Then TmpDT.Columns.Add(New DataColumn("AplicaSerie", GetType(Boolean)) With {.DefaultValue = False}) If Not TmpDT.Columns.Contains("AplicaLote") Then TmpDT.Columns.Add(New DataColumn("AplicaLote", GetType(Boolean)) With {.DefaultValue = False}) If Not TmpDT.Columns.Contains("AplicaCaducidad") Then TmpDT.Columns.Add(New DataColumn("AplicaCaducidad", GetType(Boolean)) With {.DefaultValue = False}) If Not TmpDT.Columns.Contains("Lote") Then TmpDT.Columns.Add("Lote", GetType(String)) @@ -2121,10 +2121,7 @@ Partial Class Compras_Compras DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("DEV")) DdlTipoCompra.Items.Remove(DdlTipoCompra.Items.FindByValue("6")) DdlTipoCompra.Items.Remove(DdlTipoCompra.Items.FindByValue("11")) - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - DdlTipoCompra.Items.Add(New ListItem("Recolección", "14")) - DdlTipoCompra.Items.Add(New ListItem("Apoyo sin virtual", "16")) - End If + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then DdlTipoCompra.Items.Add(New ListItem("Recolección", "14")) Case "E" DdlTipoComprobante.SelectedValue = "NC" DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Fac")) @@ -2811,9 +2808,6 @@ Partial Class Compras_Compras ViewState("CveProveedor") = CveProveedor ImgBtnBuscarOC.OnClientClick = String.Format("AbrirVentana('/OC/PopUpBuscarReq.aspx?V=VOCCOMP&P={0}&T={1}&Masterimpoup=true',1000,600,'S'); return false;", CveProveedor, DdlTipoComprobante.SelectedValue) - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - If dr("TipoDocto").ToString = "Fac" Then DdlTipoCompra.Items.Add(New ListItem("Apoyo sin virtual", "16")) - End If Dim ObjBancos As New ClsBancos() @@ -2823,11 +2817,13 @@ Partial Class Compras_Compras GvCreditosRelacionados.DataBind() GvCreditos.Visible = False GvCreditosRelacionados.Visible = True + PnlContadoCreditos.Visible = True Else GvCreditosRelacionados.DataSource = Nothing GvCreditosRelacionados.Visible = False GvCreditosRelacionados.DataBind() + End If UpGvCreditos.Update() LblImporteCreditos.Visible = True @@ -2851,6 +2847,7 @@ Partial Class Compras_Compras If ChkEsNoDeducible.Checked Then AplicarNoDeducible() LblMetodoPago.Text = dr("MetodoPagoSAT").ToString CveConceptoContableAlmacen = dr("CveConceptoContableAlmacen").ToString.ToEntero + If UsuarioActual.Empresa.UsaAC Then CambiaEjercicioAC(False) End If @@ -3084,15 +3081,19 @@ Partial Class Compras_Compras If Not TmpDT.Columns.Contains("ImporteSinImpuestos") Then TmpDT.Columns.Add("ImporteSinImpuestos", GetType(Decimal)) End If - If Not TmpDT.Columns.Contains("AplicaSerie") Then TmpDT.Columns.Add("AplicaSerie", GetType(Boolean)) + If Not TmpDT.Columns.Contains("AplicaLote") Then + TmpDT.Columns.Add("AplicaLote", GetType(Boolean)) + End If + If Not TmpDT.Columns.Contains("AplicaCaducidad") Then + TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean)) + End If - If Not TmpDT.Columns.Contains("AplicaLote") Then TmpDT.Columns.Add("AplicaLote", GetType(Boolean)) - - If Not TmpDT.Columns.Contains("AplicaCaducidad") Then TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean)) - - If Not TmpDT.Columns.Contains("Lote") Then TmpDT.Columns.Add("Lote", GetType(String)) - - If Not TmpDT.Columns.Contains("FechaCaducidad") Then TmpDT.Columns.Add("FechaCaducidad", GetType(Date)) + If Not TmpDT.Columns.Contains("Lote") Then + TmpDT.Columns.Add("Lote", GetType(String)) + End If + If Not TmpDT.Columns.Contains("FechaCaducidad") Then + TmpDT.Columns.Add("FechaCaducidad", GetType(Date)) + End If GvPS.DataSource = TmpDT GvPS.DataBind() @@ -4271,8 +4272,22 @@ Partial Class Compras_Compras #End Region -#Region "Vinculacion De Servicios" - +#Region "Vinculacion De Servcios" + Private Function isAdminObraGluyas() As Boolean + Return (UsuarioActual.CveRol = 1047 And UsuarioActual.CveEmpresa = 66) + End Function + Private Sub cargaddlVinculacionServcios() + If isAdminObraGluyas() Then + TabVinculacionServicios.Visible = True + 'Dim productos As New ClsProductosServicios + 'If productos.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then + ' PSDTRemplazo = productos.DtResultados.FiltraParametros("CveTipoPS=2", "PS") + 'End If + 'productos.Dispose() + GVVinculacionServicios.DataSource = TmpDT + GVVinculacionServicios.DataBind() + End If + End Sub Protected Sub GVVinculacionServicios_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVVinculacionServicios.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then Dim dt As DataTable = Nothing @@ -4432,7 +4447,7 @@ Partial Class Compras_Compras Dim CapitalMiltiple As Decimal = GvRow.FCTextBox("TxtCapital").Text.ToDecimal Dim InteresMiltiple As Decimal = GvRow.FCTextBox("TxtInteres").Text.ToDecimal - Dim AmbosMultiple As Decimal = GvRow.FCTextBox("TxtAmbos").Text.ToDecimal + Dim AmbosMiltiple As Decimal = GvRow.FCTextBox("TxtAmbos").Text.ToDecimal Dim MensualidadMultiple As Decimal = GvRow.DataKey("Mensualidad").ToDecimal If CapitalMiltiple > 0 Or InteresMiltiple > 0 Then @@ -4441,9 +4456,9 @@ Partial Class Compras_Compras MensualidadMultipleTotal = MensualidadMultipleTotal + MensualidadMultiple 'CveUltimoCreditoDetalleInterno = GvRow.DataKey("CveCreditoDetalle").ToEntero - ElseIf AmbosMultiple > 0 Then + ElseIf AmbosMiltiple > 0 Then - TotalCreditos = TotalCreditos + AmbosMultiple + TotalCreditos = TotalCreditos + AmbosMiltiple MensualidadMultipleTotal = MensualidadMultipleTotal + MensualidadMultiple 'CveUltimoCreditoDetalleInterno = GvRow.DataKey("CveCreditoDetalle").ToEntero EstatusCredito = GvRow.DataKey("Estatus").ToEntero @@ -5608,287 +5623,284 @@ Partial Class Compras_Compras ' If DdlMoneda.SelectedValue.ToEntero = 1 Or (DdlMoneda.SelectedValue.ToEntero > 1 AndAlso GlobalTipoCambio(TxtFecha.Text.ToDate) > 0) Then ''ALMACEN CONSIGNACION - If DdlTipoComprobante.SelectedValue = "Fac" Then + If CveConsignacion > 0 AndAlso CveCompraRefacturacion <= 0 Then - If CveConsignacion > 0 AndAlso CveCompraRefacturacion <= 0 Then - - 'actualizamos cvecompraconsignacion - For Each gvr As GridViewRow In GvInv.Rows - If gvr.FCCheckBox("cbinv").Checked AndAlso gvr.FCHiddenField("HdnCveConsignacion").Value.ToEntero > 0 Then - If Not ObjInventario.UpdateConsignacionesCompra(CveCompra, gvr.FCHiddenField("HdnCveConsignacion").Value.ToEntero, gvr.FCHiddenField("HdnCveAlmacen").Value.ToEntero, gvr.FCHiddenField("HdnCvePS").Value.ToEntero, gvr.DataKey("Cantidad").ToDecimal, UsuarioActual.CveEmpresa) Then - ErrorMovInv = True - Exit For - End If + 'actualizamos cvecompraconsignacion + For Each gvr As GridViewRow In GvInv.Rows + If gvr.FCCheckBox("cbinv").Checked AndAlso gvr.FCHiddenField("HdnCveConsignacion").Value.ToEntero > 0 Then + If Not ObjInventario.UpdateConsignacionesCompra(CveCompra, gvr.FCHiddenField("HdnCveConsignacion").Value.ToEntero, gvr.FCHiddenField("HdnCveAlmacen").Value.ToEntero, gvr.FCHiddenField("HdnCvePS").Value.ToEntero, gvr.DataKey("Cantidad").ToDecimal, UsuarioActual.CveEmpresa) Then + ErrorMovInv = True + Exit For End If - Next - - If Not ErrorMovInv Then - - Dim x As Integer = 0 - For Each dr As DataRow In DtInv.Rows - If GvInv.Rows(x).FCCheckBox("cbInv").Checked And GvInv.Rows(x).FCTextBox("TbCantidad").Text.ToDouble > 0 Then - - Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dr("Consec").ToString.ToEntero}")(0) 'Charlie - TmpDr("CveAlmacen") = GvInv.Rows(x).FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero 'Charlie - - dr("CveAlmacen") = GvInv.Rows(x).FCDropDownList("ddlealmacen").SelectedValue.ToEntero - dr("Cantidad") = GvInv.Rows(x).FCTextBox("TbCantidad").Text.ToDouble - Else - Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dr("Consec").ToString.ToEntero}")(0) 'Charlie - TmpDr("CveAlmacen") = 0 'Charlie - - dr("CveAlmacen") = 0 - End If - x = x + 1 - Next - - Dim cvemovimientosalida As Integer = 0 - Dim cvemovimientoentrada As Integer = 0 - Dim cvemovimientosalidagasto As Integer = 0 - Dim folio As Integer = 0 - Dim fecha As Date = TxtFecha.Text.ToDate - Dim indice As Integer = 0 - Dim importeconcepto As Decimal = 0 - - Dim listalmacenes As List(Of Integer) = (From cvealmacen In DtInv.AsEnumerable() Where cvealmacen.Field(Of Integer)("cvealmacen") > 0 Select cvealmacen.Field(Of Integer)("cvealmacen")).Distinct().ToList - - For Each tcvealmacen As Integer In listalmacenes - - Dim ObsGDiaz As String = If(EsGrupoDiaz, TxtObsFact.Text, "") - - If GvInv.Rows(indice).FCDropDownList("ddlrecibirinv").SelectedValue = "1" Then - Continue For - End If - indice += 1 - - 'agregamos la entrada - If Not UsuarioActual.Empresa.UsaAC Then fecha = NowADS() - - folio = ObjInventario.GetFolioSiguiente(2, UsuarioActual.CveEmpresa) - cvemovimientoentrada = ObjInventario.AddMovimiento(tcvealmacen, 2, 1, fecha, folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), Modulo:="Comp/G4", Observaciones:=ObsGDiaz) - If cvemovimientoentrada <= 0 Then - ErrorMovInv = True - Exit For - Else - CveMovimientoInventario = cvemovimientoentrada - ListaMovimientosAlmacen.Add(CveMovimientoInventario) - - For Each dr As DataRow In DtInv.Rows - If dr("cvealmacen").ToString.ToEntero = tcvealmacen Then - 'hay que restarle descuento - Dim Lote As String = dr("Lote").ToString - Dim FechaCaducidad As Date = If(dr("FechaCaducidad").ToString.ToDate <= MinFecha, MinFecha, dr("FechaCaducidad").ToString.ToDate) - importeconcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, dr("pu").ToString.ToDecimal, dr("pu").ToString.ToDecimal * TipoCambioGuardar) - (If(DdlMoneda.SelectedValue.ToEntero = 1, dr("descuento").ToString.ToDecimal, dr("descuento").ToString.ToDecimal * TipoCambioGuardar) / dr("cantidad").ToString.ToDecimal) - If Not ObjInventario.AddMovimientoDetalle(cvemovimientoentrada, dr("cantidad").ToString.ToDecimal, dr("cveum").ToString.ToEntero, dr("cveps").ToString.ToEntero, importeconcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, dr("pu").ToString.ToDecimal), CveCompraDetalle:=dr("CveCompraDetalle").ToString.ToEntero, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then - ErrorMovInv = True - Exit For - End If - End If - Next - End If - - 'agregamos la salida - folio = ObjInventario.GetFolioSiguiente(3, UsuarioActual.CveEmpresa) - cvemovimientosalidagasto = ObjInventario.AddMovimiento(tcvealmacen, 3, DdlMoneda.SelectedValue.ToEntero, fecha.AddSeconds(1), folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, Modulo:="Comp/G3", Observaciones:=ObsGDiaz) - If cvemovimientosalidagasto <= 0 Then - ErrorMovInv = True - Exit For - Else - If ObjInventario.GetMovimientosDetalle(cvemovimientoentrada, UsuarioActual.CveEmpresa) Then - For Each dr As DataRow In ObjInventario.DtResultados.Rows - Dim Lote As String = dr("Lote").ToString - Dim FechaCaducidad As Date = If(dr("FechaCaducidad").ToString.ToDate <= MinFecha, MinFecha, dr("FechaCaducidad").ToString.ToDate) - If Not ObjInventario.AddMovimientoDetalle(cvemovimientosalidagasto, dr("cantidad").ToString.ToDecimal, dr("cveum").ToString.ToEntero, dr("cveps").ToString.ToEntero, 0, dr("cveaf").ToString.ToEntero, CveCompraDetalle:=dr("CveCompraDetalle").ToString.ToEntero, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then - ErrorMovInv = True - Exit For - End If - Next - End If - End If - Next - End If + Next - ''ALMACEN NORMAL - Else + If Not ErrorMovInv Then - 'OBTIENE ALMACENES Dim x As Integer = 0 - For Each Dr As DataRow In DtInv.Rows - If GvInv.Rows(x).FCCheckBox("cbInv").Checked And GvInv.Rows(x).FCTextBox("TbCantidad").Text.ToDecimal > 0 Then + For Each dr As DataRow In DtInv.Rows + If GvInv.Rows(x).FCCheckBox("cbInv").Checked And GvInv.Rows(x).FCTextBox("TbCantidad").Text.ToDouble > 0 Then - Dim TmpDr As DataRow = TmpDT.Select($"Consec = {Dr("Consec").ToString.ToEntero}")(0) - TmpDr("CveAlmacen") = GvInv.Rows(x).FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero + Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dr("Consec").ToString.ToEntero}")(0) 'Charlie + TmpDr("CveAlmacen") = GvInv.Rows(x).FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero 'Charlie - Dr("CveAlmacen") = GvInv.Rows(x).FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero - Dr("Cantidad") = GvInv.Rows(x).FCTextBox("TbCantidad").Text.ToDouble + dr("CveAlmacen") = GvInv.Rows(x).FCDropDownList("ddlealmacen").SelectedValue.ToEntero + dr("Cantidad") = GvInv.Rows(x).FCTextBox("TbCantidad").Text.ToDouble + Else + Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dr("Consec").ToString.ToEntero}")(0) 'Charlie + TmpDr("CveAlmacen") = 0 'Charlie - Else 'limpio el valor para que no truene en linq mas abajo - - Dim TmpDr As DataRow = TmpDT.Select($"Consec = {Dr("Consec").ToString.ToEntero}")(0) - TmpDr("CveAlmacen") = 0 - - Dr("CveAlmacen") = 0 + dr("CveAlmacen") = 0 End If x = x + 1 Next - Dim i As Integer = 0 - Dim ListAlmacenes As List(Of Integer) = (From CveAlmacen In DtInv.AsEnumerable() Where CveAlmacen.Field(Of Integer)("CveAlmacen") > 0 Select CveAlmacen.Field(Of Integer)("CveAlmacen")).Distinct().ToList + Dim cvemovimientosalida As Integer = 0 + Dim cvemovimientoentrada As Integer = 0 + Dim cvemovimientosalidagasto As Integer = 0 + Dim folio As Integer = 0 + Dim fecha As Date = TxtFecha.Text.ToDate Dim indice As Integer = 0 - Dim ImporteConcepto As Decimal = 0 - Dim tCveFolioGarantia As Integer = -1 - Dim tCveEntregaAlmacen As Integer = -1 - Dim CveConceptoMovimiento As Integer = 2 - If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then 'cuando es empresa acumuladora - 'apoyo logistico/garantia - If DdlTipoCompra.SelectedValue = "12" Then 'garantía - CveConceptoMovimiento = 13 - tCveFolioGarantia = DdlFolioGarantia.SelectedValue.ToEntero - End If - ''recolección - 'If DdlTipoCompra.SelectedValue = "14" Then 'recolección - ' CveConceptoMovimiento = 42 - ' tCveEntregaAlmacen = DdlRecoleccion.SelectedValue.ToEntero - 'End If - End If + Dim importeconcepto As Decimal = 0 - If (DdlTipoComprobante.SelectedValue = "Fac" AndAlso CveCompraRefacturacion <= 0) OrElse CveConceptoMovimiento = 13 Then + Dim listalmacenes As List(Of Integer) = (From cvealmacen In DtInv.AsEnumerable() Where cvealmacen.Field(Of Integer)("cvealmacen") > 0 Select cvealmacen.Field(Of Integer)("cvealmacen")).Distinct().ToList + + For Each tcvealmacen As Integer In listalmacenes Dim ObsGDiaz As String = If(EsGrupoDiaz, TxtObsFact.Text, "") - For Each tCveAlmacen As Integer In ListAlmacenes - If GvInv.Rows(indice).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then - Continue For - End If - indice += 1 + If GvInv.Rows(indice).FCDropDownList("ddlrecibirinv").SelectedValue = "1" Then + Continue For + End If + indice += 1 - Dim fecha As Date = TxtFecha.Text.ToDate - If Not UsuarioActual.Empresa.UsaAC Then fecha = NowADS() + 'agregamos la entrada + If Not UsuarioActual.Empresa.UsaAC Then fecha = NowADS() - CveMovimientoInventario = ObjInventario.AddMovimiento(tCveAlmacen, CveConceptoMovimiento, 1, fecha, 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), CveFolioGarantia:=tCveFolioGarantia, Modulo:="Comp/G2", CveEntregaAlmacen:=tCveEntregaAlmacen, Observaciones:=ObsGDiaz) + folio = ObjInventario.GetFolioSiguiente(2, UsuarioActual.CveEmpresa) + cvemovimientoentrada = ObjInventario.AddMovimiento(tcvealmacen, 2, 1, fecha, folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), Modulo:="Comp/G4", Observaciones:=ObsGDiaz) + If cvemovimientoentrada <= 0 Then + ErrorMovInv = True + Exit For + Else + CveMovimientoInventario = cvemovimientoentrada + ListaMovimientosAlmacen.Add(CveMovimientoInventario) - If CveMovimientoInventario <= 0 Then - ErrorMovInv = True - Else - - Dim DtDetalle As New DataTable - Dim DtEquivalencias As DataTable - Dim CveProducto As Integer - Dim CantidadInv As Decimal - Dim PUInv As Decimal - Dim CveUnidad As Integer - Dim CostoIndirecto As Decimal - Dim tDescuento As Decimal = 0 - - ListaMovimientosAlmacen.Add(CveMovimientoInventario) - - Dim contadorAlamcen As Integer = 0 - For Each Dr As DataRow In DtInv.Rows - - CveProducto = Dr("CvePS").ToString.ToEntero - CveUnidad = Dr("CveUM").ToString.ToEntero - CantidadInv = Dr("Cantidad").ToString.ToDecimal - PUInv = Dr("PU").ToString.ToDecimal - tDescuento = Dr("Descuento").ToString.ToDecimal / CantidadInv - CostoIndirecto = Dr("CostoIndirectoAlmacen").ToString.ToDecimal - - Dim Lote As String = Dr("Lote").ToString - Dim FechaCaducidad As Date = If(Dr("FechaCaducidad").ToString.ToDate <= MinFecha, MinFecha, Dr("FechaCaducidad").ToString.ToDate) - - Dim AplicaLote As Boolean = If(Dr("AplicaLote").ToString.Trim = "", False, Boolean.Parse(Dr("AplicaLote").ToString)) - Dim AplicaCaducidad As Boolean = If(Dr("AplicaCaducidad").ToString.Trim = "", False, Boolean.Parse(Dr("AplicaCaducidad").ToString)) - Dim CodigoPS As String = Dr("CodigoPS").ToString - - If Dr("CveMetodoInventario").ToString.ToEntero = 5 Then - 'SI FUE POR SERIE LOTE - DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("CvePS = {0}", Dr("CvePS"))) - If DtDetalle.Rows.Count > 0 Then - For Each drr As DataRow In DtDetalle.Rows - - Dim fechaDetalle As Date = drr("FechaCaducidad").ToString.ToDate - - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=drr("Serie").ToString, FechaCaducidad:=drr("FechaCaducidad").ToString.ToDate, CostoIndirecto:=Dr("CostoIndirectoAlmacen").ToString.ToDecimal, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then - ErrorMovInv = True - Exit For - End If - Next - End If - Else - 'UNIDAD BASE - EQUIVALENCIAS - INVENTARIO - 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 - CantidadInv = Dr("Cantidad").ToString.ToDecimal * drUMBase("Cantidad").ToString.ToDecimal / DtEquivalencias.FiltraParametros(String.Format("CveUM = {0}", CveUnidad)).Rows(0)("Cantidad").ToString.ToDecimal - PUInv = PUInv * Dr("Cantidad").ToString.ToDecimal / CantidadInv - CostoIndirecto = CostoIndirecto * Dr("Cantidad").ToString.ToDecimal / CantidadInv - CveUnidad = CveUnidadBase - End If - End If - ImporteConcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, PUInv, PUInv * TipoCambioGuardar) - If(DdlMoneda.SelectedValue.ToEntero = 1, tDescuento, tDescuento * TipoCambioGuardar) - 'si no es por serie lote - ImporteConcepto = If(UsuarioActual.Empresa.UsaAC, ImporteConcepto * IVA, ImporteConcepto) - If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then - - If AplicaLote And Lote.Trim = "" Then - ErrorMovInv = True - Alert($"Porducto {CodigoPS} requiere Lote.", TipoMensaje.MsgAdvertencia) - Exit For - End If - If AplicaCaducidad And FechaCaducidad <= MinFecha Then - ErrorMovInv = True - Alert($"Porducto {CodigoPS} requiere fecha de caducidad.", TipoMensaje.MsgAdvertencia) - Exit For - End If - - If Not ErrorMovInv Then - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDecimal), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then - ErrorMovInv = True - Exit For - End If - End If - - - End If + For Each dr As DataRow In DtInv.Rows + If dr("cvealmacen").ToString.ToEntero = tcvealmacen Then + 'hay que restarle descuento + Dim Lote As String = dr("Lote").ToString + Dim FechaCaducidad As Date = If(dr("FechaCaducidad").ToString.ToDate <= MinFecha, MinFecha, dr("FechaCaducidad").ToString.ToDate) + importeconcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, dr("pu").ToString.ToDecimal, dr("pu").ToString.ToDecimal * TipoCambioGuardar) - (If(DdlMoneda.SelectedValue.ToEntero = 1, dr("descuento").ToString.ToDecimal, dr("descuento").ToString.ToDecimal * TipoCambioGuardar) / dr("cantidad").ToString.ToDecimal) + If Not ObjInventario.AddMovimientoDetalle(cvemovimientoentrada, dr("cantidad").ToString.ToDecimal, dr("cveum").ToString.ToEntero, dr("cveps").ToString.ToEntero, importeconcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, dr("pu").ToString.ToDecimal), CveCompraDetalle:=dr("CveCompraDetalle").ToString.ToEntero, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then + ErrorMovInv = True + Exit For + End If + End If + Next + End If + + 'agregamos la salida + folio = ObjInventario.GetFolioSiguiente(3, UsuarioActual.CveEmpresa) + cvemovimientosalidagasto = ObjInventario.AddMovimiento(tcvealmacen, 3, DdlMoneda.SelectedValue.ToEntero, fecha.AddSeconds(1), folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, Modulo:="Comp/G3", Observaciones:=ObsGDiaz) + If cvemovimientosalidagasto <= 0 Then + ErrorMovInv = True + Exit For + Else + If ObjInventario.GetMovimientosDetalle(cvemovimientoentrada, UsuarioActual.CveEmpresa) Then + For Each dr As DataRow In ObjInventario.DtResultados.Rows + Dim Lote As String = dr("Lote").ToString + Dim FechaCaducidad As Date = If(dr("FechaCaducidad").ToString.ToDate <= MinFecha, MinFecha, dr("FechaCaducidad").ToString.ToDate) + If Not ObjInventario.AddMovimientoDetalle(cvemovimientosalidagasto, dr("cantidad").ToString.ToDecimal, dr("cveum").ToString.ToEntero, dr("cveps").ToString.ToEntero, 0, dr("cveaf").ToString.ToEntero, CveCompraDetalle:=dr("CveCompraDetalle").ToString.ToEntero, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then + ErrorMovInv = True + Exit For End If - i = i + 1 - contadorAlamcen = contadorAlamcen + 1 Next + End If + End If + Next - ''insertar en prepólizas - If CveMovimientoAlmacen > 0 Then - Dim tImporte As Decimal - If ObjInventario.GetMovimientosDetalle(CveMovimientoAlmacen, UsuarioActual.CveEmpresa) Then - tImporte = ObjInventario.DtResultados.SUM("Total") + End If + + ''ALMACEN NORMAL + Else + + 'OBTIENE ALMACENES + Dim x As Integer = 0 + For Each Dr As DataRow In DtInv.Rows + If GvInv.Rows(x).FCCheckBox("cbInv").Checked And GvInv.Rows(x).FCTextBox("TbCantidad").Text.ToDecimal > 0 Then + + Dim TmpDr As DataRow = TmpDT.Select($"Consec = {Dr("Consec").ToString.ToEntero}")(0) + TmpDr("CveAlmacen") = GvInv.Rows(x).FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero + + Dr("CveAlmacen") = GvInv.Rows(x).FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero + Dr("Cantidad") = GvInv.Rows(x).FCTextBox("TbCantidad").Text.ToDouble + + Else 'limpio el valor para que no truene en linq mas abajo + + Dim TmpDr As DataRow = TmpDT.Select($"Consec = {Dr("Consec").ToString.ToEntero}")(0) + TmpDr("CveAlmacen") = 0 + + Dr("CveAlmacen") = 0 + End If + x = x + 1 + Next + + Dim i As Integer = 0 + Dim ListAlmacenes As List(Of Integer) = (From CveAlmacen In DtInv.AsEnumerable() Where CveAlmacen.Field(Of Integer)("CveAlmacen") > 0 Select CveAlmacen.Field(Of Integer)("CveAlmacen")).Distinct().ToList + Dim indice As Integer = 0 + Dim ImporteConcepto As Decimal = 0 + Dim tCveFolioGarantia As Integer = -1 + Dim tCveEntregaAlmacen As Integer = -1 + Dim CveConceptoMovimiento As Integer = 2 + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then 'cuando es empresa acumuladora + 'apoyo logistico/garantia + If DdlTipoCompra.SelectedValue = "12" Then 'garantía + CveConceptoMovimiento = 13 + tCveFolioGarantia = DdlFolioGarantia.SelectedValue.ToEntero + End If + ''recolección + 'If DdlTipoCompra.SelectedValue = "14" Then 'recolección + ' CveConceptoMovimiento = 42 + ' tCveEntregaAlmacen = DdlRecoleccion.SelectedValue.ToEntero + 'End If + End If + + If (DdlTipoComprobante.SelectedValue = "Fac" AndAlso CveCompraRefacturacion <= 0) OrElse CveConceptoMovimiento = 13 Then + + Dim ObsGDiaz As String = If(EsGrupoDiaz, TxtObsFact.Text, "") + + For Each tCveAlmacen As Integer In ListAlmacenes + If GvInv.Rows(indice).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then + Continue For + End If + indice += 1 + + Dim fecha As Date = TxtFecha.Text.ToDate + If Not UsuarioActual.Empresa.UsaAC Then fecha = NowADS() + + CveMovimientoInventario = ObjInventario.AddMovimiento(tCveAlmacen, CveConceptoMovimiento, 1, fecha, 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), CveFolioGarantia:=tCveFolioGarantia, Modulo:="Comp/G2", CveEntregaAlmacen:=tCveEntregaAlmacen, Observaciones:=ObsGDiaz) + + If CveMovimientoInventario <= 0 Then + ErrorMovInv = True + Else + + Dim DtDetalle As New DataTable + Dim DtEquivalencias As DataTable + Dim CveProducto As Integer + Dim CantidadInv As Decimal + Dim PUInv As Decimal + Dim CveUnidad As Integer + Dim CostoIndirecto As Decimal + Dim tDescuento As Decimal = 0 + + ListaMovimientosAlmacen.Add(CveMovimientoInventario) + + Dim contadorAlamcen As Integer = 0 + For Each Dr As DataRow In DtInv.Rows + + CveProducto = Dr("CvePS").ToString.ToEntero + CveUnidad = Dr("CveUM").ToString.ToEntero + CantidadInv = Dr("Cantidad").ToString.ToDecimal + PUInv = Dr("PU").ToString.ToDecimal + tDescuento = Dr("Descuento").ToString.ToDecimal / CantidadInv + CostoIndirecto = Dr("CostoIndirectoAlmacen").ToString.ToDecimal + + Dim Lote As String = Dr("Lote").ToString + Dim FechaCaducidad As Date = If(Dr("FechaCaducidad").ToString.ToDate <= MinFecha, MinFecha, Dr("FechaCaducidad").ToString.ToDate) + + Dim AplicaLote As Boolean = If(Dr("AplicaLote").ToString.Trim = "", False, Boolean.Parse(Dr("AplicaLote").ToString)) + Dim AplicaCaducidad As Boolean = If(Dr("AplicaCaducidad").ToString.Trim = "", False, Boolean.Parse(Dr("AplicaCaducidad").ToString)) + Dim CodigoPS As String = Dr("CodigoPS").ToString + + If Dr("CveMetodoInventario").ToString.ToEntero = 5 Then + 'SI FUE POR SERIE LOTE + DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("CvePS = {0}", Dr("CvePS"))) + If DtDetalle.Rows.Count > 0 Then + For Each drr As DataRow In DtDetalle.Rows + + Dim fechaDetalle As Date = drr("FechaCaducidad").ToString.ToDate + + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=drr("Serie").ToString, FechaCaducidad:=drr("FechaCaducidad").ToString.ToDate, CostoIndirecto:=Dr("CostoIndirectoAlmacen").ToString.ToDecimal, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then + ErrorMovInv = True + Exit For + End If + Next End If - ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, tImporte, tImporte, 68, ObjInventario.Folio.ToString, ObjInventario.Folio.ToString, CveMovimientoAlmacen:=CveMovimientoInventario) - End If + Else + 'UNIDAD BASE - EQUIVALENCIAS - INVENTARIO + 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'") - If Not ErrorMovInv Then - 'REPLICAR MOVTO GENERADO - If UsuarioActual.CveEmpresa = 199 AndAlso CveMovimientoInventario > 0 Then - If Not ObjInventario.ReplicarMovtoEmpresa(UsuarioActual.CveEmpresa, CveMovimientoInventario) Then - ErrorMovInv = 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 + CantidadInv = Dr("Cantidad").ToString.ToDecimal * drUMBase("Cantidad").ToString.ToDecimal / DtEquivalencias.FiltraParametros(String.Format("CveUM = {0}", CveUnidad)).Rows(0)("Cantidad").ToString.ToDecimal + PUInv = PUInv * Dr("Cantidad").ToString.ToDecimal / CantidadInv + CostoIndirecto = CostoIndirecto * Dr("Cantidad").ToString.ToDecimal / CantidadInv + CveUnidad = CveUnidadBase End If End If + ImporteConcepto = If(DdlMoneda.SelectedValue.ToEntero = 1, PUInv, PUInv * TipoCambioGuardar) - If(DdlMoneda.SelectedValue.ToEntero = 1, tDescuento, tDescuento * TipoCambioGuardar) + 'si no es por serie lote + ImporteConcepto = If(UsuarioActual.Empresa.UsaAC, ImporteConcepto * IVA, ImporteConcepto) + If Dr("CveAlmacen").ToString.ToEntero = tCveAlmacen Then + + If AplicaLote And Lote.Trim = "" Then + ErrorMovInv = True + Alert($"Porducto {CodigoPS} requiere Lote.", TipoMensaje.MsgAdvertencia) + Exit For + End If + If AplicaCaducidad And FechaCaducidad <= MinFecha Then + ErrorMovInv = True + Alert($"Porducto {CodigoPS} requiere fecha de caducidad.", TipoMensaje.MsgAdvertencia) + Exit For + End If + + If Not ErrorMovInv Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, CantidadInv, CveUnidad, Dr("CvePS").ToString.ToEntero, ImporteConcepto, -1, PUTC:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, Dr("PU").ToString.ToDecimal), CostoIndirecto:=CostoIndirecto, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then + ErrorMovInv = True + Exit For + End If + End If + + + End If End If + i = i + 1 + contadorAlamcen = contadorAlamcen + 1 + Next + ''insertar en prepólizas + If CveMovimientoAlmacen > 0 Then + Dim tImporte As Decimal + If ObjInventario.GetMovimientosDetalle(CveMovimientoAlmacen, UsuarioActual.CveEmpresa) Then + tImporte = ObjInventario.DtResultados.SUM("Total") + End If + ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, tImporte, tImporte, 68, ObjInventario.Folio.ToString, ObjInventario.Folio.ToString, CveMovimientoAlmacen:=CveMovimientoInventario) End If - Next - End If - End If - If AplicarCostoIndirecto(ObjInventario, ObjCompras) Then - ErrorMovInv = True - End If + If Not ErrorMovInv Then + 'REPLICAR MOVTO GENERADO + If UsuarioActual.CveEmpresa = 199 AndAlso CveMovimientoInventario > 0 Then + If Not ObjInventario.ReplicarMovtoEmpresa(UsuarioActual.CveEmpresa, CveMovimientoInventario) Then + ErrorMovInv = True + End If + End If + End If + End If + Next + End If End If + + If AplicarCostoIndirecto(ObjInventario, ObjCompras) Then + ErrorMovInv = True + End If + End If '*************************************************** P R I M E R A P A R T E C O M P R A S ************************************************************************************************************************************************************************************************************************************************************************************************** @@ -6813,7 +6825,7 @@ Partial Class Compras_Compras Dim RegistroCuentaPuente As Boolean = False 'NC CON PRODUCTOS - CUENTA PUENTE - If DdlTipoComprobante.SelectedValue = "NC" AndAlso DdlTipoCompra.SelectedValue.Contiene("9", "12") Then + If DdlTipoComprobante.SelectedValue = "NC" And DdlTipoCompra.SelectedValue.Contiene("9", "12") Then RegistraConcepto225 = True End If @@ -6832,14 +6844,15 @@ Partial Class Compras_Compras If Devolucion IsNot Nothing AndAlso Devolucion.DebeRealizarDevolucion AndAlso Devolucion.CveMovimiento > 0 Then ConceptoContabilizacionNC = 68 CveMovimientoDevolucion = Devolucion.CveMovimiento - importeMovimiento = TmpDT.SUM("Total") - importeMN = importeMovimiento * tipoCambioActual * Multiplicador End If 'cuando es garantía. - If DdlTipoCompra.SelectedValue.Contiene("12", "14") Then ConceptoContabilizacionNC = 259 + If DdlTipoCompra.SelectedValue.Contiene("12", "14") Then + ConceptoContabilizacionNC = 259 + End If Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" + If importeMovimiento > 0 Or TxtTotal.Text.ToDecimal = 0 Then RegistroCuentaPuente = True Dim ImporteTransito As Decimal = 0 @@ -6857,6 +6870,8 @@ Partial Class Compras_Compras End If End If Next + + Dim importeMNTemp As Decimal = 0 Dim CveCompraAmortizacion As Integer = -1 @@ -6875,15 +6890,19 @@ Partial Class Compras_Compras ImporteTransito += importeMNTemp CveCompraAmortizacion = Gvr.DataKey("CveCompra").ToEntero 'se registra por cada compra relacionada + End If Next If importeMNTemp > 0 Then + 'importeMNTemp = importeMNTemp - TxtDescuento.Text.ToDecimal + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMNTemp, importeMNTemp, ConceptoContabilizacionNC, Referencia, Concepto, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraAmortizacion, CveProveedor:=CveProveedorConcepto, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If End If + 'si se marca que no se va a recibir, falta validación If Not ErrorMovInv AndAlso Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 1, UsuarioActual.CveUsuario) Then ErrorMovInv = True @@ -6904,6 +6923,8 @@ Partial Class Compras_Compras End If End If Else + + Dim DiferenciaDevolucion As Decimal = If(DdlMoneda.SelectedValue.ToEntero <> 1, (importeMovimiento * TxtTC.Text.ToDecimal), importeMovimiento) - TotalRealDevolucion If TotalRealDevolucion <> 0 Then @@ -10902,13 +10923,12 @@ Partial Class Compras_Compras TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer)) TmpDT.Columns.Add("TemporadaCuadro", GetType(String)) - TmpDT.Columns.Add("AplicaSerie", GetType(Boolean)) TmpDT.Columns.Add("AplicaLote", GetType(Boolean)) TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean)) - TmpDT.Columns.Add("Serie", GetType(String)) TmpDT.Columns.Add("Lote", GetType(String)) TmpDT.Columns.Add("FechaCaducidad", GetType(Date)) + TmpDTOriginal = New DataTable TmpDTOriginal.Columns.Add("Consec", GetType(Integer)) TmpDTOriginal.Columns.Add("Cantidad", GetType(Decimal)) @@ -11018,10 +11038,8 @@ Partial Class Compras_Compras TmpDTOriginal.Columns.Add("CveCultivoCuadroDetalle", GetType(Double)) TmpDTOriginal.Columns.Add("TemporadaCuadro", GetType(String)) - TmpDTOriginal.Columns.Add("AplicaSerie", GetType(Boolean)) TmpDTOriginal.Columns.Add("AplicaLote", GetType(Boolean)) TmpDTOriginal.Columns.Add("AplicaCaducidad", GetType(Boolean)) - TmpDTOriginal.Columns.Add("Serie", GetType(String)) TmpDTOriginal.Columns.Add("Lote", GetType(String)) TmpDTOriginal.Columns.Add("FechaCaducidad", GetType(Date)) @@ -12173,6 +12191,8 @@ Partial Class Compras_Compras #Region " AJUSTA IMPORTES " Private Sub AjustaImporteUltimoConcepto(ImporteAjuste As Decimal, Optional EsCarga As Boolean = False) + + If ImporteAjuste = 0 Then Exit Sub Dim Amortizacion As Decimal = 0 @@ -13856,14 +13876,8 @@ Partial Class Compras_Compras 'si no esta vinculado a nc simplemente me lo brinco If realizadevolucion Then - 'si el subtotal es igual a la nc lo guardo si no marco error - Dim tTolerancia As Decimal = 0 - Dim tAjustaUltimo As Boolean = True - If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then - tTolerancia = Math.Abs(TxtSubTotal2.Text.ToDecimal - subtotaldevolucion) - tAjustaUltimo = False - End If - If Math.Abs(subtotal - subtotaldevolucion) <= tTolerancia Then + 'si el subtotal es iwal a la nc lo guardo si no marco error + If subtotal > subtotaldevolucion - 1 AndAlso subtotal < subtotaldevolucion + 1 Then CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 13, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, Modulo:="Comp/G1") If CveMovimientoEntrada <= 0 Then @@ -13880,17 +13894,17 @@ Partial Class Compras_Compras PU = Dr.DataKey("PU").ToString.ToDecimal PUExtranjero = Dr.DataKey("PUExtranjero").ToString.ToDecimal ii += 1 - If CantidadRenglones = ii AndAlso tAjustaUltimo Then + If CantidadRenglones = ii Then Dim dif As Decimal = subtotal - Acumulado - PU = (((Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToDecimal)) + dif) / Dr.FCTextBox("TxtCantidad").Text.ToDecimal + PU = (((Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal)) + dif) / Dr.FCTextBox("TxtCantidad").Text.ToDecimal End If - Dim tFechaExistencia As DateTime = TxtFecha.Text.ToDateTime.AddHours(NowADS().Hour).AddMinutes(NowADS().Minute).AddSeconds(NowADS().Second) - If ObjInventario.GetExistenciasProducto(Dr.DataKey("CvePS").ToEntero, Dr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, CveAlmacen, - FechaMovto:=tFechaExistencia.ToString("yyyy/MM/dd HH:mm")) Then + If ObjInventario.GetExistenciasProducto(Dr.DataKey("CvePS").ToString.ToEntero, Dr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, CveAlmacen, + FechaMovto:=TxtFecha.Text.ToDateTime.AddHours(NowADS().Hour).AddMinutes(NowADS().Minute).AddSeconds(NowADS().Second).ToString("yyyy/MM/dd HH:mm")) Then Dim Existencia As Decimal = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", CveAlmacen)).ToDecimal + If Dr.FCTextBox("TxtCantidad").Text.ToDouble > Existencia Then - Alert($"No hay existencia suficiente del producto:
    - {Dr.DataKey("CodigoPS")} en la fecha: {tFechaExistencia.ToString("yyyy/MM/dd HH:mm")}", TipoMensaje.MsgAdvertencia) + Alert($"No hay existencia suficiente del producto {Dr.DataKey("PS").ToString} en la fecha:{TxtFecha.Text}", TipoMensaje.MsgAdvertencia) ErrorMovInv = True Exit For End If @@ -13988,6 +14002,8 @@ Partial Class Compras_Compras Try Dim subtotaldevolucion As Decimal = 0 Dim realizadevolucion As Boolean = False + + 'Calculo los subtotales para comparar con la NC Dim cantidad As Decimal = 0D @@ -14002,13 +14018,11 @@ Partial Class Compras_Compras 'si no esta vinculado a nc simplemente me lo brinco If realizadevolucion Then - 'si el subtotal es igual a la nc lo guardo si no marco error - 'si tiene FNC574, se ajustará la diferencia a un concepto como RNC - Dim tTolerancia As Decimal = 1 - 'si tiene la funcionalidad ajustará en un producto la diferencia - If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then tTolerancia = Math.Abs(TxtSubTotal2.Text.ToDecimal - subtotaldevolucion) - If Math.Abs(TxtSubTotal2.Text.ToDecimal - subtotaldevolucion) <= tTolerancia Then + 'si el subtotal es iwal a la nc lo guardo si no marco error + If TxtSubTotal2.Text.ToDouble > subtotaldevolucion - 1 AndAlso TxtSubTotal2.Text.ToDouble < subtotaldevolucion + 1 Then + VinculaDevolucion() + Else Alert("El Total de la NC debe ser igual al total de la devolucion", TipoMensaje.MsgAdvertencia) End If @@ -14033,42 +14047,48 @@ Partial Class Compras_Compras Dim RetIVACompra As Decimal = TxtRetIVA.Text.ToDecimal() Dim RetISRCompra As Decimal = TxtRetISR.Text.ToDecimal() Dim Acumulado As Decimal = 0 + + 'Dim TotalCalculable As Decimal = TotalCompra - IEPSCompra + RetIVACompra + RetISRCompra + Dim IVAPorcentajeCompra As Decimal = Math.Round((IVACompra / SubTotalCompra), 2) Dim Contador As Integer = 0 Dim Consec As Integer = 0 - Dim tAjusteUltimo As Boolean = True For Each gvr As GridViewRow In GVDevolucion.Rows If gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Then Contador += 1 End If Next - Dim Total As Decimal = 0 - Dim CveSubProyectoDev As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenDevolucion.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto") - Dim SubProyecto As String = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyectoDev.ToEntero).FiltroPrimeroValor("SubProyecto") + Dim CveSubProyectoContrato As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenDevolucion.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto") + Dim SubProyecto As String = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyectoContrato.ToEntero).FiltroPrimeroValor("SubProyecto") 'Iteramos el GridView de la OC - If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then tAjusteUltimo = False For Each gvr As GridViewRow In GVDevolucion.Rows If gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Then + Dim CvePS As Integer = gvr.DataKey("CvePS").ToString.ToEntero + 'Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") + Dim Cantidad As Decimal = gvr.FCTextBox("TxtCantidad").Text.ToDecimal Dim CveUM As Integer = gvr.DataKey("CveUM").ToString.ToEntero Dim UM As String = gvr.DataKey("UM").ToString Dim CveClasificacion As Integer = gvr.DataKey("CveClasificacion").ToString.ToEntero Dim Clasificacion As String = gvr.DataKey("Clasificacion").ToString - Dim PS As String = gvr.DataKey("CodigoPS").ToString + Dim PS As String = gvr.DataKey("PS").ToString Dim CveTipoPS As Integer = gvr.DataKey("CveTipoPS").ToString.ToEntero + Dim CveProyecto As String = "-1" + Dim Proyecto As String = "Seleccione" Dim Obs As String = "" Dim PU As Decimal = gvr.DataKey("PU").ToString.ToDecimal - Total = gvr.FCTextBox("TxtTotalDevolucion").Text.ToDecimal + Dim Total As Decimal = gvr.FCTextBox("TxtTotalDevolucion").Text.ToDecimal + Dim IVA As Decimal = IVAPorcentajeCompra 'Math.Round(Total * IVAPorcentajeCompra, 2) Dim Descuento As Decimal = 0 Acumulado += (PU * Cantidad) Consec += 1 - If Consec = Contador AndAlso tAjusteUltimo Then 'SubTotalCompra < Acumulado Then + If Consec = Contador Then 'SubTotalCompra < Acumulado Then 'ajusta el valor Dim dif As Decimal = SubTotalCompra - Acumulado If dif <> 0 Then @@ -14076,25 +14096,10 @@ Partial Class Compras_Compras Total = Cantidad * PU End If End If - AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoDev, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVAPorcentajeCompra, 0, 0, 0, 0, Descuento, -1, False, CveAlmacen:=DdlAlmacenDevolucion.SelectedValue.ToEntero) + AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, 0, 0, 0, 0, Descuento, -1, False) End If Next - If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then - Dim CvePS_RNC As Integer = UsuarioActual.Empresa.Funcionalidad(580).ToEntero - If CvePS_RNC = 0 Then - Alert("producto utilizado para diferencia no definido.") - Exit Sub - End If - Dim PSRow As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS_RNC).FiltroPrimero("") - Dim PS As String = PSRow("PSCodigo").ToString - Dim tDif As Decimal = TxtSubTotal2.Text.ToDecimal - Total - - AddPS(1, PSRow("CveUnidadMedida").ToString.ToEntero, PSRow("UnidadMedida").ToString, - PSRow("CveClasificacion").ToString.ToEntero, PSRow("Clasificacion").ToString, CvePS_RNC, PS, 1, CveSubProyectoDev.ToString, SubProyecto, "", "-1", "", tDif, tDif, IVAPorcentajeCompra, 0, 0, 0, 0, 0) - - End If - AddPS2() BtnGuardar.Enabled = True @@ -14110,7 +14115,7 @@ Partial Class Compras_Compras ImgClasificacion.Visible = False LbAgregar.Visible = False - + UpPSS.Update() 'CargaGvInv() @@ -14132,6 +14137,7 @@ Partial Class Compras_Compras End If GvOC1.DataBind() + ' TmpDT = OrdenarTablas("CvePS", DTOCTemp, TmpDT) GvOC2.DataSource = TmpDT GvOC2.DataBind() @@ -14485,13 +14491,19 @@ Partial Class Compras_Compras End If End If - If Not TmpDT.Columns.Contains("AplicaLote") Then TmpDT.Columns.Add("AplicaLote", GetType(Boolean)) + If Not TmpDT.Columns.Contains("AplicaLote") Then + TmpDT.Columns.Add("AplicaLote", GetType(Boolean)) + End If + If Not TmpDT.Columns.Contains("AplicaCaducidad") Then + TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean)) + End If + If Not TmpDT.Columns.Contains("Lote") Then + TmpDT.Columns.Add("Lote", GetType(String)) + End If + If Not TmpDT.Columns.Contains("FechaCaducidad") Then + TmpDT.Columns.Add("FechaCaducidad", GetType(Date)) + End If - If Not TmpDT.Columns.Contains("AplicaCaducidad") Then TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean)) - - If Not TmpDT.Columns.Contains("Lote") Then TmpDT.Columns.Add("Lote", GetType(String)) - - If Not TmpDT.Columns.Contains("FechaCaducidad") Then TmpDT.Columns.Add("FechaCaducidad", GetType(Date)) If ObjInventario.GetInv_ComprasMov(CveCompra, UsuarioActual.CveEmpresa) Then If ObjInventario.DtResultados.Rows.Count > 0 Then @@ -18157,7 +18169,7 @@ Partial Class Compras_Compras Case "A" 'ADD Dim SATClavePS As Integer = -1 - Dim PSRow As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("") + Dim PSRow As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("") If PSRow IsNot Nothing Then SATClavePS = PSRow("SATClavePS").ToString.ToEntero End If @@ -18246,10 +18258,13 @@ Partial Class Compras_Compras Optional PSCodigo As String = "-", Optional PSDescripcion As String = "-", Optional CantidadF As Double = -1, Optional EntregaDirecta As Integer = -1, Optional OtrosGastos As Decimal = 0, Optional CveSATPS As Integer = -1, Optional CargaXml As Boolean = False, Optional CveTipoGasto As Integer = -1, Optional TipoGasto As String = "", Optional PorcentajeIVA As Decimal = 0, Optional PorcentajeIEPS As Decimal = 0, Optional PorcentajeRetIVA As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1, - Optional CveSATPSActualizado As Boolean = False, Optional TemporadaCuadro As String = "", Optional CodigoPS As String = "", Optional CveAlmacen As Integer = -1) As Integer + Optional CveSATPSActualizado As Boolean = False, Optional TemporadaCuadro As String = "", Optional CodigoPS As String = "") As Integer Dim Row As DataRow = Nothing - If Not TmpDT.Columns.Contains("CodigoPS") Then TmpDT.Columns.Add("CodigoPS") + + If Not TmpDT.Columns.Contains("CodigoPS") Then + TmpDT.Columns.Add("CodigoPS") + End If Row = TmpDT.NewRow() Dim Retorno As Integer = 0 @@ -18407,14 +18422,11 @@ Partial Class Compras_Compras Row("CveTipoGasto") = CveTipoGasto Row("TipoGasto") = If(CveTipoGasto > 0, TipoGasto, "") + Row("CveContratoDetalle") = CveContratoDetalle - Row("AplicaSerie") = DrPS("AplicaSerie") - Row("AplicaLote") = DrPS("AplicaLote") - Row("AplicaCaducidad") = DrPS("AplicaCaducidad") Row("CveCultivoCuadroDetalle") = CveCultivoCuadroDetalle Row("TemporadaCuadro") = TemporadaCuadro - If CveAlmacen > 0 Then Row("CveAlmacen") = CveAlmacen If UsuarioActual.Empresa.UsaAC Then Row("CveProgramaOperativo") = DdlACGeneral1.SelectedValue.ToEntero @@ -18424,6 +18436,7 @@ Partial Class Compras_Compras Row("CveClasificacionOG") = DdlACGeneral5.SelectedValue.ToEntero End If + 'Esta parte es para validar cuando la factura tenga ieps en o se asignara el ieps como una partida ya no se considere If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 Then Row("IEPSPS") = 0 @@ -20736,27 +20749,18 @@ Partial Class Compras_Compras End If End If - If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then 'cuando es emp DIAZ + If DdlTipoCompra.SelectedValue = "15" Then 'Remisión de nota de crédito - If DdlTipoCompra.SelectedValue = "15" Then 'Remisión de nota de crédito - - If DdlTipoComprobante.SelectedValue = "NC" Then - CargaGVRemisionNotaCredito() - HLAplicaNCFact.Visible = False - Else - Alert("Para elegir Remisión de Nota de Crédito el tipo de documento debe de ser Nota de Crédito.", TipoMensaje.MsgAdvertencia) - 'DdlRemisionNotaCredito.SelectedValueExist(-1) - DdlTipoCompra.SelectedValueExist(-1) - End If + If DdlTipoComprobante.SelectedValue = "NC" Then + CargaGVRemisionNotaCredito() + HLAplicaNCFact.Visible = False Else - 'SE ACTIVA DE NUEVO PARA LA SELECCIÓN - HLAplicaNCFact.Visible = True - InicializaAplicaNCFact() - If CveFactura > 0 Then NCSeleccionFacturasRelacionadas(UUIDSList) + Alert("Para elegir Remisión de Nota de Crédito el tipo de documento debe de ser Nota de Crédito.", TipoMensaje.MsgAdvertencia) + 'DdlRemisionNotaCredito.SelectedValueExist(-1) + DdlTipoCompra.SelectedValueExist(-1) End If End If - End Sub @@ -22846,7 +22850,7 @@ Public Class ClsCompraManagerCompras Public Property CveMetodoPago As Integer Public Property MetodoPago As String - Public Property DocumentosRelacionadosUUIDSList As HashSet(Of String) = New HashSet(Of String) + Public Property DocumentosRelacionadosUUIDSList As List(Of String) = New List(Of String) Public ReadOnly Property DocumentosRelacionadosUUIDSString As String Get Return GeneraStringDoctosRelacionados() @@ -23065,7 +23069,7 @@ Public Class ClsCompraManagerCompras If TipoComprobante.ToUpper = "E" AndAlso (CFDIVersion = EnumCFDIVersion.v33 OrElse CFDIVersion = EnumCFDIVersion.v40) Then Dim UUIDS As String = "" - Dim UUIDSLista As New HashSet(Of String) + Dim UUIDSLista As New List(Of String) Dim nodeCFDIRelacionados As XmlNode nodeCFDIRelacionados = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces) @@ -23217,7 +23221,6 @@ Public Class ClsCompraManagerCompras If Not TmpDT.Columns.Contains("AplicaLote") Then TmpDT.Columns.Add("AplicaLote", GetType(Boolean)) If Not TmpDT.Columns.Contains("AplicaCaducidad") Then TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean)) - If Not TmpDT.Columns.Contains("AplicaSerie") Then TmpDT.Columns.Add("AplicaSerie", GetType(Boolean)) If Not TmpDT.Columns.Contains("Lote") Then TmpDT.Columns.Add("Lote", GetType(String)) @@ -23468,7 +23471,7 @@ Public Class ClsCompraManagerCompras TmpDT.Columns.Add("TemporadaCuadro", GetType(String)) TmpDT.Columns.Add("NoIdentificacion", GetType(String)) - TmpDT.Columns.Add("AplicaSerie", GetType(Boolean)) + TmpDT.Columns.Add("AplicaLote", GetType(Boolean)) TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean)) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index bb7c75bd0..cc779f1fa 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -3163,7 +3163,7 @@ Partial Class PopUpVerFactura If UsuarioActual.CveEmpresa.Contiene(4, 145) Then params.Add(New ReportParameter("FacturadoA", If(CveCompra > 0, dr("RazonSocial").ToString, ""))) End If - If UsuarioActual.CveEmpresa = 119 Then + If UsuarioActual.CveEmpresa.Contiene(119, 199, 201) Then params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) params.Add(New ReportParameter("RazonSocialOC", RazonSocialOC)) @@ -3181,7 +3181,7 @@ Partial Class PopUpVerFactura If CveConcepto = 33 Then ConceptoFormato = "ENTRADA MANUAL" 'IMPRESION ESPECIAL SALIDA DE COMPUPROVEEDORES y VSH - If UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 4, 145, 146, 186, 193, 189) Then + If UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 4, 145, 146, 186, 193, 189, 199, 201) Then params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Concepto", ConceptoFormato)) params.Add(New ReportParameter("Almacen", Almacen)) @@ -3273,6 +3273,8 @@ Partial Class PopUpVerFactura ImprimirPDF(String.Format("{0}Formatos/Entradas.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") Else + + params.Add(New ReportParameter("TipoDocumento", String.Format("Compras {0}", Almacen))) params.Add(New ReportParameter("Fecha", If(CveCompra > 0, dr("Fecha").ToString.ToDate.ToShortDateString, ""))) params.Add(New ReportParameter("Folio", Folio.ToString)) @@ -3392,7 +3394,7 @@ Partial Class PopUpVerFactura If Archivo.Exists Then 'IMPRESION ESPECIAL SALIDA DE COMPUPROVEEDORES y VSH - If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 4, 145, 146, 186) Then + If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 4, 145, 146, 186, 199, 201) Then Dim CiudadSucursal As String = "" Dim DomicilioSucursal As String = "" Dim DomicilioCliente As String = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("SucClienteDireccion").ToString, DtMovimientos(0)("SucClienteNoExt").ToString, DtMovimientos(0)("SucClienteNoInt").ToString, DtMovimientos(0)("SucClienteColonia"), DtMovimientos(0)("SucClienteCP").ToString, DtMovimientos(0)("SucClienteCiudad"), DtMovimientos(0)("SucClientePais").ToString) @@ -4199,7 +4201,7 @@ Partial Class PopUpVerFactura Dim dr As DataRow = ObjCompra.DtResultados.Rows(0) Dim FechaCompra As Date = dr("FechaMovto").ToString.ToDate Dim FechaVencimiento As Date = dr("FechaVencimiento").ToString.ToDate - params.Add(New ReportParameter("Fecha", FechaCompra.ToShortDateString)) + params.Add(New ReportParameter("FechaVencimiento", FechaVencimiento.ToShortDateString)) params.Add(New ReportParameter("Plazo", DateDiff(DateInterval.Day, FechaCompra, FechaVencimiento).ToString)) 'params.Add(New ReportParameter("Folio", Folio.ToString)) @@ -4220,9 +4222,33 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Total", dr("Total").ToString.FormatoNumero(2))) params.Add(New ReportParameter("TotalLetra", String.Format("({0})", dr("Total").ToString.ToDecimal.Texto2Letras(dr("CveMoneda").ToString.ToEntero).ToUpper))) - params.Add(New ReportParameter("Observaciones", dr("Observaciones").ToString)) params.Add(New ReportParameter("Capturo", dr("NombreCapturo").ToString)) + If UsuarioActual.CveEmpresa.Contiene(189) Then + + params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN A PROVEEDOR")) + + params.Add(New ReportParameter("Observaciones", Observaciones)) + + params.Add(New ReportParameter("TelefonoProveedor", If(CveCompra > 0, dr("Telefono").ToString, ""))) + params.Add(New ReportParameter("ContactoProveedor", If(CveCompra > 0, dr("ContactoNombre").ToString, ""))) + params.Add(New ReportParameter("FechaFactura", If(CveCompra > 0, dr("Fecha").ToString.ToDate().ToString("dd/MM/yyyy"), ""))) + params.Add(New ReportParameter("SerieFolio", If(CveCompra > 0, dr("SerieFolio").ToString, ""))) + params.Add(New ReportParameter("Moneda", If(CveCompra > 0, dr("Moneda").ToString, ""))) + params.Add(New ReportParameter("Condicion", If(CveCompra > 0, (((dr("FechaVencimiento").ToString.ToDate - dr("Fecha").ToString.ToDate)).TotalDays).ToString, ""))) + params.Add(New ReportParameter("Saldo", If(CveCompra > 0, dr("Saldo").ToString.ToDouble.FormatoNumero(2), ""))) + params.Add(New ReportParameter("NumeroOrden", If(CveCompra > 0, dr("OCSerieFolioVinculada").ToString, ""))) + Dim Fecha2 As String = String.Format("{0} {1}", FechaHora.ToDate.ToString("dd/MM/yyyy"), FechaHora.ToDateTime.ToString("HH:mm:ss")) + params.Add(New ReportParameter("Fecha", Fecha2)) + params.Add(New ReportParameter("NombreCapturo", dr("NombreCapturo").ToString)) + + Else + params.Add(New ReportParameter("Observaciones", dr("Observaciones").ToString)) + params.Add(New ReportParameter("Fecha", FechaCompra.ToShortDateString)) + End If + + + Else params.Add(New ReportParameter("Fecha", Fecha)) params.Add(New ReportParameter("Observaciones", Observaciones)) @@ -5995,6 +6021,7 @@ Partial Class PopUpVerFactura Dim reportDataSetsList As New List(Of ReportDataSource) Dim CvePrePoliza As Integer = ObjIE.DtResultados.Rows(0)("CvePrePoliza").ToString.ToEntero Dim dtMovs As New DataTable + Dim TC As Decimal = ObjIE.TipoCambio If ObjIE.GetBancosIEFacturasPagadas(CveIE, UsuarioActual.CveEmpresa) Then dtMovs = ObjIE.DtResultados.FiltraParametros("CveConceptoContable IN (17,2,308,309,312,292 )") @@ -6042,6 +6069,8 @@ Partial Class PopUpVerFactura .Add(New ReportParameter("Folio", ObjIE.Folio, True)) .Add(New ReportParameter("MonedaAbreviatura", ObjIE.MonedaAbreviatura, True)) .Add(New ReportParameter("LogoPath", RutaImagenLogo)) + .Add(New ReportParameter("TC", TC.ToString)) + End With dtMovs.Dispose() diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index f1f241e4d..1801c70c2 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -2053,7 +2053,7 @@ + DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento"> @@ -2093,17 +2093,20 @@ CssClass="btn btn-circle btn-sm green" Text="" /> - + - - - - - + + + + + + + + 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal @@ -756,6 +761,10 @@ Partial Class Compras_ReembolsosComprobaciones MsgError = "no se pudo insertar el detalle de la poliza" End If + If UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) Then + Pago.AplicaAcreditable = False + End If + If Not AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then MsgError = "Detalle" End If diff --git a/Compras/RepCompras.aspx b/Compras/RepCompras.aspx index 0eea249dd..c2c3b08bd 100644 --- a/Compras/RepCompras.aspx +++ b/Compras/RepCompras.aspx @@ -174,14 +174,43 @@ --%>
    - +
    F. I. Captura
    +
    +
    + + + + + + + + + + +
    +
    +
    F. F. Captura:
    +
    +
    + + + + + + + + + + +
    +
    Moneda:
    -
    Tipo de Prov:
    +
    Tipo de Proveedor:
    @@ -190,18 +219,14 @@
    -
    Tipo Docto:
    -
    - +
    +
    +
    Capturó:
    +
    + - - - -
    -
    -
    Responsable:
    @@ -214,45 +239,17 @@ --%> -
    -
    -
    -
    Capturó:
    -
    - - - -
    -
    F. I. Captura
    -
    -
    - - - - - - - - - - -
    -
    -
    F. F. Captura:
    -
    -
    - - - - - - - - - - -
    -
    +
    +
    Tipo Docto:
    +
    + + + + + + + +
    diff --git a/Compras/RepCxPDetalle.aspx.vb b/Compras/RepCxPDetalle.aspx.vb index a64a043e8..f7927f7b0 100644 --- a/Compras/RepCxPDetalle.aspx.vb +++ b/Compras/RepCxPDetalle.aspx.vb @@ -242,8 +242,7 @@ Partial Class RepCxPDetalle 'Private ReadOnly Property ColumnasVisibles As Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - - AgregarChecksRangos() 'Esto requiere generarse en cada postaback + AgregarChecksRangos() If Not IsPostBack Then SePersonalizo = 0 diff --git a/Compras/RepNotasCredito.aspx.vb b/Compras/RepNotasCredito.aspx.vb index ed89558d0..286f7dc18 100644 --- a/Compras/RepNotasCredito.aspx.vb +++ b/Compras/RepNotasCredito.aspx.vb @@ -58,7 +58,7 @@ Partial Class Compras_RepNotasCredito If Tab.ActiveTabIndex = 0 Then CargaDatos() Else - CargaDatosRNC() + CargaDatosRemisiones() End If End Sub @@ -142,7 +142,7 @@ Partial Class Compras_RepNotasCredito #Region "REMISIONES" - Private Sub CargaDatosRNC() + Private Sub CargaDatosRemisiones() DtDatosRemisiones = New DataTable GvRemisiones.DataSource = Nothing Dim ObjCompras As New ClsCompras diff --git a/Compras/RepProductosServiciosDetalle.aspx b/Compras/RepProductosServiciosDetalle.aspx index 1869066d7..1107a2db1 100644 --- a/Compras/RepProductosServiciosDetalle.aspx +++ b/Compras/RepProductosServiciosDetalle.aspx @@ -261,19 +261,19 @@ - + + - + + - - - + - + diff --git a/Compras/RepProductosServiciosDetalle.aspx.vb b/Compras/RepProductosServiciosDetalle.aspx.vb index 19ca0a061..2288c44b6 100644 --- a/Compras/RepProductosServiciosDetalle.aspx.vb +++ b/Compras/RepProductosServiciosDetalle.aspx.vb @@ -118,7 +118,6 @@ Partial Class Compras_RepProductosServiciosDetalle If CveCultivo.Length > 0 AndAlso FechaI = "-1" AndAlso Anio = "-1" AndAlso Mes = "-1" AndAlso AnioMes = "-1" Then txtFechaI.Text = "01/01/1900" End If - If Fecha <> "-1" Then txtFechaI.Text = Fecha txtFechaF.Text = Fecha diff --git a/Compras/eFacturas.aspx b/Compras/eFacturas.aspx index 8ce9fe9ff..0e84a3b80 100644 --- a/Compras/eFacturas.aspx +++ b/Compras/eFacturas.aspx @@ -319,6 +319,7 @@ +
    diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 4a4a355c6..150fa2d97 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -744,12 +744,26 @@ Partial Class Compras_eFacturas ViewState("DTTraslados") = value End Set End Property + Private Property EsGrupoDiaz As Boolean + Get + If ViewState("EsGrupoDiaz") Is Nothing Then + ViewState("EsGrupoDiaz") = False + End If + Return CType(ViewState("EsGrupoDiaz"), Boolean) + End Get + Set(value As Boolean) + ViewState("EsGrupoDiaz") = value + End Set + End Property #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then + + 'EsGrupoDiaz = If(UsuarioActual.Empresa.Funcionalidad(382) = "1", True, False) + ChecandoCorreo = False ViewState("Orden") = String.Empty @@ -784,7 +798,8 @@ Partial Class Compras_eFacturas End If If UsuarioActual.TienePermisoProceso(206) Then GvD.Columns(13).Visible = False If UsuarioActual.Empresa.Funcionalidad(156) = "1" Then GvD.Columns(7).Visible = True - If UsuarioActual.CveEmpresa.Contiene(13, 83) AndAlso UsuarioActual.CveRol = 1 Then + + If (UsuarioActual.CveEmpresa.Contiene(13, 83) AndAlso UsuarioActual.CveRol = 1) Or EsGrupoDiaz Then LnkRegistarFactura.Visible = True End If @@ -793,14 +808,16 @@ Partial Class Compras_eFacturas MostrarSolcitudesSAT() 'CARGA REGISTRO DE FACTURA + If EsGrupoDiaz Then + CargaClasificacionesComprobaciones() + CargaClasificaciones() + CargaPS(-1) + CargaPersoanlCajaChica() + CargaPersonalViaticos() + CargaDdlRetIVA() + CargaDdlRetISR() + End If - 'CargaClasificacionesComprobaciones() - 'CargaClasificaciones() - 'CargaPS(-1) - 'CargaPersoanlCajaChica() - 'CargaPersonalViaticos() - 'CargaDdlRetIVA() - 'CargaDdlRetISR() Dim LblSubProyectoTemp As New Label CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyectoTemp, "Seleccione") @@ -6864,8 +6881,15 @@ Public Class ClsCompraManager Dim DrTipoGasto As DataRow = Me.DTTiposGastos.FiltroPrimero("") - DrPS("CveTipoGasto") = DrTipoGasto("CveTipoGasto") - DrPS("TipoGasto") = DrTipoGasto("TipoGasto") + If DrTipoGasto Is Nothing Then + DrPS("CveTipoGasto") = -1 + DrPS("TipoGasto") = "" + Else + DrPS("CveTipoGasto") = DrTipoGasto("CveTipoGasto") + DrPS("TipoGasto") = DrTipoGasto("TipoGasto") + End If + + If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then DrPS("AplicaCostoIndirecto") = "0" diff --git a/Contabilidad/ContabilidadElectronica.aspx.vb b/Contabilidad/ContabilidadElectronica.aspx.vb index b6fca602a..6774efaa5 100644 --- a/Contabilidad/ContabilidadElectronica.aspx.vb +++ b/Contabilidad/ContabilidadElectronica.aspx.vb @@ -178,16 +178,16 @@ Partial Class Contabilidad_ContabilidadElectronica Dim DtCuentas As New DataTable If UsuarioActual.Empresa.TipoContabilidad = 1 Then Dim objconta As New ClsContabilidad - If objconta.GetBalanzaComprobacion(FechaI, FechaF, 1, 1, -1, -1, UsuarioActual.CveEmpresa, 0) Then + If objconta.GetBalanzaComprobacion(FechaI, FechaF, 1, -1, -1, -1, UsuarioActual.CveEmpresa, 0) Then DtCuentas = objconta.DtResultados End If objconta.Dispose() If DtCuentas IsNot Nothing Then - Dim Deudor As Decimal = DtCuentas.SUM("SaldoAD", "Id is null") - Dim Acreedor As Decimal = DtCuentas.SUM("SaldoAA", "Id is null") + Dim Deudor As Decimal = DtCuentas.SUM("SaldoAD") + Dim Acreedor As Decimal = DtCuentas.SUM("SaldoAA") If Deudor <> Acreedor Then - Alert("los Saldos Actuales no cuadran. " & Deudor - Acreedor, TipoMensaje.MsgError) + Alert("los Saldos Actuales no cuadran.", TipoMensaje.MsgError) Exit Sub End If End If diff --git a/Contabilidad/DiarioPagos.aspx.vb b/Contabilidad/DiarioPagos.aspx.vb index a614dce7f..b92daaddf 100644 --- a/Contabilidad/DiarioPagos.aspx.vb +++ b/Contabilidad/DiarioPagos.aspx.vb @@ -711,7 +711,7 @@ Partial Class Contabilidad_DiarioPagos 'cuando el anticipo no paga toda la factura y no esta contabilizada If AbonoAnticipo < CompraTotal AndAlso Not EsContabilizada Then AbonoProveedor = CompraTotal - AbonoAnticipo 'ejecuta la instruccion para contabilizar la prepoliza de amortizacion cuando es unica, es decir se hace al final del cheque, luego otra prepoliza con la compra y tercera la amortizacion - If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, CvePlantillaPoliza) Then MsgError = "Error al actualizar compra" : Exit For Else PolizaActualizada = True + If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, CvePlantillaPoliza) Then MsgError = "Error al actualizar compra" : Exit For Else PolizaActualizada = True Case 2, 1 TotalProveedores = TotalBancos @@ -721,7 +721,7 @@ Partial Class Contabilidad_DiarioPagos IdCuentaProveedor = gvrc.FCHiddenField("HdnIdCtaContProveedores").Value.ToEntero Case 20 'contabilizo la prepoliza - If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, CvePlantillaPoliza) Then MsgError = "Error al actualizar compra" : Exit For Else PolizaActualizada = True + If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, CvePlantillaPoliza) Then MsgError = "Error al actualizar compra" : Exit For Else PolizaActualizada = True Case 8 'FyE AbonoFuncionario = CompraPagadoTotal @@ -803,7 +803,7 @@ Partial Class Contabilidad_DiarioPagos Next 'debe de actualizar - If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero) Then + If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero) Then 'ya esta corriendo un proceso que actualiza la 'If Not PolizaActualizada Then MsgError = "Error al actualizar compra" : Exit For End If diff --git a/Contabilidad/FiltraPolizas.aspx b/Contabilidad/FiltraPolizas.aspx index 993ff84f8..8d4cd1cf5 100644 --- a/Contabilidad/FiltraPolizas.aspx +++ b/Contabilidad/FiltraPolizas.aspx @@ -183,7 +183,7 @@ - + diff --git a/Contabilidad/LibroDiario.aspx b/Contabilidad/LibroDiario.aspx new file mode 100644 index 000000000..1c7f57634 --- /dev/null +++ b/Contabilidad/LibroDiario.aspx @@ -0,0 +1,114 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="LibroDiario.aspx.vb" Inherits="Contabilidad_LibroDiario" %> + + + + + + + +
  • + Generar EXCEL +
  • +
  • + Imprimir +
  • +
    + + + + +
    +
    + + Libro Diario + + + + + + + +
    +
    +
    + +
    +
    +
    + +
    +
    + + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    + +
    +
    + + <%--
    +
    Buscar : + +
    --%> + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + diff --git a/Contabilidad/LibroDiario.aspx.vb b/Contabilidad/LibroDiario.aspx.vb new file mode 100644 index 000000000..3ba05710a --- /dev/null +++ b/Contabilidad/LibroDiario.aspx.vb @@ -0,0 +1,261 @@ +Option Explicit On +Option Strict On +Imports System.Collections.Generic +Imports System.Data +Imports Extensiones +Imports System.Activities.Statements +Imports Microsoft.Reporting.WebForms +Imports System + +Partial Class Contabilidad_LibroDiario + Inherits ClsPaginas + +#Region "PROPIEDADES" + Private Property DtDatos As DataTable + Get + DtDatos = DirectCast(ViewState("DtDatos"), DataTable) + End Get + + Set(ByVal value As DataTable) + ViewState("DtDatos") = value + End Set + End Property + Private Property FechaInicio As Date + Get + FechaInicio = ViewState("FechaInicio").ToString.ToDate + End Get + Set(value As Date) + ViewState("FechaInicio") = value + End Set + End Property + Private Property FechaFin As Date + Get + FechaFin = ViewState("FechaFin").ToString.ToDate + End Get + Set(value As Date) + ViewState("FechaFin") = value + End Set + End Property + Private Property IdCuenta As Integer + Get + IdCuenta = ViewState("IdCuenta").ToString.ToEntero + End Get + Set(value As Integer) + ViewState("IdCuenta") = value + End Set + End Property +#End Region + + Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load + If Not Page.IsPostBack Then + + InicializaValores() + + BtnConsultar.Enabled = True + 'If UsuarioActual.Empresa.UsaAC Then + ' BtnConsultar.Enabled = True + 'Else + ' Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError) + 'End If + + End If + End Sub + + Private Sub InicializaValores() + + TxtFechaDel.Text = $"01/01/{NowADS().Year}" + TxtFechaAl.Text = NowADS().ToShortDateString + End Sub + + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) + CargaDatos() + End Sub + +#Region "C A R G A - D A T O S" + Private Sub CargaDatos() + + FechaInicio = If(IsDate(TxtFechaDel.Text), TxtFechaDel.Text.ToDate, MinFecha) + FechaFin = If(IsDate(TxtFechaAl.Text), TxtFechaAl.Text.ToDate, MaxFecha) + + 'FechaInicio = New Date(2016, 1, 1) + 'FechaFin = New Date(2016, 1, 31) + + + If UsuarioActual.Empresa.TipoContabilidad = 1 Then + + Dim ObjConta As New ClsContabilidad + If ObjConta.GetLibroDiarioSIG(FechaInicio, FechaFin, UsuarioActual.CveEmpresa) Then + DtDatos = ObjConta.DtResultados + Else + DtDatos = Nothing + End If + ObjConta.Dispose() + + Else + Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + If ObjConta.GetLibroDiario(FechaInicio, FechaFin) Then + DtDatos = ObjConta.DtResultados + Else + DtDatos = Nothing + End If + ObjConta.Dispose() + End If + + + + + If DtDatos IsNot Nothing Then + ImgExcel.Visible = True + Imprimir.Visible = True + CargaGrid() + Else + ImgExcel.Visible = False + Imprimir.Visible = False + End If + + End Sub +#End Region + + +#Region "G R I D - GV DATOS" + Private Sub CargaGrid() + GvDatos.DataSource = DtDatos + GvDatos.DataBind() + UpDatos.Update() + End Sub + Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + + + ''CABECERA + 'If e.Row.DBCampo("Concepto").ToString <> "" And e.Row.DBCampo("Id").ToString = "" Then + ' e.Row.Font.Bold = True + ' e.Row.Cells(4).Text = "" + ' e.Row.Cells(5).Text = "" + ' e.Row.Cells(6).Text = "" + ' e.Row.Cells(7).Text = "" + ' e.Row.Cells(8).Text = "" + ' e.Row.CssClass = "SubTotales" ' + 'End If + + ''DETALLE + 'If e.Row.DBCampo("Codigo").ToString <> "" Then + ' e.Row.Cells(0).Text = "" + ' e.Row.Cells(1).Text = "" + ' e.Row.Cells(2).Text = "" + ' e.Row.Cells(3).Text = "" + 'End If + + ''SUBTOTAL + 'If e.Row.DBCampo("Fecha").ToString <> "" And e.Row.DBCampo("Concepto").ToString = "" Then + ' e.Row.Font.Bold = True + ' e.Row.Cells(0).Text = "" + ' e.Row.Cells(1).Text = "" + ' e.Row.Cells(2).Text = "" + ' e.Row.Cells(3).Text = "" + ' e.Row.Cells(4).Text = "" + ' e.Row.Cells(5).Text = "" + ' e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right + ' e.Row.Cells(6).Text = "Total:" + ' e.Row.CssClass = "SubTotales" + 'End If + + ''TOTAL + 'If e.Row.DBCampo("Fecha").ToString = "" Then + ' e.Row.Font.Bold = True + ' e.Row.Cells(0).Text = "" + ' e.Row.Cells(1).Text = "" + ' e.Row.Cells(2).Text = "" + ' e.Row.Cells(3).Text = "" + ' e.Row.Cells(4).Text = "" + ' e.Row.Cells(5).Text = "" + ' e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right + ' e.Row.Cells(6).Text = "Total:" + ' e.Row.CssClass = "Totales" + 'End If + + 'CABECERA + If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 1 Then + e.Row.Font.Bold = True + e.Row.Cells(4).Text = "" + e.Row.Cells(5).Text = "" + e.Row.Cells(6).Text = "" + e.Row.Cells(7).Text = "" + e.Row.Cells(8).Text = "" + e.Row.CssClass = "SubTotales" ' + End If + + 'DETALLE + If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 2 Then + e.Row.Cells(0).Text = "" + e.Row.Cells(1).Text = "" + e.Row.Cells(2).Text = "" + e.Row.Cells(3).Text = "" + End If + + 'SUBTOTAL + If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 3 Then + e.Row.Font.Bold = True + e.Row.Cells(0).Text = "" + e.Row.Cells(1).Text = "" + e.Row.Cells(2).Text = "" + e.Row.Cells(3).Text = "" + e.Row.Cells(4).Text = "" + e.Row.Cells(5).Text = "" + e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right + e.Row.Cells(6).Text = "Total:" + e.Row.CssClass = "SubTotales" + End If + + 'TOTAL + If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 4 Then + e.Row.Font.Bold = True + e.Row.Cells(0).Text = "" + e.Row.Cells(1).Text = "" + e.Row.Cells(2).Text = "" + e.Row.Cells(3).Text = "" + e.Row.Cells(4).Text = "" + e.Row.Cells(5).Text = "" + e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right + e.Row.Cells(6).Text = "Total:" + e.Row.CssClass = "Totales" + End If + + End If + End Sub + +#End Region + + +#Region " IMPRIMIR " + + Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click + 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) + 'DtDatos = DtDatos + ImprimirReporte() + End Sub + + Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click + 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) + 'DtDatos = DtDatos + ImprimirReporte("EXCEL") + End Sub + + Private Sub ImprimirReporte(Optional Formato As String = "PDF") + Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + Dim lista = New List(Of CrystalParametro) + lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa)) + lista.Add(New CrystalParametro("FechaInicio", FechaInicio.ToString("dd/MM/yyyy"))) + lista.Add(New CrystalParametro("FechaFin", FechaFin.ToString("dd/MM/yyyy"))) + lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre)) + lista.Add(New CrystalParametro("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) + + ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/LibroDiario.rpt"), DtDatos, lista, "LibroDiario", Formato), "LibroDiario", Formato) + End Sub +#End Region + +End Class diff --git a/Contabilidad/RegPoliza.aspx.vb b/Contabilidad/RegPoliza.aspx.vb index 431bf440c..99c7192d4 100644 --- a/Contabilidad/RegPoliza.aspx.vb +++ b/Contabilidad/RegPoliza.aspx.vb @@ -152,7 +152,7 @@ Partial Class RegPoliza Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.LoadComplete If Not IsPostBack Then - If UsuarioActual.Empresa.TipoContabilidad = 1 Then Response.Redirect($"/Contabilidad/RegPrePolizaS.aspx") + If UsuarioActual.Empresa.TipoContabilidad = 1 Then Response.Redirect($"/Contabilidad/RegPrePolizaS.aspx") ViewState("Orden0") = "" ViewState("Orden1") = "" diff --git a/Contabilidad/RegPrePoliza.aspx b/Contabilidad/RegPrePoliza.aspx index d5387a20d..49a629720 100644 --- a/Contabilidad/RegPrePoliza.aspx +++ b/Contabilidad/RegPrePoliza.aspx @@ -1,4 +1,4 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrepoliza.aspx.vb" Inherits="ContabilidadC_RegPrePoliza" EnableEventValidation="false" %> +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrePoliza.aspx.vb" Inherits="ContabilidadC_RegPrePoliza" EnableEventValidation="false" %> diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx index e97c48b7a..9277a203e 100644 --- a/Contabilidad/RepIVA.aspx +++ b/Contabilidad/RepIVA.aspx @@ -390,7 +390,7 @@ - + diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 43b56f5e5..1a90339d7 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -255,14 +255,14 @@ public partial class Contabilidad_RepIVA : ClsPaginas Ruta = string.Format("{0}Formatos\\{1}", UsuarioActual.Empresa.Ruta, Formato); //ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); - if (UsuarioActual.Empresa.Funcionalidad(713).ToEntero() == 1 && !Ruta.Contains( "RepIVAAcreditable.rpt")) + if (UsuarioActual.Empresa.Funcionalidad(713).ToEntero() == 1) { ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, DtIEPSA, DtIVAA, "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); } else { - ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); - //ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, new DataTable(), new DataTable(), "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); + //ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); + ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, new DataTable(), new DataTable(), "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); } }else diff --git a/Contabilidad/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc b/Contabilidad/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc index 26451702f..9997bce7d 100644 --- a/Contabilidad/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc +++ b/Contabilidad/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc @@ -6,28 +6,34 @@ - 2.28424cm + 1.86091cm 1.28292cm - 1.5475cm + 1.49458cm - 5.78365cm + 4.81952cm 1.99729cm - 2.10377cm + 2.54cm - 2.10378cm + 2.3148cm - 3.26728cm + 1.78563cm + + + 2.20896cm + + + 2.60583cm @@ -151,6 +157,82 @@ + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + @@ -268,7 +350,7 @@ - 0.6cm + 0.86458cm @@ -460,6 +542,82 @@ + + + + true + true + + + + + Referencia Movto + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Subproyecto + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + @@ -682,7 +840,7 @@ - + true true @@ -699,7 +857,71 @@ + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + @@ -947,6 +1169,70 @@ + + + + true + true + + + + + =Fields!ReferenciaAdmin.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SubProyecto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -1156,6 +1442,74 @@ + + + + true + true + + + + + + + + + + + + Textbox42 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox12 + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -1275,6 +1629,8 @@ + + @@ -1311,184 +1667,53 @@ true DataSet1 - 2.24896cm - 3cm - 20.37043cm + 0.06345cm + 3.26458cm + 22.91044cm - - External - =Parameters!pImg.Value - FitProportional - 2.07257cm - 3.56716cm - 1 - - - - - - true - true - - - - - =Parameters!pEmp.Value - - - - - - - Textbox1 - 0.25646cm - 0.81167cm - 20.37043cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Auxiliar de Movimientos: " & System.Environment.NewLine & "al " &Parameters!pFechaFin.Value - - - - - - - Textbox5 - 1.12429cm - 0.94828cm - 20.37043cm - 3 - ="Moviemtos, Auxiliares del Catalogo" & System.Environment.NewLine & "al " &Parameters!pFechaFin.Value - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Fecha Impresión:" & vbCrLf & DateTime.Now.ToString("dd-MM-yyyy") - - - - - - - Textbox8 - 0.25646cm - 14.99937cm - 0.81167cm - 5.37106cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - 2.2819in + 1.31025in - - - - - - Textbox5 - 0.89958cm - 20.37043cm - - = (Globals.PageNumber=1) - + + External + =Parameters!pImg.Value + FitProportional + 2.07257cm + 3.14383cm - 2pt - 2pt - 2pt - 2pt - - + + true true - ="Fecha Impresión:" & vbCrLf & DateTime.Now.ToString("dd-MM-yyyy") + Fecha Impresión + + + + ="" & vbCrLf & DateTime.Now.ToString("dd-MM-yyyy") 2pt 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!pEmp.Value + + + + + + + + + ="Auxiliar de Movimientos del " &Parameters!pFechaInicio.Value &" al " &Parameters!pFechaFin.Value + + + + + + + Textbox6 + 1.23773in + 0.40764in + 7.78213in + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cuenta: + + + + =Parameters!Cuenta.Value + + + + + + + Cuenta + 0.84375in + 0.25in + 5.50993in + 3 + + + 2pt + 2pt + 2pt + 2pt @@ -1525,7 +1838,7 @@ - 0.74083cm + 0.2639in true true @@ -1549,10 +1862,10 @@ Textbox3 - 0.0703cm - 14.99937cm + 0.03528cm + 16.31002cm 0.6cm - 5.37107cm + 3.99459cm @@ -1570,13 +1883,13 @@ - 29.7cm - 21cm - 0.25cm - 0.25cm - 1cm - 1cm - 0.13cm + 11.69in + 8.27in + 0.09843in + 0.09843in + 0.3937in + 0.3937in + 0.05118in + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + + + + + TOTAL ACTIVO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + In + + =CStr("A,B,C").Split(",") + + + + =Fields!TipoCuenta.Value + Equal + + 1 + + + + 2.36545cm + 0.31432cm + 1.65cm + 10.42504cm + + + Verdana + 8pt + + + + + + + 5.36361cm + + + 2.86585cm + + + 2.19558cm + + + + + 0.6cm + + + + + true + true + + + + + ACTIVO NO CIRCULANTE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL ACTIVO NO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum( Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + In + + =CStr("A,B,C").Split(",") + + + + =Fields!TipoCuenta.Value + Equal + + 2 + + + + 4.45842cm + 0.31432cm + 1.65cm + 10.42504cm + 1 + + + Verdana + 8pt + + + + + + + 5.21467cm + + + 2.56871cm + + + 1.91058cm + + + + + 0.6cm + + + + + true + true + + + + + PASIVO CIRCULANTE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL PASIVO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + Equal + + D + + + + =Fields!TipoCuenta.Value + Equal + + 3 + + + + 2.36545cm + 10.77464cm + 1.65cm + 9.69396cm + 2 + + + Verdana + 8pt + + + + + + + 5.21467cm + + + 2.56871cm + + + 1.91058cm + + + + + 0.6cm + + + + + true + true + + + + + PASIVO NO CIRCULANTE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL PASIVO NO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + Equal + + D + + + + =Fields!TipoCuenta.Value + Equal + + 4 + + + + 4.45842cm + 10.77464cm + 1.65cm + 9.69396cm + 3 + + + Verdana + 8pt + + + + true + true + + + + + ACTIVO + + + + + + + Textbox28 + 1.62434cm + 0.31432cm + 0.6cm + 10.46032cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + PASIVO + + + + + + + Textbox28 + 1.62434cm + 10.77464cm + 0.6cm + 9.69395cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 5.21467cm + + + 2.56871cm + + + 1.91058cm + + + + + 0.6cm + + + + + true + true + + + + + CAPITAL CONTABLE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL CAPITAL + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + Equal + + F + + + + =Fields!TipoCuenta.Value + In + + 5 + 6 + 7 + 8 + + + + 8.01618cm + 10.77464cm + 1.65cm + 9.69396cm + 6 + + + Verdana + 8pt + + + + true + true + + + + + CAPITAL + + + + + + + Textbox28 + 7.23979cm + 10.77464cm + 0.6cm + 9.69395cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total CAPITAL + + + + + + + Textbox45 + 9.94262cm + 10.77464cm + 0.6cm + 4.89717cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalPatrimonioHAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalPatrimonioHActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total Pasivo y Patrimonio + + + + + + + Textbox45 + 10.83692cm + 10.77464cm + 0.6cm + 4.89717cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalpasivoYHaciendaAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalpasivoYHaciendaActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total del Pasivo: + + + + + + + Textbox45 + 6.28481cm + 10.77464cm + 0.6cm + 5.21467cm + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalPasivoAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalPasivoActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Iif( Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2) <.005,"" ,"La suma de los totales estan descuadradas." & Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2)) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + FitProportional + 0.03141cm + 0.31432cm + 1.46783cm + 5.36361cm + 18 + + + + + + true + true + + + + + =Parameters!pEmp.Value + + + + + + + Textbox1 + 0.03141cm + 5.71321cm + 0.69144cm + 10.31137cm + 19 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Estado de Situación Financiera + + + + =Parameters!periodo.Value + + + + + + + Textbox5 + 0.80399cm + 5.67793cm + 0.6cm + 10.31137cm + 20 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") + + + + + + + Textbox8 + 0.07056cm + 16.02458cm + 0.65229cm + 4.47928cm + 21 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 5.36361cm + + + 2.86585cm + + + 2.19558cm + + + + + 0.6cm + + + + + true + true + + + + + ACTIVO DIFERIDO + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL ACTIVO DIFERIDO + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!TipoCuenta.Value + Equal + + 9 + + + + 6.63979cm + 0.31432cm + 1.65cm + 10.42504cm + 22 + + + Verdana + 8pt + + + + true + true + + + + + Total del Activo + + + + + + + Textbox45 + 10.83692cm + 0.31432cm + 0.6cm + 5.36361cm + 23 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalActivoAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalActivoActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 4.77456in + + + + =Parameters!pFechaFin.Value + + + + + + + Textbox5 + 3.454cm + 0.56444cm + 12.91455cm + + = (Globals.PageNumber=1) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") + + + + + + + Textbox8 + 0.02088cm + 16.62517cm + 0.57912cm + 3.49249cm + 1 + + = (Globals.PageNumber=1) + + + + 2pt + 2pt + + + + + + + + + 2.46062cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 1.86062cm + 16.37931cm + 0.6cm + 3.95896cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!pFirma2.Value + + + + Textbox2 + 0.10583cm + 1.71666cm + 0.99688cm + 8.02269cm + 1 + + = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma2.Value <> ""),false,true) + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!pFirma1.Value + + + + Textbox2 + 1.46374cm + 6.03938cm + 0.99688cm + 8.02269cm + 2 + + = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma1.Value <> ""),false,true) + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + Textbox2 + 0.10582cm + 10.37435cm + 0.99688cm + 8.02269cm + 3 + + =Microsoft.VisualBasic.Interaction.Iif((Globals!PageNumber = Globals!TotalPages) And (Parameters!pFirma1.Value <> ""), False, True) + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 0.13cm + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldos Iniciales + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldos Actuales + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Cuenta + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Nombre + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Deudor + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Acreedor + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cargos + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Abonos + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Deudor + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Acreedor + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.4cm + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + 2pt + 2pt + 1pt + 1pt + + + + + + + + true + true + + + + + =Fields!Nombre.Value + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + =IIf(Fields!Tipo.Value <> "D", FormatNumber(Fields!SaldoInicial.Value,2) & " ", FormatNumber(Fields!SaldoInicial.Value,2)) + + + + + + + SaldoInicial + + + 2pt + 2pt + 1pt + 1pt + + + 2 + + + + + + + true + true + + + + + =Fields!Cargos.Value + + + + + + 2pt + 2pt + 1pt + 1pt + + + + + + + + true + true + + + + + =Fields!Abonos.Value + + + + + + 2pt + 2pt + 1pt + 1pt + + + + + + + + true + true + + + + + =IIf(Fields!Tipo.Value <> "D", FormatNumber(Fields!SaldoActual.Value,2) & " ", FormatNumber(Fields!SaldoActual.Value,2)) + + + + + + + SaldoActual + + + 2pt + 2pt + 1pt + 1pt + + + 2 + + + + + + + + + + + + + + + + + + + + + + + After + true + + + After + true + + + + + + + DataSet1 + 1.71477cm + 1.635cm + 20.56375cm + + + + + + true + true + + + + + Anexo del catálogo del + + + + =Parameters!pFechaInicio.Value + + + + al + + + + =Parameters!pFechaFin.Value + + + + + + + Textbox5 + 0.93839cm + 2.27047cm + 0.6cm + 18.29327cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + FitProportional + 0.01513cm + 0cm + 1.5cm + 2.27047cm + 2 + + + + + + true + true + + + + + =Parameters!pEmp.Value + + + + + + + Textbox10 + 0.89389in + 0.33891in + 7.20207in + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + 1.41576in + + + + =Parameters!pFechaFin.Value + + + + + + + Textbox5 + 2.27047cm + 0.6cm + 18.29327cm + + = (Globals.PageNumber=1) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.52094in + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.14111cm + 16.41508cm + 0.6cm + 4.14867cm + + + 2pt + 2pt + 2pt + 2pt + + + + 0.06944in + 0in + 8.09596in + 1 + + + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!usuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + Textbox2 + 0.08333in + 2.89776in + 0.20844in + 1.1182in + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Globals!ExecutionTime + + + + + + + Textbox2 + 0.08333in + 4.01596in + 0.20844in + 2.10083in + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + IMPRESO EN SIG, Anexo Catalogo + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.19685in + 0.19685in + 0.3937in + 0.3937in + 0.05118in + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + + + + + TOTAL ACTIVO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Sup.Value + Equal + + AC + + + + 0.88272cm + 0.09525cm + 1.65cm + 10.70896cm + + + Verdana + 8pt + + + + + + + 6cm + + + 2.5cm + + + 2.20896cm + + + + + 0.6cm + + + + + true + true + + + + + ACTIVO NO CIRCULANTE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL ACTIVO NO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Sup.Value + Equal + + ANC + + + + 2.97569cm + 0.09525cm + 1.65cm + 10.70896cm + 1 + + + Verdana + 8pt + + + + + + + 5.4cm + + + 2.1825cm + + + 1.8753cm + + + + + 0.6cm + + + + + true + true + + + + + PASIVO CIRCULANTE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL PASIVO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Sup.Value + Equal + + PC + + + + 0.88272cm + 10.91004cm + 1.65cm + 9.4578cm + 2 + + + Verdana + 8pt + + + + + + + 5.4cm + + + 2.1825cm + + + 1.8753cm + + + + + 0.6cm + + + + + true + true + + + + + PASIVO NO CIRCULANTE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL PASIVO NO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Sup.Value + Equal + + PNC + + + + 2.97569cm + 10.91004cm + 1.65cm + 9.4578cm + 3 + + + Verdana + 8pt + + + + true + true + + + + + ACTIVO + + + + + + + Textbox28 + 0.17568cm + 0.29985cm + 0.6cm + 10.50436cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + PASIVO + + + + + + + Textbox28 + 0.17568cm + 10.91004cm + 0.6cm + 9.41376cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 5.44404cm + + + 2.13846cm + + + 1.8753cm + + + + + 0.6cm + + + + + true + true + + + + + PASIVO DIFERIDO + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL PASIVO DIFERIDO + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Sup.Value + Equal + + PD + + + + 4.80208cm + 10.866cm + 1.65cm + 9.4578cm + 6 + + + Verdana + 8pt + + + + true + true + + + + + CAPITAL + + + + + + + Textbox28 + 7.46174cm + 10.866cm + 0.6cm + 9.4578cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 5.44404cm + + + 2.13846cm + + + 1.8753cm + + + + + 0.6cm + + + + + true + true + + + + + CAPITAL CONTABLE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL CAPITAL + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Iif(Fields!CtaMayor.Value = 2, Fields!ImporteActual.Value, 0)) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(iif(Fields!CtaMayor.Value = 2, Fields!ImporteAnterior.Value, 0)) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Sup.Value + Equal + + C + + + + 8.17463cm + 10.866cm + 1.65cm + 9.4578cm + 8 + + + Verdana + 8pt + + + + true + true + + + + + TOTAL ACTIVO + + + + + + + Textbox45 + 10.99567cm + 0.09525cm + 0.6cm + 4.64007cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TotalActivoAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TotalActivoActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total Pasivo: + + + + + + + Textbox45 + 6.60781cm + 10.91004cm + 0.6cm + 4.76495cm + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TotalPasivoAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TotalPasivoActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + TOTAL PASIVO Y CAPITAL + + + + + + + Textbox45 + 10.99567cm + 10.4691cm + 0.6cm + 4.80901cm + 15 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TotalPasivoCapitalAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TotalPasivoCapitalActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 6cm + + + 2.5cm + + + 2.20896cm + + + + + 0.6cm + + + + + true + true + + + + + ACTIVO DIFERIDO + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL ACTIVO DIFERIDO + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Sup.Value + Equal + + AD + + + + 4.80208cm + 0.09525cm + 1.65cm + 10.70896cm + 18 + + + Verdana + 8pt + + + + true + true + + + + + Total Capital + + + + + + + Textbox45 + 9.99276cm + 10.96007cm + 0.6cm + 4.76495cm + 19 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TotalCapitalAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TotalCapitalActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 4.56522in + + + + =Parameters!pFechaFin.Value + + + + + + + Textbox5 + 3.41489cm + 0.6cm + 12.91455cm + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + FitProportional + 0.02088cm + 0.31925cm + 1.5cm + 1.5cm + 1 + + + + + + true + true + + + + + =Parameters!pEmp.Value + + + + + + + Textbox1 + 0.63528cm + 3.41489cm + 0.8856cm + 12.91455cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.89958cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.11289cm + 15.67499cm + 0.6cm + 4.64881cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") + + + + + + + Textbox8 + 0.13377cm + 7.44906cm + 0.57912cm + 6.48228cm + 1 + + + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm + + + + + + + Textbox1 + 0.98806cm + 20.2388cm + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + Fit + 1.98547cm + 3.43894cm + 1 + + + + + + true + true + + + + + Balanza de Comprobación del + + + + =Parameters!pFechaIni.Value + + + + al + + + + =Parameters!pFechaFin.Value + + + + + + + Textbox5 + 0.98806cm + 0.99741cm + 20.2388cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.43894cm + + + 6.04544cm + + + 2.87929cm + + + 2.5cm + + + 2.5cm + + + 2.87513cm + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + Textbox2 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox4 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldos Iniciales + + + + + + + Textbox7 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox9 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox10 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldos Actuales + + + + + + + Textbox11 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Cuenta + + + + + + + Textbox13 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Nombre + + + + + + + Textbox15 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Deudor Acreedor + + + + + + + Textbox17 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cargos + + + + + + + Textbox21 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Abonos + + + + + + + Textbox23 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Deudor Acreedor + + + + + + + Textbox25 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.45cm + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + Horizontal + + + + + + + + true + true + + + + + =Fields!SaldoInicial.Value + + + + + + + SaldoInicial + + + 2pt + =Iif(Fields!CveTipo.Value=1,"17pt","2pt") + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cargos.Value + + + + + + + Cargos1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Abonos.Value + + + + + + + Abonos + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SaldoActual.Value + + + + + + + SaldoActual + + + 2pt + =Iif(Fields!CveTipo.Value=1,"17pt","2pt") + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Sumas Iguales + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Last(Fields!SaldoID.Value) + + + + + + + SaldoID + + + 2pt + 17pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Last(Fields!TotalAbonos.Value) + + + + + + + TotalAbonos + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Last(Fields!TotalCargos.Value) + + + + + + + TotalCargos + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Last(Fields!SaldoAD.Value) + + + + + + + SaldoAD + + + 2pt + 17pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Last(Fields!SaldoIA.Value) + + + + + + + SaldoIA + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox33 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox34 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Last(Fields!SaldoAA.Value) + + + + + + + SaldoAA + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + After + true + + + After + true + + + + + + Before + + + Before + + + + true + DataSet1 + 2.04159cm + 2.85cm + 20.2388cm + 3 + + + + + + true + 5.50443cm + 20.2388cm + + + + + + 2.1671in + + + + =Parameters!pFechaIni.Value + + + + al + + + + =Parameters!pFechaFin.Value + + + + + + + Textbox5 + 0.6cm + 20.2388cm + + = (Globals.PageNumber=1) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.6cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0cm + 14.86367cm + 0.6cm + 5.37513cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Fecha Impresión:" & vbCrLf & DateTime.Now.ToString("dd/MM/yyyy HH:mmm") + + + + + + + Textbox8 + 0cm + 0.6cm + 3.43894cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Usuario Imprimio: " & Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.25cm + 0.25cm + 0.5cm + 1cm + 0.13cm + @@ -29,7 +182,7 @@
    - +
    <%----%> @@ -85,9 +238,97 @@
    +
    + + -
    -
    + <%-- + + + + + + + + + + --%> + + + + + + <%-- Encabezados dinámicos para los ejercicios --%> + + + + + + + + + + + + + + + <%-- Encabezados dinámicos para los ejercicios --%> + <%-- data-toggle="tooltip" + title='<%# new System.Globalization.CultureInfo("es-ES").DateTimeFormat.GetMonthName(Eval("Mes").ToString().ToEntero()).ToUpper() %>'--%> + + + + + + + + + + + + <%-- Encabezados dinámicos para los ejercicios --%> + + + + + + + + + + + + + + <%----%> + + + + <%-- Subrepeater para los ejercicios --%> + + <%-- + --%> + + <%-- + + + + --%> + + + + + + + +
    <%# Eval("Anio") %><%# Eval("Anio") %><%# Eval("Anio") %><%# Eval("Anio") %>
    + <%# new System.Globalization.CultureInfo("es-ES").DateTimeFormat.GetMonthName(Eval("Mes").ToString().ToEntero()).ToUpper() %>
    CódigoNombre CompletoFecha Inicio<%# Eval("Dia") %>
    <%# Eval("CvePersonal") %>
    +
    +
    <%# Eval("FechaInicio", "{0:yyyy-MM-dd}") %>
    +
    + - -
    + +
    @@ -344,28 +346,28 @@
    Servicio Domicilio: -
    - - Todos - Si - No +
    + + Todos + Si + No
    Factura Global: -
    - - Todos - Solo Globales - Sin Globales - -
    +
    + + Todos + Solo Globales + Sin Globales + +
    - -
    - - -
    + +
    + + +
    @@ -399,7 +401,7 @@ <%--6--%> <%--7--%> - + <%--8--%> <%--9--%> @@ -422,24 +424,24 @@ <%--18--%> - - + + <%-- --%> <%--19--%> - - - - - + + + + + <%--20--%> - - - - + + + + @@ -465,93 +467,91 @@ - + - + - + - - + + - + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - + - + - - - + + + - + - + - + - - - - + + @@ -560,7 +560,7 @@
    - - - + +