compute_price_for_parking_ticket(): added parameter bool prepaid. Set to true as default.
This commit is contained in:
parent
6ba3963f25
commit
c0f81f174a
@ -352,7 +352,8 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
|
|||||||
QDateTime &start_parking_time,
|
QDateTime &start_parking_time,
|
||||||
int netto_parking_time,
|
int netto_parking_time,
|
||||||
QDateTime &end_parking_time,
|
QDateTime &end_parking_time,
|
||||||
struct price_t *price)
|
struct price_t *price,
|
||||||
|
bool prepaid)
|
||||||
{
|
{
|
||||||
CalcState calcState;
|
CalcState calcState;
|
||||||
double minMin = tariff->getPaymentOptions().pop_min_time;
|
double minMin = tariff->getPaymentOptions().pop_min_time;
|
||||||
@ -391,7 +392,7 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
|
|||||||
start_parking_time, // starting time
|
start_parking_time, // starting time
|
||||||
end_parking_time, // return value: end time
|
end_parking_time, // return value: end time
|
||||||
netto_parking_time, // minutes, netto
|
netto_parking_time, // minutes, netto
|
||||||
false, true);
|
false, prepaid);
|
||||||
double minCost = tariff->getPaymentOptions().pop_min_price;
|
double minCost = tariff->getPaymentOptions().pop_min_price;
|
||||||
if (cost < minCost) {
|
if (cost < minCost) {
|
||||||
calcState.setDesc(QString("minCost=%1, cost=%2").arg(minCost, cost));
|
calcState.setDesc(QString("minCost=%1, cost=%2").arg(minCost, cost));
|
||||||
|
Loading…
Reference in New Issue
Block a user