From 8bcb875901e12b8b8940ee2e860fb2d1a7b55f35 Mon Sep 17 00:00:00 2001 From: Srinivas-Saravanan Date: Fri, 24 Jan 2025 16:59:54 +0530 Subject: [PATCH] FIX_VOID_REDIRECT --- app/Views/invoice_form.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/Views/invoice_form.php b/app/Views/invoice_form.php index 01d694df..bafe909f 100755 --- a/app/Views/invoice_form.php +++ b/app/Views/invoice_form.php @@ -2250,7 +2250,12 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d void_reason: voidReason }, success: function(response) { - window.location.href = ""; + if ('' == 1){ + window.location.href = ""; + } + else if ('' == 2){ + window.location.href = ""; + } // Handle success response // For example, close modal and show success message $('#voidReasonModal').modal('hide'); @@ -2349,8 +2354,14 @@ $('#saveButton').click(function() { cancel_reason: cancelReason }, success: function(response) { + // Redirect to the invoice_list page upon successful cancellation - window.location.href = ""; + if ('' == 1){ + window.location.href = ""; + } + else if ('' == 2){ + window.location.href = ""; + } }, error: function(xhr, status, error) { // Handle error response