Commit Graph

55439 Commits

Author SHA1 Message Date
diptanilsaha
fa82da509b test(gross_profit): added test cases for rate adjustment entry
(cherry picked from commit 17ef5d6034)
2026-07-01 03:02:28 +00:00
diptanilsaha
17733a5641 fix: gross profit calculation with rate adjustment entries
(cherry picked from commit b9f330a158)
2026-07-01 03:02:27 +00:00
Mihir Kandoi
f5df9f7948 Merge pull request #56663 from frappe/mergify/bp/version-15-hotfix/pr-56662
fix: use correct variable to fetch valuation method (backport #56662)
2026-06-30 22:54:55 +05:30
mergify[bot]
345587754f fix: add permission checks in whitelisted functions (backport #53103) (#56668)
* fix: add permission checks in whitelisted functions (#53103)

(cherry picked from commit a6e78c2eea)

# Conflicts:
#	erpnext/stock/report/stock_qty_vs_batch_qty/stock_qty_vs_batch_qty.py

* chore: resolve conflict

---------

Co-authored-by: Priyal Rawal <135015851+Priyal208@users.noreply.github.com>
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-06-30 16:43:26 +00:00
Diptanil Saha
b5735531c1 refactor: port bulk_transaction_log existence check to the query builder (#56667)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 16:16:03 +00:00
Mihir Kandoi
04a6831645 chore: resolve conflicts 2026-06-30 20:35:44 +05:30
Mihir Kandoi
c2b7718455 fix: use correct variable to fetch valuation method
(cherry picked from commit 1492c9fbc3)

# Conflicts:
#	erpnext/controllers/sales_and_purchase_return.py
2026-06-30 15:04:27 +00:00
Mihir Kandoi
1d24e1ef62 Merge pull request #56653 from aerele/backport-56635
fix: set mr status to received when per_received is 100 even if per_o…
2026-06-30 20:16:16 +05:30
pandiyan
53bdccee5f fix: set mr status to received when per_received is 100 even if per_ordered < 100 2026-06-30 16:37:41 +05:30
mergify[bot]
3479d65bd4 fix(stock): value batch/serial return from ledger when original receipt has no bundle (backport #56631) (#56645)
fix(stock): value batch/serial return from ledger when original receipt has no bundle (#56631)

* fix(stock): value batch/serial return from ledger when original receipt has no bundle

* test(stock): add test to validate the valuation of serial/batch for return when original receipt has no bundle

(cherry picked from commit 6184c057db)

Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com>
2026-06-30 15:33:00 +05:30
mergify[bot]
25764520c2 fix: update qty in future SLEs when cancelling documents (backport #56638) (#56644)
fix: update qty in future SLEs when cancelling documents (#56638)

(cherry picked from commit 01374db8da)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-06-30 14:47:33 +05:30
Mihir Kandoi
1e241b8463 Merge pull request #56603 from frappe/mergify/bp/version-15-hotfix/pr-56231
fix(controllers): fix supplier-RFQ portal list query (wrong column + Postgres DISTINCT) (backport #56231)
2026-06-30 12:02:24 +05:30
Mihir Kandoi
9125ab6c77 fix(controllers): fix supplier-RFQ portal list query (wrong column + Postgres DISTINCT)
rfq_transaction_list had two defects introduced when it was converted to the query
builder:

1. `party.supplier == party[0]` compared supplier to a column literally named "0"
   (a stray index on the DocType, not the intended `parties[0]` value). This renders
   as `supplier = \`0\`` / `supplier = "0"` and errors on BOTH engines
   (MariaDB: Unknown column '0'; Postgres: column "0" does not exist), so the
   supplier portal RFQ list was completely broken.
2. SELECT DISTINCT ordered by `creation`, which is not in the select list. Postgres
   rejects this ("for SELECT DISTINCT, ORDER BY expressions must appear in select list").

Compare against `parties[0]` and add `creation` to the select list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit a7d9078bf4)

# Conflicts:
#	erpnext/controllers/tests/test_website_list_for_contact.py
2026-06-29 23:14:45 +05:30
mergify[bot]
83e8d1eb2f fix: carry item-level project to Purchase Receipt GL entries (backport #56568) (#56618)
fix: carry item-level project to Purchase Receipt GL entries (#56568)

Purchase Receipt stock and asset GL lines used the item row's cost center
but always fell back to the document-level project, unlike Purchase Invoice
which uses the item-level project. add_gl_entry accepted a project argument
but never wrote it to the GL dict, so the inward, Stock Received But Not
Billed, landed cost, divisional loss, sub-contracting and exchange rate
lines dropped the row's project.

Write project into the GL dict and pass project=item.project on the entries
that were missing it, so project behaves like cost center and matches
Purchase Invoice.

Ticket: 72523
(cherry picked from commit 6f97c7199c)

Co-authored-by: Jatin3128 <140256508+Jatin3128@users.noreply.github.com>
2026-06-29 23:12:20 +05:30
Mihir Kandoi
5278cb44ae Merge pull request #56589 from aerele/fix-production-plan-reservation
fix: reserve projected stock for production plan based on BOM qty
2026-06-29 20:54:57 +05:30
mergify[bot]
52d04ad834 fix: Use correct doctype name for PCV perm-check (backport #56606) (#56610)
fix: Use correct doctype name for PCV perm-check (#56606)

closes https://github.com/frappe/erpnext/issues/56593

(cherry picked from commit 747374e767)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2026-06-29 19:04:44 +05:30
rohitwaghchaure
f50e529f8a fix: update_qty_in_future_sle skips SLEs with same posting datetime (#56615) 2026-06-29 17:21:17 +05:30
rohitwaghchaure
ab98d19f26 fix: negative stock issue (#56616) 2026-06-29 17:20:12 +05:30
Mihir Kandoi
926e4cfba6 Merge pull request #56613 from frappe/backport/55774-stock-balance
fix: backport stock balance changes from #55774
2026-06-29 15:23:56 +05:30
Mihir Kandoi
8abc27863a fix: extract stock ageing data helper in stock balance (backport #55774)
The v15 backport (#55776) of #55774 dropped the stock_balance.py changes.
A separate backport left an inline version that sorts/filters the FIFO queue
by itemgetter(1) *before* normalizing, so for batchwise valuation slots
itemgetter(1) reads the count flag instead of the posting date. The queue is
then ordered wrong and earliest_age/latest_age come out swapped.

Extract get_stock_ageing_data, which normalizes before sorting/filtering so
itemgetter(1) is always the posting date, and add the regression test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 15:06:21 +05:30
Mihir Kandoi
43496ac3ca Merge pull request #56434 from aerele/backport-56375
fix: skip over-allowance qty validation for non-stock items (backport #56335)
2026-06-28 19:39:20 +05:30
mergify[bot]
562563553c fix: sync Stock Reconciliation difference amount with GL after reposting (backport #56574) (#56584)
* fix: sync Stock Reconciliation difference amount with GL after reposting (#56574)

* fix: sync Stock Reconciliation difference amount with GL after reposting

* fix: placement of recalculate differece amount function

(cherry picked from commit c7ef42ef98)

# Conflicts:
#	erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
#	erpnext/stock/stock_ledger.py

* chore: fix conflicts

Removed unused imports and fixed import structure.

* chore: fix conflicts

Refactor update_rate_on_stock_reconciliation method to use recalculation from ledger instead of manual updates for stock reconciliation items.

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-06-28 12:16:40 +05:30
pandiyan
3f00a0ffa9 test: add tests for non stock item over billing against so/po 2026-06-28 00:23:04 +05:30
pandiyan
bba7fe9831 fix: skip qty over-allowance check for non-stock items only 2026-06-28 00:23:04 +05:30
pandiyan
b39024e0e3 test: update cascading test to assert zero-qty reservation for stock-covered items 2026-06-27 23:59:31 +05:30
pandiyan
d3df0bf387 fix: reserve projected stock for production plan based on BOM qty 2026-06-27 23:20:11 +05:30
mergify[bot]
d992f6f5c8 chore(crm_settings): remove unused delete_custom_fields import (backport #56558) (#56582)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-06-27 11:13:07 +00:00
mergify[bot]
54fcd09995 fix: do not allow closing the accounting period for future dates (backport #56551) (#56576)
fix: do not allow closing the accounting period for future dates (#56551)

(cherry picked from commit 5e60e4faa7)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-06-27 12:04:38 +05:30
mergify[bot]
afddf70905 fix(lead): added missing read permission check on get_lead_details (backport #56272) (#56273)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
fix(lead): added missing read permission check on `get_lead_details` (#56272)
2026-06-27 02:37:22 +05:30
Diptanil Saha
257b4225ec ci: separate job for semgrep (#56580) 2026-06-26 21:04:24 +00:00
mergify[bot]
af05b8a30d chore: removing controllers from pre-commit eslint hooks exclude list (backport #56575) (#56578)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-06-27 02:31:22 +05:30
Mihir Kandoi
99a1ad1706 Merge pull request #56564 from frappe/mergify/bp/version-15-hotfix/pr-56559
fix: remove dead bundle helper call from purchase receipt print format (backport #56559)
2026-06-26 21:02:42 +05:30
mergify[bot]
5ed946b3b9 fix: ignored posting time 00:00:00 in RIV (backport #56571) (#56572)
fix: ignored posting time 00:00:00 in RIV (#56571)

(cherry picked from commit 31f89b72b4)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-06-26 19:42:28 +05:30
mergify[bot]
4aedf98c7c ci: bump pre-commit actions to v3.0.1 (backport #56562) (#56566)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-06-26 17:06:34 +05:30
Shllokkk
0f9429fd3d fix: remove dead bundle helper call from purchase receipt print format
(cherry picked from commit b9f5a77fa7)
2026-06-26 16:44:42 +05:30
Mihir Kandoi
b95c8584bd Merge pull request #56549 from frappe/mergify/bp/version-15-hotfix/pr-56127
fix: allow rename for Quality Inspection Parameter (backport #56127)
2026-06-26 14:18:45 +05:30
Mihir Kandoi
f2b7319462 chore: resolve conflicts 2026-06-26 13:46:30 +05:30
Mohd Haris
9e6edea818 fix: allow rename for Quality Inspection Parameter
The Quality Inspection Parameter DocType did not have `allow_rename`
enabled, so the "Rename" action was hidden from the form's menu
(the 3-dots / ⋮ options). Since the DocType is auto-named from the
`parameter` field (`autoname: field:parameter`), users had no way to
correct or change a parameter's name once created.

Enable `allow_rename` so users can rename a Quality Inspection
Parameter from the form menu.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit adfef48a65)

# Conflicts:
#	erpnext/stock/doctype/quality_inspection_parameter/quality_inspection_parameter.json
2026-06-26 08:14:57 +00:00
Mihir Kandoi
b982935c56 Merge pull request #56511 from frappe/revert-56499-mergify/bp/version-15-hotfix/pr-56497
Revert "fix: handle missing serial and batch bundle in print format (backport #56497)"
2026-06-26 10:25:38 +05:30
Mihir Kandoi
3365373ec9 Revert "fix: handle missing serial and batch bundle in print format (backport #56497)" 2026-06-26 10:08:10 +05:30
Shllokkk
29d8a67619 Merge pull request #56462 from frappe/mergify/bp/version-15-hotfix/pr-56460
fix: remove frappe.utils from jinja context in process statement of accounts (backport #56460)
2026-06-25 20:48:42 +05:30
Shllokkk
339e11ef18 Merge pull request #56499 from frappe/mergify/bp/version-15-hotfix/pr-56497
fix: handle missing serial and batch bundle in print format (backport #56497)
2026-06-25 19:51:34 +05:30
Shllokkk
9adfab19dc fix: handle missing serial and batch bundle in print format
(cherry picked from commit 548d90df4f)
2026-06-25 13:52:55 +00:00
mergify[bot]
28e4bca4f2 fix(crm): using get_list instead of get_all in get_opportunities (backport #56463) (#56465)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
fix(crm): using `get_list` instead of `get_all` in `get_opportunities` (#56463)
2026-06-25 10:41:41 +00:00
Shllokkk
b176fb292b fix: remove frappe.utils from jinja context in process statement of accounts
(cherry picked from commit 37ec2d0edd)
2026-06-25 09:48:03 +00:00
Diptanil Saha
414b3665c1 fix(company): using String.prototype.bold method instead of frappe.utils.bold on company deletion prompt (#56441) 2026-06-25 00:49:27 +05:30
mergify[bot]
db8a26a3af fix: precision issue causing COGS in inter transfer PR (backport #56420) (#56424)
fix: precision issue causing COGS in inter transfer PR (#56420)

(cherry picked from commit 9b0e1b61f2)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-06-24 18:30:14 +05:30
Mihir Kandoi
b80fb47d6e Merge pull request #56429 from frappe/mergify/bp/version-15-hotfix/pr-55191
refactor(sales_person_wise_transaction_summary): Replace SQL with que… (backport #55191)
2026-06-24 16:43:17 +05:30
Loic Oberle
2585712500 refactor(sales_person_wise_transaction_summary): Replace SQL with que… (#55191)
(cherry picked from commit df3d0859a1)
2026-06-24 10:44:17 +00:00
ruthra kumar
6d12a2aaf7 Merge pull request #56418 from frappe/mergify/bp/version-15-hotfix/pr-56417
refactor: configurable timeout on process pcv (backport #56417)
2026-06-24 15:26:17 +05:30