أُنشئ من Tokal/Test
Fix pricing scope and venue_type filter in reservation pricing lookup
فشلت بعض الفحوصات
Deploy Backend / deploy (push) Has been cancelled
فشلت بعض الفحوصات
Deploy Backend / deploy (push) Has been cancelled
هذا الالتزام موجود في:
@@ -396,7 +396,10 @@ class ReservationController extends Controller
|
|||||||
private function getPricingRule(?Venue $venue): ?PricingRule
|
private function getPricingRule(?Venue $venue): ?PricingRule
|
||||||
{
|
{
|
||||||
if (! $venue) {
|
if (! $venue) {
|
||||||
return PricingRule::where('scope', 'global_type')->where('is_active', true)->latest('id')->first();
|
return PricingRule::where('scope', 'global_type')
|
||||||
|
->where('is_active', true)
|
||||||
|
->latest('id')
|
||||||
|
->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
$venueRule = PricingRule::where('scope', 'venue')
|
$venueRule = PricingRule::where('scope', 'venue')
|
||||||
@@ -410,7 +413,7 @@ class ReservationController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$typeRule = PricingRule::where('scope', 'global_type')
|
$typeRule = PricingRule::where('scope', 'global_type')
|
||||||
->where('venue_type', $venue->type)
|
->where('venue_type', (string) $venue->type)
|
||||||
->where('is_active', true)
|
->where('is_active', true)
|
||||||
->latest('id')
|
->latest('id')
|
||||||
->first();
|
->first();
|
||||||
@@ -419,7 +422,10 @@ class ReservationController extends Controller
|
|||||||
return $typeRule;
|
return $typeRule;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PricingRule::where('scope', 'global_type')->where('is_active', true)->latest('id')->first();
|
return PricingRule::where('scope', 'global_type')
|
||||||
|
->where('is_active', true)
|
||||||
|
->latest('id')
|
||||||
|
->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function findAvailableTable(Reservation $reservation, bool $includePending, bool $lockRows = false): ?VenueTable
|
private function findAvailableTable(Reservation $reservation, bool $includePending, bool $lockRows = false): ?VenueTable
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم