void conclusion() { // End the transaction concludeTransaction = true; toggleEncoding(false); Inventory inventory = null; foreach (ProductInvoice item in carts) { dbController.insertProductInvoice(item); inventory = new Inventory() { Barcode = item.product.Barcode, QtyReceived = 0, QtyOnHand = -item.QuantitySold, }; dbController.pullInventory(inventory); dbController.checkProductCriticalLevel(item.product); } // audit string message = string.Format("completed a transaction: {0}", lblTransactionno.Text); dbController.insertAuditTrail(message); masterController.clientClock(); }