--Sincronizar cambios con productivo 11/02/2025

This commit is contained in:
2025-02-11 19:22:03 -07:00
parent 66be5c89fa
commit bab024f440
96 changed files with 12531 additions and 1392 deletions

View File

@@ -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

View File

@@ -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

663
Ashx/CargaEventos2.ashx Normal file
View File

@@ -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# <a href ='/OS/OrdenesServicio.aspx?CveOS={dr("CveOS")}'>{dr("Folio")}</a>"
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

View File

@@ -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))

View File

@@ -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

View File

@@ -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

View File

@@ -25,15 +25,15 @@
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta" EmptyDataText="No se encontraron Números de Cuentas Registrados" ToolTip="Listado de Números de Cuentas"
CssClass="table table-striped table-advance table-hover ScrollAD" Style="text-align: center;" GridLines="None" Width="100%">
CssClass="table table-striped table-advance table-hover ScrollAD" Style="text-align: center;" GridLines="None" Width="100%">
<Columns>
<asp:HyperLinkField DataTextField="TipoCuenta" HeaderText="Tipo Cuenta" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Bancos/CuentasBancariasDetalle.aspx?CveCuenta={0}" DataNavigateUrlFields="CveCuenta" Target="_blank" />
<asp:TemplateField ItemStyle-HorizontalAlign="Left">

View File

@@ -396,7 +396,7 @@
</tr>
<tr>
<td colspan="3" style="vertical-align: top;">
<asp:GridView ID="GVU" runat="server" Width="400px" DataKeyNames="CveCuenta,CveUsuario" AutoGenerateColumns="False" GridLines="None" CssClass="mysmallbtn">
<asp:GridView ID="GVU" runat="server" Width="500px" DataKeyNames="CveCuenta,CveUsuario" AutoGenerateColumns="False" GridLines="None" CssClass="mysmallbtn">
<Columns>
<asp:TemplateField HeaderText="Nombre" ItemStyle-HorizontalAlign="Left" >

View File

@@ -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

View File

@@ -159,8 +159,8 @@
</div>
<div class="row" style="padding-bottom: 5px;">
<div class="col-md-4">
<label><asp:Label runat="server" id="LblSubProyecto"></asp:Label>:</label>
<div class="col-md-4">
<label><asp:Label runat="server" id="LblSubProyecto"></asp:Label>:</label>
</div>
<div class="col-md-8" style="width:175px;">
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control input-sm select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" ValidationGroup="GrpGuardar" Width="145px">

View File

@@ -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);
}
}

View File

@@ -26,7 +26,9 @@
</li>
</ContentTemplate>
</asp:UpdatePanel>
<li>
<asp:HyperLink ID="HpLPrePoliza" NavigateUrl="#" runat="server" Visible="false" Style="color: #686868;"><i class="" style="color:#686868;"></i> Póliza</asp:HyperLink>
</li>
<asp:UpdatePanel ID="UppEliminarIE" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
@@ -60,12 +62,7 @@
<li>
<asp:HyperLink ID="LnkEnviarMailPago" runat="server" Style="color: #686868;" Visible="false"><i class="fa fa-envelope" style="color: #686868;"></i> Envíar Comprobante Mail</asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="HpLPrePoliza" NavigateUrl="#" runat="server" Visible="false" Style="color: #686868;"><i class="" style="color:#686868;"></i>Ver Póliza</asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="LnkDescargaPoliza" Target="_blank" runat="server" Visible="false" Style="color: #686868;"> <i class="fa fa-print" style="color: #686868;"></i> Imprimir Póliza</asp:HyperLink>
</li>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<li>

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -80,7 +80,7 @@
</asp:DropDownList>
</div>
<div class="col-md-1">
F.Inicio.:
F.I.:
</div>
<div class="col-md-2">
@@ -98,7 +98,7 @@
</div>
</div>
<div class="col-md-1 ">
F.Fin.:
F.F.:
</div>
<div class="col-md-2">

View File

@@ -55,6 +55,7 @@
<asp:GridView ID="GvS" runat="server" AutoGenerateColumns="False" ShowFooter="True" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes" CssClass="table table-striped table-hover Widthall" GridLines="None">
<Columns>
<asp:BoundField ItemStyle-Width="5%" ItemStyle-CssClass="Texto" DataField="NumCuenta" HeaderText="Cuenta" Visible="false"></asp:BoundField>
<asp:HyperLinkField ItemStyle-Width="5%" ItemStyle-CssClass="Texto" DataTextField="Folio" HeaderText="Folio" DataNavigateUrlFormatString="IE.aspx?CveIE={0}" DataNavigateUrlFields="CveIE"></asp:HyperLinkField>
<asp:BoundField ItemStyle-Width="15%" ItemStyle-CssClass="Texto" DataField="TipoTransaccion" HeaderText="Tipo" ></asp:BoundField>

View File

@@ -511,7 +511,7 @@
<asp:ListItem Text="Costo Indirecto" Value="4"></asp:ListItem>
<asp:ListItem Text="Importación" Value="5"></asp:ListItem>
<asp:ListItem Text="NC Con Productos" Value="6"></asp:ListItem>
<asp:ListItem Text="Apoyo Logístico" Value="9"></asp:ListItem>
<asp:ListItem Text="Apoyo Logístico" Value="9"></asp:ListItem>
<asp:ListItem Text="NC Por Devolución" Value="11"></asp:ListItem>
<%--<asp:ListItem Text="Garantía" Value="12"></asp:ListItem> Ocuoado usado en Garantía--%>
@@ -1496,22 +1496,8 @@
</div>
<div class="tools">
<table width="525px">
<table width="325px">
<tr>
<td>
<div id="DivAlmacenDev" runat="server" visible="false" class="row">
<div class="col-md-12">
<table width="175px">
<tr>
<td width="50px">Almacen:</td>
<td width="125px">
<asp:DropDownList ID="DdlAlmacenDevolucion" Style="width: 100%" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me " DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
</td>
</tr>
</table>
</div>
</div>
</td>
<td width="50px">Compra:</td>
<td width="250px">
<asp:DropDownList ID="DDLDevolucion" Style="width: 100%" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me " DataTextField="Compra" DataValueField="CveCompra"></asp:DropDownList>
@@ -1523,17 +1509,31 @@
</table>
</div>
</div>
<div class="portlet-body">
<asp:GridView ID="GVDevolucion" runat="server" DataKeyNames="CveMovimientoDetalle,CveAlmacen,Total,PU,Cantidad,CvePS,CveUM,UM,CveClasificacion,Clasificacion,CodigoPS,CveTipoPS,PUExtranjero" ShowFooter="true" GridLines="None" AutoGenerateColumns="false" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" CssClass="table table-striped table-hover Widthall">
<div class="portlet-body">
<div id="DivAlmacenDev" runat="server" visible="false" class="row">
<div class="col-md-12">
<table width="325px">
<tr>
<td width="50px">Almacen:</td>
<td width="250px">
<asp:DropDownList ID="DdlAlmacenDevolucion" Style="width: 100%" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me " DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
</td>
</tr>
</table>
</div>
</div>
<br />
<asp:GridView ID="GVDevolucion" runat="server" DataKeyNames="CveMovimientoDetalle,CveAlmacen,Total,PU,Cantidad,CvePS,CveUM,UM,CveClasificacion,Clasificacion,PS,CveTipoPS,PUExtranjero" ShowFooter="true" GridLines="None" AutoGenerateColumns="false" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" CssClass="table table-striped table-hover Widthall">
<Columns>
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("Cantidad", "{0:#,##0.####}")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-Width="70px" />
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" />
<asp:TemplateField ItemStyle-Width="85px" HeaderText="P.U." ItemStyle-HorizontalAlign="Right">
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-Width="80px" />
<asp:BoundField ItemStyle-Width="400px" HeaderText="Producto o Servicio" DataField="CodigoPS" />
<asp:TemplateField ItemStyle-Width="80px" HeaderText="P.U." ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label Text='<%# Eval("PU", "{0:#,##0.####}")%>' runat="server"></asp:Label>
</ItemTemplate>
@@ -1541,7 +1541,7 @@
<label>Total</label>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="85px" HeaderText="Devolución">
<asp:TemplateField ItemStyle-Width="80px" HeaderText="Devolución">
<ItemTemplate>
<asp:TextBox ID="TxtCantidad" Width="50" Mask="999,999.99" min="0" data-max='<%# Eval("Cantidad")%>' data-pu='<%# Eval("PU")%>' type="number" step="any" data-Devolucion="devrow" runat="server"></asp:TextBox>
</ItemTemplate>
@@ -1549,7 +1549,7 @@
<asp:TextBox ID="TxtTotal" Width="50" runat="server" Mask="999,999.99" data-Devolucion="devtotal" disabled></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="85px" HeaderText="">
<asp:TemplateField ItemStyle-Width="80px" HeaderText="">
<ItemTemplate>
<asp:TextBox ID="TxtTotalDevolucion" CssClass="devTotal TextBoxAsLabel" runat="server" Text="" disabled></asp:TextBox>
</ItemTemplate>

File diff suppressed because it is too large Load Diff

View File

@@ -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()

View File

@@ -2053,7 +2053,7 @@
<asp:UpdatePanel runat="server" ID="UpDocumentos" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDocs" AutoGenerateColumns="false" runat="server" GridLines="none"
DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento">
DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="60px">
<ItemTemplate>
@@ -2093,17 +2093,20 @@
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload' ></i>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px" Visible="false">
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px" Visible="false" >
<ItemTemplate>
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
<ItemTemplate>
<asp:LinkButton ID="LnkDownLoadDoc" CssClass="btn btn-circle btn-sm blue" OnClick="LnkDownLoadDoc_Click" runat="server"
Text="<i class='fa fa-download' style='color:white' title='Descargar Documento'></i>" CausesValidation="False" Visible="false" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
<ItemTemplate>
<asp:LinkButton ID="LnkDownLoadDoc" CssClass="btn btn-circle btn-sm blue" OnClick="LnkDownLoadDoc_Click" runat="server"
Text="<i class='fa fa-download' style='color:white' title='Descargar Documento'></i>" CausesValidation="False" Visible="false" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" Visible="false">
<ItemTemplate>
<asp:LinkButton ID="LnkGVEliminar" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="LnkGVEliminar_Click"

View File

@@ -680,6 +680,11 @@ Partial Class Compras_ReembolsosComprobaciones
Pago.TCPago = TipoCambioPago
Pago.CvePersonal =CvePersonal
ImportePagoTotal = ImportePagoTotal + ImporteMovto
If UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) Then
Pago.AplicaAcreditable = False
End If
'Otros Ingresos
If MsgError = "" AndAlso (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal <> 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

View File

@@ -174,14 +174,43 @@
</asp:DropDownList>--%>
<asp:ListBox ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
</div>
<div class="col-md-1" title="Fecha Inicio de Captura">F. I. Captura</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding: 0px; width: 100px !important">
<asp:TextBox Width="80px" ID="TxtFechaICaptura" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaICaptura" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaICaptura" runat="server" TargetControlID="TxtFechaICaptura" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFEchaICaptura" TargetControlID="TxtFechaICaptura" PopupButtonID="ImgFechaICaptura" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaICaptura" runat="server" ControlToValidate="TxtFechaICaptura" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaICaptura" runat="server" ControlToValidate="TxtFechaICaptura" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaICaptura" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaICaptura" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1" title="Fecha Fin de Captura">F. F. Captura:</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding: 0px; width: 100px !important">
<asp:TextBox Width="80px" ID="TxtFechaFCaptura" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaFCaptura" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaFCaptura" runat="server" TargetControlID="TxtFechaFCaptura" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFEchaFCaptura" TargetControlID="TxtFechaFCaptura" PopupButtonID="ImgFechaFCaptura" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaFCaptura" runat="server" ControlToValidate="TxtFechaFCaptura" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaFCaptura" runat="server" ControlToValidate="TxtFechaFCaptura" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFCaptura" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFCaptura" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1">Moneda:</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlMonedas" runat="server" CssClass=" select2me" AppendDataBoundItems="true" DataTextField="Moneda" DataValueField="CveMoneda" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1">Tipo de Prov:</div>
<div class="col-md-1">Tipo de Proveedor:</div>
<div class="col-md-1">
<asp:DropDownList ID="DdlTipoProveedor" runat="server" CssClass=" select2me" AppendDataBoundItems="true" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
@@ -190,18 +219,14 @@
<asp:ListItem Text="Ambos" Value="3"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1">Tipo Docto:</div>
<div class="col-md-1">
<asp:DropDownList CssClass="select2me" Width="100%" ID="DdlTipoDocto" runat="server" AppendDataBoundItems="true">
</div>
<div class="row">
<div class="col-md-1 ">Capturó:</div>
<div class="col-md-2 ">
<asp:DropDownList ID="DDlUsuarioCaptura" CssClass=" select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Factura" Value="Fac"></asp:ListItem>
<asp:ListItem Text="Nota de Crédito" Value="NC"></asp:ListItem>
<asp:ListItem Text="Devolución" Value="DEV"></asp:ListItem>
<asp:ListItem Text="Anticipo" Value="Ant"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row">
<div class="col-md-1">Responsable:</div>
<div class="col-md-2">
<asp:DropDownList CssClass="select2me" Width="100%" ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario">
@@ -214,45 +239,17 @@
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
<asp:ListBox ID="DdlTipoGasto" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
</div>
</div>
<div class="row">
<div class="col-md-1 ">Capturó:</div>
<div class="col-md-2 ">
<asp:DropDownList ID="DDlUsuarioCaptura" CssClass=" select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1" title="Fecha Inicio de Captura">F. I. Captura</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding: 0px; width: 100px !important">
<asp:TextBox Width="80px" ID="TxtFechaICaptura" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaICaptura" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaICaptura" runat="server" TargetControlID="TxtFechaICaptura" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFEchaICaptura" TargetControlID="TxtFechaICaptura" PopupButtonID="ImgFechaICaptura" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaICaptura" runat="server" ControlToValidate="TxtFechaICaptura" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaICaptura" runat="server" ControlToValidate="TxtFechaICaptura" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaICaptura" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaICaptura" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1" title="Fecha Fin de Captura">F. F. Captura:</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding: 0px; width: 100px !important">
<asp:TextBox Width="80px" ID="TxtFechaFCaptura" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaFCaptura" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaFCaptura" runat="server" TargetControlID="TxtFechaFCaptura" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFEchaFCaptura" TargetControlID="TxtFechaFCaptura" PopupButtonID="ImgFechaFCaptura" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaFCaptura" runat="server" ControlToValidate="TxtFechaFCaptura" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaFCaptura" runat="server" ControlToValidate="TxtFechaFCaptura" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFCaptura" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFCaptura" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="col-md-1">Tipo Docto:</div>
<div class="col-md-2">
<asp:DropDownList CssClass="select2me" Width="100%" ID="DdlTipoDocto" runat="server" AppendDataBoundItems="true">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Factura" Value="Fac"></asp:ListItem>
<asp:ListItem Text="Nota de Crédito" Value="NC"></asp:ListItem>
<asp:ListItem Text="Devolución" Value="DEV"></asp:ListItem>
<asp:ListItem Text="Anticipo" Value="Ant"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -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

View File

@@ -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

View File

@@ -261,19 +261,19 @@
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None">
<Columns>
<Columns>
<asp:BoundField HeaderText="Fecha" DataField="FechaCompra" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Producto o Servicio" DataField="PS" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Producto o Servicio" DataField="PS" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="AF" DataField="CodigoAF" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Clasificación" DataField="Clasificacion" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="PU" DataField="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Fecha" DataField="FechaCompra" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" />
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" />
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" />
<asp:BoundField HeaderText="Proveedor" DataField="RazonSocial" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="AF" DataField="CodigoAF" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" />
</Columns>
</asp:GridView>
</ContentTemplate>

View File

@@ -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

View File

@@ -319,6 +319,7 @@
</div>
<br />
<div class="row">
<div class="col-md-4">

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -183,7 +183,7 @@
<asp:TemplateField HeaderText="PrePoliza" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:HyperLink ID="HplPrepoliza" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrepolizaS.aspx?CvePrePoliza={0}")%>' runat="server" ToolTip="Ir PrePoliza"><i class="fa fa-arrow-right" style="color:#686868;"></i></asp:HyperLink>
<asp:HyperLink ID="HplPrepoliza" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CvePrePoliza", "/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}")%>' runat="server" ToolTip="Ir PrePoliza"><i class="fa fa-arrow-right" style="color:#686868;"></i></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="100px"></ItemStyle>

View File

@@ -0,0 +1,114 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="LibroDiario.aspx.vb" Inherits="Contabilidad_LibroDiario" %>
<asp:Content ContentPlaceHolderID="Css" runat="server">
<style>
.truncate {
width: 300px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<li>
<asp:LinkButton ID="ImgExcel" Visible="false" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="Imprimir" Visible="false" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="ImgExcel" />
<asp:PostBackTrigger ControlID="Imprimir" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
Libro Diario
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-primary" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" Enabled="false"/>
</div>
<div class="titlefiltros caption ">
<div class="row">
<label class="col-md-1" style="width: 90px; padding-right: 2px;">Fecha Inicio:</label>
<div class="col-md-2" style="width: 140px;">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFecha2Del" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1" style="width: 80px; padding-right: 2px;">Fecha Fin:</label>
<div class="col-md-2" style="width: 140px;">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CVFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFecha2Al" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<%-- <br />
<div class="text-right">Buscar :
<input type="text" id="Buscar" style="margin-right: 30px;" />
</div>--%>
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server" style="margin-left: 15px; margin-right: 15px;">
<ContentTemplate>
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall" GridLines="None" AutoGenerateColumns="False" runat="server">
<Columns>
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Tipo" DataField="TipoPol" />
<asp:BoundField HeaderText="Poliza" DataField="Folio" />
<asp:BoundField HeaderText="Concepto" DataField="Concepto" />
<asp:BoundField HeaderText="Cuenta" DataField="Codigo" />
<asp:BoundField HeaderText="Nombre" DataField="Nombre" />
<asp:BoundField HeaderText="Descripción" DataField="Descripcion" />
<asp:BoundField HeaderText="Cargos" DataField="Cargos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.00}" />
<asp:BoundField HeaderText="Abonos" DataField="Abonos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.00}" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -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

View File

@@ -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") = ""

View File

@@ -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" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>

View File

@@ -390,7 +390,7 @@
<asp:BoundField DataField="FueConciliado" HeaderText="Conciliado" />
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
<asp:BoundField DataField="ImporteMN" HeaderText="Importe" DataFormatString="{0:N2}" />
<asp:HyperLinkField DataTextField="FolioPoliza" DataNavigateUrlFormatString="/Contabilidad/RegPrepolizaS.aspx?CvePrePoliza={0}" DataNavigateUrlFields="CvePrePoliza" HeaderText="Prepoliza" />
<asp:HyperLinkField DataTextField="FolioPoliza" DataNavigateUrlFormatString="/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}" DataNavigateUrlFields="CvePrePoliza" HeaderText="Prepoliza" />
<asp:HyperLinkField DataTextField="FolioIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataNavigateUrlFields="CveIE" HeaderText="IE" />
<asp:BoundField DataField="FechaAplicado" HeaderText="Fecha Aplicado" DataFormatString="{0:d}" />
</Columns>

View File

@@ -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

View File

@@ -6,28 +6,34 @@
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>2.28424cm</Width>
<Width>1.86091cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.28292cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.5475cm</Width>
<Width>1.49458cm</Width>
</TablixColumn>
<TablixColumn>
<Width>5.78365cm</Width>
<Width>4.81952cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.99729cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.10377cm</Width>
<Width>2.54cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.10378cm</Width>
<Width>2.3148cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.26728cm</Width>
<Width>1.78563cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.20896cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.60583cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
@@ -151,6 +157,82 @@
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox8">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>Verdana</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox8</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<TopBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</TopBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox15">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>Verdana</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox15</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<TopBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</TopBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox16">
@@ -268,7 +350,7 @@
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.6cm</Height>
<Height>0.86458cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -460,6 +542,82 @@
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox40">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Referencia Movto</Value>
<Style>
<FontFamily>Verdana</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox40</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox2">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Subproyecto</Value>
<Style>
<FontFamily>Verdana</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox17">
@@ -682,7 +840,7 @@
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox15">
<Textbox Name="Textbox26">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
@@ -699,7 +857,71 @@
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox15</rd:DefaultName>
<rd:DefaultName>Textbox26</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox27">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>Verdana</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox27</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox28">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>Verdana</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox28</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
@@ -947,6 +1169,70 @@
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="ReferenciaAdmin">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!ReferenciaAdmin.Value</Value>
<Style>
<FontFamily>Verdana</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>ReferenciaAdmin</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="SubProyecto">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!SubProyecto.Value</Value>
<Style>
<FontFamily>Verdana</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>SubProyecto</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="CargosMovto">
@@ -1156,6 +1442,74 @@
</TablixCell>
<TablixCell />
<TablixCell />
<TablixCell>
<CellContents>
<Textbox Name="Textbox42">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>Verdana</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox42</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox12">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>Verdana</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox12</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Cargos">
@@ -1275,6 +1629,8 @@
<TablixMember />
<TablixMember />
<TablixMember />
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
@@ -1311,184 +1667,53 @@
</TablixRowHierarchy>
<KeepTogether>true</KeepTogether>
<DataSetName>DataSet1</DataSetName>
<Top>2.24896cm</Top>
<Height>3cm</Height>
<Width>20.37043cm</Width>
<Top>0.06345cm</Top>
<Height>3.26458cm</Height>
<Width>22.91044cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Tablix>
<Image Name="Image1">
<Source>External</Source>
<Value>=Parameters!pImg.Value</Value>
<Sizing>FitProportional</Sizing>
<Height>2.07257cm</Height>
<Width>3.56716cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Image>
<Textbox Name="Textbox2">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!pEmp.Value</Value>
<Style>
<FontSize>13pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>0.25646cm</Top>
<Height>0.81167cm</Height>
<Width>20.37043cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox6">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>="Auxiliar de Movimientos: " &amp; System.Environment.NewLine &amp; "al " &amp;Parameters!pFechaFin.Value</Value>
<Style>
<FontSize>11pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Top>1.12429cm</Top>
<Height>0.94828cm</Height>
<Width>20.37043cm</Width>
<ZIndex>3</ZIndex>
<ToolTip>="Moviemtos, Auxiliares del Catalogo" &amp; System.Environment.NewLine &amp; "al " &amp;Parameters!pFechaFin.Value</ToolTip>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox9">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>="Fecha Impresión:" &amp; vbCrLf &amp; DateTime.Now.ToString("dd-MM-yyyy")</Value>
<Style>
<FontStyle>Italic</FontStyle>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox8</rd:DefaultName>
<Top>0.25646cm</Top>
<Left>14.99937cm</Left>
<Height>0.81167cm</Height>
<Width>5.37106cm</Width>
<ZIndex>4</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>2.2819in</Height>
<Height>1.31025in</Height>
<Style />
</Body>
<Width>8.01986in</Width>
<Width>9.01986in</Width>
<Page>
<PageHeader>
<Height>0.89958cm</Height>
<Height>1.14931in</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
<Textbox Name="Textbox8">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>="Libro Mayor" &amp; System.Environment.NewLine &amp; "al " &amp;Parameters!pFechaFin.Value</Value>
<Style>
<FontSize>11pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Height>0.89958cm</Height>
<Width>20.37043cm</Width>
<Visibility>
<Hidden>= (Globals.PageNumber=1)</Hidden>
</Visibility>
<Image Name="Image1">
<Source>External</Source>
<Value>=Parameters!pImg.Value</Value>
<Sizing>FitProportional</Sizing>
<Height>2.07257cm</Height>
<Width>3.14383cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox12">
</Image>
<Textbox Name="Textbox9">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>="Fecha Impresión:" &amp; vbCrLf &amp; DateTime.Now.ToString("dd-MM-yyyy")</Value>
<Value>Fecha Impresión</Value>
<Style>
<FontStyle>Italic</FontStyle>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>="" &amp; vbCrLf &amp; DateTime.Now.ToString("dd-MM-yyyy")</Value>
<Style>
<FontStyle>Italic</FontStyle>
<FontSize>8pt</FontSize>
@@ -1501,20 +1726,108 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox8</rd:DefaultName>
<Top>0.02088cm</Top>
<Left>14.99937cm</Left>
<Height>0.8787cm</Height>
<Width>5.37106cm</Width>
<Top>1.21179cm</Top>
<Left>20.30461cm</Left>
<Height>0.92251cm</Height>
<Width>2.60583cm</Width>
<ZIndex>1</ZIndex>
<Visibility>
<Hidden>= (Globals.PageNumber=1)</Hidden>
</Visibility>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox6">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!pEmp.Value</Value>
<Style>
<FontSize>12pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>="Auxiliar de Movimientos del " &amp;Parameters!pFechaInicio.Value &amp;" al " &amp;Parameters!pFechaFin.Value</Value>
<Style>
<FontSize>11pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox6</rd:DefaultName>
<Left>1.23773in</Left>
<Height>0.40764in</Height>
<Width>7.78213in</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Cuenta">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Cuenta: </Value>
<Style>
<FontFamily>Verdana</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Cuenta.Value</Value>
<Style>
<FontFamily>Verdana</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Cuenta</rd:DefaultName>
<Top>0.84375in</Top>
<Height>0.25in</Height>
<Width>5.50993in</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
@@ -1525,7 +1838,7 @@
</Style>
</PageHeader>
<PageFooter>
<Height>0.74083cm</Height>
<Height>0.2639in</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -1549,10 +1862,10 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>0.0703cm</Top>
<Left>14.99937cm</Left>
<Top>0.03528cm</Top>
<Left>16.31002cm</Left>
<Height>0.6cm</Height>
<Width>5.37107cm</Width>
<Width>3.99459cm</Width>
<Style>
<Border>
<Style>None</Style>
@@ -1570,13 +1883,13 @@
</Border>
</Style>
</PageFooter>
<PageHeight>29.7cm</PageHeight>
<PageWidth>21cm</PageWidth>
<LeftMargin>0.25cm</LeftMargin>
<RightMargin>0.25cm</RightMargin>
<TopMargin>1cm</TopMargin>
<BottomMargin>1cm</BottomMargin>
<ColumnSpacing>0.13cm</ColumnSpacing>
<PageHeight>11.69in</PageHeight>
<PageWidth>8.27in</PageWidth>
<LeftMargin>0.09843in</LeftMargin>
<RightMargin>0.09843in</RightMargin>
<TopMargin>0.3937in</TopMargin>
<BottomMargin>0.3937in</BottomMargin>
<ColumnSpacing>0.05118in</ColumnSpacing>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
@@ -1652,6 +1965,14 @@
<DataField>Saldo</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="SubProyecto">
<DataField>SubProyecto</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ReferenciaAdmin">
<DataField>ReferenciaAdmin</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>DataSet</rd:DataSetName>
@@ -1680,6 +2001,18 @@
<DataType>Integer</DataType>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="pFechaInicio">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Cuenta">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<Code>Dim myVal As boolean
Public Function SetMyVal(ByVal temp As String) As boolean
@@ -1698,6 +2031,6 @@ If temp ="" Then
End Function
</Code>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>5e0d6974-973d-457c-853b-d0cbe22fc16c</rd:ReportID>
</Report>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -539,13 +539,13 @@ Partial Class Contratos_FacturacionMasiva
'Dim ObjCliente As New ClsClientes()
'If ObjCliente.GetClientes(DR("CveCliente").ToString.ToEntero, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
' If ObjCliente.DtResultados.Rows.Count > 0 Then
' ObjFactura.CveFormaPago = ObjCliente.CveFormaPago
' ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago}")
' ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago}")
' ObjFactura.CveFormaPago33 = ObjCliente.CveFormaPago33
' ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
' ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
' ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
' ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
' ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
' ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33
' ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
' ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
' ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
' ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")

View File

@@ -334,8 +334,6 @@ Partial Class Contratos_ModificarPresupuesto
Dim CvePresupuesto = DdlPresupuesto.SelectedValue.ToEntero
Dim CveClasificacion As Integer = DdlModalClasificacion.SelectedValue.ToEntero
Dim dt As DataTable = GlobalDTTiposGastos(UsuarioActual.CveEmpresa, 1)
If CveClasificacion > 0 Then
Dim ObjCont As New ClsContratos

View File

@@ -219,7 +219,7 @@
<div class="portlet-body" style="display: none;" id="idnecesaria2">
<div class="row">
<div class="col-md-1" style="max-width: 120px">Clasificación:</div>
<div class="col-md-1" style="max-width: 120px">Clasificacion:</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlClasificacion" DataTextField="Agrupador" AppendDataBoundItems="true" DataValueField="CveAgrupador" Width="200px" runat="server" CssClass="form-control input-sm select2me">
</asp:DropDownList>

View File

@@ -780,7 +780,7 @@
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRObjetivo" CssClass="form-control" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtRObjetivo" runat="server" ControlToValidate="TxtRObjetivo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Objetivo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRangoEditar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtRObjetivo"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco" TargetControlID="RFVRI"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtRObjetivo" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtRObjetivo.ClientID.ToString()%>">Objetivo:</label>
</div>

View File

@@ -861,18 +861,13 @@ Partial Class RepCxC
DdlTipo.SelectedValueExist(gvRow.DataKey("Tipo"))
TxtRI.Text = gvRow.DataKey("RangoInicial")
TxtRF.Text = gvRow.DataKey("RangoFinal")
TxtRObjetivo.Text = gvRow.DataKey("Objetivo").ToString.ToDecimal.ToString("###.00")
TxtRObjetivo.Text = gvRow.DataKey("Objetivo").ToString.ToDecimal.ToString("###.00")
If Not TxtRF.Text.ToDouble > 0 Then
ChkMayor.Checked = True
TxtRF.Enabled = False
CambioChecked()
Else
ChkMayor.Checked = False
TxtRF.Enabled = True
End If
End If
RegistraScript("$('#DivPersonalizarRangoEditar').modal()")
UpPersonalizarRangoEditar.Update()
End Sub

View File

@@ -25,12 +25,7 @@
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
ddd
<asp:GridView ID="GvLista" runat="server" DataKeyNames="CveTimbre">
<Columns>
<asp:BoundField DataField="SerieFolio" HeaderText="TipoImpuesto" />
<asp:BoundField DataField="Fecha" HeaderText="BaseRetencion" />
</Columns>
</asp:GridView>
<asp:GridView ID="GvLista" runat="server"></asp:GridView>
<div id="DModalRetencion" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModal" UpdateMode="Conditional">

View File

@@ -195,7 +195,9 @@ Partial Class Inventarios_CartaPorteManual
TxtFecha.Text = NowADS().ToShortDateString
CEFecha.EndDate = NowADS().AddDays(-1)
RVFecha.MaximumValue = NowADS().ToShortDateString
Folio = 0
CargaCombos()
CreaDT()
@@ -220,6 +222,7 @@ Partial Class Inventarios_CartaPorteManual
End If
'If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then
' TxtFecha.Enabled = False
@@ -230,6 +233,7 @@ Partial Class Inventarios_CartaPorteManual
End Sub
#Region "CARGA DATOS"
Protected Sub CreaDT()
Dim dt As New DataTable
@@ -243,6 +247,8 @@ Partial Class Inventarios_CartaPorteManual
dt.Columns.Add(column)
dt.Columns.Add("Cantidad", Type.GetType("System.Double"))
dt.Columns.Add("CveUM", Type.GetType("System.Int32"))
dt.Columns.Add("UnidadMedida")
@@ -259,6 +265,8 @@ Partial Class Inventarios_CartaPorteManual
dt.Columns.Add("Lote")
dt.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
dt.Columns.Add("CveClasificacion", Type.GetType("System.Int32"))
dt.Columns.Add("EstatusExistencia")
@@ -277,10 +285,14 @@ Partial Class Inventarios_CartaPorteManual
dt.Columns.Add("Embalaje")
dt.Columns.Add("PesoKg", Type.GetType("System.Decimal"))
DtMovimientos = dt
CargaGvDatos()
End Sub
Private Sub CargaCombos()
'CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto, AplicaTodos:="")
@@ -295,12 +307,17 @@ Partial Class Inventarios_CartaPorteManual
' TxtFechaEntrega.Text = NowADS().ToShortDateString
TxtFechaLlegada.Text = NowADS().ToShortDateString
CargaPS()
CargarCamiones()
End Sub
Private Sub CargaPS()
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
DdlProducto2.setEsWebService(EsWS)
@@ -311,12 +328,12 @@ Partial Class Inventarios_CartaPorteManual
DdlProducto2.ddlWS.Attributes.Add("Data-onresult", "CargaExistenciaAlmacenes")
End If
Else
DdlProducto2.ddl.Items.Clear()
'Objeto.ddl.DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion, AplicaParaVenta:=1, Estatus:=1)
DdlProducto2.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=-1, Estatus:=1, AplicaParaVenta:=-1)
DdlProducto2.ddl.DataBind()
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
Else
DdlProducto2.ddl.Items.Clear()
'Objeto.ddl.DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion, AplicaParaVenta:=1, Estatus:=1)
DdlProducto2.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=-1, Estatus:=1, AplicaParaVenta:=-1)
DdlProducto2.ddl.DataBind()
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
End If
End Sub

View File

@@ -1165,8 +1165,8 @@
<ajax:ValidatorCalloutExtender ID="VCFechaInvFormat" runat="server" HighlightCssClass="vco" TargetControlID="CvFechaInv" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="col-md-6" style="text-align: center;">
</div>
<div class="col-md-6" style="text-align: center;">
<asp:Button ID="BtnModalExcelAjuste" runat="server" Visible="false" CssClass="btn btn-primary" data-toggle="modal" data-target="#DivCargaAjuste" Text="Cargar Excel Ajuste" />
</div>
</div>
@@ -1866,16 +1866,16 @@
<div class="modal-footer">
<div class="row">
<div class="col-md-10" style="text-align: right">
<asp:LinkButton ID="LnkDescargaFormato" runat="server" CssClass="btn btn-warning" OnClick="LnkDescargaFormato_Click" ><i class="fa fa-download" aria-hidden="true" ></i> Descargar Formato</asp:LinkButton>
<asp:LinkButton ID="LnkDescargaFormato" runat="server" CssClass="btn btn-warning" OnClick="LnkDescargaFormato_Click" ><i class="fa fa-download" aria-hidden="true" ></i> Descargar Formato</asp:LinkButton>
<asp:Button ID="BtnCargaExcelAjuste" runat="server" CssClass="btn btn-success" Text="Aceptar" OnClick="BtnCargaExcelAjuste_Click"></asp:Button>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkDescargaFormato" />
</Triggers>
<Triggers>
<asp:PostBackTrigger ControlID="LnkDescargaFormato" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>

View File

@@ -2306,6 +2306,15 @@ Partial Class Inventarios_EntradasSalidas
End If
End If
'REPLICAR MOVTO EN EMPRESA
If Not ErrorMovInv Then
If UsuarioActual.CveEmpresa = 199 AndAlso CveMovimiento > 0 Then
If Not ObjInventario.ReplicarMovtoEmpresa(UsuarioActual.CveEmpresa, CveMovimiento) Then
ErrorMovInv = True
End If
End If
End If
If Not ErrorAC And Not ErrorMovInv Then
Dim Msg As New StringBuilder

View File

@@ -3380,6 +3380,15 @@ Partial Class Inventarios_EntregaAlmacen
End If
End If
If Not ErrorMovInv Then
'REPLICAR MOVTO GENERADO
If UsuarioActual.CveEmpresa = 199 AndAlso CveMovimiento > 0 Then
If Not ObjInventario.ReplicarMovtoEmpresa(UsuarioActual.CveEmpresa, CveMovimiento) Then
ErrorMovInv = True
End If
End If
End If
If Not ErrorMovInv Then
ObjInventario.Commit()

View File

@@ -1028,8 +1028,6 @@ Partial Class Inventarios_RecepcionAlmacen
CargaAlmacenes(-1, CveTipoCompra:=CveTipoCompra)
ElseIf TipoMovimiento = 3 Then 'devolucion al proveedor
CargaAlmacenes(-1, "1,21,2,27", CveTipoCompra)
ElseIf CveTipoCompra = 16 Then ' apoyo sin virtual y virtual aparte
CargaAlmacenes(-1, "1", CveTipoCompra)
Else
CargaAlmacenes(-1)
End If
@@ -1078,9 +1076,7 @@ Partial Class Inventarios_RecepcionAlmacen
If TipoMovimiento = 3 Then
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "21", CveTipoCompra)
Else
Dim tTipoAlm As String = "22"
If CveTipoCompra = 16 Then tTipoAlm = "22,1,24" ' apoyos, "acumuladores sin virtual" o "virtual solo"
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, tTipoAlm, CveTipoCompra)
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
End If
Else

View File

@@ -33,8 +33,7 @@ Partial Class Inventarios_RepAlmacenCompras
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyecto)
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyecto)
CargaDatos()
CargaPermisos()
End If

View File

@@ -1039,17 +1039,21 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
public void EditDireccionOrigen_Click(object sender, EventArgs e)
{
this.CveDireccionEditar = this.CveDireccionOrigen;
LblTitulodireccion.Text = "Actualizar dirección 'origen'";
//GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
//int CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero();
CveDireccionEditar = CveDireccionOrigen;
//CveCliente = GvRow.DataKey("CveCliente").ToEntero();
LblTitulodireccion.Text = "Actualizar dirección origen";
CargaDatosDireccion(CveDireccionOrigen);
}
public void EditDireccionDestino_Click(object sender, EventArgs e)
{
this.CveDireccionEditar = this.CveDireccionDestino;
LblTitulodireccion.Text = "Actualizar dirección 'destino'";
//GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
//LblTitulodireccion.Text = "Actualizar dirección destino";
//int CveDireccionDestino = GvRow.DataKey("CveDireccionDestino").ToEntero();
CveDireccionEditar = CveDireccionDestino;
LblTitulodireccion.Text = "Actualizar dirección Destino";
CargaDatosDireccion(CveDireccionDestino);
}
@@ -1078,19 +1082,15 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
CveCliente = DT.Rows[0]["CveCliente"].ToString().ToEntero();
DdlDirClientePais.SelectedValueExist(DT.Rows[0]["CvePais"].ToString());
CargaDirClienteEstado();
DdlDirClienteEstado.SelectedValueExistInsert(DT.Rows[0]["CveEstado"].ToString(), DT.Rows[0]["NombreEstado"].ToString());
DdlDirClienteEstado.SelectedValueExist(DT.Rows[0]["CveEstado"].ToString());
CargaDirClienteMunicipio();
DdlDirClienteMunicipio.SelectedValueExistInsert(DT.Rows[0]["CveMunicipio"].ToString(), DT.Rows[0]["NombreMunicipio"].ToString());
DdlDirClienteMunicipio.SelectedValueExist(DT.Rows[0]["CveMunicipio"].ToString());
CargaDirClienteColonia();
DdlDirClienteColonia.SelectedValueExist(DT.Rows[0]["CveColonia"].ToString());
DdlDirClienteLocalidad.SelectedValueExist(DT.Rows[0]["CveLocalidad"].ToString());
CargaDirClienteLocalidad();
DdlDirClienteLocalidad.SelectedValueExistInsert(DT.Rows[0]["CveLocalidad"].ToString(),DT.Rows[0]["NombreLocalidad"].ToString());
DdlDirClienteColonia.SelectedValueExist(DT.Rows[0]["CveColonia"].ToString());
}
UpModalDVDireccionEnvio.Update();
@@ -1118,7 +1118,6 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
{
Alert("Dirección actualizada correctamente.");
RegistraScript("$('#divAddDireccionEnvio').modal('hide');");
this.CveDireccionEditar = -1;
CargaDatos();
}

View File

@@ -284,7 +284,7 @@ Partial Class RepNotasSinAlmacen
e.Row.CssClass = "Totales"
e.Row.Cells(0).Text = "<a class=""Texto"" href=""/Compras/Compras.aspx?CveCompra=" & e.Row.DBCampo("CveCompra") & """>" & e.Row.DBCampo("SerieFolio") & "</a>"
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(1).Text = e.Row.DBCampo("Fecha").ToDate.ToShortDateString
e.Row.Cells(1).Text = e.Row.DBCampo("Fecha").ToDate.ToShortDateString
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(2).Text = "<a class=""Texto"" href=""/Compras/Proveedores.aspx?CveProveedor=" & e.Row.DBCampo("CveProveedor") & """>" & e.Row.DBCampo("RazonSocial") & "</a>"
e.Row.FCLinkButton("lnkAccion").Visible = False
@@ -328,8 +328,8 @@ Partial Class RepNotasSinAlmacen
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then ' es empresa hospitalaria
e.Row.Cells(2).Text = $"<div style='display:none'>{e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy")}</div> {e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy HH:mm")}"
Else
e.Row.Cells(2).Text = $"{e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy HH:mm:ss")}"
Else
e.Row.Cells(2).Text = $"{e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy HH:mm:ss")}"
End If
If e.Row.DataKey("EsDevolucionVenta").ToEntero = 1 Then

View File

@@ -229,7 +229,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim PermisoEspecialCambioFecha As Boolean = False
If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 And Not PermisoEspecialCambioFecha Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" And Not UsuarioActual.TienePermisoProceso(405)) Then
If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 And Not PermisoEspecialCambioFecha Then
TxtFecha.Enabled = False
ImgFecha.Visible = False
TxtFechaRecepcion.Enabled = False
@@ -908,10 +908,12 @@ Partial Class Inventarios_TraspasoAlmacen
End If
Dim RealizarMovimientoVirtual As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso TipoAlmacenOrigen.Contiene(1, 27) Then
RealizarMovimientoVirtual = True
End If
If UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso TipoAlmacenOrigen.Contiene(1, 27) Then
RealizarMovimientoVirtual = True
If DdlAlmacenOrigen.SelectedValue.ToEntero = 1427 Then 'Apoyo Entrega Foranea
RealizarMovimientoVirtual = False
End If
End If
'SI VA PASAR POR EL ALMACEN TRANSITORIO, DEBE TRASPASAR LOS VIRTUALES AHI PRIMERO
If ChkTransitorio.Checked Then
@@ -3196,7 +3198,7 @@ Partial Class Inventarios_TraspasoAlmacen
If ChkTransitorio.Checked Then
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22,2) AND Estatus = 'Activo' ")
Else
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (21,22,2) ")
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros($"CveTipoAlmacen IN (21,22,2) OR ( CveTipoAlmacen IN (1) AND CveSubProyecto = {DrAlmO("CveSubProyecto")}) ")
End If
DdlAlmacenDestino.DataBind()
@@ -3223,19 +3225,19 @@ Partial Class Inventarios_TraspasoAlmacen
DdlAlmacenDestino.DataBind()
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
Else
Dim Str As String
If ChkTransitorio.Checked Then
Str = "" ' String.Format(" AND CveSubProyecto <> {0} ", DrAlmO("CveSubProyecto")) 'RMF. pueden haber almacen que esten dentro de lamisma sucursal, pero que requeiren transitorio
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) {0} AND Estatus = 'Activo' ", Str))
Else
Str = String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) AND CveSubProyecto = {0} ", DrAlmO("CveSubProyecto"))
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then Str = Str.Replace("4,", "") ' permtir los tipo 4, consignación
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros(Str)
End If
Dim Str As String
If ChkTransitorio.Checked Then
Str = "" ' String.Format(" AND CveSubProyecto <> {0} ", DrAlmO("CveSubProyecto")) 'RMF. pueden haber almacen que esten dentro de lamisma sucursal, pero que requeiren transitorio
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) {0} AND Estatus = 'Activo' ", Str))
Else
Str = String.Format(" CveTipoAlmacen NOT IN (3,4,9,10,11,24,25,28) AND CveSubProyecto = {0} ", DrAlmO("CveSubProyecto"))
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then Str = Str.Replace("4,", "") ' permtir los tipo 4, consignación
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros(Str)
End If
DdlAlmacenDestino.DataBind()
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
DdlAlmacenDestino.DataBind()
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
End Sub
Protected Sub DdlAlmacenDestino_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacenDestino.SelectedIndexChanged

View File

@@ -775,7 +775,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
string xml = xmlregistros.ToString();
using (ClsNominas objnom = new ClsNominas())
{
objnom.GuardarAguinaldo(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, xml, ejercicioActual);
objnom.GuardarAguinaldo(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, xml);
}
BtnCalcular_Click(null, null);
@@ -787,7 +787,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
string xml = "<registros></registros>";
using (ClsNominas objnom = new ClsNominas())
{
objnom.GuardarAguinaldo(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, xml, ejercicioActual);
objnom.GuardarAguinaldo(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, xml);
}
BtnCalcular_Click(null, null);
}

View File

@@ -186,7 +186,7 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
CvePersonal = gvrow.DataKey("CvePersonal").ToString().ToEntero();
using (ClsNominas onom = new ClsNominas())
{
if (onom.PersonalAplicaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Ejercicio, CvePersonal, 1, ""))
if (onom.PersonalAplicaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CvePersonal, 1, ""))
{
Alert("El empleado sera incluido al calculo anual");
CargaCalculoISRAnual();
@@ -205,7 +205,7 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
{
using (ClsNominas onom = new ClsNominas())
{
if (onom.PersonalAplicaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Ejercicio, CvePersonal, 0, TxtMotivo.Text))
if (onom.PersonalAplicaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CvePersonal, 0, TxtMotivo.Text))
{
Alert("El empleado sera omitido del calculo anual");
RegistraScript("$('#DModalcancelarEmpleado').modal('hide');");
@@ -313,8 +313,6 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
Choja.Cell(248, 9).Value = string.Format("'{0}",UsuarioActual.Empresa.RFC);
Choja.Cell(250, 9).Value = string.Format("'{0}", UsuarioActual.Empresa.Empresa);
Choja.Cell(37, 15).Value = droi["IngresosTotales"];
Choja.Cell(48, 15).Value = droi["BaseExcenta"];
Choja.Cell(60, 15).Value = droi["BaseGravada"];

View File

@@ -1700,7 +1700,7 @@ public partial class Nomina_Finiquito : ClsPaginas
string urlfile = System.IO.Path.Combine(string.Format("{0}Formatos/SobreReciboFiniquito.rdlc", UsuarioActual.Empresa.Ruta));
if (!System.IO.File.Exists(urlfile))
{
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("EmpresaDireccion", string.Format("{0} No. {1},Colonia {2} ", UsuarioActual.Empresa.Direccion, UsuarioActual.Empresa.NoExt , UsuarioActual.Empresa.Colonia).ToLower()));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("EmpresaDireccion", string.Format("{0} No. {1},Colonia {2} ", UsuarioActual.Empresa.Direccion, UsuarioActual.Empresa.NoExt , UsuarioActual.Empresa.Colonia).ToLower() ));
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreReciboFiniquito.rdlc");
}

View File

@@ -415,7 +415,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
DmodalCancelartimbre.Visible = (UsuarioActual.CveUsuario == 100);
//LnkOpenCancelarTimbre.Visible = (UsuarioActual.CveUsuario == 100);
LnkVerCalculoISR.Visible = (UsuarioActual.CveUsuario == 100 || UsuarioActual.CveEmpresa == 119);
LnkVerCalculoISR.Visible = true;//(UsuarioActual.CveUsuario == 100 || UsuarioActual.CveEmpresa == 119);
TxtPeriodo.Text = $"{NowADS():yyyyMM}";
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyeccto);
CargarCentrosDeCosto(DdlPRProyecto, DdlPRSubProyecto, LblPRProyecto, LblPRSubProyeccto);

View File

@@ -1,5 +1,6 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ReporteVacaciones.aspx.cs" Inherits="Nomina_ReporteVacaciones" %>
<%@ Import Namespace="Extensiones" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
@@ -7,9 +8,161 @@
/*.text-right {
text-align:right
}*/
td.borderleft,th.borderleft{
border-left:1px solid black !important;
td.borderleft, th.borderleft {
border-left: 1px solid black !important;
}
.hiddentth, .hiddentth th {
background-color: #fff !important;
}
.showMesDia {
display: none;
}
table tr th.diac {
font-size: 4px;
padding-left: 1px !important;
padding-right: 1px !important;
}
table tr th.mesc {
font-size: 12px;
}
.mes1 {
background-color: #ffcccc;
border-color: #ffcccc;
}
/* Enero - Rojo claro */
.mes2 {
background-color: #ffebcc;
border-color: #ffcccc;
}
/* Febrero - Naranja claro */
.mes3 {
background-color: #ffffcc;
border-color: #ffcccc;
}
/* Marzo - Amarillo claro */
.mes4 {
background-color: #ccffcc;
border-color: #ffcccc;
}
/* Abril - Verde claro */
.mes5 {
background-color: #ccffff;
border-color: #ffcccc;
}
/* Mayo - Azul cielo */
.mes6 {
background-color: #ccccff;
border-color: #ffcccc;
}
/* Junio - Azul suave */
.mes7 {
background-color: #e6ccff;
border-color: #ffcccc;
}
/* Julio - Morado claro */
.mes8 {
background-color: #ffccff;
border-color: #ffcccc;
}
/* Agosto - Rosa claro */
.mes9 {
background-color: #ffb3b3;
border-color: #ffcccc;
}
/* Septiembre - Rojo pastel */
.mes10 {
background-color: #ff9966;
border-color: #ffcccc;
}
/* Octubre - Naranja pastel */
.mes11 {
background-color: #cccc99;
border-color: #ffcccc;
}
/* Noviembre - Verde oliva */
.mes12 {
background-color: #e6e6e6;
border-color: #ffcccc;
}
/* Diciembre - Gris claro */
.TContainer {
width: 100%;
height: calc(100vh - 200px);
overflow: scroll;
}
.VacClass {
background-color: darkslateblue;
}
.borderyear {
border-left: 1px solid #FFF !important;
}
.yearclass {
background-color: #444;
color: #FFF;
text-align: center;
font-size: 6px;
}
.yearclassB {
background-color: #999;
color: #FFF;
text-align: center;
font-size: 6px;
}
tr.aniorow td {
height: 8px;
}
tr.rowsticky {
position: sticky;
top: 0; /* Se mantiene pegado en la parte superior */
background-color: white; /* Para que no se superponga con otros elementos */
z-index: 1000; /* Asegura que esté sobre otros elementos */
}
tr.rowsticky:nth-child(2) {
top: 26.14px;
}
tr.rowsticky:nth-child(3) {
top: 52.14px;
}
.table-sticky tr td:nth-child(1),.table-sticky tr th:nth-child(1),
.table-sticky tr td:nth-child(2),.table-sticky tr th:nth-child(2),
.table-sticky tr td:nth-child(3),.table-sticky tr th:nth-child(3) {
position: sticky;
left: 0;
z-index: 3;
}
.table-sticky tr td:nth-child(1),.table-sticky tr td:nth-child(2),.table-sticky tr td:nth-child(3) {
background-color: #fff;
}
.table-sticky tr td:nth-child(1) div, .table-sticky tr th:nth-child(1) div{
width:72px;
}
.table-sticky tr td:nth-child(1),.table-sticky tr th:nth-child(1){
width:80px;
}
.table-sticky tr td:nth-child(2),.table-sticky tr th:nth-child(2){
width:250px;
left: 80px;
}
.table-sticky tr td:nth-child(2) div, .table-sticky tr th:nth-child(2) div{
width:242px;
}
.table-sticky tr td:nth-child(3),.table-sticky tr th:nth-child(3){
left: 330px;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
@@ -29,7 +182,7 @@
<div class="portlet-title portlet-filterT smalltitle">
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1 mediocol">Inicio:</label>
<div class="col-md-1">
<%--<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>--%>
@@ -85,9 +238,97 @@
</div>
</div>
<div class="TContainer">
<table id="gvReporteVacacionesCalendar" class="table table-hover table-sticky ScrollADig Widthall gvReporteVacacionesCalendar" data-rows="4" data-cols="3" data-heighterror="360">
<tbody>
<div>
<table id="gvReporteVacaciones" class="table table-striped table-advance table-hover ScrollAD Widthall gvReporteVacaciones" data-rows="2" data-heighterror="360">
<%-- <tr class="hiddentth">
<th class="showMesDia"></th>
<th class="showMesDia"></th>
<th class="showMesDia"></th>
<asp:Repeater ID="rptx" runat="server">
<ItemTemplate>
<th class="showMesDia"></th>
</ItemTemplate>
</asp:Repeater>
</tr>--%>
<tr class="rowsticky">
<th></th>
<th></th>
<th></th>
<%-- Encabezados dinámicos para los ejercicios --%>
<asp:Repeater ID="rptanio" runat="server">
<ItemTemplate>
<th class="borderleft" colspan='<%# Eval("DiasEjercicioA") %>'><%# Eval("Anio") %></th>
<th colspan='<%# Eval("DiasEjercicioA") %>'><%# Eval("Anio") %></th>
<th colspan='<%# Eval("DiasEjercicioA") %>'><%# Eval("Anio") %></th>
<th colspan='<%# Eval("DiasEjercicioB") %>'><%# Eval("Anio") %></th>
</ItemTemplate>
</asp:Repeater>
</tr>
<tr class="rowsticky">
<th></th>
<th></th>
<th></th>
<%-- Encabezados dinámicos para los ejercicios --%>
<%-- data-toggle="tooltip"
title='<%# new System.Globalization.CultureInfo("es-ES").DateTimeFormat.GetMonthName(Eval("Mes").ToString().ToEntero()).ToUpper() %>'--%>
<asp:Repeater ID="rptMeses" runat="server">
<ItemTemplate>
<th class='<%# string.Format("{0} diac mes{1} mesc","borderleft",Eval("Mes")) %>' colspan='<%# Eval("DiasMes") %>'>
<%# new System.Globalization.CultureInfo("es-ES").DateTimeFormat.GetMonthName(Eval("Mes").ToString().ToEntero()).ToUpper() %></th>
</ItemTemplate>
</asp:Repeater>
</tr>
<tr class="rowsticky">
<th>Código</th>
<th>Nombre Completo</th>
<th>Fecha Inicio</th>
<%-- Encabezados dinámicos para los ejercicios --%>
<asp:Repeater ID="RepetDias" runat="server">
<ItemTemplate>
<th class='<%# string.Format("{0} diac mes{1}",(Eval("MinMes").ToString().ToUpper()=="1"?"borderleft":""),Eval("Mes")) %>'><%# Eval("Dia") %></th>
</ItemTemplate>
</asp:Repeater>
</tr>
<asp:Repeater ID="RepeaterPrincipalCalendar" runat="server">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<tr class="aniorow">
<%--<td><%# Eval("CvePersonal") %></td>--%>
<td rowspan="1"><div>
<div><asp:HyperLink runat="server" Text='<%# Eval("Codigo") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink></div></td>
<td rowspan="1"><div>
<asp:HyperLink runat="server" Text='<%# Eval("NombreCompleto") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink></div></td>
<td rowspan="1"><div><%# Eval("FechaInicio", "{0:yyyy-MM-dd}") %></div></td>
<%-- Subrepeater para los ejercicios --%>
<asp:Literal Text='<%# Eval("ColumnasinicioFin" ) %>' runat="server"></asp:Literal>
<%--</tr>
<tr>--%>
<asp:Literal Text='<%# Eval("ColumnasVacaciones" ) %>' runat="server"></asp:Literal>
<%-- <asp:Repeater ID="RepeaterEjercicios" runat="server" DataSource='<%# tabladias %>'>
<ItemTemplate>
<asp:Literal Text='<%# columnapersonal((int)Eval("FechaNum" ),(System.Data.DataTable )Eval("TDiaspersonal")) %>' runat="server"></asp:Literal>
</ItemTemplate>
</asp:Repeater>--%>
</tr>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>
</tbody>
</table>
</div>
<div class="hidden">
<table id="gvReporteVacaciones" class="table table-striped table-advance table-hover ScrollAD Widthall gvReporteVacaciones" data-rows="2" data-heighterror="360">
<%-- <thead>
</thead>--%>
<tbody>
@@ -112,7 +353,7 @@
<%-- Encabezados dinámicos para los ejercicios --%>
<asp:Repeater ID="RepeaterEjerciciosH2" runat="server">
<ItemTemplate>
<ItemTemplate>
<th class="borderleft">Antigüedad</th>
<th>Días Vacaciones</th>
<th>Días Pagados</th>
@@ -125,17 +366,17 @@
<ItemTemplate>
<tr>
<%--<td><%# Eval("CvePersonal") %></td>--%>
<td>
<asp:HyperLink runat="server" Text='<%# Eval("Codigo") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink></td>
<td>
<asp:HyperLink runat="server" Text='<%# Eval("NombreCompleto") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink></td>
<td>
<asp:HyperLink runat="server" Text='<%# Eval("Codigo") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink></td>
<td>
<asp:HyperLink runat="server" Text='<%# Eval("NombreCompleto") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink></td>
<td><%# Eval("FechaInicio", "{0:yyyy-MM-dd}") %></td>
<%-- Subrepeater para los ejercicios --%>
<asp:Repeater ID="RepeaterEjercicios" runat="server" DataSource='<%# Eval("Ejercicios") %>'>
<ItemTemplate>
<ItemTemplate>
<td class="text-right borderleft"><%# Convert.ToInt32(Eval("Antiguedad")) > 0 ? Eval("Antiguedad") : "" %></td>
<td class="text-right "><%# Convert.ToInt32(Eval("Antiguedad")) > 0 ? Eval("DiasVacaciones") : "" %></td>
<td class="text-right "><%# Convert.ToInt32(Eval("Antiguedad")) > 0 ? Eval("DiasPagados") : "" %></td>
<td class="text-right "><%# Convert.ToInt32(Eval("Antiguedad")) > 0 ? Eval("DiasVacaciones") : "" %></td>
<td class="text-right "><%# Convert.ToInt32(Eval("Antiguedad")) > 0 ? Eval("DiasPagados") : "" %></td>
</ItemTemplate>
</asp:Repeater>
</tr>

View File

@@ -1,8 +1,11 @@
using ADSNetLibrary.Helpers;
using Extensiones;
using iText.Html2pdf.Attach.Impl.Layout.Form.Element;
using Microsoft.Extensions.Primitives;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
@@ -34,8 +37,8 @@ public partial class Nomina_ReporteVacaciones : ClsPaginas
{
get
{
string fecha = $"{DateTime.Now.Year - 3}-01-01";
if (ViewState["FiltFechaInicio"] == null) { return fecha ; }
string fecha = $"{DateTime.Now.Year - 1}-01-01";
if (ViewState["FiltFechaInicio"] == null) { return fecha; }
else { return ViewState["FiltFechaInicio"].ToString(); }
}
@@ -52,6 +55,18 @@ public partial class Nomina_ReporteVacaciones : ClsPaginas
set { ViewState["FiltFechaFin"] = value; }
}
protected DataTable tabladias
{
get
{
if (ViewState["tabladias"] == null) { return new DataTable(); }
else { return (DataTable)ViewState["tabladias"]; }
}
set { ViewState["tabladias"] = value; }
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
@@ -68,75 +83,214 @@ public partial class Nomina_ReporteVacaciones : ClsPaginas
{
using (ClsNominas objnom = new ClsNominas())
{
if (objnom.ReporteVacaciones(FiltCveProyecto, FiltCveSubProyecto, UsuarioActual.CveEmpresa, FiltFechaInicio, FiltFechaFin))
if (objnom.ReporteVacacionesCalendario(FiltCveProyecto, FiltCveSubProyecto, UsuarioActual.CveEmpresa, FiltFechaInicio, FiltFechaFin))
{
DataTable tabla1 = objnom.DTSetResultados.Tables[0]; // Simula tu tabla 1
DataTable tabla2 = objnom.DTSetResultados.Tables[1]; // Simula tu tabla 2
DataTable tabla3 = objnom.DTSetResultados.Tables[2]; // Simula tu tabla 3
RepeaterEjerciciosH1.DataSource= tabla3;
RepeaterEjerciciosH2.DataSource= tabla3;
DataTable tabla1 = objnom.DTSetResultados.Tables[0]; //
DataTable tabla2 = objnom.DTSetResultados.Tables[1]; //
DataTable tabla3 = objnom.DTSetResultados.Tables[2]; //
tabladias = objnom.DTSetResultados.Tables[3];
DataTable tabladiasPersonal = objnom.DTSetResultados.Tables[4];
RepeaterEjerciciosH1.DataSource = tabla3;
RepeaterEjerciciosH2.DataSource = tabla3;
RepeaterEjerciciosH1.DataBind();
RepeaterEjerciciosH2.DataBind();
// Convertir Tabla 1 a Enumerable con un campo extra
List<Registro> resultado = tabla1.AsEnumerable().Select(row1 => new Registro()
List<Registro> resultado = tabla1.AsEnumerable().Select(row1 =>
{
CvePersonal = row1.Field<int>("CvePersonal"),
Codigo = row1.Field<string>("Codigo"),
NombreCompleto = row1.Field<string>("NombreCompleto"),
//FechaFin = (row1("FechaFin")).ToString().,
FechaInicio = row1.Field<DateTime>("FechaInicio"),
FechaAntiguedad = row1.Field<DateTime>("FechaAntiguedad"),
Antiguedad = row1.Field<int>("Antiguedad"),
int cvePersonal = Convert.ToInt32(row1["CvePersonal"]);
DataRow[] filasFiltradas = tabladiasPersonal.Select($"CvePersonal = {cvePersonal}");
// Campo extra: Enumerable para cada Ejercicio de Tabla 3
Ejercicios = tabla3.AsEnumerable().Select(row3 =>
// Crear un nuevo DataTable con la misma estructura
DataTable TDiaspersonal = tabladiasPersonal.Clone();
// Importar las filas filtradas
foreach (DataRow fila in filasFiltradas)
{
var ejercicio = row3.Field<int>("Ejercicio");
TDiaspersonal.ImportRow(fila);
//DataRow nuevaFila = TDiaspersonal.NewRow();
// Buscar en Tabla 2 si existe el registro para CvePersonal y Ejercicio
var registro = tabla2.AsEnumerable().FirstOrDefault(row2 =>
row2.Field<int>("CvePersonal") == row1.Field<int>("CvePersonal") &&
row2.Field<int>("EJercicio") == ejercicio);
//// Copiar manualmente cada columna
//foreach (DataColumn columna in tabladiasPersonal.Columns)
//{
// nuevaFila[columna.ColumnName] = fila[columna.ColumnName];
//}
// Si no existe, crear un nuevo registro
if (registro == null)
//TDiaspersonal.Rows.Add(nuevaFila);
}
TDiaspersonal.AcceptChanges();
//DataTable TDiaspersonal = tabladiasPersonal.FiltraParametros(string.Format("CvePersonal = '{0}'", row1["CvePersonal"]));
int contador = tabladiasPersonal.Rows.Count;
return new Registro()
{
CvePersonal = row1.Field<int>("CvePersonal"),
Codigo = row1.Field<string>("Codigo"),
NombreCompleto = row1.Field<string>("NombreCompleto"),
//FechaFin = (row1("FechaFin")).ToString().,
FechaInicio = row1.Field<DateTime>("FechaInicio"),
FechaAntiguedad = row1.Field<DateTime>("FechaAntiguedad"),
Antiguedad = row1.Field<int>("Antiguedad"),
//ColumnasinicioFin = strColumnasinicioFin(tabladias, tabla2.FiltraParametros(string.Format("CvePersonal = {0}", row1["CvePersonal"])), row1["anio"].ToString().ToEntero(), row1["Mes"].ToString(), row1["Dia"].ToString()),
ColumnasVacaciones = strColumnasVacaciones(tabladias, TDiaspersonal),
// Campo extra: Enumerable para cada Ejercicio de Tabla 3
Ejercicios = tabla3.AsEnumerable().Select(row3 =>
{
return new EjercicioInfo()
var ejercicio = row3.Field<int>("Ejercicio");
// Buscar en Tabla 2 si existe el registro para CvePersonal y Ejercicio
var registro = tabla2.AsEnumerable().FirstOrDefault(row2 =>
row2.Field<int>("CvePersonal") == row1.Field<int>("CvePersonal") &&
row2.Field<int>("EJercicio") == ejercicio);
// Si no existe, crear un nuevo registro
if (registro == null)
{
Ejercicio = ejercicio,
FechaAntiguedad = row1.Field<DateTime>("FechaAntiguedad"),
Antiguedad = 0,
DiasVacaciones = 0, // Valor predeterminado
DiasPagados = 0, // Valor predeterminado
DiasDisfrutados = 0 // Valor predeterminado
};
}
else
{
// Si existe, devolver los datos de la Tabla 2
return new EjercicioInfo()
return new EjercicioInfo()
{
Ejercicio = ejercicio,
FechaAntiguedad = row1.Field<DateTime>("FechaAntiguedad"),
Antiguedad = 0,
DiasVacaciones = 0, // Valor predeterminado
DiasPagados = 0, // Valor predeterminado
DiasDisfrutados = 0 // Valor predeterminado
};
}
else
{
Ejercicio = registro.Field<int>("EJercicio"),
FechaAntiguedad = registro.Field<DateTime>("FechaAntiguedad"),
Antiguedad = registro.Field<int>("Antiguedad"),
DiasVacaciones = registro.Field<int>("DiasVacaciones"),
DiasPagados = registro.Field<int>("DiasPagados"),
DiasDisfrutados = registro.Field<int>("DiasDisfrutados")
};
}
}).ToList()
}).ToList();
// Si existe, devolver los datos de la Tabla 2
return new EjercicioInfo()
{
Ejercicio = registro.Field<int>("EJercicio"),
FechaAntiguedad = registro.Field<DateTime>("FechaAntiguedad"),
Antiguedad = registro.Field<int>("Antiguedad"),
DiasVacaciones = registro.Field<int>("DiasVacaciones"),
DiasPagados = registro.Field<int>("DiasPagados"),
DiasDisfrutados = registro.Field<int>("DiasDisfrutados")
};
}
}).ToList()
};
}
).ToList();
RepeaterPrincipal.DataSource = resultado;
RepeaterPrincipal.DataBind();
RepeaterPrincipalCalendar.DataSource = resultado;
RepeaterPrincipalCalendar.DataBind();
rptanio.DataSource = tabladias.FiltraParametros("MinEjercicio = 1");
rptanio.DataBind();
rptMeses.DataSource = tabladias.FiltraParametros("MinMes = 1");
rptMeses.DataBind();
RepetDias.DataSource = tabladias;
RepetDias.DataBind();
//rptx.DataSource = tabladias;
//rptx.DataBind();
}
}
}
public string rightstr(string str,int cantidad)
{
return str.Length >= cantidad ? str.Substring(str.Length - cantidad) : str;
}
public string strColumnasinicioFin(DataTable tabladias, DataTable TEjercicio, int anio, string Mes, string Dia)
{
StringBuilder stringBuilder = new StringBuilder();
StringBuilder strbuilderB = new StringBuilder();
strbuilderB.AppendFormat(" </tr><tr>");
int FechaNum =string.Format("{0}{1}{2}", anio, Mes, Dia).ToEntero();
int Mesdia =string.Format("{0}{1}", Mes, Dia).ToEntero();
foreach (DataRow dr in tabladias.Rows)
{
int colspan = dr["DiasMes"].ToString().ToEntero();
int mesidias = rightstr(dr["FechaNum"].ToString(),4).ToEntero();
int mesa = dr["Mes"].ToString().ToEntero();
int ania = dr["Anio"].ToString().ToEntero()-(mesidias >= Mesdia?0:1);
DataRow hdrow = TEjercicio.FiltroPrimero(string.Format("Ejercicio = {0}", ania));
int drFechaNum = dr["FechaNum"].ToString().ToEntero();
string classtd = drFechaNum < FechaNum ? "": ((ania % 2) > 0 ? "yearclass" : "yearclassB");
string antiguedad = "";
string classvac = "borderleft";
string vacacionestomadas = "";
if(hdrow != null)
{
antiguedad = string.Format("({0})", hdrow["Antiguedad"]);
//DiasVacaciones EJercicio EJercicioVac DiasPagados DiasDisfrutados
int DiasVacaciones = hdrow["DiasVacaciones"].ToString().ToEntero();
int DiasPagados = hdrow["DiasPagados"].ToString().ToEntero();
int DiasDisfrutados = hdrow["DiasDisfrutados"].ToString().ToEntero();
int mitadDiasVacaciones = DiasVacaciones / 2;
classvac = DiasDisfrutados > 0 ? (DiasDisfrutados > mitadDiasVacaciones ? (DiasDisfrutados >= DiasVacaciones ? "success" : "info") : "warning") : "danger";
vacacionestomadas = string.Format("{0}/{1}",DiasDisfrutados, DiasVacaciones);
}
if (dr["MinMes"].ToString() == "1" && Mesdia != mesidias)
{
if(mesa == Mes.ToEntero())
{
colspan = Dia.ToEntero() - 1;
}
string canio = drFechaNum >= FechaNum && colspan>5 ? (ania.ToString()) :"";
stringBuilder.AppendFormat("<td class='{2}' colspan='{0}'>{1} {3}</td>", colspan, canio, classtd, antiguedad);
strbuilderB.AppendFormat("<td class='{1}' colspan='{0}'>{2}</td>", colspan, classvac, vacacionestomadas);
}
if (mesidias == Mesdia)
{
string canio = drFechaNum >= FechaNum && colspan > 5 ? (ania.ToString()) : "";
if (mesa == Mes.ToEntero())
{
colspan = colspan-(Dia.ToEntero() - 1);
}
stringBuilder.AppendFormat("<td class='{2} borderyear' colspan='{0}'>{1} {3}</td>", colspan, canio, classtd, antiguedad);
strbuilderB.AppendFormat("<td class='{1}' colspan='{0}'>{2}</td>", colspan, classvac, vacacionestomadas);
}
}
stringBuilder.AppendFormat("{0}", strbuilderB.ToString());
return stringBuilder.ToString();
}
public string strColumnasVacaciones(DataTable tabladias, DataTable TDiaspersonal)
{
StringBuilder stringBuilder = new StringBuilder();
foreach (DataRow dr in tabladias.Rows)
{
DataRow hdr = TDiaspersonal.FiltroPrimero(string.Format("FechaNum={0}", dr["FechaNum"]));
if (hdr != null)
{
if (hdr["InicioVac"].ToString() == "1")
{
stringBuilder.AppendFormat("<td class='info{1} text-center' colspan='{0}'>{0}</td>", hdr["diasvac"], (dr["MinMes"].ToString() == "1" ? " borderleft " : ""));
}
}
else
{
if (TDiaspersonal.FiltroPrimero(string.Format("Anio={0} AND Mes ={1}", dr["Anio"], dr["Mes"])) != null)
{
stringBuilder.AppendFormat("<td class='{0}'></td>", (dr["MinMes"].ToString() == "1" ? " borderleft " : ""));
}
else
{
if (dr["MinMes"].ToString() == "1")
{
stringBuilder.AppendFormat("<td class='borderleft' colspan='{0}'></td>", dr["DiasMes"]);
}
}
}
}
return stringBuilder.ToString();
}
public string columnapersonal(int dia, DataTable TDiaspersonal)
{
return string.Format("<td></td>");
}
@@ -158,6 +312,9 @@ public class Registro
public DateTime FechaAntiguedad { get; set; }
public int Antiguedad { get; set; }
public List<EjercicioInfo> Ejercicios { get; set; }
//public DataTable TDiaspersonal { get; set; }
public string ColumnasinicioFin { get; set; }
public string ColumnasVacaciones { get; set; }
}
public class EjercicioInfo

Binary file not shown.

View File

@@ -795,7 +795,7 @@ Partial Class OC
End Sub
Private Sub CargaSubProyectosEdit(DdlSP As DropDownList, CveProyectoEdit As Integer)
DdlSP.Items.Clear()
DdlSP.DataSource = DtEstatusUsuarios.FiltraParametros(String.Format("CveProyecto = {0}", CveProyectoEdit), "", {"CveSubProyecto", "SubProyecto"})
DdlSP.DataSource = DtEstatusUsuarios.FiltraParametros(String.Format("CveProyecto = {0}", CveProyectoEdit), "", {"CveSubProyecto", "SubProyecto"}) 'GlobalDTSubProyectos(CveProyectoEdit)
DdlSP.DataBind()
DdlSP.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub

View File

@@ -433,7 +433,7 @@ public partial class OI_CircularDetalleB : ClsPaginas
try
{
foreach (string Correo in correos)
{
{
MandaCorreo(TxtAsunto.Text, Correo, Contador > 0 ? "" : TxtCorreoAdicional.Text, TxtCircular.Text.Replace("< ", "<"), ArchivoBytes, HkArchivo.Text);
Contador += 1;
}

View File

@@ -437,7 +437,6 @@
}
gantt.render();
}
var datosGant = [];
function loadGant() {
gantt.config.date_format = "%Y-%m-%d %H:%i";

View File

@@ -655,7 +655,6 @@
</asp:UpdatePanel>
</div>
</div>
<div id='<%= iddivAgregarTema %>' class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpdatePanel1" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">

View File

@@ -72,7 +72,6 @@ Partial Class CatFolios
DdlTipoDocto.Items.Insert(33, New ListItem("Productos/Servicios", "PS"))
DdlTipoDocto.Items.Insert(34, New ListItem("NC de Remisión", "RNC"))
DdlTipoDocto.Items.Insert(35, New ListItem("Traspaso Carta Porte", "Tra"))
DdlTipoDocto.Items.Insert(35, New ListItem("Retenciones", "Ret"))
ElseIf UsuarioActual.Empresa.CvePlataforma = 2 Then
DdlTipoDocto.Items.Insert(1, New ListItem("Facturas", "Ing"))
DdlTipoDocto.Items.Insert(2, New ListItem("Notas de Crédito", "Egs"))

View File

@@ -49,11 +49,12 @@
<ContentTemplate>
<div class="portlet-body">
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="row">
<div class="col-md-12">
@@ -68,11 +69,6 @@
<asp:BoundField DataField="UsuarioNomina" HeaderText="UsuarioNomina" />
<asp:BoundField DataField="Proyecto" HeaderText="Proyecto" />
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
<asp:TemplateField HeaderText="Es Sucursal" ItemStyle-Width="40px" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="LblEsSucursal" runat="server" Text='<%# IIf(Eval("EsSucursal").ToString = "1", "Si", "No") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FechaIng" DataFormatString="{0:d}" HeaderText="Fecha" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" />

View File

@@ -88,6 +88,8 @@ Partial Class CatSubProyectos
CargaPrecioLista()
CargaDatos()
If UsuarioActual.Empresa.UsaContabilidad And UsuarioActual.Empresa.TipoContabilidad = 2 Then
GvDatos.Columns(1).Visible = True
DivSegmentoNegocio.Visible = True

View File

@@ -521,7 +521,7 @@ public partial class RH_CalculoSBC : ClsPaginas
SalarioCotizacion = Salariovariable + SDI;
if (objpersonal.UpdateSalarios(CvePersonal, txtfechacargamasiva.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
Salariodiario.ToString().ToDouble(), SDI.ToString().ToDouble(), SalarioCotizacion.ToString().ToDouble(), Salariodiario.ToString().ToDouble(),
false,true,"C"))
false,true,"True"))
{
{
@@ -755,7 +755,7 @@ public partial class RH_CalculoSBC : ClsPaginas
double SalarioDiarioSS = Math.Round(item.DataKey("SalarioDiarioSS").ToDouble(), 2);
if (continuar && (item.FCCheckBox("chkUpdate").Checked) &&//SalarioDiarioSSNuevo != SalarioDiarioSS &&
(continuar = objrh.UpdateSalarios(CvePersonal, fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, SalarioDiario, SDINuevo, SalarioDiarioSSNuevo, SalarioDiario,
false,true,"D"
false,true,"True"
)))
{

View File

@@ -16,9 +16,6 @@
<li>
<asp:LinkButton runat="server" ID="BtnAgregarMotivoD" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Asistencia/Inacistencia"></asp:LinkButton>
</li>
<li>
<asp:LinkButton runat="server" ID="LnkCargapredefinidos" OnClick="LnkCargapredefinidos_Click" Text="<i class='fa fa-plus'></i>Agregar Predefinidos" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si"></asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
@@ -34,7 +31,7 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAsistenciasInasistencias,Tipo,TipoCorto,AplicaAsistencia,AplicaFalta,AplicaVacacion,AplicaIncapacidad,AplicaRetardo,AplicaAguinaldo,AplicaUtilidades,AplicaPago,AplicaPagoDoble,AplicaPrimaVac,Estatus,AplicaPrimaDominical" EmptyDataText="No se encontraron AsistenciasInasistenciass Registrados" ToolTip="Listado de AsistenciasInasistenciass" CssClass="table table-striped table-hover Widthall mysmallbtn" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAsistenciasInasistencias,Tipo,TipoCorto,AplicaAsistencia,AplicaFalta,AplicaVacacion,AplicaIncapacidad,AplicaRetardo,AplicaAguinaldo,AplicaUtilidades,AplicaPago,AplicaPagoDoble,AplicaPrimaVac,Estatus" EmptyDataText="No se encontraron AsistenciasInasistenciass Registrados" ToolTip="Listado de AsistenciasInasistenciass" CssClass="table table-striped table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
@@ -98,11 +95,6 @@
<asp:Literal ID="LtlAplicapagoDoble" runat="server" Text='<%# Eval("AplicaPagoDoble") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Aplica Prima Dominical" ItemStyle-Width="10%">
<ItemTemplate>
<asp:Literal ID="LtlAplicaPrimaDominical" runat="server" Text='<%# Eval("AplicaPrimaDominical") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%">
<ItemTemplate>
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'>a</asp:Literal>
@@ -208,7 +200,7 @@
<label for="AplicaUtilidades">Aplica Utilidades:</label><br />
<asp:CheckBox ID="AplicaUtilidades" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
<div id="CheckActiveSection" runat="server" class="col-md-4">
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
<label for="ChkEstatus">Activo:</label><br />
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
@@ -219,12 +211,8 @@
<asp:CheckBox ID="ChkAplicaPago" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
<div class="col-md-4">
<label for="ChkAplicaPagoDoble">Aplica Pago Doble:</label><br />
<asp:CheckBox ID="ChkAplicaPagoDoble" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="false" />
</div>
<div class="col-md-4">
<label for="ChkAplicaPrimaDominical">Aplica Prima Dominical:</label><br />
<asp:CheckBox ID="ChkAplicaPrimaDominical" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="false" />
<label for="ChkAplicaPagoDoble">Aplica Pago doble:</label><br />
<asp:CheckBox ID="ChkAplicaPagoDoble" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
</div>
<div class="row">

View File

@@ -48,7 +48,6 @@ Partial Class RH_CatAsistenciasInasistencias
Dim ObjAsistenciasInasistencias As New ClsRH
If ObjAsistenciasInasistencias.GetAsistenciasInasistencias(UsuarioActual.CveEmpresa) Then
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados
LnkCargapredefinidos.Visible = ObjAsistenciasInasistencias.DtResultados.Rows.Count = 0
Else
Me.GvDatos.DataSource = Nothing
End If
@@ -70,9 +69,6 @@ Partial Class RH_CatAsistenciasInasistencias
AplicaRetardo.Checked = False
AplicaAguinaldo.Checked = False
AplicaUtilidades.Checked = False
ChkAplicaPagoDoble.Checked = False
ChkAplicaPrimaDominical.Checked = False
TipoTxt.Text = ""
TxtTipoCorto.Text = ""
UpModalTiposD.Update()
@@ -92,11 +88,10 @@ Partial Class RH_CatAsistenciasInasistencias
Dim aplicaPago As Integer = If(ChkAplicaPago.Checked, 1, 0)
Dim aplicaPagoDoble As Integer = If(ChkAplicaPagoDoble.Checked, 1, 0)
Dim aplicaPrimaVac As Integer = If(ChkAplicaPrimaVac.Checked, 1, 0)
Dim AplicaPrimaDominical As Integer = If(ChkAplicaPrimaDominical.Checked, 1, 0)
If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, chkAplicaFalta, chkAplicaNoAplica, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble, aplicaPrimaVac, TxtTipoCorto.Text, AplicaPrimaDominical) Then
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble, aplicaPrimaVac, TxtTipoCorto.Text) Then
TipoTxt.Text = ""
Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion)
UpTitulos.Update()
@@ -141,7 +136,7 @@ Partial Class RH_CatAsistenciasInasistencias
ChkAplicaPago.Checked = If(GvRow.DataKey("AplicaPago") = "Aplica", True, False)
ChkAplicaPagoDoble.Checked = If(GvRow.DataKey("AplicaPagoDoble") = "Aplica", True, False)
ChkAplicaPrimaVac.Checked = If(GvRow.DataKey("AplicaPrimaVac") = "Aplica", True, False)
ChkAplicaPrimaDominical.Checked = If(GvRow.DataKey("AplicaPrimaDominical") = "Aplica", True, False)
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
CveTipoAsisAEditar = Convert.ToInt32(GvRow.DataKey("CveAsistenciasInasistencias")) 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating"
@@ -175,13 +170,12 @@ Partial Class RH_CatAsistenciasInasistencias
Dim aplicaPagoDoble As Integer = If(ChkAplicaPagoDoble.Checked, 1, 0)
Dim aplicaPrimaVac As Integer = If(ChkAplicaPrimaVac.Checked, 1, 0)
Dim AplicaPrimaDominical As Integer = If(ChkAplicaPrimaDominical.Checked, 1, 0)
If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, ckAplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias,
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble,
aplicaPrimaVac, TxtTipoCorto.Text, AplicaPrimaDominical) Then
aplicaPrimaVac, TxtTipoCorto.Text) Then
GvDatos.EditIndex = -1
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa) = Nothing
@@ -259,17 +253,4 @@ Partial Class RH_CatAsistenciasInasistencias
#End Region
Protected Sub LnkCargapredefinidos_Click(sender As Object, e As EventArgs)
Using objrh As New ClsRH()
'objrh.IniciaTransacSQL()
If objrh.CargaInicialAsistenciaInasistencia(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
'objrh.Commit()
Else
'objrh.RollBack()
End If
End Using
CargaDatos()
End Sub
End Class

View File

@@ -41,26 +41,14 @@ Partial Class RH_CatTurno
End Sub
Private Sub BtnAgregarTurno_Click(sender As Object, e As EventArgs) Handles BtnAgregarTurno.Click
Dim ComidaDe As String = If(TxtComidade.Text.Trim = "", "00:00:00", TxtComidade.Text.Trim)
Dim ComidaA As String = If(TxtComidaA.Text.Trim = "", "00:00:00", TxtComidaA.Text.Trim)
Dim horaInicios As String = If(TxtHorarioDe.Text.Trim = "", "00:00:00", TxtHorarioDe.Text.Trim)
Dim horaSalidaS As String = If(TxtHorarioA.Text.Trim = "", "00:00:00", TxtHorarioA.Text.Trim)
Dim horaInicio As TimeSpan = TimeSpan.Parse(horaInicios)
Dim horaSalida As TimeSpan = TimeSpan.Parse(horaSalidaS)
If Not validaHorasTurno(horaInicio, horaSalida) Then
Exit Sub
End If
Exit Sub
Using ObjRH As New ClsRH
Dim Estatus As Boolean = False
Dim comida As Integer = If(chkComida.Checked, 1, 0)
Dim ComidaDe As String = If(TxtComidade.Text.Trim = "", "00:00:00", TxtComidade.Text.Trim)
Dim ComidaA As String = If(TxtComidaA.Text.Trim = "", "00:00:00", TxtComidaA.Text.Trim)
If ChkEstatus.Checked Then Estatus = True
If HdnModalidad.Value = "A" Then
If ObjRH.AddTurno(TxtTurno.Text, TxtHorarioDe.Text, TxtHorarioA.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlChecadorHorario.SelectedValue.ToEntero(),
@@ -84,25 +72,6 @@ Partial Class RH_CatTurno
End Sub
Private Function validaHorasTurno(horaInicio As TimeSpan, horaSalida As TimeSpan) As Boolean
If horaInicio > horaSalida Then
horaSalida = horaSalida.Add(TimeSpan.FromDays(1))
End If
Dim diferencia As TimeSpan = horaSalida - horaInicio
If diferencia.TotalHours > 13 Then
Alert("Las horas de entrada y salida no son validas. El rango de horas supera las 13 horas.", TipoMensaje.MsgAdvertencia)
Return False
End If
Return True
End Function
Public Sub Edit_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)

View File

@@ -34,7 +34,7 @@
<asp:TextBox ID="TxtCodigo" runat="server" MaxLength="12" Width="100px"></asp:TextBox></td>
<td class="text-right"><b>Nombre:</b></td>
<td colspan="3">
<asp:TextBox ID="TxtNombre" runat="server" MaxLength="100" Width="362px" autofocus="autofocus"></asp:TextBox></td>
<asp:TextBox ID="TxtNombre" runat="server" MaxLength="100" Width="362px" autofocus></asp:TextBox></td>
</tr>
<tr align="left">
<td class="text-right"><b>NSS:</b></td>
@@ -43,7 +43,7 @@
<td class="text-right"><b>Puesto:</b></td>
<td>
<asp:DropDownList ID="DdlPuestos" runat="server" AppendDataBoundItems="true" DataTextField="Puesto" DataValueField="CvePuesto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>RFC:</b></td>
@@ -54,19 +54,19 @@
<td class="text-right"><b>Tipo de Período:</b></td>
<td>
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Tipo de Contrato:</b></td>
<td>
<asp:DropDownList ID="DdlTipoContrato" runat="server" AppendDataBoundItems="true" DataTextField="TipoContrato" DataValueField="CveTipoContrato" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Departamento:</b></td>
<td>
<asp:DropDownList ID="DdlDepartamentos" runat="server" AppendDataBoundItems="true" DataTextField="Departamento" DataValueField="CveDepartamento" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
@@ -74,19 +74,19 @@
<td class="text-right"><b>Género:</b></td>
<td>
<asp:DropDownList ID="DdlGenero" runat="server" AppendDataBoundItems="true" DataTextField="Genero" DataValueField="CveGenero" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Estado Civil:</b></td>
<td>
<asp:DropDownList ID="DdlEstadoCivil" runat="server" AppendDataBoundItems="true" DataTextField="EstadoCivil" DataValueField="CveEstadoCivil" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Escolaridad:</b></td>
<td>
<asp:DropDownList ID="DdlEscolaridad" runat="server" AppendDataBoundItems="true" DataTextField="Escolaridad" DataValueField="CveEscolaridad" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
@@ -101,13 +101,13 @@
<td class="text-right"><b>Turno:</b></td>
<td>
<asp:DropDownList ID="DdlTurnos" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Cliente:</b></td>
<td>
<asp:DropDownList ID="DdlClienteAsignado" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
@@ -115,19 +115,19 @@
<td class="text-right"><b>Proyecto:</b></td>
<td>
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Sub Proyecto:</b></td>
<td>
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>Ruta:</b></td>
<td>
<asp:DropDownList ID="DdlRuta" runat="server" AppendDataBoundItems="true" DataTextField="Ruta" DataValueField="CveRuta" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
@@ -135,7 +135,7 @@
<td class="text-right"><b>Estatus:</b></td>
<td>
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusPersonal" DataValueField="CveEstatusPersonal" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td class="text-right"><b>clasificación:</b></td>
@@ -175,6 +175,8 @@
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
<td colspan="2">
<asp:GridView ID="GvCrt2" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False"

View File

@@ -35,11 +35,6 @@
<asp:TextBox ID="TxtContrasenia1" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVContrasenia" runat="server" ErrorMessage="Contraseña Vacía"
ControlToValidate="TxtContrasenia1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<br />
<ajaxToolkit:PasswordStrength ID="ps1" runat="server"
TargetControlID="TxtContrasenia1" RequiresUpperAndLowerCaseCharacters="true"
MinimumNumericCharacters="1" MinimumSymbolCharacters="1"
StrengthIndicatorType="Text" />
</th>
</tr>
<tr>

View File

@@ -42,6 +42,15 @@
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-lg-1">
Empresa:
</div>
<div class="col-lg-4">
</div>
</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr class="SubTotales">

View File

@@ -240,49 +240,52 @@ Partial Class Ventas_CatAutorizacionLimites
End If
Dim Importe As Decimal = gvRow.DataKey("Importe").ToDecimal().RoundSQL(2)
'AUTORIZACION DE IMPORTE,
'el cliente limite de 500, y saldo de 501. autorización que puede autorizar no puede ser mayor a 49 ( limite * 1.% - Saldo)
If TipoAutorizacion = 1 Then
Dim SaldoCliente As Decimal = gvRow.DataKey("Saldo").ToDecimal()
Dim LimiteCredito As Decimal = gvRow.DataKey("LimiteCredito").ToDecimal()
'SI EL LIMITE ES 0, PERMITE AUTORIZAR
If LimiteCredito > 0 Then
Dim PorcentajeMaximoAutorizar As Decimal = 0.1D
If UsuarioActual.Empresa.Funcionalidad(595).Contiene("1", "2") Then
'AUTORIZACION DE IMPORTE,
'el cliente limite de 500, y saldo de 501. autorización que puede autorizar no puede ser mayor a 49 ( limite * 1.% - Saldo)
If TipoAutorizacion = 1 Then
If UsuarioActual.PorcentajeMaximoAutorizacion > 0 Then
PorcentajeMaximoAutorizar = (UsuarioActual.PorcentajeMaximoAutorizacion / 100)
Dim SaldoCliente As Decimal = gvRow.DataKey("Saldo").ToDecimal()
Dim LimiteCredito As Decimal = gvRow.DataKey("LimiteCredito").ToDecimal()
'SI EL LIMITE ES 0, PERMITE AUTORIZAR
If LimiteCredito > 0 Then
Dim PorcentajeMaximoAutorizar As Decimal = 0.1D
If UsuarioActual.PorcentajeMaximoAutorizacion > 0 Then
PorcentajeMaximoAutorizar = (UsuarioActual.PorcentajeMaximoAutorizacion / 100)
End If
Dim ImporteMaximoAutorizar As Decimal = ((LimiteCredito * (1D + PorcentajeMaximoAutorizar)) - SaldoCliente).RoundSQL(2)
If Importe > ImporteMaximoAutorizar Then
Alert($"No se puede autorizar, el importe máximo a autorizar es de {ImporteMaximoAutorizar:N2}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Dim ImporteMaximoAutorizar As Decimal = ((LimiteCredito * (1D + PorcentajeMaximoAutorizar)) - SaldoCliente).RoundSQL(2)
If Importe > ImporteMaximoAutorizar Then
Alert($"No se puede autorizar, el importe máximo a autorizar es de {ImporteMaximoAutorizar:N2}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
'AUTORIZACION POR DIAS VENCIDOS
ElseIf TipoAutorizacion = 2 Then
Dim DiasVencidos As Integer = gvRow.DataKey("DiasVencidos").ToEntero()
If DiasVencidos > 0 Then
Dim DiasVencidosPermitidos As Integer = 5
Dim DiasVencidosAutorizacion As Integer = gvRow.DataKey("DiasVencidosAutorizacion").ToEntero()
'AUTORIZACION POR DIAS VENCIDOS
ElseIf TipoAutorizacion = 2 Then
Dim DiasVencidos As Integer = gvRow.DataKey("DiasVencidos").ToEntero()
If DiasVencidos > 0 Then
Dim DiasVencidosPermitidos As Integer = 5
If DiasVencidos > DiasVencidosAutorizacion Then
Alert($"No se puede autorizar, los días vencidos del cliente son mayores a la autorización. <br/> Dias Vencidos: {DiasVencidos:N0} . Dias autorizados. {DiasVencidosAutorizacion:N0}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim DiasVencidosAutorizacion As Integer = gvRow.DataKey("DiasVencidosAutorizacion").ToEntero()
If UsuarioActual.DiasMaximoAutorizacion > 0 Then
DiasVencidosPermitidos = UsuarioActual.DiasMaximoAutorizacion
End If
If DiasVencidos > DiasVencidosAutorizacion Then
Alert($"No se puede autorizar, los días vencidos del cliente son mayores a la autorización. <br/> Dias Vencidos: {DiasVencidos:N0} . Dias autorizados. {DiasVencidosAutorizacion:N0}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If UsuarioActual.DiasMaximoAutorizacion > 0 Then
DiasVencidosPermitidos = UsuarioActual.DiasMaximoAutorizacion
End If
If DiasVencidosAutorizacion > DiasVencidosPermitidos Then
Alert($"No se puede autorizar, la cantidad máxima de días vencidos permitidas es de {DiasVencidosPermitidos:N0}", TipoMensaje.MsgAdvertencia)
Exit Sub
If DiasVencidosAutorizacion > DiasVencidosPermitidos Then
Alert($"No se puede autorizar, la cantidad máxima de días vencidos permitidas es de {DiasVencidosPermitidos:N0}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
End If
End If

View File

@@ -89,8 +89,7 @@ Partial Class Ventas_CatMotivosCancelacion
End If
End If
ObjVentas.Dispose()
GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa) = Nothing
GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa) = Nothing
RegistraScript("$('#DivMotivo').modal('hide');")
CargaDatos()

View File

@@ -80,14 +80,12 @@
<label for="<%= TxtPrecioLista.ClientID.ToString()%>">Precio de Lista:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<div class="col-md-6">
<asp:CheckBox ID="ChkPredeterminada" runat="server" Text="Predeterminada" CausesValidation="true"></asp:CheckBox>
</div>
<div class="col-md-6" id="dvEstatus" runat="server">
<label>Activo: </label>
<asp:CheckBox ID="chkEstatus" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>
</div>
</div>
<asp:CheckBox ID="ChkPredeterminada" runat="server" Text="Predeterminada" CausesValidation="true"></asp:CheckBox>
</div>
<div id="dvEstatus" runat="server" class="form-group form-md-line-input input-iconright">
<label>Activo: </label>
<asp:CheckBox ID="chkEstatus" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>
</div>
<div id="divPermiso" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
<label>Restringida a permiso: </label>
<asp:CheckBox ID="ChkRestringida" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>

View File

@@ -28,7 +28,7 @@ Partial Class Ventas_CatPromociones
End If
InicializaControles()
OcultarMostrarInactivar(True)
CargaDatos()
End If
End Sub

View File

@@ -399,7 +399,7 @@
<div class="portlet light xspadding traspasorow bordered" runat="server" visible="false" id="DivCancelacionesPendientes">
<div class="portlet-title">
<div class="caption font-green">
<span class="caption-subject bold uppercase" style="line-height: 1; color: #ff6000;">Cancelaciones en proceso</span>
<span class="caption-subject bold uppercase" style="line-height: 1; color: #ff6000;">Cancelaciones en proceso</span>
</div>
<div class="actions">
@@ -423,11 +423,11 @@
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None" Width="100%">
<Columns>
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="25%" />
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" ItemStyle-Width="15%" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" ItemStyle-Width="15%" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Fecha Solicitud" DataField="FechaCambioEstatus" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Motivo" DataField="MotivoCancelacion" ItemStyle-Width="25%" />
<asp:TemplateField ItemStyle-Width="5%" >
<asp:TemplateField ItemStyle-Width="5%">
<ItemTemplate>
<asp:LinkButton runat="server" ID="BtnValidar" OnClick="BtnValidar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea verificar la cancelación?" data-btn-ok-label="si"></asp:LinkButton>
</ItemTemplate>
@@ -444,7 +444,7 @@
<div class="col-md-6">
<asp:Panel runat="server" ID="PnlContado" DefaultButton="BtnPagar" Visible="false">
<div class="row">
<div class="note note-success">
<div class="row">
<div class="col-md-2">
@@ -465,11 +465,11 @@
</b>
</div>
<div class="col-md-1" style="text-align: right;">
<asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" />
<asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" />
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div>
@@ -585,7 +585,6 @@
<div class="row">
<div class="col-md-2">
<label>Anticipos:</label><asp:LinkButton ID="ImgAntiPend" Visible="false" OnClick="ImgAntiPend_Click" runat="server" Text=" <i class='fa fa-money' style='font-size: 18px !important; color: #3c763d !important;'></i> " AlternateText="Aplicación de anticipos" Style="cursor: pointer;" />
</div>
<div class="col-md-4 input-icon">
<i style="margin: 0px;">$</i>
@@ -595,19 +594,19 @@
<div class="col-md-6">
<label>
<asp:UpdatePanel ID="UPPCobranza" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<ContentTemplate>
<div class="row">
<div class="col-md-6">
<asp:Literal ID="LtlTipoAnticipo" runat="server"></asp:Literal></label>
<asp:HiddenField ID="HdnTipoAmortizacion" runat="server" Value="" />
<asp:LinkButton ID="LnkCxC" runat="server" CssClass="btn btn-xs btn-success" Text="Cobranza" OnClick="LnkCxC_Click" />
<asp:Literal ID="LtlTipoAnticipo" runat="server"></asp:Literal></label>
<%--<asp:HiddenField ID="HdnTipoAmortizacion" runat="server" Value="" />--%>
<asp:LinkButton ID="LnkCxC" runat="server" CssClass="btn btn-xs btn-success" Text="Cobranza" OnClick="LnkCxC_Click" />
</div>
<div class="col-md-6">
<asp:TextBox ID="TxtCxCAplicado" CssClass="form-control input-sm TextBoxAsLabel" runat="server" MaxLength="12" Width="100px" Enabled="false" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<asp:TextBox ID="TxtCxCAplicado" CssClass="form-control input-sm TextBoxAsLabel" runat="server" MaxLength="12" Width="100px" Enabled="false" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
@@ -641,35 +640,35 @@
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UPPTotalesContado" UpdateMode="Conditional">
<asp:UpdatePanel runat="server" ID="UPPTotalesContado" UpdateMode="Conditional">
<ContentTemplate>
<div class="chequesie2">
<div class="row">
<label class="col-md-1">Total:</label>
<div class="col-md-3 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ReadOnly="true" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
<div class="chequesie2">
<div class="row">
<label class="col-md-1">Total:</label>
<div class="col-md-3 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ReadOnly="true" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
</div>
<label id="lblCambio" class="col-md-1">Cambio:</label>
<div class="col-md-3 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
<br />
</div>
<label id="lblCambio2" class="col-md-1">Sob/falt:</label>
<div class="col-md-3 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtFaltante" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
<br />
</div>
<label id="lblCambio" class="col-md-1">Cambio:</label>
<div class="col-md-3 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
<br />
</div>
<label id="lblCambio2" class="col-md-1">Sob/falt:</label>
<div class="col-md-3 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtFaltante" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
<br />
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<div class="chequesie2" id="divPagar">
@@ -679,7 +678,7 @@
<asp:HiddenField ID="HdnCveCliente" runat="server" />
<asp:HiddenField ID="HdnPlazoCobranza" runat="server" />
<asp:HiddenField ID="HdnVentaCondicionesPago" runat="server" />
<asp:HiddenField ID="HdnCveIE" runat="server" />
<asp:HiddenField ID="HdnCveIE" runat="server" />
<asp:HiddenField ID="HdnTotal" runat="server" ClientIDMode="Static" />
<asp:Button ID="BtnPagar" CssClass="btn btn-large btn-success e-big-btn" runat="server" Text="Pagar" />
</div>
@@ -1184,67 +1183,7 @@
</h4>
</div>
<div class="modal-body">
<div class="row" runat="server" id="divAmortizacionTipo" visible="false">
<div class="col-md-4">
Tipo Amortización:
</div>
<div class="col-md-8">
<asp:DropDownList ID="DdlTipoAmortizacionAnticipo" runat="server" AutoPostBack="true" Width="250px" CssClass="select2me" CausesValidation="true" OnSelectedIndexChanged="DdlTipoAmortizacionAnticipo_SelectedIndexChanged">
<asp:ListItem Text="Seleccionar" Value="-1"></asp:ListItem>
<asp:ListItem Text="Amortización anticipo con nota de crédito" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:RequiredFieldValidator ID="RfvDdlTipoAmortizacionAnticipo" runat="server" Display="None" ControlToValidate="DdlTipoAmortizacionAnticipo" InitialValue="-1" ErrorMessage="Debe Seleccionarse un tipo" ValidationGroup="VGAnticiposClientes"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CEDdlTipoAmortizacionAnticipo" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlTipoAmortizacionAnticipo" Width="300px"></ajax:ValidatorCalloutExtender>
<div class="row" style="text-align: center;" runat="server" id="divAnticipoMsg" visible="false">
<asp:Label ID="Label2" runat="server" Text="Se aplicará descuento por el total de las amortizaciones en los productos" CssClass="alert alert-warning" Style="padding: 5px; margin-bottom: 5px; padding-right: 25px;"></asp:Label>
</div>
</div>
<div class="row" id="divAmortizacionTipoRelacion" runat="server" visible="false">
<div class="col-md-4">
Tipo Relación:
</div>
<div class="col-md-8">
<asp:DropDownList ID="DdlTipoRelacionAnticipo" runat="server" Width="250px" CssClass="select2me">
<asp:ListItem Text="07 - CFDI por aplicación de anticipo" Value="7"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row" id="DivConceptoNC" runat="server" visible="false">
<div class="col-md-4">
Concepto:
</div>
<div class="col-md-8">
<asp:DropDownList ID="DdlNCPSAnt" runat="server" DataTextField="PSCodigo" DataValueField="CvePS" Width="250px" CssClass="select2me"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVNCPSAnt" runat="server" InitialValue="-1" ControlToValidate="DdlNCPSAnt" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="VGAnticiposClientes"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERFVNCPSAnt" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPSAnt" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row" id="DivFechaAnticipoCliente" runat="server" visible="false">
<b>
<label class="col-md-2">Fecha:</label></b>
<div class="col-md-4">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80% !important; padding: 0px;">
<asp:TextBox ID="TxtFechaAnticipoCliente" runat="server" ClientIDMode="Static" CssClass="form-control" CausesValidation="true" MaxLength="10" AutoPostBack="true" OnTextChanged="TxtFechaAnticipoCliente_TextChanged"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaAnticipoCliente" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaAnticipoCliente" runat="server" TargetControlID="TxtFechaAnticipoCliente" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaAnticipoCliente" TargetControlID="TxtFechaAnticipoCliente" PopupButtonID="ImgFechaAnticipoCliente" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:CompareValidator ID="CvFechaAnticipoCliente" runat="server" ControlToValidate="TxtFechaAnticipoCliente" Display="None" Operator="DataTypeCheck" Type="Date" ValidationGroup="VGAnticiposClientes" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VcoFechaAnticipoCliente" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="CvFechaAnticipoCliente" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<br />
<div style="max-height: 300px; overflow-y: auto;">
<div style="max-height: 700px; overflow-y: auto;">
<div class="row" style="margin-left: 0px; text-align: right" align="left">
<div class="col-md-2">
<asp:LinkButton ID="LnkRecargaAnticipos" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-refresh'></i> Actualizar" runat="server" OnClick="LnkRecargaAnticipos_Click" />
@@ -1255,6 +1194,13 @@
</div>
</div>
<br />
<div class="row">
<div class="col-md-12" style="display:flex; justify-content:end; font-size:16px; font-weight: bold;">
<span> Total: </span>
<asp:Label ID="LblTotalAnticipos" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label>
</div>
</div>
<asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente"
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" data-height="300" GridLines="None"
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, FolioFiscal, CveClasificacionNC, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,DevolucionImportePagado,CveCliente,Descuentos">
@@ -1283,6 +1229,12 @@
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Tipo</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlTipo" runat="server" Text='<%# Eval("Tipo") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate>Moneda Venta</HeaderTemplate>
<ItemTemplate>
@@ -1304,7 +1256,6 @@
<asp:TemplateField>
<HeaderTemplate>Amort. Ant.</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblTotalAnticipos" runat="server" ClientIDMode="Static" Text="0.00" Visible="false"></asp:Label>
<asp:TextBox ID="TxtAnticipo" CssClass="CSGATxtAnticipo" runat="server" CausesValidation="true" MaxLength="12" Width="76px"></asp:TextBox>
<asp:CompareValidator ID="CVAmortAnti" runat="server" ControlToValidate="TxtAnticipo" Display="None" ErrorMessage="El campo <b>''Amortización de Anticipos''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="VGAnticiposClientes"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOAmortAnti" runat="server" HighlightCssClass="vco" TargetControlID="CVAmortAnti" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -1340,14 +1291,13 @@
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
Estados de Cajas
<h4 class="modal-title">Estados de Cajas
</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12" >
<div class="col-md-12">
<asp:GridView ID="GvEstadoCajas" runat="server" AutoGenerateColumns="true" ClientIDMode="Static" EmptyDataText=""
OnRowDataBound="GvEstadoCajas_RowDataBound"
@@ -1358,9 +1308,9 @@
</asp:GridView>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<%--<asp:Button ID="Button1" runat="server" Text="Aceptar" class="btn btn-primary" ValidationGroup="VGAnticiposClientes" />
@@ -1375,81 +1325,81 @@
<asp:Button ID="BtnEnviarMailCancelacion" runat="server" ClientIDMode="Static" Text="Enviar Mail Cliente" Style="display: none;" OnClick="BtnEnviarMailCancelacion_Click" />
<asp:UpdatePanel runat="server" ID="UPPCxC" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<div id="divCxC" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 700px;">
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label runat="server">Cuentas por cobrar:&nbsp;<asp:Literal ID="Literal1" runat="server"></asp:Literal></asp:Label>
</h4>
</div>
<div class="modal-body">
<div style="max-height: 300px; overflow-y: auto;">
<div class="row" style="margin-left: 0px; text-align: right" align="left">
<div style="margin-right: 15px">
<input type="text" id="TxtBusquedaCxC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCxC','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontró cobranza pendiente del cliente"
CssClass=" table table-striped table-hover Widthall mysmallbtn" data-height="300" GridLines="None"
DataKeyNames=" CveVenta,PorcentajeIVA,TipoDocto,CveSubProyecto,CveMoneda,TipoCambio, Fecha,SerieFolio, SubTotal,IVA,Total,IEPS,RetIVA,RetISR, CveCliente,Saldo">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="Chk" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Folio</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFactura" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Saldo</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate>Moneda Venta</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="MonedaVenta" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Moneda</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlAbreviatura" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:UpdatePanel runat="server" ID="UPPCxC" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<div id="divCxC" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 700px;">
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label runat="server">Cuentas por cobrar:&nbsp;<asp:Literal ID="Literal1" runat="server"></asp:Literal></asp:Label>
</h4>
</div>
<div class="modal-body">
<div style="max-height: 300px; overflow-y: auto;">
<div class="row" style="margin-left: 0px; text-align: right" align="left">
<div style="margin-right: 15px">
<input type="text" id="TxtBusquedaCxC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCxC','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnAplicarCxC" runat="server" Text="Aceptar" class="btn btn-primary" OnClick="BtnAplicarCxC_Click" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontró cobranza pendiente del cliente"
CssClass=" table table-striped table-hover Widthall mysmallbtn" data-height="300" GridLines="None"
DataKeyNames=" CveVenta,PorcentajeIVA,TipoDocto,CveSubProyecto,CveMoneda,TipoCambio, Fecha,SerieFolio, SubTotal,IVA,Total,IEPS,RetIVA,RetISR, CveCliente,Saldo">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="Chk" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Folio</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFactura" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Saldo</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate>Moneda Venta</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="MonedaVenta" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Moneda</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlAbreviatura" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnAplicarCxC" runat="server" Text="Aceptar" class="btn btn-primary" OnClick="BtnAplicarCxC_Click" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
@@ -1466,8 +1416,6 @@
function chkAnt(t, txt, importe, AmorContrato = 0) {
let totalAnt = 0;
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
//si es con.nc,es.el.total
let Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));
@@ -1486,8 +1434,12 @@
totalAnt = FnSumaValoresAnt();
if (totalAnt > SaldoCompra) {
txt.value = FormatoNumero(importe - (totalAnt - SaldoCompra), 2);
//$get('HdnVentaSaldo').value = 0.00;
let valor = FormatoNumero(importe - (totalAnt - SaldoCompra), 2);
if (valor == 'NaN') {
txt.value = "0.00";
} else {
txt.value = valor;
}
alert("El Importe no debe de exceder a el saldo");
}
@@ -1508,13 +1460,8 @@
let Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));// ToDouble($get('TxtSubTotal').value);
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
let importeTxt = parseFloat(txt.value.replace(/,/g, ''));
if (TipoAnticipo == '4') {
Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));
}
if (isNaN(importeTxt)) {
importeTxt = 0;
} else {

View File

@@ -87,8 +87,8 @@
<div class="titlefiltros caption">
<div class="row">
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div runat="server" id="DivSubProyecto" class="col-md-3">
<asp:ListBox ID="DdlSubProyectos" CssClass="form-control ddlFiltros input-sm select2me Widthall" Height="30px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100%" data-text="Todos" SelectionMode="Multiple"></asp:ListBox>
<div runat="server" id="DivSubProyecto" class="col-md-2">
<asp:ListBox ID="DdlSubProyectos" CssClass="select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100%" data-text="Todos" SelectionMode="Multiple"></asp:ListBox>
</div>
<div class="col-md-1 truncate">
Fecha Inicio:

View File

@@ -24,7 +24,7 @@
<li>
<asp:LinkButton ID="LnkImprimirPedidos" runat="server" Visible="false" OnClick="LnkImprimirPedidos_Click"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Imprimir Pedidos</asp:LinkButton>
</li>
<li>
<li>
<asp:LinkButton ID="LnkImprimirPedidosExcel" runat="server" Visible="false" OnClick="LnkImprimirPedidosExcel_Click"> <i class="fa fa-file-excel-o" aria-hidden="true" style="font-weight:bold;"></i> Excel Pedidos</asp:LinkButton>
</li>
<li>
@@ -33,7 +33,7 @@
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkImprimirPedidos" />
<asp:PostBackTrigger ControlID="LnkImprimirPedidosExcel" />
<asp:PostBackTrigger ControlID="LnkImprimirPedidosExcel" />
</Triggers>
</asp:UpdatePanel>

View File

@@ -68,6 +68,8 @@ Partial Class Ventas_RepPedidosSTF
LnkImprimirPedidos.Visible = False
LnkImprimirPedidosExcel.Visible = False
DatosGV = New DataTable
Dim Opcion As Integer = 1

View File

@@ -45,12 +45,12 @@
</style>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
<%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<div class="btn-group pull-right btn-separete">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-fit-height btnopaco" />
</div>
</ContentTemplate>
<%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<div class="btn-group pull-right btn-separete">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-fit-height btnopaco" />
</div>
</ContentTemplate>
</asp:UpdatePanel>--%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
@@ -119,19 +119,19 @@
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
<asp:ListItem Text="Pedido" Value="Pd2"></asp:ListItem>
</asp:ListBox>
<%--<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlTipoComprobante" runat="server" OnSelectedIndexChanged="DdlTipoComprobante_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Ingresos" Value="Ing"></asp:ListItem>
<asp:ListItem Text="Egresos" Value="Egs"></asp:ListItem>
<asp:ListItem Text="Remisión" Value="Rem"></asp:ListItem>
<asp:ListItem Text="Cotización" Value="Cot"></asp:ListItem>
<asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem>
<asp:ListItem Text="Pedido" Value="Ped"></asp:ListItem>
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
<%--<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlTipoComprobante" runat="server" OnSelectedIndexChanged="DdlTipoComprobante_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Ingresos" Value="Ing"></asp:ListItem>
<asp:ListItem Text="Egresos" Value="Egs"></asp:ListItem>
<asp:ListItem Text="Remisión" Value="Rem"></asp:ListItem>
<asp:ListItem Text="Cotización" Value="Cot"></asp:ListItem>
<asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem>
<asp:ListItem Text="Pedido" Value="Ped"></asp:ListItem>
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
</asp:DropDownList>--%>
</div>
<div class="col-md-1 truncate">
Fecha Inicio:
Fecha Inicio:
</div>
<div class="col-md-1">
@@ -149,7 +149,7 @@
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate">
Fecha Fin:
Fecha Fin:
</div>
<div class="col-md-1">
@@ -169,25 +169,25 @@
<label class="col-md-1 ">Grupo:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlGrupo" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<%-- <asp:ListItem Text="Proyecto" Value="1"></asp:ListItem>
<asp:ListItem Text="SubProyectos" Value="2"></asp:ListItem>
<asp:ListItem Text="Categoría" Value="3"></asp:ListItem>
<asp:ListItem Text="Clasificación" Value="4"></asp:ListItem>
<asp:ListItem Text="Productos-Servicios" Value="5"></asp:ListItem>
<asp:ListItem Text="Año" Value="6"></asp:ListItem>
<asp:ListItem Text="Mes" Value="7"></asp:ListItem>
<asp:ListItem Selected="True" Text="Año/Mes" Value="8"></asp:ListItem>
<asp:ListItem Text="Fecha" Value="9"></asp:ListItem>
<asp:ListItem Text="Cliente" Value="10"></asp:ListItem>
<asp:ListItem Text="Sucursal" Value="11"></asp:ListItem>
<asp:ListItem Text="Vendedor" Value="12"></asp:ListItem>
<asp:ListItem Text="Usuario" Value="13"></asp:ListItem>
<asp:ListItem Text="Estatus Fact." Value="14"></asp:ListItem>
<asp:ListItem Text="Año Ejec" Value="15"></asp:ListItem>
<asp:ListItem Text="Mes Ejec" Value="16"></asp:ListItem>
<asp:ListItem Text="Año/Mes Ejec" Value="17"></asp:ListItem>
<asp:ListItem Text="Fecha Ejec" Value="18"></asp:ListItem>
<asp:ListItem Text="Sucursal Ejec" Value="19"></asp:ListItem>
<%-- <asp:ListItem Text="Proyecto" Value="1"></asp:ListItem>
<asp:ListItem Text="SubProyectos" Value="2"></asp:ListItem>
<asp:ListItem Text="Categoría" Value="3"></asp:ListItem>
<asp:ListItem Text="Clasificación" Value="4"></asp:ListItem>
<asp:ListItem Text="Productos-Servicios" Value="5"></asp:ListItem>
<asp:ListItem Text="Año" Value="6"></asp:ListItem>
<asp:ListItem Text="Mes" Value="7"></asp:ListItem>
<asp:ListItem Selected="True" Text="Año/Mes" Value="8"></asp:ListItem>
<asp:ListItem Text="Fecha" Value="9"></asp:ListItem>
<asp:ListItem Text="Cliente" Value="10"></asp:ListItem>
<asp:ListItem Text="Sucursal" Value="11"></asp:ListItem>
<asp:ListItem Text="Vendedor" Value="12"></asp:ListItem>
<asp:ListItem Text="Usuario" Value="13"></asp:ListItem>
<asp:ListItem Text="Estatus Fact." Value="14"></asp:ListItem>
<asp:ListItem Text="Año Ejec" Value="15"></asp:ListItem>
<asp:ListItem Text="Mes Ejec" Value="16"></asp:ListItem>
<asp:ListItem Text="Año/Mes Ejec" Value="17"></asp:ListItem>
<asp:ListItem Text="Fecha Ejec" Value="18"></asp:ListItem>
<asp:ListItem Text="Sucursal Ejec" Value="19"></asp:ListItem>
<asp:ListItem Text="Cliente - PS" Value="20"></asp:ListItem>--%>
</asp:DropDownList>
</div>
@@ -431,13 +431,11 @@
<%--19--%>
<asp:BoundField HeaderText="Num. Turnos" DataField="NumTurnos" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" Visible="false" />
<%--20--%>
<asp:BoundField HeaderText="O. C." DataField="OC_noOrden" ItemStyle-Width="5%" Visible="false" />
<asp:BoundField HeaderText="O.C." DataField="OC_noOrden" ItemStyle-Width="5%" Visible="false" />
<%--21--%>
<asp:BoundField HeaderText="Kilogramos" DataField="OC_Kilogramos" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" Visible="false" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="O.C Kg" DataField="OC_Kilogramos" ItemStyle-Width="5%" Visible="false" />
<%--22--%>
<asp:BoundField HeaderText="Cantiadad" DataField="OC_Cantidad" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" Visible="false" ItemStyle-HorizontalAlign="Right" />
<%--23--%>
<asp:BoundField HeaderText="Manifiesto" DataField="NoManifiesto" ItemStyle-Width="5%" Visible="false" />
<asp:BoundField HeaderText="O.C Cantidad" DataField="OC_Cantidad" ItemStyle-Width="5%" Visible="false" />
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
@@ -479,15 +477,15 @@
<asp:CheckBox ID="ChkFormaPago" runat="server" Text="Forma de Pago" />
</td>
</tr>
<tr runat="server" id="DivMostrarCgame">
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkOC_noOrden" runat="server" Text="O. C." />
<asp:CheckBox ID="ChkOC_noOrden" runat="server" Text="O.C." />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkOC_Kilogramos" runat="server" Text="O. C. Kilogramos" />
<asp:CheckBox ID="ChkOC_Kilogramos" runat="server" Text="O.C. Kilogramos" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkOC_Cantidad" runat="server" Text="O. C. Cantiadad" />
<asp:CheckBox ID="ChkOC_Cantidad" runat="server" Text="O.C. Cantidad" />
</td>
</tr>
@@ -495,13 +493,12 @@
<td style="text-align: left;">
<asp:CheckBox ID="ChkFechaHoraEmision" runat="server" Text="Fecha Hora de Emisión" />
</td>
<td style="text-align: left;" runat="server" id="DivMostrarCgame2">
<asp:CheckBox ID="ChkNoManifiesto" runat="server" Text="Manifiesto" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkNumTurnos" runat="server" Text="Número de turnos" Visible="false" />
</td>
<td style="text-align: left;">
</td>
</tr>
</tbody>
</table>
@@ -537,7 +534,7 @@
</asp:RadioButtonList>
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
Especifico:
Especifico:
<asp:TextBox ID="TxtEspecifico" runat="server" Width="55px" />
</div>
@@ -603,64 +600,64 @@
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<script>
<script>
function CargaGraficaBarras(data) {
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
"dataProvider": data,
"startDuration": 2,
"type": "serial",
"theme": "light",
"dataProvider": data,
"startDuration": 2,
"valueAxes": [{
"position": "left",
"position": "left",
"title": "Ventas"
}],
}],
"graphs": [{
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
"colorField": "Color",
"fillAlphas": 1,
"lineAlpha": 0.1,
"type": "column",
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
"colorField": "Color",
"fillAlphas": 1,
"lineAlpha": 0.1,
"type": "column",
"valueField": "Valor"
}],
"depth3D": 20,
"angle": 30,
}],
"depth3D": 20,
"angle": 30,
"chartCursor": {
"categoryBalloonEnabled": false,
"cursorAlpha": 0,
"categoryBalloonEnabled": false,
"cursorAlpha": 0,
"zoomable": false
},
"categoryField": "Texto",
},
"categoryField": "Texto",
"categoryAxis": {
"gridPosition": "start",
"gridPosition": "start",
"labelRotation": 90
},
},
"export": {
"enabled": true
}
});
}
}
function CargaGraficaPastel(data) {
var chart = AmCharts.makeChart("chartdiv", {
"type": "pie",
"theme": "light",
"dataProvider":
data,
"valueField": "Valor",
"titleField": "Texto",
"outlineAlpha": 0.4,
"depth3D": 0,
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",
"angle": 0,
"type": "pie",
"theme": "light",
"dataProvider":
data,
"valueField": "Valor",
"titleField": "Texto",
"outlineAlpha": 0.4,
"depth3D": 0,
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",
"angle": 0,
"export": {
"enabled": true
}
});
}
}
</script>
</asp:Content>

View File

@@ -73,8 +73,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
DivMostrarCgame.Visible = (UsuarioActual.CveEmpresa = 172)
DivMostrarCgame2.Visible = (UsuarioActual.CveEmpresa = 172)
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
SetValues()
CargaParametrosDetalle()
@@ -559,7 +558,6 @@ Partial Class Ventas_RepProductosServiciosDetalle
GvDatos.Columns(20).Visible = ChkOC_noOrden.Checked
GvDatos.Columns(21).Visible = ChkOC_Kilogramos.Checked
GvDatos.Columns(22).Visible = ChkOC_Cantidad.Checked
GvDatos.Columns(23).Visible = ChkNoManifiesto.Checked

View File

@@ -4,7 +4,7 @@ using System.Web.UI.HtmlControls;
using System.Web;
using System.Web.UI.WebControls;
using Extensiones;
using System.Data;
using System.Data;
using static Extensiones.ModExtensiones;
using Microsoft.Reporting.WebForms;
using System.Web.UI.HtmlControls;

View File

@@ -78,9 +78,9 @@
<asp:LinkButton ID="LnkPErsonalizar" OnClick="LnkPErsonalizar_Click" runat="server"><i class="fa fa-pencil"></i>Personalizar Columnas</asp:LinkButton>
<%--<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>--%>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpLnkHP" runat="server" UpdateMode="Conditional">
@@ -98,23 +98,25 @@
<li>
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkDescargaCartaPorte" OnClick="LnkDescargaCartaPorte_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Descarga Carta Porte</asp:LinkButton>
<li>
<asp:LinkButton ID="LnkDescargaCartaPorte" OnClick="LnkDescargaCartaPorte_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Descarga Carta Porte</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkGeneraXLS1" OnClick="LnkGeneraXLS1_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 1</asp:LinkButton>
<li>
<asp:LinkButton ID="LnkGeneraXLS1" OnClick="LnkGeneraXLS1_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 1</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkGeneraXLS2" OnClick="LnkGeneraXLS2_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 2</asp:LinkButton>
</li>
<li id="LiSabana" runat="server" visible="false">
<asp:HyperLink ID="HLSabana" NavigateUrl="#" data-toggle="modal" data-target="#DivModalSabana" runat="server"><i class='fa fa-file-excel-o'></i> Ventas por código</asp:HyperLink>
</li>
<li>
<asp:LinkButton ID="LnkGeneraXLS2" OnClick="LnkGeneraXLS2_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 2</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<Triggers>
<asp:PostBackTrigger ControlID="LnkDescargaCartaPorte" />
<asp:PostBackTrigger ControlID="LnkGeneraXLS1" />
<asp:PostBackTrigger ControlID="LnkGeneraXLS2" />
<asp:PostBackTrigger ControlID="LnkGeneraXLS1" />
<asp:PostBackTrigger ControlID="LnkGeneraXLS2" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
@@ -144,7 +146,7 @@
<asp:ListItem Text="Cotización" Value="Cot"></asp:ListItem>
<asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem>
<asp:ListItem Text="Pedido" Value="Ped"></asp:ListItem>
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
</asp:ListBox>
<%--<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlTipoComprobante" runat="server" OnSelectedIndexChanged="DdlTipoComprobante_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
@@ -335,8 +337,8 @@
<asp:ListItem Text="Sin parte relacionadas" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" Visible="false" runat="server" id="DivLblDistr">Distribuidor:</label>
<div class="col-md-2" Visible="false" runat="server" id="DivDistr">
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" visible="false" runat="server" id="DivLblDistr">Distribuidor:</label>
<div class="col-md-2" visible="false" runat="server" id="DivDistr">
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Distribuidor" Value="1"></asp:ListItem>
@@ -344,28 +346,28 @@
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblServicioDomicilioFiltro" class="col-md-1 truncate" Visible="false">Servicio Domicilio:</asp:Label>
<div class="col-md-2" runat="server" id="DVServicioDomicilio" Visible="false">
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%" >
<asp:ListItem Value ="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Si</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
<div class="col-md-2" runat="server" id="DVServicioDomicilio" visible="false">
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Si</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblFacturaGlobal" class="col-md-1 truncate" Visible="false">Factura Global:</asp:Label>
<div class="col-md-2" runat="server" id="DivFacturaGlobal" Visible="false">
<asp:DropDownList ID="DdlFacturaGlobal" CssClass=" form-control input-sm select2me" runat="server" Width="100%" >
<asp:ListItem Value ="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Solo Globales</asp:ListItem>
<asp:ListItem Value="0">Sin Globales</asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-2" runat="server" id="DivFacturaGlobal" visible="false">
<asp:DropDownList ID="DdlFacturaGlobal" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Solo Globales</asp:ListItem>
<asp:ListItem Value="0">Sin Globales</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-1 truncate">Relación:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoRelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Relación:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoRelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
</asp:DropDownList>
</div>
</div>
</div>
</div>
@@ -399,7 +401,7 @@
<%--6--%>
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--7--%>
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
<%--8--%>
<asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--9--%>
@@ -422,24 +424,24 @@
<asp:BoundField HeaderText="Tot. Mínimo" DataField="MIN_Total" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--18--%>
<asp:BoundField HeaderText="Tot. Refacturado" DataField="TotalRefacturado" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--<asp:BoundField HeaderText="Sub. Crédito" DataField="SubTotalCredito" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Sub. Contado" DataField="SubTotalContado" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
<%--19--%>
<asp:TemplateField HeaderText="Sub. Crédito" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LblCredito" runat="server" Text='<%# Eval("SubtotalCredito", "{0:N0}") %>'></asp:Label>
<asp:Label ID="LblCreditoPorcentaje" runat="server" Text='<%# String.Format("{0:###,###,###.00}%", Eval("SubTotalCreditoPorcentaje")) %>' Font-Italic="True" Font-Size="10px" Visible="false" ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<ItemTemplate>
<asp:Label ID="LblCredito" runat="server" Text='<%# Eval("SubtotalCredito", "{0:N0}") %>'></asp:Label>
<asp:Label ID="LblCreditoPorcentaje" runat="server" Text='<%# String.Format("{0:###,###,###.00}%", Eval("SubTotalCreditoPorcentaje")) %>' Font-Italic="True" Font-Size="10px" Visible="false"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<%--20--%>
<asp:TemplateField HeaderText="Sub. Contado" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="LblContado" runat="server" Text='<%# Eval("SubTotalContado", "{0:N0}") %>'></asp:Label>
<asp:Label ID="LblContadoPorcentaje" runat="server" Text='<%# String.Format("{0:###,###,###.00}%", Eval("SubTotalContadoPorcentaje")) %>' Font-Italic="True" Font-Size="10px" Visible="false" ></asp:Label>
</ItemTemplate>
<ItemTemplate>
<asp:Label ID="LblContado" runat="server" Text='<%# Eval("SubTotalContado", "{0:N0}") %>'></asp:Label>
<asp:Label ID="LblContadoPorcentaje" runat="server" Text='<%# String.Format("{0:###,###,###.00}%", Eval("SubTotalContadoPorcentaje")) %>' Font-Italic="True" Font-Size="10px" Visible="false"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
@@ -465,93 +467,91 @@
<tbody>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkCantidad" runat="server" Text="&nbsp;*Cantidad" /></td>
<asp:CheckBox ID="ChkCantidad" runat="server" Text="&nbsp;*Cantidad" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="&nbsp;SubTotal Máximo" />
</td>
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkSubtotal" runat="server" Text="&nbsp;Sub total" /></td>
<asp:CheckBox ID="ChkSubtotal" runat="server" Text="&nbsp;Sub total" /></td>
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="&nbsp;SubTotal Promedio" />
</td>
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="&nbsp;SubTotal Promedio" />
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkDescuentos" runat="server" Text="&nbsp;*Descuentos" /></td>
<asp:CheckBox ID="ChkDescuentos" runat="server" Text="&nbsp;*Descuentos" /></td>
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkMinSub" runat="server" Text="&nbsp;SubTotal Mínimo" />
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkSubTotal2" runat="server" Text="&nbsp;*Subtotal 2" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="&nbsp;Total Máximo" />
</td>
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="&nbsp;Total Máximo" />
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkIVA" runat="server" Text="&nbsp;*IVA" />
</td>
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkAvgTot" runat="server" Text="&nbsp;Total Promedio" />
</td>
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="&nbsp;Ret. IVA" />
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="&nbsp;Ret. IVA" />
</td>
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkMinTot" runat="server" Text="&nbsp;Total Mínimo" />
</td>
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkRetISR" runat="server" Text="&nbsp;Ret. ISR" />
</td>
</td>
<td style="text-align: left;">
<asp:CheckBox ID="CheckRefacturado" runat="server" Text="&nbsp;Refacturado" />
</td>
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkImpLoc" runat="server" Text="&nbsp;Impuestos Locales" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkImpLoc" runat="server" Text="&nbsp;Impuestos Locales" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkCredito" runat="server" Text="&nbsp;Crédito" />
</td>
</td>
</tr>
<tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkTotal" runat="server" Text="&nbsp;*Total" />
</td>
<asp:CheckBox ID="ChkTotal" runat="server" Text="&nbsp;*Total" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkContado" runat="server" Text="&nbsp;Contado" />
</td>
</td>
</tr>
<tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkIEPS" runat="server" Text="&nbsp;*IEPS" Visible="false" />
</td>
<td style="text-align: left;">
</td>
</td>
<td style="text-align: left;"></td>
</tr>
</tbody>
@@ -560,7 +560,7 @@
<div class="modal-footer">
<div class="row">
<div class="col-md-6" style="text-align:left">
<div class="col-md-6" style="text-align: left">
<asp:CheckBox ID="ChkGuardarPersonalizacion" runat="server" Text=" Guarda Personalización" TextAlign="Right" />
</div>
<div class="col-md-6">
@@ -737,6 +737,108 @@
</div>
</div>
<div id="DivModalSabana" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<asp:UpdatePanel runat="server" ID="UpModalSabana" UpdateMode="Conditional" class="modal-content">
<ContentTemplate>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="Label5" runat="server" ClientIDMode="Static" Text="Ventas por código"></asp:Label></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-2">Proveedor:</div>
<div class="col-md-10">
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
</div>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-4">
Código PS Inicio:
</div>
<div class="col-md-8">
<asp:TextBox ID="TxtCodI" runat="server" CssClass="form-control input-sm" Width="85px"></asp:TextBox>
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-4">
Código PS Final:
</div>
<div class="col-md-8">
<asp:TextBox ID="TxtCodF" runat="server" CssClass="form-control input-sm" Width="85px"></asp:TextBox>
</div>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-4 truncate">
Fecha Inicio:
</div>
<div class="col-md-8" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="85px" ID="TxtFechaISabana" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaISabana" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEESabanaI" runat="server" TargetControlID="TxtFechaISabana" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaISabana" TargetControlID="TxtFechaISabana" PopupButtonID="LnkFechaISabana" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVSabanaI" runat="server" ControlToValidate="TxtFechaISabana" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="RepSabana"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVSabanaI" runat="server" ControlToValidate="TxtFechaISabana" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="RepSabana"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RFVSabanaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVSabanaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-4 truncate">
Fecha Fin:
</div>
<div class="col-md-8" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="85px" ID="TxtFechaFSabana" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaFSabana" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MESabanaF" runat="server" TargetControlID="TxtFechaFSabana" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaFSabana" TargetControlID="TxtFechaFSabana" PopupButtonID="LnkFechaFSabana" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVSanabaF" runat="server" ControlToValidate="TxtFechaFSabana" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="RepSabana"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVSabanaF" runat="server" ControlToValidate="TxtFechaFSabana" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="RepSabana"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco" TargetControlID="RFVSanabaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender8" runat="server" HighlightCssClass="vco" TargetControlID="CVSabanaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnGenerarSabana" runat="server" CssClass="btn btn-success" Text="Generar" OnClick="BtnGenerarSabana_Click" ValidationGroup="RepSabana" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="BtnGenerarSabana" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>

View File

@@ -5,6 +5,7 @@ Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports System.Xml
Imports GemBox.Spreadsheet
Partial Class Ventas_RepVentas
Inherits ClsPaginas
@@ -110,6 +111,16 @@ Partial Class Ventas_RepVentas
Opcion = "-1"
End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.TienePermisoProceso(386) Then
LiSabana.Visible = True
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.SelectedText = "Todos"
DdlProveedores.SelectedValue = "-1"
End If
If UsuarioActual.CveEmpresa = 72 AndAlso UsuarioActual.CveUsuario.Contiene(100, 1614, 1517) Then
liRepHP.Visible = True
End If
@@ -242,7 +253,10 @@ Partial Class Ventas_RepVentas
DdlTipoRelacion.Items.Insert(0, New ListItem("Todos", "-1"))
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
txtFechaF.Text = NowADS().ToShortDateString
txtFechaF.Text = NowADS().ToShortDateString
TxtFechaISabana.Text = NowADS().FirstDayOfMonth.ToShortDateString
TxtFechaFSabana.Text = NowADS().ToShortDateString
End Sub
@@ -1101,4 +1115,52 @@ Partial Class Ventas_RepVentas
End Sub
Protected Sub BtnGenerarSabana_Click(sender As Object, e As EventArgs)
Dim DtExcel As DataTable = Nothing
Dim ObjVentas As New ClsVentas
If ObjVentas.GetSabanaE189(UsuarioActual.CveEmpresa, TxtFechaISabana.Text.ToDate(), TxtFechaFSabana.Text.ToDate(), DdlProveedores.SelectedValue.ToEntero(), TxtCodI.Text.Trim(), TxtCodF.Text.Trim()) Then
DtExcel = ObjVentas.DtResultados.Copy()
End If
ObjVentas.Dispose()
If DtExcel IsNot Nothing Then
'DtExcel.Columns("Codigo").ColumnName = "Código"
'DtExcel.Columns("PS").ColumnName = "Producto / Servicio"
'DtExcel.Columns("NumeroParte").ColumnName = "Número de parte"
'If UsuarioActual.Empresa.Funcionalidad(578) = "1" Or UsuarioActual.Empresa.Funcionalidad(531) = "1" Or UsuarioActual.Empresa.Funcionalidad(382) = "1" Then '
' If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
' DtExcel.Columns("Número de parte").ColumnName = "Código CPK"
' End If
'Else
' DtExcel.Columns.Remove("Número de parte")
'End If
DtExcel.TableName = "Sabana"
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim FileExcel As New ExcelFile()
Dim worksheet As ExcelWorksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With
{
.ColumnHeaders = True,
.StartRow = 0,
.StartColumn = 0
})
worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns()
For i As Integer = 0 To columnCount
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
Next
FileExcel.Save(Response, "Sabana.xlsx", SaveOptions.XlsxDefault)
End If
End Sub
End Class

View File

@@ -113,7 +113,7 @@ Partial Class Ventas_RepVentas
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
'CargaUsuarios
DdlUsuario.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlUsuario.DataSource = GlobalDTUsuarios(-1,UsuarioActual.CveEmpresa)
DdlUsuario.DataBind()
'CargaEstatus

View File

@@ -417,9 +417,9 @@
<li>
<asp:LinkButton ID="LbVerificarExistencia" Visible="false" runat="server"><i class='fa fa-list-alt'></i>Verificar Existencias</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkEnvioDeCorreoFactura" runat="server" CausesValidation="False" OnClick="LnkEnvioDeCorreoFactura_Click" Visible="false" > <i class="fa fa-envelope-o" aria-hidden="true"></i> Envio De Correo</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkEnvioDeCorreoFactura" runat="server" CausesValidation="False" OnClick="LnkEnvioDeCorreoFactura_Click" Visible="false" > <i class="fa fa-envelope-o" aria-hidden="true"></i> Envio De Correo</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
@@ -1827,7 +1827,6 @@
<ContentTemplate>
<asp:TextBox ID="TxtTotal" runat="server" CssClass="TextBoxAsLabel" ClientIDMode="Static" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox>
<asp:HiddenField ID="HdnVentaSaldo" runat="server" ClientIDMode="Static" Value="0" />
<asp:HiddenField ID="HdnVentaSaldoOriginal" runat="server" ClientIDMode="Static" Value="0" />
<asp:HiddenField ID="HdnCveVenta" runat="server" ClientIDMode="Static" Value="0" />
<asp:HiddenField ID="HdnSubTotalDescuestos" runat="server" ClientIDMode="Static" Value="0" />
@@ -9320,9 +9319,8 @@
</div>
</div>
</div>
<div id="ModalDivMailFactura" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
@@ -10916,7 +10914,7 @@
if (totalAnt > SaldoCompra) {
txt.value = FormatoNumero(importe - (totalAnt - SaldoCompra), 2);
//$get('HdnVentaSaldo').value = 0.00;
$get('HdnVentaSaldo').value = 0.00;
alert("El Importe no debe de exceder a el saldo");
}
@@ -10926,7 +10924,7 @@
} else {
//$get('HdnVentaSaldo').value = parseFloat(SaldoCompra) + parseFloat(txt.value);
$get('HdnVentaSaldo').value = parseFloat(SaldoCompra) + parseFloat(txt.value);
txt.value = "";
}
@@ -10977,7 +10975,7 @@
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
//$get('HdnVentaSaldo').value = Total - FnSumaValoresAnt();
$get('HdnVentaSaldo').value = Total - FnSumaValoresAnt();
}
function FnSumaValoresAnt() {

View File

@@ -39479,7 +39479,7 @@ Partial Class Ventas
Dim PuedeAplicarDevolucion As Boolean = False
'código temporal RMF. para devoluciones de facturas cargadas de saldos iniciales.
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TxtFecha.Text.ToDate.Year < 2025 Then
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso (TxtFecha.Text.ToDate.Year < 2025 OrElse CveVentaPadre > 0) Then
SaldoAlmacen = -1
DevolucionAlmacen = 0
End If