Compare commits

..

1330 Commits

Author SHA1 Message Date
Frappe PR Bot
a7eb24488e chore(release): Bumped to Version 16.8.3
## [16.8.3](https://github.com/frappe/erpnext/compare/v16.8.2...v16.8.3) (2026-03-10)

### Bug Fixes

* patch failing ([7149630](7149630eff))
2026-03-10 06:45:58 +00:00
rohitwaghchaure
0b30967556 Merge pull request #53274 from frappe/mergify/bp/version-16/pr-53273
fix: patch failing (backport #53272) (backport #53273)
2026-03-10 12:14:29 +05:30
Rohit Waghchaure
7149630eff fix: patch failing
(cherry picked from commit 6024c4a077)
(cherry picked from commit 1a62d324fd)
2026-03-10 06:42:47 +00:00
Frappe PR Bot
c39ee76946 chore(release): Bumped to Version 16.8.2
## [16.8.2](https://github.com/frappe/erpnext/compare/v16.8.1...v16.8.2) (2026-03-06)

### Bug Fixes

* stock balance report qty ([9e185b7](9e185b7ea9))
2026-03-06 08:35:12 +00:00
rohitwaghchaure
94a02b05fa Merge pull request #53211 from frappe/mergify/bp/version-16/pr-53208
fix: stock balance report qty (backport #53200) (backport #53208)
2026-03-06 14:03:44 +05:30
Rohit Waghchaure
9e185b7ea9 fix: stock balance report qty
(cherry picked from commit a15e5fdc4e)
(cherry picked from commit 699a683b8e)
2026-03-06 07:45:18 +00:00
Frappe PR Bot
0ab7a6e904 chore(release): Bumped to Version 16.8.1
## [16.8.1](https://github.com/frappe/erpnext/compare/v16.8.0...v16.8.1) (2026-03-05)

### Bug Fixes

* balance qty for inv dimension ([354723d](354723d3d5))
2026-03-05 11:58:55 +00:00
rohitwaghchaure
519657fe3e Merge pull request #53188 from frappe/mergify/bp/version-16/pr-53181
fix: balance qty for inv dimension (backport #52745) (backport #53181)
2026-03-05 17:27:21 +05:30
Rohit Waghchaure
354723d3d5 fix: balance qty for inv dimension
(cherry picked from commit a3eafe5b18)
(cherry picked from commit fb17a00fb6)
2026-03-05 11:40:41 +00:00
Frappe PR Bot
78aa4cf9f9 chore(release): Bumped to Version 16.8.0
# [16.8.0](https://github.com/frappe/erpnext/compare/v16.7.3...v16.8.0) (2026-03-03)

### Bug Fixes

* `Trial Balance` and `Consolidated Trial Balance` total row calculation (backport [#53014](https://github.com/frappe/erpnext/issues/53014)) ([#53015](https://github.com/frappe/erpnext/issues/53015)) ([8658956](865895649e))
* **accounts receivable:** include invoice payment terms template (backport [#51940](https://github.com/frappe/erpnext/issues/51940)) ([#53106](https://github.com/frappe/erpnext/issues/53106)) ([7e09bf3](7e09bf306a))
* **accounts:** add transaction time field ([2526876](2526876eaa))
* **accounts:** compute tax net_amount in JS controller ([429bd24](429bd245d1))
* **accounts:** round and convert net_amount to company currency in JS tax controller ([3f284f0](3f284f0c55))
* **accounts:** set posting time to get incoming rate ([8b3c5ba](8b3c5baa9e))
* allow allowed roles to bypass over billing validation ([c274b7c](c274b7cc2e))
* avoid circular dependency ([#53109](https://github.com/frappe/erpnext/issues/53109)) ([7d950f7](7d950f71da))
* broekn link of docs in asset onboarding ([5c48f74](5c48f74d4c))
* **budget-variance-report:** validate 'budget_against' filter ([f2ff0de](f2ff0de296))
* correct sle voucher_type comparison in get_ref_doctype ([788cd82](788cd82b4b))
* ensure cache is cleared on fiscal year update and trash ([2495cb8](2495cb8b2a))
* ensure contacts are processed only if present in create_prospect_against_crm_deal ([58fbb2f](58fbb2f4d7))
* handle html email template separately in RFQ to avoid jinja context error ([3178736](317873621a))
* **manufacturing:** ignore sales order validation for subassembly item ([2daf9f4](2daf9f4ce7))
* old stock reco entries causing issue in the stock balance report ([ea5ad31](ea5ad3179c))
* opening qty in stock balance ([1f2342c](1f2342cf4b))
* pass company in test case using make_quality_inspections ([417e8a4](417e8a4371))
* patch to complete onboarding stpes for existing records ([941a78e](941a78e1a8))
* **payment entry:** round unallocated amount ([b76e0c6](b76e0c645b))
* **payment_entry:** fix precision for `total_allocated_amount` and `base_total_allocated_amount` ([c61c748](c61c748cbd))
* populate mr owner and set po owner as fallback ([acdb8f2](acdb8f2b78))
* **postgres:** avoid UNSIGNED cast in customer autoname ([d922213](d922213dd7))
* **pricing_rule:** strict validation of `transaction_type` ([396727e](396727e26f))
* remove read-only property from Sales Invoice Timesheet Table ([f632c5c](f632c5c796))
* reposting creation slow for GL entries ([ab7e33f](ab7e33f83d))
* same reposting entry picked by multiple rq jobs ([c28568f](c28568f4fd))
* **selling:** handle selling price validation for FG item ([c7928a0](c7928a0749))
* serial no status for Disassemble entry ([dc0592a](dc0592a905))
* set company based expense account ([25c134d](25c134d11c))
* **stock:** pass company to avoid document naming rule issue in QI ([d61ad3b](d61ad3bd95))
* **stock:** validate company for receipt documents and expense accounts ([c6e0eb6](c6e0eb6d17))
* use conversion factor when creating stock entry from pick list ([f939e98](f939e980a6))
* use stock qty instead of qty when creating stock entry from MR ([1e44787](1e4478765a))
* use the correct precision value in stock reco ([c92fd26](c92fd26e1b))
* validate warehouse of SABB for draft entry ([b8de82f](b8de82f0e4))
* voucher detail no in SABB ([744d7a2](744d7a2793))

### Features

* UOM query filter for opportunity items ([6727c86](6727c86d0a))

### Performance Improvements

* add index on reference_purchase_receipt column ([664f1f1](664f1f1675))
2026-03-03 17:57:53 +00:00
diptanilsaha
28c5fbdb78 Merge pull request #53116 from frappe/version-16-hotfix 2026-03-03 23:26:23 +05:30
Mihir Kandoi
282d8b1b28 Merge pull request #53138 from frappe/mergify/bp/version-16-hotfix/pr-52784
fix(stock): validate company for receipt documents and expense accounts (backport #52784)
2026-03-03 21:41:25 +05:30
Mihir Kandoi
6eed4df7d9 Merge pull request #53136 from frappe/mergify/bp/version-16-hotfix/pr-53132
fix(selling): handle selling price validation for FG item  (backport #53132)
2026-03-03 21:41:03 +05:30
Mihir Kandoi
e2824e1dc5 Merge pull request #53134 from frappe/mergify/bp/version-16-hotfix/pr-53070
fix: handle html email template separately in RFQ to avoid jinja cont… (backport #53070)
2026-03-03 21:25:04 +05:30
Sudharsanan11
4350c6b9e3 test(stock): add test to validate company for receipts and expense accounts
(cherry picked from commit d58171987c)
2026-03-03 15:47:20 +00:00
Sudharsanan11
25c134d11c fix: set company based expense account
(cherry picked from commit d54d0c25a2)
2026-03-03 15:47:20 +00:00
Sudharsanan11
c6e0eb6d17 fix(stock): validate company for receipt documents and expense accounts
(cherry picked from commit 15dfc08a31)
2026-03-03 15:47:19 +00:00
Mihir Kandoi
41b9566dec Merge pull request #53125 from frappe/mergify/bp/version-16-hotfix/pr-53123
fix: serial no status for Disassemble entry (backport #53123)
2026-03-03 21:12:42 +05:30
Mihir Kandoi
8a13522590 Merge pull request #53131 from frappe/mergify/bp/version-16-hotfix/pr-53084
fix(manufacturing): ignore sales order validation for subassembly item (backport #53084)
2026-03-03 21:11:52 +05:30
kavin-114
7713d25b7e test: add unit test for FG Item selling price validation
(cherry picked from commit 723993fdf6)
2026-03-03 15:40:48 +00:00
kavin-114
c7928a0749 fix(selling): handle selling price validation for FG item
System checks valuation rate in incoming_rate field, since SO has it in valuation_rate field of item row,
need to handle the field name dynamically based upon the doctype name in Selling Controller.

(cherry picked from commit 4335318482)
2026-03-03 15:40:48 +00:00
Mihir Kandoi
bffb7cfef3 Merge pull request #53129 from frappe/mergify/bp/version-16-hotfix/pr-53037
fix(stock): pass company to avoid document naming rule issue in QI (backport #53037)
2026-03-03 21:08:14 +05:30
Pugazhendhi Velu
317873621a fix: handle html email template separately in RFQ to avoid jinja context error
(cherry picked from commit 49d363b174)
2026-03-03 15:36:53 +00:00
Mihir Kandoi
a399b8522d Merge pull request #53127 from frappe/mergify/bp/version-16-hotfix/pr-53099
fix: populate mr owner and set po owner as fallback (backport #53099)
2026-03-03 20:55:54 +05:30
Mihir Kandoi
3e8ebf8c14 chore: resolve conflicts 2026-03-03 20:44:40 +05:30
Sudharsanan11
2daf9f4ce7 fix(manufacturing): ignore sales order validation for subassembly item
(cherry picked from commit 6b1aac4aee)
2026-03-03 15:11:58 +00:00
kavin-114
417e8a4371 fix: pass company in test case using make_quality_inspections
(cherry picked from commit 397de1274f)
2026-03-03 15:10:48 +00:00
kavin-114
3844982824 test: add unit test to handle company condition in naming rule
(cherry picked from commit 4c39cf2d65)
2026-03-03 15:10:47 +00:00
kavin-114
d61ad3bd95 fix(stock): pass company to avoid document naming rule issue in QI
When a Document Naming Rule is configured in QI with a condition based on the company,
the system was not passing the company value properly. As a result, the naming rule
condition was skipped and the document name was generated using the default series.

This fix ensures that the company is passed correctly so that the configured
Document Naming Rule is evaluated and applied as expected.

(cherry picked from commit 74def423ed)

# Conflicts:
#	erpnext/controllers/stock_controller.py
2026-03-03 15:10:47 +00:00
kavin-114
acdb8f2b78 fix: populate mr owner and set po owner as fallback
(cherry picked from commit bdf4e51da3)
2026-03-03 15:09:33 +00:00
Rohit Waghchaure
dc0592a905 fix: serial no status for Disassemble entry
(cherry picked from commit 81acefa8ad)
2026-03-03 13:24:22 +00:00
Shariq Ansari
d74833d9fc Merge pull request #53122 from frappe/mergify/bp/version-16-hotfix/pr-53119
fix: do not create contact if not passed from crm (backport #53119)
2026-03-03 03:59:41 -08:00
shariquerik
58fbb2f4d7 fix: ensure contacts are processed only if present in create_prospect_against_crm_deal
(cherry picked from commit 800810d23d)
2026-03-03 11:43:45 +00:00
diptanilsaha
3217defaf5 Merge pull request #53055 from frappe/pot_version-16-hotfix_2026-03-01
chore: update POT file
2026-03-03 16:08:53 +05:30
diptanilsaha
e6704f4b73 Merge pull request #52998 from frappe/mergify/bp/version-16-hotfix/pr-52997
fix(payment_entry): set precision for `total_allocated_amount` and `base_total_allocated_amount` (backport #52997)
2026-03-03 15:48:16 +05:30
diptanilsaha
32c33631a6 chore: fix onboarding doctype merge conflicts (#53118) 2026-03-03 10:16:34 +00:00
diptanilsaha
0787c62cbc Merge branch 'version-16' into version-16-hotfix 2026-03-03 15:24:26 +05:30
diptanilsaha
a35521c14d Merge pull request #53114 from frappe/mergify/bp/version-16-hotfix/pr-53110
fix(pricing_rule): strict validation of `transaction_type` (backport #53110)
2026-03-03 15:19:54 +05:30
diptanilsaha
e4ce6e4e6f refactor: renamed args to pricing_ctx in set_transaction_type for clarity
(cherry picked from commit 6342e78305)
2026-03-03 09:30:51 +00:00
diptanilsaha
396727e26f fix(pricing_rule): strict validation of transaction_type
(cherry picked from commit 7ec0354a79)
2026-03-03 09:30:50 +00:00
diptanilsaha
ad3411ba01 Merge pull request #53111 from frappe/mergify/bp/version-16-hotfix/pr-53109
fix: avoid circular dependency (backport #53109)
2026-03-03 15:00:44 +05:30
Vishnu Priya Baskaran
7d950f71da fix: avoid circular dependency (#53109)
(cherry picked from commit d2e04750b5)
2026-03-03 09:03:25 +00:00
mergify[bot]
7e09bf306a fix(accounts receivable): include invoice payment terms template (backport #51940) (#53106)
Co-authored-by: Ravibharathi <131471282+ravibharathi656@users.noreply.github.com>
2026-03-03 12:07:57 +05:30
rohitwaghchaure
109433f37a Merge pull request #53086 from frappe/mergify/bp/version-16-hotfix/pr-53072
fix(accounts): set posting time to get incoming rate (backport #53072)
2026-03-02 21:58:09 +05:30
rohitwaghchaure
35336350ca Merge pull request #53098 from frappe/mergify/bp/version-16-hotfix/pr-53093
fix: opening qty in stock balance (backport #53093)
2026-03-02 21:43:29 +05:30
rohitwaghchaure
97f6b3a3b5 Merge pull request #53092 from frappe/mergify/bp/version-16-hotfix/pr-53087
perf: add index on reference_purchase_receipt column (backport #53087)
2026-03-02 21:38:02 +05:30
Rohit Waghchaure
1f2342cf4b fix: opening qty in stock balance
(cherry picked from commit d7fdab99cb)
2026-03-02 15:19:56 +00:00
rohitwaghchaure
3ec3cd512c Merge pull request #53090 from frappe/mergify/bp/version-16-hotfix/pr-53082
fix: validate warehouse of SABB for draft entry (backport #53082)
2026-03-02 17:43:51 +05:30
rohitwaghchaure
bf44f466ad chore: fix conflicts 2026-03-02 14:38:55 +05:30
kavin-114
664f1f1675 perf: add index on reference_purchase_receipt column
(cherry picked from commit 8c94396ad9)
2026-03-02 09:08:44 +00:00
rohitwaghchaure
b4a5bbc7e2 chore: fix conflicts 2026-03-02 14:38:28 +05:30
Rohit Waghchaure
b8de82f0e4 fix: validate warehouse of SABB for draft entry
(cherry picked from commit 9b8f685c82)
2026-03-02 08:53:09 +00:00
Sudharsanan11
8b3c5baa9e fix(accounts): set posting time to get incoming rate
(cherry picked from commit c5b3673a30)
2026-03-02 08:16:32 +00:00
Sudharsanan11
2526876eaa fix(accounts): add transaction time field
(cherry picked from commit 9538a9870c)

# Conflicts:
#	erpnext/buying/doctype/purchase_order/purchase_order.json
#	erpnext/selling/doctype/sales_order/sales_order.json
2026-03-02 08:16:32 +00:00
Diptanil Saha
fe721f48fc Merge pull request #53081 from frappe/mergify/bp/version-16-hotfix/pr-53079
fix(budget-variance-report): validate 'budget_against' filter (backport #53079)
2026-03-02 12:17:52 +05:30
rohitwaghchaure
11b22d4d95 Merge pull request #53077 from frappe/mergify/bp/version-16-hotfix/pr-53050
fix: voucher detail no in SABB (backport #53050)
2026-03-02 12:09:34 +05:30
diptanilsaha
f2ff0de296 fix(budget-variance-report): validate 'budget_against' filter
(cherry picked from commit 79d0708ea7)
2026-03-02 06:31:35 +00:00
Mihir Kandoi
2ed795bc9c Merge pull request #53078 from frappe/mergify/bp/version-16-hotfix/pr-53047
fix: remove read-only property from Sales Invoice Timesheet Table (backport #53047)
2026-03-02 11:37:32 +05:30
trustedcomputer
f632c5c796 fix: remove read-only property from Sales Invoice Timesheet Table
(cherry picked from commit b9d95711a2)
2026-03-02 05:25:05 +00:00
Rohit Waghchaure
744d7a2793 fix: voucher detail no in SABB
(cherry picked from commit c37a56ec89)
2026-03-02 04:24:00 +00:00
Mihir Kandoi
88b4699025 Merge pull request #53069 from frappe/mergify/bp/version-16-hotfix/pr-53067
fix: use the correct precision value in stock reco (backport #53067)
2026-03-01 21:37:18 +05:30
Mihir Kandoi
c92fd26e1b fix: use the correct precision value in stock reco
(cherry picked from commit 36726b0f7b)
2026-03-01 15:52:17 +00:00
Mihir Kandoi
746ca73006 Merge pull request #53066 from frappe/mergify/bp/version-16-hotfix/pr-53062
fix: correct sle voucher_type comparison in get_ref_doctype (backport #53062)
2026-03-01 21:03:52 +05:30
Sanjesh
788cd82b4b fix: correct sle voucher_type comparison in get_ref_doctype
(cherry picked from commit cffb59ae73)
2026-03-01 15:16:44 +00:00
Mihir Kandoi
8ed2d45729 Merge pull request #53061 from frappe/mergify/bp/version-16-hotfix/pr-53057
fix: allow allowed roles to bypass over billing validation (backport #53057)
2026-03-01 16:03:42 +05:30
Mihir Kandoi
8752b2f767 Merge pull request #53059 from frappe/mergify/bp/version-16-hotfix/pr-53052
fix: use stock qty instead of qty when creating stock entry from MR (backport #53052)
2026-03-01 15:50:24 +05:30
Mihir Kandoi
c274b7cc2e fix: allow allowed roles to bypass over billing validation
(cherry picked from commit 04127019f9)
2026-03-01 10:18:22 +00:00
Mihir Kandoi
1c4e20f5ed Merge pull request #53054 from frappe/mergify/bp/version-16-hotfix/pr-53051
fix: use conversion factor when creating stock entry from pick list (backport #53051)
2026-03-01 15:26:44 +05:30
Mihir Kandoi
1e4478765a fix: use stock qty instead of qty when creating stock entry from MR
(cherry picked from commit 30c3ff2efe)
2026-03-01 09:51:54 +00:00
frappe-pr-bot
b26631d8b1 chore: update POT file 2026-03-01 09:43:26 +00:00
Mihir Kandoi
f939e980a6 fix: use conversion factor when creating stock entry from pick list
(cherry picked from commit 5f12b0db3f)
2026-03-01 09:40:37 +00:00
rohitwaghchaure
31a28ed570 Merge pull request #53034 from frappe/mergify/bp/version-16-hotfix/pr-52988
fix: same reposting entry picked by multiple rq jobs (backport #52988)
2026-02-28 09:04:49 +05:30
Rohit Waghchaure
c28568f4fd fix: same reposting entry picked by multiple rq jobs
(cherry picked from commit 4dfbacfd92)
2026-02-28 02:06:33 +00:00
rohitwaghchaure
8b7692db57 Merge pull request #53021 from frappe/mergify/bp/version-16-hotfix/pr-53013
fix: old stock reco entries causing issue in the stock balance report (backport #53013)
2026-02-27 15:31:32 +05:30
Rohit Waghchaure
ea5ad3179c fix: old stock reco entries causing issue in the stock balance report
(cherry picked from commit 0874cbc268)
2026-02-27 09:27:00 +00:00
Mihir Kandoi
41ff3191f5 Merge pull request #53018 from frappe/mergify/bp/version-16-hotfix/pr-53012 2026-02-27 13:59:07 +05:30
Thomas antony
6727c86d0a feat: UOM query filter for opportunity items
Add UOM query filter based on item code in opportunity form.

(cherry picked from commit b33f06701c)
2026-02-27 08:23:48 +00:00
mergify[bot]
865895649e fix: Trial Balance and Consolidated Trial Balance total row calculation (backport #53014) (#53015)
Co-authored-by: diptanilsaha <diptanil@frappe.io>
2026-02-27 07:40:41 +00:00
diptanilsaha
c61c748cbd fix(payment_entry): fix precision for total_allocated_amount and base_total_allocated_amount
Co-authored-by: Ahuahuachi <Ahuahuachi@users.noreply.github.com>
(cherry picked from commit d82a0a9455)
2026-02-26 09:25:01 +00:00
ruthra kumar
862659e396 Merge pull request #52996 from frappe/mergify/bp/version-16-hotfix/pr-52630
fix(account): compute tax net_amount in JS controller (backport #52630)
2026-02-26 14:00:06 +05:30
Frappe PR Bot
e671f5a3ac chore(release): Bumped to Version 16.7.3
## [16.7.3](https://github.com/frappe/erpnext/compare/v16.7.2...v16.7.3) (2026-02-26)

### Bug Fixes

* **payment entry:** round unallocated amount ([e7e5285](e7e52851d6))
2026-02-26 08:29:46 +00:00
ruthra kumar
0d0014c872 Merge pull request #52994 from frappe/mergify/bp/version-16/pr-52188
fix(payment entry): round unallocated amount (backport #52188)
2026-02-26 13:58:15 +05:30
Luis Mendoza
3f284f0c55 fix(accounts): round and convert net_amount to company currency in JS tax controller
(cherry picked from commit b10b205394)
2026-02-26 08:18:12 +00:00
Luis Mendoza
adb4023ba4 style: prettier formatting
(cherry picked from commit 485166b668)
2026-02-26 08:18:12 +00:00
Luis Mendoza
429bd245d1 fix(accounts): compute tax net_amount in JS controller
(cherry picked from commit 153ad99f85)
2026-02-26 08:18:11 +00:00
ravibharathi656
e7e52851d6 fix(payment entry): round unallocated amount
(cherry picked from commit b0d6751777)
2026-02-26 08:06:09 +00:00
ruthra kumar
fc7d9de979 Merge pull request #52993 from frappe/mergify/bp/version-16-hotfix/pr-52188
fix(payment entry): round unallocated amount (backport #52188)
2026-02-26 13:25:03 +05:30
ravibharathi656
b76e0c645b fix(payment entry): round unallocated amount
(cherry picked from commit b0d6751777)
2026-02-26 07:38:22 +00:00
Frappe PR Bot
e1782901e4 chore(release): Bumped to Version 16.7.2
## [16.7.2](https://github.com/frappe/erpnext/compare/v16.7.1...v16.7.2) (2026-02-26)

### Bug Fixes

* broekn link of docs in asset onboarding ([5d2822d](5d2822df97))
2026-02-26 06:48:40 +00:00
rohitwaghchaure
7c8e071d24 Merge pull request #52986 from frappe/mergify/bp/version-16/pr-52985
fix: broken link of docs in asset onboarding (backport #52983) (backport #52985)
2026-02-26 12:16:36 +05:30
Frappe PR Bot
5d86e9697a chore(release): Bumped to Version 16.7.1
## [16.7.1](https://github.com/frappe/erpnext/compare/v16.7.0...v16.7.1) (2026-02-26)

### Bug Fixes

* patch to complete onboarding stpes for existing records ([c3700f1](c3700f1b31))
2026-02-26 06:03:21 +00:00
rohitwaghchaure
19143bfe9b Merge branch 'version-16' into mergify/bp/version-16/pr-52985 2026-02-26 11:33:03 +05:30
rohitwaghchaure
2b664387d7 Merge pull request #52984 from frappe/mergify/bp/version-16/pr-52969
fix: patch to complete onboarding stpes for existing records (backport #52967) (backport #52969)
2026-02-26 11:31:45 +05:30
rohitwaghchaure
38c49dfed6 chore: fix conflicts
Updated the modified date in learn_asset.json.
2026-02-26 11:31:16 +05:30
rohitwaghchaure
6bebf51087 chore: fix conflicts 2026-02-26 11:30:57 +05:30
Rohit Waghchaure
5d2822df97 fix: broekn link of docs in asset onboarding
(cherry picked from commit 1cdf439e38)
(cherry picked from commit 5c48f74d4c)

# Conflicts:
#	erpnext/assets/module_onboarding/asset_onboarding/asset_onboarding.json
#	erpnext/assets/onboarding_step/learn_asset/learn_asset.json
2026-02-26 05:54:16 +00:00
rohitwaghchaure
72a5528b56 Merge pull request #52985 from frappe/mergify/bp/version-16-hotfix/pr-52983
fix: broken link of docs in asset onboarding (backport #52983)
2026-02-26 11:24:00 +05:30
Rohit Waghchaure
5c48f74d4c fix: broekn link of docs in asset onboarding
(cherry picked from commit 1cdf439e38)
2026-02-26 05:36:06 +00:00
rohitwaghchaure
76d27877c2 chore: fix conflicts
(cherry picked from commit 8f922382e4)
2026-02-26 05:21:53 +00:00
Rohit Waghchaure
c3700f1b31 fix: patch to complete onboarding stpes for existing records
(cherry picked from commit d90ec49241)

# Conflicts:
#	erpnext/patches.txt
(cherry picked from commit 941a78e1a8)
2026-02-26 05:21:53 +00:00
rohitwaghchaure
44c9fccd34 Merge pull request #52969 from frappe/mergify/bp/version-16-hotfix/pr-52967
fix: patch to complete onboarding stpes for existing records (backport #52967)
2026-02-26 10:51:05 +05:30
ruthra kumar
0732f741cc Merge pull request #52975 from frappe/mergify/bp/version-16-hotfix/pr-52973
fix: ensure cache is cleared on fiscal year update and trash (backport #52973)
2026-02-26 10:00:19 +05:30
mergify[bot]
2349ebbb29 Merge pull request #52977 from frappe/mergify/bp/version-16-hotfix/pr-52952
fix: customer field made mandatory for sales invoice (backport #52952)
2026-02-25 15:47:17 +00:00
ljain112
2495cb8b2a fix: ensure cache is cleared on fiscal year update and trash
(cherry picked from commit 39b0e3522a)
2026-02-25 14:36:08 +00:00
rohitwaghchaure
8f922382e4 chore: fix conflicts 2026-02-25 18:13:42 +05:30
rohitwaghchaure
a864ca5c17 Merge pull request #52962 from frappe/mergify/bp/version-16-hotfix/pr-52957
fix: reposting creation slow for GL entries (backport #52957)
2026-02-25 18:09:10 +05:30
Rohit Waghchaure
941a78e1a8 fix: patch to complete onboarding stpes for existing records
(cherry picked from commit d90ec49241)

# Conflicts:
#	erpnext/patches.txt
2026-02-25 12:30:24 +00:00
ruthra kumar
cd465e1dbd refactor: Journal Entry form cleanup (backport #52780) (#52961)
refactor: Journal Entry form cleanup

(cherry picked from commit 73d5aa35a1)

# Conflicts:
#	erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2026-02-25 16:27:03 +05:30
Rohit Waghchaure
ab7e33f83d fix: reposting creation slow for GL entries
(cherry picked from commit d9ac198bad)
2026-02-25 10:34:25 +00:00
ruthra kumar
0f59da89cf refactor: Journal Entry form cleanup
(cherry picked from commit 73d5aa35a1)

# Conflicts:
#	erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json
2026-02-25 15:51:58 +05:30
ruthra kumar
5cc95a32c2 Merge pull request #52959 from frappe/mergify/bp/version-16-hotfix/pr-51558
fix(postgres): avoid UNSIGNED cast in customer autoname (backport #51558)
2026-02-25 15:10:50 +05:30
ruthra kumar
c98263cd77 Merge pull request #52950 from frappe/mergify/bp/version-16-hotfix/pr-52507
refactor: toggle for UTM parameters (backport #52507)
2026-02-25 15:10:30 +05:30
Matt Howard
d922213dd7 fix(postgres): avoid UNSIGNED cast in customer autoname
(cherry picked from commit 323636b396)
2026-02-25 09:21:10 +00:00
ruthra kumar
270b09f936 chore: resolve conflicts 2026-02-25 14:42:52 +05:30
ruthra kumar
4acf404ae5 refactor: better description on toggle
(cherry picked from commit 20af546b26)
2026-02-25 06:54:16 +00:00
ruthra kumar
0433f73b03 refactor: utm analytics section delivery note
(cherry picked from commit 578783af8e)

# Conflicts:
#	erpnext/stock/doctype/delivery_note/delivery_note.json
2026-02-25 06:54:16 +00:00
ruthra kumar
2bb8c7c74e refactor: utm section in opportunity
(cherry picked from commit 223d560b32)
2026-02-25 06:54:16 +00:00
ruthra kumar
3a8967b2a7 refactor: utm analytics section in lead
(cherry picked from commit 71e8941285)
2026-02-25 06:54:16 +00:00
ruthra kumar
fc0a07b3b1 refactor: utm analytics section in pos profile
(cherry picked from commit 7de0ca164d)

# Conflicts:
#	erpnext/accounts/doctype/pos_profile/pos_profile.json
2026-02-25 06:54:15 +00:00
ruthra kumar
08df2a755e refactor: utm section pos invoice
(cherry picked from commit 0bafa347a5)
2026-02-25 06:54:15 +00:00
ruthra kumar
964d75bd3e refactor: utm section in sales invoice
(cherry picked from commit 678d261f40)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json
2026-02-25 06:54:15 +00:00
ruthra kumar
774aa2b78f refactor: utm section in sales order
(cherry picked from commit c00bf7df6a)

# Conflicts:
#	erpnext/selling/doctype/sales_order/sales_order.json
2026-02-25 06:54:14 +00:00
ruthra kumar
6539e443a5 refactor: hide UTM parameters
(cherry picked from commit aaf5f923b0)

# Conflicts:
#	erpnext/selling/doctype/quotation/quotation.json
2026-02-25 06:54:14 +00:00
Frappe PR Bot
ca9f9de39f chore(release): Bumped to Version 16.7.0
# [16.7.0](https://github.com/frappe/erpnext/compare/v16.6.1...v16.7.0) (2026-02-25)

### Bug Fixes

* **`fiscal_year_company`:** made `company` field mandatory ([54bed64](54bed64356))
* **`fiscal_year`:** `Fiscal Year` auto-generation and notification ([92c2c7b](92c2c7bf82))
* Add handling for Sales Invoice Item quantity field ([f6a1ea8](f6a1ea804a))
* add missing property_type ([dd41f2c](dd41f2ceb7))
* add purchase invoice as well ([2d864bb](2d864bb599))
* addresses portal (backport [#52712](https://github.com/frappe/erpnext/issues/52712)) ([#52786](https://github.com/frappe/erpnext/issues/52786)) ([d7b61b9](d7b61b945f))
* **asset:** handle partial asset sales by splitting remaining quantity (backport [#51363](https://github.com/frappe/erpnext/issues/51363)) ([#52394](https://github.com/frappe/erpnext/issues/52394)) ([10be8f1](10be8f19e2))
* avoid duplicate taxes and charges rows in payment entry (backport [#52178](https://github.com/frappe/erpnext/issues/52178)) ([#52319](https://github.com/frappe/erpnext/issues/52319)) ([e6f7a7e](e6f7a7e979))
* better permissions on make payment request ([a5c83dd](a5c83dd11e))
* bug with comparison regarding `None` values and empty string ([66d1b7c](66d1b7c837))
* check gl account of an associated bank account in bank transaction ([746b5d9](746b5d96de))
* enfore permission on make_payment_request ([8184599](81845992a6))
* fiscal year notification subject ([e8c5d57](e8c5d5710d))
* get employee email with priority if preferred is not set ([116361c](116361c1dc))
* ignore permissions instead of saving parent ([715dbc0](715dbc0093))
* inconsistent label name between parent and child ([b56c444](b56c444f18))
* item code shows undefined ([0fd9fc4](0fd9fc48f3))
* link field displays incorrect value when empty ([b67d42e](b67d42ee58))
* **manufacturing:** remove delete query of job card & batch and serial no  ([#52840](https://github.com/frappe/erpnext/issues/52840)) ([9ff924e](9ff924e831))
* **manufacturing:** set pick list purpose while creating it from work order ([131e279](131e279a0c))
* **manufacturing:** update status for work order before calculating planned qty ([61d339c](61d339cfa7))
* material request on receive notification condition ([785773b](785773b0ac))
* permission issue for quotation item during update item ([bccca6f](bccca6f58e))
* populate doctypes to be ignored table in validate ([237e458](237e4583e2))
* prevent precision errors in  discount distribution with inclusive tax ([0e2e89c](0e2e89c355))
* **Purchase Receipt:** copy project from first row when adding items ([77da330](77da3306b5))
* remove form tour for sales and purchase order ([aac7fc3](aac7fc30d5))
* remove supplier invoice date/posting date validation ([cfad7e1](cfad7e17f1))
* reservation based on field should be read only in SRE ([a499b7e](a499b7e046))
* sales and purchase modules forms clean-up (backport [#52875](https://github.com/frappe/erpnext/issues/52875)) ([#52911](https://github.com/frappe/erpnext/issues/52911)) ([2177098](217709836b))
* **sales-order:** update quotation status while cancelling sales order ([#52822](https://github.com/frappe/erpnext/issues/52822)) ([3a0f90c](3a0f90c433))
* sensible insufficient stock message in pick list ([dbe2a87](dbe2a87a84))
* setup fails to set abbr to departments ([b15db05](b15db05ef8))
* skip empty dimension values in exchange gain loss ([780b626](780b626ae5))
* standalone sales invoice return should not fallback to item master for valuation rate ([6e1a808](6e1a8083a5))
* supplier_type appears multiple times ([9a2eb91](9a2eb91eec))
* test cases related to default letterhead change ([1e64dea](1e64dea6a0))
* typo ([d0c2cc8](d0c2cc848c))
* typo ([0c4b9ea](0c4b9ea9ca))
* unable to submit subcontracting order if created from material request ([c5bc92d](c5bc92d50e))
* unhide book_advance_payments_in_separate_party_account check field in Payment Entry doctype ([13d153c](13d153c196))
* update items fetches wrong item code ([3355c60](3355c60c79))
* update modified timestamp in json ([74a3965](74a3965a12))
* use stock qty instead of qty when updating transferred qty in WO ([90e61ab](90e61abff4))
* user permission on reports (backport [#52709](https://github.com/frappe/erpnext/issues/52709)) ([#52757](https://github.com/frappe/erpnext/issues/52757)) ([893683a](893683a512))
* **work_order:** update returned qty ([c4ba3c9](c4ba3c9c4b))

### Features

* default letterhead and print format ([4adcc1c](4adcc1c521))
* **Journal Entry Account:** add Bank Transaction as Reference Type (backport [#52760](https://github.com/frappe/erpnext/issues/52760)) ([#52816](https://github.com/frappe/erpnext/issues/52816)) ([2c5bdef](2c5bdefd13))
* module onboarding ([858119f](858119f907))
* **payment request:** create payment request as per payment schedules ([751a081](751a081253))
* **payment_request:** add option to calculate request amount using payment schedule ([298ea33](298ea33922))
* retrieve employee basic contact information ([f701407](f701407e23))
* retrieve employee contact details ([94f9f8b](94f9f8b30a))
* standard print format for Sales Order and Purchase Invoice ([222f51b](222f51b4d0))
2026-02-25 06:34:28 +00:00
ruthra kumar
44b935b845 Merge pull request #52925 from frappe/version-16-hotfix
chore: release v16
2026-02-25 12:01:35 +05:30
Mihir Kandoi
16e29d8571 Merge pull request #52944 from frappe/mergify/bp/version-16-hotfix/pr-52942 2026-02-25 11:04:43 +05:30
Mihir Kandoi
5db413d802 Merge pull request #52946 from frappe/mergify/bp/version-16-hotfix/pr-52945
fix: item code shows undefined (backport #52945)
2026-02-25 10:49:46 +05:30
Mihir Kandoi
0fd9fc48f3 fix: item code shows undefined
(cherry picked from commit 9ef7f05712)
2026-02-25 04:55:59 +00:00
Mihir Kandoi
265342d40a chore: clearer description for internal transfer at arms length
(cherry picked from commit bd9e5e97d7)
2026-02-25 04:43:22 +00:00
Khushi Rawat
cc604d4921 Merge pull request #52938 from frappe/mergify/bp/version-16-hotfix/pr-52889
feat: default letterhead and print format (backport #52889)
2026-02-25 00:39:54 +05:30
Khushi Rawat
1311664f52 Merge pull request #52939 from frappe/mergify/bp/version-16-hotfix/pr-52861
feat: standard print format for Sales Order and Purchase Invoice (backport #52861)
2026-02-25 00:37:37 +05:30
khushi8112
f4ec356dfb refactor: add translation and fix typo
(cherry picked from commit cbea4493c1)
2026-02-24 15:53:41 +00:00
khushi8112
222f51b4d0 feat: standard print format for Sales Order and Purchase Invoice
(cherry picked from commit 371efce88a)
2026-02-24 15:53:41 +00:00
khushi8112
1e64dea6a0 fix: test cases related to default letterhead change
(cherry picked from commit 8a2cb96c2a)
2026-02-24 15:52:54 +00:00
khushi8112
b21acec711 test: debugging the issue
(cherry picked from commit 570f574758)
2026-02-24 15:52:54 +00:00
khushi8112
dd41f2ceb7 fix: add missing property_type
(cherry picked from commit fbf5529ddd)
2026-02-24 15:52:54 +00:00
khushi8112
4adcc1c521 feat: default letterhead and print format
(cherry picked from commit 0ea22f9796)
2026-02-24 15:52:53 +00:00
Mihir Kandoi
6975fa185c Merge pull request #52937 from frappe/mergify/bp/version-16-hotfix/pr-52724 2026-02-24 20:57:08 +05:30
ljain112
6902fd6b33 refactor: use postprocess in mapped_doc to update items in subcontracting controller
(cherry picked from commit 1d3d09f48c)
2026-02-24 15:07:59 +00:00
ruthra kumar
9336f1f9a4 Merge pull request #52934 from frappe/mergify/bp/version-16-hotfix/pr-51777
feat: making payment requests based on payment schedule (backport #51777)
2026-02-24 18:55:13 +05:30
ruthra kumar
aaba93bd03 Merge pull request #52933 from frappe/mergify/bp/version-16-hotfix/pr-52824
refactor: separate construction of chart related data from `get_columns()` (backport #52824)
2026-02-24 18:46:27 +05:30
Jatin3128
751a081253 feat(payment request): create payment request as per payment schedules
(cherry picked from commit e476dff842)
2026-02-24 13:09:27 +00:00
Jatin3128
298ea33922 feat(payment_request): add option to calculate request amount using payment schedule
(cherry picked from commit 60108590b0)
2026-02-24 13:09:26 +00:00
ruthra kumar
807463e90c Merge pull request #52929 from frappe/mergify/bp/version-16-hotfix/pr-52029
fix: prevent precision errors in  discount distribution with inclusive tax (backport #52029)
2026-02-24 18:39:16 +05:30
Harsh Patadia
27c03fee1c refactor: separate construction of chart related data from get_columns() (#52824)
* fix: avoid hardcoded column slicing for Profit & Loss chart data

* refactor: improve parameter naming and reduce code repetion by using same function get_period_columns()

* refactor: improved parameter naming in get_data() and get_chart_data()

(cherry picked from commit bdcb2c1512)
2026-02-24 12:37:51 +00:00
rohitwaghchaure
ffe77ba1e7 Merge pull request #52931 from frappe/mergify/bp/version-16-hotfix/pr-52930
fix: remove form tour for sales and purchase order (backport #52930)
2026-02-24 17:45:33 +05:30
Rohit Waghchaure
aac7fc30d5 fix: remove form tour for sales and purchase order
(cherry picked from commit ed7315d78e)
2026-02-24 11:53:56 +00:00
ljain112
0e2e89c355 fix: prevent precision errors in discount distribution with inclusive tax
(cherry picked from commit 2068299766)
2026-02-24 11:29:05 +00:00
rohitwaghchaure
d8f6a007a0 Merge pull request #52922 from frappe/mergify/bp/version-16-hotfix/pr-52839
feat: module onboarding (backport #52839)
2026-02-24 16:09:40 +05:30
Rohit Waghchaure
858119f907 feat: module onboarding
(cherry picked from commit 792a1a7ab7)
2026-02-24 07:20:09 +00:00
ruthra kumar
033c9fc57d Merge pull request #52920 from frappe/mergify/bp/version-16-hotfix/pr-52363
fix: unhide book_advance_payments_in_separate_party_account check fie… (backport #52363)
2026-02-24 12:21:48 +05:30
ruthra kumar
d743ee9e1c Merge pull request #52919 from frappe/mergify/bp/version-16-hotfix/pr-52822
fix(sales-order): update quotation status while cancelling sales order (backport #52822)
2026-02-24 12:11:58 +05:30
Shllokkk
13d153c196 fix: unhide book_advance_payments_in_separate_party_account check field in Payment Entry doctype
(cherry picked from commit 5793322c30)
2026-02-24 06:26:55 +00:00
Sowmya
3a0f90c433 fix(sales-order): update quotation status while cancelling sales order (#52822)
* fix(sales-order): update quotation status while cancelling sales order

* test: validate quotation status

* chore: remove submit

(cherry picked from commit d638f3e033)
2026-02-24 06:18:37 +00:00
mergify[bot]
217709836b fix: sales and purchase modules forms clean-up (backport #52875) (#52911)
* fix: sales and purchase modules forms clean-up

(cherry picked from commit 0e356dc2e3)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json
#	erpnext/buying/doctype/purchase_order/purchase_order.json
#	erpnext/selling/doctype/sales_order/sales_order.json
#	erpnext/stock/doctype/delivery_note/delivery_note.json

* chore: fix conflicts

* chore: fix conflicts

Removed unnecessary fields and updated the modified date.

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

Removed UTM Analytics section and column break from delivery note JSON configuration. Updated the modified timestamp.

---------

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2026-02-24 11:28:34 +05:30
ruthra kumar
3663fc4f64 Merge pull request #52908 from frappe/mergify/bp/version-16-hotfix/pr-52896
fix: skip empty dimension values in exchange gain loss (backport #52896)
2026-02-23 21:24:31 +05:30
ravibharathi656
780b626ae5 fix: skip empty dimension values in exchange gain loss
(cherry picked from commit 7df9d951c6)
2026-02-23 15:36:47 +00:00
Mihir Kandoi
bbf1a94024 Merge pull request #52906 from frappe/mergify/bp/version-16-hotfix/pr-52544
fix(stock): improve error message when serial no is reserved via SRE (backport #52544)
2026-02-23 21:03:12 +05:30
Mihir Kandoi
8a44638939 Merge pull request #52904 from frappe/mergify/bp/version-16-hotfix/pr-52764
fix: populate doctypes to be ignored table in validate (backport #52764)
2026-02-23 20:45:09 +05:30
Imesha Sudasingha
fb8f085885 Merge pull request #52544 from one-highflyer/fix/improve-reserved-serial-no-error-message
fix(stock): improve error message when serial no is reserved via SRE

(cherry picked from commit 71248ff40b)
2026-02-23 15:13:17 +00:00
l0gesh29
237e4583e2 fix: populate doctypes to be ignored table in validate
(cherry picked from commit 60d2f2d304)
2026-02-23 14:51:15 +00:00
Diptanil Saha
d71a0d76e6 Merge pull request #52902 from frappe/mergify/bp/version-16-hotfix/pr-52891
fix: notifications (backport #52891)
2026-02-23 19:53:07 +05:30
diptanilsaha
e8c5d5710d fix: fiscal year notification subject
(cherry picked from commit 3e87059939)
2026-02-23 14:08:13 +00:00
diptanilsaha
785773b0ac fix: material request on receive notification condition
(cherry picked from commit 96aa37eff5)
2026-02-23 14:08:13 +00:00
Mihir Kandoi
c51bc69d58 Merge pull request #52901 from frappe/mergify/bp/version-16-hotfix/pr-52892
fix: link field displays incorrect value when empty (backport #52892)
2026-02-23 19:11:48 +05:30
Mihir Kandoi
b67d42ee58 fix: link field displays incorrect value when empty
(cherry picked from commit db00860662)
2026-02-23 13:37:44 +00:00
Mihir Kandoi
62f587318c Merge pull request #52898 from frappe/mergify/bp/version-16-hotfix/pr-52878
fix: standalone sales invoice return should not fallback to item mast… (backport #52878)
2026-02-23 19:07:01 +05:30
Mihir Kandoi
6e1a8083a5 fix: standalone sales invoice return should not fallback to item master for valuation rate
(cherry picked from commit a85a0aef52)
2026-02-23 13:19:55 +00:00
ruthra kumar
407bf7ec2e Merge pull request #52895 from frappe/mergify/bp/version-16-hotfix/pr-52812
fix: bank account mismatch error on reverse transaction reconciliation (backport #52812)
2026-02-23 18:28:38 +05:30
Diptanil Saha
4ac4292de4 Merge pull request #52893 from frappe/mergify/bp/version-16-hotfix/pr-50301
refactor:  fetch employee contact details in realtime in Payment Entry (backport #50301)
2026-02-23 18:11:21 +05:30
ervishnucs
746b5d96de fix: check gl account of an associated bank account in bank transaction
(cherry picked from commit 8fe0bf4ba3)
2026-02-23 12:36:45 +00:00
Abdeali Chharchhoda
5c9f9517d6 refactor: method to get employee contact without permission check
(cherry picked from commit 58cdb9503b)
2026-02-23 12:22:57 +00:00
Abdeali Chharchhoda
63975c8c00 refactor: use common method to get employee contacts
(cherry picked from commit ec1eb6d222)
2026-02-23 12:22:57 +00:00
Abdeali Chharchhoda
116361c1dc fix: get employee email with priority if preferred is not set
(cherry picked from commit 7b89c12470)
2026-02-23 12:22:57 +00:00
Abdeali Chharchhoda
0f8f8c2066 refactor: add validation for missing employee parameter
(cherry picked from commit b8e06b9636)
2026-02-23 12:22:56 +00:00
Abdeali Chharchhoda
123b7191fc refactor: fetch employee contact details in realtime
(cherry picked from commit 2ea6508fa5)
2026-02-23 12:22:56 +00:00
Abdeali Chharchhoda
94f9f8b30a feat: retrieve employee contact details
(cherry picked from commit a41297d841)
2026-02-23 12:22:56 +00:00
Abdeali Chharchhoda
f701407e23 feat: retrieve employee basic contact information
(cherry picked from commit 4ad1474e32)
2026-02-23 12:22:56 +00:00
Abdeali Chharchhoda
2b9af6a641 chore: Removing unused import
(cherry picked from commit 87c59f471c)
2026-02-23 12:22:55 +00:00
ruthra kumar
79cf614118 Merge pull request #52887 from frappe/mergify/bp/version-16-hotfix/pr-52840
fix(manufacturing): remove delete query of job card & batch and serial no  (backport #52840)
2026-02-23 17:39:28 +05:30
Sudharsanan Ashok
9ff924e831 fix(manufacturing): remove delete query of job card & batch and serial no (#52840)
* fix(manufacturing): remove delete query of batch and serial no

* fix(manufacturing): remove delete query of job card

* fix: remove delete function call for work order

(cherry picked from commit 8b2a971019)
2026-02-23 11:29:36 +00:00
mergify[bot]
8437355072 Merge pull request #52876 from frappe/mergify/bp/version-16-hotfix/pr-52399
refactor: Better organizing of the fields in various doctypes (backport #52399)
2026-02-23 16:54:54 +05:30
Khushi Rawat
1f82be4383 Merge pull request #52881 from frappe/mergify/bp/version-16-hotfix/pr-52879
fix: typo (backport #52879)
2026-02-23 16:04:05 +05:30
mergify[bot]
e6f7a7e979 fix: avoid duplicate taxes and charges rows in payment entry (backport #52178) (#52319)
Co-authored-by: Dharanidharan S <dharanidharans1328@gmail.com>
fix: avoid duplicate taxes and charges rows in payment entry (#52178)
2026-02-23 10:21:06 +00:00
Mihir Kandoi
c2666bbcac Merge pull request #52883 from frappe/mergify/bp/version-16-hotfix/pr-52880
fix(work_order): update returned qty on work order (backport #52880)
2026-02-23 15:49:48 +05:30
Khushi Rawat
74a3965a12 fix: update modified timestamp in json 2026-02-23 15:44:59 +05:30
Pandiyan37
c4ba3c9c4b fix(work_order): update returned qty
(cherry picked from commit b7f45e6963)
2026-02-23 10:04:09 +00:00
mahsem
d0c2cc848c fix: typo
(cherry picked from commit 2b72aab671)
2026-02-23 09:54:15 +00:00
Mihir Kandoi
af4c626238 Merge pull request #52874 from frappe/mergify/bp/version-16-hotfix/pr-52871
fix: use stock qty instead of qty when updating transferred qty in WO (backport #52871)
2026-02-23 14:55:47 +05:30
rohitwaghchaure
aab7759afc Merge pull request #52872 from frappe/mergify/bp/version-16-hotfix/pr-52504
refactor: form cleanup for sales order (backport #52504)
2026-02-23 14:01:39 +05:30
Mihir Kandoi
90e61abff4 fix: use stock qty instead of qty when updating transferred qty in WO
(cherry picked from commit 8e14249335)
2026-02-23 07:53:20 +00:00
ruthra kumar
d1c142cce8 refactor: form cleanup for sales order
(cherry picked from commit 93d1716eb5)
2026-02-23 07:49:58 +00:00
rohitwaghchaure
54e2fa0231 Merge pull request #52868 from frappe/mergify/bp/version-16-hotfix/pr-52534
refactor: supplier form cleanup (backport #52534)
2026-02-23 12:12:57 +05:30
rohitwaghchaure
ddfdc1a4e7 Merge pull request #52867 from frappe/mergify/bp/version-16-hotfix/pr-52508
refactor: form cleanup for stock and manufacturing doctypes (backport #52508)
2026-02-23 12:12:43 +05:30
rohitwaghchaure
4b0d2558d7 chore: fix conflicts
Refactor purchase order JSON structure by cleaning up field order and removing unnecessary fields.
2026-02-23 11:30:53 +05:30
rohitwaghchaure
7223acf266 Merge pull request #52866 from frappe/mergify/bp/version-16-hotfix/pr-52469
refactor: form cleanup for master doctypes related to stock module (backport #52469)
2026-02-23 11:27:27 +05:30
rohitwaghchaure
5b30e6e96b Merge pull request #52865 from frappe/mergify/bp/version-16-hotfix/pr-52392
refactor: Cleanup buying module related doctypes (backport #52392)
2026-02-23 11:26:51 +05:30
rohitwaghchaure
8cd12e37cd chore: fix conflicts 2026-02-23 11:26:31 +05:30
rohitwaghchaure
9a2eb91eec fix: supplier_type appears multiple times 2026-02-23 11:24:13 +05:30
rohitwaghchaure
7a680e6070 chore: fix conflicts
Refactored supplier form by reorganizing field order and removing unnecessary fields.
2026-02-23 11:05:07 +05:30
rohitwaghchaure
5e31eb3d77 chore: fix conflicts 2026-02-23 10:58:12 +05:30
Rohit Waghchaure
3eb838a6a2 refactor: supplier form cleanup
(cherry picked from commit bd521d9089)

# Conflicts:
#	erpnext/buying/doctype/supplier/supplier.json
2026-02-23 05:28:09 +00:00
Rohit Waghchaure
575fd4988b refactor: form cleanup for stock and manufacturing doctypes
(cherry picked from commit bf20ecca60)

# Conflicts:
#	erpnext/buying/doctype/purchase_order/purchase_order.json
2026-02-23 05:27:39 +00:00
Rohit Waghchaure
24fbd8add9 refactor: form cleanup for master doctypes related to stock module
(cherry picked from commit 6c49d5dc7d)
2026-02-23 05:27:10 +00:00
Rohit Waghchaure
91e9867fb1 refactor: Cleanup buying module forms
(cherry picked from commit f3ea1863ae)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
2026-02-23 05:26:46 +00:00
Mihir Kandoi
069d6d5269 Merge pull request #52863 from frappe/mergify/bp/version-16-hotfix/pr-52803
fix(manufacturing): update closed status for current work order before calculating planned qty (backport #52803)
2026-02-23 07:47:08 +05:30
Sudharsanan11
d9d76fceeb test(manufacturing): add test to validate the planned qty
(cherry picked from commit cfbdfcf515)
2026-02-23 02:01:42 +00:00
Sudharsanan11
61d339cfa7 fix(manufacturing): update status for work order before calculating planned qty
(cherry picked from commit 4d40c84a31)
2026-02-23 02:01:41 +00:00
MochaMind
843c0d4acf chore: update POT file (#52858) 2026-02-22 13:19:38 +01:00
mergify[bot]
2c5bdefd13 feat(Journal Entry Account): add Bank Transaction as Reference Type (backport #52760) (#52816)
* feat: add Bank Transaction as Reference Type to Journal Entry Account (#52760)

* feat: add Bank Transaction as Reference Type to Journal Entry Account

* fix: take care of existing property setters

* fix: cancelling Bank Transactions should still be possible

* fix: handle blank options in patch

* fix: hide Reference Due Date for Bank Transaction

(cherry picked from commit 387fb1b202)

# Conflicts:
#	erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json

* chore: resolve conflicts

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2026-02-21 15:43:47 +01:00
Diptanil Saha
a4ee85e89c Merge pull request #52848 from frappe/mergify/bp/version-16-hotfix/pr-52842
refactor: `Fiscal Year` cleanup (backport #52842)
2026-02-21 13:00:22 +05:30
diptanilsaha
92c2c7bf82 fix(fiscal_year): Fiscal Year auto-generation and notification
(cherry picked from commit 4c76786ce4)
2026-02-21 07:13:05 +00:00
diptanilsaha
54bed64356 fix(fiscal_year_company): made company field mandatory
(cherry picked from commit 94fb7e11b4)
2026-02-21 07:13:05 +00:00
diptanilsaha
82170dfd07 refactor: Fiscal Year DocType cleanup
(cherry picked from commit 74ac28fc70)
2026-02-21 07:13:04 +00:00
Mihir Kandoi
595b5e7dae Merge pull request #52847 from frappe/mergify/bp/version-16-hotfix/pr-52845 2026-02-21 12:41:15 +05:30
Mihir Kandoi
cfad7e17f1 fix: remove supplier invoice date/posting date validation
(cherry picked from commit 7cff0ba626)
2026-02-21 06:55:30 +00:00
Mihir Kandoi
00ebeec94e Merge pull request #52837 from frappe/mergify/bp/version-16-hotfix/pr-52835
fix: inconsistent label name between parent and child (backport #52835)
2026-02-20 17:17:01 +05:30
Mihir Kandoi
b56c444f18 fix: inconsistent label name between parent and child
(cherry picked from commit d6e1ca0f10)
2026-02-20 11:28:53 +00:00
Mihir Kandoi
9d2ccd7246 Merge pull request #52827 from frappe/mergify/bp/version-16-hotfix/pr-52821
fix: sensible insufficient stock message in pick list (backport #52821)
2026-02-20 14:40:55 +05:30
Mihir Kandoi
d06e611c72 Merge pull request #52829 from frappe/mergify/bp/version-16-hotfix/pr-52825
fix: update items fetches wrong item code (backport #52825)
2026-02-20 14:27:47 +05:30
Mihir Kandoi
3355c60c79 fix: update items fetches wrong item code
(cherry picked from commit ba96d37c11)
2026-02-20 08:54:31 +00:00
Mihir Kandoi
dbe2a87a84 fix: sensible insufficient stock message in pick list
(cherry picked from commit 1352dc79bb)
2026-02-20 08:53:52 +00:00
Mihir Kandoi
f78317a79a Merge pull request #52819 from frappe/mergify/bp/version-16-hotfix/pr-52811
fix: permission issue for quotation item during update item (backport #52811)
2026-02-19 23:22:37 +05:30
Mihir Kandoi
0c4b9ea9ca fix: typo
(cherry picked from commit 732c98b72f)
2026-02-19 17:28:53 +00:00
Mihir Kandoi
715dbc0093 fix: ignore permissions instead of saving parent
(cherry picked from commit 6342e9a3e2)
2026-02-19 17:28:53 +00:00
Nishka Gosalia
bccca6f58e fix: permission issue for quotation item during update item
(cherry picked from commit 58b8af0fa8)
2026-02-19 17:28:53 +00:00
Mihir Kandoi
72a0d82147 Merge pull request #52806 from frappe/mergify/bp/version-16-hotfix/pr-52804
fix(Purchase Receipt): copy project from first row when adding items (backport #52804)
2026-02-19 14:03:27 +05:30
Marc Ramser
77da3306b5 fix(Purchase Receipt): copy project from first row when adding items
Adds `items_add` method to copy expense_account, cost_center and project from first row to newly added items, matching Purchase Invoice behavior.

(cherry picked from commit 21423676c9)
2026-02-19 08:32:20 +00:00
Mihir Kandoi
636414c0e4 Merge pull request #52798 from frappe/mergify/bp/version-16-hotfix/pr-52792
fix: unable to submit subcontracting order if created from material r… (backport #52792)
2026-02-19 13:59:24 +05:30
Mihir Kandoi
c5bc92d50e fix: unable to submit subcontracting order if created from material request
(cherry picked from commit 37323480dd)
2026-02-19 13:44:30 +05:30
Mihir Kandoi
c669387b82 Merge pull request #52796 from frappe/mergify/bp/version-16-hotfix/pr-52794
fix: reservation based on field should be read only in SRE (backport #52794)
2026-02-19 12:57:07 +05:30
Mihir Kandoi
a499b7e046 fix: reservation based on field should be read only in SRE
(cherry picked from commit 21452b4c6e)
2026-02-19 05:10:44 +00:00
Frappe PR Bot
9a0b54c649 chore(release): Bumped to Version 16.6.1
## [16.6.1](https://github.com/frappe/erpnext/compare/v16.6.0...v16.6.1) (2026-02-19)

### Bug Fixes

* better permissions on make payment request ([78fc942](78fc9424d9))
2026-02-19 05:04:10 +00:00
ruthra kumar
1f78a9fa6c Merge pull request #52790 from frappe/mergify/bp/version-16/pr-52763
fix: better permissions on make payment request (backport #52763)
2026-02-19 10:32:36 +05:30
Mihir Kandoi
17062e0154 Merge pull request #52788 from frappe/mergify/bp/version-16-hotfix/pr-52490
fix: Add handling for Sales Invoice Item quantity field (backport #52490)
2026-02-19 10:15:48 +05:30
ruthra kumar
78fc9424d9 fix: better permissions on make payment request
(cherry picked from commit f36962fc58)
2026-02-19 04:32:31 +00:00
Mihir Kandoi
2d864bb599 fix: add purchase invoice as well
(cherry picked from commit 1fc2eddf6f)
2026-02-19 04:13:06 +00:00
Thomas antony
f6a1ea804a fix: Add handling for Sales Invoice Item quantity field
Add handling for Sales Invoice Item quantity field

(cherry picked from commit edfcaee99b)
2026-02-19 04:13:05 +00:00
mergify[bot]
d7b61b945f fix: addresses portal (backport #52712) (#52786)
* fix: addresses portal

(cherry picked from commit e317ab1479)

# Conflicts:
#	erpnext/patches.txt

* chore: resolve conflicts

---------

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-02-19 04:11:04 +00:00
Mihir Kandoi
b6a2284003 Merge pull request #52775 from frappe/mergify/bp/version-16-hotfix/pr-52628
fix(manufacturing): set pick list purpose while creating it from work order (backport #52628)
2026-02-18 15:32:12 +05:30
Sudharsanan11
131e279a0c fix(manufacturing): set pick list purpose while creating it from work order
(cherry picked from commit 23ccc2a8c5)
2026-02-18 09:46:02 +00:00
ruthra kumar
cc7de7e66e Merge pull request #52768 from frappe/mergify/bp/version-16-hotfix/pr-52763
fix: better permissions on make payment request (backport #52763)
2026-02-18 12:46:20 +05:30
ruthra kumar
a5c83dd11e fix: better permissions on make payment request
(cherry picked from commit f36962fc58)
2026-02-18 06:58:42 +00:00
ruthra kumar
f5fa1ba02b Merge pull request #52766 from frappe/mergify/bp/version-16-hotfix/pr-52419
fix: enfore permission on make_payment_request (backport #52419)
2026-02-18 12:26:45 +05:30
ruthra kumar
81845992a6 fix: enfore permission on make_payment_request
(cherry picked from commit b755ca12ca)
2026-02-18 06:32:44 +00:00
mergify[bot]
893683a512 fix: user permission on reports (backport #52709) (#52757)
* fix: user permission on reports (#52709)

(cherry picked from commit c6a292f6a9)

# Conflicts:
#	erpnext/accounts/report/purchase_register/purchase_register.py
#	erpnext/accounts/report/sales_register/sales_register.py

* chore: resolve conflict

---------

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2026-02-17 23:07:41 +05:30
Mihir Kandoi
59e2dbb435 Merge pull request #52754 from frappe/mergify/bp/version-16-hotfix/pr-52750
fix: setup fails to set abbr to departments (backport #52750)
2026-02-17 21:50:51 +05:30
Mihir Kandoi
35e9ca64ce Merge pull request #52752 from frappe/mergify/bp/version-16-hotfix/pr-52743
bug: fix comparison regarding `None` values (backport #52743)
2026-02-17 21:39:33 +05:30
Mihir Kandoi
b15db05ef8 fix: setup fails to set abbr to departments
(cherry picked from commit debe868950)
2026-02-17 15:57:50 +00:00
Markus Lobedann
66d1b7c837 fix: bug with comparison regarding None values and empty string
In their default state, the fields can be `None`. When a user enters something and deletes it afterwards, the fields contain an empty string.

This fixes the comparison.

(cherry picked from commit 3fd5a0f100)
2026-02-17 15:52:09 +00:00
mergify[bot]
10be8f19e2 fix(asset): handle partial asset sales by splitting remaining quantity (backport #51363) (#52394)
* fix(asset): handle partial asset sales by splitting remaining quantity

(cherry picked from commit 9a2710b9d7)

* fix: refactor older testcases

(cherry picked from commit a88fe2ecab)

* test: validate asset partial sales

(cherry picked from commit 9eeccb765d)

# Conflicts:
#	erpnext/assets/doctype/asset/test_asset.py

* fix(asset): skip purchase document validation while splitting existing asset

(cherry picked from commit e7e6567792)

* fix(asset): handle same asset being sold in multiple line items in sales invoice

(cherry picked from commit 23b094f151)

* test: validate asset split for auto created asset from purchase voucher

(cherry picked from commit 4adeaedfde)

# Conflicts:
#	erpnext/assets/doctype/asset/test_asset.py

* fix: use new_asset instead of asset_doc when checking values after splitting

(cherry picked from commit ca97f34092)

* fix: remove the redundant purchase receipt submit

(cherry picked from commit eeb6d0e9bf)

* chore: fix conflict

---------

Co-authored-by: Navin-S-R <navin@aerele.in>
2026-02-17 14:32:08 +00:00
Frappe PR Bot
372b0119bb chore(release): Bumped to Version 16.6.0
# [16.6.0](https://github.com/frappe/erpnext/compare/v16.5.0...v16.6.0) (2026-02-17)

### Bug Fixes

* allow non-stock items while updating items ([e2183eb](e2183ebde9))
* allow sequence id edit in BOM if routing is not set ([6f812cc](6f812ccaf5))
* better validation for negative batch ([e46e874](e46e8741b4))
* cancel SABB if SLE cancelled from LCV ([ac90975](ac90975f43))
* consider sle for negative stock validation ([ca8f324](ca8f324b51))
* consider table multiselect in delete transaction ([38679d6](38679d6d14))
* correct typos in marketing campaign custom fields function ([531bdbc](531bdbc727))
* do not allow plant floor company and warehouse to be updated ([a039c17](a039c176c8))
* ensure layout has Bootstrap row and column (backport [#52649](https://github.com/frappe/erpnext/issues/52649)) ([#52719](https://github.com/frappe/erpnext/issues/52719)) ([53e400c](53e400cca1))
* log changes made to accounts settings ([2200b9a](2200b9aa67))
* **manufacturing:** add sales order fields in subassembly child table ([605c0db](605c0db976))
* **manufacturing:** set sales order references in subassembly child table ([f4b0e64](f4b0e646b4))
* **pos_invoice:** add correct depends on condition ([#52689](https://github.com/frappe/erpnext/issues/52689)) ([28592d0](28592d0180))
* prevent rows from being added to sub_assembly_items and mr_items ([80c98cd](80c98cdcf4))
* production plan status ([62ea18f](62ea18f1cc))
* removed lost reason detail ([3c33a19](3c33a19634))
* **selling-workspace-sidebar:** changed order of pos profile ([1820c35](1820c35880))
* standalone credit/debit notes should not fetch any serial or batch by default ([dd4e186](dd4e1867f5))
* **stock:** remove hardcoded letter_head from report ([1d444e5](1d444e53eb)), closes [#52569](https://github.com/frappe/erpnext/issues/52569)
* total weight does not update when updating items ([46b5884](46b5884420))
* wrong display_depends_on condition for item group and brand child tables ([6ae1b18](6ae1b18616))

### Features

* Negative Batch report ([8649543](8649543ae0))
* show formatted currency symbol on ledger preview ([b844afe](b844afe0ec))
2026-02-17 14:10:20 +00:00
ruthra kumar
7a46fad6e7 Merge pull request #52731 from frappe/version-16-hotfix
chore: release v16
2026-02-17 19:38:48 +05:30
rohitwaghchaure
2ccb8c839d Merge pull request #52740 from frappe/mergify/bp/version-16-hotfix/pr-52729
feat: Negative Batch report (backport #52729)
2026-02-17 17:23:50 +05:30
Rohit Waghchaure
8649543ae0 feat: Negative Batch report
(cherry picked from commit 34edbed00b)
2026-02-17 11:04:33 +00:00
Mihir Kandoi
bed2c83272 Merge pull request #52736 from frappe/mergify/bp/version-16-hotfix/pr-52733
fix: allow sequence ID edit in BOM if routing is not set (backport #52733)
2026-02-17 16:28:39 +05:30
Mihir Kandoi
5461945d00 Merge pull request #52738 from frappe/mergify/bp/version-16-hotfix/pr-52677
fix: standalone credit/debit notes should not fetch any serial or bat… (backport #52677)
2026-02-17 16:25:36 +05:30
Mihir Kandoi
dd4e1867f5 fix: standalone credit/debit notes should not fetch any serial or batch by default
(cherry picked from commit 2017edca88)
2026-02-17 10:40:32 +00:00
Mihir Kandoi
6f812ccaf5 fix: allow sequence id edit in BOM if routing is not set
(cherry picked from commit 08529964b4)
2026-02-17 10:36:17 +00:00
ruthra kumar
6c4bba3992 Merge pull request #52727 from frappe/mergify/bp/version-16-hotfix/pr-52679
fix: log changes made to accounts settings (backport #52679)
2026-02-17 14:15:25 +05:30
ruthra kumar
eda479a917 Merge pull request #52725 from frappe/mergify/bp/version-16-hotfix/pr-52648
fix: correct typos in marketing campaign custom fields function (backport #52648)
2026-02-17 13:59:19 +05:30
AarDG10
2200b9aa67 fix: log changes made to accounts settings
(cherry picked from commit 45febbabd7)
2026-02-17 08:25:47 +00:00
Mihir Kandoi
af15050acc Merge pull request #52723 from frappe/mergify/bp/version-16-hotfix/pr-52720
fix: wrong display_depends_on condition for item group and brand chil… (backport #52720)
2026-02-17 13:43:00 +05:30
Abdeali Chharchhoda
531bdbc727 fix: correct typos in marketing campaign custom fields function
(cherry picked from commit 6b7fed7f59)
2026-02-17 08:12:00 +00:00
ruthra kumar
53e400cca1 fix: ensure layout has Bootstrap row and column (backport #52649) (#52719)
Merge pull request #52649 from aerele/fix-sales-funnel-layout

fix: ensure layout has Bootstrap row and column
(cherry picked from commit ae0be7f6ce)

Co-authored-by: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com>
2026-02-17 13:04:21 +05:30
Shllokkk
6ae1b18616 fix: wrong display_depends_on condition for item group and brand child tables
(cherry picked from commit de2843d9f1)
2026-02-17 07:30:21 +00:00
Mihir Kandoi
a8f21dbc07 Merge pull request #52718 from frappe/mergify/bp/version-16-hotfix/pr-52716
fix: do not allow plant floor company and warehouse to be updated (backport #52716)
2026-02-17 12:32:45 +05:30
Vishnu Priya Baskaran
1dd471fb18 Merge pull request #52649 from aerele/fix-sales-funnel-layout
fix: ensure layout has Bootstrap row and column
(cherry picked from commit ae0be7f6ce)
2026-02-17 06:55:51 +00:00
Mihir Kandoi
a039c176c8 fix: do not allow plant floor company and warehouse to be updated
(cherry picked from commit fd72132743)
2026-02-17 06:42:33 +00:00
Mihir Kandoi
cf141045ba Merge pull request #52715 from frappe/mergify/bp/version-16-hotfix/pr-52713
fix: production plan status (backport #52713)
2026-02-17 11:41:43 +05:30
Mihir Kandoi
62ea18f1cc fix: production plan status
(cherry picked from commit b3e6b304e4)
2026-02-17 05:54:10 +00:00
Mihir Kandoi
302ae382f1 Merge pull request #52697 from frappe/mergify/bp/version-16-hotfix/pr-52678
chore: do not show stock details if update stock is disabled (backport #52678)
2026-02-17 10:55:49 +05:30
Mihir Kandoi
98ff54a871 chore: resolve conflicts 2026-02-17 10:40:34 +05:30
rohitwaghchaure
41b089ab51 Merge pull request #52705 from frappe/mergify/bp/version-16-hotfix/pr-52620
fix: prevent rows from being added to sub_assembly_items and mr_items (backport #52620)
2026-02-17 10:16:09 +05:30
Diptanil Saha
46acd328a9 Merge pull request #52707 from frappe/mergify/bp/version-16-hotfix/pr-52706
fix(selling-workspace-sidebar): changed order of pos profile (backport #52706)
2026-02-17 00:55:44 +05:30
diptanilsaha
1820c35880 fix(selling-workspace-sidebar): changed order of pos profile
(cherry picked from commit 72f4fd08ee)
2026-02-16 19:11:27 +00:00
Shllokkk
80c98cdcf4 fix: prevent rows from being added to sub_assembly_items and mr_items
(cherry picked from commit 25f979a825)
2026-02-16 18:43:01 +00:00
Mihir Kandoi
4a8363e7da Merge pull request #52703 from frappe/mergify/bp/version-16-hotfix/pr-52626
fix(manufacturing): add sales order fields in subassembly child table (backport #52626)
2026-02-16 23:58:13 +05:30
rohitwaghchaure
dcbc1e1303 Merge pull request #52701 from frappe/mergify/bp/version-16-hotfix/pr-52699
fix: consider sle for negative stock validation (backport #52699)
2026-02-16 23:56:30 +05:30
Sudharsanan11
ecfd193002 test(manufacturing): add test to validate the sales order references for sub assembly items
(cherry picked from commit 341dc4be7a)
2026-02-16 18:11:53 +00:00
Sudharsanan11
f4b0e646b4 fix(manufacturing): set sales order references in subassembly child table
(cherry picked from commit 0f2ed28ab7)
2026-02-16 18:11:52 +00:00
Sudharsanan11
605c0db976 fix(manufacturing): add sales order fields in subassembly child table
(cherry picked from commit c2282eaf08)
2026-02-16 18:11:52 +00:00
Rohit Waghchaure
ca8f324b51 fix: consider sle for negative stock validation
(cherry picked from commit 38f35acffe)
2026-02-16 17:56:51 +00:00
Mihir Kandoi
7677b2f573 chore: do not show serial batch selector if not needed
(cherry picked from commit cdc62e7327)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
2026-02-16 17:01:48 +00:00
Mihir Kandoi
f08964683a chore: do not show stock details if update stock is disabled
(cherry picked from commit 4499e974a0)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
2026-02-16 17:01:48 +00:00
rohitwaghchaure
d2eabcbf74 Merge pull request #52696 from frappe/mergify/bp/version-16-hotfix/pr-52691
fix: cancel SABB if SLE cancelled from LCV (backport #52691)
2026-02-16 21:52:33 +05:30
Diptanil Saha
7d8bbac5fd Merge pull request #52694 from frappe/mergify/bp/version-16-hotfix/pr-52689
fix(pos_invoice): add correct depends on condition (backport #52689)
2026-02-16 21:23:24 +05:30
Rohit Waghchaure
ac90975f43 fix: cancel SABB if SLE cancelled from LCV
(cherry picked from commit f23a49a25e)
2026-02-16 15:42:23 +00:00
Soham Kulkarni
28592d0180 fix(pos_invoice): add correct depends on condition (#52689)
* fix(pos_invoice): add correct depends on condition

* fix: show field in sales order

* refactor: eval condition

(cherry picked from commit 219cf6bc57)
2026-02-16 15:37:25 +00:00
rohitwaghchaure
de5e8a6e6b Merge pull request #52684 from frappe/mergify/bp/version-16-hotfix/pr-52681
fix: better validation for negative batch (backport #52681)
2026-02-16 16:02:55 +05:30
Rohit Waghchaure
e46e8741b4 fix: better validation for negative batch
(cherry picked from commit a8636e4f59)
2026-02-16 09:47:05 +00:00
MochaMind
4a4e9956e2 chore: update POT file (#52674) 2026-02-15 14:00:35 +01:00
Mihir Kandoi
8ec83f2080 Merge pull request #52672 from frappe/mergify/bp/version-16-hotfix/pr-52670 2026-02-15 14:30:52 +05:30
Mihir Kandoi
46b5884420 fix: total weight does not update when updating items
(cherry picked from commit 63323a2611)
2026-02-15 08:45:19 +00:00
Mihir Kandoi
3548073a07 Merge pull request #52669 from frappe/mergify/bp/version-16-hotfix/pr-52658
fix: allow non-stock items while updating items (backport #52658)
2026-02-15 13:07:37 +05:30
ervishnucs
e2183ebde9 fix: allow non-stock items while updating items
(cherry picked from commit 07db5941aa)
2026-02-15 07:28:48 +00:00
Mihir Kandoi
37f740caa6 Merge pull request #52668 from frappe/revert-52578-mergify/bp/version-16-hotfix/pr-51594
Revert "fix: Workspace sidebar links for Debit/Credit Notes (backport #51594)"
2026-02-15 12:44:37 +05:30
Mihir Kandoi
485c1b025a Revert "fix: Workspace sidebar links for Debit/Credit Notes (backport #51594)" 2026-02-15 12:29:28 +05:30
ruthra kumar
880cc50ae4 Merge pull request #52659 from frappe/mergify/bp/version-16-hotfix/pr-52643
fix: consider table multiselect in delete transaction (backport #52643)
2026-02-13 15:12:54 +05:30
SowmyaArunachalam
3c33a19634 fix: removed lost reason detail
(cherry picked from commit 9bb60405e7)

# Conflicts:
#	erpnext/patches.txt
2026-02-13 14:11:58 +05:30
SowmyaArunachalam
38679d6d14 fix: consider table multiselect in delete transaction
(cherry picked from commit be3d2422a7)
2026-02-13 08:37:46 +00:00
ruthra kumar
3744c32950 Merge pull request #52646 from frappe/mergify/bp/version-16-hotfix/pr-52644
refactor: use query builder for profitability analysis (backport #52644)
2026-02-12 14:40:46 +05:30
ruthra kumar
543e0131b5 refactor: use query builder for profitability analysis
(cherry picked from commit 5e34325604)
2026-02-12 08:55:03 +00:00
ruthra kumar
eb5ffcdc88 Merge pull request #52642 from frappe/mergify/bp/version-16-hotfix/pr-52640
refactor: use query builder for sales person commission summary (backport #52640)
2026-02-12 12:53:24 +05:30
ruthra kumar
f98e53692e refactor: use query builder for sales person commission summary
(cherry picked from commit 7105e3fb69)
2026-02-12 07:07:42 +00:00
ruthra kumar
e778eabcb0 Merge pull request #52639 from frappe/mergify/bp/version-16-hotfix/pr-52571
fix(stock): remove hardcoded letter_head from report (backport #52571)
2026-02-12 12:04:57 +05:30
Roxxane
1d444e53eb fix(stock): remove hardcoded letter_head from report
The 'Incorrect Serial and Batch Bundle' report had a hardcoded
letter_head value of 'Test', preventing users from deleting a
Letter Head named 'Test' due to link check.

Standard reports should not reference specific Letter Head names.

Fixes #52569

(cherry picked from commit 99cd29d88f)
2026-02-12 06:19:37 +00:00
ruthra kumar
3bf9aff67e Merge pull request #52638 from frappe/mergify/bp/version-16-hotfix/pr-52619
feat: show formatted currency symbol on ledger preview (backport #52619)
2026-02-12 11:48:49 +05:30
Navin-S-R
b844afe0ec feat: show formatted currency symbol on ledger preview
(cherry picked from commit 5c8cb1e7ec)
2026-02-12 05:59:06 +00:00
Frappe PR Bot
6e7e219f71 chore(release): Bumped to Version 16.5.0
# [16.5.0](https://github.com/frappe/erpnext/compare/v16.4.1...v16.5.0) (2026-02-11)

### Bug Fixes

* Added a missing option to the currency field (backport [#52528](https://github.com/frappe/erpnext/issues/52528)) ([#52587](https://github.com/frappe/erpnext/issues/52587)) ([1c3fe00](1c3fe000ba))
* Added validation for quality inspection in job card ([a1ec68c](a1ec68cd1e))
* apply composite asset logic only in draft ([d2387a3](d2387a3af8))
* **balance sheet:** removed the extra labels from the chart ([6a9a28b](6a9a28b4ae))
* **buying:** add supplier group link filters in field level ([9886b46](9886b46cb4))
* correctly calculate running balances for financial report ([7df18af](7df18af799))
* do not show update stock flag unneccessarily ([c0c6cc5](c0c6cc58ed))
* email campaign timeout issue (backport [#51994](https://github.com/frappe/erpnext/issues/51994)) ([#52556](https://github.com/frappe/erpnext/issues/52556)) ([e753df8](e753df8ff0))
* enabling skip delivery option for order type maintenance ([7a78e97](7a78e9705c))
* **gross profit report:** translate column Sales Invoice ([6ff8820](6ff8820732))
* **gross-profit:** handle item group filters ([0d02bbb](0d02bbb01a))
* **gross-profit:** handle returns outside sale period ([9b32c84](9b32c84462))
* handle gross profit and percentage for return invoices ([d081a26](d081a26608))
* item code is tuple with operation id ([9d14c0b](9d14c0b60e))
* **manufacturing:** fix chart period keys ([b99ca48](b99ca486d7))
* **manufacturing:** handle None value for actual_end_date ([b1b75ec](b1b75eca3d))
* **map_current_doc:** prevent mutation of query args in get_query (backport [#52202](https://github.com/frappe/erpnext/issues/52202)) ([#52584](https://github.com/frappe/erpnext/issues/52584)) ([b8256e5](b8256e5f31))
* move company field to first position in sales invoice, purchase invoice, sales order, purchase order and journal entry ([e53ccd0](e53ccd0745))
* not able to complete job card ([c5ff534](c5ff534d58))
* operation status and bom validation ([1122265](11222653ce))
* Period Closing Voucher doesn't exist for GL Entry ([921584c](921584c769))
* process loss error incorrectly thrown even when semi FG BOM does not have any process loss ([4a7ffce](4a7ffce320))
* **quotation:** ignore zero ordered_qty ([cf7c127](cf7c127dc6))
* rate comparison in stock reco ([1f78f45](1f78f45aee))
* remove customer_pos_id reference ([#52396](https://github.com/frappe/erpnext/issues/52396)) ([ab59f73](ab59f73064))
* remove incorrect validation from email digest throwing spurious error (backport [#51827](https://github.com/frappe/erpnext/issues/51827)) ([#52579](https://github.com/frappe/erpnext/issues/52579)) ([dffb6ac](dffb6ac4cf))
* return None instead of 0 if valuation rate is falsy ([64a7956](64a7956a4a))
* stock balance report issue ([62616ad](62616ad9e1))
* stock reservation created against job card ([305483e](305483e074))
* **stock:** add is group filter for warehouse fields ([23a26b5](23a26b540b))
* **stock:** ignore pos reserved batches for stock levels ([e2c1204](e2c12043ae))
* **stock:** inward stock for pick list test record ([801a26a](801a26ae67))
* **stock:** set source warehouse for issue type ([53e512c](53e512ceaf))
* **stock:** update target field attribute ([96dfecf](96dfecf0d5))
* test cases ([ece8d00](ece8d00415))
* validate asset movement transaction date ([#52340](https://github.com/frappe/erpnext/issues/52340)) ([898d2e3](898d2e3c9a))
* Workspace sidebar links for Debit/Credit Notes ([29d33b3](29d33b3139))

### Features

* **accounts:** expand Journal Entry Template to support dimensions and party ([#51621](https://github.com/frappe/erpnext/issues/51621)) ([d06a46a](d06a46ae85))
* allow negative stock for the batch item ([b6afe7f](b6afe7f4da))

### Reverts

* "fix: allow sales invoice to be renamed" ([abef910](abef9109b0))
2026-02-11 06:03:37 +00:00
ruthra kumar
ce225d87f3 Merge pull request #52597 from frappe/version-16-hotfix
chore: release v16
2026-02-11 11:32:00 +05:30
ruthra kumar
0d831aad41 Merge pull request #52605 from frappe/mergify/bp/version-16-hotfix/pr-52593
refactor: update labels for tax withholding reports columns to improve clarity (backport #52593)
2026-02-10 18:30:52 +05:30
ruthra kumar
00caebe90c Merge pull request #52397 from frappe/mergify/bp/version-16-hotfix/pr-52396
fix: remove customer_pos_id reference (backport #52396)
2026-02-10 18:28:49 +05:30
ruthra kumar
0ee97ffbbf Merge pull request #52414 from frappe/mergify/bp/version-16-hotfix/pr-51745
fix(gross profit report): translate column Sales Invoice (backport #51745)
2026-02-10 18:27:54 +05:30
ruthra kumar
4a6c428848 Merge pull request #52604 from frappe/mergify/bp/version-16-hotfix/pr-52017
fix(gross-profit): handle returns outside the given sale period (backport #52017)
2026-02-10 18:27:38 +05:30
Kavin
3e3daa50b1 Merge pull request #52542 from frappe/mergify/bp/version-16-hotfix/pr-52516
fix(stock): ignore pos reserved batches for stock levels (backport #52516)
2026-02-10 18:21:37 +05:30
ljain112
ac7a25fff9 refactor: update labels for tax withholding reports columns to improve clarity
(cherry picked from commit 2cfdcc1af4)
2026-02-10 12:43:06 +00:00
Navin-S-R
0d02bbb01a fix(gross-profit): handle item group filters
(cherry picked from commit 047b278791)
2026-02-10 12:41:30 +00:00
Navin-S-R
d01ea27f2f test: fix test assertions to use index-based totals
(cherry picked from commit fdfa7bc963)
2026-02-10 12:41:29 +00:00
Navin-S-R
345d25bdf1 test: validate sales person wise gross profit
(cherry picked from commit 3ab978ab46)
2026-02-10 12:41:29 +00:00
Navin-S-R
e8eaae4120 test: validate return invoice profit and profit percentage
(cherry picked from commit 4da3d43013)
2026-02-10 12:41:29 +00:00
Navin-S-R
d081a26608 fix: handle gross profit and percentage for return invoices
(cherry picked from commit 51709f032f)
2026-02-10 12:41:29 +00:00
Navin-S-R
9b32c84462 fix(gross-profit): handle returns outside sale period
(cherry picked from commit 67d8223f73)
2026-02-10 12:41:28 +00:00
Diptanil Saha
22c9b26a24 Merge pull request #52450 from frappe/mergify/bp/version-16-hotfix/pr-52360
fix: correctly calculate running balances for financial report (backport #52360)
2026-02-10 02:37:22 +05:30
mergify[bot]
1c3fe000ba fix: Added a missing option to the currency field (backport #52528) (#52587)
fix: Added a missing option to the currency field (#52528)

(cherry picked from commit da07f84e44)

Co-authored-by: El-Shafei H. <el.shafei.developer@gmail.com>
2026-02-09 21:01:04 +00:00
mergify[bot]
ffd9b248f6 refactor: drop usages of db_query (backport #52559) (#52565)
refactor: drop usages of db_query


(cherry picked from commit 1e45195ef9)

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Co-authored-by: Akhil Narang <me@akhilnarang.dev>
2026-02-10 01:47:17 +05:30
mergify[bot]
b8256e5f31 fix(map_current_doc): prevent mutation of query args in get_query (backport #52202) (#52584)
fix(map_current_doc): prevent mutation of query args in get_query (#52202)

(cherry picked from commit 23a73c9cdb)

Co-authored-by: V Shankar <shankarv292002@gmail.com>
2026-02-10 01:26:00 +05:30
Trusted Computer
dffb6ac4cf fix: remove incorrect validation from email digest throwing spurious error (backport #51827) (#52579) 2026-02-09 18:26:57 +00:00
mergify[bot]
e753df8ff0 fix: email campaign timeout issue (backport #51994) (#52556)
fix: email campaign timeout issue (#51994)

* fix: email campaign timeout issue

* refactor: email campaign backend logic

* refactor: use sendmail instead of manually batching

(cherry picked from commit 22123dd955)

Co-authored-by: Pratik Badhe <badhepd@gmail.com>
2026-02-09 23:45:02 +05:30
Mihir Kandoi
560fd2e0d1 Merge pull request #52581 from frappe/mergify/bp/version-16-hotfix/pr-52527
fix(stock): correct warehouse mapping for material issue (backport #52527)
2026-02-09 21:22:27 +05:30
Mihir Kandoi
327719a0fd Merge pull request #52578 from frappe/mergify/bp/version-16-hotfix/pr-51594
fix: Workspace sidebar links for Debit/Credit Notes (backport #51594)
2026-02-09 21:19:00 +05:30
Pandiyan37
801a26ae67 fix(stock): inward stock for pick list test record
(cherry picked from commit f22b9e297b)
2026-02-09 15:36:44 +00:00
Pandiyan37
8c4a9040b7 test(stock): add test to check from warehouse for issue type
(cherry picked from commit da0322e994)
2026-02-09 15:36:44 +00:00
Pandiyan37
53e512ceaf fix(stock): set source warehouse for issue type
(cherry picked from commit a34e8c99cd)
2026-02-09 15:36:43 +00:00
Mihir Kandoi
e9212c6a32 chore: resolve conflicts 2026-02-09 21:03:37 +05:30
Nabin Hait
29d33b3139 fix: Workspace sidebar links for Debit/Credit Notes
(cherry picked from commit 8acf373e68)

# Conflicts:
#	erpnext/workspace_sidebar/invoicing.json
2026-02-09 15:32:25 +00:00
rohitwaghchaure
7e0dc2ff86 Merge pull request #52561 from frappe/mergify/bp/version-16-hotfix/pr-52340
fix: validate asset movement transaction date (backport #52340)
2026-02-09 19:52:15 +05:30
Poojashree T R
898d2e3c9a fix: validate asset movement transaction date (#52340)
* fix: validate asset transaction date

* fix: validate asset transaction date

* fix: add translation in validate_transaction_date

* test: test_movement_transaction_date

* fix: to ensure test reliability

(cherry picked from commit e98b68c38f)
2026-02-09 11:52:19 +00:00
rohitwaghchaure
4c562b2903 Merge pull request #52558 from frappe/mergify/bp/version-16-hotfix/pr-52550
feat: allow negative stock for the batch item (backport #52550)
2026-02-09 16:40:12 +05:30
Mihir Kandoi
04d6273713 Merge pull request #52554 from frappe/mergify/bp/version-16-hotfix/pr-52501
fix(quotation): ignore zero ordered_qty (backport #52501)
2026-02-09 16:25:45 +05:30
Rohit Waghchaure
b6afe7f4da feat: allow negative stock for the batch item
(cherry picked from commit 376ab0e346)
2026-02-09 10:50:46 +00:00
ravibharathi656
cf7c127dc6 fix(quotation): ignore zero ordered_qty
(cherry picked from commit 32ea37035e)
2026-02-09 10:39:04 +00:00
Sudharsanan11
59f6012c57 test(stock): add test to ignore pos reserved batches for stock levels
(cherry picked from commit 47ac67f7a2)
2026-02-09 06:28:58 +00:00
Sudharsanan11
e2c12043ae fix(stock): ignore pos reserved batches for stock levels
(cherry picked from commit 277ba9cb79)
2026-02-09 06:28:58 +00:00
Mihir Kandoi
3e0a7f2400 Merge pull request #52539 from frappe/mergify/bp/version-16-hotfix/pr-52538
revert: "fix: allow sales invoice to be renamed" (backport #52538)
2026-02-09 10:47:42 +05:30
Mihir Kandoi
abef9109b0 revert: "fix: allow sales invoice to be renamed"
This reverts commit 95fdbe55f9.

(cherry picked from commit 2660907ac8)
2026-02-09 05:00:36 +00:00
MochaMind
9766361c07 chore: update POT file (#52530) 2026-02-08 17:49:45 +01:00
Mihir Kandoi
6bcd311214 Merge pull request #52524 from frappe/mergify/bp/version-16-hotfix/pr-52497
fix: add is_group filter for supplier_group and warehouse fields (backport #52497)
2026-02-07 21:58:58 +05:30
Mihir Kandoi
dd45bb5664 chore: resolve conflicts 2026-02-07 21:44:42 +05:30
Sudharsanan11
23a26b540b fix(stock): add is group filter for warehouse fields
(cherry picked from commit a9829f5f7b)
2026-02-07 16:11:32 +00:00
Sudharsanan11
9886b46cb4 fix(buying): add supplier group link filters in field level
(cherry picked from commit cfdc554a19)

# Conflicts:
#	erpnext/buying/doctype/supplier/supplier.json
2026-02-07 16:11:32 +00:00
Mihir Kandoi
32d5cedafc Merge pull request #52486 from frappe/mergify/bp/version-16-hotfix/pr-52000
fix: Added validation for quality inspection in job card (backport #52000)
2026-02-06 14:49:10 +05:30
Nishka Gosalia
ece8d00415 fix: test cases 2026-02-06 14:34:08 +05:30
Khushi Rawat
c171b9a184 Merge pull request #52492 from frappe/mergify/bp/version-16-hotfix/pr-52491
fix: apply composite asset logic only in draft (backport #52491)
2026-02-06 13:10:24 +05:30
khushi8112
d2387a3af8 fix: apply composite asset logic only in draft
(cherry picked from commit ee501e884a)
2026-02-06 07:36:31 +00:00
rohitwaghchaure
79e0e07446 Merge pull request #52482 from frappe/mergify/bp/version-16-hotfix/pr-52476
fix: stock reservation created against job card (backport #52476)
2026-02-06 12:52:43 +05:30
Mihir Kandoi
4caca08b90 Merge pull request #52488 from frappe/mergify/bp/version-16-hotfix/pr-52219
fix: enabling skip delivery option for order type maintenance (backport #52219)
2026-02-06 12:44:47 +05:30
Mihir Kandoi
738cb6847e Merge pull request #52484 from frappe/mergify/bp/version-16-hotfix/pr-52475
fix: do not show update stock flag unneccessarily (backport #52475)
2026-02-06 12:28:36 +05:30
Nishka Gosalia
7a78e9705c fix: enabling skip delivery option for order type maintenance
(cherry picked from commit 1a22e3cb61)
2026-02-06 06:40:03 +00:00
Nishka Gosalia
a1ec68cd1e fix: Added validation for quality inspection in job card
(cherry picked from commit 46b4cf3add)
2026-02-06 06:38:32 +00:00
Mihir Kandoi
4847a76cb8 chore: resolve conflicts 2026-02-06 12:00:47 +05:30
Mihir Kandoi
f56c6f93a1 chore: resolve conflicts 2026-02-06 12:00:23 +05:30
Mihir Kandoi
c0c6cc58ed fix: do not show update stock flag unneccessarily
(cherry picked from commit 5fb5b7b30e)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json
2026-02-06 06:27:46 +00:00
rohitwaghchaure
8c372faf50 chore: fix linter issue
Removed duplicate import of get_bom_items_as_dict from BOM module.
2026-02-06 11:29:45 +05:30
Diptanil Saha
ae4cf27f4f Merge pull request #52471 from frappe/mergify/bp/version-16-hotfix/pr-51621
feat(accounts): expand Journal Entry Template to support dimensions and party (backport #51621)
2026-02-06 11:07:27 +05:30
Rohit Waghchaure
305483e074 fix: stock reservation created against job card
(cherry picked from commit dca2cfd009)
2026-02-05 23:05:19 +00:00
rohitwaghchaure
86dd2e786c Merge pull request #52474 from frappe/mergify/bp/version-16-hotfix/pr-52467
fix: operation status and bom validation (backport #52467)
2026-02-05 21:06:23 +05:30
Rohit Waghchaure
11222653ce fix: operation status and bom validation
(cherry picked from commit 95baf953a8)
2026-02-05 14:16:38 +00:00
Nikhil Kothari
d06a46ae85 feat(accounts): expand Journal Entry Template to support dimensions and party (#51621)
* feat(accounts): expand Journal Entry Template to support dimensions and party

* fix: do not update standard row values

(cherry picked from commit ef44528ba5)
2026-02-05 12:55:13 +00:00
rohitwaghchaure
8c536df5f2 Merge pull request #52428 from frappe/mergify/bp/version-16-hotfix/pr-52422
fix: not able to complete job card (backport #52422)
2026-02-05 17:05:16 +05:30
Frappe PR Bot
d74a649016 chore(release): Bumped to Version 16.4.1
## [16.4.1](https://github.com/frappe/erpnext/compare/v16.4.0...v16.4.1) (2026-02-05)

### Bug Fixes

* stock balance report issue ([e009319](e0093199b1))
2026-02-05 10:52:48 +00:00
rohitwaghchaure
bc9928b32b Merge pull request #52464 from frappe/mergify/bp/version-16/pr-52461
fix: stock balance report issue (backport #52459) (backport #52461)
2026-02-05 16:20:53 +05:30
rohitwaghchaure
4305415ed9 chore: fix issue
(cherry picked from commit 1d24abf5dd)
2026-02-05 10:20:46 +00:00
Rohit Waghchaure
e0093199b1 fix: stock balance report issue
(cherry picked from commit 7e584dd84a)
(cherry picked from commit 62616ad9e1)
2026-02-05 10:20:45 +00:00
rohitwaghchaure
4dec567421 Merge pull request #52461 from frappe/mergify/bp/version-16-hotfix/pr-52459
fix: stock balance report issue (backport #52459)
2026-02-05 15:49:58 +05:30
rohitwaghchaure
1d24abf5dd chore: fix issue 2026-02-05 15:02:47 +05:30
Rohit Waghchaure
62616ad9e1 fix: stock balance report issue
(cherry picked from commit 7e584dd84a)
2026-02-05 09:20:01 +00:00
Jatin3128
6bffdbce56 Merge pull request #52455 from frappe/mergify/bp/version-16-hotfix/pr-52438
fix(balance sheet): removed the extra labels from the chart (backport #52438)
2026-02-05 13:39:41 +05:30
Jatin3128
6a9a28b4ae fix(balance sheet): removed the extra labels from the chart
(cherry picked from commit a64b5f2c5d)
2026-02-05 07:54:14 +00:00
Mihir Kandoi
66d0ab6380 Merge pull request #52454 from frappe/mergify/bp/version-16-hotfix/pr-52452
fix: process loss error incorrectly thrown even when semi FG BOM does… (backport #52452)
2026-02-05 13:15:53 +05:30
ruthra kumar
5913d5f14e Merge pull request #52351 from frappe/mergify/bp/version-16-hotfix/pr-52346
fix: move company field to first position in sales invoice, purchase … (backport #52346)
2026-02-05 13:11:28 +05:30
Mihir Kandoi
4a7ffce320 fix: process loss error incorrectly thrown even when semi FG BOM does not have any process loss
(cherry picked from commit 99ddc36c26)
2026-02-05 07:27:41 +00:00
Smit Vora
2994ba1b41 test: further tests for query builder
(cherry picked from commit 12f8bb2937)
2026-02-05 06:53:30 +00:00
Smit Vora
55eb631116 test: correct error message
(cherry picked from commit a29710dc07)
2026-02-05 06:53:30 +00:00
Smit Vora
77693b12a4 test: revert original pcv setting
(cherry picked from commit f45a5a63a7)
2026-02-05 06:53:29 +00:00
Smit Vora
8caf609f8d test: add tests for query builder
(cherry picked from commit 61d8308e81)
2026-02-05 06:53:29 +00:00
Smit Vora
921584c769 fix: Period Closing Voucher doesn't exist for GL Entry
(cherry picked from commit b41c1858a3)
2026-02-05 06:53:29 +00:00
Smit Vora
7df18af799 fix: correctly calculate running balances for financial report
(cherry picked from commit ee2f8d8ebc)
2026-02-05 06:53:29 +00:00
Mihir Kandoi
64d82a811f Merge pull request #52446 from frappe/mergify/bp/version-16-hotfix/pr-52445
fix: item code is tuple with operation id (backport #52445)
2026-02-05 12:12:35 +05:30
Mihir Kandoi
9d14c0b60e fix: item code is tuple with operation id
(cherry picked from commit 481deee4b2)
2026-02-05 06:29:11 +00:00
ruthra kumar
0a285523a8 Merge pull request #52426 from frappe/mergify/bp/version-16-hotfix/pr-51990
refactor: use https over http while saving website link (backport #51990)
2026-02-05 11:30:16 +05:30
ruthra kumar
ce695ebdd0 refactor: patch partner_website for old data
(cherry picked from commit 8db29b0a81)

# Conflicts:
#	erpnext/patches.txt
2026-02-05 11:00:58 +05:30
Mihir Kandoi
9f31910226 Merge pull request #52441 from frappe/mergify/bp/version-16-hotfix/pr-52416
fix(stock): update target field attribute (backport #52416)
2026-02-05 10:40:29 +05:30
Pandiyan37
f8405e4ca4 test(stock): testcase for different inventory dimension
(cherry picked from commit 21d0ee8db1)
2026-02-05 04:54:39 +00:00
Pandiyan37
96dfecf0d5 fix(stock): update target field attribute
(cherry picked from commit 7e08154217)
2026-02-05 04:54:38 +00:00
Mihir Kandoi
b5b8032ce0 Merge pull request #52430 from frappe/mergify/bp/version-16-hotfix/pr-52427 2026-02-04 20:17:43 +05:30
archielister
5298e26a11 fix for obtaining bom_no
(cherry picked from commit e4df0a393a)
2026-02-04 14:33:24 +00:00
Rohit Waghchaure
c5ff534d58 fix: not able to complete job card
(cherry picked from commit 175fe9279c)
2026-02-04 13:13:27 +00:00
Mihir Kandoi
1dc44691db Merge pull request #52421 from frappe/mergify/bp/version-16-hotfix/pr-51773
fix(manufacturing): refactor production analytics report (backport #51773)
2026-02-04 18:06:40 +05:30
ruthra kumar
91043de352 refactor: scrub http and use https in sales partner
(cherry picked from commit 8cf31548f2)
2026-02-04 12:32:42 +00:00
Sudharsanan11
b99ca486d7 fix(manufacturing): fix chart period keys
(cherry picked from commit 27091e5168)
2026-02-04 17:51:53 +05:30
Sudharsanan11
b1b75eca3d fix(manufacturing): handle None value for actual_end_date
(cherry picked from commit 16f09141da)
2026-02-04 17:51:53 +05:30
Mihir Kandoi
33305550b7 Merge pull request #52408 from frappe/mergify/bp/version-16-hotfix/pr-52383
fix: rate comparison in stock reco (backport #52383)
2026-02-04 17:42:06 +05:30
Mihir Kandoi
e86ab97b7e chore: add line in the end so linter check passes 2026-02-04 17:26:01 +05:30
elshafei-developer
6ff8820732 fix(gross profit report): translate column Sales Invoice
(cherry picked from commit 3e39d13172)
2026-02-04 09:18:31 +00:00
Mihir Kandoi
64a7956a4a fix: return None instead of 0 if valuation rate is falsy
(cherry picked from commit e8d1e9d946)
2026-02-04 06:48:33 +00:00
Mihir Kandoi
1f78f45aee fix: rate comparison in stock reco
(cherry picked from commit f1b4fe12a2)
2026-02-04 06:48:32 +00:00
Diptanil Saha
ab59f73064 fix: remove customer_pos_id reference (#52396)
(cherry picked from commit 036f64013d)
2026-02-04 05:18:56 +00:00
Frappe PR Bot
0312d58dca chore(release): Bumped to Version 16.4.0
# [16.4.0](https://github.com/frappe/erpnext/compare/v16.3.0...v16.4.0) (2026-02-04)

### Bug Fixes

* add precision to rejected batch no qty calculation ([b365444](b365444027))
* allow sales invoice to be renamed ([f7b915d](f7b915dfe6))
* **barcode:** failing request when item has both batch and serial ([e4cdd97](e4cdd971c8))
* batch selector not working if Use Legacy (Client side) Reactivity disabled ([2a3642b](2a3642b55a))
* better fix for aac39b2671 ([b8ab55f](b8ab55fee8))
* correct exchange gain loss in ppr ([e09406d](e09406d085))
* correct Sales Tax Template sidebar link to proper DocType ([4c14e74](4c14e74a12))
* correct spelling of Payment Reconciliation in Accounting ([c80b554](c80b554cd7))
* **credit-note:** set incoming rate as zero for expired batch ([0f9bf08](0f9bf08685))
* **demo:** removed toolbar eventlistener (backport [#52171](https://github.com/frappe/erpnext/issues/52171)) ([#52172](https://github.com/frappe/erpnext/issues/52172)) ([6608601](66086010fc))
* duplicate account number (Indonesia COA) (backport [#52080](https://github.com/frappe/erpnext/issues/52080)) ([#52317](https://github.com/frappe/erpnext/issues/52317)) ([81e6575](81e65757ee))
* failing test cases ([136b2cf](136b2cfba5))
* group item wise tax details by tax row ([45e4c04](45e4c04830))
* hide close button on WO if WO is completed ([0d1c30f](0d1c30f3f0))
* hide item_wise_tax_details table from print ([c619be9](c619be989b))
* include credit notes in project gross margin calculation ([e755a4a](e755a4ad98))
* item code not showing in report view ([af167f9](af167f91fe))
* journal auditing voucher print date to use posting_date ([7e5eab2](7e5eab261c))
* **journal-entry:** normalize exchange rate to float ([3f0032d](3f0032d793))
* js error if user does not have write permission for date field ([3944dfd](3944dfde31))
* lead time calculation for FG item ([5595602](5595602f24))
* make item name editable in RFQ ([dbe5846](dbe5846908))
* merge taxes in purchase receipt when get items from multiple purchase invoices ([#51422](https://github.com/frappe/erpnext/issues/51422)) ([d80c8d1](d80c8d14b0))
* missing depr_series causing error on jv creation (backport [#52085](https://github.com/frappe/erpnext/issues/52085)) ([#52206](https://github.com/frappe/erpnext/issues/52206)) ([78c4f01](78c4f01733))
* negative stock for purchase return ([220a528](220a528d7f))
* populate contact fields when creating quotation from customer ([55129e6](55129e697d))
* production plan not considering planning datetime when creating WO ([7e7b16b](7e7b16b23e))
* **profit and loss statement:** exclude non period columns ([28e8c40](28e8c40bfc))
* reset incoming rate in selling controller if there are changes in item ([024e7b0](024e7b01ac))
* **RFQ:** render email templates for preview and sending ([687a80d](687a80d74c))
* **stock:** add stock recon opening stock condition ([f9a8fc1](f9a8fc1f2d))
* **stock:** fetch batch wise valuation rate in get_items ([b132e3f](b132e3f22a))
* **stock:** ignore packing slip while cancelling the sales invoice ([f425f89](f425f89a26))
* **stock:** include subcontracting order qty while calculating the bin qty ([de244e0](de244e0af7))
* **stock:** remove is_return condition on pos batch qty calculation ([9dcaf38](9dcaf38142))
* **stock:** set incoming_rate with lcv rate for internal purchase ([f462639](f462639aa0))
* **subcontracting:** include item bom in supplied items grouping key ([95c4b8d](95c4b8de06))
* test cases ([e74389f](e74389f01c))
* validate over ordering of quotation ([e7ace8e](e7ace8e620))
* validation when more than one FG items in repack stock entry ([a2d302b](a2d302b3fa))
* zero valuation rate if returning from different warehouse ([8ce51b2](8ce51b2f80))

### Features

* clear demo data from desktop screen (backport [#52128](https://github.com/frappe/erpnext/issues/52128)) ([#52147](https://github.com/frappe/erpnext/issues/52147)) ([05e30dc](05e30dc011))
* **credit-note:** add checkbox to set valuation rate as zero for expired batch ([b84fd46](b84fd46841))
* **delivery-note:** add status indicator when document is partially billed ([6048add](6048add4c0))
* document naming rule will now use posting date of the document ([b03494b](b03494bb67))
* **Transaction Deletion Record:** Editable "DocTypes To Delete" List with CSV import/export ([#50592](https://github.com/frappe/erpnext/issues/50592)) ([4963261](4963261dc8))
2026-02-04 04:29:22 +00:00
ruthra kumar
e8e9fb25fe Merge pull request #52347 from frappe/version-16-hotfix
chore: release v16
2026-02-04 09:57:57 +05:30
rohitwaghchaure
4a7e2742ec Merge pull request #52388 from frappe/mergify/bp/version-16-hotfix/pr-51422
fix: merge taxes in purchase receipt when get items from multiple purchase invoices (backport #51422)
2026-02-03 22:53:40 +05:30
rohitwaghchaure
55d5d6535b Merge pull request #52391 from frappe/mergify/bp/version-16-hotfix/pr-51898
fix: group item wise tax details by tax row (backport #51898)
2026-02-03 22:52:37 +05:30
rohitwaghchaure
b8ac04fb54 Merge branch 'version-16' into version-16-hotfix 2026-02-03 22:50:07 +05:30
ravibharathi656
45e4c04830 fix: group item wise tax details by tax row
(cherry picked from commit 57bd1facf5)
2026-02-03 15:38:48 +00:00
NaviN
d80c8d14b0 fix: merge taxes in purchase receipt when get items from multiple purchase invoices (#51422)
* fix: merge taxes in purchase receipt when get items from multiple purchase invoices

* fix: make merge tax configurable

* chore: follow standard merge taxes method

* chore: follow standard merge taxes method

(cherry picked from commit 6fde0a6261)
2026-02-03 15:34:03 +00:00
mergify[bot]
66e47f5651 Merge pull request #52380 from frappe/mergify/bp/version-16-hotfix/pr-52278 2026-02-03 15:32:58 +00:00
ruthra kumar
a3e8af19a6 Merge pull request #52379 from frappe/mergify/bp/version-16-hotfix/pr-51651
fix: correct exchange gain loss in ppr (backport #51651)
2026-02-03 20:59:41 +05:30
Mihir Kandoi
9b498a8da8 Merge pull request #52385 from frappe/mergify/bp/version-16-hotfix/pr-52259
fix(stock): include subcontracting order qty while calculating the bin qty (backport #52259)
2026-02-03 20:48:37 +05:30
Mihir Kandoi
25389be340 Merge pull request #52382 from frappe/mergify/bp/version-16-hotfix/pr-52374
fix(stock): fetch batch wise valuation rate in get_items (backport #52374)
2026-02-03 20:34:37 +05:30
Sudharsanan11
de244e0af7 fix(stock): include subcontracting order qty while calculating the bin qty
(cherry picked from commit de8f8ef9f4)
2026-02-03 14:55:27 +00:00
kavin-114
b132e3f22a fix(stock): fetch batch wise valuation rate in get_items
(cherry picked from commit c5df570262)
2026-02-03 14:47:52 +00:00
ruthra kumar
670fd79e38 Merge pull request #52377 from frappe/mergify/bp/version-16-hotfix/pr-52314
fix(journal-entry): normalize exchange rate to float (backport #52314)
2026-02-03 20:10:03 +05:30
ravibharathi656
e09406d085 fix: correct exchange gain loss in ppr
(cherry picked from commit 02e96039ac)
2026-02-03 14:35:58 +00:00
rohitwaghchaure
3bc348d6f0 Merge pull request #52376 from frappe/mergify/bp/version-16-hotfix/pr-52375
fix: zero valuation rate if returning from different warehouse (backport #52369) (backport #52375)
2026-02-03 20:04:39 +05:30
Dharanidharan2813
3f0032d793 fix(journal-entry): normalize exchange rate to float
(cherry picked from commit be0040ddc7)
2026-02-03 14:17:24 +00:00
ruthra kumar
163b848455 Merge pull request #52368 from frappe/mergify/bp/version-16-hotfix/pr-52320
fix: correct Sales Tax Template sidebar link to proper DocType (backport #52320)
2026-02-03 19:44:26 +05:30
Rohit Waghchaure
8ce51b2f80 fix: zero valuation rate if returning from different warehouse
(cherry picked from commit 28929df0e8)
(cherry picked from commit eb2119e292)
2026-02-03 13:59:59 +00:00
ruthra kumar
422b37332e Merge pull request #52367 from frappe/mergify/bp/version-16-hotfix/pr-52279
fix(profit and loss statement): exclude non period columns (backport #52279)
2026-02-03 17:47:37 +05:30
Luis Mendoza
4c14e74a12 fix: correct Sales Tax Template sidebar link to proper DocType
(cherry picked from commit 06a7c85c93)
2026-02-03 12:05:37 +00:00
ravibharathi656
28e8c40bfc fix(profit and loss statement): exclude non period columns
(cherry picked from commit 6180e5eb53)
2026-02-03 12:00:00 +00:00
ruthra kumar
660fc8f76a Merge pull request #52365 from frappe/mergify/bp/version-16-hotfix/pr-52160
fix(stock): remove is_return condition on pos batch qty calculation (backport #52160)
2026-02-03 17:19:50 +05:30
ruthra kumar
22456a5857 Merge pull request #52362 from frappe/mergify/bp/version-16-hotfix/pr-51997
Add partially billed status indicator (backport #51997)
2026-02-03 17:19:31 +05:30
kavin-114
76e0eb00a5 test: add unit test case for pos reserved with return qty
(cherry picked from commit 12ec997027)
2026-02-03 11:11:50 +00:00
kavin-114
9dcaf38142 fix(stock): remove is_return condition on pos batch qty calculation
(cherry picked from commit 2c19c1fd06)
2026-02-03 11:11:50 +00:00
Dharanidharan2813
6048add4c0 feat(delivery-note): add status indicator when document is partially billed
(cherry picked from commit 7767000ccf)
2026-02-03 10:59:20 +00:00
rohitwaghchaure
0552b48328 Merge pull request #52356 from frappe/mergify/bp/version-16-hotfix/pr-52338
fix: negative stock for purchase return (backport #52338)
2026-02-03 16:16:28 +05:30
ruthra kumar
193b29d5fc Merge pull request #52350 from frappe/mergify/bp/version-16-hotfix/pr-52339
chore: rename icons (backport #52339)
2026-02-03 16:13:06 +05:30
Rohit Waghchaure
220a528d7f fix: negative stock for purchase return
(cherry picked from commit 77893933a2)
2026-02-03 10:25:10 +00:00
ruthra kumar
e087a8b179 Merge pull request #52353 from frappe/mergify/bp/version-16-hotfix/pr-52345
ci: skip svg (backport #52345)
2026-02-03 15:41:53 +05:30
ruthra kumar
d7067f6b7a ci: skip svg
(cherry picked from commit e565d2283e)
2026-02-03 10:11:12 +00:00
Shllokkk
e53ccd0745 fix: move company field to first position in sales invoice, purchase invoice, sales order, purchase order and journal entry
(cherry picked from commit 8e9365eb3b)
2026-02-03 10:04:56 +00:00
sokumon
e264d8e2d6 chore: rename icons
(cherry picked from commit 2d312bcfe8)
2026-02-03 10:02:54 +00:00
ruthra kumar
8b2559ab0c Merge pull request #52337 from frappe/mergify/bp/version-16-hotfix/pr-52280
fix(stock): ignore packing slip while cancelling the sales invoice (backport #52280)
2026-02-03 13:58:59 +05:30
Sudharsanan11
f425f89a26 fix(stock): ignore packing slip while cancelling the sales invoice
(cherry picked from commit c58887b44a)
2026-02-03 08:25:04 +00:00
ruthra kumar
e3bf84c572 Merge pull request #52321 from frappe/mergify/bp/version-16-hotfix/pr-50592
feat(Transaction Deletion Record): Editable "DocTypes To Delete" List with CSV import/export (backport #50592)
2026-02-03 13:50:00 +05:30
ruthra kumar
e2b88218ec Merge pull request #52330 from frappe/mergify/bp/version-16-hotfix/pr-51655
fix: include credit notes in project gross margin calculation (backport #51655)
2026-02-03 12:19:28 +05:30
ravibharathi656
e755a4ad98 fix: include credit notes in project gross margin calculation
(cherry picked from commit a378fee8e0)
2026-02-03 06:07:49 +00:00
ruthra kumar
d2ea428030 chore: resolve conflict 2026-02-03 10:38:39 +05:30
Mihir Kandoi
496956f08f Merge pull request #52324 from frappe/mergify/bp/version-16-hotfix/pr-52184
fix(subcontracting): include item bom in supplied items grouping key (backport #52184)
2026-02-03 09:24:00 +05:30
Sudharsanan11
a3190dd556 test(subcontracting): add test for consumed_qty calculation with similar finished goods
(cherry picked from commit 4d9412181c)
2026-02-03 03:40:18 +00:00
Sudharsanan11
95c4b8de06 fix(subcontracting): include item bom in supplied items grouping key
(cherry picked from commit 0d372a62a1)
2026-02-03 03:40:18 +00:00
Henning Wendtland
4963261dc8 feat(Transaction Deletion Record): Editable "DocTypes To Delete" List with CSV import/export (#50592)
* feat: add editable DocTypes To Delete list with import/export

Add user control over transaction deletion with reviewable and reusable deletion templates.

- New "DocTypes To Delete" table allows users to review and customize what will be deleted before submission
- Import/Export CSV templates for reusability across environments
- Company field rule: only filter by company if field is specifically named "company", otherwise delete all records
- Child tables (istable=1) automatically excluded from selection
- "Remove Zero Counts" helper button to clean up list
- Backward compatible with existing deletion records

* refactor: improve Transaction Deletion Record code quality

- Remove unnecessary chatty comments from AI-generated code
- Add concise docstrings to all new methods
- Remove redundant @frappe.whitelist() decorators from internal methods
- Improve CSV import validation (header check, child table filtering)
- Add better error feedback with consolidated skip messages
- Reorder form fields: To Delete list now appears before Excluded list
- Add conditional visibility for Summary table (legacy records only)
- Improve architectural clarity: single API entry point per feature

Technical improvements:
- export_to_delete_template_method and import_to_delete_template_method
  are now internal helpers without whitelist decorators
- CSV import now validates format and provides detailed skip reasons
- Summary table only shows for submitted records without To Delete list
- Maintains backward compatibility for existing deletion records

* fix: field order

* test: fix broken tests and add new ones

* fix: adapt create_transaction_deletion_request

* test: fix assertRaises trigger

* fix: conditionally execute Transaction Deletion pre-tasks based on selected DocTypes

* refactor: replace boolean task flags with status fields

* fix: remove UI comment

* fix: don't allow virtual doctype selection and improve protected Doctype List

* fix: replace outdated frappe.db.sql by frappe.qb

* feat: add support for multiple company fields

* fix: autofill comapny field, add docstrings, filter for company_field

* fix: add edge case handling for update_naming_series and add tests for prefix extraction

* fix: use redis for running deletion validation, check per doctype instead of company

(cherry picked from commit 0fb37ad792)

# Conflicts:
#	erpnext/patches.txt
2026-02-03 00:49:04 +00:00
mergify[bot]
81e65757ee fix: duplicate account number (Indonesia COA) (backport #52080) (#52317)
Co-authored-by: Apriliansyah Idris <apriliansyahidris@gmail.com>
fix: duplicate account number (Indonesia COA) (#52080)
2026-02-02 19:09:22 +00:00
rohitwaghchaure
78e581154b Merge pull request #52312 from frappe/mergify/bp/version-16-hotfix/pr-52303
fix: batch selector not working if Use Legacy (Client side) Reactivity disabled (backport #52303)
2026-02-02 23:32:40 +05:30
Rohit Waghchaure
2a3642b55a fix: batch selector not working if Use Legacy (Client side) Reactivity disabled
(cherry picked from commit d1cba1073f)
2026-02-02 16:32:18 +00:00
Mihir Kandoi
beaa76ca16 Merge pull request #52311 from frappe/mergify/bp/version-16-hotfix/pr-52246 2026-02-02 21:01:34 +05:30
Mihir Kandoi
9997185071 Merge pull request #52246 from mihir-kandoi/st58765
(cherry picked from commit 135a433018)
2026-02-02 15:15:38 +00:00
Mihir Kandoi
681c0b5917 Merge pull request #52308 from frappe/mergify/bp/version-16-hotfix/pr-52304
fix: populate contact fields when creating quotation from customer (backport #52304)
2026-02-02 20:36:19 +05:30
Mihir Kandoi
4a0e04ee20 Merge pull request #52306 from frappe/mergify/bp/version-16-hotfix/pr-52281
fix(stock): add stock recon opening stock condition (backport #52281)
2026-02-02 20:24:00 +05:30
Mihir Kandoi
55129e697d fix: populate contact fields when creating quotation from customer
(cherry picked from commit 75b2c2c83d)
2026-02-02 14:46:36 +00:00
kavin-114
f9a8fc1f2d fix(stock): add stock recon opening stock condition
(cherry picked from commit f3eb6c7078)
2026-02-02 14:37:36 +00:00
Mihir Kandoi
091ff81ae5 Merge pull request #52302 from frappe/mergify/bp/version-16-hotfix/pr-52286
fix: reset incoming rate in selling controller if there are changes i… (backport #52286)
2026-02-02 20:05:37 +05:30
Mihir Kandoi
024e7b01ac fix: reset incoming rate in selling controller if there are changes in item
(cherry picked from commit 2d6b43fd54)
2026-02-02 14:18:20 +00:00
ruthra kumar
a0156b61b8 Merge pull request #52284 from frappe/mergify/bp/version-16-hotfix/pr-52200
fix(accounts): correct date in Journal Auditing Voucher print format (backport #52200)
2026-02-02 12:55:41 +05:30
Tamal Majumdar
7e5eab261c fix: journal auditing voucher print date to use posting_date
(cherry picked from commit 43e2495df8)
2026-02-02 07:21:36 +00:00
ruthra kumar
63782e6355 Merge pull request #52282 from frappe/mergify/bp/version-16-hotfix/pr-51692
fix: correct spelling of Payment Reconciliation in Accounting (backport #51692)
2026-02-02 12:43:17 +05:30
nivithamerlin
c80b554cd7 fix: correct spelling of Payment Reconciliation in Accounting
(cherry picked from commit 35e53d28df)
2026-02-02 07:09:54 +00:00
Mihir Kandoi
7db88b210e Merge pull request #52276 from frappe/mergify/bp/version-16-hotfix/pr-52274 2026-02-02 10:24:07 +05:30
Mihir Kandoi
42d873f1d9 test: over ordering of quotation items
(cherry picked from commit 53e58f6678)
2026-02-02 04:38:13 +00:00
MochaMind
19c1dcc3dd chore: update POT file (#52264) 2026-02-01 15:07:28 +01:00
Mihir Kandoi
23e027b6be Merge pull request #52230 from frappe/mergify/bp/version-16-hotfix/pr-52222
fix: validate over ordering of quotation (backport #52222)
2026-01-31 20:26:44 +05:30
Mihir Kandoi
d91cfa76e6 Merge pull request #52257 from frappe/mergify/bp/version-16-hotfix/pr-52253 2026-01-31 20:19:18 +05:30
Mihir Kandoi
a29df7be67 chore: resolve conflicts 2026-01-31 20:13:26 +05:30
Mihir Kandoi
dbe5846908 fix: make item name editable in RFQ
(cherry picked from commit d9998a977c)
2026-01-31 14:34:24 +00:00
Mihir Kandoi
83fcb5d2d8 Merge pull request #52255 from frappe/mergify/bp/version-16-hotfix/pr-52252
fix: better fix for #51495 (backport #52252)
2026-01-31 19:52:45 +05:30
Mihir Kandoi
b8ab55fee8 fix: better fix for aac39b2671
(cherry picked from commit b24ae5e9a2)
2026-01-31 14:21:27 +00:00
rohitwaghchaure
4d03f4ebaa Merge pull request #52240 from frappe/mergify/bp/version-16-hotfix/pr-52232
fix: validation when more than one FG items in repack stock entry (backport #52232)
2026-01-31 17:54:08 +05:30
Rohit Waghchaure
a2d302b3fa fix: validation when more than one FG items in repack stock entry
(cherry picked from commit 6423ce2fa7)
2026-01-31 07:16:45 +00:00
Mihir Kandoi
b5321d42a3 Merge pull request #52234 from frappe/mergify/bp/version-16-hotfix/pr-52231
fix: item code not showing in report view (backport #52231)
2026-01-30 22:17:26 +05:30
UmakanthKaspa
af167f91fe fix: item code not showing in report view
(cherry picked from commit b20f57321f)
2026-01-30 16:46:26 +00:00
Mihir Kandoi
e74389f01c fix: test cases
(cherry picked from commit 36f1e3572c)
2026-01-30 14:00:52 +00:00
Mihir Kandoi
e7ace8e620 fix: validate over ordering of quotation
(cherry picked from commit 4cc306d2d8)

# Conflicts:
#	erpnext/patches.txt
2026-01-30 14:00:52 +00:00
Mihir Kandoi
e23e9b5d66 Merge pull request #52227 from frappe/mergify/bp/version-16-hotfix/pr-52226 2026-01-30 18:03:40 +05:30
Mihir Kandoi
136b2cfba5 fix: failing test cases
(cherry picked from commit d3f44a425c)
2026-01-30 12:18:10 +00:00
Mihir Kandoi
3b3738577d Merge pull request #52225 from frappe/mergify/bp/version-16-hotfix/pr-51433 2026-01-30 17:30:01 +05:30
Mihir Kandoi
1e646bd0ed Merge pull request #52224 from frappe/mergify/bp/version-16-hotfix/pr-52223
fix: allow sales invoice to be renamed (backport #52223)
2026-01-30 17:19:10 +05:30
Mihir Kandoi
02e6c49130 test: add test case
(cherry picked from commit e2c3d0fa94)
2026-01-30 11:41:46 +00:00
Mihir Kandoi
e9fa725030 chore: make feature opt in
(cherry picked from commit b8d4522ea1)
2026-01-30 11:41:46 +00:00
Mihir Kandoi
b03494bb67 feat: document naming rule will now use posting date of the document
(cherry picked from commit 22fd1a1cfd)
2026-01-30 11:41:45 +00:00
Mihir Kandoi
f7b915dfe6 fix: allow sales invoice to be renamed
(cherry picked from commit 95fdbe55f9)
2026-01-30 11:33:20 +00:00
Mihir Kandoi
0a5aac9ce7 Merge pull request #52218 from frappe/mergify/bp/version-16-hotfix/pr-52209
fix: add precision to rejected batch no qty calculation (backport #52209)
2026-01-30 12:21:50 +05:30
Mihir Kandoi
e3c62070d1 Merge pull request #52215 from frappe/mergify/bp/version-16-hotfix/pr-52213
fix: hide close button on WO if WO is completed (backport #52213)
2026-01-30 12:06:39 +05:30
Mihir Kandoi
b365444027 fix: add precision to rejected batch no qty calculation
(cherry picked from commit 838d245215)
2026-01-30 06:35:59 +00:00
Mihir Kandoi
0d1c30f3f0 fix: hide close button on WO if WO is completed
(cherry picked from commit 6e17ccf499)
2026-01-30 06:29:32 +00:00
Mihir Kandoi
d0b553dca3 Merge pull request #52212 from frappe/mergify/bp/version-16-hotfix/pr-52210
fix(barcode): failing request when item has both batch and serial (backport #52210)
2026-01-30 11:52:49 +05:30
Mihir Kandoi
e4cdd971c8 fix(barcode): failing request when item has both batch and serial
(cherry picked from commit 89f6f0f46f)
2026-01-30 06:17:41 +00:00
mergify[bot]
78c4f01733 fix: missing depr_series causing error on jv creation (backport #52085) (#52206)
fix: missing depr_series causing error on jv creation (#52085)

(cherry picked from commit b565dd3da8)

Co-authored-by: Dany Robert <rtdany10@gmail.com>
2026-01-29 23:30:29 +05:30
Mihir Kandoi
eac4978278 Merge pull request #52203 from frappe/mergify/bp/version-16-hotfix/pr-52201
fix: hide item_wise_tax_details table from print (backport #52201)
2026-01-29 21:58:37 +05:30
Mihir Kandoi
c619be989b fix: hide item_wise_tax_details table from print
(cherry picked from commit c38f884095)
2026-01-29 16:12:55 +00:00
rohitwaghchaure
64921fc1b5 Merge pull request #52197 from frappe/mergify/bp/version-16-hotfix/pr-52190
fix: lead time calculation for FG item (backport #52190)
2026-01-29 19:06:53 +05:30
rohitwaghchaure
6d8d502bbf Merge pull request #52192 from frappe/mergify/bp/version-16-hotfix/pr-52158
Add Landed Cost Voucher Amount in Internal Purchase Receipt (backport #52158)
2026-01-29 18:07:46 +05:30
Rohit Waghchaure
5595602f24 fix: lead time calculation for FG item
(cherry picked from commit 646688c291)
2026-01-29 12:29:39 +00:00
kavin-114
7042f2b8fb test: add unit test to check internal purchase with lcv
(cherry picked from commit dd4fd89ef8)
2026-01-29 12:02:50 +00:00
kavin-114
f462639aa0 fix(stock): set incoming_rate with lcv rate for internal purchase
(cherry picked from commit f0dccc3cd7)
2026-01-29 12:02:49 +00:00
Mihir Kandoi
14ba0f1cae Merge pull request #52183 from frappe/mergify/bp/version-16-hotfix/pr-52181
fix: js error if user does not have write permission for date field (backport #52181)
2026-01-29 15:42:29 +05:30
Mihir Kandoi
3944dfde31 fix: js error if user does not have write permission for date field
(cherry picked from commit 7f6f39f5e7)
2026-01-29 10:01:33 +00:00
ruthra kumar
16cc2b0a25 Merge pull request #52177 from frappe/mergify/bp/version-16-hotfix/pr-52173
New accounting icons (backport #52173)
2026-01-29 14:51:36 +05:30
Jacob Salvi
3394e1a126 refactor: new accounting icons (#52173)
* chore: new icons share-management

* chore: new accounting icons

* chore: trigger CI

---------

Co-authored-by: Soham Kulkarni <77533095+sokumon@users.noreply.github.com>
Co-authored-by: ruthra kumar <ruthra@erpnext.com>
(cherry picked from commit cdcf3fa593)
2026-01-29 09:13:39 +00:00
mergify[bot]
66086010fc fix(demo): removed toolbar eventlistener (backport #52171) (#52172)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
fix(demo): removed toolbar eventlistener (#52171)
2026-01-29 11:29:59 +05:30
Mihir Kandoi
195a2f3e74 Merge pull request #52168 from frappe/mergify/bp/version-16-hotfix/pr-52166
fix: production plan not considering planning datetime when creating WO (backport #52166)
2026-01-29 11:06:50 +05:30
Mihir Kandoi
7e7b16b23e fix: production plan not considering planning datetime when creating WO
(cherry picked from commit 4e19c7e8bd)
2026-01-29 05:20:59 +00:00
Aarol D'Souza
f4beb41df2 Merge pull request #52164 from frappe/mergify/bp/version-16-hotfix/pr-52092
fix(RFQ): render email templates for preview and sending (backport #52092)
2026-01-29 09:23:39 +05:30
AarDG10
4c4aa9bbdf ci: minor text correction
(cherry picked from commit 37cdae2f34)
2026-01-29 03:38:02 +00:00
AarDG10
687a80d74c fix(RFQ): render email templates for preview and sending
(cherry picked from commit 525b3960e1)
2026-01-29 03:38:01 +00:00
rohitwaghchaure
f01e0576b9 Merge pull request #52141 from frappe/mergify/bp/version-16-hotfix/pr-52007
Fix: Set Zero Rate for Standalone Credit Note with Expired Batch (backport #52007)
2026-01-28 19:46:10 +05:30
Frappe PR Bot
83a0d957ef chore(release): Bumped to Version 16.3.0
# [16.3.0](https://github.com/frappe/erpnext/compare/v16.2.0...v16.3.0) (2026-01-28)

### Features

* clear demo data from desktop screen (backport [#52128](https://github.com/frappe/erpnext/issues/52128))  ([#52150](https://github.com/frappe/erpnext/issues/52150)) ([554aeb9](554aeb94fd))
2026-01-28 12:51:32 +00:00
mergify[bot]
554aeb94fd feat: clear demo data from desktop screen (backport #52128) (#52150)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Soham Kulkarni <77533095+sokumon@users.noreply.github.com>
2026-01-28 18:19:41 +05:30
mergify[bot]
05e30dc011 feat: clear demo data from desktop screen (backport #52128) (#52147)
Co-authored-by: Soham Kulkarni <77533095+sokumon@users.noreply.github.com>
2026-01-28 17:36:04 +05:30
kavin-114
40a3dabd30 test(credit-note): add unit test for zero valuation rate on expired batch
(cherry picked from commit 3460a7efb5)
2026-01-28 10:43:58 +00:00
kavin-114
0f9bf08685 fix(credit-note): set incoming rate as zero for expired batch
(cherry picked from commit e78c750b4e)
2026-01-28 10:43:58 +00:00
kavin-114
b84fd46841 feat(credit-note): add checkbox to set valuation rate as zero for expired batch
(cherry picked from commit 04cdf88715)
2026-01-28 10:43:58 +00:00
Frappe PR Bot
6209d633c2 chore(release): Bumped to Version 16.2.0
# [16.2.0](https://github.com/frappe/erpnext/compare/v16.1.0...v16.2.0) (2026-01-28)

### Bug Fixes

* **accounts:** correct base grand total and rounded total mismatch (backport [#51739](https://github.com/frappe/erpnext/issues/51739)) ([#52101](https://github.com/frappe/erpnext/issues/52101)) ([6115f8f](6115f8fb9a))
* **asset capitalization:** update total_asset_cost on asset capitalisation submission (backport [#52077](https://github.com/frappe/erpnext/issues/52077)) ([#52115](https://github.com/frappe/erpnext/issues/52115)) ([4f16956](4f1695616a))
* autofill warehouse for packed items ([881562f](881562fc37))
* Bin reserved qty for production for extra material transfer ([bf53133](bf53133f94))
* calculate weighted average rate for customer provided items in subcontracting inward order ([7120fbd](7120fbd14b))
* check the payment ledger entry has the dimension ([#51823](https://github.com/frappe/erpnext/issues/51823)) ([7342b25](7342b2551b))
* check the payment ledger entry has the dimension (backport [#51823](https://github.com/frappe/erpnext/issues/51823)) ([#52108](https://github.com/frappe/erpnext/issues/52108)) ([1927adb](1927adbd2e))
* create DN btn should not be shown if it cannot be created ([30e6b5d](30e6b5daac))
* **customer:** add customer group filters ([b1716bf](b1716bfeef))
* disable asset repair when status is fully depreciated ([13e4849](13e4849c43))
* Ensure paid_amount is always numeric before calling allocate_amount_to_references (backport [#50935](https://github.com/frappe/erpnext/issues/50935)) ([#52036](https://github.com/frappe/erpnext/issues/52036)) ([e9f3f0f](e9f3f0f445))
* force user to enter batch or serial for serial/batch items ([91199ea](91199ea9c9))
* handle parent level project change ([0b7684e](0b7684eccd))
* handle undefined bank_transaction_mapping in quick entry ([22a8d48](22a8d483e1))
* job cards should not be deleted on close of WO ([7c2bbe0](7c2bbe0d82))
* **journal-entry:** prevent submit failure due to double background queuing (backport [#52083](https://github.com/frappe/erpnext/issues/52083)) ([#52087](https://github.com/frappe/erpnext/issues/52087)) ([46e6096](46e6096fe3))
* negative stock for purchae return ([fb3fb8c](fb3fb8ca5e))
* not able to complete the job card ([f486071](f486071cf6))
* **payment entry:** update currency symbol (backport [#51956](https://github.com/frappe/erpnext/issues/51956)) ([#52094](https://github.com/frappe/erpnext/issues/52094)) ([b1b1f25](b1b1f25bb1))
* **project:** add missing counter to project update naming series ([37a237d](37a237dbb7))
* rejected qty in PR doesn't consider conversion factor ([c7c7a55](c7c7a55a58))
* **sales order:** set project at item level from parent ([27fe754](27fe754a7d))
* **shipment:** user contact validation to use full name ([0a56647](0a56647a61))
* show everything else besides other party specific item ([7575861](75758610dd))
* show message if image is removed from item description (backport [#52088](https://github.com/frappe/erpnext/issues/52088)) ([#52097](https://github.com/frappe/erpnext/issues/52097)) ([53b7375](53b73757ed))
* **stock:** use purchase UOM in Supplier Quotation items ([f97b850](f97b850077))
* strip whitespace in customer_name ([41e6687](41e6687b35))
* swedish_address_template ([cff09b7](cff09b71cc))
* tests ([6fa60d2](6fa60d2f1a))
* throw if item order field is not set in subcontracting controller ([264855e](264855e5e1))
* unable to split asset from capitalization (backport [#52020](https://github.com/frappe/erpnext/issues/52020)) ([#52114](https://github.com/frappe/erpnext/issues/52114)) ([c1cc1db](c1cc1dbd27)), closes [#52016](https://github.com/frappe/erpnext/issues/52016) [#52016](https://github.com/frappe/erpnext/issues/52016)
* UOM of item not fetching in BOM ([1b9a93f](1b9a93f90e))
* update country_wise_tax.json for Algerian Taxes (backport [#51878](https://github.com/frappe/erpnext/issues/51878)) ([#52038](https://github.com/frappe/erpnext/issues/52038)) ([8946f12](8946f12677))
* validation to check at-least one raw material for manufacture entry ([d067e37](d067e37ab6))
* warehouse permissions in MR incorrectly ignored ([504c84e](504c84e28a))

### Features

* **accounts:** retain filters when switching between financial statements (backport [#51668](https://github.com/frappe/erpnext/issues/51668)) ([#52117](https://github.com/frappe/erpnext/issues/52117)) ([9ed3801](9ed3801d06))
2026-01-28 04:15:59 +00:00
ruthra kumar
095fe65bef Merge pull request #52103 from frappe/version-16-hotfix
chore: release v16
2026-01-28 09:44:30 +05:30
Mihir Kandoi
b285548a46 Merge pull request #52124 from frappe/mergify/bp/version-16-hotfix/pr-51961
fix(sales order): set project at item level from parent (backport #51961)
2026-01-27 21:55:49 +05:30
SowmyaArunachalam
0b7684eccd fix: handle parent level project change
(cherry picked from commit 543b6e51c0)
2026-01-27 16:24:22 +00:00
SowmyaArunachalam
574460c009 chore: use frappe.model.set_value
(cherry picked from commit 3b27f49d79)
2026-01-27 16:24:22 +00:00
SowmyaArunachalam
27fe754a7d fix(sales order): set project at item level from parent
(cherry picked from commit 9e51701e2a)
2026-01-27 16:24:22 +00:00
Mihir Kandoi
531fe59a24 Merge pull request #52122 from frappe/mergify/bp/version-16-hotfix/pr-52084
fix(shipment): user contact validation to use full name (backport #52084)
2026-01-27 21:29:22 +05:30
harrishragavan
0a56647a61 fix(shipment): user contact validation to use full name
(cherry picked from commit 3c6eb9a531)
2026-01-27 15:57:22 +00:00
Soham Kulkarni
c2f666b7a3 Merge pull request #52120 from frappe/mergify/bp/version-16-hotfix/pr-52119 2026-01-27 21:11:42 +05:30
sokumon
c1bbe1104e chore: change color of icons in accounting folders
(cherry picked from commit 6f9cd8c261)
2026-01-27 15:15:16 +00:00
ruthra kumar
2c86327c7e Merge pull request #52112 from frappe/mergify/bp/version-16-hotfix/pr-52106
fix: show everything else besides other party specific item (backport #52106)
2026-01-27 20:08:54 +05:30
ruthra kumar
31385a1f91 Merge pull request #52118 from frappe/mergify/bp/version-16-hotfix/pr-51894
refactor: accounting workspace (backport #51894)
2026-01-27 20:08:29 +05:30
mergify[bot]
4f1695616a fix(asset capitalization): update total_asset_cost on asset capitalisation submission (backport #52077) (#52115)
fix(asset capitalization): update total_asset_cost on asset capitalisation submission (#52077)

fix(asset capitalization): update total_asset_cost on asset capitalization submission

(cherry picked from commit ec41f1b0f5)

Co-authored-by: NaviN <118178330+Navin-S-R@users.noreply.github.com>
2026-01-27 19:31:52 +05:30
mergify[bot]
9ed3801d06 feat(accounts): retain filters when switching between financial statements (backport #51668) (#52117) 2026-01-27 19:03:44 +05:30
ruthra kumar
61ad67ec29 refactor: reuse icon for invoicing
(cherry picked from commit f0332c4dc7)
2026-01-27 13:15:37 +00:00
ruthra kumar
735b9da6b1 refactor: rename Accounts to Accounting
(cherry picked from commit fb9656b975)
2026-01-27 13:15:36 +00:00
ruthra kumar
fe7a797156 refactor: link payments dashboard to sidebar
(cherry picked from commit f7abf9c1da)
2026-01-27 13:15:36 +00:00
ruthra kumar
f951dd180a refactor: payments dashboard
(cherry picked from commit 99406ccc15)
2026-01-27 13:15:36 +00:00
ruthra kumar
8e871796d4 refactor: shed duplicates from invoicing sidebar
(cherry picked from commit 1295d7aa30)
2026-01-27 13:15:36 +00:00
ruthra kumar
c88ee50c34 refactor: reorder accounts setup sidebar
(cherry picked from commit 5a680d5037)
2026-01-27 13:15:35 +00:00
ruthra kumar
e49f6f4f09 refactor: introduce setup icon and reorder
(cherry picked from commit 7528d42187)
2026-01-27 13:15:35 +00:00
ruthra kumar
72942e6b8c refactor: payments sidebar and icon
(cherry picked from commit cbdc945287)
2026-01-27 13:15:35 +00:00
ruthra kumar
fdcf037f1b chore: rename accounting to invoicing
(cherry picked from commit faf0dcb102)
2026-01-27 13:15:35 +00:00
ruthra kumar
9e0c606b95 chore: remove accounting icon
(cherry picked from commit 5e02b4009e)
2026-01-27 13:15:34 +00:00
ruthra kumar
6b9f2ddf83 refactor: invoicing icon
(cherry picked from commit 8125f9035c)
2026-01-27 13:15:34 +00:00
mergify[bot]
c1cc1dbd27 fix: unable to split asset from capitalization (backport #52020) (#52114)
fix: unable to split asset from capitalization (#52020)

* fix: Allow split asset from capitalized composite asset (fixes #52016)

* test: Add test case for splitting asset created via capitalization (fixes #52016)

* docs: Add docstring to before_submit method

* fix: Remove unused variable and fix UTF-8 encoding in asset files

* fix: Remove UTF-8 BOM from asset.py to fix linting

* fix: Fix test_split_asset_created_via_capitalization test parameters

* fix: Remove unused import create_item

* chore: remove unnecessary comments

Removed validation comments for composite asset capitalization in before_submit method.

---------


(cherry picked from commit 7e9647f3f0)

Co-authored-by: madelyngamble2 <madelyngamble2@gmail.com>
Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2026-01-27 18:04:19 +05:30
Mihir Kandoi
de584e2e8d test: fix tests
(cherry picked from commit 5eeebbde7f)
2026-01-27 10:57:40 +00:00
Mihir Kandoi
75758610dd fix: show everything else besides other party specific item
(cherry picked from commit 71371b0ba5)
2026-01-27 10:57:40 +00:00
ruthra kumar
1927adbd2e fix: check the payment ledger entry has the dimension (backport #51823) (#52108)
fix: check the payment ledger entry has the dimension (#51823)

* fix: check the payment ledger entry has the dimension

* fix: add project in payment ledger entry

(cherry picked from commit efa3973b77)

Co-authored-by: Vishnu Priya Baskaran <145791817+ervishnucs@users.noreply.github.com>
2026-01-27 16:25:33 +05:30
Vishnu Priya Baskaran
7342b2551b fix: check the payment ledger entry has the dimension (#51823)
* fix: check the payment ledger entry has the dimension

* fix: add project in payment ledger entry

(cherry picked from commit efa3973b77)
2026-01-27 10:27:23 +00:00
mergify[bot]
6115f8fb9a fix(accounts): correct base grand total and rounded total mismatch (backport #51739) (#52101)
Co-authored-by: Dharanidharan S <dharanidharans1328@gmail.com>
fix(accounts): correct base grand total and rounded total mismatch (#51739)
2026-01-27 14:23:10 +05:30
mergify[bot]
53b73757ed fix: show message if image is removed from item description (backport #52088) (#52097)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-01-27 14:09:02 +05:30
rohitwaghchaure
dee3357da2 Merge pull request #52075 from frappe/mergify/bp/version-16-hotfix/pr-52062
fix: not able to complete the job card (backport #52062)
2026-01-27 13:03:43 +05:30
mergify[bot]
b1b1f25bb1 fix(payment entry): update currency symbol (backport #51956) (#52094)
Co-authored-by: NaviN <118178330+Navin-S-R@users.noreply.github.com>
fix(payment entry): update currency symbol (#51956)
2026-01-27 06:34:19 +00:00
mergify[bot]
46e6096fe3 fix(journal-entry): prevent submit failure due to double background queuing (backport #52083) (#52087)
Co-authored-by: V Shankar <shankarv292002@gmail.com>
fix(journal-entry): prevent submit failure due to double background queuing (#52083)
2026-01-27 05:53:05 +00:00
Rohit Waghchaure
f486071cf6 fix: not able to complete the job card
(cherry picked from commit 696ea68f86)
2026-01-26 17:45:21 +00:00
Mihir Kandoi
b541fbbd60 Merge pull request #52066 from frappe/mergify/bp/version-16-hotfix/pr-52064
fix: strip whitespace in customer_name (backport #52064)
2026-01-26 15:32:27 +05:30
Shankarv19bcr
41e6687b35 fix: strip whitespace in customer_name
(cherry picked from commit e5ba0e6401)
2026-01-26 09:47:06 +00:00
MochaMind
55ce40de37 chore: update POT file (#52058) 2026-01-25 20:37:09 +01:00
ruthra kumar
6f21ab5d9a Merge pull request #52040 from frappe/mergify/bp/version-16-hotfix/pr-51670
fix: handle undefined bank_transaction_mapping in quick entry (backport #51670)
2026-01-25 13:11:28 +05:30
ruthra kumar
7c81672b36 Merge pull request #52041 from frappe/mergify/bp/version-16-hotfix/pr-51691
refactor: not warn when filter field is missing in FS reports (backport #51691)
2026-01-25 13:10:02 +05:30
ruthra kumar
d0faff09cb Merge pull request #52055 from frappe/mergify/bp/version-16-hotfix/pr-52050
fix: swedish_address_template (backport #52050)
2026-01-25 13:08:42 +05:30
mahsem
cff09b71cc fix: swedish_address_template
(cherry picked from commit 334e8ada30)
2026-01-25 05:22:41 +00:00
rohitwaghchaure
b180e3b78c Merge pull request #52053 from frappe/mergify/bp/version-16-hotfix/pr-52043
fix: UOM of item not fetching in BOM (backport #52043)
2026-01-25 10:50:38 +05:30
rohitwaghchaure
6ba2795043 Merge pull request #51905 from frappe/mergify/bp/version-16-hotfix/pr-51900
fix: validation to check at-least one raw material for manufacture entry (backport #51900)
2026-01-25 10:45:11 +05:30
Rohit Waghchaure
1b9a93f90e fix: UOM of item not fetching in BOM
(cherry picked from commit ba8eadda52)
2026-01-25 05:15:05 +00:00
rohitwaghchaure
1f1428f00a Merge branch 'version-16-hotfix' into mergify/bp/version-16-hotfix/pr-51900 2026-01-24 13:49:24 +05:30
Abdeali Chharchhoda
606ac2a91a refactor: not warn when filter field is missing in FS reports
(cherry picked from commit d905f78984)
2026-01-24 07:08:08 +00:00
Abdeali Chharchhoda
9a175757ac refactor: use console.error for error logging in Plaid integration
(cherry picked from commit 9322095786)
2026-01-24 07:07:48 +00:00
Abdeali Chharchhoda
22a8d483e1 fix: handle undefined bank_transaction_mapping in quick entry
(cherry picked from commit 8a1b8259bd)
2026-01-24 07:07:47 +00:00
Abdeali Chharchhoda
7abaaed957 refactor: remove redundant onload function for bank mapping table
(cherry picked from commit 7c7ba0154a)
2026-01-24 07:07:47 +00:00
mergify[bot]
8946f12677 fix: update country_wise_tax.json for Algerian Taxes (backport #51878) (#52038)
fix: update country_wise_tax.json for Algerian Taxes (#51878)

* Algeria chart of accounts

Algeria chart of accounts

* Update Algeria Chart Of Account

* Algeria chart of account

* Algeria Chart of Account

Algeria Chart of Account

* Modify Algeria tax entries in country_wise_tax.json

Updated tax rates and account names for Algeria.

* Rename account for Algeria tax from VAT to TVA

Rename account for Algeria tax from VAT to TVA

(cherry picked from commit e810cd8440)

Co-authored-by: HALFWARE <contact@half-ware.com>
2026-01-24 06:48:16 +00:00
mergify[bot]
e9f3f0f445 fix: Ensure paid_amount is always numeric before calling allocate_amount_to_references (backport #50935) (#52036)
fix: Ensure paid_amount is always numeric before calling allocate_amount_to_references (#50935)

fix: ensure paid_amount is not null in allocate_party_amount_against_ref_docs
(cherry picked from commit 50b3396064)

Co-authored-by: El-Shafei H. <el.shafei.developer@gmail.com>
2026-01-24 12:03:34 +05:30
ruthra kumar
ba38bc3eaf Merge pull request #52026 from frappe/mergify/bp/version-16-hotfix/pr-51756
fix: disable asset repair when status is fully depreciated (backport #51756)
2026-01-24 09:46:53 +05:30
rohitwaghchaure
b4572978f9 Merge pull request #52031 from frappe/mergify/bp/version-16-hotfix/pr-52024
fix: Bin reserved qty for production for extra material transfer (backport #52024)
2026-01-24 08:47:44 +05:30
Rohit Waghchaure
bf53133f94 fix: Bin reserved qty for production for extra material transfer
(cherry picked from commit f5378b6573)
2026-01-23 15:45:46 +00:00
Mihir Kandoi
23c902c317 Merge pull request #52022 from frappe/mergify/bp/version-16-hotfix/pr-51999
fix(stock): use purchase UOM in Supplier Quotation items (backport #51999)
2026-01-23 19:21:12 +05:30
SowmyaArunachalam
13e4849c43 fix: disable asset repair when status is fully depreciated
(cherry picked from commit 66fe1aa85d)
2026-01-23 11:38:39 +00:00
Bharathidhasan06
f97b850077 fix(stock): use purchase UOM in Supplier Quotation items
(cherry picked from commit 2606ca6fa9)
2026-01-23 08:34:36 +00:00
rohitwaghchaure
b3e12f9acb Merge pull request #52015 from frappe/mergify/bp/version-16-hotfix/pr-52006
fix: negative stock for purchase return (backport #52006)
2026-01-23 13:22:36 +05:30
Rohit Waghchaure
fb3fb8ca5e fix: negative stock for purchae return
(cherry picked from commit d68a04ad16)
2026-01-23 06:04:02 +00:00
rohitwaghchaure
e2232340dc Merge pull request #52005 from frappe/mergify/bp/version-16-hotfix/pr-51989
fix: autofill warehouse for packed items (backport #51989)
2026-01-22 23:56:30 +05:30
Sudharsanan11
881562fc37 fix: autofill warehouse for packed items
(cherry picked from commit 3f8a0a4833)
2026-01-22 17:28:22 +00:00
Mihir Kandoi
dcd6279d47 Merge pull request #51983 from frappe/mergify/bp/version-16-hotfix/pr-51908
fix: throw if item order field is not set in subcontracting controller (backport #51908)
2026-01-22 10:53:05 +05:30
Mihir Kandoi
041a7c5a57 Merge pull request #51982 from frappe/mergify/bp/version-16-hotfix/pr-51929
fix: calculate weighted average rate for customer provided items in subcontracting inward order (backport #51929)
2026-01-22 10:51:54 +05:30
Mihir Kandoi
27ffef41a7 Merge pull request #51980 from frappe/mergify/bp/version-16-hotfix/pr-51966
fix(customer): add customer group filters (backport #51966)
2026-01-22 10:42:45 +05:30
Mihir Kandoi
9038f19fb6 Merge pull request #51978 from frappe/mergify/bp/version-16-hotfix/pr-51967
fix(project): add missing counter to project update naming series (backport #51967)
2026-01-22 10:38:33 +05:30
ljain112
264855e5e1 fix: throw if item order field is not set in subcontracting controller
(cherry picked from commit d256365f4a)
2026-01-22 05:05:22 +00:00
ljain112
7120fbd14b fix: calculate weighted average rate for customer provided items in subcontracting inward order
(cherry picked from commit 37ee560eae)
2026-01-22 05:02:16 +00:00
SowmyaArunachalam
b1716bfeef fix(customer): add customer group filters
(cherry picked from commit 1e3db9f916)
2026-01-22 04:57:04 +00:00
ravibharathi656
37a237dbb7 fix(project): add missing counter to project update naming series
(cherry picked from commit 49e64f4e1c)
2026-01-22 04:53:10 +00:00
Mihir Kandoi
be9112b6fc Merge pull request #51972 from frappe/mergify/bp/version-16-hotfix/pr-51968 2026-01-22 09:04:25 +05:30
Mihir Kandoi
2f240f3553 Merge pull request #51970 from frappe/mergify/bp/version-16-hotfix/pr-51964
fix: create DN btn should not be shown if it cannot be created (backport #51964)
2026-01-21 22:54:50 +05:30
Mihir Kandoi
c7c7a55a58 fix: rejected qty in PR doesn't consider conversion factor
(cherry picked from commit 343ee9695b)
2026-01-21 17:21:00 +00:00
Mihir Kandoi
30e6b5daac fix: create DN btn should not be shown if it cannot be created
(cherry picked from commit 70ec977cb2)
2026-01-21 17:09:48 +00:00
Mihir Kandoi
0b5cc039b6 Merge pull request #51962 from frappe/mergify/bp/version-16-hotfix/pr-51958
fix!: force user to enter batch or serial for serial/batch items (backport #51958)
2026-01-21 16:38:31 +05:30
Mihir Kandoi
6fa60d2f1a fix: tests
(cherry picked from commit 035b3cb61e)
2026-01-21 10:53:46 +00:00
Mihir Kandoi
91199ea9c9 fix: force user to enter batch or serial for serial/batch items
(cherry picked from commit 7170a1bd78)
2026-01-21 10:53:46 +00:00
Mihir Kandoi
e23ba0e852 Merge pull request #51960 from frappe/mergify/bp/version-16-hotfix/pr-51947
fix: job cards should not be deleted on close of WO (backport #51947)
2026-01-21 16:03:09 +05:30
Mihir Kandoi
7c2bbe0d82 fix: job cards should not be deleted on close of WO
(cherry picked from commit c919b1de38)
2026-01-21 10:17:16 +00:00
Mihir Kandoi
0a2234a814 Merge pull request #51951 from frappe/mergify/bp/version-16-hotfix/pr-51948
fix: warehouse permissions in MR incorrectly ignored (backport #51948)
2026-01-21 14:05:14 +05:30
Mihir Kandoi
504c84e28a fix: warehouse permissions in MR incorrectly ignored
(cherry picked from commit 5bacb67d36)
2026-01-21 07:36:22 +00:00
ruthra kumar
bb2bada1fd Merge pull request #51945 from ruthra-kumar/reenable_auto_close
chore: reenable auto close
2026-01-21 10:16:58 +05:30
ruthra kumar
ca85ee33f5 chore: reenable auto close 2026-01-21 10:13:32 +05:30
ruthra kumar
21c1189e24 Merge pull request #51944 from ruthra-kumar/remove_junk_comment
chore: remove stray comment and disable auto close
2026-01-21 10:10:35 +05:30
ruthra kumar
7e7885b304 chore: remove stray comment and disable auto close 2026-01-21 10:09:03 +05:30
Frappe PR Bot
30238e3063 chore(release): Bumped to Version 16.1.0
# [16.1.0](https://github.com/frappe/erpnext/compare/v16.0.1...v16.1.0) (2026-01-20)

### Bug Fixes

* **accounts_controller:** make return message translatable ([621243c](621243c1d3))
* **accounts:** add missing accounting dimensions in advance taxes and charges ([673635e](673635e2c3))
* add below-0 column in ar/ap report (backport [#51673](https://github.com/frappe/erpnext/issues/51673)) ([#51780](https://github.com/frappe/erpnext/issues/51780)) ([5c93bf5](5c93bf5798))
* add company filters for warehouse ([ccab91b](ccab91b9ed))
* add other charges in total ([68c8dfb](68c8dfb24c))
* add uom js error ([a660ed0](a660ed061b))
* add validation for amount and hours ([ce421bb](ce421bb1d4))
* add validation for direct return ([bfd6375](bfd6375508))
* add validation for duplication ([84a749e](84a749e3d0))
* add validation for return against ([6dade11](6dade11d8f))
* allow creation of DN in SI for items not having DN reference ([fef6df7](fef6df709d))
* allow disassemble stock entry without work order (backport [#51761](https://github.com/frappe/erpnext/issues/51761)) ([#51836](https://github.com/frappe/erpnext/issues/51836)) ([c830bf6](c830bf6fc7))
* **bank_account:** validation for is_company_account ([5d5d208](5d5d208a49))
* **bom:** pass company warehouse filter ([3c533d0](3c533d04f5))
* **budget variance report:** check budget dimensions ([a3d860e](a3d860eabf))
* bugs ([accce1f](accce1fe59))
* calculate net profit amount from root node accounts ([89b44c4](89b44c41a2))
* change docfield type to render html format (backport [#51795](https://github.com/frappe/erpnext/issues/51795)) ([#51804](https://github.com/frappe/erpnext/issues/51804)) ([fcea760](fcea7603a8))
* common_party_path ([#51826](https://github.com/frappe/erpnext/issues/51826)) ([aeb2b60](aeb2b60450))
* continuous raw material consumption with bom validation (backport [#51914](https://github.com/frappe/erpnext/issues/51914)) ([#51919](https://github.com/frappe/erpnext/issues/51919)) ([c9d7c6c](c9d7c6cd42))
* docs_path ([86d5939](86d5939d91))
* dont show certain fields based on permissions ([d3dfed9](d3dfed909e))
* handle return cancellation ([65a1c70](65a1c7086b))
* include total hours validation in depends on ([cbfc137](cbfc13728b))
* **manufacturing:** consider process loss qty while validating the work order ([7b3f746](7b3f74609a))
* no attribute error on LCV ([fe59ace](fe59ace285))
* no attribute error on subcontracting receipt ([2131c7a](2131c7aadb))
* overproduction % not considered when making WO from SO ([fb669eb](fb669eb6f4))
* **pos:** reapply set warehouse during cart update ([6869115](686911546f))
* **postgres:** compute current month sales without DATE_FORMAT ([49760e4](49760e4542))
* prevent UOM from updating incorrectly while scanning barcode ([9d5a0e5](9d5a0e56a0))
* qty with serial no count ([ae6b3af](ae6b3af013))
* remove already transferred batch ([f1e41f4](f1e41f4a4f))
* setting process loss qty causes fg item qty to be incorrect ([cb2d455](cb2d4550af))
* Show non-SLE vouchers with GL entries in Stock vs Account Value Comparison report ([e64ae9a](e64ae9a8a9))
* **stock:** resolve quantity issue when adding items via barcode scan ([ab482ca](ab482caac9))
* **transaction.js:** use flt instead of cint for plc_conversion_rate ([8ba4701](8ba470160d))
* validation message in stock reco row idx ([176096b](176096bc5b))
* valuation rate for non batchwise valuation ([768c131](768c131073))

### Features

* add list_view status for partial billing ([9b88275](9b88275312))
* add new 2025 Charts of Accounts for France ([9cc9fa5](9cc9fa59be))
* Adding Item name in update item dialog box ([1da8ed2](1da8ed202b))
* modify field properties ([e49add2](e49add20b7))
* remove old French chart of accounts with code as nex 2025 is provided ([3bdaab1](3bdaab149b))
* support for serial item ([c4c2d35](c4c2d35565))
* **timesheet:** handle partial billing in sales invoice ([332673f](332673f260))

### Performance Improvements

* prevent duplicate reposting for the same item ([3ac431b](3ac431bd50))
2026-01-20 16:47:59 +00:00
ruthra kumar
35b3045b72 Merge pull request #51911 from frappe/version-16-hotfix
chore: release v16
2026-01-20 22:16:27 +05:30
Mihir Kandoi
cf130ff865 Merge pull request #51936 from frappe/mergify/bp/version-16-hotfix/pr-51934
fix: validation message in stock reco row idx (backport #51934)
2026-01-20 21:05:40 +05:30
Mihir Kandoi
176096bc5b fix: validation message in stock reco row idx
(cherry picked from commit 3960c01798)
2026-01-20 15:17:53 +00:00
rohitwaghchaure
e854eafc0b Merge pull request #51933 from frappe/mergify/bp/version-16-hotfix/pr-51930
Revert "perf: prevent duplicate reposting for the same item" (backport #51930)
2026-01-20 20:05:41 +05:30
rohitwaghchaure
72cdddbeda Revert "perf: prevent duplicate reposting for the same item"
(cherry picked from commit 6e4b90055f)
2026-01-20 14:19:47 +00:00
mergify[bot]
c9d7c6cd42 fix: continuous raw material consumption with bom validation (backport #51914) (#51919)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2026-01-20 12:56:27 +00:00
Diptanil Saha
8393c3c32d Merge pull request #51922 from frappe/mergify/bp/version-16-hotfix/pr-51887
fix(bank_account): `is_company_account` related validations (backport #51887)
2026-01-20 18:09:01 +05:30
Mihir Kandoi
5752d2e0a1 Merge pull request #51926 from frappe/mergify/bp/version-16-hotfix/pr-51909
fix: allow creation of DN in SI for items not having DN reference (backport #51909)
2026-01-20 18:03:35 +05:30
rohitwaghchaure
f25558b4d7 Merge pull request #51924 from frappe/mergify/bp/version-16-hotfix/pr-51920
perf: prevent duplicate reposting for the same item (backport #51920)
2026-01-20 18:01:21 +05:30
Mihir Kandoi
fef6df709d fix: allow creation of DN in SI for items not having DN reference
(cherry picked from commit b691de0147)
2026-01-20 12:14:59 +00:00
Rohit Waghchaure
3ac431bd50 perf: prevent duplicate reposting for the same item
(cherry picked from commit 7535931571)
2026-01-20 12:09:03 +00:00
diptanilsaha
5d5d208a49 fix(bank_account): validation for is_company_account
(cherry picked from commit 7532ab01d6)
2026-01-20 11:53:16 +00:00
ruthra kumar
9535f3d583 Merge pull request #51916 from frappe/mergify/bp/version-16-hotfix/pr-51671
fix(accounts): add missing accounting dimensions in advance taxes and charges (backport #51671)
2026-01-20 17:19:35 +05:30
Nikhil Kothari
673635e2c3 fix(accounts): add missing accounting dimensions in advance taxes and charges
(cherry picked from commit 22e9cb4cf4)

# Conflicts:
#	erpnext/patches.txt
2026-01-20 17:04:51 +05:30
Rohit Waghchaure
d067e37ab6 fix: validation to check at-least one raw material for manufacture entry
(cherry picked from commit f003b3c378)
2026-01-20 08:25:59 +00:00
Mihir Kandoi
37e241ba15 Merge pull request #51897 from frappe/mergify/bp/version-16-hotfix/pr-51895
fix: overproduction % not considered when making WO from SO (backport #51895)
2026-01-20 13:25:01 +05:30
Mihir Kandoi
fb669eb6f4 fix: overproduction % not considered when making WO from SO
(cherry picked from commit edba9efb5e)
2026-01-20 07:34:24 +00:00
ruthra kumar
232225d753 Merge pull request #51891 from frappe/mergify/bp/version-16-hotfix/pr-51561
fix: delete advance ledger entries  while reconciling payment entry (backport #51561)
2026-01-20 08:17:44 +05:30
ruthra kumar
80cbd851d1 Merge pull request #51893 from frappe/mergify/bp/version-16-hotfix/pr-51886
fix(accounts_controller): make return message translatable (backport #51886)
2026-01-20 08:13:12 +05:30
ruthra kumar
5474ac298d Merge pull request #51884 from frappe/mergify/bp/version-16-hotfix/pr-51830
fix(manufacturing): consider process loss qty while validating the work order (backport #51830)
2026-01-20 08:08:29 +05:30
ruthra kumar
7a9b10a05e Merge pull request #51861 from frappe/mergify/bp/version-16-hotfix/pr-51822
fix(budget variance report): check budget dimensions (backport #51822)
2026-01-20 07:56:49 +05:30
barredterra
621243c1d3 fix(accounts_controller): make return message translatable
(cherry picked from commit 0209f0fe29)
2026-01-20 02:26:48 +00:00
Lakshit Jain
efa5173964 Merge pull request #51561 from ljain112/fic-adv-ple-po
fix: delete advance ledger entries  while reconciling payment entry
(cherry picked from commit aea70c5ec1)
2026-01-20 02:21:34 +00:00
Sudharsanan11
7b3f74609a fix(manufacturing): consider process loss qty while validating the work order
(cherry picked from commit e6366e830c)
2026-01-19 16:18:36 +00:00
Mihir Kandoi
775f6d07b1 Merge pull request #51882 from frappe/mergify/bp/version-16-hotfix/pr-51880
fix: no attribute error on LCV (backport #51880)
2026-01-19 20:30:03 +05:30
Mihir Kandoi
e80ed14456 Merge pull request #51881 from frappe/mergify/bp/version-16-hotfix/pr-51879
fix: no attribute error on subcontracting receipt (backport #51879)
2026-01-19 20:15:55 +05:30
Mihir Kandoi
fe59ace285 fix: no attribute error on LCV
(cherry picked from commit ad11914fca)
2026-01-19 14:35:22 +00:00
Mihir Kandoi
2131c7aadb fix: no attribute error on subcontracting receipt
(cherry picked from commit fbac8b032e)
2026-01-19 14:30:08 +00:00
Diptanil Saha
b7284c7717 Merge pull request #51877 from frappe/mergify/bp/version-16-hotfix/pr-51595 2026-01-19 18:12:07 +05:30
Florian HENRY
6b9107c05c chore: re add older template
(cherry picked from commit b3efb3084f)
2026-01-19 12:23:31 +00:00
Florian HENRY
1ed8857d31 chore: fix bank account type
(cherry picked from commit 4fe1b214c1)
2026-01-19 12:23:31 +00:00
Florian HENRY
a195690bc8 chore: fix CASH acount type
(cherry picked from commit 6a876de838)
2026-01-19 12:23:31 +00:00
Florian HENRY
0c546c9e5a chore: fix bank acount type
(cherry picked from commit 765487a087)
2026-01-19 12:23:30 +00:00
Florian HENRY
11d9fd3dee chore: add Expenses Included In Valuation account
(cherry picked from commit c519cd0268)
2026-01-19 12:23:30 +00:00
Florian HENRY
3bdaab149b feat: remove old French chart of accounts with code as nex 2025 is provided
(cherry picked from commit bf430fce09)
2026-01-19 12:23:30 +00:00
Florian HENRY
ad4ac4e53c chore: Review PR #51595
(cherry picked from commit 6bdaeb983d)
2026-01-19 12:23:30 +00:00
Florian HENRY
9cc9fa59be feat: add new 2025 Charts of Accounts for France
(cherry picked from commit c81dee137f)
2026-01-19 12:23:30 +00:00
rohitwaghchaure
ab2aedd9a2 Merge pull request #51866 from frappe/mergify/bp/version-16-hotfix/pr-51769
fix(pos): reapply set warehouse during cart update (backport #51769)
2026-01-19 15:44:38 +05:30
ravibharathi656
686911546f fix(pos): reapply set warehouse during cart update
(cherry picked from commit 5a53c45321)
2026-01-19 10:07:50 +00:00
rohitwaghchaure
4f3078ab1a Merge pull request #51863 from frappe/mergify/bp/version-16-hotfix/pr-51690
feat: Adding Item name in update item dialog box (backport #51690)
2026-01-19 15:34:47 +05:30
rohitwaghchaure
a950adab79 Merge pull request #51864 from frappe/mergify/bp/version-16-hotfix/pr-51856
fix: qty with serial no count (backport #51856)
2026-01-19 15:34:23 +05:30
Rohit Waghchaure
ae6b3af013 fix: qty with serial no count
(cherry picked from commit 56e58ef301)
2026-01-19 10:00:35 +00:00
Nishka Gosalia
1da8ed202b feat: Adding Item name in update item dialog box
(cherry picked from commit e6133ad6d4)
2026-01-19 10:00:34 +00:00
ervishnucs
a3d860eabf fix(budget variance report): check budget dimensions
(cherry picked from commit cb696a8880)
2026-01-19 09:55:17 +00:00
rohitwaghchaure
adc9dc82ca Merge pull request #51848 from frappe/mergify/bp/version-16-hotfix/pr-51644
Refactor batch bundle get snos sle (backport #51644)
2026-01-19 15:15:20 +05:30
Rohit Waghchaure
79e04ea1fe chore: fix semantic commit message
(cherry picked from commit dfcbee9cc0)
2026-01-19 09:22:45 +00:00
krupalvora
0981b894dd refactor: Batch & Bundle get sle for snos - Added docstring
(cherry picked from commit 22dee50348)
2026-01-19 09:22:45 +00:00
krupalvora
380564a677 refactor: Batch & Bundle get Stock ledger for snos - added posting date in select
(cherry picked from commit 1ccc7365a7)
2026-01-19 09:22:45 +00:00
krupalvora
75deb180fb refactor: Batch & Bundle get Stock ledger for snos v2
(cherry picked from commit a074d81754)
2026-01-19 09:22:45 +00:00
krupalvora
839315752b refactor: Batch & Bundle get Stock ledger for snos
(cherry picked from commit c0149925ad)
2026-01-19 09:22:44 +00:00
Mihir Kandoi
2b4a547e23 Merge pull request #51847 from frappe/mergify/bp/version-16-hotfix/pr-51845
fix(bom): pass company warehouse filter (backport #51845)
2026-01-19 14:18:39 +05:30
22-poojashree
3c533d04f5 fix(bom): pass company warehouse filter
(cherry picked from commit 73bcfc4710)
2026-01-19 08:34:16 +00:00
ruthra kumar
1c214eec98 Merge pull request #51844 from frappe/mergify/bp/version-16-hotfix/pr-51826
fix: common_party_path (backport #51826)
2026-01-19 13:21:14 +05:30
mahsem
aeb2b60450 fix: common_party_path (#51826)
* fix: common_pary_path

* chore: remove non-existent anchor

---------

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
(cherry picked from commit 0c0f43f7f7)
2026-01-19 07:50:30 +00:00
ruthra kumar
1b3f5e1c96 Merge pull request #51841 from frappe/mergify/bp/version-16-hotfix/pr-51513
fix: calculate net profit amount from root node accounts (backport #51513)
2026-01-19 13:05:56 +05:30
mergify[bot]
c830bf6fc7 fix: allow disassemble stock entry without work order (backport #51761) (#51836)
fix: allow disassemble stock entry without work order (#51761)

* fix: allow disassemble stock entry without work order

* fix: use existing functionality to load fg item

* chore: better dict update

(cherry picked from commit 83919119f8)

Co-authored-by: Smit Vora <smitvora203@gmail.com>
2026-01-19 12:54:06 +05:30
ruthra kumar
e2b95da24d Merge pull request #51839 from frappe/mergify/bp/version-16-hotfix/pr-51787
fix: recalculate taxes when item tax template changes after discount (backport #51787)
2026-01-19 12:50:34 +05:30
Navin-S-R
89b44c41a2 fix: calculate net profit amount from root node accounts
(cherry picked from commit c84986d00e)
2026-01-19 07:15:50 +00:00
Lakshit Jain
181141b56a Merge pull request #51787 from ljain112/fix-taxes-disc
fix: recalculate taxes when item tax template changes after discount
(cherry picked from commit f00aeec9b4)
2026-01-19 07:01:52 +00:00
ruthra kumar
5742a5d86a Merge pull request #51834 from frappe/mergify/bp/version-16-hotfix/pr-51742
fix: add other charges in total (backport #51742)
2026-01-19 11:34:22 +05:30
SowmyaArunachalam
68c8dfb24c fix: add other charges in total
(cherry picked from commit 9406c07c42)
2026-01-19 05:45:20 +00:00
Mihir Kandoi
7f54de7926 Merge pull request #51829 from frappe/mergify/bp/version-16-hotfix/pr-51824
fix: setting process loss qty causes fg item qty to be incorrect (backport #51824)
2026-01-18 22:51:58 +05:30
Mihir Kandoi
cb2d4550af fix: setting process loss qty causes fg item qty to be incorrect
(cherry picked from commit 56f5df6847)
2026-01-18 17:21:03 +00:00
Mihir Kandoi
c22d7e16d1 Merge pull request #51821 from frappe/mergify/bp/version-16-hotfix/pr-51817
fix: prevent UOM from updating incorrectly while scanning barcode (backport #51817)
2026-01-18 15:10:56 +05:30
Pandiyan5273
9d5a0e56a0 fix: prevent UOM from updating incorrectly while scanning barcode
(cherry picked from commit 30263b26a5)
2026-01-18 09:36:44 +00:00
mergify[bot]
fcea7603a8 fix: change docfield type to render html format (backport #51795) (#51804)
fix: change docfield type to render html format (#51795)

(cherry picked from commit 3fe5b5c80d)

Co-authored-by: Sowmya <106989392+SowmyaArunachalam@users.noreply.github.com>
2026-01-17 15:12:57 +05:30
ruthra kumar
42ebb7446a Merge pull request #51797 from frappe/mergify/bp/version-16-hotfix/pr-51555
fix(postgres): compute current month sales without DATE_FORMAT (backport #51555)
2026-01-16 17:15:48 +05:30
Matt Howard
49760e4542 fix(postgres): compute current month sales without DATE_FORMAT
(cherry picked from commit 64f391adf7)
2026-01-16 11:29:08 +00:00
Mihir Kandoi
6e1f4d84b6 Merge pull request #51794 from frappe/mergify/bp/version-16-hotfix/pr-51790
fix(stock): resolve quantity issue when adding items via barcode scan (backport #51790)
2026-01-16 16:20:37 +05:30
Pandiyan5273
ab482caac9 fix(stock): resolve quantity issue when adding items via barcode scan
(cherry picked from commit f959b2c59a)
2026-01-16 10:49:36 +00:00
Mihir Kandoi
d8506fb2c0 Merge pull request #51792 from frappe/mergify/bp/version-16-hotfix/pr-51791
fix: dont show certain fields based on permissions (backport #51791)
2026-01-16 16:02:37 +05:30
Mihir Kandoi
d3dfed909e fix: dont show certain fields based on permissions
(cherry picked from commit b3db2981de)
2026-01-16 10:31:39 +00:00
Mihir Kandoi
ac31c5ca19 Merge pull request #51789 from frappe/mergify/bp/version-16-hotfix/pr-51784
fix: add company filters for warehouse (backport #51784)
2026-01-16 15:16:05 +05:30
SowmyaArunachalam
ccab91b9ed fix: add company filters for warehouse
(cherry picked from commit f952b92d71)
2026-01-16 09:44:42 +00:00
Mihir Kandoi
541a8b135a Merge pull request #51785 from frappe/mergify/bp/version-16-hotfix/pr-51693 2026-01-16 14:09:49 +05:30
Mihir Kandoi
c0a30a5302 chore: typo
(cherry picked from commit 8fd1d6aec8)
2026-01-16 08:25:03 +00:00
Mihir Kandoi
accce1fe59 fix: bugs
(cherry picked from commit 19ae405742)
2026-01-16 08:25:03 +00:00
Mihir Kandoi
f04221417e test: add test case
(cherry picked from commit b567184dd7)
2026-01-16 08:25:03 +00:00
Mihir Kandoi
c4c2d35565 feat: support for serial item
(cherry picked from commit 3d0f649411)
2026-01-16 08:25:02 +00:00
Mihir Kandoi
f1e41f4a4f fix: remove already transferred batch
(cherry picked from commit b54067e04d)
2026-01-16 08:25:02 +00:00
Mihir Kandoi
d9326d80de refactor: sample retention stock entry
(cherry picked from commit 8d188cd32b)
2026-01-16 08:25:02 +00:00
ruthra kumar
5c93bf5798 fix: add below-0 column in ar/ap report (backport #51673) (#51780)
Merge pull request #51673 from Jatin3128/ar/ap-future-range-fix

fix: add below-0 column in ar/ap report
(cherry picked from commit c5b0787de6)

Co-authored-by: Jatin3128 <140256508+Jatin3128@users.noreply.github.com>
2026-01-16 12:46:26 +05:30
Jatin3128
f62ad83d6f Merge pull request #51673 from Jatin3128/ar/ap-future-range-fix
fix: add below-0 column in ar/ap report
(cherry picked from commit c5b0787de6)
2026-01-16 06:37:34 +00:00
Ankush Menat
876e2d4e6e build: Update Frappe dependency (#51779) 2026-01-16 11:24:43 +05:30
rohitwaghchaure
4977e06c50 Merge pull request #51772 from frappe/mergify/bp/version-16-hotfix/pr-51768
fix: Show non-SLE vouchers with GL entries in Stock vs Account Value … (backport #51768)
2026-01-15 19:26:45 +05:30
Rohit Waghchaure
e64ae9a8a9 fix: Show non-SLE vouchers with GL entries in Stock vs Account Value Comparison report
(cherry picked from commit 1db9ce205f)
2026-01-15 12:20:36 +00:00
rohitwaghchaure
6ddf4eee15 Merge pull request #51752 from frappe/mergify/bp/version-16-hotfix/pr-51729
fix: valuation rate for non batchwise valuation (backport #51729)
2026-01-15 17:00:32 +05:30
Mihir Kandoi
d27a09cb9f Merge pull request #51755 from frappe/mergify/bp/version-16-hotfix/pr-51753
fix: docs_path (backport #51753)
2026-01-14 21:31:31 +05:30
mahsem
86d5939d91 fix: docs_path
(cherry picked from commit 7ef8c81caf)
2026-01-14 16:00:03 +00:00
Rohit Waghchaure
768c131073 fix: valuation rate for non batchwise valuation
(cherry picked from commit b6312bca9c)
2026-01-14 14:06:50 +00:00
Diptanil Saha
8f77223057 Merge pull request #51748 from frappe/mergify/bp/version-16-hotfix/pr-51730
fix(transaction.js): use flt instead of cint for plc_conversion_rate (backport #51730)
2026-01-14 15:55:13 +05:30
diptanilsaha
8ba470160d fix(transaction.js): use flt instead of cint for plc_conversion_rate
(cherry picked from commit 8b445e04e5)
2026-01-14 10:22:21 +00:00
Mihir Kandoi
1a6264d831 Merge pull request #51737 from frappe/mergify/bp/version-16-hotfix/pr-51684 2026-01-14 11:37:00 +05:30
Mihir Kandoi
19a90c0980 Merge pull request #51736 from frappe/mergify/bp/version-16-hotfix/pr-51295 2026-01-14 11:18:57 +05:30
Pandiyan5273
d57fc49896 test(stock-entry): manufacture entry without work order
(cherry picked from commit 784e338be4)
2026-01-14 05:34:40 +00:00
l0gesh29
fe0431a6d0 chore: modify error msg
(cherry picked from commit f7004aa8c3)
2026-01-14 05:33:39 +00:00
l0gesh29
bfd6375508 fix: add validation for direct return
(cherry picked from commit 8379b39aaf)
2026-01-14 05:33:38 +00:00
l0gesh29
6dade11d8f fix: add validation for return against
(cherry picked from commit ff9b936634)
2026-01-14 05:33:38 +00:00
Logesh Periyasamy
ce421bb1d4 fix: add validation for amount and hours
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
(cherry picked from commit 43d1d685c6)
2026-01-14 05:33:38 +00:00
l0gesh29
84a749e3d0 fix: add validation for duplication
(cherry picked from commit cda8a97f4a)
2026-01-14 05:33:37 +00:00
l0gesh29
65a1c7086b fix: handle return cancellation
(cherry picked from commit 50f73a5072)
2026-01-14 05:33:37 +00:00
l0gesh29
a04da71182 test: add test for partial billing and return
(cherry picked from commit ae594e81f9)
2026-01-14 05:33:37 +00:00
l0gesh29
cbfc13728b fix: include total hours validation in depends on
(cherry picked from commit 57d34ab146)
2026-01-14 05:33:37 +00:00
l0gesh29
9b88275312 feat: add list_view status for partial billing
(cherry picked from commit ff0b37055b)
2026-01-14 05:33:36 +00:00
l0gesh29
332673f260 feat(timesheet): handle partial billing in sales invoice
(cherry picked from commit c87b5d3132)
2026-01-14 05:33:36 +00:00
l0gesh29
e49add20b7 feat: modify field properties
(cherry picked from commit 38a4642479)
2026-01-14 05:33:36 +00:00
Mihir Kandoi
c3b0633eda Merge pull request #51734 from frappe/mergify/bp/version-16-hotfix/pr-51733
fix: add uom js error (backport #51733)
2026-01-14 10:28:24 +05:30
Mihir Kandoi
a660ed061b fix: add uom js error
(cherry picked from commit 6d3f6d73d0)
2026-01-14 04:55:22 +00:00
Frappe PR Bot
0b1c0c36b5 chore(release): Bumped to Version 16.0.1
## [16.0.1](https://github.com/frappe/erpnext/compare/v16.0.0...v16.0.1) (2026-01-13)

### Bug Fixes

* **asset value adjustment:** skip cancelling revaluation journal entry if already cancelled (backport [#51666](https://github.com/frappe/erpnext/issues/51666)) ([#51716](https://github.com/frappe/erpnext/issues/51716)) ([4b85d51](4b85d51257))
* Redirect to Desktop after signup ([#51696](https://github.com/frappe/erpnext/issues/51696)) ([0363b01](0363b01ab7))
* Redirect to Desktop after signup ([#51696](https://github.com/frappe/erpnext/issues/51696)) ([#51697](https://github.com/frappe/erpnext/issues/51697)) ([294fb27](294fb27dc8))
* Redirect to Desktop after signup (backport [#51696](https://github.com/frappe/erpnext/issues/51696)) ([#51714](https://github.com/frappe/erpnext/issues/51714)) ([2118321](211832104c))
* stock module not opened when no warehouses ([3420e21](3420e21d45))
* **tds:** correct tax logic for customer ([50ce61a](50ce61ae02))
2026-01-13 16:20:34 +00:00
Mihir Kandoi
d316ef2306 Merge pull request #51728 from frappe/trigger-release-v16 2026-01-13 21:44:48 +05:30
Mihir Kandoi
af3a7903b3 chore: trigger release 2026-01-13 21:43:30 +05:30
Mihir Kandoi
a66e114a71 Merge pull request #51727 from frappe/change-release-branch 2026-01-13 21:34:26 +05:30
Mihir Kandoi
631b9d3bb0 chore: update release branch from version-13 to version-16 2026-01-13 20:32:48 +05:30
Mihir Kandoi
eb03781718 Merge pull request #51713 from frappe/version-16-hotfix 2026-01-13 20:17:06 +05:30
rohitwaghchaure
eb7cebac91 Merge pull request #51720 from frappe/mergify/bp/version-16-hotfix/pr-51719
fix: stock module not opened when no warehouses (backport #51719)
2026-01-13 17:38:25 +05:30
Rohit Waghchaure
3420e21d45 fix: stock module not opened when no warehouses
(cherry picked from commit 9de3b07223)
2026-01-13 11:49:56 +00:00
Mihir Kandoi
211832104c fix: Redirect to Desktop after signup (backport #51696) (#51714)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
fix: Redirect to Desktop after signup (#51696)
2026-01-13 16:07:20 +05:30
mergify[bot]
4b85d51257 fix(asset value adjustment): skip cancelling revaluation journal entry if already cancelled (backport #51666) (#51716)
Co-authored-by: Navin-S-R <navin@aerele.in>
2026-01-13 16:05:14 +05:30
Nabin Hait
0363b01ab7 fix: Redirect to Desktop after signup (#51696)
(cherry picked from commit 3bc58fb46f)
2026-01-13 09:46:21 +00:00
Mihir Kandoi
fc517f7fa2 Merge pull request #51707 from mihir-kandoi/ci-patch-test-2 2026-01-13 15:11:37 +05:30
ruthra kumar
18451b69e6 Merge pull request #51703 from frappe/mergify/bp/version-16-hotfix/pr-51412
fix(tds): correct tax logic for customer (backport #51412)
2026-01-13 11:41:28 +05:30
ljain112
50ce61ae02 fix(tds): correct tax logic for customer
(cherry picked from commit 86b0f67dbc)
2026-01-13 05:37:32 +00:00
Nabin Hait
294fb27dc8 fix: Redirect to Desktop after signup (#51696) (#51697) 2026-01-12 19:22:24 +05:30
Rohit Waghchaure
c3fdb191b9 Merge branch 'develop' into version-16 2026-01-12 16:20:48 +05:30
Saqib Ansari
ccb4b1fbc4 fix: delete outdated desktop icon & sidebar (#51685) 2026-01-12 16:13:46 +05:30
Saqib Ansari
adec530792 ci: ignore server tests on svg changes (#51687) 2026-01-12 16:12:46 +05:30
Jacob Salvi
b5e0b543f7 chore: new icons share-management (#51682) 2026-01-12 10:18:28 +00:00
Khushi Rawat
e87857cee0 Merge pull request #51678 from khushi8112/asset-toggle-reference-doc
fix(asset): properly reset purchase reference and item fields
2026-01-12 15:46:15 +05:30
Rohit Waghchaure
93db2ebd6f Merge branch 'develop' into version-16 2026-01-12 15:07:27 +05:30
rohitwaghchaure
2925f9a04e chore: weekly release for v16 2026-01-12 14:29:14 +05:30
Nabin Hait
02a9c54b74 fix: Subcontracting settings link should point to subcontracting tab of Buying Settings (#51680) 2026-01-12 14:08:30 +05:30
rohitwaghchaure
c7bf103c0c chore: fix version 2026-01-12 14:04:45 +05:30
Nabin Hait
8434efd11b fix: removed duplicate sidebar link: Tree of procedures (#51679) 2026-01-12 13:22:28 +05:30
khushi8112
671610db1e fix(asset): properly reset purchase reference and item fields 2026-01-12 13:06:48 +05:30
Nabin Hait
1c6bfc9af7 fix: desktop icon for share management and banking (#51676) 2026-01-12 13:06:00 +05:30
Khushi Rawat
b9659a8741 Merge pull request #51630 from aerele/fix/unlink-purchase-flow
fix(asset): remove references  for composite and existing assets
2026-01-12 12:59:32 +05:30
rohitwaghchaure
6dead8fd85 chore: fix version 2026-01-12 12:19:58 +05:30
rohitwaghchaure
e3beca400f Merge pull request #51656 from aerele/fix-material-transfer-transferred-qty
fix(stock entry): calculate transferred quantity using transfer_qty
2026-01-12 12:04:59 +05:30
ruthra kumar
d8ff1595a7 Merge pull request #51662 from frappe/l10n_develop
fix: sync translations from crowdin
2026-01-11 19:03:06 +05:30
ruthra kumar
528de7fbd4 Merge pull request #51664 from ruthra-kumar/reduce_tabs_in_accounts_settings
refactor: UI cleanup in Accounts settings and reports
2026-01-11 19:02:27 +05:30
NaviN
cecd07bbf4 fix(payment reconciliation): handle adhoc payment returns (#51311)
* fix(payment reconciliation): handle reverse payments

* test: validate payment return gain or loss

* chore: typo
2026-01-11 18:57:39 +05:30
ruthra kumar
e66b1a06f4 refactor: remove redundant separators in P&L 2026-01-11 18:38:23 +05:30
ruthra kumar
c15e96c460 refactor: cleanup accounts settings 2026-01-11 18:30:58 +05:30
rohitwaghchaure
78ac8232d8 Merge pull request #51661 from rohitwaghchaure/fixed-single-table-for-better-performance
refactor: single table for better performance
2026-01-11 14:51:50 +05:30
Rohit Waghchaure
8d4a179a8f refactor: single table for better performance 2026-01-11 13:43:09 +05:30
MochaMind
058500e011 fix: Indonesian translations 2026-01-11 12:04:33 +05:30
Navin-S-R
bf2ab32abf test: validate transferred quantity for material transfer entry 2026-01-10 20:13:17 +05:30
Navin-S-R
7e99148357 test: allow from_warehouse while creating material request 2026-01-10 19:42:09 +05:30
Navin-S-R
4e6d86d6f0 fix(stock entry): calculate transferred quantity using transfer_qty 2026-01-10 19:29:25 +05:30
Mihir Kandoi
584c40a1b5 Merge pull request #51652 from mihir-kandoi/so_picked_qty 2026-01-10 18:12:53 +05:30
Mihir Kandoi
1d6d9c2040 fix: pick list qty does not reset when pick list is cancelled 2026-01-10 17:57:31 +05:30
Mihir Kandoi
4cb4b34683 Merge pull request #51648 from mihir-kandoi/gh51636 2026-01-10 15:54:54 +05:30
Mihir Kandoi
7662616721 Merge pull request #51647 from mihir-kandoi/reorder-check-readonly 2026-01-10 15:50:21 +05:30
Mihir Kandoi
9f4bf65768 fix: error message args in sle.py 2026-01-10 15:40:03 +05:30
Mihir Kandoi
7c96a08054 fix: reorder checkbox in MR should be readonly 2026-01-10 15:35:37 +05:30
Diptanil Saha
46e7fedff8 Merge pull request #51633 from diptanilsaha/pos_settings 2026-01-10 13:42:51 +05:30
Soham Kulkarni
e8665864a4 Merge pull request #51641 from sokumon/add-standard-field 2026-01-10 01:22:18 +05:30
sokumon
b6e5b67676 chore: export sidebars for new schema 2026-01-10 00:07:12 +05:30
diptanilsaha
e9c009b564 fix(patch): copy the value of post_change_gl_entries from accounts settings to pos settings 2026-01-09 18:44:56 +05:30
Diptanil Saha
17955337cc Merge pull request #51618 from diptanilsaha/settings_icon 2026-01-09 18:39:49 +05:30
diptanilsaha
34fd4e7043 chore: renaming settings icon to erpnext_setting 2026-01-09 18:20:46 +05:30
diptanilsaha
bf199cc2e0 fix: renaming 'Settings' desktop icon and workspace to 'ERPNext Settings' 2026-01-09 18:20:42 +05:30
diptanilsaha
e4741072a6 fix: moved pos related accounts settings configuration to pos settings 2026-01-09 18:15:14 +05:30
rohitwaghchaure
f23c11256c Merge pull request #51351 from rohitwaghchaure/fixed-serial-no-save-performance-issue
perf: SABB taking time to save the record
2026-01-09 17:45:36 +05:30
Rohit Waghchaure
8e143d68b4 fix: incoming rate calculation 2026-01-09 17:29:34 +05:30
Nabin Hait
79a14f49e1 Revert "chore: export sidebars for new schema" (#51631) 2026-01-09 17:24:17 +05:30
rohitwaghchaure
d3a480200e Merge branch 'develop' into fixed-serial-no-save-performance-issue 2026-01-09 16:57:24 +05:30
nivithamerlin
c1d50c492b fix(asset): remove references for composite and existing asset 2026-01-09 16:36:12 +05:30
rohitwaghchaure
d595a974ee Merge pull request #51628 from rohitwaghchaure/fixed-removed-unused-code
chore: removed unused code
2026-01-09 16:21:53 +05:30
Rohit Waghchaure
b11f20596e chore: removed unused code 2026-01-09 16:03:45 +05:30
Soham Kulkarni
c06a8568bd Merge pull request #51623 from jacob-salvi/new-icons 2026-01-09 15:08:51 +05:30
jacob-salvi
fc9bc36110 chore: update new solid icons 2026-01-09 14:53:09 +05:30
jacob-salvi
67def7dc13 chore: update new icons 2026-01-09 14:50:37 +05:30
Khushi Rawat
cdd7b12279 Merge pull request #51453 from khushi8112/payment-entry-gl-merge
fix(payment_entry): merge GL entries with similar account heads based on setting
2026-01-08 23:43:08 +05:30
Diptanil Saha
3a995ba260 Merge pull request #51613 from diptanilsaha/pos_item_selector_ui_ux 2026-01-08 23:05:36 +05:30
diptanilsaha
4d8d29b0df fix: animate on item load 2026-01-08 22:21:15 +05:30
diptanilsaha
02cefa8bdb fix: item group field clear button 2026-01-08 22:21:15 +05:30
diptanilsaha
aef2e2794b fix: race condition 2026-01-08 22:21:15 +05:30
diptanilsaha
069f28feeb fix(pos): item selector section ui/ux 2026-01-08 22:21:15 +05:30
Soham Kulkarni
62270af65b Merge pull request #51604 from sokumon/new-sidebar-schema 2026-01-08 22:13:02 +05:30
rohitwaghchaure
5139442205 Merge pull request #51607 from rohitwaghchaure/fixed-item-not-found
fix: item not found
2026-01-08 19:58:11 +05:30
Rohit Waghchaure
5eb062c065 fix: item not found 2026-01-08 19:40:18 +05:30
rohitwaghchaure
20f6e37b65 Merge pull request #51507 from elshafei-developer/fix-add-missing-translate-function
fix: add missing translation function for company default error message
2026-01-08 19:33:03 +05:30
sokumon
c5ce14dc14 chore: export sidebars for new schema 2026-01-08 18:51:01 +05:30
Soham Kulkarni
b5d0e85b59 Merge pull request #51600 from nabinhait/accounts-workspace-cleanup 2026-01-08 18:45:53 +05:30
Soham Kulkarni
7db70742e8 Merge pull request #51599 from nabinhait/financial-reports-workspace 2026-01-08 18:39:22 +05:30
Nabin Hait
b0a04e202a fix: Removed opening and closing workspace 2026-01-08 18:02:32 +05:30
Nabin Hait
721b29c8df fix: Added AR, AP, Sales and Purchase Register reports 2026-01-08 17:56:55 +05:30
ruthra kumar
f4f02458ef Merge pull request #51534 from aerele/fix/support-56421
fix(accounts): correct sales order item deletion message for MR and PO linkage
2026-01-08 17:39:21 +05:30
rohitwaghchaure
e5b93d85e6 Merge pull request #51574 from aerele/fix/support-56834
fix(stock): enable allow on submit for tracking status field
2026-01-08 16:30:02 +05:30
rohitwaghchaure
e4a0bc2d5f Merge pull request #51594 from nabinhait/debit-credit-note-links
fix: Workspace sidebar links for Debit/Credit Notes
2026-01-08 16:13:52 +05:30
Nabin Hait
8acf373e68 fix: Workspace sidebar links for Debit/Credit Notes 2026-01-08 15:23:40 +05:30
Nabin Hait
10a3f61689 fix: erpnext workspaces cleanup (#51461) 2026-01-08 15:03:11 +05:30
rohitwaghchaure
3c13543c24 Merge pull request #51514 from rohitwaghchaure/fixed-purchase-return-issue
fix: purchase return issue
2026-01-08 14:46:45 +05:30
rohitwaghchaure
3906bf450e Merge pull request #51586 from rohitwaghchaure/fixed-support-54626
fix: negative stock issue for higher precision
2026-01-08 14:36:37 +05:30
Mihir Kandoi
69597329e9 Merge pull request #51585 from mihir-kandoi/st56826 2026-01-08 14:22:36 +05:30
Rohit Waghchaure
87be020c78 fix: negative stock issue for higher precision 2026-01-08 14:11:52 +05:30
Mihir Kandoi
d0ba365aaa fix: closed WO becomes open when RM is returned 2026-01-08 14:07:14 +05:30
ruthra kumar
d82bf43684 fix: sync translations from crowdin (#51579)
fix: Swedish translations
2026-01-08 14:05:25 +05:30
Mihir Kandoi
cfa00829a8 Merge pull request #51583 from mihir-kandoi/st56954 2026-01-08 13:31:19 +05:30
Mihir Kandoi
190204a939 fix: allow all users of supplier to create purchase invoices 2026-01-08 13:14:34 +05:30
Logesh Periyasamy
bc63c85daf fix(accounting-dimension): System-generated round-off GL entries fail to set the accounting dimension (#51167)
* chore: remove disabled condition statement

* fix: add default dimension for round off gle

* fix: validate report type to handle opening entries roundoff
2026-01-08 12:05:36 +05:30
MochaMind
dbab929016 fix: Swedish translations 2026-01-08 11:26:58 +05:30
Pandiyan5273
1bfb62465f fix(stock): enable allow on submit for tracking status field 2026-01-07 19:27:16 +05:30
ruthra kumar
dd94e51d66 Merge pull request #51400 from Jatin3128/quick-entry-address-fix
fix(supplier): avoid mandatory_depends_on trigger from prefetched country in quick entry
2026-01-07 17:13:40 +05:30
ruthra kumar
fd0ed04979 Merge pull request #51294 from Jatin3128/subscription-grace-status
fix(subscription): add grace period status while invoice in grace period
2026-01-07 17:10:17 +05:30
rohitwaghchaure
f111d97444 Merge pull request #51550 from rohitwaghchaure/fixed-modified-date
fix: modified date not updated
2026-01-07 13:06:17 +05:30
ruthra kumar
ae7aa19afc Merge pull request #51192 from aerele/bank-clearance-tool
fix: add comment and validation for clearance date updation
2026-01-07 12:50:27 +05:30
ruthra kumar
772847c0d3 Merge pull request #51542 from aerele/fix/filter_in_mode_of_payment
fix(mode of payment): use valid syntax
2026-01-07 12:45:27 +05:30
ruthra kumar
ed1f1110c7 Merge pull request #51199 from Jatin3128/subscription_date_fix
fix(subscription): add cancellation and date validation
2026-01-07 12:43:42 +05:30
l0gesh29
24c8cfe128 fix: add comment and validation for clearance date updation 2026-01-07 12:36:25 +05:30
ruthra kumar
5fa9e0421c Merge pull request #51560 from frappe/l10n_develop
fix: sync translations from crowdin
2026-01-07 11:26:27 +05:30
MochaMind
103e4aaa93 fix: Bosnian translations 2026-01-07 11:06:06 +05:30
MochaMind
6729d3d1ca fix: Croatian translations 2026-01-07 11:06:03 +05:30
MochaMind
66425462ba fix: Swedish translations 2026-01-07 11:05:59 +05:30
MochaMind
e675c76628 fix: Hungarian translations 2026-01-07 11:05:56 +05:30
Diptanil Saha
57624e1e33 Merge pull request #51551 from diptanilsaha/pos_whitespace 2026-01-06 22:00:58 +05:30
Rohit Waghchaure
3acc3e6ad1 fix: modified date not updated 2026-01-06 21:05:05 +05:30
ruthra kumar
2dcba90afc Merge pull request #51528 from trustedcomputer/change-payment-references-float-to-currency
fix: change float types in payment entry reference table to currency
2026-01-06 20:50:25 +05:30
ruthra kumar
ede0dcd58a Merge pull request #51454 from Jatin3128/gh_38620
fix(Accounting Period): allow GL entries for exempted roles
2026-01-06 20:40:37 +05:30
Mihir Kandoi
a7be255261 Merge pull request #51536 from sokumon/deprecate-moduldes 2026-01-06 20:34:55 +05:30
Mihir Kandoi
015529a321 fix: change http to https 2026-01-06 20:20:25 +05:30
MochaMind
f5aaa1139c fix: sync translations from crowdin (#51404) 2026-01-06 14:55:41 +01:00
Rohit Waghchaure
d420ec0b22 fix: purchase return issue 2026-01-06 19:02:33 +05:30
Rohit Waghchaure
20320c4a6c perf: SABB taking time to save the record 2026-01-06 18:47:35 +05:30
rohitwaghchaure
e0f6f2a600 Merge pull request #51163 from aerele/mr-product-bundle
fix(material-request): get remaining qty on partial transaction with product bundle
2026-01-06 18:16:43 +05:30
ervishnucs
6cd4ef694e fix(mode of payment): use valid syntax 2026-01-06 18:13:26 +05:30
ruthra kumar
e432a88ec1 Merge pull request #51544 from ruthra-kumar/unsaved_bug_in_gain_loss_journal
fix: unsaved status on opening gain loss journal
2026-01-06 17:47:25 +05:30
ruthra kumar
8fdf6a9ac6 Merge pull request #51424 from Jatin3128/trial-balance-party-fix
fix(trial balance party): add check for parties with zero credit and debit
2026-01-06 17:47:04 +05:30
ruthra kumar
e5b02e81a9 fix: unsaved status on opening gain loss journal 2026-01-06 17:45:11 +05:30
diptanilsaha
a36331c393 fix(pos): removed white space from the bottom of pos screen 2026-01-06 16:09:48 +05:30
Khushi Rawat
b63d069635 Merge pull request #51540 from khushi8112/allow-data-import-for-asset-repiar
feat: allow data import for asset repair doctype
2026-01-06 16:08:29 +05:30
Khushi Rawat
feb4bf394a Merge pull request #51405 from khushi8112/fix-budget-variance-report
refactor: budget variance report
2026-01-06 16:05:46 +05:30
khushi8112
49f1688a51 feat: allow data import for asset repair doctype 2026-01-06 15:49:03 +05:30
sokumon
fd6683e196 fix: add deprecation message 2026-01-06 15:02:36 +05:30
Pandiyan5273
5a47503611 fix(accounts): correct sales order item deletion message for MR and PO linkage 2026-01-06 12:58:54 +05:30
khushi8112
07a69a073d refactor: optimize budget variance report queries 2026-01-06 12:25:14 +05:30
Sowmya
f8f82ccf31 Merge pull request #51458 from aerele/default-age-range
feat: add default-age-range in accounts settings
2026-01-06 11:07:28 +05:30
Mihir Kandoi
54cbe4222d Merge pull request #51530 from mihir-kandoi/fix-email-details-visibility 2026-01-06 10:47:03 +05:30
Mihir Kandoi
f222d3a37b fix: email details should be visible if emails are to be sent 2026-01-06 10:32:02 +05:30
trustedcomputer
8ba71300db fix: change float types in payment entry reference table to currency 2026-01-05 14:21:31 -08:00
Jatin3128
7a4cd3ac33 fix(Accounting Period): allow GL entries for exempted roles 2026-01-06 03:31:52 +05:30
khushi8112
7f6e509e20 refactor: more code cleanup 2026-01-06 01:25:56 +05:30
khushi8112
f786c16a7d refactor: better function and variable name 2026-01-06 01:05:10 +05:30
khushi8112
53b13501a9 fix: get correct total budget data 2026-01-06 00:40:32 +05:30
khushi8112
244319bf1d fix: show budget variance chart 2026-01-05 18:48:17 +05:30
khushi8112
f6a4f696a1 fix: Show Cumulative Amount based on checkbox in filter 2026-01-05 18:43:20 +05:30
rohitwaghchaure
afc5dda372 Merge pull request #51506 from rohitwaghchaure/fixed-reposting-for-transaction
fix: reposting fixes for transaction based and parallel reposting
2026-01-05 18:29:50 +05:30
Khushi Rawat
140d13cfb3 Merge pull request #51504 from khushi8112/fiscal-year-not-found-error
fix: use non-standard-fieldname for budget
2026-01-05 16:44:36 +05:30
elshafei-developer
0950e67eea fix: add missing translation function for company default error message 2026-01-05 10:49:35 +00:00
Rohit Waghchaure
31a147126e fix: reposting fixes for transaction based and parallel reposting 2026-01-05 16:17:33 +05:30
Mihir Kandoi
72aa27a87f Merge pull request #51503 from mihir-kandoi/rfq-email-refactor 2026-01-05 15:11:14 +05:30
Mihir Kandoi
9cb5768fea refactor: RFQ email process 2026-01-05 14:50:18 +05:30
khushi8112
01c560eb99 refactor: remove budget reference from monthly distribution dashboard 2026-01-05 14:38:33 +05:30
khushi8112
fa0ac8db4d fix: use non-standard-fieldname-for-bdget 2026-01-05 14:37:38 +05:30
Diptanil Saha
57c6f4ffb6 Merge pull request #51500 from diptanilsaha/pos_ui_ux 2026-01-05 13:32:46 +05:30
diptanilsaha
84612d676b fix(pos): hide sidebar 2026-01-05 13:25:31 +05:30
Mihir Kandoi
c7a81161c7 Merge pull request #51495 from mihir-kandoi/gh51193 2026-01-05 12:36:33 +05:30
Mihir Kandoi
aac39b2671 fix: bom item code getting fg item name on row add 2026-01-05 12:32:10 +05:30
ruthra kumar
028cd97ee1 Merge pull request #51326 from aerele/fix-background-jv-submission
fix(journal entry): use submission_queue to perform submit and cancel actions for rows over 100
2026-01-05 12:21:46 +05:30
ruthra kumar
c297282fa5 Merge pull request #51457 from aerele/project-filters-jv
fix: add company filters to project
2026-01-05 10:52:40 +05:30
ruthra kumar
522e4887ca Merge pull request #51467 from aerele/pcv-account-filter
fix: update filters on period closing voucher
2026-01-05 10:49:53 +05:30
rohitwaghchaure
bd94deee62 Merge pull request #51476 from rohitwaghchaure/fixed-purchase-serial-no-return-issue
fix: not able to make purchase return for serial nos
2026-01-05 10:04:09 +05:30
Rohit Waghchaure
344572cf87 fix: not able to make purchase return for serial nos 2026-01-04 19:47:33 +05:30
rohitwaghchaure
fc9496a36b Merge pull request #51475 from rohitwaghchaure/fixed-stock-reco-cancel-issue
fix: SABB not cancelled on cancel of Stock Reco
2026-01-03 16:16:25 +05:30
Rohit Waghchaure
b204853193 fix: SABB not cancelled on cancel of Stock Reco 2026-01-03 15:59:25 +05:30
rohitwaghchaure
2d5d03e63a Merge pull request #51468 from rohitwaghchaure/fixed-support-56624
fix: not able to submit backdated stock reco
2026-01-03 15:21:22 +05:30
Rohit Waghchaure
cccd34b06a fix: not able to submit backdated stock reco 2026-01-03 15:01:30 +05:30
SowmyaArunachalam
7ab1e1f677 fix: update filters on period closing voucher 2026-01-03 14:15:03 +05:30
diptanilsaha
daabb42ad7 fix(pos): remove full screen feature 2026-01-03 11:53:40 +05:30
Mihir Kandoi
3d4c8d6d35 Merge pull request #51462 from mihir-kandoi/gh51459 2026-01-02 23:07:11 +05:30
Mihir Kandoi
247cc1d53e fix: multiple issues 2026-01-02 20:53:44 +05:30
Soham Kulkarni
2eb448d4b4 Merge pull request #51452 from sokumon/export-desktop-icons 2026-01-02 19:48:27 +05:30
Mihir Kandoi
7308021aa8 fix: use SABB posting_datetime instead of posting_date 2026-01-02 19:32:39 +05:30
rohitwaghchaure
82b49f5d9d Merge pull request #51451 from rohitwaghchaure/fixed-removed-forecasting_method
chore: removed forecasting method holt winter
2026-01-02 18:35:21 +05:30
Nabin Hait
b9e8b2808a fix: JSON decode error (#51301) 2026-01-02 18:32:52 +05:30
Mihir Kandoi
d4702ac232 Merge pull request #51455 from nishkagosalia/gh-51383 2026-01-02 17:05:58 +05:30
Nishka Gosalia
f622996c48 fix: disallowing overlapping time logs in allow on submit mode 2026-01-02 16:50:20 +05:30
khushi8112
b8b55754c8 fix: breaking test 2026-01-02 16:39:23 +05:30
khushi8112
7baa75faa5 fix: add back test record - removed for debugging 2026-01-02 16:13:54 +05:30
khushi8112
6147f9c6a3 test: add tests for merging GL entries based on Accounts Settings 2026-01-02 16:11:32 +05:30
SowmyaArunachalam
7c16db567b fix: add company filters to project 2026-01-02 16:05:36 +05:30
sokumon
83bc8744bb chore: reexport desktop icons with new schema 2026-01-02 15:42:26 +05:30
Rohit Waghchaure
fd5b84fe1a chore: removed forecasting_method holt winter 2026-01-02 15:21:01 +05:30
khushi8112
59f5ee7b63 fix(payment_entry): merge GL entries with similar account heads based on setting 2026-01-02 15:09:30 +05:30
Abdeali Chharchhodawala
4632ddc497 Merge pull request #51078 from Abdeali099/custom-financial-statement-pdf-export 2026-01-02 13:29:49 +05:30
Mihir Kandoi
7bb0ec836f Merge pull request #51441 from mihir-kandoi/semgrep-autofixes 2026-01-01 22:11:32 +05:30
Mihir Kandoi
ca568a01f5 fix: autofixes by semgrep 2026-01-01 21:56:12 +05:30
Mihir Kandoi
06fd0f8084 Merge pull request #51439 from frappe/revert-51434-semgrep-autofix 2026-01-01 18:22:07 +05:30
Mihir Kandoi
cc6cb5d1af Revert "fix: autofixes by semgrep" 2026-01-01 18:07:34 +05:30
Mihir Kandoi
6c6bf306d3 Merge pull request #51434 from mihir-kandoi/semgrep-autofix 2026-01-01 18:06:02 +05:30
rohitwaghchaure
43e859b093 Merge pull request #51436 from rohitwaghchaure/fixed-github-43596
fix: do not sum quantities for similar items across different operations
2026-01-01 17:43:24 +05:30
Rohit Waghchaure
855dd4162f fix: do not sum quantities for similar items across different operations 2026-01-01 17:20:10 +05:30
rohitwaghchaure
28a49a21ee Merge pull request #51432 from rohitwaghchaure/fixed-github-43967
fix: LCV rate not updated based on PI rate if PI created from PO
2026-01-01 16:26:08 +05:30
Rohit Waghchaure
50b30fce4a fix: LCV rate not updated based on PI rate if PI created from PO 2026-01-01 16:06:52 +05:30
Mihir Kandoi
debd3c6886 fix: autofixes by semgrep 2026-01-01 15:59:44 +05:30
Jatin3128
83ddaf1696 fix(trial balance party): add check for parties with zero credit and debit 2026-01-01 13:49:09 +05:30
Ankush Menat
f79e7dd806 build: bump required python version (#51421)
closes https://github.com/frappe/erpnext/issues/51420
2026-01-01 12:26:52 +05:30
rohitwaghchaure
9854b146a5 Merge pull request #51427 from rohitwaghchaure/fixed-github-48006
fix: avoid duplicate items under the same parent in bom creator
2026-01-01 12:25:10 +05:30
Nabin Hait
b93f920592 fix: sidebar items for accounts (#51418) 2026-01-01 12:24:39 +05:30
Rohit Waghchaure
45fe7f2875 fix: avoid duplicate items under the same parent in bom creator 2026-01-01 12:03:37 +05:30
Khushi Rawat
1fba6fc2f4 Merge pull request #51426 from khushi8112/refactor-workspace-sidebar-for-budget
refactor: remove monthly distribution doctype from sidebar
2026-01-01 11:52:10 +05:30
khushi8112
7e81be7b8c refactor: remove monthly distribution doctype from sidebar 2026-01-01 11:34:32 +05:30
Mihir Kandoi
767bb534c0 Merge pull request #51419 from mihir-kandoi/actual-qty-mat-rcpt 2025-12-31 18:07:45 +05:30
Mihir Kandoi
349db6cfaf fix: actual qty resets to 0 on save of material receipt 2025-12-31 17:52:36 +05:30
Mihir Kandoi
73e7c38bc7 Merge pull request #51414 from nishkagosalia/gh-51382 2025-12-31 15:50:54 +05:30
ruthra kumar
7811c08e2b Merge pull request #51409 from ljain112/fix-tds-manual-entry-taxes
fix(tds): always update item taxable value
2025-12-31 15:13:53 +05:30
Nishka Gosalia
aefd36e050 fix: task actual hours calculation correction post timesheet update after submit 2025-12-31 15:11:50 +05:30
Mihir Kandoi
87d00a373f Merge pull request #51305 from mihir-kandoi/gh45824 2025-12-31 09:26:38 +00:00
ljain112
410a4b20af fix: always update item taxable value 2025-12-31 13:03:30 +05:30
khushi8112
f56a673baa refactor: formatted code 2025-12-31 11:40:38 +05:30
khushi8112
24757465ce fix: consider dimension filter while generating report 2025-12-31 11:40:38 +05:30
khushi8112
c57a43b3f4 fix: distribute non-monthly budgets across months when creating budget map 2025-12-31 11:40:38 +05:30
khushi8112
e3fb7f4c47 fix: include budget with for multiple fiscal years 2025-12-31 11:40:38 +05:30
khushi8112
8108fe4ca5 fix: correct query of fetching budget records 2025-12-31 11:40:37 +05:30
khushi8112
8ebd1fd029 refactor: budget variance report 2025-12-31 11:40:37 +05:30
Jatin3128
a450f7a00d fix(supplier): avoid mandatory_depends_on trigger from prefetched country in quick entry 2025-12-31 04:45:28 +05:30
Mihir Kandoi
cb5926f59b Revert "fix: purchase receipt item showing wrong expense account" (#51398) 2025-12-30 14:44:57 +00:00
rohitwaghchaure
0c08fb9303 Merge pull request #51341 from aerele/fix/remove-item-image
fix(stock): remove item image to avoid setting the image of previous item
2025-12-30 16:49:55 +05:30
rohitwaghchaure
732b04f37c Merge pull request #51375 from aerele/fix/stock-reservation-entry
fix(stock): prevent excess stock reservation
2025-12-30 16:49:18 +05:30
Mihir Kandoi
016170b08c Merge pull request #51255 from mihir-kandoi/read-only-job-card-employee 2025-12-30 16:08:14 +05:30
ruthra kumar
566d1a1ee2 Merge pull request #51340 from aerele/bank-reconciliation-pass-company-bank-account
fix(bank reconciliation tool): carry bank account to payment entry
2025-12-30 15:57:26 +05:30
Sudharsanan11
e1f9adf4e9 fix(stock): prevent excess stock reservation 2025-12-30 15:16:49 +05:30
Khushi Rawat
ae9c9f7570 Merge pull request #51380 from khushi8112/purchase-receipt-item-expense-account-query
fix: expense_account query override in Purchase Receipt
2025-12-30 12:56:06 +05:30
Mihir Kandoi
1416ae3fb2 Merge pull request #51374 from mihir-kandoi/gh45169 2025-12-30 12:51:10 +05:30
Mihir Kandoi
c249638ebb Merge pull request #51377 from mihir-kandoi/gh47785 2025-12-30 12:31:02 +05:30
ruthra kumar
d24a68b206 Merge pull request #51356 from Jatin3128/cost-center-fix
fix(subscription): added the cost center from the subscription plan to invoice item
2025-12-30 12:30:24 +05:30
Mihir Kandoi
1097d6eef1 fix: add missing GTIN-14 barcode 2025-12-30 12:25:34 +05:30
ruthra kumar
a9b3839c3c Merge pull request #51368 from Ponnusamy1-V/error-when-reposting-on-background
fix: start reposting accounting ledger after commit
2025-12-30 12:22:56 +05:30
Mihir Kandoi
2860d5a406 fix: variant creation with translation 2025-12-30 12:14:43 +05:30
Mihir Kandoi
b8ecefa06c fix: add missing patch 2025-12-30 12:10:46 +05:30
khushi8112
292a51c160 fix: expense_account query override in Purchase Receipt 2025-12-30 12:05:48 +05:30
Ponnusamy
469a1ade79 fix: start reposting accounting ledger after commit 2025-12-30 06:33:38 +00:00
Mihir Kandoi
acb30dc6ac Merge pull request #51338 from mihir-kandoi/gh43256 2025-12-30 11:53:32 +05:30
Mihir Kandoi
43cdca950f fix: type in barcode type 2025-12-30 06:23:08 +00:00
Mihir Kandoi
e2e2e78b65 Merge pull request #51376 from mihir-kandoi/gh45649 2025-12-30 11:52:28 +05:30
Mihir Kandoi
0c43c07cf6 fix: purchase receipt item showing wrong expense account (#51362) 2025-12-30 11:51:50 +05:30
ruthra kumar
875bf5c8a9 Merge pull request #51361 from aerele/payment-entry-clear-party-name-in-internal-transfer
fix(payment entry): clear party_name for internal transfer
2025-12-30 11:47:17 +05:30
Mihir Kandoi
b30ffc561b fix: misleading and confusing item variants field copy message 2025-12-30 11:18:05 +05:30
ruthra kumar
8fa047f96d Merge pull request #51171 from nabinhait/party_merge_validation
fix: validate party's existing transaction currency before merging
2025-12-30 10:21:37 +05:30
ruthra kumar
4a30634942 Merge pull request #51165 from nabinhait/bank-clearance-ux
fix: update button was getting frozen after validation
2025-12-30 10:09:01 +05:30
Sudharsanan11
69e94248c1 fix(stock): remove item image to avoid setting the image of previous item 2025-12-29 16:16:04 +05:30
Mihir Kandoi
8fb8f32ad6 Merge pull request #51364 from mihir-kandoi/gh51357 2025-12-29 15:32:30 +05:30
Mihir Kandoi
da899913b8 fix: RFQ does not fetch html response 2025-12-29 15:03:59 +05:30
Nishka Gosalia
41a7e64772 feat: Adding support for discarding document (#51316)
Co-authored-by: Nishka Gosalia <nishkagosalia@Nishkas-MacBook-Air.local>
2025-12-29 08:49:46 +00:00
ravibharathi656
aae0448e1f fix(payment entry): clear party_name for internal transfer 2025-12-29 12:06:28 +05:30
ruthra kumar
9f0f4d6709 Merge pull request #51358 from frappe/l10n_develop
fix: sync translations from crowdin
2025-12-29 10:52:58 +05:30
MochaMind
7b4cb629de fix: Persian translations 2025-12-29 10:05:29 +05:30
Jatin3128
3ef66f65b9 fix(subscription): added the cost center from the subscription plan to invoice item 2025-12-29 01:34:32 +05:30
MochaMind
70f1d3ca47 fix: sync translations from crowdin (#51246)
* fix: Slovenian translations

* fix: Persian translations

* fix: Serbian (Latin) translations

* fix: French translations

* fix: Spanish translations

* fix: Arabic translations

* fix: Czech translations

* fix: Danish translations

* fix: German translations

* fix: Hungarian translations

* fix: Italian translations

* fix: Dutch translations

* fix: Polish translations

* fix: Portuguese translations

* fix: Russian translations

* fix: Serbian (Cyrillic) translations

* fix: Swedish translations

* fix: Turkish translations

* fix: Chinese Simplified translations

* fix: Vietnamese translations

* fix: Portuguese, Brazilian translations

* fix: Indonesian translations

* fix: Tamil translations

* fix: Thai translations

* fix: Croatian translations

* fix: Burmese translations

* fix: Bosnian translations

* fix: Norwegian Bokmal translations

* fix: Esperanto translations

* fix: Persian translations

* fix: Serbian (Latin) translations

* fix: Serbian (Cyrillic) translations

* fix: Persian translations
2025-12-28 20:07:19 +01:00
Jatin3128
68ccb961f1 test(subscription): add auto-completion/cancellation test case 2025-12-28 21:29:44 +05:30
Jatin3128
20dc93a4b7 fix(subscription): complete subscription if no outstanding invoices 2025-12-28 21:02:21 +05:30
Mihir Kandoi
bf791ae716 Merge pull request #51349 from KerollesFathy/fix-type-error 2025-12-28 14:47:52 +05:30
KerollesFathy
44d85b0764 fix: get_item_details error 2025-12-27 18:26:32 +00:00
Mihir Kandoi
b3526599dd Merge pull request #51343 from frappe/revert-51259-gh-51233 2025-12-26 21:58:29 +05:30
Mihir Kandoi
bce4ec20e5 Merge pull request #51330 from aerele/fix/purchase-receipt-trends 2025-12-26 21:49:19 +05:30
Mihir Kandoi
30d4d53171 Revert "fix: company creation for Italy country" 2025-12-26 21:38:58 +05:30
ravibharathi656
9dfb0fdcbb fix(bank reconciliation tool): fix incorrect bank account field mapping 2025-12-26 20:41:01 +05:30
ravibharathi656
6fc9636642 fix(bank reconciliation tool): carry bank account to payment entry 2025-12-26 18:00:08 +05:30
Mihir Kandoi
db9ce998e1 test: remove invalid test case 2025-12-26 17:33:09 +05:30
Mihir Kandoi
11db07c42e fix: division in supplier score criteria throws zero division error 2025-12-26 16:33:57 +05:30
Khushi Rawat
5f4185ede9 Merge pull request #51325 from khushi8112/budget-migration-accounting-dimensions
fix: budget migration for accounting dimensions
2025-12-26 11:55:05 +05:30
Raffael Meyer
b6cb9d4799 fix: don't duplicate default income account to Item (#50413)
* fix: don't duplicate default income account to Item

Only store _Default Income Account_ in **Item** if it's different from the **Company**'s  _Default Income Account_.

Resolves #48231

* refactor: move db call out of loop

* docs: add docstring
2025-12-25 10:22:37 +01:00
Sudharsanan11
7df349844a fix(stock): remove total bar in chart view 2025-12-25 13:56:17 +05:30
ruthra kumar
73daad0fc9 Merge pull request #51222 from aerele/restore-old-records
fix: set posting time during restore
2025-12-25 10:28:00 +05:30
Navin-S-R
fa8e80c6a0 fix(journal entry): use submission_queue to perform submit and cancel actions for rows over 100 2025-12-25 10:18:33 +05:30
rohitwaghchaure
aebcd010ba Merge pull request #51322 from rohitwaghchaure/composite-index-for-serial-no
perf: composite index for serial no
2025-12-25 09:09:38 +05:30
khushi8112
8dacfdf287 fix: budget migration for accounting dimensions 2025-12-25 00:52:24 +05:30
Mihir Kandoi
0050898762 Merge pull request #50826 from Abdeali099/bulk-update-picked-qty 2025-12-24 21:34:54 +05:30
Rohit Waghchaure
734d553338 perf: composite index for serial no 2025-12-24 20:15:04 +05:30
ruthra kumar
ca31a94c76 Merge pull request #51286 from ruthra-kumar/refactor_workspace_charts
refactor: cleanup accounting workspace and charts
2025-12-24 19:54:34 +05:30
ruthra kumar
666c77dd91 refactor: accounting workspace 2025-12-24 19:34:57 +05:30
ruthra kumar
20654acdd7 refactor: update icon and chart in financial report workspace 2025-12-24 19:34:57 +05:30
ruthra kumar
e8777d4f72 refactor: remove workspace for receivable and payable 2025-12-24 19:34:57 +05:30
ruthra kumar
3ebff7e236 refactor: number cards in selling 2025-12-24 19:34:43 +05:30
ruthra kumar
f44a181c81 refactor: remove columns from chart labels 2025-12-24 19:02:59 +05:30
ruthra kumar
4a8ed972d0 refactor: subscription and budget sidebars 2025-12-24 19:02:59 +05:30
ruthra kumar
ca2ddd5d92 refactor: banking sidebar 2025-12-24 19:02:59 +05:30
ruthra kumar
201dbad545 refactor: remove redundant icons 2025-12-24 19:02:59 +05:30
ruthra kumar
c44adc6d98 refactor: add opening and closing to Accounting sidebar 2025-12-24 19:02:59 +05:30
ruthra kumar
9580a3c9f7 refactor: add charts to financial statements workspace 2025-12-24 19:02:59 +05:30
ruthra kumar
941b70a185 refactor: reorder icon in ERPNext desktop dialog 2025-12-24 19:02:59 +05:30
ruthra kumar
232cc16bbb refactor: add process payment reconciliation to sidebar 2025-12-24 19:02:56 +05:30
ruthra kumar
96829787b9 refactor: move receivables and payables outside of group 2025-12-24 19:02:32 +05:30
ruthra kumar
b55afe36c8 refactor: tidy up accounts workspace and dashboard 2025-12-24 19:02:29 +05:30
Mihir Kandoi
c7069df4b4 Merge pull request #51306 from mihir-kandoi/gh40171 2025-12-24 16:55:11 +05:30
rohitwaghchaure
46f8cfd228 Merge pull request #51293 from rohitwaghchaure/fixed-test-case-to-handle-complex-cases
test: test cases to handle complex cases
2025-12-24 15:34:10 +05:30
Rohit Waghchaure
dd18d78c10 test: test cases to handle complex cases 2025-12-24 15:05:35 +05:30
rohitwaghchaure
6cb6cbb00b Merge pull request #51310 from rohitwaghchaure/fixed-index-for-serial-no
perf: index for warehouse field
2025-12-24 14:59:16 +05:30
Rohit Waghchaure
23c70332df perf: index for warehouse field 2025-12-24 14:31:12 +05:30
Soham Kulkarni
278fd072c3 Merge pull request #51308 from sokumon/desktop-icons 2025-12-24 14:25:39 +05:30
sokumon
fc92458378 chore: rename corrrect desktop icon 2025-12-24 14:08:53 +05:30
Diptanil Saha
a35216a668 Merge pull request #51304 from diptanilsaha/ral_preview 2025-12-24 12:52:12 +05:30
Mihir Kandoi
175d262b94 fix: correctly copy serial/batch from cancelled doc 2025-12-24 12:45:09 +05:30
diptanilsaha
bd9f5fca08 fix(repost accounting ledger): prevent preview generation when no vouchers are selected 2025-12-24 11:52:48 +05:30
SowmyaArunachalam
f523c7889e fix: update remaining qty calculation 2025-12-23 22:02:57 +05:30
Mihir Kandoi
ca00b46507 Merge pull request #51256 from aerele/fix/validate-delivered-qty 2025-12-23 21:31:20 +05:30
SowmyaArunachalam
88dd869a11 fix(material-request): consider delivered qty for remaining qty calculation 2025-12-23 21:20:15 +05:30
Mihir Kandoi
4e04d5d1bc Merge pull request #48347 from iamkhanraheel/add-supplier_group-permission 2025-12-23 21:14:49 +05:30
SowmyaArunachalam
f2160a0629 chore: check 2nd row value 2025-12-23 21:14:06 +05:30
SowmyaArunachalam
9ca3d00eb7 test(marterial-request): validate partial transaction with product bundle 2025-12-23 21:14:06 +05:30
SowmyaArunachalam
6ade609dd6 fix(material-request): get remaining qty on partial transaction with product bundle 2025-12-23 21:14:06 +05:30
iamkhanraheel
e84c84975c feat: added supplier group field to link permission 2025-12-23 21:00:04 +05:30
Lakshit Jain
c66f78c784 feat: Introduce tax withholding entry 2025-12-23 20:47:53 +05:30
Mihir Kandoi
56192afe5f Merge pull request #51225 from aerele/report-button 2025-12-23 20:46:01 +05:30
Mihir Kandoi
8af3dd0ba0 Merge pull request #51283 from nishkagosalia/gh-49518-2 2025-12-23 20:30:32 +05:30
Mihir Kandoi
655b35fcdd Merge pull request #51263 from mihir-kandoi/gh48779 2025-12-23 20:20:39 +05:30
Jatin3128
489a035637 fix(subscription): add grace period status while invoice in grace period 2025-12-23 19:58:45 +05:30
Sudharsanan11
2073cb0106 test(manufacturing): add test to validate planned qty 2025-12-23 18:26:17 +05:30
Sudharsanan11
eda8a621c6 fix(manufacturing): validate delivered qty in production plan 2025-12-23 18:13:48 +05:30
rohitwaghchaure
83ab480211 Merge pull request #51271 from rohitwaghchaure/fixed-scrap-items-in-job-card
fix: scrap items in job card
2025-12-23 18:00:58 +05:30
ruthra kumar
f122509816 Merge pull request #51285 from diptanilsaha/frankfurter-v14-patch
fix(patch): handle currency exchange settings frankfurter api update for older versions
2025-12-23 17:40:52 +05:30
diptanilsaha
50bb1ce31d fix(patch): fallback for frankfurter settings v14 patch 2025-12-23 17:23:08 +05:30
rohitwaghchaure
2873dab98e Merge pull request #51276 from rohitwaghchaure/fixed-expense-account-stock-entry
fix: use stock adjustment if the account has not set
2025-12-23 17:07:43 +05:30
Rohit Waghchaure
9bbcbe0ac3 fix: use stock adjustment if the account has not set 2025-12-23 16:08:37 +05:30
Nishka Gosalia
8310b5ca36 feat: Added description column for update items 2025-12-23 15:47:44 +05:30
Rohit Waghchaure
09bcadfbb9 fix: scrap items in job card 2025-12-23 15:38:09 +05:30
Mihir Kandoi
250b9755f2 Merge pull request #51248 from vorasmit/phantom-as-additional-costs 2025-12-23 15:04:09 +05:30
Mihir Kandoi
6ac88f9bbf test: add test case 2025-12-23 14:57:23 +05:30
Mihir Kandoi
4b07d4a1b9 fix: create delivery notes condering customer AND addresses 2025-12-23 14:57:23 +05:30
Akhil Narang
1b530f7f92 Merge pull request #51275 from akhilnarang/dependency-update
build: update to python3.14 and nodejs 24, bump dependencies
2025-12-23 14:51:27 +05:30
Akhil Narang
8a8e1a2c4d chore: update action versions
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-12-23 13:35:13 +05:30
Akhil Narang
352c585208 build(ci): use python 3.14 and node 24
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-12-23 12:58:36 +05:30
Akhil Narang
e98d8bf638 build(deps): bump
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-12-23 12:52:03 +05:30
rohitwaghchaure
bb21415a72 Merge pull request #51259 from nishkagosalia/gh-51233
fix: company creation for Italy country
2025-12-23 12:42:41 +05:30
Nishka Gosalia
bc784a0e73 fix: company creation for Italy country 2025-12-22 20:23:03 +05:30
Mihir Kandoi
48c53c06ce Merge pull request #51266 from mihir-kandoi/fix-phantom-bom-filter 2025-12-22 19:33:03 +05:30
Mihir Kandoi
5e8d7a949c fix: filter not changing when field is changed 2025-12-22 19:31:24 +05:30
rohitwaghchaure
1d0aa4d3ec Merge pull request #51251 from rohitwaghchaure/fixed-added-limit-serial-nos
fix: limit condition to fetch serial nos
2025-12-22 17:44:58 +05:30
Khushi Rawat
f1b79e6687 Merge pull request #51262 from khushi8112/validate-finance-books-row-values
fix: validate depreciation row values
2025-12-22 17:34:18 +05:30
Rohit Waghchaure
da4b78491d fix: limit condition to fetch serial nos 2025-12-22 17:21:48 +05:30
khushi8112
16c6b2c39f fix: validate depreciation row values 2025-12-22 16:50:43 +05:30
rohitwaghchaure
9e28703ad9 Merge pull request #51258 from frappe/revert-50978-fixed-support-55110
Revert "fix: performance of the reposting"
2025-12-22 16:41:38 +05:30
rohitwaghchaure
e9c37642c8 chore: fix linters issue 2025-12-22 16:23:15 +05:30
rohitwaghchaure
d191b80587 chore: fix test case 2025-12-22 16:22:44 +05:30
rohitwaghchaure
280558efa2 Revert "fix: performance of the reposting" 2025-12-22 16:19:11 +05:30
Mihir Kandoi
cfe2181bf8 chore: make job card employee field read only 2025-12-22 15:55:54 +05:30
Mihir Kandoi
fbb67265b2 Merge pull request #51224 from aerele/task-end-date 2025-12-22 15:34:30 +05:30
Khushi Rawat
58e4f5690e Merge pull request #51186 from khushi8112/finance-book-wise-balance
fix: filter COA balances by finance book
2025-12-22 14:41:38 +05:30
Smit Vora
a441b1c53a test: ensure enough stock 2025-12-22 13:19:15 +05:30
rohitwaghchaure
0e1b45ca26 Merge pull request #51215 from vorasmit/fix-disassembly
fix: de-duplicate rows on disassembly with multiple manufacture entries
2025-12-22 11:38:35 +05:30
Smit Vora
a5e5365ba9 fix: conditional check for phantom item if field exists 2025-12-22 11:34:37 +05:30
Mihir Kandoi
dfe57b9fd3 Merge pull request #51249 from mihir-kandoi/fix-local-tests 2025-12-22 11:29:58 +05:30
Mihir Kandoi
19bfa9225d fix: flaky local test 2025-12-22 11:10:42 +05:30
Smit Vora
6e8a6582a0 fix: don't consider phantom item in additional costs in stock entry 2025-12-22 11:04:21 +05:30
rohitwaghchaure
5ae7805429 Merge pull request #51244 from rohitwaghchaure/fixed-support-55963
fix: same serial number was picked in multiple sales invoices
2025-12-22 09:38:43 +05:30
rohitwaghchaure
586431ca1c Merge pull request #51242 from aerele/fix/batch-qty-ignore-reserved-stock
fix(stock-report): ignore reserved stock in batch qty calculation
2025-12-21 22:25:52 +05:30
Rohit Waghchaure
61c31f0cd0 fix: same serial number was picked in multiple sales invoices 2025-12-21 22:22:28 +05:30
MochaMind
6c65c8955c chore: update POT file (#51240) 2025-12-21 14:27:20 +01:00
Pugazhendhi Velu
9a1f551e53 fix(stock-report): ignore reserved stock in batch qty calculation 2025-12-21 12:22:47 +00:00
SowmyaArunachalam
b8434ecfb0 test(task): validate expected end date 2025-12-19 23:27:51 +05:30
SowmyaArunachalam
c0ac5f94b5 feat: add redirect button on report 2025-12-19 22:49:34 +05:30
SowmyaArunachalam
820ccba9a4 fix(task): calculate end date if not available 2025-12-19 22:20:03 +05:30
rohitwaghchaure
c62b66038b Merge pull request #49951 from aerele/feat/update-batch-qty-report
feat(report): add batch qty update functionality in report
2025-12-19 20:25:22 +05:30
ravibharathi656
a55092d8da fix: set posting time during restore 2025-12-19 19:48:58 +05:30
Pugazhendhi Velu
15d9d8b719 fix: update batch_qty using get_batch_qty 2025-12-19 14:12:45 +00:00
Pugazhendhi Velu
cf03d03033 fix: use get_batch_qty to fetch batch data 2025-12-19 14:12:44 +00:00
Pugazhendhi Velu
9cc77934a6 refactor: fetch batch qty difference in a single db query 2025-12-19 14:12:44 +00:00
Pugazhendhi Velu
f40c492a05 feat(report): add batch qty update functionality in report 2025-12-19 14:12:44 +00:00
Smit Vora
5b3d2c0d02 test: ensure full qty reversal for items outside of BOM on disassemble 2025-12-19 19:32:34 +05:30
Smit Vora
ce123f1a89 fix: support disassemble of RMs other than in BOM 2025-12-19 19:03:22 +05:30
Smit Vora
18ac589796 test: ensure no regression after save and submit on disassemble 2025-12-19 18:19:40 +05:30
Smit Vora
df13308663 fix: don't fetch qty as it's unused 2025-12-19 18:14:06 +05:30
rohitwaghchaure
32b3a13591 Merge pull request #51219 from rohitwaghchaure/fixed-projects-home
fix: chart and number cards for projects and qc
2025-12-19 18:13:30 +05:30
rohitwaghchaure
83522bf079 Merge pull request #51214 from aerele/fix/recalculate-batch-qty
fix(stock): ignore reserved stock while calculating batch qty
2025-12-19 18:00:04 +05:30
Rohit Waghchaure
7c6f0e4463 fix: chart and number cards for projects and qc 2025-12-19 17:48:50 +05:30
Sudharsanan11
4d8ec5f54c test(stock): add test for ignore reserve stock 2025-12-19 17:25:20 +05:30
rohitwaghchaure
68fabb72fa Merge pull request #51218 from rohitwaghchaure/fixed-subcontracting-home
fix: chart and number cards for subcontracting
2025-12-19 17:21:47 +05:30
Sudharsanan11
b23c6e2687 fix(stock): ignore reserved stock while calculating batch qty 2025-12-19 17:20:17 +05:30
rohitwaghchaure
8c0dbb5bf6 Merge pull request #51217 from rohitwaghchaure/fixed-buying-home
fix: number cards for buying module
2025-12-19 17:18:37 +05:30
Rohit Waghchaure
3b221b0078 fix: chart and number cards for subcontracting 2025-12-19 16:58:29 +05:30
Rohit Waghchaure
fb0bd44a85 fix: number cards for buying module 2025-12-19 16:57:44 +05:30
Diptanil Saha
cb951bbb18 Merge pull request #51216 from diptanilsaha/gh_50890 2025-12-19 15:53:22 +05:30
diptanilsaha
0942845af7 fix(pos): prevent setting focus to item search field after item selection 2025-12-19 15:41:48 +05:30
rohitwaghchaure
b567eac01d Merge pull request #51209 from rohitwaghchaure/fixed-manufacturing-dashboard
fix: manufacturing chart and number cards
2025-12-19 15:14:32 +05:30
Rohit Waghchaure
278963be69 fix: manufacturing chart and number cards 2025-12-19 14:12:18 +05:30
Khushi Rawat
c55c97a9fe fix: add space 2025-12-19 14:11:54 +05:30
Smit Vora
a091e47bd7 fix: de-duplicate rows on disassembly with multiple manufacture entries 2025-12-19 14:07:09 +05:30
khushi8112
358083d759 fix: include entries with null finance book 2025-12-19 13:50:20 +05:30
Khushi Rawat
fdebf25ca7 Merge pull request #51205 from khushi8112/do-not-disable-primary-action-button
fix: do not hide primary-action for composite asset
2025-12-19 00:06:57 +05:30
Mihir Kandoi
6710a8b032 Merge pull request #51166 from mihir-kandoi/gh50060 2025-12-18 21:27:55 +05:30
Mihir Kandoi
d78a626661 chore: make mr_item indexed 2025-12-18 21:09:38 +05:30
Mihir Kandoi
48ea75c452 Merge branch 'gh50060' of https://github.com/mihir-kandoi/erpnext into gh50060 2025-12-18 21:07:57 +05:30
khushi8112
e04353fc31 fix: add server side validation 2025-12-18 17:34:31 +05:30
khushi8112
e2ac7646e6 fix: set frm.has_active_capitalization before using it 2025-12-18 17:15:10 +05:30
ruthra kumar
7a3206f0bf Merge pull request #51197 from ruthra-kumar/fix_deterministic_bug_in_sql_procedures
refactor: remove custom sql function in AR SQL procedure approach
2025-12-18 17:07:24 +05:30
khushi8112
482efee6c0 fix: do not hide primary-action for composite asset 2025-12-18 16:43:26 +05:30
Mihir Kandoi
41e1f92612 Merge pull request #51204 from mihir-kandoi/gh51201 2025-12-18 16:40:24 +05:30
Mihir Kandoi
39031ae8a2 fix: customer quick entry address 2025-12-18 16:37:27 +05:30
Diptanil Saha
e53a74f2be fix(payment entry): make taxes & charges section non-collapsible and remove border (#51191) 2025-12-18 16:23:24 +05:30
Diptanil Saha
3a604dd249 fix(pegged currencies): skip adding currencies_to_add items on pegged_currency_item if source_currency or pegged_against currency doc does not exist (#51188) 2025-12-18 16:22:56 +05:30
Mihir Kandoi
11ce4ad102 Merge pull request #51202 from mihir-kandoi/gh51195 2025-12-18 16:15:01 +05:30
Mihir Kandoi
adabb6acb3 fix: NoneType error when starting job card 2025-12-18 16:06:58 +05:30
Jatin3128
00c9e20df3 fix(subscription): add cancellation and date validation 2025-12-18 16:01:08 +05:30
ruthra kumar
d1e0992253 refactor: remove custom sql function in AR SQL procedure approach 2025-12-18 15:45:05 +05:30
Khushi Rawat
260e6fb979 Merge pull request #51175 from khushi8112/asset-depreciation-manual-value-update
fix: manual depreciation update logic
2025-12-18 15:32:36 +05:30
Mihir Kandoi
a0af90f755 Merge pull request #51194 from mihir-kandoi/type-resolve-error 2025-12-18 15:18:18 +05:30
Mihir Kandoi
b0d3681593 Merge pull request #51189 from mihir-kandoi/gh49776 2025-12-18 15:11:40 +05:30
Mihir Kandoi
8b1fd7469c fix: get_item_tax_template error 2025-12-18 14:56:51 +05:30
khushi8112
f991420152 fix: Apply finance book filter conditionally 2025-12-18 14:54:37 +05:30
khushi8112
31374e1134 fix: filter account balances by default finance book in COA tree view 2025-12-18 14:54:37 +05:30
khushi8112
c186b1d9c8 fix: additional check to regenerate depreciation 2025-12-18 14:52:58 +05:30
khushi8112
178bc759c7 fix: logic error in docstatus check and use better arg 2025-12-18 14:52:58 +05:30
khushi8112
aa8e8da29f fix: check and update depreciation if depreciation method was changed 2025-12-18 14:52:58 +05:30
khushi8112
028b6790cf fix: update depreciation schedule when asset value changes for manual depreciation 2025-12-18 14:52:58 +05:30
Mihir Kandoi
333169e52b test: patch: add test case and patch 2025-12-18 09:17:42 +00:00
Mihir Kandoi
17320d1062 refactor: pick list from material request 2025-12-18 09:17:42 +00:00
Mihir Kandoi
34cee8fa9c fix: set conversion factor before validation 2025-12-18 09:16:55 +00:00
Ankush Menat
fe66bd4dc2 test: fix tests failing due to dependent state (#51187)
* test: Use fixture instead of hardcoded employee

* test: create user before assigning
2025-12-18 09:13:05 +00:00
Mihir Kandoi
9638e7ea83 Merge pull request #51168 from nishkagosalia/gh-42873 2025-12-18 10:14:05 +05:30
Mihir Kandoi
80933ec66b test: patch: add test case and patch 2025-12-17 20:16:13 +05:30
rohitwaghchaure
abef84358c Merge pull request #51022 from rohitwaghchaure/feat-run-parallel-reposting
feat: run parallel reposting
2025-12-17 16:41:40 +05:30
Nabin Hait
f48b90c600 fix: validate party's existing transaction currency before merging 2025-12-17 15:26:36 +05:30
Diptanil Saha
64e50f2e55 Merge pull request #51169 from diptanilsaha/gh_39653 2025-12-17 15:21:29 +05:30
diptanilsaha
848f8d6b1f fix(payment entry): set row id for 'On Previous Row Amount' or 'On Previous Row Total' charge type on tax table 2025-12-17 15:12:45 +05:30
Nishka Gosalia
1562e9b828 fix: Disallow due date to be before the posting date in Quotation 2025-12-17 14:44:24 +05:30
Mihir Kandoi
1778e2c564 refactor: pick list from material request 2025-12-17 14:41:09 +05:30
Nabin Hait
62acc4aeb5 fix: update button was getting freezed after validation 2025-12-17 14:36:40 +05:30
Khushi Rawat
da4d6cb567 Merge pull request #51156 from aerele/asset-depreciation-schedule-calculation
fix: show company currency in asset depreciation schedule
2025-12-17 14:33:34 +05:30
Khushi Rawat
5f80857bc9 fix: show correct PR amount in email template (#51033)
* fix: show correct PR amount in email template

* fix: add translation string
2025-12-17 14:06:54 +05:30
Diptanil Saha
a412e0b357 Merge pull request #51155 from diptanilsaha/st_55683 2025-12-17 13:53:40 +05:30
Nishka Gosalia
f4c0611cc5 feat: update item button addition for quotation (#50976)
* feat: update item button addition for quotation

* feat: update item button addition for supplier quotation

* fix: test case

---------

Co-authored-by: Nishka Gosalia <nishkagosalia@Nishkas-MacBook-Air.local>
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-12-17 13:53:10 +05:30
rohitwaghchaure
dec474ef3a fix: incorrect current qty in stock reco (#51152) 2025-12-17 13:15:00 +05:30
diptanilsaha
f3142c4af6 fix: allow rename for market segment doctype 2025-12-17 12:39:34 +05:30
Ankush Menat
0b3e40b155 perf!: Avoid updating sales data on every transaction (#51151) 2025-12-17 07:04:46 +00:00
sudarshan-g
e32f898dd7 fix: show company currency in asset depreciation schedule 2025-12-17 12:09:22 +05:30
NaviN
5f6ed62c03 fix: use serial and batch bundle to fetch incoming rate (#51119) 2025-12-16 15:51:43 +01:00
Soham Kulkarni
382e4fe843 Merge pull request #51139 from sokumon/portal-redirect 2025-12-16 19:58:23 +05:30
Diptanil Saha
f07f2cfe88 Merge pull request #51120 from aerele/item-group-filter-quickentry 2025-12-16 18:26:17 +05:30
Mihir Kandoi
978aa9ac23 Merge pull request #51141 from aerele/fix/filter-disabled-suppliers 2025-12-16 18:21:23 +05:30
Mihir Kandoi
af4707d1ee Merge pull request #51136 from mihir-kandoi/gh42070 2025-12-16 18:17:51 +05:30
Mihir Kandoi
76da5efaa9 Merge pull request #51137 from mihir-kandoi/gh42599 2025-12-16 18:13:33 +05:30
sokumon
5986d79643 fix: remove /portal redirects 2025-12-16 18:12:58 +05:30
Sudharsanan11
6cc2290f6e fix(buying): add disabled filter for supplier 2025-12-16 17:58:20 +05:30
Raffael Meyer
ba9bbed038 fix(Rename Tool): use "Link" field instead of "Select" 2025-12-16 17:54:50 +05:30
Mihir Kandoi
273ff33ebf Merge pull request #51130 from mihir-kandoi/gh51126 2025-12-16 17:52:18 +05:30
Mihir Kandoi
38affb0562 fix: delayed tasks summary chart color 2025-12-16 17:47:23 +05:30
Mihir Kandoi
44840b8b80 fix: work order status for non tracked SFG 2025-12-16 17:33:41 +05:30
Kavin
2f19244660 fix(subcontract): ignore BOM qty validation for alternative items (#51122) 2025-12-16 17:26:34 +05:30
Logesh Periyasamy
890316a793 fix: add validation for transferred qty and handle MR transfer status for in-transit entry. (#50683)
* fix: add validation for transferred qty

* fix: modify if statement

* test: add unit test for mr transfer status in-transit entry
2025-12-16 17:25:30 +05:30
Mihir Kandoi
b6aec1d31a fix: ignore transfer material against if track semi finished goods 2025-12-16 16:36:48 +05:30
ruthra kumar
c2cd09cda7 Merge pull request #51048 from aerele/fetch-exchange-gain-loss-account
fix(payment entry): fetch gain loss account from company boot
2025-12-16 16:27:35 +05:30
ruthra kumar
c4136870cf Merge pull request #51123 from ruthra-kumar/fix_security_issue_in_payment_request
fix: ensure type on method parameter
2025-12-16 15:33:10 +05:30
ruthra kumar
c055e86e51 fix: ensure type on method parameter 2025-12-16 14:05:28 +05:30
Afsal Syed
3bef6bf5ef fix: add link filters for item group in quickentry 2025-12-16 13:03:31 +05:30
Mihir Kandoi
9ff5425859 Merge pull request #51100 from mihir-kandoi/gh41716 2025-12-16 12:01:37 +05:30
Mihir Kandoi
d0bdbfecef Merge pull request #51102 from mihir-kandoi/price-list-js-error 2025-12-16 11:24:28 +05:30
Mihir Kandoi
c287665033 fix: rejected qty not outward-ed in SCR 2025-12-16 11:23:19 +05:30
ruthra kumar
ac6583574e Merge pull request #51114 from frappe/l10n_develop
fix: sync translations from crowdin
2025-12-16 11:05:32 +05:30
ruthra kumar
9a4619a289 Merge pull request #51077 from aerele/standardize-cost-center-trigger
refactor: standardize cost_center updation across transactions
2025-12-16 10:51:29 +05:30
MochaMind
0563faca54 fix: Hungarian translations 2025-12-16 07:05:45 +05:30
MochaMind
bc213c45aa fix: Persian translations 2025-12-16 07:05:26 +05:30
0xD0M1M0
ad2c58cf2a feat: introduce extended bank transaction fields (#50021)
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
2025-12-15 20:27:23 +01:00
Soham Kulkarni
8ea4e2139b Merge pull request #51097 from sokumon/portal-redirect 2025-12-15 17:56:24 +05:30
ruthra kumar
9331f8ce7e Merge pull request #50837 from Jatin3128/gh_38620
feat(accounting-period): add role-based bypass for accounting period restrictions
2025-12-15 17:36:43 +05:30
MochaMind
41cf546946 fix: sync translations from crowdin (#51000) 2025-12-15 12:28:21 +01:00
ruthra kumar
6adbe7a3fd Merge pull request #50782 from vorasmit/net-gl-balances
fix: only show net balance as opening in general ledger
2025-12-15 15:29:47 +05:30
Smit Vora
af9742a3ee Merge pull request #50788 from vorasmit/cascade-available-qty 2025-12-15 14:38:22 +05:30
Mihir Kandoi
b923a6b72c Merge pull request #51098 from mihir-kandoi/fix-dispatch-addr 2025-12-15 14:24:32 +05:30
Mihir Kandoi
09a8905b2d fix: price list arg type error 2025-12-15 14:20:10 +05:30
rohitwaghchaure
766d157320 fix: manufacturing sidebar (#51101) 2025-12-15 12:19:28 +05:30
sokumon
9486d0d462 fix: add list template to all portal doctypes 2025-12-15 10:38:30 +05:30
Mihir Kandoi
d7fea5d4e1 fix: incorrect mapping of dispatch addr when creating PO from SO 2025-12-15 07:30:45 +05:30
Mihir Kandoi
ae339f69f4 Merge pull request #49139 from Anjalii-Patel/fix-employee-report-self 2025-12-15 01:55:22 +05:30
MochaMind
af4d14e820 chore: update POT file (#51095) 2025-12-14 13:34:30 +01:00
Ankush Menat
db7456eea2 fix: Short circuit guest perm checks 2025-12-14 12:10:26 +05:30
Mihir Kandoi
88acf05ba2 Merge pull request #51091 from aerele/purchase-invoice-item-default-conversion-factor 2025-12-13 14:48:40 +05:30
Mihir Kandoi
bf3b3d4c02 Merge pull request #51090 from mihir-kandoi/active-empployee-filter 2025-12-13 14:47:26 +05:30
Mihir Kandoi
9b794d5a42 Merge pull request #51083 from aerele/mr-customer-provided-status 2025-12-13 14:39:35 +05:30
Mihir Kandoi
d811a368a9 fix: add filter to employee field in Job Card Time Log 2025-12-13 14:29:21 +05:30
Mihir Kandoi
719cb42c1e Merge pull request #51050 from mihir-kandoi/gh41617 2025-12-13 14:23:54 +05:30
ravibharathi656
8d523d2cd3 fix: remove default conversion factor in purchase invoice item 2025-12-13 14:16:03 +05:30
Mihir Kandoi
3de80ec640 fix: test cases 2025-12-13 13:39:19 +05:30
Mihir Kandoi
c9eda3c279 fix: bom creator page width and rate calculation 2025-12-13 11:40:51 +05:30
rohitwaghchaure
10a66b8e73 Merge pull request #51063 from KerollesFathy/fix-get-doctypes-to-be-ignored-list
fix(transaction-deletion): Add virtual doctypes to the list of ignored doctypes
2025-12-13 07:41:06 +05:30
KerollesFathy
0f7d89f4d1 refactor: remove redundant assignment of doctypes_to_be_ignored_list 2025-12-12 20:38:02 +00:00
SowmyaArunachalam
aa8a0d0a9f test(material-request): add test to validate status 2025-12-12 22:56:17 +05:30
rohitwaghchaure
2fa948b070 Merge pull request #51079 from rohitwaghchaure/fixed-support-54205
fix: stock ageing report
2025-12-12 20:42:30 +05:30
Rohit Waghchaure
cb84ffd972 fix: stock ageing report 2025-12-12 17:36:23 +05:30
Navin-S-R
c28f6f1856 refactor: standardize cost_center updation across transactions 2025-12-12 14:25:08 +05:30
Khushi Rawat
25bf2d94e7 Merge pull request #51070 from khushi8112/budget-validation-condition
fix: validate budget after cost center allocation
2025-12-12 13:51:08 +05:30
rohitwaghchaure
2db85ad883 Merge pull request #51069 from rohitwaghchaure/fixed-github-47939
fix: incorrect invoice qty
2025-12-12 13:36:08 +05:30
rohitwaghchaure
c3723e798d Merge pull request #51034 from aerele/fix/company-address-validation
fix(accounts): handle drop ship in company linked address validation
2025-12-12 13:34:14 +05:30
Sudharsanan11
f6a96e5563 test(accounts): add validation test for dispatch address with drop ship enabled 2025-12-12 13:14:40 +05:30
Sudharsanan11
2ec119e561 fix(accounts): handle drop ship in company linked address validation 2025-12-12 13:14:33 +05:30
Khushi Rawat
a8b94f2090 Merge pull request #51041 from aerele/fix-trial-balance-roundoff
fix(trial_balance): remove hardcoded precision for currency values
2025-12-12 13:09:08 +05:30
Rohit Waghchaure
96cdb7d54f fix: incorrect invoice qty 2025-12-12 13:06:51 +05:30
khushi8112
f9be8a46fb fix: validate budget after cost center allocation 2025-12-12 12:52:04 +05:30
rohitwaghchaure
3c032e1f35 Merge pull request #51047 from aerele/fix/disassembly-stock-entry
fix(manufacturing): get items for disassembly order
2025-12-12 11:44:12 +05:30
SowmyaArunachalam
97a7c0162d fix(material-request): update customer provided status 2025-12-12 11:21:42 +05:30
KerollesFathy
45a7195abe refactor: switch to or_filters so the query hits the DB only once 2025-12-11 20:56:05 +00:00
KerollesFathy
c7a7cb2b90 fix: Add virtual doctypes to the list of ignored doctypes in transaction deletion 2025-12-11 19:45:01 +00:00
Sagar Vora
7ad123592c Merge pull request #51057 from sagarvora/remove-draft-guard
fix: re-calculate outstanding / write-off amount during submission
2025-12-11 23:04:29 +05:30
Sagar Vora
09c9ac1b66 fix: re-calculate outstanding / write-off amount during submission 2025-12-11 22:37:59 +05:30
Soham Kulkarni
9cc48f3686 Merge pull request #51055 from jacob-salvi/develop 2025-12-11 19:11:19 +05:30
jacob-salvi
5ed48a8539 chore: exporting desktop icons 2025-12-11 18:49:30 +05:30
Sagar Vora
bd595602de chore: ignore noisy commits from git blame (#51049) 2025-12-11 18:05:51 +05:30
Sagar Vora
b3fdef8d19 fix: ensure fresh grand_total_diff is used for each calculation 2025-12-11 12:18:37 +00:00
Sudharsanan11
99148a2aba fix(manufacturing): get items for disassembly order 2025-12-11 16:35:02 +05:30
Sudharsanan11
86d6facab3 fix(manufacturing): add validation for disassemble qty 2025-12-11 16:32:04 +05:30
ravibharathi656
8e54be7808 fix(payment entry): fetch gain loss account from company boot 2025-12-11 16:20:10 +05:30
Khushi Rawat
f15efc543b feat: supplier invoice date in opening invoice creation tool (#50835) 2025-12-11 16:09:22 +05:30
Diptanil Saha
d4ef2ebd3c Merge pull request #51037 from diptanilsaha/frankfurter-api-backward-compatibility 2025-12-11 15:53:48 +05:30
Rohit Waghchaure
767e4762bb feat: run parallel reposting 2025-12-11 15:47:18 +05:30
diptanilsaha
5c2bb66028 fix(currency exchange settings): added backward compatibility for frankfurter api 2025-12-11 15:14:28 +05:30
Navin-S-R
a8af04f6fc fix(trial_balance): remove hardcoded precision for currency values 2025-12-11 15:07:46 +05:30
rohitwaghchaure
605b7c5efe Merge pull request #51035 from rohitwaghchaure/fixed-serial-nos-for-putaway
fix: put-away rule not applying on serial nos
2025-12-11 14:38:19 +05:30
Mihir Kandoi
a34dd9d247 Merge pull request #50955 from aerele/issue-50951 2025-12-11 14:24:10 +05:30
Rohit Waghchaure
6bb0bdcdca fix: putaway rule not applying on serial nos 2025-12-11 13:43:58 +05:30
rohitwaghchaure
a20fd7428c Merge pull request #51030 from mihir-kandoi/gh49703
fix: update project costing based on child table field and not parent…
2025-12-11 13:22:32 +05:30
Mihir Kandoi
8d9b83e410 Merge pull request #51014 from mihir-kandoi/gh42653-3 2025-12-11 11:35:33 +05:30
Mihir Kandoi
e57d2b4811 fix: update project costing based on child table field and not parent level 2025-12-11 11:21:35 +05:30
rohitwaghchaure
f3ba59480b Merge pull request #51027 from rohitwaghchaure/fixed-support-48228
fix: Serial/Batches not fetching when creating Material Transfer from Purchase Receipt
2025-12-11 10:57:44 +05:30
Mihir Kandoi
4e4452b73e Merge pull request #51019 from mihir-kandoi/gh50781 2025-12-11 10:23:28 +05:30
Mihir Kandoi
dbbad3e6ee Merge pull request #51015 from mihir-kandoi/gh46164 2025-12-11 10:22:58 +05:30
Rohit Waghchaure
d16c50486a fix: Serial/Batches not fetching when creating Material Transfer from Purchase Receipt 2025-12-11 10:12:42 +05:30
Nishka Gosalia
254eb5e7d6 Merge pull request #51021 from nishkagosalia/gh-50390 2025-12-11 03:26:39 +00:00
Mihir Kandoi
074bdd119b fix: check if terms is not set in selling controller 2025-12-10 21:58:16 +05:30
Mihir Kandoi
3787b9fbe5 fix: check if terms is not set in buying controller 2025-12-10 21:57:33 +05:30
Mihir Kandoi
77045e45c5 fix: where condition 2025-12-10 21:54:43 +05:30
Mihir Kandoi
a52f42c7e4 fix: add is_active filter 2025-12-10 21:53:11 +05:30
Diptanil Saha
8e0227ea68 Merge pull request #50963 from Jatin3128/gh_38026 2025-12-10 17:41:23 +05:30
Diptanil Saha
c02fb7a619 Merge pull request #50967 from Jatin3128/gh_49740 2025-12-10 17:19:27 +05:30
Mihir Kandoi
0bec419301 fix: check if item is variant when creating WO from MR 2025-12-10 16:53:02 +05:30
rohitwaghchaure
4f99045ca0 Merge pull request #51007 from rohitwaghchaure/fixed-reposting-only-gl
fix: repost accounting ledgers for skipped records
2025-12-10 15:12:30 +05:30
Diptanil Saha
eb8ea4a02d Merge pull request #50948 from aerele/fix/delivery-note-trends 2025-12-10 15:11:56 +05:30
rohitwaghchaure
74f748e1f5 Merge pull request #51009 from nishkagosalia/gh-50389-2
fix: updating base amounts through python for timesheet
2025-12-10 14:43:05 +05:30
Mihir Kandoi
7f1c11c92e fix: consider reserved qty when fetching items from SO in PP 2025-12-10 14:27:52 +05:30
Mihir Kandoi
8cb0632081 fix: make sure buying/selling default terms from company master is default 2025-12-10 14:08:22 +05:30
Nishka Gosalia
e8a8d3947c fix: updating base amount in timesheet 2025-12-10 13:12:47 +05:30
Nishka Gosalia
4568114ba8 test: test cases added for checking the base amounts in timesheet 2025-12-10 13:03:14 +05:30
Nishka Gosalia
88d8310a47 fix: updating base amounts through python for timesheet 2025-12-10 13:03:14 +05:30
Khushi Rawat
85114eda7c Merge pull request #50804 from ljain112/fix-asset-repair-amount
fix: correct logic for repair cost in asset repair
2025-12-10 12:58:13 +05:30
Rohit Waghchaure
5757feb45a fix: repost accounting ledgers for skipped records 2025-12-10 12:07:46 +05:30
Khushi Rawat
f301b36b5e Merge pull request #50999 from khushi8112/budget-fixes
fix: better manual budget distribution
2025-12-10 11:57:13 +05:30
Sudharsanan11
198eb372e3 fix(stock): remove total bar in chart view 2025-12-10 11:39:55 +05:30
Mihir Kandoi
60470e2a5b Merge pull request #50952 from rtdany10/wo-flt-issue 2025-12-10 09:51:55 +05:30
Diptanil Saha
dc718f7acb Merge pull request #51001 from diptanilsaha/gh-39891 2025-12-10 09:49:44 +05:30
diptanilsaha
2fe5fad884 fix(share balance): use currency field instead of int for rate and amount 2025-12-10 08:13:22 +05:30
khushi8112
ed4c17d3a2 fix: patch to set budget distribution total 2025-12-10 03:06:05 +05:30
khushi8112
f194ac093c feat: show budget distribution total 2025-12-10 02:48:44 +05:30
khushi8112
1c82f42fa8 fix: better manual budget distribution on update 2025-12-10 02:19:29 +05:30
khushi8112
d42aad18a7 fix: remove revise budget permission 2025-12-10 00:46:03 +05:30
khushi8112
6a03fc6ede fix: add company-based filter to account field 2025-12-10 00:41:39 +05:30
khushi8112
75999a7ae4 fix: make amount and percent field read only when distribute equally is enabled 2025-12-10 00:38:33 +05:30
Diptanil Saha
b53b6cac52 Merge pull request #50944 from aerele/return-discount-validation 2025-12-09 20:46:24 +05:30
Diptanil Saha
ca12d88514 Merge pull request #50979 from ljain112/fix-item-wise-sales-register-develop 2025-12-09 20:04:13 +05:30
Mihir Kandoi
68703d6e5b Merge pull request #50930 from elshafei-developer/Fix-typo 2025-12-09 18:40:07 +05:30
Mihir Kandoi
8f2b3f8703 Merge pull request #50912 from aerele/issue-50832 2025-12-09 18:35:48 +05:30
Mihir Kandoi
997401a16a Merge pull request #50910 from aerele/fix/validate-picklist-partial-reserved-qty 2025-12-09 18:33:29 +05:30
Mihir Kandoi
a62b0ca196 Merge pull request #50984 from mihir-kandoi/phantom-bom-item-filter 2025-12-09 18:29:40 +05:30
Mihir Kandoi
2e5241a211 Merge pull request #50987 from mihir-kandoi/inward-status-fix 2025-12-09 18:29:02 +05:30
Diptanil Saha
4edcc12edc Merge pull request #50970 from Abdeali099/cancle-PI-fix 2025-12-09 17:11:31 +05:30
MochaMind
cbc0f327d6 fix: sync translations from crowdin (#50852) 2025-12-09 12:37:24 +01:00
rohitwaghchaure
30ae3e0b59 Merge pull request #50978 from rohitwaghchaure/fixed-support-55110
fix: performance of the reposting
2025-12-09 16:35:03 +05:30
Diptanil Saha
a28d799c09 Merge pull request #50968 from Abdeali099/pr-bulk-update 2025-12-09 16:28:31 +05:30
Mihir Kandoi
ec3cd7e09c feat: add return status 2025-12-09 16:15:58 +05:30
Diptanil Saha
13d4f5ec31 Merge pull request #49963 from ljain112/tds-jv 2025-12-09 15:41:35 +05:30
Mihir Kandoi
baf884f95c fix: item should not be a fixed asset if bom is phantom 2025-12-09 15:38:46 +05:30
Rohit Waghchaure
1bcfad8eb1 fix: performance of the reposting 2025-12-09 14:51:32 +05:30
ljain112
2767cb04fb fix: handle duplicate description in item-wise report 2025-12-09 13:34:14 +05:30
rohitwaghchaure
5401843315 Merge pull request #50974 from rohitwaghchaure/fixed-sre-for-return-components
fix: SRE while returning components
2025-12-09 11:44:40 +05:30
Rohit Waghchaure
5e2d246931 fix: SRE while returning components 2025-12-08 22:41:07 +05:30
rohitwaghchaure
e8f87927e1 Merge pull request #50972 from rohitwaghchaure/fixed-github-50917
fix: incorrect condition
2025-12-08 20:08:51 +05:30
rohitwaghchaure
107fa1d605 Merge pull request #50971 from rohitwaghchaure/fixed-github-33408
fix: do not create a Purchase Receipt for returned items (Debit Note)
2025-12-08 19:53:50 +05:30
Rohit Waghchaure
264baf34f6 fix: incorrect condition 2025-12-08 19:50:26 +05:30
Rohit Waghchaure
66407d22fc fix: do not create a Purchase Receipt for returned items (Debit Note) 2025-12-08 19:24:57 +05:30
Abdeali Chharchhoda
f26ee9e546 fix: ensure payment request button only shows for submitted invoices 2025-12-08 18:51:21 +05:30
Abdeali Chharchhoda
5154fa8259 refactor: payment request status updates with bulk database operation 2025-12-08 18:00:29 +05:30
Jatin3128
b2feb5abbe feat(sales_order, purchase_order): add bulk close and reopen actions in list view 2025-12-08 17:28:25 +05:30
Soham Kulkarni
b58c4edd5d chore: move report to the correct module (#50959) 2025-12-08 14:55:27 +05:30
rohitwaghchaure
c5bbabac4b Merge pull request #50962 from rohitwaghchaure/fixed-github-50829
fix: warning message to avoid serial no series overlap issue
2025-12-08 14:40:10 +05:30
Jatin3128
6ac76bac6e fix(payment_entry): add due date to payment reference rows 2025-12-08 14:17:32 +05:30
Rohit Waghchaure
c5fdc256fa fix: warning message to avoid serial no series overlap issue 2025-12-08 14:17:02 +05:30
MochaMind
0376bba345 chore: update POT file (#50957) 2025-12-07 16:32:50 +01:00
rohitwaghchaure
2e803e6494 Merge pull request #50937 from aerele/support-54673
fix: validate available stock with multiple dimensions
2025-12-07 10:46:38 +05:30
Afsal Syed
f13022835a fix: sanitize address display by stripping HTML tags using html2text 2025-12-06 21:41:33 +05:30
venkat102
6e44951a96 fix: use separate item 2025-12-06 14:00:51 +05:30
Dany Robert
80730908c9 fix: precision issue on job card submission 2025-12-06 10:49:15 +05:30
venkat102
66f56eea33 fix: enable validate_negative_stock in existing dimensions 2025-12-06 00:24:20 +05:30
ravibharathi656
fab1ef5d76 fix: include return invoice discount in discount validation 2025-12-05 15:40:34 +05:30
venkat102
1e2c56874f test: validate negative stock with multiple inventory dimensions 2025-12-04 23:58:25 +05:30
venkat102
8f86c1b3e9 fix: validate available stock with multiple dimensions 2025-12-04 22:05:21 +05:30
El-Shafei H.
b5ad4acc41 Fix typo in docstring for update_product_bundle_rate 2025-12-04 12:03:41 +03:00
Pugazhendhi Velu
445a255a7f test: add test for return status in delivery note 2025-12-03 13:19:59 +00:00
Pugazhendhi Velu
af212f520d fix: change is_return value in filter from Yes to 1 2025-12-03 13:14:39 +00:00
Pugazhendhi Velu
dec67eecad fix: add return status for delivery note 2025-12-03 13:10:22 +00:00
Sudharsanan11
758553b9fc test(picklist): add test for reserved qty after partial delivery 2025-12-03 18:23:32 +05:30
Sudharsanan11
f5b75b27d7 fix(picklist): calculate picked qty excluding the delivered qty 2025-12-03 18:23:32 +05:30
Smit Vora
09325aad3d refactor: tax witholding in JV out of document class 2025-12-02 14:08:05 +05:30
Jatin3128
cfdbeb6a1a feat(accounting-period): add role-based bypass for accounting period restrictions 2025-12-01 17:33:49 +05:30
ljain112
e1fd90f731 chore: remove unused import for depreciation schedule 2025-12-01 17:06:42 +05:30
ljain112
8ee2cbf259 chore: remove unwanted strings 2025-12-01 17:05:00 +05:30
ljain112
2a0ba84f69 refactor: linters 2025-12-01 13:17:47 +05:30
ljain112
0c1df30771 fix: add permission check 2025-12-01 13:13:55 +05:30
Abdeali Chharchhoda
5f986e4032 refactor: optimize picked quantity updates using bulk_update 2025-12-01 13:12:23 +05:30
ljain112
ff9b392024 fix: add duplicate purchase invoice validation in asset repair 2025-11-28 19:13:31 +05:30
ljain112
0b84d11600 perf: enhance validation for purchase invoices to check submission status for all invoices 2025-11-28 19:09:54 +05:30
ljain112
c2810ea799 perf: replace get_doc with get_lazy_doc for asset retrieval and optimize stock entry fetching 2025-11-28 18:54:37 +05:30
ljain112
00ffdee928 fix: update repair cost logic to set value only for positive amounts 2025-11-28 18:45:07 +05:30
ljain112
b9aaae6343 fix: remove unnecessary filtering by search text in get_expense_accounts 2025-11-28 18:36:13 +05:30
ljain112
e6160d1b63 fix: correct logic for repair cost in asset repair 2025-11-28 18:30:51 +05:30
Smit Vora
92fdec9b92 test: add test for projected quantity cascading across multiple sales orders 2025-11-28 13:45:20 +05:30
Smit Vora
d344be32a0 fix: cascade projected quantity across multiple items in material requests 2025-11-28 11:37:25 +05:30
Smit Vora
b7c7e0746e fix: only show net gl balance as opening in general ledger 2025-11-27 19:15:46 +05:30
ljain112
6079bee3a3 fix: remove redundant party variable assignments 2025-11-27 13:44:28 +05:30
ljain112
6a66ce5a97 fix: add is_tax_withholding_account field to JournalEntryAccount to avoid recursive tds 2025-11-27 13:40:23 +05:30
ljain112
40b787827a fix: use alias for get_exchange_rate function in JournalEntry 2025-11-24 18:04:56 +05:30
ljain112
50cf814b43 Merge branch 'develop' into tds-jv 2025-11-24 16:47:30 +05:30
ljain112
0f89e750a7 Merge branch 'develop' into tds-jv 2025-10-14 18:40:58 +05:30
ljain112
2de9f8f2e2 test: add TDS and TCS calculations for journal entries in Debit and Credit Notes 2025-10-14 17:30:22 +05:30
ljain112
88f6d783b4 fix: include grand_total in journal entry and handle taxes correctly in invoice total calculation 2025-10-09 13:44:32 +05:30
ljain112
2112f36577 fix: add cost center to tds row in journal entry 2025-10-09 13:32:45 +05:30
ljain112
610877fb17 refactor: update exchange rate import to avoid redundancy 2025-10-09 13:11:10 +05:30
ljain112
004bd59245 fix: calculate net_total excluding taxes 2025-10-09 13:08:55 +05:30
ljain112
84e6d278c3 chore: remove redundant code 2025-10-09 12:54:55 +05:30
ljain112
2b4f621c8e refactor: proper variable naming 2025-10-09 12:24:54 +05:30
ljain112
31434630b5 fix: handle multicurrency in tds jv 2025-10-08 19:29:39 +05:30
ljain112
47aa006ea9 fix: recalculate totals after applying tds 2025-10-08 18:02:19 +05:30
ljain112
1319b28b1f fix: tds for customer and supplier in Journal Entry 2025-10-08 17:27:58 +05:30
Anjali Patel
cbfb14a654 fix: add missing query key in 'Reports To' field filter 2025-08-13 13:37:48 +00:00
Anjali Patel
608d38a172 fix: prevent self in "Reports To" dropdown (UI-level check)
Ensures employee cannot select themselves in the "Reports To" field via UI.
This complements server-side validation by improving UX.
2025-08-13 12:25:22 +00:00
775 changed files with 109257 additions and 71399 deletions

View File

@@ -45,3 +45,9 @@ d827ed21adc7b36047e247cbb0dc6388d048a7f9
# `frappe.flags.in_test` => `frappe.in_test`
7a482a69985c952de0e8193c9d4e086aee65ee6d
# these commits actually changed something valuable
# but they have a lot of whitespace changes that make blame noisy
# PR: https://github.com/frappe/erpnext/pull/49816
3ffd50c772735877b330d010c1058f623da8721d
0e8f8677b8eb31e7834f72d1c6314d3c3f392ca6

View File

@@ -60,7 +60,7 @@ body:
description: Share exact version number of Frappe and ERPNext you are using.
placeholder: |
Frappe version -
ERPNext Verion -
ERPNext version -
validations:
required: true

View File

@@ -14,7 +14,7 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
repository: "frappe/backport"
path: ./actions

View File

@@ -13,12 +13,12 @@ jobs:
steps:
- name: 'Setup Environment'
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: 'Clone repo'
uses: actions/checkout@v2
uses: actions/checkout@v6
- name: Validate Docs
env:

View File

@@ -21,14 +21,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"
python-version: "3.14"
- name: Run script to update POT file
run: |

View File

@@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ["14", "15"]
version: ["14", "15", "16"]
steps:
- uses: octokit/request-action@v2.x

View File

@@ -12,12 +12,12 @@ jobs:
name: linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v4
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.14'
cache: pip
- name: Install and Run Pre-commit
@@ -27,12 +27,12 @@ jobs:
name: semgrep
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v4
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version: '3.14'
cache: pip
- name: Download Semgrep rules

View File

@@ -29,7 +29,7 @@ jobs:
services:
mysql:
image: mariadb:10.6
image: mariadb:11.8
env:
MARIADB_ROOT_PASSWORD: 'root'
ports:
@@ -38,7 +38,7 @@ jobs:
steps:
- name: Clone
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Check for valid Python & Merge Conflicts
run: |
@@ -49,14 +49,17 @@ jobs:
fi
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.11'
python-version: |
3.11
3.13
3.14
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 18
node-version: 24
check-latest: true
- name: Add to Hosts
@@ -110,8 +113,8 @@ jobs:
jq 'del(.install_apps)' ~/frappe-bench/sites/test_site/site_config.json > tmp.json
mv tmp.json ~/frappe-bench/sites/test_site/site_config.json
wget https://erpnext.com/files/v13-erpnext.sql.gz
bench --site test_site --force restore ~/frappe-bench/v13-erpnext.sql.gz
wget https://frappe.io/files/erpnext-v14.sql.gz
bench --site test_site --force restore ~/frappe-bench/erpnext-v14.sql.gz
git -C "apps/frappe" remote set-url upstream https://github.com/frappe/frappe.git
git -C "apps/erpnext" remote set-url upstream https://github.com/frappe/erpnext.git
@@ -132,15 +135,14 @@ jobs:
# Resetup env and install apps
pgrep honcho | xargs kill
rm -rf ~/frappe-bench/env
bench -v setup env
bench -v setup env --python python$2
bench pip install -e ./apps/erpnext
bench start &>> ~/frappe-bench/bench_start.log &
bench --site test_site migrate
}
update_to_version 14
update_to_version 15
update_to_version 15 3.13
echo "Updating to latest version"
git -C "apps/frappe" fetch --depth 1 upstream "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}"

View File

@@ -2,7 +2,7 @@ name: Generate Semantic Release
on:
push:
branches:
- version-13
- version-16
permissions:
contents: read
@@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Entire Repository
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v6
with:
node-version: 20
- name: Setup dependencies

View File

@@ -17,7 +17,7 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Clone
uses: actions/checkout@v4
uses: actions/checkout@v6
- id: set-matrix
run: |
# Use grep and find to get the list of test files
@@ -72,17 +72,17 @@ jobs:
steps:
- name: Clone
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.14'
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 18
node-version: 24
check-latest: true
- name: Add to Hosts

View File

@@ -15,11 +15,11 @@ jobs:
name: Check Commit Titles
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
fetch-depth: 200
- uses: actions/setup-node@v3
- uses: actions/setup-node@v6
with:
node-version: 18
check-latest: true

View File

@@ -7,6 +7,7 @@ on:
paths:
- "**.js"
- "**.css"
- "**.svg"
- "**.md"
- "**.html"
- 'crowdin.yml'

View File

@@ -7,6 +7,7 @@ on:
paths-ignore:
- '**.js'
- '**.css'
- '**.svg'
- '**.md'
- '**.html'
- 'crowdin.yml'
@@ -62,12 +63,12 @@ jobs:
steps:
- name: Clone
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.14'
- name: Check for valid Python & Merge Conflicts
run: |
@@ -78,9 +79,9 @@ jobs:
fi
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 18
node-version: 24
check-latest: true
- name: Add to Hosts
@@ -149,7 +150,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Download artifacts
uses: actions/download-artifact@v4

View File

@@ -47,12 +47,12 @@ jobs:
steps:
- name: Clone
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.14'
- name: Check for valid Python & Merge Conflicts
run: |
@@ -63,9 +63,9 @@ jobs:
fi
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 18
node-version: 24
check-latest: true
- name: Add to Hosts

View File

@@ -1,5 +1,5 @@
{
"branches": ["version-13"],
"branches": ["version-16"],
"plugins": [
"@semantic-release/commit-analyzer", {
"preset": "angular",
@@ -21,4 +21,4 @@
],
"@semantic-release/github"
]
}
}

View File

@@ -1,3 +1,4 @@
<div align="center">
<a href="https://frappe.io/erpnext">
<img src="./erpnext/public/images/v16/erpnext.svg" alt="ERPNext Logo" height="80px" width="80xp"/>

View File

@@ -6,7 +6,7 @@ import frappe
from frappe.model.document import Document
from frappe.utils.user import is_website_user
__version__ = "16.0.0-dev"
__version__ = "16.8.3"
def get_default_company(user=None):

View File

@@ -0,0 +1,50 @@
{
"cards": [
{
"card": "Total Outgoing Bills"
},
{
"card": "Total Incoming Bills"
},
{
"card": "Total Incoming Payment"
},
{
"card": "Total Outgoing Payment"
}
],
"charts": [
{
"chart": "Incoming Bills (Purchase Invoice)",
"width": "Half"
},
{
"chart": "Outgoing Bills (Sales Invoice)",
"width": "Half"
},
{
"chart": "Accounts Receivable Ageing",
"width": "Half"
},
{
"chart": "Accounts Payable Ageing",
"width": "Half"
},
{
"chart": "Bank Balance",
"width": "Full"
}
],
"creation": "2026-01-26 21:25:12.793893",
"dashboard_name": "Payments",
"docstatus": 0,
"doctype": "Dashboard",
"idx": 0,
"is_default": 0,
"is_standard": 1,
"modified": "2026-01-26 21:25:12.793893",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payments",
"owner": "Administrator"
}

View File

@@ -9,18 +9,20 @@
"idx": 0,
"is_public": 1,
"is_standard": 1,
"last_synced_on": "2020-07-22 12:19:59.879476",
"modified": "2020-07-22 12:21:48.780513",
"last_synced_on": "2026-01-02 13:01:24.037552",
"modified": "2026-01-02 13:04:57.850305",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Balance",
"number_of_groups": 0,
"owner": "Administrator",
"roles": [],
"show_values_over_chart": 1,
"source": "Account Balance Timeline",
"time_interval": "Quarterly",
"timeseries": 0,
"time_interval": "Monthly",
"timeseries": 1,
"timespan": "Last Year",
"type": "Line",
"use_report_chart": 0,
"y_axis": []
}
}

View File

@@ -1,7 +1,7 @@
{
"chart_name": "Profit and Loss",
"chart_type": "Report",
"creation": "2020-07-17 11:25:34.448572",
"creation": "2025-04-01 20:38:16.986176",
"docstatus": 0,
"doctype": "Dashboard Chart",
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"erpnext.utils.get_fiscal_year()\",\"to_fiscal_year\":\"erpnext.utils.get_fiscal_year()\"}",
@@ -9,7 +9,7 @@
"idx": 0,
"is_public": 1,
"is_standard": 1,
"modified": "2023-07-19 13:08:56.470390",
"modified": "2025-12-19 12:37:31.673782",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Profit and Loss",
@@ -17,8 +17,9 @@
"owner": "Administrator",
"report_name": "Profit and Loss Statement",
"roles": [],
"show_values_over_chart": 1,
"timeseries": 0,
"type": "Bar",
"type": "Line",
"use_report_chart": 1,
"y_axis": []
}
}

View File

@@ -450,14 +450,12 @@ def process_deferred_accounting(posting_date=None):
for company in companies:
for record_type in ("Income", "Expense"):
doc = frappe.get_doc(
dict(
doctype="Process Deferred Accounting",
company=company.name,
posting_date=posting_date,
start_date=start_date,
end_date=end_date,
type=record_type,
)
doctype="Process Deferred Accounting",
company=company.name,
posting_date=posting_date,
start_date=start_date,
end_date=end_date,
type=record_type,
)
doc.insert()

View File

@@ -70,6 +70,7 @@ frappe.treeview_settings["Account"] = {
args: {
accounts: accounts,
company: cur_tree.args.company,
include_default_fb_balances: true,
},
});

View File

@@ -33,6 +33,17 @@
},
"account_number": "1151.000"
},
"Pajak Dibayar di Muka": {
"PPN Masukan": {
"account_number": "1152.001",
"account_type": "Tax"
},
"PPh 23 Dibayar di Muka": {
"account_number": "1152.002",
"account_type": "Tax"
},
"account_number": "1152.000"
},
"account_number": "1150.000"
},
"Kas": {
@@ -97,17 +108,6 @@
},
"account_number": "1130.000"
},
"Pajak Dibayar di Muka": {
"PPN Masukan": {
"account_number": "1151.001",
"account_type": "Tax"
},
"PPh 23 Dibayar di Muka": {
"account_number": "1152.001",
"account_type": "Tax"
},
"account_number": "1150.000"
},
"account_number": "1100.000"
},

View File

@@ -415,15 +415,13 @@ def create_account(**kwargs):
return account.name
else:
account = frappe.get_doc(
dict(
doctype="Account",
is_group=kwargs.get("is_group", 0),
account_name=kwargs.get("account_name"),
account_type=kwargs.get("account_type"),
parent_account=kwargs.get("parent_account"),
company=kwargs.get("company"),
account_currency=kwargs.get("account_currency"),
)
doctype="Account",
is_group=kwargs.get("is_group", 0),
account_name=kwargs.get("account_name"),
account_type=kwargs.get("account_type"),
parent_account=kwargs.get("parent_account"),
company=kwargs.get("company"),
account_currency=kwargs.get("account_currency"),
)
account.save()

View File

@@ -12,6 +12,7 @@
"column_break_4",
"company",
"disabled",
"exempted_role",
"section_break_7",
"closed_documents"
],
@@ -67,10 +68,18 @@
"label": "Closed Documents",
"options": "Closed Document",
"reqd": 1
},
{
"description": "Role allowed to bypass period restrictions.",
"fieldname": "exempted_role",
"fieldtype": "Link",
"label": "Exempted Role",
"link_filters": "[[\"Role\",\"disabled\",\"=\",0]]",
"options": "Role"
}
],
"links": [],
"modified": "2025-10-06 15:00:15.568067",
"modified": "2025-12-01 16:53:44.631299",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting Period",

View File

@@ -30,6 +30,7 @@ class AccountingPeriod(Document):
company: DF.Link
disabled: DF.Check
end_date: DF.Date
exempted_role: DF.Link | None
period_name: DF.Data
start_date: DF.Date
# end: auto-generated types
@@ -113,7 +114,7 @@ def validate_accounting_period_on_doc_save(doc, method=None):
accounting_period = (
frappe.qb.from_(ap)
.from_(cd)
.select(ap.name)
.select(ap.name, ap.exempted_role)
.where(
(ap.name == cd.parent)
& (ap.company == doc.company)
@@ -126,6 +127,11 @@ def validate_accounting_period_on_doc_save(doc, method=None):
).run(as_dict=1)
if accounting_period:
if (
accounting_period[0].get("exempted_role")
and accounting_period[0].get("exempted_role") in frappe.get_roles()
):
return
frappe.throw(
_("You cannot create a {0} within the closed Accounting Period {1}").format(
doc.doctype, frappe.bold(accounting_period[0]["name"])

View File

@@ -37,6 +37,59 @@ class TestAccountingPeriod(IntegrationTestCase):
doc = create_sales_invoice(do_not_save=1, cost_center="_Test Company - _TC", warehouse="Stores - _TC")
self.assertRaises(ClosedAccountingPeriod, doc.save)
def test_accounting_period_exempted_role(self):
# Create Accounting Period with exempted role
ap = create_accounting_period(
period_name="Test Accounting Period Exempted",
exempted_role="Accounts Manager",
start_date="2025-12-01",
end_date="2025-12-31",
)
ap.save()
# Create users
users = frappe.get_all("User", filters={"email": ["like", "test%"]}, limit=1)
user = None
if users[0].name:
user = frappe.get_doc("User", users[0].name)
else:
user = frappe.get_doc(
{
"doctype": "User",
"email": "test1@example.com",
"first_name": "Test1",
}
)
user.insert()
user.roles = []
user.append("roles", {"role": "Accounts User"})
# ---- Non-exempted user should FAIL ----
user.save(ignore_permissions=True)
frappe.clear_cache(user=user.name)
frappe.set_user(user.name)
posting_date = "2025-12-11"
doc = create_sales_invoice(
do_not_save=1,
posting_date=posting_date,
)
with self.assertRaises(frappe.ValidationError):
doc.submit()
# ---- Exempted role should PASS ----
user.append("roles", {"role": "Accounts Manager"})
user.save(ignore_permissions=True)
frappe.clear_cache(user=user.name)
doc = create_sales_invoice(do_not_save=1, posting_date=posting_date)
doc.submit() # Should not raise
self.assertEqual(doc.docstatus, 1)
def tearDown(self):
for d in frappe.get_all("Accounting Period"):
frappe.delete_doc("Accounting Period", d.name)
@@ -51,5 +104,6 @@ def create_accounting_period(**args):
accounting_period.company = args.company or "_Test Company"
accounting_period.period_name = args.period_name or "_Test_Period_Name_1"
accounting_period.append("closed_documents", {"document_type": "Sales Invoice", "closed": 1})
accounting_period.exempted_role = args.exempted_role or ""
return accounting_period

View File

@@ -20,6 +20,10 @@
"enable_common_party_accounting",
"allow_multi_currency_invoices_against_single_party_account",
"confirm_before_resetting_posting_date",
"analytics_section",
"enable_accounting_dimensions",
"column_break_vtnr",
"enable_discounts_and_margin",
"journals_section",
"merge_similar_account_heads",
"deferred_accounting_settings_section",
@@ -51,12 +55,16 @@
"allow_pegged_currencies_exchange_rates",
"column_break_yuug",
"stale_days",
"payments_tab",
"section_break_jpd0",
"auto_reconcile_payments",
"auto_reconciliation_job_trigger",
"reconciliation_queue_size",
"column_break_resa",
"exchange_gain_loss_posting_date",
"payment_options_section",
"enable_loyalty_point_program",
"column_break_ctam",
"invoicing_settings_tab",
"accounts_transactions_settings_section",
"over_billing_allowance",
@@ -64,10 +72,6 @@
"role_allowed_to_over_bill",
"credit_controller",
"make_payment_via_journal_entry",
"pos_tab",
"pos_setting_section",
"post_change_gl_entries",
"column_break_xrnd",
"assets_tab",
"asset_settings_section",
"calculate_depr_using_total_days",
@@ -79,11 +83,6 @@
"ignore_account_closing_balance",
"use_legacy_controller_for_pcv",
"column_break_25",
"tab_break_dpet",
"show_balance_in_coa",
"banking_tab",
"enable_party_matching",
"enable_fuzzy_matching",
"reports_tab",
"remarks_section",
"general_ledger_remarks_length",
@@ -91,13 +90,20 @@
"receivable_payable_remarks_length",
"accounts_receivable_payable_tuning_section",
"receivable_payable_fetch_method",
"default_ageing_range",
"column_break_ntmi",
"drop_ar_procedures",
"legacy_section",
"ignore_is_opening_check_for_reporting",
"payment_request_settings",
"tab_break_dpet",
"chart_of_accounts_section",
"show_balance_in_coa",
"banking_section",
"enable_party_matching",
"enable_fuzzy_matching",
"payment_request_section",
"create_pr_in_draft_status",
"budget_settings",
"budget_section",
"use_legacy_budget_controller"
],
"fields": [
@@ -281,16 +287,9 @@
"fieldname": "column_break_19",
"fieldtype": "Column Break"
},
{
"default": "1",
"description": "If enabled, ledger entries will be posted for change amount in POS transactions",
"fieldname": "post_change_gl_entries",
"fieldtype": "Check",
"label": "Create Ledger Entries for Change Amount"
},
{
"default": "0",
"description": "Learn about <a href=\"https://docs.erpnext.com/docs/v13/user/manual/en/accounts/articles/common_party_accounting#:~:text=Common%20Party%20Accounting%20in%20ERPNext,Invoice%20against%20a%20primary%20Supplier.\">Common Party</a>",
"description": "Learn about <a href=\"https://docs.frappe.io/erpnext/user/manual/en/common_party_accounting\" rel=\"noopener noreferrer\">Common Party</a>",
"fieldname": "enable_common_party_accounting",
"fieldtype": "Check",
"label": "Enable Common Party Accounting"
@@ -328,11 +327,6 @@
"fieldtype": "Tab Break",
"label": "Accounts Closing"
},
{
"fieldname": "pos_setting_section",
"fieldtype": "Section Break",
"label": "POS Setting"
},
{
"fieldname": "invoice_and_billing_tab",
"fieldtype": "Tab Break",
@@ -347,11 +341,6 @@
"fieldname": "column_break_17",
"fieldtype": "Column Break"
},
{
"fieldname": "pos_tab",
"fieldtype": "Tab Break",
"label": "POS"
},
{
"default": "0",
"description": "Enabling this will allow creation of multi-currency invoices against single party account in company currency",
@@ -362,7 +351,7 @@
{
"fieldname": "tab_break_dpet",
"fieldtype": "Tab Break",
"label": "Chart Of Accounts"
"label": "Others"
},
{
"default": "1",
@@ -406,11 +395,6 @@
"fieldtype": "Check",
"label": "Show Taxes as Table in Print"
},
{
"fieldname": "banking_tab",
"fieldtype": "Tab Break",
"label": "Banking"
},
{
"default": "0",
"description": "Auto match and set the Party in Bank Transactions",
@@ -486,14 +470,9 @@
"fieldtype": "Check",
"label": "Calculate daily depreciation using total days in depreciation period"
},
{
"description": "Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.",
"fieldname": "payment_request_settings",
"fieldtype": "Tab Break",
"label": "Payment Request"
},
{
"default": "1",
"description": "Payment Requests made from Sales / Purchase Invoice will be put in Draft explicitly",
"fieldname": "create_pr_in_draft_status",
"fieldtype": "Check",
"label": "Create in Draft Status"
@@ -535,10 +514,6 @@
"label": "Posting Date Inheritance for Exchange Gain / Loss",
"options": "Invoice\nPayment\nReconciliation Date"
},
{
"fieldname": "column_break_xrnd",
"fieldtype": "Column Break"
},
{
"default": "Buffered Cursor",
"fieldname": "receivable_payable_fetch_method",
@@ -578,11 +553,6 @@
"label": "Role Allowed to Override Stop Action",
"options": "Role"
},
{
"fieldname": "budget_settings",
"fieldtype": "Tab Break",
"label": "Budget"
},
{
"default": "1",
"description": "If enabled, user will be alerted before resetting posting date to current date in relevant transactions",
@@ -649,15 +619,85 @@
"fieldtype": "Link",
"label": "Role to Notify on Depreciation Failure",
"options": "Role"
},
{
"default": "30, 60, 90, 120",
"fieldname": "default_ageing_range",
"fieldtype": "Data",
"label": "Default Ageing Range"
},
{
"fieldname": "chart_of_accounts_section",
"fieldtype": "Section Break",
"label": "Chart Of Accounts"
},
{
"fieldname": "banking_section",
"fieldtype": "Section Break",
"label": "Banking"
},
{
"fieldname": "payment_request_section",
"fieldtype": "Section Break",
"label": "Payment Request"
},
{
"fieldname": "budget_section",
"fieldtype": "Section Break",
"label": "Budget"
},
{
"fieldname": "analytics_section",
"fieldtype": "Section Break",
"label": "Analytical Accounting"
},
{
"fieldname": "column_break_vtnr",
"fieldtype": "Column Break"
},
{
"default": "0",
"description": "Apply discounts and margins on products",
"fieldname": "enable_discounts_and_margin",
"fieldtype": "Check",
"label": "Enable Discounts and Margin"
},
{
"fieldname": "payments_tab",
"fieldtype": "Tab Break",
"label": "Payments"
},
{
"fieldname": "payment_options_section",
"fieldtype": "Section Break",
"label": "Payment Options"
},
{
"default": "0",
"fieldname": "enable_loyalty_point_program",
"fieldtype": "Check",
"label": "Enable Loyalty Point Program"
},
{
"fieldname": "column_break_ctam",
"fieldtype": "Column Break"
},
{
"default": "0",
"description": "Enable cost center, projects and other custom accounting dimensions",
"fieldname": "enable_accounting_dimensions",
"fieldtype": "Check",
"label": "Enable Accounting Dimensions"
}
],
"grid_page_length": 50,
"hide_toolbar": 0,
"icon": "icon-cog",
"idx": 1,
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2025-12-03 20:42:13.238050",
"modified": "2026-02-04 17:15:38.609327",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",

View File

@@ -12,6 +12,28 @@ from frappe.utils import cint
from erpnext.accounts.utils import sync_auto_reconcile_config
SELLING_DOCTYPES = [
"Sales Invoice",
"Sales Order",
"Delivery Note",
"Quotation",
"Sales Invoice Item",
"Sales Order Item",
"Delivery Note Item",
"Quotation Item",
"POS Invoice",
"POS Invoice Item",
]
BUYING_DOCTYPES = [
"Purchase Invoice",
"Purchase Order",
"Purchase Receipt",
"Purchase Invoice Item",
"Purchase Order Item",
"Purchase Receipt Item",
]
class AccountsSettings(Document):
# begin: auto-generated types
@@ -40,11 +62,15 @@ class AccountsSettings(Document):
confirm_before_resetting_posting_date: DF.Check
create_pr_in_draft_status: DF.Check
credit_controller: DF.Link | None
default_ageing_range: DF.Data | None
delete_linked_ledger_entries: DF.Check
determine_address_tax_category_from: DF.Literal["Billing Address", "Shipping Address"]
enable_accounting_dimensions: DF.Check
enable_common_party_accounting: DF.Check
enable_discounts_and_margin: DF.Check
enable_fuzzy_matching: DF.Check
enable_immutable_ledger: DF.Check
enable_loyalty_point_program: DF.Check
enable_party_matching: DF.Check
exchange_gain_loss_posting_date: DF.Literal["Invoice", "Payment", "Reconciliation Date"]
fetch_valuation_rate_for_internal_transaction: DF.Check
@@ -56,7 +82,6 @@ class AccountsSettings(Document):
make_payment_via_journal_entry: DF.Check
merge_similar_account_heads: DF.Check
over_billing_allowance: DF.Currency
post_change_gl_entries: DF.Check
receivable_payable_fetch_method: DF.Literal["Buffered Cursor", "UnBuffered Cursor", "Raw SQL"]
receivable_payable_remarks_length: DF.Int
reconciliation_queue_size: DF.Int
@@ -98,6 +123,18 @@ class AccountsSettings(Document):
if old_doc.show_payment_schedule_in_print != self.show_payment_schedule_in_print:
self.enable_payment_schedule_in_print()
if old_doc.enable_accounting_dimensions != self.enable_accounting_dimensions:
toggle_accounting_dimension_sections(not self.enable_accounting_dimensions)
clear_cache = True
if old_doc.enable_discounts_and_margin != self.enable_discounts_and_margin:
toggle_sales_discount_section(not self.enable_discounts_and_margin)
clear_cache = True
if old_doc.enable_loyalty_point_program != self.enable_loyalty_point_program:
toggle_loyalty_point_program_section(not self.enable_loyalty_point_program)
clear_cache = True
if clear_cache:
frappe.clear_cache()
@@ -152,6 +189,38 @@ class AccountsSettings(Document):
def drop_ar_sql_procedures(self):
from erpnext.accounts.report.accounts_receivable.accounts_receivable import InitSQLProceduresForAR
frappe.db.sql(f"drop function if exists {InitSQLProceduresForAR.genkey_function_name}")
frappe.db.sql(f"drop procedure if exists {InitSQLProceduresForAR.init_procedure_name}")
frappe.db.sql(f"drop procedure if exists {InitSQLProceduresForAR.allocate_procedure_name}")
def toggle_accounting_dimension_sections(hide):
accounting_dimension_doctypes = frappe.get_hooks("accounting_dimension_doctypes")
for doctype in accounting_dimension_doctypes:
create_property_setter_for_hiding_field(doctype, "accounting_dimensions_section", hide)
def toggle_sales_discount_section(hide):
for doctype in SELLING_DOCTYPES + BUYING_DOCTYPES:
meta = frappe.get_meta(doctype)
if meta.has_field("additional_discount_section"):
create_property_setter_for_hiding_field(doctype, "additional_discount_section", hide)
if meta.has_field("discount_and_margin"):
create_property_setter_for_hiding_field(doctype, "discount_and_margin", hide)
def toggle_loyalty_point_program_section(hide):
for doctype in SELLING_DOCTYPES:
meta = frappe.get_meta(doctype)
if meta.has_field("loyalty_points_redemption"):
create_property_setter_for_hiding_field(doctype, "loyalty_points_redemption", hide)
def create_property_setter_for_hiding_field(doctype, field_name, hide):
make_property_setter(
doctype,
field_name,
"hidden",
hide,
"Check",
validate_fields_for_doctype=False,
)

View File

@@ -50,6 +50,7 @@
"fieldname": "amount",
"fieldtype": "Currency",
"label": "Amount",
"options": "currency",
"read_only": 1
},
{

View File

@@ -1,57 +0,0 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2021-11-25 10:24:39.836195",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"reference_type",
"reference_name",
"reference_detail",
"account_head",
"allocated_amount"
],
"fields": [
{
"fieldname": "reference_type",
"fieldtype": "Link",
"label": "Reference Type",
"options": "DocType"
},
{
"fieldname": "reference_name",
"fieldtype": "Dynamic Link",
"label": "Reference Name",
"options": "reference_type"
},
{
"fieldname": "reference_detail",
"fieldtype": "Data",
"label": "Reference Detail"
},
{
"fieldname": "account_head",
"fieldtype": "Link",
"label": "Account Head",
"options": "Account"
},
{
"fieldname": "allocated_amount",
"fieldtype": "Currency",
"label": "Allocated Amount",
"options": "party_account_currency"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-03-27 13:05:58.308002",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Advance Tax",
"owner": "Administrator",
"permissions": [],
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}

View File

@@ -14,6 +14,7 @@
"description",
"included_in_paid_amount",
"set_by_item_tax_template",
"is_tax_withholding_account",
"accounting_dimensions_section",
"cost_center",
"dimension_col_break",
@@ -25,7 +26,6 @@
"net_amount",
"tax_amount",
"total",
"allocated_amount",
"column_break_13",
"base_tax_amount",
"base_net_amount",
@@ -97,11 +97,11 @@
"fieldtype": "Column Break"
},
{
"allow_on_submit": 1,
"fieldname": "project",
"fieldtype": "Link",
"label": "Project",
"options": "Project"
"allow_on_submit": 1,
"fieldname": "project",
"fieldtype": "Link",
"label": "Project",
"options": "Project"
},
{
"fieldname": "section_break_8",
@@ -172,12 +172,6 @@
"fieldtype": "Check",
"label": "Considered In Paid Amount"
},
{
"fieldname": "allocated_amount",
"fieldtype": "Currency",
"label": "Allocated Amount",
"options": "currency"
},
{
"fetch_from": "account_head.account_currency",
"fieldname": "currency",
@@ -213,18 +207,26 @@
"print_hide": 1,
"read_only": 1,
"report_hide": 1
},
{
"default": "0",
"fieldname": "is_tax_withholding_account",
"fieldtype": "Check",
"label": "Is Tax Withholding Account",
"read_only": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-11-22 19:16:22.346267",
"modified": "2025-12-15 06:42:18.707671",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Advance Taxes and Charges",
"owner": "Administrator",
"permissions": [],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "ASC",
"states": []
}
}

View File

@@ -17,7 +17,6 @@ class AdvanceTaxesandCharges(Document):
account_head: DF.Link
add_deduct_tax: DF.Literal["Add", "Deduct"]
allocated_amount: DF.Currency
base_net_amount: DF.Currency
base_tax_amount: DF.Currency
base_total: DF.Currency
@@ -28,10 +27,12 @@ class AdvanceTaxesandCharges(Document):
currency: DF.Link | None
description: DF.SmallText
included_in_paid_amount: DF.Check
is_tax_withholding_account: DF.Check
net_amount: DF.Currency
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
project: DF.Link | None
rate: DF.Float
row_id: DF.Data | None
set_by_item_tax_template: DF.Check

View File

@@ -3,9 +3,6 @@
frappe.provide("erpnext.integrations");
frappe.ui.form.on("Bank", {
onload: function (frm) {
add_fields_to_mapping_table(frm);
},
refresh: function (frm) {
add_fields_to_mapping_table(frm);
frm.toggle_display(["address_html", "contact_html"], !frm.doc.__islocal);
@@ -37,11 +34,11 @@ let add_fields_to_mapping_table = function (frm) {
});
});
frm.fields_dict.bank_transaction_mapping.grid.update_docfield_property(
"bank_transaction_field",
"options",
options
);
const grid = frm.fields_dict.bank_transaction_mapping?.grid;
if (grid) {
grid.update_docfield_property("bank_transaction_field", "options", options);
}
};
erpnext.integrations.refreshPlaidLink = class refreshPlaidLink {
@@ -116,7 +113,7 @@ erpnext.integrations.refreshPlaidLink = class refreshPlaidLink {
"There was an issue connecting to Plaid's authentication server. Check browser console for more information"
)
);
console.log(error);
console.error(error);
}
plaid_success(token, response) {

View File

@@ -42,8 +42,4 @@ frappe.ui.form.on("Bank Account", {
});
}
},
is_company_account: function (frm) {
frm.set_df_property("account", "reqd", frm.doc.is_company_account);
},
});

View File

@@ -52,6 +52,7 @@
"fieldtype": "Link",
"in_list_view": 1,
"label": "Company Account",
"mandatory_depends_on": "is_company_account",
"options": "Account"
},
{
@@ -98,6 +99,7 @@
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Company",
"mandatory_depends_on": "is_company_account",
"options": "Company"
},
{
@@ -252,7 +254,7 @@
"link_fieldname": "default_bank_account"
}
],
"modified": "2025-08-29 12:32:01.081687",
"modified": "2026-01-20 00:46:16.633364",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Account",

View File

@@ -51,25 +51,29 @@ class BankAccount(Document):
delete_contact_and_address("Bank Account", self.name)
def validate(self):
self.validate_company()
self.validate_account()
self.validate_is_company_account()
self.update_default_bank_account()
def validate_account(self):
if self.account:
if accounts := frappe.db.get_all(
"Bank Account", filters={"account": self.account, "name": ["!=", self.name]}, as_list=1
):
frappe.throw(
_("'{0}' account is already used by {1}. Use another account.").format(
frappe.bold(self.account),
frappe.bold(comma_and([get_link_to_form(self.doctype, x[0]) for x in accounts])),
)
)
def validate_is_company_account(self):
if self.is_company_account:
if not self.company:
frappe.throw(_("Company is mandatory for company account"))
def validate_company(self):
if self.is_company_account and not self.company:
frappe.throw(_("Company is mandatory for company account"))
if not self.account:
frappe.throw(_("Company Account is mandatory"))
self.validate_account()
def validate_account(self):
if accounts := frappe.db.get_all(
"Bank Account", filters={"account": self.account, "name": ["!=", self.name]}, as_list=1
):
frappe.throw(
_("'{0}' account is already used by {1}. Use another account.").format(
frappe.bold(self.account),
frappe.bold(comma_and([get_link_to_form(self.doctype, x[0]) for x in accounts])),
)
)
def update_default_bank_account(self):
if self.is_default and not self.disabled:

View File

@@ -125,7 +125,7 @@ class BankClearance(Document):
)
msg += "</ul>"
frappe.throw(_(msg))
msgprint(_(msg))
return
if not entries_to_update:
@@ -134,16 +134,44 @@ class BankClearance(Document):
for d in entries_to_update:
if d.payment_document == "Sales Invoice":
frappe.db.set_value(
old_clearance_date = frappe.db.get_value(
"Sales Invoice Payment",
{"parent": d.payment_entry, "account": self.get("account"), "amount": [">", 0]},
{
"parent": d.payment_entry,
"account": self.account,
"amount": [">", 0],
},
"clearance_date",
d.clearance_date,
)
if d.clearance_date or old_clearance_date:
frappe.db.set_value(
"Sales Invoice Payment",
{"parent": d.payment_entry, "account": self.get("account"), "amount": [">", 0]},
"clearance_date",
d.clearance_date,
)
sales_invoice = frappe.get_lazy_doc("Sales Invoice", d.payment_entry)
sales_invoice.add_comment(
"Comment",
_("Clearance date changed from {0} to {1} via Bank Clearance Tool").format(
old_clearance_date, d.clearance_date
),
)
else:
# using db_set to trigger notification
payment_entry = frappe.get_lazy_doc(d.payment_document, d.payment_entry)
payment_entry.db_set("clearance_date", d.clearance_date)
old_clearance_date = payment_entry.clearance_date
if d.clearance_date or old_clearance_date:
# using db_set to trigger notification
payment_entry.db_set("clearance_date", d.clearance_date)
payment_entry.add_comment(
"Comment",
_("Clearance date changed from {0} to {1} via Bank Clearance Tool").format(
old_clearance_date, d.clearance_date
),
)
self.get_payment_entries()
msgprint(_("Clearance Date updated"))

View File

@@ -30,8 +30,7 @@
"label": "Payment Entry",
"oldfieldname": "voucher_id",
"oldfieldtype": "Link",
"options": "payment_document",
"width": "50"
"options": "payment_document"
},
{
"columns": 2,
@@ -69,7 +68,7 @@
"read_only": 1
},
{
"columns": 2,
"columns": 1,
"fieldname": "cheque_number",
"fieldtype": "Data",
"in_list_view": 1,
@@ -79,8 +78,10 @@
"read_only": 1
},
{
"columns": 2,
"fieldname": "cheque_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Cheque Date",
"oldfieldname": "cheque_date",
"oldfieldtype": "Date",
@@ -96,17 +97,19 @@
"oldfieldtype": "Date"
}
],
"grid_page_length": 50,
"idx": 1,
"istable": 1,
"links": [],
"modified": "2024-03-27 13:06:37.609319",
"modified": "2025-12-17 14:33:45.913311",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Clearance Detail",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "ASC",
"states": []
}
}

View File

@@ -304,6 +304,7 @@ def create_payment_entry_bts(
project=None,
cost_center=None,
allow_edit=None,
company_bank_account=None,
):
# Create a new payment entry based on the bank transaction
bank_transaction = frappe.db.get_values(
@@ -345,6 +346,9 @@ def create_payment_entry_bts(
pe.project = project
pe.cost_center = cost_center
if company_bank_account:
pe.bank_account = company_bank_account
pe.validate()
if allow_edit:

View File

@@ -38,7 +38,10 @@
"column_break_3czf",
"bank_party_name",
"bank_party_account_number",
"bank_party_iban"
"bank_party_iban",
"extended_bank_statement_section",
"included_fee",
"excluded_fee"
],
"fields": [
{
@@ -233,12 +236,32 @@
{
"fieldname": "column_break_oufv",
"fieldtype": "Column Break"
},
{
"fieldname": "extended_bank_statement_section",
"fieldtype": "Section Break",
"label": "Extended Bank Statement"
},
{
"fieldname": "included_fee",
"fieldtype": "Currency",
"label": "Included Fee",
"non_negative": 1,
"options": "currency"
},
{
"description": "On save, the Excluded Fee will be converted to an Included Fee.",
"fieldname": "excluded_fee",
"fieldtype": "Currency",
"label": "Excluded Fee",
"non_negative": 1,
"options": "currency"
}
],
"grid_page_length": 50,
"is_submittable": 1,
"links": [],
"modified": "2025-10-23 17:32:58.514807",
"modified": "2025-12-07 20:49:18.600757",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Transaction",

View File

@@ -32,6 +32,8 @@ class BankTransaction(Document):
date: DF.Date | None
deposit: DF.Currency
description: DF.SmallText | None
excluded_fee: DF.Currency
included_fee: DF.Currency
naming_series: DF.Literal["ACC-BTN-.YYYY.-"]
party: DF.DynamicLink | None
party_type: DF.Link | None
@@ -45,9 +47,14 @@ class BankTransaction(Document):
# end: auto-generated types
def before_validate(self):
self.handle_excluded_fee()
self.update_allocated_amount()
def on_discard(self):
self.db_set("status", "Cancelled")
def validate(self):
self.validate_included_fee()
self.validate_duplicate_references()
self.validate_currency()
@@ -132,6 +139,8 @@ class BankTransaction(Document):
self.set_status()
def on_cancel(self):
self.ignore_linked_doctypes = ["GL Entry"]
for payment_entry in self.payment_entries:
self.delink_payment_entry(payment_entry)
@@ -307,6 +316,40 @@ class BankTransaction(Document):
self.party_type, self.party = result
def validate_included_fee(self):
"""
The included_fee is only handled for withdrawals. An included_fee for a deposit, is not credited to the account and is
therefore outside of the deposit value and can be larger than the deposit itself.
"""
if self.included_fee and self.withdrawal:
if self.included_fee > self.withdrawal:
frappe.throw(_("Included fee is bigger than the withdrawal itself."))
def handle_excluded_fee(self):
# Include the excluded fee on validate to handle all further processing the same
excluded_fee = flt(self.excluded_fee)
if excluded_fee <= 0:
return
# Suppress a negative deposit (aka withdrawal), likely not intendend
if flt(self.deposit) > 0 and (flt(self.deposit) - excluded_fee) < 0:
frappe.throw(_("The Excluded Fee is bigger than the Deposit it is deducted from."))
# Enforce directionality
if flt(self.deposit) > 0 and flt(self.withdrawal) > 0:
frappe.throw(
_("Only one of Deposit or Withdrawal should be non-zero when applying an Excluded Fee.")
)
if flt(self.deposit) > 0:
self.deposit = flt(self.deposit) - excluded_fee
# A fee applied to deposit and withdrawal equal 0 become a withdrawal
elif flt(self.withdrawal) >= 0:
self.withdrawal = flt(self.withdrawal) + excluded_fee
self.included_fee = flt(self.included_fee) + excluded_fee
self.excluded_fee = 0
@frappe.whitelist()
def get_doctypes_for_bank_reconciliation():
@@ -332,11 +375,12 @@ def get_clearance_details(transaction, payment_entry, bt_allocations, gl_entries
("unallocated_amount", "bank_account"),
as_dict=True,
)
bt_bank_account = frappe.db.get_value("Bank Account", bt.bank_account, "account")
if bt.bank_account != gl_bank_account:
if bt_bank_account != gl_bank_account:
frappe.throw(
_("Bank Account {} in Bank Transaction {} is not matching with Bank Account {}").format(
bt.bank_account, payment_entry.payment_entry, gl_bank_account
bt_bank_account, payment_entry.payment_entry, gl_bank_account
)
)

View File

@@ -0,0 +1,133 @@
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import frappe
from frappe.tests import UnitTestCase
class TestBankTransactionFees(UnitTestCase):
def test_included_fee_throws(self):
"""A fee that's part of a withdrawal cannot be bigger than the
withdrawal itself."""
bt = frappe.new_doc("Bank Transaction")
bt.withdrawal = 100
bt.included_fee = 101
self.assertRaises(frappe.ValidationError, bt.validate_included_fee)
def test_included_fee_allows_equal(self):
"""A fee that's part of a withdrawal may be equal to the withdrawal
amount (only the fee was deducted from the account)."""
bt = frappe.new_doc("Bank Transaction")
bt.withdrawal = 100
bt.included_fee = 100
bt.validate_included_fee()
def test_included_fee_allows_for_deposit(self):
"""For deposits, a fee may be recorded separately without limiting the
received amount."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 10
bt.included_fee = 999
bt.validate_included_fee()
def test_excluded_fee_noop_when_zero(self):
"""When there is no excluded fee to apply, the amounts should remain
unchanged."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 100
bt.withdrawal = 0
bt.included_fee = 5
bt.excluded_fee = 0
bt.handle_excluded_fee()
self.assertEqual(bt.deposit, 100)
self.assertEqual(bt.withdrawal, 0)
self.assertEqual(bt.included_fee, 5)
self.assertEqual(bt.excluded_fee, 0)
def test_excluded_fee_throws_when_exceeds_deposit(self):
"""A fee deducted from an incoming payment must not exceed the incoming
amount (else it would be a withdrawal, a conversion we don't support)."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 10
bt.excluded_fee = 11
self.assertRaises(frappe.ValidationError, bt.handle_excluded_fee)
def test_excluded_fee_throws_when_both_deposit_and_withdrawal_are_set(self):
"""A transaction must be either incoming or outgoing when applying a
fee, not both."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 10
bt.withdrawal = 10
bt.excluded_fee = 1
self.assertRaises(frappe.ValidationError, bt.handle_excluded_fee)
def test_excluded_fee_deducts_from_deposit(self):
"""When a fee is deducted from an incoming payment, the net received
amount decreases and the fee is tracked as included."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 100
bt.withdrawal = 0
bt.included_fee = 2
bt.excluded_fee = 5
bt.handle_excluded_fee()
self.assertEqual(bt.deposit, 95)
self.assertEqual(bt.withdrawal, 0)
self.assertEqual(bt.included_fee, 7)
self.assertEqual(bt.excluded_fee, 0)
def test_excluded_fee_can_reduce_an_incoming_payment_to_zero(self):
"""A separately-deducted fee may reduce an incoming payment to zero,
while still tracking the fee."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 5
bt.withdrawal = 0
bt.included_fee = 0
bt.excluded_fee = 5
bt.handle_excluded_fee()
self.assertEqual(bt.deposit, 0)
self.assertEqual(bt.withdrawal, 0)
self.assertEqual(bt.included_fee, 5)
self.assertEqual(bt.excluded_fee, 0)
def test_excluded_fee_increases_outgoing_payment(self):
"""When a separately-deducted fee is provided for an outgoing payment,
the total money leaving increases and the fee is tracked."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 0
bt.withdrawal = 100
bt.included_fee = 2
bt.excluded_fee = 5
bt.handle_excluded_fee()
self.assertEqual(bt.deposit, 0)
self.assertEqual(bt.withdrawal, 105)
self.assertEqual(bt.included_fee, 7)
self.assertEqual(bt.excluded_fee, 0)
def test_excluded_fee_turns_zero_amount_into_withdrawal(self):
"""If only an excluded fee is provided, it should be treated as an
outgoing payment and the fee is then tracked as included."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 0
bt.withdrawal = 0
bt.included_fee = 0
bt.excluded_fee = 5
bt.handle_excluded_fee()
self.assertEqual(bt.deposit, 0)
self.assertEqual(bt.withdrawal, 5)
self.assertEqual(bt.included_fee, 5)
self.assertEqual(bt.excluded_fee, 0)

View File

@@ -12,6 +12,15 @@ frappe.ui.form.on("Budget", {
};
});
frm.set_query("account", function () {
return {
filters: {
is_group: 0,
company: frm.doc.company,
},
};
});
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
frappe.db.get_single_value("Accounts Settings", "use_legacy_budget_controller").then((value) => {
if (value) {
@@ -24,24 +33,16 @@ frappe.ui.form.on("Budget", {
frm.trigger("toggle_reqd_fields");
if (!frm.doc.__islocal && frm.doc.docstatus == 1) {
let exception_role = await frappe.db.get_value(
"Company",
frm.doc.company,
"exception_budget_approver_role"
frm.add_custom_button(
__("Revise Budget"),
function () {
frm.events.revise_budget_action(frm);
},
__("Actions")
);
const role = exception_role.message.exception_budget_approver_role;
if (role && frappe.user.has_role(role)) {
frm.add_custom_button(
__("Revise Budget"),
function () {
frm.events.revise_budget_action(frm);
},
__("Actions")
);
}
}
toggle_distribution_fields(frm);
},
budget_against: function (frm) {
@@ -54,10 +55,15 @@ frappe.ui.form.on("Budget", {
frm.doc.budget_distribution.forEach((row) => {
row.amount = flt((row.percent / 100) * frm.doc.budget_amount, 2);
});
set_total_budget_amount(frm);
frm.refresh_field("budget_distribution");
}
},
distribute_equally: function (frm) {
toggle_distribution_fields(frm);
},
set_null_value: function (frm) {
if (frm.doc.budget_against == "Cost Center") {
frm.set_value("project", null);
@@ -100,6 +106,8 @@ frappe.ui.form.on("Budget Distribution", {
let row = frappe.get_doc(cdt, cdn);
if (frm.doc.budget_amount) {
row.percent = flt((row.amount / frm.doc.budget_amount) * 100, 2);
set_total_budget_amount(frm);
frm.refresh_field("budget_distribution");
}
},
@@ -107,7 +115,29 @@ frappe.ui.form.on("Budget Distribution", {
let row = frappe.get_doc(cdt, cdn);
if (frm.doc.budget_amount) {
row.amount = flt((row.percent / 100) * frm.doc.budget_amount, 2);
set_total_budget_amount(frm);
frm.refresh_field("budget_distribution");
}
},
});
function set_total_budget_amount(frm) {
let total = 0;
(frm.doc.budget_distribution || []).forEach((row) => {
total += flt(row.amount);
});
frm.set_value("budget_distribution_total", total);
}
function toggle_distribution_fields(frm) {
const grid = frm.fields_dict.budget_distribution.grid;
["amount", "percent"].forEach((field) => {
grid.update_docfield_property(field, "read_only", frm.doc.distribute_equally);
});
grid.refresh();
}

View File

@@ -25,6 +25,10 @@
"distribute_equally",
"section_break_fpdt",
"budget_distribution",
"section_break_wkqb",
"column_break_paum",
"column_break_nwor",
"budget_distribution_total",
"section_break_6",
"applicable_on_material_request",
"action_if_annual_budget_exceeded_on_mr",
@@ -222,7 +226,8 @@
},
{
"fieldname": "section_break_fpdt",
"fieldtype": "Section Break"
"fieldtype": "Section Break",
"hide_border": 1
},
{
"fieldname": "budget_distribution",
@@ -303,13 +308,32 @@
"options": "Monthly\nQuarterly\nHalf-Yearly\nYearly",
"read_only_depends_on": "eval: doc.revision_of",
"reqd": 1
},
{
"fieldname": "section_break_wkqb",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_paum",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_nwor",
"fieldtype": "Column Break"
},
{
"fieldname": "budget_distribution_total",
"fieldtype": "Currency",
"label": "Budget Distribution Total",
"no_copy": 1,
"read_only": 1
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2025-11-19 17:00:00.648224",
"modified": "2025-12-10 02:35:01.197613",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget",

View File

@@ -53,6 +53,7 @@ class Budget(Document):
budget_against: DF.Literal["", "Cost Center", "Project"]
budget_amount: DF.Currency
budget_distribution: DF.Table[BudgetDistribution]
budget_distribution_total: DF.Currency
budget_end_date: DF.Date | None
budget_start_date: DF.Date | None
company: DF.Link
@@ -230,28 +231,49 @@ class Budget(Document):
def before_save(self):
self.allocate_budget()
self.budget_distribution_total = sum(flt(row.amount) for row in self.budget_distribution)
def on_update(self):
self.validate_distribution_totals()
def allocate_budget(self):
if self.revision_of:
if self._should_skip_allocation():
return
if self._should_recalculate_manual_distribution():
self._recalculate_manual_distribution()
return
if not self.should_regenerate_budget_distribution():
return
self.set("budget_distribution", [])
self._regenerate_distribution()
periods = self.get_budget_periods()
total_periods = len(periods)
row_percent = 100 / total_periods if total_periods else 0
def _should_skip_allocation(self):
return self.revision_of and not self.distribute_equally
for start_date, end_date in periods:
row = self.append("budget_distribution", {})
row.start_date = start_date
row.end_date = end_date
self.add_allocated_amount(row, row_percent)
def _should_recalculate_manual_distribution(self):
return (
not self.distribute_equally
and bool(self.budget_distribution)
and self._is_only_budget_amount_changed()
)
def _is_only_budget_amount_changed(self):
old = self.get_doc_before_save()
if not old:
return False
return (
old.budget_amount != self.budget_amount
and old.distribution_frequency == self.distribution_frequency
and old.budget_start_date == self.budget_start_date
and old.budget_end_date == self.budget_end_date
)
def _recalculate_manual_distribution(self):
for row in self.budget_distribution:
row.amount = flt((row.percent / 100) * self.budget_amount, 3)
def should_regenerate_budget_distribution(self):
"""Check whether budget distribution should be recalculated."""
@@ -265,7 +287,6 @@ class Budget(Document):
"to_fiscal_year",
"budget_amount",
"distribution_frequency",
"distribute_equally",
]
for field in changed_fields:
if old_doc.get(field) != self.get(field):
@@ -273,6 +294,21 @@ class Budget(Document):
return bool(self.distribute_equally)
def _regenerate_distribution(self):
self.set("budget_distribution", [])
periods = self.get_budget_periods()
total_periods = len(periods)
row_percent = 100 / total_periods if total_periods else 0
for start_date, end_date in periods:
row = self.append("budget_distribution", {})
row.start_date = start_date
row.end_date = end_date
self.add_allocated_amount(row, row_percent)
self.budget_distribution_total = self.budget_amount
def get_budget_periods(self):
"""Return list of (start_date, end_date) tuples based on frequency."""
frequency = self.distribution_frequency
@@ -312,12 +348,8 @@ class Budget(Document):
}.get(frequency, 1)
def add_allocated_amount(self, row, row_percent):
if not self.distribute_equally:
row.amount = 0
row.percent = 0
else:
row.amount = flt(self.budget_amount * row_percent / 100, 3)
row.percent = flt(row_percent, 3)
row.amount = flt(self.budget_amount * row_percent / 100, 3)
row.percent = flt(row_percent, 3)
def validate_distribution_totals(self):
if self.should_regenerate_budget_distribution():

View File

@@ -19,7 +19,7 @@ frappe.ui.form.on("Currency Exchange Settings", {
to: "{to_currency}",
};
add_param(frm, r.message, params, result);
} else if (frm.doc.service_provider == "frankfurter.dev") {
} else if (["frankfurter.app", "frankfurter.dev"].includes(frm.doc.service_provider)) {
let result = ["rates", "{to_currency}"];
let params = {
base: "{from_currency}",

View File

@@ -101,10 +101,11 @@
"label": "Use HTTP Protocol"
}
],
"hide_toolbar": 1,
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2025-11-25 13:03:41.896424",
"modified": "2026-01-02 18:19:02.873815",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Currency Exchange Settings",

View File

@@ -60,7 +60,7 @@ class CurrencyExchangeSettings(Document):
self.append("req_params", {"key": "date", "value": "{transaction_date}"})
self.append("req_params", {"key": "from", "value": "{from_currency}"})
self.append("req_params", {"key": "to", "value": "{to_currency}"})
elif self.service_provider == "frankfurter.dev":
elif self.service_provider in ("frankfurter.dev", "frankfurter.app"):
self.set("result_key", [])
self.set("req_params", [])
@@ -105,9 +105,11 @@ class CurrencyExchangeSettings(Document):
@frappe.whitelist()
def get_api_endpoint(service_provider: str | None = None, use_http: bool = False):
if service_provider and service_provider in ["exchangerate.host", "frankfurter.dev"]:
if service_provider and service_provider in ["exchangerate.host", "frankfurter.dev", "frankfurter.app"]:
if service_provider == "exchangerate.host":
api = "api.exchangerate.host/convert"
elif service_provider == "frankfurter.app":
api = "api.frankfurter.app/{transaction_date}"
elif service_provider == "frankfurter.dev":
api = "api.frankfurter.dev/v1/{transaction_date}"

View File

@@ -15,7 +15,7 @@ from frappe.database.operator_map import OPERATOR_MAP
from frappe.query_builder import Case
from frappe.query_builder.functions import Sum
from frappe.utils import cstr, date_diff, flt, getdate
from pypika.terms import LiteralValue
from pypika.terms import Bracket, LiteralValue
from erpnext import get_company_currency
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
@@ -71,7 +71,9 @@ class PeriodValue:
class AccountData:
"""Account data across all periods"""
account_name: str
account: str # docname
account_name: str = "" # account name
account_number: str = ""
period_values: dict[str, PeriodValue] = field(default_factory=dict)
def add_period(self, period_value: PeriodValue) -> None:
@@ -103,7 +105,11 @@ class AccountData:
# movement is unaccumulated by default
def copy(self):
copied = AccountData(account_name=self.account_name)
copied = AccountData(
account=self.account,
account_name=self.account_name,
account_number=self.account_number,
)
copied.period_values = {k: v.copy() for k, v in self.period_values.items()}
return copied
@@ -329,12 +335,10 @@ class DataCollector:
self.account_fields = {field.fieldname for field in frappe.get_meta("Account").fields}
def add_account_request(self, row):
accounts = self._parse_account_filter(self.company, row)
self.account_requests.append(
{
"row": row,
"accounts": accounts,
"accounts": self._parse_account_filter(self.company, row),
"balance_type": row.balance_type,
"reference_code": row.reference_code,
"reverse_sign": row.reverse_sign,
@@ -345,12 +349,12 @@ class DataCollector:
if not self.account_requests:
return {"account_data": {}, "summary": {}, "account_details": {}}
# Get all unique accounts
all_accounts = set()
for request in self.account_requests:
all_accounts.update(request["accounts"])
# Get all accounts
all_accounts = []
for request in self.account_requests:
all_accounts.extend(request["accounts"])
all_accounts = list(all_accounts)
if not all_accounts:
return {"account_data": {}, "summary": {}, "account_details": {}}
@@ -373,7 +377,9 @@ class DataCollector:
total_values = [0.0] * len(self.periods)
request_account_details = {}
for account_name in accounts:
for account in accounts:
account_name = account.name
if account_name not in account_data:
continue
@@ -396,20 +402,21 @@ class DataCollector:
return {"account_data": account_data, "summary": summary, "account_details": account_details}
@staticmethod
def _parse_account_filter(company, report_row) -> list[str]:
def _parse_account_filter(company, report_row) -> list[dict]:
"""
Find accounts matching filter criteria.
Example:
Input: '["account_type", "=", "Cash"]'
Output: ["Cash - COMP", "Petty Cash - COMP", "Bank - COMP"]
- Input: '["account_type", "=", "Cash"]'
- Output: [{"name": "Cash - COMP", "account_name": "Cash", "account_number": "1001"}]
"""
filter_parser = FilterExpressionParser()
account = frappe.qb.DocType("Account")
query = (
frappe.qb.from_(account)
.select(account.name)
.select(account.name, account.account_name, account.account_number)
.where(account.disabled == 0)
.where(account.is_group == 0)
)
@@ -423,8 +430,8 @@ class DataCollector:
query = query.where(where_condition)
query = query.orderby(account.name)
result = query.run(as_dict=True)
return [row.name for row in result]
return query.run(as_dict=True)
@staticmethod
def get_filtered_accounts(company: str, account_rows: list) -> list[str]:
@@ -456,17 +463,35 @@ class FinancialQueryBuilder:
self.filters = filters
self.periods = periods
self.company = filters.get("company")
self.account_meta = {} # {name: {account_name, account_number}}
def fetch_account_balances(self, accounts: list[str]) -> dict[str, AccountData]:
def fetch_account_balances(self, accounts: list[dict]) -> dict[str, AccountData]:
"""
Fetch account balances for all periods with optimization.
Steps: get opening balances → fetch GL entries → calculate running totals
- accounts: list of accounts with details
```
{
"name": "Cash - COMP",
"account_name": "Cash",
"account_number": "1001",
}
```
Returns:
dict: {account: AccountData}
"""
balances_data = self._get_opening_balances(accounts)
gl_data = self._get_gl_movements(accounts)
account_names = list({acc.name for acc in accounts})
# NOTE: do not change accounts list as it is used in caller function
self.account_meta = {
acc.name: {"account_name": acc.account_name, "account_number": acc.account_number}
for acc in accounts
}
balances_data = self._get_opening_balances(account_names)
gl_data = self._get_gl_movements(account_names)
self._calculate_running_balances(balances_data, gl_data)
self._handle_balance_accumulation(balances_data)
@@ -516,7 +541,7 @@ class FinancialQueryBuilder:
.where(acb_table.period_closing_voucher == closing_voucher)
)
query = self._apply_standard_filters(query, acb_table)
query = self._apply_standard_filters(query, acb_table, "Account Closing Balance")
results = self._execute_with_permissions(query, "Account Closing Balance")
for row in results:
@@ -543,7 +568,8 @@ class FinancialQueryBuilder:
gap_movement = gap_movements.get(account, 0.0)
opening_balance = closing_balance + gap_movement
account_data = AccountData(account)
account_data = AccountData(account=account, **self._get_account_meta(account))
account_data.add_period(PeriodValue(first_period_key, opening_balance, 0, 0))
balances_data[account] = account_data
@@ -610,12 +636,15 @@ class FinancialQueryBuilder:
return self._execute_with_permissions(query, "GL Entry")
def _calculate_running_balances(self, balances_data: dict, gl_data: list[dict]) -> dict:
for row in gl_data:
account = row["account"]
gl_dict = {row["account"]: row for row in gl_data}
accounts = set(balances_data.keys()) | set(gl_dict.keys())
for account in accounts:
if account not in balances_data:
balances_data[account] = AccountData(account)
balances_data[account] = AccountData(account=account, **self._get_account_meta(account))
account_data: AccountData = balances_data[account]
gl_movement = gl_dict.get(account, {})
if account_data.has_periods():
first_period = account_data.get_period(self.periods[0]["key"])
@@ -625,20 +654,13 @@ class FinancialQueryBuilder:
for period in self.periods:
period_key = period["key"]
movement = row.get(period_key, 0.0)
movement = gl_movement.get(period_key, 0.0)
closing_balance = current_balance + movement
account_data.add_period(PeriodValue(period_key, current_balance, closing_balance, movement))
current_balance = closing_balance
# Accounts with no movements
for account_data in balances_data.values():
for period in self.periods:
period_key = period["key"]
if period_key not in account_data.period_values:
account_data.add_period(PeriodValue(period_key, 0.0, 0.0, 0.0))
def _handle_balance_accumulation(self, balances_data):
for account_data in balances_data.values():
account_data: AccountData
@@ -657,12 +679,12 @@ class FinancialQueryBuilder:
else:
account_data.unaccumulate_values()
def _apply_standard_filters(self, query, table):
def _apply_standard_filters(self, query, table, doctype: str = "GL Entry"):
if self.filters.get("ignore_closing_entries"):
if hasattr(table, "is_period_closing_voucher_entry"):
query = query.where(table.is_period_closing_voucher_entry == 0)
else:
if doctype == "GL Entry":
query = query.where(table.voucher_type != "Period Closing Voucher")
else:
query = query.where(table.is_period_closing_voucher_entry == 0)
if self.filters.get("project"):
projects = self.filters.get("project")
@@ -710,10 +732,13 @@ class FinancialQueryBuilder:
user_conditions = build_match_conditions(doctype)
if user_conditions:
query = query.where(LiteralValue(user_conditions))
query = query.where(Bracket(LiteralValue(user_conditions)))
return query.run(as_dict=True)
def _get_account_meta(self, account: str) -> dict[str, Any]:
return self.account_meta.get(account, {})
class FilterExpressionParser:
"""Direct filter expression to SQL condition builder"""
@@ -1544,20 +1569,29 @@ class RowFormatterBase(ABC):
pass
def _get_values(self, row_data: RowData) -> dict[str, Any]:
# TODO: can be commonify COA? @abdeali
def _get_row_data(key: str, default: Any = "") -> Any:
return getattr(row_data.row, key, default) or default
def _get_filter_value(key: str, default: Any = "") -> Any:
return getattr(self.context.filters, key, default) or default
child_accounts = []
if row_data.account_details:
child_accounts = list(row_data.account_details.keys())
display_name = _get_row_data("display_name", "")
values = {
"account": _get_row_data("account", "") or display_name,
"account_name": display_name,
"acc_name": _get_row_data("account_name", ""),
"acc_number": _get_row_data("account_number", ""),
"child_accounts": child_accounts,
"account": getattr(row_data.row, "display_name", "") or "",
"indent": getattr(row_data.row, "indentation_level", 0),
"account_name": getattr(row_data.row, "account", "") or "",
"currency": self.context.currency or "",
"period_start_date": getattr(self.context.filters, "period_start_date", "") or "",
"period_end_date": getattr(self.context.filters, "period_end_date", "") or "",
"indent": _get_row_data("indentation_level", 0),
"period_start_date": _get_filter_value("period_start_date", ""),
"period_end_date": _get_filter_value("period_end_date", ""),
"total": 0,
}
@@ -1670,8 +1704,8 @@ class DetailRowBuilder:
detail_rows = []
parent_row = self.parent_row_data.row
for account_name, account_data in self.parent_row_data.account_details.items():
detail_row = self._create_detail_row_object(account_name, parent_row)
for account_data in self.parent_row_data.account_details.values():
detail_row = self._create_detail_row_object(account_data, parent_row)
balance_type = getattr(parent_row, "balance_type", "Closing Balance")
values = account_data.get_values_by_type(balance_type)
@@ -1687,16 +1721,20 @@ class DetailRowBuilder:
return detail_rows
def _create_detail_row_object(self, account_name: str, parent_row):
short_name = account_name.rsplit(" - ", 1)[0].strip()
def _create_detail_row_object(self, account_data: AccountData, parent_row):
acc_name = account_data.account_name or ""
acc_number = account_data.account_number or ""
display_name = f"{_(acc_number)} - {_(acc_name)}" if acc_number else _(acc_name)
return type(
"DetailRow",
(),
{
"display_name": short_name,
"account": account_name,
"account_name": short_name,
"account": account_data.account,
"display_name": display_name,
"account_name": acc_name,
"account_number": acc_number,
"data_source": "Account Detail",
"indentation_level": getattr(parent_row, "indentation_level", 0) + 1,
"fieldtype": getattr(parent_row, "fieldtype", None),

View File

@@ -16,7 +16,8 @@ from erpnext.accounts.doctype.financial_report_template.financial_report_engine
from erpnext.accounts.doctype.financial_report_template.test_financial_report_template import (
FinancialReportTemplateTestCase,
)
from erpnext.accounts.utils import get_currency_precision
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
from erpnext.accounts.utils import get_currency_precision, get_fiscal_year
# On IntegrationTestCase, the doctype test records and all
# link-field test record dependencies are recursively loaded
@@ -1672,3 +1673,360 @@ class TestFilterExpressionParser(FinancialReportTemplateTestCase):
mock_row_invalid = self._create_mock_report_row(invalid_formula)
condition = parser.build_condition(mock_row_invalid, account_table)
self.assertIsNone(condition)
class TestFinancialQueryBuilder(FinancialReportTemplateTestCase):
def test_fetch_balances_with_journal_entries(self):
company = "_Test Company"
cash_account = "_Test Cash - _TC"
bank_account = "_Test Bank - _TC"
# Create journal entries in different periods
# October: Transfer 1000 from Bank to Cash
jv_oct = make_journal_entry(
account1=cash_account,
account2=bank_account,
amount=1000,
posting_date="2024-10-15",
company=company,
submit=True,
)
# November: Transfer 500 from Bank to Cash
jv_nov = make_journal_entry(
account1=cash_account,
account2=bank_account,
amount=500,
posting_date="2024-11-20",
company=company,
submit=True,
)
# December: No transactions (test zero movement period)
try:
# Set up filters and periods for Q4 2024
filters = {
"company": company,
"from_fiscal_year": "2024",
"to_fiscal_year": "2024",
"period_start_date": "2024-10-01",
"period_end_date": "2024-12-31",
"filter_based_on": "Date Range",
"periodicity": "Monthly",
}
periods = [
{"key": "2024_oct", "from_date": "2024-10-01", "to_date": "2024-10-31"},
{"key": "2024_nov", "from_date": "2024-11-01", "to_date": "2024-11-30"},
{"key": "2024_dec", "from_date": "2024-12-01", "to_date": "2024-12-31"},
]
query_builder = FinancialQueryBuilder(filters, periods)
# Create account objects as expected by fetch_account_balances
accounts = [
frappe._dict({"name": cash_account, "account_name": "Cash", "account_number": "1001"}),
frappe._dict({"name": bank_account, "account_name": "Bank", "account_number": "1002"}),
]
# Fetch balances using the full workflow
balances_data = query_builder.fetch_account_balances(accounts)
# Verify Cash account balances
cash_data = balances_data.get(cash_account)
self.assertIsNotNone(cash_data, "Cash account should exist in results")
# October: movement = +1000 (debit)
oct_cash = cash_data.get_period("2024_oct")
self.assertIsNotNone(oct_cash, "October period should exist for cash")
self.assertEqual(oct_cash.movement, 1000.0, "October cash movement should be 1000")
# November: movement = +500
nov_cash = cash_data.get_period("2024_nov")
self.assertIsNotNone(nov_cash, "November period should exist for cash")
self.assertEqual(nov_cash.movement, 500.0, "November cash movement should be 500")
self.assertEqual(
nov_cash.opening, oct_cash.closing, "November opening should equal October closing"
)
# December: movement = 0 (no transactions)
dec_cash = cash_data.get_period("2024_dec")
self.assertIsNotNone(dec_cash, "December period should exist for cash")
self.assertEqual(dec_cash.movement, 0.0, "December cash movement should be 0")
self.assertEqual(
dec_cash.closing,
nov_cash.closing,
"December closing should equal November closing when no movement",
)
# Verify Bank account balances (opposite direction)
bank_data = balances_data.get(bank_account)
self.assertIsNotNone(bank_data, "Bank account should exist in results")
oct_bank = bank_data.get_period("2024_oct")
self.assertEqual(oct_bank.movement, -1000.0, "October bank movement should be -1000")
nov_bank = bank_data.get_period("2024_nov")
self.assertEqual(nov_bank.movement, -500.0, "November bank movement should be -500")
finally:
# Clean up: cancel journal entries
jv_nov.cancel()
jv_oct.cancel()
def test_opening_balance_from_previous_period_closing(self):
company = "_Test Company"
cash_account = "_Test Cash - _TC"
sales_account = "Sales - _TC"
posting_date_2023 = "2023-06-15"
# Create journal entry in prior period (2023)
# Cash Dr 5000, Sales Cr 5000
jv_2023 = make_journal_entry(
account1=cash_account,
account2=sales_account,
amount=5000,
posting_date=posting_date_2023,
company=company,
submit=True,
)
pcv = None
jv_2024 = None
original_pcv_setting = frappe.db.get_single_value(
"Accounts Settings", "use_legacy_controller_for_pcv"
)
try:
# Create Period Closing Voucher for 2023
# This will create Account Closing Balance entries
closing_account = frappe.db.get_value(
"Account",
{
"company": company,
"root_type": "Liability",
"is_group": 0,
"account_type": ["not in", ["Payable", "Receivable"]],
},
"name",
)
fy_2023 = get_fiscal_year(posting_date_2023, company=company)
frappe.db.set_single_value("Accounts Settings", "use_legacy_controller_for_pcv", 1)
pcv = frappe.get_doc(
{
"doctype": "Period Closing Voucher",
"transaction_date": "2023-12-31",
"period_start_date": fy_2023[1],
"period_end_date": fy_2023[2],
"company": company,
"fiscal_year": fy_2023[0],
"cost_center": "_Test Cost Center - _TC",
"closing_account_head": closing_account,
"remarks": "Test Period Closing",
}
)
pcv.insert()
pcv.submit()
pcv.reload()
# Now create a small transaction in 2024 to ensure the account appears
jv_2024 = make_journal_entry(
account1=cash_account,
account2=sales_account,
amount=100,
posting_date="2024-01-15",
company=company,
submit=True,
)
# Set up filters for Q1 2024 (after the period closing)
filters = {
"company": company,
"from_fiscal_year": "2024",
"to_fiscal_year": "2024",
"period_start_date": "2024-01-01",
"period_end_date": "2024-03-31",
"filter_based_on": "Date Range",
"periodicity": "Monthly",
"ignore_closing_entries": True, # Don't include PCV entries in movements
}
periods = [
{"key": "2024_jan", "from_date": "2024-01-01", "to_date": "2024-01-31"},
{"key": "2024_feb", "from_date": "2024-02-01", "to_date": "2024-02-29"},
{"key": "2024_mar", "from_date": "2024-03-01", "to_date": "2024-03-31"},
]
query_builder = FinancialQueryBuilder(filters, periods)
accounts = [
frappe._dict({"name": cash_account, "account_name": "Cash", "account_number": "1001"}),
]
balances_data = query_builder.fetch_account_balances(accounts)
# Verify Cash account has opening balance from 2023 transactions
cash_data = balances_data.get(cash_account)
self.assertIsNotNone(cash_data, "Cash account should exist in results")
jan_cash = cash_data.get_period("2024_jan")
self.assertIsNotNone(jan_cash, "January period should exist")
# Opening balance should be from prior period
# Cash had 5000 debit in 2023, so opening in 2024 should be >= 5000
# (may be higher if there were other test transactions)
self.assertEqual(
jan_cash.opening,
5000.0,
"January opening should equal to balance from 2023 (5000)",
)
# Verify running balance logic
# Movement in January is 100 (from jv_2024)
self.assertEqual(jan_cash.movement, 100.0, "January movement should be 100")
self.assertEqual(
jan_cash.closing, jan_cash.opening + jan_cash.movement, "Closing = Opening + Movement"
)
# February and March should have no movement but carry the balance
feb_cash = cash_data.get_period("2024_feb")
self.assertEqual(feb_cash.opening, jan_cash.closing, "Feb opening = Jan closing")
self.assertEqual(feb_cash.movement, 0.0, "February should have no movement")
self.assertEqual(feb_cash.closing, feb_cash.opening, "Feb closing = opening when no movement")
mar_cash = cash_data.get_period("2024_mar")
self.assertEqual(mar_cash.opening, feb_cash.closing, "Mar opening = Feb closing")
self.assertEqual(mar_cash.movement, 0.0, "March should have no movement")
self.assertEqual(mar_cash.closing, mar_cash.opening, "Mar closing = opening when no movement")
# Set up filters for Q2 2024
filters_q2 = {
"company": company,
"from_fiscal_year": "2024",
"to_fiscal_year": "2024",
"period_start_date": "2024-04-01",
"period_end_date": "2024-06-30",
"filter_based_on": "Date Range",
"periodicity": "Monthly",
"ignore_closing_entries": True,
}
periods_q2 = [
{"key": "2024_apr", "from_date": "2024-04-01", "to_date": "2024-04-30"},
{"key": "2024_may", "from_date": "2024-05-01", "to_date": "2024-05-31"},
{"key": "2024_jun", "from_date": "2024-06-01", "to_date": "2024-06-30"},
]
query_builder_q2 = FinancialQueryBuilder(filters_q2, periods_q2)
balances_data_q2 = query_builder_q2.fetch_account_balances(accounts)
# Verify Cash account in Q2
cash_data_q2 = balances_data_q2.get(cash_account)
self.assertIsNotNone(cash_data_q2, "Cash account should exist in Q2 results")
apr_cash = cash_data_q2.get_period("2024_apr")
self.assertIsNotNone(apr_cash, "April period should exist")
# Opening balance in April should equal closing in March
self.assertEqual(
apr_cash.opening,
mar_cash.closing,
"April opening should equal March closing balance",
)
self.assertEqual(apr_cash.closing, apr_cash.opening, "April closing = opening when no movement")
finally:
# Clean up
frappe.db.set_single_value(
"Accounts Settings", "use_legacy_controller_for_pcv", original_pcv_setting or 0
)
if jv_2024:
jv_2024.cancel()
if pcv:
pcv.reload()
if pcv.docstatus == 1:
pcv.cancel()
jv_2023.cancel()
def test_account_with_gl_entries_but_no_prior_closing_balance(self):
company = "_Test Company"
cash_account = "_Test Cash - _TC"
bank_account = "_Test Bank - _TC"
# Create journal entries WITHOUT any prior Period Closing Voucher
# This ensures the account exists in gl_dict but NOT in balances_data
jv = make_journal_entry(
account1=cash_account,
account2=bank_account,
amount=2500,
posting_date="2024-07-15",
company=company,
submit=True,
)
try:
# Set up filters - use a period with no prior PCV
filters = {
"company": company,
"from_fiscal_year": "2024",
"to_fiscal_year": "2024",
"period_start_date": "2024-07-01",
"period_end_date": "2024-09-30",
"filter_based_on": "Date Range",
"periodicity": "Monthly",
}
periods = [
{"key": "2024_jul", "from_date": "2024-07-01", "to_date": "2024-07-31"},
{"key": "2024_aug", "from_date": "2024-08-01", "to_date": "2024-08-31"},
{"key": "2024_sep", "from_date": "2024-09-01", "to_date": "2024-09-30"},
]
query_builder = FinancialQueryBuilder(filters, periods)
# Use accounts that have GL entries but may not have Account Closing Balance
accounts = [
frappe._dict({"name": cash_account, "account_name": "Cash", "account_number": "1001"}),
frappe._dict({"name": bank_account, "account_name": "Bank", "account_number": "1002"}),
]
balances_data = query_builder.fetch_account_balances(accounts)
# Verify accounts are present in results even without prior closing balance
cash_data = balances_data.get(cash_account)
self.assertIsNotNone(cash_data, "Cash account should exist in results")
bank_data = balances_data.get(bank_account)
self.assertIsNotNone(bank_data, "Bank account should exist in results")
# Verify July has the movement from journal entry
jul_cash = cash_data.get_period("2024_jul")
self.assertIsNotNone(jul_cash, "July period should exist for cash")
self.assertEqual(jul_cash.movement, 2500.0, "July cash movement should be 2500")
jul_bank = bank_data.get_period("2024_jul")
self.assertIsNotNone(jul_bank, "July period should exist for bank")
self.assertEqual(jul_bank.movement, -2500.0, "July bank movement should be -2500")
# Verify subsequent periods exist with zero movement
aug_cash = cash_data.get_period("2024_aug")
self.assertIsNotNone(aug_cash, "August period should exist for cash")
self.assertEqual(aug_cash.movement, 0.0, "August cash movement should be 0")
self.assertEqual(aug_cash.opening, jul_cash.closing, "August opening = July closing")
sep_cash = cash_data.get_period("2024_sep")
self.assertIsNotNone(sep_cash, "September period should exist for cash")
self.assertEqual(sep_cash.movement, 0.0, "September cash movement should be 0")
self.assertEqual(sep_cash.opening, aug_cash.closing, "September opening = August closing")
finally:
jv.cancel()

View File

@@ -4,7 +4,7 @@
import frappe
from dateutil.relativedelta import relativedelta
from frappe import _
from frappe import _, cint
from frappe.model.document import Document
from frappe.utils import add_days, add_years, cstr, getdate
@@ -33,23 +33,11 @@ class FiscalYear(Document):
self.validate_dates()
self.validate_overlap()
if not self.is_new():
year_start_end_dates = frappe.db.sql(
"""select year_start_date, year_end_date
from `tabFiscal Year` where name=%s""",
(self.name),
)
def on_update(self):
frappe.cache().delete_key("fiscal_years")
if year_start_end_dates:
if (
getdate(self.year_start_date) != year_start_end_dates[0][0]
or getdate(self.year_end_date) != year_start_end_dates[0][1]
):
frappe.throw(
_(
"Cannot change Fiscal Year Start Date and Fiscal Year End Date once the Fiscal Year is saved."
)
)
def on_trash(self):
frappe.cache().delete_key("fiscal_years")
def validate_dates(self):
self.validate_from_to_dates("year_start_date", "year_end_date")
@@ -66,28 +54,20 @@ class FiscalYear(Document):
frappe.exceptions.InvalidDates,
)
def on_update(self):
check_duplicate_fiscal_year(self)
frappe.cache().delete_value("fiscal_years")
def on_trash(self):
frappe.cache().delete_value("fiscal_years")
def validate_overlap(self):
existing_fiscal_years = frappe.db.sql(
"""select name from `tabFiscal Year`
where (
(%(year_start_date)s between year_start_date and year_end_date)
or (%(year_end_date)s between year_start_date and year_end_date)
or (year_start_date between %(year_start_date)s and %(year_end_date)s)
or (year_end_date between %(year_start_date)s and %(year_end_date)s)
) and name!=%(name)s""",
{
"year_start_date": self.year_start_date,
"year_end_date": self.year_end_date,
"name": self.name or "No Name",
},
as_dict=True,
fy = frappe.qb.DocType("Fiscal Year")
name = self.name or self.year
existing_fiscal_years = (
frappe.qb.from_(fy)
.select(fy.name)
.where(
(fy.year_start_date <= self.year_end_date)
& (fy.year_end_date >= self.year_start_date)
& (fy.name != name)
)
.run(as_dict=True)
)
if existing_fiscal_years:
@@ -110,37 +90,30 @@ class FiscalYear(Document):
frappe.throw(
_(
"Year start date or end date is overlapping with {0}. To avoid please set company"
).format(existing.name),
).format(frappe.get_desk_link("Fiscal Year", existing.name, open_in_new_tab=True)),
frappe.NameError,
)
@frappe.whitelist()
def check_duplicate_fiscal_year(doc):
year_start_end_dates = frappe.db.sql(
"""select name, year_start_date, year_end_date from `tabFiscal Year` where name!=%s""",
(doc.name),
)
for fiscal_year, ysd, yed in year_start_end_dates:
if (getdate(doc.year_start_date) == ysd and getdate(doc.year_end_date) == yed) and (
not frappe.in_test
):
frappe.throw(
_(
"Fiscal Year Start Date and Fiscal Year End Date are already set in Fiscal Year {0}"
).format(fiscal_year)
)
@frappe.whitelist()
def auto_create_fiscal_year():
for d in frappe.db.sql(
"""select name from `tabFiscal Year` where year_end_date = date_add(current_date, interval 3 day)"""
):
fy = frappe.qb.DocType("Fiscal Year")
# Skipped auto-creating Short Year, as it has very rare use case.
# Reference: https://www.irs.gov/businesses/small-businesses-self-employed/tax-years (US)
follow_up_date = add_days(getdate(), days=3)
fiscal_year = (
frappe.qb.from_(fy)
.select(fy.name)
.where((fy.year_end_date == follow_up_date) & (fy.is_short_year == 0))
.run()
)
for d in fiscal_year:
try:
current_fy = frappe.get_doc("Fiscal Year", d[0])
new_fy = frappe.copy_doc(current_fy, ignore_no_copy=False)
new_fy = frappe.new_doc("Fiscal Year")
new_fy.disabled = cint(current_fy.disabled)
new_fy.year_start_date = add_days(current_fy.year_end_date, 1)
new_fy.year_end_date = add_years(current_fy.year_end_date, 1)
@@ -148,6 +121,10 @@ def auto_create_fiscal_year():
start_year = cstr(new_fy.year_start_date.year)
end_year = cstr(new_fy.year_end_date.year)
new_fy.year = start_year if start_year == end_year else (start_year + "-" + end_year)
for row in current_fy.companies:
new_fy.append("companies", {"company": row.company})
new_fy.auto_created = 1
new_fy.insert(ignore_permissions=True)

View File

@@ -4,6 +4,7 @@ from frappe import _
def get_data():
return {
"fieldname": "fiscal_year",
"non_standard_fieldnames": {"Budget": "from_fiscal_year"},
"transactions": [
{"label": _("Budgets"), "items": ["Budget"]},
{"label": _("References"), "items": ["Period Closing Voucher"]},

View File

@@ -15,20 +15,22 @@
"ignore_user_permissions": 1,
"in_list_view": 1,
"label": "Company",
"options": "Company"
"options": "Company",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-03-27 13:09:44.659251",
"modified": "2026-02-20 23:02:26.193606",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Fiscal Year Company",
"owner": "Administrator",
"permissions": [],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -14,7 +14,7 @@ class FiscalYearCompany(Document):
if TYPE_CHECKING:
from frappe.types import DF
company: DF.Link | None
company: DF.Link
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data

View File

@@ -193,7 +193,6 @@ class GLEntry(Document):
account_type == "Profit and Loss"
and self.company == dimension.company
and dimension.mandatory_for_pl
and not dimension.disabled
and not self.is_cancelled
):
if not self.get(dimension.fieldname):
@@ -207,7 +206,6 @@ class GLEntry(Document):
account_type == "Balance Sheet"
and self.company == dimension.company
and dimension.mandatory_for_bs
and not dimension.disabled
and not self.is_cancelled
):
if not self.get(dimension.fieldname):

View File

@@ -9,8 +9,8 @@ frappe.listview_settings["Invoice Discounting"] = {
return [__("Disbursed"), "blue", "status,=,Disbursed"];
} else if (doc.status == "Settled") {
return [__("Settled"), "orange", "status,=,Settled"];
} else if (doc.status == "Canceled") {
return [__("Canceled"), "red", "status,=,Canceled"];
} else if (doc.status == "Cancelled") {
return [__("Cancelled"), "red", "status,=,Cancelled"];
}
},
};

View File

@@ -43,6 +43,20 @@ frappe.ui.form.on("Journal Entry", {
},
};
});
frm.set_query("project", "accounts", function (doc, cdt, cdn) {
let row = frappe.get_doc(cdt, cdn);
let filters = {
company: doc.company,
};
if (row.party_type == "Customer") {
filters.customer = row.party;
}
return {
query: "erpnext.controllers.queries.get_project_name",
filters,
};
});
},
get_balance_for_periodic_accounting(frm) {
@@ -112,9 +126,11 @@ frappe.ui.form.on("Journal Entry", {
erpnext.accounts.unreconcile_payment.add_unreconcile_btn(frm);
$.each(frm.doc.accounts || [], function (i, row) {
erpnext.journal_entry.set_exchange_rate(frm, row.doctype, row.name);
});
if (frm.doc.voucher_type !== "Exchange Gain Or Loss") {
$.each(frm.doc.accounts || [], function (i, row) {
erpnext.journal_entry.set_exchange_rate(frm, row.doctype, row.name);
});
}
},
before_save: function (frm) {
if (frm.doc.docstatus == 0 && !frm.doc.is_system_generated) {
@@ -201,6 +217,7 @@ frappe.ui.form.on("Journal Entry", {
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
erpnext.utils.set_letter_head(frm);
frm.clear_table("tax_withholding_entries");
},
voucher_type: function (frm) {
@@ -251,12 +268,30 @@ frappe.ui.form.on("Journal Entry", {
});
}
},
apply_tds: function (frm) {
frm.clear_table("tax_withholding_entries");
},
});
var update_jv_details = function (doc, r) {
$.each(r, function (i, d) {
var row = frappe.model.add_child(doc, "Journal Entry Account", "accounts");
frappe.model.set_value(row.doctype, row.name, "account", d.account);
const {
idx,
name,
owner,
parent,
parenttype,
parentfield,
creation,
modified,
modified_by,
doctype,
docstatus,
...fields
} = d;
frappe.model.set_value(row.doctype, row.name, fields);
});
refresh_field("accounts");
};
@@ -268,10 +303,6 @@ erpnext.accounts.JournalEntry = class JournalEntry extends frappe.ui.form.Contro
erpnext.accounts.dimensions.setup_dimension_filters(this.frm, this.frm.doctype);
}
onload_post_render() {
this.frm.get_field("accounts").grid.set_multiple_add("account");
}
load_defaults() {
//this.frm.show_print_first = true;
if (this.frm.doc.__islocal && this.frm.doc.company) {

View File

@@ -9,19 +9,16 @@
"engine": "InnoDB",
"field_order": [
"entry_type_and_date",
"is_system_generated",
"title",
"voucher_type",
"naming_series",
"process_deferred_accounting",
"reversal_of",
"column_break1",
"from_template",
"company",
"voucher_type",
"column_break1",
"naming_series",
"posting_date",
"finance_book",
"multi_currency",
"apply_tds",
"tax_withholding_category",
"is_system_generated",
"amended_from",
"section_break_tcvw",
"for_all_stock_asset_accounts",
"column_break_wpau",
@@ -30,47 +27,60 @@
"get_balance_for_periodic_accounting",
"2_add_edit_gl_entries",
"accounts",
"section_break99",
"cheque_no",
"cheque_date",
"user_remark",
"column_break99",
"section_break_ouaq",
"total_debit",
"column_break_cixu",
"total_credit",
"difference",
"get_balance",
"multi_currency",
"total_amount_currency",
"total_amount",
"total_amount_in_words",
"reference",
"section_break99",
"cheque_no",
"cheque_date",
"clearance_date",
"remark",
"inter_company_journal_entry_reference",
"column_break_oizh",
"user_remark",
"subscription_section",
"auto_repeat",
"tax_withholding_tab",
"section_tax_withholding_entry",
"tax_withholding_group",
"ignore_tax_withholding_threshold",
"override_tax_withholding_entries",
"tax_withholding_entries",
"more_info_tab",
"reference",
"column_break98",
"bill_no",
"bill_date",
"due_date",
"column_break_isfa",
"inter_company_journal_entry_reference",
"process_deferred_accounting",
"reversal_of",
"payment_order",
"stock_entry",
"printing_settings",
"pay_to_recd_from",
"letter_head",
"select_print_heading",
"column_break_35",
"total_amount_currency",
"total_amount",
"total_amount_in_words",
"write_off",
"write_off_based_on",
"get_outstanding_invoices",
"column_break_30",
"write_off_amount",
"printing_settings",
"pay_to_recd_from",
"column_break_35",
"letter_head",
"select_print_heading",
"addtional_info",
"mode_of_payment",
"payment_order",
"party_not_required",
"column_break3",
"is_opening",
"stock_entry",
"subscription_section",
"auto_repeat",
"amended_from"
"finance_book",
"from_template",
"title",
"column_break3",
"remark",
"mode_of_payment",
"party_not_required"
],
"fields": [
{
@@ -150,6 +160,7 @@
{
"fieldname": "2_add_edit_gl_entries",
"fieldtype": "Section Break",
"hide_border": 1,
"oldfieldtype": "Section Break",
"options": "fa fa-table"
},
@@ -197,10 +208,6 @@
"oldfieldtype": "Small Text",
"print_hide": 1
},
{
"fieldname": "column_break99",
"fieldtype": "Column Break"
},
{
"fieldname": "total_debit",
"fieldtype": "Currency",
@@ -424,7 +431,7 @@
"collapsible": 1,
"fieldname": "addtional_info",
"fieldtype": "Section Break",
"label": "More Information",
"label": "Additional Info",
"oldfieldtype": "Section Break",
"options": "fa fa-file-text"
},
@@ -471,7 +478,7 @@
{
"fieldname": "subscription_section",
"fieldtype": "Section Break",
"label": "Subscription Section"
"label": "Subscription"
},
{
"allow_on_submit": 1,
@@ -517,7 +524,7 @@
"depends_on": "eval:['Credit Note', 'Debit Note'].includes(doc.voucher_type)",
"fieldname": "apply_tds",
"fieldtype": "Check",
"label": "Apply Tax Withholding Amount "
"label": "Consider for Tax Withholding "
},
{
"depends_on": "eval:doc.docstatus",
@@ -586,6 +593,64 @@
"hidden": 1,
"label": "Party Not Required",
"no_copy": 1
},
{
"collapsible_depends_on": "eval: doc.apply_tds && doc.docstatus == 0",
"depends_on": "eval: doc.apply_tds",
"fieldname": "section_tax_withholding_entry",
"fieldtype": "Section Break"
},
{
"fieldname": "tax_withholding_group",
"fieldtype": "Link",
"label": "Tax Withholding Group",
"options": "Tax Withholding Group"
},
{
"default": "0",
"fieldname": "ignore_tax_withholding_threshold",
"fieldtype": "Check",
"label": "Ignore Tax Withholding Threshold"
},
{
"default": "0",
"fieldname": "override_tax_withholding_entries",
"fieldtype": "Check",
"label": "Edit Tax Withholding Entries"
},
{
"fieldname": "tax_withholding_entries",
"fieldtype": "Table",
"label": "Tax Withholding Entries",
"options": "Tax Withholding Entry",
"read_only_depends_on": "eval: !doc.override_tax_withholding_entries"
},
{
"fieldname": "more_info_tab",
"fieldtype": "Tab Break",
"label": "More Info"
},
{
"fieldname": "section_break_ouaq",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_cixu",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_oizh",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_isfa",
"fieldtype": "Column Break"
},
{
"depends_on": "eval: doc.apply_tds",
"fieldname": "tax_withholding_tab",
"fieldtype": "Tab Break",
"label": "Tax Withholding"
}
],
"icon": "fa fa-file-text",
@@ -600,7 +665,7 @@
"table_fieldname": "payment_entries"
}
],
"modified": "2025-09-29 13:05:46.982277",
"modified": "2026-02-16 16:06:10.468482",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry",

View File

@@ -6,6 +6,7 @@ import json
import frappe
from frappe import _, msgprint, scrub
from frappe.core.doctype.submission_queue.submission_queue import queue_submission
from frappe.utils import comma_and, cstr, flt, fmt_money, formatdate, get_link_to_form, nowdate
import erpnext
@@ -17,9 +18,7 @@ from erpnext.accounts.doctype.repost_accounting_ledger.repost_accounting_ledger
validate_docs_for_deferred_accounting,
validate_docs_for_voucher_types,
)
from erpnext.accounts.doctype.tax_withholding_category.tax_withholding_category import (
get_party_tax_withholding_details,
)
from erpnext.accounts.doctype.tax_withholding_entry.tax_withholding_entry import JournalTaxWithholding
from erpnext.accounts.party import get_party_account
from erpnext.accounts.utils import (
cancel_exchange_gain_loss_journal,
@@ -33,6 +32,7 @@ from erpnext.assets.doctype.asset_depreciation_schedule.asset_depreciation_sched
get_depr_schedule,
)
from erpnext.controllers.accounts_controller import AccountsController
from erpnext.setup.utils import get_exchange_rate as _get_exchange_rate
class StockAccountInvalidTransaction(frappe.ValidationError):
@@ -49,6 +49,7 @@ class JournalEntry(AccountsController):
from frappe.types import DF
from erpnext.accounts.doctype.journal_entry_account.journal_entry_account import JournalEntryAccount
from erpnext.accounts.doctype.tax_withholding_entry.tax_withholding_entry import TaxWithholdingEntry
accounts: DF.Table[JournalEntryAccount]
amended_from: DF.Link | None
@@ -65,6 +66,7 @@ class JournalEntry(AccountsController):
finance_book: DF.Link | None
for_all_stock_asset_accounts: DF.Check
from_template: DF.Link | None
ignore_tax_withholding_threshold: DF.Check
inter_company_journal_entry_reference: DF.Link | None
is_opening: DF.Literal["No", "Yes"]
is_system_generated: DF.Check
@@ -72,6 +74,7 @@ class JournalEntry(AccountsController):
mode_of_payment: DF.Link | None
multi_currency: DF.Check
naming_series: DF.Literal["ACC-JV-.YYYY.-"]
override_tax_withholding_entries: DF.Check
party_not_required: DF.Check
pay_to_recd_from: DF.Data | None
payment_order: DF.Link | None
@@ -84,6 +87,8 @@ class JournalEntry(AccountsController):
stock_asset_account: DF.Link | None
stock_entry: DF.Link | None
tax_withholding_category: DF.Link | None
tax_withholding_entries: DF.Table[TaxWithholdingEntry]
tax_withholding_group: DF.Link | None
title: DF.Data | None
total_amount: DF.Currency
total_amount_currency: DF.Link | None
@@ -150,8 +155,8 @@ class JournalEntry(AccountsController):
self.validate_company_in_accounting_dimension()
self.validate_advance_accounts()
if self.docstatus == 0:
self.apply_tax_withholding()
JournalTaxWithholding(self).on_validate()
if self.is_new() or not self.title:
self.title = self.get_title()
@@ -174,16 +179,17 @@ class JournalEntry(AccountsController):
validate_docs_for_deferred_accounting([self.name], [])
def submit(self):
if len(self.accounts) > 100:
msgprint(_("The task has been enqueued as a background job."), alert=True)
self.queue_action("submit", timeout=4600)
if len(self.accounts) > 100 and not self.meta.queue_in_background:
queue_submission(self, "_submit")
else:
return self._submit()
def before_cancel(self):
self.has_asset_adjustment_entry()
def cancel(self):
if len(self.accounts) > 100:
msgprint(_("The task has been enqueued as a background job."), alert=True)
self.queue_action("cancel", timeout=4600)
queue_submission(self, "_cancel")
else:
return self._cancel()
@@ -199,6 +205,7 @@ class JournalEntry(AccountsController):
self.update_asset_value()
self.update_inter_company_jv()
self.update_invoice_discounting()
JournalTaxWithholding(self).on_submit()
@frappe.whitelist()
def get_balance_for_periodic_accounting(self):
@@ -282,6 +289,8 @@ class JournalEntry(AccountsController):
self.repost_accounting_entries()
def on_cancel(self):
# Cancel tax withholding entries
# References for this Journal are removed on the `on_cancel` event in accounts_controller
super().on_cancel()
self.ignore_linked_doctypes = (
@@ -295,8 +304,10 @@ class JournalEntry(AccountsController):
"Unreconcile Payment",
"Unreconcile Payment Entries",
"Advance Payment Ledger Entry",
"Tax Withholding Entry",
)
self.make_gl_entries(1)
JournalTaxWithholding(self).on_cancel()
self.unlink_advance_entry_reference()
self.unlink_asset_reference()
self.unlink_inter_company_jv()
@@ -352,95 +363,6 @@ class JournalEntry(AccountsController):
StockAccountInvalidTransaction,
)
def apply_tax_withholding(self):
from erpnext.accounts.report.general_ledger.general_ledger import get_account_type_map
if not self.apply_tds or self.voucher_type not in ("Debit Note", "Credit Note"):
return
parties = [d.party for d in self.get("accounts") if d.party]
parties = list(set(parties))
if len(parties) > 1:
frappe.throw(_("Cannot apply TDS against multiple parties in one entry"))
account_type_map = get_account_type_map(self.company)
party_type = "supplier" if self.voucher_type == "Credit Note" else "customer"
doctype = "Purchase Invoice" if self.voucher_type == "Credit Note" else "Sales Invoice"
debit_or_credit = (
"debit_in_account_currency"
if self.voucher_type == "Credit Note"
else "credit_in_account_currency"
)
rev_debit_or_credit = (
"credit_in_account_currency"
if debit_or_credit == "debit_in_account_currency"
else "debit_in_account_currency"
)
party_account = get_party_account(party_type.title(), parties[0], self.company)
net_total = sum(
d.get(debit_or_credit)
for d in self.get("accounts")
if account_type_map.get(d.account) not in ("Tax", "Chargeable")
)
party_amount = sum(
d.get(rev_debit_or_credit) for d in self.get("accounts") if d.account == party_account
)
inv = frappe._dict(
{
party_type: parties[0],
"doctype": doctype,
"company": self.company,
"posting_date": self.posting_date,
"net_total": net_total,
}
)
tax_withholding_details, advance_taxes, voucher_wise_amount = get_party_tax_withholding_details(
inv, self.tax_withholding_category
)
if not tax_withholding_details:
return
accounts = []
for d in self.get("accounts"):
if d.get("account") == tax_withholding_details.get("account_head"):
d.update(
{
"account": tax_withholding_details.get("account_head"),
debit_or_credit: tax_withholding_details.get("tax_amount"),
}
)
accounts.append(d.get("account"))
if d.get("account") == party_account:
d.update({rev_debit_or_credit: party_amount - tax_withholding_details.get("tax_amount")})
if not accounts or tax_withholding_details.get("account_head") not in accounts:
self.append(
"accounts",
{
"account": tax_withholding_details.get("account_head"),
rev_debit_or_credit: tax_withholding_details.get("tax_amount"),
"against_account": parties[0],
},
)
to_remove = [
d
for d in self.get("accounts")
if not d.get(rev_debit_or_credit) and d.account == tax_withholding_details.get("account_head")
]
for d in to_remove:
self.remove(d)
def update_asset_value(self):
self.update_asset_on_depreciation()
self.update_asset_on_disposal()
@@ -635,12 +557,27 @@ class JournalEntry(AccountsController):
)
frappe.db.set_value("Journal Entry", self.name, "inter_company_journal_entry_reference", "")
def unlink_asset_adjustment_entry(self):
frappe.db.sql(
""" update `tabAsset Value Adjustment`
set journal_entry = null where journal_entry = %s""",
self.name,
def has_asset_adjustment_entry(self):
if self.flags.get("via_asset_value_adjustment"):
return
asset_value_adjustment = frappe.db.get_value(
"Asset Value Adjustment", {"docstatus": 1, "journal_entry": self.name}, "name"
)
if asset_value_adjustment:
frappe.throw(
_(
"Cannot cancel this document as it is linked with the submitted Asset Value Adjustment <b>{0}</b>. Please cancel the Asset Value Adjustment to continue."
).format(frappe.utils.get_link_to_form("Asset Value Adjustment", asset_value_adjustment))
)
def unlink_asset_adjustment_entry(self):
AssetValueAdjustment = frappe.qb.DocType("Asset Value Adjustment")
(
frappe.qb.update(AssetValueAdjustment)
.set(AssetValueAdjustment.journal_entry, None)
.where(AssetValueAdjustment.journal_entry == self.name)
).run()
def validate_party(self):
for d in self.get("accounts"):
@@ -1754,7 +1691,9 @@ def get_exchange_rate(
credit=None,
exchange_rate=None,
):
from erpnext.setup.utils import get_exchange_rate
# Ensure exchange_rate is always numeric to avoid calculation errors
if isinstance(exchange_rate, str):
exchange_rate = flt(exchange_rate) or 1
account_details = frappe.get_cached_value(
"Account", account, ["account_type", "root_type", "account_currency", "company"], as_dict=1
@@ -1778,7 +1717,7 @@ def get_exchange_rate(
# The date used to retreive the exchange rate here is the date passed
# in as an argument to this function.
elif (not flt(exchange_rate) or flt(exchange_rate) == 1) and account_currency and posting_date:
exchange_rate = get_exchange_rate(account_currency, company_currency, posting_date)
exchange_rate = _get_exchange_rate(account_currency, company_currency, posting_date)
else:
exchange_rate = 1

View File

@@ -34,6 +34,7 @@
"reference_detail_no",
"advance_voucher_type",
"advance_voucher_no",
"is_tax_withholding_account",
"col_break3",
"is_advance",
"user_remark",
@@ -42,7 +43,7 @@
"fields": [
{
"bold": 1,
"columns": 2,
"columns": 4,
"fieldname": "account",
"fieldtype": "Link",
"in_global_search": 1,
@@ -184,20 +185,19 @@
"fieldtype": "Select",
"label": "Reference Type",
"no_copy": 1,
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim\nAsset\nLoan\nPayroll Entry\nEmployee Advance\nExchange Rate Revaluation\nInvoice Discounting\nFees\nFull and Final Statement\nPayment Entry",
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim\nAsset\nLoan\nPayroll Entry\nEmployee Advance\nExchange Rate Revaluation\nInvoice Discounting\nFees\nFull and Final Statement\nPayment Entry\nBank Transaction",
"search_index": 1
},
{
"fieldname": "reference_name",
"fieldtype": "Dynamic Link",
"in_list_view": 1,
"label": "Reference Name",
"no_copy": 1,
"options": "reference_type",
"search_index": 1
},
{
"depends_on": "eval:doc.reference_type&&!in_list(doc.reference_type, ['Expense Claim', 'Asset', 'Employee Loan', 'Employee Advance'])",
"depends_on": "eval:doc.reference_type&&!in_list(doc.reference_type, ['Expense Claim', 'Asset', 'Employee Loan', 'Employee Advance', 'Bank Transaction'])",
"fieldname": "reference_due_date",
"fieldtype": "Date",
"label": "Reference Due Date",
@@ -281,12 +281,19 @@
"options": "advance_voucher_type",
"read_only": 1,
"search_index": 1
},
{
"default": "0",
"fieldname": "is_tax_withholding_account",
"fieldtype": "Check",
"label": "Is Tax Withholding Account",
"read_only": 1
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2025-10-27 13:48:32.805100",
"modified": "2026-02-16 16:04:16.022407",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Account",

View File

@@ -28,6 +28,7 @@ class JournalEntryAccount(Document):
debit_in_account_currency: DF.Currency
exchange_rate: DF.Float
is_advance: DF.Literal["No", "Yes"]
is_tax_withholding_account: DF.Check
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
@@ -54,6 +55,7 @@ class JournalEntryAccount(Document):
"Fees",
"Full and Final Statement",
"Payment Entry",
"Bank Transaction",
]
user_remark: DF.SmallText | None
# end: auto-generated types

View File

@@ -3,6 +3,7 @@
frappe.ui.form.on("Journal Entry Template", {
onload: function (frm) {
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
if (frm.is_new()) {
frappe.call({
type: "GET",
@@ -37,6 +38,31 @@ frappe.ui.form.on("Journal Entry Template", {
return { filters: filters };
});
frm.set_query("project", "accounts", function (doc, cdt, cdn) {
let row = frappe.get_doc(cdt, cdn);
let filters = {
company: doc.company,
};
if (row.party_type == "Customer") {
filters.customer = row.party;
}
return {
query: "erpnext.controllers.queries.get_project_name",
filters,
};
});
frm.set_query("party_type", "accounts", function (doc, cdt, cdn) {
const row = locals[cdt][cdn];
return {
query: "erpnext.setup.doctype.party_type.party_type.get_party_type",
filters: {
account: row.account,
},
};
});
},
voucher_type: function (frm) {
var add_accounts = function (doc, r) {

View File

@@ -3,6 +3,7 @@
import frappe
from frappe import _
from frappe.model.document import Document
@@ -42,7 +43,29 @@ class JournalEntryTemplate(Document):
]
# end: auto-generated types
pass
def validate(self):
self.validate_party()
def validate_party(self):
"""
Loop over all accounts and see if party and party type is set correctly
"""
for account in self.accounts:
if account.party_type:
account_type = frappe.get_cached_value("Account", account.account, "account_type")
if account_type not in ["Receivable", "Payable"]:
frappe.throw(
_(
"Check row {0} for account {1}: Party Type is only allowed for Receivable or Payable accounts"
).format(account.idx, account.account)
)
if account.party and not account.party_type:
frappe.throw(
_("Check row {0} for account {1}: Party is only allowed if Party Type is set").format(
account.idx, account.account
)
)
@frappe.whitelist()

View File

@@ -5,7 +5,13 @@
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"account"
"account",
"party_type",
"party",
"accounting_dimensions_section",
"cost_center",
"dimension_col_break",
"project"
],
"fields": [
{
@@ -15,18 +21,55 @@
"label": "Account",
"options": "Account",
"reqd": 1
},
{
"fieldname": "party_type",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Party Type",
"options": "DocType"
},
{
"fieldname": "party",
"fieldtype": "Dynamic Link",
"in_list_view": 1,
"label": "Party",
"options": "party_type"
},
{
"collapsible": 1,
"fieldname": "accounting_dimensions_section",
"fieldtype": "Section Break",
"label": "Accounting Dimensions"
},
{
"fieldname": "cost_center",
"fieldtype": "Link",
"label": "Cost Center",
"options": "Cost Center"
},
{
"fieldname": "project",
"fieldtype": "Link",
"label": "Project",
"options": "Project"
},
{
"fieldname": "dimension_col_break",
"fieldtype": "Column Break"
}
],
"istable": 1,
"links": [],
"modified": "2024-03-27 13:09:58.986448",
"modified": "2026-01-09 13:16:27.615083",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Template Account",
"owner": "Administrator",
"permissions": [],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -16,9 +16,13 @@ class JournalEntryTemplateAccount(Document):
from frappe.types import DF
account: DF.Link
cost_center: DF.Link | None
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
party: DF.DynamicLink | None
party_type: DF.Link | None
project: DF.Link | None
# end: auto-generated types
pass

View File

@@ -7,7 +7,7 @@ frappe.ui.form.on("Mode of Payment", {
let d = locals[cdt][cdn];
return {
filters: [
["Account", "account_type", "in", "Bank, Cash, Receivable"],
["Account", "account_type", "in", ["Bank", "Cash", "Receivable"]],
["Account", "is_group", "=", 0],
["Account", "company", "=", d.company],
],

View File

@@ -11,6 +11,5 @@ def get_data():
},
"transactions": [
{"label": _("Target Details"), "items": ["Sales Person", "Territory", "Sales Partner"]},
{"items": ["Budget"]},
],
}

View File

@@ -214,6 +214,9 @@ class OpeningInvoiceCreationTool(Document):
}
)
if self.invoice_type == "Purchase" and row.supplier_invoice_date:
invoice.update({"bill_date": row.supplier_invoice_date})
accounting_dimension = get_accounting_dimensions()
for dimension in accounting_dimension:
invoice.update({dimension: self.get(dimension) or item.get(dimension)})

View File

@@ -12,6 +12,7 @@
"column_break_3",
"posting_date",
"due_date",
"supplier_invoice_date",
"section_break_5",
"item_name",
"outstanding_amount",
@@ -111,19 +112,26 @@
"fieldname": "invoice_number",
"fieldtype": "Data",
"label": "Invoice Number"
},
{
"depends_on": "eval: parent.invoice_type == \"Purchase\"",
"fieldname": "supplier_invoice_date",
"fieldtype": "Date",
"label": "Supplier Invoice Date"
}
],
"istable": 1,
"links": [],
"modified": "2024-03-27 13:10:06.703006",
"modified": "2025-12-01 16:18:07.997594",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Opening Invoice Creation Tool Item",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -26,6 +26,7 @@ class OpeningInvoiceCreationToolItem(Document):
party_type: DF.Link | None
posting_date: DF.Date | None
qty: DF.Data | None
supplier_invoice_date: DF.Date | None
temporary_opening_account: DF.Link | None
# end: auto-generated types

View File

@@ -41,6 +41,7 @@ frappe.ui.form.on("Payment Entry", {
if (frm.is_new()) {
set_default_party_type(frm);
frm.clear_table("tax_withholding_entries");
}
},
@@ -181,7 +182,7 @@ frappe.ui.form.on("Payment Entry", {
"Dunning",
];
if (in_list(party_type_doctypes, child.reference_doctype)) {
if (party_type_doctypes.includes(child.reference_doctype)) {
filters[doc.party_type.toLowerCase()] = doc.party;
}
@@ -399,6 +400,16 @@ frappe.ui.form.on("Payment Entry", {
);
frm.refresh_fields();
const party_currency =
frm.doc.payment_type === "Receive" ? "paid_from_account_currency" : "paid_to_account_currency";
var reference_grid = frm.fields_dict["references"].grid;
["total_amount", "outstanding_amount", "allocated_amount"].forEach((fieldname) => {
reference_grid.update_docfield_property(fieldname, "options", party_currency);
});
reference_grid.refresh();
},
show_general_ledger: function (frm) {
@@ -426,7 +437,15 @@ frappe.ui.form.on("Payment Entry", {
if (frm.doc.payment_type == "Internal Transfer") {
$.each(
["party", "party_type", "paid_from", "paid_to", "references", "total_allocated_amount"],
[
"party",
"party_type",
"paid_from",
"paid_to",
"references",
"total_allocated_amount",
"party_name",
],
function (i, field) {
frm.set_value(field, null);
}
@@ -493,12 +512,16 @@ frappe.ui.form.on("Payment Entry", {
frm.set_value("contact_email", "");
frm.set_value("contact_person", "");
}
if (frm.doc.payment_type && frm.doc.party_type && frm.doc.party && frm.doc.company) {
if (!frm.doc.posting_date) {
frappe.msgprint(__("Please select Posting Date before selecting Party"));
frm.set_value("party", "");
return;
}
erpnext.utils.get_employee_contact_details(frm);
frm.set_party_account_based_on_party = true;
let company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
@@ -532,6 +555,7 @@ frappe.ui.form.on("Payment Entry", {
},
() => frm.set_value("party_name", r.message.party_name),
() => frm.clear_table("references"),
() => frm.clear_table("tax_withholding_entries"),
() => frm.events.hide_unhide_fields(frm),
() => frm.events.set_dynamic_labels(frm),
() => {
@@ -564,14 +588,15 @@ frappe.ui.form.on("Payment Entry", {
}
},
apply_tax_withholding_amount: function (frm) {
if (!frm.doc.apply_tax_withholding_amount) {
apply_tds: function (frm) {
if (!frm.doc.apply_tds) {
frm.set_value("tax_withholding_category", "");
} else {
frappe.db.get_value("Supplier", frm.doc.party, "tax_withholding_category", (values) => {
} else if (["Customer", "Supplier"].includes(frm.doc.party_type)) {
frappe.db.get_value(frm.doc.party_type, frm.doc.party, "tax_withholding_category", (values) => {
frm.set_value("tax_withholding_category", values.tax_withholding_category);
});
}
frm.clear_table("tax_withholding_entries");
},
paid_from: function (frm) {
@@ -1030,7 +1055,7 @@ frappe.ui.form.on("Payment Entry", {
c.allocated_amount = d.allocated_amount;
c.account = d.account;
if (!in_list(frm.events.get_order_doctypes(frm), d.voucher_type)) {
if (!frm.events.get_order_doctypes(frm).includes(d.voucher_type)) {
if (flt(d.outstanding_amount) > 0)
total_positive_outstanding += flt(d.outstanding_amount);
else total_negative_outstanding += Math.abs(flt(d.outstanding_amount));
@@ -1046,7 +1071,7 @@ frappe.ui.form.on("Payment Entry", {
} else {
c.exchange_rate = 1;
}
if (in_list(frm.events.get_invoice_doctypes(frm), d.reference_doctype)) {
if (frm.events.get_invoice_doctypes(frm).includes(d.reference_doctype)) {
c.due_date = d.due_date;
}
});
@@ -1093,7 +1118,7 @@ frappe.ui.form.on("Payment Entry", {
allocate_party_amount_against_ref_docs: async function (frm, paid_amount, paid_amount_change) {
await frm.call("allocate_amount_to_references", {
paid_amount: paid_amount,
paid_amount: flt(paid_amount),
paid_amount_change: paid_amount_change,
allocate_payment_amount: frappe.flags.allocate_payment_amount ?? false,
});
@@ -1277,15 +1302,14 @@ frappe.ui.form.on("Payment Entry", {
let row = (frm.doc.deductions || []).find((t) => t.is_exchange_gain_loss);
if (!row) {
const response = await get_company_defaults(frm.doc.company);
const company_defaults = frappe.get_doc(":Company", frm.doc.company);
const account =
response.message?.[account_fieldname] ||
company_defaults?.[account_fieldname] ||
(await prompt_for_missing_account(frm, account_fieldname));
row = frm.add_child("deductions");
row.account = account;
row.cost_center = response.message?.cost_center;
row.cost_center = company_defaults?.cost_center;
row.is_exchange_gain_loss = 1;
}
@@ -1430,16 +1454,15 @@ frappe.ui.form.on("Payment Entry", {
callback: function (r) {
if (!r.exc && r.message) {
// set taxes table
if (r.message) {
for (let tax of r.message) {
if (tax.charge_type === "On Net Total") {
tax.charge_type = "On Paid Amount";
}
frm.add_child("taxes", tax);
let taxes = r.message;
taxes.forEach((tax) => {
if (tax.charge_type === "On Net Total") {
tax.charge_type = "On Paid Amount";
}
frm.events.apply_taxes(frm);
frm.events.set_unallocated_amount(frm);
}
});
frm.set_value("taxes", taxes);
frm.events.apply_taxes(frm);
frm.events.set_unallocated_amount(frm);
}
},
});
@@ -1495,18 +1518,14 @@ frappe.ui.form.on("Payment Entry", {
"Can refer row only if the charge type is 'On Previous Row Amount' or 'Previous Row Total'"
);
d.row_id = "";
} else if (
(d.charge_type == "On Previous Row Amount" || d.charge_type == "On Previous Row Total") &&
d.row_id
) {
} else if (d.charge_type == "On Previous Row Amount" || d.charge_type == "On Previous Row Total") {
if (d.idx == 1) {
msg = __(
"Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"
);
d.charge_type = "";
} else if (!d.row_id) {
msg = __("Please specify a valid Row ID for row {0} in table {1}", [d.idx, __(d.doctype)]);
d.row_id = "";
d.row_id = d.idx - 1;
} else if (d.row_id && d.row_id >= d.idx) {
msg = __(
"Cannot refer row number greater than or equal to current row number for this Charge type"

View File

@@ -21,6 +21,8 @@
"party_name",
"book_advance_payments_in_separate_party_account",
"reconcile_on_advance_payment_date",
"apply_tds",
"tax_withholding_category",
"column_break_11",
"bank_account",
"party_bank_account",
@@ -60,10 +62,6 @@
"taxes_and_charges_section",
"purchase_taxes_and_charges_template",
"sales_taxes_and_charges_template",
"column_break_55",
"apply_tax_withholding_amount",
"tax_withholding_category",
"section_break_56",
"taxes",
"section_break_60",
"base_total_taxes_and_charges",
@@ -71,6 +69,11 @@
"total_taxes_and_charges",
"deductions_or_loss_section",
"deductions",
"section_tax_withholding_entry",
"tax_withholding_group",
"ignore_tax_withholding_threshold",
"override_tax_withholding_entries",
"tax_withholding_entries",
"transaction_references",
"reference_no",
"column_break_23",
@@ -578,24 +581,17 @@
"label": "Custom Remarks"
},
{
"depends_on": "eval:doc.apply_tax_withholding_amount",
"depends_on": "eval:doc.apply_tds",
"fieldname": "tax_withholding_category",
"fieldtype": "Link",
"label": "Tax Withholding Category",
"mandatory_depends_on": "eval:doc.apply_tax_withholding_amount",
"mandatory_depends_on": "eval:doc.apply_tds",
"options": "Tax Withholding Category"
},
{
"default": "0",
"depends_on": "eval:doc.party_type == 'Supplier'",
"fieldname": "apply_tax_withholding_amount",
"fieldtype": "Check",
"label": "Apply Tax Withholding Amount"
},
{
"collapsible": 1,
"fieldname": "taxes_and_charges_section",
"fieldtype": "Section Break",
"hide_border": 1,
"label": "Taxes and Charges"
},
{
@@ -648,15 +644,6 @@
"options": "Company:company:default_currency",
"read_only": 1
},
{
"fieldname": "column_break_55",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_56",
"fieldtype": "Section Break",
"hide_border": 1
},
{
"depends_on": "eval:doc.received_amount && doc.payment_type != 'Internal Transfer'",
"fieldname": "received_amount_after_tax",
@@ -695,8 +682,7 @@
},
{
"fieldname": "section_break_60",
"fieldtype": "Section Break",
"hide_border": 1
"fieldtype": "Section Break"
},
{
"depends_on": "eval:doc.docstatus==0",
@@ -715,7 +701,6 @@
"fetch_from": "company.book_advance_payments_in_separate_party_account",
"fieldname": "book_advance_payments_in_separate_party_account",
"fieldtype": "Check",
"hidden": 1,
"label": "Book Advance Payments in Separate Party Account",
"no_copy": 1,
"read_only": 1
@@ -753,6 +738,46 @@
"options": "No\nYes",
"print_hide": 1,
"search_index": 1
},
{
"default": "0",
"depends_on": "eval:doc.party_type == 'Supplier'",
"fieldname": "apply_tds",
"fieldtype": "Check",
"label": "Consider for Tax Withholding"
},
{
"collapsible": 1,
"collapsible_depends_on": "eval: doc.apply_tds && doc.docstatus == 0",
"depends_on": "eval: doc.apply_tds",
"fieldname": "section_tax_withholding_entry",
"fieldtype": "Section Break",
"label": "Tax Withholding Entry"
},
{
"fieldname": "tax_withholding_group",
"fieldtype": "Link",
"label": "Tax Withholding Group",
"options": "Tax Withholding Group"
},
{
"default": "0",
"fieldname": "ignore_tax_withholding_threshold",
"fieldtype": "Check",
"label": "Ignore Tax Withholding Threshold"
},
{
"fieldname": "tax_withholding_entries",
"fieldtype": "Table",
"label": "Tax Withholding Entries",
"options": "Tax Withholding Entry",
"read_only_depends_on": "eval: !doc.override_tax_withholding_entries"
},
{
"default": "0",
"fieldname": "override_tax_withholding_entries",
"fieldtype": "Check",
"label": "Edit Tax Withholding Entries"
}
],
"grid_page_length": 50,
@@ -767,7 +792,7 @@
"table_fieldname": "payment_entries"
}
],
"modified": "2025-05-08 11:18:10.238085",
"modified": "2026-02-03 16:08:49.800381",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",

View File

@@ -30,9 +30,7 @@ from erpnext.accounts.doctype.repost_accounting_ledger.repost_accounting_ledger
validate_docs_for_deferred_accounting,
validate_docs_for_voucher_types,
)
from erpnext.accounts.doctype.tax_withholding_category.tax_withholding_category import (
get_party_tax_withholding_details,
)
from erpnext.accounts.doctype.tax_withholding_entry.tax_withholding_entry import PaymentTaxWithholding
from erpnext.accounts.general_ledger import (
make_gl_entries,
make_reverse_gl_entries,
@@ -80,9 +78,10 @@ class PaymentEntry(AccountsController):
from erpnext.accounts.doctype.payment_entry_reference.payment_entry_reference import (
PaymentEntryReference,
)
from erpnext.accounts.doctype.tax_withholding_entry.tax_withholding_entry import TaxWithholdingEntry
amended_from: DF.Link | None
apply_tax_withholding_amount: DF.Check
apply_tds: DF.Check
auto_repeat: DF.Link | None
bank: DF.ReadOnly | None
bank_account: DF.Link | None
@@ -103,11 +102,13 @@ class PaymentEntry(AccountsController):
custom_remarks: DF.Check
deductions: DF.Table[PaymentEntryDeduction]
difference_amount: DF.Currency
ignore_tax_withholding_threshold: DF.Check
in_words: DF.SmallText | None
is_opening: DF.Literal["No", "Yes"]
letter_head: DF.Link | None
mode_of_payment: DF.Link | None
naming_series: DF.Literal["ACC-PAY-.YYYY.-"]
override_tax_withholding_entries: DF.Check
paid_amount: DF.Currency
paid_amount_after_tax: DF.Currency
paid_from: DF.Link
@@ -139,6 +140,8 @@ class PaymentEntry(AccountsController):
status: DF.Literal["", "Draft", "Submitted", "Cancelled"]
target_exchange_rate: DF.Float
tax_withholding_category: DF.Link | None
tax_withholding_entries: DF.Table[TaxWithholdingEntry]
tax_withholding_group: DF.Link | None
taxes: DF.Table[AdvanceTaxesandCharges]
title: DF.Data | None
total_allocated_amount: DF.Currency
@@ -189,7 +192,7 @@ class PaymentEntry(AccountsController):
self.validate_allocated_amount()
self.validate_paid_invoices()
self.ensure_supplier_is_not_blocked()
self.set_tax_withholding()
PaymentTaxWithholding(self).on_validate()
self.set_status()
self.set_total_in_words()
@@ -199,6 +202,7 @@ class PaymentEntry(AccountsController):
def on_submit(self):
if self.difference_amount:
frappe.throw(_("Difference Amount must be zero"))
PaymentTaxWithholding(self).on_submit()
self.update_payment_requests()
self.update_payment_schedule()
self.make_gl_entries()
@@ -300,8 +304,10 @@ class PaymentEntry(AccountsController):
"Unreconcile Payment",
"Unreconcile Payment Entries",
"Advance Payment Ledger Entry",
"Tax Withholding Entry",
)
super().on_cancel()
PaymentTaxWithholding(self).on_cancel()
self.update_payment_requests(cancel=True)
self.update_payment_schedule(cancel=1)
self.make_gl_entries(cancel=1)
@@ -937,93 +943,6 @@ class PaymentEntry(AccountsController):
self.base_in_words = money_in_words(base_amount, self.company_currency)
self.in_words = money_in_words(amount, currency)
def set_tax_withholding(self):
if self.party_type != "Supplier":
return
if not self.apply_tax_withholding_amount:
return
net_total = self.calculate_tax_withholding_net_total()
# Adding args as purchase invoice to get TDS amount
args = frappe._dict(
{
"company": self.company,
"doctype": "Payment Entry",
"supplier": self.party,
"posting_date": self.posting_date,
"net_total": net_total,
}
)
tax_withholding_details = get_party_tax_withholding_details(args, self.tax_withholding_category)
if not tax_withholding_details:
return
tax_withholding_details.update(
{"cost_center": self.cost_center or erpnext.get_default_cost_center(self.company)}
)
accounts = []
for d in self.taxes:
if d.account_head == tax_withholding_details.get("account_head"):
# Preserve user updated included in paid amount
if d.included_in_paid_amount:
tax_withholding_details.update({"included_in_paid_amount": d.included_in_paid_amount})
d.update(tax_withholding_details)
accounts.append(d.account_head)
if not accounts or tax_withholding_details.get("account_head") not in accounts:
self.append("taxes", tax_withholding_details)
to_remove = [
d
for d in self.taxes
if not d.tax_amount and d.account_head == tax_withholding_details.get("account_head")
]
for d in to_remove:
self.remove(d)
def calculate_tax_withholding_net_total(self):
net_total = 0
order_details = self.get_order_wise_tax_withholding_net_total()
for d in self.references:
tax_withholding_net_total = order_details.get(d.reference_name)
if not tax_withholding_net_total:
continue
net_taxable_outstanding = max(
0, d.outstanding_amount - (d.total_amount - tax_withholding_net_total)
)
net_total += min(net_taxable_outstanding, d.allocated_amount)
net_total += self.unallocated_amount
return net_total
def get_order_wise_tax_withholding_net_total(self):
if self.party_type == "Supplier":
doctype = "Purchase Order"
else:
doctype = "Sales Order"
docnames = [d.reference_name for d in self.references if d.reference_doctype == doctype]
return frappe._dict(
frappe.db.get_all(
doctype,
filters={"name": ["in", docnames]},
fields=["name", "base_tax_withholding_net_total"],
as_list=True,
)
)
def apply_taxes(self):
self.initialize_taxes()
self.determine_exclusive_rate()
@@ -1146,8 +1065,12 @@ class PaymentEntry(AccountsController):
total_allocated_amount += flt(d.allocated_amount)
base_total_allocated_amount += self.calculate_base_allocated_amount_for_reference(d)
self.total_allocated_amount = abs(total_allocated_amount)
self.base_total_allocated_amount = abs(base_total_allocated_amount)
self.total_allocated_amount = flt(
abs(total_allocated_amount), self.precision("total_allocated_amount")
)
self.base_total_allocated_amount = flt(
abs(base_total_allocated_amount), self.precision("base_total_allocated_amount")
)
def set_unallocated_amount(self):
self.unallocated_amount = 0
@@ -1163,20 +1086,32 @@ class PaymentEntry(AccountsController):
self.base_paid_amount + deductions_to_consider
):
self.unallocated_amount = (
self.base_paid_amount
+ deductions_to_consider
- self.base_total_allocated_amount
- included_taxes
) / self.source_exchange_rate
flt(
(
self.base_paid_amount
+ deductions_to_consider
- self.base_total_allocated_amount
- included_taxes
),
self.precision("unallocated_amount"),
)
/ self.source_exchange_rate
)
elif self.payment_type == "Pay" and self.base_total_allocated_amount < (
self.base_received_amount - deductions_to_consider
):
self.unallocated_amount = (
self.base_received_amount
- deductions_to_consider
- self.base_total_allocated_amount
- included_taxes
) / self.target_exchange_rate
flt(
(
self.base_received_amount
- deductions_to_consider
- self.base_total_allocated_amount
- included_taxes
),
self.precision("unallocated_amount"),
)
/ self.target_exchange_rate
)
def set_exchange_gain_loss(self):
exchange_gain_loss = flt(
@@ -1366,8 +1301,11 @@ class PaymentEntry(AccountsController):
def make_gl_entries(self, cancel=0, adv_adj=0):
gl_entries = self.build_gl_map()
gl_entries = process_gl_map(gl_entries)
make_gl_entries(gl_entries, cancel=cancel, adv_adj=adv_adj)
merge_entries = frappe.get_single_value("Accounts Settings", "merge_similar_account_heads")
gl_entries = process_gl_map(gl_entries, merge_entries=merge_entries)
make_gl_entries(gl_entries, cancel=cancel, adv_adj=adv_adj, merge_entries=merge_entries)
if cancel:
cancel_exchange_gain_loss_journal(frappe._dict(doctype=self.doctype, name=self.name))
else:

View File

@@ -1045,6 +1045,7 @@ class TestPaymentEntry(IntegrationTestCase):
)
def test_gl_of_multi_currency_payment_with_taxes(self):
frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 1)
payment_entry = create_payment_entry(
party="_Test Supplier USD", paid_to="_Test Payable USD - _TC", save=True
)
@@ -1606,6 +1607,96 @@ class TestPaymentEntry(IntegrationTestCase):
self.voucher_no = pe.name
self.check_gl_entries()
def test_payment_entry_merges_gl_entries_with_same_account_head(self):
"""
Test that Payment Entry merges GL entries with same account head
when 'Merge Similar Account Heads' setting is enabled.
"""
frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 1)
pe = create_payment_entry(
party_type="Supplier",
party="_Test Supplier",
paid_from="_Test Bank - _TC",
paid_to="Creditors - _TC",
)
pe.append(
"deductions",
{
"account": "Write Off - _TC",
"cost_center": "_Test Cost Center - _TC",
"amount": 50,
},
)
pe.append(
"deductions",
{
"account": "Write Off - _TC",
"cost_center": "_Test Cost Center - _TC",
"amount": 30,
},
)
pe.save()
pe.submit()
gl_entries = frappe.db.get_all(
"GL Entry",
filters={"voucher_no": pe.name, "account": "Write Off - _TC", "is_cancelled": 0},
fields=["debit", "credit"],
)
self.assertEqual(len(gl_entries), 1)
self.assertEqual(gl_entries[0].debit, 80)
def test_payment_entry_does_not_merge_gl_entries_when_setting_disabled(self):
"""
Test that Payment Entry does NOT merge GL entries
when 'Merge Similar Account Heads' is disabled.
"""
frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0)
pe = create_payment_entry(
party_type="Supplier",
party="_Test Supplier",
paid_from="_Test Bank - _TC",
paid_to="Creditors - _TC",
)
pe.append(
"deductions",
{
"account": "Write Off - _TC",
"cost_center": "_Test Cost Center - _TC",
"amount": 50,
},
)
pe.append(
"deductions",
{
"account": "Write Off - _TC",
"cost_center": "_Test Cost Center - _TC",
"amount": 30,
},
)
pe.save()
pe.submit()
gl_entries = frappe.db.get_all(
"GL Entry",
filters={"voucher_no": pe.name, "account": "Write Off - _TC", "is_cancelled": 0},
fields=["debit", "credit"],
)
self.assertEqual(len(gl_entries), 2)
frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 1)
def check_pl_entries(self):
ple = frappe.qb.DocType("Payment Ledger Entry")
pl_entries = (

View File

@@ -59,14 +59,15 @@
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-11-05 16:07:47.307971",
"modified": "2025-08-13 06:52:46.130142",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry Deduction",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -38,7 +38,7 @@
"search_index": 1
},
{
"columns": 2,
"columns": 4,
"fieldname": "reference_name",
"fieldtype": "Dynamic Link",
"in_global_search": 1,
@@ -49,8 +49,10 @@
"search_index": 1
},
{
"columns": 2,
"fieldname": "due_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Due Date",
"read_only": 1
},
@@ -68,7 +70,7 @@
{
"columns": 2,
"fieldname": "total_amount",
"fieldtype": "Float",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Grand Total",
"print_hide": 1,
@@ -77,7 +79,7 @@
{
"columns": 2,
"fieldname": "outstanding_amount",
"fieldtype": "Float",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Outstanding",
"read_only": 1
@@ -85,7 +87,7 @@
{
"columns": 2,
"fieldname": "allocated_amount",
"fieldtype": "Float",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Allocated"
},
@@ -174,7 +176,7 @@
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2025-07-25 04:32:11.040025",
"modified": "2026-01-05 14:18:03.286224",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry Reference",

View File

@@ -18,12 +18,12 @@ class PaymentEntryReference(Document):
account_type: DF.Data | None
advance_voucher_no: DF.DynamicLink | None
advance_voucher_type: DF.Link | None
allocated_amount: DF.Float
allocated_amount: DF.Currency
bill_no: DF.Data | None
due_date: DF.Date | None
exchange_gain_loss: DF.Currency
exchange_rate: DF.Float
outstanding_amount: DF.Float
outstanding_amount: DF.Currency
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
@@ -34,7 +34,7 @@ class PaymentEntryReference(Document):
reconcile_effect_on: DF.Date | None
reference_doctype: DF.Link
reference_name: DF.DynamicLink
total_amount: DF.Float
total_amount: DF.Currency
# end: auto-generated types
@property

View File

@@ -132,6 +132,12 @@
"fieldtype": "Link",
"label": "Cost Center",
"options": "Cost Center"
},
{
"fieldname": "project",
"fieldtype": "Link",
"label": "Project",
"options": "Project"
},
{
"fieldname": "due_date",

View File

@@ -38,6 +38,7 @@ class PaymentLedgerEntry(Document):
amount_in_account_currency: DF.Currency
company: DF.Link | None
cost_center: DF.Link | None
project: DF.Link | None
delinked: DF.Check
due_date: DF.Date | None
finance_book: DF.Link | None
@@ -131,7 +132,6 @@ class PaymentLedgerEntry(Document):
account_type == "Profit and Loss"
and self.company == dimension.company
and dimension.mandatory_for_pl
and not dimension.disabled
):
if not self.get(dimension.fieldname):
frappe.throw(
@@ -144,7 +144,6 @@ class PaymentLedgerEntry(Document):
account_type == "Balance Sheet"
and self.company == dimension.company
and dimension.mandatory_for_bs
and not dimension.disabled
):
if not self.get(dimension.fieldname):
frappe.throw(

View File

@@ -50,12 +50,10 @@ class TestPaymentOrder(IntegrationTestCase):
def create_payment_order_against_payment_entry(ref_doc, order_type, bank_account):
payment_order = frappe.get_doc(
dict(
doctype="Payment Order",
company="_Test Company",
payment_order_type=order_type,
company_bank_account=bank_account,
)
doctype="Payment Order",
company="_Test Company",
payment_order_type=order_type,
company_bank_account=bank_account,
)
doc = make_payment_order(ref_doc.name, payment_order)
doc.save()

View File

@@ -6,7 +6,7 @@ import frappe
from frappe import _, msgprint, qb
from frappe.model.document import Document
from frappe.model.meta import get_field_precision
from frappe.query_builder import Criterion
from frappe.query_builder import Case, Criterion
from frappe.query_builder.custom import ConstantColumn
from frappe.utils import flt, fmt_money, get_link_to_form, getdate, nowdate, today
@@ -393,6 +393,9 @@ class PaymentReconciliation(Document):
inv.outstanding_amount = flt(entry.get("outstanding_amount"))
def get_difference_amount(self, payment_entry, invoice, allocated_amount):
party_account_defaults = frappe.get_cached_value(
"Account", self.receivable_payable_account, ["account_type", "account_currency"], as_dict=True
)
allocated_amount_precision = get_field_precision(
frappe.get_meta("Payment Reconciliation Allocation").get_field("allocated_amount")
)
@@ -400,9 +403,9 @@ class PaymentReconciliation(Document):
frappe.get_meta("Payment Reconciliation Allocation").get_field("difference_amount")
)
difference_amount = 0
if frappe.get_cached_value(
"Account", self.receivable_payable_account, "account_currency"
) != frappe.get_cached_value("Company", self.company, "default_currency"):
if party_account_defaults.get("account_currency") != frappe.get_cached_value(
"Company", self.company, "default_currency"
):
if invoice.get("exchange_rate") and payment_entry.get("exchange_rate", 1) != invoice.get(
"exchange_rate", 1
):
@@ -414,7 +417,14 @@ class PaymentReconciliation(Document):
invoice.get("exchange_rate", 1) * flt(allocated_amount, allocated_amount_precision),
difference_amount_precision,
)
difference_amount = allocated_amount_in_ref_rate - allocated_amount_in_inv_rate
# Added If clause to handle return Adhoc payments for account type holders ("Payable")
if party_account_defaults.get("account_type") in ("Payable") and invoice.get(
"invoice_type"
) in ["Payment Entry", "Journal Entry"]:
difference_amount = allocated_amount_in_inv_rate - allocated_amount_in_ref_rate
else:
difference_amount = allocated_amount_in_ref_rate - allocated_amount_in_inv_rate
return difference_amount
@@ -677,6 +687,28 @@ class PaymentReconciliation(Document):
)
invoice_exchange_map.update(journals_map)
payment_entries = [
d.get("invoice_number") for d in invoices if d.get("invoice_type") == "Payment Entry"
]
payment_entries.extend(
[d.get("reference_name") for d in payments if d.get("reference_type") == "Payment Entry"]
)
if payment_entries:
pe = frappe.qb.DocType("Payment Entry")
query = (
frappe.qb.from_(pe)
.select(
pe.name,
Case()
.when(pe.payment_type == "Receive", pe.source_exchange_rate)
.else_(pe.target_exchange_rate)
.as_("exchange_rate"),
)
.where(pe.name.isin(payment_entries))
)
payment_entries = query.run(as_list=1)
invoice_exchange_map.update(payment_entries)
return invoice_exchange_map
def validate_allocation(self):
@@ -714,7 +746,7 @@ class PaymentReconciliation(Document):
ple = qb.DocType("Payment Ledger Entry")
for x in self.dimensions:
dimension = x.fieldname
if self.get(dimension):
if self.get(dimension) and frappe.db.has_column("Payment Ledger Entry", dimension):
self.accounting_dimension_filter_conditions.append(ple[dimension] == self.get(dimension))
def build_qb_filter_conditions(self, get_invoices=False, get_return_invoices=False):

View File

@@ -2340,6 +2340,210 @@ class TestPaymentReconciliation(IntegrationTestCase):
frappe.db.set_value("Company", self.company, default_settings)
def test_foreign_currency_reverse_payment_entry_against_payment_entry_for_customer(self):
transaction_date = nowdate()
customer = self.customer3
amount = 1000
exchange_rate_at_payment = 100
exchange_rate_at_reverse_payment = 95
# Receive amount from customer - 1,00,000
pe = self.create_payment_entry(amount=amount, posting_date=transaction_date, customer=customer)
pe.payment_type = "Receive"
pe.paid_from = self.debtors_eur
pe.paid_from_account_currency = "EUR"
pe.source_exchange_rate = exchange_rate_at_payment
pe.paid_amount = amount
pe.received_amount = exchange_rate_at_payment * amount
pe.paid_to = self.cash
pe.paid_to_account_currency = "INR"
pe = pe.save().submit()
# Pay amount to customer - 95,000
reverse_pe = self.create_payment_entry(
amount=amount, posting_date=transaction_date, customer=customer
)
reverse_pe.payment_type = "Pay"
reverse_pe.paid_from = self.cash
reverse_pe.paid_from_account_currency = "INR"
reverse_pe.target_exchange_rate = exchange_rate_at_reverse_payment
reverse_pe.paid_amount = exchange_rate_at_reverse_payment * amount
reverse_pe.received_amount = amount
reverse_pe.paid_to = self.debtors_eur
reverse_pe.paid_to_account_currency = "EUR"
reverse_pe.save().submit()
# Reconcile payments
pr = self.create_payment_reconciliation()
pr.party = customer
pr.receivable_payable_account = self.debtors_eur
pr.get_unreconciled_entries()
invoices = [invoice.as_dict() for invoice in pr.invoices]
payments = [payment.as_dict() for payment in pr.payments]
self.assertEqual(len(pr.get("invoices")), 1)
self.assertEqual(len(pr.get("payments")), 1)
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
# Check the difference_amount is a gain of 5000
self.assertEqual(flt(pr.allocation[0].get("difference_amount")), 5000.0)
pr.reconcile()
def test_foreign_currency_reverse_payment_entry_against_payment_entry_for_supplier(self):
transaction_date = nowdate()
self.supplier = "_Test Supplier USD"
amount = 1000
exchange_rate_at_payment = 100
exchange_rate_at_reverse_payment = 95
# Pay amount to supplier - 1,00,000
pe = self.create_payment_entry(amount=amount, posting_date=transaction_date)
pe.payment_type = "Pay"
pe.party_type = "Supplier"
pe.party = self.supplier
pe.paid_from = self.cash
pe.paid_from_account_currency = "INR"
pe.target_exchange_rate = exchange_rate_at_payment
pe.paid_amount = exchange_rate_at_payment * amount
pe.received_amount = amount
pe.paid_to = self.creditors_usd
pe.paid_to_account_currency = "USD"
pe.save().submit()
# Receive amount from supplier - 95,000
reverse_pe = self.create_payment_entry(amount=amount, posting_date=transaction_date)
reverse_pe.payment_type = "Receive"
reverse_pe.party_type = "Supplier"
reverse_pe.party = self.supplier
reverse_pe.paid_from = self.creditors_usd
reverse_pe.paid_from_account_currency = "USD"
reverse_pe.source_exchange_rate = exchange_rate_at_reverse_payment
reverse_pe.paid_amount = amount
reverse_pe.received_amount = exchange_rate_at_reverse_payment * amount
reverse_pe.paid_to = self.cash
reverse_pe.paid_to_account_currency = "INR"
reverse_pe = reverse_pe.save().submit()
# Reconcile payments
pr = self.create_payment_reconciliation(party_is_customer=False)
pr.party = self.supplier
pr.receivable_payable_account = self.creditors_usd
pr.get_unreconciled_entries()
invoices = [invoice.as_dict() for invoice in pr.invoices]
payments = [payment.as_dict() for payment in pr.payments]
self.assertEqual(len(pr.get("invoices")), 1)
self.assertEqual(len(pr.get("payments")), 1)
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
# Check the difference_amount is a loss of 5000
self.assertEqual(flt(pr.allocation[0].get("difference_amount")), -5000.0)
pr.reconcile()
def test_foreign_currency_reverse_journal_entry_against_journal_entry_for_customer(self):
transaction_date = nowdate()
customer = self.customer3
amount = 1000
exchange_rate_at_payment = 95
exchange_rate_at_reverse_payment = 100
# Receive amount from customer - 95,000
je1 = self.create_journal_entry(self.cash, self.debtors_eur, amount, transaction_date)
je1.multi_currency = 1
je1.accounts[0].exchange_rate = 1
je1.accounts[0].debit_in_account_currency = exchange_rate_at_payment * amount
je1.accounts[0].debit = exchange_rate_at_payment * amount
je1.accounts[1].party_type = "Customer"
je1.accounts[1].party = customer
je1.accounts[1].exchange_rate = exchange_rate_at_payment
je1.accounts[1].credit_in_account_currency = amount
je1.accounts[1].credit = exchange_rate_at_payment * amount
je1.save()
je1.submit()
# Pay amount to customer - 1,00,000
je2 = self.create_journal_entry(self.debtors_eur, self.cash, amount, transaction_date)
je2.multi_currency = 1
je2.accounts[0].party_type = "Customer"
je2.accounts[0].party = customer
je2.accounts[0].exchange_rate = exchange_rate_at_reverse_payment
je2.accounts[0].debit_in_account_currency = amount
je2.accounts[0].debit = exchange_rate_at_reverse_payment * amount
je2.accounts[1].exchange_rate = 1
je2.accounts[1].credit_in_account_currency = exchange_rate_at_reverse_payment * amount
je2.accounts[1].credit = exchange_rate_at_reverse_payment * amount
je2.save()
je2.submit()
# Reconcile payments
pr = self.create_payment_reconciliation()
pr.party = customer
pr.receivable_payable_account = self.debtors_eur
pr.get_unreconciled_entries()
self.assertEqual(len(pr.invoices), 1)
self.assertEqual(len(pr.payments), 1)
invoices = [invoice.as_dict() for invoice in pr.invoices]
payments = [payment.as_dict() for payment in pr.payments]
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
# Check the difference_amount is a loss of 5000
self.assertEqual(flt(pr.allocation[0].difference_amount), -5000.0)
pr.reconcile()
def test_foreign_currency_reverse_journal_entry_against_journal_entry_for_supplier(self):
transaction_date = nowdate()
self.supplier = "_Test Supplier USD"
amount = 1000
exchange_rate_at_payment = 95
exchange_rate_at_reverse_payment = 100
# Pay amount to supplier - 95,000
je1 = self.create_journal_entry(self.creditors_usd, self.cash, amount, transaction_date)
je1.multi_currency = 1
je1.accounts[0].party_type = "Supplier"
je1.accounts[0].party = self.supplier
je1.accounts[0].exchange_rate = exchange_rate_at_payment
je1.accounts[0].debit_in_account_currency = amount
je1.accounts[0].debit = exchange_rate_at_payment * amount
je1.accounts[1].exchange_rate = 1
je1.accounts[1].credit = exchange_rate_at_payment * amount
je1.accounts[1].credit_in_account_currency = exchange_rate_at_payment * amount
je1.save()
je1.submit()
# Receive amount from supplier - 1,00,000
je2 = self.create_journal_entry(self.cash, self.creditors_usd, amount, transaction_date)
je2.multi_currency = 1
je2.accounts[0].exchange_rate = 1
je2.accounts[0].debit = exchange_rate_at_reverse_payment * amount
je2.accounts[0].debit_in_account_currency = exchange_rate_at_reverse_payment * amount
je2.accounts[1].party_type = "Supplier"
je2.accounts[1].party = self.supplier
je2.accounts[1].exchange_rate = exchange_rate_at_reverse_payment
je2.accounts[1].credit_in_account_currency = amount
je2.accounts[1].credit = exchange_rate_at_reverse_payment * amount
je2.save()
je2.submit()
# Reconcile payments
pr = self.create_payment_reconciliation()
pr.party_type = "Supplier"
pr.party = self.supplier
pr.receivable_payable_account = self.creditors_usd
pr.get_unreconciled_entries()
self.assertEqual(len(pr.invoices), 1)
self.assertEqual(len(pr.payments), 1)
invoices = [invoice.as_dict() for invoice in pr.invoices]
payments = [payment.as_dict() for payment in pr.payments]
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
# Check the difference_amount is a gain of 5000
self.assertEqual(flt(pr.allocation[0].difference_amount), 5000.0)
pr.reconcile()
def make_customer(customer_name, currency=None):
if not frappe.db.exists("Customer", customer_name):

View File

@@ -0,0 +1,88 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2025-12-02 17:50:08.648006",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"payment_term",
"column_break_lnjp",
"payment_schedule",
"section_break_fjhh",
"description",
"section_break_mjlv",
"due_date",
"column_break_qghl",
"amount"
],
"fields": [
{
"fieldname": "payment_term",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Payment Term",
"options": "Payment Term"
},
{
"collapsible": 1,
"fieldname": "section_break_fjhh",
"fieldtype": "Section Break",
"label": "Description"
},
{
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"label": "Description"
},
{
"fieldname": "section_break_mjlv",
"fieldtype": "Section Break"
},
{
"fieldname": "due_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Due Date"
},
{
"fieldname": "column_break_qghl",
"fieldtype": "Column Break"
},
{
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Amount",
"precision": "2"
},
{
"fieldname": "column_break_lnjp",
"fieldtype": "Column Break"
},
{
"allow_on_submit": 1,
"fieldname": "payment_schedule",
"fieldtype": "Link",
"label": "Payment Schedule",
"options": "Payment Schedule",
"read_only": 1
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2026-01-19 02:21:36.455830",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reference",
"owner": "Administrator",
"permissions": [],
"row_format": "Dynamic",
"rows_threshold_for_grid_search": 20,
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}

View File

@@ -1,11 +1,11 @@
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class TaxWithheldVouchers(Document):
class PaymentReference(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
@@ -14,12 +14,14 @@ class TaxWithheldVouchers(Document):
if TYPE_CHECKING:
from frappe.types import DF
amount: DF.Currency
description: DF.SmallText | None
due_date: DF.Date | None
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
taxable_amount: DF.Currency
voucher_name: DF.Data | None
voucher_type: DF.Data | None
payment_schedule: DF.Link | None
payment_term: DF.Link | None
# end: auto-generated types
pass

View File

@@ -105,3 +105,29 @@ frappe.ui.form.on("Payment Request", "is_a_subscription", function (frm) {
});
}
});
frappe.ui.form.on("Payment Request", "calculate_total_amount_by_selected_rows", function (frm) {
if (frm.doc.docstatus !== 0) {
frappe.msgprint(__("Cannot fetch selected rows for submitted Payment Request"));
return;
}
const selected = frm.get_selected()?.payment_reference || [];
if (!selected.length) {
frappe.throw(__("No rows selected"));
}
let total = 0;
selected.forEach((name) => {
const row = frm.doc.payment_reference.find((d) => d.name === name);
if (row) {
row.manually_selected = 1;
total += row.amount;
}
});
frm.doc.payment_reference.forEach((row) => {
row.auto_selected = 0;
});
frm.set_value("grand_total", total);
frm.refresh_field("grand_total");
frm.save();
});

View File

@@ -19,6 +19,8 @@
"column_break_4",
"reference_doctype",
"reference_name",
"payment_reference_section",
"payment_reference",
"transaction_details",
"grand_total",
"currency",
@@ -157,6 +159,7 @@
"label": "Amount",
"non_negative": 1,
"options": "currency",
"read_only_depends_on": "eval:doc.payment_reference.length>0",
"reqd": 1
},
{
@@ -457,6 +460,17 @@
"fieldname": "phone_number",
"fieldtype": "Data",
"label": "Phone Number"
},
{
"fieldname": "payment_reference_section",
"fieldtype": "Section Break"
},
{
"fieldname": "payment_reference",
"fieldtype": "Table",
"label": "Payment Reference",
"options": "Payment Reference",
"read_only": 1
}
],
"grid_page_length": 50,
@@ -464,7 +478,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2025-08-29 11:52:48.555415",
"modified": "2026-01-13 12:53:00.963274",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Request",

View File

@@ -45,6 +45,7 @@ class PaymentRequest(Document):
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.payment_reference.payment_reference import PaymentReference
from erpnext.accounts.doctype.subscription_plan_detail.subscription_plan_detail import (
SubscriptionPlanDetail,
)
@@ -78,6 +79,7 @@ class PaymentRequest(Document):
payment_gateway: DF.ReadOnly | None
payment_gateway_account: DF.Link | None
payment_order: DF.Link | None
payment_reference: DF.Table[PaymentReference]
payment_request_type: DF.Literal["Outward", "Inward"]
payment_url: DF.Data | None
phone_number: DF.Data | None
@@ -100,21 +102,45 @@ class PaymentRequest(Document):
subscription_plans: DF.Table[SubscriptionPlanDetail]
swift_number: DF.ReadOnly | None
transaction_date: DF.Date | None
# end: auto-generated types
def on_discard(self):
self.db_set("status", "Cancelled")
def validate(self):
if self.get("__islocal"):
self.status = "Draft"
self.validate_reference_document()
self.validate_against_payment_reference()
self.validate_payment_request_amount()
# self.validate_currency()
self.validate_subscription_details()
def validate_against_payment_reference(self):
if not self.payment_reference:
return
expected = sum(flt(r.amount) for r in self.payment_reference)
if flt(expected, self.precision("grand_total")) != flt(self.grand_total):
frappe.throw(_("Grand Total must match sum of Payment References"))
seen = set()
for r in self.payment_reference:
if not r.payment_schedule:
continue # legacy mode → skip
if r.payment_schedule in seen:
frappe.throw(_("Duplicate Payment Schedule selected"))
seen.add(r.payment_schedule)
def validate_reference_document(self):
if not self.reference_doctype or not self.reference_name:
frappe.throw(_("To create a Payment Request reference document is required"))
def validate_payment_request_amount(self):
if self.payment_reference:
return
if self.grand_total == 0:
frappe.throw(
_("{0} cannot be zero").format(self.get_label_from_fieldname("grand_total")),
@@ -427,6 +453,7 @@ class PaymentRequest(Document):
context = {
"doc": frappe.get_doc(self.reference_doctype, self.reference_name),
"payment_url": self.payment_url,
"payment_request": self,
}
if self.message:
@@ -531,7 +558,7 @@ class PaymentRequest(Document):
row_number += TO_SKIP_NEW_ROW
@frappe.whitelist(allow_guest=True)
@frappe.whitelist()
def make_payment_request(**args):
"""Make payment request"""
@@ -539,12 +566,72 @@ def make_payment_request(**args):
if args.dt not in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST:
frappe.throw(_("Payment Requests cannot be created against: {0}").format(frappe.bold(args.dt)))
if args.dn and not isinstance(args.dn, str):
frappe.throw(_("Invalid parameter. 'dn' should be of type str"))
frappe.has_permission("Payment Request", "create", throw=True)
frappe.has_permission(args.dt, "read", args.dn, throw=True)
ref_doc = args.ref_doc or frappe.get_doc(args.dt, args.dn)
if not args.get("company"):
args.company = ref_doc.company
gateway_account = get_gateway_details(args) or frappe._dict()
grand_total = get_amount(ref_doc, gateway_account.get("payment_account"))
# Schedule-based PRs are allowed only if no Payment Entry exists for this document.
# Any existing Payment Entry forces legacy (amount-based) flow.
selected_payment_schedules = json.loads(args.get("schedules")) if args.get("schedules") else []
# Backend guard:
# If any Payment Entry exists, schedule-based PRs are not allowed.
if selected_payment_schedules and get_existing_payment_entry(ref_doc.name):
frappe.throw(
_(
"Payment Schedule based Payment Requests cannot be created because a Payment Entry already exists for this document."
)
)
has_payment_entry = bool(get_existing_payment_entry(ref_doc.name))
payment_reference = []
if selected_payment_schedules:
existing_payment_references = get_existing_payment_references(ref_doc.name)
if existing_payment_references:
existing_ids = {r["payment_schedule"] for r in existing_payment_references}
selected_ids = {r["name"] for r in selected_payment_schedules}
duplicate_ids = existing_ids & selected_ids
if duplicate_ids:
duplicate_schedules = []
for row in selected_payment_schedules:
if row["name"] in duplicate_ids:
existing_ref = next(
(r for r in existing_payment_references if r["payment_schedule"] == row["name"]),
{},
)
existing_pr = existing_ref.get("parent")
duplicate_schedules.append(
f"Payment Term: {row.get('payment_term')}, "
f"Due Date: {row.get('due_date')}, "
f"Amount: {row.get('payment_amount')} "
f"(already requested in PR {existing_pr})"
)
frappe.throw(
_("The following payment schedule(s) already exist:\n{0}").format(
"\n".join(duplicate_schedules)
)
)
payment_reference = set_payment_references(args.get("schedules"))
# Determine grand_total
if selected_payment_schedules and not has_payment_entry:
grand_total = sum(row.get("payment_amount") for row in selected_payment_schedules)
else:
grand_total = get_amount(ref_doc, gateway_account.get("payment_account"))
if not grand_total:
frappe.throw(_("Payment Entry is already created"))
@@ -554,7 +641,6 @@ def make_payment_request(**args):
loyalty_amount = validate_loyalty_points(ref_doc, int(args.loyalty_points)) # sets fields on ref_doc
ref_doc.db_update()
grand_total = grand_total - loyalty_amount
# fetches existing payment request `grand_total` amount
existing_payment_request_amount = get_existing_payment_request_amount(ref_doc)
@@ -574,19 +660,20 @@ def make_payment_request(**args):
else:
# If PR's are processed, cancel all of them.
cancel_old_payment_requests(ref_doc.doctype, ref_doc.name)
else:
elif not selected_payment_schedules:
grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount)
draft_payment_request = frappe.db.get_value(
"Payment Request",
{"reference_doctype": ref_doc.doctype, "reference_name": ref_doc.name, "docstatus": 0},
)
if draft_payment_request:
frappe.db.set_value(
"Payment Request", draft_payment_request, "grand_total", grand_total, update_modified=False
)
pr = frappe.get_doc("Payment Request", draft_payment_request)
if selected_payment_schedules:
apply_payment_references(pr, payment_reference)
pr.save()
else:
bank_account = (
get_party_bank_account(args.get("party_type"), args.get("party"))
@@ -641,7 +728,10 @@ def make_payment_request(**args):
}
)
# Update dimensions
if selected_payment_schedules:
apply_payment_references(pr, payment_reference)
# Dimensions
pr.update(
{
"cost_center": ref_doc.get("cost_center"),
@@ -670,6 +760,51 @@ def make_payment_request(**args):
return pr.as_dict()
def apply_payment_references(pr, payment_reference):
existing_refs = pr.get("payment_reference") or []
existing_ids = {r.get("payment_schedule") for r in existing_refs if r.get("payment_schedule")}
new_refs = [r for r in (payment_reference or []) if r.get("payment_schedule") not in existing_ids]
pr.set("payment_reference", existing_refs + new_refs)
pr.set("grand_total", sum(flt(r.get("amount")) for r in pr.get("payment_reference")))
def set_payment_references(payment_schedules):
payment_schedules = json.loads(payment_schedules) if payment_schedules else []
payment_reference = []
for row in payment_schedules:
payment_reference.append(
{
"payment_term": row.get("payment_term"),
"payment_schedule": row.get("name"),
"description": row.get("description"),
"due_date": row.get("due_date"),
"amount": row.get("payment_amount"),
}
)
return payment_reference
def get_existing_payment_entry(ref_docname):
pe = frappe.qb.DocType("Payment Entry")
per = frappe.qb.DocType("Payment Entry Reference")
existing_pe = (
frappe.qb.from_(pe)
.join(per)
.on(per.parent == pe.name)
.select(pe.name)
.where(pe.docstatus < 2)
.where(per.reference_name == ref_docname)
.limit(1)
.run()
)
return existing_pe
def get_amount(ref_doc, payment_account=None):
"""get amount based on doctype"""
grand_total = 0
@@ -812,7 +947,7 @@ def get_print_format_list(ref_doctype):
return {"print_format": print_format_list}
@frappe.whitelist(allow_guest=True)
@frappe.whitelist()
def resend_payment_email(docname):
return frappe.get_doc("Payment Request", docname).send_email()
@@ -843,6 +978,7 @@ def update_payment_requests_as_per_pe_references(references=None, cancel=False):
)
referenced_payment_requests = {pr.name: pr for pr in referenced_payment_requests}
doc_updates = {}
for ref in references:
if not ref.payment_request:
@@ -868,7 +1004,7 @@ def update_payment_requests_as_per_pe_references(references=None, cancel=False):
title=_("Invalid Allocated Amount"),
)
# update status
# determine status
if new_outstanding_amount == payment_request["grand_total"]:
status = "Initiated" if payment_request["payment_request_type"] == "Outward" else "Requested"
elif new_outstanding_amount == 0:
@@ -876,31 +1012,37 @@ def update_payment_requests_as_per_pe_references(references=None, cancel=False):
elif new_outstanding_amount > 0:
status = "Partially Paid"
# update database
frappe.db.set_value(
"Payment Request",
ref.payment_request,
{"outstanding_amount": new_outstanding_amount, "status": status},
)
# prepare bulk update data
doc_updates[ref.payment_request] = {
"outstanding_amount": new_outstanding_amount,
"status": status,
}
# bulk update all payment requests
if doc_updates:
frappe.db.bulk_update("Payment Request", doc_updates)
def get_dummy_message(doc):
return frappe.render_template(
"""{% if doc.contact_person -%}
<p>Dear {{ doc.contact_person }},</p>
{%- else %}<p>Hello,</p>{% endif %}
return """
{% if doc.contact_person -%}
<p>Dear {{ doc.contact_person }},</p>
{%- else %}<p>Hello,</p>{% endif %}
<p>{{ _("Requesting payment against {0} {1} for amount {2}").format(doc.doctype,
doc.name, doc.get_formatted("grand_total")) }}</p>
<p>
{{ _("Requesting payment against {0} {1} for amount {2}").format(
doc.doctype,
doc.name,
payment_request.get_formatted("grand_total")
) }}
</p>
<a href="{{ payment_url }}">{{ _("Make Payment") }}</a>
<a href="{{ payment_url }}">{{ _("Make Payment") }}</a>
<p>{{ _("If you have any questions, please get back to us.") }}</p>
<p>{{ _("If you have any questions, please get back to us.") }}</p>
<p>{{ _("Thank you for your business!") }}</p>
""",
dict(doc=doc, payment_url="{{ payment_url }}"),
)
<p>{{ _("Thank you for your business!") }}</p>
"""
@frappe.whitelist()
@@ -1007,3 +1149,44 @@ def get_irequests_of_payment_request(doc: str | None = None) -> list:
},
)
return res
@frappe.whitelist()
def get_available_payment_schedules(reference_doctype, reference_name):
ref_doc = frappe.get_doc(reference_doctype, reference_name)
if not hasattr(ref_doc, "payment_schedule") or not ref_doc.payment_schedule:
return []
if get_existing_payment_entry(reference_name):
return []
existing_refs = get_existing_payment_references(reference_name)
existing_ids = {r["payment_schedule"] for r in existing_refs if r.get("payment_schedule")}
return [r for r in ref_doc.payment_schedule if r.name not in existing_ids]
def get_existing_payment_references(reference_name):
PR = frappe.qb.DocType("Payment Request")
PRF = frappe.qb.DocType("Payment Reference")
result = (
frappe.qb.from_(PR)
.join(PRF)
.on(PR.name == PRF.parent)
.select(
PRF.payment_term,
PRF.due_date,
PRF.amount.as_("payment_amount"),
PRF.payment_schedule,
PRF.parent,
)
.where(PR.reference_name == reference_name)
.where(PR.docstatus < 2)
.where(
PR.status.isin(["Draft", "Requested", "Initiated", "Partially Paid", "Payment Ordered", "Paid"])
)
).run(as_dict=True)
return result

View File

@@ -1,12 +1,14 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import json
import re
import unittest
from unittest.mock import patch
import frappe
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, nowdate
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template
@@ -851,3 +853,130 @@ class TestPaymentRequest(IntegrationTestCase):
pr.load_from_db()
self.assertEqual(pr.grand_total, pi.outstanding_amount)
def test_payment_request_grand_total_from_selected_schedules(self):
po = create_purchase_order(do_not_save=1, currency="INR", qty=1, rate=100)
po.payment_schedule = []
po.append("payment_schedule", {"due_date": nowdate(), "payment_amount": 30})
po.append("payment_schedule", {"due_date": add_days(nowdate(), 1), "payment_amount": 30})
po.append("payment_schedule", {"due_date": add_days(nowdate(), 2), "payment_amount": 40})
po.save()
po.submit()
schedules = json.dumps(
[
{
"payment_term": row.payment_term,
"name": row.name,
"due_date": row.due_date,
"payment_amount": row.payment_amount,
"description": row.description,
}
for row in [po.payment_schedule[0], po.payment_schedule[2]]
]
)
pr = make_payment_request(
dt="Purchase Order",
dn=po.name,
mute_email=1,
submit_doc=False,
return_doc=True,
schedules=schedules,
)
pr.submit()
self.assertEqual(pr.grand_total, 70)
self.assertEqual(len(pr.payment_reference), 2)
def test_draft_pr_reuse_merges_payment_references(self):
from frappe.utils import add_days, nowdate
po = create_purchase_order(do_not_save=1, currency="INR", qty=1, rate=100)
po.payment_schedule = []
po.append("payment_schedule", {"due_date": nowdate(), "payment_amount": 50})
po.append("payment_schedule", {"due_date": add_days(nowdate(), 1), "payment_amount": 50})
po.save()
po.submit()
schedules = json.dumps(
[
{
"payment_term": row.payment_term,
"name": row.name,
"due_date": row.due_date,
"payment_amount": row.payment_amount,
"description": row.description,
}
for row in [po.payment_schedule[0]]
]
)
pr = make_payment_request(
dt="Purchase Order",
dn=po.name,
mute_email=1,
submit_doc=False,
return_doc=True,
schedules=schedules,
)
pr.save()
schedules = json.dumps(
[
{
"payment_term": row.payment_term,
"name": row.name,
"due_date": row.due_date,
"payment_amount": row.payment_amount,
"description": row.description,
}
for row in [po.payment_schedule[1]]
]
)
# call make_payment_request again → reuse draft
pr_reused = make_payment_request(
dt="Purchase Order",
dn=po.name,
mute_email=1,
submit_doc=False,
return_doc=True,
schedules=schedules,
)
self.assertEqual(pr.name, pr_reused.name)
self.assertEqual(pr_reused.grand_total, 100)
self.assertEqual(len(pr_reused.payment_reference), 2)
def test_schedule_pr_not_allowed_if_payment_entry_exists(self):
po = create_purchase_order(do_not_save=1, currency="INR", qty=1, rate=100)
po.payment_schedule = []
row = po.append("payment_schedule", {"due_date": nowdate(), "payment_amount": 100})
po.save()
po.submit()
# create PE first
pr = make_payment_request(dt="Purchase Order", dn=po.name, mute_email=1, submit_doc=1, return_doc=1)
pr.create_payment_entry()
schedules = json.dumps(
[
{
"name": row.name,
"payment_term": row.payment_term,
"due_date": row.due_date,
"payment_amount": row.payment_amount,
"description": row.description,
}
]
)
with self.assertRaises(frappe.ValidationError):
make_payment_request(
dt="Purchase Order",
dn=po.name,
mute_email=1,
submit_doc=False,
return_doc=True,
schedules=schedules,
)

View File

@@ -13,9 +13,9 @@ frappe.ui.form.on("Period Closing Voucher", {
return {
filters: [
["Account", "company", "=", frm.doc.company],
["Account", "is_group", "=", "0"],
["Account", "is_group", "=", 0],
["Account", "freeze_account", "=", "No"],
["Account", "root_type", "in", "Liability, Equity"],
["Account", "root_type", "in", ["Liability", "Equity"]],
],
};
});

View File

@@ -4,19 +4,6 @@
frappe.ui.form.on("POS Closing Entry", {
onload: async function (frm) {
frm.ignore_doctypes_on_cancel_all = ["POS Invoice Merge Log", "Sales Invoice"];
frm.set_query("pos_profile", function (doc) {
return {
filters: { user: doc.user },
};
});
frm.set_query("user", function (doc) {
return {
query: "erpnext.accounts.doctype.pos_closing_entry.pos_closing_entry.get_cashiers",
filters: { parent: doc.pos_profile },
};
});
frm.set_query("pos_opening_entry", function (doc) {
return { filters: { status: "Open", docstatus: 1 } };
});

View File

@@ -159,15 +159,16 @@
"language",
"column_break_84",
"select_print_heading",
"utm_analytics_section",
"utm_source",
"utm_medium",
"column_break_bhao",
"utm_campaign",
"more_information",
"inter_company_invoice_reference",
"customer_group",
"is_discounted",
"col_break23",
"utm_source",
"utm_campaign",
"utm_medium",
"column_break_gpiw",
"status",
"more_info",
"debit_to",
@@ -1541,10 +1542,6 @@
"fieldtype": "Check",
"label": "Update Billed Amount in Delivery Note"
},
{
"fieldname": "column_break_gpiw",
"fieldtype": "Column Break"
},
{
"fieldname": "utm_medium",
"fieldtype": "Link",
@@ -1610,13 +1607,24 @@
"hidden": 1,
"label": "Item Wise Tax Details",
"no_copy": 1,
"options": "Item Wise Tax Detail"
"options": "Item Wise Tax Detail",
"print_hide": 1
},
{
"collapsible": 1,
"fieldname": "utm_analytics_section",
"fieldtype": "Section Break",
"label": "UTM Analytics"
},
{
"fieldname": "column_break_bhao",
"fieldtype": "Column Break"
}
],
"icon": "fa fa-file-text",
"is_submittable": 1,
"links": [],
"modified": "2025-08-04 22:22:31.471752",
"modified": "2026-02-10 14:23:07.181782",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Invoice",

View File

@@ -539,6 +539,7 @@ class TestPOSInvoice(IntegrationTestCase):
rate=1000,
serial_no=[serial_nos[0]],
do_not_save=1,
ignore_sabb_validation=True,
)
pos2.append("payments", {"mode_of_payment": "Bank Draft", "amount": 1000})
@@ -897,6 +898,53 @@ class TestPOSInvoice(IntegrationTestCase):
if batch.batch_no == batch_no and batch.warehouse == "_Test Warehouse - _TC":
self.assertEqual(batch.qty, 5)
def test_pos_batch_reservation_with_return_qty(self):
"""
Test POS Invoice reserved qty for batch without bundle with return invoices.
"""
from erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle import (
get_auto_batch_nos,
)
from erpnext.stock.doctype.stock_reconciliation.test_stock_reconciliation import (
create_batch_item_with_batch,
)
create_batch_item_with_batch("_Batch Item Reserve Return", "TestBatch-RR 01")
se = make_stock_entry(
target="_Test Warehouse - _TC",
item_code="_Batch Item Reserve Return",
qty=30,
basic_rate=100,
)
se.reload()
batch_no = get_batch_from_bundle(se.items[0].serial_and_batch_bundle)
# POS Invoice for the batch without bundle
pos_inv = create_pos_invoice(item="_Batch Item Reserve Return", rate=300, qty=15, do_not_save=1)
pos_inv.append(
"payments",
{"mode_of_payment": "Cash", "amount": 4500},
)
pos_inv.items[0].batch_no = batch_no
pos_inv.save()
pos_inv.submit()
# POS Invoice return
pos_return = make_sales_return(pos_inv.name)
pos_return.insert()
pos_return.submit()
batches = get_auto_batch_nos(
frappe._dict({"item_code": "_Batch Item Reserve Return", "warehouse": "_Test Warehouse - _TC"})
)
for batch in batches:
if batch.batch_no == batch_no and batch.warehouse == "_Test Warehouse - _TC":
self.assertEqual(batch.qty, 30)
def test_pos_batch_item_qty_validation(self):
from erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle import (
BatchNegativeStockError,
@@ -1016,6 +1064,7 @@ class TestPOSInvoice(IntegrationTestCase):
qty=1,
rate=100,
do_not_submit=True,
ignore_sabb_validation=True,
)
self.assertRaises(frappe.ValidationError, pos_inv.submit)
@@ -1157,6 +1206,7 @@ def create_pos_invoice(**args):
"posting_time": pos_inv.posting_time,
"type_of_transaction": type_of_transaction,
"do_not_submit": True,
"ignore_sabb_validation": args.ignore_sabb_validation,
}
)
).name

View File

@@ -12,9 +12,6 @@
"disabled",
"column_break_9",
"warehouse",
"utm_source",
"utm_campaign",
"utm_medium",
"company_address",
"section_break_15",
"applicable_for_users",
@@ -61,7 +58,13 @@
"accounting_dimensions_section",
"cost_center",
"dimension_col_break",
"project"
"project",
"utm_analytics_section",
"utm_source",
"column_break_tvls",
"utm_campaign",
"column_break_xygw",
"utm_medium"
],
"fields": [
{
@@ -430,6 +433,20 @@
"fieldname": "allow_partial_payment",
"fieldtype": "Check",
"label": "Allow Partial Payment"
},
{
"fieldname": "column_break_tvls",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_xygw",
"fieldtype": "Column Break"
},
{
"collapsible": 1,
"fieldname": "utm_analytics_section",
"fieldtype": "Section Break",
"label": "Campaign"
}
],
"grid_page_length": 50,
@@ -458,7 +475,7 @@
"link_fieldname": "pos_profile"
}
],
"modified": "2025-06-24 11:19:19.834905",
"modified": "2026-02-10 14:24:48.597412",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Profile",

View File

@@ -99,8 +99,7 @@ def get_customers_list(pos_profile=None):
return (
frappe.db.sql(
f""" select name, customer_name, customer_group,
territory, customer_pos_id from tabCustomer where disabled = 0
f""" select name, customer_name, customer_group, territory from tabCustomer where disabled = 0
and {cond}""",
tuple(customer_groups),
as_dict=1,

View File

@@ -6,6 +6,8 @@
"engine": "InnoDB",
"field_order": [
"invoice_type",
"column_break_vwwt",
"post_change_gl_entries",
"section_break_gyos",
"invoice_fields",
"pos_search_fields"
@@ -34,11 +36,24 @@
{
"fieldname": "section_break_gyos",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_vwwt",
"fieldtype": "Column Break"
},
{
"default": "0",
"description": "If enabled, ledger entries will be posted for change amount in POS transactions",
"fieldname": "post_change_gl_entries",
"fieldtype": "Check",
"label": "Create Ledger Entries for Change Amount",
"options": "1"
}
],
"hide_toolbar": 1,
"issingle": 1,
"links": [],
"modified": "2025-06-06 11:36:44.885353",
"modified": "2026-01-09 17:30:41.476806",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Settings",

View File

@@ -23,6 +23,7 @@ class POSSettings(Document):
invoice_fields: DF.Table[POSField]
invoice_type: DF.Literal["Sales Invoice", "POS Invoice"]
pos_search_fields: DF.Table[POSSearchFields]
post_change_gl_entries: DF.Check
# end: auto-generated types
def validate(self):

Some files were not shown because too many files have changed in this diff Show More