--
This commit is contained in:
@@ -516,7 +516,7 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Enabled="false"></asp:TextBox>
|
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Width="100px" Enabled="false"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||||
|
|||||||
@@ -966,8 +966,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
||||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||||
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||||
'e.Row.FCTextBox("TxtCaducidad").readonly = True
|
e.Row.FCTextBox("TxtCaducidad").readonly = True
|
||||||
e.Row.FCTextBox("TxtCaducidad").enabled = True
|
' e.Row.FCTextBox("TxtCaducidad").enabled = True
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
||||||
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||||
@@ -975,8 +975,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||||
e.Row.FCTextBox("TxtLote").Visible = True
|
e.Row.FCTextBox("TxtLote").Visible = True
|
||||||
' e.Row.FCTextBox("TxtLote").readonly = True
|
e.Row.FCTextBox("TxtLote").readonly = True
|
||||||
e.Row.FCTextBox("TxtLote").enabled = True
|
'e.Row.FCTextBox("TxtLote").enabled = True
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtLote").Visible = False
|
e.Row.FCTextBox("TxtLote").Visible = False
|
||||||
End If
|
End If
|
||||||
@@ -2463,18 +2463,21 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
For Each Dr As DataRow In DtDatos.Rows
|
For Each Dr As DataRow In DtDatos.Rows
|
||||||
CantidadPendiente = Dr("CantidadGV").ToString().ToDecimal - Dr("CantidadTraspaso").ToString().ToDecimal - CantidadEntradaSinCosto
|
CantidadPendiente = Dr("CantidadGV").ToString().ToDecimal - Dr("CantidadTraspaso").ToString().ToDecimal - CantidadEntradaSinCosto
|
||||||
If CantidadPendiente > 0 Then
|
If CantidadPendiente > 0 Then
|
||||||
Dim PU As Decimal = 0
|
Dim PU As Decimal = 0
|
||||||
|
Dim CveSeccionAlmacen As Integer = If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)
|
||||||
'SI FUE POR SERIE
|
|
||||||
|
'SI FUE POR SERIE
|
||||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec")))
|
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec")))
|
||||||
DtDetalleLote = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec")))
|
DtDetalleLote = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec")))
|
||||||
If DtDetalle.Rows.Count > 0 Then
|
If DtDetalle.Rows.Count > 0 Then
|
||||||
For Each Dr1 As DataRow In DtDetalle.Rows
|
For Each Dr1 As DataRow In DtDetalle.Rows
|
||||||
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
|
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
|
||||||
PU = DtExistencias.FiltroPrimeroValor("PU", $"CveTipoAlmacenDevolucion <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
|
CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"ISNULL(CveTipoAlmacenDevolucion,0) <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero
|
||||||
|
|
||||||
|
PU = DtExistencias.FiltroPrimeroValor("PU", $"CveTipoAlmacenDevolucion <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, Serie:=Dr1("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, Serie:=Dr1("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
|
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
|
||||||
Exit For
|
Exit For
|
||||||
@@ -2483,10 +2486,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ElseIf DtDetalleLote.Rows.Count > 0 Then
|
ElseIf DtDetalleLote.Rows.Count > 0 Then
|
||||||
For Each Dr1 As DataRow In DtDetalleLote.Rows
|
For Each Dr1 As DataRow In DtDetalleLote.Rows
|
||||||
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
|
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
|
||||||
|
CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero
|
||||||
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
|
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
|
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
|
||||||
Exit For
|
Exit For
|
||||||
@@ -2497,7 +2501,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()}").ToString().ToDecimal
|
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()}").ToString().ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar.")
|
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar.")
|
||||||
Exit For
|
Exit For
|
||||||
|
|||||||
Reference in New Issue
Block a user