Cantidad debe ser mayor que 0

This commit is contained in:
2020-03-03 10:34:35 -07:00
parent bf649b3e57
commit e37f192ffa

View File

@@ -5835,6 +5835,11 @@ Partial Class Ventas
Descuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim
If PU <= 0 AndAlso UsuarioActual.CveEmpresa = 141 Then
Alert("El precio debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If UsuarioActual.CveEmpresa = 140 Then
Descuento = CalcularDescuentos(TmpDT.Rows(e.RowIndex)("CvePS").ToString.ToEntero, Cantidad, PU)
End If
@@ -8803,8 +8808,8 @@ Partial Class Ventas
'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
' If drr("ImporteIVA").ToString.ToDouble > 0 Then
'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos
If Timbre.Comprobante.Total > 0 Then
'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos, y si la BASE de calculo es mayor a cero
If Timbre.Comprobante.Total > 0 AndAlso concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0 Then
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
End If
@@ -13920,6 +13925,11 @@ Partial Class Ventas
Return False
End If
If PU <= 0 AndAlso UsuarioActual.CveEmpresa = 141 Then
Alert("El precio debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
Return False
End If
'VALIDA PROMOCIONES
Dim ObjVentas As New ClsVentas
If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero, CveCliente, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then