Handle-zero-or-negative-number-on-invoice-line

This commit is contained in:
Bobbie Hodgetts
2024-04-16 16:37:51 +01:00
committed by GitHub
parent db8d36ce6f
commit dcee9de0d6

View File

@@ -81,11 +81,11 @@ namespace BealeEngineering.Core.Model.Sale
foreach (var line in InvoiceLineList) foreach (var line in InvoiceLineList)
{ {
// checks on each line // checks on each line
if (line.Quantity <= 0) //if (line.Quantity <= 0)
{ //{
var result = new ValidationResult("Quantity must be greater than zero."); // var result = new ValidationResult("Quantity must be greater than zero.");
ValidationResults.Add(result); // ValidationResults.Add(result);
} //}
lineTotal = lineTotal + line.LineNetAmount; lineTotal = lineTotal + line.LineNetAmount;
lineTaxTotal = lineTaxTotal + line.TaxAmount; lineTaxTotal = lineTaxTotal + line.TaxAmount;