275c3ec869
compute_price_for_parking_ticket(): Pass start-date-time to parking-time-checker.
GerhardHoffmann2024-09-03 11:19:23 +02:00
6d2bde1fe9
getPaymentOptionIndex(): Fix: make sure only one payment option can be chosen.
GerhardHoffmann2024-09-03 11:17:31 +02:00
f02521d3c2
parseWeekDay(): for the park-time-limit checking take into account that the start-date-time and end-date-time are on different days.
GerhardHoffmann2024-09-03 11:15:08 +02:00
75f1c1bb76
Checking parking-time-limit: provide start-date-time as well, because the limit counts only from one day to following day (e.g. Sunday to Monday or from holiday to next day).
GerhardHoffmann2024-09-03 11:10:24 +02:00
cce3db301b
Minor: comment out some code to prevent compiler warnings (about some unused variables).
GerhardHoffmann2024-09-02 17:15:33 +02:00
5cab0de9fb
Use free function getPaymentOptionIndex() to compute index of valid payment-option-section in tariff-file based on configured businessHours.
GerhardHoffmann2024-09-02 17:14:20 +02:00
8cdeef26fc
Check if computed ticket-end-time violates a carry-over-limit defined in tariff-file.
GerhardHoffmann2024-09-02 17:11:48 +02:00
52ebbf7bc9
Use free function getPaymentOptionIndex() in serveral places to compute valid index of a payment-option-section within tariff file. If this is not possible, then try the already available functionality.
GerhardHoffmann2024-09-02 17:09:26 +02:00
349e9d8b06
Add free functions isHoliday() to check if the current day is a holiday and previousDayHoliday() to check if previous day (relative to endtime) is a holiday.
GerhardHoffmann2024-09-02 17:05:32 +02:00
68a1c24861
Add free function getPaymentOptionIndex(): Compute payment option index base on current start-date-time and businesshour-setiing in tariff-file. Returns -1 to indicate error.
GerhardHoffmann2024-09-02 17:03:37 +02:00
c946c106d1
Configuration::ParseJson(): Save the pop_plus_steps setting: sometimes it is necessary to adapt the pop_plus_steps-variable in order to hit a time-limit-boundary exactly. Otherwise the next computed time-step might overshoot the time-limit, and when moving backwards (via Minus-Button) there is a better resolution: going backwards, the user could hit the exact time-limit, which he could not when going up.
GerhardHoffmann2024-09-02 16:58:34 +02:00
f24f1fe646
Configuration::ParseJson(): Call parseWeekDay() to reading the week-day-settings.
GerhardHoffmann2024-09-02 16:57:11 +02:00
c6b8a37263
ParseJson(): Minor: some reformatting of source code.
GerhardHoffmann2024-09-02 16:55:48 +02:00
58d8f16681
ParseWeekDay(): Parsing "Monday" - "Sunday" section i a tariff-file.
GerhardHoffmann2024-09-02 16:49:21 +02:00
431664d8b9
IdentifyJsonMember(): Add "Monday" - "Sunday" as level-1 sections in a tariff-file.
GerhardHoffmann2024-09-02 16:47:46 +02:00
929a8a4a27
Reuse of "class ATBWeekDays": Description of a weekday: Mon-Sun. For holidays contains a type-flag to indicate such a day.
GerhardHoffmann2024-09-02 16:41:26 +02:00
80637260f3
Utilities::IsYearPeriodActive(): Fix: take into account if start-date <= end-date or not. Otherwise check is wrong, and no valid year period is returned.
GerhardHoffmann2024-08-21 15:35:03 +02:00
9b524d63e5
Add 'pop_allow_overpay' setting: set vai tariff-file if operpay is allowed.
GerhardHoffmann2024-08-21 15:33:02 +02:00
ae9a54bf02
Added: pun_mutable: duration might be changed during runtime pun_round_to_next_24h_boundary duration has to be aligned with next possible 24h boundary pun_round_to_prev_24h_boundary duration has to be aligned with previous 24h boundary pun_align_with_timepoint duration has to be aligned with dedicated time point
GerhardHoffmann2024-08-18 19:23:12 +02:00
84dbfc7234
GetTimeSteps(): compute time steps and duration values.
GerhardHoffmann2024-08-15 21:41:09 +02:00
48cc6b1302
Minor: debug output. duartionUnit as signed int (to see errors in case it becomes negative).
GerhardHoffmann2024-08-15 21:39:22 +02:00
a6007ee89a
GetTimeSteps(): Use condition pop_time_step_config == (int)ATBTimeStepConfig::TimeStepConfig::RECOMPUTE_SOME (set in tariff-file) to decide the alogorithm to compute time-steps.
GerhardHoffmann2024-08-15 21:37:23 +02:00
80b21ac231
New internal representation for the prepaid option
GerhardHoffmann2024-08-15 21:24:27 +02:00
0a32d60827
Added parsing for new duration members and new prepaid-option.
GerhardHoffmann2024-08-15 21:23:17 +02:00
26a50fb972
Add enum constant RECOMPUTE_SOME=3: some duration values have to be recomputed at runtime (to determine time steps).
GerhardHoffmann2024-08-15 21:20:18 +02:00
6ef57792ce
Add PrepaidOptionType. PrepaidType declared as deprecated.
GerhardHoffmann2024-08-15 21:16:46 +02:00
ec9f7d9262
Introduce bew memebers to control the handling of duration objects (especially for GetTimeSteps() computation).
GerhardHoffmann2024-08-15 21:14:57 +02:00
a2c40fa32a
re-introduce prepay-option for backward compatibility
GerhardHoffmann2024-08-15 21:13:25 +02:00
18f2895250
GetDurationFromCost(): Use pop_accumulate_durations, to decide if durations have to be summed up.
GerhardHoffmann2024-08-13 15:34:20 +02:00
fc78eff0a4
compute_duration_for_parking_ticket(): Set ticket end time to 23:59 (instaed of 00:00:00).
GerhardHoffmann2024-08-13 15:28:42 +02:00
b303a59964
GetTimeSteps(): use pop_accumulate_durations to properly compute time steps such that following functions comuting a price have the same behaviour.
GerhardHoffmann2024-08-13 15:04:13 +02:00
77ca6a4736
Use computeBruttoDurationInSecs() to compute from durationInSecs (which is a netto-time) to corresponding brutto-time, and adapt inputDate according to that date.
GerhardHoffmann2024-08-13 15:01:24 +02:00
397e0f9061
GetDurationFromCost(): Minor: changed some debug output.
GerhardHoffmann2024-08-12 09:22:55 +02:00
75c98c18ad
Added: Calculator::computeBruttoDurationInSecs() and Calculator::computeBruttoDateTime() (based on it).
GerhardHoffmann2024-08-13 14:55:05 +02:00
e6b5bc0f4d
compute_price_for_parking_ticket(): Use (netto_parking_time >= minutesUntilCarryOver) instead of (netto_parking_time > minutesUntilCarryOver), to correctly use interval limit.
GerhardHoffmann2024-08-12 09:19:20 +02:00
3cfaf88a6d
compute_price_for_parking_ticket(): Comute effective start time (jump over carry over time).
GerhardHoffmann2024-08-12 09:18:20 +02:00
8d9119ac83
Compute time steps using start_parking_time as parameter: Calculator::GetInstance().GetTimeSteps(tariff, paymentOptionIndex, start_parking_time);
GerhardHoffmann2024-08-13 14:52:48 +02:00
6d6615b81e
GetDurationFromCost(): Minor: changed some debug output.
GerhardHoffmann2024-08-12 09:22:55 +02:00
eafbfd60c3
compute_price_for_parking_ticket(): Use (netto_parking_time >= minutesUntilCarryOver) instead of (netto_parking_time > minutesUntilCarryOver), to correctly use interval limit.
GerhardHoffmann2024-08-12 09:19:20 +02:00
41fc924a7c
compute_price_for_parking_ticket(): Comute effective start time (jump over carry over time).
GerhardHoffmann2024-08-12 09:18:20 +02:00
25b3143d88
Merge branch 'kleipeda-experimental' of /home/siegert/atbfs01entwicklung/Elektronik/PTU/git_bare_repos/libmobilisis-calc into kleipeda-experimental
2.3.99-14
SiegfriedSiegert2024-08-02 14:37:42 +02:00
0856f10ca9
GetDurationFromCost(): Fix computation of end-time when pop_accumulate_durations is set in tariff-file.
GerhardHoffmann2024-08-02 14:34:44 +02:00
88c703ecc2
Merge branch 'kleipeda-experimental' of /home/siegert/atbfs01entwicklung/Elektronik/PTU/git_bare_repos/libmobilisis-calc into kleipeda-experimental
2.3.99-13
SiegfriedSiegert2024-08-02 13:21:54 +02:00
465b2274a1
compute_duration_for_parking_ticket(): Adapt end-time in case it is midnight: 00:00 -> 23:59
GerhardHoffmann2024-08-02 13:15:11 +02:00
f946cd13e4
Merge branch 'kleipeda-experimental' of /home/siegert/atbfs01entwicklung/Elektronik/PTU/git_bare_repos/libmobilisis-calc into kleipeda-experimental
2.3.99-12
SiegfriedSiegert2024-08-02 11:55:12 +02:00
8d1cbe7337
Merge branch 'kleipeda-experimental' of /home/siegert/atbfs01entwicklung/Elektronik/PTU/git_bare_repos/libmobilisis-calc into kleipeda-experimental
2.3.99-11
SiegfriedSiegert2024-08-02 11:29:10 +02:00
1023f6ede1
GetPriceForTimeStep(): Use "pop_accumulate_durations" setting to sum up the durations. Otherwise time-step will not be found in time-step-list.
GerhardHoffmann2024-08-02 11:12:07 +02:00
36b3e85d1b
GetCostFromDuration(): recompute timestep list to make sure that time step is found in it.
GerhardHoffmann2024-08-02 11:11:20 +02:00
b394ed46cc
In case end-parking-time ends with 00:00, set it to 23:59.
GerhardHoffmann2024-08-02 11:09:20 +02:00