Commit Graph

55610 Commits

Author SHA1 Message Date
Mihir Kandoi
1679bdecdc fix: use system float precision for batch qty comparison 2026-07-21 14:18:28 +05:30
Mihir Kandoi
2673029bd4 fix: revalue batch reco slots only when the entry covers the full batch
stock_value_difference / qty equals the new batch rate only when the
reco entry carries the entire batch, as the split out/in reco SLEs and
batches reconciled from zero do. Partial direct-batch_no entries mix a
qty delta with existing stock, so their slots keep prior values.

Plain items need no such guard: the valuation engine collapses the
FIFO stack to qty_after * valuation_rate on every reconciliation, so
rescaling remaining slots at the reco rate matches the ledger. Lock
that with a test.
2026-07-21 14:09:36 +05:30
Mihir Kandoi
72b3210cbb fix: rescale batch FIFO slot values on stock reconciliation
Batch items take the batch-slot path, which mirrors the same value
arithmetic: the reco's incoming entry dumps the revaluation remainder
on one slot. Rescale each reconciled batch's slots at its post-reco
rate (stock_value_difference / qty of the incoming bundle entry).
2026-07-21 13:49:45 +05:30
Mihir Kandoi
d51f9076b5 fix: rescale stock ageing FIFO slot values on stock reconciliation
A reconciliation's stock_value_difference includes the revaluation of
stock already in the FIFO queue, but the whole amount was attached to
the qty-delta slot while older slots kept pre-revaluation values. A
downward revaluation therefore produced negative bucket values in the
Stock Ageing report, and repeated recos let the queue total drift away
from Stock Balance.

Re-derive every slot value as qty * valuation_rate after processing a
reco SLE, since a reconciliation values the entire balance at its rate.
Covers both single-SLE recos and the zero-out/re-add pair that flows
through the transfer bucket.
2026-07-21 13:45:03 +05:30
Khushi Rawat
fbde3212e2 Merge pull request #57309 from khushi8112/fix/default-accounting-dimension-new-documents
fix: apply default accounting dimensions reliably on new documents
2026-07-21 12:34:51 +05:30
khushi8112
88abe119c3 fix: apply default accounting dimensions reliably on new documents
Default accounting dimensions were applied from the `company` client
trigger, which reads dimension data fetched asynchronously in
`setup_dimension_filters`. When the trigger fired before that fetch
returned, new documents were left without their default dimensions, and
Sales Order never called `update_dimension` at all.

- Apply defaults from the fetch callback in dimension_tree_filter.js so
  they no longer depend on `company`-trigger timing. This fixes the race
  for Sales Invoice, Purchase Invoice and Payment Entry, and populates
  defaults on new Sales Orders.
- Add a `company()` override on SalesOrderController so the default is
  re-applied when the company changes, matching the sibling doctypes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 11:39:05 +05:30
mergify[bot]
319841d59c refactor: rework appointment booking lifecycle and portal verification (backport #57270) (#57294)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-07-21 03:23:32 +05:30
mergify[bot]
2cd531d099 fix: block changing Stock account type when stock ledger entries exist (backport #57283) (#57284)
fix: block changing Stock account type when stock ledger entries exist (#57283)

(cherry picked from commit 4cdaa8dba6)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-07-20 22:58:36 +05:30
Mihir Kandoi
91f085c8e3 Merge pull request #57303 from frappe/mergify/bp/version-15-hotfix/pr-57301
feat(stock): expose all Bin qty fields in Stock Summary and Stock Projected Qty (backport #57301)
2026-07-20 20:39:33 +05:30
Mihir Kandoi
90009a4687 feat(stock): expose all Bin qty fields in Stock Summary and Stock Projected Qty
Stock Summary's sort selector only offered 5 of Bin's 10 qty fields; add
the rest (ordered, requested, planned, reserved for production plan,
reserved stock) and extend get_data's or_filters so bins whose only
nonzero qty is one of the new fields show up when sorted by it. Sort
labels now mirror Bin field labels.

Stock Projected Qty report had a column for every Bin qty field except
reserved_stock; add it.

(cherry picked from commit 59c0c15c2e)
2026-07-20 14:48:04 +00:00
Mihir Kandoi
fd1fcd8e58 Merge pull request #57281 from frappe/mergify/bp/version-15-hotfix/pr-57273
fix: correct typo in allow_negative_stock parameter (backport #57273)
2026-07-20 17:52:16 +05:30
ruthra kumar
b521cb9b40 Merge pull request #57278 from harisansari008/fix/bank-reco-print-currency-hotfix
fix: use account currency in Bank Reconciliation Statement print/PDF
2026-07-20 13:14:40 +05:30
Afsal Syed
f24e09cc97 fix: correct typo in allow_negative_stock parameter 2026-07-20 13:08:37 +05:30
mergify[bot]
21e5620e92 fix: project % complete field allowing modification when manual method (backport #57274) (#57275)
Co-authored-by: nishkagosalia <nishka.gosalia@gmail.com>
2026-07-20 12:29:21 +05:30
Mohd Haris
d6f797d077 fix: use account currency in Bank Reconciliation Statement print
The custom print template formatted debit/credit amounts with
format_currency() without passing a currency, so it fell back to the
company/system default currency (e.g. INR) instead of the selected bank
account's currency. The on-screen report already formats correctly via
the column's account_currency option.

Pass each row's account_currency to format_currency() so the printed/PDF
output matches the on-screen currency.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 12:02:24 +05:30
Mihir Kandoi
75dd6e12a4 Merge pull request #57251 from frappe/mergify/bp/version-15-hotfix/pr-57249
fix: add fetch from in production plan material request child table (backport #57249)
2026-07-18 07:40:37 +05:30
Mihir Kandoi
6ffd759968 fix: add fetch from in production plan material request child table
(cherry picked from commit dfc2a411e1)
2026-07-17 22:25:30 +05:30
Mihir Kandoi
09aaaac388 Merge pull request #57246 from frappe/mergify/bp/version-15-hotfix/pr-57241
fix: validate buying price list on material request and update item rates on change (backport #57241)
2026-07-17 22:04:07 +05:30
Mihir Kandoi
1fabf78dea chore: remove unneccessary flt 2026-07-17 21:43:19 +05:30
Mihir Kandoi
74e9718871 fix: dont overwrite rate with 0 if not found 2026-07-17 21:43:19 +05:30
Mihir Kandoi
302cbbe5d8 fix: pass ctx keys get_price_list_rate_for reads, skip rate update on insert
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.
2026-07-17 21:43:19 +05:30
Mihir Kandoi
96dc408484 fix: validate buying price list on material request and update item rates on change 2026-07-17 21:43:19 +05:30
mergify[bot]
88443e4a97 fix: restrict jinja globals in process statement of accounts templates (backport #56458) (#57231)
Co-authored-by: Shllokkk <shllokosan23@gmail.com>
2026-07-17 08:25:47 +00:00
Diptanil Saha
5e539643ec chore: bump frappe dependency from 15.40.4 to 15.111.0 (#57229) 2026-07-17 13:35:04 +05:30
mergify[bot]
fd01171df5 fix: added missing validations for Dunning Type (backport #57224) (#57226)
Co-authored-by: diptanilsaha <diptanil@frappe.io>
2026-07-17 13:34:30 +05:30
Shllokkk
4148d32ea5 Merge pull request #57218 from frappe/mergify/bp/version-15-hotfix/pr-57198
fix: strip account number when building account name in COA importer (backport #57198)
2026-07-17 11:38:48 +05:30
Mihir Kandoi
74dd90faa6 Merge pull request #57210 from frappe/mergify/bp/version-15-hotfix/pr-57179
feat(stock): automatically link portal users to their associated contact profiles for customers and suppliers (backport #57179)
2026-07-17 07:48:34 +05:30
Afsal Syed
9414230671 chore: fix test case user context 2026-07-17 00:21:48 +05:30
Afsal Syed
1b6ff72f0f test(stock): add portal user contact link verification for customer and supplier
test(stock): add portal user contact link verification for customer and supplier
2026-07-16 23:21:47 +05:30
Shllokkk
314dd16aa3 fix: strip account number when building account name in COA importer
(cherry picked from commit cbe406ee2a)
2026-07-16 15:21:32 +00:00
mergify[bot]
b1e47eb97e refactor(dunning): converted get_dunning_letter_text to doc method and restrict_globals on render_template (backport #57205) (#57213)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-07-16 11:21:28 +00:00
Afsal Syed
4f9ea989c4 feat(stock): automatically link portal users to their associated contact profiles for customers and suppliers
(cherry picked from commit 337a06dfb6)
2026-07-16 15:49:45 +05:30
Mihir Kandoi
77ec6447c3 fix: consider min order qty in the purchase/transfer flow of production plan (backport #57204) (#57209)
* 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
2026-07-16 08:34:37 +00:00
mergify[bot]
ff6c8bbb44 fix(project): improved access control for project users (backport #56675) (#57180)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-07-15 15:38:46 +05:30
Mihir Kandoi
93931ac91b Merge pull request #57043 from aerele/fix/apply-user-permissions-via-build-match-conditions
fix: apply user permissions via build_match_conditions
2026-07-15 14:37:21 +05:30
mergify[bot]
6b23b007a4 fix: permission issue (backport #57112) (#57142)
* fix: permission issue (#57112)

(cherry picked from commit 1fd2faa68d)

# Conflicts:
#	erpnext/controllers/stock_controller.py

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-07-15 14:34:44 +05:30
ervishnucs
202f52271c fix: apply user permissions via build_match_conditions 2026-07-15 13:16:30 +05:30
mergify[bot]
654890dce8 Revert "chore: remove unused whitelisted method from project" (backport #56660) (#57177)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-07-15 07:18:42 +00:00
Mihir Kandoi
218f783a26 Merge pull request #57172 from frappe/mergify/bp/version-15-hotfix/pr-57137
feat: add on hold status to project (backport #57137)
2026-07-15 11:35:07 +05:30
Poovitha Palanivelu
5e2e15436d feat: add on hold status to project
(cherry picked from commit 672fadaa78)
2026-07-15 05:47:00 +00:00
Mihir Kandoi
f179c91036 Merge pull request #57167 from frappe/mergify/bp/version-15-hotfix/pr-57164
fix: set correct currency in supplier quotation net rate field (backport #57164)
2026-07-15 11:04:57 +05:30
Mihir Kandoi
30ab2dba6e fix: set correct currency in supplier quotation net rate field
(cherry picked from commit 27672851cd)
2026-07-15 05:16:55 +00:00
Mihir Kandoi
82f2af3a0e Merge pull request #57128 from frappe/mergify/bp/version-15-hotfix/pr-57126
fix(manufacturing): preserve job card transferred quantity (backport #57126)
2026-07-14 13:59:48 +05:30
Sudharsanan11
1bbeec6bfa test(manufacturing): cover transferred quantity across job cards
(cherry picked from commit fd6c9a71cd)
2026-07-14 08:11:06 +00:00
Sudharsanan11
fc4ac7a441 fix(manufacturing): preserve job card transferred quantity
(cherry picked from commit d7e9321746)
2026-07-14 08:11:06 +00:00
Mihir Kandoi
3913b9631f Merge pull request #57104 from frappe/mergify/bp/version-15-hotfix/pr-57091
fix(stock): show qty (company) and qty (warehouse) in sales transactions  (backport #57091)
2026-07-14 12:43:29 +05:30
Mihir Kandoi
9de9228cb9 Merge pull request #57117 from frappe/mergify/bp/version-15-hotfix/pr-57116
fix(stock): fix sqlparse token limit in get_bundle_wise_serial_nos (backport #57116)
2026-07-14 12:33:51 +05:30
Afsal Syed
dcff9164c4 test(stock): add unit test for get_bundle_wise_serial_nos query
(cherry picked from commit e748bf512b)
2026-07-14 12:09:41 +05:30
Sudharsanan11
aa4cc4c97d test(stock): assert qty (company) and qty (warehouse) on item details 2026-07-14 11:51:54 +05:30
Sudharsanan11
8086542885 fix(stock): show qty (company) and qty (warehouse) in sales transactions 2026-07-14 11:51:54 +05:30