Commit Graph

55903 Commits

Author SHA1 Message Date
Vishnu Priya Baskaran
6b999d019e fix(stock): carry accounting dimensions from Landed Cost Voucher char… (#56981)
* fix(stock): carry accounting dimensions from Landed Cost Voucher charges into GL entries

* feat(stock): add accounting dimension fields to Landed Cost Taxes and Charges

The charge row had no dimension fields, so a dimension marked mandatory for
Profit and Loss accounts could not be supplied anywhere on the voucher.

Add the accounting dimensions section, cost center and project, and register
the doctype in accounting_dimension_doctypes so custom dimension fields are
created on it. The section and column break are required for that hook to
place the generated fields correctly.

Cost center deliberately omits the ":Company" default used by Purchase Taxes
and Charges: this child table is also the additional costs table on Stock
Entry and Subcontracting Receipt, and auto-filling it there would change
existing postings.

* refactor(stock): group landed cost charges by expense account and dimensions

get_item_account_wise_lcv_entries keyed its inner map by expense account
alone, so two charge rows posting to the same account - whether in one voucher
or across vouchers - were merged. Amounts accumulated correctly but any
per-row context was lost to whichever row was seen first.

Key the grouping by (expense account, dimension values) and return a list of
charges per receipt item, each carrying its own dimensions, so rows that
differ only by dimension stay distinct.

Dimensions resolve from the charge row first, then the voucher item row.
Blanks are left blank so the GL composers can fall back to the receipt item
and receipt document as before.

* refactor(accounts): allow explicit accounting dimensions on add_gl_entry

get_gl_dict derives dimensions from the parent document and the item row, and
reads only custom dimensions off the item - never cost center or project.
Callers that need to set a dimension from some other source had no way to do
so except by building the args dict by hand.

Add a dimensions argument that is merged into the entry before get_gl_dict is
called, and thread it through the StockController and BaseGLComposer wrappers.

* fix(stock): carry landed cost charge dimensions onto the GL entries

Landed cost charges are posted into the receipt document's ledger, and their
expense account is a Profit and Loss account. Until now the entry took its
dimensions from the receipt item, which cannot know about a voucher created
after it was submitted, so a dimension mandatory for P&L accounts failed.

Take cost center, project and custom dimensions from the charge row, falling
back to the receipt item and receipt document when the row leaves them blank.
Only the leg posting to the charge account is affected; the reclass leg keeps
the item's dimensions so it still nets against the base item entry.

Also skip charges that prorate to zero, and hoist the landed cost lookup in
the Purchase Receipt composer out of the item loop - it was reloading every
voucher once per item.

* fix(stock): report missing mandatory dimensions on the Landed Cost Voucher row

Submitting a voucher re-makes the receipt document's GL entries, so a missing
mandatory dimension surfaced as a GL Entry error naming an account, raised
from the middle of update_landed_cost, with nothing pointing at the row that
caused it.

Check the charge rows during validate instead, against both the mandatory
for P&L / Balance Sheet flags and the per-account Accounting Dimension Filter,
and name the row, the dimension and the account in the message.

The check resolves values through the same fallback chain the GL composers
use, so it does not reject a voucher that would have posted successfully.

* test(stock): cover accounting dimensions on landed cost vouchers

Covers the charge row reaching the GL entry, cost center and project
overriding the receipt item, the blank row still falling back to it, and two
charge rows - and two vouchers - on the same expense account with different
dimensions staying separate entries.

Also covers the mandatory P&L dimension being satisfied from the charge row,
the missing one being reported on the voucher, dimensions surviving a repost,
and each dimension netting to zero on cancellation.

* refactor(lcv): apply custom dimension overrides via .update()

---------

Co-authored-by: nareshkannasln <nareshkannashanmugam@gmail.com>
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
(cherry picked from commit 918e5a28db)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/services/gl_composer.py
#	erpnext/accounts/services/base_gl_composer.py
#	erpnext/controllers/stock_controller.py
#	erpnext/patches.txt
#	erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json
#	erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py
#	erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py
#	erpnext/stock/doctype/purchase_receipt/services/gl_composer.py
#	erpnext/stock/doctype/stock_entry/services/gl_composer.py
#	erpnext/subcontracting/doctype/subcontracting_receipt/services/gl_composer.py
2026-08-26 05:57:52 +00:00
Diptanil Saha
d4815cb231 fix(party_ledger_summary): added missing filters for cost_center and projects (#58411) 2026-08-25 22:09:13 +05:30
Raffael Meyer
3ae3009129 fix!: tax net_amount and not_applicable (#54687) 2026-08-25 13:50:03 +02:00
Sudharsanan Ashok
07b6b3defd Merge pull request #58398 from frappe/mergify/bp/version-15-hotfix/pr-58395
fix: respect zero currency precision (backport #58395)
2026-08-25 16:45:17 +05:30
Pandiyan P
6a8462116b fix: respect zero currency precision (#58395)
(cherry picked from commit ce23fcc055)

# Conflicts:
#	erpnext/accounts/test/test_utils.py
2026-08-25 15:51:20 +05:30
Sudharsanan Ashok
1b5239c498 Merge pull request #58354 from frappe/mergify/bp/version-15-hotfix/pr-58179
fix(accounts): supplier group filter not applied on accounts payable … (backport #58179)
2026-08-25 13:04:42 +05:30
Sudharsanan Ashok
7fcbf085a5 Merge pull request #58389 from frappe/mergify/bp/version-15-hotfix/pr-58384
fix: prevent duplicate supplier quotations from portal (backport #58377) (backport #58384)
2026-08-25 12:04:54 +05:30
Sudharsanan11
f8e614f0c7 fix: fix conflicts 2026-08-25 11:47:06 +05:30
pandiyan
c861fbf438 test: verify duplicate supplier quotations are rejected
(cherry picked from commit efe5571ca7)
2026-08-25 05:43:13 +00:00
pandiyan
e1246ae95d fix: prevent duplicate supplier quotations from portal
(cherry picked from commit 39e15c7b2d)

# Conflicts:
#	erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
2026-08-25 05:43:12 +00:00
mergify[bot]
91fc999575 fix: hide supplier name in rfq portal (backport #58373) (#58375)
Co-authored-by: Pandiyan P <pandiyanpalani37@gmail.com>
2026-08-24 17:40:38 +05:30
mergify[bot]
4b569c3ec3 Fix/return qty validation different uom (backport #58298) (#58363)
Co-authored-by: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com>
Co-authored-by: Afsal Syed <afsalsyed12@gmail.com>
2026-08-24 17:39:56 +05:30
mergify[bot]
cb8ae93fa3 fix(italy): handle none price_list_rate in e-invoice xml generation (backport #58242) (#58369)
Co-authored-by: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com>
2026-08-24 17:39:24 +05:30
Sudharsanan Ashok
91548461c0 Merge pull request #58371 from frappe/mergify/bp/version-15-hotfix/pr-58368
fix: hide rfq status in supplier portal (backport #58368)
2026-08-24 16:35:55 +05:30
Pandiyan P
2dbd224643 fix: hide rfq status in supplier portal (#58368)
(cherry picked from commit 75d6183bb6)
2026-08-24 10:59:54 +00:00
Pandiyan P
b33475e7cf fix: render missing terms before printing (#58367) 2026-08-24 16:28:17 +05:30
mergify[bot]
61238e7c4c fix: aggregate child warehouses in Stock Qty vs Serial No Count report (backport #58134) (#58365)
Co-authored-by: Mohd Haris <haris@frappe.io>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-24 10:33:16 +00:00
mergify[bot]
3d4245b9b4 fix: include time logs ending at midnight in timesheet billing summary (backport #58355) (#58356)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-24 14:46:36 +05:30
ervishnucs
743f7d8713 fix(accounts): supplier group filter not applied on accounts payable report
(cherry picked from commit 513f19924d)
2026-08-24 07:12:19 +00:00
Vishnu Priya Baskaran
b578fb52d5 fix: allow custom remark on reversal journal entry (#58308)
fix: allow user remark on reversal journal entry
2026-08-19 22:18:13 +05:30
mergify[bot]
fd82c7d691 fix: new docs should refetch incoming rates (backport #58097) (#58294)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-19 11:58:32 +00:00
mergify[bot]
88a36a800a fix: block disabled/frozen party on Opportunity and Request for Quotation (backport #57983) (#58034)
* fix: block disabled/frozen customers on Opportunity

Opportunity inherits TransactionBase instead of AccountsController, so
it never ran validate_party_frozen_disabled like Quotation, Sales Order
and Sales Invoice do. A disabled Customer could be saved as an
Opportunity's party and only get caught later at Quotation stage.

Also fixes the party_name Link query on the client: it referenced
erpnext.queries.customer, which was never defined, so disabled
customers showed up in the picker.

(cherry picked from commit 90937ce6d9)

# Conflicts:
#	erpnext/crm/doctype/opportunity/test_opportunity.py

* fix: block disabled/frozen suppliers on Request for Quotation

Request for Quotation overrides validate() entirely and never calls
super().validate(), so it never goes through AccountsController's
party validation. Suppliers also sit in a child table, so the shared
PartyValidator wouldn't have caught it anyway (it only checks a single
top-level party field). A disabled or frozen Supplier could be added
to an RFQ and the RFQ submitted without any warning.

Also filters the suppliers grid's supplier Link field to disabled=0,
matching the same client-side fix applied to Opportunity's party_name.

(cherry picked from commit 4bf65ffc1d)

# Conflicts:
#	erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
#	erpnext/buying/doctype/request_for_quotation/test_request_for_quotation.py

* fix: scope Opportunity party validation to Customer only

validate_party_frozen_disabled only enforces Customer/Supplier/Employee,
so passing opportunity_from straight through silently no-op'd for Lead
and Prospect. Made the Customer-only scope explicit instead of relying
on that implicit fallthrough.

Lead.disabled is not enforced anywhere else in the codebase (lead_query,
the picker used for this same field, only filters status/docstatus), so
deliberately not extending validation to Lead-sourced Opportunities.

(cherry picked from commit 8c0a945417)

* refactor: move RFQ supplier disabled filter to link_filters

Static filters with no doc-dependent values belong on the field
definition, not in JS. Matches the existing pattern used for
Warehouse/Item link_filters elsewhere (e.g. job_card_item.json,
product_bundle_item.json).

(cherry picked from commit 6b35c51ff1)

* fix: resolve backport conflicts for disabled/frozen party validation

The automated backport left unresolved merge conflict markers committed
in request_for_quotation.py, test_request_for_quotation.py and
test_opportunity.py. Also fixes validate_party_frozen_disabled being
called with 3 args here, this branch's version only takes
(party_type, party_name), unlike develop's (company, party_type, party_name).

Dropped test_duplicate_supplier_rejected, test_rfq_blocked_for_supplier_with_prevent_rfqs
and test_rfq_status_lifecycle from the conflict resolution, they don't exist on
this branch and aren't part of this backport.

---------

Co-authored-by: Jatin3128 <jatinsarna8@gmail.com>
2026-08-19 16:58:21 +05:30
mergify[bot]
7883f595d7 fix(stock): fetch item stock UOM in stock reconciliation (backport #58284) (#58290)
Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com>
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-19 10:36:34 +00:00
mergify[bot]
c132b99b4e fix: update stock variance account logic which defaults to default expense (backport #57656) (#57675)
Co-authored-by: Afsal Syed <afsalsyed12@gmail.com>
Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com>
2026-08-19 14:41:41 +05:30
mergify[bot]
74c3eeaa44 fix: use user data fields hook (backport #58274) (#58282)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-19 10:25:47 +05:30
mergify[bot]
1210c6187d fix: escape interpolated values in text positions across portal and desk templates (backport #58286) (#58287)
Co-authored-by: diptanilsaha <diptanil@frappe.io>
2026-08-19 02:44:35 +05:30
mergify[bot]
d047caf4aa fix: escape on status image for workstations in production status (backport #58279) (#58280)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-08-18 20:27:31 +00:00
mergify[bot]
37f2770809 fix: escape interpolated values in portal, print and desk templates (backport #58273) (#58277)
Co-authored-by: diptanilsaha <diptanil@frappe.io>
2026-08-19 00:35:45 +05:30
mergify[bot]
b03e098684 fix: mirror rounding adjustment on distributed_discount_amount (backport #58047) (#58054)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2026-08-18 12:07:43 +02:00
Lakshit Jain
41aba183de Merge pull request #58160 from frappe/mergify/bp/version-15-hotfix/pr-56175
feat: taxable-base resolver hook for custom charge types (backport #56175)
2026-08-18 11:58:24 +05:30
rohitwaghchaure
73b7ec32b6 fix: don't set work order status to In Process only due to skip material transfer (#58246) 2026-08-17 12:43:13 +00:00
Pandiyan P
48bd3139f3 fix(manufacturing): fall back to item group defaults for work order w… (#58236) 2026-08-17 15:26:05 +05:30
mergify[bot]
1464a34fc6 fix(bank_statement_import): add missing permission check on get_import_status (backport #58217) (#58218)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-08-16 15:11:25 +00:00
mergify[bot]
0c625ff69b fix(crm)!: remove unused get_last_interaction endpoint (backport #58214) (#58215)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-08-16 14:21:44 +00:00
Shllokkk
2aa1bf54f2 Merge pull request #58209 from frappe/mergify/bp/version-15-hotfix/pr-58208
feat: add status filter to Supplier Quotation Comparison report (backport #58208)
2026-08-16 19:48:40 +05:30
mergify[bot]
46d883d00d fix: correct Item Group doctype name in item tax template dashboard (backport #58192) (#58212) 2026-08-16 18:42:58 +05:30
mergify[bot]
32a5b23b3c fix: drop removed Restaurant doctype from sales tax template dashboard (backport #58191) (#58210) 2026-08-16 17:22:06 +05:30
Shllokkk
9e6a16658d feat: add status filter to Supplier Quotation Comparison report
(cherry picked from commit 2b84ed78e8)
2026-08-16 10:22:38 +00:00
mergify[bot]
c6211eb075 fix(email_digest): added permission check for get_msg_html (backport #58197) (#58199)
Co-authored-by: diptanilsaha <diptanil@frappe.io>
2026-08-15 16:47:02 +00:00
mergify[bot]
a5f4d3abeb feat: validate purchase receipt exchange rate parity on purchase invoice (backport #58177) (#58189)
* feat: validate purchase receipt exchange rate parity on purchase invoice (#58177)

(cherry picked from commit 70a8a2d0c5)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py

* chore: fix conflicts

Removed assertion for exchange rate discrepancy in purchase invoice test.

* test: fix backport of exchange rate difference test for non stock item

The conflict resolution left behind stale amount/discrepancy lookups
referencing a removed second item row (IndexError in CI and F841 ruff
failures). Align the test with the develop version: single non stock
item, PR at 80 / PI at 70, and assert no exchange gain/loss GL entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 10:51:12 +00:00
mergify[bot]
89d3701e3b fix: get items from sales order in sales invoice (backport #58163) (#58187)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-08-15 08:02:23 +00:00
mergify[bot]
4c9a76ef9f feat: Belgian Charts of Accounts (commercial + non-profit, FR + NL) (backport #54679) (#58185)
Co-authored-by: Antoine Maas <antoine.maas@okte.io>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-08-14 16:56:24 +00:00
mergify[bot]
6d06b43434 fix(stock): honour pick serial / batch based on in the batch selector (backport #58176) (#58181)
Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com>
2026-08-14 13:57:27 +00:00
Khushi Rawat
78d780d49e Merge pull request #58175 from aerele/backport-58092-version-15-hotfix
fix(accounts): disallow reversing a reverse journal entry
2026-08-14 17:43:53 +05:30
pandiyan
15041a62dd fix(accounts): disallow reversing a reverse journal entry
check read permission on the source entry before the guard runs, so the reversal relationship is not disclosed to a user who cannot read it.
2026-08-14 17:06:23 +05:30
pandiyan
754e7052ca test(accounts): cover reversal of a reverse journal entry
also assert that a user without read access on the entry gets a permission error instead of the reversal relationship.
2026-08-14 16:56:06 +05:30
Nishka Gosalia
3b2bb23306 Merge pull request #58170 from frappe/mergify/bp/version-15-hotfix/pr-58167
fix: validation for task end date check (backport #58167)
2026-08-14 16:42:31 +05:30
mergify[bot]
e704e589ca feat(accounts): opt-in 'Consider Accounting Dimension' filter on General Ledger Report (backport #58156) (#58157)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-08-14 16:27:37 +05:30
nishkagosalia
8dc9919691 fix: validation for task end date check
(cherry picked from commit 7c6da80f98)
2026-08-14 10:52:46 +00:00
vorasmit
e7e2358cb5 chore: resolve conflicts 2026-08-14 15:12:42 +05:30