Verificar existencias al agregar series
This commit is contained in:
@@ -1307,26 +1307,26 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
|
|
||||||
'Valida Existencia
|
'Valida Existencia
|
||||||
'If TipoMovimiento = 1 Then
|
If TipoMovimiento = 1 Then
|
||||||
' Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
' Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||||
' If Existencia < 1 Then
|
If Existencia < 1 Then
|
||||||
' Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
||||||
' RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error2")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error2")
|
||||||
' ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
' Exit Sub
|
Exit Sub
|
||||||
' End If
|
End If
|
||||||
' ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
'Else
|
Else
|
||||||
' If DtExistencias IsNot Nothing Then
|
If DtExistencias IsNot Nothing Then
|
||||||
' Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
|
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
|
||||||
' If Existencia < 1 Then
|
If Existencia < 1 Then
|
||||||
' Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
||||||
' RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error3")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error3")
|
||||||
' Exit Sub
|
Exit Sub
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
'End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim Row = DtDatosDetalle.NewRow
|
Dim Row = DtDatosDetalle.NewRow
|
||||||
|
|||||||
Reference in New Issue
Block a user