Compare commits

..

3 Commits

Author SHA1 Message Date
6ef57792ce Add PrepaidOptionType.
PrepaidType declared as deprecated.
2024-08-15 21:16:46 +02:00
ec9f7d9262 Introduce bew memebers to control the handling of duration objects
(especially for GetTimeSteps() computation).
2024-08-15 21:14:57 +02:00
a2c40fa32a re-introduce prepay-option for backward compatibility 2024-08-15 21:13:25 +02:00
3 changed files with 34 additions and 16 deletions

View File

@ -28,6 +28,7 @@
#include "tariff_interpolation.h" #include "tariff_interpolation.h"
#include "tariff_prepaid.h" #include "tariff_prepaid.h"
#include "tariff_carryover.h" #include "tariff_carryover.h"
#include "tariff_prepay.h"
#include "tariff_permit_type.h" #include "tariff_permit_type.h"
#include <QVector> #include <QVector>
@ -47,6 +48,7 @@ public:
using ATBPaymentOptionType = std::multimap<int, ATBPaymentOption>; using ATBPaymentOptionType = std::multimap<int, ATBPaymentOption>;
using TariffInterpolationType = std::multimap<int, ATBInterpolation>; using TariffInterpolationType = std::multimap<int, ATBInterpolation>;
using TariffPrepaidType = std::multimap<int, ATBPrepaid>; using TariffPrepaidType = std::multimap<int, ATBPrepaid>;
using TariffPrepayOptionType = std::multimap<int, ATBPrepay>;
using TariffCarryOverType = std::multimap<int, ATBCarryOver>; using TariffCarryOverType = std::multimap<int, ATBCarryOver>;
using TariffDurationType = std::multimap<int, ATBDuration>; using TariffDurationType = std::multimap<int, ATBDuration>;
@ -54,7 +56,7 @@ public:
ATBCurrency Currency; ATBCurrency Currency;
ATBDuration duration; ATBDuration duration;
TariffDurationType Duration; TariffDurationType Duration;
multimap<int, ATBPaymentMethod> PaymentMethod; multimap<int, ATBPaymentMethod> PaymentMethod;
multimap<int, ATBPaymentRate> PaymentRate; multimap<int, ATBPaymentRate> PaymentRate;
SpecialDaysWorktimeType SpecialDaysWorktime; SpecialDaysWorktimeType SpecialDaysWorktime;
@ -71,6 +73,7 @@ public:
TariffProductType TariffProduct; TariffProductType TariffProduct;
TariffInterpolationType TariffInterpolations; TariffInterpolationType TariffInterpolations;
TariffPrepaidType TariffPrepaidOptions; TariffPrepaidType TariffPrepaidOptions;
TariffPrepayOptionType TariffPrepayOptions;
TariffCarryOverType TariffCarryOverOptions; TariffCarryOverType TariffCarryOverOptions;
/// <summary> /// <summary>

View File

@ -12,7 +12,12 @@ public:
, pun_duration_saved(0) , pun_duration_saved(0)
, pun_duration_min(0) , pun_duration_min(0)
, pun_duration_max(0) , pun_duration_max(0)
, pun_interpolation_id(-1) { , pun_interpolation_id(-1)
, pun_netto(false)
, pun_brutto(false)
, pun_fixed(false)
, pun_requires_change(false)
, pun_next_step_correction(0) {
} }
friend QDebug operator<<(QDebug debug, ATBDuration const &td) { friend QDebug operator<<(QDebug debug, ATBDuration const &td) {
@ -25,6 +30,10 @@ public:
<< " pun_duration_saved: " << td.pun_duration_saved << "\n" << " pun_duration_saved: " << td.pun_duration_saved << "\n"
<< " pun_duration_min: " << td.pun_duration_min << "\n" << " pun_duration_min: " << td.pun_duration_min << "\n"
<< " pun_duration_max: " << td.pun_duration_max << "\n" << " pun_duration_max: " << td.pun_duration_max << "\n"
<< " pun_netto: " << td.pun_netto << "\n"
<< " pun_brutto: " << td.pun_brutto << "\n"
<< " pun_fixed: " << td.pun_fixed << "\n"
<< " pun_requires_change: " << td.pun_requires_change << "\n"
<< "pun_interpolation_id: " << td.pun_interpolation_id << "\n"; << "pun_interpolation_id: " << td.pun_interpolation_id << "\n";
return debug; return debug;
@ -33,8 +42,13 @@ public:
int pun_id; int pun_id;
std::string pun_label; std::string pun_label;
int pun_duration; int pun_duration;
int pun_duration_saved; int pun_duration_saved;
int pun_duration_min; int pun_duration_min;
int pun_duration_max; int pun_duration_max;
int pun_interpolation_id; int pun_interpolation_id;
bool pun_netto; // the timestep expressed by this duration is a netto timestep
bool pun_brutto; // the timestep expressed by this duration is a brutto timestep
bool pun_fixed; // the value given in tariff-file is fixed (constant)
bool pun_requires_change; // the value has to be changes (controlled by other parameters)
int pun_next_step_correction;
}; };

View File

@ -13,16 +13,17 @@ enum MemberType
WeekDaysWorkTimeType = 0x06, WeekDaysWorkTimeType = 0x06,
SpecialDaysWorktimeType = 0x07, SpecialDaysWorktimeType = 0x07,
SpecialDaysType = 0x08, SpecialDaysType = 0x08,
PeriodYearType = 0x09, PeriodYearType = 0x09,
DailyTicketType = 0x0A, DailyTicketType = 0x0A,
CustomerType = 0x0B, CustomerType = 0x0B,
TimeBaseType = 0x0C, TimeBaseType = 0x0C,
TimeRangeType = 0x0D, TimeRangeType = 0x0D,
TimeStepConfigType = 0x0E, TimeStepConfigType = 0x0E,
ProductType = 0x0F, ProductType = 0x0F,
InterpolationType = 0x10, InterpolationType = 0x10,
PrepaidType = 0x11, PrepaidType = 0x11, // deprecated
CarryOverType = 0x12 CarryOverType = 0x12,
PrepaidOptionType = 0x13,
}; };
#endif // MEMBER_TYPE_H_INCLUDED #endif // MEMBER_TYPE_H_INCLUDED