@if ($invoice->payments->where('reconciliation_status', '!=', 'discrepancy')->count())
{{ __('billing.button.unpay') }}
@endif
@if ($invoice->status != 'paid' && $invoice->periode === $invoice->customer_paket->invoices()->where('status', '!=','paid')->oldest()->first()->periode && $invoice->customer_paket->status != 'pending')
{{ __('billing.button.pay') }}
@endif
@if ($invoice->status != 'paid')
@if (!$invoice->payments->count() && $invoice->status != 'paid' && $invoice->periode === $invoice->customer_paket->invoices()->where('status', '!=','paid')->latest('periode')->first()->periode)
@endif
@else
@if ($invoice->amount - $invoice->discount > 0)
@endif
@endif