From 2e4119d07767e11fa4a30b4fc33a79d91d88683e Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Thu, 20 Jun 2024 05:15:45 +0000 Subject: [PATCH] FIX_ subscribe = 2 save as Approved displayed : ps --- app/Views/invoice_form.php | 113 ++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 58 deletions(-) diff --git a/app/Views/invoice_form.php b/app/Views/invoice_form.php index b4207166..5505f52d 100644 --- a/app/Views/invoice_form.php +++ b/app/Views/invoice_form.php @@ -641,19 +641,12 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
- - - - - - - - - - - - - + + + + + +
@@ -1587,6 +1580,7 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d document.getElementById('myForm').addEventListener('submit', function(event) { var form = event.target; var status = document.getElementById('status').value; + var invoice_type = document.getElementById('invoice_type').value; if (form.checkValidity() === false) { form.reportValidity(); // Display validation error messages event.preventDefault(); // Prevent form submission if it's not valid @@ -1617,7 +1611,7 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d } if (status == "Approved") { $('#saveDraftButton').prop('disabled', true); - $('#saveApprovedButton').prop('disabled', true); + $('#saveApprovedButton').prop('disabled', false); $('#saveapproved').prop('disabled', true); } } @@ -1989,57 +1983,60 @@ function saveInvoiceCustomer() { }); - // Handle click on the "Save as Draft" button - $('#saveDraftButton').click(function() { - console.log('Save as Draft button clicked'); - }); - - // Handle click on the "Void" button - $('#voidButton').click(function() { - console.log('Void button clicked'); - }); - - // Handle click on the "Save as Approved" button - $('#saveApprovedButton').click(function() { - console.log('Save as Approved button clicked'); - }); - }); +