--Validaciones para tener al menos 1 producto y/o servicio
This commit is contained in:
@@ -13944,6 +13944,11 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Dim EsatusAlmacen As Integer = If(RBLTipoVenta.SelectedValue.Contiene("5", "6") AndAlso EsVentaMedica AndAlso DdlTipoComprobante.SelectedValue = "Ped", 1, 0) ', EstatusAlmacen:=EsatusAlmacen
|
||||
|
||||
If TmpDTDetalle Is Nothing OrElse TmpDTDetalle.Rows.Count = 0 Then
|
||||
ErrorList.Add("Ocurrió un error al registrar la factura. No se encontraron productos y/o servicios.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
End If
|
||||
|
||||
'Se agregan los PS
|
||||
For Each Row As DataRow In TmpDTDetalle.Rows
|
||||
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("CveUM").ToString().ToEntero(),
|
||||
@@ -22710,6 +22715,12 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
Private Sub BtnEditarRemision_Click(sender As Object, e As EventArgs) Handles BtnEditarRemision.Click
|
||||
|
||||
If TmpDT Is Nothing OrElse TmpDT.Rows.Count = 0 Then
|
||||
Alert("Es necesario tener al menos 1 producto y/o servicio", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim OcurrioError As Boolean = False
|
||||
Dim ObjVentas As New ClsVentas
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
@@ -31373,6 +31384,12 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
Private Sub BtnEditarCotizacion_Click(sender As Object, e As EventArgs) Handles BtnEditarCotizacion.Click
|
||||
|
||||
If TmpDT Is Nothing OrElse TmpDT.Rows.Count = 0 Then
|
||||
Alert("Es necesario tener al menos 1 producto y/o servicio", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim VaFacturarCotizacion As Boolean = False
|
||||
'SI CARGA UNA COTIZACION DEBE GUARDAR TAMBIEN
|
||||
If IfNull(ViewState("CveCotizacion"), 0).ToString().ToEntero() > 0 Then
|
||||
@@ -31473,8 +31490,6 @@ Partial Class Ventas
|
||||
Moneda = 1
|
||||
End If
|
||||
|
||||
|
||||
'ACTUALIZA VENTA
|
||||
'ACTUALIZA VENTA
|
||||
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal(), TxtIVA.Text.ToDecimal(), TxtIEPS.Text.ToDecimal(), TxtTotal.Text.ToDecimal(),
|
||||
Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
||||
@@ -31488,7 +31503,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'ELIMINA DETALLES
|
||||
If Not ObjVentas.RemoveVentasDetalle(CveVenta) Then
|
||||
MensajeError = "Ocurrió un error al actualizar las partidas de la cotización"
|
||||
|
||||
Reference in New Issue
Block a user