-- parametro de lote/caducidad

This commit is contained in:
2021-04-27 17:54:26 -07:00
parent eb14032249
commit a1f6c0c749

View File

@@ -382,8 +382,8 @@ Partial Class Inventarios_TrasladoSolicitud
UpDatos.Update()
RegistraScript(String.Format("$('#{0}').modal();", "ModalPS"))
End Sub
Private Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Handles BtnAgregarPS.Click
Dim Existencia As Boolean
Private Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Handles BtnAgregarPS.Click
If Not DdlProductoServicio.SelectedValue.ToEntero > 0 Then
Alert("Tiene que seleccionar un producto.", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -419,8 +419,8 @@ Partial Class Inventarios_TrasladoSolicitud
End Sub
Private Function AddPSTemporal() As Boolean
Dim Row As DataRow = TempDT.NewRow()
Dim Lote As String
Dim FechaCaducidad As Date
Dim Lote As String = "-1"
Dim FechaCaducidad As Date = MinFecha
Row("Cantidad") = TxtCantidad.Text.Trim.ToDouble
Row("CvePS") = DdlProductoServicio.SelectedValue.ToEntero
Row("CodigoPS") = DdlProductoServicio.SelectedText
@@ -465,7 +465,7 @@ Partial Class Inventarios_TrasladoSolicitud
If Existencia = 0 Then
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
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
Return False
End If
@@ -580,8 +580,10 @@ Partial Class Inventarios_TrasladoSolicitud
RowTemp("CveUM") = row.DataKey("CveUM").ToEntero
RowTemp("UnidadMedida") = row.DataKey("UM")
RowTemp("Observaciones") = ""
'RowTemp("CveDireccionEnvio") = DdlDireccionEnvio.SelectedValue
'RowTemp("DireccionEnvio") = IIf(DdlDireccionEnvio.SelectedValue = "-1", "", DdlDireccionEnvio.SelectedItem)
RowTemp("Lote") = "-1"
RowTemp("FechaCaducidad") = MinFecha
'RowTemp("CveDireccionEnvio") = DdlDireccionEnvio.SelectedValue
'RowTemp("DireccionEnvio") = IIf(DdlDireccionEnvio.SelectedValue = "-1", "", DdlDireccionEnvio.SelectedItem)
RowTemp("CveContratoDetalle") = row.DataKey("CveContratoDetalle")
CodigoPS = RowTemp("CodigoPS").ToString
@@ -1005,7 +1007,7 @@ Partial Class Inventarios_TrasladoSolicitud
If Existencia = 0 Then
Alert($"No hay existencia del producto: {CodigoPS}", TipoMensaje.MsgAdvertencia)
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
TempDT.Rows.Add(RowTemp)