DeleteOffers and Modify Offers completed, both logic and GUI
[RRRRHHHH_Code] / ruralHouses / src / businessLogic / OfferManager.java
index 6d35620..c286a40 100644 (file)
@@ -66,7 +66,10 @@ public final class OfferManager {
                if (firstDay.compareTo(lastDay)>=0) throw new BadDates();
 
                boolean b = dbMngr.existsOverlappingOffer(ruralHouse,firstDay,lastDay); // The ruralHouse object in the client may not be updated
-               if (!b) return dbMngr.createOffer(ruralHouse,firstDay,lastDay,price);                   
+               if (!b) {
+                       ruralHouse.createOffer(offerNumber, firstDay, lastDay, price);
+                       return dbMngr.createOffer(ruralHouse,firstDay,lastDay,price);                   
+               }
                return null;
        }