Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -42,6 +42,9 @@ Public Class CalendarEvent
|
||||
|
||||
Public Property CveSubProyectoUsuarioAtendio As Integer
|
||||
|
||||
Public Property CveCompra As Integer
|
||||
Public Property SerieFolioCompra As String
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -2488,12 +2488,12 @@ Public Class ClsOIEventos
|
||||
Optional RecurrenciaTipo As Integer = -1, Optional Frecuencia As Integer = -1, Optional DiasSemana As String = "-1", Optional Dia As Integer = -1, Optional Mes As Integer = -1,
|
||||
Optional RecurrenciaFin As String = "-1", Optional CveTipoEvento As Integer = 2, Optional Importe As Double = -1,
|
||||
Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1, Optional CveUsuarioPara As Integer = -1) As Boolean
|
||||
Optional CveSubProyecto As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveCompra As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, CveUsuarioPara, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC,
|
||||
CvePersonal, CveProveedor, CveEventoPadre:=CveEventoPadre, RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dia, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, Importe:=Importe,
|
||||
CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto)
|
||||
CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto, CveCompra:=CveCompra)
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
@@ -9188,7 +9188,7 @@ Public Class ClsPaginas
|
||||
'PaginaDict.Add("/Sistemas/CatEmpresas.aspx".ToUpper(), 2)
|
||||
PaginaDict.Add("/Sistemas/CatEmpresas.aspx".ToUpper(), 24)
|
||||
PaginaDict.Add("/Sistemas/Empresa.aspx".ToUpper(), 2)
|
||||
PaginaDict.Add("/Sistemas/Empresa2.aspx".ToUpper(), 1341)
|
||||
PaginaDict.Add("/Sistemas/DefinicionEmpresa.aspx".ToUpper(), 1341)
|
||||
PaginaDict.Add("/Sistemas/CatUsuarios.aspx".ToUpper(), 20)
|
||||
PaginaDict.Add("/Sistemas/Usuarios.aspx".ToUpper(), 20)
|
||||
PaginaDict.Add("/Sistemas/UsuarioDetalle.aspx".ToUpper(), 20)
|
||||
|
||||
@@ -38,33 +38,33 @@ Public Class LogicNominas
|
||||
Else
|
||||
If hasfiniquito Then
|
||||
|
||||
cfdi = PreTimbrar(CveNomina, UsuarioActual, True, versionTimbre) 'CvePersonal, CvePeriodo,
|
||||
If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then
|
||||
'cfdi = PreTimbrar(CveNomina, UsuarioActual, True, versionTimbre) 'CvePersonal, CvePeriodo,
|
||||
'If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then
|
||||
|
||||
If Not cfdi.Timbrado Then
|
||||
Dim ObjTimbrado As New Timbrado
|
||||
Dim ObjFactura As New Modelos.Factura
|
||||
ObjFactura.TipoDocto = "Nomina"
|
||||
ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
|
||||
ObjFactura.Serie = cfdi.Comprobante.Serie
|
||||
ObjFactura.Timbre = cfdi
|
||||
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC, versionTimbre) Then
|
||||
Retorno = ObjTimbrado.MensajeErrorCFDI
|
||||
End If
|
||||
If Retorno <> "" Then
|
||||
Retorno = $"{Retorno} - {cfdi.Receptor.Nombre}"
|
||||
Else
|
||||
' If Not cfdi.Timbrado Then
|
||||
' Dim ObjTimbrado As New Timbrado
|
||||
' Dim ObjFactura As New Modelos.Factura
|
||||
' ObjFactura.TipoDocto = "Nomina"
|
||||
' ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
|
||||
' ObjFactura.Serie = cfdi.Comprobante.Serie
|
||||
' ObjFactura.Timbre = cfdi
|
||||
' If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC, versionTimbre) Then
|
||||
' Retorno = ObjTimbrado.MensajeErrorCFDI
|
||||
' End If
|
||||
' If Retorno <> "" Then
|
||||
' Retorno = $"{Retorno} - {cfdi.Receptor.Nombre}"
|
||||
' Else
|
||||
|
||||
End If
|
||||
' End If
|
||||
|
||||
End If
|
||||
Else
|
||||
If cfdi Is Nothing Then
|
||||
Retorno = $"No se pudo generar el pretimbre(GetError): <br/> {GetError}"
|
||||
Else
|
||||
Retorno = $"No se pudo generar el pretimbre: <br/> {cfdi.Mensaje}"
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
'Else
|
||||
' If cfdi Is Nothing Then
|
||||
' Retorno = $"No se pudo generar el pretimbre(GetError): <br/> {GetError}"
|
||||
' Else
|
||||
' Retorno = $"No se pudo generar el pretimbre: <br/> {cfdi.Mensaje}"
|
||||
' End If
|
||||
'End If
|
||||
|
||||
End If
|
||||
End If
|
||||
@@ -106,7 +106,7 @@ Public Class LogicNominas
|
||||
Dim TotalExcento As Decimal = 0
|
||||
Dim TotalGravado As Decimal = 0
|
||||
|
||||
Dim AntiguedadSemanas As Integer = 0
|
||||
Dim AntiguedadSemanas As String = ""
|
||||
Dim FormatoReciboCFDi As String = ""
|
||||
|
||||
Dim FechaInicio, FechaFin, FechaPago As Date
|
||||
@@ -158,32 +158,33 @@ Public Class LogicNominas
|
||||
Dim drow As DataRow = objNomina.DtResultados.Rows(0)
|
||||
CvePersonal = drow("CvePersonal").ToString().ToEntero()
|
||||
CvePeriodo = drow("CvePeriodo").ToString().ToEntero()
|
||||
If TimbreIndemnizacion Then
|
||||
totalDb = drow("TotalFin").ToString().ToDecimal()
|
||||
subTotalDb = drow("SubTotalFin").ToString().ToDecimal()
|
||||
Else
|
||||
totalDb = drow("Total").ToString().ToDecimal()
|
||||
'If TimbreIndemnizacion Then
|
||||
' totalDb = drow("TotalFin").ToString().ToDecimal()
|
||||
' subTotalDb = drow("SubTotalFin").ToString().ToDecimal()
|
||||
'Else
|
||||
totalDb = drow("Total").ToString().ToDecimal()
|
||||
subTotalDb = drow("SubTotal").ToString().ToDecimal()
|
||||
End If
|
||||
'End If
|
||||
cfdi.Nomina.Antiguedad = drow("Antiguedad").ToString().ToEntero()
|
||||
cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal()
|
||||
Serie = objNomina.Serie
|
||||
Folio = objNomina.Folio.ToString()
|
||||
|
||||
FechaInicioContrato = drow("FechaIngreso").ToString()
|
||||
AntiguedadSemanas = drow("AntiguedadSemanas").ToString()
|
||||
MetodoPagoFijo = drow("MetodoPagoFijo").ToString().ToUpper().Contiene("1", "TRUE")
|
||||
|
||||
ClaveBanco = drow("ClaveBanco").ToString()
|
||||
BancoNumCuenta = drow("BancoNumCuenta").ToString()
|
||||
|
||||
If TimbreIndemnizacion Then
|
||||
cfdi.Timbrado = drow("SeTimbroFiniquitoVal").ToString().ToEntero() = 1
|
||||
cfdi.IStimbreFiniquito = True
|
||||
Serie = $"{objNomina.Serie}F"
|
||||
Else
|
||||
cfdi.Timbrado = drow("SeTimbroVal").ToString().ToEntero() = 1
|
||||
'If TimbreIndemnizacion Then
|
||||
' cfdi.Timbrado = drow("SeTimbroFiniquitoVal").ToString().ToEntero() = 1
|
||||
' cfdi.IStimbreFiniquito = True
|
||||
' Serie = $"{objNomina.Serie}F"
|
||||
'Else
|
||||
cfdi.Timbrado = drow("SeTimbroVal").ToString().ToEntero() = 1
|
||||
cfdi.IStimbreFiniquito = False
|
||||
End If
|
||||
Else
|
||||
'End If
|
||||
Else
|
||||
If continuar Then GetError = "No se pudo obtener la información de la nomina" 'si continuar= true el error se origino en este nodo y se le asigno el error
|
||||
continuar = False
|
||||
End If
|
||||
@@ -195,7 +196,7 @@ Public Class LogicNominas
|
||||
Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1")
|
||||
CURP = objPersonal.CURP
|
||||
NumeroSS = objPersonal.NumeroSS
|
||||
FechaInicioContrato = objPersonal.FechaInicioContrato.ToString()
|
||||
'FechaInicioContrato = objPersonal.FechaInicioContrato.ToString()
|
||||
CodigoTipoContrato = objPersonal.CodigoTipoContrato
|
||||
ClaveTipoJornada = objPersonal.ClaveTipoJornada
|
||||
CveRegimenContratacion = objPersonal.CveRegimenContratacion
|
||||
@@ -220,27 +221,27 @@ Public Class LogicNominas
|
||||
End If
|
||||
If continuar AndAlso objNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
|
||||
If objNomina.DtResultados.Rows.Count > 0 Then
|
||||
Dim filtropercepciones As String = "Tipo = 'P' AND EsPadre = 1 AND SoloVisible =0 AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) AND SATCveConcepto NOT IN ('022', '023','025')"
|
||||
If TimbreIndemnizacion Then
|
||||
filtropercepciones = " Tipo = 'P' AND SATCveConcepto IN ('022', '023','025') AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) "
|
||||
End If
|
||||
Dim filtropercepciones As String = "Tipo = 'P' AND EsPadre = 1 AND SoloVisible =0 AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) " ' AND SATCveConcepto NOT IN ('022', '023','025')
|
||||
'If TimbreIndemnizacion Then
|
||||
' filtropercepciones = " Tipo = 'P' AND SATCveConcepto IN ('022', '023','025') AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) "
|
||||
'End If
|
||||
DtPercepciones = objNomina.DtResultados.FiltraParametros(filtropercepciones)
|
||||
Dim filtrodeduc As String = "Tipo = 'D' AND EsPadre = 1 AND SoloVisible =0 AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) AND CveSistema <> 47"
|
||||
If TimbreIndemnizacion Then
|
||||
filtrodeduc = " Tipo = 'D' AND CveSistema =47"
|
||||
End If
|
||||
Dim filtrodeduc As String = "Tipo = 'D' AND EsPadre = 1 AND SoloVisible =0 AND (TipoConceptoSAT<>'O' OR TipoConceptoSAT IS NULL) " 'AND CveSistema <> 47
|
||||
'If TimbreIndemnizacion Then
|
||||
' filtrodeduc = " Tipo = 'D' AND CveSistema =47"
|
||||
'End If
|
||||
DtDeducciones = objNomina.DtResultados.FiltraParametros(filtrodeduc)
|
||||
If Not TimbreIndemnizacion Then
|
||||
DtOtrosPagos = objNomina.DtResultados.FiltraParametros(" TipoConceptoSAT='O'")
|
||||
DtOtrosPagos = objNomina.DtResultados.FiltraParametros(" TipoConceptoSAT='O'")
|
||||
'If Not TimbreIndemnizacion Then
|
||||
|
||||
End If
|
||||
'End If
|
||||
Dim disrcomp As DataRow = DtOtrosPagos.FiltroPrimero("Codigo ='D999'")
|
||||
For Each drow As DataRow In DtDeducciones.Rows
|
||||
If drow("Codigo").ToString() = "D038" Then
|
||||
|
||||
End If
|
||||
Next
|
||||
hasfiniquito = objNomina.DtResultados.COUNT("SATCveConcepto", "(Tipo = 'P' AND SATCveConcepto IN ('022', '023','025')) ") > 0 'OR (Tipo = 'D' AND SATCveConcepto = '101')
|
||||
hasfiniquito = False 'objNomina.DtResultados.COUNT("SATCveConcepto", "(Tipo = 'P' AND SATCveConcepto IN ('022', '023','025')) ") > 0 'OR (Tipo = 'D' AND SATCveConcepto = '101')
|
||||
|
||||
|
||||
TotalPercepciones = DtPercepciones.SUM("Importe").ToString().ToDecimal()
|
||||
@@ -266,21 +267,21 @@ Public Class LogicNominas
|
||||
FechaFin = DrPeriodo("FechaFin").ToString().ToDate()
|
||||
FechaPago = DrPeriodo("FechaPago").ToString().ToDate()
|
||||
PeriodicidadPago = DrPeriodo("ClavePerioricidadPago").ToString()
|
||||
AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, FechaFin).ToEntero()
|
||||
'AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, FechaFin).ToEntero()
|
||||
|
||||
If Not TimbreIndemnizacion Then
|
||||
FechaInicio = DrPeriodo("FechaInicio").ToString().ToDate()
|
||||
'If Not TimbreIndemnizacion Then
|
||||
FechaInicio = DrPeriodo("FechaInicio").ToString().ToDate()
|
||||
TipoNomina = If(objNomina.CveTipoPeriodo = 6, "E", "O")
|
||||
Else
|
||||
FechaInicio = FechaFin
|
||||
TipoNomina = "E"
|
||||
End If
|
||||
'Else
|
||||
' FechaInicio = FechaFin
|
||||
' TipoNomina = "E"
|
||||
'End If
|
||||
Else
|
||||
If continuar Then GetError = "No se pudo obtener la información del periodo" 'si continuar= true el error se origino en este nodo y le asigno el error
|
||||
continuar = False
|
||||
End If
|
||||
If Not TimbreIndemnizacion Then
|
||||
If continuar AndAlso objPersonal.GetAsistencias(CvePersonal, -1, -1, -1, -1, -1, -1, FechaInicio, FechaFin, UsuarioActual.CveEmpresa) Then
|
||||
'If Not TimbreIndemnizacion Then
|
||||
If continuar AndAlso objPersonal.GetAsistencias(CvePersonal, -1, -1, -1, -1, -1, -1, FechaInicio, FechaFin, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim Asistencias As Integer = objPersonal.DtResultados.SUM("AplicaAsistencia").ToEntero()
|
||||
'If Asistencias > 15 Then
|
||||
@@ -296,14 +297,14 @@ Public Class LogicNominas
|
||||
Else
|
||||
continuar = False
|
||||
End If
|
||||
Else
|
||||
DiasPagados = 1
|
||||
DiasIncapacitados = 0
|
||||
End If
|
||||
If continuar AndAlso DiasIncapacitados > 0 Then
|
||||
If Not TimbreIndemnizacion Then
|
||||
'Else
|
||||
' DiasPagados = 1
|
||||
' DiasIncapacitados = 0
|
||||
'End If
|
||||
If continuar AndAlso DiasIncapacitados > 0 Then
|
||||
'If Not TimbreIndemnizacion Then
|
||||
|
||||
If objNomina.GetIncapacidades(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||
If objNomina.GetIncapacidades(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||
If objNomina.DtResultados IsNot Nothing AndAlso objNomina.DtResultados.Rows.Count > 0 Then
|
||||
For Each dr As DataRow In objNomina.DtResultados.Rows
|
||||
ObjIncapacidades.Add(New CFDINominaIncapacidades With {.DiasIncapacidad = dr("Dias").ToString().ToEntero().ToString(), .TipoIncapacidad = dr("ClaveTipoIncapacidad").ToString(), .Importe = dr("Descuento").ToString().ToDecimal})
|
||||
@@ -313,8 +314,8 @@ Public Class LogicNominas
|
||||
If continuar Then GetError = "No se pudo obtener las incapacidades del periodo" 'si continuar= true el error se origino en este nodo y le asigno el error
|
||||
continuar = False
|
||||
End If
|
||||
'End If
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End Using
|
||||
|
||||
@@ -446,7 +447,7 @@ Public Class LogicNominas
|
||||
|
||||
Next
|
||||
End If
|
||||
If Not TimbreIndemnizacion AndAlso CveRegimenContratacion.ToEntero() = 2 AndAlso ((ObjOtrosPagos.FirstOrDefault(Function(m) m.TipoOtroPago.ToEntero().Contiene(2, 7, 8))) Is Nothing) Then
|
||||
If CveRegimenContratacion.ToEntero() = 2 AndAlso ((ObjOtrosPagos.FirstOrDefault(Function(m) m.TipoOtroPago.ToEntero().Contiene(2, 7, 8))) Is Nothing) Then
|
||||
|
||||
ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo
|
||||
.Clave = "D051", .Concepto = "Subs al Empleo acreditado", .Importe = 0D, .Subsidiocausado = 0D})
|
||||
@@ -484,7 +485,7 @@ Public Class LogicNominas
|
||||
cfdi.Nomina.Receptor.CURP = CURP
|
||||
cfdi.Nomina.Receptor.NSS = NumeroSS
|
||||
cfdi.Nomina.Receptor.FechaInicioContrato = FechaInicioContrato
|
||||
cfdi.Nomina.Receptor.Antiguedad = $"P{AntiguedadSemanas}W"
|
||||
cfdi.Nomina.Receptor.Antiguedad = AntiguedadSemanas '$"P{AntiguedadSemanas}W"
|
||||
cfdi.Nomina.Receptor.TipoContrato = If(TimbreIndemnizacion, "99", CodigoTipoContrato)
|
||||
cfdi.Nomina.Receptor.CodigoTipoJornada = ClaveTipoJornada
|
||||
cfdi.Nomina.Receptor.CodigoRegimenContratacion = If(TimbreIndemnizacion, "13", CveRegimenContratacion)
|
||||
|
||||
@@ -196,6 +196,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
cevent.NombreProveedor = dr("NombreProveedor").ToString
|
||||
cevent.NomprePersonal = dr("NomprePersonal").ToString
|
||||
|
||||
cevent.CveCompra = dr("CveCompra").ToString.ToEntero
|
||||
cevent.SerieFolioCompra = dr("SerieFolioCompra").ToString
|
||||
|
||||
cevent.CveOS = dr("CveOS").ToString.ToEntero
|
||||
cevent.CveOSDetalle = dr("CveOSDetalle").ToString.ToEntero
|
||||
|
||||
@@ -1408,7 +1408,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
BtnGuardarAcercamiento.Visible = false;
|
||||
BtnEliminarAcercamiento.Visible = false;
|
||||
|
||||
DivAccionesBitacoraActividades.Visible = false;
|
||||
DivAccionesBitacoraActividades.Visible = true;
|
||||
DivAccionesBitacoraArchivos.Visible = false;
|
||||
|
||||
LnkCerrarAcercamiento.Visible = false;
|
||||
|
||||
@@ -3014,8 +3014,9 @@
|
||||
<i class="fa fa-commenting font-green"></i>
|
||||
<span class="caption-subject bold">Agregar</span>
|
||||
</div>--%>
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' ></i>Agendar" Visible="false" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Agendar"></asp:HyperLink><br />
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-green" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-green" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' ></i>Agendar"
|
||||
Visible="false" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Agendar"></asp:HyperLink><br />
|
||||
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
|
||||
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
|
||||
|
||||
|
||||
@@ -1296,6 +1296,8 @@ Partial Class Compras_Compras
|
||||
DivEsNoDeducible.Visible = True
|
||||
DivActualizarVincular.Visible = True
|
||||
DVModalAnticipoFechaEjecucion.Visible = True
|
||||
HlEvento.Visible = True
|
||||
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveCompra=" & CveCompra & "&TB_iframe=true&height=370&width=600;"
|
||||
Else
|
||||
|
||||
ViewState("CveProveedor") = -1
|
||||
|
||||
@@ -3044,8 +3044,14 @@
|
||||
<i class="fa fa-commenting font-green"></i>
|
||||
<span class="caption-subject bold">Agregar</span>
|
||||
</div>--%>
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Visible="false" Style="cursor: pointer; text-decoration: none;" ToolTip="Agendar"><i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' ></i> <span class="caption-subject bold font-green">Agendar</span></asp:HyperLink>
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-green" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important;cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Visible="false" Style="cursor: pointer; text-decoration: none;" ToolTip="Agendar">
|
||||
<i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' ></i> <span class="caption-subject bold font-green">Agendar</span>
|
||||
</asp:HyperLink><br />
|
||||
<asp:Literal ID="LtlTareaNueva" runat="server" Visible="false"></asp:Literal>
|
||||
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
|
||||
<script> function OnAddedTareaNueva() { $('.btnupEventoBitacora').click(); }</script>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -3055,6 +3061,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="btnupEventoBitacora" OnClick="btnupEventoBitacora_Click" UseSubmitBehavior="false" CssClass="hidden btnupEventoBitacora mysmallbtn" runat="server" Text="Button" />
|
||||
<asp:GridView ID="GvEB" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado comentarios o bitácora" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
|
||||
@@ -536,9 +536,13 @@ Partial Class Compras_Proveedores
|
||||
End If
|
||||
HlEvento.Visible = True
|
||||
HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveProveedor=" & CveProveedor & "&TB_iframe=true&height=370&width=600;"
|
||||
LtlTareaNueva.Visible = True
|
||||
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-green"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveProveedor:{0}}});""> <i class=""fa fa-plus""'></i> Tarea</a>", CveProveedor)
|
||||
|
||||
CargaRepresentantes()
|
||||
|
||||
|
||||
|
||||
Else
|
||||
'Configuración de Modalidad Insert
|
||||
|
||||
@@ -2776,6 +2780,9 @@ Partial Class Compras_Proveedores
|
||||
ObjEventoBitacora.Dispose()
|
||||
GvEB.DataBind()
|
||||
End Sub
|
||||
Protected Sub btnupEventoBitacora_Click(sender As Object, e As EventArgs)
|
||||
CargaEventoBitacora()
|
||||
End Sub
|
||||
|
||||
Protected Sub DownloadFile(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim filePath As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, CType(sender, LinkButton).CommandArgument)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<style>
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
height: 700px;
|
||||
}
|
||||
|
||||
.fa.fa-bar-chart {
|
||||
@@ -62,8 +62,8 @@
|
||||
<div class="col-md-1 truncate">
|
||||
Cuenta:
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="350px">
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
@@ -150,12 +150,17 @@
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica gral" NavigateUrl="javascript:void(0);" onclick="return cargaGraficaBarras2();"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<%--<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica gral" NavigateUrl="javascript:void(0);" onclick="return cargaGraficaBarras2();"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>--%>
|
||||
<asp:HyperLink ID="hpl2" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" >
|
||||
<i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="white-space: nowrap">
|
||||
<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
|
||||
<%--<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />--%>
|
||||
<asp:HyperLink ID="hpl2" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" >
|
||||
<i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -165,7 +170,7 @@
|
||||
<div style="width: 200px;">Nombre</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
<asp:Label ID="LblNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -250,14 +255,31 @@
|
||||
<div class="col-md-2"></div>
|
||||
<label class="col-md-1 truncate">Grafica:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" AppendDataBoundItems="true" Class="DdlGrafica select2me">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
|
||||
<select id="DdlGrafica" class="DdlGrafica select2me" >
|
||||
<option value="column">Barras</option>
|
||||
<option value="line">Lineas</option>
|
||||
<option value="pie">Pastel</option>
|
||||
</select>
|
||||
|
||||
<%-- <asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" ClientIDMode="Static" AppendDataBoundItems="true" Class="DdlGrafica select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlGrafica_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="line"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="pie"></asp:ListItem>
|
||||
<asp:ListItem Text="Lineas" Value="column"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
<%--<div id="chartdiv" runat="server">
|
||||
</div>--%>
|
||||
<div runat="server" id="chartdiv2"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
@@ -269,7 +291,191 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#DdlGrafica').change(function () {
|
||||
recargaGrafica();
|
||||
});
|
||||
});
|
||||
|
||||
var hplControl = "";
|
||||
|
||||
function recargaGrafica() {
|
||||
$(`#${hplControl}`).click();
|
||||
}
|
||||
|
||||
|
||||
function graficahighchartsFinan(idcontainer, titulo, subtitulo, ytitulo, datos, xtitulo, labelpoint, media, datospie1, datospie2, idChkSeleccionado,ControlID) {
|
||||
|
||||
|
||||
let tipoGrafico = $(`#DdlGrafica`).val();
|
||||
let esPie = tipoGrafico == 'pie'?true:false;
|
||||
hplControl = ControlID;
|
||||
|
||||
if(idChkSeleccionado=='' & esPie ){
|
||||
$('#DdlGrafica').val('column');
|
||||
tipoGrafico = $(`#DdlGrafica`).val();
|
||||
esPie = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$('#LblTituloGrafica').text(titulo)
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".chartcheckboxes").remove();
|
||||
});
|
||||
|
||||
var Monedas = '';
|
||||
if (datospie1.length > 0) {
|
||||
Monedas = 'Monedas';
|
||||
}
|
||||
|
||||
let datosSeries = [];
|
||||
let datosCategorias = [];
|
||||
let datosRaw = [];
|
||||
|
||||
|
||||
if (idChkSeleccionado.trim().length > 0) {
|
||||
|
||||
let dataName = $(`#${idChkSeleccionado}`).data('name');
|
||||
let dataData = $(`#${idChkSeleccionado}`).data('data');
|
||||
datosRaw = dataData
|
||||
datosCategorias = $(`#${idChkSeleccionado}`).data('categorias');
|
||||
|
||||
|
||||
let serieDato = {
|
||||
name: dataName,
|
||||
data: dataData
|
||||
}
|
||||
datosSeries.push(serieDato);
|
||||
console.log("data-name:", dataName);
|
||||
console.log("data-data:", dataData);
|
||||
|
||||
|
||||
} else {
|
||||
$(document).ready(function () {
|
||||
$('.chksel').each(function () {
|
||||
if ($(this).prop('checked')) {
|
||||
|
||||
var dataName = $(this).data('name');
|
||||
var dataData = $(this).data('data');
|
||||
datosCategorias = $(this).data('categorias');
|
||||
|
||||
let serieDato = {
|
||||
name: dataName,
|
||||
data: dataData
|
||||
}
|
||||
datosSeries.push(serieDato);
|
||||
console.log("data-name:", dataName);
|
||||
console.log("data-data:", dataData);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
console.log("serieDato:", datosSeries);
|
||||
console.log("datosCategorias:", datosCategorias);
|
||||
|
||||
if(esPie){
|
||||
let datosPie = [];
|
||||
|
||||
for (let i = 0; i < datosCategorias.length; i++) {
|
||||
|
||||
let objpie = {
|
||||
name: datosCategorias[i],
|
||||
y:datosRaw[i]
|
||||
}
|
||||
datosPie.push(objpie);
|
||||
}
|
||||
|
||||
|
||||
datosSeries = [{
|
||||
name: 'Importe',
|
||||
colorByPoint : true,
|
||||
data : datosPie
|
||||
}]
|
||||
|
||||
|
||||
}
|
||||
|
||||
Highcharts.chart(idcontainer, {
|
||||
|
||||
chart: {
|
||||
type: tipoGrafico
|
||||
},
|
||||
|
||||
title: {
|
||||
text: titulo,
|
||||
align: 'left'
|
||||
},
|
||||
|
||||
subtitle: {
|
||||
text: subtitulo,
|
||||
align: 'left'
|
||||
},
|
||||
|
||||
yAxis: {
|
||||
title: {
|
||||
text: ytitulo
|
||||
}
|
||||
},
|
||||
|
||||
xAxis: {
|
||||
categories: datosCategorias,
|
||||
title: {
|
||||
text: xtitulo
|
||||
}
|
||||
},
|
||||
|
||||
legend: {
|
||||
layout: 'vertical',
|
||||
align: 'right',
|
||||
verticalAlign: 'middle'
|
||||
},
|
||||
|
||||
plotOptions: {
|
||||
series: {
|
||||
label: {
|
||||
connectorAllowed: false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
series: datosSeries ,
|
||||
|
||||
responsive: {
|
||||
rules: [{
|
||||
condition: {
|
||||
maxWidth: 500
|
||||
},
|
||||
chartOptions: {
|
||||
legend: {
|
||||
layout: 'horizontal',
|
||||
align: 'center',
|
||||
verticalAlign: 'bottom'
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
credits: {
|
||||
enabled: false
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<%-- <script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
@@ -531,7 +737,7 @@
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</script>--%>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports DocumentFormat.OpenXml.EMMA
|
||||
Imports DocumentFormat.OpenXml.Office2010.ExcelAc
|
||||
Imports Extensiones
|
||||
Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Public Property CveCuenta As Integer
|
||||
Get
|
||||
@@ -56,6 +58,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
|
||||
Dim EjercicioParametro, SubProyectoParametro, DivisorParametro, Periodo, TRCU As Integer
|
||||
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
|
||||
EjercicioParametro = IfNull(Request("Ejercicio"), "-1").ToString.ToEntero
|
||||
@@ -67,7 +70,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
InicializaValores()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(EjercicioParametro.ToString)
|
||||
DdlSubProyecto.SelectedValueExist(SubProyectoParametro.ToString)
|
||||
DdlSubproyecto.SelectedValueExist(SubProyectoParametro.ToString)
|
||||
DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
|
||||
DdlPeriodo.SelectedValueExist(Periodo)
|
||||
DdlTri.SelectedValueExist(TRCU)
|
||||
@@ -81,9 +84,9 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
CargaCombos()
|
||||
@@ -108,12 +111,11 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
|
||||
Conta.Dispose()
|
||||
|
||||
DdlCuentas.DataBind()
|
||||
|
||||
DdlEjercicio.DataBind()
|
||||
DdlCuentas.DataBind()
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicio.SelectedValueExist(Now.Year.ToString)
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto)
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
|
||||
End Sub
|
||||
@@ -130,11 +132,10 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
If Not DdlCuentas.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Debe de seleccionar una cuenta.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
Dim Conta As New ClsContabilidad
|
||||
|
||||
If Conta.GetAnexoCatalogoMensual(DdlCuentas.SelectedValue.ToEntero, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero) Then
|
||||
If Conta.GetAnexoCatalogoMensual(DdlCuentas.SelectedValue.ToEntero, DdlEjercicio.SelectedValue.ToEntero, DdlSubproyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero) Then
|
||||
GvMensual2.DataSource = Conta.DtResultados
|
||||
Else
|
||||
GvMensual2.DataSource = Nothing
|
||||
@@ -192,7 +193,10 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
|
||||
|
||||
#Region " GV ROW DATABOUND "
|
||||
Protected Sub GvMensual1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMensual2.RowDataBound
|
||||
Protected Sub GvMensual1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMensual2.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
setgrafica(e)
|
||||
End If
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'If e.Row.RowIndex = 0 Then
|
||||
@@ -213,30 +217,28 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
'End If
|
||||
|
||||
Dim Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre As Decimal
|
||||
Enero = e.Row.DBCampo("Enero").ToDecimal()
|
||||
Febrero = e.Row.DBCampo("Febrero").ToDecimal()
|
||||
Marzo = e.Row.DBCampo("Marzo").ToDecimal()
|
||||
Abril = e.Row.DBCampo("Abril").ToDecimal()
|
||||
Mayo = e.Row.DBCampo("Mayo").ToDecimal()
|
||||
Junio = e.Row.DBCampo("Junio").ToDecimal()
|
||||
Julio = e.Row.DBCampo("Julio").ToDecimal()
|
||||
Agosto = e.Row.DBCampo("Agosto").ToDecimal()
|
||||
Septiembre = e.Row.DBCampo("Septiembre").ToDecimal()
|
||||
Octubre = e.Row.DBCampo("Octubre").ToDecimal()
|
||||
Noviembre = e.Row.DBCampo("Noviembre").ToDecimal()
|
||||
Diciembre = e.Row.DBCampo("Diciembre").ToDecimal()
|
||||
|
||||
|
||||
Enero = e.Row.DBCampo("Enero").ToDecimal()
|
||||
Febrero = e.Row.DBCampo("Febrero").ToDecimal()
|
||||
Marzo = e.Row.DBCampo("Marzo").ToDecimal()
|
||||
Abril = e.Row.DBCampo("Abril").ToDecimal()
|
||||
Mayo = e.Row.DBCampo("Mayo").ToDecimal()
|
||||
Junio = e.Row.DBCampo("Junio").ToDecimal()
|
||||
Julio = e.Row.DBCampo("Julio").ToDecimal()
|
||||
Agosto = e.Row.DBCampo("Agosto").ToDecimal()
|
||||
Septiembre = e.Row.DBCampo("Septiembre").ToDecimal()
|
||||
Octubre = e.Row.DBCampo("Octubre").ToDecimal()
|
||||
Noviembre = e.Row.DBCampo("Noviembre").ToDecimal()
|
||||
Diciembre = e.Row.DBCampo("Diciembre").ToDecimal()
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
|
||||
|
||||
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
|
||||
For x = 2 To GvMensual2.Columns.Count - 1
|
||||
|
||||
|
||||
For x = 2 To GvMensual2.Columns.Count - 1
|
||||
|
||||
If e.Row.Cells(x).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(x).Text = "-"
|
||||
ElseIf e.Row.Cells(x).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
If e.Row.Cells(x).Text.Replace("%", "").ToDecimal = 0 Then
|
||||
e.Row.Cells(x).Text = "-"
|
||||
ElseIf e.Row.Cells(x).Text.Replace("%", "").ToDecimal < 0 Then
|
||||
e.Row.Cells(x).ForeColor = Drawing.Color.OrangeRed
|
||||
End If
|
||||
|
||||
@@ -281,37 +283,105 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
e.Row.Cells(x).Text = $"<a { If(Octubre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/10/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Octubre.ToString("###,###,##0"), Octubre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 35 Then
|
||||
If x = 35 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Noviembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/11/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Noviembre.ToString("###,###,##0"), Noviembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
|
||||
If x = 38 Then
|
||||
If x = 38 Then
|
||||
e.Row.Cells(x).Text = $"<a { If(Diciembre < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/12/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubproyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Diciembre.ToString("###,###,##0"), Diciembre.ToString("###,###,###.00")) }</a>"
|
||||
End If
|
||||
Next
|
||||
If Enero = 0 Then
|
||||
e.Row.Cells(2).Text = "-"
|
||||
End If
|
||||
Next
|
||||
If Enero = 0 Then
|
||||
e.Row.Cells(2).Text = "-"
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub setgrafica(e As GridViewRowEventArgs)
|
||||
|
||||
Dim lista As New List(Of Object)
|
||||
lista.Add(New With {.Texto = "Enero", .Valor = e.Row.DBCampo("Enero").ToDecimal(), .Color = "#FF0F00"})
|
||||
lista.Add(New With {.Texto = "Febrero", .Valor = e.Row.DBCampo("Febrero").ToDecimal(), .Color = "#FF6600"})
|
||||
lista.Add(New With {.Texto = "Marzo", .Valor = e.Row.DBCampo("Marzo").ToDecimal(), .Color = "#F8FF01"})
|
||||
lista.Add(New With {.Texto = "Abril", .Valor = e.Row.DBCampo("Abril").ToDecimal(), .Color = "#04D215"})
|
||||
lista.Add(New With {.Texto = "Mayo", .Valor = e.Row.DBCampo("Mayo").ToDecimal(), .Color = "#2A0CD0"})
|
||||
lista.Add(New With {.Texto = "Junio", .Valor = e.Row.DBCampo("Junio").ToDecimal(), .Color = "#8A0CCF"})
|
||||
lista.Add(New With {.Texto = "Julio", .Valor = e.Row.DBCampo("Julio").ToDecimal(), .Color = "#CD0D74"})
|
||||
lista.Add(New With {.Texto = "Agosto", .Valor = e.Row.DBCampo("Agosto").ToDecimal(), .Color = "#754DEB"})
|
||||
lista.Add(New With {.Texto = "Septiembre", .Valor = e.Row.DBCampo("Septiembre").ToDecimal(), .Color = "#DDDDDD"})
|
||||
lista.Add(New With {.Texto = "Octubre", .Valor = e.Row.DBCampo("Octubre").ToDecimal(), .Color = "#999999"})
|
||||
lista.Add(New With {.Texto = "Noviembre", .Valor = e.Row.DBCampo("Noviembre").ToDecimal(), .Color = "#000000"})
|
||||
lista.Add(New With {.Texto = "Diciembre", .Valor = e.Row.DBCampo("Diciembre").ToDecimal(), .Color = "#FF0F00"})
|
||||
e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'Dim Lista2 As New List(Of String)
|
||||
'Lista2.Add($"['{"Enero"}',{e.Row.DBCampo("Enero").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Febrero"}',{e.Row.DBCampo("Febrero").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Marzo"}',{e.Row.DBCampo("Marzo").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Abril"}',{e.Row.DBCampo("Abril").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Mayo"}',{e.Row.DBCampo("Mayo").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Junio"}',{e.Row.DBCampo("Junio").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Julio"}',{e.Row.DBCampo("Julio").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Agosto"}',{e.Row.DBCampo("Agosto").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Septiembre"}',{e.Row.DBCampo("Septiembre").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Octubre"}',{e.Row.DBCampo("Octubre").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Noviembre"}',{e.Row.DBCampo("Noviembre").ToDecimal()}]")
|
||||
'Lista2.Add($"['{"Diciembre"}',{e.Row.DBCampo("Diciembre").ToDecimal()}]")
|
||||
|
||||
Dim ListaDatos As New List(Of String)
|
||||
Dim ListaCategorias As New List(Of String)
|
||||
|
||||
ListaDatos.Add(e.Row.DBCampo("Enero").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Febrero").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Marzo").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Abril").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Mayo").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Junio").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Julio").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Agosto").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Septiembre").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Octubre").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Noviembre").ToDecimal.ToString("###########0.00"))
|
||||
ListaDatos.Add(e.Row.DBCampo("Diciembre").ToDecimal.ToString("###########0.00"))
|
||||
|
||||
ListaCategorias.Add($"""Enero""")
|
||||
ListaCategorias.Add($"""Febrero""")
|
||||
ListaCategorias.Add($"""Marzo""")
|
||||
ListaCategorias.Add($"""Abril""")
|
||||
ListaCategorias.Add($"""Mayo""")
|
||||
ListaCategorias.Add($"""Junio""")
|
||||
ListaCategorias.Add($"""Junio""")
|
||||
ListaCategorias.Add($"""Agosto""")
|
||||
ListaCategorias.Add($"""Septiembre""")
|
||||
ListaCategorias.Add($"""Octubre""")
|
||||
ListaCategorias.Add($"""Noviembre""")
|
||||
ListaCategorias.Add($"""Diciembre""")
|
||||
|
||||
Dim Titulo As String = e.Row.FCLabel("LblNombre").Text
|
||||
Dim SubTitulo As String = ""
|
||||
Dim YReferencia As String = "Valor"
|
||||
Dim Info As String = ""
|
||||
Dim XReferencia As String = "Periodos"
|
||||
Dim Promedio As String = ""
|
||||
|
||||
|
||||
'e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
|
||||
'If e.Row.DataKey("Tipo").ToEntero <> 1 Then
|
||||
'Dim Info = String.Join(",", Lista2)
|
||||
'e.Row.FCHyperLink("Hypgrafica").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
' String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],1,'{5}','{6}',[{8}],[{7}],'{9}','{10}');", chartdiv2.ClientID, "", "", "$", Info, "", 0, "", "", e.Row.DBCampo("Nombre"), e.Row.FCHyperLink("Hypgrafica").ClientID))
|
||||
|
||||
|
||||
|
||||
e.Row.FCHyperLink("hpl2").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],'{5}','{5}','{6}',[{8}],[{7}],'{9}','{10}');", chartdiv2.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia, Promedio, "", "", e.Row.FCCheckBox("chkgraf").ClientID, e.Row.FCHyperLink("hpl2").ClientID))
|
||||
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("class", "chksel")
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-name", e.Row.FCLabel("LblNombre").Text)
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-data", $"[{String.Join(",", ListaDatos)}]")
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-categorias", $"[{String.Join(",", ListaCategorias)}]")
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.FCHyperLink("hpl2").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],'{5}','{5}','{6}',[{8}],[{7}],'{9}','{10}' );", chartdiv2.ClientID, "Selección multiple", "", "Valores", "", "Periodos", "", "", "", "", e.Row.FCHyperLink("hpl2").ClientID))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'Else
|
||||
' e.Row.FCHyperLink("hpl2").Visible = False
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -332,4 +402,8 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
'Protected Sub DdlGrafica_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' RegistraScript("recargaGrafica();")
|
||||
'End Sub
|
||||
End Class
|
||||
|
||||
@@ -2006,10 +2006,10 @@
|
||||
<Width>2.35552in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.76635in</Width>
|
||||
<Width>0.67141in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.57354in</Width>
|
||||
<Width>0.66848in</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>0.59047in</Width>
|
||||
@@ -2415,7 +2415,7 @@
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
<Format>#,0.00</Format>
|
||||
<Format>#,0.000</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -2557,7 +2557,9 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>CodigoObjetoImpuesto</rd:DefaultName>
|
||||
@@ -2571,6 +2573,7 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
|
||||
@@ -450,14 +450,17 @@
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<%--<asp:HyperLink ID="Hypgrafica" runat="server" CssClass="Texto Hypgrafica gral" NavigateUrl="javascript:void(0);" onclick="return cargaGraficaBarras2();"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>--%>
|
||||
<asp:HyperLink ID="hpl2" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" >
|
||||
<i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="white-space: nowrap">
|
||||
<asp:HyperLink ID="Hypgrafica" Visible="false" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" Visible="false" />
|
||||
<%--<asp:HyperLink ID="Hypgrafica" Visible="false" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" onclick="return HandlerGraf(this, event);"><i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>--%>
|
||||
|
||||
|
||||
<asp:HyperLink ID="hpl2" runat="server" CssClass="Texto Hypgrafica" NavigateUrl="javascript:void(0);" >
|
||||
<i class="fa fa-bar-chart" aria-hidden="true"></i></asp:HyperLink>
|
||||
<asp:CheckBox ID="chkgraf" CssClass="chkgraf" runat="server" />
|
||||
|
||||
|
||||
</div>
|
||||
@@ -650,381 +653,234 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<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>
|
||||
let cdatos;
|
||||
let currentid = 1;
|
||||
function HandlerGraf(obj, evt) {
|
||||
$("#DivModalGrafica").modal();
|
||||
cdatos = $(obj).data('values');
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
$('.LblTituloGrafica').text($(obj).closest('tr').text().trim());
|
||||
}
|
||||
function CargaGraficaBarras() {
|
||||
let data = cdatos;
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "line",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
function CargaGraficaPastel() {
|
||||
let data = cdatos;
|
||||
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,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
function ADSBegin() {
|
||||
$('.DdlGrafica').on('select2:select', function (e) {
|
||||
var data = e.params.data;
|
||||
currentid = data.id;
|
||||
if (currentid == 1) {
|
||||
CargaGraficaBarras();
|
||||
} else {
|
||||
CargaGraficaPastel();
|
||||
}
|
||||
});
|
||||
$('.DdlGrafica').removeClass('DdlGrafica')
|
||||
initamgrafica();
|
||||
}
|
||||
|
||||
function cargaGraficaBarras2() {
|
||||
//Hypgrafica
|
||||
$("#DivModalGrafica").modal();
|
||||
$('.LblTituloGrafica').text('grafica');
|
||||
let items = []
|
||||
let data;
|
||||
let series = [];
|
||||
$('.chkgraf input:checked').each(function () {
|
||||
data = $(this).closest('tr').find('.Hypgrafica').data('values')
|
||||
let name = $(this).closest('tr').text().trim()
|
||||
items.push({ data: data, name: name })
|
||||
});
|
||||
if (items) {
|
||||
data = items[0].data;
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[0].name,
|
||||
"valueField": 'Valor'
|
||||
})
|
||||
for (var indexcol = 1; indexcol < items.length; indexcol++) {
|
||||
let cdatos = items[indexcol].data;
|
||||
let valueField = 'Valor' + indexcol;
|
||||
for (var i = 0; i < cdatos.length; i++) {
|
||||
data[i][valueField] = cdatos[i].Valor
|
||||
}
|
||||
series.push({
|
||||
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"title": items[indexcol].name,
|
||||
"valueField": valueField
|
||||
})
|
||||
}
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2, "legend": {
|
||||
|
||||
"generateFromData": true // "data": data.map(function(num) { return {title:num.Texto ,color:num.Color}; })
|
||||
},
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": series,
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function initamgrafica() {
|
||||
AmCharts.addInitHandler(function (chart) {
|
||||
function handleCustomMarkerToggle(legendEvent) {
|
||||
var dataProvider = legendEvent.chart.dataProvider;
|
||||
var itemIndex;
|
||||
legendEvent.chart.toggleLegend = true;
|
||||
if (undefined !== legendEvent.dataItem.hidden && legendEvent.dataItem.hidden) {
|
||||
legendEvent.dataItem.hidden = false;
|
||||
dataProvider.push(legendEvent.dataItem.storedObj);
|
||||
legendEvent.dataItem.storedObj = undefined;
|
||||
dataProvider.sort(function (lhs, rhs) {
|
||||
return lhs.dataIdx - rhs.dataIdx;
|
||||
});
|
||||
} else {
|
||||
legendEvent.dataItem.hidden = true;
|
||||
for (var i = 0; i < dataProvider.length; ++i) {
|
||||
if (dataProvider[i].dataIdx === legendEvent.dataItem.dataIdx) {
|
||||
itemIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
legendEvent.dataItem.storedObj = dataProvider[itemIndex];
|
||||
dataProvider.splice(itemIndex, 1);
|
||||
}
|
||||
legendEvent.chart.validateData();
|
||||
}
|
||||
if (!chart.legend || !chart.legend.enabled || !chart.legend.generateFromData) {
|
||||
return;
|
||||
}
|
||||
var categoryField = chart.categoryField;
|
||||
var colorField = chart.graphs[0].lineColorField || chart.graphs[0].fillColorsField || chart.graphs[0].colorField;
|
||||
var legendData = chart.dataProvider.map(function (data, idx) {
|
||||
var markerData = {
|
||||
"title": data[categoryField],
|
||||
"color": data[colorField],
|
||||
"dataIdx": idx
|
||||
};
|
||||
if (!markerData.color) {
|
||||
markerData.color = chart.graphs[0].lineColor;
|
||||
}
|
||||
data.dataIdx = idx;
|
||||
return markerData;
|
||||
});
|
||||
|
||||
chart.legend.data = legendData;
|
||||
chart.legend.switchable = true;
|
||||
chart.legend.addListener("clickMarker", handleCustomMarkerToggle);
|
||||
|
||||
}, ["serial"]);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
function LimpiaCeros() {
|
||||
|
||||
let Divisor = 1;
|
||||
|
||||
$('.ceros').each(function (i, obj) {
|
||||
|
||||
if ($(this).html() == '0.00' || $(this).html() == '0.00%') {
|
||||
$(this).html('-');
|
||||
}
|
||||
|
||||
if (!($(this).html() == '-' || $(this).html() == '' || ~$(this).html().indexOf("%"))) {
|
||||
if (Divisor > 1) {
|
||||
$(this).attr('data-toggle', 'tooltip');
|
||||
$(this).attr('data-container', 'body');
|
||||
$(this).attr('title', $(this).html());
|
||||
}
|
||||
$(this).html(FormatoNumeroIPP(ToDouble($(this).html()) / Divisor, ((Divisor == 1) ? 2 : 0)));
|
||||
}
|
||||
|
||||
if (ToDouble($(this).html()) < 0) {
|
||||
$(this).css("color", "red");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function FormatoNumeroIPP(Importe, Decimales) {
|
||||
if (typeof Decimales === 'undefined') { Decimales = 2; }
|
||||
|
||||
if (isNaN(parseInt(Importe))) return "NaN";
|
||||
|
||||
var tmpNum = Importe;
|
||||
|
||||
tmpNum = tmpNum.toFixed(Decimales).replace(/./g, function (c, i, a) {
|
||||
return i && c !== "." && !((a.length - i) % 3) ? ',' + c : c;
|
||||
});
|
||||
|
||||
return tmpNum;
|
||||
}
|
||||
|
||||
|
||||
function pageLoad(sender, e) {
|
||||
$(document).ready(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
}
|
||||
function graficahighchartsFinan(idcontainer, titulo, subtitulo, ytitulo, datos, xtitulo, labelpoint, media, datospie1, datospie2, idChkSeleccionado) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function graficahighchartsFinan(idcontainer, titulo, subtitulo, ytitulo, datos, Yinterval, labelpoint, media, datospie1, datospie2, Tittulo2) {
|
||||
|
||||
|
||||
$('#LblTituloGrafica').text(Tittulo2)
|
||||
$('#LblTituloGrafica').text(titulo)
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".chartcheckboxes").remove();
|
||||
});
|
||||
|
||||
var Monedas = '';
|
||||
if (datospie1.length > 0) {
|
||||
Monedas = 'Monedas';
|
||||
}
|
||||
var numerodatos = 0;
|
||||
$("<div class='chartcheckboxes' ><span></span></div>").insertAfter("#" + idcontainer);
|
||||
if (datos.length > 0) {
|
||||
var numerodatos = datos.length - 1;
|
||||
//var media = (datos.reduce(function (a, b) { return a + b; })) / (numerodatos + 1);
|
||||
for (var i = numerodatos; i >= 0; i--) {
|
||||
$("<input type='checkbox' id='" + idcontainer + i + "' class='overrydecheckbox' value='" + i + "' onchange=\" changedatagrafica2('" + idcontainer + "');\" /><label for='" + idcontainer + i + "'>" + datos[i][0].substring(0, 3) + "</label>").insertAfter("#" + idcontainer + " + div span");
|
||||
|
||||
|
||||
let datosSeries = [];
|
||||
let datosCategorias = [];
|
||||
|
||||
|
||||
if (idChkSeleccionado.trim().length > 0) {
|
||||
|
||||
var dataName = $(`#${idChkSeleccionado}`).data('name');
|
||||
var dataData = $(`#${idChkSeleccionado}`).data('data');
|
||||
datosCategorias = $(`#${idChkSeleccionado}`).data('categorias');
|
||||
|
||||
let serieDato = {
|
||||
name: dataName,
|
||||
data: dataData
|
||||
}
|
||||
datosSeries.push(serieDato);
|
||||
console.log("data-name:", dataName);
|
||||
console.log("data-data:", dataData);
|
||||
|
||||
|
||||
} else {
|
||||
$(document).ready(function () {
|
||||
$('.chksel').each(function () {
|
||||
if ($(this).prop('checked')) {
|
||||
|
||||
var dataName = $(this).data('name');
|
||||
var dataData = $(this).data('data');
|
||||
datosCategorias = $(this).data('categorias');
|
||||
|
||||
let serieDato = {
|
||||
name: dataName,
|
||||
data: dataData
|
||||
}
|
||||
datosSeries.push(serieDato);
|
||||
console.log("data-name:", dataName);
|
||||
console.log("data-data:", dataData);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
$("#" + idcontainer).data('serie', datos);
|
||||
|
||||
var margintop = 80;
|
||||
var dataset = [{
|
||||
type: 'area',
|
||||
lineColor: '#9ACAE6',
|
||||
color: '#F1F7FD',
|
||||
fillColor: '#F1F7FD',
|
||||
lineWidth: 3,
|
||||
marker: {
|
||||
lineWidth: 2,
|
||||
lineColor: '#9ACAE6',
|
||||
fillColor: '#9ACAE6'
|
||||
},
|
||||
pointInterval: 1,
|
||||
name: ' ',
|
||||
data: datos
|
||||
}, {
|
||||
type: 'line',
|
||||
lineWidth: 2,
|
||||
lineColor: '#999',
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
name: ' ',
|
||||
data: [media, media]
|
||||
}];
|
||||
|
||||
|
||||
console.log("serieDato:", datosSeries);
|
||||
console.log("datosCategorias:", datosCategorias);
|
||||
|
||||
|
||||
|
||||
Highcharts.chart(idcontainer, {
|
||||
|
||||
$('#' + idcontainer).highcharts({
|
||||
chart: {
|
||||
type: 'area', spacingTop: margintop
|
||||
type: 'line'
|
||||
},
|
||||
title: {
|
||||
text: titulo
|
||||
},
|
||||
subtitle: {
|
||||
text: subtitulo
|
||||
},
|
||||
xAxis: {
|
||||
type: "category"
|
||||
|
||||
title: {
|
||||
text: titulo,
|
||||
align: 'left'
|
||||
},
|
||||
|
||||
subtitle: {
|
||||
text: subtitulo,
|
||||
align: 'left'
|
||||
},
|
||||
|
||||
yAxis: {
|
||||
title: {
|
||||
text: ytitulo
|
||||
},
|
||||
labels: {
|
||||
formatter: function () {
|
||||
return this.value / Yinterval;
|
||||
}
|
||||
},
|
||||
|
||||
xAxis: {
|
||||
categories: datosCategorias,
|
||||
title: {
|
||||
text: xtitulo
|
||||
}
|
||||
},
|
||||
|
||||
legend: {
|
||||
layout: 'vertical',
|
||||
align: 'right',
|
||||
verticalAlign: 'middle'
|
||||
},
|
||||
|
||||
plotOptions: {
|
||||
series: {
|
||||
label: {
|
||||
connectorAllowed: false
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
shared: true,
|
||||
valueSuffix: labelpoint
|
||||
},
|
||||
plotOptions: {
|
||||
area: {
|
||||
color: '#FBC5C5',
|
||||
fillColor: '#FBC5C5',
|
||||
stacking: 'normal',
|
||||
lineColor: '#F89F9F',
|
||||
lineWidth: 0,
|
||||
marker: {
|
||||
radius: 5,
|
||||
lineWidth: 2,
|
||||
lineColor: '#FFF',
|
||||
fillColor: '#F89F9F'
|
||||
}
|
||||
},
|
||||
line: {
|
||||
pointInterval: numerodatos,
|
||||
lineColor: '#999999',
|
||||
marker: {
|
||||
enabled: false,
|
||||
symbol: 'circle',
|
||||
radius: 2,
|
||||
states: {
|
||||
hover: {
|
||||
enabled: true
|
||||
}
|
||||
|
||||
series: datosSeries ,
|
||||
|
||||
responsive: {
|
||||
rules: [{
|
||||
condition: {
|
||||
maxWidth: 500
|
||||
},
|
||||
chartOptions: {
|
||||
legend: {
|
||||
layout: 'horizontal',
|
||||
align: 'center',
|
||||
verticalAlign: 'bottom'
|
||||
}
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
series: dataset,
|
||||
navigation: {
|
||||
buttonOptions: {
|
||||
y: -80
|
||||
}
|
||||
credits: {
|
||||
enabled: false
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// $("#" + idcontainer).data('serie', datos);
|
||||
|
||||
// var margintop = 80;
|
||||
// var dataset = [{
|
||||
// type: 'area',
|
||||
// lineColor: '#9ACAE6',
|
||||
// color: '#F1F7FD',
|
||||
// fillColor: '#F1F7FD',
|
||||
// lineWidth: 3,
|
||||
// marker: {
|
||||
// lineWidth: 2,
|
||||
// lineColor: '#9ACAE6',
|
||||
// fillColor: '#9ACAE6'
|
||||
// },
|
||||
// pointInterval: 1,
|
||||
// name: ' ',
|
||||
// data: datos
|
||||
// }, {
|
||||
// type: 'line',
|
||||
// lineWidth: 2,
|
||||
// lineColor: '#999',
|
||||
// marker: {
|
||||
// enabled: false
|
||||
// },
|
||||
// name: ' ',
|
||||
// data: [media, media]
|
||||
// }];
|
||||
|
||||
// $('#' + idcontainer).highcharts({
|
||||
// chart: {
|
||||
// type: 'area', spacingTop: margintop
|
||||
// },
|
||||
// title: {
|
||||
// text: titulo
|
||||
// },
|
||||
// subtitle: {
|
||||
// text: subtitulo
|
||||
// },
|
||||
// xAxis: {
|
||||
// type: "category"
|
||||
|
||||
// },
|
||||
// yAxis: {
|
||||
// title: {
|
||||
// text: ytitulo
|
||||
// },
|
||||
// labels: {
|
||||
// formatter: function () {
|
||||
// return this.value / Yinterval;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// tooltip: {
|
||||
// shared: true,
|
||||
// valueSuffix: labelpoint
|
||||
// },
|
||||
// plotOptions: {
|
||||
// area: {
|
||||
// color: '#FBC5C5',
|
||||
// fillColor: '#FBC5C5',
|
||||
// stacking: 'normal',
|
||||
// lineColor: '#F89F9F',
|
||||
// lineWidth: 0,
|
||||
// marker: {
|
||||
// radius: 5,
|
||||
// lineWidth: 2,
|
||||
// lineColor: '#FFF',
|
||||
// fillColor: '#F89F9F'
|
||||
// }
|
||||
// },
|
||||
// line: {
|
||||
// pointInterval: numerodatos,
|
||||
// lineColor: '#999999',
|
||||
// marker: {
|
||||
// enabled: false,
|
||||
// symbol: 'circle',
|
||||
// radius: 2,
|
||||
// states: {
|
||||
// hover: {
|
||||
// enabled: true
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// series: dataset,
|
||||
// navigation: {
|
||||
// buttonOptions: {
|
||||
// y: -80
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -5,6 +5,7 @@ Imports System.Data
|
||||
Imports System.Drawing
|
||||
Imports System.IO
|
||||
Imports System.Windows.Forms
|
||||
Imports DocumentFormat.OpenXml.EMMA
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
@@ -452,13 +453,16 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
|
||||
Dim Titulo As String = e.Row.FCLabel("LblRatio").Text
|
||||
Dim SubTitulo As String = ""
|
||||
Dim YReferencia As String = "$"
|
||||
Dim YReferencia As String = "Valor"
|
||||
Dim Info As String = ""
|
||||
Dim XReferencia As String = ""
|
||||
Dim XReferencia As String = "Periodos"
|
||||
Dim Promedio As String = ""
|
||||
|
||||
Dim lista As New List(Of Object)
|
||||
Dim Lista2 As New List(Of String)
|
||||
'Dim lista As New List(Of Object)
|
||||
'Dim Lista2 As New List(Of String)
|
||||
Dim ListaDatos As New List(Of String)
|
||||
Dim ListaCategorias As New List(Of String)
|
||||
|
||||
For x = 2 To GVRatios.Columns.Count - 1
|
||||
|
||||
If GVRatios.Columns(x).Visible = True Then
|
||||
@@ -469,8 +473,8 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
Dim valor As String = e.Row.Cells(x).Text.ToString.Replace("%", "").Replace(" ", "").Replace(" ", "").Replace(",", "").Trim
|
||||
|
||||
If valor.Length > 0 Then
|
||||
lista.Add(New With {.Texto = headerString, .Valor = valor.ToDecimal, .Color = "#FF0F00"})
|
||||
Lista2.Add($"['{headerString}',{valor}]")
|
||||
ListaDatos.Add(valor.ToDecimal.ToString("###########0.00"))
|
||||
ListaCategorias.Add($"""{headerString}""")
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -481,11 +485,18 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
'e.Row.FCHyperLink("Hypgrafica").Attributes.Add("data-values", Newtonsoft.Json.JsonConvert.SerializeObject(lista))
|
||||
|
||||
If e.Row.DataKey("Tipo").ToEntero <> 1 Then
|
||||
Info = String.Join(",", Lista2)
|
||||
|
||||
e.Row.FCHyperLink("hpl2").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],1,'{5}','{6}',[{8}],[{7}],'{9}');", chartdiv2.ClientID, "", SubTitulo, YReferencia, Info, XReferencia, Promedio, "", "", Titulo))
|
||||
String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],'{5}','{5}','{6}',[{8}],[{7}],'{9}');", chartdiv2.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia, Promedio, "", "", e.Row.FCCheckBox("chkgraf").ClientID))
|
||||
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("class", "chksel")
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-name", e.Row.FCLabel("LblRatio").Text)
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-data", $"[{String.Join(",", ListaDatos)}]")
|
||||
e.Row.FCCheckBox("chkgraf").InputAttributes.Add("data-categorias", $"[{String.Join(",", ListaCategorias)}]")
|
||||
|
||||
Else
|
||||
e.Row.FCHyperLink("hpl2").Visible = False
|
||||
e.Row.FCCheckBox("chkgraf").Visible = False
|
||||
End If
|
||||
|
||||
|
||||
@@ -493,6 +504,11 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
|
||||
|
||||
End If
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
|
||||
e.Row.FCHyperLink("hpl2").Attributes.Add("onclick", "$('#DivModalGrafica').modal('show'); " &
|
||||
String.Format("graficahighchartsFinan('{0}','{1}','{2}','{3}',[{4}],'{5}','{5}','{6}',[{8}],[{7}],'{9}' );", chartdiv2.ClientID, "Selección multiple", "", "Valores", "", "Periodos", "", "", "", ""))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1877,7 +1877,7 @@
|
||||
|
||||
|
||||
//Muestra nombre de la empresa si esta tarea sea asigno desde EmpresaCRM
|
||||
if (event.CveEmpresaCRM > 0 || event.CveAcercamientoCRM > 0 || event.CvePersonal > 0 || event.CveCliente > 0 || event.CveProveedor > 0 ) {
|
||||
if (event.CveEmpresaCRM > 0 || event.CveAcercamientoCRM > 0 || event.CvePersonal > 0 || event.CveCliente > 0 || event.CveProveedor > 0 || event.CveCompra > 0) {
|
||||
|
||||
$("#<%=LnkTituloLink.ClientID%>").css("display", "");
|
||||
|
||||
@@ -1907,6 +1907,13 @@
|
||||
$("#<%=LnkTituloLink.ClientID%>").attr("href", "/Compras/Proveedores.aspx?CveProveedor=" + event.CveProveedor);
|
||||
}
|
||||
|
||||
if (event.CveCompra > 0) {
|
||||
$("#<%=LnkTituloLink.ClientID%>").text("Comppra: " + event.SerieFolioCompra);
|
||||
$("#<%=LnkTituloLink.ClientID%>").attr("href", "/Compras/Compras.aspx?CveCompra=" + event.CveCompra);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$("#<%=LnkTituloLink.ClientID%>").css("display", "none")
|
||||
|
||||
@@ -236,7 +236,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
{
|
||||
DateTime fechafin = TxtFechaBaja.Text.ToDateTime();
|
||||
decimal antiguedad = getyearsresult(fechafin, FechaInicio);
|
||||
TxtAntiguedad.Text = string.Format("{0}", antiguedad);
|
||||
TxtAntiguedad.Text = string.Format("{0:##0.00###}", antiguedad);
|
||||
TxtDiasTransAnio.Text = string.Format("{0}", fechafin.DayOfYear);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -827,7 +827,14 @@ Partial Class OC_OC
|
||||
|
||||
DdlSubProyecto.Items.Clear()
|
||||
' aqui tiene otras condiciones especiales
|
||||
DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"}) 'If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, CveEmpresaActual, -1, 1), GlobalDTSubProyectos(-1, -1, CveEmpresaActual, 1)) ' DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
|
||||
If CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then
|
||||
DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
|
||||
Else
|
||||
DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros(" SPEstatus = 1 ", "", {"CveSubProyecto", "SubProyecto"})
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyectoContrato.Items.Clear()
|
||||
@@ -1597,7 +1604,7 @@ Partial Class OC_OC
|
||||
|
||||
|
||||
lblPendientes.Text = objOC.Pendiente.ToString
|
||||
If objOC.Pendiente > 0 Then
|
||||
If objOC.Pendiente > 0 AndAlso TipoOC = "OC" Then
|
||||
|
||||
If objOC.Pendiente > 1 Then
|
||||
lblPendientes.Text = objOC.Pendiente.ToString("0.###") & " Articulos Pendientes de vincular."
|
||||
@@ -1959,7 +1966,14 @@ Partial Class OC_OC
|
||||
Dim Filtro As String = If(DdlProyecto.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.Empresa.Tipo_CentroCosto.Contiene(4, 5), String.Format("CveProyecto = {0}", DdlProyecto.SelectedValue.ToEntero), "")
|
||||
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros(Filtro, "", {"CveSubProyecto", "SubProyecto"}) 'If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, CveEmpresaActual, -1, 1), GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, -1, CveEmpresaActual, 1)) 'DtEstatusUsuarios.FiltraParametros(Filtro, "", {"CveSubProyecto", "SubProyecto"}) ' GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
|
||||
|
||||
If CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then
|
||||
DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros(Filtro, "", {"CveSubProyecto", "SubProyecto"})
|
||||
Else
|
||||
DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros(" SPEstatus = 1 ").FiltraParametros(Filtro, "", {"CveSubProyecto", "SubProyecto"})
|
||||
'DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros(" SPEstatus = 1 ", "", {"CveSubProyecto", "SubProyecto"})
|
||||
End If
|
||||
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
@@ -2543,6 +2557,12 @@ Partial Class OC_OC
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If TipoOC.ToUpper = "REQ" AndAlso CveEstatusFinalOK = CboE.SelectedValue.ToEntero AndAlso DdlProveedores.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe seleccionar un proveedor.", TipoMensaje.MsgAdvertencia)
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
'VALIDA QUE TENGA LAS COTIZACIONES QUE DEBEN TENER
|
||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" AndAlso (TipoOC.ToUpper = "REQ" And CveEstatusFinalOK = CboE.SelectedValue.ToEntero) Then
|
||||
If CveConfianzaProveedor > 0 Then
|
||||
|
||||
@@ -334,6 +334,10 @@ Partial Class OI_PopUpAgenda
|
||||
CargaContarto(Request("CveContrato").ToEntero)
|
||||
End If
|
||||
|
||||
If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
||||
CargaCompra(CveCompra:=Request("CveCompra").ToEntero)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Request("CveEvento") IsNot Nothing AndAlso IsNumeric(Request("CveEvento")) AndAlso Request("CveEvento").ToEntero > 0 Then
|
||||
@@ -355,6 +359,9 @@ Partial Class OI_PopUpAgenda
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub Tarea() '1
|
||||
CveTipoEvento = 1
|
||||
|
||||
@@ -684,6 +691,12 @@ Partial Class OI_PopUpAgenda
|
||||
CveUsuario = Request("CveUsuario").ToEntero
|
||||
End If
|
||||
|
||||
|
||||
Dim CveCompra As Integer = -1
|
||||
If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
||||
CveCompra = Request("CveCompra").ToEntero
|
||||
End If
|
||||
|
||||
'------------------------------------------
|
||||
'Recorrro Grid para obtener el usuario PARA
|
||||
For Each RowPara As GridViewRow In GVUsuarios.Rows
|
||||
@@ -710,7 +723,7 @@ Partial Class OI_PopUpAgenda
|
||||
Alert("La Nueva Tarea se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ElseIf CveTipoEvento = 2 Then
|
||||
If ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaInicio.ToDateTime, FechaFin.ToDateTime, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor) Then
|
||||
If ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaInicio.ToDateTime, FechaFin.ToDateTime, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveCompra:=CveCompra) Then
|
||||
Alert("La Nueva Agenda se guardó correctamente.", TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
||||
End If
|
||||
ElseIf CveTipoEvento = 3 Then
|
||||
@@ -1260,13 +1273,13 @@ Partial Class OI_PopUpAgenda
|
||||
End Sub
|
||||
Private Sub CargaProveedor(CveProveedor As Integer)
|
||||
|
||||
'Dim ObjClaves As New ClsCompProveedores
|
||||
' hacerlo con el global dt
|
||||
'If ObjClaves.GetProveedores(CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
|
||||
' If ObjClaves.DtResultados.Rows.Count > 0 Then
|
||||
' LtlAgenda.Text = ObjClaves.CveProveedor & " - " & ObjClaves.NombreComercial
|
||||
' End If
|
||||
'End If
|
||||
Dim ObjClaves As New ClsCompProveedores
|
||||
|
||||
If ObjClaves.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjClaves.DtResultados.Rows.Count > 0 Then
|
||||
LtlAgenda.Text = ObjClaves.CveProveedor & " - " & ObjClaves.NombreComercial
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaUsuario(CveUsuario As Integer)
|
||||
@@ -1290,6 +1303,16 @@ Partial Class OI_PopUpAgenda
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCompra(CveCompra As Integer)
|
||||
Dim objCompra As New ClsCompras
|
||||
|
||||
If objCompra.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = objCompra.DtResultados.Rows(0)
|
||||
LtlAgenda.Text = $" Compra: {dr("SerieFolio").ToString}"
|
||||
End If
|
||||
objCompra.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -2534,7 +2534,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList Width="100%" ID="DdlTipoAsistencias" runat="server" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" CssClass="table-group-action-input form-control input-inline input-small input-sm" Style="min-width: 70px" ValidationGroup="GrpGuardarAsistencia"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoAsistencias_SelectedIndexChanged">
|
||||
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoAsistencias_SelectedIndexChangedP">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
|
||||
@@ -714,6 +714,33 @@ Partial Class RH_Personal
|
||||
#End Region
|
||||
|
||||
|
||||
Public Property GlobalDTSubProyectosUsuariosB(CveUsuario As Integer, CveProyecto As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTSubProyectosUsuarios-{CveEmpresa}"
|
||||
HttpContext.Current.Application(AppNombre) = Nothing
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing OrElse DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0 Then
|
||||
Dim ObjSubProyectos As New ClsSubProyectos()
|
||||
If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjSubProyectos.DtResultados
|
||||
ObjSubProyectos.Dispose()
|
||||
End If
|
||||
Dim filtros As New List(Of String)
|
||||
If CveProyecto <> -1 Then filtros.Add($"CveProyecto = {CveProyecto}")
|
||||
If CveSubProyecto <> -1 Then filtros.Add($"CveSubProyecto = {CveSubProyecto}")
|
||||
If CveUsuario <> -1 Then filtros.Add($"CveUsuario = {CveUsuario}")
|
||||
If CveEstatus <> -1 Then filtros.Add($"CveEstatus = {CveEstatus}")
|
||||
If filtros.Count > 0 Then
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTSubProyectosUsuariosB = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTSubProyectosUsuariosB = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTSubProyectosUsuarios-{CveEmpresa}"
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Private Shared Function sendURL(ByVal URL As String, Optional Methodo As String = "POST", Optional Cookie As String = "", Optional maxTimeMilliseconds As Integer = 120000) As String
|
||||
Dim resultado As String = ""
|
||||
|
||||
@@ -856,6 +883,7 @@ Partial Class RH_Personal
|
||||
'Configuración
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
Dim dt = GlobalDTSubProyectosUsuariosB(1360, -1, 172, -1, -1)
|
||||
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
|
||||
pnlSalarioIMSS.Visible = False
|
||||
End If
|
||||
@@ -6735,6 +6763,12 @@ Partial Class RH_Personal
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub DdlTipoAsistencias_SelectedIndexChangedP(sender As Object, e As EventArgs)
|
||||
Dim ddl As DropDownList = DirectCast(sender, DropDownList)
|
||||
If ddl.SelectedItem.Text = "Retardo" Then
|
||||
TxtPorPago.Text = "87.5"
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub DdlTipoAsistencias_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim ddl As DropDownList = DirectCast(sender, DropDownList)
|
||||
Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Empresa2.aspx.vb" Inherits="Sistemas_Empresa2" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="DefinicionEmpresa.aspx.vb" Inherits="Sistemas_DefinicionEmpresa" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
@@ -9,7 +9,7 @@ Imports Microsoft.Reporting.WebForms
|
||||
Imports Microsoft.Owin.Security.Provider
|
||||
Imports log4net.Util
|
||||
|
||||
Partial Class Sistemas_Empresa2
|
||||
Partial Class Sistemas_DefinicionEmpresa
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
@@ -502,8 +502,8 @@ Partial Class Sistemas_Empresa2
|
||||
TxtPlantillaVenta.Text = .PlantillaMailVenta
|
||||
TxtAsunto.Text = .AsuntoPlantillaMailVenta
|
||||
|
||||
TxtPlantillaCotizacion.Text = .AsuntoPlantillaMailVentaCotizacion
|
||||
TxtAsuntoCotizacion.Text = .PlantillaMailVentaCotizacion
|
||||
TxtPlantillaCotizacion.Text = .PlantillaMailVentaCotizacion
|
||||
TxtAsuntoCotizacion.Text = .AsuntoPlantillaMailVentaCotizacion
|
||||
|
||||
'NUEVOS
|
||||
TxtAreaGeografica.Text = .AreaGeografica
|
||||
@@ -914,7 +914,7 @@ Partial Class Sistemas_Empresa2
|
||||
If TextoError = "" Then
|
||||
ObjEmpresas.Commit()
|
||||
If ObjContPAQ IsNot Nothing Then ObjContPAQ.Commit()
|
||||
Alert(TextoOK, TipoMensaje.MsgInformacion, "document.location.href=""/Sistemas/Empresa2.aspx"";")
|
||||
Alert(TextoOK, TipoMensaje.MsgInformacion, "document.location.href=""/Sistemas/DefinicionEmpresa.aspx"";")
|
||||
Session("FileUpload") = ""
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
@@ -4853,11 +4853,17 @@
|
||||
<i class="fa fa-commenting font-green"></i>
|
||||
<span class="caption-subject bold">Agregar</span>
|
||||
</div>--%>
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' ></i>Agendar" Visible="false" Style="font-weight: 700 !important; cursor: pointer;" ToolTip="Agendar"></asp:HyperLink><br />
|
||||
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold font-green" data-toggle="modal" data-target="#ModalBitacora" runat="server"
|
||||
Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer " ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold font-green" runat="server"
|
||||
Text="" Visible="false" Style="font-weight: 700 !important; cursor: pointer" ToolTip="Agendar" ><i class='fa fa-calendar-plus-o font-green' ></i>Agendar</asp:HyperLink><br />
|
||||
|
||||
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
|
||||
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
|
||||
<script> function OnAddedTareaNueva() { $('.btnupEventoBitacora').click(); }</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2928,6 +2928,7 @@ Partial Class Ventas
|
||||
ChkEnviarFactura.Checked = False
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
'Modalidad Contrato
|
||||
@@ -3180,6 +3181,8 @@ Partial Class Ventas
|
||||
ChkEnviarFactura.Checked = False
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
|
||||
If CveVenta > 0 AndAlso EnviarCorreoCliente Then ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||
Else
|
||||
ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||
ChkEnviarFactura.Visible = True
|
||||
@@ -10275,7 +10278,7 @@ Partial Class Ventas
|
||||
Try
|
||||
'MANDA CORREO
|
||||
Dim strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
Dim Factura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
|
||||
Dim Factura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False, VerificaAlmacen:=False)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
@@ -16524,7 +16527,7 @@ Partial Class Ventas
|
||||
Try
|
||||
'MANDA CORREO
|
||||
Dim strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
Dim Factura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
|
||||
Dim Factura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False, VerificaAlmacen:=False)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
@@ -17289,6 +17292,7 @@ Partial Class Ventas
|
||||
ChkEnviarFactura.Visible = True
|
||||
LblEnviarMail.Visible = True
|
||||
|
||||
If CveVenta > 0 AndAlso EnviarCorreoCliente Then ChkEnviarFactura.Checked = EnviarCorreoCliente
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "PA", "Pd2") AndAlso (ReceptorRFC = "XAXX010101000" Or LblRFC.Text = "XAXX010101000") Then
|
||||
|
||||
Reference in New Issue
Block a user