Cantidad minima en cada tipo de promocion
This commit is contained in:
@@ -104,7 +104,7 @@ Partial Class Ventas_Promociones
|
||||
DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
GvDatos.Columns(7).Visible = True
|
||||
GvDatos.Columns(8).Visible = True
|
||||
DivRin.Visible = True
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then
|
||||
@@ -235,7 +235,7 @@ Partial Class Ventas_Promociones
|
||||
LbPUActual.Text = ""
|
||||
DdlTipoPromocion.SelectedValue = "-1"
|
||||
TxtPromocionConcepto.Text = ""
|
||||
TxtCantMinima.Text = ""
|
||||
TxtCantMinima.Text = "1"
|
||||
|
||||
ChkRestricciones.Checked = False
|
||||
'DivRestricciones.Visible = False
|
||||
@@ -259,6 +259,11 @@ Partial Class Ventas_Promociones
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtCantMinima.Text.ToEntero <= 0 Then
|
||||
Alert("La cantidad minima debe ser de 1", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Dr As DataRow = Nothing
|
||||
|
||||
If CveConsecutivo >= 0 Then
|
||||
@@ -291,11 +296,7 @@ Partial Class Ventas_Promociones
|
||||
Dr("PUPromocion") = LbPUActual.Text.ToDecimal - (LbPUActual.Text.ToDecimal * TxtPromocionConcepto.Text.ToDecimal / 100)
|
||||
End If
|
||||
|
||||
If DdlTipoPromocion.SelectedValue.ToEntero = 3 Then
|
||||
Dr("CantidadMinima") = TxtCantMinima.Text.ToEntero
|
||||
Else
|
||||
Dr("CantidadMinima") = 1
|
||||
End If
|
||||
Dr("CantidadMinima") = TxtCantMinima.Text.ToEntero
|
||||
|
||||
If ChkRestricciones.Checked Then
|
||||
Dr("AplicaRestriccionTexto") = "Si"
|
||||
@@ -369,7 +370,7 @@ Partial Class Ventas_Promociones
|
||||
|
||||
LbPUActual.Text = Gvr.DataKey("PUAnterior").FormatoNumero
|
||||
DdlTipoPromocion.SelectedValue = Gvr.DataKey("CveTipoPromocion")
|
||||
DdlTipoPromocion_SelectedIndexChanged(sender, Nothing)
|
||||
'DdlTipoPromocion_SelectedIndexChanged(sender, Nothing)
|
||||
TxtPromocionConcepto.Text = Gvr.DataKey("Promocion").FormatoNumero(4)
|
||||
TxtCantMinima.Text = Gvr.DataKey("CantidadMinima")
|
||||
|
||||
@@ -533,11 +534,11 @@ Partial Class Ventas_Promociones
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub DdlTipoPromocion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If DdlTipoPromocion.SelectedValue = "3" Then
|
||||
DivCantMinima.Visible = True
|
||||
Else
|
||||
DivCantMinima.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
'Protected Sub DdlTipoPromocion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoPromocion.SelectedIndexChanged
|
||||
' If DdlTipoPromocion.SelectedValue = "3" Then
|
||||
' DivCantMinima.Visible = True
|
||||
' Else
|
||||
' DivCantMinima.Visible = False
|
||||
' End If
|
||||
'End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user