Skip to content

Commit

Permalink
Merge pull request #117 from Nnythingy/master
Browse files Browse the repository at this point in the history
Update Warehouse.java
  • Loading branch information
Nnythingy authored Apr 11, 2022
2 parents 9dbb7a0 + 2bfc3dc commit 73713d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/seedu/simplst/Warehouse.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ public Boolean addOrderline(String oid, String sku, String qty) throws WrongComm
}

private Boolean addGoodToOrder(Order order, String sku, String qty) throws WrongCommandException {
if (sku.isBlank()) {
throw new WrongCommandException("add", true);
}

if (!isSkuInInventory(sku)) {
System.out.println("Good does not exist in the warehouse");
System.out.println("Try adding a good first");
Expand Down

0 comments on commit 73713d7

Please sign in to comment.