diff --git a/app/Views/invoice_form.php b/app/Views/invoice_form.php index bafe909f..08d63334 100755 --- a/app/Views/invoice_form.php +++ b/app/Views/invoice_form.php @@ -1652,9 +1652,20 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d let messages = "Earlier Membership :
"; for (let i = 0; i < cm.length; i++) { let text1 = cm[i].is_renew > 1 ? " - Renewed" : ""; - let text2 = cm[i].invoice_status == 'Approved' ? "" :" - Draft"; - let text3 = cm[i].status == 0 ? ' - Expired ': " - Active"; + let text2 = '';console.log('invoice status'+cm[i].invoice_status); + if (cm[i].invoice_status === 'Draft'){ + text2 = " - Draft"; + }else if(cm[i].invoice_status === 'Void'){ + text2 = " - Void"; + }else if(cm[i].invoice_status === 'Cancelled'){ + text2 = " -Cancelled " + } + let text3 = ''; + if(cm[i].invoice_status === 'Approved'){ + text3 = cm[i].status == 0 ? ' - Expired ': " - Active"; + } messages += cm[i].title + "
( From: " + cm[i].formatted_from_subscription + " To: " + cm[i].formatted_to_subscription + " )" + text1 + text2 + text3+ "
"; + console.log('message - '+messages); } // $("#schemeName").text(message);