Merge branch 'react-version' of https://github.com/MarcEricMartel/420-5DW-HY-TP into react-version
This commit is contained in:
commit
e52abc3108
@ -158,6 +158,13 @@ public class InvoiceController : Controller {
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
foreach (var prod in prods) {
|
||||
inv.Products.Add(new() {
|
||||
Product = prod,
|
||||
Quantity = sinv.ProdQuant.First(x => x.Key == prod.Id).Value
|
||||
});
|
||||
}
|
||||
|
||||
if (prods.Count == 0)
|
||||
return BadRequest("Vous devez inclure au moins un produit à votre commande.");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user