fix: einvoice button visiblity condition (#24800)

diff --git a/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html b/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html
index 8eef2ad..71c26e8 100644
--- a/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html
+++ b/erpnext/accounts/print_format/gst_e_invoice/gst_e_invoice.html
@@ -22,8 +22,8 @@
 		</p>
 	</div>
 	{% endif %}
+	<h5 class="font-bold" style="margin-top: 0px;">1. Transaction Details</h5>
 	<div class="row section-break" style="border-bottom: 1px solid #d1d8dd; padding-bottom: 10px;">
-		<h5 class="font-bold" style="margin-left: 15px; margin-top: 0px;">1. Transaction Details</h5>
 		<div class="col-xs-8 column-break">
 			<div class="row data-field">
 				<div class="col-xs-4"><label>IRN</label></div>
@@ -54,8 +54,8 @@
 			<img src="{{ doc.qrcode_image }}" width="175px" style="float: right;">
 		</div>
 	</div>
+	<h5 class="font-bold" style="margin-top: 15px; margin-bottom: 10px;">2. Party Details</h5>
 	<div class="row section-break" style="border-bottom: 1px solid #d1d8dd; padding-bottom: 10px;">
-		<h5 class="font-bold" style="margin-left: 15px; margin-bottom: 0px;">2. Party Details</h5>
 		{%- set seller = einvoice.SellerDtls -%}
 		<div class="col-xs-6 column-break">
 			<h5 style="margin-bottom: 5px;">Seller</h5>
@@ -89,7 +89,7 @@
 		</div>
 	</div>
 	<div style="overflow-x: auto;">
-		<h5 class="font-bold" style="margin-bottom: 0px;">3. Item Details</h5>
+		<h5 class="font-bold" style="margin-top: 15px; margin-bottom: 10px;">3. Item Details</h5>
 		<table class="table table-bordered">
 			<thead>
 				<tr>
diff --git a/erpnext/regional/india/e_invoice/einvoice.js b/erpnext/regional/india/e_invoice/einvoice.js
index a756b57..7cd64f2 100644
--- a/erpnext/regional/india/e_invoice/einvoice.js
+++ b/erpnext/regional/india/e_invoice/einvoice.js
@@ -1,12 +1,12 @@
 erpnext.setup_einvoice_actions = (doctype) => {
 	frappe.ui.form.on(doctype, {
-		refresh(frm) {
-			const einvoicing_enabled = frappe.db.get_value("E Invoice Settings", "E Invoice Settings", "enable");
+		async refresh(frm) {
+			const einvoicing_enabled = await frappe.db.get_single_value("E Invoice Settings", "enable");
 			const supply_type = frm.doc.gst_category;
 			const valid_supply_type = ['Registered Regular', 'SEZ', 'Overseas', 'Deemed Export'].includes(supply_type);
 			const company_transaction = frm.doc.billing_address_gstin == frm.doc.company_gstin;
 
-			if (!einvoicing_enabled || !valid_supply_type || company_transaction) return;
+			if (cint(einvoicing_enabled) == 0 || !valid_supply_type || company_transaction) return;
 
 			const { doctype, irn, irn_cancelled, ewaybill, eway_bill_cancelled, name, __unsaved } = frm.doc;
 
@@ -83,7 +83,7 @@
 				const action = () => {
 					const d = new frappe.ui.Dialog({
 						title: __('Generate E-Way Bill'),
-						wide: 1,
+						size: "large",
 						fields: get_ewaybill_fields(frm),
 						primary_action: function() {
 							const data = d.get_values();
@@ -252,7 +252,7 @@
 const get_preview_dialog = (frm, action) => {
 	const dialog = new frappe.ui.Dialog({
 		title: __("Preview"),
-		wide: 1,
+		size: "large",
 		fields: [
 			{ 
 				"label": "Preview",