Compra B-11648 error en total almacen contra prepoliza,GDiaz - 2024.08.09
This commit is contained in:
@@ -145,12 +145,12 @@
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" ID="LblSubProyectoModal"></asp:Label>
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList runat="server" ID="DdlSubProyecto" Width="100%" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" InitialValue="-1" ErrorMessage="Campo sub Proyecto requerido." Display="None"
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvDdlSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList runat="server" ID="DdlSubProyecto" Width="100%" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" InitialValue="-1" ErrorMessage="Campo sub Proyecto requerido." Display="None"
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvDdlSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
|
||||
</div>
|
||||
@@ -396,9 +396,46 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpBitacora" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="icon-pin"></i>
|
||||
<span class="caption-subject bold uppercase">Historial de Modificación</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:GridView ID="GvBitacora" runat="server" GridLines="None" Width="100%" CssClass="table table-striped table-advance table-hover Widthall ADSCroll mysmallbtn" CellSpacing="0" AutoGenerateColumns="False">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="ConceptoHistorialBitacora" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Anterior" HeaderText="Anterior" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Actual" HeaderText="Actual" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Descripcio n" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<%-- Pre init --%>
|
||||
@@ -593,7 +630,7 @@
|
||||
<label class="col-md-4 bold">Observación</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox CssClass="form-control" runat="server" MaxLength="200"
|
||||
ID="TxtObservacion">Observacion</asp:TextBox>
|
||||
ID="TxtObservacion"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@ Partial Class RepContratoDetalle
|
||||
CveViajePasajero = 0
|
||||
Session("FileExtension") = ""
|
||||
ArchivoUpdate = ""
|
||||
CargaGvBitacora()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -298,7 +299,7 @@ Partial Class RepContratoDetalle
|
||||
Try
|
||||
If ObjContratos.UpdateContratos(CveContrato, LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "",
|
||||
DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal,
|
||||
DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus, Observaciones:=TxtObservacion.Text) Then
|
||||
DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus, Observaciones:=TxtObservaciones.Text) Then
|
||||
Alert("Contrato actualizado correctamente")
|
||||
End If
|
||||
ObjContratos.Commit()
|
||||
@@ -606,6 +607,19 @@ Partial Class RepContratoDetalle
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Bitacora historial"
|
||||
Private Sub CargaGvBitacora()
|
||||
' COMENTADO POR IPP PARA SUBIR 5 ABRIL 2017
|
||||
If CveContrato > 0 Then
|
||||
Dim ObjGral As New ClsGenerales()
|
||||
If ObjGral.GetHistorialBitacora(-1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
|
||||
GvBitacora.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
End If
|
||||
GvBitacora.DataBind()
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<label class="col-md-1 ">Tipo de Unidad</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoUnidad" data-text="Todos" AppendDataBoundItems="true"
|
||||
DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" CssClass="form-control ddlFiltros input-sm select2me Widthall" ClientIDMode="Static"
|
||||
DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" CssClass="form-control ddlFiltros input-sm select2me Widthall" ClientIDMode="Static"
|
||||
Style="width: 100%;" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
@@ -441,10 +441,19 @@
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlAF" DataValueField="CveActivoFijo"
|
||||
DataTextField="CodDesc" Class="form-control select2me"
|
||||
Width="100%" runat="server">
|
||||
Width="100%" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlAF_SelectedIndexChanged" >
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1" runat="server" id="DVMotivoCambioAF" visible="false">
|
||||
<label class="col-md-4">Motivo Cambio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtMotivoCambioUnidad" CssStyle=" form-control" runat="server" MaxLength="2000" Width="100%" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtMotivoCambioUnidad" runat="server" ControlToValidate="TxtMotivoCambioUnidad" ErrorMessage="Campo Motivo Cambio requerido." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERfvTxtMotivoCambioUnidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtMotivoCambioUnidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Chofer 1</label>
|
||||
@@ -533,6 +542,7 @@
|
||||
<asp:HiddenField runat="server" ID="HidCveVentaRemision" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidRemisionSaldo" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidCveAF" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidCveAFDes" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -811,7 +821,13 @@
|
||||
$('#HidRemisionSerieFolio').val(event.RemisionSerieFolio);
|
||||
$('#HidCveVentaRemision').val(event.CveVentaRemision);
|
||||
$('#HidRemisionSaldo').val(event.RemisionSaldo);
|
||||
$('#HidCveAF').val(event.CveActivoFijo);
|
||||
|
||||
if (event.CveActivoFijo > 0) {
|
||||
$('#HidCveAF').val(event.CveActivoFijo);
|
||||
} else {
|
||||
$('#HidCveAF').val('-1');
|
||||
}
|
||||
|
||||
|
||||
|
||||
<%-- $('#HidRemision').text(event.RemisionSerieFolio);
|
||||
@@ -978,8 +994,15 @@
|
||||
slotEventOverlap: false, // No permitir la superposición en vistas de agenda
|
||||
eventRender: function (event, element) {
|
||||
element.css({
|
||||
'margin-bottom': '1px', // Ajusta el valor según sea necesario
|
||||
'margin-left': '1px' // Ajusta el valor según sea necesario
|
||||
'margin-bottom': '1px',
|
||||
'margin-left': '1px',
|
||||
'white-space': 'normal', // Permitir el ajuste de texto
|
||||
'height': 'auto', // Ajustar la altura automáticamente
|
||||
'overflow': 'hidden' // Ocultar cualquier desbordamiento
|
||||
});
|
||||
element.find('.fc-title').css({
|
||||
'white-space': 'normal', // Asegurar que el texto se ajuste
|
||||
'line-height': '1.2em' // Ajustar la altura de línea para mejor legibilidad
|
||||
});
|
||||
},
|
||||
events: {
|
||||
|
||||
@@ -221,7 +221,7 @@ Partial Class RepContratosCalendario
|
||||
|
||||
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim NumChoferes As Integer = If(chkSegundoChofer.Checked, 2, 1)
|
||||
|
||||
If NumChoferes = 2 AndAlso DdlChofer2.SelectedValue.ToEntero <= 0 Then
|
||||
@@ -230,6 +230,7 @@ Partial Class RepContratosCalendario
|
||||
End If
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
Dim DTAgendadados As New DataTable
|
||||
If ObjContratos.GetContratosValUnidadesAgendadas(DdlAF.SelectedValue.ToEntero, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, UsuarioActual.CveEmpresa, CveContrato) Then
|
||||
@@ -261,10 +262,30 @@ Partial Class RepContratosCalendario
|
||||
CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text.Trim, NumChoferes:=NumChoferes) Then
|
||||
RegistraScript("$('#ModalActualizar').modal('hide');")
|
||||
Alert("Actualizado Correctamente.")
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
If HidCveAF.Value.ToEntero <> DdlAF.SelectedValue.ToEntero Then
|
||||
Dim objGenerales = New ClsGenerales(ObjContratos.IniciaTransacSQL())
|
||||
|
||||
If Not objGenerales.AddHistorialBitacora(465, -1, -1, -1, -1, -1, -1, -1, DdlAF.SelectedItem.Text, HidCveAFDes.Value, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, TxtMotivoCambioUnidad.Text, "", "", CveContrato:=CveContrato) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
ObjContratos.RollBack()
|
||||
Else
|
||||
ObjContratos.Commit()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
|
||||
UpTitulos.Update()
|
||||
CargaDatos()
|
||||
InicializaCalendar()
|
||||
@@ -299,6 +320,15 @@ Partial Class RepContratosCalendario
|
||||
|
||||
DdlAF.SelectedValueExist(GvRow.DataKey("CveAF"))
|
||||
|
||||
HidCveAF.Value = "-1"
|
||||
HidCveAFDes.Value = ""
|
||||
If GvRow.DataKey("CveAF").ToEntero > 0 Then
|
||||
HidCveAF.Value = GvRow.DataKey("CveAF").ToString
|
||||
HidCveAFDes.Value = DdlAF.SelectedItem.Text
|
||||
End If
|
||||
|
||||
TxtMotivoCambioUnidad.Text = ""
|
||||
DVMotivoCambioAF.Visible = False
|
||||
|
||||
|
||||
HypRemision.Text = GvRow.DataKey("RemisionSerieFolio")
|
||||
@@ -326,6 +356,9 @@ Partial Class RepContratosCalendario
|
||||
HidModClienteNombre.Value = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, HidModCveCliente.Value.ToEntero).FiltroPrimeroValor("NombreComercial")
|
||||
End If
|
||||
|
||||
TxtMotivoCambioUnidad.Text = ""
|
||||
DVMotivoCambioAF.Visible = False
|
||||
|
||||
DdlClientes.SelectedText = HidModClienteNombre.Value
|
||||
DdlClientes.SelectedValue = HidModCveCliente.Value
|
||||
|
||||
@@ -347,9 +380,10 @@ Partial Class RepContratosCalendario
|
||||
End If
|
||||
|
||||
CargaAFDdl(HidCveTipoAF.Value.ToEntero)
|
||||
|
||||
DdlAF.SelectedValueExist(HidCveAF.Value)
|
||||
|
||||
|
||||
HidCveAFDes.Value = DdlAF.SelectedItem.Text
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
@@ -452,4 +486,16 @@ Partial Class RepContratosCalendario
|
||||
CargaCronograma(DdlTipoVista.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlAF_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DVMotivoCambioAF.Visible = False
|
||||
|
||||
If HidCveAF.Value.ToEntero > 0 AndAlso DdlAF.SelectedValue.ToEntero <> HidCveAF.Value.ToEntero Then
|
||||
DVMotivoCambioAF.Visible = True
|
||||
End If
|
||||
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user