EADG6 / TrainTickets

Train Tickets Selling System - GPW Group6 Project
https://student.zy.cdut.edu.cn/students/2014/liu.zehao/TrainTickets/
MIT License
1 stars 0 forks source link

Tickets seats_id calculation is wrong some times #13

Closed MarshallCN closed 7 years ago

MarshallCN commented 7 years ago

image image The seats_id of new tickets equals to carriage capacity - (total remaining seats number - empty carriage number carriage capacity)+1; eg. carriage capacity=80, a train has 2 carriages which already sells 2 tickets, 158 seats is remaining, so when new tickets sell, seat_id = 80 - (158-1*80) + 1 = 3, but the first ticket is = 80 - (160-2\80) + 1 = 81, which is wrong

MarshallCN commented 7 years ago

already fixed the bug