ssSudan Nil Frontend + extra Days + price in booking form - export + mail
git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3483 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
b28c7db598
commit
98bd71c760
22 changed files with 2186 additions and 32 deletions
|
|
@ -34,6 +34,28 @@ class TravelPeriodPrice
|
|||
*/
|
||||
private $priceComfort = '0.00';
|
||||
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*
|
||||
* @ORM\Column(name="extra_price_children", type="float", precision=10, scale=2, nullable=true)
|
||||
*/
|
||||
private $extraPriceChildren;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*
|
||||
* @ORM\Column(name="extra_price_net", type="float", precision=10, scale=2, nullable=false)
|
||||
*/
|
||||
private $extraPrice = '0.00';
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*
|
||||
* @ORM\Column(name="extra_price_comfort_net", type="float", precision=10, scale=2, nullable=false)
|
||||
*/
|
||||
private $extraPriceComfort = '0.00';
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
|
|
@ -70,6 +92,10 @@ class TravelPeriodPrice
|
|||
private $effectiveChildPrice = null;
|
||||
private $effectiveComfortPrice = null;
|
||||
|
||||
private $effectiveExtraPrice = null;
|
||||
private $effectiveExtraChildPrice = null;
|
||||
private $effectiveExtraComfortPrice = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="available", type="integer", nullable=false)
|
||||
*/
|
||||
|
|
@ -195,6 +221,80 @@ class TravelPeriodPrice
|
|||
return $this->priceComfort;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set extraPriceChildren
|
||||
*
|
||||
* @param float $extraPriceChildren
|
||||
*
|
||||
* @return TravelPeriodPrice
|
||||
*/
|
||||
public function setExtraPriceChildren($extraPriceChildren)
|
||||
{
|
||||
$this->extraPriceChildren = $extraPriceChildren;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get extraPriceChildren
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getExtraPriceChildren()
|
||||
{
|
||||
return $this->extraPriceChildren;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set extraPrice
|
||||
*
|
||||
* @param float $extraPrice
|
||||
*
|
||||
* @return TravelPeriodPrice
|
||||
*/
|
||||
public function setExtraPrice($extraPrice)
|
||||
{
|
||||
$this->extraPrice = $extraPrice;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get extraPrice
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getExtraPrice()
|
||||
{
|
||||
return $this->extraPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set extraPriceComfort
|
||||
*
|
||||
* @param float $extraPriceComfort
|
||||
*
|
||||
* @return TravelPeriodPrice
|
||||
*/
|
||||
public function setExtraPriceComfort($extraPriceComfort)
|
||||
{
|
||||
$this->extraPriceComfort = $extraPriceComfort;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get extraPriceComfort
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getExtraPriceComfort()
|
||||
{
|
||||
return $this->extraPriceComfort;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
|
|
@ -274,6 +374,29 @@ class TravelPeriodPrice
|
|||
$this->effectivePrice = $effectivePrice;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return float
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function getEffectiveExtraPrice()
|
||||
{
|
||||
if ($this->effectiveExtraPrice === null)
|
||||
{
|
||||
throw new \Exception('EffectiveExtra price must be set from outside before reading it.');
|
||||
}
|
||||
return $this->effectiveExtraPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param float $effectiveExtraPrice
|
||||
*/
|
||||
public function setEffectiveExtraPrice($effectiveExtraPrice)
|
||||
{
|
||||
$this->effectiveExtraPrice = $effectiveExtraPrice;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Probably getEffectiveDiscountPrice() is the method you are actually looking for.
|
||||
* @return float|null
|
||||
|
|
@ -342,6 +465,31 @@ class TravelPeriodPrice
|
|||
$this->effectiveChildPrice = $effectiveChildPrice;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return float
|
||||
* @throws \Exception
|
||||
*
|
||||
* @todo The child price will not be set yet. This is just a preparation for later
|
||||
*/
|
||||
public function getEffectiveExtraChildPrice()
|
||||
{
|
||||
if ($this->effectiveExtraChildPrice === null)
|
||||
{
|
||||
throw new \Exception('Effective Extra child price must be set from outside before reading it.');
|
||||
}
|
||||
return $this->effectiveExtraChildPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $effectiveChildPrice
|
||||
*/
|
||||
public function setEffectiveExtraChildPrice($effectiveExtraChildPrice)
|
||||
{
|
||||
$this->effectiveExtraChildPrice = $effectiveExtraChildPrice;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return float|null
|
||||
* @throws \Exception
|
||||
|
|
@ -363,6 +511,28 @@ class TravelPeriodPrice
|
|||
$this->effectiveComfortPrice = $effectiveComfortPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return float|null
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function getEffectiveExtraComfortPrice()
|
||||
{
|
||||
if ($this->effectiveExtraComfortPrice === null)
|
||||
{
|
||||
throw new \Exception('Effective Extra comfort price must be set from outside before reading it.');
|
||||
}
|
||||
return $this->effectiveExtraComfortPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param float|null $effectiveExtraComfortPrice
|
||||
*/
|
||||
public function setEffectiveExtraComfortPrice($effectiveExtraComfortPrice)
|
||||
{
|
||||
$this->effectiveExtraComfortPrice = $effectiveExtraComfortPrice;
|
||||
}
|
||||
|
||||
|
||||
private function calculateDiscountPrice($price)
|
||||
{
|
||||
if ($this->getPeriod() == null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue