Files
sirpremiumv2/app/Http/Livewire
LizandroandClaude Sonnet 4.6 2f5be9253b Fix 5 bugs in chat and Telegram purchase flows
1. PublicChat::comprarPromoConSaldo — double saldo subtraction: $saldo->update()
   already updates the model in memory, so $this->saldoUsuario = $saldo->valor - precio
   was subtracting twice. Fixed by computing $nuevoSaldo before the update.
   Also wrapped in DB::transaction (was missing unlike pagarConSaldo).

2. TelegramBotService::listServices — showed all services without filtering by the
   user's rol_id, so users could see services with no plans for their role.
   Now uses whereHas('tarifas', rol_id) like PublicChat and the web.

3. TelegramBotService::payWithSaldo — no DB::transaction; if saldo update failed
   after historial was created, user got a free service. Now wrapped atomically.

4. TelegramBotService::buyPromoSaldo — same missing transaction + fecha_final was
   hardcoded to 30 days instead of promo->dias. Both fixed.

5. TelegramBotService::showCredentials — N+1 queries loading cuentas lazily per
   historial. Added cuentas to the eager-load list.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-18 16:06:20 +00:00
..
up
2026-04-25 15:04:50 -05:00
2025-02-27 15:19:52 -05:00
2023-11-07 22:43:10 +00:00
2025-04-04 20:11:51 -05:00
2023-11-07 22:43:10 +00:00
2025-04-04 20:11:51 -05:00
up
2026-06-18 13:04:07 -05:00
2023-11-07 22:43:10 +00:00
2023-11-07 22:43:10 +00:00
2025-04-04 20:11:51 -05:00
2023-11-07 22:43:10 +00:00
up
2026-04-18 14:08:14 -05:00
2023-11-07 22:43:10 +00:00
2023-11-07 22:43:10 +00:00
2023-11-07 22:43:10 +00:00
2023-11-07 22:43:10 +00:00
2023-11-07 22:43:10 +00:00
up
2025-10-18 10:43:02 -05:00
2025-07-31 15:19:22 -07:00
2025-04-04 20:11:51 -05:00
2025-04-04 20:11:51 -05:00
2025-04-04 20:11:51 -05:00
2023-11-07 22:43:10 +00:00
2023-11-07 22:43:10 +00:00
up
2026-06-05 10:12:46 -05:00
up
2025-09-02 22:32:49 -05:00
up
2026-04-18 14:13:24 -05:00
up
2026-04-21 18:14:04 -05:00
up
2026-04-21 18:32:01 -05:00
2024-10-02 17:42:08 -05:00
2025-08-22 10:09:23 -07:00
2026-06-18 11:06:49 -05:00
2026-06-18 11:06:49 -05:00
2023-11-07 22:43:10 +00:00
2025-02-27 15:19:52 -05:00
2026-06-05 10:17:07 -05:00
2023-11-07 22:43:10 +00:00
2023-11-07 22:43:10 +00:00