Daily ticket
This commit is contained in:
		| @@ -132,6 +132,11 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket( | ||||
|                                             QDateTime const &start_parking_time, | ||||
|                                             double cost, | ||||
|                                             QDateTime &ticketEndTime); | ||||
|  | ||||
| CalcState CALCULATE_LIBRARY_API compute_duration_for_daily_ticket( | ||||
|                                             parking_tariff_t *tariff, | ||||
|                                             QString const &start_parking_time, | ||||
|                                             uint8_t paymentMethod); | ||||
| //#ifdef __cplusplus | ||||
| //} // extern "C" | ||||
| //#endif | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| #pragma once | ||||
| #include <iostream> | ||||
| #include "configuration.h" | ||||
|  | ||||
| #include <QDateTime> | ||||
| using namespace std; | ||||
|  | ||||
| class Calculator | ||||
| @@ -26,4 +26,7 @@ public: | ||||
| 	/// <param name="durationMin">Duration of parking in minutes</param> | ||||
| 	/// <returns>Returns cost (data type: double)</returns> | ||||
| 	double GetCostFromDuration(Configuration* cfg, uint8_t vehicle_type, char const* start_datetime, double durationMin, bool nextDay = false, bool prepaid = false); | ||||
| }; | ||||
|  | ||||
|     // Daily ticket | ||||
|     QString GetDailyTicketDuration(Configuration* cfg, QString start_datetime, uint8_t payment_option, bool carry_over); | ||||
| }; | ||||
|   | ||||
| @@ -55,4 +55,4 @@ private: | ||||
| 	/// <param name="member_name"></param> | ||||
| 	/// <returns></returns> | ||||
| 	MemberType IdentifyJsonMember(const char* member_name); | ||||
| }; | ||||
| }; | ||||
|   | ||||
| @@ -14,4 +14,5 @@ public: | ||||
| 	double pop_max_time; | ||||
| 	double pop_min_price; | ||||
| 	int pop_carry_over; | ||||
| }; | ||||
|     int pop_daily_card_price; | ||||
| }; | ||||
|   | ||||
| @@ -69,4 +69,5 @@ public: | ||||
| 	/// <param name="pra_price"></param> | ||||
| 	/// <returns></returns> | ||||
| 	static double CalculatePricePerUnit(double pra_price); | ||||
|  | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user