Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -7,6 +7,7 @@ Public Class CalendarEvent
|
|||||||
Public Property description As String
|
Public Property description As String
|
||||||
Public Property start As String
|
Public Property start As String
|
||||||
Public Property [end] As String
|
Public Property [end] As String
|
||||||
|
Public Property FechaFinal As String
|
||||||
Public Property allDay As Boolean
|
Public Property allDay As Boolean
|
||||||
Public Property CveEventoEstatus As Integer
|
Public Property CveEventoEstatus As Integer
|
||||||
Public Property cveagendatipo As String
|
Public Property cveagendatipo As String
|
||||||
|
|||||||
@@ -4469,6 +4469,25 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
Public Function UpdateOSEstatusInventario(CveOS As Integer, Estatus As Boolean, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_OS_OSEstatusInventarioUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar el estatus de OS.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " INVENTARIOS - SOLICITUD DE TRASPASOS "
|
#Region " INVENTARIOS - SOLICITUD DE TRASPASOS "
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ Public Class ClsOIEventos
|
|||||||
End Property
|
End Property
|
||||||
#Region "Propiedades de la tabla OI_Eventos"
|
#Region "Propiedades de la tabla OI_Eventos"
|
||||||
Public Property CveEvento As Integer
|
Public Property CveEvento As Integer
|
||||||
|
Public Property CveIndicador As Integer
|
||||||
Public Property CveTipoEvento As Integer
|
Public Property CveTipoEvento As Integer
|
||||||
Public Property Folio As Integer
|
Public Property Folio As Integer
|
||||||
Public Property TipoEvento As String
|
Public Property TipoEvento As String
|
||||||
@@ -965,7 +966,7 @@ Public Class ClsOIEventos
|
|||||||
Optional CveOS As Integer = -1, Optional CveOC As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveProveedor As Integer = -1,
|
Optional CveOS As Integer = -1, Optional CveOC As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveProveedor As Integer = -1,
|
||||||
Optional CveCompra As Integer = -1, Optional CveVenta As Integer = -1, Optional CveContrato As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
Optional CveCompra As Integer = -1, Optional CveVenta As Integer = -1, Optional CveContrato As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||||
Optional CveMovimientoAlmacen As Integer = -1, Optional CorreoExterno As String = "", Optional CveTableroLista As Integer = -1, Optional Lugar As String = "",
|
Optional CveMovimientoAlmacen As Integer = -1, Optional CorreoExterno As String = "", Optional CveTableroLista As Integer = -1, Optional Lugar As String = "",
|
||||||
Optional Asistencia As String = "", Optional Duracion As String = "", Optional CveAcercamiento As Integer = -1) As Boolean
|
Optional Asistencia As String = "", Optional Duracion As String = "", Optional CveAcercamiento As Integer = -1, Optional CveIndicador As Integer = -1) As Boolean
|
||||||
Dim retorno As Boolean = False
|
Dim retorno As Boolean = False
|
||||||
|
|
||||||
Dim xmlMiembros As System.Xml.Linq.XDocument = Nothing
|
Dim xmlMiembros As System.Xml.Linq.XDocument = Nothing
|
||||||
@@ -1028,6 +1029,7 @@ Public Class ClsOIEventos
|
|||||||
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
||||||
.Add("@CveTableroLista", SqlDbType.VarChar).Value = CveTableroLista
|
.Add("@CveTableroLista", SqlDbType.VarChar).Value = CveTableroLista
|
||||||
.Add("@CveAcercamiento", SqlDbType.VarChar).Value = CveAcercamiento
|
.Add("@CveAcercamiento", SqlDbType.VarChar).Value = CveAcercamiento
|
||||||
|
.Add("@CveIndicador", SqlDbType.VarChar).Value = CveIndicador
|
||||||
|
|
||||||
|
|
||||||
'.Add("@mailPara", SqlDbType.VarChar).Direction = ParameterDirection.Output
|
'.Add("@mailPara", SqlDbType.VarChar).Direction = ParameterDirection.Output
|
||||||
@@ -3216,8 +3218,66 @@ Public Class ClsOIEventos
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Region "I N D I C A D O R E S "
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Public Function AddIndicador(Indicador As Integer, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
CveIndicador = -1
|
||||||
|
|
||||||
|
DataAdapter("PA_Dir_IndicadorAdd")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Indicador", SqlDbType.Int).Value = Indicador
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveIndicador", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
CveIndicador = SqlAdapter.SelectCommand.Parameters("@CveIndicador").Value.ToString().ToEntero()
|
||||||
|
If CveIndicador > 0 Then
|
||||||
|
Retorno = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al agregar el indicador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateIndicador(CveIndicador As Integer, Valor As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Dir_IndicadorUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveIndicador", SqlDbType.Int).Value = CveIndicador
|
||||||
|
.Add("@Valor", SqlDbType.Int).Value = Valor
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar el indicador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
' IDisposable
|
' IDisposable
|
||||||
|
|||||||
@@ -458,12 +458,12 @@ Public Class ClsOS
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "ClsOSOrdenesServicios"
|
#Region "ClsOSOrdenesServicios"
|
||||||
'Reporte de Ventas
|
'Reporte de Ventas
|
||||||
Public Function GetRepOrdenesServicio(FechaI As Date, FechaF As Date, FechaTerminado As String, CveCliente As Integer, CveSubProyecto As Integer, CveUsuarioRecibio As Integer, CveTecnico As Integer,
|
Public Function GetRepOrdenesServicio(FechaI As Date, FechaF As Date, FechaTerminado As String, CveCliente As Integer, CveSubProyecto As Integer, CveUsuarioRecibio As Integer, CveTecnico As Integer,
|
||||||
CveEstatusOrdenServicio As Integer, CveEmpresa As Integer, Optional Opcion As Integer = -1, Optional CveUsuarioAsignado As Integer = -1) As Boolean
|
CveEstatusOrdenServicio As Integer, CveEmpresa As Integer, Optional Opcion As Integer = -1, Optional CveUsuarioAsignado As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -492,6 +492,26 @@ Public Class ClsOS
|
|||||||
OnError("Ocurrió un error al obtener el Reporte de Ordenes de Servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al obtener el Reporte de Ordenes de Servicio.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetRepOSEstatus(CveOS As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_OS_OSEstatusRepGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el Reporte de estatus de OS.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -10463,6 +10463,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/OS/Asignaciones.aspx".ToUpper(), 125)
|
PaginaDict.Add("/OS/Asignaciones.aspx".ToUpper(), 125)
|
||||||
PaginaDict.Add("/OS/RepServicioDomicilio.aspx".ToUpper(), 1330)
|
PaginaDict.Add("/OS/RepServicioDomicilio.aspx".ToUpper(), 1330)
|
||||||
PaginaDict.Add("/OS/RepOSMedicas.aspx".ToUpper(), 1345)
|
PaginaDict.Add("/OS/RepOSMedicas.aspx".ToUpper(), 1345)
|
||||||
|
PaginaDict.Add("/OS/RepOSEstatus.aspx".ToUpper(), 1349)
|
||||||
#End Region
|
#End Region
|
||||||
#Region "OC"
|
#Region "OC"
|
||||||
PaginaDict.Add("/OC/OC.aspx".ToUpper(), 155)
|
PaginaDict.Add("/OC/OC.aspx".ToUpper(), 155)
|
||||||
@@ -10517,6 +10518,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/OI/CatDocumentoSubCategoria.aspx".ToUpper(), -1)
|
PaginaDict.Add("/OI/CatDocumentoSubCategoria.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/OI/Documentos.aspx".ToUpper(), -1)
|
PaginaDict.Add("/OI/Documentos.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/OI/DocumentoDetalle.aspx".ToUpper(), -1)
|
PaginaDict.Add("/OI/DocumentoDetalle.aspx".ToUpper(), -1)
|
||||||
|
PaginaDict.Add("/OI/RepIndicadoresEMD.aspx".ToUpper(), 1348)
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Planeacion"
|
#Region "Planeacion"
|
||||||
PaginaDict.Add("/Planeacion/CatSucursales.aspx".ToUpper(), 17)
|
PaginaDict.Add("/Planeacion/CatSucursales.aspx".ToUpper(), 17)
|
||||||
|
|||||||
@@ -461,6 +461,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
|||||||
cevent.title = dr("DescripcionContrato").ToString
|
cevent.title = dr("DescripcionContrato").ToString
|
||||||
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
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.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.allDay = False
|
||||||
cevent.NombreAcercamiento = dr("Ubicacion").ToString
|
cevent.NombreAcercamiento = dr("Ubicacion").ToString
|
||||||
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
|
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
|
||||||
|
|||||||
@@ -1021,7 +1021,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Registra movimieno bancario
|
'Registra movimieno bancario
|
||||||
If gvr.DataKey("CveConceptoContable") = "30" AndAlso Importe <> 0 Then
|
If gvr.DataKey("CveConceptoContable") = "30" AndAlso (Importe <> 0 OrElse DdlPlantilla.SelectedValue = "53") Then
|
||||||
Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString
|
Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString
|
||||||
If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
|
If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
|
||||||
|
|
||||||
|
|||||||
@@ -246,6 +246,29 @@
|
|||||||
<asp:LinkButton ID="LnkAddTtemaB" OnClick="LnkAddTtemaB_Click" runat="server" CssClass="btn btn-default" Style="margin-top: 15px;"><i class="fa fa-plus"></i></asp:LinkButton>
|
<asp:LinkButton ID="LnkAddTtemaB" OnClick="LnkAddTtemaB_Click" runat="server" CssClass="btn btn-default" Style="margin-top: 15px;"><i class="fa fa-plus"></i></asp:LinkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row" runat="server" id="DvIndicador" visible ="false">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group form-md-line-input">
|
||||||
|
<asp:DropDownList ID="DdlIndicador" runat="server" CssClass="form-control select2me input-sm" Width="100%">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="1" class="itembaja">Programación de bolsa aprobada en tiempo</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:Label runat="server" AssociatedControlID="DdlPrioridad">Indicador:</asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group form-md-line-input">
|
||||||
|
|
||||||
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control select2me input-sm" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%" AppendDataBoundItems="true">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:Label runat="server" ID="LblSubProyecto" AssociatedControlID="DdlSubProyecto">:</asp:Label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
<asp:TextBox ID="txtCveEvento" CssClass="hidden txtCveEvento" runat="server"></asp:TextBox>
|
<asp:TextBox ID="txtCveEvento" CssClass="hidden txtCveEvento" runat="server"></asp:TextBox>
|
||||||
|
|||||||
@@ -48,7 +48,22 @@ public partial class OI_Proyecto : ClsPaginas
|
|||||||
DdlTema.DataBind();
|
DdlTema.DataBind();
|
||||||
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
|
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto, "");
|
||||||
|
|
||||||
|
if (DdlSubProyecto.Items.Count > 0)
|
||||||
|
{
|
||||||
|
DdlSubProyecto.Items.RemoveAt(0);
|
||||||
|
DdlSubProyecto.Items.Insert(0, new ListItem("Seleccione","-1"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (UsuarioActual.CveEmpresa == 13 )
|
||||||
|
{
|
||||||
|
DvIndicador.Visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -184,6 +199,7 @@ public partial class OI_Proyecto : ClsPaginas
|
|||||||
bool Continuar = false;
|
bool Continuar = false;
|
||||||
int Folio = -1;
|
int Folio = -1;
|
||||||
int CveEvento = -1;
|
int CveEvento = -1;
|
||||||
|
int CveIndicador = -1;
|
||||||
|
|
||||||
if (cveUsuarioDe <= 0)
|
if (cveUsuarioDe <= 0)
|
||||||
{
|
{
|
||||||
@@ -193,24 +209,59 @@ public partial class OI_Proyecto : ClsPaginas
|
|||||||
if (cveUsuarioPara <= 0)
|
if (cveUsuarioPara <= 0)
|
||||||
{
|
{
|
||||||
errorMessage = "No se selecciono el miembro 'Para'";
|
errorMessage = "No se selecciono el miembro 'Para'";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(DdlIndicador.SelectedValue.ToEntero() > 0 && DdlSubProyecto.SelectedValue.ToEntero() <0)
|
||||||
|
{
|
||||||
|
errorMessage = "Si agrega un indicador debe de agregar el sub proyecto.";
|
||||||
|
}
|
||||||
|
|
||||||
if (errorMessage.Length == 0)
|
if (errorMessage.Length == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
List<string> chkList = new List<string>();
|
List<string> chkList = new List<string>();
|
||||||
|
|
||||||
using (ClsOIEventos objOI = new ClsOIEventos())
|
using (ClsOIEventos objOI = new ClsOIEventos())
|
||||||
{
|
{
|
||||||
objOI.IniciaTransacSQL();
|
objOI.IniciaTransacSQL();
|
||||||
Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, RCveEventoB);
|
|
||||||
|
|
||||||
|
if (DdlIndicador.SelectedValue.ToEntero() > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (objOI.AddIndicador(DdlIndicador.SelectedValue.ToEntero(), DdlSubProyecto.SelectedValue.ToEntero(), UsuarioActual.CveUsuario,UsuarioActual.CveEmpresa) && objOI.CveIndicador > 0)
|
||||||
|
{
|
||||||
|
CveIndicador = objOI.CveIndicador;
|
||||||
|
Continuar = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Continuar = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Continuar = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (Continuar)
|
||||||
|
{
|
||||||
|
Continuar = objOI.AddOI_Eventos2(cveTipoEvento, asunto, descripcion, prioridad, cveUsuarioDe, cveUsuarioPara, fechaInicio, fechaFin, cveRevision, archivoname, listaCCP, chkList, cveUsuarioIng, cveEmpresa, RCveEventoB, CveIndicador: CveIndicador);
|
||||||
|
}
|
||||||
|
|
||||||
CveEvento = objOI.CveEvento;
|
CveEvento = objOI.CveEvento;
|
||||||
Folio = objOI.Folio;
|
Folio = objOI.Folio;
|
||||||
if (CveEvento == 0)
|
|
||||||
|
if (CveEvento > 0)
|
||||||
|
{
|
||||||
|
Continuar = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Continuar = false;
|
Continuar = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Continuar)
|
if (Continuar)
|
||||||
{
|
{
|
||||||
objOI.Commit();
|
objOI.Commit();
|
||||||
@@ -249,13 +300,17 @@ public partial class OI_Proyecto : ClsPaginas
|
|||||||
txtFechaI.Text = "";
|
txtFechaI.Text = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Alert(errorMessage,ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void BtnopenmodalClickGant_Click(object sender, EventArgs e)
|
protected void BtnopenmodalClickGant_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
SetUsuarios();
|
||||||
RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto));
|
RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto));
|
||||||
RCveEventoB = txtCveEvento.Text.ToEntero();
|
RCveEventoB = txtCveEvento.Text.ToEntero();
|
||||||
}
|
}
|
||||||
|
|||||||
169
OI/RepIndicadoresEMD.aspx
Normal file
169
OI/RepIndicadoresEMD.aspx
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
<%@ Page Title="Reporte de Indicadores" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIndicadoresEMD.aspx.vb" Inherits="OI_RepIndicadoresEMD" %>
|
||||||
|
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||||
|
<%@ Register Src="~/UserControl/AddMedico.ascx" TagPrefix="UserControl" TagName="AddMedico" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
Reporte de Indicadores
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Reporte de Indicadores
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpAcciones" UpdateMode="Always">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional" >
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||||
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption">
|
||||||
|
<div class="row" style="height: 32px;">
|
||||||
|
|
||||||
|
<label class="col-md-1 truncate">Ejercicio:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlEjercicio" CssClass="form-control input-sm select2me" runat="server">
|
||||||
|
<asp:ListItem Text="2015" Value="2015"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2016" Value="2016"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2017" Value="2017"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2018" Value="2018"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2019" Value="2019"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2020" Value="2020"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2021" Value="2021"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2022" Value="2022"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2023" Value="2023"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2024" Value="2024" Selected="True"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1 truncate">Periodo:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlPeriodo" CssClass="form-control input-sm select2me" runat="server">
|
||||||
|
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Mayo" Value="5" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<asp:Label runat="server" ID="LblSubProyecto" class="col-md-1 truncate">:</asp:Label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control select2me input-sm" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%" AppendDataBoundItems="true">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body" style="display: none">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||||
|
<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">
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames=""
|
||||||
|
data-sort="true"
|
||||||
|
EmptyDataText="No se encontraron Datos" ToolTip="" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
|
||||||
|
<asp:BoundField HeaderText="Número" DataField="Numero" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField HeaderText="Indicador" DataField="Indicador" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
|
||||||
|
<asp:BoundField HeaderText="ACARREO SAN JOSE A QUILA" DataField="ACARREO SAN JOSE A QUILA" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField HeaderText="PIPER MERIDIAN M500" DataField="PIPER MERIDIAN M500" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField HeaderText="PRESA JALES PEÑA COLORADA" DataField="PRESA JALES PEÑA COLORADA" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField HeaderText="MINA LA CRUZ" DataField="MINA LA CRUZ" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField HeaderText="TOGUI -UBER" DataField="TOGUI -UBER" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField HeaderText="SAN IGNACIO" DataField="SAN IGNACIO" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
|
||||||
|
<asp:BoundField HeaderText="Porcentaje" DataField="Porcentaje" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
|
||||||
|
<asp:BoundField HeaderText="Comentarios" DataField="Comentarios" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function validaPorcentaje(textbox) {
|
||||||
|
|
||||||
|
var valor = parseFloat(textbox.value.replace(/,/g, ''));
|
||||||
|
|
||||||
|
if (valor > 100) {
|
||||||
|
|
||||||
|
textbox.value = '100';
|
||||||
|
} else if ( isNaN(valor) || valor == 0) {
|
||||||
|
|
||||||
|
textbox.value = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
260
OI/RepIndicadoresEMD.aspx.vb
Normal file
260
OI/RepIndicadoresEMD.aspx.vb
Normal file
@@ -0,0 +1,260 @@
|
|||||||
|
Option Explicit On
|
||||||
|
Option Strict On
|
||||||
|
|
||||||
|
Imports System.Data
|
||||||
|
Imports CrystalDecisions.Shared.Json
|
||||||
|
Imports DocumentFormat.OpenXml.Vml.Office
|
||||||
|
Imports Extensiones
|
||||||
|
|
||||||
|
|
||||||
|
Partial Class OI_RepIndicadoresEMD
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Property DTDatos As DataTable
|
||||||
|
Get
|
||||||
|
If ViewState("DTDatos") Is Nothing Then
|
||||||
|
ViewState("DTDatos") = New DataTable
|
||||||
|
End If
|
||||||
|
Return DirectCast(ViewState("DTDatos"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DTDatos") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
|
||||||
|
If Not Page.IsPostBack Then
|
||||||
|
|
||||||
|
Dim FechaInicial As Date = New Date(10)
|
||||||
|
CargaCombos()
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaCombos()
|
||||||
|
|
||||||
|
|
||||||
|
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto, AplicaTodos:="Todos")
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Function CrearTablaDatos() As DataTable
|
||||||
|
Dim DTDatos As New DataTable
|
||||||
|
|
||||||
|
DTDatos.Columns.Add("Numero", GetType(Integer))
|
||||||
|
DTDatos.Columns.Add("Indicador", GetType(String))
|
||||||
|
DTDatos.Columns.Add("Comentarios", GetType(String))
|
||||||
|
DTDatos.Columns.Add("ACARREO SAN JOSE A QUILA", GetType(String))
|
||||||
|
DTDatos.Columns.Add("PIPER MERIDIAN M500", GetType(String))
|
||||||
|
DTDatos.Columns.Add("PRESA JALES PEÑA COLORADA", GetType(String))
|
||||||
|
DTDatos.Columns.Add("MINA LA CRUZ", GetType(String))
|
||||||
|
DTDatos.Columns.Add("TOGUI -UBER", GetType(String))
|
||||||
|
DTDatos.Columns.Add("SAN IGNACIO", GetType(String))
|
||||||
|
DTDatos.Columns.Add("Porcentaje", GetType(String))
|
||||||
|
'DTDatos.Columns.Add("", GetType(String))
|
||||||
|
DTDatos.AcceptChanges()
|
||||||
|
|
||||||
|
Dim nRow1 As DataRow = DTDatos.NewRow
|
||||||
|
Dim nRow2 As DataRow = DTDatos.NewRow
|
||||||
|
Dim nRow3 As DataRow = DTDatos.NewRow
|
||||||
|
Dim nRow4 As DataRow = DTDatos.NewRow
|
||||||
|
Dim nRow5 As DataRow = DTDatos.NewRow
|
||||||
|
Dim nRow6 As DataRow = DTDatos.NewRow
|
||||||
|
Dim nRow7 As DataRow = DTDatos.NewRow
|
||||||
|
Dim nRow8 As DataRow = DTDatos.NewRow
|
||||||
|
Dim nRow9 As DataRow = DTDatos.NewRow
|
||||||
|
Dim nRow10 As DataRow = DTDatos.NewRow
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'ACARREO SAN JOSE A QUILA
|
||||||
|
'PIPER MERIDIAN M500
|
||||||
|
'PRESA JALES PEÑA COLORADA
|
||||||
|
'MINA LA CRUZ
|
||||||
|
'TOGUI -UBER
|
||||||
|
'SAN IGNACIO
|
||||||
|
|
||||||
|
nRow1("Numero") = "1"
|
||||||
|
nRow1("Indicador") = "Programación de bolsa aprobada en tiempo"
|
||||||
|
nRow1("Comentarios") = "Si programaron en tiempo según la tarea"
|
||||||
|
nRow1("ACARREO SAN JOSE A QUILA") = "1"
|
||||||
|
nRow1("PIPER MERIDIAN M500") = "1"
|
||||||
|
nRow1("PRESA JALES PEÑA COLORADA") = "1"
|
||||||
|
nRow1("MINA LA CRUZ") = "0"
|
||||||
|
nRow1("TOGUI -UBER") = "1"
|
||||||
|
nRow1("SAN IGNACIO") = "1"
|
||||||
|
nRow1("Porcentaje") = "67%"
|
||||||
|
|
||||||
|
nRow2("Numero") = "2"
|
||||||
|
nRow2("Indicador") = "Solicitudes fuera de presupuesto"
|
||||||
|
nRow2("Comentarios") = "Hacer cambios a presupuestos"
|
||||||
|
nRow2("ACARREO SAN JOSE A QUILA") = "1"
|
||||||
|
nRow2("PIPER MERIDIAN M500") = "0"
|
||||||
|
nRow2("PRESA JALES PEÑA COLORADA") = "0"
|
||||||
|
nRow2("MINA LA CRUZ") = "0"
|
||||||
|
nRow2("TOGUI -UBER") = "1"
|
||||||
|
nRow2("SAN IGNACIO") = "1"
|
||||||
|
nRow2("Porcentaje") = "67%"
|
||||||
|
|
||||||
|
nRow3("Numero") = "3"
|
||||||
|
nRow3("Indicador") = "Viáticos dentro de presupuesto"
|
||||||
|
nRow3("Comentarios") = "Si se salió de lo gastado en el rubro de viáticos"
|
||||||
|
nRow3("ACARREO SAN JOSE A QUILA") = ""
|
||||||
|
nRow3("PIPER MERIDIAN M500") = ""
|
||||||
|
nRow3("PRESA JALES PEÑA COLORADA") = ""
|
||||||
|
nRow3("MINA LA CRUZ") = ""
|
||||||
|
nRow3("TOGUI -UBER") = ""
|
||||||
|
nRow3("SAN IGNACIO") = ""
|
||||||
|
nRow3("Porcentaje") = ""
|
||||||
|
|
||||||
|
nRow4("Numero") = "4"
|
||||||
|
nRow4("Indicador") = "Viáticos no deducibles"
|
||||||
|
nRow4("Comentarios") = "Viáticos no deducibles"
|
||||||
|
nRow4("ACARREO SAN JOSE A QUILA") = ""
|
||||||
|
nRow4("PIPER MERIDIAN M500") = ""
|
||||||
|
nRow4("PRESA JALES PEÑA COLORADA") = ""
|
||||||
|
nRow4("MINA LA CRUZ") = ""
|
||||||
|
nRow4("TOGUI -UBER") = ""
|
||||||
|
nRow4("SAN IGNACIO") = ""
|
||||||
|
nRow4("Porcentaje") = ""
|
||||||
|
|
||||||
|
nRow5("Numero") = "5"
|
||||||
|
nRow5("Indicador") = "Utilidad operativa"
|
||||||
|
nRow5("Comentarios") = "Ing-Egs"
|
||||||
|
nRow5("ACARREO SAN JOSE A QUILA") = ""
|
||||||
|
nRow5("PIPER MERIDIAN M500") = ""
|
||||||
|
nRow5("PRESA JALES PEÑA COLORADA") = ""
|
||||||
|
nRow5("MINA LA CRUZ") = ""
|
||||||
|
nRow5("TOGUI -UBER") = ""
|
||||||
|
nRow5("SAN IGNACIO") = ""
|
||||||
|
nRow5("Porcentaje") = ""
|
||||||
|
|
||||||
|
nRow6("Numero") = "11"
|
||||||
|
nRow6("Indicador") = "Factura ligada a orden de compra en SIG"
|
||||||
|
nRow6("Comentarios") = "Relación"
|
||||||
|
nRow6("ACARREO SAN JOSE A QUILA") = ""
|
||||||
|
nRow6("PIPER MERIDIAN M500") = ""
|
||||||
|
nRow6("PRESA JALES PEÑA COLORADA") = ""
|
||||||
|
nRow6("MINA LA CRUZ") = ""
|
||||||
|
nRow6("TOGUI -UBER") = ""
|
||||||
|
nRow6("SAN IGNACIO") = ""
|
||||||
|
nRow6("Porcentaje") = ""
|
||||||
|
|
||||||
|
nRow7("Numero") = "12"
|
||||||
|
nRow7("Indicador") = "Cumplimiento del programa de mantenimientos preventivos"
|
||||||
|
nRow7("Comentarios") = ""
|
||||||
|
nRow7("ACARREO SAN JOSE A QUILA") = "ND"
|
||||||
|
nRow7("PIPER MERIDIAN M500") = "ND"
|
||||||
|
nRow7("PRESA JALES PEÑA COLORADA") = "ND"
|
||||||
|
nRow7("MINA LA CRUZ") = "ND"
|
||||||
|
nRow7("TOGUI -UBER") = "ND"
|
||||||
|
nRow7("SAN IGNACIO") = "ND"
|
||||||
|
nRow7("Porcentaje") = "50%"
|
||||||
|
|
||||||
|
nRow8("Numero") = "13"
|
||||||
|
nRow8("Indicador") = "Relación entre mantenimiento preventivo y correctivo"
|
||||||
|
nRow8("Comentarios") = ""
|
||||||
|
nRow8("ACARREO SAN JOSE A QUILA") = "ND"
|
||||||
|
nRow8("PIPER MERIDIAN M500") = "ND"
|
||||||
|
nRow8("PRESA JALES PEÑA COLORADA") = "ND"
|
||||||
|
nRow8("MINA LA CRUZ") = "ND"
|
||||||
|
nRow8("TOGUI -UBER") = "ND"
|
||||||
|
nRow8("SAN IGNACIO") = "ND"
|
||||||
|
nRow8("Porcentaje") = "50%"
|
||||||
|
|
||||||
|
nRow9("Numero") = "14"
|
||||||
|
nRow9("Indicador") = "Consumo de combustible"
|
||||||
|
nRow9("Comentarios") = ""
|
||||||
|
nRow9("ACARREO SAN JOSE A QUILA") = "ND"
|
||||||
|
nRow9("PIPER MERIDIAN M500") = "ND"
|
||||||
|
nRow9("PRESA JALES PEÑA COLORADA") = "ND"
|
||||||
|
nRow9("MINA LA CRUZ") = "ND"
|
||||||
|
nRow9("TOGUI -UBER") = "ND"
|
||||||
|
nRow9("SAN IGNACIO") = "ND"
|
||||||
|
nRow9("Porcentaje") = "50%"
|
||||||
|
|
||||||
|
nRow10("Numero") = "15"
|
||||||
|
nRow10("Indicador") = "Relación de entradas de almacén contra órdenes de compra"
|
||||||
|
nRow10("Comentarios") = "Relación"
|
||||||
|
nRow10("ACARREO SAN JOSE A QUILA") = ""
|
||||||
|
nRow10("PIPER MERIDIAN M500") = ""
|
||||||
|
nRow10("PRESA JALES PEÑA COLORADA") = ""
|
||||||
|
nRow10("MINA LA CRUZ") = ""
|
||||||
|
nRow10("TOGUI -UBER") = ""
|
||||||
|
nRow10("SAN IGNACIO") = ""
|
||||||
|
nRow10("Porcentaje") = ""
|
||||||
|
|
||||||
|
|
||||||
|
DTDatos.Rows.Add(nRow1)
|
||||||
|
DTDatos.Rows.Add(nRow2)
|
||||||
|
DTDatos.Rows.Add(nRow3)
|
||||||
|
DTDatos.Rows.Add(nRow4)
|
||||||
|
DTDatos.Rows.Add(nRow5)
|
||||||
|
DTDatos.Rows.Add(nRow6)
|
||||||
|
DTDatos.Rows.Add(nRow7)
|
||||||
|
DTDatos.Rows.Add(nRow8)
|
||||||
|
DTDatos.Rows.Add(nRow9)
|
||||||
|
DTDatos.Rows.Add(nRow10)
|
||||||
|
|
||||||
|
DTDatos.AcceptChanges()
|
||||||
|
Return DTDatos
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub CargaDatos()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
LnkExportar.Visible = False
|
||||||
|
|
||||||
|
GvDatos.DataSource = CrearTablaDatos()
|
||||||
|
GvDatos.DataBind()
|
||||||
|
'LnkExportar.Visible = True
|
||||||
|
'GvDatos.DataBind()
|
||||||
|
|
||||||
|
If GvDatos.Rows.Count > 0 Then
|
||||||
|
LnkExportar.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpDatos.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "EXCEL"
|
||||||
|
|
||||||
|
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||||
|
|
||||||
|
|
||||||
|
Dim SbFiltros As New StringBuilder()
|
||||||
|
SbFiltros.AppendFormat($"Ejercicio: {DdlEjercicio.SelectedItem.Text} Periodo: {DdlPeriodo.SelectedItem.Text}|")
|
||||||
|
|
||||||
|
|
||||||
|
' GvDatos.Columns(10).Visible = False
|
||||||
|
GvDatos.ExportToExcelGembox("IndicadoresEMD", UsuarioActual, "Indicadores EMD", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||||
|
' GvDatos.Columns(10).Visible = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -51,6 +51,12 @@ public partial class OI_TareaDetalle : ClsPaginas
|
|||||||
public System.Data.DataTable CheckListNew { get { return ViewState["CheckListNew"] != null ? (System.Data.DataTable)ViewState["CheckListNew"] : null; } set { ViewState["CheckListNew"] = value; } }
|
public System.Data.DataTable CheckListNew { get { return ViewState["CheckListNew"] != null ? (System.Data.DataTable)ViewState["CheckListNew"] : null; } set { ViewState["CheckListNew"] = value; } }
|
||||||
public int chklistitemindex { get { return ViewState["chklistitemindex"] != null ? ViewState["chklistitemindex"].ToString().ToEntero() : 0; } set { ViewState["chklistitemindex"] = value; } }
|
public int chklistitemindex { get { return ViewState["chklistitemindex"] != null ? ViewState["chklistitemindex"].ToString().ToEntero() : 0; } set { ViewState["chklistitemindex"] = value; } }
|
||||||
|
|
||||||
|
|
||||||
|
public int CveIndicador { get { return ViewState["CveIndicador"].ToString().ToEntero(); } set { ViewState["CveIndicador"] = value; } }
|
||||||
|
public int Indicador { get { return ViewState["Indicador"].ToString().ToEntero(); } set { ViewState["Indicador"] = value; } }
|
||||||
|
public int ValorIndicador { get { return ViewState["ValorIndicador"].ToString().ToEntero(); } set { ViewState["ValorIndicador"] = value; } }
|
||||||
|
public int CveSubProyectoIndicador { get { return ViewState["CveSubProyectoIndicador"].ToString().ToEntero(); } set { ViewState["CveSubProyectoIndicador"] = value; } }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -72,6 +78,12 @@ public partial class OI_TareaDetalle : ClsPaginas
|
|||||||
EsNuevo = true;
|
EsNuevo = true;
|
||||||
CveUsuarioPara = 0;
|
CveUsuarioPara = 0;
|
||||||
CveUsuarioDe = 0;
|
CveUsuarioDe = 0;
|
||||||
|
|
||||||
|
CveIndicador = -1;
|
||||||
|
Indicador = -1;
|
||||||
|
ValorIndicador = -1;
|
||||||
|
CveSubProyectoIndicador = -1;
|
||||||
|
|
||||||
if (Request["Archivo"] != null)
|
if (Request["Archivo"] != null)
|
||||||
{
|
{
|
||||||
string strArchivo = string.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ModExtensiones.Decripta(Request["Archivo"].ToString()));
|
string strArchivo = string.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ModExtensiones.Decripta(Request["Archivo"].ToString()));
|
||||||
@@ -458,6 +470,11 @@ public partial class OI_TareaDetalle : ClsPaginas
|
|||||||
//OIE.[CveEventoEstatus], OIE.[FechaInicio], OIE.[FechaFin], OIE.[FechaRealTermino], OIE.[CveRevision], OIE.[Archivo], OIE.[FechaIng],
|
//OIE.[CveEventoEstatus], OIE.[FechaInicio], OIE.[FechaFin], OIE.[FechaRealTermino], OIE.[CveRevision], OIE.[Archivo], OIE.[FechaIng],
|
||||||
//OIE.[CveUsuarioIng], OIE.[CveEmpresa], OIE.[CveUsuarioModifico], OIE.[Avance]
|
//OIE.[CveUsuarioIng], OIE.[CveEmpresa], OIE.[CveUsuarioModifico], OIE.[Avance]
|
||||||
|
|
||||||
|
CveIndicador = drow["CveIndicador"].ToString().ToEntero();
|
||||||
|
Indicador = drow["Indicador"].ToString().ToEntero();
|
||||||
|
ValorIndicador = drow["ValorIndicador"].ToString().ToEntero();
|
||||||
|
CveSubProyectoIndicador = drow["CveSubProyectoIndicador"].ToString().ToEntero();
|
||||||
|
|
||||||
LtlVinculo.Text = "";
|
LtlVinculo.Text = "";
|
||||||
LtlVinculoLink.Text = "";
|
LtlVinculoLink.Text = "";
|
||||||
CveEventoPadre = drow["CveEventoPadre"].ToString().ToEntero();
|
CveEventoPadre = drow["CveEventoPadre"].ToString().ToEntero();
|
||||||
@@ -1021,8 +1038,15 @@ public partial class OI_TareaDetalle : ClsPaginas
|
|||||||
using (ClsOIEventos objOI = new ClsOIEventos())
|
using (ClsOIEventos objOI = new ClsOIEventos())
|
||||||
{
|
{
|
||||||
|
|
||||||
|
objOI.IniciaTransacSQL();
|
||||||
|
bool ProcesoOK = false;
|
||||||
|
|
||||||
if (objOI.UpdateEstatusEvento2(CveEstatus, -1, RCveEvento, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtComentarioTerminarpadre.Text))
|
if (objOI.UpdateEstatusEvento2(CveEstatus, -1, RCveEvento, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtComentarioTerminarpadre.Text))
|
||||||
|
{
|
||||||
|
ProcesoOK = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ProcesoOK)
|
||||||
{
|
{
|
||||||
ObjEventosCorreo o = objOI.objCorreo;
|
ObjEventosCorreo o = objOI.objCorreo;
|
||||||
if (CveEstatus >= 3)
|
if (CveEstatus >= 3)
|
||||||
@@ -1033,31 +1057,22 @@ public partial class OI_TareaDetalle : ClsPaginas
|
|||||||
{
|
{
|
||||||
pnlfecharealtermino.Visible = false;
|
pnlfecharealtermino.Visible = false;
|
||||||
}
|
}
|
||||||
//CargaEstatusEventos(DdlEventoEstatus.SelectedValue.ToEntero);
|
|
||||||
|
|
||||||
//if (DdlEventoEstatus.SelectedValue.ToEntero == 3 | DdlEventoEstatus.SelectedValue.ToEntero == 1)
|
|
||||||
// EnviarCorreoCambioEstatus(false);
|
|
||||||
//CargaDatos();
|
|
||||||
if (CveEstatus == 4)
|
if (CveEstatus == 4)
|
||||||
{
|
{
|
||||||
TxtAvance.Text = "100";
|
TxtAvance.Text = "100";
|
||||||
LblPorcentaje.Text = string.Format("{0:##0.##}", "100".ToDecimal());
|
LblPorcentaje.Text = string.Format("{0:##0.##}", "100".ToDecimal());
|
||||||
}
|
}
|
||||||
string mensaje = string.Format("Se cambió el Estatus de \"{0}\" a \"{1}\"", DdlEventoEstatus.SelectedItem.Text, DDlEstatus.SelectedItem.Text);
|
|
||||||
DdlEventoEstatus.SelectedValueExist(DDlEstatus.SelectedValue);
|
|
||||||
lblEstatus.Text = DdlEventoEstatus.SelectedItem.Text;
|
|
||||||
UpEstatus.Update();
|
|
||||||
RegistraScript(string.Format("$('#{0}').modal('hide')", iddivCambiarEstatus));
|
|
||||||
Alert(mensaje, ModExtensiones.TipoMensaje.ToastInformacion);
|
|
||||||
cargaActividades(objOI);
|
|
||||||
|
|
||||||
string Nombrede = "";
|
string Nombrede = "";
|
||||||
string Nombrepara = "";
|
string Nombrepara = "";
|
||||||
|
|
||||||
System.Data.DataTable dt = get_GlobalDTUsuarios(CveUsuario: CveUsuarioDe, CveEmpresa: UsuarioActual.CveEmpresa);
|
System.Data.DataTable dt = get_GlobalDTUsuarios(CveUsuario: CveUsuarioDe, CveEmpresa: UsuarioActual.CveEmpresa);
|
||||||
if (dt.Rows.Count > 0)
|
if (dt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
Nombrede = dt.Rows[0]["Nombre"].ToString();
|
Nombrede = dt.Rows[0]["Nombre"].ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
dt = get_GlobalDTUsuarios(CveUsuario: CveUsuarioDe, CveEmpresa: UsuarioActual.CveEmpresa);
|
dt = get_GlobalDTUsuarios(CveUsuario: CveUsuarioDe, CveEmpresa: UsuarioActual.CveEmpresa);
|
||||||
if (dt.Rows.Count > 0)
|
if (dt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -1068,10 +1083,46 @@ public partial class OI_TareaDetalle : ClsPaginas
|
|||||||
DateTime FFin = txtFechaF.Text.ToDateTimeExcat();
|
DateTime FFin = txtFechaF.Text.ToDateTimeExcat();
|
||||||
if (o != null)
|
if (o != null)
|
||||||
{
|
{
|
||||||
string mailbody = MailgetBodyNuevatarea(o.Folio, o.Link, o.Asunto, o.Descripcion, fInicio,FFin, o.Prioridad, o.Tema, Nombrede, Nombrepara, string.Format("Tarea Estatus Actualizado ({0})", o.Estatus));
|
string mailbody = MailgetBodyNuevatarea(o.Folio, o.Link, o.Asunto, o.Descripcion, fInicio, FFin, o.Prioridad, o.Tema, Nombrede, Nombrepara, string.Format("Tarea Estatus Actualizado ({0})", o.Estatus));
|
||||||
EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
|
EnviarCorreo(UsuarioActual.Empresa, o.AsuntoCorreo, mailbody, o.mailPara, "");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ProcesoOK && CveIndicador > 0 && (DDlEstatus.SelectedValue.ToEntero() == 3 || DDlEstatus.SelectedValue.ToEntero() == 4)){
|
||||||
|
if(Indicador == 1)
|
||||||
|
{
|
||||||
|
int Valor = 0;
|
||||||
|
int dias = (int) (txtFechaF.Text.ToDate() - NowADS()).TotalDays;
|
||||||
|
if (dias >= -2)
|
||||||
|
{
|
||||||
|
Valor = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!objOI.UpdateIndicador(CveIndicador, Valor, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
ProcesoOK = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ProcesoOK){
|
||||||
|
|
||||||
|
cargaActividades(objOI);
|
||||||
|
|
||||||
|
objOI.Commit();
|
||||||
|
|
||||||
|
string mensaje = string.Format("Se cambió el Estatus de \"{0}\" a \"{1}\"", DdlEventoEstatus.SelectedItem.Text, DDlEstatus.SelectedItem.Text);
|
||||||
|
DdlEventoEstatus.SelectedValueExist(DDlEstatus.SelectedValue);
|
||||||
|
lblEstatus.Text = DdlEventoEstatus.SelectedItem.Text;
|
||||||
|
UpEstatus.Update();
|
||||||
|
RegistraScript(string.Format("$('#{0}').modal('hide')", iddivCambiarEstatus));
|
||||||
|
|
||||||
|
Alert(mensaje, ModExtensiones.TipoMensaje.ToastInformacion);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
objOI.RollBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
19
OS/RepOSEstatus.aspx
Normal file
19
OS/RepOSEstatus.aspx
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepOSEstatus.aspx.vb" Inherits="OS_RepOSEstatus" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
5
OS/RepOSEstatus.aspx.vb
Normal file
5
OS/RepOSEstatus.aspx.vb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
Partial Class OS_RepOSEstatus
|
||||||
|
Inherits System.Web.UI.Page
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -269,7 +269,7 @@
|
|||||||
<label class="col-md-4">Servicio</label>
|
<label class="col-md-4">Servicio</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="250" Width="100%"
|
||||||
TextMode="MultiLine"
|
TextMode="MultiLine"
|
||||||
Rows="3"></asp:TextBox>
|
Rows="3"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
||||||
@@ -289,7 +289,7 @@
|
|||||||
<label class="col-md-4">Observaciones</label>
|
<label class="col-md-4">Observaciones</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="200" Width="100%"
|
||||||
TextMode="MultiLine"
|
TextMode="MultiLine"
|
||||||
Rows="3"></asp:TextBox>
|
Rows="3"></asp:TextBox>
|
||||||
<div class="input-group-addon">
|
<div class="input-group-addon">
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#chartdiv {
|
#chartdiv {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 700px;
|
height: 600px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -280,36 +280,33 @@
|
|||||||
<ajax:TabPanel ID="TabGrantt" runat="server" HeaderText="Cronograma">
|
<ajax:TabPanel ID="TabGrantt" runat="server" HeaderText="Cronograma">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:UpdatePanel ID="UPPGantt" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPGantt" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter">
|
||||||
<div class="portlet solid grey-cascade portlet-filter">
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
<div class="portlet-title portlet-filterT smalltitle">
|
<div class="tools">
|
||||||
<div class="tools">
|
<a href="javascript:;" class="expand"></a>
|
||||||
<a href="javascript:;" class="expand"></a>
|
</div>
|
||||||
</div>
|
<div class="titlefiltros caption">
|
||||||
<div class="titlefiltros caption">
|
<div class="row" style="height: 32px;">
|
||||||
<div class="row" style="height: 32px;">
|
<label class="col-md-1 truncate">Tipo Vista:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
<label class="col-md-1 truncate">Vista</label>
|
<asp:DropDownList ID="DdlTipoVista" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoVista_SelectedIndexChanged" CssClass="form-control select2me input-sm select2me Widthall"
|
||||||
<div class="col-md-1">
|
Style="width: 100%;" runat="server">
|
||||||
<asp:DropDownList ID="DdlTipoVista" AutoPostBack="true" OnSelectedIndexChanged ="DdlTipoVista_SelectedIndexChanged" CssClass="form-control select2me input-sm select2me Widthall"
|
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||||
Style="width: 100%;" runat="server">
|
<asp:ListItem Text="Solo Viaje" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
</asp:DropDownList>
|
||||||
<asp:ListItem Text="solo viaje" Value="1"></asp:ListItem>
|
</div>
|
||||||
</asp:DropDownList>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</ContentTemplate>
|
||||||
</div>
|
</asp:UpdatePanel>
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div id="chartdiv" style="width:100%; min-height:300px;"></div>
|
<div id="chartdiv"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
@@ -526,7 +523,6 @@
|
|||||||
"February": "Febrero",
|
"February": "Febrero",
|
||||||
"March": "Marzo",
|
"March": "Marzo",
|
||||||
"April": "Abril",
|
"April": "Abril",
|
||||||
"May": "Mayo",
|
|
||||||
"June": "Junio",
|
"June": "Junio",
|
||||||
"July": "Julio",
|
"July": "Julio",
|
||||||
"August": "Agosto",
|
"August": "Agosto",
|
||||||
@@ -537,7 +533,7 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function cargaDiagramaGrant(data, categorias) {
|
function cargaDiagramaGrant(data, categorias, TipoVista) {
|
||||||
|
|
||||||
am5.ready(function () {
|
am5.ready(function () {
|
||||||
//SI YA HAY GRAFICA, QUITA LA ACTUAL PARA HACER UNA NUEVA
|
//SI YA HAY GRAFICA, QUITA LA ACTUAL PARA HACER UNA NUEVA
|
||||||
@@ -566,7 +562,7 @@
|
|||||||
layout: root.verticalLayout,
|
layout: root.verticalLayout,
|
||||||
paddingLeft: 0
|
paddingLeft: 0
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Add legend
|
// Add legend
|
||||||
// https://www.amcharts.com/docs/v5/charts/xy-chart/legend-xy-series/
|
// https://www.amcharts.com/docs/v5/charts/xy-chart/legend-xy-series/
|
||||||
var legend = chart.children.push(am5.Legend.new(root, {
|
var legend = chart.children.push(am5.Legend.new(root, {
|
||||||
@@ -650,23 +646,24 @@
|
|||||||
|
|
||||||
chart.set("scrollbarY", scrollbarY);
|
chart.set("scrollbarY", scrollbarY);
|
||||||
|
|
||||||
/// evento para ajustar el alto del row
|
|
||||||
var cellSize = 30;
|
series.events.on("datavalidated", function (ev) {
|
||||||
chart.events.on("datavalidated", function (ev) {
|
let cellSize = 45;
|
||||||
|
|
||||||
// Get objects of interest
|
if (TipoVista == 1) {
|
||||||
var chart = ev.target;
|
cellSize = 60;
|
||||||
var categoryAxis = chart.yAxes.getIndex(0);
|
}
|
||||||
|
//let series = ev.target;
|
||||||
|
//let chart = series.chart;
|
||||||
|
let xAxis = chart.xAxes.getIndex(0);
|
||||||
|
|
||||||
// Calculate how we need to adjust chart height
|
// Calculate how we need to adjust chart height
|
||||||
var adjustHeight = chart.data.length * cellSize - categoryAxis.pixelHeight;
|
let chartHeight = categorias.length * cellSize + xAxis.height() + chart.get("paddingTop", 0) + chart.get("paddingBottom", 0);
|
||||||
|
|
||||||
// get current chart height
|
|
||||||
var targetHeight = chart.pixelHeight + adjustHeight;
|
|
||||||
|
|
||||||
// Set it on chart's container
|
// Set it on chart's container
|
||||||
chart.svgContainer.htmlElement.style.height = targetHeight + "px";
|
chart.root.dom.style.height = chartHeight + "px";
|
||||||
});
|
});
|
||||||
|
//root.language.setTranslationAny("May", "Mayo");
|
||||||
|
|
||||||
// Make stuff animate on load
|
// Make stuff animate on load
|
||||||
// https://www.amcharts.com/docs/v5/concepts/animations/
|
// https://www.amcharts.com/docs/v5/concepts/animations/
|
||||||
@@ -699,8 +696,13 @@
|
|||||||
$('#<%=TxtObservaciones.ClientID%>').val(event.title);
|
$('#<%=TxtObservaciones.ClientID%>').val(event.title);
|
||||||
$('#<%=TxtDescripcion.ClientID%>').val(event.title);
|
$('#<%=TxtDescripcion.ClientID%>').val(event.title);
|
||||||
$('#<%=TxtUbicacion.ClientID%>').val(event.NombreAcercamiento);
|
$('#<%=TxtUbicacion.ClientID%>').val(event.NombreAcercamiento);
|
||||||
$('#<%=TxtFechaSalida.ClientID%>').val(event.start._i);
|
|
||||||
$('#<%=TxtFechaRegreso.ClientID%>').val(event.end._i);
|
<%--$('#<%=TxtFechaSalida.ClientID%>').val(event.start._i);
|
||||||
|
$('#<%=TxtFechaRegreso.ClientID%>').val(event.end._i);--%>
|
||||||
|
|
||||||
|
$('#<%=TxtFechaSalida.ClientID%>').val(formatearFechaISO(event.start._i));
|
||||||
|
$('#<%=TxtFechaRegreso.ClientID%>').val(formatearFechaISO(event.FechaFinal));
|
||||||
|
|
||||||
$('#<%=DdlClientes.ClientID%>').val(event.CveCliente);
|
$('#<%=DdlClientes.ClientID%>').val(event.CveCliente);
|
||||||
$('#<%=DdlAF.ClientID%>').val(event.CveActivoFijo);
|
$('#<%=DdlAF.ClientID%>').val(event.CveActivoFijo);
|
||||||
$('#<%=DdlChofer.ClientID%>').val(event.CvePersonal);
|
$('#<%=DdlChofer.ClientID%>').val(event.CvePersonal);
|
||||||
@@ -713,16 +715,40 @@
|
|||||||
|
|
||||||
|
|
||||||
if (event.NombreComercial !== null) {
|
if (event.NombreComercial !== null) {
|
||||||
$('#HidModClienteNombre').val('');
|
$('#HidModClienteNombre').val('');
|
||||||
} else {
|
} else {
|
||||||
$('#HidModClienteNombre').val(event.NombreComercial);
|
$('#HidModClienteNombre').val(event.NombreComercial);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#HidModCveCliente').val(event.CveCliente);
|
$('#HidModCveCliente').val(event.CveCliente);
|
||||||
|
|
||||||
$('#<%=BtnModal.ClientID%>').click();
|
$('#<%=BtnModal.ClientID%>').click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function formatearFechaISO(fechaISO) {
|
||||||
|
let fecha = new Date(fechaISO);
|
||||||
|
|
||||||
|
// Formatear la fecha en DD/MM/YYYY
|
||||||
|
let dia = fecha.getDate().toString().padStart(2, '0');
|
||||||
|
let mes = (fecha.getMonth() + 1).toString().padStart(2, '0'); // getMonth() devuelve mes de 0-11
|
||||||
|
let año = fecha.getFullYear();
|
||||||
|
|
||||||
|
// Formatear la hora en formato 12 horas con AM/PM
|
||||||
|
let horas = fecha.getHours();
|
||||||
|
let minutos = fecha.getMinutes().toString().padStart(2, '0');
|
||||||
|
let periodo = 'a. m.';
|
||||||
|
if (horas >= 12) {
|
||||||
|
periodo = 'p. m.';
|
||||||
|
horas = horas > 12 ? horas - 12 : horas; // Convertir hora de formato 24 a 12 horas
|
||||||
|
}
|
||||||
|
if (horas === 0) horas = 12; // Medianoche se muestra como 12 a.m.
|
||||||
|
horas = horas.toString().padStart(2, '0');
|
||||||
|
|
||||||
|
// Combinar la fecha y la hora
|
||||||
|
return `${dia}/${mes}/${año} ${horas}:${minutos}:00 ${periodo}`;
|
||||||
|
}
|
||||||
|
|
||||||
function RadionButtonSelectedValueSet(name, SelectdValue) {
|
function RadionButtonSelectedValueSet(name, SelectdValue) {
|
||||||
$('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true);
|
$('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true);
|
||||||
}
|
}
|
||||||
@@ -827,6 +853,8 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ Partial Class RepContratosCalendario
|
|||||||
jsonCategorias.Add(obj)
|
jsonCategorias.Add(obj)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
RegistraScript($"cargaDiagramaGrant({jsonData.ToString()},{jsonCategorias.ToString()});", "A1")
|
RegistraScript($"cargaDiagramaGrant({jsonData.ToString()},{jsonCategorias.ToString()},{TipoVista});", "A1")
|
||||||
UPPGantt.Update()
|
UPPGantt.Update()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -9619,10 +9619,11 @@
|
|||||||
TxtImporte.value = FormatoNumero(ImporteRestante, 2);
|
TxtImporte.value = FormatoNumero(ImporteRestante, 2);
|
||||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + ToDouble(TxtImporte.value), 2);
|
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + ToDouble(TxtImporte.value), 2);
|
||||||
}else {
|
}else {
|
||||||
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + Importe, 2);
|
$get('TxtNCImporte').value = FormatoNumero(ToDouble($get('TxtNCImporte').value) + Importe, 2);
|
||||||
|
TxtImporte.value = FormatoNumero(Importe, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ToDouble(TxtImporte.value) <= 0) {
|
if (ToDouble(TxtImporte.value.replace(",", "")) <= 0) {
|
||||||
Chk.checked = false;
|
Chk.checked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2286,6 +2286,15 @@ Partial Class Ventas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property TieneBloqueoPorCreditoVencimiento As Integer
|
||||||
|
Get
|
||||||
|
Return IfNull(ViewState("TieneBloqueoPorCreditoVencimiento"), "0", ViewState("TieneBloqueoPorCreditoVencimiento")).ToString().ToEntero()
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("TieneBloqueoPorCreditoVencimiento") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Property EsNCDevolucionEfectivo As Boolean
|
Private Property EsNCDevolucionEfectivo As Boolean
|
||||||
Get
|
Get
|
||||||
Return If(IsNothing(ViewState("EsNCDevolucionEfectivo")), False, CType(ViewState("EsNCDevolucionEfectivo"), Boolean))
|
Return If(IsNothing(ViewState("EsNCDevolucionEfectivo")), False, CType(ViewState("EsNCDevolucionEfectivo"), Boolean))
|
||||||
@@ -2439,6 +2448,8 @@ Partial Class Ventas
|
|||||||
Me.CveVendedorContrato = -1
|
Me.CveVendedorContrato = -1
|
||||||
Me.CveVendedorEmpresaCRM = -1
|
Me.CveVendedorEmpresaCRM = -1
|
||||||
Me.EsGarantia = False
|
Me.EsGarantia = False
|
||||||
|
Me.TieneBloqueoPorCreditoVencimiento = 0
|
||||||
|
Me.ClienteEsDistribuidor = False
|
||||||
CveEmpresaCRM = 0
|
CveEmpresaCRM = 0
|
||||||
CveAcercamientoCRM = 0
|
CveAcercamientoCRM = 0
|
||||||
EstatusCliente = False
|
EstatusCliente = False
|
||||||
@@ -5905,7 +5916,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
|
'ACTIVA BOTONERA | DEBE TENER CONCEPTOS PENDIENTES DE FACTURAR
|
||||||
If TmpDT.SUM("CantidadFacturadaRem") < TmpDT.SUM("Cantidad") Then
|
If (TmpDT.SUM("CantidadFacturadaRem") < TmpDT.SUM("Cantidad")) AndAlso TieneBloqueoPorCreditoVencimiento = 0 Then
|
||||||
BtnsFacturar.Visible = True
|
BtnsFacturar.Visible = True
|
||||||
|
|
||||||
'E119, bloquear la facturación de remisiones que no estén surtidas
|
'E119, bloquear la facturación de remisiones que no estén surtidas
|
||||||
@@ -5935,48 +5946,51 @@ Partial Class Ventas
|
|||||||
'Si es Empresa de Acumuladores
|
'Si es Empresa de Acumuladores
|
||||||
If CveVenta > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DbRowVenta("TipoDocto").ToString() = "Rem" AndAlso (GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {Me.CveEstatus}").ToEntero() <> 5) Then
|
If CveVenta > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DbRowVenta("TipoDocto").ToString() = "Rem" AndAlso (GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {Me.CveEstatus}").ToEntero() <> 5) Then
|
||||||
|
|
||||||
BtnsFacturar.Visible = False
|
If TieneBloqueoPorCreditoVencimiento = 0 Then
|
||||||
|
|
||||||
Dim DtUsadosPendientes As DataTable = Nothing
|
|
||||||
Dim DtGarantiasPendientes As DataTable = Nothing
|
|
||||||
|
|
||||||
Dim ObjUsados As New ClsVentas
|
|
||||||
|
|
||||||
If ObjUsados.GetVentasUsados(CveVenta, -1, DbRowVenta("Fecha").ToString().ToDateTime, UsuarioActual.CveEmpresa) Then
|
|
||||||
DtUsadosPendientes = ObjUsados.DtResultados.Copy()
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ObjUsados.GetVentasGarantiaPendiente(CveVenta, NowADS(), UsuarioActual.CveEmpresa) Then
|
|
||||||
DtGarantiasPendientes = ObjUsados.DtResultados.Copy()
|
|
||||||
End If
|
|
||||||
|
|
||||||
'If ObjUsados.GetVentasGarantiaPendiente(CveVenta, -1, NowADS(), UsuarioActual.CveEmpresa) Then
|
|
||||||
' DtGarantiasPendientes = ObjUsados.DtResultados.Copy()
|
|
||||||
'End If
|
|
||||||
|
|
||||||
ObjUsados.Dispose()
|
|
||||||
|
|
||||||
BtnsFacturar.Visible = True
|
|
||||||
|
|
||||||
'VERIFICA SI YA SE FACTURO COMPLETAMENTE
|
|
||||||
If TmpDT.SUM("CantidadFacturadaRem") = TmpDT.SUM("Cantidad") Then
|
|
||||||
BtnsFacturar.Visible = False
|
BtnsFacturar.Visible = False
|
||||||
End If
|
|
||||||
|
|
||||||
'VERIFICA SI TIENE USADOS O GARANTIAS PENDIENTES
|
Dim DtUsadosPendientes As DataTable = Nothing
|
||||||
If BtnsFacturar.Visible Then
|
Dim DtGarantiasPendientes As DataTable = Nothing
|
||||||
If (Not EsGarantia AndAlso (DtUsadosPendientes IsNot Nothing AndAlso DtUsadosPendientes.Rows.Count > 0)) Then
|
|
||||||
BtnsFacturar.Visible = False
|
Dim ObjUsados As New ClsVentas
|
||||||
Alert("Tiene usados pendiente de recibir", TipoMensaje.MsgAdvertencia)
|
|
||||||
|
If ObjUsados.GetVentasUsados(CveVenta, -1, DbRowVenta("Fecha").ToString().ToDateTime, UsuarioActual.CveEmpresa) Then
|
||||||
|
DtUsadosPendientes = ObjUsados.DtResultados.Copy()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If (EsGarantia AndAlso (DtGarantiasPendientes IsNot Nothing AndAlso DtGarantiasPendientes.Rows.Count > 0)) Then
|
If ObjUsados.GetVentasGarantiaPendiente(CveVenta, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||||
Alert("Tiene garantías pendientes de recibir", TipoMensaje.MsgAdvertencia)
|
DtGarantiasPendientes = ObjUsados.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If ObjUsados.GetVentasGarantiaPendiente(CveVenta, -1, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||||
|
' DtGarantiasPendientes = ObjUsados.DtResultados.Copy()
|
||||||
|
'End If
|
||||||
|
|
||||||
|
ObjUsados.Dispose()
|
||||||
|
|
||||||
|
BtnsFacturar.Visible = True
|
||||||
|
|
||||||
|
'VERIFICA SI YA SE FACTURO COMPLETAMENTE
|
||||||
|
If TmpDT.SUM("CantidadFacturadaRem") = TmpDT.SUM("Cantidad") Then
|
||||||
BtnsFacturar.Visible = False
|
BtnsFacturar.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'VERIFICA SI TIENE USADOS O GARANTIAS PENDIENTES
|
||||||
|
If BtnsFacturar.Visible Then
|
||||||
|
If (Not EsGarantia AndAlso (DtUsadosPendientes IsNot Nothing AndAlso DtUsadosPendientes.Rows.Count > 0)) Then
|
||||||
|
BtnsFacturar.Visible = False
|
||||||
|
Alert("Tiene usados pendiente de recibir", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If (EsGarantia AndAlso (DtGarantiasPendientes IsNot Nothing AndAlso DtGarantiasPendientes.Rows.Count > 0)) Then
|
||||||
|
Alert("Tiene garantías pendientes de recibir", TipoMensaje.MsgAdvertencia)
|
||||||
|
BtnsFacturar.Visible = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SI ES COMPLEMENTARIA, NO DEBE PERMITIR FACTURAR
|
'SI ES COMPLEMENTARIA, NO DEBE PERMITIR FACTURAR
|
||||||
@@ -6071,7 +6085,7 @@ Partial Class Ventas
|
|||||||
CargaPS(-1, DdlPS)
|
CargaPS(-1, DdlPS)
|
||||||
|
|
||||||
'Verifico si tiene la funcionalidad (135)
|
'Verifico si tiene la funcionalidad (135)
|
||||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") Then
|
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") AndAlso TieneBloqueoPorCreditoVencimiento = 0 Then
|
||||||
|
|
||||||
Select Case UsuarioActual.Empresa.Funcionalidad(135)
|
Select Case UsuarioActual.Empresa.Funcionalidad(135)
|
||||||
Case "1" ' POR SUPERVISOR
|
Case "1" ' POR SUPERVISOR
|
||||||
@@ -6182,14 +6196,13 @@ Partial Class Ventas
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub VerificarBtnFacturarCotizacion(CveVendedor As Integer, Optional MostrarGenerarRemision As Boolean = True)
|
Private Sub VerificarBtnFacturarCotizacion(CveVendedor As Integer, Optional MostrarGenerarRemision As Boolean = True)
|
||||||
If TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Cot") Then
|
If TmpDT.SUM("CantidadFacturadaCot") < TmpDT.SUM("Cantidad") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso TieneBloqueoPorCreditoVencimiento = 0 Then
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(199) Then
|
If UsuarioActual.TienePermisoProceso(199) Then
|
||||||
BtnGenerarRemision.Visible = If(CveEstatus = 10, False, True)
|
BtnGenerarRemision.Visible = If(CveEstatus = 10, False, True)
|
||||||
Else
|
Else
|
||||||
BtnGenerarRemision.Visible = False
|
BtnGenerarRemision.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(60) Then BtnsFacturar.Visible = True 'puede facturar
|
If UsuarioActual.TienePermisoProceso(60) Then BtnsFacturar.Visible = True 'puede facturar
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso UsuarioActual.TienePermisoProceso(60) Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso UsuarioActual.TienePermisoProceso(60) Then
|
||||||
@@ -7590,7 +7603,7 @@ Partial Class Ventas
|
|||||||
If Not EsCreaApartirDe AndAlso (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0) Then
|
If Not EsCreaApartirDe AndAlso (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0) Then
|
||||||
DdlTipoComprobante.SelectedValueExist("Cot")
|
DdlTipoComprobante.SelectedValueExist("Cot")
|
||||||
Else
|
Else
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) <> "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(595) = "1" Then
|
||||||
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
||||||
DdlTipoComprobante.SelectedValue = "PA"
|
DdlTipoComprobante.SelectedValue = "PA"
|
||||||
|
|
||||||
@@ -7611,9 +7624,19 @@ Partial Class Ventas
|
|||||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
|
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim Bloqueo As Boolean = False
|
||||||
|
|
||||||
|
If Not DdlTipoComprobante.SelectedValue.Contiene("PA") AndAlso UsuarioActual.Empresa.Funcionalidad(531) <> "1" Then
|
||||||
|
Bloqueo = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'SI EL CLIENTE ES DISTRIBUIDOR Y TIENE FACTURAS VENCIDAS, DEBE BLOQUEAR
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ClienteEsDistribuidor AndAlso Opcion.Contiene(2, 3) Then
|
||||||
|
Bloqueo = True
|
||||||
|
End If
|
||||||
|
|
||||||
'SI ES AUTORIZACION DEBE PERMITIR GENERARLA
|
'SI ES AUTORIZACION DEBE PERMITIR GENERARLA
|
||||||
If (Not DdlTipoComprobante.SelectedValue.Contiene("PA")) AndAlso UsuarioActual.Empresa.Funcionalidad(531) <> "1" Then
|
If Bloqueo Then
|
||||||
BtnEmitirImprimir.Visible = False
|
BtnEmitirImprimir.Visible = False
|
||||||
BtnsFacturar.Visible = False
|
BtnsFacturar.Visible = False
|
||||||
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
||||||
@@ -7621,6 +7644,11 @@ Partial Class Ventas
|
|||||||
LnkPedido2SinFacturar.Visible = False
|
LnkPedido2SinFacturar.Visible = False
|
||||||
LnkCotizaciones.Visible = False
|
LnkCotizaciones.Visible = False
|
||||||
LnkOCs.Visible = False
|
LnkOCs.Visible = False
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
TieneBloqueoPorCreditoVencimiento = 1
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
@@ -7645,6 +7673,7 @@ Partial Class Ventas
|
|||||||
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
|
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
|
||||||
If Autorizacion > 0 Then
|
If Autorizacion > 0 Then
|
||||||
BtnsFacturar.Visible = True
|
BtnsFacturar.Visible = True
|
||||||
|
TieneBloqueoPorCreditoVencimiento = 0
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -7688,6 +7717,7 @@ Partial Class Ventas
|
|||||||
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
|
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
|
||||||
If Autorizacion > 0 Then
|
If Autorizacion > 0 Then
|
||||||
BtnsFacturar.Visible = True
|
BtnsFacturar.Visible = True
|
||||||
|
TieneBloqueoPorCreditoVencimiento = 0
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -7758,6 +7788,10 @@ Partial Class Ventas
|
|||||||
BtnsFacturar.Visible = False
|
BtnsFacturar.Visible = False
|
||||||
BtnGenerarRemision.Visible = False
|
BtnGenerarRemision.Visible = False
|
||||||
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ClienteEsDistribuidor AndAlso Opcion.Contiene(2, 3) Then
|
||||||
|
TieneBloqueoPorCreditoVencimiento = 1
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -7773,45 +7807,62 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
Case Else 'SI NO TIENE NINGUN TIPO DE AUTORIZACION CONFIGURADO
|
Case Else 'SI NO TIENE NINGUN TIPO DE AUTORIZACION CONFIGURADO
|
||||||
'RMF. codigo temporal para pruebas
|
'VERIFICAR CANDADOS DE VENTA
|
||||||
If Alertas AndAlso UsuarioActual.CveEmpresa = 140 Then
|
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 Then
|
||||||
Dim Vta As New ClsVentas
|
Dim Vta As New ClsVentas
|
||||||
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
||||||
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
||||||
Vta.Dispose()
|
Vta.Dispose()
|
||||||
If Opcion > 0 Then
|
If Opcion > 0 Then
|
||||||
LnkSolicitarCredito.Visible = True
|
BtnsFacturar.Visible = False
|
||||||
|
BtnGenerarRemision.Visible = False
|
||||||
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ClienteEsDistribuidor AndAlso Opcion.Contiene(2, 3) Then
|
||||||
|
TieneBloqueoPorCreditoVencimiento = 1
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||||
|
RBLPago.SelectedValue = "2"
|
||||||
|
RBLPago.Items(0).Enabled = False
|
||||||
|
RBLPago_SelectedIndexChanged(Nothing, Nothing)
|
||||||
|
UPCondicionesPago.Update()
|
||||||
Else
|
Else
|
||||||
'VERIFICAR CANDADOS DE VENTA
|
'este codigo no es temporal
|
||||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 Then
|
If Alertas Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia)
|
||||||
Dim Vta As New ClsVentas
|
|
||||||
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
LnkSolicitarCredito.Visible = True
|
||||||
Vta.Dispose()
|
DdlTipoAutorizacion.SelectedValueExist("1")
|
||||||
If Opcion > 0 Then
|
|
||||||
BtnsFacturar.Visible = False
|
If Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then
|
||||||
BtnGenerarRemision.Visible = False
|
Dim Autorizacion As Integer = 0
|
||||||
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero, "Ing", CveEstatus:=1) Then
|
||||||
|
Dim RowAutorizacion As DataRow = Nothing
|
||||||
|
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
||||||
|
If TieneDiasVencidos Then
|
||||||
|
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion IN(1,2) AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
|
||||||
|
Else
|
||||||
|
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If RowAutorizacion IsNot Nothing Then
|
||||||
|
Autorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
|
||||||
|
If Autorizacion <= 0 Then
|
||||||
|
BtnEmitirImprimir.Visible = False
|
||||||
|
TieneBloqueoPorCreditoVencimiento = 1
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
|
||||||
RBLPago.SelectedValue = "2"
|
|
||||||
RBLPago.Items(0).Enabled = False
|
|
||||||
RBLPago_SelectedIndexChanged(Nothing, Nothing)
|
|
||||||
UPCondicionesPago.Update()
|
|
||||||
Else
|
|
||||||
'este codigo no es temporal
|
|
||||||
If Alertas Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia)
|
|
||||||
If UsuarioActual.CveEmpresa = 140 Then
|
|
||||||
LnkSolicitarCredito.Visible = True
|
|
||||||
DdlTipoAutorizacion.SelectedValueExist("1")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
@@ -7822,13 +7873,32 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'VERIFICAR RESTRICCIONES DEL CLIENTE
|
'VERIFICAR RESTRICCIONES DEL CLIENTE
|
||||||
If Not UsuarioActual.Empresa.Funcionalidad(702).ToEntero() > 0 Then
|
If Not UsuarioActual.Empresa.Funcionalidad(702).ToEntero() > 0 Then
|
||||||
If (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 AndAlso RBLPago.SelectedValue = "2") Then
|
|
||||||
Dim Valida As Boolean = True
|
Dim ValidaRemision As Boolean = False
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso (Me.CveCliente = UsuarioActual.Empresa.Funcionalidad(714).ToEntero() OrElse Me.PermiteCredito) Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
Valida = False
|
ValidaRemision = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim ValidaCondicionesCredito As Boolean = False
|
||||||
|
|
||||||
|
'SI ES UNA VENTA EXISTENTE
|
||||||
|
If CveVenta > 0 Then
|
||||||
|
If (DdlTipoComprobante.SelectedValue = "Cot") AndAlso RBLPago.SelectedValue = "2" Then
|
||||||
|
ValidaCondicionesCredito = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Valida Then
|
If (ValidaRemision AndAlso DdlTipoComprobante.SelectedValue = "Rem") AndAlso RBLPago.SelectedValue = "1" Then
|
||||||
|
ValidaCondicionesCredito = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ValidaCondicionesCredito Then
|
||||||
|
Dim ValidaCliente As Boolean = True
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso (Me.CveCliente = UsuarioActual.Empresa.Funcionalidad(714).ToEntero() OrElse Me.PermiteCredito) Then
|
||||||
|
ValidaCliente = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ValidaCliente Then
|
||||||
Dim Vta As New ClsVentas
|
Dim Vta As New ClsVentas
|
||||||
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
||||||
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
||||||
@@ -7858,6 +7928,10 @@ Partial Class Ventas
|
|||||||
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||||
BtnsFacturar.Visible = False
|
BtnsFacturar.Visible = False
|
||||||
BtnGenerarRemision.Visible = False
|
BtnGenerarRemision.Visible = False
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ClienteEsDistribuidor AndAlso Opcion.Contiene(2, 3) Then
|
||||||
|
TieneBloqueoPorCreditoVencimiento = 1
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -7865,6 +7939,10 @@ Partial Class Ventas
|
|||||||
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||||
BtnsFacturar.Visible = False
|
BtnsFacturar.Visible = False
|
||||||
BtnGenerarRemision.Visible = False
|
BtnGenerarRemision.Visible = False
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ClienteEsDistribuidor AndAlso Opcion.Contiene(2, 3) Then
|
||||||
|
TieneBloqueoPorCreditoVencimiento = 1
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -17932,7 +18010,7 @@ Partial Class Ventas
|
|||||||
TrAlmacenOrigen.Visible = False
|
TrAlmacenOrigen.Visible = False
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Cot" And UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") Then
|
If DdlTipoComprobante.SelectedValue = "Cot" And UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") Then
|
||||||
Alert("Se ocupa una autorización.", TipoMensaje.MsgAdvertencia)
|
Alert("Se requiere una autorización.", TipoMensaje.MsgAdvertencia)
|
||||||
TrDireccion.Visible = False
|
TrDireccion.Visible = False
|
||||||
TrCiudad.Visible = False
|
TrCiudad.Visible = False
|
||||||
TrRFC.Visible = False
|
TrRFC.Visible = False
|
||||||
@@ -18327,14 +18405,14 @@ Partial Class Ventas
|
|||||||
If Not CveEmpresaCRM > 0 Then
|
If Not CveEmpresaCRM > 0 Then
|
||||||
'SI ES UNA REMISION EXISTENTE, NO MOSTRAR LOS BOTONES
|
'SI ES UNA REMISION EXISTENTE, NO MOSTRAR LOS BOTONES
|
||||||
If Not (CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Rem") Then
|
If Not (CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Rem") Then
|
||||||
BtnCrearApartirDe.Enabled = EstatusCliente
|
BtnCrearApartirDe.Enabled = EstatusCliente AndAlso TieneBloqueoPorCreditoVencimiento = 0
|
||||||
BtnEmitirImprimir.Visible = EstatusCliente
|
BtnEmitirImprimir.Visible = EstatusCliente AndAlso TieneBloqueoPorCreditoVencimiento = 0
|
||||||
TrVistaPrevia.Visible = EstatusCliente
|
TrVistaPrevia.Visible = EstatusCliente
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If TipoDoctoConsulta.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
If TipoDoctoConsulta.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
||||||
BtnCrearApartirDe.Enabled = EstatusCliente
|
BtnCrearApartirDe.Enabled = EstatusCliente AndAlso TieneBloqueoPorCreditoVencimiento = 0
|
||||||
BtnEmitirImprimir.Visible = EstatusCliente
|
BtnEmitirImprimir.Visible = EstatusCliente AndAlso TieneBloqueoPorCreditoVencimiento = 0
|
||||||
TrVistaPrevia.Visible = EstatusCliente
|
TrVistaPrevia.Visible = EstatusCliente
|
||||||
Else
|
Else
|
||||||
BtnCrearApartirDe.Enabled = True
|
BtnCrearApartirDe.Enabled = True
|
||||||
@@ -23383,8 +23461,11 @@ Partial Class Ventas
|
|||||||
' DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
' DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0}", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||||
|
Else
|
||||||
|
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||||
|
End If
|
||||||
DtCC.Dispose()
|
DtCC.Dispose()
|
||||||
|
|
||||||
DdlCuentaEfectivo.DataBind()
|
DdlCuentaEfectivo.DataBind()
|
||||||
|
|||||||
Reference in New Issue
Block a user