Merge branch 'affiliate-program' of https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0 into vapor/development

This commit is contained in:
Edmond Lang
2025-12-03 10:46:59 +08:00
@@ -49,7 +49,11 @@ class TracksAffiliateOrder
// We'll use a KeyValuePair to track which bookings have been counted
$kvpKey = 'affiliate_order_tracked_' . $affiliate->id;
if ($booking->hasAttribute($kvpKey)) {
$existingKvp = $booking->attributesKVP()
->where('key', $kvpKey)
->exists();
if ($existingKvp) {
return $affiliate; // Already counted
}