Cambios en folios de garantia
This commit is contained in:
@@ -107,15 +107,15 @@
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpGral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="Widthall" style="text-align: right!important;"">
|
||||
<div class="Widthall" style="text-align: right! important;">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin: 5px">
|
||||
<asp:UpdatePanel ID="UPGvFolioGarantia" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -361,80 +361,90 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpGarantiasDetalle" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivGarantiasDetalle" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label Text="Ver Ajustes de garantía" runat="server" />
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">Folio Garantia:<asp:Label ID="LblFolio" Text="" Font-Bold="true" runat="server" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="Widthall" style="text-align: right!important; ">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvGarantiasDetalle.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivGarantiasDetalle" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" ID="UpGarantiasDetalle" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label Text="Ver Ajustes de garantía" runat="server" />
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
Folio Garantia:<asp:Label ID="LblFolio" Text="" Font-Bold="true" runat="server" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div style="overflow-y: auto; height: 400px; min-width: 1200px;" runat="server">
|
||||
<asp:GridView ID="GvGarantiasDetalle" runat="server" AutoGenerateColumns="false" Width="100%" EmptyDataText="No se encontraron datos" CssClass="table table-striped table-hover Widthall"
|
||||
OnRowDataBound="GvGarantiasDetalle_RowDataBound" DataKeyNames="Consecutivo,CodigoCliente,CodigoSucursal,Codigo,CodigoProducto2,CodigoTipoUso,CodigoTipoDefecto,CodigoEnsamble,CodigoLinea,CodigoInspeccion,FechaVenta,FechaReclamacion,TipoComprobante,Comprobante,Autorizo,Comentarios,ClaveAutorizacion" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Consecutivo" HeaderText="Consec" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="FolioRemision" HeaderText="Remisión" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="Cliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
|
||||
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="PS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||
<asp:BoundField DataField="TipoUso" HeaderText="Tipo Uso" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="CodigoEnsamble" HeaderText="C. Ensamble" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="CodigoLinea" HeaderText="C. Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="CodigoInspeccion" HeaderText="C. Inspección" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="TipoComprobanteTexto" HeaderText="Tipo Comp." ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="Comprobante" HeaderText="Comprobante" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="FechaAjuste" HeaderText="Fecha Ajuste" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:TemplateField HeaderText="PDF" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25px">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HlDescargarPDF" runat="server" Text="<i class='fa fa-file-pdf-o' style='font-size:15px; font-weight:bold; color:dimgray;'></i>" Target="_blank" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
Estatus:
|
||||
<asp:DropDownList ID="DdlEstatusConsecutivo" runat="server" CssClass="select2me" Width="70%" AutoPostBack="true" OnSelectedIndexChanged="DdlEstatusConsecutivo_SelectedIndexChanged">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Selected="True">Vigente</asp:ListItem>
|
||||
<asp:ListItem Value="2">Cancelada</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="Widthall" style="text-align: right!important;">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvGarantiasDetalle.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvFolioGarantia.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGenerarTxt" Text="Generar Archivo" CssClass="btn btn-primary" runat="server" OnClick="BtnGenerarTxt_Click" />
|
||||
<asp:Button ID="BtnExportarExcel" Text="Generar Excel" CssClass="btn btn-success" runat="server" OnClick="BtnExportarExcel_Click" />
|
||||
<asp:HyperLink ID="HplGenerarSalida" Text="Generar Salida" CssClass="btn btn-warning " runat="server" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnGenerarTxt" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div style="overflow-y: auto; height: 400px; min-width: 1200px;" runat="server">
|
||||
<asp:GridView ID="GvGarantiasDetalle" runat="server" AutoGenerateColumns="false" Width="100%" EmptyDataText="No se encontraron datos" CssClass="table table-striped table-hover Widthall"
|
||||
OnRowDataBound="GvGarantiasDetalle_RowDataBound" DataKeyNames="Consecutivo,CodigoCliente,CodigoSucursal,Codigo,CodigoProducto2,CodigoTipoUso,CodigoTipoDefecto,CodigoEnsamble,CodigoLinea,CodigoInspeccion,FechaVenta,FechaReclamacion,TipoComprobante,Comprobante,Autorizo,Comentarios,ClaveAutorizacion" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Consecutivo" HeaderText="Consec" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="EstatusConsecutivo" HeaderText="Estatus Consec" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="FolioRemision" HeaderText="Remisión" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="FolioFactura" HeaderText="Factura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="Cliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
|
||||
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="PS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
|
||||
<asp:BoundField DataField="TipoUso" HeaderText="Tipo Uso" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="CodigoEnsamble" HeaderText="C. Ensamble" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="CodigoLinea" HeaderText="C. Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="CodigoInspeccion" HeaderText="C. Inspección" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="TipoComprobanteTexto" HeaderText="Tipo Comp." ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="Comprobante" HeaderText="Comprobante" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
|
||||
<asp:BoundField DataField="FechaAjuste" HeaderText="Fecha Ajuste" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:TemplateField HeaderText="PDF" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25px">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HlDescargarPDF" runat="server" Text="<i class='fa fa-file-pdf-o' style='font-size:15px; font-weight:bold; color:dimgray;'></i>" Target="_blank" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGenerarTxt" Text="Generar Archivo" CssClass="btn btn-primary" runat="server" OnClick="BtnGenerarTxt_Click" />
|
||||
<asp:Button ID="BtnExportarExcel" Text="Generar Excel" CssClass="btn btn-success" runat="server" OnClick="BtnExportarExcel_Click" />
|
||||
<asp:HyperLink ID="HplGenerarSalida" Text="Generar Salida" CssClass="btn btn-warning " runat="server" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnGenerarTxt" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnExportarExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnExportarExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -223,10 +223,9 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
LblFolio.Text = GvRow.DataKey("FolioGarantia")
|
||||
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then
|
||||
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia, CveEstatusConsecutivo:=DdlEstatusConsecutivo.SelectedValue.ToEntero()) Then
|
||||
GvGarantiasDetalle.DataSource = ObjAcum.DtResultados
|
||||
HplGenerarSalida.NavigateUrl = "/Inventarios/TraspasoAlmacen.aspx?CveFolioGarantia=" & CveFolioGarantia
|
||||
|
||||
HplGenerarSalida.NavigateUrl = "/Inventarios/TraspasoAlmacen.aspx?CveFolioGarantia=" & CveFolioGarantia
|
||||
End If
|
||||
End Using
|
||||
GvGarantiasDetalle.DataBind()
|
||||
@@ -313,4 +312,15 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
Protected Sub BtnGenerarSalida_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlEstatusConsecutivo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia, CveEstatusConsecutivo:=DdlEstatusConsecutivo.SelectedValue.ToEntero()) Then
|
||||
GvGarantiasDetalle.DataSource = ObjAcum.DtResultados
|
||||
HplGenerarSalida.NavigateUrl = "/Inventarios/TraspasoAlmacen.aspx?CveFolioGarantia=" & CveFolioGarantia
|
||||
End If
|
||||
End Using
|
||||
GvGarantiasDetalle.DataBind()
|
||||
|
||||
UpGarantiasDetalle.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1185,7 +1185,7 @@ Public Class ClsAcumuladores
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetFoliosGarantiasDetalle(CveFolioGarantia As Integer, Optional CveGarantiaDetalle As Integer = -1) As Boolean
|
||||
Public Function GetFoliosGarantiasDetalle(CveFolioGarantia As Integer, Optional CveGarantiaDetalle As Integer = -1, Optional CveEstatusConsecutivo As Integer = -1, Optional Consec As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
SqlDataAdapter("PA_Acum_GarantiasDetalleFolioGet")
|
||||
@@ -1193,6 +1193,8 @@ Public Class ClsAcumuladores
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
|
||||
.Add("@CveGarantiaDetalle", SqlDbType.Int).Value = CveGarantiaDetalle
|
||||
.Add("@CveEstatusConsecutivo", SqlDbType.Int).Value = CveEstatusConsecutivo
|
||||
.Add("@Consec", SqlDbType.Int).Value = Consec
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1205,6 +1207,25 @@ Public Class ClsAcumuladores
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateGarantiaCancelacion(CveVenta As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
SqlDataAdapter("PA_Acum_GarantiasDetalleCancelacionUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveVenta
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un error al actualizar los movimientos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetSabanaVenta(Fecha As Date, CveOpcion As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -455,7 +455,7 @@
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConsecutivoAjuste" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtConsecutivoAjuste" CssClass="form-control" runat="server" MaxLength="25" AutoPostBack="true"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVConsecutivoAjuste" runat="server" ControlToValidate="TxtConsecutivoAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Consec.''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="VCEConsecutivoAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVConsecutivoAjuste"></ajax:ValidatorCalloutExtender>--%>
|
||||
<%--<label for="<%= TxtConsecutivoAjuste.ClientID.ToString()%>">Consec.:</label>--%>
|
||||
|
||||
@@ -3258,6 +3258,11 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not ValidaConsecutivo() Then
|
||||
Alert("Ya existe un consecutivo vigente en este folio", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
Try
|
||||
Dim CveTamaño As Integer = -1
|
||||
@@ -3489,6 +3494,29 @@ Partial Class Inventarios_RecepcionUsados
|
||||
UpAjuste.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub TxtConsecutivoAjuste_TextChanged(sender As Object, e As EventArgs) Handles TxtConsecutivoAjuste.TextChanged
|
||||
If Not ValidaConsecutivo() Then
|
||||
Alert("Ya existe un consecutivo vigente en este folio", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ValidaConsecutivo() As Boolean
|
||||
Dim Retorno As Boolean = True
|
||||
|
||||
If DdlFolioGarantia.SelectedValue.ToEntero() > 0 Then
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetFoliosGarantiasDetalle(DdlFolioGarantia.SelectedValue.ToEntero(), CveEstatusConsecutivo:=1, Consec:=TxtConsecutivoAjuste.Text.ToEntero()) Then
|
||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
Retorno = False
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#Region "P O L I Z A - V I R T U A L"
|
||||
Private Sub CreaDTmpDTPolizaVirtual()
|
||||
TmpDTPolizaVirtual = New DataTable
|
||||
|
||||
@@ -3076,7 +3076,7 @@
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConsecutivoAjuste" CssClass="form-control" runat="server" MaxLength="25" Enabled="false"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtConsecutivoAjuste" CssClass="form-control" runat="server" MaxLength="25" OnTextChanged="TxtConsecutivoAjuste_TextChanged"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVConsecutivoAjuste" runat="server" ControlToValidate="TxtConsecutivoAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Consec.''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="VCEConsecutivoAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVConsecutivoAjuste"></ajax:ValidatorCalloutExtender>--%>
|
||||
<label for="<%= TxtConsecutivoAjuste.ClientID.ToString()%>">Consec.:</label>
|
||||
|
||||
@@ -5319,6 +5319,12 @@ Partial Class PV
|
||||
Alert($"El folio de garantía no es valido.<br/> Clasificacion del Producto:{FolioGarantia.ClasificacionPS}.<br/>Tipo Folio:{FolioGarantia.TipoFolio}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not ValidaConsecutivo() Then
|
||||
Alert("Ya existe un consecutivo vigente en este folio", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If AgregarPS() Then
|
||||
@@ -7091,6 +7097,7 @@ Partial Class PV
|
||||
If Not CalculaMesesUso() Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Try
|
||||
TxtImporteAjuste.Text = "0.00"
|
||||
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" AndAlso DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
@@ -8180,4 +8187,26 @@ Partial Class PV
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
Protected Sub TxtConsecutivoAjuste_TextChanged(sender As Object, e As EventArgs)
|
||||
If Not ValidaConsecutivo() Then
|
||||
Alert("Ya existe un consecutivo vigente en este folio", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ValidaConsecutivo() As Boolean
|
||||
Dim Retorno As Boolean = True
|
||||
|
||||
If DdlFolioGarantia.SelectedValue.ToEntero() > 0 Then
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetFoliosGarantiasDetalle(DdlFolioGarantia.SelectedValue.ToEntero(), CveEstatusConsecutivo:=1, Consec:=TxtConsecutivoAjuste.Text.ToEntero()) Then
|
||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
Retorno = False
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user