status !== PosSale::STATUS_PAID) { return; } try { CrmClient::for($sale->owner_ref)->pushTimeline([ 'event' => 'order.paid', 'title' => 'POS sale '.$sale->reference, 'external_id' => (string) $sale->id, 'amount_minor' => (int) $sale->total_minor, 'currency' => (string) $sale->currency, 'url' => route('pos.sales.show', $sale), 'customer_id' => $sale->crm_customer_id, 'customer_email' => $sale->customer_email, 'customer_phone' => $sale->customer_phone, 'customer_name' => $sale->customer_name, 'description' => ucfirst($sale->payment_method).' payment at register', 'occurred_at' => ($sale->paid_at ?? now())->toIso8601String(), ]); } catch (\Throwable $e) { Log::info('CRM timeline push skipped for POS sale', [ 'sale_id' => $sale->id, 'error' => $e->getMessage(), ]); } } }