FIX_VOID_REDIRECT

This commit is contained in:
Srinivas-Saravanan 2025-01-24 16:59:54 +05:30
parent e59f1636e4
commit 8bcb875901

View File

@ -2250,7 +2250,12 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
void_reason: voidReason void_reason: voidReason
}, },
success: function(response) { success: function(response) {
if ('<?= $invoice_type ?>' == 1){
window.location.href = "<?php echo base_url('offline_invoice'); ?>"; window.location.href = "<?php echo base_url('offline_invoice'); ?>";
}
else if ('<?= $invoice_type ?>' == 2){
window.location.href = "<?php echo base_url('subscribers_list'); ?>";
}
// Handle success response // Handle success response
// For example, close modal and show success message // For example, close modal and show success message
$('#voidReasonModal').modal('hide'); $('#voidReasonModal').modal('hide');
@ -2349,8 +2354,14 @@ $('#saveButton').click(function() {
cancel_reason: cancelReason cancel_reason: cancelReason
}, },
success: function(response) { success: function(response) {
// Redirect to the invoice_list page upon successful cancellation // Redirect to the invoice_list page upon successful cancellation
if ('<?= $invoice_type ?>' == 1){
window.location.href = "<?php echo base_url('offline_invoice'); ?>"; window.location.href = "<?php echo base_url('offline_invoice'); ?>";
}
else if ('<?= $invoice_type ?>' == 2){
window.location.href = "<?php echo base_url('subscribers_list'); ?>";
}
}, },
error: function(xhr, status, error) { error: function(xhr, status, error) {
// Handle error response // Handle error response