Adis: Warn about reservation costs even if branch is selectable
@@ -798,14 +798,13 @@ public class Adis extends BaseApi implements OpacApi {
e1.getMessage());
}
- if (useraction == 0 && selection == null
- && doc.select("#AUSGAB_1").size() == 0) {
+ if (useraction == 0 && selection == null) {
res = new ReservationResult(
MultiStepResult.Status.CONFIRMATION_NEEDED);
List<String[]> details = new ArrayList<>();
details.add(new String[]{doc.select("#F23").text()});
res.setDetails(details);
- } else if (doc.select("#AUSGAB_1").size() > 0 && selection == null) {
+ } else if (doc.select("#AUSGAB_1").size() > 0 && (selection == null || "confirmed".equals(selection))) {
List<Map<String, String>> sel = new ArrayList<>();
for (Element opt : doc.select("#AUSGAB_1 option")) {
if (opt.text().trim().length() > 0) {
