Child in Booking Form, calculate, show, validate, mail, success

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3447 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
adametz 2018-08-20 11:40:10 +00:00
parent 48131f72e2
commit 22af43b07a
18 changed files with 1147 additions and 209 deletions

View file

@ -283,6 +283,16 @@ class TravelPeriodPrice
return $this->calculateDiscountPrice($this->price);
}
/**
* Probably getEffectiveDiscountPrice() is the method you are actually looking for.
* @return float|null
*/
public function getChildDiscountPrice()
{
return $this->calculateDiscountPrice($this->priceChildren);
}
/**
* @return float
* @throws \Exception
@ -296,6 +306,19 @@ class TravelPeriodPrice
return $this->calculateDiscountPrice($this->effectivePrice);
}
/**
* @return float
* @throws \Exception
*/
public function getEffectiveChildDiscountPrice()
{
if ($this->effectiveChildPrice === null)
{
throw new \Exception('Effective price must be set from outside before reading effective discount price.');
}
return $this->calculateDiscountPrice($this->effectiveChildPrice);
}
/**
* @return float
* @throws \Exception