diff --git a/Inventarios/PrestamosdeProveedor.aspx b/Inventarios/PrestamosdeProveedor.aspx index 2adadb1bd..c409b281a 100644 --- a/Inventarios/PrestamosdeProveedor.aspx +++ b/Inventarios/PrestamosdeProveedor.aspx @@ -126,7 +126,7 @@ - + <%-- @@ -145,10 +145,28 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/Inventarios/PrestamosdeProveedor.aspx.vb b/Inventarios/PrestamosdeProveedor.aspx.vb index fc076a2dc..d8c61f1b8 100644 --- a/Inventarios/PrestamosdeProveedor.aspx.vb +++ b/Inventarios/PrestamosdeProveedor.aspx.vb @@ -66,7 +66,12 @@ Partial Class Inventarios_PrestamosdeProveedor CveMovimiento = Dr("CveMovimiento").ToString.ToEntero End If - End If + End If + + GvD.Columns(6).Visible = ObjInv.DtResultados.MAX("Serie") <> "" + GvD.Columns(7).Visible = ObjInv.DtResultados.MAX("Lote") <> "" + GvD.Columns(8).Visible = ObjInv.DtResultados.MAX("FechaCaducidad").ToDate > MinFecha + GvD.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147) ObjInv.Dispose() GvD.DataBind() @@ -90,18 +95,35 @@ Partial Class Inventarios_PrestamosdeProveedor Else If TxtFolioEntrega.Text <> "" Then e.Row.FCCheckBox("Chk").Visible = True - e.Row.FCTextBox("TxtCantidad").Enabled = True + e.Row.FCTextBox("TxtCantidad").Enabled = True + + If e.Row.DataKey("AplicaLote").ToString = "True" Then + e.Row.FCLiteral("LtlLote").Visible = False + e.Row.FCTextBox("TxtLote").Visible = True + + End If + + If e.Row.DataKey("AplicaCaducidad").ToString = "True" Then + e.Row.FCLiteral("LtlFechaCaducidad").Visible = False + e.Row.FCTextBox("TxtFechaCaducidad").Visible = True + + End If + + End If e.Row.FCTextBox("TxtCantidad").Visible = True e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", String.Format("ValidaCantidad(this,{0});", e.Row.DBCampo("Cantidad"))) + + + + End If + + ''FUNCIONALIDAD PISTOLA DE CODIGOS + 'If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then + ' e.Row.FCTextBox("TxtCantidad").Enabled = False + 'End If + End If - - ''FUNCIONALIDAD PISTOLA DE CODIGOS - 'If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then - ' e.Row.FCTextBox("TxtCantidad").Enabled = False - 'End If - - End If End Sub Protected Sub BtnRecibir_Click(sender As Object, e As EventArgs) @@ -169,7 +191,7 @@ Partial Class Inventarios_PrestamosdeProveedor If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal > 0 Then CveMovimientoDetalleEntrada = gvr.DataKey("CveMovimientoDetalle").ToString.ToEntero CvePS = gvr.DataKey("CvePS").ToString.ToEntero - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.DataKey("Lote").ToString, FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToString.ToDate) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.FCTextBox("TxtLote").ToString, FechaCaducidad:=gvr.FCTextBox("TxtFechaCaducidad").ToString.ToDate) Then ErrorMovInv = True TextoError = "Ocurrió un error al guardar los movimientos de salida" Exit For