-- parametro de lote/caducidad
This commit is contained in:
@@ -383,7 +383,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
RegistraScript(String.Format("$('#{0}').modal();", "ModalPS"))
|
RegistraScript(String.Format("$('#{0}').modal();", "ModalPS"))
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Handles BtnAgregarPS.Click
|
Private Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Handles BtnAgregarPS.Click
|
||||||
Dim Existencia As Boolean
|
|
||||||
If Not DdlProductoServicio.SelectedValue.ToEntero > 0 Then
|
If Not DdlProductoServicio.SelectedValue.ToEntero > 0 Then
|
||||||
Alert("Tiene que seleccionar un producto.", TipoMensaje.MsgAdvertencia)
|
Alert("Tiene que seleccionar un producto.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -419,8 +419,8 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
End Sub
|
End Sub
|
||||||
Private Function AddPSTemporal() As Boolean
|
Private Function AddPSTemporal() As Boolean
|
||||||
Dim Row As DataRow = TempDT.NewRow()
|
Dim Row As DataRow = TempDT.NewRow()
|
||||||
Dim Lote As String
|
Dim Lote As String = "-1"
|
||||||
Dim FechaCaducidad As Date
|
Dim FechaCaducidad As Date = MinFecha
|
||||||
Row("Cantidad") = TxtCantidad.Text.Trim.ToDouble
|
Row("Cantidad") = TxtCantidad.Text.Trim.ToDouble
|
||||||
Row("CvePS") = DdlProductoServicio.SelectedValue.ToEntero
|
Row("CvePS") = DdlProductoServicio.SelectedValue.ToEntero
|
||||||
Row("CodigoPS") = DdlProductoServicio.SelectedText
|
Row("CodigoPS") = DdlProductoServicio.SelectedText
|
||||||
@@ -465,7 +465,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
If Existencia = 0 Then
|
If Existencia = 0 Then
|
||||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
Alert($"No hay existencia suficiente del producto. Solo hay en existencia: {Existencia}", TipoMensaje.MsgAdvertencia)
|
Alert($"No hay existencia suficiente del producto. Solo hay en existencia: {Existencia - TempDT.SUM("Cantidad", $"CvePS = {DdlProductoServicio.SelectedValue.ToEntero} AND CveUM = {DdlUM.SelectedValue.ToEntero}")}", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -580,6 +580,8 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
RowTemp("CveUM") = row.DataKey("CveUM").ToEntero
|
RowTemp("CveUM") = row.DataKey("CveUM").ToEntero
|
||||||
RowTemp("UnidadMedida") = row.DataKey("UM")
|
RowTemp("UnidadMedida") = row.DataKey("UM")
|
||||||
RowTemp("Observaciones") = ""
|
RowTemp("Observaciones") = ""
|
||||||
|
RowTemp("Lote") = "-1"
|
||||||
|
RowTemp("FechaCaducidad") = MinFecha
|
||||||
'RowTemp("CveDireccionEnvio") = DdlDireccionEnvio.SelectedValue
|
'RowTemp("CveDireccionEnvio") = DdlDireccionEnvio.SelectedValue
|
||||||
'RowTemp("DireccionEnvio") = IIf(DdlDireccionEnvio.SelectedValue = "-1", "", DdlDireccionEnvio.SelectedItem)
|
'RowTemp("DireccionEnvio") = IIf(DdlDireccionEnvio.SelectedValue = "-1", "", DdlDireccionEnvio.SelectedItem)
|
||||||
RowTemp("CveContratoDetalle") = row.DataKey("CveContratoDetalle")
|
RowTemp("CveContratoDetalle") = row.DataKey("CveContratoDetalle")
|
||||||
@@ -1005,7 +1007,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
If Existencia = 0 Then
|
If Existencia = 0 Then
|
||||||
Alert($"No hay existencia del producto: {CodigoPS}", TipoMensaje.MsgAdvertencia)
|
Alert($"No hay existencia del producto: {CodigoPS}", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
Alert($"No hay existencia suficiente del producto: {CodigoPS}, Solo hay en existencia: {Existencia}", TipoMensaje.MsgAdvertencia)
|
Alert($"No hay existencia suficiente del producto: {CodigoPS}, Solo hay en existencia: {Existencia - TempDT.SUM("Cantidad", $"CvePS = {RowTemp("CvePS").ToString.ToEntero} AND CveUM = {RowTemp("CveUM").ToString.ToEntero}")}", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
TempDT.Rows.Add(RowTemp)
|
TempDT.Rows.Add(RowTemp)
|
||||||
|
|||||||
Reference in New Issue
Block a user