calculator->calculate($booking->property, $stay); if ($booking->isBinding() || ! $booking->exists) { return $quote; } $context = CaseContext::of($booking); foreach ($context->plan->moduleKeys() as $key) { if (! $this->catalogue->hasModule($key) || ! $context->plan->enabled($key)) { continue; } $module = $this->catalogue->module($key); if (! $module instanceof ContributesToPrice || ! $module->applies($context)) { continue; } foreach ($module->priceLines($context, $quote) as $line) { $quote = $quote->withLine($line); } } return $quote; } }