## New Features - Email notifications for overdue and upcoming payments - User preferences page for notification settings - Daily scheduler to send alerts at user-configured time - Smart analysis: payable items, transfer suggestions between accounts ## Backend - Migration for user_preferences table - SendDuePaymentsAlert Artisan command - DuePaymentsAlert Mailable with HTML/text templates - UserPreferenceController with test-notification endpoint - Scheduler config for notify:due-payments command ## Frontend - Preferences.jsx page with notification toggle - API service for preferences - Route and menu link for settings - Translations (PT-BR, EN, ES) ## Server - Cron configured for Laravel scheduler Version: 1.44.5
86 lines
3.0 KiB
PHP
86 lines
3.0 KiB
PHP
WEBMoney - Alerta de Pagamentos
|
|
================================
|
|
|
|
Olá, {{ $userName }}!
|
|
|
|
RESUMO FINANCEIRO
|
|
-----------------
|
|
💳 Saldo Total Disponível: {{ number_format($totalAvailable, 2, ',', '.') }} {{ $currency }}
|
|
📋 Total a Pagar: {{ number_format($totalDue, 2, ',', '.') }} {{ $currency }}
|
|
@if($shortage > 0)
|
|
⚠️ FALTA: {{ number_format($shortage, 2, ',', '.') }} {{ $currency }}
|
|
|
|
ATENÇÃO: Você não tem saldo suficiente para cobrir todos os pagamentos!
|
|
@else
|
|
✅ Situação: Saldo suficiente para cobrir os pagamentos!
|
|
@endif
|
|
|
|
SALDO DAS CONTAS
|
|
----------------
|
|
@foreach($accountBalances as $account)
|
|
• {{ $account['name'] }}: {{ number_format($account['balance'], 2, ',', '.') }} {{ $account['currency'] }}
|
|
@endforeach
|
|
|
|
@if(count($overdueItems) > 0)
|
|
🔴 PAGAMENTOS VENCIDOS ({{ count($overdueItems) }})
|
|
---------------------------------------------------
|
|
@foreach($overdueItems as $item)
|
|
• {{ $item['description'] }}
|
|
Valor: {{ number_format($item['amount'], 2, ',', '.') }} {{ $item['currency'] }}
|
|
Venceu em: {{ \Carbon\Carbon::parse($item['due_date'])->format('d/m/Y') }} ({{ $item['days_overdue'] }} dias de atraso)
|
|
@if($item['account_name'])Conta: {{ $item['account_name'] }}@endif
|
|
|
|
@endforeach
|
|
@endif
|
|
|
|
@if(count($tomorrowItems) > 0)
|
|
🟡 VENCEM AMANHÃ ({{ count($tomorrowItems) }})
|
|
----------------------------------------------
|
|
@foreach($tomorrowItems as $item)
|
|
• {{ $item['description'] }}
|
|
Valor: {{ number_format($item['amount'], 2, ',', '.') }} {{ $item['currency'] }}
|
|
Vence em: {{ \Carbon\Carbon::parse($item['due_date'])->format('d/m/Y') }}
|
|
@if($item['account_name'])Conta: {{ $item['account_name'] }}@endif
|
|
|
|
@endforeach
|
|
@endif
|
|
|
|
@if(count($payableItems) > 0)
|
|
✅ PAGAMENTOS POSSÍVEIS ({{ count($payableItems) }})
|
|
----------------------------------------------------
|
|
Com base no saldo atual, você consegue pagar:
|
|
@foreach($payableItems as $item)
|
|
• {{ $item['description'] }} - {{ number_format($item['amount'], 2, ',', '.') }} {{ $item['currency'] }} ✓
|
|
@endforeach
|
|
|
|
@endif
|
|
|
|
@if(count($unpayableItems) > 0)
|
|
❌ SEM SALDO SUFICIENTE ({{ count($unpayableItems) }})
|
|
------------------------------------------------------
|
|
Não há saldo disponível para estes pagamentos:
|
|
@foreach($unpayableItems as $item)
|
|
• {{ $item['description'] }} - {{ number_format($item['amount'], 2, ',', '.') }} {{ $item['currency'] }} ✗
|
|
@endforeach
|
|
|
|
@endif
|
|
|
|
@if(count($transferSuggestions) > 0)
|
|
💱 SUGESTÕES DE TRANSFERÊNCIA
|
|
-----------------------------
|
|
Para cobrir os pagamentos, considere transferir entre suas contas:
|
|
@foreach($transferSuggestions as $transfer)
|
|
• De "{{ $transfer['from_account'] }}" para "{{ $transfer['to_account'] }}": {{ number_format($transfer['amount'], 2, ',', '.') }} {{ $currency }}
|
|
Motivo: {{ $transfer['reason'] }}
|
|
@endforeach
|
|
|
|
@endif
|
|
|
|
--------------------------------------------------
|
|
Acesse o WEBMoney: https://webmoney.cnxifly.com
|
|
|
|
Para desativar estas notificações, acesse:
|
|
https://webmoney.cnxifly.com/preferences
|
|
|
|
© {{ date('Y') }} WEBMoney - ConneXiFly
|