Commit e839ce18 by Tuomas Riihimäki

Merge branch 'placeslotBug' into 'master'

Placeslot bug

There is our bug.

Tää mahdollistaa laskunluonnin ilman että saa sen maksaessaan paikkaslotteja. Tarkistus tarttis olla sielä missä laskuun lisätään tuotteet.

See merge request !252
2 parents e5dca588 a11c41f6
......@@ -305,12 +305,19 @@ public class BillBean implements BillBeanLocal {
return;
}
int count = bl.getQuantity().intValue();
Date now = new Date();
/*
THIS PLACE IS NOT ON HERE
now it is possibly to create and pay bill, but not receive any placeslots!!
long reserveLimit = eventbean.getPropertyLong(LanEventPropertyKey.RESERVE_UNPAID_SLOT_PERCENT);
if (count * 100 / prod.getPlaces().size() > reserveLimit) {
long limitCount = prod.getPlaces().size() * reserveLimit / 100;
logbean.sendMessage(MoyaEventType.BILL_INFO, bill.getUser(), "User created bill ", bill.getId(), " for product '", prod.getName(), "' for '", count, "' products, which is bigger than reservation limit. '", limitCount, "', (", reserveLimit, "%)");
}
*/
for (int i = 0; i < count; ++i) {
PlaceSlot ps = new PlaceSlot();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!