From e37f192ffa7d5f088e68ec156ef6bcfea20e646c Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 3 Mar 2020 10:34:35 -0700 Subject: [PATCH] Cantidad debe ser mayor que 0 --- Ventas/Ventas.aspx.vb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 9ecd8ab82..3c79eea5e 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -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