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