* 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 <noreply@anthropic.com>
* 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 <noreply@anthropic.com>
* 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 <noreply@anthropic.com>
* 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 <noreply@anthropic.com>
* 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 <noreply@anthropic.com>
* fix: remove duplicate description in purchase_invoice update_stock field
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* revert: restore custom tooltip in purchase_invoice.js
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* revert: remove all changes from purchase_invoice.js
Keep purchase_invoice.js identical to upstream develop.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit a9029f83c7)
fix(bom): fetch routing operations when routing is selected
frm.doc.operations is always an array in Frappe, so !frm.doc.operations
was always false (empty array [] is truthy in JS), causing get_routing()
to never fire when a Routing is selected on a BOM with no existing
operations.
Changed the guard to !frm.doc.operations.length so the fetch triggers
correctly when the operations table is empty.
Also wired the same fetch into the with_operations handler so that
enabling the checkbox after a Routing is already set will populate
operations without requiring the user to re-select the Routing.
Co-authored-by: Umair Sayed <umairsayed@Umairs-MacBook-Air-2.local>
(cherry picked from commit 9249fa89aa)
`parent_items` already comes from the disabled-filtered parent query,
and on v16 an item has at most one bundle, so the child query cannot
reach a disabled bundle.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
On version-16-hotfix, Product Bundle has no `is_active` field and is not
submittable (docstatus is always 0), so the backported queries crashed
with "Unknown column 'is_active'" and would otherwise have matched no
rows. Keep v16's `docstatus: 0` and derive activity from `disabled`, as
the surrounding build_row calls already do.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Partial backport of frappe/erpnext#55791 to version-16-hotfix. On v16,
Product Bundle is neither submittable nor versioned and every resolution
path (packing, POS, item details, selling controller) already filters
`disabled: 0`, so only the user-facing gaps are backported:
- the "Get Items from Product Bundle" dialog no longer offers disabled
bundles
- list view indicator: Disabled (grey) / Active (green)
- Product Bundle Balance report excludes disabled bundles
- `disabled` field gets a description, standard filter and no_copy (a
copied bundle starts enabled)
The develop-only parts (un-deprecating the field, `is_active`/docstatus
handling, the version picker filter and the disabled-version validation
on transaction rows) have no v16 equivalent and are intentionally
dropped.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Stock Ageing iterates stock ledger entries through an unbuffered
(streaming) cursor. _get_batchwise_valuation() lazily queried
Batch.use_batchwise_valuation from inside that loop whenever a row
carried the legacy batch_no field, and the nested query invalidated
the active streaming result set — crashing the report (or silently
dropping the remaining rows, depending on the driver version).
Resolve the valuation flags in a single query before entering the
unbuffered cursor block; the lazy lookup now only serves callers that
pass stock ledger entries in directly, where no streaming is active.
Fixes https://github.com/frappe/erpnext/issues/55786
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 060a5c4eeb)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
fix(process statement of accounts): validate pdf_name and validate permission before triggering send_auto_email (#55781)