--sugiere serie si es rol 1

This commit is contained in:
rrene
2020-11-24 10:47:18 -07:00
parent 319edf80e5
commit 70b30b2f10
2 changed files with 22 additions and 5 deletions

View File

@@ -630,7 +630,7 @@
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="40%" />
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" CommandName="Delete" OnClientClick="return confirm('¿Desea borrar el registro?')"></asp:LinkButton>
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" OnClientClick="return confirm('¿Desea borrar el registro?')"></asp:LinkButton>
</ItemTemplate>
<ItemStyle Width="20%"></ItemStyle>
</asp:TemplateField>

View File

@@ -900,6 +900,22 @@ Partial Class Inventarios_EntregaAlmacen
LbCantidad.Text = e.Row.DBCampo("CantidadF")
LbCantidad2.Text = e.Row.DBCampo("CantidadF")
AgregaSerie(e.Row.DBCampo("ObservacionesDetalle"), 3)
End If
If TipoDocto = "Ing" AndAlso e.Row.DBCampo("ObservacionesDetalle").Length > 8 AndAlso DdlAlmacen.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.CveRol = 1 Then
Dim Str = e.Row.DBCampo("ObservacionesDetalle").Replace(",", " ").Replace(".", " ").Replace(vbTab, " ").Replace(vbLf, " ").Split(" "c)
CveConsecSerie = e.Row.DBCampo("Consec").ToString().ToEntero()
PSSerie = e.Row.DBCampo("PS").ToString()
CvePSSerie = e.Row.DBCampo("CvePS").ToEntero()
CveUMSerie = e.Row.DBCampo("CveUM").ToEntero()
LbCantidad.Text = e.Row.DBCampo("CantidadF")
LbCantidad2.Text = e.Row.DBCampo("CantidadF")
For Each st As String In Str
If Not st.Contiene("", "/") Then
AgregaSerie(st, 3)
End If
Next
End If
Else
@@ -1156,10 +1172,10 @@ Partial Class Inventarios_EntregaAlmacen
Exit Sub
End If
Dim AplicaCaducidad = False
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then
AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False)
End If
Dim AplicaCaducidad As Boolean = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltroPrimeroValor("AplicaCaducidad", "") = "True"
'If GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then
' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False)
'End If
'Valida Existencia
@@ -1172,6 +1188,7 @@ Partial Class Inventarios_EntregaAlmacen
ObjInventarios.Dispose()
Exit Sub
End If
ObjInventarios.Dispose()
Else
If DtExistencias IsNot Nothing Then
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")