@if($invoice->order && $invoice->order->order_type !== OrderType::Wired->value && $invoice->order->order_type !== OrderType::Web->value)
@isset($invoice->status->value)
@php
// Check if payment is needed: invoice is open AND order is not fully paid
$needsPayment = $invoice->status->value === 'open'
&& !$invoice->order->isPaid()
&& $invoice->order->total > 0;
@endphp
@if($needsPayment)