update affiliate program

This commit is contained in:
Edmond Lang
2025-12-03 10:46:31 +08:00
parent 8e35bedd66
commit 914ce02d2c
@@ -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
}