* rel="nofollow" und target="_blank" für verschiedene externe Links
* Mindestpreis im Slider oben im Reiseprogramm nicht anzeigen, wenn keine Termine vorhanden sind * Tripodo-Export git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3315 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
42c55d44a1
commit
b8ec81329a
17 changed files with 380 additions and 18 deletions
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
namespace AppBundle\Entity;
|
||||
use AppBundle\Util\DepartureUtil;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
|
||||
/**
|
||||
* TravelDate is a wrapper for TravelPeriod + start date and end date. This entity doesn't represent a database
|
||||
|
|
@ -89,10 +90,16 @@ final class TravelDate
|
|||
}
|
||||
$this->start = $start;
|
||||
$this->index = $index;
|
||||
$this->prices = [];
|
||||
foreach ($travelPeriod->getPrices() as $price)
|
||||
{
|
||||
$this->prices[$price->getPriceTypeId()] = clone $price;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->start = $travelPeriod->getStartDate();
|
||||
$this->prices = $travelPeriod->getPrices();
|
||||
}
|
||||
$this->flightPeriod = $flightPeriod;
|
||||
$this->travelProgram = $travelPeriod->getProgram();
|
||||
|
|
@ -223,14 +230,14 @@ final class TravelDate
|
|||
$profitMargin = $this->travelProgram->getProfitMargin() / 100 + 1;
|
||||
}
|
||||
$currencyFactor = $this->travelProgram->getNettoPricesInEuro() ? 1 : $this->currencyFactor;
|
||||
foreach ($this->travelPeriod->getPrices() as $price)
|
||||
foreach ($this->prices as &$price)
|
||||
{
|
||||
$price->setEffectivePrice(round(($flightPrice + $price->getPrice() * $currencyFactor) * $profitMargin));
|
||||
$price->setEffectiveComfortPrice(round($price->getPriceComfort() * $currencyFactor * $profitMargin));
|
||||
$price->setEffectiveChildPrice(round($price->getPriceChildren() * $currencyFactor * $profitMargin));
|
||||
}
|
||||
}
|
||||
return $this->travelPeriod->getPrices();
|
||||
return $this->prices;
|
||||
}
|
||||
|
||||
public function getLowestPrice()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue