cce3db301bMinor: comment out some code to prevent compiler warnings (about some unused variables).Gerhard Hoffmann2024-09-02 17:15:33 +02:00
5cab0de9fbUse free function getPaymentOptionIndex() to compute index of valid payment-option-section in tariff-file based on configured businessHours.Gerhard Hoffmann2024-09-02 17:14:20 +02:00
8cdeef26fcCheck if computed ticket-end-time violates a carry-over-limit defined in tariff-file.Gerhard Hoffmann2024-09-02 17:11:48 +02:00
52ebbf7bc9Use 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.Gerhard Hoffmann2024-09-02 17:09:26 +02:00
349e9d8b06Add 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.Gerhard Hoffmann2024-09-02 17:05:32 +02:00
68a1c24861Add free function getPaymentOptionIndex(): Compute payment option index base on current start-date-time and businesshour-setiing in tariff-file. Returns -1 to indicate error.Gerhard Hoffmann2024-09-02 17:03:37 +02:00
c946c106d1Configuration::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.Gerhard Hoffmann2024-09-02 16:58:34 +02:00
f24f1fe646Configuration::ParseJson(): Call parseWeekDay() to reading the week-day-settings.Gerhard Hoffmann2024-09-02 16:57:11 +02:00
c6b8a37263ParseJson(): Minor: some reformatting of source code.Gerhard Hoffmann2024-09-02 16:55:48 +02:00
58d8f16681ParseWeekDay(): Parsing "Monday" - "Sunday" section i a tariff-file.Gerhard Hoffmann2024-09-02 16:49:21 +02:00
431664d8b9IdentifyJsonMember(): Add "Monday" - "Sunday" as level-1 sections in a tariff-file.Gerhard Hoffmann2024-09-02 16:47:46 +02:00
929a8a4a27Reuse of "class ATBWeekDays": Description of a weekday: Mon-Sun. For holidays contains a type-flag to indicate such a day.Gerhard Hoffmann2024-09-02 16:41:26 +02:00
80637260f3Utilities::IsYearPeriodActive(): Fix: take into account if start-date <= end-date or not. Otherwise check is wrong, and no valid year period is returned.Gerhard Hoffmann2024-08-21 15:35:03 +02:00
9b524d63e5Add 'pop_allow_overpay' setting: set vai tariff-file if operpay is allowed.Gerhard Hoffmann2024-08-21 15:33:02 +02:00
ae9a54bf02Added: 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 pointGerhard Hoffmann2024-08-18 19:23:12 +02:00
84dbfc7234GetTimeSteps(): compute time steps and duration values.Gerhard Hoffmann2024-08-15 21:41:09 +02:00
48cc6b1302Minor: debug output. duartionUnit as signed int (to see errors in case it becomes negative).Gerhard Hoffmann2024-08-15 21:39:22 +02:00
a6007ee89aGetTimeSteps(): Use condition pop_time_step_config == (int)ATBTimeStepConfig::TimeStepConfig::RECOMPUTE_SOME (set in tariff-file) to decide the alogorithm to compute time-steps.Gerhard Hoffmann2024-08-15 21:37:23 +02:00
192a37d93f.GetTimeSteps(): pass parameters tariff, paymentOptionIndex and start_parking_time_);Gerhard Hoffmann2024-08-15 21:29:37 +02:00
b17f77b22aAdd setting of max-price in case of degressive-tariff.Gerhard Hoffmann2024-08-15 21:28:49 +02:00
0a32d60827Added parsing for new duration members and new prepaid-option.Gerhard Hoffmann2024-08-15 21:23:17 +02:00
26a50fb972Add enum constant RECOMPUTE_SOME=3: some duration values have to be recomputed at runtime (to determine time steps).Gerhard Hoffmann2024-08-15 21:20:18 +02:00
6ef57792ceAdd PrepaidOptionType. PrepaidType declared as deprecated.Gerhard Hoffmann2024-08-15 21:16:46 +02:00
ec9f7d9262Introduce bew memebers to control the handling of duration objects (especially for GetTimeSteps() computation).Gerhard Hoffmann2024-08-15 21:14:57 +02:00
a2c40fa32are-introduce prepay-option for backward compatibilityGerhard Hoffmann2024-08-15 21:13:25 +02:00
18f2895250GetDurationFromCost(): Use pop_accumulate_durations, to decide if durations have to be summed up.Gerhard Hoffmann2024-08-13 15:34:20 +02:00
fc78eff0a4compute_duration_for_parking_ticket(): Set ticket end time to 23:59 (instaed of 00:00:00).Gerhard Hoffmann2024-08-13 15:28:42 +02:00
b303a59964GetTimeSteps(): use pop_accumulate_durations to properly compute time steps such that following functions comuting a price have the same behaviour.Gerhard Hoffmann2024-08-13 15:04:13 +02:00
77ca6a4736Use computeBruttoDurationInSecs() to compute from durationInSecs (which is a netto-time) to corresponding brutto-time, and adapt inputDate according to that date.Gerhard Hoffmann2024-08-13 15:01:24 +02:00
GetDurationFromCost(): Minor: changed some debug output.Gerhard Hoffmann2024-08-12 09:22:55 +02:00
75c98c18adAdded: Calculator::computeBruttoDurationInSecs() and Calculator::computeBruttoDateTime() (based on it).Gerhard Hoffmann2024-08-13 14:55:05 +02:00
compute_price_for_parking_ticket(): Use (netto_parking_time >= minutesUntilCarryOver) instead of (netto_parking_time > minutesUntilCarryOver), to correctly use interval limit.Gerhard Hoffmann2024-08-12 09:19:20 +02:00
8d9119ac83Compute time steps using start_parking_time as parameter: Calculator::GetInstance().GetTimeSteps(tariff, paymentOptionIndex, start_parking_time);Gerhard Hoffmann2024-08-13 14:52:48 +02:00
6d6615b81eGetDurationFromCost(): Minor: changed some debug output.Gerhard Hoffmann2024-08-12 09:22:55 +02:00
eafbfd60c3compute_price_for_parking_ticket(): Use (netto_parking_time >= minutesUntilCarryOver) instead of (netto_parking_time > minutesUntilCarryOver), to correctly use interval limit.Gerhard Hoffmann2024-08-12 09:19:20 +02:00
41fc924a7ccompute_price_for_parking_ticket(): Comute effective start time (jump over carry over time).Gerhard Hoffmann2024-08-12 09:18:20 +02:00
Merge branch 'kleipeda-experimental' of /home/siegert/atbfs01entwicklung/Elektronik/PTU/git_bare_repos/libmobilisis-calc into kleipeda-experimental
2.3.99-14
Siegfried Siegert2024-08-02 14:37:42 +02:00
0856f10ca9GetDurationFromCost(): Fix computation of end-time when pop_accumulate_durations is set in tariff-file.Gerhard Hoffmann2024-08-02 14:34:44 +02:00
1023f6ede1GetPriceForTimeStep(): Use "pop_accumulate_durations" setting to sum up the durations. Otherwise time-step will not be found in time-step-list.Gerhard Hoffmann2024-08-02 11:12:07 +02:00
36b3e85d1bGetCostFromDuration(): recompute timestep list to make sure that time step is found in it.Gerhard Hoffmann2024-08-02 11:11:20 +02:00
b394ed46ccIn case end-parking-time ends with 00:00, set it to 23:59.Gerhard Hoffmann2024-08-02 11:09:20 +02:00
4271c0fb31Fixed compute_next_timestep() for degressive tariff: compute_next_timestep() was actually never called for such a tariff.Gerhard Hoffmann2024-08-02 10:50:25 +02:00
4bce854d77GetDurationFromCost(): Set durationInSecs in case 'pop_accumulate_prices' is not configured in tariff file.Gerhard Hoffmann2024-08-01 16:44:06 +02:00
138221759bGetDurationFromCost(): Minor: removed some debug ouputGerhard Hoffmann2024-08-01 16:43:19 +02:00
9cb7d4aea6compute_price_for_parking_ticket(): Added handling for prepaid and carry-over.Gerhard Hoffmann2024-08-01 16:04:57 +02:00
cde490bab2compute_next_time_step(): Added handling with pop_plus_steps/pop_minus_steps: '+' usually takes more than one time step. '-' is usually 1.Gerhard Hoffmann2024-08-01 16:00:10 +02:00
Merge branch 'kleipeda-experimental' of /home/siegert/atbfs01entwicklung/Elektronik/PTU/git_bare_repos/libmobilisis-calc into kleipeda-experimentalSiegfried Siegert2024-07-31 08:06:45 +02:00