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');
- });
- });
+