diff --git a/resources/views/invoices/view.blade.php b/resources/views/invoices/view.blade.php index 4736c8f6c4..dfc2d2d107 100644 --- a/resources/views/invoices/view.blade.php +++ b/resources/views/invoices/view.blade.php @@ -290,6 +290,15 @@ } function onApproveClick() { + @if ($account->requiresAuthorization($invoice)) + window.pendingPaymentFunction = approveQuote; + showAuthorizationModal(); + @else + approveQuote(); + @endif + } + + function approveQuote() { $('#approveButton').prop('disabled', true); location.href = "{{ url('/approve/' . $invitation->invitation_key) }}"; }