add log file function

This commit is contained in:
2026-03-24 16:56:23 +05:30
parent 6c74b5d3bf
commit 88e8771b51
3 changed files with 15 additions and 15 deletions

View File

@@ -7,6 +7,7 @@
<title>Edit Invoice</title>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/invoice.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style1.css') }}">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
@@ -204,15 +205,17 @@
type: "POST",
url: $(this).attr("action"),
data: $(this).serialize(),
dataType: 'json', // ensure JSON is returned
success: function (response) {
if (response.status === "success") {
$("#invoiceSuccessAlert").fadeIn().delay(3000).fadeOut();
alert("Invoice updated successfully!"); // <-- Popup alert
}
// ✅ Redirect to Add Invoice page (table part visible)
window.location.href = "{{ url_for('invoice.add_invoice') }}#addTable";
}
},
error: function (xhr) {
alert("Error: " + xhr.responseJSON.message);
alert("Error: " + xhr.responseJSON?.message || "Something went wrong!");
}
});
});