if end of parking time equals carry-over-end, then, if configured, go back to carry-over-start.
This commit is contained in:
		@@ -948,7 +948,16 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
 | 
				
			|||||||
                    ATBPaymentOption const &po = tariff->getPaymentOptions(paymentOptionIndex);
 | 
					                    ATBPaymentOption const &po = tariff->getPaymentOptions(paymentOptionIndex);
 | 
				
			||||||
                    if (po.pop_apply_carry_over_to_ticket_endtime) {
 | 
					                    if (po.pop_apply_carry_over_to_ticket_endtime) {
 | 
				
			||||||
                        end_parking_time = end_parking_time.addSecs(carryOverDuration * 60);
 | 
					                        end_parking_time = end_parking_time.addSecs(carryOverDuration * 60);
 | 
				
			||||||
                        qCritical() << __func__ << ":" << __LINE__ << "end-parking-time:" << end_parking_time.toString(Qt::ISODate);
 | 
					                        qCritical() << __func__ << ":" << __LINE__ << "adapted end-parking-time:" << end_parking_time.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                } else
 | 
				
			||||||
 | 
					                if (end_parking_time.time() == carryOverEnd) {
 | 
				
			||||||
 | 
					                    qCritical() << __func__ << ":" << __LINE__ << "        end-parking-time:" << end_parking_time.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					                    qCritical() << __func__ << ":" << __LINE__ << "            carryOverEnd:" << carryOverEnd.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					                    ATBPaymentOption const &po = tariff->getPaymentOptions(paymentOptionIndex);
 | 
				
			||||||
 | 
					                    if (po.pop_apply_carry_over_to_ticket_endtime == false) {
 | 
				
			||||||
 | 
					                        end_parking_time = end_parking_time.addSecs(-carryOverDuration * 60);
 | 
				
			||||||
 | 
					                        qCritical() << __func__ << ":" << __LINE__ << "adapted end-parking-time:" << end_parking_time.toString(Qt::ISODate);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user