Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCERemisiones" runat="server" HighlightCssClass="vco" TargetControlID="RFVRemisiones" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
<li runat="server" id="LiAlmacen" visible="false">Almacén:
|
||||
<asp:DropDownList ID="DdlAlmacenFiltro" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="150px"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlAlmacenFiltro" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="150px" ></asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -508,8 +508,32 @@
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Sección Alm" ReadOnly="true" DataField="SeccionAlmacen" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Serie" ReadOnly="true" DataField="Serie" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
<asp:BoundField HeaderText="Lote" ReadOnly="true" DataField="Lote" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Caducidad" ReadOnly="true" DataField="FechaCaducidad" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" >
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" Width="85px" class="form-control input-sm" Text='<%# Eval("Lote") %>' runat="server" Visible="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" >
|
||||
<ItemTemplate>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Text='<%# Eval("FechaCaducidad") %>' Style="width: 80px" runat="server" Visible="false"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
<asp:Label ID="LbTotal" runat="server" />
|
||||
|
||||
@@ -72,6 +72,19 @@ Partial Class Inventarios_Consignaciones
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Property ValidaLoteCaducidad As Boolean
|
||||
Get
|
||||
If ViewState("ValidaLoteCaducidad") Is Nothing Then
|
||||
ViewState("ValidaLoteCaducidad") = False
|
||||
End If
|
||||
Return CType(ViewState("ValidaLoteCaducidad"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ValidaLoteCaducidad") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "Inicializa Valores"
|
||||
@@ -364,6 +377,32 @@ Partial Class Inventarios_Consignaciones
|
||||
CargaDatos(DdlRemisiones.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
Private Sub CargaDatos(CveConsignacionTemp As Integer)
|
||||
|
||||
If DdlConcepto.SelectedValue.ToEntero.Contiene(12, 8) Then
|
||||
Dim CveSubProyectoValidaCaducidad As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenFiltro.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
'RMF condición temporal
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyectoValidaCaducidad.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
||||
ValidaLoteCaducidad = True
|
||||
|
||||
'activa lote
|
||||
ThLote.Visible = True
|
||||
ThCaducidad.Visible = True
|
||||
|
||||
|
||||
Else
|
||||
ValidaLoteCaducidad = False
|
||||
|
||||
'activa lote
|
||||
ThLote.Visible = False
|
||||
ThCaducidad.Visible = False
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
|
||||
If ObjInventario.ConsignacionesDetalle(CveConsignacionTemp, DdlAlmacenFiltro.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
@@ -538,6 +577,24 @@ Partial Class Inventarios_Consignaciones
|
||||
e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", String.Format("RecalculaEdit({0},this,{1});", e.Row.FCTextBox("TxtCantidad").ClientID, e.Row.FCLabel("LbTotal").ClientID))
|
||||
End If
|
||||
|
||||
If (ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
|
||||
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||
Else
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
||||
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||
End If
|
||||
|
||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||
e.Row.FCTextBox("TxtLote").Visible = True
|
||||
Else
|
||||
e.Row.FCTextBox("TxtLote").Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -940,8 +997,14 @@ Partial Class Inventarios_Consignaciones
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
Dim Lote As String = "-1"
|
||||
Dim FechaCaducidad As Date = MinFecha
|
||||
If Gvr.FCTextBox("TxtLote").Text.Trim <> "" Then Lote = Gvr.FCTextBox("TxtLote").Text.Trim
|
||||
If Gvr.FCTextBox("TxtCaducidad").Text.ToDate > MinFecha Then FechaCaducidad = Gvr.FCTextBox("TxtCaducidad").Text.ToDate
|
||||
|
||||
'AGREGAMOS MOVTOS DETALLE
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("Serie").ToString, Gvr.DataKey("Lote").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("Serie").ToString, Lote, FechaCaducidad:=FechaCaducidad) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un Error al guardar los movimientos"
|
||||
Exit For
|
||||
@@ -1126,20 +1189,26 @@ Partial Class Inventarios_Consignaciones
|
||||
FolioSalida = ObjInventario.Folio
|
||||
End If
|
||||
|
||||
If CveMovimientoSalida > 0 Then
|
||||
If MovtoNew Then
|
||||
CveMovtosSalida.Add(CveMovimientoSalida)
|
||||
FoliosSalida.Add(FolioSalida)
|
||||
MovtoNew = False
|
||||
End If
|
||||
Else
|
||||
TextoError = "No se pudo generar el movimiento de salida correctamente"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
If CveMovimientoSalida > 0 Then
|
||||
If MovtoNew Then
|
||||
CveMovtosSalida.Add(CveMovimientoSalida)
|
||||
FoliosSalida.Add(FolioSalida)
|
||||
MovtoNew = False
|
||||
End If
|
||||
Else
|
||||
TextoError = "No se pudo generar el movimiento de salida correctamente"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
Dim Lote As String = "-1"
|
||||
Dim FechaCaducidad As Date = MinFecha
|
||||
If Gvr.FCTextBox("TxtLote").Text.Trim <> "" Then Lote = Gvr.FCTextBox("TxtLote").Text.Trim
|
||||
If Gvr.FCTextBox("TxtCaducidad").Text.ToDate > MinFecha Then FechaCaducidad = Gvr.FCTextBox("TxtCaducidad").Text.ToDate
|
||||
|
||||
'AGREGAMOS MOVTOS DETALLE
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, "", "") Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, "", Lote, FechaCaducidad:=FechaCaducidad) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un Error al guardar los movimientos detalle de la salida"
|
||||
Exit For
|
||||
@@ -1744,4 +1813,6 @@ Partial Class Inventarios_Consignaciones
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -956,8 +956,9 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
If Gvr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
|
||||
Dim Lote As String = "-1"
|
||||
Dim FechaCaducidad As Date = MinFecha
|
||||
If Gvr.datakey("Lote") <> "" Then Lote = Gvr.datakey("Lote")
|
||||
If Gvr.datakey("FechaCaducidad").todate > MinFecha Then FechaCaducidad = Gvr.datakey("FechaCaducidad").todate
|
||||
If Gvr.FCTextBox("TxtLote").Text.Trim <> "" Then Lote = Gvr.FCTextBox("TxtLote").Text.Trim
|
||||
'If Gvr.datakey("FechaCaducidad").todate > MinFecha Then FechaCaducidad = Gvr.datakey("FechaCaducidad").todate
|
||||
If Gvr.FCTextBox("TxtCaducidad").Text.ToDate > MinFecha Then FechaCaducidad = Gvr.FCTextBox("TxtCaducidad").Text.ToDate
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidad").Text.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, CveSeccionAlmacen:=Gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=Gvr.DataKey("Serie").ToString, Lote:=Lote, FechaCaducidad:=FechaCaducidad, Observaciones:=Gvr.DataKey("Observaciones").ToString, CveMovimientoDetalleEntrada:=Gvr.DataKey("CveMovimientoDetalle").toentero) Then
|
||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
||||
@@ -968,6 +969,8 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DiccionarioLote.Add(ObjInventario.CveMovimientoDetalle, Gvr.FCTextBox("TxtLote").Text)
|
||||
DiccionarioCaducidad.Add(ObjInventario.CveMovimientoDetalle, Gvr.FCTextBox("TxtCaducidad").Text.todate)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
Cont += 1
|
||||
Next
|
||||
|
||||
Reference in New Issue
Block a user