-- cambio en selección de productos para SMS
This commit is contained in:
@@ -40086,13 +40086,13 @@ Partial Class Ventas
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||
DvModalRequiereOSFecha.Visible = False
|
||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||
DVGvProductosProcedimiento.Visible = False
|
||||
DVGvPSProced.Visible = False
|
||||
Case "4" 'Consignación
|
||||
ChkRequiereTecnicoModal.Checked = False
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||
DvModalRequiereOSFecha.Visible = False
|
||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||
DVGvProductosProcedimiento.Visible = False
|
||||
DVGvPSProced.Visible = False
|
||||
Case "99" ' Otros
|
||||
LnkDvModalTipoVentaAceptar.Visible = False
|
||||
UpDvModalTipoVenta.Update()
|
||||
@@ -40181,9 +40181,9 @@ Partial Class Ventas
|
||||
DdlMedicoModal.SelectedValueExist(-1)
|
||||
DdlProcedimientoModal.SelectedValueExist(-1)
|
||||
|
||||
GvProductosProcedimiento.DataSource = Nothing
|
||||
GvProductosProcedimiento.DataBind()
|
||||
DVGvProductosProcedimiento.Visible = False
|
||||
GvPSProced.DataSource = Nothing
|
||||
GvPSProced.DataBind()
|
||||
DVGvPSProced.Visible = False
|
||||
|
||||
|
||||
LblDvModalTipoVentaTitulo.Text = "Tipo de Venta"
|
||||
@@ -40233,7 +40233,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||
For Each GvRow As GridViewRow In GvPSProced.Rows
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
@@ -40316,7 +40316,7 @@ Partial Class Ventas
|
||||
|
||||
Dim CountPsAgregados As Integer = 0
|
||||
|
||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||
For Each GvRow As GridViewRow In GvPSProced.Rows
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
@@ -40360,7 +40360,7 @@ Partial Class Ventas
|
||||
UpCliente.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvProductosProcedimiento_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
Protected Sub GvPSProced_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DataKey("Precio").ToDecimal = 0 Then
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||
@@ -40374,26 +40374,30 @@ Partial Class Ventas
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProcedimientoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaPSProcedimiento(DdlProcedimientoModal.SelectedValue.ToEntero, DdlClienteSucursalCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, CveClienteSucursalL:=DdlClienteSucursalSucursal, CveTipoVentaL:=RBLTipoVenta.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
Protected Sub ChkVerTodosPS_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
Private Sub CargaPSProcedimiento(CveProcedimiento As Integer, CveClienteL As Integer, CveSubProyectoL As Integer, Optional CveClienteSucursalL As Integer = -1, Optional CveTipoVentaL As Integer = -1)
|
||||
If CveProcedimiento > 0 Then
|
||||
CargaPSProcedimiento(DdlProcedimientoModal.SelectedValue.ToEntero, DdlClienteSucursalCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, CveClienteSucursalL:=DdlClienteSucursalSucursal, CveTipoVentaL:=RBLTipoVenta.SelectedValue.ToEntero, AplicaTodos:=ChkVerTodosPS.Checked)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPSProcedimiento(CveProcedimiento As Integer, CveClienteL As Integer, CveSubProyectoL As Integer, Optional CveClienteSucursalL As Integer = -1, Optional CveTipoVentaL As Integer = -1, Optional AplicaTodos As Boolean = False)
|
||||
If CveProcedimiento > 0 OrElse AplicaTodos Then
|
||||
If AplicaTodos Then CveProcedimiento = -1
|
||||
Dim objVenta As New ClsVentas
|
||||
If objVenta.GetProcedimientoProducto(CveProcedimiento, 1, UsuarioActual.CveEmpresa, CveClienteL, CveSubProyectoL, CveClienteSucursalL, CveTipoVentaL) Then
|
||||
GvProductosProcedimiento.DataSource = objVenta.DtResultados
|
||||
If objVenta.GetProcedimientoProductoListaPrecio(CveProcedimiento, UsuarioActual.CveEmpresa, CveClienteL, CveSubProyectoL, CveClienteSucursalL, CveTipoVentaL) Then
|
||||
GvPSProced.DataSource = objVenta.DtResultados
|
||||
End If
|
||||
objVenta.Dispose()
|
||||
Else
|
||||
GvProductosProcedimiento.DataSource = Nothing
|
||||
GvPSProced.DataSource = Nothing
|
||||
End If
|
||||
|
||||
GvProductosProcedimiento.DataBind()
|
||||
DVGvProductosProcedimiento.Visible = True
|
||||
GvPSProced.DataBind()
|
||||
DVGvPSProced.Visible = True
|
||||
|
||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||
For Each GvRow As GridViewRow In GvPSProced.Rows
|
||||
If RBLTipoVenta.SelectedValue = "2" Then
|
||||
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
@@ -41632,5 +41636,6 @@ Partial Class Ventas
|
||||
ObjVentas.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user