Skip to content

Commit

Permalink
Fix - Si la quantité per unit n'est pas renseigné dans le fichier exc…
Browse files Browse the repository at this point in the history
…el, mettre la property à 1
  • Loading branch information
noelmugnier committed Nov 5, 2020
1 parent 729a802 commit eb51cf1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ private async Task<Result<CreateProductCommand>> CreateProductCommandFromRowData
else
createProductCommand.Vat = vat;

if (string.IsNullOrWhiteSpace(quantityPerUnitStr))
quantityPerUnitStr = "1";

if (!decimal.TryParse(quantityPerUnitStr, NumberStyles.Any, new CultureInfo("en-US"), out decimal qtyPerUnit))
return Failed<CreateProductCommand>(new ValidationException(MessageKind.CreateProduct_QtyPerUnit_Invalid_Line, i));
else
Expand Down

0 comments on commit eb51cf1

Please sign in to comment.