From 12be63229aad2973c85a43f7c8fda59fb36b9bd2 Mon Sep 17 00:00:00 2001 From: Dipen Gala <123350348+DipenFrappe@users.noreply.github.com> Date: Sat, 13 Jun 2026 20:48:03 +0530 Subject: [PATCH] feat(invoices): add tooltip description to Update Stock checkbox (#55868) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(invoices): add tooltip description to Update Stock checkbox Adds a description below the Update Stock checkbox on both Sales Invoice and Purchase Invoice so users understand when to use the field without consulting documentation. Co-Authored-By: Claude Sonnet 4.6 * feat(invoices): replace Update Stock description with hover info tooltip Removes the inline description text and adds an ℹ icon next to the Update Stock checkbox label on both Sales Invoice and Purchase Invoice. Hovering the icon shows the contextual tooltip via Bootstrap tooltip. Co-Authored-By: Claude Sonnet 4.6 * fix(invoices): use Frappe native tooltip-content class for Update Stock icon Replace Bootstrap .tooltip() (pure black bg) with Frappe's own .tooltip-content CSS class so the hover tooltip matches the rest of the ERPNext UI — uses var(--bg-dark-gray) and var(--text-dark). Co-Authored-By: Claude Sonnet 4.6 * fix(invoices): use frappe.ui.SidebarCard for Update Stock info tooltip Replace custom CSS tooltip with the same SidebarCard + Popper approach Frappe's InfoCard uses for field description tooltips — gives the native ERPNext card appearance (white card, border, shadow) on hover. Co-Authored-By: Claude Sonnet 4.6 * refactor(invoices): use built-in field description for Update Stock tooltip Replace custom SidebarCard JS tooltip with Frappe's native description + show_description_on_click field property on the update_stock field in Sales Invoice and Purchase Invoice. Co-Authored-By: Claude Sonnet 4.6 * fix: remove duplicate description in purchase_invoice update_stock field Co-Authored-By: Claude Sonnet 4.6 * revert: restore custom tooltip in purchase_invoice.js Co-Authored-By: Claude Sonnet 4.6 * revert: remove all changes from purchase_invoice.js Keep purchase_invoice.js identical to upstream develop. Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Claude Sonnet 4.6 (cherry picked from commit a9029f83c7dc5e0c53104802baffde9b5860ba20) --- .../accounts/doctype/purchase_invoice/purchase_invoice.json | 6 ++++-- erpnext/accounts/doctype/sales_invoice/sales_invoice.json | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 557c2940ef5..e26b5f5bbf9 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -606,10 +606,12 @@ { "default": "0", "depends_on": "eval:doc.items.every((item) => !item.pr_detail)", + "description": "If checked, updates inventory; stock and accounting entries are created together. Leave unchecked if a Purchase Receipt is created separately.", "fieldname": "update_stock", "fieldtype": "Check", "label": "Update Stock", - "print_hide": 1 + "print_hide": 1, + "show_description_on_click": 1 }, { "fieldname": "scan_barcode", @@ -1698,7 +1700,7 @@ "idx": 204, "is_submittable": 1, "links": [], - "modified": "2026-05-28 12:36:55.215363", + "modified": "2026-06-13 18:36:46.704623", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index 5c9289d3b51..dd09e7b1fd8 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -717,6 +717,7 @@ { "default": "0", "depends_on": "eval:doc.items.every((item) => !item.dn_detail)", + "description": "If checked, updates inventory; stock and accounting entries are created together. Leave unchecked if a Delivery Note is created separately.", "fieldname": "update_stock", "fieldtype": "Check", "hide_days": 1, @@ -724,7 +725,8 @@ "label": "Update Stock", "oldfieldname": "update_stock", "oldfieldtype": "Check", - "print_hide": 1 + "print_hide": 1, + "show_description_on_click": 1 }, { "fieldname": "scan_barcode",