update_item_rates passed price_not_uom_dependent, a key
get_price_list_rate_for never reads, and omitted conversion_factor, so a
stock-UOM price was never converted to the row UOM. The function's
(historically misnamed) price_list_uom_dependant ctx key carries the
Price List's price_not_uom_dependent value: truthy returns the found
rate as-is, falsy multiplies by conversion_factor.
Also guard on_update with is_new(): has_value_changed returns True when
there is no doc_before_save, so every first save re-wrote item rates.
* fix: consider min order qty in the purchase/transfer flow of production plan (backport #57204)
The transfer flow ignored Consider Minimum Order Qty twice: the JS
handler force-reset the checkbox before fetching items, and the
purchase remainder left after allocating transfers from other
warehouses was never raised to min_order_qty (the check runs on the
total requirement before the split).
Drop the JS reset and apply min order qty to the purchase remainder,
in stock UOM before the purchase UOM conversion.
* test: do not set ignore_existing_ordered_qty; v15 gates the transfer split on it being unset
- allow new rows on scan when pick manually is enabled, since only
then are scanned rows not subject to being overridden by
set_item_locations on save
- stop capping picked qty at the default demand qty (1) for rows
added by the scanner itself, so repeat scans of the same barcode
keep incrementing the row instead of failing with "maximum
quantity scanned"
- ignore barcode uom when matching an existing row if new rows
aren't allowed, since there's no alternate-uom row to fall back to
(cherry picked from commit 3ece4a615d)
* refactor: rename execute_synced_report to execute_snapshot_report
Match the framework rename of the standard report entry point in the
trial balance, P&L, balance sheet, and general ledger reports.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit ba7b6a47c5)
* refactor: rename feature toggle in report master
(cherry picked from commit 981e90e4da)
# Conflicts:
# erpnext/accounts/report/accounts_payable/accounts_payable.json
# erpnext/accounts/report/accounts_receivable/accounts_receivable.json
# erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.json
# erpnext/accounts/report/trial_balance/trial_balance.json
---------
Co-authored-by: ruthra kumar <ruthra@erpnext.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Match the framework rename of the standard report entry point in the
trial balance, P&L, balance sheet, and general ledger reports.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit ba7b6a47c5)
* refactor: reports on duckdb
(cherry picked from commit adb768505a)
* feat(trial-balance): implement execute_duckdb with full parity to normal report
Replaces the placeholder stub with 8 focused functions that mirror the
normal execute() flow using parameterized DuckDB SQL queries: account
fetch, period GL entries, opening balances (with Period Closing Voucher
path), and all filters (cost center, project, finance book, accounting
dimensions). Reuses existing pure-Python processing functions unchanged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit b1c8e2cb5c)
* refactor(trial-balance): execute_duckdb only reads GL Entry from duckdb
Replaces the previous over-engineered stub with 7 short functions.
Account data, Account Closing Balance, and all metadata come from
frappe.db as normal; only tabGL Entry is read from the duckdb_conn.
Reuses get_opening_balance() for Account Closing Balance unchanged,
reuses all downstream compute helpers (calculate_values, prepare_data,
etc.) unchanged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 55862f98f4)
* refactor: maintain sync dependency in report master
(cherry picked from commit 5c536b8ad1)
# Conflicts:
# erpnext/accounts/report/accounts_payable/accounts_payable.json
# erpnext/accounts/report/accounts_receivable/accounts_receivable.json
# erpnext/accounts/report/general_ledger/general_ledger.json
# erpnext/accounts/report/trial_balance/trial_balance.json
* refactor: DB agnostic method names
(cherry picked from commit f40cd41801)
* feat(general-ledger): implement execute_synced_report with full parity to normal report
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 6b4895bcc9)
# Conflicts:
# erpnext/accounts/report/general_ledger/general_ledger.json
* feat(balance-sheet): implement execute_synced_report with full parity to normal report
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit bb19540816)
# Conflicts:
# erpnext/accounts/report/balance_sheet/balance_sheet.json
* feat(profit-and-loss): implement execute_synced_report with full parity to normal report
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 6a93baacf0)
# Conflicts:
# erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.json
* refactor: synced reports should be enabled on sites based on requirements
(cherry picked from commit 963bbc8729)
# Conflicts:
# erpnext/accounts/report/general_ledger/general_ledger.json
* chore: resolve conflicts
---------
Co-authored-by: ruthra kumar <ruthra@erpnext.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>