* Behoben: Teilweise fehlen Termine
* Sortierung Reiseterminetabelle git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3292 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
d87bb5dc3c
commit
03f50fc03c
2 changed files with 20 additions and 17 deletions
|
|
@ -341,6 +341,8 @@ class TravelProgram
|
|||
*/
|
||||
private $travelDateByKey = [];
|
||||
|
||||
private $isTravelDateMapTainted = true;
|
||||
|
||||
/**
|
||||
* Set profitMargin
|
||||
*
|
||||
|
|
@ -1424,6 +1426,7 @@ class TravelProgram
|
|||
\DateTime $end = null, FlightPeriod $flightPeriod = null, $currencyFactor)
|
||||
{
|
||||
$this->assertTravelDateNotDefinedYet($key);
|
||||
$this->isTravelDateMapTainted = true;
|
||||
$this->travelDateByKey[$key] = TravelDate::createForSeasonTravelPeriod($key, $travelPeriod, $index, $start,
|
||||
$end, $flightPeriod, $currencyFactor);
|
||||
}
|
||||
|
|
@ -1432,6 +1435,7 @@ class TravelProgram
|
|||
\DateTime $start = null, \DateTime $end = null, $index = null)
|
||||
{
|
||||
$this->assertTravelDateNotDefinedYet($key);
|
||||
$this->isTravelDateMapTainted = true;
|
||||
$this->travelDateByKey[$key] = new TravelDate($key, $travelPeriod, $flightPeriod, $currencyFactor, $start, $end,
|
||||
$index);
|
||||
}
|
||||
|
|
@ -1451,6 +1455,11 @@ class TravelProgram
|
|||
*/
|
||||
public function getTravelDates()
|
||||
{
|
||||
if ($this->isTravelDateMapTainted)
|
||||
{
|
||||
ksort($this->travelDateByKey);
|
||||
$this->isTravelDateMapTainted = false;
|
||||
}
|
||||
return $this->travelDateByKey;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue