Skip to content

Commit

Permalink
Update src/main/java/seedu/cafectrl/data/OrderList.java
Browse files Browse the repository at this point in the history
Co-authored-by: Dexter <[email protected]>
  • Loading branch information
NaychiMin and DextheChik3n authored Nov 13, 2023
1 parent f98139d commit 419eb11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/seedu/cafectrl/data/OrderList.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ private void aggregateOrder(Order order, ArrayList<Order> aggregatedOrders) {
int index = getIndexByDishName(aggregatedOrders, order.getDishName());
//if dish is not found in aggregated orders, add the dish into it
if (index == -1) {
aggregatedOrders.add(new Order(order.getOrderedDish(), order.getQuantity(), order.getTotalOrderCost()
, true));
aggregatedOrders.add(new Order(order.getOrderedDish(), order.getQuantity(), order.getTotalOrderCost(),
true));
} else {
//else add the quantities and totalCost accordingly
aggregatedOrders.get(index)
Expand Down

0 comments on commit 419eb11

Please sign in to comment.