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;
}