From 10fc4cb895c8ae7e2a7fa6432687e29c20db436d Mon Sep 17 00:00:00 2001 From: BEAUVAIS ANTOINE <antoine.beauvais@etu.unistra.fr> Date: Thu, 23 Sep 2021 23:04:30 +0200 Subject: [PATCH] Removed money amount from Transaction, as it will be set by Item. --- .../sil/erp/back/model/Transaction.java | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/main/java/fr/unistra/sil/erp/back/model/Transaction.java b/src/main/java/fr/unistra/sil/erp/back/model/Transaction.java index 205760b..fe41245 100644 --- a/src/main/java/fr/unistra/sil/erp/back/model/Transaction.java +++ b/src/main/java/fr/unistra/sil/erp/back/model/Transaction.java @@ -29,11 +29,6 @@ public class Transaction { */ private final Integer type; - /** - * Transaction's amount. - */ - private final BigDecimal amount; - /** * Number of items. */ @@ -46,12 +41,10 @@ public class Transaction { * @param amount Transaction's amount. * @param quantity Quantity of items involved. */ - public Transaction(Integer item, Integer type, BigDecimal amount, - Integer quantity) + public Transaction(Integer item, Integer type, Integer quantity) { this.item = item; this.type = type; - this.amount = amount; this.quantity = quantity; } @@ -73,15 +66,6 @@ public class Transaction { return this.type; } - /** - * Returns the Transaction's amount of money. - * @return the amount. - */ - public BigDecimal getAmount() - { - return this.amount; - } - /** * Returns the number of items in the Transaction. * @return the number of items. @@ -98,7 +82,7 @@ public class Transaction { public boolean checkIfValid() { return (this.item != null && this.type != null - && this.amount != null && this.quantity != null); + && this.quantity != null); } } -- GitLab