react-version #1

Merged
memartel_loc merged 290 commits from react-version into main 2023-11-04 09:48:15 -04:00
Showing only changes of commit adb5c8bcc6 - Show all commits

View File

@ -163,9 +163,9 @@ public class InvoiceController : Controller {
foreach (var prod in sinv.ProdQuant) { // Update de quantités dans l'inventaire. foreach (var prod in sinv.ProdQuant) { // Update de quantités dans l'inventaire.
ProductModel inventProd = prods.Where(x => x.Id == prod.Key).First(); ProductModel inventProd = prods.Where(x => x.Id == prod.Key).First();
if (inventProd.Quantity > prod.Value) if (inventProd.Quantity < prod.Value)
badprods.Add(prod.Key, prod.Value); badprods.Add(prod.Key, inventProd.Quantity);
if (inventProd.Quantity == prod.Value) { else if (inventProd.Quantity == prod.Value) {
inventProd.Quantity = 0; inventProd.Quantity = 0;
inventProd.Status = inventProd.Status == ProductModel.States.Clearance ? inventProd.Status = inventProd.Status == ProductModel.States.Clearance ?
ProductModel.States.Discontinued : ProductModel.States.Discontinued :