MOBILISIS-Calculator/library/include/mobilisis/payment_opt.h

95 lines
2.7 KiB
C++

#ifndef PAYMENT_OPT_H_INCLUDED
#define PAYMENT_OPT_H_INCLUDED
#include <string>
#include <cinttypes>
#include <QDateTime>
class ATBPaymentOption
{
public:
ATBPaymentOption() = default;
void reset() {
pop_id = 0;
pop_label = "";
pop_product_id = -1;
pop_product_name = "";
pop_payment_method_id = 0;
pop_day_end_time = "";
pop_day_night_end_time = "";
pop_price_night = 0;
pop_min_time = 0;
pop_max_time = 0;
pop_min_price = 0;
pop_max_price = 0;
pop_max_price_save = 0;
pop_carry_over = -1;
pop_carry_over_option_id = -1;
pop_prepaid_option_id = -1;
pop_truncate_last_interpolation_step = false;
pop_accumulate_prices = false;
pop_accumulate_durations = false;
pop_carry_over_target = false;
pop_carry_over_time_range_id = -1;
pop_carry_over_start_time_range = -1;
pop_carry_over_end_time_range = -1;
pop_daily_card_price = -1;
pop_business_hours = -1;
pop_time_step_config = -1;
pop_use_only_upto_datetime = ""; // deprecated
pop_use_only_for_duration = 0; // deprecated
pop_plus_steps = 1; // +: jump <x=1> steps forward
pop_plus_steps_saved = 1;
pop_minus_steps = 1; // -: jump <x=1> steps backward
pop_allow_overpay = false;
pop_apply_carry_over_to_ticket_endtime = false;
}
int pop_id;
std::string pop_label;
int pop_product_id;
QString pop_product_name;
int pop_payment_method_id;
QString pop_use_only_upto_datetime;
int pop_use_only_for_duration;
std::string pop_day_end_time;
std::string pop_day_night_end_time;
double pop_price_night;
double pop_min_time;
double pop_max_time;
double pop_min_price;
double pop_max_price;
double pop_max_price_save;
int pop_carry_over;
int pop_carry_over_option_id;
bool pop_truncate_last_interpolation_step;
int pop_prepaid_option_id;
bool pop_carry_over_target;
int pop_carry_over_time_range_id;
int pop_carry_over_start_time_range;
int pop_carry_over_end_time_range;
int pop_daily_card_price;
uint64_t pop_business_hours;
int pop_time_step_config;
bool pop_accumulate_prices;
bool pop_accumulate_durations;
int pop_plus_steps;
int pop_plus_steps_saved;
int pop_minus_steps;
bool pop_allow_overpay;
bool pop_apply_carry_over_to_ticket_endtime;
struct ATBMaxDateTime {
int direction;
uint8_t week;
uint8_t day;
QTime time;
} pop_min_date_time,
pop_max_date_time;
};
#endif // PAYMENT_OPT_H_INCLUDED