Se agregaron campos para registrar el descuento por marca

This commit is contained in:
janeth arvizu
2019-10-09 10:26:22 -07:00
parent d03493af5c
commit fabc1e6ceb
2 changed files with 56 additions and 14 deletions

View File

@@ -8213,6 +8213,8 @@ Partial Class Clientes
DTPorcentajeTemp.Columns.Add("PorcentajeProducto", GetType(Decimal))
DTPorcentajeTemp.Columns.Add("PorcentajeProducto2", GetType(Decimal))
DTPorcentajeTemp.Columns.Add("PorcentajeProducto3", GetType(Decimal))
DTPorcentajeTemp.Columns.Add("ProntoPago", GetType(Decimal))
DTPorcentajeTemp.Columns.Add("Plazo", GetType(Integer))
DTPorcentajeTemp.Columns.Add("Estatus", GetType(String))
DTPorcentajePrecios = DTPorcentajeTemp.Clone
End Sub
@@ -8252,6 +8254,8 @@ Partial Class Clientes
txtPorcentaje.Text = ""
txtPorcentaje2.Text = ""
txtPorcentaje3.Text = ""
txtProntoPago.Text = ""
txtPlazo.Text = ""
DdlMarcaPS.SelectedValue = "-1"
End Sub
@@ -8266,6 +8270,8 @@ Partial Class Clientes
registro.Item("PorcentajeProducto") = txtPorcentaje.Text.ToDecimal
registro.Item("PorcentajeProducto2") = txtPorcentaje2.Text.ToDecimal
registro.Item("PorcentajeProducto3") = txtPorcentaje3.Text.ToDecimal
registro.Item("ProntoPago") = txtProntoPago.Text.ToDecimal
registro.Item("Plazo") = txtPlazo.Text.ToEntero
registro.Item("Estatus") = "I"
DTPorcentajePrecios.Rows.Add(registro)
CargaDTPorcentajePrecios(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
@@ -8317,6 +8323,8 @@ Partial Class Clientes
Dim PorcentajeProducto As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPorcentajeP").Text.ToDouble
Dim PorcentajeProducto2 As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPorcentajeP2").Text.ToDouble
Dim PorcentajeProducto3 As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPorcentajeP3").Text.ToDouble
Dim ProntoPago As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtProntoPagoP").Text.ToDouble
Dim Plazo As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPlazoP").Text.ToDouble
If PorcentajeProducto > 0 And PorcentajeProducto <= 100 And PorcentajeProducto2 >= 0 And PorcentajeProducto2 <= 100 And PorcentajeProducto3 >= 0 And PorcentajeProducto3 <= 100 Then
Dim No As Integer = GvM.Rows(e.RowIndex).DataKey("No").ToEntero
@@ -8327,6 +8335,8 @@ Partial Class Clientes
Drs(0)("PorcentajeProducto") = PorcentajeProducto
Drs(0)("PorcentajeProducto2") = PorcentajeProducto2
Drs(0)("PorcentajeProducto3") = PorcentajeProducto3
Drs(0)("ProntoPago") = ProntoPago
Drs(0)("Plazo") = Plazo
If Drs(0)("Estatus").ToString <> "I" Then
Drs(0)("Estatus") = "U"
End If
@@ -8354,11 +8364,11 @@ Partial Class Clientes
If Dr("Estatus").ToString <> "" Then
If Dr("Estatus").ToString = "I" Then
If Not ObjPS.AddPorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal, Dr("PorcentajeProducto2").ToString.ToDecimal, Dr("PorcentajeProducto3").ToString.ToDecimal, UsuarioActual.CveUsuario) Then
If Not ObjPS.AddPorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal, Dr("PorcentajeProducto2").ToString.ToDecimal, Dr("PorcentajeProducto3").ToString.ToDecimal, UsuarioActual.CveUsuario, Dr("ProntoPago").ToString.ToDecimal, Dr("Plazo").ToString.ToEntero) Then
TieneError = True
End If
ElseIf Dr("Estatus").ToString = "U" Then
If Not ObjPS.UpdatePorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal, Dr("PorcentajeProducto2").ToString.ToDecimal, Dr("PorcentajeProducto3").ToString.ToDecimal) Then
If Not ObjPS.UpdatePorcentajeMarcas(CveCliente, Dr("CveMarca").ToString.ToEntero, Dr("PorcentajeProducto").ToString.ToDecimal, Dr("PorcentajeProducto2").ToString.ToDecimal, Dr("PorcentajeProducto3").ToString.ToDecimal, Dr("ProntoPago").ToString.ToDecimal, Dr("Plazo").ToString.ToEntero) Then
TieneError = True
End If
ElseIf Dr("Estatus").ToString = "D" Then