-
This commit is contained in:
@@ -13498,6 +13498,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If EsVentaMedica AndAlso ErrorList.Count = 0 AndAlso ChkRequiereTecnico.Checked Then
|
||||
|
||||
GeneraOS(ObjVentas.IniciaTransacSQL, ErrorList)
|
||||
|
||||
If ErrorList.Count = 0 Then
|
||||
@@ -13506,6 +13507,10 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjVentas.SincronizacionProcedimientoProducto(DdlProcedimiento.SelectedValue.ToEntero, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ErrorList.Add("Ocurrió un error al guardar los productos al procedimiento")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -35613,6 +35618,9 @@ Partial Class Ventas
|
||||
DdlMedicoModal.SelectedValueExist(-1)
|
||||
DdlProcedimientoModal.SelectedValueExist(-1)
|
||||
|
||||
GvProductosProcedimiento.DataSource = Nothing
|
||||
GvProductosProcedimiento.DataBind()
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
@@ -35671,6 +35679,44 @@ Partial Class Ventas
|
||||
|
||||
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
||||
|
||||
|
||||
|
||||
Dim CountPsAgregados As Integer = 0
|
||||
|
||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
|
||||
If Chk.Checked AndAlso Cantidad > 0 Then
|
||||
|
||||
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
Dim PU As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
|
||||
|
||||
If AgregarProductoServicio(Cantidad, CveUnidadMedida, Abreviatura, CveClasificacion, Clasificacion,
|
||||
CvePS, "", TxtObsPS.Text.TrimEnd, PU, 0,
|
||||
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
|
||||
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=-1,
|
||||
ImporteProntoPago:=0, ObjDescuento:=Nothing, CvePrecioLista:=-1, PrecioLista:="", NumTurnos:=0) Then
|
||||
CountPsAgregados = CountPsAgregados + 1
|
||||
Else
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If CountPsAgregados > 0 Then
|
||||
CalculaTotalesVenta()
|
||||
End If
|
||||
|
||||
UpCliente.Update()
|
||||
|
||||
End Sub
|
||||
@@ -35682,6 +35728,27 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProcedimientoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
If DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then
|
||||
Dim objVenta As New ClsVentas
|
||||
|
||||
If objVenta.GetProcedimientoProducto(DdlProcedimientoModal.SelectedValue.ToEntero, 1, UsuarioActual.CveEmpresa) Then
|
||||
GvProductosProcedimiento.DataSource = objVenta.DtResultados
|
||||
End If
|
||||
|
||||
objVenta.Dispose()
|
||||
|
||||
Else
|
||||
GvProductosProcedimiento.DataSource = Nothing
|
||||
End If
|
||||
|
||||
GvProductosProcedimiento.DataBind()
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GeneraOS(ByRef TransacSQL As SqlTransaction, ByRef errorList As List(Of String)) As Boolean
|
||||
|
||||
@@ -35767,5 +35834,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user