diff --git a/Transportes/RepContratosCalendario.aspx b/Transportes/RepContratosCalendario.aspx
index 04147c7a9..019ac22fc 100644
--- a/Transportes/RepContratosCalendario.aspx
+++ b/Transportes/RepContratosCalendario.aspx
@@ -447,7 +447,7 @@
Estatus:
-
@@ -494,7 +494,7 @@
-
+
@@ -726,7 +726,7 @@
$('#<%=TxtDolares.ClientID%>').val(event.Dolares);
$('#<%=TxtPesos.ClientID%>').val(event.Pesos);
$('#<%=TxtAnticipo.ClientID%>').val(event.Anticipo);
- $('#<%=CveContrato.ClientID%>').val(event.id);
+ $('#<%=HdnCveContrato.ClientID%>').val(event.id);
if (event.NombreComercial !== null) {
diff --git a/Transportes/RepContratosCalendario.aspx.vb b/Transportes/RepContratosCalendario.aspx.vb
index 5695af9fd..e49bcd659 100644
--- a/Transportes/RepContratosCalendario.aspx.vb
+++ b/Transportes/RepContratosCalendario.aspx.vb
@@ -28,6 +28,16 @@ Partial Class RepContratosCalendario
ViewState("Contrato") = value
End Set
End Property
+
+ Public Property CveContrato As Integer
+ Get
+ Return IfNull(ViewState("CveContrato"), "").ToString.ToEntero
+ End Get
+ Set(value As Integer)
+ ViewState("CveContrato") = value
+ End Set
+ End Property
+
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -53,6 +63,8 @@ Partial Class RepContratosCalendario
End If
GvContratos.DataSource = DtAvance
+ DdlEstatusContrato.Enabled = UsuarioActual.TienePermisoProceso(173)
+
ObjContratos.Dispose()
GvContratos.DataBind()
UpTitulos.Update()
@@ -77,7 +89,8 @@ Partial Class RepContratosCalendario
'DATOS
Dim strAF As New StringBuilder
- For Each Row As DataRow In DtAvance.FiltraParametros("CodigoAF <> ''").Rows
+ 'se quitan los estatus cancelados
+ For Each Row As DataRow In DtAvance.FiltraParametros("CodigoAF <> '' AND TipoEstatus <> 3").Rows
Dim obj As New JObject(
New JProperty("category", Row("CodigoAF")),
New JProperty("fromDate", Row("FechaInicial").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm").ToDateTime()),
@@ -171,7 +184,6 @@ Partial Class RepContratosCalendario
End Sub
Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
-
If HidModClienteNombre.Value = "" Then
HidModClienteNombre.Value = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, HidModCveCliente.Value.ToEntero).FiltroPrimeroValor("NombreComercial")
End If
@@ -182,8 +194,6 @@ Partial Class RepContratosCalendario
DdlClientes.txtText.Value = HidModClienteNombre.Value
DdlClientes.txtValue.Value = HidModCveCliente.Value
-
-
UpModal.Update()
RegistraScript("$('#ModalActualizar').modal('show');")
@@ -192,11 +202,9 @@ Partial Class RepContratosCalendario
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
Dim ObjContratos As New ClsContratos
- ObjContratos.IniciaTransacSQL()
-
- Contrato = CveContrato.Value
-
- If ObjContratos.UpdateContratos(Contrato.ToEntero, TxtFolio.Text, TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34, CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero) Then
+ ObjContratos.IniciaTransacSQL()
+
+ If ObjContratos.UpdateContratos(CveContrato, TxtFolio.Text, TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34, CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero) Then
ObjContratos.Commit()
Alert("Actualizado Correctamente.")
Else
@@ -221,7 +229,7 @@ Partial Class RepContratosCalendario
TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy hh:mm tt")
TxtMoneda.Text = GvRow.DataKey("CveMoneda")
'Requeridos
- ViewState("Contrato") = GvRow.DataKey("CveContrato")
+ ViewState("CveContrato") = GvRow.DataKey("CveContrato")
DdlAF.SelectedValue = GvRow.DataKey("CveAF")
DdlChofer.SelectedValueExist(GvRow.DataKey("CveChofer"))
DdlChofer2.SelectedValueExist(GvRow.DataKey("CveChofer2"))