Compare commits

..

1524 Commits

Author SHA1 Message Date
Frappe PR Bot
9febca2981 chore(release): Bumped to Version 15.65.1
## [15.65.1](https://github.com/frappe/erpnext/compare/v15.65.0...v15.65.1) (2025-06-11)

### Bug Fixes

* unpack non-iterable NoneType object error ([f92b5b9](f92b5b9a2e))
2025-06-11 12:51:34 +00:00
Sagar Vora
62efd09f2f Merge pull request #48021 from frappe/mergify/bp/version-15/pr-48019
fix: unpack non-iterable NoneType object error in patch (backport #48019)
2025-06-11 12:50:06 +00:00
priyanshshah2442
f92b5b9a2e fix: unpack non-iterable NoneType object error
(cherry picked from commit 7d940faa4f)
2025-06-11 12:49:17 +00:00
Frappe PR Bot
dc8bb792d7 chore(release): Bumped to Version 15.65.0
# [15.65.0](https://github.com/frappe/erpnext/compare/v15.64.1...v15.65.0) (2025-06-10)

### Bug Fixes

* add .length in list validation ([#47974](https://github.com/frappe/erpnext/issues/47974)) ([66f41d4](66f41d44c4))
* add change log for bug fix in Additional Discount functionality ([f27e591](f27e591d88))
* add draft transactions also in calculated mismatch report ([23b5d2d](23b5d2db2c))
* add user permission while fetching ple ([a2cdd91](a2cdd91a0d))
* **asset:** make purchase date mandatory ([a5e5553](a5e5553520))
* AttributeError due to incorrect object ([43d4e26](43d4e26ac5))
* available qty in BOM Stock Report ([84b2f87](84b2f871ba))
* better description of tab name ([#44697](https://github.com/frappe/erpnext/issues/44697)) ([d05b49b](d05b49b0f8))
* changes in report ([78c6386](78c63869e0))
* changes to report and patch ([5237ff8](5237ff8d94))
* conflicts ([aa29c5d](aa29c5dde2))
* consider expired batches in the stock reco (backport [#47909](https://github.com/frappe/erpnext/issues/47909)) ([#47919](https://github.com/frappe/erpnext/issues/47919)) ([2e78e14](2e78e14c7e))
* consider user permission while populating the data ([617b065](617b0658b8))
* do not create repeat work orders ([795108c](795108c1dd))
* do not remove item which has zero qty and zero valuation ([ef77791](ef77791bd6))
* ensure proper float conversion for discount values ([d24c2c4](d24c2c4cca))
* fetch correct item tax template on item rate update ([#47973](https://github.com/frappe/erpnext/issues/47973)) ([f88e682](f88e68230a))
* fieldtype to Currency for discount amounts ([59dd5fe](59dd5fee26))
* incorrect warehouse in MR ([8156d89](8156d89903))
* key-error for COGS By Item Group report (backport [#47914](https://github.com/frappe/erpnext/issues/47914)) ([#47915](https://github.com/frappe/erpnext/issues/47915)) ([996fb75](996fb7552a))
* patch to set discount percentange in case of mismatch ([039c47e](039c47e3f2))
* pos permission error on strict permission (backport [#47896](https://github.com/frappe/erpnext/issues/47896)) ([#47897](https://github.com/frappe/erpnext/issues/47897)) ([0314a39](0314a39fab))
* Project argument is passed correctly for MR creation ([e98ad4c](e98ad4ce27))
* remove currency col ([35035c2](35035c2a31))
* remove use sales invoice check ([#47908](https://github.com/frappe/erpnext/issues/47908)) ([1b15507](1b1550708d))
* **report:** include descendants when filtering by parent item group ([d21bfa2](d21bfa219d))
* **sales order:** error message on creation of work order from sales order ([129cd7a](129cd7ae8a))
* stock adjustment entry during reposting (backport [#47878](https://github.com/frappe/erpnext/issues/47878)) ([#47883](https://github.com/frappe/erpnext/issues/47883)) ([e5d06f8](e5d06f8c86))
* stock reco qty with inventory dimension (backport [#47918](https://github.com/frappe/erpnext/issues/47918)) ([#47922](https://github.com/frappe/erpnext/issues/47922)) ([6d2c14c](6d2c14c75e))
* test case to verify correct setting of discount amount and percentage ([06ea957](06ea957ae5))
* throw permission error ([#47976](https://github.com/frappe/erpnext/issues/47976)) ([9167d2e](9167d2ef64))
* typo ([8b4824f](8b4824fef5))
* update currency based on transaction ([eaeb18c](eaeb18c651))
* zero division error in purchase receipt ([b99f8fd](b99f8fd021))

### Features

* Add hook to update gl dict by apps ([76c2477](76c2477d23))
* add validation for inter company transactions ([9a47c50](9a47c507c0))
* populate Timer dialog project field from Timesheet parent_project (backport [#47971](https://github.com/frappe/erpnext/issues/47971)) ([#48001](https://github.com/frappe/erpnext/issues/48001)) ([66b0426](66b0426155))
* report to verify discount amount mismatch ([b3eb49d](b3eb49d39d))

### Performance Improvements

* Batch GLE/SLE rename commits (backport [#47950](https://github.com/frappe/erpnext/issues/47950)) ([#47951](https://github.com/frappe/erpnext/issues/47951)) ([f490de9](f490de9285))

### Reverts

* Revert "fix: calculate discount percentage if discount amount is specified (#…" ([5a5449c](5a5449c60c))
2025-06-10 14:33:55 +00:00
ruthra kumar
bd11146f02 Merge pull request #47996 from frappe/version-15-hotfix
chore: release v15
2025-06-10 20:02:19 +05:30
rohitwaghchaure
33f1d7a5fe Merge pull request #48004 from frappe/mergify/bp/version-15-hotfix/pr-47998
fix: incorrect warehouse in MR (backport #47998)
2025-06-10 18:41:17 +05:30
rohitwaghchaure
60de0474a1 chore: fix conflicts 2025-06-10 18:19:27 +05:30
Rohit Waghchaure
8156d89903 fix: incorrect warehouse in MR
(cherry picked from commit 2b9ca79291)

# Conflicts:
#	erpnext/manufacturing/doctype/production_plan/production_plan.py
2025-06-10 12:41:26 +00:00
mergify[bot]
66b0426155 feat: populate Timer dialog project field from Timesheet parent_project (backport #47971) (#48001)
feat: populate Timer dialog project field from Timesheet parent_project (#47971)

* feat: default parent project in timer dialog > project

* chore: fix formatting

* fix: remove unnecessary or condition

---------


(cherry picked from commit bc87609264)

Co-authored-by: Rahul Agrawal <12agrawalrahul@gmail.com>
Co-authored-by: Rahul Agrawal <deathstarconsole@Rahuls-MacBook-Air.local>
2025-06-10 18:07:28 +05:30
rohitwaghchaure
60b12b8319 Merge pull request #47992 from frappe/mergify/bp/version-15-hotfix/pr-47969
fix: do not create repeat work orders (backport #47969)
2025-06-10 16:40:54 +05:30
ruthra kumar
112d40db22 Merge pull request #47994 from frappe/mergify/bp/version-15-hotfix/pr-47981
refactor(Work Order): query_sales_order (backport #47981)
2025-06-10 15:01:09 +05:30
ruthra kumar
0d0b05bf6c Merge pull request #47991 from frappe/mergify/bp/version-15-hotfix/pr-47923
fix: update currency based on transaction (backport #47923)
2025-06-10 14:42:05 +05:30
rohitwaghchaure
c2d7e8c471 chore: fix conflicts 2025-06-10 14:38:18 +05:30
rohitwaghchaure
ccb0f7ac42 chore: fix conflicts 2025-06-10 14:36:31 +05:30
rohitwaghchaure
781b66e252 chore: fix conflicts 2025-06-10 14:35:23 +05:30
barredterra
efd3b1c966 refactor(Work Order): query_sales_order
- Use `get_list` instead of `db.sql_list`

    The method is used for setting link options in the frontend and the Link field doesn't ignore permissions, so get_list should be fine here.

- Added type hints to enable argument validation

(cherry picked from commit 2dbdacf905)
2025-06-10 09:03:18 +00:00
Rohit Waghchaure
795108c1dd fix: do not create repeat work orders
(cherry picked from commit 384f4e120a)

# Conflicts:
#	erpnext/manufacturing/doctype/production_plan/production_plan.js
#	erpnext/manufacturing/doctype/production_plan/test_production_plan.py
#	erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.json
2025-06-10 09:00:27 +00:00
rohitwaghchaure
7348778220 Merge pull request #47941 from frappe/mergify/bp/version-15-hotfix/pr-47888
fix: do not remove item which has zero qty and zero valuation (backport #47888)
2025-06-10 14:29:54 +05:30
DHINESH00
eaeb18c651 fix: update currency based on transaction
(cherry picked from commit fc4f38eed1)
2025-06-10 08:56:37 +00:00
rohitwaghchaure
78607b5812 Merge pull request #47987 from frappe/mergify/bp/version-15-hotfix/pr-47942
fix: available qty in BOM Stock Report (backport #47942)
2025-06-10 14:02:43 +05:30
Sagar Vora
823cfeaf4f Merge pull request #47978 from frappe/mergify/bp/version-15-hotfix/pr-47976
fix: throw permission error (backport #47976)
2025-06-10 07:37:10 +00:00
Sagar Vora
aa29c5dde2 fix: conflicts 2025-06-10 13:05:37 +05:30
ruthra kumar
713b17c3a5 Merge pull request #47990 from frappe/mergify/bp/version-15-hotfix/pr-47989
fix: Include draft transactions in the `Calculated Discount Mismatch` report (backport #47989)
2025-06-10 12:58:05 +05:30
priyanshshah2442
23b5d2db2c fix: add draft transactions also in calculated mismatch report
(cherry picked from commit 4e1abc1814)
2025-06-10 07:12:03 +00:00
Rohit Waghchaure
84b2f871ba fix: available qty in BOM Stock Report
(cherry picked from commit ea689bbe3f)
2025-06-10 06:50:51 +00:00
Sagar Vora
ac78bfb55b Merge pull request #47985 from frappe/mergify/bp/version-15-hotfix/pr-47946
fix: patch and report for incorrect discount values (backport #47946)
2025-06-10 06:10:23 +00:00
priyanshshah2442
59dd5fee26 fix: fieldtype to Currency for discount amounts
(cherry picked from commit f781a39dbe)
2025-06-10 06:04:09 +00:00
Sagar Vora
35035c2a31 fix: remove currency col
(cherry picked from commit 9bf9b34ac4)
2025-06-10 06:04:08 +00:00
Sagar Vora
78c63869e0 fix: changes in report
(cherry picked from commit 33e793354c)
2025-06-10 06:04:08 +00:00
priyanshshah2442
06ea957ae5 fix: test case to verify correct setting of discount amount and percentage
(cherry picked from commit 3f0c5be5d9)
2025-06-10 06:04:08 +00:00
priyanshshah2442
f27e591d88 fix: add change log for bug fix in Additional Discount functionality
(cherry picked from commit 9120927a65)
2025-06-10 06:04:08 +00:00
priyanshshah2442
d24c2c4cca fix: ensure proper float conversion for discount values
(cherry picked from commit 3dcb801a37)
2025-06-10 06:04:07 +00:00
Sagar Vora
5237ff8d94 fix: changes to report and patch
(cherry picked from commit daad6137f8)
2025-06-10 06:04:07 +00:00
priyanshshah2442
b3eb49d39d feat: report to verify discount amount mismatch
(cherry picked from commit 62dd6df24f)
2025-06-10 06:04:07 +00:00
priyanshshah2442
039c47e3f2 fix: patch to set discount percentange in case of mismatch
(cherry picked from commit f7eda8a156)
2025-06-10 06:04:06 +00:00
ruthra kumar
7ecb4d3d6f Merge pull request #47968 from aerele/validate-intercompany-rate
Add validation for inter company transactions rate
2025-06-10 11:12:26 +05:30
ruthra kumar
76a9e45ff8 Merge pull request #47982 from frappe/mergify/bp/version-15-hotfix/pr-47974
fix: add .length in list validation (backport #47974)
2025-06-10 10:25:21 +05:30
ruthra kumar
c69a0f150d Merge pull request #47934 from thomasantony12/so_bug_on_wo
fix(sales order): error message on creation of work order from sales order
2025-06-10 10:19:33 +05:30
l0gesh29
66f41d44c4 fix: add .length in list validation (#47974)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
(cherry picked from commit c8cec8cedf)
2025-06-09 23:16:36 +00:00
Khushi Rawat
7393a9f470 Merge pull request #47980 from frappe/mergify/bp/version-15-hotfix/pr-47979
fix: AttributeError due to incorrect object (backport #47979)
2025-06-10 00:31:45 +05:30
Khushi Rawat
43d4e26ac5 fix: AttributeError due to incorrect object
(cherry picked from commit 351796bce6)
2025-06-09 18:46:03 +00:00
Aayush Dalal
9167d2ef64 fix: throw permission error (#47976)
Co-authored-by: Sagar Vora <16315650+sagarvora@users.noreply.github.com>
(cherry picked from commit 8b6a8d0c4f)

# Conflicts:
#	erpnext/stock/utils.py
2025-06-09 17:29:58 +00:00
Diptanil Saha
f88e68230a fix: fetch correct item tax template on item rate update (#47973) 2025-06-09 19:23:33 +05:30
ravibharathi656
3aee14176c test: pass sales invoice name instead of doc 2025-06-09 19:12:51 +05:30
ravibharathi656
d6796da464 test: add unit test for inter company transaction rate validation 2025-06-09 19:12:51 +05:30
ravibharathi656
9a47c507c0 feat: add validation for inter company transactions 2025-06-09 19:12:51 +05:30
ruthra kumar
95d1d7047d Merge pull request #47967 from frappe/mergify/bp/version-15-hotfix/pr-47865
fix: consider user permission while populating the data (backport #47865)
2025-06-09 15:41:37 +05:30
l0gesh29
a2cdd91a0d fix: add user permission while fetching ple
(cherry picked from commit 1a4bb30923)
2025-06-09 09:53:13 +00:00
l0gesh29
617b0658b8 fix: consider user permission while populating the data
(cherry picked from commit 074dc6d7dd)
2025-06-09 09:53:13 +00:00
Khushi Rawat
d8e9ed417d Merge pull request #47943 from frappe/mergify/bp/version-15-hotfix/pr-47547
fix(asset): make purchase date mandatory (backport #47547)
2025-06-09 14:48:57 +05:30
ruthra kumar
eb7eadc16f Merge pull request #47590 from FathihMohammed/show_descedants
fix(report): include descendants when filtering by parent item group
2025-06-09 13:31:41 +05:30
FATHIH MOHAMMED
d21bfa219d fix(report): include descendants when filtering by parent item group 2025-06-09 11:54:32 +05:30
ruthra kumar
198089cac1 Merge pull request #47958 from frappe/mergify/bp/version-15-hotfix/pr-44697
fix: better description of tab name (backport #44697)
2025-06-09 10:17:31 +05:30
mahsem
d05b49b0f8 fix: better description of tab name (#44697)
(cherry picked from commit 6119d4384a)
2025-06-08 20:15:11 +00:00
mergify[bot]
f490de9285 perf: Batch GLE/SLE rename commits (backport #47950) (#47951)
perf: Batch GLE/SLE rename commits (#47950)

(cherry picked from commit bb693c0a4f)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-06-06 21:00:49 +05:30
RAVIBHARATHI P C
a5e5553520 fix(asset): make purchase date mandatory
(cherry picked from commit e6f47be4b0)
2025-06-06 12:10:43 +00:00
rohitwaghchaure
ea393ef008 chore: fix conflicts 2025-06-06 15:38:10 +05:30
Rohit Waghchaure
ef77791bd6 fix: do not remove item which has zero qty and zero valuation
(cherry picked from commit 86e4a658a5)

# Conflicts:
#	erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
2025-06-06 10:03:14 +00:00
Frappe PR Bot
63d165c48a chore(release): Bumped to Version 15.64.1
## [15.64.1](https://github.com/frappe/erpnext/compare/v15.64.0...v15.64.1) (2025-06-06)

### Reverts

* Revert "fix: calculate discount percentage if discount amount is specified (#…" ([29d7593](29d7593fa7))
2025-06-06 07:07:12 +00:00
thomasantony12
129cd7ae8a fix(sales order): error message on creation of work order from sales order 2025-06-06 12:36:30 +05:30
Sagar Vora
83a57909d3 Merge pull request #47933 from frappe/mergify/bp/version-15/pr-47927
fix: calculate discount percentage if discount amount is specified" (backport #47927)
2025-06-06 07:05:40 +00:00
Sagar Vora
29d7593fa7 Revert "fix: calculate discount percentage if discount amount is specified (#…"
This reverts commit bb474f4f42.

(cherry picked from commit 27dc0f5b70)
2025-06-06 07:05:26 +00:00
Sagar Vora
a8e1c4f6cd Merge pull request #47928 from frappe/mergify/bp/version-15-hotfix/pr-47927
fix: calculate discount percentage if discount amount is specified" (backport #47927)
2025-06-06 06:07:35 +00:00
Sagar Vora
5a5449c60c Revert "fix: calculate discount percentage if discount amount is specified (#…"
This reverts commit bb474f4f42.

(cherry picked from commit 27dc0f5b70)
2025-06-06 06:07:15 +00:00
mergify[bot]
6d2c14c75e fix: stock reco qty with inventory dimension (backport #47918) (#47922)
fix: stock reco qty with inventory dimension (#47918)

(cherry picked from commit 342cebc778)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-06-06 09:51:23 +05:30
mergify[bot]
2e78e14c7e fix: consider expired batches in the stock reco (backport #47909) (#47919)
fix: consider expired batches in the stock reco (#47909)

(cherry picked from commit 8fa3473945)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-06-05 17:35:23 +05:30
mergify[bot]
996fb7552a fix: key-error for COGS By Item Group report (backport #47914) (#47915)
fix: key-error for COGS By Item Group report (#47914)

fix: keyerror for COGS By Item Group report
(cherry picked from commit 997ce4eaa7)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-06-05 17:18:30 +05:30
Deepesh Garg
04349b61bd Merge pull request #47917 from frappe/mergify/bp/version-15-hotfix/pr-47907
feat: Add hook to update gl dict by apps (backport #47907)
2025-06-05 16:51:20 +05:30
Deepesh Garg
d3202068d9 style: Linting issues
(cherry picked from commit c4aecb15ce)
2025-06-05 11:03:52 +00:00
Deepesh Garg
76c2477d23 feat: Add hook to update gl dict by apps
(cherry picked from commit 10ff369ff2)
2025-06-05 11:03:51 +00:00
Diptanil Saha
1b1550708d fix: remove use sales invoice check (#47908) 2025-06-05 14:08:37 +05:30
ruthra kumar
425674e164 Merge pull request #47906 from frappe/mergify/bp/version-15-hotfix/pr-47665
fix: Project argument is not passed correctly for MR creation (backport #47665)
2025-06-05 11:53:22 +05:30
Syed Mujeer Hashmi
e98ad4ce27 fix: Project argument is passed correctly for MR creation
(cherry picked from commit 9eab434ae8)
2025-06-05 06:21:32 +00:00
mergify[bot]
0314a39fab fix: pos permission error on strict permission (backport #47896) (#47897)
fix: pos permission error on strict permission (#47896)

(cherry picked from commit bb903a4bef)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-06-04 16:11:07 +05:30
mergify[bot]
e5d06f8c86 fix: stock adjustment entry during reposting (backport #47878) (#47883)
fix: stock adjustment entry during reposting (#47878)

fix: stock adjustment entry
(cherry picked from commit cbcd580daa)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-06-04 12:51:10 +05:30
ruthra kumar
fb5d60eeb6 Merge pull request #47873 from frappe/mergify/bp/version-15-hotfix/pr-47872
fix: typo (backport #47872)
2025-06-03 19:49:47 +05:30
Mihir Kandoi
8d7be8a536 Merge pull request #47876 from frappe/mergify/bp/version-15-hotfix/pr-47874 2025-06-03 19:09:52 +05:30
Mihir Kandoi
b99f8fd021 fix: zero division error in purchase receipt
(cherry picked from commit 32229fb646)
2025-06-03 13:09:28 +00:00
Ayush Marhatta
8b4824fef5 fix: typo
(cherry picked from commit a243abb5fd)
2025-06-03 12:09:06 +00:00
Frappe PR Bot
916511ef1a chore(release): Bumped to Version 15.64.0
# [15.64.0](https://github.com/frappe/erpnext/compare/v15.63.0...v15.64.0) (2025-06-03)

### Bug Fixes

* Accounts receivable shouldn't fetch DN for employees ([9f5cfdd](9f5cfdd65b))
* add company filter to cost center and project in process statement of accounts ([5ebf1b9](5ebf1b9cc4))
* add internal link field in Sales Order connections for internal transactions ([3c697e9](3c697e90a3))
* calculate discount percentage if discount amount is specified ([#47806](https://github.com/frappe/erpnext/issues/47806)) ([ba8a316](ba8a316b06))
* cash flow report fixes ([4a1966c](4a1966c680))
* check return_against exists before api call ([8623a56](8623a5650b))
* decimal issue ([#47839](https://github.com/frappe/erpnext/issues/47839)) ([34b62d2](34b62d226c))
* ensure backend response is awaited before saving ([5a23d7c](5a23d7cdca))
* GL entries for rejected returned materials ([#47612](https://github.com/frappe/erpnext/issues/47612)) ([5bac652](5bac652b5f))
* Handle duplicate Items qty in Quotation ([4c1b415](4c1b415b9d))
* improved indexing for SLE queries. (backport [#47194](https://github.com/frappe/erpnext/issues/47194)) ([#47822](https://github.com/frappe/erpnext/issues/47822)) ([3879cbd](3879cbd86d))
* incorrect actual qty in product bundle balance report (backport [#47791](https://github.com/frappe/erpnext/issues/47791)) ([#47814](https://github.com/frappe/erpnext/issues/47814)) ([9df3b9b](9df3b9b059))
* **Timesheet:** Only update to_time if it's more than 1 second off ([#47702](https://github.com/frappe/erpnext/issues/47702)) ([470534a](470534af78))
* use `query.walk() `for escaping special chars in receiable/payable report ([2e3ebec](2e3ebec53c))
* use user default for company instead of global default in purchase order analysis report ([7d828dc](7d828dc17e))

### Features

* add column "Item Name" to "BOM Stock Report" (backport [#47116](https://github.com/frappe/erpnext/issues/47116)) ([#47485](https://github.com/frappe/erpnext/issues/47485)) ([9192913](9192913832))
* allow to set valuation rate for Rejected Materials (backport [#47582](https://github.com/frappe/erpnext/issues/47582)) ([#47869](https://github.com/frappe/erpnext/issues/47869)) ([3582b32](3582b32f03))
* show item name for raw materials in BOM creator ([0c612be](0c612be6fe))
* specify expense account and cost center for raw materials in Su… (backport [#47756](https://github.com/frappe/erpnext/issues/47756)) ([#47861](https://github.com/frappe/erpnext/issues/47861)) ([01dd733](01dd7337a2))
2025-06-03 11:54:42 +00:00
ruthra kumar
c614ff419b Merge pull request #47868 from frappe/version-15-hotfix
chore: release v15
2025-06-03 17:23:19 +05:30
ruthra kumar
d5163ed502 Merge pull request #47870 from frappe/mergify/bp/version-15-hotfix/pr-47612
fix: GL entries for rejected returned materials (backport #47612)
2025-06-03 16:45:02 +05:30
rohitwaghchaure
5bac652b5f fix: GL entries for rejected returned materials (#47612)
(cherry picked from commit 3e098da01f)
2025-06-03 10:57:14 +00:00
mergify[bot]
3582b32f03 feat: allow to set valuation rate for Rejected Materials (backport #47582) (#47869)
feat: allow to set valuation rate for Rejected Materials (#47582)

(cherry picked from commit ca0e53dd78)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-06-03 16:25:53 +05:30
ruthra kumar
2815a0d827 Merge pull request #47864 from frappe/mergify/bp/version-15-hotfix/pr-47854
fix: use user default for company instead of global default in purchase order analysis report (backport #47854)
2025-06-03 13:22:23 +05:30
Ayush Marhatta
7d828dc17e fix: use user default for company instead of global default in purchase order analysis report
(cherry picked from commit 49f23513e0)
2025-06-03 07:48:19 +00:00
mergify[bot]
01dd7337a2 feat: specify expense account and cost center for raw materials in Su… (backport #47756) (#47861) 2025-06-03 12:28:12 +05:30
Marc Ramser
470534af78 fix(Timesheet): Only update to_time if it's more than 1 second off (#47702)
* Fix: Only update to_time if it's more than 1 second off

Before, to_time was updated even when it was almost the same as the expected time (like 17:20 vs 17:19:59.998). This causes problems because of small rounding errors and caused valid times like 17:20 to be reset. Now, to_time is only updated if the difference is greater than 1 second.

To reproduce the current error:
* From Time 09:00:00
* To Time 17:20:00
Save 
To Time is 17:19:59

* Update erpnext/projects/doctype/timesheet/timesheet.py

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>

* Update timesheet.py

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-06-03 11:59:13 +05:30
ruthra kumar
a4fe89f65c Merge pull request #47860 from frappe/mergify/bp/version-15-hotfix/pr-47809
fix: cash flow report fixes (backport #47809)
2025-06-03 11:47:50 +05:30
Lakshit Jain
4a1966c680 fix: cash flow report fixes
(cherry picked from commit 20b87512d1)
2025-06-03 05:53:23 +00:00
ruthra kumar
cd7462dd87 Merge pull request #47852 from frappe/mergify/bp/version-15-hotfix/pr-47780
fix: add internal link field in Sales Order connections for internal … (backport #47780)
2025-06-03 09:59:31 +05:30
Karuppasamy923
3c697e90a3 fix: add internal link field in Sales Order connections for internal transactions
(cherry picked from commit e3e6503076)
2025-06-02 11:17:45 +00:00
ruthra kumar
6dde327713 Merge pull request #47849 from frappe/mergify/bp/version-15-hotfix/pr-47502
fix: Handle duplicate Items qty in Quotation (backport #47502)
2025-06-02 15:11:46 +05:30
ruthra kumar
16b10274cf Merge pull request #47840 from frappe/mergify/bp/version-15-hotfix/pr-47839
fix: decimal issue (backport #47839)
2025-06-02 14:51:08 +05:30
Abdeali Chharchhodawala
4c1b415b9d fix: Handle duplicate Items qty in Quotation
fix: Handle duplicate Items qty in Quotation
(cherry picked from commit 39f6d8ffb6)
2025-06-02 09:20:41 +00:00
ruthra kumar
d7124779bf Merge pull request #47842 from frappe/mergify/bp/version-15-hotfix/pr-47821
Accounts receivable show delivery note (backport #47821)
2025-06-02 14:02:05 +05:30
ruthra kumar
053a5b93ca Merge pull request #47844 from frappe/mergify/bp/version-15-hotfix/pr-47781
fix: add company filter to cost center and project in process statement of accounts (backport #47781)
2025-06-02 13:41:21 +05:30
l0gesh29
9f5cfdd65b fix: Accounts receivable shouldn't fetch DN for employees
* fix: reorder function call

* fix: Add condition to fetch return entries for specific party types

(cherry picked from commit c8e052f3c6)
2025-06-02 13:40:20 +05:30
ljain112
5ebf1b9cc4 fix: add company filter to cost center and project in process statement of accounts
(cherry picked from commit 14313b162a)
2025-06-02 08:08:42 +00:00
rohitwaghchaure
34b62d226c fix: decimal issue (#47839)
(cherry picked from commit 0dbd9efc91)
2025-06-02 07:55:28 +00:00
Mihir Kandoi
9bf8904c80 Merge pull request #47832 from frappe/mergify/bp/version-15-hotfix/pr-47806 2025-05-31 21:18:29 +05:30
Mihir Kandoi
ba8a316b06 fix: calculate discount percentage if discount amount is specified (#47806)
(cherry picked from commit bb474f4f42)
2025-05-31 15:23:21 +00:00
mergify[bot]
3879cbd86d fix: improved indexing for SLE queries. (backport #47194) (#47822)
* fix: improved indexing for SLE queries. (#47194)

(cherry picked from commit b49a835b4c)

# Conflicts:
#	erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-30 15:36:51 +05:30
mergify[bot]
9df3b9b059 fix: incorrect actual qty in product bundle balance report (backport #47791) (#47814)
fix: incorrect actual qty in product bundle balance report (#47791)

(cherry picked from commit c544c3e018)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-30 14:01:32 +05:30
ruthra kumar
0131800df2 Merge pull request #47808 from frappe/mergify/bp/version-15-hotfix/pr-47794
fix: use `query.walk() `for escaping special chars in receiable/payable report (backport #47794)
2025-05-29 14:07:34 +05:30
ljain112
2e3ebec53c fix: use query.walk() for escaping special chars in receiable/payable report
(cherry picked from commit a0a51b5074)
2025-05-29 08:21:18 +00:00
mergify[bot]
ef9ccd7a57 chore: removed orphaned function (backport #47796) (#47804)
chore: removed orphaned function (#47796)

(cherry picked from commit cb9e6f6655)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-29 12:25:08 +05:30
Mihir Kandoi
903d9b50fe Merge pull request #47798 from frappe/mergify/bp/version-15-hotfix/pr-47792
feat: show item name for raw materials in BOM creator (backport #47792)
2025-05-28 20:28:51 +05:30
Mihir Kandoi
0c612be6fe feat: show item name for raw materials in BOM creator
(cherry picked from commit 90ba4ad1e1)
2025-05-28 14:23:24 +00:00
ruthra kumar
893a86e173 Merge pull request #47777 from frappe/mergify/bp/version-15-hotfix/pr-47041
fix: Check `return_against` and Await API Call (backport #47041)
2025-05-28 10:57:56 +05:30
Sanket322
5a23d7cdca fix: ensure backend response is awaited before saving
(cherry picked from commit c48db0b7c0)
2025-05-28 03:56:00 +00:00
Sanket322
8623a5650b fix: check return_against exists before api call
(cherry picked from commit 00b6b97197)
2025-05-28 03:56:00 +00:00
mergify[bot]
73bc57f53e Revert "fix: translate_pos_buttons" (backport #47773) (#47774)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
fix: translate_pos_buttons" (#47773)
2025-05-27 21:11:49 +02:00
mergify[bot]
9192913832 feat: add column "Item Name" to "BOM Stock Report" (backport #47116) (#47485)
Co-authored-by: Patrick Eißler <77415730+PatrickDEissler@users.noreply.github.com>
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-05-27 19:21:41 +02:00
Frappe PR Bot
f59093c6b7 chore(release): Bumped to Version 15.63.0
# [15.63.0](https://github.com/frappe/erpnext/compare/v15.62.0...v15.63.0) (2025-05-27)

### Bug Fixes

* absence of rounding causing discrepancy in the valuation rate calculation (backport [#47700](https://github.com/frappe/erpnext/issues/47700)) ([#47711](https://github.com/frappe/erpnext/issues/47711)) ([f41bcc6](f41bcc6fec))
* add no_copy for lost reasons ([db97dbd](db97dbd394))
* create Quality Inspection button not showing (backport [#47746](https://github.com/frappe/erpnext/issues/47746)) ([#47750](https://github.com/frappe/erpnext/issues/47750)) ([60dfe36](60dfe36195))
* display stock value in currency format in chart warehouse wise stock value ([ba009f4](ba009f4626))
* do not update same field twice ([63ba27e](63ba27e359))
* exchange rate not being fetched when creating supplier quotation from MR ([2c22615](2c22615b6b))
* filter of item for manufacture type material request (backport [#47712](https://github.com/frappe/erpnext/issues/47712)) ([#47717](https://github.com/frappe/erpnext/issues/47717)) ([2961e59](2961e595c2))
* handle multiselect filters for tree doctypes in Customer Ledger Summary Report ([f783bf6](f783bf60a4))
* Headline rendered twice on first save ([f94a14c](f94a14c06a))
* include rejected amount in PI/PR overbilling validation logic ([#47572](https://github.com/frappe/erpnext/issues/47572)) ([cd1c10a](cd1c10a43f))
* incorrect inventory dimension for material transfer (backport [#47592](https://github.com/frappe/erpnext/issues/47592)) ([#47644](https://github.com/frappe/erpnext/issues/47644)) ([9a78283](9a78283ecb))
* incorrect valuation rate due to positive qty (backport [#47686](https://github.com/frappe/erpnext/issues/47686)) ([#47688](https://github.com/frappe/erpnext/issues/47688)) ([62aa1cd](62aa1cdb33))
* linter ([c44493f](c44493fd7e))
* Linter (due to conflicts resolved on gh) ([37f4cf5](37f4cf5367))
* Linters ([91e167f](91e167fe72))
* made changes specifically for value adjustment entry ([74e29f1](74e29f1218))
* Merge conflicts ([3deb11e](3deb11e5b2))
* only include advances within the tcs period ([a2f5975](a2f5975133))
* party account based on party type's account type ([d3d22f6](d3d22f699e))
* patch to rename group_by filter in custom reports (backport [#47709](https://github.com/frappe/erpnext/issues/47709)) ([#47730](https://github.com/frappe/erpnext/issues/47730)) ([a137944](a137944955))
* patch to set status cancelled for already cancelled pos invoices (backport [#47725](https://github.com/frappe/erpnext/issues/47725)) ([#47759](https://github.com/frappe/erpnext/issues/47759)) ([4fd1af2](4fd1af2118))
* **portal:** User cannot create 0 qty SQ from RFQ ([f95a3f5](f95a3f5b8b))
* pos invoice status not updating on cancel (backport [#47556](https://github.com/frappe/erpnext/issues/47556)) ([#47657](https://github.com/frappe/erpnext/issues/47657)) ([db318a4](db318a4e9b))
* prettier ([0f22646](0f2264658f))
* prettier ([2c8db09](2c8db092a0))
* Relabel unit price settings for more clarity ([8891f46](8891f46a22))
* setting paid amount to 0 when is_paid is unchecked in purchase invoice ([895231a](895231a8a7))
* show general ledger in doc currency in Process Statement Of Accounts ([b3cbbf2](b3cbbf2ce3))
* skip drop ship items (backport [#47670](https://github.com/frappe/erpnext/issues/47670)) ([#47718](https://github.com/frappe/erpnext/issues/47718)) ([e058885](e05888502f))
* skip last purchase rate for free item (backport [#47693](https://github.com/frappe/erpnext/issues/47693)) ([#47696](https://github.com/frappe/erpnext/issues/47696)) ([f17b7b5](f17b7b5ee9))
* space ([fe78bb6](fe78bb60c4))
* space ([194e41a](194e41a2d9))
* translate_pos_buttons ([01b0d10](01b0d1057e))
* Treat rows as Unit Price rows only until the qty is 0 ([d963601](d9636018f5))
* typo in TREE_DOCTYPES list "Terrirtory" should be "Territory" ([3d2d1ba](3d2d1ba072))
* updated value after depreciation after value adjustment ([8ed6e98](8ed6e98565))
* use pypika object `LiteralValue` for adding match conditions ([fb2df77](fb2df77da2))

### Features

* add validation for Item Tax Template on rate change ([92d5e91](92d5e91e1f))
* Unit Price Contract ([33366fc](33366fce6c))
* Unit Price Items in Buying (RFQ, SQ, PO) ([f8fa775](f8fa775af3))
2025-05-27 14:56:33 +00:00
ruthra kumar
7ede5392bd Merge pull request #47758 from frappe/version-15-hotfix
chore: release v15
2025-05-27 20:24:59 +05:30
ruthra kumar
0f5c7d95a0 Merge pull request #47772 from frappe/mergify/bp/version-15-hotfix/pr-47766
fix: handle multiselect filters for tree doctypes in Customer Ledger Summary Report (backport #47766)
2025-05-27 20:09:05 +05:30
ljain112
f783bf60a4 fix: handle multiselect filters for tree doctypes in Customer Ledger Summary Report
(cherry picked from commit 536f7d5ff8)
2025-05-27 14:24:08 +00:00
ruthra kumar
4c49ab19d6 Merge pull request #47769 from frappe/mergify/bp/version-15-hotfix/pr-47765
fix: use pypika object `LiteralValue` for adding match conditions (backport #47765)
2025-05-27 19:52:20 +05:30
ruthra kumar
de1afee75a Merge pull request #47770 from frappe/mergify/bp/version-15-hotfix/pr-47767
fix: add no_copy for lost reasons (backport #47767)
2025-05-27 19:52:04 +05:30
l0gesh29
db97dbd394 fix: add no_copy for lost reasons
(cherry picked from commit 98e889a516)
2025-05-27 12:33:50 +00:00
ljain112
fb2df77da2 fix: use pypika object LiteralValue for adding match conditions
(cherry picked from commit 9093e5e363)
2025-05-27 12:31:16 +00:00
ruthra kumar
260073f14a Merge pull request #47764 from frappe/mergify/bp/version-15-hotfix/pr-47763
feat: add validation for Item Tax Template on rate change (backport #47763)
2025-05-27 17:14:54 +05:30
Karuppasamy923
92d5e91e1f feat: add validation for Item Tax Template on rate change
(cherry picked from commit a9a957edc7)
2025-05-27 11:30:15 +00:00
mergify[bot]
4fd1af2118 fix: patch to set status cancelled for already cancelled pos invoices (backport #47725) (#47759)
* fix: patch to set status cancelled for already cancelled pos invoices (#47725)

(cherry picked from commit 4d1d66e579)

# Conflicts:
#	erpnext/patches.txt

* chore: resolve conflict

---------

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-05-27 15:55:40 +05:30
Khushi Rawat
5997e37454 Merge pull request #47754 from khushi8112/asset-value-adjustment-of-zero-cost
fix: updated value after depreciation after value adjustment
2025-05-27 15:28:11 +05:30
Khushi Rawat
63ba27e359 fix: do not update same field twice 2025-05-27 15:10:51 +05:30
ruthra kumar
fd19f284c4 Merge pull request #47755 from frappe/mergify/bp/version-15-hotfix/pr-47679
fix: setting paid amount to 0 when is_paid is unchecked in purchase invoice (backport #47679)
2025-05-27 14:37:21 +05:30
Khushi Rawat
74e29f1218 fix: made changes specifically for value adjustment entry 2025-05-27 14:14:30 +05:30
ruthra kumar
5dee1d40ac Merge pull request #47753 from frappe/mergify/bp/version-15-hotfix/pr-47736
fix: only include advances within the tcs period (backport #47736)
2025-05-27 14:11:01 +05:30
ljain112
895231a8a7 fix: setting paid amount to 0 when is_paid is unchecked in purchase invoice
(cherry picked from commit e358a9e53f)
2025-05-27 08:32:33 +00:00
Khushi Rawat
8ed6e98565 fix: updated value after depreciation after value adjustment 2025-05-27 13:34:03 +05:30
ruthra kumar
70f9c13f3c Merge pull request #47751 from frappe/mergify/bp/version-15-hotfix/pr-47737
fix: party account based on party type's account type (backport #47737)
2025-05-27 13:31:39 +05:30
ljain112
a2f5975133 fix: only include advances within the tcs period
(cherry picked from commit 477ec9fdcc)
2025-05-27 07:49:19 +00:00
ljain112
d3d22f699e fix: party account based on party type's account type
(cherry picked from commit 19b1650522)
2025-05-27 07:44:13 +00:00
mergify[bot]
60dfe36195 fix: create Quality Inspection button not showing (backport #47746) (#47750)
fix: create Quality Inspection button not showing (#47746)

(cherry picked from commit d8cb073eaf)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-27 13:06:32 +05:30
ruthra kumar
b9698366c3 Merge pull request #47747 from frappe/mergify/bp/version-15-hotfix/pr-47654
fix: show general ledger in doc currency in Process Statement Of Accounts (backport #47654)
2025-05-27 12:01:48 +05:30
ruthra kumar
1fb4ac44fe Merge pull request #47748 from frappe/mergify/bp/version-15-hotfix/pr-47659
fix: translate_pos_buttons (backport #47659)
2025-05-27 11:52:27 +05:30
mahsem
0f2264658f fix: prettier
(cherry picked from commit 2839fc9460)
2025-05-27 06:12:19 +00:00
mahsem
fe78bb60c4 fix: space
(cherry picked from commit 50a5b51909)
2025-05-27 06:12:19 +00:00
mahsem
194e41a2d9 fix: space
(cherry picked from commit a442ec4e80)
2025-05-27 06:12:19 +00:00
mahsem
2c8db092a0 fix: prettier
(cherry picked from commit 1953c8489c)
2025-05-27 06:12:19 +00:00
mahsem
c44493fd7e fix: linter
(cherry picked from commit 4a6b5b9993)
2025-05-27 06:12:18 +00:00
mahsem
01b0d1057e fix: translate_pos_buttons
(cherry picked from commit ce45d1664d)
2025-05-27 06:12:18 +00:00
ljain112
9d2f396d75 chore: update test case because currency is auto set to system currency
(cherry picked from commit 22a94d6817)
2025-05-27 06:11:09 +00:00
ljain112
b3cbbf2ce3 fix: show general ledger in doc currency in Process Statement Of Accounts
(cherry picked from commit 998f6a29a4)
2025-05-27 06:11:09 +00:00
ruthra kumar
0cbb7223be Merge pull request #47742 from frappe/mergify/bp/version-15-hotfix/pr-47697
refactor: Fetch party name for contract (backport #47697)
2025-05-26 19:56:31 +05:30
ruthra kumar
c09b258d57 chore: resolve conflicts 2025-05-26 17:48:11 +05:30
ruthra kumar
d5d1a51b92 refactor: patch old contract with full party name
(cherry picked from commit 8e2221178b)

# Conflicts:
#	erpnext/patches.txt
2025-05-26 12:11:31 +00:00
ruthra kumar
9abac4c6df refactor: fetch party name on selection
(cherry picked from commit 752024e222)
2025-05-26 12:11:31 +00:00
ruthra kumar
48f786e493 refactor: full name field in contract
(cherry picked from commit 016924361a)

# Conflicts:
#	erpnext/crm/doctype/contract/contract.json
2025-05-26 12:11:30 +00:00
mergify[bot]
a137944955 fix: patch to rename group_by filter in custom reports (backport #47709) (#47730)
* fix: patch to rename group_by filter in custom reports

(cherry picked from commit 0d19c18c06)

# Conflicts:
#	erpnext/patches.txt

* fix: using python instead of sql query

(cherry picked from commit 48eccb1f73)

* chore: resolve conflict

---------

Co-authored-by: diptanilsaha <diptanil@frappe.io>
2025-05-26 13:29:41 +05:30
ruthra kumar
bb54bebe94 Merge pull request #47726 from frappe/mergify/bp/version-15-hotfix/pr-47253
fix: display stock value in currency format in chart warehouse wise stock value (backport #47253)
2025-05-26 11:35:46 +05:30
Prateek Karamchandani
ba009f4626 fix: display stock value in currency format in chart warehouse wise stock value
(cherry picked from commit 7a5cbc759c)
2025-05-26 05:49:56 +00:00
mergify[bot]
e05888502f fix: skip drop ship items (backport #47670) (#47718)
fix: skip drop ship items (#47670)

(cherry picked from commit 67c86ec028)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-26 07:53:55 +05:30
mergify[bot]
2961e595c2 fix: filter of item for manufacture type material request (backport #47712) (#47717)
fix: filter of item for manufacture type material request (#47712)

(cherry picked from commit 874750f9ce)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-25 20:51:14 +05:30
mergify[bot]
f41bcc6fec fix: absence of rounding causing discrepancy in the valuation rate calculation (backport #47700) (#47711)
fix: absence of rounding causing discrepancy in the valuation rate calculation (#47700)

(cherry picked from commit 1e8ed22421)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-24 17:27:20 +05:30
Marica
a6b1bdc78b Merge pull request #47410 from frappe/mergify/bp/version-15-hotfix/pr-46214
feat: Unit Price Items (backport #46214)
2025-05-23 17:42:33 +02:00
mergify[bot]
f17b7b5ee9 fix: skip last purchase rate for free item (backport #47693) (#47696)
fix: skip last purchase rate for free item (#47693)

(cherry picked from commit c3b17024bd)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-23 09:49:51 +05:30
ruthra kumar
5529a17831 Merge pull request #47685 from frappe/mergify/bp/version-15-hotfix/pr-47675
fix: typo in TREE_DOCTYPES list "Terrirtory" should be "Territory" (backport #47675)
2025-05-22 16:25:15 +05:30
mergify[bot]
62aa1cdb33 fix: incorrect valuation rate due to positive qty (backport #47686) (#47688)
fix: incorrect valuation rate due to positive qty (#47686)

(cherry picked from commit 6ed97b5fda)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-05-22 16:17:18 +05:30
ljain112
3d2d1ba072 fix: typo in TREE_DOCTYPES list "Terrirtory" should be "Territory"
(cherry picked from commit 51162cb1a3)
2025-05-22 10:27:05 +00:00
Mihir Kandoi
f3bc80c89d Merge pull request #47678 from frappe/mergify/bp/version-15-hotfix/pr-47658
fix: exchange rate not being fetched when creating supplier quotation… (backport #47658)
2025-05-22 14:36:37 +05:30
Mihir Kandoi
6892994ef6 Merge pull request #47677 from frappe/mergify/bp/version-15-hotfix/pr-47572
fix: include rejected amount in PI/PR overbilling validation logic (backport #47572)
2025-05-22 14:36:19 +05:30
Mihir Kandoi
2c22615b6b fix: exchange rate not being fetched when creating supplier quotation from MR
(cherry picked from commit 9d12ae071a)
2025-05-22 07:26:50 +00:00
Mihir Kandoi
cd1c10a43f fix: include rejected amount in PI/PR overbilling validation logic (#47572)
* fix: include rejected amount in PI/PR overbilling validation logic

* fix: add check if amount is 0

* fix: unneccessary condition

(cherry picked from commit 8d9888b1b6)
2025-05-22 07:23:46 +00:00
mergify[bot]
db318a4e9b fix: pos invoice status not updating on cancel (backport #47556) (#47657)
fix: pos invoice status not updating on cancel (#47556)

(cherry picked from commit 8c86def018)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-05-21 15:09:48 +05:30
mergify[bot]
9a78283ecb fix: incorrect inventory dimension for material transfer (backport #47592) (#47644)
fix: incorrect inventory dimension for material transfer (#47592)

(cherry picked from commit 738cb6a0c1)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-20 20:46:57 +05:30
Frappe PR Bot
52a5cd9702 chore(release): Bumped to Version 15.62.0
# [15.62.0](https://github.com/frappe/erpnext/compare/v15.61.1...v15.62.0) (2025-05-20)

### Bug Fixes

* alias name and parent to prevent child row mapping issues ([612fa7c](612fa7c672))
* allow FG as RM by default (backport [#47543](https://github.com/frappe/erpnext/issues/47543)) ([#47550](https://github.com/frappe/erpnext/issues/47550)) ([9355782](9355782397))
* asset cancellation issue (backport [#47639](https://github.com/frappe/erpnext/issues/47639)) ([#47641](https://github.com/frappe/erpnext/issues/47641)) ([ce9da48](ce9da48a5e))
* asset image field updation issue (backport [#47615](https://github.com/frappe/erpnext/issues/47615)) ([#47617](https://github.com/frappe/erpnext/issues/47617)) ([35c7af1](35c7af1b9d))
* better validation message with solution for BOM recursion (backport [#47472](https://github.com/frappe/erpnext/issues/47472)) ([#47477](https://github.com/frappe/erpnext/issues/47477)) ([a450f4c](a450f4ce64))
* Broken test + use `super()` appropriately ([5b50d5a](5b50d5abf2))
* Conflicts ([9cede83](9cede83de1))
* correct expense amount in party ledger summary. ([09a46fc](09a46fcf0e))
* date formatting in process_statement_of_accounts accounts_receivable print format ([cf354c0](cf354c0da3))
* include only invoices with update_stock = 0  for billed amt in delivery note. ([70e190d](70e190dbbb))
* incorrect qty during reset (backport [#47593](https://github.com/frappe/erpnext/issues/47593)) ([#47595](https://github.com/frappe/erpnext/issues/47595)) ([72ae80e](72ae80e2e3))
* mapping of dispatch address when creating PO from SO (backport [#47552](https://github.com/frappe/erpnext/issues/47552)) ([#47553](https://github.com/frappe/erpnext/issues/47553)) ([30ec69c](30ec69c977))
* POS Invoice can't use Loyalty Points when Global Rounded Total is Disabled (backport [#47491](https://github.com/frappe/erpnext/issues/47491)) ([#47564](https://github.com/frappe/erpnext/issues/47564)) ([926c0c5](926c0c5cf4))
* pos item group filter fetching wrong items (backport [#47545](https://github.com/frappe/erpnext/issues/47545)) ([#47546](https://github.com/frappe/erpnext/issues/47546)) ([5a3eff0](5a3eff05a1))
* **quotation:** use `Text Editor` field in alternative items dialog for item description ([32eeeda](32eeedac24))
* remove hardcoded doctype in `make_return_doc` ([1a69d81](1a69d8137f))
* removed invalid child param to prevent callback failure ([073d06c](073d06c44f))
* **SalesAnalytics:** Ignore opening entries ([be280a4](be280a408e))
* set no_copy to party_balance field in Payment Entry ([da4ed5c](da4ed5cc18))
* set no_copy to party_balance field in Payment Entry ([52cab02](52cab02a5c))
* validate inter-company transaction address links ([86aa072](86aa072235))
* validation message format (backport [#47542](https://github.com/frappe/erpnext/issues/47542)) ([#47549](https://github.com/frappe/erpnext/issues/47549)) ([f225e19](f225e1986e))

### Features

* add checbox for validating time logs in job card ([80c7661](80c76618ae))
* add option to calculate ageing based on report date or today date ([69337cf](69337cf18b))
2025-05-20 13:54:53 +00:00
ruthra kumar
f3052a446f Merge pull request #47636 from frappe/version-15-hotfix
chore: release v15
2025-05-20 19:23:12 +05:30
mergify[bot]
ce9da48a5e fix: asset cancellation issue (backport #47639) (#47641)
fix: asset cancellation issue (#47639)

(cherry picked from commit 33ab64dec2)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-05-20 17:21:48 +05:30
mergify[bot]
a450f4ce64 fix: better validation message with solution for BOM recursion (backport #47472) (#47477)
fix: better validation message with solution for BOM recursion

(cherry picked from commit 7103cdd84a)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2025-05-20 16:15:23 +05:30
ruthra kumar
a029f2e8a3 Merge pull request #47633 from frappe/mergify/bp/version-15-hotfix/pr-47632
fix(quotation): use `Text Editor` field in alternative items dialog (backport #47632)
2025-05-20 14:25:10 +05:30
Akhil Narang
32eeedac24 fix(quotation): use Text Editor field in alternative items dialog for item description
`Data` causes text to overflow - the field is originally a `Text Editor` field

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
(cherry picked from commit c7ea91073e)
2025-05-20 08:52:05 +00:00
ruthra kumar
ecb2bab70f Merge pull request #47631 from frappe/mergify/bp/version-15-hotfix/pr-47629
fix: date formatting in process_statement_of_accounts accounts_receivable print format (backport #47629)
2025-05-20 14:06:20 +05:30
ljain112
cf354c0da3 fix: date formatting in process_statement_of_accounts accounts_receivable print format
(cherry picked from commit 67c32ce3c9)

# Conflicts:
#	erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html
2025-05-20 13:57:47 +05:30
ruthra kumar
73fc8c374f Merge pull request #47628 from frappe/mergify/bp/version-15-hotfix/pr-47580
feat: add option to calculate ageing based on report date or today's date (backport #47580)
2025-05-20 13:53:04 +05:30
ruthra kumar
8c4ce03f44 Merge pull request #47623 from frappe/mergify/bp/version-15-hotfix/pr-47486
fix(SalesAnalytics): Ignore opening entries (backport #47486)
2025-05-20 13:21:36 +05:30
l0gesh29
69337cf18b feat: add option to calculate ageing based on report date or today date
(cherry picked from commit c67ba2d49b)
2025-05-20 07:48:39 +00:00
ruthra kumar
b773b494a0 Merge pull request #47625 from frappe/mergify/bp/version-15-hotfix/pr-47559
fix: include only invoices with update_stock = 0  for billed amt in delivery note. (backport #47559)
2025-05-20 11:25:06 +05:30
ljain112
70e190dbbb fix: include only invoices with update_stock = 0 for billed amt in delivery note.
(cherry picked from commit 6dc459db58)
2025-05-20 05:31:56 +00:00
l0gesh29
be280a408e fix(SalesAnalytics): Ignore opening entries
(cherry picked from commit 6d269b4409)
2025-05-20 05:20:43 +00:00
ruthra kumar
9584c80857 Merge pull request #47622 from frappe/mergify/bp/version-15-hotfix/pr-47614
fix: remove hardcoded doctype in `make_return_doc` (backport #47614)
2025-05-20 10:14:57 +05:30
barredterra
1a69d8137f fix: remove hardcoded doctype in make_return_doc
(cherry picked from commit 45a5c19dd4)
2025-05-20 04:30:11 +00:00
mergify[bot]
35c7af1b9d fix: asset image field updation issue (backport #47615) (#47617)
fix: asset image field updation issue (#47615)

(cherry picked from commit ff2ccf9bce)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-05-20 01:28:45 +05:30
ruthra kumar
da4ed5cc18 fix: set no_copy to party_balance field in Payment Entry 2025-05-19 16:15:16 +05:30
ruthra kumar
927d0f686f Merge pull request #47600 from frappe/mergify/bp/version-15-hotfix/pr-47505
fix: validate inter company transaction address links (backport #47505)
2025-05-19 13:25:08 +05:30
Bhavan23
8ee9a46d96 test: add test case to validate inter-company transaction address links
(cherry picked from commit 0caa757dd6)
2025-05-19 07:39:50 +00:00
Bhavan23
86aa072235 fix: validate inter-company transaction address links
(cherry picked from commit aed46ad5b9)
2025-05-19 07:39:50 +00:00
mergify[bot]
72ae80e2e3 fix: incorrect qty during reset (backport #47593) (#47595)
fix: incorrect qty during reset (#47593)

(cherry picked from commit a058fe7319)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-19 12:02:29 +05:30
Mihir Kandoi
829550cd99 Merge pull request #47577 from frappe/mergify/bp/version-15-hotfix/pr-47570
feat: add checkbox for validating time logs in job card (backport #47570)
2025-05-17 00:34:56 +05:30
Mihir Kandoi
249d18962c chore: resolve conflicts 2025-05-17 00:08:39 +05:30
Khushi Rawat
b9f12ed4c7 Merge pull request #47576 from frappe/mergify/bp/version-15-hotfix/pr-47573
fix: alias 'name' and 'parent' to prevent child row mapping issues (backport #47573)
2025-05-16 15:52:37 +05:30
Mihir Kandoi
80c76618ae feat: add checbox for validating time logs in job card
(cherry picked from commit 2d9a6a4de8)

# Conflicts:
#	erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json
2025-05-16 10:05:52 +00:00
Khushi Rawat
073d06c44f fix: removed invalid child param to prevent callback failure
(cherry picked from commit 1ca51e4f14)
2025-05-16 10:05:51 +00:00
Khushi Rawat
612fa7c672 fix: alias name and parent to prevent child row mapping issues
(cherry picked from commit a418e377f4)
2025-05-16 10:05:51 +00:00
marination
e7dc31191c Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-46214 2025-05-15 18:50:58 +02:00
mergify[bot]
926c0c5cf4 fix: POS Invoice can't use Loyalty Points when Global Rounded Total is Disabled (backport #47491) (#47564)
fix: POS Invoice can't use Loyalty Points when Global Rounded Total is Disabled (#47491)

(cherry picked from commit b541b536c3)

Co-authored-by: Kitti U. @ Ecosoft <kittiu@gmail.com>
2025-05-15 19:35:03 +05:30
ljain112
52cab02a5c fix: set no_copy to party_balance field in Payment Entry 2025-05-15 18:03:25 +05:30
Frappe PR Bot
31fa1c9a58 chore(release): Bumped to Version 15.61.1
## [15.61.1](https://github.com/frappe/erpnext/compare/v15.61.0...v15.61.1) (2025-05-15)

### Bug Fixes

* correct expense amount in party ledger summary. ([67741f1](67741f1a21))
2025-05-15 06:05:18 +00:00
ruthra kumar
631a9bfa7c Merge pull request #47557 from frappe/mergify/bp/version-15/pr-47541
fix: correct expense amount in party ledger summary. (backport #47541)
2025-05-15 11:33:53 +05:30
ljain112
67741f1a21 fix: correct expense amount in party ledger summary.
(cherry picked from commit 09a46fcf0e)
2025-05-15 05:47:32 +00:00
mergify[bot]
f225e1986e fix: validation message format (backport #47542) (#47549)
fix: validation message format (#47542)

(cherry picked from commit a18e1cffa7)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-15 10:31:28 +05:30
mergify[bot]
9355782397 fix: allow FG as RM by default (backport #47543) (#47550)
fix: allow FG as RM by default (#47543)

(cherry picked from commit 4241bfd4bc)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-15 10:31:12 +05:30
mergify[bot]
30ec69c977 fix: mapping of dispatch address when creating PO from SO (backport #47552) (#47553)
fix: mapping of dispatch address when creating PO from SO (#47552)

* fix: mapping of dispatch address when creating PO from SO

* fix: add to default supplier function as well

(cherry picked from commit 82161e9cb5)

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-05-14 20:52:04 +05:30
ruthra kumar
b22831bd94 Merge pull request #47541 from ljain112/fix-cls
fix: correct expense amount in party ledger summary.
2025-05-14 17:56:22 +05:30
mergify[bot]
5a3eff05a1 fix: pos item group filter fetching wrong items (backport #47545) (#47546)
fix: pos item group filter fetching wrong items (#47545)

(cherry picked from commit 5c28e01590)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-05-14 17:41:36 +05:30
ljain112
09a46fcf0e fix: correct expense amount in party ledger summary. 2025-05-14 12:38:38 +05:30
marination
37f4cf5367 fix: Linter (due to conflicts resolved on gh) 2025-05-13 17:18:40 +02:00
marination
f95a3f5b8b fix(portal): User cannot create 0 qty SQ from RFQ
- The portal uses `create_supplier_quotation` for SQ creation which excludes 0 qty items
2025-05-13 17:13:41 +02:00
marination
0286788e97 chore: Relabel according to review changes 2025-05-13 17:13:41 +02:00
marination
8891f46a22 fix: Relabel unit price settings for more clarity 2025-05-13 17:13:41 +02:00
Marica
890ce4a676 Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-46214 2025-05-13 17:07:43 +02:00
Marica
2960d0dce1 Merge pull request #47537 from frappe/mergify/bp/version-15-hotfix/pr-38530
refactor: Consolidate duplicate zero-quantity Items checks for transactions. (backport #38530)
2025-05-13 16:55:54 +02:00
Frappe PR Bot
6e699178ae chore(release): Bumped to Version 15.61.0
# [15.61.0](https://github.com/frappe/erpnext/compare/v15.60.2...v15.61.0) (2025-05-13)

### Bug Fixes

* accumulate values for all the fiscal years in Profit And Loss Statement ([6dbdc36](6dbdc36af9))
* added PR/PI overbilling validation (backport [#47385](https://github.com/frappe/erpnext/issues/47385)) ([#47497](https://github.com/frappe/erpnext/issues/47497)) ([309ea7b](309ea7b9cf))
* broken test suite due to incorrect OR filter ([4a37f2a](4a37f2a925))
* condition for advance_account assignment ([b6e5e33](b6e5e3347d))
* do not mandate depreciation accounts for non depreciable asset category ([a75931c](a75931c90f))
* dont auto-fetch latest exchange rate ([0adb715](0adb7156cd))
* error while making SABB for backdated stock reco ([7ba7d1a](7ba7d1a2a4))
* ignore "Account Closing Balance" doctype on Period Closing Voucher cancellation ([39c0291](39c029133f))
* only depreciable category assets are allowed for depreciation ([242a119](242a119f95))
* **payment-reconciliation:** use reconciliation_takes_effect_on from company ([25fabda](25fabda40a))
* POS non-stock item mistakenly hidden as unavailable (backport [#47493](https://github.com/frappe/erpnext/issues/47493)) ([#47506](https://github.com/frappe/erpnext/issues/47506)) ([b18692c](b18692c120))
* resolved conflicts ([dcfae61](dcfae61a7a))
* timesheet portal showing total billing hours ([64ae4e1](64ae4e1fec))
* typo ([d61a85e](d61a85e316))
* typo in event.js ([67d24e9](67d24e9635))
* warning message for COGS account in the stock entry ([7abe199](7abe199e2a))

### Features

* add non depreciable category checkbox in asset category ([96d3bfd](96d3bfd2d9))
* add routing/sequencing to work order operations (backport [#46975](https://github.com/frappe/erpnext/issues/46975)) ([#47534](https://github.com/frappe/erpnext/issues/47534)) ([56d0357](56d0357f6f))

### Performance Improvements

* Skip link checking on repost's remove_attached_file (backport [#45061](https://github.com/frappe/erpnext/issues/45061)) ([#47450](https://github.com/frappe/erpnext/issues/47450)) ([09e7bfb](09e7bfbacb))
2025-05-13 14:04:07 +00:00
ruthra kumar
0f350ef24d Merge pull request #47528 from frappe/version-15-hotfix
chore: release v15
2025-05-13 19:32:35 +05:30
mergify[bot]
56d0357f6f feat: add routing/sequencing to work order operations (backport #46975) (#47534)
* feat: add routing/sequencing to work order operations (#46975)

* feat: add routing/sequencing to work order operations

* fix: add validation and remove reorderin for non sequence id operations

* chore: readability

* fix: logical error

* fix: logical error

* chore: added row number in error message

(cherry picked from commit f1159b6ea6)

# Conflicts:
#	erpnext/manufacturing/doctype/work_order_operation/work_order_operation.json

* chore: resolve conflicts

---------

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-05-13 19:02:01 +05:30
marination
5b50d5abf2 fix: Broken test + use super() appropriately
- test: Remove `test_bom_qty`. It had invalid code. Its been removed from develop. There wasn't a strong case being tested.
2025-05-13 14:42:57 +02:00
marination
9cede83de1 fix: Conflicts 2025-05-13 14:26:54 +02:00
Bernd Oliver Sünderhauf
a8b982dd0a chore: Adapt translations to reworded message.
(cherry picked from commit 3688d9412e)

# Conflicts:
#	erpnext/translations/tr.csv
2025-05-13 12:13:56 +00:00
Bernd Oliver Sünderhauf
cf45ffdabe refactor: Consolidate duplicate zero-quantity transaction Items checks.
(cherry picked from commit 4918aeb4c6)

# Conflicts:
#	erpnext/stock/doctype/stock_entry/stock_entry.py
2025-05-13 12:13:47 +00:00
Bernd Oliver Sünderhauf
e91a0acbb3 test: Add, expand and refine test-cases for zero-quantity transactions.
(cherry picked from commit b2d8a44199)

# Conflicts:
#	erpnext/selling/doctype/sales_order/test_sales_order.py
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
#	erpnext/stock/doctype/stock_entry/stock_entry.py
2025-05-13 12:13:46 +00:00
Khushi Rawat
fbbae80f92 Merge pull request #47533 from frappe/mergify/bp/version-15-hotfix/pr-47530
feat: non depreciable asset category (backport #47530)
2025-05-13 17:23:09 +05:30
Khushi Rawat
dcfae61a7a fix: resolved conflicts 2025-05-13 17:07:14 +05:30
marination
3deb11e5b2 fix: Merge conflicts 2025-05-13 13:35:19 +02:00
Khushi Rawat
242a119f95 fix: only depreciable category assets are allowed for depreciation
(cherry picked from commit d715db1226)
2025-05-13 11:34:35 +00:00
Khushi Rawat
a75931c90f fix: do not mandate depreciation accounts for non depreciable asset category
(cherry picked from commit 32cb7d6388)
2025-05-13 11:34:35 +00:00
Khushi Rawat
96d3bfd2d9 feat: add non depreciable category checkbox in asset category
(cherry picked from commit fbbfd6531b)

# Conflicts:
#	erpnext/assets/doctype/asset_category/asset_category.json
2025-05-13 11:34:35 +00:00
ruthra kumar
165a4fcef6 Merge pull request #47527 from frappe/mergify/bp/version-15-hotfix/pr-47520
fix: ignore "Account Closing Balance" doctype on Period Closing Voucher cancellation (backport #47520)
2025-05-13 15:10:13 +05:30
ruthra kumar
29b35d6eb0 Merge pull request #47522 from frappe/mergify/bp/version-15-hotfix/pr-47468
fix(payment-reconciliation): use reconciliation_takes_effect_on from company (backport #47468)
2025-05-13 15:03:59 +05:30
ljain112
39c029133f fix: ignore "Account Closing Balance" doctype on Period Closing Voucher cancellation
(cherry picked from commit d6602d63fc)
2025-05-13 09:21:31 +00:00
ruthra kumar
7f55d59a7b chore: drop redundant patch 2025-05-13 14:45:51 +05:30
ruthra kumar
95f21e5ecd Merge pull request #47523 from frappe/mergify/bp/version-15-hotfix/pr-47521
fix: condition for advance_account assignment (backport #47521)
2025-05-13 14:31:29 +05:30
Bhavan23
bafd9ed15e chore: simplify repeated condition checks
(cherry picked from commit 7bc62cedc6)
2025-05-13 14:14:13 +05:30
Bhavan23
25fabda40a fix(payment-reconciliation): use reconciliation_takes_effect_on from company
(cherry picked from commit 19f1ffbdc2)
2025-05-13 14:14:10 +05:30
ljain112
b6e5e3347d fix: condition for advance_account assignment
(cherry picked from commit ded46ce3d8)
2025-05-13 08:43:18 +00:00
ruthra kumar
2868446292 Merge pull request #47517 from frappe/mergify/bp/version-15-hotfix/pr-47367
fix: Use `Currency` instead of `Float` in GL report to show details (backport #47367)
2025-05-13 13:08:32 +05:30
Abdeali Chharchhodawala
811fe4fee6 Merge pull request #47367 from Abdeali099/gl-report-field-float-to-currency
fix: Use `Currency` instead of `Float` in GL report to show details
(cherry picked from commit e4e0bb68ec)
2025-05-13 05:57:49 +00:00
mergify[bot]
b6bf13ff02 refactor: available serial no report (backport #47333) (#47500)
* refactor: available serial no report

(cherry picked from commit 74eb611563)

* chore: further optimizations

(cherry picked from commit 653e0a2e3a)

---------

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-05-12 23:29:51 +05:30
ruthra kumar
b82e2585d5 Merge pull request #47508 from frappe/mergify/bp/version-15-hotfix/pr-47243
fix: accumulate values for all the fiscal years in Profit And Loss Statement (backport #47243)
2025-05-12 17:09:57 +05:30
ruthra kumar
9ca96a63c3 refactor(test): don't default to accumulate
(cherry picked from commit 54e4e7918e)
2025-05-12 16:54:14 +05:30
ruthra kumar
98cb9c6b96 test: accumulate filter on P&L report
(cherry picked from commit afff6b84ce)
2025-05-12 16:54:09 +05:30
ruthra kumar
d61a85e316 fix: typo
(cherry picked from commit 61d13ce232)
2025-05-12 11:17:32 +00:00
ljain112
6dbdc36af9 fix: accumulate values for all the fiscal years in Profit And Loss Statement
(cherry picked from commit 6851322361)
2025-05-12 11:17:32 +00:00
mergify[bot]
b18692c120 fix: POS non-stock item mistakenly hidden as unavailable (backport #47493) (#47506)
fix: POS non-stock item mistakenly hidden as unavailable (#47493)

(cherry picked from commit 57f3489dfa)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-05-12 15:10:11 +05:30
mergify[bot]
309ea7b9cf fix: added PR/PI overbilling validation (backport #47385) (#47497)
* fix: added PR/PI overbilling validation

(cherry picked from commit f4ffc57b51)

* test: added test

(cherry picked from commit b406ec724b)

* fix: linter error

(cherry picked from commit 27e842ba02)

---------

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-05-11 14:31:46 +05:30
Mihir Kandoi
775b2432ab Merge pull request #47494 from frappe/mergify/bp/version-15-hotfix/pr-47481
fix: timesheet portal showing total billing hours (backport #47481)
2025-05-10 12:04:04 +05:30
Mihir Kandoi
64ae4e1fec fix: timesheet portal showing total billing hours
(cherry picked from commit b04a07fda0)
2025-05-10 06:09:25 +00:00
ruthra kumar
005014ef6a Merge pull request #47482 from frappe/mergify/bp/version-15-hotfix/pr-47380
fix: broken CI - uae vat 201 tests failing (backport #47380)
2025-05-09 15:00:55 +05:30
ruthra kumar
4a37f2a925 fix: broken test suite due to incorrect OR filter
(cherry picked from commit 37d74e387d)
2025-05-09 09:13:26 +00:00
ruthra kumar
870be7a79b Merge pull request #47467 from frappe/mergify/bp/version-15-hotfix/pr-47462
Update event.js (backport #47462)
2025-05-08 14:13:19 +05:30
Yaiphalemba Mangshatabam
67d24e9635 fix: typo in event.js
"Sales Partners" -> "Sales Partner"

(cherry picked from commit edee75c757)
2025-05-08 08:40:56 +00:00
rohitwaghchaure
3ba7bb3ab7 Merge pull request #47454 from frappe/mergify/bp/version-15-hotfix/pr-47452
fix: warning message for COGS account in the stock entry (backport #47452)
2025-05-08 13:58:08 +05:30
rohitwaghchaure
72ec3f3d18 Merge pull request #47458 from frappe/mergify/bp/version-15-hotfix/pr-47457
fix: error while making SABB for backdated stock reco (backport #47457)
2025-05-08 13:57:43 +05:30
Rohit Waghchaure
7ba7d1a2a4 fix: error while making SABB for backdated stock reco
(cherry picked from commit ad25636afb)
2025-05-07 15:49:10 +00:00
Rohit Waghchaure
7abe199e2a fix: warning message for COGS account in the stock entry
(cherry picked from commit bba6b0ff45)
2025-05-07 10:50:21 +00:00
mergify[bot]
09e7bfbacb perf: Skip link checking on repost's remove_attached_file (backport #45061) (#47450)
perf: Skip link checking on repost's remove_attached_file (#45061)

This is internal detail, doesn't need to do horrible link checks in
framework.

(cherry picked from commit 4f690affc9)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-05-07 14:04:12 +05:30
ruthra kumar
ef7b09fc11 Merge pull request #47448 from frappe/mergify/bp/version-15-hotfix/pr-47447
fix: dont auto-fetch latest exchange rate (backport #47447)
2025-05-07 11:22:50 +05:30
ruthra kumar
0adb7156cd fix: dont auto-fetch latest exchange rate
- also use correct currency field for comparison

(cherry picked from commit 4ccd0a7407)
2025-05-07 05:47:33 +00:00
Frappe PR Bot
7fb557197a chore(release): Bumped to Version 15.60.2
## [15.60.2](https://github.com/frappe/erpnext/compare/v15.60.1...v15.60.2) (2025-05-06)

### Bug Fixes

* 'time to resolve: failed' on issue (backport [#47406](https://github.com/frappe/erpnext/issues/47406)) ([#47407](https://github.com/frappe/erpnext/issues/47407)) ([21612fc](21612fc230))
* backward compatibility for renamed group_by filter on reports (backport [#47362](https://github.com/frappe/erpnext/issues/47362)) ([#47403](https://github.com/frappe/erpnext/issues/47403)) ([0e5c709](0e5c709f7b))
* change shipping address fetching condition ([0aabe4f](0aabe4fd1e))
* completed transactions showing in the list (backport [#47374](https://github.com/frappe/erpnext/issues/47374)) ([#47379](https://github.com/frappe/erpnext/issues/47379)) ([1ef7da8](1ef7da837f))
* do not allocate amount when ref's doctype or name are not set ([c2e36da](c2e36daa32))
* do not mandate depreciation account for assets without depreciation (backport [#47427](https://github.com/frappe/erpnext/issues/47427)) ([#47428](https://github.com/frappe/erpnext/issues/47428)) ([01e975b](01e975b481))
* not able to submit the stock entry ([#47383](https://github.com/frappe/erpnext/issues/47383)) ([035394a](035394ae6a))
* party name in Ledger Summary ([4fc14b3](4fc14b3097))
* precision issue ([b6908a7](b6908a79bd))
* rename unchanged group_by filter related to general ledger report (backport [#47366](https://github.com/frappe/erpnext/issues/47366)) ([#47405](https://github.com/frappe/erpnext/issues/47405)) ([8d1e855](8d1e855dc8))
* renaming group by fieldname and value in reports (backport [#47352](https://github.com/frappe/erpnext/issues/47352)) ([#47360](https://github.com/frappe/erpnext/issues/47360)) ([85a8adf](85a8adf804))
* show party type in due date exceeding message ([f73e99e](f73e99e9d2))
* stock reco recalculate qty not works for opening stock reco ([2bd30e3](2bd30e3c46))
* update accounts on change of mode of payment in sales invoice payment (backport [#47381](https://github.com/frappe/erpnext/issues/47381)) ([#47400](https://github.com/frappe/erpnext/issues/47400)) ([afb44a6](afb44a677c))
* validation for difference account ([f4a43d0](f4a43d07b0))
* warning message before changing the valuation method (backport [#47340](https://github.com/frappe/erpnext/issues/47340)) ([#47342](https://github.com/frappe/erpnext/issues/47342)) ([4ef2b77](4ef2b77973))
2025-05-06 14:11:12 +00:00
ruthra kumar
7733e417a4 Merge pull request #47429 from frappe/version-15-hotfix
chore: release v15
2025-05-06 19:39:35 +05:30
rohitwaghchaure
d8fb11009f Merge pull request #47440 from frappe/mergify/bp/version-15-hotfix/pr-47435
fix: stock reco recalculate qty not works for opening stock reco (backport #47435)
2025-05-06 18:45:43 +05:30
Rohit Waghchaure
2bd30e3c46 fix: stock reco recalculate qty not works for opening stock reco
(cherry picked from commit 97095c7d24)
2025-05-06 12:57:56 +00:00
rohitwaghchaure
fb56db1166 Merge pull request #47437 from frappe/mergify/bp/version-15-hotfix/pr-47397
fix: precision issue (backport #47397)
2025-05-06 17:50:26 +05:30
Rohit Waghchaure
b6908a79bd fix: precision issue
(cherry picked from commit 69bee93bfd)
2025-05-06 11:59:50 +00:00
mergify[bot]
f4551bb918 feat!: configure which rate is used to auto-update price list (backport #47417)
Co-authored-by: Sagar Vora <16315650+sagarvora@users.noreply.github.com>
2025-05-06 17:00:03 +05:30
mergify[bot]
01e975b481 fix: do not mandate depreciation account for assets without depreciation (backport #47427) (#47428)
fix: do not mandate depreciation account for assets without depreciation (#47427)

(cherry picked from commit 51ea33e743)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-05-06 15:21:14 +05:30
ruthra kumar
91cbf2ec4f Merge pull request #47426 from frappe/mergify/bp/version-15-hotfix/pr-47337
fix: do not allocate amount when ref's doctype or name are not set (backport #47337)
2025-05-06 15:00:46 +05:30
Abdeali Chharchhoda
c2e36daa32 fix: do not allocate amount when ref's doctype or name are not set
(cherry picked from commit b9a02b466b)
2025-05-06 09:04:52 +00:00
ruthra kumar
74caf8134c Merge pull request #47416 from frappe/mergify/bp/version-15-hotfix/pr-47408
fix: show party type in due date exceeding message (backport #47408)
2025-05-06 14:32:52 +05:30
ruthra kumar
40faa7f7b9 chore: resolve conflicts and pass all parameters 2025-05-06 14:14:41 +05:30
Abdeali Chharchhoda
f73e99e9d2 fix: show party type in due date exceeding message
(cherry picked from commit b6d9134014)

# Conflicts:
#	erpnext/accounts/party.py
2025-05-06 06:28:48 +00:00
ruthra kumar
2d77e056bc Merge pull request #47414 from frappe/mergify/bp/version-15-hotfix/pr-47358
fix: change shipping address fetching condition (backport #47358)
2025-05-06 11:28:56 +05:30
Vimal
0aabe4fd1e fix: change shipping address fetching condition
(cherry picked from commit 0b4add2f2b)
2025-05-06 05:29:00 +00:00
marination
f94a14c06a fix: Headline rendered twice on first save
- `refresh` gets triggered twice and that renders the note twice
- Remove any existing note before rendering

(cherry picked from commit bf62f9ad57)
2025-05-05 16:59:18 +00:00
marination
d9636018f5 fix: Treat rows as Unit Price rows only until the qty is 0
- The unit price check should depend on the row qty being 0
- Once the row ceases to be 0, it is treated as an ordinary row
- test: PO, SO and Quotation

(cherry picked from commit 0447c7be0a)

# Conflicts:
#	erpnext/selling/doctype/quotation/test_quotation.py
#	erpnext/selling/doctype/sales_order/test_sales_order.py
2025-05-05 16:59:17 +00:00
marination
2d96a62530 test: Sales Order + fix: Mapping of Items from Quotation & SO
(cherry picked from commit 55981c8358)

# Conflicts:
#	erpnext/selling/doctype/sales_order/test_sales_order.py
2025-05-05 16:59:17 +00:00
marination
eba73df88e test: Purchase Order with Unit Price Items
- chore: Fix error message in accounts controller

(cherry picked from commit eea758f5b2)

# Conflicts:
#	erpnext/buying/doctype/purchase_order/test_purchase_order.py
#	erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py
2025-05-05 16:59:16 +00:00
marination
c19065e675 test: Zero Qty in RFQ and Supplier Quotation
(cherry picked from commit 8f96c0b546)

# Conflicts:
#	erpnext/buying/doctype/request_for_quotation/test_request_for_quotation.py
#	erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py
2025-05-05 16:59:16 +00:00
marination
f8fa775af3 feat: Unit Price Items in Buying (RFQ, SQ, PO)
- chore: Extract `set_unit_price_items_note` into a util

(cherry picked from commit e403d3f153)

# Conflicts:
#	erpnext/buying/doctype/buying_settings/buying_settings.json
#	erpnext/buying/doctype/purchase_order/purchase_order.json
#	erpnext/buying/doctype/request_for_quotation/request_for_quotation.json
#	erpnext/selling/doctype/quotation/quotation.json
#	erpnext/selling/doctype/selling_settings/selling_settings.json
2025-05-05 16:59:16 +00:00
marination
91e167fe72 fix: Linters
(cherry picked from commit 71f65bab5e)

# Conflicts:
#	erpnext/selling/doctype/sales_order/sales_order.py
2025-05-05 16:59:15 +00:00
marination
33366fce6c feat: Unit Price Contract
(cherry picked from commit c1e4e7af28)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
#	erpnext/selling/doctype/quotation/quotation.json
#	erpnext/selling/doctype/sales_order/sales_order.py
#	erpnext/selling/doctype/selling_settings/selling_settings.json
2025-05-05 16:59:15 +00:00
mergify[bot]
8d1e855dc8 fix: rename unchanged group_by filter related to general ledger report (backport #47366) (#47405)
fix: rename unchanged group_by filter related to general ledger report (#47366)

(cherry picked from commit 3de249dcba)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-05-05 18:01:51 +05:30
mergify[bot]
0e5c709f7b fix: backward compatibility for renamed group_by filter on reports (backport #47362) (#47403)
fix: backward compatibility for renamed group_by filter on reports (#47362)

* fix: backward compatibility for renamed group_by filter in general ledger report

* fix: backward compatibility for renamed group_by filter in supplier quotation comparison report

(cherry picked from commit d4ffa54136)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-05-05 18:01:29 +05:30
mergify[bot]
21612fc230 fix: 'time to resolve: failed' on issue (backport #47406) (#47407)
fix: 'time to resolve: failed' on issue (#47406)

* fix: 'time to resolve: failed' on issue

* fix: sla_resolution_date

(cherry picked from commit 45393d51a2)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-05-05 17:50:36 +05:30
mergify[bot]
afb44a677c fix: update accounts on change of mode of payment in sales invoice payment (backport #47381) (#47400)
* fix: update accounts on change of mode of payment in sales invoice payment (#47381)

* fix: update accounts on change of mode of payment in sales invoice payment

* test: fixed tests

(cherry picked from commit 8067799692)

# Conflicts:
#	erpnext/accounts/doctype/mode_of_payment/test_mode_of_payment.py
#	erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py
#	erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py

* chore: resolve conflict

* chore: remove unused library

* chore: resolve conflict

* chore: resolve conflict

* chore: resolve linter issue

---------

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-05-05 16:35:31 +05:30
ruthra kumar
4f6aee3f22 Merge pull request #47399 from frappe/mergify/bp/version-15-hotfix/pr-47145
refactor: make AR / AP report more memory efficient (backport #47145)
2025-05-05 16:03:36 +05:30
ruthra kumar
fc1b1ca5e2 chore: resolve conflict 2025-05-05 15:47:39 +05:30
ruthra kumar
f69b8d7e2d refactor: set default for fetch methods
(cherry picked from commit ca1e81e1b5)
2025-05-05 10:14:49 +00:00
ruthra kumar
2147441e64 refactor: use fetch method based on configuration
(cherry picked from commit b5bb6f3508)
2025-05-05 10:14:49 +00:00
ruthra kumar
5e5cf68b32 refactor: configurable fetch method for AR / AP report
(cherry picked from commit 66fd639b52)

# Conflicts:
#	erpnext/accounts/doctype/accounts_settings/accounts_settings.json
2025-05-05 10:14:49 +00:00
ruthra kumar
7c8245d299 refactor: use unbuffered cursor for fetching
(cherry picked from commit 08903459c2)
2025-05-05 10:14:48 +00:00
rohitwaghchaure
a4c9707fdf Merge pull request #47390 from frappe/mergify/bp/version-15-hotfix/pr-47376
fix: validation for difference account (backport #47376)
2025-05-05 14:11:07 +05:30
Rohit Waghchaure
f4a43d07b0 fix: validation for difference account
(cherry picked from commit fb819c558e)
2025-05-03 07:52:58 +00:00
Frappe PR Bot
c1ed750bcb chore(release): Bumped to Version 15.60.1
## [15.60.1](https://github.com/frappe/erpnext/compare/v15.60.0...v15.60.1) (2025-05-02)

### Bug Fixes

* not able to submit the stock entry ([#47383](https://github.com/frappe/erpnext/issues/47383)) ([73a418a](73a418a2bd))
2025-05-02 13:44:13 +00:00
rohitwaghchaure
1d139eb94a Merge pull request #47384 from frappe/mergify/bp/version-15/pr-47383
fix: not able to submit the stock entry (backport #47383)
2025-05-02 19:12:43 +05:30
rohitwaghchaure
73a418a2bd fix: not able to submit the stock entry (#47383)
(cherry picked from commit 035394ae6a)
2025-05-02 13:06:32 +00:00
rohitwaghchaure
035394ae6a fix: not able to submit the stock entry (#47383) 2025-05-02 18:34:47 +05:30
mergify[bot]
1ef7da837f fix: completed transactions showing in the list (backport #47374) (#47379)
fix: completed transactions showing in the list (#47374)

(cherry picked from commit 97db9da10e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-05-02 15:28:45 +05:30
mergify[bot]
85a8adf804 fix: renaming group by fieldname and value in reports (backport #47352) (#47360)
* fix: renaming group by fieldname and value in reports (#47352)

* fix: renaming in general ledger report

* fix: renaming in supplier quotation comparison report

* fix: renaming group by to categorize by in process statement of accounts

* fix: added patch

* fix: patch update to all documents

* chore: added patches to patch.txt

* chore: removing patch from v14

(cherry picked from commit 13a84e7f82)

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

* chore: resolve conflict

---------

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-04-30 17:19:43 +05:30
Mihir Kandoi
d3445b3079 Merge pull request #47357 from frappe/mergify/bp/version-15-hotfix/pr-47336
refactor: portal query in timesheet.py (backport #47336)
2025-04-30 16:35:11 +05:30
Mihir Kandoi
ada7821a49 refactor: portal query in timesheet.py (#47336)
* refactor: portal query in timesheet.py

* fix: use criterion.any to fix query

(cherry picked from commit 4fc7a8b71d)
2025-04-30 10:45:02 +00:00
Nihantra C. Patel
3f7dcedf3d Merge pull request #47354 from frappe/mergify/bp/version-15-hotfix/pr-47351
fix: party name in Ledger Summary (backport #47351)
2025-04-30 14:05:47 +05:30
Nihantra Patel
4fc14b3097 fix: party name in Ledger Summary
(cherry picked from commit 70bc86a4c6)
2025-04-30 08:13:52 +00:00
mergify[bot]
4ef2b77973 fix: warning message before changing the valuation method (backport #47340) (#47342)
fix: warning message before changing the valuation method (#47340)

(cherry picked from commit ffdc4347e8)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-04-30 08:45:39 +05:30
Frappe PR Bot
96996bd8a9 chore(release): Bumped to Version 15.60.0
# [15.60.0](https://github.com/frappe/erpnext/compare/v15.59.0...v15.60.0) (2025-04-29)

### Bug Fixes

* add transaction_date in field_no_map when creating PO from SQ (backport [#47257](https://github.com/frappe/erpnext/issues/47257)) ([#47313](https://github.com/frappe/erpnext/issues/47313)) ([afb67f1](afb67f1f0c))
* allow selling asset at zero rate (backport [#47326](https://github.com/frappe/erpnext/issues/47326)) ([#47332](https://github.com/frappe/erpnext/issues/47332)) ([171b687](171b687611))
* allow to change valuation method from FIFO to Moving Average ([b2294ed](b2294ed6e3))
* allow to make quality inspection after Purchase / Delivery ([e0cea49](e0cea49236))
* cancel pos closing entry failure for return pos invoices (backport [#47248](https://github.com/frappe/erpnext/issues/47248)) ([#47249](https://github.com/frappe/erpnext/issues/47249)) ([10d843e](10d843e490))
* commas in rfq portal js ([954fec1](954fec16f4))
* compare total debit/credit with precision for Inter Company Journal Entry ([0927155](0927155171))
* consolidating pos invoices on the basis of accounting dimensions (backport [#46961](https://github.com/frappe/erpnext/issues/46961)) ([#47265](https://github.com/frappe/erpnext/issues/47265)) ([f8da159](f8da1599bb))
* correct query for dispatch_address; remove unnecessary code; increase reusability; ([ac3b2ba](ac3b2ba003))
* do not check for permission if values are not changed in employee doctype ([#47238](https://github.com/frappe/erpnext/issues/47238)) ([0caba9f](0caba9f70d))
* enable use serial / batch fields on batch selection ([925cc40](925cc40efa))
* enhance dispatch address query logic and add supplier address query ([290f0b9](290f0b94e5))
* fix sub assembly qty calculation in production plan when bom level >= 1 (backport [#47296](https://github.com/frappe/erpnext/issues/47296)) ([#47315](https://github.com/frappe/erpnext/issues/47315)) ([d15b7ca](d15b7ca9af))
* make asset quantity and amount editable (backport [#47226](https://github.com/frappe/erpnext/issues/47226)) ([#47227](https://github.com/frappe/erpnext/issues/47227)) ([c140fd0](c140fd0f12))
* map dispatch address correctly for inter company transactions ([d8c0e71](d8c0e7156e))
* missing else statement ([8a30a31](8a30a31302))
* **payment request:** get advance amount based on transaction currency ([c2235e2](c2235e2d17))
* **PE:** Set account types in get_payment_entry (backport [#47246](https://github.com/frappe/erpnext/issues/47246)) ([#47266](https://github.com/frappe/erpnext/issues/47266)) ([3e733f6](3e733f6ba1))
* prevent cancellation of last asset movement (backport [#47291](https://github.com/frappe/erpnext/issues/47291)) ([#47312](https://github.com/frappe/erpnext/issues/47312)) ([2edd12b](2edd12b26d))
* price currency in supplier quotation comparison ([6b1b30a](6b1b30a4a6))
* prohibit consolidated sales invoice return (backport [#47251](https://github.com/frappe/erpnext/issues/47251)) ([#47252](https://github.com/frappe/erpnext/issues/47252)) ([4bcea55](4bcea55563))
* QI reference not set if 'Action If Quality Inspection Is Not Sub… (backport [#47294](https://github.com/frappe/erpnext/issues/47294)) ([#47295](https://github.com/frappe/erpnext/issues/47295)) ([b0399fe](b0399fe948))
* Re-insert missing "Serial No Warranty Expiry" Report ([727c32d](727c32d789))
* remove invalid email account creation (backport [#47318](https://github.com/frappe/erpnext/issues/47318)) ([#47323](https://github.com/frappe/erpnext/issues/47323)) ([fc8a8b5](fc8a8b5433))
* remove use of cur_frm ([5c300b8](5c300b893b))
* **Rename Tool:** allow more than 500 rows (backport [#47117](https://github.com/frappe/erpnext/issues/47117)) ([#47225](https://github.com/frappe/erpnext/issues/47225)) ([c0ae133](c0ae1336f4))
* require email OR phone in shipment doctype not both (backport [#47300](https://github.com/frappe/erpnext/issues/47300)) ([#47330](https://github.com/frappe/erpnext/issues/47330)) ([0056fb1](0056fb1d0f))
* set billing hours to hours ([0763a8d](0763a8d42d))
* set billing hours to hours in timesheet (backport [#47289](https://github.com/frappe/erpnext/issues/47289)) ([#47290](https://github.com/frappe/erpnext/issues/47290)) ([74bdc82](74bdc82bfa))
* update additional cost and total asset cost after asset repair (backport [#47233](https://github.com/frappe/erpnext/issues/47233)) ([#47235](https://github.com/frappe/erpnext/issues/47235)) ([4a29a54](4a29a54804))
* update billing hours when hours is changed ([a9df1f5](a9df1f5f6b))
* update quantity validation using asset quantity field instead of… (backport [#46731](https://github.com/frappe/erpnext/issues/46731)) ([#47284](https://github.com/frappe/erpnext/issues/47284)) ([2e6112f](2e6112f21b))
* validate if from and to time are present on submission of job card ([#47325](https://github.com/frappe/erpnext/issues/47325)) ([d640c79](d640c79c1c))
* validation if no stock ledger entries against stock reco (backport [#47292](https://github.com/frappe/erpnext/issues/47292)) ([#47293](https://github.com/frappe/erpnext/issues/47293)) ([91bcefe](91bcefef8c))

### Features

* add dispatch address fields to purchase doctypes ([5f101e7](5f101e7635))
* add dispatch address support in party details and controllers ([1fe1563](1fe1563dab))
* add display dispatch address when dispatch address is selected ([93ea2f9](93ea2f93b6))
* change sabb qty automatically incase of internal transfer PR if sabb only has 1 batch ([#47256](https://github.com/frappe/erpnext/issues/47256)) ([9495a2a](9495a2ac9d))
2025-04-29 13:12:18 +00:00
ruthra kumar
a9e40bc0d8 Merge pull request #47328 from frappe/version-15-hotfix
chore: release v15
2025-04-29 18:40:46 +05:30
mergify[bot]
d15b7ca9af fix: fix sub assembly qty calculation in production plan when bom level >= 1 (backport #47296) (#47315)
* fix: fix sub assembly qty calculation in production plan when bom level >= 1

(cherry picked from commit bfc4ce1d5d)

* fix: logical error

(cherry picked from commit ee10afc074)

---------

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-04-29 18:12:36 +05:30
mergify[bot]
171b687611 fix: allow selling asset at zero rate (backport #47326) (#47332)
fix: allow selling asset at zero rate (#47326)

(cherry picked from commit 05afad78fc)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-04-29 17:12:51 +05:30
ruthra kumar
cc8418b7e4 Merge pull request #47329 from frappe/mergify/bp/version-15-hotfix/pr-47325
fix: validate if from and to time are present on submission of job card (backport #47325)
2025-04-29 16:46:34 +05:30
mergify[bot]
0056fb1d0f fix: require email OR phone in shipment doctype not both (backport #47300) (#47330)
fix: require email OR phone in shipment doctype not both (#47300)

(cherry picked from commit fc02a6510e)

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-04-29 16:27:56 +05:30
Mihir Kandoi
d640c79c1c fix: validate if from and to time are present on submission of job card (#47325)
(cherry picked from commit 7499c25a3c)
2025-04-29 10:52:56 +00:00
mergify[bot]
2edd12b26d fix: prevent cancellation of last asset movement (backport #47291) (#47312)
fix: prevent cancellation of last asset movement (#47291)

* fix: prevent cancellation of last asset movement

* test: movement cancellation

* fix: allow cancellation of asset movement when cancelling asset

(cherry picked from commit 9dee4ac891)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-04-29 12:51:18 +05:30
ruthra kumar
71482261c7 Merge pull request #47324 from frappe/mergify/bp/version-15-hotfix/pr-47241
fix: compare total debit/credit with precision for Inter Company Journal Entry (backport #47241)
2025-04-29 12:43:42 +05:30
Mihir Kandoi
9df5727ea4 Merge pull request #47317 from frappe/mergify/bp/version-15-hotfix/pr-47256
feat: change sabb qty automatically incase of internal transfer PR if… (backport #47256)
2025-04-29 12:40:53 +05:30
mergify[bot]
fc8a8b5433 fix: remove invalid email account creation (backport #47318) (#47323)
fix: remove invalid email account creation (#47318)

(cherry picked from commit 7423e4187f)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-04-29 12:40:45 +05:30
Mihir Kandoi
409831183b Merge pull request #47314 from frappe/mergify/bp/version-15-hotfix/pr-47234
fix: price currency in supplier quotation comparison (backport #47234)
2025-04-29 12:40:31 +05:30
mergify[bot]
afb67f1f0c fix: add transaction_date in field_no_map when creating PO from SQ (backport #47257) (#47313)
* fix: add transaction_date in field_no_map when creating PO from SQ

(cherry picked from commit 3790c6c551)

* fix: test case

(cherry picked from commit acd1529780)

# Conflicts:
#	erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py

* fix: remove unused import

(cherry picked from commit 9e640341fd)

# Conflicts:
#	erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py

* chore: fix conflicts

* chore: remove unused imports

---------

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-04-29 12:40:10 +05:30
ruthra kumar
7bc39349b0 Merge pull request #47321 from frappe/mergify/bp/version-15-hotfix/pr-47231
fix(payment request): get advance amount based on transaction currency (backport #47231)
2025-04-29 12:25:54 +05:30
ljain112
0927155171 fix: compare total debit/credit with precision for Inter Company Journal Entry
(cherry picked from commit 5fe247557e)
2025-04-29 06:48:08 +00:00
venkat102
c2235e2d17 fix(payment request): get advance amount based on transaction currency
(cherry picked from commit b570d97b4d)
2025-04-29 06:37:54 +00:00
Mihir Kandoi
9495a2ac9d feat: change sabb qty automatically incase of internal transfer PR if sabb only has 1 batch (#47256)
* feat: change sabb qty automatically incase of internal transfer PR if sabb only has 1 batch

* fix: prevent creation of SABB on every save

* perf: optimize code

* fix: remove unnecessary conditon

* refactor: change if to elif

* fix: remove dn_item_qty and set to item.qty

* test: added test

(cherry picked from commit 47927b38a9)
2025-04-29 06:17:04 +00:00
Mihir Kandoi
cb61e0bd18 Merge pull request #47316 from frappe/mergify/bp/version-15-hotfix/pr-47302
fix: commas in rfq portal js (backport #47302)
2025-04-29 11:46:31 +05:30
Mihir Kandoi
954fec16f4 fix: commas in rfq portal js
(cherry picked from commit bd727e069b)
2025-04-29 06:07:50 +00:00
Mihir Kandoi
6b1b30a4a6 fix: price currency in supplier quotation comparison
(cherry picked from commit 88926eb2a7)
2025-04-29 06:06:38 +00:00
mergify[bot]
b0399fe948 fix: QI reference not set if 'Action If Quality Inspection Is Not Sub… (backport #47294) (#47295)
fix: QI reference not set if 'Action If Quality Inspection Is Not Sub… (#47294)

fix: qi reference not set if 'Action If Quality Inspection Is Not Submitted' is blank
(cherry picked from commit 0701a8cf5a)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-04-28 22:01:57 +05:30
mergify[bot]
91bcefef8c fix: validation if no stock ledger entries against stock reco (backport #47292) (#47293)
fix: validation if no stock ledger entries against stock reco (#47292)

(cherry picked from commit 3d36d0b1df)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-04-28 19:38:27 +05:30
mergify[bot]
74bdc82bfa fix: set billing hours to hours in timesheet (backport #47289) (#47290)
* fix: set billing hours to hours

(cherry picked from commit 0763a8d42d)

* fix: update billing hours when hours is changed

(cherry picked from commit a9df1f5f6b)

* fix: missing else statement

(cherry picked from commit 8a30a31302)

---------

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-04-28 16:33:40 +05:30
rohitwaghchaure
5b32bb7468 Merge pull request #47289 from frappe/st37102-2
fix: set billing hours to hours in timesheet
2025-04-28 16:27:33 +05:30
Mihir Kandoi
8a30a31302 fix: missing else statement 2025-04-28 16:08:40 +05:30
Mihir Kandoi
a9df1f5f6b fix: update billing hours when hours is changed 2025-04-28 16:07:54 +05:30
Mihir Kandoi
0763a8d42d fix: set billing hours to hours 2025-04-28 15:43:13 +05:30
rohitwaghchaure
c02a4a4591 Merge pull request #47286 from frappe/mergify/bp/version-15-hotfix/pr-47285
fix: allow to make quality inspection after Purchase / Delivery (backport #47285)
2025-04-28 15:29:16 +05:30
ruthra kumar
1cbcf7532c Merge pull request #47281 from frappe/mergify/bp/version-15-hotfix/pr-46993
feat: add dispatch address fields to purchase doctypes (backport #46993)
2025-04-28 14:47:02 +05:30
Rohit Waghchaure
e0cea49236 fix: allow to make quality inspection after Purchase / Delivery
(cherry picked from commit fad1a32e63)
2025-04-28 09:00:14 +00:00
mergify[bot]
2e6112f21b fix: update quantity validation using asset quantity field instead of… (backport #46731) (#47284)
* fix: update quantity validation using asset quantity field instead of… (#46731)

* fix: update quantity validation using asset quantity field instead of total records

* fix: update throw message

(cherry picked from commit eae08bc619)

# Conflicts:
#	erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py

* chore: resolved conflicts

---------

Co-authored-by: l0gesh29 <logeshperiyasamy24@gmail.com>
Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-04-28 14:18:51 +05:30
ruthra kumar
feb4038c06 chore: resolve conflicts 2025-04-28 11:36:24 +05:30
Smit Vora
d8c0e7156e fix: map dispatch address correctly for inter company transactions
(cherry picked from commit ceaba4220b)
2025-04-28 05:28:20 +00:00
Smit Vora
7baa8f50fb refactor: set address details for transactions
(cherry picked from commit fb3b7d8c34)
2025-04-28 05:28:20 +00:00
Smit Vora
62261a276f refactor: address field position
(cherry picked from commit 8ccd7a3e61)

# Conflicts:
#	erpnext/public/scss/erpnext.scss
2025-04-28 05:28:20 +00:00
Karm Soni
ac3b2ba003 fix: correct query for dispatch_address; remove unnecessary code; increase reusability;
(cherry picked from commit 999ffe86a7)
2025-04-28 05:28:19 +00:00
Karm Soni
93ea2f93b6 feat: add display dispatch address when dispatch address is selected
(cherry picked from commit d12998e524)
2025-04-28 05:28:19 +00:00
Karm Soni
5c300b893b fix: remove use of cur_frm
(cherry picked from commit c4bd3123fb)
2025-04-28 05:28:19 +00:00
Karm Soni
290f0b94e5 fix: enhance dispatch address query logic and add supplier address query
(cherry picked from commit 9a859e54b6)
2025-04-28 05:28:18 +00:00
Karm Soni
1fe1563dab feat: add dispatch address support in party details and controllers
(cherry picked from commit 53d0b7be23)
2025-04-28 05:28:18 +00:00
Karm Soni
5f101e7635 feat: add dispatch address fields to purchase doctypes
(cherry picked from commit 54b5205221)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
#	erpnext/buying/doctype/purchase_order/purchase_order.json
2025-04-28 05:28:18 +00:00
mergify[bot]
3e733f6ba1 fix(PE): Set account types in get_payment_entry (backport #47246) (#47266)
Co-authored-by: Corentin Forler <10946971+cogk@users.noreply.github.com>
fix(PE): Set account types in get_payment_entry (#47246)
2025-04-27 15:24:59 +02:00
rohitwaghchaure
5c4dc7a16e Merge pull request #47277 from frappe/mergify/bp/version-15-hotfix/pr-47259
fix: enable use serial / batch fields on batch selection (backport #47259)
2025-04-27 18:41:32 +05:30
Rohit Waghchaure
925cc40efa fix: enable use serial / batch fields on batch selection
(cherry picked from commit a4471865a9)
2025-04-27 13:06:21 +00:00
rohitwaghchaure
d947beec88 Merge pull request #47276 from frappe/mergify/bp/version-15-hotfix/pr-47268
fix: allow to change valuation method from FIFO to Moving Average (backport #47268)
2025-04-27 18:23:16 +05:30
Rohit Waghchaure
b2294ed6e3 fix: allow to change valuation method from FIFO to Moving Average
(cherry picked from commit b454ed4b8f)
2025-04-27 12:16:36 +00:00
mergify[bot]
f8da1599bb fix: consolidating pos invoices on the basis of accounting dimensions (backport #46961) (#47265)
fix: consolidating pos invoices on the basis of accounting dimensions (#46961)

* fix: consolidating pos invoices on the basis of accounting dimensions

* fix: project field

(cherry picked from commit c85edc3346)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-04-25 17:59:15 +05:30
Marica
636e9e0998 Merge pull request #47261 from frappe/mergify/bp/version-15-hotfix/pr-47232
fix: Re-insert missing "Serial No Warranty Expiry" Report (backport #47232)
2025-04-25 15:13:55 +05:30
marination
727c32d789 fix: Re-insert missing "Serial No Warranty Expiry" Report
(cherry picked from commit deefac0abf)
2025-04-25 09:28:36 +00:00
mergify[bot]
4bcea55563 fix: prohibit consolidated sales invoice return (backport #47251) (#47252)
fix: prohibit consolidated sales invoice return (#47251)

(cherry picked from commit 483c4a3271)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-04-25 11:33:04 +05:30
mergify[bot]
10d843e490 fix: cancel pos closing entry failure for return pos invoices (backport #47248) (#47249)
fix: cancel pos closing entry failure for return pos invoices (#47248)

(cherry picked from commit c8ee5d9a4e)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-04-24 23:23:08 +05:30
Lakshit Jain
0caba9f70d fix: do not check for permission if values are not changed in employee doctype (#47238) 2025-04-24 17:03:30 +02:00
mergify[bot]
4a29a54804 fix: update additional cost and total asset cost after asset repair (backport #47233) (#47235)
fix: update additional cost and total asset cost after asset repair (#47233)

* fix: add consumed stock's cost to the asset value after repair

* fix: do not copy additional cost and total asset cost

(cherry picked from commit ed8a8532e1)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-04-24 16:36:53 +05:30
mergify[bot]
c140fd0f12 fix: make asset quantity and amount editable (backport #47226) (#47227)
fix: make asset quantity and amount editable (#47226)

(cherry picked from commit 0d53e6ed7c)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-04-24 11:36:18 +05:30
mergify[bot]
c0ae1336f4 fix(Rename Tool): allow more than 500 rows (backport #47117) (#47225)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
fix(Rename Tool): allow more than 500 rows (#47117)
2025-04-23 20:26:03 +02:00
Frappe PR Bot
4c3044cd70 chore(release): Bumped to Version 15.59.0
# [15.59.0](https://github.com/frappe/erpnext/compare/v15.58.2...v15.59.0) (2025-04-22)

### Bug Fixes

* `TypeError` in group field filter in supplier ledger summary ([3b349f4](3b349f44b1))
* add group by after user permission condition ([f07c3d9](f07c3d9124))
* backslash in url ([f6edd5a](f6edd5aa7d))
* change get_url_to_form to get_link_to_form ([982a68b](982a68b71a))
* cherry pick ([20aba54](20aba541c4))
* consider per_ordered instead of per_billed when creating PO from MR ([be154a4](be154a469f))
* correct error message in validate_internal_transfer_qty ([b8a7f6d](b8a7f6dac1))
* create default warehouse (backport [#47125](https://github.com/frappe/erpnext/issues/47125)) ([#47131](https://github.com/frappe/erpnext/issues/47131)) ([ad177e0](ad177e08b8))
* disbaled UOM showing in the list ([3d4f3e1](3d4f3e1be7))
* distributed discounts on si ([ad05e6d](ad05e6dec2))
* **Employee:** remove User Permissions if create_user_permission is unchecked ([7ab81b7](7ab81b7e54))
* expense account in stock entry ([2f1f229](2f1f229144))
* get total without rounding off tax amounts for distributing discount (backport [#47155](https://github.com/frappe/erpnext/issues/47155)) ([8050e65](8050e653ab))
* group sub assemblies in production plan ([73683b2](73683b2754))
* import error ([924e9b9](924e9b94b6))
* keep per_billed 100 for billed delivery note after return ([680c221](680c221f05))
* linter ([c58800a](c58800a929))
* logic and added test case ([b3e852a](b3e852adfc))
* Modify .json from desk to change `modified` ([1dc9812](1dc98124dc))
* only update User Permissions if a relevant field has changed ([b0f3d62](b0f3d62dd0))
* pos disable customer selection at payment (backport [#47169](https://github.com/frappe/erpnext/issues/47169)) ([#47170](https://github.com/frappe/erpnext/issues/47170)) ([7adba1f](7adba1f0f3))
* provision to recalculate the qty in the Bin ([5535eb4](5535eb4817))
* rate based on posting date in Tax Withholding Report ([9184c40](9184c40371))
* remove invalid parameter ([2431141](2431141062))
* remove unused import ([4fba4d4](4fba4d49d2))
* respect field "ignore_user_permissions" property in employee query ([a450ce2](a450ce25b9))
* respect mapped accounting dimensions ([846b24b](846b24ba52))
* revert unintended changes ([a09ab90](a09ab902e5))
* set correct paid/receive amount if doc currency is different from party account currency ([5dc63f9](5dc63f97a1))
* set default company address in Sales Doctype on change of company ([05d4c1e](05d4c1e6ca))
* show button only when RFQ is submitted ([9655bfa](9655bfa199))
* test cases ([dedb19e](dedb19e3e9))
* test cases error ([13d3b27](13d3b27a1f))
* update country wise fiscal year (backport [#47141](https://github.com/frappe/erpnext/issues/47141)) ([#47176](https://github.com/frappe/erpnext/issues/47176)) ([390780d](390780d871))
* use get_url_to_form instead ([ad35021](ad35021666))

### Features

* add button to show request for comparison report directly from RFQ ([cb2b956](cb2b9563e0))
* add unit tests for distributed_discount_amount ([6f6574c](6f6574c5ac))

### Reverts

* disable customer if creating from opportunity ([99735e0](99735e0af4))
2025-04-22 13:47:39 +00:00
ruthra kumar
f7efd006c2 Merge pull request #47204 from frappe/version-15-hotfix
chore: release v15
2025-04-22 19:16:15 +05:30
mergify[bot]
8050e653ab fix: get total without rounding off tax amounts for distributing discount (backport #47155)
Co-authored-by: Sagar Vora <16315650+sagarvora@users.noreply.github.com>
2025-04-22 17:53:10 +05:30
ruthra kumar
2ba6c78e5e Merge pull request #47210 from frappe/mergify/bp/version-15-hotfix/pr-47178
fix: keep per_billed 100 for billed delivery note after return (backport #47178)
2025-04-22 17:30:33 +05:30
Sugesh393
04a1578b53 refactor: update base_outstanding calculation
(cherry picked from commit 02356029a8)
2025-04-22 11:42:13 +00:00
Sugesh393
2b05ccfa6f test: add new unit test to keep per_billed 100 for billed delivery note
(cherry picked from commit fe5898a151)
2025-04-22 11:42:12 +00:00
Sugesh393
680c221f05 fix: keep per_billed 100 for billed delivery note after return
(cherry picked from commit 8290a83591)
2025-04-22 11:42:12 +00:00
ruthra kumar
bbbbb4da55 Merge pull request #47209 from frappe/mergify/bp/version-15-hotfix/pr-47183
fix: backslash in url (backport #47183)
2025-04-22 17:07:23 +05:30
ruthra kumar
e2f8ca5f87 chore: resolve conflict 2025-04-22 16:46:57 +05:30
ruthra kumar
6671f4df41 Merge pull request #47208 from frappe/mergify/bp/version-15-hotfix/pr-46717
fix: respect field "ignore_user_permissions" property in employee query (backport #46717)
2025-04-22 16:40:28 +05:30
Mihir Kandoi
4fba4d49d2 fix: remove unused import
(cherry picked from commit c3d172fac3)
2025-04-22 10:46:37 +00:00
Mihir Kandoi
982a68b71a fix: change get_url_to_form to get_link_to_form
(cherry picked from commit 5d07beee61)
2025-04-22 10:46:37 +00:00
Mihir Kandoi
a09ab902e5 fix: revert unintended changes
(cherry picked from commit eaaf34cda6)

# Conflicts:
#	erpnext/stock/doctype/material_request/material_request.json
2025-04-22 10:46:37 +00:00
Mihir Kandoi
ad35021666 fix: use get_url_to_form instead
(cherry picked from commit 7a82b37f76)
2025-04-22 10:46:36 +00:00
Mihir Kandoi
f6edd5aa7d fix: backslash in url
(cherry picked from commit ecf15130ba)

# Conflicts:
#	erpnext/stock/doctype/material_request/material_request.json
2025-04-22 10:46:36 +00:00
ljain112
e752f3f914 chore: added test case for employee query with user permissions
(cherry picked from commit 4be975f87c)

# Conflicts:
#	erpnext/controllers/tests/test_queries.py
2025-04-22 16:00:00 +05:30
ruthra kumar
31af933c1c Merge pull request #47207 from frappe/mergify/bp/version-15-hotfix/pr-47171
fix: set correct paid/receive amount if doc currency is different from party account currency (backport #47171)
2025-04-22 15:58:28 +05:30
ljain112
a450ce25b9 fix: respect field "ignore_user_permissions" property in employee query
(cherry picked from commit 91d7bc55be)
2025-04-22 10:12:30 +00:00
Soham Kulkarni
e152c72a7b Merge pull request #47201 from frappe/mergify/bp/version-15-hotfix/pr-47175
fix: add grand_total to show correct status in quick list widget (backport #47175)
2025-04-22 15:41:49 +05:30
ljain112
5dc63f97a1 fix: set correct paid/receive amount if doc currency is different from party account currency
(cherry picked from commit 9612521894)
2025-04-22 10:07:17 +00:00
rohitwaghchaure
8bc00ffbb4 Merge pull request #47206 from frappe/mergify/bp/version-15-hotfix/pr-47184
feat: add button to view Supplier Quotation Comparison directly from RFQ (backport #47184)
2025-04-22 15:16:01 +05:30
Mihir Kandoi
9655bfa199 fix: show button only when RFQ is submitted
(cherry picked from commit ef57d2b328)
2025-04-22 09:43:41 +00:00
Mihir Kandoi
cb2b9563e0 feat: add button to show request for comparison report directly from RFQ
(cherry picked from commit b4aa88b59b)
2025-04-22 09:43:41 +00:00
ruthra kumar
bb71b91d4a Merge pull request #47203 from frappe/mergify/bp/version-15-hotfix/pr-47180
fix: set default company address in selling Doctype on change of company (backport #47180)
2025-04-22 15:12:20 +05:30
ljain112
05d4c1e6ca fix: set default company address in Sales Doctype on change of company
(cherry picked from commit a31075692c)
2025-04-22 08:59:04 +00:00
Soham Kulkarni
d7556069e4 Merge pull request #47175 from sokumon/purchase-receipt-quick-list
fix: add grand_total to show correct status in quick list widget
(cherry picked from commit 68ca4a77c9)
2025-04-22 08:52:51 +00:00
ruthra kumar
a3821cf182 Merge pull request #47199 from frappe/mergify/bp/version-15-hotfix/pr-47138
fix: rate based on posting date in Tax Withholding Report (backport #47138)
2025-04-22 14:07:08 +05:30
ruthra kumar
18e3171cc9 Merge pull request #47197 from frappe/mergify/bp/version-15-hotfix/pr-47191
fix: expense account in stock entry (backport #47191)
2025-04-22 13:34:01 +05:30
ljain112
1f8fce253d chore: added test case for date period in multiple tax withholding rules
(cherry picked from commit 515fe340a8)

# Conflicts:
#	erpnext/accounts/report/tax_withholding_details/test_tax_withholding_details.py
2025-04-22 13:31:28 +05:30
ljain112
9184c40371 fix: rate based on posting date in Tax Withholding Report
(cherry picked from commit a32a79e90a)
2025-04-22 07:59:58 +00:00
Rohit Waghchaure
2f1f229144 fix: expense account in stock entry
(cherry picked from commit 75874b4986)
2025-04-22 07:46:37 +00:00
ruthra kumar
393e4462f8 Merge pull request #47195 from frappe/mergify/bp/version-15-hotfix/pr-47124
fix: `TypeError` in group field filter in supplier ledger summary (backport #47124)
2025-04-22 12:44:05 +05:30
ljain112
3b349f44b1 fix: TypeError in group field filter in supplier ledger summary
(cherry picked from commit 872e94a316)
2025-04-22 06:51:57 +00:00
rohitwaghchaure
c430ce96b3 Merge pull request #47185 from frappe/mergify/bp/version-15-hotfix/pr-47144
fix: provision to recalculate the qty in the Bin (backport #47144)
2025-04-22 12:20:46 +05:30
rohitwaghchaure
7b5297bb7f Merge pull request #47188 from frappe/mergify/bp/version-15-hotfix/pr-47186
fix: disabled UOM showing in the list (backport #47186)
2025-04-22 12:20:34 +05:30
Rohit Waghchaure
3d4f3e1be7 fix: disbaled UOM showing in the list
(cherry picked from commit 3745825052)
2025-04-21 16:43:17 +00:00
Rohit Waghchaure
5535eb4817 fix: provision to recalculate the qty in the Bin
(cherry picked from commit 36081413d8)
2025-04-21 15:49:11 +00:00
ruthra kumar
af35e43555 Merge pull request #47095 from frappe/mergify/bp/version-15-hotfix/pr-47007
chore: Fix typo "Item Wise Tax Detail " (backport #47007)
2025-04-21 16:50:22 +05:30
ruthra kumar
f53a45cfef chore: resolve conflict 2025-04-21 16:30:20 +05:30
ruthra kumar
19045bcace Merge pull request #47177 from frappe/mergify/bp/version-15-hotfix/pr-47067
fix: correct error message in validate_internal_transfer_qty (backport #47067)
2025-04-21 16:24:11 +05:30
ljain112
b8a7f6dac1 fix: correct error message in validate_internal_transfer_qty
(cherry picked from commit 5063f1174e)
2025-04-21 10:28:27 +00:00
ruthra kumar
f2c3150687 Merge pull request #47013 from frappe/mergify/bp/version-15-hotfix/pr-45924
fix(Employee): remove User Permissions if create_user_permission is unchecked (backport #45924)
2025-04-21 15:55:03 +05:30
mergify[bot]
390780d871 fix: update country wise fiscal year (backport #47141) (#47176)
fix: update country wise fiscal year (#47141)

(cherry picked from commit cb2ad4acdb)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-04-21 14:26:47 +05:30
mergify[bot]
7adba1f0f3 fix: pos disable customer selection at payment (backport #47169) (#47170)
fix: pos disable customer selection at payment (#47169)

(cherry picked from commit f52cbf6165)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-04-21 11:56:54 +05:30
Sagar Vora
d6d042868d Merge pull request #43067 from frappe/mergify/bp/version-15-hotfix/pr-41721
fix: distributed discounts on si (backport #41721)
2025-04-19 16:35:12 +05:30
Sagar Vora
f764b9713b Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-41721 2025-04-19 16:18:37 +05:30
Sagar Vora
16877fade8 Merge pull request #47157 from frappe/mergify/bp/version-15-hotfix/pr-47154
fix: respect mapped accounting dimensions (backport #47154)
2025-04-19 13:04:01 +05:30
Sagar Vora
846b24ba52 fix: respect mapped accounting dimensions
(cherry picked from commit 7dbe27da19)
2025-04-19 07:22:45 +00:00
mergify[bot]
451b1a19a8 chore: migrate pre-commit config (backport #47132) (#47134)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-04-17 14:18:00 +02:00
mergify[bot]
ad177e08b8 fix: create default warehouse (backport #47125) (#47131)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
fix: create default warehouse (#47125)
2025-04-17 13:40:05 +02:00
Frappe PR Bot
00a8503dd7 chore(release): Bumped to Version 15.58.2
## [15.58.2](https://github.com/frappe/erpnext/compare/v15.58.1...v15.58.2) (2025-04-17)

### Bug Fixes

* add group by after user permission condition ([0287f34](0287f34928))
2025-04-17 10:54:22 +00:00
ruthra kumar
76a2eb69a0 Merge pull request #47127 from frappe/mergify/bp/version-15/pr-47118
fix: add group by after user permission condition (backport #47118)
2025-04-17 16:22:18 +05:30
ruthra kumar
673694ae48 Merge pull request #47128 from frappe/mergify/bp/version-15-hotfix/pr-47118
fix: add group by after user permission condition (backport #47118)
2025-04-17 16:22:07 +05:30
venkat102
0287f34928 fix: add group by after user permission condition
(cherry picked from commit 756d496235)
2025-04-17 10:36:57 +00:00
venkat102
f07c3d9124 fix: add group by after user permission condition
(cherry picked from commit 756d496235)
2025-04-17 10:36:57 +00:00
rohitwaghchaure
d18266d839 Merge pull request #47048 from frappe/mergify/bp/version-15-hotfix/pr-46938
fix: group sub assemblies in production plan (backport #46938)
2025-04-17 15:31:08 +05:30
rohitwaghchaure
0c714e2bd9 Merge pull request #47114 from frappe/mergify/bp/version-15-hotfix/pr-47050
fix: consider per_ordered instead of per_billed when creating PO from MR (backport #47050)
2025-04-16 22:49:24 +05:30
Mihir Kandoi
20aba541c4 fix: cherry pick 2025-04-16 20:32:05 +05:30
Mihir Kandoi
be154a469f fix: consider per_ordered instead of per_billed when creating PO from MR
(cherry picked from commit 5a524854de)

# Conflicts:
#	erpnext/stock/doctype/material_request/material_request.js
2025-04-16 10:58:52 +00:00
Frappe PR Bot
741f29e57a chore(release): Bumped to Version 15.58.1
## [15.58.1](https://github.com/frappe/erpnext/compare/v15.58.0...v15.58.1) (2025-04-16)

### Bug Fixes

* revert [#46903](https://github.com/frappe/erpnext/issues/46903) - disable changing customer on opportunity ([5c04d18](5c04d183bf))
2025-04-16 05:15:20 +00:00
ruthra kumar
5090108718 Merge pull request #47110 from frappe/mergify/bp/version-15/pr-47108
revert: disable customer if creating from opportunity (backport #47108)
2025-04-16 10:44:01 +05:30
Shariq Ansari
5c04d183bf fix: revert #46903 - disable changing customer on opportunity
(cherry picked from commit fc16199a49)
2025-04-16 10:38:17 +05:30
Shariq Ansari
bb6d6c3edf Merge pull request #47109 from frappe/mergify/bp/version-15-hotfix/pr-47108 2025-04-16 10:22:33 +05:30
Shariq Ansari
99735e0af4 revert: disable customer if creating from opportunity
(cherry picked from commit fc16199a49)
2025-04-16 04:51:33 +00:00
Frappe PR Bot
929d177b7d chore(release): Bumped to Version 15.58.0
# [15.58.0](https://github.com/frappe/erpnext/compare/v15.57.5...v15.58.0) (2025-04-16)

### Bug Fixes

* added missing project field on pos profile ([8e9ddb7](8e9ddb7a69))
* allow to use batchwise valuation for moving average items ([e479975](e479975f54))
* backport translations from develop ([#47104](https://github.com/frappe/erpnext/issues/47104)) ([188c4f8](188c4f896a))
* batchwise valuation for MA item ([debfcdc](debfcdc61f))
* bypass validation during reposting ([01aad96](01aad96b10))
* child values for tree doctypes and query refactor ([537a8ef](537a8efe7a))
* clarify confirmation message ([35daf66](35daf669fe))
* condition for use_batchwise_valuation ([0ff7465](0ff7465e27))
* configuration to accept partial payment in pos invoice ([#47052](https://github.com/frappe/erpnext/issues/47052)) ([a944853](a944853b56))
* consider negative stock qty in stock reco ([603f737](603f737c99))
* correct doctype in item_wise_purchase register ([b2fb4fb](b2fb4fba51))
* correct function name ([393d245](393d2459b9))
* correct outstanding amount for invoice in dunning ([b7c3fa2](b7c3fa23d2))
* current batch qty showing zero in the stock reconciliation ([24c8a06](24c8a06520))
* enabled allow on submit for asset name field (backport [#47093](https://github.com/frappe/erpnext/issues/47093)) ([#47094](https://github.com/frappe/erpnext/issues/47094)) ([3f652bd](3f652bd4e1))
* fetch exchange rate while creating inter-company order and invoice ([aa0b93d](aa0b93d0b2))
* go for lower case "on" because we already have translations for that ([7cf83ff](7cf83ffce7))
* Group GLs by account for TB generation ([416d9bc](416d9bce2c))
* item code not showing in the error message ([663e2b7](663e2b7e6c))
* make report's "printed on" translatable ([18e9a98](18e9a9881c))
* map tax table while creating purchase order from sales order ([127c7b9](127c7b93ac))
* **Payment Entry:** set account type if missing (backport [#47069](https://github.com/frappe/erpnext/issues/47069)) ([#47070](https://github.com/frappe/erpnext/issues/47070)) ([8e02a9b](8e02a9bc28))
* precision issue on qty_to_be_reserved ([c8691b6](c8691b6516))
* recognize trigger from child table ([cf00d42](cf00d42799))
* Recreate Stock Ledgers issue ([b819e0a](b819e0a61b))
* remove get_items query.run outside of if condition ([e7b5303](e7b5303782))
* remove redundant letter head ([7896f8a](7896f8a855))
* removed display depends on ([00b2553](00b25537f4))
* resolved conflicts ([bde55d2](bde55d2a07))
* revert [#46900](https://github.com/frappe/erpnext/issues/46900) - against_voucher filter in general ledger ([da65f44](da65f44a47))
* test file for v15 ([cc7756d](cc7756dd49))
* translatability ([79ed02b](79ed02bb2c))
* update the modified date in for SLEs and GLs after rename ([21f0dcb](21f0dcbcc3))
* use source_fieldname to validate inventory dimension ([250b670](250b67076d))
* use the actual field label ([0c260ba](0c260baacd))
* wording ([db647a4](db647a4e42))

### Features

* Allow to Make Quality Inspection after Purchase / Delivery ([2e6ba91](2e6ba91589))
* available serial no report ([c472af8](c472af87b2))
* clear payment terms and schedule ([830290c](830290c859))
* fetch source_fieldname for inventory dimension ([2ed6c21](2ed6c211f9))
* **regional:** Address Template for Germany & Add Switzerland Template ([#46737](https://github.com/frappe/erpnext/issues/46737)) ([42479d9](42479d9a7f))
* update due date in payment schedule ([0b0a6b8](0b0a6b8cfa))

### Performance Improvements

* refactored customer ledger summary for performance ([50b2196](50b2196020))
* take query out of loop ([9af5052](9af50528f1))
2025-04-16 04:05:56 +00:00
ruthra kumar
7555d27d82 Merge pull request #47091 from frappe/version-15-hotfix
chore: release v15
2025-04-16 09:34:34 +05:30
ruthra kumar
4a7b91352b Merge pull request #47099 from frappe/mergify/bp/version-15-hotfix/pr-46770
fix: correct outstanding amount for invoice in dunning (backport #46770)
2025-04-16 07:44:32 +05:30
Raffael Meyer
188c4f896a fix: backport translations from develop (#47104) 2025-04-15 19:30:17 +02:00
rohitwaghchaure
9bdeacbbfa Merge pull request #47097 from frappe/mergify/bp/version-15-hotfix/pr-46973
fix: precision issue on qty_to_be_reserved (backport #46973)
2025-04-15 22:01:34 +05:30
ljain112
c42f76b15a chore: added test for Fetch Overdue Payments in dunning
(cherry picked from commit 3b613c44a6)

# Conflicts:
#	erpnext/accounts/doctype/dunning/test_dunning.py
2025-04-15 20:35:09 +05:30
Diptanil Saha
a944853b56 fix: configuration to accept partial payment in pos invoice (#47052) 2025-04-15 19:03:55 +05:30
ljain112
b7c3fa23d2 fix: correct outstanding amount for invoice in dunning
(cherry picked from commit c2bdd30e6d)
2025-04-15 12:21:58 +00:00
ruthra kumar
073a7a6ca6 Merge pull request #47096 from frappe/mergify/bp/version-15-hotfix/pr-47001
fix: fetch exchange rate while creating inter-company order and invoice (backport #47001)
2025-04-15 17:46:38 +05:30
Dany Robert
c8691b6516 fix: precision issue on qty_to_be_reserved
(cherry picked from commit 860699ee7b)

# Conflicts:
#	erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py
2025-04-15 17:42:30 +05:30
venkat102
aa0b93d0b2 fix: fetch exchange rate while creating inter-company order and invoice
(cherry picked from commit 145a6c5e2a)
2025-04-15 12:07:54 +00:00
mergify[bot]
3f652bd4e1 fix: enabled allow on submit for asset name field (backport #47093) (#47094)
fix: enabled allow on submit for asset name field (#47093)

(cherry picked from commit e41720f1a3)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-04-15 17:33:58 +05:30
marination
1dc98124dc fix: Modify .json from desk to change modified
(cherry picked from commit be556167b1)

# Conflicts:
#	erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.json
2025-04-15 11:32:47 +00:00
Himanshu Shivhare
5cb8e5dfbd chore: Fix typo "Item Wise Tax Detail "
(cherry picked from commit 9624d56abd)
2025-04-15 11:32:46 +00:00
ruthra kumar
f816934a28 Merge pull request #47086 from frappe/mergify/bp/version-15-hotfix/pr-46640
perf: refactored customer ledger summary for performance (backport #46640)
2025-04-15 13:46:55 +05:30
ruthra kumar
1e340ccd9c chore: use correct Test class 2025-04-15 13:29:22 +05:30
ruthra kumar
21e94148db chore: resolve conflict 2025-04-15 13:20:56 +05:30
ruthra kumar
233a2c08a1 test: basic supplier ledger summary
(cherry picked from commit 71f0f7a0b5)
2025-04-15 13:20:56 +05:30
ruthra kumar
11566e20b5 test: basic output of customer ledger summary report
(cherry picked from commit 9a3a80dfd3)
2025-04-15 13:20:56 +05:30
ljain112
393d2459b9 fix: correct function name
(cherry picked from commit 038355f87b)
2025-04-15 13:20:56 +05:30
ljain112
537a8efe7a fix: child values for tree doctypes and query refactor
(cherry picked from commit fca46e0b2d)

# Conflicts:
#	erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py
2025-04-15 13:20:56 +05:30
ljain112
50b2196020 perf: refactored customer ledger summary for performance
(cherry picked from commit e84e49345a)

# Conflicts:
#	erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py
2025-04-15 13:20:56 +05:30
ruthra kumar
0ad8935f2c Merge pull request #47081 from frappe/mergify/bp/version-15-hotfix/pr-46789
fix: map tax table while creating purchase order from sales order (backport #46789)
2025-04-15 12:10:21 +05:30
ruthra kumar
148287d8a1 Merge pull request #46935 from frappe/mergify/bp/version-15-hotfix/pr-46171
Fix validation mismatch in inventory dimension fields (backport #46171)
2025-04-15 11:54:24 +05:30
ruthra kumar
f4854a9a02 Merge pull request #46816 from frappe/mergify/bp/version-15-hotfix/pr-46737
feat(regional): Address Template for Germany & Add Switzerland Template (backport #46737)
2025-04-15 11:51:17 +05:30
ruthra kumar
b7cbc66a28 chore: resolve conflict 2025-04-15 11:45:17 +05:30
Sugesh393
5a20b9e94f test: add unit test to validate tax values in Purchase Order from Sales Order
(cherry picked from commit a393195866)

# Conflicts:
#	erpnext/selling/doctype/sales_order/test_sales_order.py
2025-04-15 06:13:11 +00:00
Sugesh393
127c7b93ac fix: map tax table while creating purchase order from sales order
(cherry picked from commit 1e18569be7)
2025-04-15 06:13:11 +00:00
mergify[bot]
c77f7f4ff0 test(Payment Entry): account type is set (backport #47071) (#47073)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-04-14 19:26:11 +02:00
mergify[bot]
8e02a9bc28 fix(Payment Entry): set account type if missing (backport #47069) (#47070)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
fix(Payment Entry): set account type if missing (#47069)
2025-04-14 18:54:12 +02:00
rohitwaghchaure
640012429e Merge pull request #47063 from frappe/mergify/bp/version-15-hotfix/pr-47058
fix: consider negative stock qty in stock reconciliation (backport #47058)
2025-04-14 20:30:25 +05:30
Rohit Waghchaure
603f737c99 fix: consider negative stock qty in stock reco
(cherry picked from commit 15272d0e56)
2025-04-14 12:39:35 +00:00
ruthra kumar
4fd99ed763 Merge pull request #46773 from frappe/mergify/bp/version-15-hotfix/pr-46683
fix: Set complete contact details for `Employee` in PE (backport #46683)
2025-04-14 17:30:51 +05:30
Frappe PR Bot
2eb7a688cb chore(release): Bumped to Version 15.57.5
## [15.57.5](https://github.com/frappe/erpnext/compare/v15.57.4...v15.57.5) (2025-04-14)

### Bug Fixes

* revert [#46900](https://github.com/frappe/erpnext/issues/46900) - against_voucher filter in general ledger ([969c354](969c3549d5))
2025-04-14 08:24:20 +00:00
ruthra kumar
19a5b923b9 Merge pull request #47053 from frappe/mergify/bp/version-15/pr-47049
Revert "fix: remove against_voucher and against_voucher_type column from General Ledger Report" (backport #47049)
2025-04-14 13:52:55 +05:30
ruthra kumar
77bbaef5a6 Merge pull request #47055 from frappe/mergify/bp/version-15-hotfix/pr-47049
Revert "fix: remove against_voucher and against_voucher_type column from General Ledger Report" (backport #47049)
2025-04-14 13:52:05 +05:30
Mihir Kandoi
c58800a929 fix: linter 2025-04-14 13:33:48 +05:30
Mihir Kandoi
924e9b94b6 fix: import error 2025-04-14 13:28:06 +05:30
ruthra kumar
6bfb3c6905 chore: resolve conflict 2025-04-14 13:26:32 +05:30
ruthra kumar
a0908522c1 chore: resolve conflict 2025-04-14 13:21:33 +05:30
ruthra kumar
da65f44a47 fix: revert #46900 - against_voucher filter in general ledger
(cherry picked from commit adb331ef71)

# Conflicts:
#	erpnext/accounts/report/general_ledger/general_ledger.py
2025-04-14 07:50:28 +00:00
ruthra kumar
969c3549d5 fix: revert #46900 - against_voucher filter in general ledger
(cherry picked from commit adb331ef71)

# Conflicts:
#	erpnext/accounts/report/general_ledger/general_ledger.py
2025-04-14 07:49:32 +00:00
Mihir Kandoi
13d3b27a1f fix: test cases error
(cherry picked from commit 8df18762a9)
2025-04-14 06:41:28 +00:00
Mihir Kandoi
dedb19e3e9 fix: test cases
(cherry picked from commit a7394329ca)
2025-04-14 06:41:27 +00:00
Mihir Kandoi
b3e852adfc fix: logic and added test case
(cherry picked from commit f071255340)
2025-04-14 06:41:27 +00:00
Mihir Kandoi
73683b2754 fix: group sub assemblies in production plan
(cherry picked from commit f58abed935)
2025-04-14 06:41:27 +00:00
Frappe PR Bot
1da2577035 chore(release): Bumped to Version 15.57.4
## [15.57.4](https://github.com/frappe/erpnext/compare/v15.57.3...v15.57.4) (2025-04-13)

### Bug Fixes

* Group GLs by account for TB generation ([70fa366](70fa366216))
2025-04-13 14:13:43 +00:00
Deepesh Garg
e5d0ab6bab Merge pull request #47045 from frappe/mergify/bp/version-15/pr-47044
fix: Group GLs by account for TB generation
2025-04-13 19:42:19 +05:30
Deepesh Garg
70fa366216 fix: Group GLs by account for TB generation
(cherry picked from commit f894c6d275)
(cherry picked from commit 416d9bce2c)
2025-04-13 14:02:23 +00:00
Deepesh Garg
f1254e51e5 Merge pull request #47044 from frappe/mergify/bp/version-15-hotfix/pr-47043
fix: Group GLs by account for TB generation (backport #47043)
2025-04-13 19:31:29 +05:30
Deepesh Garg
416d9bce2c fix: Group GLs by account for TB generation
(cherry picked from commit f894c6d275)
2025-04-13 13:57:23 +00:00
Frappe PR Bot
065c9fa85f chore(release): Bumped to Version 15.57.3
## [15.57.3](https://github.com/frappe/erpnext/compare/v15.57.2...v15.57.3) (2025-04-12)

### Bug Fixes

* correct doctype in item_wise_purchase register ([cd68832](cd68832aa0))
2025-04-12 02:01:06 +00:00
ruthra kumar
bcb45ce8ef Merge pull request #47031 from frappe/mergify/bp/version-15/pr-47012
fix: correct doctype in item_wise_purchase register (backport #47012)
2025-04-12 07:29:44 +05:30
ruthra kumar
f5fd255e82 Merge pull request #47033 from frappe/mergify/bp/version-15-hotfix/pr-47012
fix: correct doctype in item_wise_purchase register (backport #47012)
2025-04-12 07:29:14 +05:30
ljain112
b2fb4fba51 fix: correct doctype in item_wise_purchase register
(cherry picked from commit b8b8dce733)
2025-04-12 01:42:25 +00:00
ljain112
cd68832aa0 fix: correct doctype in item_wise_purchase register
(cherry picked from commit b8b8dce733)
2025-04-12 01:41:15 +00:00
rohitwaghchaure
1b8a317de9 Merge pull request #47027 from frappe/mergify/bp/version-15-hotfix/pr-47026
fix: batchwise valuation for MA item (backport #47026)
2025-04-11 22:56:25 +05:30
Rohit Waghchaure
debfcdc61f fix: batchwise valuation for MA item
(cherry picked from commit 504b8c0a68)
2025-04-11 16:27:52 +00:00
Frappe PR Bot
8a33866a8c chore(release): Bumped to Version 15.57.2
## [15.57.2](https://github.com/frappe/erpnext/compare/v15.57.1...v15.57.2) (2025-04-11)

### Bug Fixes

* condition for use_batchwise_valuation ([18dd128](18dd128838))
* removed display depends on ([b8436db](b8436dbd21))
2025-04-11 15:16:34 +00:00
rohitwaghchaure
d3a987800b Merge pull request #47025 from frappe/mergify/bp/version-15/pr-47021
fix: removed display depends on (backport #47020) (backport #47021)
2025-04-11 20:45:07 +05:30
rohitwaghchaure
1e19bc7f3f Merge pull request #47024 from frappe/mergify/bp/version-15/pr-47023
fix: condition for use_batchwise_valuation (backport #47022) (backport #47023)
2025-04-11 20:44:54 +05:30
rohitwaghchaure
fa7675488d chore: fix conflicts 2025-04-11 20:26:43 +05:30
Rohit Waghchaure
b8436dbd21 fix: removed display depends on
(cherry picked from commit e0bf45e03b)
(cherry picked from commit 00b25537f4)

# Conflicts:
#	erpnext/stock/doctype/stock_settings/stock_settings.json
2025-04-11 14:24:37 +00:00
Rohit Waghchaure
18dd128838 fix: condition for use_batchwise_valuation
(cherry picked from commit cc171d9706)
(cherry picked from commit 0ff7465e27)
2025-04-11 14:24:31 +00:00
rohitwaghchaure
706092061b Merge pull request #47021 from frappe/mergify/bp/version-15-hotfix/pr-47020
fix: removed display depends on (backport #47020)
2025-04-11 19:53:43 +05:30
rohitwaghchaure
c6c8aa02eb Merge pull request #47023 from frappe/mergify/bp/version-15-hotfix/pr-47022
fix: condition for use_batchwise_valuation (backport #47022)
2025-04-11 19:53:22 +05:30
Rohit Waghchaure
0ff7465e27 fix: condition for use_batchwise_valuation
(cherry picked from commit cc171d9706)
2025-04-11 14:06:08 +00:00
Rohit Waghchaure
00b25537f4 fix: removed display depends on
(cherry picked from commit e0bf45e03b)
2025-04-11 13:46:39 +00:00
Frappe PR Bot
ff41ed534b chore(release): Bumped to Version 15.57.1
## [15.57.1](https://github.com/frappe/erpnext/compare/v15.57.0...v15.57.1) (2025-04-11)

### Bug Fixes

* allow to use batchwise valuation for moving average items ([dded682](dded682feb))
2025-04-11 12:22:21 +00:00
rohitwaghchaure
f2684d9b4c Merge pull request #47018 from frappe/mergify/bp/version-15/pr-47017
fix: allow to use batch-wise valuation for moving average items (backport #47015) (backport #47017)
2025-04-11 17:50:55 +05:30
rohitwaghchaure
6dee592ba7 Merge pull request #47004 from frappe/mergify/bp/version-15-hotfix/pr-47002
feat: Allow to Make Quality Inspection after Purchase / Delivery (backport #47002)
2025-04-11 17:26:53 +05:30
Rohit Waghchaure
dded682feb fix: allow to use batchwise valuation for moving average items
(cherry picked from commit 65ba79bb85)
(cherry picked from commit e479975f54)
2025-04-11 11:56:35 +00:00
rohitwaghchaure
8233aadd50 Merge pull request #47017 from frappe/mergify/bp/version-15-hotfix/pr-47015
fix: allow to use batch-wise valuation for moving average items (backport #47015)
2025-04-11 17:25:29 +05:30
Rohit Waghchaure
e479975f54 fix: allow to use batchwise valuation for moving average items
(cherry picked from commit 65ba79bb85)
2025-04-11 11:38:32 +00:00
barredterra
2431141062 fix: remove invalid parameter 2025-04-11 13:07:44 +02:00
Patrick Eissler
b0e8f85a27 refactor: make linter happy 2025-04-11 12:25:58 +02:00
Patrick Eissler
b0f3d62dd0 fix: only update User Permissions if a relevant field has changed 2025-04-11 12:25:26 +02:00
Patrick Eissler
e47d07d98c chore: use existing utility function 2025-04-11 12:24:25 +02:00
Patrick Eissler
7ab81b7e54 fix(Employee): remove User Permissions if create_user_permission is unchecked 2025-04-11 12:24:04 +02:00
rohitwaghchaure
5e1d3f77bb chore: fix conflicts 2025-04-11 15:35:36 +05:30
rohitwaghchaure
00ac8597b0 chore: fix conflicts 2025-04-11 15:34:45 +05:30
rohitwaghchaure
4163b18ec3 Merge pull request #47005 from frappe/mergify/bp/version-15-hotfix/pr-46997
fix: update the modified date in for SLEs and GLs after rename (backport #46997)
2025-04-11 14:43:02 +05:30
Rohit Waghchaure
21f0dcbcc3 fix: update the modified date in for SLEs and GLs after rename
(cherry picked from commit dc5a5ef258)
2025-04-10 12:10:48 +00:00
Rohit Waghchaure
2e6ba91589 feat: Allow to Make Quality Inspection after Purchase / Delivery
(cherry picked from commit 8eaa2afeb7)

# Conflicts:
#	erpnext/stock/doctype/stock_settings/stock_settings.json
2025-04-10 12:10:47 +00:00
rohitwaghchaure
14a502c956 Merge pull request #46998 from frappe/mergify/bp/version-15-hotfix/pr-46831
fix: current batch qty showing zero in the stock reconciliation (backport #46831)
2025-04-10 15:39:34 +05:30
Rohit Waghchaure
24c8a06520 fix: current batch qty showing zero in the stock reconciliation
(cherry picked from commit a5c62f8623)
2025-04-10 08:30:28 +00:00
Frappe PR Bot
1326ba5326 chore(release): Bumped to Version 15.57.0
# [15.57.0](https://github.com/frappe/erpnext/compare/v15.56.0...v15.57.0) (2025-04-10)

### Bug Fixes

* bypass validation during reposting ([eaaac6e](eaaac6e596))
* item code not showing in the error message ([837509a](837509ae47))
* Recreate Stock Ledgers issue ([3db70fe](3db70febe1))
* remove get_items query.run outside of if condition ([bff4902](bff4902993))
* test file for v15 ([88f1cf2](88f1cf2943))

### Features

* available serial no report ([0f6a7ed](0f6a7edb53))

### Performance Improvements

* take query out of loop ([c7fead6](c7fead6bb0))
2025-04-10 07:31:47 +00:00
rohitwaghchaure
d047c965c6 Merge pull request #46990 from frappe/mergify/bp/version-15/pr-46947
feat: available serial no report (backport #46383) (backport #46947)
2025-04-10 12:59:58 +05:30
rohitwaghchaure
72e9844d27 Merge pull request #46987 from frappe/mergify/bp/version-15/pr-46985
fix: item code not showing in the error message (backport #46933) (backport #46985)
2025-04-10 12:59:36 +05:30
rohitwaghchaure
528b7534f7 Merge pull request #46991 from frappe/mergify/bp/version-15/pr-46989
fix: Recreate Stock Ledgers issue (backport #46965) (backport #46989)
2025-04-10 12:59:23 +05:30
rohitwaghchaure
3141e4a54f Merge pull request #46992 from frappe/mergify/bp/version-15/pr-46988
fix: bypass validation during reposting (backport #46978) (backport #46988)
2025-04-10 12:59:02 +05:30
Rohit Waghchaure
eaaac6e596 fix: bypass validation during reposting
(cherry picked from commit 3697b9fd9b)
(cherry picked from commit 01aad96b10)
2025-04-10 06:52:18 +00:00
Rohit Waghchaure
3db70febe1 fix: Recreate Stock Ledgers issue
(cherry picked from commit 229a4cef45)
(cherry picked from commit b819e0a61b)
2025-04-10 06:52:17 +00:00
rohitwaghchaure
13f73b59df Merge pull request #46988 from frappe/mergify/bp/version-15-hotfix/pr-46978
fix: bypass validation during reposting (backport #46978)
2025-04-10 12:21:36 +05:30
rohitwaghchaure
b4efba80a7 Merge pull request #46989 from frappe/mergify/bp/version-15-hotfix/pr-46965
fix: Recreate Stock Ledgers issue (backport #46965)
2025-04-10 12:21:00 +05:30
Mihir Kandoi
88f1cf2943 fix: test file for v15
(cherry picked from commit cc7756dd49)
2025-04-10 06:14:40 +00:00
Mihir Kandoi
81f3f43e14 refactor: split and clean execute function to be more readable
(cherry picked from commit 036af54d54)
(cherry picked from commit 6fedb7b9db)
2025-04-10 06:14:40 +00:00
Mihir Kandoi
c7fead6bb0 perf: take query out of loop
(cherry picked from commit 26de902496)
(cherry picked from commit 9af50528f1)
2025-04-10 06:14:40 +00:00
Mihir Kandoi
bff4902993 fix: remove get_items query.run outside of if condition
(cherry picked from commit 80c17cc005)
(cherry picked from commit e7b5303782)
2025-04-10 06:14:39 +00:00
Mihir Kandoi
9cdd32ad6b refactor: import functions in new report instead of redundant code
(cherry picked from commit 501f07803e)
(cherry picked from commit 0ec026ec7e)
2025-04-10 06:14:39 +00:00
Mihir Kandoi
0f6a7edb53 feat: available serial no report
(cherry picked from commit 5592d8e87f)
(cherry picked from commit c472af87b2)
2025-04-10 06:14:39 +00:00
Rohit Waghchaure
b819e0a61b fix: Recreate Stock Ledgers issue
(cherry picked from commit 229a4cef45)
2025-04-10 06:13:44 +00:00
Rohit Waghchaure
01aad96b10 fix: bypass validation during reposting
(cherry picked from commit 3697b9fd9b)
2025-04-10 06:13:26 +00:00
Rohit Waghchaure
837509ae47 fix: item code not showing in the error message
(cherry picked from commit 86dee69c2f)
(cherry picked from commit 663e2b7e6c)
2025-04-10 06:02:32 +00:00
rohitwaghchaure
860aba47ef Merge pull request #46985 from frappe/mergify/bp/version-15-hotfix/pr-46933
fix: item code not showing in the error message (backport #46933)
2025-04-10 11:31:59 +05:30
rohitwaghchaure
1b6c4b6b4b Merge pull request #46947 from frappe/mergify/bp/version-15-hotfix/pr-46383
feat: available serial no report (backport #46383)
2025-04-10 11:29:02 +05:30
Rohit Waghchaure
663e2b7e6c fix: item code not showing in the error message
(cherry picked from commit 86dee69c2f)
2025-04-10 05:35:55 +00:00
Mihir Kandoi
cc7756dd49 fix: test file for v15 2025-04-09 20:47:10 +05:30
Diptanil Saha
d79de4a434 Merge pull request #46969 from frappe/mergify/bp/version-15-hotfix/pr-46964
fix: added missing project field on pos profile (backport #46964)
2025-04-09 15:57:57 +05:30
Diptanil Saha
b8ef83e1ea chore: resolve conflict 2025-04-09 15:39:15 +05:30
diptanilsaha
8e9ddb7a69 fix: added missing project field on pos profile
(cherry picked from commit 821d64241a)

# Conflicts:
#	erpnext/accounts/doctype/pos_profile/pos_profile.json
2025-04-09 10:05:23 +00:00
Raffael Meyer
d43ce7f8e0 Merge pull request #46960 from frappe/mergify/bp/version-15-hotfix/pr-46959
fix: interaction with due date / payment terms / payment schedule (backport #46959)
2025-04-08 21:34:53 +02:00
barredterra
b5353e4ad1 chore: add german translation 2025-04-08 21:19:34 +02:00
barredterra
14efeb4acd chore: add context
(cherry picked from commit c00f62d54a)
2025-04-08 19:01:35 +00:00
barredterra
35daf669fe fix: clarify confirmation message
(cherry picked from commit 57be8a85d6)
2025-04-08 19:01:34 +00:00
barredterra
0c260baacd fix: use the actual field label
(cherry picked from commit 8a4db69581)
2025-04-08 19:01:34 +00:00
barredterra
cf00d42799 fix: recognize trigger from child table
(cherry picked from commit c55c77f4e9)
2025-04-08 19:01:34 +00:00
barredterra
b06a86541b refactor: use doc parameter instead of this.frm.doc
(cherry picked from commit 87c21a89fe)
2025-04-08 19:01:34 +00:00
Raffael Meyer
f762f7ec3e Merge pull request #46957 from barredterra/update-due-date
feat: update due date in payment schedule
2025-04-08 20:47:13 +02:00
Raffael Meyer
12bd9af3aa Merge pull request #46826 from frappe/mergify/bp/version-15-hotfix/pr-40050
fix: handle due date change (backport #40050)
2025-04-08 20:33:22 +02:00
barredterra
0b0a6b8cfa feat: update due date in payment schedule
Partial backport of b629356b7c
2025-04-08 20:12:25 +02:00
barredterra
830290c859 feat: clear payment terms and schedule 2025-04-08 20:10:31 +02:00
barredterra
98b75aaa38 Merge remote-tracking branch 'upstream/version-15-hotfix' into mergify/bp/version-15-hotfix/pr-40050 2025-04-08 19:59:34 +02:00
Raffael Meyer
d319d89988 Merge pull request #46949 from frappe/mergify/bp/version-15-hotfix/pr-46913
fix: improve translatability of query report print formats (backport #46913)
2025-04-08 16:11:18 +02:00
barredterra
d94ebd0c78 chore: add missing german translation 2025-04-08 15:56:48 +02:00
barredterra
7896f8a855 fix: remove redundant letter head 2025-04-08 15:33:12 +02:00
barredterra
7cf83ffce7 fix: go for lower case "on" because we already have translations for that 2025-04-08 15:31:25 +02:00
barredterra
18e9a9881c fix: make report's "printed on" translatable 2025-04-08 15:30:54 +02:00
Frappe PR Bot
52257c946e chore(release): Bumped to Version 15.56.0
# [15.56.0](https://github.com/frappe/erpnext/compare/v15.55.5...v15.56.0) (2025-04-08)

### Bug Fixes

* **accounting:** update outstanding amount based on update_outstanding_for_self ([fb06f88](fb06f886d2))
* add `Not Cancelled` filter for `payment_entry` in Bank Transaction ([5d47db7](5d47db78e6))
* check payments against orders for getting request amount ([cf7252d](cf7252d3e7))
* condition to update the last puurchase rate ([353fa0c](353fa0cbc3))
* correct mapping(schedule_date) sales order to material request ([e2c8ed2](e2c8ed2afd))
* correct payment request amount ([23c76aa](23c76aa530))
* decimal values causing incorrect batch picking ([c5efdda](c5efddae16))
* do not use self object for setting party and party type ([d1311e6](d1311e619d))
* **Dunning:** undefined variable (backport [#46868](https://github.com/frappe/erpnext/issues/46868)) ([#46869](https://github.com/frappe/erpnext/issues/46869)) ([f63595c](f63595cf0c))
* empty party filter on change of party type in General Ledger Report. ([95cc282](95cc2827c6))
* expense account in the stock entry ([62f342e](62f342ef8b))
* Fix fieldtype in UnReconcile dialog ([7dfff8d](7dfff8d3a2))
* for deadlock issue keep status as In Progress ([34e66b1](34e66b1b27))
* ignore backflush setting on subcontracting return ([ca56150](ca56150918))
* improved rounding adjustment when applying discount (backport [#46720](https://github.com/frappe/erpnext/issues/46720)) ([7b864be](7b864bece8))
* include auto_reconcile_vouchers flag in background job ([26f93f5](26f93f57b8))
* incorrect condition ([502b8f2](502b8f25b3))
* inventory dimensions columns visibility depends on filter ([fe0e5c2](fe0e5c2d48))
* make message translatable (backport [#46863](https://github.com/frappe/erpnext/issues/46863)) ([#46866](https://github.com/frappe/erpnext/issues/46866)) ([d7bb4a2](d7bb4a288c))
* multiple Bank Reconciliation Tool issues ([#46644](https://github.com/frappe/erpnext/issues/46644)) ([e168483](e168483a58))
* **payment term:** allocate payment amount when payment term is fetched from order ([1b9980b](1b9980bb86))
* **portal:** context pay_amount for button ([b7ae17a](b7ae17aaaf))
* **portal:** payment amount for orders ([b0302d7](b0302d71b7))
* pos checking opened entry closed or not (backport [#46726](https://github.com/frappe/erpnext/issues/46726)) ([#46830](https://github.com/frappe/erpnext/issues/46830)) ([80f144a](80f144ac22))
* pos closed dialog on pos closing entry (backport [#46881](https://github.com/frappe/erpnext/issues/46881)) ([#46882](https://github.com/frappe/erpnext/issues/46882)) ([c1fe8f6](c1fe8f6000))
* pos opening entry's status not getting updated on cancel (backport [#46909](https://github.com/frappe/erpnext/issues/46909)) ([#46911](https://github.com/frappe/erpnext/issues/46911)) ([8b11d13](8b11d13cd4))
* remove against_voucher from General Ledger Report ([ba1e7e1](ba1e7e17fb))
* remove all serial/batch fields when use button is unselected ([13f1afa](13f1afa141))
* removed customer_group query in customer.js ([1aac8d3](1aac8d31f4))
* removed hardcoded search fields to fix performance issue ([48822f6](48822f6fee))
* resolve conflicts ([4d8984e](4d8984e4e9))
* restrict customer change if creating from opportunity ([2661147](26611475f6))
* set draft QC in purchase document on creation of qc ([54159b9](54159b9e5e))
* slow query ([23dc9d5](23dc9d5872))
* slow query ([af0fb13](af0fb131a2))
* stock entry repack amount calculation ([8c61639](8c61639062))
* Translate UnReconcile dialog title (backport [#46818](https://github.com/frappe/erpnext/issues/46818)) ([#46861](https://github.com/frappe/erpnext/issues/46861)) ([fcade5d](fcade5d8cd))
* update outstanding with precision ([e115409](e1154090f6))
* update payment amount if automatically_fetch_payment_terms is enabled ([ea289a4](ea289a40fb))
* update posting date before running validations ([2bf44dc](2bf44dc326))
* use `grand_total_diff` instead of `rounding_adjustment` in `taxes_and_totals` ([55b17b9](55b17b918f))
* use docstatus for status filter ([ab52524](ab52524f12))
* use get instead of dot operator to access dict value ([f2df8e5](f2df8e531d))
* use work_order bom_no if no bom present in operation ([c6979ab](c6979ab260))
* user permissions in sales and purchase report ([c705623](c705623fdc))
* validate if pos is opened before pos invoice creation (backport [#46907](https://github.com/frappe/erpnext/issues/46907)) ([#46910](https://github.com/frappe/erpnext/issues/46910)) ([999ab28](999ab28bf0))
* valuation rate not updating for raw materials ([454dd3a](454dd3a2f1))

### Features

* allow UOMs to select for which converstion rate defined in item master ([288aad6](288aad6f5d))
* **Customer:** add Dunning to dashboard ([1128b5f](1128b5f09c))
* option to recreate Stock Ledger Entries against stock transactions ([64fdcb7](64fdcb752d))

### Performance Improvements

* reduce query when validating any doc ([890abf6](890abf6b90))
* Stock entry cancel is slow ([1bdfd33](1bdfd33816))
2025-04-08 13:08:39 +00:00
ruthra kumar
c4ab17b947 Merge pull request #46940 from frappe/version-15-hotfix
chore: release v15
2025-04-08 18:37:09 +05:30
rohitwaghchaure
10cf575bba Merge pull request #46946 from frappe/mergify/bp/version-15-hotfix/pr-46942
fix: ignore backflush setting on subcontracting return (backport #46942)
2025-04-08 18:12:52 +05:30
Mihir Kandoi
6fedb7b9db refactor: split and clean execute function to be more readable
(cherry picked from commit 036af54d54)
2025-04-08 12:17:05 +00:00
Mihir Kandoi
9af50528f1 perf: take query out of loop
(cherry picked from commit 26de902496)
2025-04-08 12:17:05 +00:00
Mihir Kandoi
e7b5303782 fix: remove get_items query.run outside of if condition
(cherry picked from commit 80c17cc005)
2025-04-08 12:17:05 +00:00
Mihir Kandoi
0ec026ec7e refactor: import functions in new report instead of redundant code
(cherry picked from commit 501f07803e)
2025-04-08 12:17:04 +00:00
Mihir Kandoi
c472af87b2 feat: available serial no report
(cherry picked from commit 5592d8e87f)
2025-04-08 12:17:04 +00:00
Mihir Kandoi
ca56150918 fix: ignore backflush setting on subcontracting return
(cherry picked from commit 7479e1ec32)
2025-04-08 12:15:44 +00:00
ruthra kumar
617bebfa8f Merge pull request #46945 from frappe/mergify/bp/version-15-hotfix/pr-46892
fix: use get instead of dot operator to access dict value to prevent no attribute error (backport #46892)
2025-04-08 17:20:45 +05:30
Mihir Kandoi
f2df8e531d fix: use get instead of dot operator to access dict value
(cherry picked from commit 7fb75f0482)
2025-04-08 11:34:11 +00:00
ruthra kumar
c47b3c3642 Merge pull request #46932 from frappe/mergify/bp/version-15-hotfix/pr-46626
fix: correct payment request amount (backport #46626)
2025-04-08 16:56:25 +05:30
ruthra kumar
e271933e43 chore: resolve conflict 2025-04-08 16:33:07 +05:30
ljain112
23c76aa530 fix: correct payment request amount
(cherry picked from commit 913c60d77b)

# Conflicts:
#	erpnext/accounts/doctype/payment_request/payment_request.py
2025-04-08 16:33:07 +05:30
ruthra kumar
bed960df36 Merge pull request #46939 from frappe/mergify/bp/version-15-hotfix/pr-39701
fix: check order paid amount before payment request (backport #39701)
2025-04-08 16:30:28 +05:30
ruthra kumar
36bc87270c Merge pull request #46936 from frappe/mergify/bp/version-15-hotfix/pr-46631
fix: update outstanding for self (backport #46631)
2025-04-08 16:21:49 +05:30
ljain112
4d8984e4e9 fix: resolve conflicts 2025-04-08 15:54:44 +05:30
ruthra kumar
4eb0f39af7 chore: pass doctype and name 2025-04-08 15:15:24 +05:30
Gursheen Anand
b7ae17aaaf fix(portal): context pay_amount for button
(cherry picked from commit 7efb5a8cb5)

# Conflicts:
#	erpnext/templates/pages/order.html
2025-04-08 09:33:20 +00:00
Gursheen Anand
b0302d71b7 fix(portal): payment amount for orders
(cherry picked from commit c18ff5bd25)

# Conflicts:
#	erpnext/templates/pages/order.py
2025-04-08 09:33:20 +00:00
Gursheen Anand
cf7252d3e7 fix: check payments against orders for getting request amount
(cherry picked from commit f7face43cd)

# Conflicts:
#	erpnext/accounts/doctype/payment_request/payment_request.py
2025-04-08 09:33:19 +00:00
ruthra kumar
d6b488f529 chore: resolve conflict 2025-04-08 14:36:15 +05:30
Bhavan23
88e11d6fd9 test: add unit test to validate outstanding amount for update_outstanding_for_self checkbox enabled
(cherry picked from commit 7b0882600a)
2025-04-08 08:59:04 +00:00
Bhavan23
fb06f886d2 fix(accounting): update outstanding amount based on update_outstanding_for_self
fix(accounting): against voucher has been already paid show proper message and update update_outstanding_for_self as 1

(cherry picked from commit 222f1834f1)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
2025-04-08 08:59:04 +00:00
JK1117
250b67076d fix: use source_fieldname to validate inventory dimension
(cherry picked from commit daa5bebdd0)
2025-04-08 08:57:59 +00:00
JK1117
2ed6c211f9 feat: fetch source_fieldname for inventory dimension
(cherry picked from commit 4e63ee1a70)
2025-04-08 08:57:59 +00:00
rohitwaghchaure
bbc9cedf4d Merge pull request #46916 from frappe/mergify/bp/version-15-hotfix/pr-46898
fix: removed hardcoded search fields to fix performance issue (backport #46898)
2025-04-08 14:18:16 +05:30
rohitwaghchaure
b824038d37 chore: fix conflicts 2025-04-08 13:32:49 +05:30
ruthra kumar
b730fdd007 Merge pull request #46930 from frappe/mergify/bp/version-15-hotfix/pr-46821
fix: removed customer_group query in customer.js (backport #46821)
2025-04-08 13:09:37 +05:30
Shariq Ansari
df744135ff Merge pull request #46927 from frappe/mergify/bp/version-15-hotfix/pr-46903
fix: restrict customer change if creating from opportunity (backport #46903)
2025-04-08 13:08:34 +05:30
ljain112
1aac8d31f4 fix: removed customer_group query in customer.js
(cherry picked from commit f49adfdd98)
2025-04-08 07:28:31 +00:00
Shariq Ansari
26611475f6 fix: restrict customer change if creating from opportunity
(cherry picked from commit dc4819e897)
2025-04-08 06:37:36 +00:00
ruthra kumar
5b3ae9508a Merge pull request #46925 from frappe/mergify/bp/version-15-hotfix/pr-46709
fix: user permissions in sales and purchase report (backport #46709)
2025-04-08 11:52:46 +05:30
ruthra kumar
81f061634e Merge pull request #46926 from frappe/mergify/bp/version-15-hotfix/pr-46819
fix: Fix fieldtype in UnReconcile dialog (backport #46819)
2025-04-08 11:51:56 +05:30
rohitwaghchaure
1e4918fb17 Merge pull request #46918 from frappe/mergify/bp/version-15-hotfix/pr-46893
fix: inventory dimensions columns visibility depends on filter (backport #46893)
2025-04-08 11:48:20 +05:30
Corentin Forler
7dfff8d3a2 fix: Fix fieldtype in UnReconcile dialog
(cherry picked from commit 665645721b)
2025-04-08 05:56:37 +00:00
ljain112
c705623fdc fix: user permissions in sales and purchase report
(cherry picked from commit f4bc1dfd00)
2025-04-08 05:41:01 +00:00
ruthra kumar
6ba4c092ba Merge pull request #46921 from frappe/mergify/bp/version-15-hotfix/pr-46804
fix: update outstanding with precision (backport #46804)
2025-04-08 11:08:09 +05:30
ljain112
e1154090f6 fix: update outstanding with precision
(cherry picked from commit aadda9f606)
2025-04-08 04:29:48 +00:00
Rohit Waghchaure
fe0e5c2d48 fix: inventory dimensions columns visibility depends on filter
(cherry picked from commit 2b411fb7f5)
2025-04-08 03:21:15 +00:00
Rohit Waghchaure
48822f6fee fix: removed hardcoded search fields to fix performance issue
(cherry picked from commit 216bf2456e)

# Conflicts:
#	erpnext/manufacturing/doctype/bom/bom.py
2025-04-08 03:20:13 +00:00
Raffael Meyer
8276e8e8b3 chore: fix german translations (#46912) 2025-04-08 02:39:04 +02:00
mergify[bot]
8b11d13cd4 fix: pos opening entry's status not getting updated on cancel (backport #46909) (#46911)
fix: pos opening entry's status not getting updated on cancel (#46909)

(cherry picked from commit 6fae98afda)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-04-07 21:03:20 +05:30
mergify[bot]
999ab28bf0 fix: validate if pos is opened before pos invoice creation (backport #46907) (#46910)
fix: validate if pos is opened before pos invoice creation (#46907)

* fix: validate if pos is opened before pos invoice creation

* fix: added title on throw dialog

* test: fixed failing test

(cherry picked from commit 3de1b22480)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-04-07 20:54:23 +05:30
ruthra kumar
ed36fc0530 Merge pull request #46905 from frappe/mergify/bp/version-15-hotfix/pr-46895
fix: empty party filter on change of party type in General Ledger Report (backport #46895)
2025-04-07 17:56:07 +05:30
ljain112
95cc2827c6 fix: empty party filter on change of party type in General Ledger Report.
(cherry picked from commit 9c68bc22fa)
2025-04-07 12:13:16 +00:00
ruthra kumar
03aa5a1294 Merge pull request #46902 from frappe/mergify/bp/version-15-hotfix/pr-46900
fix: remove against_voucher and against_voucher_type column from General Ledger Report (backport #46900)
2025-04-07 17:36:42 +05:30
ljain112
ba1e7e17fb fix: remove against_voucher from General Ledger Report
(cherry picked from commit 6d1f119a0f)
2025-04-07 17:14:07 +05:30
ruthra kumar
6adf79b8a5 Merge pull request #46897 from frappe/mergify/bp/version-15-hotfix/pr-46728
fix: update posting date before running validations (backport #46728)
2025-04-07 14:49:14 +05:30
Dany Robert
2bf44dc326 fix: update posting date before running validations
(cherry picked from commit d04dbd8ed9)
2025-04-07 09:01:59 +00:00
ruthra kumar
1500691bca Merge pull request #46844 from frappe/mergify/bp/version-15-hotfix/pr-46823
chore: update links to Frappe School (backport #46823)
2025-04-07 11:45:25 +05:30
ruthra kumar
3d57916832 chore: resolve conflict 2025-04-07 11:28:39 +05:30
ruthra kumar
4e9a3b687f Merge pull request #46891 from frappe/mergify/bp/version-15-hotfix/pr-46637
fix(payment term): allocate payment amount when payment term is fetched from order (backport #46637)
2025-04-07 11:25:45 +05:30
rohitwaghchaure
3181dc8ed1 Merge pull request #46885 from frappe/mergify/bp/version-15-hotfix/pr-46836
fix: remove all serial/batch fields when use button is unselected (backport #46836)
2025-04-07 11:07:12 +05:30
venkat102
ea289a40fb fix: update payment amount if automatically_fetch_payment_terms is enabled
(cherry picked from commit 7bf1a39861)
2025-04-07 05:34:25 +00:00
venkat102
3b66c48479 test: validate payment schedule based on invoice amount
(cherry picked from commit 7785296573)
2025-04-07 05:34:25 +00:00
venkat102
1b9980bb86 fix(payment term): allocate payment amount when payment term is fetched from order
(cherry picked from commit 5618859bd8)
2025-04-07 05:34:25 +00:00
ruthra kumar
d54b39b3a7 Merge pull request #46889 from frappe/mergify/bp/version-15-hotfix/pr-46784
fix: correct mapping(schedule_date) sales order to material request (backport #46784)
2025-04-07 11:03:43 +05:30
MohsinAli
e2c8ed2afd fix: correct mapping(schedule_date) sales order to material request
(cherry picked from commit 732e950265)
2025-04-07 05:15:13 +00:00
Frappe PR Bot
9397a57d4d chore(release): Bumped to Version 15.55.5
## [15.55.5](https://github.com/frappe/erpnext/compare/v15.55.4...v15.55.5) (2025-04-07)

### Bug Fixes

* set draft QC in purchase document on creation of qc ([bf3349a](bf3349a432))
* slow query ([b172ae0](b172ae0557))
2025-04-07 05:14:16 +00:00
rohitwaghchaure
d70050931b Merge pull request #46887 from frappe/mergify/bp/version-15/pr-46842
fix: set draft QC in purchase document on creation of qc (backport #46832) (backport #46842)
2025-04-07 10:42:55 +05:30
rohitwaghchaure
1875d69f60 Merge pull request #46888 from frappe/mergify/bp/version-15/pr-46880
fix: slow query (backport #46845) (backport #46880)
2025-04-07 10:42:41 +05:30
ruthra kumar
0c6c654a39 Merge pull request #46886 from frappe/mergify/bp/version-15-hotfix/pr-46743
fix: include auto_reconcile_vouchers flag in background job (backport #46743)
2025-04-07 10:40:30 +05:30
rohitwaghchaure
b2d71b44cf chore: fix conflicts
(cherry picked from commit 4bcf052220)
2025-04-07 04:56:07 +00:00
Rohit Waghchaure
b172ae0557 fix: slow query
(cherry picked from commit f82c8ea5eb)

# Conflicts:
#	erpnext/stock/deprecated_serial_batch.py
(cherry picked from commit 23dc9d5872)
2025-04-07 04:56:07 +00:00
Rohit Waghchaure
bf3349a432 fix: set draft QC in purchase document on creation of qc
(cherry picked from commit 2553dea78e)
(cherry picked from commit 54159b9e5e)
2025-04-07 04:55:58 +00:00
venkat102
26f93f57b8 fix: include auto_reconcile_vouchers flag in background job
(cherry picked from commit 35fbbc2057)
2025-04-07 04:51:00 +00:00
Mihir Kandoi
13f1afa141 fix: remove all serial/batch fields when use button is unselected
(cherry picked from commit 22ffdb9e77)
2025-04-07 04:50:55 +00:00
rohitwaghchaure
f3eeb77ef3 Merge pull request #46838 from frappe/st35124
fix: use work_order bom_no if no bom present in operation
2025-04-07 10:18:20 +05:30
ruthra kumar
83b72dc1b3 Merge pull request #46883 from frappe/mergify/bp/version-15-hotfix/pr-46727
fix: use docstatus for status filter (backport #46727)
2025-04-07 10:18:08 +05:30
rethik
ab52524f12 fix: use docstatus for status filter
(cherry picked from commit 31e59354c9)
2025-04-07 04:43:47 +00:00
mergify[bot]
c1fe8f6000 fix: pos closed dialog on pos closing entry (backport #46881) (#46882)
fix: pos closed dialog on pos closing entry (#46881)

(cherry picked from commit 21954b9f9c)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-04-06 21:32:17 +05:30
rohitwaghchaure
79e8bfe213 Merge pull request #46880 from frappe/mergify/bp/version-15-hotfix/pr-46845
fix: slow query (backport #46845)
2025-04-06 18:52:15 +05:30
ruthra kumar
8d3fef3195 Merge pull request #46878 from frappe/mergify/bp/version-15-hotfix/pr-46716
feat(Customer): add Dunning to dashboard (backport #46716)
2025-04-06 16:52:07 +05:30
rohitwaghchaure
7c3467d1ff Merge pull request #46879 from frappe/mergify/bp/version-15-hotfix/pr-46875
perf: Stock entry cancel is slow (backport #46875)
2025-04-06 16:25:54 +05:30
rohitwaghchaure
4bcf052220 chore: fix conflicts 2025-04-06 16:25:20 +05:30
Rohit Waghchaure
23dc9d5872 fix: slow query
(cherry picked from commit f82c8ea5eb)

# Conflicts:
#	erpnext/stock/deprecated_serial_batch.py
2025-04-06 10:41:44 +00:00
Türker Tunalı
1bdfd33816 perf: Stock entry cancel is slow
Some queries still use "timestamp" function instead of "posting_datetime". In my instance single stock entry cancel ends with request timeout. Using "posting_datetime" field directly improves the situation.

cont: https://github.com/frappe/erpnext/pull/46293
(cherry picked from commit ddbb44c6a2)
2025-04-06 10:40:32 +00:00
rohitwaghchaure
c5710dcbe2 Merge pull request #46873 from frappe/mergify/bp/version-15-hotfix/pr-46853
fix: stock entry repack amount calculation (backport #46853)
2025-04-06 16:09:57 +05:30
barredterra
1128b5f09c feat(Customer): add Dunning to dashboard
(cherry picked from commit 638d825d8c)
2025-04-06 10:21:31 +00:00
ruthra kumar
8617ea5685 Merge pull request #46877 from frappe/mergify/bp/version-15-hotfix/pr-46658
chore: adjusted dimension placement in Accounts Payable (backport #46658)
2025-04-06 15:44:19 +05:30
Sruthy
6b3e64c0cc chore: adjusted dimension placement in Accounts Payable
(cherry picked from commit 361a55a703)
2025-04-06 10:10:33 +00:00
Rohit Waghchaure
8c61639062 fix: stock entry repack amount calculation
(cherry picked from commit 544ceb93cd)
2025-04-06 04:16:16 +00:00
rohitwaghchaure
51c18217fa Merge pull request #46842 from frappe/mergify/bp/version-15-hotfix/pr-46832
fix: set draft QC in purchase document on creation of qc (backport #46832)
2025-04-06 09:45:25 +05:30
Sagar Vora
679397528a Merge pull request #46871 from frappe/mergify/bp/version-15-hotfix/pr-46870
perf: reduce query when validating any doc (backport #46870)
2025-04-05 23:42:18 +05:30
Sagar Vora
890abf6b90 perf: reduce query when validating any doc
(cherry picked from commit b863296e53)
2025-04-05 18:10:06 +00:00
mergify[bot]
86853224c3 refactor(Payment Entry): reduce indentation (backport #46864) (#46867)
refactor(Payment Entry): reduce indentation (#46864)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-04-05 17:39:42 +02:00
mergify[bot]
d7bb4a288c fix: make message translatable (backport #46863) (#46866)
fix: make message translatable (#46863)

(cherry picked from commit 7d12e9afd4)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-04-05 17:37:36 +02:00
mergify[bot]
fcade5d8cd fix: Translate UnReconcile dialog title (backport #46818) (#46861)
fix: Translate UnReconcile dialog title

(cherry picked from commit f2cfb03c2c)

Co-authored-by: Corentin Forler <corentin@dokos.io>
2025-04-05 17:37:08 +02:00
mergify[bot]
f63595cf0c fix(Dunning): undefined variable (backport #46868) (#46869)
fix(Dunning): undefined variable (#46868)

(cherry picked from commit 04df09cfca)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-04-05 17:36:43 +02:00
ruthra kumar
e8efa6d331 Merge pull request #46857 from frappe/mergify/bp/version-15-hotfix/pr-46625
refactor: Update Bank Transaction `set_query` implemetation (backport #46625)
2025-04-05 07:36:37 +05:30
ruthra kumar
a6834f3875 chore: resolve conflict 2025-04-05 07:32:15 +05:30
Abdeali Chharchhoda
3dc29cbec8 chore: formatting
(cherry picked from commit 4ae11d4384)

# Conflicts:
#	erpnext/accounts/doctype/bank_transaction/bank_transaction.js
2025-04-05 01:35:11 +00:00
Abdeali Chharchhoda
5d47db78e6 fix: add Not Cancelled filter for payment_entry in Bank Transaction
(cherry picked from commit 85dd1dd4c7)
2025-04-05 01:35:11 +00:00
Abdeali Chharchhoda
a19eece881 refactor: move payment_document query to setup
(cherry picked from commit 257802aeda)

# Conflicts:
#	erpnext/accounts/doctype/bank_transaction/bank_transaction.js
2025-04-05 01:35:11 +00:00
Md Hussain Nagaria
2dfe13e183 chore: update links to Frappe School (#46823)
(cherry picked from commit ef4f662c31)

# Conflicts:
#	erpnext/accounts/workspace/accounting/accounting.json
#	erpnext/buying/workspace/buying/buying.json
#	erpnext/manufacturing/workspace/manufacturing/manufacturing.json
#	erpnext/projects/workspace/projects/projects.json
#	erpnext/selling/workspace/selling/selling.json
#	erpnext/stock/workspace/stock/stock.json
2025-04-02 06:46:29 +00:00
Rohit Waghchaure
54159b9e5e fix: set draft QC in purchase document on creation of qc
(cherry picked from commit 2553dea78e)
2025-04-01 14:17:39 +00:00
ljain112
bde55d2a07 fix: resolved conflicts 2025-04-01 18:51:10 +05:30
Sagar Vora
36aa308bce Merge pull request #46834 from frappe/mergify/bp/version-15-hotfix/pr-46829
fix: use `grand_total_diff` instead of `rounding_adjustment` in `taxes_and_totals` (backport #46829)
2025-04-01 14:47:03 +05:30
Mihir Kandoi
c6979ab260 fix: use work_order bom_no if no bom present in operation 2025-04-01 14:45:24 +05:30
mergify[bot]
80f144ac22 fix: pos checking opened entry closed or not (backport #46726) (#46830)
fix: pos checking opened entry closed or not (#46726)

* fix: pos checking opened entry closed or not

* fix: linter issue

* fix: linter issue

(cherry picked from commit 5d5b6acc79)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-04-01 13:54:29 +05:30
vishakhdesai
55b17b918f fix: use grand_total_diff instead of rounding_adjustment in taxes_and_totals
(cherry picked from commit fd252da6b1)
2025-04-01 13:34:30 +05:30
rohitwaghchaure
27ea95236f Merge pull request #46817 from frappe/mergify/bp/version-15-hotfix/pr-46815
feat: allow UOMs to select for which conversion rate defined in item (backport #46815)
2025-04-01 08:31:52 +05:30
rohitwaghchaure
c762a8903b Merge pull request #46824 from frappe/mergify/bp/version-15-hotfix/pr-46808
fix: condition to update the last purchase rate (backport #46808)
2025-04-01 08:31:30 +05:30
barredterra
db647a4e42 fix: wording 2025-03-31 21:38:34 +02:00
barredterra
79ed02bb2c fix: translatability
(cherry picked from commit 6d43d46fbc)
2025-03-31 19:23:41 +00:00
Rohit Waghchaure
353fa0cbc3 fix: condition to update the last puurchase rate
(cherry picked from commit bad901e7da)
2025-03-31 15:15:20 +00:00
rohitwaghchaure
2b854377b1 chore: fix conflicts 2025-03-31 20:43:34 +05:30
Rohit Waghchaure
288aad6f5d feat: allow UOMs to select for which converstion rate defined in item master
(cherry picked from commit b1dfbbe85e)

# Conflicts:
#	erpnext/stock/doctype/stock_settings/stock_settings.json
2025-03-31 10:53:11 +00:00
rohitwaghchaure
a60acbc592 Merge pull request #46807 from frappe/mergify/bp/version-15-hotfix/pr-46806
feat: option to recreate Stock Ledger Entries against stock transactions (backport #46806)
2025-03-31 16:06:42 +05:30
Marc Ramser
42479d9a7f feat(regional): Address Template for Germany & Add Switzerland Template (#46737)
* Add Address template for Switzerland

* Fix address template for germany

If an ERPNext instance is set to German and used by a business outside Germany (e.g., in Switzerland or Austria), customer addresses in Germany are displayed in their national format. However, for postal services, the international format (including the country) is required.".

This is just a workaround. IMHO the correct fix would be to check where the company is located and based on that use the national or the international template.

(cherry picked from commit 21b8ad6aa5)
2025-03-31 10:34:00 +00:00
Sagar Vora
62275d09da Merge pull request #46814 from frappe/mergify/bp/version-15-hotfix/pr-46812
fix: revert resetting `rounding_adjustment` (backport #46812)
2025-03-31 15:56:08 +05:30
Vishakh Desai
96af1ccffb Merge pull request #46812 from vishakhdesai/fix-taxes-and-totals
fix: revert resetting `rounding_adjustment`
(cherry picked from commit 3a9dca0563)
2025-03-31 10:25:00 +00:00
mergify[bot]
7b864bece8 fix: improved rounding adjustment when applying discount (backport #46720)
* fix: improved rounding adjustment when applying discount (#46720)

* fix: rounding adjustment in apply_discount_amount taxes_and_totals

* refactor: minor changes

* fix: set the rounding difference while calculating tax total in the last tax row and add test case

* fix: failing test case

* fix: made changes in get_total_for_discount_amount in taxes_and_totals

* fix: failing test cases

* fix: changes as per review

* refactor: remove unnecessary use of flt

* refactor: improve logic

* refactor: minor change

* refactor: minor changes

* fix: add a test case for applying discount with previous row total in taxes

* fix: failing test case

* refactor: flatter code, remove `flt` usage for accuracy

---------

Co-authored-by: Vishakh Desai <78500008+vishakhdesai@users.noreply.github.com>
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2025-03-31 15:54:42 +05:30
rohitwaghchaure
604b185bd3 chore: fix conflicts 2025-03-31 15:05:10 +05:30
Rohit Waghchaure
64fdcb752d feat: option to recreate Stock Ledger Entries against stock transactions
(cherry picked from commit 218dbd6911)

# Conflicts:
#	erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.json
2025-03-31 08:44:38 +00:00
Sagar Vora
37adb9187f Merge pull request #46803 from frappe/mergify/bp/version-15-hotfix/pr-46644
fix: multiple Bank Reconciliation Tool issues (backport #46644)
2025-03-31 11:37:36 +05:30
Vishakh Desai
e168483a58 fix: multiple Bank Reconciliation Tool issues (#46644)
* fix: bank reconciliation tool issue

* refactor: separate Bank Transaction linking from other logic

* fix: delink old pe on update_after_submit in bank transaction

* fix: failing test case fixed

* fix: changes as per review

* refactor: rename `gles` to `gl_entries`

---------

Co-authored-by: Sagar Vora <sagar@resilient.tech>
(cherry picked from commit 646cf54679)
2025-03-31 05:57:08 +00:00
Frappe PR Bot
5dd99f896e chore(release): Bumped to Version 15.55.4
## [15.55.4](https://github.com/frappe/erpnext/compare/v15.55.3...v15.55.4) (2025-03-29)

### Bug Fixes

* valuation rate not updating for raw materials ([57e2619](57e2619cf1))
2025-03-29 20:07:32 +00:00
rohitwaghchaure
7579e00425 Merge pull request #46790 from frappe/mergify/bp/version-15/pr-46778
fix: valuation rate not updating for raw materials (backport #46760) (backport #46778)
2025-03-30 01:36:12 +05:30
rohitwaghchaure
c22869fed9 chore: fix conflicts
(cherry picked from commit 5079519863)
2025-03-29 15:31:21 +00:00
Rohit Waghchaure
57e2619cf1 fix: valuation rate not updating for raw materials
(cherry picked from commit 5af8378471)

# Conflicts:
#	erpnext/manufacturing/doctype/work_order/test_work_order.py
(cherry picked from commit 454dd3a2f1)
2025-03-29 15:31:21 +00:00
Frappe PR Bot
66d0ad1bc6 chore(release): Bumped to Version 15.55.3
## [15.55.3](https://github.com/frappe/erpnext/compare/v15.55.2...v15.55.3) (2025-03-29)

### Bug Fixes

* incorrect condition ([0721816](0721816763))
2025-03-29 07:03:05 +00:00
rohitwaghchaure
3395e7c2cd Merge pull request #46785 from frappe/mergify/bp/version-15/pr-46781
fix: incorrect condition (backport #46777) (backport #46781)
2025-03-29 12:31:36 +05:30
Rohit Waghchaure
0721816763 fix: incorrect condition
(cherry picked from commit 0c1a8e9c58)
(cherry picked from commit 502b8f25b3)
2025-03-29 06:48:03 +00:00
rohitwaghchaure
5315769b1f Merge pull request #46781 from frappe/mergify/bp/version-15-hotfix/pr-46777
fix: incorrect condition (backport #46777)
2025-03-29 12:17:09 +05:30
rohitwaghchaure
9fa5afd215 Merge pull request #46779 from frappe/mergify/bp/version-15-hotfix/pr-46775
fix: for deadlock issue keep status as In Progress (backport #46775)
2025-03-29 12:16:55 +05:30
rohitwaghchaure
88ff17f467 Merge pull request #46778 from frappe/mergify/bp/version-15-hotfix/pr-46760
fix: valuation rate not updating for raw materials (backport #46760)
2025-03-29 12:16:35 +05:30
Rohit Waghchaure
502b8f25b3 fix: incorrect condition
(cherry picked from commit 0c1a8e9c58)
2025-03-28 18:19:53 +00:00
rohitwaghchaure
5079519863 chore: fix conflicts 2025-03-28 23:47:43 +05:30
Rohit Waghchaure
34e66b1b27 fix: for deadlock issue keep status as In Progress
(cherry picked from commit e6ff7f0e9f)
2025-03-28 18:16:41 +00:00
Rohit Waghchaure
454dd3a2f1 fix: valuation rate not updating for raw materials
(cherry picked from commit 5af8378471)

# Conflicts:
#	erpnext/manufacturing/doctype/work_order/test_work_order.py
2025-03-28 18:15:42 +00:00
Abdeali Chharchhodawala
6f94ba599b Merge pull request #46683 from Abdeali099/set-employee-contact-details
fix: Set complete contact details for `Employee` in PE
(cherry picked from commit 8c9d630ee4)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.json
#	erpnext/accounts/doctype/payment_entry/payment_entry.py
2025-03-28 12:49:20 +00:00
rohitwaghchaure
e45d0779ef Merge pull request #46752 from frappe/mergify/bp/version-15/pr-46749
Revert "perf: timeout while renaming cost center (backport #46641)" (backport #46749)
2025-03-27 13:13:17 +05:30
rohitwaghchaure
c6ce76170b Revert "perf: timeout while renaming cost center (backport #46641)"
(cherry picked from commit 326126e741)
2025-03-27 06:54:18 +00:00
rohitwaghchaure
f3cff68713 Merge pull request #46749 from frappe/revert-46647-mergify/bp/version-15-hotfix/pr-46641
Revert "perf: timeout while renaming cost center (backport #46641)"
2025-03-27 12:23:13 +05:30
rohitwaghchaure
326126e741 Revert "perf: timeout while renaming cost center (backport #46641)" 2025-03-27 11:58:02 +05:30
Frappe PR Bot
de3e6922b5 chore(release): Bumped to Version 15.55.2
## [15.55.2](https://github.com/frappe/erpnext/compare/v15.55.1...v15.55.2) (2025-03-27)

### Bug Fixes

* do not use self object for setting party and party type ([7795030](7795030b7b))
2025-03-27 06:05:55 +00:00
ruthra kumar
ae6d3f27a2 Merge pull request #46747 from frappe/mergify/bp/version-15/pr-46719
fix: do not use self object for setting party and party type  (backport #46719)
2025-03-27 11:34:32 +05:30
ruthra kumar
b22d0a5804 Merge pull request #46746 from frappe/mergify/bp/version-15-hotfix/pr-46719
fix: do not use self object for setting party and party type  (backport #46719)
2025-03-27 11:34:17 +05:30
ljain112
7795030b7b fix: do not use self object for setting party and party type
(cherry picked from commit 80b746d4dd)
2025-03-27 05:39:52 +00:00
ljain112
d1311e619d fix: do not use self object for setting party and party type
(cherry picked from commit 80b746d4dd)
2025-03-27 05:38:38 +00:00
Frappe PR Bot
9bac43acff chore(release): Bumped to Version 15.55.1
## [15.55.1](https://github.com/frappe/erpnext/compare/v15.55.0...v15.55.1) (2025-03-27)

### Bug Fixes

* decimal values causing incorrect batch picking ([1b6aeba](1b6aeba267))
* expense account in the stock entry ([e393ce9](e393ce9a47))
* slow query ([f3ba5a8](f3ba5a81ab))
2025-03-27 03:45:26 +00:00
rohitwaghchaure
1e987153c9 Merge pull request #46735 from frappe/mergify/bp/version-15/pr-46730
fix: expense account in the stock entry (backport #46710) (backport #46730)
2025-03-27 09:14:05 +05:30
rohitwaghchaure
d36a7c2389 Merge pull request #46741 from frappe/mergify/bp/version-15/pr-46734
fix: decimal values causing incorrect batch picking (backport #46733) (backport #46734)
2025-03-27 09:13:56 +05:30
rohitwaghchaure
b548cc411d Merge pull request #46742 from frappe/mergify/bp/version-15/pr-46740
fix: slow query (backport #46739) (backport #46740)
2025-03-27 09:13:47 +05:30
rohitwaghchaure
ad3f985dc4 chore: fix conflicts
(cherry picked from commit 41f20a9c64)
2025-03-26 17:09:42 +00:00
Rohit Waghchaure
f3ba5a81ab fix: slow query
(cherry picked from commit 5ddb36af87)

# Conflicts:
#	erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
(cherry picked from commit af0fb131a2)
2025-03-26 17:09:42 +00:00
rohitwaghchaure
8b5ed20225 Merge pull request #46740 from frappe/mergify/bp/version-15-hotfix/pr-46739
fix: slow query (backport #46739)
2025-03-26 22:38:38 +05:30
Rohit Waghchaure
1b6aeba267 fix: decimal values causing incorrect batch picking
(cherry picked from commit 7bfe703b04)
(cherry picked from commit c5efddae16)
2025-03-26 16:43:35 +00:00
rohitwaghchaure
af3b871989 Merge pull request #46734 from frappe/mergify/bp/version-15-hotfix/pr-46733
fix: decimal values causing incorrect batch picking (backport #46733)
2025-03-26 22:12:07 +05:30
rohitwaghchaure
41f20a9c64 chore: fix conflicts 2025-03-26 22:11:43 +05:30
Rohit Waghchaure
af0fb131a2 fix: slow query
(cherry picked from commit 5ddb36af87)

# Conflicts:
#	erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
2025-03-26 16:40:32 +00:00
Rohit Waghchaure
e393ce9a47 fix: expense account in the stock entry
(cherry picked from commit 89569d4b32)
(cherry picked from commit 62f342ef8b)
2025-03-26 10:18:49 +00:00
Rohit Waghchaure
c5efddae16 fix: decimal values causing incorrect batch picking
(cherry picked from commit 7bfe703b04)
2025-03-26 10:13:40 +00:00
rohitwaghchaure
2ed29d06d3 Merge pull request #46730 from frappe/mergify/bp/version-15-hotfix/pr-46710
fix: expense account in the stock entry (backport #46710)
2025-03-26 12:16:59 +05:30
Rohit Waghchaure
62f342ef8b fix: expense account in the stock entry
(cherry picked from commit 89569d4b32)
2025-03-26 06:30:40 +00:00
Frappe PR Bot
8951efb457 chore(release): Bumped to Version 15.55.0
# [15.55.0](https://github.com/frappe/erpnext/compare/v15.54.5...v15.55.0) (2025-03-25)

### Bug Fixes

* add base_outstanding and base_paid_amount in payment schedule table ([412e6be](412e6be502))
* add patch to update base_outstanding and base_paid_amount ([c3221c4](c3221c4e93))
* correct accumulated depreciation calculation for disposed assets (backport [#46660](https://github.com/frappe/erpnext/issues/46660)) ([#46661](https://github.com/frappe/erpnext/issues/46661)) ([4df5f18](4df5f18d85))
* correct invoice order in payment reconcillaiton ([2a70791](2a70791bba))
* customer credit limit check based on `bypass_credit_limit_check` in Journal Entry ([6c443bd](6c443bd85a))
* date added to wrong patch ([2bfaf64](2bfaf64fff))
* do not validate if conversion rate is 1 for different currency ([391b5c4](391b5c4226))
* don't filter payment entries on Bank Account in Payment Clearance ([dc3b5e2](dc3b5e2f3a))
* **Payment Entry:** get contact details from existing contact ([#40556](https://github.com/frappe/erpnext/issues/40556)) ([f964178](f964178008))
* unwired order_by argument in get_transaction_list (backport [#46636](https://github.com/frappe/erpnext/issues/46636)) ([#46643](https://github.com/frappe/erpnext/issues/46643)) ([2ebea88](2ebea8866a))

### Features

* **accounting:** allow chart_of_account.get_chart to be whilelist ([e69c722](e69c722534))
* **projects:** add option to hide timesheets for project users ([#46173](https://github.com/frappe/erpnext/issues/46173)) ([3834d6f](3834d6fbce))
* repost accounting ledger for purchase receipt ([4edfc6f](4edfc6f125))

### Performance Improvements

* timeout while renaming cost center ([58eb184](58eb1849d7))
2025-03-25 13:50:33 +00:00
ruthra kumar
5db2a19778 Merge pull request #46715 from frappe/version-15-hotfix
chore: release v15
2025-03-25 19:16:44 +05:30
ruthra kumar
288206bdcd Merge pull request #46634 from frappe/mergify/bp/version-15-hotfix/pr-46627
fix: date added to wrong patch (backport #46627)
2025-03-25 18:45:21 +05:30
ruthra kumar
b3c3733286 chore: resolve conflict 2025-03-25 17:53:29 +05:30
ruthra kumar
b2b49446d4 Merge pull request #46713 from frappe/mergify/bp/version-15-hotfix/pr-46616
fix: do not validate if conversion rate is 1 for different currency (backport #46616)
2025-03-25 14:29:09 +05:30
ljain112
391b5c4226 fix: do not validate if conversion rate is 1 for different currency
(cherry picked from commit e8a66d03bc)
2025-03-25 08:42:31 +00:00
ruthra kumar
ce454d5202 Merge pull request #46707 from frappe/mergify/bp/version-15-hotfix/pr-46617
refactor: removed redundant message display for each item row cost center update (backport #46617)
2025-03-25 12:28:43 +05:30
ljain112
f93feb18fb refactor: removed redundant message display for each item row cost center update
(cherry picked from commit 4376ca5f1d)
2025-03-25 06:47:13 +00:00
ruthra kumar
0793213981 Merge pull request #46705 from frappe/mergify/bp/version-15-hotfix/pr-46622
feat: repost accounting ledger for purchase receipt (backport #46622)
2025-03-25 12:13:56 +05:30
ljain112
4edfc6f125 feat: repost accounting ledger for purchase receipt
(cherry picked from commit b36e356469)
2025-03-25 06:19:43 +00:00
mergify[bot]
98df0614ab ci: apply label "skip-release-notes" based on PR title (backport #46694) (#46697)
ci: apply label "skip-release-notes" based on PR title (#46694)

Workflow copied from frappe/frappe

(cherry picked from commit eb350012b0)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-03-24 16:55:11 +01:00
Sagar Vora
59d0ff493f Merge pull request #46688 from frappe/mergify/bp/version-15-hotfix/pr-46669
fix: don't filter payment entries on Bank Account in Payment Clearance (backport #46669)
2025-03-24 18:17:59 +05:30
vishakhdesai
dc3b5e2f3a fix: don't filter payment entries on Bank Account in Payment Clearance
(cherry picked from commit fa2fd5bf88)
2025-03-24 12:22:09 +00:00
ruthra kumar
058a2f0c42 Merge pull request #46677 from frappe/mergify/bp/version-15-hotfix/pr-46577
fix: customer credit limit check based on `bypass_credit_limit_check` in Journal Entry (backport #46577)
2025-03-24 13:58:10 +05:30
ljain112
6c443bd85a fix: customer credit limit check based on bypass_credit_limit_check in Journal Entry
(cherry picked from commit 8a84faebed)
2025-03-24 08:02:17 +00:00
ruthra kumar
a228d1edc5 Merge pull request #46672 from frappe/mergify/bp/version-15-hotfix/pr-46574
fix: correct invoice order in payment reconcillaiton (backport #46574)
2025-03-24 13:13:35 +05:30
ruthra kumar
87628835bf Merge pull request #46673 from frappe/mergify/bp/version-15-hotfix/pr-46386
feat(accounting/regional): allow chart_of_account.get_chart to be whilelist (backport #46386)
2025-03-24 13:13:06 +05:30
Florian HENRY
e69c722534 feat(accounting): allow chart_of_account.get_chart to be whilelist
(cherry picked from commit 49dcd96909)
2025-03-24 07:03:37 +00:00
ruthra kumar
326c37a051 chore: resolve conflict 2025-03-24 12:29:52 +05:30
ljain112
2a70791bba fix: correct invoice order in payment reconcillaiton
(cherry picked from commit 5c34a5aaed)

# Conflicts:
#	erpnext/accounts/utils.py
2025-03-24 06:54:24 +00:00
ruthra kumar
e5fb77c65f Merge pull request #46670 from frappe/mergify/bp/version-15-hotfix/pr-46440
fix: add base_outstanding and base_paid_amount in payment schedule table (backport #46440)
2025-03-24 12:13:51 +05:30
ruthra kumar
4a7d401dc5 chore: resolve conflict 2025-03-24 11:53:14 +05:30
Sugesh393
c3221c4e93 fix: add patch to update base_outstanding and base_paid_amount
(cherry picked from commit 7e92e4967a)
2025-03-24 06:14:41 +00:00
Sugesh393
412e6be502 fix: add base_outstanding and base_paid_amount in payment schedule table
(cherry picked from commit 6c2f9a563e)

# Conflicts:
#	erpnext/accounts/doctype/payment_schedule/payment_schedule.json
2025-03-24 06:14:41 +00:00
mergify[bot]
4df5f18d85 fix: correct accumulated depreciation calculation for disposed assets (backport #46660) (#46661)
fix: correct accumulated depreciation calculation for disposed assets (#46660)

(cherry picked from commit eec2e7e833)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-03-23 18:53:49 +05:30
rohitwaghchaure
d58e527b6b Merge pull request #46647 from frappe/mergify/bp/version-15-hotfix/pr-46641
perf: timeout while renaming cost center (backport #46641)
2025-03-22 20:49:18 +05:30
Rohit Waghchaure
58eb1849d7 perf: timeout while renaming cost center
(cherry picked from commit 92be7cbbbf)
2025-03-21 12:38:51 +00:00
mergify[bot]
2ebea8866a fix: unwired order_by argument in get_transaction_list (backport #46636) (#46643)
* fix: unwired order_by argument

* lol on how it was updated from modified in both the places (version 15), but wasn't fixed

(cherry picked from commit 2c1077d332)

# Conflicts:
#	erpnext/controllers/website_list_for_contact.py

* fix: merge conflicts

* fix: sort by creation only

---------

Co-authored-by: Hussain Nagaria <hussainbhaitech@gmail.com>
Co-authored-by: Md Hussain Nagaria <34810212+NagariaHussain@users.noreply.github.com>
2025-03-21 16:27:05 +05:30
Smit Vora
4e65b7873d Merge pull request #46638 from frappe/mergify/bp/version-15-hotfix/pr-40556
fix(Payment Entry): get contact details from existing contact (backport #40556)
2025-03-21 15:22:44 +05:30
Smit Vora
7dc23d9733 chore: resolve conflicts #39748 2025-03-21 14:09:21 +05:30
David Arnold
f964178008 fix(Payment Entry): get contact details from existing contact (#40556)
(cherry picked from commit 462204fc65)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.py
2025-03-21 08:28:59 +00:00
Mihir Kandoi
2bfaf64fff fix: date added to wrong patch
(cherry picked from commit dc45c3b39c)

# Conflicts:
#	erpnext/patches.txt
2025-03-20 18:26:02 +00:00
ruthra kumar
6da00319e6 Merge pull request #46612 from frappe/mergify/bp/version-15-hotfix/pr-46173
feat(projects): add option to hide timesheets for project users (backport #46173)
2025-03-19 16:50:42 +05:30
Frappe PR Bot
35ac96f1ec chore(release): Bumped to Version 15.54.5
## [15.54.5](https://github.com/frappe/erpnext/compare/v15.54.4...v15.54.5) (2025-03-19)

### Bug Fixes

* add parenttype condition to payment schedule query in accounts receivable report (backport [#46370](https://github.com/frappe/erpnext/issues/46370)) ([#46499](https://github.com/frappe/erpnext/issues/46499)) ([32335da](32335da839))
* add validation to rename_subcontracting_fields patch ([bc408d9](bc408d979a))
* also consider CRM Deal as party type for ERPNext CRM Integration ([65a80cf](65a80cffe7))
* dashboard link for QC from PR ([426222d](426222d8e0))
* Debit and Credit not equal for Purchase Invoice ([46b6e62](46b6e621c2))
* debit in transaction currency ([8e19b46](8e19b46bd9))
* ensure qty conversion when creating production plan from SO ([8162fb3](8162fb3e5d))
* exclude current doc when checking for duplicate ([b638aed](b638aed758))
* fetch bom_no when updating items in sales order ([41d8b26](41d8b26dd2))
* fetch quality inspection parameter group ([cd0abba](cd0abbae51))
* get bom_no from sales order item and material request item ([e241810](e2418101ab))
* hide subcontracted qty field if PO is not subcontracted ([62feec5](62feec5cc3))
* incorrect production item and bom no in job card ([d071a6c](d071a6c900))
* not able to make PR against stand alone Debit Note ([d62960e](d62960e925))
* not able to select the item in the BOM ([59c653e](59c653ef3f))
* patch ([36ffc2e](36ffc2ee67))
* performance issue for item list view ([34d6e4b](34d6e4bdaa))
* remove duplicate ([e5b2801](e5b2801830))
* repost future sle and gle after capitalization ([#46576](https://github.com/frappe/erpnext/issues/46576)) ([2144f89](2144f89624))
* SABB validation for packed items ([2d6626e](2d6626e906))
* set correct currency for offset account gl entries ([e6dd3f3](e6dd3f3e64))
* set landed cost based on purchase invoice rate ([56bc26a](56bc26aecc))
* set stock adjustment account in difference account ([6202e30](6202e302b1))
* take function call outside loop ([ec1a3a1](ec1a3a1e6b))
* **Transaction Deletion Record:** sql syntax error while fetching lead address ([ea68cae](ea68caec7d))
* UOM conversion error when creating pick list from material transfer request ([2f3dcc2](2f3dcc2137))
* use base currency total ([3e2749d](3e2749d6d5))
* use party explicitly ([5dd5784](5dd5784716))
* use shipping_address_name for address validation in sales invoice ([#46473](https://github.com/frappe/erpnext/issues/46473)) ([38dabdf](38dabdf584))
* using `in` for lookup in list instead of directly assigning ([#46492](https://github.com/frappe/erpnext/issues/46492)) ([950656d](950656d6f7))
* valuation for moving average with batches ([5f1bb1f](5f1bb1f1ba))
* wrong field mapping ([be3e083](be3e083e7d))

### Performance Improvements

* faster count estimation (backport [#46550](https://github.com/frappe/erpnext/issues/46550)) ([#46551](https://github.com/frappe/erpnext/issues/46551)) ([01bab8f](01bab8f22b))
2025-03-19 11:18:07 +00:00
ruthra kumar
187ebaaecd Merge pull request #46582 from frappe/version-15-hotfix
chore: release v15
2025-03-19 16:46:43 +05:30
rohitwaghchaure
a2cb9c1791 Merge pull request #46615 from frappe/mergify/bp/version-15-hotfix/pr-46608
fix: fetch bom_no when updating items in sales order (backport #46608)
2025-03-19 16:31:38 +05:30
rohitwaghchaure
0d8842e387 Merge pull request #46614 from frappe/mergify/bp/version-15-hotfix/pr-46573
Fix set landed cost based on pi (backport #46573)
2025-03-19 16:31:09 +05:30
rohitwaghchaure
38213b31da chore: fix conflicts 2025-03-19 15:47:43 +05:30
Mihir Kandoi
e5b2801830 fix: remove duplicate
(cherry picked from commit 386df968c2)

# Conflicts:
#	erpnext/public/js/utils.js
2025-03-19 10:15:18 +00:00
Mihir Kandoi
41d8b26dd2 fix: fetch bom_no when updating items in sales order
(cherry picked from commit 508727a57a)

# Conflicts:
#	erpnext/public/js/utils.js
2025-03-19 10:15:18 +00:00
rohitwaghchaure
5b802ae527 chore: fix conflicts 2025-03-19 15:35:26 +05:30
rohitwaghchaure
1b8e8e92ae Merge pull request #46611 from frappe/mergify/bp/version-15-hotfix/pr-46595
fix: not able to make PR against stand alone Debit Note (backport #46595)
2025-03-19 15:28:57 +05:30
Mihir Kandoi
ec1a3a1e6b fix: take function call outside loop
(cherry picked from commit b3c400f998)
2025-03-19 09:52:28 +00:00
Mihir Kandoi
36ffc2ee67 fix: patch
(cherry picked from commit 7e669c0728)
2025-03-19 09:52:28 +00:00
Mihir Kandoi
56bc26aecc fix: set landed cost based on purchase invoice rate
(cherry picked from commit 75ab5f2bd0)

# Conflicts:
#	erpnext/patches.txt
2025-03-19 09:52:27 +00:00
Marc Ramser
3834d6fbce feat(projects): add option to hide timesheets for project users (#46173)
* feat: add option to hide timesheets for project users

* Added a new "Hide timesheets" checkbox field to Project User doctype that allows to control timesheet visibility for specific users. When enabled, the timesheets section will not be displayed on the project page for that user.

* Update projects.html

(cherry picked from commit f4aba561ce)
2025-03-19 08:05:42 +00:00
Rohit Waghchaure
d62960e925 fix: not able to make PR against stand alone Debit Note
(cherry picked from commit 6a52c30591)
2025-03-19 08:05:33 +00:00
ruthra kumar
c6de50b2a5 Merge pull request #46606 from frappe/mergify/bp/version-15-hotfix/pr-46596
fix: debit in transaction currency (backport #46596)
2025-03-19 12:11:09 +05:30
Rohit Waghchaure
8e19b46bd9 fix: debit in transaction currency
(cherry picked from commit e4acf20a62)
2025-03-19 06:26:26 +00:00
rohitwaghchaure
f6a4855e7f Merge pull request #46594 from frappe/mergify/bp/version-15-hotfix/pr-46593
test: test case for FIFO batch valuation (backport #46593)
2025-03-18 21:23:03 +05:30
Rohit Waghchaure
95718acc9a test: test case for FIFO batch valuation
(cherry picked from commit ad9ac1f058)
2025-03-18 13:50:36 +00:00
rohitwaghchaure
2528acd803 Merge pull request #46592 from frappe/mergify/bp/version-15-hotfix/pr-46588
fix: SABB validation for packed items (backport #46588)
2025-03-18 18:38:50 +05:30
Rohit Waghchaure
2d6626e906 fix: SABB validation for packed items
(cherry picked from commit 3756bf231b)
2025-03-18 12:03:18 +00:00
rohitwaghchaure
a07eb556cf Merge pull request #46584 from frappe/mergify/bp/version-15-hotfix/pr-46575
fix: fetch quality inspection parameter group (backport #46575)
2025-03-18 17:28:33 +05:30
rohitwaghchaure
48edc86845 Merge pull request #46587 from frappe/mergify/bp/version-15-hotfix/pr-46576
fix: repost future sle and gle after capitalization (backport #46576)
2025-03-18 17:27:56 +05:30
rohitwaghchaure
7f5ce4f29d Merge pull request #46585 from frappe/mergify/bp/version-15-hotfix/pr-46554
fix: add validation to rename_subcontracting_fields patch (backport #46554)
2025-03-18 17:27:20 +05:30
rohitwaghchaure
cd7056842d Merge pull request #46589 from frappe/mergify/bp/version-15-hotfix/pr-46579
fix: valuation for moving average with batches (backport #46579)
2025-03-18 17:26:41 +05:30
Rohit Waghchaure
5f1bb1f1ba fix: valuation for moving average with batches
(cherry picked from commit cdfbc73f4c)
2025-03-18 11:05:06 +00:00
rohitwaghchaure
79dacfdef8 Merge pull request #46560 from frappe/mergify/bp/version-15-hotfix/pr-46555
fix: performance issue for item list view (backport #46555)
2025-03-18 16:34:00 +05:30
Khushi Rawat
2144f89624 fix: repost future sle and gle after capitalization (#46576)
(cherry picked from commit 29d77aa19f)
2025-03-18 10:31:47 +00:00
Mihir Kandoi
bc408d979a fix: add validation to rename_subcontracting_fields patch
(cherry picked from commit 6c3117dc0d)
2025-03-18 10:30:41 +00:00
rohitwaghchaure
496f43e7e9 Merge pull request #46556 from frappe/st33974
fix: incorrect production item and bom no in job card
2025-03-18 15:58:26 +05:30
Mihir Kandoi
cd0abbae51 fix: fetch quality inspection parameter group
(cherry picked from commit 0a482c7ea8)
2025-03-18 10:27:30 +00:00
Smit Vora
004ecc53e5 Merge pull request #46578 from frappe/mergify/bp/version-15-hotfix/pr-46515
fix: ensure qty conversion when creating production plan from SO (backport #46515)
2025-03-18 15:00:34 +05:30
Smit Vora
8162fb3e5d fix: ensure qty conversion when creating production plan from SO
(cherry picked from commit 75882cc81c)
2025-03-18 08:56:21 +00:00
rohitwaghchaure
e8047ab2ca chore: fix conflicts 2025-03-18 12:01:11 +05:30
rohitwaghchaure
8dc371dac2 Merge pull request #46558 from frappe/mergify/bp/version-15-hotfix/pr-46553
fix: not able to select the item in the BOM (backport #46553)
2025-03-18 11:59:56 +05:30
rohitwaghchaure
0351faa8c0 Merge pull request #46559 from frappe/mergify/bp/version-15-hotfix/pr-46552
fix: Debit and Credit not equal for Purchase Invoice (backport #46552)
2025-03-18 11:59:38 +05:30
ruthra kumar
7e46845fea Merge pull request #46572 from frappe/mergify/bp/version-15-hotfix/pr-46566
fix: set correct currency for offset account gl entries (backport #46566)
2025-03-18 11:32:05 +05:30
ruthra kumar
e84333e5f2 Merge pull request #46571 from frappe/mergify/bp/version-15-hotfix/pr-46508
fix: use base currency total for UAE VAT 201 report (backport #46508)
2025-03-18 11:24:29 +05:30
ruthra kumar
e6dd3f3e64 fix: set correct currency for offset account gl entries
(cherry picked from commit c32e11e69d)
2025-03-18 05:45:13 +00:00
ruthra kumar
ec43ca97cb test: report ouput on foreign currency PI
(cherry picked from commit e80129627a)
2025-03-18 05:30:10 +00:00
ruthra kumar
3e2749d6d5 fix: use base currency total
(cherry picked from commit 46f4babcd0)
2025-03-18 05:30:09 +00:00
mergify[bot]
01bab8f22b perf: faster count estimation (backport #46550) (#46551)
perf: faster count estimation (#46550)

These count queries themselves take quite a long time. `estimate_count`
uses info_schema stats to guess the time.

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
(cherry picked from commit e47a87839b)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-03-17 21:23:30 +05:30
Ejaaz Khan
972c96b682 Merge pull request #46565 from frappe/mergify/bp/version-15-hotfix/pr-46564
refactor: remove default print format from sales invoice (backport #46564)
2025-03-17 20:52:46 +05:30
Ejaaz Khan
7cfd7e6539 refactor: remove default print format from sales invoice
(cherry picked from commit f10d1f2b1f)
2025-03-17 14:38:43 +00:00
ruthra kumar
bcd9fd090d Merge pull request #46562 from frappe/mergify/bp/version-15-hotfix/pr-46557
fix(Transaction Deletion Record): sql syntax error while deleting lead address (backport #46557)
2025-03-17 17:00:37 +05:30
venkat102
ea68caec7d fix(Transaction Deletion Record): sql syntax error while fetching lead address
(cherry picked from commit af0d6eeae8)
2025-03-17 11:09:38 +00:00
Rohit Waghchaure
34d6e4bdaa fix: performance issue for item list view
(cherry picked from commit d758fde881)

# Conflicts:
#	erpnext/stock/doctype/item_default/item_default.json
2025-03-17 11:08:38 +00:00
rohitwaghchaure
c7b8514c24 Merge pull request #46549 from frappe/mergify/bp/version-15-hotfix/pr-46504
fix: dashboard link for QC from PR (backport #46504)
2025-03-17 16:37:21 +05:30
Rohit Waghchaure
46b6e621c2 fix: Debit and Credit not equal for Purchase Invoice
(cherry picked from commit ecb31b7c9f)
2025-03-17 11:07:17 +00:00
Rohit Waghchaure
59c653ef3f fix: not able to select the item in the BOM
(cherry picked from commit 96d0cd23f1)
2025-03-17 11:07:16 +00:00
Mihir Kandoi
d071a6c900 fix: incorrect production item and bom no in job card 2025-03-17 16:06:54 +05:30
ruthra kumar
61e126901e Merge pull request #46523 from frappe/revert-46475-mergify/bp/version-15-hotfix/pr-46417
Revert "fix: error when creating delivery note from pick list (backport #46417)"
2025-03-17 15:15:10 +05:30
Rohit Waghchaure
426222d8e0 fix: dashboard link for QC from PR
(cherry picked from commit 551f89f14b)
2025-03-17 04:36:59 +00:00
Sagar Vora
ad24867699 Merge pull request #46534 from frappe/mergify/bp/version-15-hotfix/pr-46533
fix: exclude current doc when checking for duplicate (backport #46533)
2025-03-15 00:37:55 +05:30
Sagar Vora
b638aed758 fix: exclude current doc when checking for duplicate
(cherry picked from commit d8ef5e4d58)
2025-03-14 18:37:47 +00:00
Shariq Ansari
1a9873bc55 Merge pull request #46530 from frappe/mergify/bp/version-15-hotfix/pr-46529
fix: also consider CRM Deal as party type for ERPNext CRM Integration (backport #46529)
2025-03-14 16:07:27 +05:30
Shariq Ansari
65a80cffe7 fix: also consider CRM Deal as party type for ERPNext CRM Integration
(cherry picked from commit 04edbf7efe)
2025-03-14 10:34:11 +00:00
Mihir Kandoi
18e29de0c8 Merge pull request #46527 from frappe/mergify/bp/version-15-hotfix/pr-46513 2025-03-14 13:27:30 +05:30
Mihir Kandoi
e2418101ab fix: get bom_no from sales order item and material request item
(cherry picked from commit ac354505ef)
2025-03-14 07:36:47 +00:00
Mihir Kandoi
62c9181651 Merge pull request #46525 from frappe/mergify/bp/version-15-hotfix/pr-46514
fix: UOM conversion error when creating pick list from material trans… (backport #46514)
2025-03-14 13:04:43 +05:30
Mihir Kandoi
d0008ac6df Merge pull request #46524 from frappe/mergify/bp/version-15-hotfix/pr-46512
fix: hide subcontracted qty field if PO is not subcontracted (backport #46512)
2025-03-14 13:04:10 +05:30
Mihir Kandoi
be3e083e7d fix: wrong field mapping
(cherry picked from commit 8411e2e01f)
2025-03-14 07:13:46 +00:00
Mihir Kandoi
2f3dcc2137 fix: UOM conversion error when creating pick list from material transfer request
(cherry picked from commit 840ea070a9)
2025-03-14 07:13:46 +00:00
Mihir Kandoi
62feec5cc3 fix: hide subcontracted qty field if PO is not subcontracted
(cherry picked from commit 6e8521d761)
2025-03-14 07:12:44 +00:00
Nabin Hait
0852533751 Revert "fix: error when creating delivery note from pick list (backport #46417)" 2025-03-14 12:33:37 +05:30
ruthra kumar
99f59c0410 Merge pull request #46521 from frappe/mergify/bp/version-15-hotfix/pr-46497
fix: use `party` explicitly instead of party_field (backport #46497)
2025-03-14 11:08:05 +05:30
Sanket322
5dd5784716 fix: use party explicitly
(cherry picked from commit 5057e3fe30)
2025-03-14 04:52:33 +00:00
ruthra kumar
5ad3e5b5c8 Merge pull request #46520 from frappe/mergify/bp/version-15-hotfix/pr-46488
refactor: replace get_list with get_all for dynamic link child access (backport #46488)
2025-03-14 10:11:05 +05:30
Sugesh393
7fb26f802c refactor: replace get_list with get_all for dynamic link child access
(cherry picked from commit 8f7f0b81f6)
2025-03-14 04:22:25 +00:00
ruthra kumar
27d6659962 Merge pull request #46480 from frappe/mergify/bp/version-15-hotfix/pr-46473
fix: use shipping_address_name for address validation in sales invoice (backport #46473)
2025-03-14 09:50:37 +05:30
ruthra kumar
3737b4a300 refactor(test): unset billing address 2025-03-14 09:29:43 +05:30
ruthra kumar
1065e483b2 Merge pull request #46510 from aerele/fix/item-stock-difference-account
fix: set stock adjustment account in difference account (backport #45606)
2025-03-14 09:23:46 +05:30
Bhavan23
6202e302b1 fix: set stock adjustment account in difference account 2025-03-13 16:45:18 +05:30
mergify[bot]
2a788a4fb1 refactor: print receipt on order complete on pos (backport #46501) (#46507)
* refactor: print receipt on order complete on pos (#46501)

(cherry picked from commit 0552209310)

# Conflicts:
#	erpnext/selling/page/point_of_sale/pos_past_order_summary.js

* chore: resolve conflict

---------

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-03-13 14:30:38 +05:30
mergify[bot]
32335da839 fix: add parenttype condition to payment schedule query in accounts receivable report (backport #46370) (#46499)
Fix: add parenttype condition to payment schedule query in accounts receivable report (#46370)

fix: add parenttype condition to payment schedule query in accounts receivable report
(cherry picked from commit f311a0fc1c)

Co-authored-by: Shanuka Hewage <89955436+Shanuka-98@users.noreply.github.com>
2025-03-13 12:03:46 +05:30
ruthra kumar
c47cc0572b Merge pull request #46493 from frappe/mergify/bp/version-15-hotfix/pr-46492
fix: using `in` for lookup in list instead of directly assigning (backport #46492)
2025-03-13 08:41:22 +05:30
ruthra kumar
1ec971f805 Merge pull request #46496 from frappe/mergify/bp/version-15/pr-46423
Revert "fix: Show Credit Note amount in credit note column" (backport #46423)
2025-03-13 08:20:53 +05:30
ruthra kumar
a6e92d7d16 Merge pull request #46495 from frappe/mergify/bp/version-15-hotfix/pr-46423
Revert "fix: Show Credit Note amount in credit note column" (backport #46423)
2025-03-13 08:12:37 +05:30
ruthra kumar
4d7071299e Revert "fix: Show Credit Note amount in credit note column"
(cherry picked from commit 5a9767ca67)
2025-03-13 02:35:11 +00:00
ruthra kumar
0223651b5b Revert "fix: Show Credit Note amount in credit note column"
(cherry picked from commit 5a9767ca67)
2025-03-13 02:28:08 +00:00
Sanket Shah
950656d6f7 fix: using in for lookup in list instead of directly assigning (#46492)
fix: using in for lookup in list instead of assigning

Co-authored-by: Sanket322 <shahsanket322003.com>
(cherry picked from commit 38955af802)
2025-03-12 17:08:05 +00:00
Frappe PR Bot
08f47b626c chore(release): Bumped to Version 15.54.4
## [15.54.4](https://github.com/frappe/erpnext/compare/v15.54.3...v15.54.4) (2025-03-12)

### Bug Fixes

* `base_net_rate` Required to Check Valid Range (backport [#46332](https://github.com/frappe/erpnext/issues/46332)) ([#46382](https://github.com/frappe/erpnext/issues/46382)) ([877d5bd](877d5bd3aa))
* **account:** update account number from parent company ([428aedc](428aedc29c))
* Allow rename prospect doctype ([#46352](https://github.com/frappe/erpnext/issues/46352)) ([de46165](de46165768))
* auto email report creation ([#46343](https://github.com/frappe/erpnext/issues/46343)) ([5cc251a](5cc251a172))
* backport translations from develop ([#46428](https://github.com/frappe/erpnext/issues/46428)) ([9c70376](9c703765a1))
* calculate due date based on payment term (backport [#46416](https://github.com/frappe/erpnext/issues/46416)) ([#46479](https://github.com/frappe/erpnext/issues/46479)) ([7f14744](7f147446df))
* change fieldname for cash_flow to export (backport [#46353](https://github.com/frappe/erpnext/issues/46353)) ([#46366](https://github.com/frappe/erpnext/issues/46366)) ([23c4252](23c4252b9b))
* check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch ([7047fe2](7047fe2681))
* clear cashe on employee hierarchy change to reflect updated permissions ([4dfdb2b](4dfdb2b0a1))
* consider account freeze date in recalculate_amount_difference_field patch ([8b67527](8b67527900))
* consider stock freeze date in recalculate_amount_difference_field patch ([8264d42](8264d42cd9))
* credit note creation during pos invoice consolidation (backport [#46277](https://github.com/frappe/erpnext/issues/46277)) ([#46469](https://github.com/frappe/erpnext/issues/46469)) ([a4b8b4c](a4b8b4c771))
* do not recalculate qty for batch items during reposting ([bac36f3](bac36f342d))
* doctype name ([1dcbdf3](1dcbdf3257))
* enable no copy for serial no field ([3f9df2f](3f9df2fb2d))
* error in production analytics report ([db6ae61](db6ae61935))
* error when creating delivery note from pick list ([#46417](https://github.com/frappe/erpnext/issues/46417)) ([0b92101](0b921016ff))
* filter batches that going to be zero ([ac97489](ac97489a32))
* incorrect category in list ([002685f](002685fc89))
* make 'company_tax_id' and 'company_fiscal_code' as mandatory ([229f4d3](229f4d3d92))
* not able to save work order with alternative item ([9554a49](9554a49bbd))
* **payment entry:** fetch default bank account based on company (backport [#46379](https://github.com/frappe/erpnext/issues/46379)) ([#46471](https://github.com/frappe/erpnext/issues/46471)) ([1371199](13711993fe))
* pricing rule not ignored in Sales Order ([#46248](https://github.com/frappe/erpnext/issues/46248)) ([8def42f](8def42f751))
* rare precision issue preventing submission of subcontracting order ([6419d02](6419d020a1))
* recalculate_amount_difference_field patch ([f247f02](f247f02e49))
* remove no copy for serial no field of purchase receipt item ([baa564f](baa564fc94))
* rename sla fields patch ([73f11cf](73f11cf19e))
* rename sla fields patch ([#46465](https://github.com/frappe/erpnext/issues/46465)) ([5edbd88](5edbd8851a))
* rename_sla_fields patch ([7bc7557](7bc7557018))
* run bank reconciliation as a background job to prevent request timeout ([739cd18](739cd18604))
* set correct account currency for deferred expence account in PI ([f96848a](f96848a3b9))
* show remaining qty on 'Complete Job' button instead of full qty ([79e6550](79e6550321))
* sla fields patch ([0d044bc](0d044bc5bb))
* stock balance in and out value ([c2001e9](c2001e9c67))
* **test:** incorrect transaction exchange rate in test case ([b76c968](b76c96820e))
* typo in sales_invoice_print ([b610621](b6106212c1))
* uom reverts to default upon selecting do not explode ([#45693](https://github.com/frappe/erpnext/issues/45693)) ([6b1d209](6b1d20970e))
* validate accounting dimension company in Journal Entry & Stock Entry (backport [#46204](https://github.com/frappe/erpnext/issues/46204)) ([#46369](https://github.com/frappe/erpnext/issues/46369)) ([c816f9b](c816f9bd0a))
* validate last_gl_update exists before comparing (backport [#46464](https://github.com/frappe/erpnext/issues/46464)) ([#46468](https://github.com/frappe/erpnext/issues/46468)) ([3cef94e](3cef94e2ed))
* validations and account type filter for `Tax Withholding Category` ([#46207](https://github.com/frappe/erpnext/issues/46207)) ([cc30a01](cc30a01898))
2025-03-12 14:37:29 +00:00
ruthra kumar
0283f7526c Merge pull request #46444 from frappe/version-15-hotfix
chore: release v15
2025-03-12 20:05:56 +05:30
ruthra kumar
3ad451dd6e Merge branch 'version-15' into version-15-hotfix 2025-03-12 19:48:08 +05:30
rohitwaghchaure
9e409bde2e Merge pull request #46486 from frappe/st33357
fix: enable no copy for serial no field
2025-03-12 19:39:32 +05:30
ruthra kumar
8459166323 Merge pull request #46482 from frappe/mergify/bp/version-15-hotfix/pr-46207
fix: validations and account type filter for `Tax Withholding Category` (backport #46207)
2025-03-12 17:46:04 +05:30
ruthra kumar
e1328de712 Merge pull request #46487 from frappe/mergify/bp/version-15-hotfix/pr-46251
fix(bank-reconciliation): run bank reconciliation as a background job (backport #46251)
2025-03-12 17:45:45 +05:30
mergify[bot]
d3a2350b3e fix(invoice):validate return invoice qty (backport #46451) (#46481)
fix(invoice):validate return invoice qty (#46451)

* fix(invoice): validate return quantity when update stock is unchecked

* test: add unit test for validating fully returned invoice quantity

(cherry picked from commit ba96c86576)

Co-authored-by: Bhavansathru <122002510+Bhavan23@users.noreply.github.com>
2025-03-12 17:23:26 +05:30
Bhavan23
739cd18604 fix: run bank reconciliation as a background job to prevent request timeout
(cherry picked from commit a29c6a5aea)
2025-03-12 11:52:26 +00:00
ruthra kumar
e61cc9b12e Merge pull request #46483 from frappe/mergify/bp/version-15-hotfix/pr-46248
fix: pricing rule not ignored in Sales Order (backport #46248)
2025-03-12 17:13:13 +05:30
Mihir Kandoi
baa564fc94 fix: remove no copy for serial no field of purchase receipt item 2025-03-12 17:11:14 +05:30
rohitwaghchaure
a55ec56fbf Merge pull request #46484 from frappe/45440
fix: show remaining qty on 'Complete Job' button instead of full qty
2025-03-12 16:44:57 +05:30
Mihir Kandoi
3f9df2fb2d fix: enable no copy for serial no field 2025-03-12 16:35:50 +05:30
mergify[bot]
7f147446df fix: calculate due date based on payment term (backport #46416) (#46479)
fix: calculate due date based on payment term (#46416)

(cherry picked from commit 9e808c832f)

Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com>
2025-03-12 16:30:14 +05:30
Sugesh G
8def42f751 fix: pricing rule not ignored in Sales Order (#46248)
* fix: pricing rule not ignored in Sales Order

* test: update parameter do_not_submit to do_not_save

(cherry picked from commit f8c659d8d5)
2025-03-12 10:58:47 +00:00
Mihir Kandoi
79e6550321 fix: show remaining qty on 'Complete Job' button instead of full qty 2025-03-12 16:27:33 +05:30
Priyansh Shah
cc30a01898 fix: validations and account type filter for Tax Withholding Category (#46207)
fix: validations and account type filter for tax withholding category
(cherry picked from commit d371236684)
2025-03-12 10:52:32 +00:00
Sugesh G
38dabdf584 fix: use shipping_address_name for address validation in sales invoice (#46473)
* fix: validate address and contact related to party

* fix: solve unboundlocal error

* refactor: improve variable scope

* refactor: translatable strings

* fix: use shipping_address_name for address validation in sales invoice

* test: add new unit test for address and contact validation

* chore: to avoid keyerror

---------

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
(cherry picked from commit 0bdb81db53)
2025-03-12 10:44:37 +00:00
Ninad Parikh
877d5bd3aa fix: base_net_rate Required to Check Valid Range (backport #46332) (#46382)
fix: `base_net_rate` required to check valid range
2025-03-12 16:12:44 +05:30
Mihir Kandoi
0b53bd3e9a Merge pull request #46475 from frappe/mergify/bp/version-15-hotfix/pr-46417
fix: error when creating delivery note from pick list (backport #46417)
2025-03-12 16:09:50 +05:30
Mihir Kandoi
3606fe8fba Merge pull request #46467 from frappe/mergify/bp/version-15-hotfix/pr-46465
fix: rename sla fields patch (backport #46465)
2025-03-12 16:09:37 +05:30
Mihir Kandoi
0b921016ff fix: error when creating delivery note from pick list (#46417)
(cherry picked from commit 67e9389a02)
2025-03-12 10:00:53 +00:00
rohitwaghchaure
4d49608a68 Merge pull request #46474 from frappe/mergify/bp/version-15-hotfix/pr-46470
fix: do not recalculate qty for batch items during reposting (backport #46470)
2025-03-12 12:39:06 +05:30
Rohit Waghchaure
bac36f342d fix: do not recalculate qty for batch items during reposting
(cherry picked from commit 0753c018d2)
2025-03-12 06:48:00 +00:00
mergify[bot]
a4b8b4c771 fix: credit note creation during pos invoice consolidation (backport #46277) (#46469)
* fix: credit note creation during pos invoice consolidation (#46277)

* fix: credit note creation during pos invoice consolidation

* fix: added check to skip merging empty list of return pos invoices

* fix: sql query

* fix: using return invoice name instead of return invoice object

* fix: added pos invoice field in sales invoice item

(cherry picked from commit 8ba4ac3b86)

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

* chore: resolve conflict

---------

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-03-12 11:41:41 +05:30
mergify[bot]
3cef94e2ed fix: validate last_gl_update exists before comparing (backport #46464) (#46468)
fix: validate last_gl_update exists before comparing (#46464)

(cherry picked from commit 0a5ca0c35f)

Co-authored-by: Dany Robert <rtdany10@gmail.com>
2025-03-12 11:05:24 +05:30
mergify[bot]
13711993fe fix(payment entry): fetch default bank account based on company (backport #46379) (#46471)
fix(payment entry): fetch default bank account based on company (#46379)

(cherry picked from commit b72f6f5a3d)

Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com>
2025-03-12 11:05:08 +05:30
Nabin Hait
24678b0e24 chore: conflicts 2025-03-12 10:38:26 +05:30
Mihir Kandoi
5edbd8851a fix: rename sla fields patch (#46465)
* fix: rename sla fields patch

* fix: rerun patch

(cherry picked from commit 8bce42e633)

# Conflicts:
#	erpnext/patches.txt
2025-03-12 05:04:52 +00:00
rohitwaghchaure
6582e4c5f9 Merge pull request #46462 from frappe/mergify/bp/version-15-hotfix/pr-46455
fix: error in production analytics report (backport #46455)
2025-03-12 09:50:35 +05:30
rohitwaghchaure
fd1c1ba35e Merge pull request #46461 from frappe/mergify/bp/version-15-hotfix/pr-46460
fix: rename sla fields patch (backport #46460)
2025-03-12 09:49:46 +05:30
Mihir Kandoi
db6ae61935 fix: error in production analytics report
(cherry picked from commit 03e66468f6)
2025-03-11 19:00:35 +00:00
Mihir Kandoi
73f11cf19e fix: rename sla fields patch
(cherry picked from commit b6c18849c5)
2025-03-11 18:57:17 +00:00
rohitwaghchaure
8f7dc827ea Merge pull request #46459 from frappe/mergify/bp/version-15-hotfix/pr-46452
fix: sla fields patch (backport #46452)
2025-03-12 00:01:35 +05:30
Mihir Kandoi
0d044bc5bb fix: sla fields patch
(cherry picked from commit d653899372)
2025-03-11 18:08:24 +00:00
rohitwaghchaure
14ee2d239a Merge pull request #46441 from frappe/mergify/bp/version-15-hotfix/pr-46436
fix: filter batches that going to be zero (backport #46436)
2025-03-11 23:38:21 +05:30
Raffael Meyer
fc8eeaf4f6 Merge pull request #46457 from frappe/mergify/bp/version-15-hotfix/pr-46453
ci: ignore PRs labeled with "skip-release-notes" when generating release notes (backport #46453)
2025-03-11 17:51:58 +01:00
barredterra
aad8c88532 ci: ignore PRs labeled with "skip-release-notes" when generating release notes
(cherry picked from commit 57007bf937)
2025-03-11 16:35:20 +00:00
ruthra kumar
e783536ba0 Merge pull request #46450 from frappe/mergify/bp/version-15-hotfix/pr-46398
chore: rename print and stationery account (backport #46398)
2025-03-11 18:12:19 +05:30
chethank1407
ee3feba386 chore: rename print and stationery account
(cherry picked from commit 615997b774)
2025-03-11 12:03:42 +00:00
ruthra kumar
cb9be11448 Merge pull request #46447 from frappe/mergify/bp/version-15-hotfix/pr-46344
fix: make 'company_tax_id' and 'company_fiscal_code' as mandatory (backport #46344)
2025-03-11 17:31:19 +05:30
ruthra kumar
31dc6021e2 chore: translatable strings
(cherry picked from commit 121798ba85)
2025-03-11 11:42:30 +00:00
Bhavan23
229f4d3d92 fix: make 'company_tax_id' and 'company_fiscal_code' as mandatory
(cherry picked from commit abd044eb0d)
2025-03-11 11:42:19 +00:00
ruthra kumar
c25862a85f Merge pull request #46446 from frappe/mergify/bp/version-15-hotfix/pr-45818
fix: set correct account currency for deferred expense account (backport #45818)
2025-03-11 16:50:55 +05:30
vishakhdesai
f96848a3b9 fix: set correct account currency for deferred expence account in PI
(cherry picked from commit 398083853c)
2025-03-11 11:06:14 +00:00
Rohit Waghchaure
ac97489a32 fix: filter batches that going to be zero
(cherry picked from commit aba512c1c6)
2025-03-11 08:02:49 +00:00
ruthra kumar
02ff406b7c Merge pull request #46439 from frappe/mergify/bp/version-15-hotfix/pr-46372
fix(account): update account number from parent company (backport #46372)
2025-03-11 11:19:33 +05:30
venkat102
428aedc29c fix(account): update account number from parent company
(cherry picked from commit 4a4894bc01)
2025-03-11 05:32:15 +00:00
ruthra kumar
6af24dca6e Merge pull request #46432 from frappe/mergify/bp/version-15-hotfix/pr-46427
fix: not able to save work order with alternative item (backport #46414) (backport #46427)
2025-03-11 11:02:04 +05:30
ruthra kumar
8980eb9b9d Merge pull request #46437 from frappe/mergify/bp/version-15-hotfix/pr-46426
fix: clear cashe on employee hierarchy change (backport #46426)
2025-03-11 10:58:50 +05:30
Asmita Hase
4dfdb2b0a1 fix: clear cashe on employee hierarchy change to reflect updated permissions
(cherry picked from commit 6789578b27)
2025-03-11 05:13:04 +00:00
Rohit Waghchaure
9554a49bbd fix: not able to save work order with alternative item
(cherry picked from commit 6ca1f9bc73)
(cherry picked from commit ac7fc608aa)
2025-03-10 17:44:57 +00:00
rohitwaghchaure
5b69445294 Merge pull request #46420 from frappe/mergify/bp/version-15-hotfix/pr-46418
fix: stock balance in and out value (backport #46418)
2025-03-10 23:13:37 +05:30
Raffael Meyer
9c703765a1 fix: backport translations from develop (#46428) 2025-03-10 14:32:19 +01:00
rohitwaghchaure
043539fcdb chore: fix conflicts 2025-03-10 17:37:29 +05:30
ruthra kumar
54a76d8932 Merge pull request #46425 from frappe/mergify/bp/version-15-hotfix/pr-46407
fix: typo in sales_invoice_print (backport #46407)
2025-03-10 16:55:28 +05:30
mahsem
b6106212c1 fix: typo in sales_invoice_print
(cherry picked from commit f7bcae83e4)
2025-03-10 11:18:23 +00:00
Rohit Waghchaure
c2001e9c67 fix: stock balance in and out value
(cherry picked from commit e917bd5334)

# Conflicts:
#	erpnext/stock/report/stock_balance/stock_balance.py
2025-03-10 10:06:09 +00:00
Frappe PR Bot
47429095a2 chore(release): Bumped to Version 15.54.3
## [15.54.3](https://github.com/frappe/erpnext/compare/v15.54.2...v15.54.3) (2025-03-09)

### Bug Fixes

* consider account freeze date in recalculate_amount_difference_field patch ([34f03d6](34f03d608a))
* consider stock freeze date in recalculate_amount_difference_field patch ([a18721d](a18721d21c))
2025-03-09 11:04:11 +00:00
rohitwaghchaure
2f3f87fe7e Merge pull request #46403 from frappe/mergify/bp/version-15/pr-46402
fix: consider account freeze date in recalculate_amount_difference_fi… (backport #46395) (backport #46402)
2025-03-09 16:32:52 +05:30
Mihir Kandoi
2b4dfca3ff chore: resolve conflicts
(cherry picked from commit 985fb5dfdc)
2025-03-08 17:16:43 +00:00
Mihir Kandoi
a18721d21c fix: consider stock freeze date in recalculate_amount_difference_field patch
(cherry picked from commit cd72532789)
(cherry picked from commit 8264d42cd9)
2025-03-08 17:16:43 +00:00
Mihir Kandoi
34f03d608a fix: consider account freeze date in recalculate_amount_difference_field patch
(cherry picked from commit 696f931678)

# Conflicts:
#	erpnext/patches/v15_0/recalculate_amount_difference_field.py
(cherry picked from commit 8b67527900)
2025-03-08 17:16:43 +00:00
rohitwaghchaure
b786cd30e6 Merge pull request #46402 from frappe/mergify/bp/version-15-hotfix/pr-46395
fix: consider account freeze date in recalculate_amount_difference_fi… (backport #46395)
2025-03-08 22:45:06 +05:30
Mihir Kandoi
985fb5dfdc chore: resolve conflicts 2025-03-08 22:22:12 +05:30
Mihir Kandoi
8264d42cd9 fix: consider stock freeze date in recalculate_amount_difference_field patch
(cherry picked from commit cd72532789)
2025-03-08 16:28:33 +00:00
Mihir Kandoi
8b67527900 fix: consider account freeze date in recalculate_amount_difference_field patch
(cherry picked from commit 696f931678)

# Conflicts:
#	erpnext/patches/v15_0/recalculate_amount_difference_field.py
2025-03-08 16:28:32 +00:00
Frappe PR Bot
2ce8299bc8 chore(release): Bumped to Version 15.54.2
## [15.54.2](https://github.com/frappe/erpnext/compare/v15.54.1...v15.54.2) (2025-03-08)

### Bug Fixes

* incorrect category in list ([3bdd4ce](3bdd4ce116))
* **test:** incorrect transaction exchange rate in test case ([3015628](3015628519))
2025-03-08 07:42:44 +00:00
ruthra kumar
84b03485d6 Merge pull request #46397 from frappe/mergify/bp/version-15/pr-46064
fix: Debit and Credit mismatch on transaction currency debit and credit values (backport #46064)
2025-03-08 13:11:25 +05:30
ruthra kumar
d0b14f1907 chore: resolve conflict 2025-03-08 12:28:49 +05:30
ruthra kumar
cd1803a74d refactor: internal transfer gl
(cherry picked from commit f1d8feec15)
2025-03-08 06:56:37 +00:00
ruthra kumar
a1cf27ec17 test: assert total debit and credit for trx currency
(cherry picked from commit 55d0636123)
2025-03-08 06:56:37 +00:00
ruthra kumar
61880a311a refactor: handle rounding diff for trx currency dr and cr
(cherry picked from commit 455a55b2ce)
2025-03-08 06:56:37 +00:00
ruthra kumar
2d290b153d refactor: trx currency dr and cr for tax rows and item rows
(cherry picked from commit 4cd3f3531c)
2025-03-08 06:56:36 +00:00
ruthra kumar
cacb720556 refactor: convert tax amount using exchange rate
(cherry picked from commit 7528ef147a)
2025-03-08 06:56:36 +00:00
ruthra kumar
3bdd4ce116 fix: incorrect category in list
(cherry picked from commit 6545467aec)
2025-03-08 06:56:36 +00:00
ruthra kumar
c479998cd6 chore: typo
(cherry picked from commit bc792c61e9)
2025-03-08 06:56:36 +00:00
ruthra kumar
501e388186 refactor: isolate to specific doctypes
(cherry picked from commit b348aa3b37)
2025-03-08 06:56:35 +00:00
ruthra kumar
af45ec0d6d refactor(test): save first to let the tax table populate
(cherry picked from commit 23d465805b)
2025-03-08 06:56:35 +00:00
ruthra kumar
3015628519 fix(test): incorrect transaction exchange rate in test case
(cherry picked from commit a31770d122)
2025-03-08 06:56:35 +00:00
ruthra kumar
8b6eea6349 refactor: set transaction currency and rate before gl map
(cherry picked from commit ceca5b4c72)
2025-03-08 06:56:34 +00:00
ruthra kumar
81c29e8f8c refactor: handle payment entry
(cherry picked from commit 5c86e3ce85)
2025-03-08 06:56:34 +00:00
ruthra kumar
04758d3de3 refactor: handle Journal entries
(cherry picked from commit 9f3847c0f8)
2025-03-08 06:56:34 +00:00
ruthra kumar
615b0c40a3 refactor: move utility method to controller
(cherry picked from commit d1d06885dc)
2025-03-08 06:56:34 +00:00
ruthra kumar
231abab321 refactor: set transaction currency dr/cr in sales invoice
(cherry picked from commit 3e292ef2cb)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.py
2025-03-08 06:56:33 +00:00
ruthra kumar
fff3b1e84e refactor: handle stocked items
(cherry picked from commit ee93ed8c97)
2025-03-08 06:56:33 +00:00
ruthra kumar
5299a1032b refactor: handle stocked items
(cherry picked from commit 7ff3977394)
2025-03-08 06:56:33 +00:00
ruthra kumar
1e5fbc0a48 refactor: set tr currency dr & cr directly on parent document
(cherry picked from commit e9af567033)
2025-03-08 06:56:32 +00:00
ruthra kumar
5c47c35a0f refactor: use highest precision for storing exc rate
(cherry picked from commit b115bf2e2a)
2025-03-08 06:56:32 +00:00
ruthra kumar
2bf910a786 Merge pull request #46396 from frappe/mergify/bp/version-15-hotfix/pr-46064
fix: Debit and Credit mismatch on transaction currency debit and credit values (backport #46064)
2025-03-08 12:25:57 +05:30
ruthra kumar
0b8673777a chore: resolve conflict 2025-03-08 12:11:54 +05:30
ruthra kumar
8f4c1e7169 refactor: internal transfer gl
(cherry picked from commit f1d8feec15)
2025-03-08 06:36:37 +00:00
ruthra kumar
f303245fae test: assert total debit and credit for trx currency
(cherry picked from commit 55d0636123)
2025-03-08 06:36:37 +00:00
ruthra kumar
cd21e5c652 refactor: handle rounding diff for trx currency dr and cr
(cherry picked from commit 455a55b2ce)
2025-03-08 06:36:37 +00:00
ruthra kumar
57e0f73595 refactor: trx currency dr and cr for tax rows and item rows
(cherry picked from commit 4cd3f3531c)
2025-03-08 06:36:37 +00:00
ruthra kumar
2c73e31742 refactor: convert tax amount using exchange rate
(cherry picked from commit 7528ef147a)
2025-03-08 06:36:36 +00:00
ruthra kumar
002685fc89 fix: incorrect category in list
(cherry picked from commit 6545467aec)
2025-03-08 06:36:36 +00:00
ruthra kumar
38a3a43ba5 chore: typo
(cherry picked from commit bc792c61e9)
2025-03-08 06:36:36 +00:00
ruthra kumar
07f938cc10 refactor: isolate to specific doctypes
(cherry picked from commit b348aa3b37)
2025-03-08 06:36:35 +00:00
ruthra kumar
5c013172f9 refactor(test): save first to let the tax table populate
(cherry picked from commit 23d465805b)
2025-03-08 06:36:35 +00:00
ruthra kumar
b76c96820e fix(test): incorrect transaction exchange rate in test case
(cherry picked from commit a31770d122)
2025-03-08 06:36:35 +00:00
ruthra kumar
1d56931050 refactor: set transaction currency and rate before gl map
(cherry picked from commit ceca5b4c72)
2025-03-08 06:36:34 +00:00
ruthra kumar
66dc79ceb5 refactor: handle payment entry
(cherry picked from commit 5c86e3ce85)
2025-03-08 06:36:34 +00:00
ruthra kumar
00cbc89b5f refactor: handle Journal entries
(cherry picked from commit 9f3847c0f8)
2025-03-08 06:36:33 +00:00
ruthra kumar
d7baa451e3 refactor: move utility method to controller
(cherry picked from commit d1d06885dc)
2025-03-08 06:36:33 +00:00
ruthra kumar
e0b5386bf0 refactor: set transaction currency dr/cr in sales invoice
(cherry picked from commit 3e292ef2cb)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.py
2025-03-08 06:36:33 +00:00
ruthra kumar
133dca1824 refactor: handle stocked items
(cherry picked from commit ee93ed8c97)
2025-03-08 06:36:32 +00:00
ruthra kumar
eb0df50f1b refactor: handle stocked items
(cherry picked from commit 7ff3977394)
2025-03-08 06:36:32 +00:00
ruthra kumar
5761cfb3d5 refactor: set tr currency dr & cr directly on parent document
(cherry picked from commit e9af567033)
2025-03-08 06:36:32 +00:00
ruthra kumar
568b582b6a refactor: use highest precision for storing exc rate
(cherry picked from commit b115bf2e2a)
2025-03-08 06:36:31 +00:00
Shariq Ansari
d115c1c156 Merge pull request #46365 from frappe/mergify/bp/version-15-hotfix/pr-46352
fix: Allow rename prospect doctype (backport #46352)
2025-03-07 17:12:22 +05:30
Nabin Hait
4e688778dc chore: linter issue 2025-03-07 10:28:52 +05:30
Mihir Kandoi
b5890c1d55 Merge pull request #46376 from frappe/mergify/bp/version-15-hotfix/pr-46374 2025-03-06 23:00:13 +05:30
Mihir Kandoi
6419d020a1 fix: rare precision issue preventing submission of subcontracting order
(cherry picked from commit 33b71544db)
2025-03-06 16:46:04 +00:00
Nabin Hait
60364f6dc9 chore: conflicts 2025-03-06 18:14:09 +05:30
mergify[bot]
23c4252b9b fix: change fieldname for cash_flow to export (backport #46353) (#46366)
fix: change fieldname for cash_flow to export (#46353)

fix: change fieldname for cash_flow

Co-authored-by: Sanket322 <shahsanket322003.com>
(cherry picked from commit 606dcb0ad1)

Co-authored-by: Sanket Shah <113279972+Sanket322@users.noreply.github.com>
2025-03-06 18:12:31 +05:30
mergify[bot]
c816f9bd0a fix: validate accounting dimension company in Journal Entry & Stock Entry (backport #46204) (#46369)
fix: validate accounting dimension company in Journal Entry & Stock Entry (#46204)

* fix: validate accounting dimension company in journal entry and stock entry

* test: update test cases to validate company-based accounting dimension

* fix(test): ensure 'Pick List' company matches 'Delivery Note' to prevent test failures

* chore: remove redundant lines of code

(cherry picked from commit 7b6ebad9e6)

Co-authored-by: Bhavansathru <122002510+Bhavan23@users.noreply.github.com>
2025-03-06 18:12:06 +05:30
Shariq Ansari
de46165768 fix: Allow rename prospect doctype (#46352)
fix: allow rename prospect doctype
(cherry picked from commit 884709deb8)

# Conflicts:
#	erpnext/crm/doctype/prospect/prospect.json
2025-03-06 11:50:08 +00:00
Justine Jay
5cc251a172 fix: auto email report creation (#46343)
* fix(financial_statements): mandatory based on filter_based_on value

* fix(financial_statements.js): include options for multiselect
2025-03-06 17:18:26 +05:30
Frappe PR Bot
7c8b34fd8f chore(release): Bumped to Version 15.54.1
## [15.54.1](https://github.com/frappe/erpnext/compare/v15.54.0...v15.54.1) (2025-03-06)

### Bug Fixes

* check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch ([12bf31d](12bf31df87))
* recalculate_amount_difference_field patch ([041335f](041335f318))
* rename_sla_fields patch ([bb553c2](bb553c27ab))
2025-03-06 11:05:55 +00:00
rohitwaghchaure
83320c97fa Merge pull request #46360 from frappe/mergify/bp/version-15/pr-46357
fix: rename_sla_fields patch (backport #46355) (backport #46357)
2025-03-06 16:34:33 +05:30
rohitwaghchaure
b004865240 Merge pull request #46362 from frappe/mergify/bp/version-15/pr-46358
fix: recalculate_amount_difference_field patch (backport #46354) (backport #46358)
2025-03-06 16:34:20 +05:30
Mihir Kandoi
525780645a chore: resolve conflicts
(cherry picked from commit 8e65b0ec0c)
2025-03-06 10:42:01 +00:00
Mihir Kandoi
12bf31df87 fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch
(cherry picked from commit 95d1976931)

# Conflicts:
#	erpnext/patches/v15_0/recalculate_amount_difference_field.py
(cherry picked from commit 7047fe2681)
2025-03-06 10:42:01 +00:00
Mihir Kandoi
041335f318 fix: recalculate_amount_difference_field patch
(cherry picked from commit 0492b941ff)

# Conflicts:
#	erpnext/patches/v15_0/recalculate_amount_difference_field.py
(cherry picked from commit f247f02e49)
2025-03-06 10:42:00 +00:00
rohitwaghchaure
9c9c8c9356 Merge pull request #46358 from frappe/mergify/bp/version-15-hotfix/pr-46354
fix: recalculate_amount_difference_field patch (backport #46354)
2025-03-06 14:53:08 +05:30
Mihir Kandoi
8e65b0ec0c chore: resolve conflicts 2025-03-06 14:13:55 +05:30
Mihir Kandoi
bb553c27ab fix: rename_sla_fields patch
(cherry picked from commit e8d4a487c6)
(cherry picked from commit 7bc7557018)
2025-03-06 08:20:30 +00:00
rohitwaghchaure
7080e1422d Merge pull request #46357 from frappe/mergify/bp/version-15-hotfix/pr-46355
fix: rename_sla_fields patch (backport #46355)
2025-03-06 13:48:54 +05:30
Mihir Kandoi
7047fe2681 fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch
(cherry picked from commit 95d1976931)

# Conflicts:
#	erpnext/patches/v15_0/recalculate_amount_difference_field.py
2025-03-06 07:58:38 +00:00
Mihir Kandoi
f247f02e49 fix: recalculate_amount_difference_field patch
(cherry picked from commit 0492b941ff)

# Conflicts:
#	erpnext/patches/v15_0/recalculate_amount_difference_field.py
2025-03-06 07:58:37 +00:00
Mihir Kandoi
7bc7557018 fix: rename_sla_fields patch
(cherry picked from commit e8d4a487c6)
2025-03-06 07:49:12 +00:00
rohitwaghchaure
e72264f448 Merge pull request #46346 from frappe/mergify/bp/version-15-hotfix/pr-46339
fix: doctype name (backport #46339)
2025-03-05 21:44:40 +05:30
Rohit Waghchaure
1dcbdf3257 fix: doctype name
(cherry picked from commit d039310d80)
2025-03-05 15:48:13 +00:00
Mihir Kandoi
5d6730a059 Merge pull request #46345 from frappe/mergify/bp/version-15-hotfix/pr-45693
fix: uom reverts to default upon selecting do not explode (backport #45693)
2025-03-05 21:09:04 +05:30
Mihir Kandoi
6b1d20970e fix: uom reverts to default upon selecting do not explode (#45693)
* fix: uom reverts to default upon selecting do not explode

* fix: logical error failing tests

(cherry picked from commit 58ed697ba5)
2025-03-05 15:21:58 +00:00
Frappe PR Bot
528107e224 chore(release): Bumped to Version 15.54.0
# [15.54.0](https://github.com/frappe/erpnext/compare/v15.53.4...v15.54.0) (2025-03-05)

### Bug Fixes

* Accounting Period validation throwing for different companies ([6df9cf3](6df9cf327d))
* Add company filter at get_invoice method (backport [#46238](https://github.com/frappe/erpnext/issues/46238)) ([#46299](https://github.com/frappe/erpnext/issues/46299)) ([4f80ddd](4f80ddd834))
* Add permission check in POS's `Toggle Recent Orders` (backport [#46010](https://github.com/frappe/erpnext/issues/46010)) ([#46274](https://github.com/frappe/erpnext/issues/46274)) ([7759775](7759775ee6))
* adding cost center on pos invoice items while applying product discount (backport [#46082](https://github.com/frappe/erpnext/issues/46082)) ([#46322](https://github.com/frappe/erpnext/issues/46322)) ([9a433a6](9a433a6750))
* **asset depreciation schedules:** enable auto commit ([899e468](899e468f6a))
* auto allocation for negative amount outstanding for Customers in Payment Entry ([78a329e](78a329e573))
* Batch Price gets updated only if it is a billed item ([dbd47df](dbd47dff98))
* Batch Price gets updated only if it is a billed item ([8ed512f](8ed512f6c6))
* change voucher_type and voucher_no field type to data ([3a03865](3a03865a8f))
* Close and Reopen buttons dissapear after saving changes ([#46048](https://github.com/frappe/erpnext/issues/46048)) ([506dd3c](506dd3c6b9))
* consider journal entry and return invoice in paid_amount calculation (backport [#46129](https://github.com/frappe/erpnext/issues/46129)) ([#46319](https://github.com/frappe/erpnext/issues/46319)) ([836fd8f](836fd8fbc4))
* consolidate gl entries by project in General Ledger Report (backport [#46314](https://github.com/frappe/erpnext/issues/46314)) ([#46321](https://github.com/frappe/erpnext/issues/46321)) ([6aa8803](6aa8803068))
* Convert tuple of tuples to list of dicts for dot notation access ([#46062](https://github.com/frappe/erpnext/issues/46062)) ([ef19551](ef195513d0))
* delivery note from sales order uom conversion mistake ([d10add4](d10add4b1e))
* depreciation and balances report correction (backport [#46259](https://github.com/frappe/erpnext/issues/46259)) ([#46305](https://github.com/frappe/erpnext/issues/46305)) ([087dde5](087dde5873))
* discount accounting for v15 ([f609012](f609012f02))
* do not include opening invoices in billed items to be received report ([eee500f](eee500f20e))
* don't allow renaming account while system is actively in use (backport [#46176](https://github.com/frappe/erpnext/issues/46176)) ([#46210](https://github.com/frappe/erpnext/issues/46210)) ([faee8d6](faee8d6c5e))
* dont update rate of free item when batch is updated ([9e649d8](9e649d8522))
* error ([61d5680](61d5680c8d))
* exclude already consumed purchase receipt items from asset capitalization (backport [#46329](https://github.com/frappe/erpnext/issues/46329)) ([#46336](https://github.com/frappe/erpnext/issues/46336)) ([6c1ceff](6c1ceff8ee))
* exclude cancelled gl entries ([5e08386](5e083861a4))
* fiscal year error ([7b13d8c](7b13d8cd98))
* fixing test case ([9f4311e](9f4311e7fb))
* if invoice is return then add amount in proper column ([0a65217](0a65217423))
* Include additional account types for Expense Account in LCV (backport [#46206](https://github.com/frappe/erpnext/issues/46206)) ([#46296](https://github.com/frappe/erpnext/issues/46296)) ([88234bb](88234bbf9a))
* incorrect batch picked ([e94f0b1](e94f0b1cca))
* incorrect batch picked in the pick list (backport [#45761](https://github.com/frappe/erpnext/issues/45761)) ([#46315](https://github.com/frappe/erpnext/issues/46315)) ([5a3073c](5a3073c4c1))
* incorrectly billed amount in the purchase receipt ([c247cf8](c247cf888b))
* Naming of Purchase Amount (backport [#46051](https://github.com/frappe/erpnext/issues/46051)) ([#46324](https://github.com/frappe/erpnext/issues/46324)) ([aaf35c5](aaf35c5df9))
* only include submitted docs for internal received quantity validation (backport [#46262](https://github.com/frappe/erpnext/issues/46262)) ([#46304](https://github.com/frappe/erpnext/issues/46304)) ([5ae9faa](5ae9faab91))
* patch ([5e06e4a](5e06e4acce))
* patch ([8f2fdca](8f2fdcae88))
* patch path ([af49f5a](af49f5a8af))
* **patch:** Ensure SLE indexes (backport [#46131](https://github.com/frappe/erpnext/issues/46131)) ([#46135](https://github.com/frappe/erpnext/issues/46135)) ([f3cafef](f3cafef6a7))
* payment entry exchange gain loss issue ([3fb9033](3fb9033fb7))
* pos item detail serial no field (backport [#46211](https://github.com/frappe/erpnext/issues/46211)) ([#46212](https://github.com/frappe/erpnext/issues/46212)) ([de0dfbc](de0dfbca9a))
* pos item selection using serial no (backport [#46200](https://github.com/frappe/erpnext/issues/46200)) ([#46203](https://github.com/frappe/erpnext/issues/46203)) ([0f263bc](0f263bcff2))
* **pos:** get parent item group without user permission ([#46020](https://github.com/frappe/erpnext/issues/46020)) ([29f3aac](29f3aac925))
* production analytics report ([5668795](5668795884))
* rate changing on the deliver note ([75bc68b](75bc68b863))
* rearrange stock settings fields ([87703c6](87703c6511))
* removed mandatory property for the cost center field ([a94292a](a94292a69f))
* rename some sla fields ([c5717b9](c5717b983d))
* replacing serial and batch bundle on pos with auto fetch serial nos (backport [#46236](https://github.com/frappe/erpnext/issues/46236)) ([#46337](https://github.com/frappe/erpnext/issues/46337)) ([1e85f69](1e85f69072))
* **report:** allow `Closed` purchase orders to be visible ([20c4487](20c4487853))
* **report:** allow `Closed` sales orders to be visible ([8799af9](8799af9747))
* **report:** filter sales / purchase orders based on date filters ([2221bf1](2221bf1cba))
* revamp logic (split parent and child) ([7437cea](7437cea458))
* revert last commit ([a09c57f](a09c57f0d1))
* set landed cost based on purchase invoice rate ([fdaf5fa](fdaf5fafda))
* set taxes before calculating taxes and totals ([90dea42](90dea426d8))
* source warehouse not fetched in bom creator ([6157fed](6157fed71c))
* stock qty not recalculate on changing of the qty ([331798b](331798babc))
* stock reservation issue while making Purchase Invoice ([8bd7195](8bd71954f3))
* syntax error ([1790bcc](1790bcc6d1))
* syntax error ([bd48d39](bd48d391e4))
* syntax error ([cc535b7](cc535b7636))
* test case for debit note ([a8b31df](a8b31df65d))
* tests ([46b0734](46b0734d6f))
* tests ([d413039](d41303961c))
* translation DE ([ddcf79d](ddcf79da1d))
* use else instead of unnecessary elif ([6f760d1](6f760d197d))
* use valuation method from settings in stock ageing report (backport [#46068](https://github.com/frappe/erpnext/issues/46068)) ([#46297](https://github.com/frappe/erpnext/issues/46297)) ([d02d005](d02d005913))
* use value from currency exchange when exchange api is disabled (backport [#46137](https://github.com/frappe/erpnext/issues/46137)) ([#46309](https://github.com/frappe/erpnext/issues/46309)) ([ccc0358](ccc0358db6))
* **workspace:** enable is_query_report on purchase reports (backport [#46249](https://github.com/frappe/erpnext/issues/46249)) ([#46306](https://github.com/frappe/erpnext/issues/46306)) ([363129b](363129bcd4))
* Wrong Overdue Status in Sales Invoices (Floating-point arithmetic) (backport [#46146](https://github.com/frappe/erpnext/issues/46146)) ([#46310](https://github.com/frappe/erpnext/issues/46310)) ([1ff0858](1ff085876e))

### Features

* add new Closed and Stopped rows ([7749814](7749814571))
* add total weight in shipment ([#46049](https://github.com/frappe/erpnext/issues/46049)) ([171df3a](171df3aba5))
* create sales invoice print format ([#45403](https://github.com/frappe/erpnext/issues/45403)) ([1a382eb](1a382ebe86))
* **received items to be billed:** add company and date filters (backport [#46271](https://github.com/frappe/erpnext/issues/46271)) ([#46302](https://github.com/frappe/erpnext/issues/46302)) ([400f4f3](400f4f32ad))
* **Sales Invoice:** add items row via "Fetch Timesheet" (backport [#46071](https://github.com/frappe/erpnext/issues/46071)) ([#46311](https://github.com/frappe/erpnext/issues/46311)) ([1c6e464](1c6e4649bd))

### Performance Improvements

* don't track seen for POS Invoice (backport [#46187](https://github.com/frappe/erpnext/issues/46187)) ([#46189](https://github.com/frappe/erpnext/issues/46189)) ([41ab7f3](41ab7f3f7c))
* patch ([ee41e55](ee41e55343))
* replace if function in query ([d0b8e0d](d0b8e0da8d))
2025-03-05 13:31:02 +00:00
ruthra kumar
86b917b04c Merge pull request #46263 from frappe/version-15-hotfix
chore: release v15
2025-03-05 18:59:38 +05:30
ruthra kumar
9875489758 Merge pull request #46340 from frappe/mergify/bp/version-15-hotfix/pr-46020
fix(pos): get parent item group without user permission (backport #46020)
2025-03-05 18:40:04 +05:30
ruthra kumar
939cf321f7 Merge pull request #46338 from frappe/mergify/bp/version-15-hotfix/pr-45403
feat: create sales invoice print format (backport #45403)
2025-03-05 18:39:43 +05:30
Sugesh G
29f3aac925 fix(pos): get parent item group without user permission (#46020)
* fix(pos): get parent item group without user permission

* feat: add item group filter based on user permission

---------

Co-authored-by: venkat102 <venkatesharunachalam659@gmail.com>
(cherry picked from commit 8caf7f275e)
2025-03-05 12:42:03 +00:00
Ejaaz Khan
1a382ebe86 feat: create sales invoice print format (#45403)
* feat: create sales invoice print format

* fix: linter issue

* style: remove border from table

* refactor: change label to uppercase and show taxes

* refactor: format date and add translation on label

* refactor: remove default header and format labels

* refactor: change label style and small fix

* chore: Qty in title case

---------

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
(cherry picked from commit 38aa7cab8a)
2025-03-05 12:38:03 +00:00
mergify[bot]
6c1ceff8ee fix: exclude already consumed purchase receipt items from asset capitalization (backport #46329) (#46336)
* fix: exclude already consumed purchase receipt items from asset capitalization (#46329)

* feat: link purchase receipt row item to capitalization

* fix: avoid fetching already consumed stock and asset items during capitalization

* fix(patch): added patch to link purchase receipt item to stock item child table

* fix: added nosemgrep

* refactor: rename  to

(cherry picked from commit f50d479bfd)

# Conflicts:
#	erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.json
#	erpnext/patches.txt

* fix: resolved conflicts

* fix: resolved conflicts

---------

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-03-05 18:07:14 +05:30
mergify[bot]
1e85f69072 fix: replacing serial and batch bundle on pos with auto fetch serial nos (backport #46236) (#46337)
fix: replacing serial and batch bundle on pos with auto fetch serial nos (#46236)

* fix: replacing serial and batch bundle on pos with auto fetch serial nos

* fix: reserved serial no

added a check to look for serial no in reserved serial nos list before removing it as there might be a situation where an item is returned which was already consolidated.

(cherry picked from commit 35512d40bb)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-03-05 18:00:31 +05:30
rohitwaghchaure
1992c2639c Merge pull request #46333 from frappe/mergify/bp/version-15-hotfix/pr-46330
fix: Accounting Period validation throwing for different companies (backport #46330)
2025-03-05 17:03:24 +05:30
Mihir Kandoi
8f278ab7c7 Merge pull request #46317 from frappe/mergify/bp/version-15-hotfix/pr-45947
fix: set landed cost based on purchase invoice rate (backport #45947)
2025-03-05 16:58:41 +05:30
Mihir Kandoi
7a33bf41d8 Merge pull request #46331 from frappe/mergify/bp/version-15-hotfix/pr-46313
fix: production analytics report (backport #46313)
2025-03-05 16:45:33 +05:30
Rohit Waghchaure
6df9cf327d fix: Accounting Period validation throwing for different companies
(cherry picked from commit b1508efca2)
2025-03-05 11:11:04 +00:00
Mihir Kandoi
5e06e4acce fix: patch 2025-03-05 16:32:26 +05:30
Mihir Kandoi
7749814571 feat: add new Closed and Stopped rows
(cherry picked from commit 6cc3d67835)
2025-03-05 10:54:36 +00:00
Mihir Kandoi
6f760d197d fix: use else instead of unnecessary elif
(cherry picked from commit 961258a4ce)
2025-03-05 10:54:36 +00:00
Mihir Kandoi
5668795884 fix: production analytics report
(cherry picked from commit 772e9ecfaa)
2025-03-05 10:54:36 +00:00
mergify[bot]
aaf35c5df9 fix: Naming of Purchase Amount (backport #46051) (#46324)
fix: Naming of Purchase Amount (#46051)

* fix: Naming of Purchase Amount

* fix: linters

(cherry picked from commit 104f60cc57)

Co-authored-by: 0xD0M1M0 <76812428+0xD0M1M0@users.noreply.github.com>
2025-03-05 16:18:50 +05:30
mergify[bot]
6aa8803068 fix: consolidate gl entries by project in General Ledger Report (backport #46314) (#46321)
fix: consolidate gl entries by project in General Ledger Report (#46314)

(cherry picked from commit 1f685efcaf)

Co-authored-by: Lakshit Jain <108322669+ljain112@users.noreply.github.com>
2025-03-05 16:18:42 +05:30
Ben Kebdani
506dd3c6b9 fix: Close and Reopen buttons dissapear after saving changes (#46048)
* fix: Close and Reopen buttons dissapear after saving changes

* style: linter issue

---------

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2025-03-05 15:34:55 +05:30
mergify[bot]
9a433a6750 fix: adding cost center on pos invoice items while applying product discount (backport #46082) (#46322)
fix: adding cost center on pos invoice items while applying product discount (#46082)

(cherry picked from commit 926e4ecc4f)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-03-05 15:22:46 +05:30
mergify[bot]
e3ce17bd6e fix:[regional] Italian einvoice xml generated with wrong prices (#40254) (backport #45840) (#46318)
Merge pull request #45840 from gms-electronics/40254-italian-einvoice

fix:[regional] Italian einvoice xml generated with wrong prices (#40254)
(cherry picked from commit c5f90c823d)

Co-authored-by: Fab <fabian.thobe@mwv.vc>
2025-03-05 15:19:41 +05:30
mergify[bot]
836fd8fbc4 fix: consider journal entry and return invoice in paid_amount calculation (backport #46129) (#46319)
fix: consider journal entry and return invoice in paid_amount calculation (#46129)

* fix: consider journal entry and return invoice in paid_amount calculation

* test: add new unit test to consider journal entry and return invoice in paid_amount calculation

(cherry picked from commit 425fb12e91)

Co-authored-by: Sugesh G <73237300+Sugesh393@users.noreply.github.com>
2025-03-05 15:07:36 +05:30
Mihir Kandoi
fe8c9a3605 chore: resolve conflicts 2025-03-05 14:54:40 +05:30
Mihir Kandoi
941d67a0b6 chore: resolve conflicts 2025-03-05 14:48:41 +05:30
mergify[bot]
5a3073c4c1 fix: incorrect batch picked in the pick list (backport #45761) (#46315)
fix: incorrect batch picked in the pick list

(cherry picked from commit e1b7688a17)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2025-03-05 14:48:01 +05:30
Mihir Kandoi
8f2fdcae88 fix: patch
(cherry picked from commit 1230127d24)

# Conflicts:
#	erpnext/patches.txt
2025-03-05 09:02:36 +00:00
Mihir Kandoi
a09c57f0d1 fix: revert last commit
(cherry picked from commit 154e9813c4)

# Conflicts:
#	erpnext/patches.txt
2025-03-05 09:02:35 +00:00
Mihir Kandoi
7b13d8cd98 fix: fiscal year error
(cherry picked from commit 7cf8e498c4)
2025-03-05 09:02:34 +00:00
Mihir Kandoi
ee41e55343 perf: patch
(cherry picked from commit a41024813b)
2025-03-05 09:02:34 +00:00
Mihir Kandoi
fdaf5fafda fix: set landed cost based on purchase invoice rate
(cherry picked from commit 17d415b105)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
#	erpnext/patches.txt
#	erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
2025-03-05 09:02:34 +00:00
rohitwaghchaure
c85fd36960 Merge pull request #46308 from frappe/mergify/bp/version-15-hotfix/pr-45987
fix: rename some sla fields (backport #45987)
2025-03-05 14:30:54 +05:30
rohitwaghchaure
a4e5a46566 Merge pull request #46298 from frappe/mergify/bp/version-15-hotfix/pr-46046
perf: optimize query in project.py (backport #46046)
2025-03-05 14:30:26 +05:30
ruthra kumar
3c39888227 Merge pull request #46069 from frappe/mergify/bp/version-15-hotfix/pr-46049
feat: add total weight in shipment (backport #46049)
2025-03-05 14:23:49 +05:30
mergify[bot]
d5f07f06c7 refactor: rename subcontracting fields (backport #46226) (#46301)
* refactor: rename subcontracting fields

(cherry picked from commit b4f65154f5)

# Conflicts:
#	erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json

* chore: resolve conflicts

---------

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-03-05 14:08:10 +05:30
mergify[bot]
ccc0358db6 fix: use value from currency exchange when exchange api is disabled (backport #46137) (#46309)
fix: use value from currency exchange when exchange api is disabled (#46137)

(cherry picked from commit 2d26bff870)

Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com>
2025-03-05 14:07:12 +05:30
mergify[bot]
1ff085876e fix: Wrong Overdue Status in Sales Invoices (Floating-point arithmetic) (backport #46146) (#46310)
fix: Wrong Overdue Status in Sales Invoices (Floating-point arithmetic) (#46146)

* fix: Wrong Overdue Status in Sales Invoices (Floating-point arithmetic)

* style: after run pre-commit

(cherry picked from commit 89bcdd6fa5)

Co-authored-by: Diógenes Souza <103958767+devdiogenes@users.noreply.github.com>
2025-03-05 14:07:03 +05:30
mergify[bot]
1c6e4649bd feat(Sales Invoice): add items row via "Fetch Timesheet" (backport #46071) (#46311)
feat(Sales Invoice): add items row via "Fetch Timesheet" (#46071)

(cherry picked from commit 94547188bf)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-03-05 14:06:55 +05:30
Mihir Kandoi
e4e1be568b Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-45987 2025-03-05 13:59:59 +05:30
Mihir Kandoi
01db730714 Merge pull request #46300 from frappe/mergify/bp/version-15-hotfix/pr-46258
fix: delivery note from sales order uom conversion mistake (backport #46258)
2025-03-05 13:59:14 +05:30
ruthra kumar
dbcffa7ea4 Merge pull request #46235 from frappe/mergify/bp/version-15-hotfix/pr-46223
fix: dont update rate of free item when batch is updated (backport #46223)
2025-03-05 13:57:23 +05:30
ruthra kumar
36fa6bf15c chore: resolve conflict 2025-03-05 13:55:50 +05:30
mergify[bot]
4f80ddd834 fix: Add company filter at get_invoice method (backport #46238) (#46299)
fix: Add company filter at get_invoice method (#46238)

(cherry picked from commit a8d1cbc1c3)

Co-authored-by: Kunhi <kunhimohamed6@gmail.com>
2025-03-05 13:12:20 +05:30
mergify[bot]
400f4f32ad feat(received items to be billed): add company and date filters (backport #46271) (#46302)
feat(received items to be billed): add company and date filters (#46271)

* feat(received items to be billed): add company and date filters

* feat(delivered to be billed): add company and date filters

* feat: add company and date conditions

* chore: remove debugger

(cherry picked from commit 6117706ab5)

Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com>
2025-03-05 13:12:09 +05:30
mergify[bot]
363129bcd4 fix(workspace): enable is_query_report on purchase reports (backport #46249) (#46306)
fix(workspace): enable is_query_report on purchase reports (#46249)

* fix(workspace): enable is_query_report on purchase reports

* fix: resolved conflict

---------

Co-authored-by: venkat102 <venkatesharunachalam659@gmail.com>
(cherry picked from commit 5513e24b00)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2025-03-05 13:11:53 +05:30
mergify[bot]
087dde5873 fix: depreciation and balances report correction (backport #46259) (#46305)
fix: depreciation and balances report correction (#46259)

(cherry picked from commit 4a542b22a4)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2025-03-05 13:11:45 +05:30
mergify[bot]
5ae9faab91 fix: only include submitted docs for internal received quantity validation (backport #46262) (#46304)
fix: only include submitted docs for internal received quantity validation (#46262)

(cherry picked from commit 88fcdbb81e)

Co-authored-by: Lakshit Jain <108322669+ljain112@users.noreply.github.com>
2025-03-05 13:11:34 +05:30
Mihir Kandoi
446a8fe096 chore: resolve conflicts 2025-03-05 13:08:47 +05:30
Mihir Kandoi
0b50f1a9c3 chore: fix pre-commit/linter error 2025-03-05 12:57:53 +05:30
Mihir Kandoi
f29c43811c chore: resolve conflicts 2025-03-05 12:55:10 +05:30
Mihir Kandoi
e4fbd22173 Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-46223 2025-03-05 12:51:01 +05:30
Mihir Kandoi
6b56724436 chore: resolve conflicts 2025-03-05 12:46:52 +05:30
Mihir Kandoi
af49f5a8af fix: patch path
(cherry picked from commit dcec446e55)

# Conflicts:
#	erpnext/patches.txt
2025-03-05 07:16:48 +00:00
Mihir Kandoi
46b0734d6f fix: tests
(cherry picked from commit 019303dd12)

# Conflicts:
#	erpnext/support/doctype/issue/issue.json
2025-03-05 07:16:47 +00:00
Mihir Kandoi
d41303961c fix: tests
(cherry picked from commit 1b831e9abd)
2025-03-05 07:16:47 +00:00
Mihir Kandoi
c5717b983d fix: rename some sla fields
(cherry picked from commit baa0dd1235)

# Conflicts:
#	erpnext/patches.txt
2025-03-05 07:16:46 +00:00
mergify[bot]
d02d005913 fix: use valuation method from settings in stock ageing report (backport #46068) (#46297)
fix: use valuation method from settings in stock ageing report

(cherry picked from commit da09c278c8)

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-03-05 12:40:13 +05:30
Mihir Kandoi
d10add4b1e fix: delivery note from sales order uom conversion mistake
(cherry picked from commit 49a43d355d)

# Conflicts:
#	erpnext/selling/doctype/sales_order/sales_order.py
2025-03-05 06:52:07 +00:00
mergify[bot]
88234bbf9a fix: Include additional account types for Expense Account in LCV (backport #46206) (#46296)
fix: Include additional account types for Expense Account in LCV (#46206)

fix: additional account types in filters for the Expense account selection
(cherry picked from commit 59e99f167d)

Co-authored-by: Priyansh Shah <108476017+priyanshshah2442@users.noreply.github.com>
2025-03-05 12:19:31 +05:30
Mihir Kandoi
d8a1d0e908 test: added test
(cherry picked from commit 6073f5a6f9)
2025-03-05 06:41:09 +00:00
Mihir Kandoi
7437cea458 fix: revamp logic (split parent and child)
(cherry picked from commit f7594e2ff9)
2025-03-05 06:41:08 +00:00
Mihir Kandoi
1790bcc6d1 fix: syntax error
(cherry picked from commit 2f1e253e19)
2025-03-05 06:41:08 +00:00
Mihir Kandoi
d0b8e0da8d perf: replace if function in query
(cherry picked from commit 5e66231ca4)
2025-03-05 06:41:08 +00:00
rohitwaghchaure
ab4b1d4356 Merge pull request #46019 from frappe/st30783
fix: source warehouse not fetched in bom creator
2025-03-05 12:06:31 +05:30
mergify[bot]
7759775ee6 fix: Add permission check in POS's Toggle Recent Orders (backport #46010) (#46274)
fix: use get_list to check permissions

(cherry picked from commit a08bc6b913)

Co-authored-by: Sanket322 <shahsanket322003.com>
2025-03-05 12:04:17 +05:30
mergify[bot]
1b00de1815 chore: erpnext.com -> frappe.io/erpnext (backport #46288) (#46290)
* chore: erpnext.com -> frappe.io/erpnext (#46288)

(cherry picked from commit 41fe30ea6e)

# Conflicts:
#	README.md

* Update README.md

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-03-05 11:35:52 +05:30
mergify[bot]
41ab7f3f7c perf: don't track seen for POS Invoice (backport #46187) (#46189)
* perf: don't track seen for POS Invoice (#46187)

This is a moving doctype. Do people even browse the list view?

It doesn't make much sense, either. POS INvoices are rarely "reviewed" by multiple users.

(cherry picked from commit ded0aab680)

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

* chore: conflicts

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-03-05 11:28:22 +05:30
ruthra kumar
5049f80b7f Merge pull request #46278 from mhh008/version-15-hotfix
fix-de-transaltion
2025-03-05 11:01:42 +05:30
rohitwaghchaure
d650b23722 Merge pull request #46282 from frappe/mergify/bp/version-15-hotfix/pr-46279
fix: rate changing on the deliver note (backport #46279)
2025-03-04 23:24:30 +05:30
Rohit Waghchaure
75bc68b863 fix: rate changing on the deliver note
(cherry picked from commit 6f40849d55)
2025-03-04 16:12:37 +00:00
rohitwaghchaure
f37fe1781a Merge pull request #46280 from frappe/mergify/bp/version-15-hotfix/pr-46208
fix: stock reservation issue while making Purchase Invoice (backport #46208)
2025-03-04 21:41:53 +05:30
Rohit Waghchaure
8bd71954f3 fix: stock reservation issue while making Purchase Invoice
(cherry picked from commit 64985bffe0)
2025-03-04 14:41:41 +00:00
Lakshit Jain
0f86ed28bc Merge pull request #46276 from frappe/mergify/bp/version-15-hotfix/pr-46039
fix: Ensure new line is added regardless of postal code presence (backport #46039)
2025-03-04 19:14:17 +05:30
mhh008
ddcf79da1d fix: translation DE 2025-03-04 13:56:19 +01:00
Lakshit Jain
b5fcd682a6 Merge pull request #46268 from frappe/mergify/bp/version-15-hotfix/pr-45896
fix: auto allocation for negative amount outstanding for Customers in Payment Entry (backport #45896)
2025-03-04 18:17:15 +05:30
Lakshit Jain
29405498bd Merge pull request #46270 from frappe/mergify/bp/version-15-hotfix/pr-46260
fix: do not include opening invoices in billed items to be received report (backport #46260)
2025-03-04 18:16:42 +05:30
Sanket322
1630979f05 refactor: add new line ragardless of postal code
(cherry picked from commit 746adfd057)
2025-03-04 12:36:40 +00:00
Smit Vora
6ab7d98681 Merge pull request #46139 from frappe/mergify/bp/version-15-hotfix/pr-46117
fix(report): Allow `Closed` Purchase Orders to be Visible in Purchase Order Analysis Report (backport #46117)
2025-03-04 18:03:47 +05:30
ljain112
eee500f20e fix: do not include opening invoices in billed items to be received report
(cherry picked from commit c1ddf444c6)
2025-03-04 11:24:24 +00:00
ljain112
78a329e573 fix: auto allocation for negative amount outstanding for Customers in Payment Entry
(cherry picked from commit 6275b44a0b)
2025-03-04 11:20:12 +00:00
Smit Vora
83dcbec86a chore: resolve conflicts 2025-03-04 16:43:55 +05:30
Smit Vora
5b6ed1d077 Merge pull request #46253 from frappe/mergify/bp/version-15-hotfix/pr-46062
fix: Convert tuple of tuples to list of dicts for dot notation access (backport #46062)
2025-03-04 16:39:16 +05:30
Smit Vora
284c93ecc2 Merge pull request #46246 from frappe/mergify/bp/version-15-hotfix/pr-46192
fix: Exclude Cancelled GL Entries (backport #46192)
2025-03-04 16:38:38 +05:30
Smit Vora
33051ec17e Merge pull request #46245 from frappe/mergify/bp/version-15-hotfix/pr-45972
fix: Set Taxes Before Calculating Taxes and Totals (backport #45972)
2025-03-04 16:38:24 +05:30
ruthra kumar
9e54e2ea58 Merge pull request #46266 from frappe/mergify/bp/version-15-hotfix/pr-45751
fix: change voucher_type and voucher_name field type to data (backport #45751)
2025-03-04 16:12:40 +05:30
ruthra kumar
c09c4cc243 Merge pull request #46252 from frappe/mergify/bp/version-15-hotfix/pr-46070
fix: Batch Price gets updated only if it is a billed item (backport #46070)
2025-03-04 15:49:25 +05:30
ruthra kumar
489efda985 chore: resolve conflict 2025-03-04 15:47:03 +05:30
Sugesh393
3a03865a8f fix: change voucher_type and voucher_no field type to data
(cherry picked from commit f8ab021920)

# Conflicts:
#	erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json
2025-03-04 10:10:54 +00:00
ruthra kumar
854632dd51 chore: resolve conflict 2025-03-04 15:03:03 +05:30
ruthra kumar
ef44ad79a0 Merge pull request #46261 from frappe/mergify/bp/version-15-hotfix/pr-46172
fix: Show Credit Note amount in credit note column (backport #46172)
2025-03-04 15:00:15 +05:30
Sanket322
a8b31df65d fix: test case for debit note
(cherry picked from commit 6719bbeb10)
2025-03-04 07:58:31 +00:00
Sanket322
9f4311e7fb fix: fixing test case
(cherry picked from commit 9b2b477ae0)
2025-03-04 07:58:31 +00:00
Sanket322
0a65217423 fix: if invoice is return then add amount in proper column
(cherry picked from commit ccb4bdbe4c)
2025-03-04 07:58:30 +00:00
Sanket Shah
ef195513d0 fix: Convert tuple of tuples to list of dicts for dot notation access (#46062)
fix: use as_dict to convert tuples into list of dict

Co-authored-by: Sanket322 <shahsanket322003.com>
(cherry picked from commit e4b0ab6656)
2025-03-03 16:09:45 +00:00
mergify[bot]
f3cafef6a7 fix(patch): Ensure SLE indexes (backport #46131) (#46135)
* fix(patch): Ensure SLE indexes (#46131)

Because of the way this change was pushed in parts, some sites don't see
this as "update" and don't have the new indexes.

(cherry picked from commit f62aa8fc57)

# Conflicts:
#	erpnext/patches.txt

* fix: resolved conflict

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2025-03-03 21:37:02 +05:30
ruthra kumar
6762dc3392 chore: linter fix
(cherry picked from commit 0a2193e458)

# Conflicts:
#	erpnext/stock/get_item_details.py
2025-03-03 14:27:25 +00:00
Nirmalrajaa K
dbd47dff98 fix: Batch Price gets updated only if it is a billed item
(cherry picked from commit 1a56b83054)

# Conflicts:
#	erpnext/stock/get_item_details.py
2025-03-03 14:27:25 +00:00
Nirmalrajaa K
8ed512f6c6 fix: Batch Price gets updated only if it is a billed item
(cherry picked from commit 9597b1a69e)

# Conflicts:
#	erpnext/stock/get_item_details.py
2025-03-03 14:27:25 +00:00
Marica
3a6ef2564e Merge pull request #46073 from 0xD0M1M0/fix-discount-accounting-v15
fix: discount accounting for v15
2025-03-03 19:46:51 +05:30
Smit Vora
35df539da3 chore: fix linters 2025-03-03 17:02:15 +05:30
Ninad1306
5e083861a4 fix: exclude cancelled gl entries
(cherry picked from commit 3251a331dd)
2025-03-03 11:28:57 +00:00
Ninad1306
41e9a10ab4 test: validate fetching of taxes based on taxes and charges template
(cherry picked from commit 196ef7ac4e)
2025-03-03 11:27:45 +00:00
Ninad1306
90dea426d8 fix: set taxes before calculating taxes and totals
(cherry picked from commit 0fd0695bbb)
2025-03-03 11:27:45 +00:00
Mihir Kandoi
bd48d391e4 fix: syntax error 2025-03-03 16:40:19 +05:30
rohitwaghchaure
9082ff6aa9 Merge pull request #46242 from frappe/mergify/bp/version-15-hotfix/pr-46239
fix: incorrectly billed amount in the purchase receipt (backport #46239)
2025-03-03 16:16:09 +05:30
rohitwaghchaure
ba0ce267c2 Merge pull request #46243 from frappe/mergify/bp/version-15-hotfix/pr-46231
fix: incorrect batch picked (backport #46231)
2025-03-03 16:15:43 +05:30
Mihir Kandoi
cc535b7636 fix: syntax error 2025-03-03 15:27:35 +05:30
Mihir Kandoi
81c7b8c273 chore: resolve conflicts 2025-03-03 15:05:44 +05:30
Rohit Waghchaure
e94f0b1cca fix: incorrect batch picked
(cherry picked from commit d2564cad68)
2025-03-03 09:24:24 +00:00
Rohit Waghchaure
c247cf888b fix: incorrectly billed amount in the purchase receipt
(cherry picked from commit a5271fdb2e)
2025-03-03 09:15:48 +00:00
Khushi Rawat
7409c140d4 Merge pull request #46237 from frappe/mergify/bp/version-15-hotfix/pr-46201
fix(asset depreciation schedules): enable auto commit (backport #46201)
2025-03-03 14:04:39 +05:30
Mihir Kandoi
7f4d553201 chore: resolve conflicts 2025-03-03 12:28:06 +05:30
venkat102
899e468f6a fix(asset depreciation schedules): enable auto commit
(cherry picked from commit a4b24f7451)
2025-03-03 06:42:02 +00:00
mergify[bot]
faee8d6c5e fix: don't allow renaming account while system is actively in use (backport #46176) (#46210)
fix: don't allow renaming account while system is actively in use (#46176)

(cherry picked from commit 999f1cf96d)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-03-03 11:16:37 +05:30
Frappe PR Bot
171f966421 chore(release): Bumped to Version 15.53.4
## [15.53.4](https://github.com/frappe/erpnext/compare/v15.53.3...v15.53.4) (2025-03-03)

### Bug Fixes

* removed mandatory property for the cost center field ([8eddc09](8eddc09bba))
2025-03-03 05:12:02 +00:00
rohitwaghchaure
3f76a413f8 Merge pull request #46205 from frappe/mergify/bp/version-15/pr-46186
fix: removed mandatory property for the cost center field (backport #46186)
2025-03-03 10:40:35 +05:30
Mihir Kandoi
61d5680c8d fix: error
(cherry picked from commit 7c9c0c7776)

# Conflicts:
#	erpnext/stock/get_item_details.py
2025-03-03 04:46:28 +00:00
Mihir Kandoi
9e649d8522 fix: dont update rate of free item when batch is updated
(cherry picked from commit a3596f717b)

# Conflicts:
#	erpnext/stock/get_item_details.py
2025-03-03 04:46:28 +00:00
rohitwaghchaure
c0f736736e Merge pull request #46217 from frappe/mergify/bp/version-15-hotfix/pr-46202
fix: rearrange stock settings fields (backport #46202)
2025-03-03 10:15:36 +05:30
Frappe PR Bot
bcd02df6fd chore(release): Bumped to Version 15.53.3
## [15.53.3](https://github.com/frappe/erpnext/compare/v15.53.2...v15.53.3) (2025-03-03)

### Bug Fixes

* stock qty not recalculate on changing of the qty ([9186f13](9186f13458))
2025-03-03 04:02:37 +00:00
rohitwaghchaure
7a71c24d5c Merge pull request #46232 from frappe/mergify/bp/version-15/pr-46224
fix: stock qty not recalculate on changing of the qty (backport #46219) (backport #46224)
2025-03-03 09:31:16 +05:30
Rohit Waghchaure
9186f13458 fix: stock qty not recalculate on changing of the qty
(cherry picked from commit 464e3339fe)
(cherry picked from commit 331798babc)
2025-03-03 03:57:22 +00:00
rohitwaghchaure
c48e157a25 Merge pull request #46224 from frappe/mergify/bp/version-15-hotfix/pr-46219
fix: stock qty not recalculate on changing of the qty (backport #46219)
2025-03-03 08:24:05 +05:30
mergify[bot]
84ca0ada1b refactor: using function to unset grand total to default mode of payment in pos (backport #46228) (#46229)
refactor: using function to unset grand total to default mode of payment in pos (#46228)

(cherry picked from commit 62c3915ecb)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-03-03 01:59:13 +05:30
Rohit Waghchaure
331798babc fix: stock qty not recalculate on changing of the qty
(cherry picked from commit 464e3339fe)
2025-03-02 06:46:56 +00:00
rohitwaghchaure
93fed0ce86 chore: fix conflicts 2025-03-01 12:53:44 +05:30
Rohit Waghchaure
87703c6511 fix: rearrange stock settings fields
(cherry picked from commit 93f461c6f3)

# Conflicts:
#	erpnext/stock/doctype/stock_settings/stock_settings.json
2025-03-01 06:57:35 +00:00
mergify[bot]
de0dfbca9a fix: pos item detail serial no field (backport #46211) (#46212)
fix: pos item detail serial no field (#46211)

(cherry picked from commit d2fad44e89)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-02-28 23:24:49 +05:30
Rohit Waghchaure
8eddc09bba fix: removed mandatory property for the cost center field
(cherry picked from commit 079cf772aa)
2025-02-28 10:25:50 +00:00
mergify[bot]
0f263bcff2 fix: pos item selection using serial no (backport #46200) (#46203)
fix: pos item selection using serial no (#46200)

(cherry picked from commit 8fb09decd2)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-02-28 15:43:59 +05:30
ruthra kumar
a9b2f4885e Merge pull request #46197 from frappe/mergify/bp/version-15-hotfix/pr-46186
fix: removed mandatory property for the cost center field (backport #46186)
2025-02-28 13:56:09 +05:30
Rohit Waghchaure
a94292a69f fix: removed mandatory property for the cost center field
(cherry picked from commit 079cf772aa)
2025-02-28 08:03:51 +00:00
Sagar Vora
5b072c88a6 Merge pull request #46191 from frappe/mergify/bp/version-15-hotfix/pr-46177
fix: Payment Entry fixes (backport #46177)
2025-02-28 10:44:00 +05:30
vishakhdesai
3fb9033fb7 fix: payment entry exchange gain loss issue
(cherry picked from commit 2dbef23244)
2025-02-28 05:13:43 +00:00
Frappe PR Bot
d9c1b58fc3 chore(release): Bumped to Version 15.53.2
## [15.53.2](https://github.com/frappe/erpnext/compare/v15.53.1...v15.53.2) (2025-02-26)

### Bug Fixes

* check value as int ([97d3e86](97d3e8648b))
* enable fetch_timesheet_in_sales_invoice in test ([feb64cb](feb64cb9b5))
* incorrect stock value difference for adjustment entry ([96d44e3](96d44e362d))
* inventory dimension for maintence visit ([ec3b281](ec3b281a3b))
* no permission to get project settings in sales invoice ([b8281c3](b8281c34e2))
* pos opening entry dialog not saving on change data (backport [#46066](https://github.com/frappe/erpnext/issues/46066)) ([#46067](https://github.com/frappe/erpnext/issues/46067)) ([0ae2d61](0ae2d61974))
* **project settings:** add checkbox to auto fetch timesheet in sales invoice ([b3c1df8](b3c1df8561))
* **sales invoice:** check fetch_timesheet_in_sales_invoice enabled before fetching the timesheet ([b1095bb](b1095bb91b))
* valuation rate for batch ([c72dab4](c72dab49f4))
2025-02-26 12:58:53 +00:00
ruthra kumar
f93d1a2633 Merge pull request #46132 from frappe/version-15-hotfix
chore: release v15
2025-02-26 18:27:33 +05:30
ruthra kumar
bc53365620 Merge pull request #46159 from frappe/mergify/bp/version-15-hotfix/pr-46156
fix: no permission to get project settings in sales invoice (backport #46156)
2025-02-26 14:34:36 +05:30
venkat102
b8281c34e2 fix: no permission to get project settings in sales invoice
(cherry picked from commit 221f1468cb)
2025-02-26 08:22:24 +00:00
rohitwaghchaure
81ff16248e Merge pull request #46143 from frappe/mergify/bp/version-15-hotfix/pr-46097
fix: valuation rate for batch (backport #46097)
2025-02-26 10:16:10 +05:30
ruthra kumar
8bb085a055 Merge pull request #46142 from frappe/mergify/bp/version-15-hotfix/pr-45908
fix(projects settings): add checkbox to auto fetch timesheet in sales invoice (backport #45908)
2025-02-26 06:23:58 +05:30
Rohit Waghchaure
c72dab49f4 fix: valuation rate for batch
(cherry picked from commit b88305a95f)
2025-02-25 17:45:05 +00:00
ruthra kumar
feec16b682 chore: resolve conflicts 2025-02-25 22:53:14 +05:30
venkat102
feb64cb9b5 fix: enable fetch_timesheet_in_sales_invoice in test
(cherry picked from commit 5880f1d5c6)

# Conflicts:
#	erpnext/projects/doctype/timesheet/test_timesheet.py
2025-02-25 16:56:57 +00:00
venkat102
97d3e8648b fix: check value as int
(cherry picked from commit 43b13b91be)
2025-02-25 16:56:56 +00:00
venkat102
b1095bb91b fix(sales invoice): check fetch_timesheet_in_sales_invoice enabled before fetching the timesheet
(cherry picked from commit 914ad357fd)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.py
2025-02-25 16:56:56 +00:00
venkat102
b3c1df8561 fix(project settings): add checkbox to auto fetch timesheet in sales invoice
(cherry picked from commit 876082ea2f)

# Conflicts:
#	erpnext/projects/doctype/projects_settings/projects_settings.json
2025-02-25 16:56:56 +00:00
Ninad1306
2221bf1cba fix(report): filter sales / purchase orders based on date filters
(cherry picked from commit 936d7d4342)
2025-02-25 13:07:54 +00:00
Ninad1306
8799af9747 fix(report): allow Closed sales orders to be visible
(cherry picked from commit 2394e76e7d)

# Conflicts:
#	erpnext/selling/report/sales_order_analysis/sales_order_analysis.js
2025-02-25 13:07:54 +00:00
Ninad1306
20c4487853 fix(report): allow Closed purchase orders to be visible
(cherry picked from commit 3b2879d3a1)

# Conflicts:
#	erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js
2025-02-25 13:07:53 +00:00
0xD0M1M0
f609012f02 fix: discount accounting for v15 2025-02-21 22:26:39 +01:00
Ravibharathi
171df3aba5 feat: add total weight in shipment (#46049)
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
(cherry picked from commit 1ec182430d)

# Conflicts:
#	erpnext/stock/doctype/shipment/shipment.json
2025-02-21 14:16:46 +00:00
mergify[bot]
0ae2d61974 fix: pos opening entry dialog not saving on change data (backport #46066) (#46067)
fix: pos opening entry dialog not saving on change data (#46066)

(cherry picked from commit 8e6959dfad)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-02-21 17:53:59 +05:30
Frappe PR Bot
9e824fc4fe chore(release): Bumped to Version 15.53.1
## [15.53.1](https://github.com/frappe/erpnext/compare/v15.53.0...v15.53.1) (2025-02-21)

### Bug Fixes

* inventory dimension for maintence visit ([1d818e1](1d818e1510))
2025-02-21 10:01:58 +00:00
rohitwaghchaure
b6b47d6683 Merge pull request #46044 from frappe/mergify/bp/version-15/pr-46041
fix: inventory dimension for maintenance visit (backport #46037) (backport #46041)
2025-02-21 15:30:36 +05:30
Rohit Waghchaure
1d818e1510 fix: inventory dimension for maintence visit
(cherry picked from commit cd4ba69262)
(cherry picked from commit ec3b281a3b)
2025-02-20 07:37:38 +00:00
rohitwaghchaure
b00fa1dfee Merge pull request #46041 from frappe/mergify/bp/version-15-hotfix/pr-46037
fix: inventory dimension for maintenance visit (backport #46037)
2025-02-20 13:06:33 +05:30
Rohit Waghchaure
ec3b281a3b fix: inventory dimension for maintence visit
(cherry picked from commit cd4ba69262)
2025-02-20 06:13:19 +00:00
rohitwaghchaure
9318e4f0e8 Merge pull request #46028 from frappe/mergify/bp/version-15-hotfix/pr-46021
fix: incorrect stock value difference for adjustment entry (backport #46021)
2025-02-19 17:24:42 +05:30
Frappe PR Bot
16e8a00f45 chore(release): Bumped to Version 15.53.0
# [15.53.0](https://github.com/frappe/erpnext/compare/v15.52.0...v15.53.0) (2025-02-19)

### Bug Fixes

* add accounting dimensions section in sales order item ([b32e4da](b32e4daf2b))
* add is_new in if condition ([fc2ec7c](fc2ec7c495))
* add validate to allow equity account and party_type shareholder ([bb3eb81](bb3eb81170))
* allow scrap item with zero qty ([abe5384](abe5384449))
* auto create asset due to message error (backport [#45934](https://github.com/frappe/erpnext/issues/45934)) ([#45952](https://github.com/frappe/erpnext/issues/45952)) ([830edb8](830edb8f52))
* check if employee is currently working on another workstation ([22eaa14](22eaa14179))
* disable partial payment in pos (backport [#45752](https://github.com/frappe/erpnext/issues/45752)) ([#45945](https://github.com/frappe/erpnext/issues/45945)) ([38edc46](38edc46c46))
* do not reschedule depreciation for fully depreciated asset on scrap ([1e7c5ec](1e7c5ec0cb))
* fetch child account data for selected parent ([#45904](https://github.com/frappe/erpnext/issues/45904)) ([e36b860](e36b860a79))
* handle division by zero error (backport [#45966](https://github.com/frappe/erpnext/issues/45966)) ([#46015](https://github.com/frappe/erpnext/issues/46015)) ([15106b4](15106b49b6))
* include missing payment_gateway parameter in Payment Request URL ([18f9476](18f94765f7))
* letter head for quality inspection ([c289fef](c289fef3b5))
* link correct row item of purchase doc ([87f337b](87f337b605))
* make purchase_receipt_item and purchase_invoice_item fields of data type ([281431e](281431e041))
* millisecond issue for posting datetime ([4292365](42923656ee))
* patch for creating asset depreciation schedule records ([f043b46](f043b46696))
* pos accounting dimension fieldname error (backport [#45899](https://github.com/frappe/erpnext/issues/45899)) ([#45921](https://github.com/frappe/erpnext/issues/45921)) ([e998f06](e998f063a9))
* **pos profile:** check company while validating mandatory accounting dimension ([#45974](https://github.com/frappe/erpnext/issues/45974)) ([6a57743](6a577438aa))
* pos return validation on v15 ([#45951](https://github.com/frappe/erpnext/issues/45951)) ([dd34bbe](dd34bbe570))
* provision to enable naming series for SABB ([8fbfe14](8fbfe14c63))
* **quotation:** fetch exchange rate on currency change ([bd89c19](bd89c19c98))
* remove party type from validate ([0d21151](0d2115197e))
* remove public access to list items (backport [#45838](https://github.com/frappe/erpnext/issues/45838)) ([#46018](https://github.com/frappe/erpnext/issues/46018)) ([eead6d4](eead6d46ff))
* remove unused code ([dd5d144](dd5d144b55))
* **report:** add options to multiselectlist fields ([7e85a12](7e85a123b2))
* reset location only if there is value in row item location field ([a509568](a509568110))
* resolved conflicts ([84647a1](84647a1c73))
* round sum amount in JE auditing PF ([#45961](https://github.com/frappe/erpnext/issues/45961)) ([44e1ca9](44e1ca9d05))
* **send_message:** escape HTML in the text ([cbec989](cbec989a7c))
* serial no status for internal transfer delivery note ([2b80c00](2b80c009b3))
* set default value to 0 as per new logic ([1abe1a1](1abe1a1fd5))
* set sco_qty field of PO to non negative ([567fb8a](567fb8abd1))
* slow query ([8306d6f](8306d6fdb6))
* stock reservation for sales invoice ([1fb5586](1fb5586f56))
* stock reservation not working for sales invoice with update stock ([7d871f6](7d871f6bb5))
* tests ([f63a9db](f63a9dbf9b))
* throw correct exception ([5bccf9f](5bccf9f837))
* validate if no matching item found ([6183b38](6183b38089))
* validate payment request total of partly paid invoice ([c8881a9](c8881a9358))

### Features

* added ability to use custom html format for process statement of accounts (copy [#45746](https://github.com/frappe/erpnext/issues/45746)) ([#46012](https://github.com/frappe/erpnext/issues/46012)) ([1a4297a](1a4297ac35))
* added option to enforce free item qty in pricing rule ([8fb9228](8fb9228871))
* disable auto setting grand total to default mode of payment (backport [#45591](https://github.com/frappe/erpnext/issues/45591)) ([#45917](https://github.com/frappe/erpnext/issues/45917)) ([e271a5c](e271a5cba0))
2025-02-19 11:50:41 +00:00
ruthra kumar
2bb79c34c3 Merge pull request #45981 from frappe/version-15-hotfix
chore: release v15
2025-02-19 17:19:18 +05:30
mergify[bot]
eead6d46ff fix: remove public access to list items (backport #45838) (#46018)
fix: remove public access to list items

(cherry picked from commit 2bd596ee3d)

Co-authored-by: CaseSolved <richard@casesolved.co.uk>
2025-02-19 16:52:09 +05:30
mergify[bot]
15106b49b6 fix: handle division by zero error (backport #45966) (#46015)
fix: handle division by zero error (#45966)

Co-authored-by: Sanket322 <shahsanket322003.com>
(cherry picked from commit 24394765a6)

Co-authored-by: Sanket Shah <113279972+Sanket322@users.noreply.github.com>
2025-02-19 16:51:09 +05:30
Akhil Narang
452e4dcbad Merge pull request #46025 from frappe/mergify/bp/version-15-hotfix/pr-46003
fix(send_message): escape HTML in the text (backport #46003)
2025-02-19 16:43:06 +05:30
Rohit Waghchaure
96d44e362d fix: incorrect stock value difference for adjustment entry
(cherry picked from commit df83e427a3)
2025-02-19 11:11:15 +00:00
Khushi Rawat
5a17171bd1 Merge pull request #46013 from frappe/mergify/bp/version-15-hotfix/pr-45872
fix: enable asset value editing for duplicate item code (backport #45872)
2025-02-19 16:34:36 +05:30
Khushi Rawat
777daf6aee Merge pull request #46014 from frappe/mergify/bp/version-15-hotfix/pr-45898
fix: patch for creating asset depreciation schedule records (backport #45898)
2025-02-19 16:33:03 +05:30
ruthra kumar
9b866e8ee4 Merge pull request #46016 from frappe/mergify/bp/version-15-hotfix/pr-45974
fix(pos profile): check company while validating mandatory accounting dimension (backport #45974)
2025-02-19 16:28:42 +05:30
Akhil Narang
cbec989a7c fix(send_message): escape HTML in the text
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
(cherry picked from commit 448a5db20f)
2025-02-19 10:45:49 +00:00
Khushi Rawat
dd5d144b55 fix: remove unused code 2025-02-19 16:00:31 +05:30
Mihir Kandoi
6157fed71c fix: source warehouse not fetched in bom creator 2025-02-19 15:54:31 +05:30
Khushi Rawat
9b8623dd64 chore: resolved conflicts 2025-02-19 15:50:53 +05:30
Khushi Rawat
84647a1c73 fix: resolved conflicts 2025-02-19 15:47:40 +05:30
mergify[bot]
1a4297ac35 feat: added ability to use custom html format for process statement of accounts (copy #45746) (#46012)
feat: added ability to use custom html format for process statement of accounts (#45746)

* feat: added ability to use custom print format for process statement of accounts documents.

* fix: handles missing hook issues

* chore: linter changes

---------

Co-authored-by: Boy4099 <mashtawayne4099@gmail.com>
Co-authored-by: ruthra kumar <ruthra@erpnext.com>
(cherry picked from commit a0cd08e9ea)

Co-authored-by: Steve Wilson <stevew9009@gmail.com>
2025-02-19 15:45:10 +05:30
Ejaaz Khan
236b502155 Merge pull request #46017 from frappe/mergify/bp/version-15-hotfix/pr-45961
fix: round sum amount in JE auditing PF (backport #45961)
2025-02-19 15:43:57 +05:30
mergify[bot]
830edb8f52 fix: auto create asset due to message error (backport #45934) (#45952)
fix: auto create asset due to message error (#45934)

* fix: auto create asset due to message error

* fix: linters

(cherry picked from commit 6f1bc5225a)

Co-authored-by: 0xD0M1M0 <76812428+0xD0M1M0@users.noreply.github.com>
2025-02-19 15:43:53 +05:30
Ejaaz Khan
44e1ca9d05 fix: round sum amount in JE auditing PF (#45961)
(cherry picked from commit 941085000a)
2025-02-19 10:11:36 +00:00
Venkatesh
6a577438aa fix(pos profile): check company while validating mandatory accounting dimension (#45974)
(cherry picked from commit 17a2f44290)
2025-02-19 10:10:20 +00:00
Nabin Hait
f043b46696 fix: patch for creating asset depreciation schedule records
(cherry picked from commit 7324dcb7c8)

# Conflicts:
#	erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py
2025-02-19 10:08:12 +00:00
Khushi Rawat
a509568110 fix: reset location only if there is value in row item location field
(cherry picked from commit 2bb79197aa)
2025-02-19 10:02:33 +00:00
Khushi Rawat
6183b38089 fix: validate if no matching item found
(cherry picked from commit 44c1425e73)
2025-02-19 10:02:33 +00:00
Khushi Rawat
87f337b605 fix: link correct row item of purchase doc
(cherry picked from commit da1b4cb9ab)
2025-02-19 10:02:33 +00:00
Khushi Rawat
281431e041 fix: make purchase_receipt_item and purchase_invoice_item fields of data type
(cherry picked from commit 8af9dcb33e)

# Conflicts:
#	erpnext/assets/doctype/asset/asset.json
2025-02-19 10:02:32 +00:00
rohitwaghchaure
be65cd4df6 Merge pull request #46005 from frappe/mergify/bp/version-15-hotfix/pr-45750
feat: added option to enforce free item qty in pricing rule (backport #45750)
2025-02-19 15:09:51 +05:30
Khushi Rawat
965dbb6d2b Merge pull request #46006 from frappe/mergify/bp/version-15-hotfix/pr-45895
fix: do not reschedule depreciation for fully depreciated asset on scrap (backport #45895)
2025-02-19 14:24:55 +05:30
ruthra kumar
07d4725810 Merge pull request #46008 from frappe/mergify/bp/version-15-hotfix/pr-45904
fix: fetch child account data for selected parent (backport #45904)
2025-02-19 14:21:48 +05:30
Bhavansathru
e36b860a79 fix: fetch child account data for selected parent (#45904)
* fix: fetch child account data for selected parent

* fix: change reference name

---------

Co-authored-by: venkat102 <venkatesharunachalam659@gmail.com>
(cherry picked from commit 73e82b7afa)
2025-02-19 08:28:59 +00:00
Khushi Rawat
1e7c5ec0cb fix: do not reschedule depreciation for fully depreciated asset on scrap
(cherry picked from commit fd4c4f98fa)
2025-02-19 07:37:42 +00:00
Mihir Kandoi
1abe1a1fd5 fix: set default value to 0 as per new logic
(cherry picked from commit 844f1636c0)
2025-02-19 07:21:54 +00:00
Mihir Kandoi
f782900a15 refactor: rename field
(cherry picked from commit f3d598881c)
2025-02-19 07:21:54 +00:00
Mihir Kandoi
fc2ec7c495 fix: add is_new in if condition
(cherry picked from commit 4dcac56486)
2025-02-19 07:21:53 +00:00
Mihir Kandoi
ad11208109 test: added test
(cherry picked from commit ac3259b8f1)
2025-02-19 07:21:53 +00:00
Mihir Kandoi
f63a9dbf9b fix: tests
(cherry picked from commit 366ae85d85)
2025-02-19 07:21:53 +00:00
Mihir Kandoi
8fb9228871 feat: added option to enforce free item qty in pricing rule
(cherry picked from commit 19c01b1457)
2025-02-19 07:21:53 +00:00
rohitwaghchaure
617a24d61e Merge pull request #45994 from frappe/mergify/bp/version-15-hotfix/pr-45980
fix: check if employee is currently working on another workstation (backport #45980)
2025-02-19 11:24:05 +05:30
ruthra kumar
6fad501aa0 Merge pull request #46001 from frappe/mergify/bp/version-15-hotfix/pr-45882
fix(quotation): fetch exchange rate on currency change (backport #45882)
2025-02-19 11:13:04 +05:30
venkat102
bd89c19c98 fix(quotation): fetch exchange rate on currency change
(cherry picked from commit 2f77a8bed1)
2025-02-19 05:21:57 +00:00
Mihir Kandoi
5bccf9f837 fix: throw correct exception
(cherry picked from commit 4487edb255)
2025-02-18 15:13:04 +00:00
Mihir Kandoi
22eaa14179 fix: check if employee is currently working on another workstation
(cherry picked from commit 8234e659c8)
2025-02-18 15:13:04 +00:00
rohitwaghchaure
d3d0aacd4c Merge pull request #45993 from frappe/mergify/bp/version-15-hotfix/pr-45977
fix: millisecond issue for posting datetime (backport #45977)
2025-02-18 20:31:20 +05:30
rohitwaghchaure
69f5be65f6 Merge pull request #45975 from frappe/mergify/bp/version-15-hotfix/pr-45970
fix: serial no status for internal transfer delivery note (backport #45970)
2025-02-18 20:23:20 +05:30
rohitwaghchaure
508efd1322 Merge pull request #45990 from frappe/mergify/bp/version-15-hotfix/pr-45976
fix: slow query (backport #45976)
2025-02-18 20:22:51 +05:30
rohitwaghchaure
ecc2de2709 Merge pull request #45992 from frappe/mergify/bp/version-15-hotfix/pr-45971
fix: set sco_qty field of PO to non negative (backport #45971)
2025-02-18 20:22:39 +05:30
rohitwaghchaure
2e3b19ebb2 chore: fix conflicts 2025-02-18 20:11:02 +05:30
rohitwaghchaure
050bb1eef5 chore: fix conflicts 2025-02-18 20:10:30 +05:30
Rohit Waghchaure
42923656ee fix: millisecond issue for posting datetime
(cherry picked from commit ac9e5c0163)

# Conflicts:
#	erpnext/patches.txt
#	erpnext/stock/utils.py
2025-02-18 14:39:39 +00:00
rohitwaghchaure
0acdae02c1 chore: fix conflicts 2025-02-18 20:00:08 +05:30
Mihir Kandoi
567fb8abd1 fix: set sco_qty field of PO to non negative
(cherry picked from commit dfc3dc4944)
2025-02-18 14:29:22 +00:00
Rohit Waghchaure
8306d6fdb6 fix: slow query
(cherry picked from commit 8cfab57fc8)

# Conflicts:
#	erpnext/stock/doctype/packed_item/packed_item.json
2025-02-18 14:28:19 +00:00
ruthra kumar
20709f1b3e Merge pull request #45979 from frappe/mergify/bp/version-15-hotfix/pr-45765
fix: add accounting dimensions section in sales order item (backport #45765)
2025-02-18 17:48:34 +05:30
ruthra kumar
52860cc566 chore: resolve conflict 2025-02-18 14:27:14 +05:30
Sugesh393
b32e4daf2b fix: add accounting dimensions section in sales order item
(cherry picked from commit 7d47869f4b)

# Conflicts:
#	erpnext/selling/doctype/sales_order_item/sales_order_item.json
2025-02-18 08:42:56 +00:00
Rohit Waghchaure
2b80c009b3 fix: serial no status for internal transfer delivery note
(cherry picked from commit 3333331a3d)
2025-02-18 08:22:03 +00:00
ruthra kumar
8da1348a48 Merge pull request #45973 from frappe/mergify/bp/version-15-hotfix/pr-45723
fix: validate payment request total of partly paid invoice (backport #45723)
2025-02-18 13:42:58 +05:30
Sugesh393
9a33b877f5 test: add unit test to validate payment request grand_total for partly paid invoice
(cherry picked from commit f8472c32d9)
2025-02-18 07:42:28 +00:00
Sugesh393
c8881a9358 fix: validate payment request total of partly paid invoice
(cherry picked from commit 899c18df18)
2025-02-18 07:42:28 +00:00
ruthra kumar
f6047d8491 Merge pull request #45968 from frappe/mergify/bp/version-15-hotfix/pr-45687
fix: add validation to allow equity account (backport #45687)
2025-02-18 12:12:09 +05:30
rethik
0d2115197e fix: remove party type from validate
(cherry picked from commit f82837a4a2)
2025-02-18 06:16:03 +00:00
rethik
552b5a79ce test: add unit test to validate account type and party type
(cherry picked from commit 9422ce5aee)
2025-02-18 06:16:02 +00:00
rethik
bb3eb81170 fix: add validate to allow equity account and party_type shareholder
(cherry picked from commit 2c8e3f3409)
2025-02-18 06:16:02 +00:00
rohitwaghchaure
7ab69cfe5f Merge pull request #45956 from frappe/mergify/bp/version-15-hotfix/pr-45946
fix: provision to enable naming series for SABB (backport #45946)
2025-02-18 07:44:18 +05:30
rohitwaghchaure
43d32eb10e chore: fix conflicts 2025-02-17 21:32:48 +05:30
rohitwaghchaure
697fdf5bc3 chore: fix conflicts 2025-02-17 21:30:15 +05:30
rohitwaghchaure
2f7f9c0bac chore: fix conflicts 2025-02-17 21:29:22 +05:30
Rohit Waghchaure
8fbfe14c63 fix: provision to enable naming series for SABB
(cherry picked from commit fe43975cdd)

# Conflicts:
#	erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json
#	erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py
#	erpnext/stock/doctype/stock_settings/stock_settings.json
2025-02-17 11:31:46 +00:00
mergify[bot]
38edc46c46 fix: disable partial payment in pos (backport #45752) (#45945)
* fix: disable partial payment in pos (#45752)

* fix: disable partial payment in pos

* test: disable partial payment

* test: removed print statement

* test: using save method to auto calculate paid_amount

* test: paid_amount calculation using save method

* test: added save method to calculate paid_amount

* test: outstanding amount

* test: added test for partial payments in pos invoice

* fix: custom validation error for partial payment

* test: using partial payment validation

* fix: validate only on submit

(cherry picked from commit d94802067b)

# Conflicts:
#	erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py
#	erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py

* chore: resolve conflict

* chore: resolve conflict

* chore: resolve linter issue

* test: fixed failing test

---------

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-02-17 17:01:34 +05:30
Diptanil Saha
dd34bbe570 fix: pos return validation on v15 (#45951) 2025-02-17 16:03:19 +05:30
rohitwaghchaure
11622f81f3 Merge pull request #45943 from frappe/mergify/bp/version-15-hotfix/pr-45941
fix: letter head for quality inspection (backport #45941)
2025-02-17 14:42:56 +05:30
mergify[bot]
e998f063a9 fix: pos accounting dimension fieldname error (backport #45899) (#45921)
* fix: pos accounting dimension fieldname error (#45899)

* fix: pos accounting dimension fieldname error

* fix: method to get enabled accounting dimensions

* fix: fetch enabled accounting dimensions

* fix: clear flags for accounting_dimensions_details on_update

* refactor: validation for doctype

* fix: using get_checks_for_pl_and_bs_accounts for accounting dimensions

(cherry picked from commit 60a5f4f30d)

# Conflicts:
#	erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py

* chore: resolve conflict

* chore: resolve linter issue

* fix: resolve linter issue

* chore: resolve linter issue

* chore: resolve linter issue

* chore: resolve linter issue

---------

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-02-17 14:13:34 +05:30
Rohit Waghchaure
c289fef3b5 fix: letter head for quality inspection
(cherry picked from commit cdd41373b6)
2025-02-17 08:28:52 +00:00
rohitwaghchaure
f8839957da Merge pull request #45913 from frappe/mergify/bp/version-15-hotfix/pr-45903
fix: allow scrap item with zero qty (backport #45903)
2025-02-16 13:28:00 +05:30
mergify[bot]
e271a5cba0 feat: disable auto setting grand total to default mode of payment (backport #45591) (#45917)
feat: disable auto setting grand total to default mode of payment (#45591)

(cherry picked from commit f0a6399056)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-02-14 17:34:37 +05:30
ruthra kumar
a486e2962e Merge pull request #45919 from frappe/mergify/bp/version-15-hotfix/pr-45912
fix: include missing payment_gateway parameter in Payment Request URL (backport #45912)
2025-02-14 17:13:29 +05:30
Navin-S-R
18f94765f7 fix: include missing payment_gateway parameter in Payment Request URL
(cherry picked from commit dbac8cfc94)
2025-02-14 11:20:17 +00:00
Rohit Waghchaure
abe5384449 fix: allow scrap item with zero qty
(cherry picked from commit 706cb64279)
2025-02-14 09:47:30 +00:00
rohitwaghchaure
698b7a9d00 Merge pull request #45764 from frappe/mergify/bp/version-15-hotfix/pr-45763
fix: stock reservation not working for sales invoice with update stock (backport #45763)
2025-02-14 15:16:11 +05:30
rohitwaghchaure
52761affe2 chore: fix test case 2025-02-13 16:32:56 +05:30
Rohit Waghchaure
1fb5586f56 fix: stock reservation for sales invoice 2025-02-13 16:04:05 +05:30
ruthra kumar
ef2cddd338 Merge pull request #45894 from frappe/mergify/bp/version-15-hotfix/pr-45804
fix(report): add options to multiselectlist fields (backport #45804)
2025-02-13 14:26:31 +05:30
ruthra kumar
dbe14d6fe4 chore: resolve conflicts 2025-02-13 14:23:46 +05:30
venkat102
7e85a123b2 fix(report): add options to multiselectlist fields
(cherry picked from commit 8785342fce)

# Conflicts:
#	erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js
#	erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js
2025-02-13 08:47:15 +00:00
Frappe PR Bot
ce90d427e8 chore(release): Bumped to Version 15.52.0
# [15.52.0](https://github.com/frappe/erpnext/compare/v15.51.2...v15.52.0) (2025-02-12)

### Bug Fixes

* '0' rate LDC's Invoice net totals should be ignored ([96c19cd](96c19cd990))
* add allow_on_submit for party_balance, paid_from_account_balance and paid_to_account_balance ([086c36f](086c36fca6))
* add precision in serial_batch_bundle.py ([a85f6f5](a85f6f54fe))
* add total row in non_grouped_invoices ([e432ae9](e432ae98a9))
* added validation for required invoice_fields in POS (backport [#45780](https://github.com/frappe/erpnext/issues/45780)) ([#45868](https://github.com/frappe/erpnext/issues/45868)) ([4f9a7f5](4f9a7f5065))
* Attibute error `selling_price_list` ([6dc99f9](6dc99f95c0))
* changed naming series to random for SABB ([48a4eff](48a4effdb6))
* check_item_quality_inspection is not whitelisted ([0a4a093](0a4a09352a))
* correct amount in transaction currency for reverse gl entries (backport [#45794](https://github.com/frappe/erpnext/issues/45794)) ([#45849](https://github.com/frappe/erpnext/issues/45849)) ([b06bd82](b06bd825c1))
* correct amt in account currency for lcv with manually distributed charges. (backport [#45532](https://github.com/frappe/erpnext/issues/45532)) ([#45864](https://github.com/frappe/erpnext/issues/45864)) ([179cb1e](179cb1e6e5))
* correct pay amount in portal pages ([3ada520](3ada520618))
* create job card with wip warehouse set to source warehouse if material transfer to wip warehouse is skipped in work order ([9d6f318](9d6f3180d4))
* do not allow "Finance Book" in Accounting Dimensions (backport [#45696](https://github.com/frappe/erpnext/issues/45696)) ([#45856](https://github.com/frappe/erpnext/issues/45856)) ([0954aca](0954aca758))
* do not validate party against  Receivable and Payable account for cancelled gl entries ([6d777cd](6d777cdc68))
* dont update rate of free item on save ([1d3da4d](1d3da4d49a))
* handle response when json is None ([eeb322b](eeb322bd0e))
* map project from rfq to supplier quotation (backport [#45745](https://github.com/frappe/erpnext/issues/45745)) ([#45828](https://github.com/frappe/erpnext/issues/45828)) ([b112d88](b112d88767))
* not able to select the item in the sales invoice ([a649001](a649001886))
* Party name in Supplier Portal for Purchase Order (backport [#45772](https://github.com/frappe/erpnext/issues/45772)) ([#45858](https://github.com/frappe/erpnext/issues/45858)) ([435c354](435c35414f))
* pos numpad editable action buttons (backport [#45823](https://github.com/frappe/erpnext/issues/45823)) ([#45826](https://github.com/frappe/erpnext/issues/45826)) ([035758f](035758f47d))
* possible model sync issue ([ea01fa1](ea01fa135e))
* **regional:** removed payment schedule validation in sales invoice for italy (backport [#45852](https://github.com/frappe/erpnext/issues/45852)) ([#45854](https://github.com/frappe/erpnext/issues/45854)) ([2e9e355](2e9e355329))
* remove serial no if qty is zero ([1359a77](1359a77e72))
* skip warning for free items ([2adab1d](2adab1d36f))
* stock reco current valuation rate ([3b7c38d](3b7c38da10))
* the project document timed out while opening ([28cbce4](28cbce4356))
* unable to remove image from employee ([e3cceb8](e3cceb894b))
* update ctx to args ([d4bc3d1](d4bc3d182f))

### Features

* add repost accounting ledger entry for payment entry ([757dd3f](757dd3f0b6))
2025-02-12 12:09:09 +00:00
ruthra kumar
0eb4556c83 Merge pull request #45860 from frappe/version-15-hotfix
chore: release v15
2025-02-12 17:37:43 +05:30
rohitwaghchaure
45fa2eb542 Merge pull request #45884 from frappe/mergify/bp/version-15-hotfix/pr-45786
fix: skip warning for free items (backport #45786)
2025-02-12 15:16:29 +05:30
barredterra
2adab1d36f fix: skip warning for free items
(cherry picked from commit 772776ad8a)
2025-02-12 09:20:15 +00:00
rohitwaghchaure
162d1ba472 chore: fix test case 2025-02-12 14:32:06 +05:30
rohitwaghchaure
4889950a9e chore: fix conflicts 2025-02-12 14:32:05 +05:30
Rohit Waghchaure
7d871f6bb5 fix: stock reservation not working for sales invoice with update stock
(cherry picked from commit 0c9d0ea1f4)

# Conflicts:
#	erpnext/selling/doctype/sales_order/test_sales_order.py
2025-02-12 14:32:05 +05:30
rohitwaghchaure
70bac1ab17 Merge pull request #45748 from frappe/mergify/bp/version-15-hotfix/pr-45739
fix: create job card with wip warehouse set to source warehouse if material transfer to wip warehouse is skipped in work order (backport #45739)
2025-02-12 13:00:19 +05:30
rohitwaghchaure
0caaff0758 Merge pull request #45880 from frappe/mergify/bp/version-15-hotfix/pr-45879
fix: changed naming series to random for SABB (backport #45879)
2025-02-12 10:53:47 +05:30
rohitwaghchaure
4094fbd6c5 chore: fix conflicts 2025-02-12 10:21:44 +05:30
Rohit Waghchaure
48a4effdb6 fix: changed naming series to random for SABB
(cherry picked from commit a007dc285d)

# Conflicts:
#	erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json
2025-02-12 04:50:41 +00:00
rohitwaghchaure
68ea528841 Merge pull request #45877 from frappe/mergify/bp/version-15-hotfix/pr-45875
fix: add precision in serial_batch_bundle.py (backport #45875)
2025-02-12 09:25:31 +05:30
rohitwaghchaure
4aa7666e46 Merge pull request #45878 from frappe/mergify/bp/version-15-hotfix/pr-45865
fix: dont update rate of free item on save (backport #45865)
2025-02-12 09:25:08 +05:30
Mihir Kandoi
1d3da4d49a fix: dont update rate of free item on save
(cherry picked from commit 6591e76a63)
2025-02-12 03:13:41 +00:00
Mihir Kandoi
a85f6f54fe fix: add precision in serial_batch_bundle.py
(cherry picked from commit 4bf85d1a5a)
2025-02-12 03:06:27 +00:00
rohitwaghchaure
da08b4eeb9 Merge pull request #45870 from frappe/mergify/bp/version-15-hotfix/pr-45869
fix: stock reco current valuation rate (backport #45869)
2025-02-11 18:38:12 +05:30
rohitwaghchaure
b4f291d0ae Merge pull request #45871 from frappe/mergify/bp/version-15-hotfix/pr-45862
fix: remove serial no if qty is zero (backport #45862)
2025-02-11 18:21:21 +05:30
mergify[bot]
4f9a7f5065 fix: added validation for required invoice_fields in POS (backport #45780) (#45868)
* fix: added validation for required invoice_fields in POS (#45780)

fix: added missing validation for required invoice_fields
(cherry picked from commit b95b13ecd8)

# Conflicts:
#	erpnext/selling/page/point_of_sale/pos_payment.js

* fix: resolved merge conflict

---------

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-02-11 17:55:07 +05:30
Rohit Waghchaure
1359a77e72 fix: remove serial no if qty is zero
(cherry picked from commit 3a4ae8c463)
2025-02-11 11:28:16 +00:00
Rohit Waghchaure
3b7c38da10 fix: stock reco current valuation rate
(cherry picked from commit 8d8f3afb39)
2025-02-11 11:24:14 +00:00
mergify[bot]
179cb1e6e5 fix: correct amt in account currency for lcv with manually distributed charges. (backport #45532) (#45864)
fix: correct amt in account currency for lcv with manually distributed charges.

(cherry picked from commit db38e7bf5a)

Co-authored-by: ljain112 <ljain112@gmail.com>
2025-02-11 16:05:42 +05:30
mergify[bot]
435c35414f fix: Party name in Supplier Portal for Purchase Order (backport #45772) (#45858)
fix: Party name in Supplier Portal for Purchase Order

(cherry picked from commit fc8663421b)

Co-authored-by: ljain112 <ljain112@gmail.com>
2025-02-11 15:42:45 +05:30
mergify[bot]
0954aca758 fix: do not allow "Finance Book" in Accounting Dimensions (backport #45696) (#45856)
fix: do not allow "Finance Book" in Accounting Dimensions

(cherry picked from commit a44be73a98)

Co-authored-by: ljain112 <ljain112@gmail.com>
2025-02-11 15:42:36 +05:30
mergify[bot]
2e9e355329 fix(regional): removed payment schedule validation in sales invoice for italy (backport #45852) (#45854)
fix(regional): removed payment schedule validation in sales invoice for italy (#45852)

(cherry picked from commit 494310293c)

Co-authored-by: Lakshit Jain <108322669+ljain112@users.noreply.github.com>
2025-02-11 15:41:30 +05:30
Smit Vora
6b8826f234 Merge pull request #45773 from ljain112/fix-portalpay
fix: correct pay amount in portal pages
2025-02-11 14:59:03 +05:30
mergify[bot]
b112d88767 fix: map project from rfq to supplier quotation (backport #45745) (#45828)
* fix: map project from rfq to supplier quotation

(cherry picked from commit d0479036bb)

* fix: add project field map from mr to rfq

(cherry picked from commit 8fa39bec61)

---------

Co-authored-by: HenningWendtland <156231187+HenningWendtland@users.noreply.github.com>
2025-02-11 14:52:13 +05:30
mergify[bot]
b06bd825c1 fix: correct amount in transaction currency for reverse gl entries (backport #45794) (#45849)
fix: correct amount in tansaction currency for reverse gl entries

(cherry picked from commit 6077c248b0)

Co-authored-by: ljain112 <ljain112@gmail.com>
2025-02-11 14:49:27 +05:30
ruthra kumar
b084433158 Merge pull request #45847 from frappe/mergify/bp/version-15-hotfix/pr-45792
fix: do not validate party against Receivable and Payable account for cancelled gl entries (backport #45792)
2025-02-11 12:53:29 +05:30
ljain112
6d777cdc68 fix: do not validate party against Receivable and Payable account for cancelled gl entries
(cherry picked from commit 0809e00455)
2025-02-11 06:44:50 +00:00
ruthra kumar
ebce6be23f Merge pull request #45844 from frappe/mergify/bp/version-15-hotfix/pr-45781
fix: Added Total Row for `Gross Profit` Report in Non-Grouped Invoices (backport #45781)
2025-02-11 12:01:11 +05:30
Sanket322
e432ae98a9 fix: add total row in non_grouped_invoices
(cherry picked from commit 2d32ddacc3)
2025-02-11 04:51:47 +00:00
ruthra kumar
09114e6a7b Merge pull request #45842 from frappe/mergify/bp/version-15-hotfix/pr-45832
fix: possible model sync issue (backport #45832)
2025-02-11 10:20:21 +05:30
ruthra kumar
ea01fa135e fix: possible model sync issue
(cherry picked from commit 0069581aa3)
2025-02-11 04:25:34 +00:00
Frappe PR Bot
b0c9fbe9fc chore(release): Bumped to Version 15.51.2
## [15.51.2](https://github.com/frappe/erpnext/compare/v15.51.1...v15.51.2) (2025-02-10)

### Bug Fixes

* Attibute error `selling_price_list` ([e8fd2ee](e8fd2eeaa2))
* check_item_quality_inspection is not whitelisted ([d0dbfa1](d0dbfa1cbd))
2025-02-10 16:28:24 +00:00
rohitwaghchaure
0758192c53 Merge pull request #45836 from frappe/mergify/bp/version-15/pr-45835
fix: check_item_quality_inspection is not whitelisted (backport #45835)
2025-02-10 21:56:59 +05:30
rohitwaghchaure
d2cb659220 Merge pull request #45834 from frappe/mergify/bp/version-15/pr-45822
fix: AttributeError in `get_item_details` when selecting/scanning batch in Delivery Note (backport #45774) (backport #45822)
2025-02-10 21:56:40 +05:30
Rohit Waghchaure
d0dbfa1cbd fix: check_item_quality_inspection is not whitelisted
(cherry picked from commit 0a4a09352a)
2025-02-10 15:46:46 +00:00
rohitwaghchaure
b9b2fc5773 Merge pull request #45835 from rohitwaghchaure/fixed-support-31452
fix: check_item_quality_inspection is not whitelisted
2025-02-10 21:15:27 +05:30
Rohit Waghchaure
0a4a09352a fix: check_item_quality_inspection is not whitelisted 2025-02-10 19:09:02 +05:30
DaizyModi
e8fd2eeaa2 fix: Attibute error selling_price_list
(cherry picked from commit 820b32eb8a)
(cherry picked from commit 6dc99f95c0)
2025-02-10 13:34:14 +00:00
rohitwaghchaure
51545234d3 Merge pull request #45822 from frappe/mergify/bp/version-15-hotfix/pr-45774
fix: AttributeError in `get_item_details` when selecting/scanning batch in Delivery Note (backport #45774)
2025-02-10 19:02:51 +05:30
mergify[bot]
035758f47d fix: pos numpad editable action buttons (backport #45823) (#45826)
fix: pos numpad editable action buttons (#45823)

(cherry picked from commit 0b9c28620f)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-02-10 16:28:59 +05:30
DaizyModi
6dc99f95c0 fix: Attibute error selling_price_list
(cherry picked from commit 820b32eb8a)
2025-02-10 10:19:49 +00:00
ruthra kumar
f440795809 Merge pull request #45816 from frappe/mergify/bp/version-15-hotfix/pr-45747
fix: Handle Empty JSON in Report Parsing (backport #45747)
2025-02-10 12:10:43 +05:30
Sanket322
eeb322bd0e fix: handle response when json is None
(cherry picked from commit 133e0417b8)
2025-02-10 06:12:45 +00:00
ruthra kumar
9a5aa8eeb9 Merge pull request #45813 from frappe/mergify/bp/version-15-hotfix/pr-45793
fix: unable to remove image from employee (backport #45793)
2025-02-10 11:01:00 +05:30
ruthra kumar
1f967f7e9d Merge pull request #45814 from frappe/mergify/bp/version-15-hotfix/pr-45762
refactor: set received and paid amount based on each other, if unset (backport #45762)
2025-02-10 11:00:48 +05:30
rohitwaghchaure
3c386c2062 Merge pull request #45811 from frappe/mergify/bp/version-15-hotfix/pr-45810
fix: not able to select the item in the sales invoice (backport #45810)
2025-02-10 10:41:31 +05:30
ruthra kumar
1d6c50c9a1 chore: resolve conflict 2025-02-10 10:38:18 +05:30
ruthra kumar
e589c5b6ef refactor: set paid amount based on received amount if unset
(cherry picked from commit 99e721e622)
2025-02-10 05:08:05 +00:00
ruthra kumar
6638b391ff refactor: set received amount based on paid amount
(cherry picked from commit 5ff540bd82)
2025-02-10 05:08:05 +00:00
Asmita Hase
e3cceb894b fix: unable to remove image from employee
fix: employee image disappears when newly created user_id is linked to employee

(cherry picked from commit 0207d2d7b6)

# Conflicts:
#	erpnext/setup/doctype/employee/employee.json
2025-02-10 05:03:12 +00:00
Rohit Waghchaure
a649001886 fix: not able to select the item in the sales invoice
(cherry picked from commit 35388e7a04)
2025-02-10 04:39:40 +00:00
rohitwaghchaure
39e3746a62 Merge pull request #45775 from frappe/mergify/bp/version-15-hotfix/pr-45767
fix: the project document timed out while opening (backport #45767)
2025-02-10 10:09:38 +05:30
Frappe PR Bot
8c57e9f8c8 chore(release): Bumped to Version 15.51.1
## [15.51.1](https://github.com/frappe/erpnext/compare/v15.51.0...v15.51.1) (2025-02-07)

### Bug Fixes

* update ctx to args ([13bebe7](13bebe71b0))
2025-02-07 14:22:13 +00:00
ruthra kumar
5f62fc5a99 Merge pull request #45795 from frappe/mergify/bp/version-15/pr-45770
Fix: Update `ctx` to `args` for compatibility. (backport #45770)
2025-02-07 19:50:45 +05:30
Sanket322
13bebe71b0 fix: update ctx to args
(cherry picked from commit d4bc3d182f)
2025-02-07 14:14:41 +00:00
ruthra kumar
9702a192d7 Merge pull request #45770 from Sanket322/update_ctx_to_args
Fix: Update `ctx` to `args` for compatibility.
2025-02-07 19:43:53 +05:30
ruthra kumar
a051ddee6d Merge pull request #45788 from frappe/mergify/bp/version-15-hotfix/pr-45640
feat: add repost accounting ledger entry for payment entry (backport #45640)
2025-02-07 17:15:33 +05:30
ruthra kumar
be09700d8b Merge pull request #45789 from frappe/mergify/bp/version-15-hotfix/pr-45644
fix: add allow_on_submit for party_balance, paid_from_account_balance and paid_to_account_balance (backport #45644)
2025-02-07 17:15:22 +05:30
l0gesh29
757dd3f0b6 feat: add repost accounting ledger entry for payment entry
(cherry picked from commit 5676d60ed3)
2025-02-07 10:41:54 +00:00
Sugesh393
086c36fca6 fix: add allow_on_submit for party_balance, paid_from_account_balance and paid_to_account_balance
(cherry picked from commit 707c01487e)
2025-02-07 10:41:54 +00:00
ruthra kumar
a7d32b580f Merge pull request #45784 from frappe/mergify/bp/version-15-hotfix/pr-45639
fix: '0' rate LDC's Invoice net totals should be ignored (backport #45639)
2025-02-07 13:43:58 +05:30
ruthra kumar
43d75b96c6 chore: resolve conflict 2025-02-07 13:18:42 +05:30
ruthra kumar
3734289983 test: ldc @ 0 rate
(cherry picked from commit 0cdd346f8f)

# Conflicts:
#	erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py
2025-02-07 07:44:11 +00:00
ruthra kumar
96c19cd990 fix: '0' rate LDC's Invoice net totals should be ignored
(cherry picked from commit 325c4e3536)
2025-02-07 07:44:11 +00:00
rohitwaghchaure
08a6f4e6d3 chore: fix conflicts 2025-02-06 22:09:44 +05:30
Rohit Waghchaure
28cbce4356 fix: the project document timed out while opening
(cherry picked from commit 33d03b1542)

# Conflicts:
#	erpnext/selling/doctype/sales_order/sales_order.json
2025-02-06 16:38:46 +00:00
ljain112
3ada520618 fix: correct pay amount in portal pages 2025-02-06 18:56:29 +05:30
Sanket322
d4bc3d182f fix: update ctx to args 2025-02-06 17:55:37 +05:30
Mihir Kandoi
4196986273 chore: resolve conflicts 2025-02-05 17:59:34 +05:30
Mihir Kandoi
9d6f3180d4 fix: create job card with wip warehouse set to source warehouse if material transfer to wip warehouse is skipped in work order
(cherry picked from commit 723e902470)

# Conflicts:
#	erpnext/manufacturing/doctype/work_order/work_order.py
2025-02-05 12:19:49 +00:00
Frappe PR Bot
b1161f446f chore(release): Bumped to Version 15.51.0
# [15.51.0](https://github.com/frappe/erpnext/compare/v15.50.1...v15.51.0) (2025-02-05)

### Bug Fixes

* actual qty showing blank for sub-assembly items ([d0748b1](d0748b1b67))
* added correct options for incoming_rate field of delivery note item ([cfc5007](cfc50073ed))
* allow multiple email ids ([2a25302](2a25302c35))
* attribute 'msgbox' not found in sales invoice.js ([f6b4984](f6b49845e2))
* bind this to function ([c0b32c4](c0b32c446b))
* check billing address ([44d9fb7](44d9fb7a69))
* closing stock balance report not generating ([47d1c3b](47d1c3b5a3))
* conflicts ([4aa072a](4aa072a8eb))
* consider process_loss_qty in work order ([1522d76](1522d76a3b))
* copy correct uom from devliery note when creating packing list ([f9794e5](f9794e5b44))
* correct error message in payment entry ([6ea5307](6ea5307b0e))
* default payment terms template selected while duplicating ([ca4bb96](ca4bb96fb4))
* Do not check for cancelled invoices ([84638f5](84638f58fd))
* Do not check for cancelled invoices ([b612ab5](b612ab5823))
* fetch rate from item price list when document is saved ([b140ce7](b140ce71d7))
* filter the item tax template using the input text ([8ea9a9e](8ea9a9e467))
* Gross Profit Report with Correct Totals and Gross Margin (backport [#45548](https://github.com/frappe/erpnext/issues/45548)) ([#45598](https://github.com/frappe/erpnext/issues/45598)) ([6301b32](6301b321d8))
* handling company in bank reconciliation tool ([#45582](https://github.com/frappe/erpnext/issues/45582)) ([aa27e19](aa27e19a58))
* ignore expired batch for pick list ([786db3d](786db3d0fa))
* loading print receipt only at order complete (backport [#45627](https://github.com/frappe/erpnext/issues/45627)) ([#45628](https://github.com/frappe/erpnext/issues/45628)) ([72868ee](72868eee04))
* logical error failing tests ([6a03f99](6a03f99546))
* not able to make manufacturing entry for alternate items ([eef2f3c](eef2f3c5d4))
* only system manager was able to create customer & prospect ([6149306](6149306b78))
* payment schedule table is empty while duplicating record ([c523625](c52362531c))
* point of sale padding (backport [#45697](https://github.com/frappe/erpnext/issues/45697)) ([#45699](https://github.com/frappe/erpnext/issues/45699)) ([b915e7f](b915e7f637))
* pos payment cash shortcut decimal (backport [#45702](https://github.com/frappe/erpnext/issues/45702)) ([#45705](https://github.com/frappe/erpnext/issues/45705)) ([6113cc1](6113cc1e43))
* pos print receipt on submit (backport [#45632](https://github.com/frappe/erpnext/issues/45632)) ([#45633](https://github.com/frappe/erpnext/issues/45633)) ([676dde5](676dde59c2))
* **pos:** add item in the existing item row when discount is applied ([0b54cb9](0b54cb9a7c))
* posting_date to posting_datetime in stock related queries ([cd5174e](cd5174e423))
* remove tds account in taxes table on change of Tax Withholding Category ([1ad16c3](1ad16c368e))
* removed unused field ([9a27d3c](9a27d3cedc))
* renamed Commments Tab to Notes tab in Lead doctype ([86edcfc](86edcfc1fd))
* reposting issue with s3 backup ([73c1bf9](73c1bf972e))
* resolved conflicts ([223fe62](223fe62638))
* respect user set account if not advance account for getting outstanding invoices in payment entry ([8108d7f](8108d7fdba))
* semgrep ([401fd7f](401fd7fca7))
* set asset value correctly after cancelling value adjustment ([7f7f403](7f7f403f5b))
* show only items with inspection enabled on create QI dialog ([34f8a37](34f8a370d1))
* slow SABB query ([7931c2d](7931c2d182))
* subcontracting valiation precision issue ([5319683](5319683dbf))
* track employee changes ([#45674](https://github.com/frappe/erpnext/issues/45674)) ([cf98ebf](cf98ebf7fe))
* validation message ([4742211](47422111b4))
* validation to prevent submission if the SABB is not linked to a stock transaction ([24a6f61](24a6f611d8))

### Features

* account heads changed along with journal entry type and descrip… ([#42845](https://github.com/frappe/erpnext/issues/42845)) ([bbecd36](bbecd36a5d))
* report to find incorrect SABB ([a948f2e](a948f2e095))
* set bank account of company to default company bank account from masters ([b840271](b840271d2a))

### Performance Improvements

* stock entry with batch (backport [#45486](https://github.com/frappe/erpnext/issues/45486)) ([#45602](https://github.com/frappe/erpnext/issues/45602)) ([8b75401](8b75401db9))
2025-02-05 12:08:00 +00:00
ruthra kumar
b8485e1d28 Merge pull request #45703 from frappe/version-15-hotfix
chore: release v15
2025-02-05 17:36:41 +05:30
ruthra kumar
e422ae16e5 Merge pull request #45743 from frappe/mergify/bp/version-15-hotfix/pr-45604
fix: filter the item tax template using the input text (backport #45604)
2025-02-05 17:13:07 +05:30
rohitwaghchaure
dcdd8e9824 Merge pull request #45742 from frappe/mergify/bp/version-15-hotfix/pr-45734
fix: added correct options for incoming_rate field of delivery note item (backport #45734)
2025-02-05 17:08:16 +05:30
rohitwaghchaure
9d98d0efc8 Merge pull request #45744 from frappe/mergify/bp/version-15-hotfix/pr-45741
fix: removed unused field (backport #45741)
2025-02-05 17:07:46 +05:30
rohitwaghchaure
af60368e54 Merge pull request #45740 from frappe/mergify/bp/version-15-hotfix/pr-45692
fix: fetch rate from item price list when document is saved (backport #45692)
2025-02-05 16:42:00 +05:30
rohitwaghchaure
ab37e5754b chore: fix conflicts 2025-02-05 16:40:20 +05:30
Rohit Waghchaure
9a27d3cedc fix: removed unused field
(cherry picked from commit 2d7a576da5)
2025-02-05 11:09:40 +00:00
ruthra kumar
0b591ba7eb chore: resolve conflicts 2025-02-05 16:37:09 +05:30
Bhavan23
8ea9a9e467 fix: filter the item tax template using the input text
(cherry picked from commit 4dd37ba033)

# Conflicts:
#	erpnext/controllers/queries.py
2025-02-05 11:01:21 +00:00
Mihir Kandoi
cfc50073ed fix: added correct options for incoming_rate field of delivery note item
(cherry picked from commit 417bf49a8d)

# Conflicts:
#	erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
2025-02-05 10:48:01 +00:00
Mihir Kandoi
25075e5981 test: added test
(cherry picked from commit 07adfadd58)
2025-02-05 10:23:26 +00:00
Mihir Kandoi
6a03f99546 fix: logical error failing tests
(cherry picked from commit fee318a275)
2025-02-05 10:23:26 +00:00
Mihir Kandoi
b140ce71d7 fix: fetch rate from item price list when document is saved
(cherry picked from commit 1e4b9fbdf0)
2025-02-05 10:23:26 +00:00
Khushi Rawat
f72d4b6984 Merge pull request #45738 from frappe/mergify/bp/version-15-hotfix/pr-45735
fix: set asset value correctly after cancelling value adjustment (backport #45735)
2025-02-05 15:51:11 +05:30
ruthra kumar
d86f7839ab Merge pull request #45737 from frappe/mergify/bp/version-15-hotfix/pr-45717
fix(Purchase Invoice): default payment terms template selected while duplicating (backport #45717)
2025-02-05 15:30:48 +05:30
Khushi Rawat
7f7f403f5b fix: set asset value correctly after cancelling value adjustment
(cherry picked from commit fee3846144)
2025-02-05 09:56:11 +00:00
Ejaaz Khan
df0ca2d198 refactor: remove log
(cherry picked from commit bfc01441a0)
2025-02-05 09:47:59 +00:00
Ejaaz Khan
c52362531c fix: payment schedule table is empty while duplicating record
(cherry picked from commit fb3f08a441)
2025-02-05 09:47:59 +00:00
Ejaaz Khan
ca4bb96fb4 fix: default payment terms template selected while duplicating
(cherry picked from commit 18127603fe)
2025-02-05 09:47:59 +00:00
Khushi Rawat
50d10d5c8d Merge pull request #45733 from frappe/mergify/bp/version-15-hotfix/pr-42845
feat: account heads changed along with journal entry type and descrip… (backport #42845)
2025-02-05 15:03:27 +05:30
Khushi Rawat
4aa072a8eb fix: conflicts 2025-02-05 14:44:39 +05:30
Khushi Rawat
223fe62638 fix: resolved conflicts 2025-02-05 14:43:24 +05:30
rahulgupta8848
bbecd36a5d feat: account heads changed along with journal entry type and descrip… (#42845)
* feat: account heads changed along with journal entry type and description

* feat: added patch for difference_amount for asset value adjustment and refactor

---------

Co-authored-by: “rahulgupta8848” <“rahul.gupta@8848digital.com”>
(cherry picked from commit d4fdada83c)

# Conflicts:
#	erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.json
#	erpnext/patches.txt
2025-02-05 09:09:49 +00:00
ruthra kumar
9f28993575 Merge pull request #45732 from frappe/mergify/bp/version-15-hotfix/pr-45590
fix: remove tds account in taxes table on change of Tax Withholding C… (backport #45590)
2025-02-05 14:28:07 +05:30
l0gesh29
1ad16c368e fix: remove tds account in taxes table on change of Tax Withholding Category
(cherry picked from commit 79b5a3e1dd)
2025-02-05 08:39:21 +00:00
ruthra kumar
c1002d3787 Merge pull request #45728 from frappe/mergify/bp/version-15-hotfix/pr-45686
fix: allow multiple email ids (backport #45686)
2025-02-05 14:08:48 +05:30
ruthra kumar
8ad32c4593 Merge pull request #45731 from frappe/mergify/bp/version-15-hotfix/pr-45447
fix(pos): add item in the existing item row when discount is applied (backport #45447)
2025-02-05 14:04:09 +05:30
venkat102
0b54cb9a7c fix(pos): add item in the existing item row when discount is applied
(cherry picked from commit bee2c04d0b)
2025-02-05 08:30:27 +00:00
Sudharsanan11
44d9fb7a69 fix: check billing address
(cherry picked from commit 9950e4aa0c)
2025-02-05 08:19:58 +00:00
Sudharsanan11
2a25302c35 fix: allow multiple email ids
(cherry picked from commit 423decb93c)
2025-02-05 08:19:58 +00:00
ruthra kumar
0cac9e9b9a Merge pull request #45727 from frappe/mergify/bp/version-15-hotfix/pr-45610
fix: respect user set account if not advance account for getting outsanding invoices in payment entry (backport #45610)
2025-02-05 13:40:05 +05:30
rohitwaghchaure
efa7602fae Merge pull request #45718 from frappe/mergify/bp/version-15-hotfix/pr-45710
fix: show only items with inspection enabled on create QI dialog (backport #45710)
2025-02-05 13:05:16 +05:30
ruthra kumar
b926b49afa chore: fix typo
(cherry picked from commit 85378f9d1a)
2025-02-05 06:40:22 +00:00
ljain112
8108d7fdba fix: respect user set account if not advance account for getting outstanding invoices in payment entry
(cherry picked from commit 9faf78d3e5)
2025-02-05 06:40:22 +00:00
Mihir Kandoi
3689a2deae chore: resolve conflicts 2025-02-05 12:00:01 +05:30
ruthra kumar
5a7b901327 Merge pull request #45719 from frappe/mergify/bp/version-15-hotfix/pr-45678
fix: copy correct uom from delivery note when creating packing list (backport #45678)
2025-02-05 10:38:13 +05:30
rohitwaghchaure
51b03d40aa Merge pull request #45721 from rohitwaghchaure/fixed-support-30732
fix: closing stock balance report not generating
2025-02-05 08:45:00 +05:30
Rohit Waghchaure
47d1c3b5a3 fix: closing stock balance report not generating 2025-02-05 05:29:23 +05:30
Mihir Kandoi
f9794e5b44 fix: copy correct uom from devliery note when creating packing list
(cherry picked from commit 3cdaa80526)
2025-02-04 19:06:15 +00:00
Mihir Kandoi
401fd7fca7 fix: semgrep
(cherry picked from commit ffd10d1fe9)
2025-02-04 19:04:57 +00:00
Mihir Kandoi
34f8a370d1 fix: show only items with inspection enabled on create QI dialog
(cherry picked from commit c92ec312b9)

# Conflicts:
#	erpnext/controllers/stock_controller.py
2025-02-04 19:04:57 +00:00
ruthra kumar
ac960d26e8 Merge pull request #45711 from frappe/mergify/bp/version-15-hotfix/pr-45582
fix: handling company in bank reconciliation tool (backport #45582)
2025-02-04 17:32:42 +05:30
Aayush Dalal
aa27e19a58 fix: handling company in bank reconciliation tool (#45582)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
(cherry picked from commit d1c927530e)
2025-02-04 11:45:01 +00:00
rohitwaghchaure
1ed52c3b41 Merge pull request #45708 from frappe/mergify/bp/version-15-hotfix/pr-45701
fix: subcontracting validation precision issue (backport #45701)
2025-02-04 15:56:44 +05:30
Frappe PR Bot
fea51b7086 chore(release): Bumped to Version 15.50.1
## [15.50.1](https://github.com/frappe/erpnext/compare/v15.50.0...v15.50.1) (2025-02-04)

### Bug Fixes

* not able to make manufacturing entry for alternate items ([32bfc2f](32bfc2f555))
2025-02-04 10:23:41 +00:00
rohitwaghchaure
49192d90d0 Merge pull request #45707 from frappe/mergify/bp/version-15/pr-45647
fix: not able to make manufacturing entry for alternate items (backport #45646) (backport #45647)
2025-02-04 15:52:11 +05:30
rohitwaghchaure
f9af53cd87 Merge pull request #45706 from frappe/mergify/bp/version-15-hotfix/pr-45698
feat: report to find incorrect SABB (backport #45698)
2025-02-04 15:45:40 +05:30
Mihir Kandoi
5319683dbf fix: subcontracting valiation precision issue
(cherry picked from commit 8720d412bd)
2025-02-04 09:54:08 +00:00
Rohit Waghchaure
32bfc2f555 fix: not able to make manufacturing entry for alternate items
(cherry picked from commit 1607aa1a44)
(cherry picked from commit eef2f3c5d4)
2025-02-04 09:52:11 +00:00
Rohit Waghchaure
a948f2e095 feat: report to find incorrect SABB
(cherry picked from commit 7e24395e00)
2025-02-04 09:47:04 +00:00
mergify[bot]
6113cc1e43 fix: pos payment cash shortcut decimal (backport #45702) (#45705)
fix: pos payment cash shortcut decimal (#45702)

(cherry picked from commit a20116816e)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-02-04 15:14:08 +05:30
mergify[bot]
b915e7f637 fix: point of sale padding (backport #45697) (#45699)
fix: point of sale padding (#45697)

(cherry picked from commit 51a65899ec)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-02-04 14:02:38 +05:30
Shariq Ansari
0d03e03925 Merge pull request #45695 from frappe/mergify/bp/version-15-hotfix/pr-45694
fix: only system manager was able to create customer & prospect (backport #45694)
2025-02-04 12:48:50 +05:30
Shariq Ansari
6149306b78 fix: only system manager was able to create customer & prospect
(cherry picked from commit 716edeb465)
2025-02-04 06:41:09 +00:00
rohitwaghchaure
a0523c7956 Merge pull request #45690 from frappe/mergify/bp/version-15-hotfix/pr-45680
fix: slow SABB query (backport #45680)
2025-02-03 23:10:46 +05:30
Rohit Waghchaure
7931c2d182 fix: slow SABB query
(cherry picked from commit 81978a0bd8)
2025-02-03 17:02:03 +00:00
rohitwaghchaure
7658053dbd Merge pull request #45665 from frappe/mergify/bp/version-15-hotfix/pr-45648
fix: consider process_loss_qty in work order (backport #45648)
2025-02-03 20:57:01 +05:30
ruthra kumar
1b85cdcf48 Merge pull request #45677 from frappe/mergify/bp/version-15-hotfix/pr-45674
fix: track employee changes (backport #45674)
2025-02-03 15:27:03 +05:30
ruthra kumar
16a80cc04a Merge pull request #45675 from frappe/mergify/bp/version-15-hotfix/pr-45631
fix: Do not check for cancelled invoices (backport #45631)
2025-02-03 14:32:00 +05:30
Ankush Menat
cf98ebf7fe fix: track employee changes (#45674)
closes https://github.com/frappe/erpnext/issues/45571

(cherry picked from commit 827afbfa2e)
2025-02-03 08:52:45 +00:00
Deepesh Garg
84638f58fd fix: Do not check for cancelled invoices
(cherry picked from commit 2c94867b0e)
2025-02-03 08:42:28 +00:00
Deepesh Garg
b612ab5823 fix: Do not check for cancelled invoices
(cherry picked from commit 701fc02050)
2025-02-03 08:42:27 +00:00
ruthra kumar
0d94eba021 Merge pull request #45669 from frappe/mergify/bp/version-15-hotfix/pr-45619
feat: set bank account of company to default company bank account fro… (backport #45619)
2025-02-03 14:05:23 +05:30
Shariq Ansari
7d95113499 Merge pull request #45673 from frappe/mergify/bp/version-15-hotfix/pr-45637
fix: renamed Comments Tab to Notes tab in Lead doctype (backport #45637)
2025-02-03 13:27:26 +05:30
Shariq Ansari
afd2529c2a chore: resolved conflict 2025-02-03 13:26:33 +05:30
Shariq Ansari
86edcfc1fd fix: renamed Commments Tab to Notes tab in Lead doctype
(cherry picked from commit 018df3135a)

# Conflicts:
#	erpnext/crm/doctype/lead/lead.json
2025-02-03 07:53:32 +00:00
Mihir Kandoi
b840271d2a feat: set bank account of company to default company bank account from masters
(cherry picked from commit ce7702cc19)
2025-02-03 06:31:55 +00:00
rohitwaghchaure
55ac00a510 Merge pull request #45667 from frappe/mergify/bp/version-15-hotfix/pr-45621
fix: delivered button of purchase order (backport #45621)
2025-02-03 11:58:35 +05:30
Mihir Kandoi
c0b32c446b fix: bind this to function
(cherry picked from commit 41649cf52d)
2025-02-03 06:22:47 +00:00
Mihir Kandoi
1522d76a3b fix: consider process_loss_qty in work order
(cherry picked from commit 95fda47b6c)
2025-02-03 06:21:40 +00:00
rohitwaghchaure
83e676f128 Merge pull request #45647 from frappe/mergify/bp/version-15-hotfix/pr-45646
fix: not able to make manufacturing entry for alternate items (backport #45646)
2025-02-03 11:48:03 +05:30
Rohit Waghchaure
eef2f3c5d4 fix: not able to make manufacturing entry for alternate items
(cherry picked from commit 1607aa1a44)
2025-01-31 18:18:37 +00:00
rohitwaghchaure
821cc215e3 Merge pull request #45645 from frappe/mergify/bp/version-15-hotfix/pr-45642
fix: actual qty showing blank for sub-assembly items (backport #45642)
2025-01-31 23:22:09 +05:30
rohitwaghchaure
3e09abc495 Merge pull request #45617 from rtdany10/expired-batch-pick
fix: ignore expired batch for pick list
2025-01-31 22:49:34 +05:30
Rohit Waghchaure
d0748b1b67 fix: actual qty showing blank for sub-assembly items
(cherry picked from commit 5be2e71a35)
2025-01-31 17:09:00 +00:00
rohitwaghchaure
7fc70e3f20 Merge pull request #45638 from frappe/mergify/bp/version-15-hotfix/pr-45626
fix: validation to prevent submission, if the SABB is not linked to a stock transaction (backport #45626)
2025-01-31 15:21:43 +05:30
Rohit Waghchaure
24a6f611d8 fix: validation to prevent submission if the SABB is not linked to a stock transaction
(cherry picked from commit f976115a2b)
2025-01-31 09:14:53 +00:00
ruthra kumar
4b91b7691a Merge pull request #45636 from frappe/mergify/bp/version-15-hotfix/pr-45615
fix: correct error message in payment entry (backport #45615)
2025-01-31 14:18:59 +05:30
ljain112
6ea5307b0e fix: correct error message in payment entry
(cherry picked from commit 592704cfd0)
2025-01-31 07:27:37 +00:00
rohitwaghchaure
d65101a5f2 Merge pull request #45634 from frappe/mergify/bp/version-15-hotfix/pr-45629
fix: attribute 'msgbox' not found in sales invoice.js (backport #45629)
2025-01-31 12:11:28 +05:30
rohitwaghchaure
bd8e4eeddc chore: fix conflicts 2025-01-31 12:09:50 +05:30
Mihir Kandoi
f6b49845e2 fix: attribute 'msgbox' not found in sales invoice.js
(cherry picked from commit 5643385c22)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.js
2025-01-31 06:34:32 +00:00
mergify[bot]
676dde59c2 fix: pos print receipt on submit (backport #45632) (#45633)
fix: pos print receipt on submit (#45632)

(cherry picked from commit fe51535392)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-01-31 12:02:47 +05:30
mergify[bot]
72868eee04 fix: loading print receipt only at order complete (backport #45627) (#45628)
fix: loading print receipt only at order complete (#45627)

(cherry picked from commit 5a1851dfe3)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-01-31 11:19:23 +05:30
rohitwaghchaure
04c1fc71dd Merge pull request #45614 from frappe/mergify/bp/version-15-hotfix/pr-45612
fix: posting_date to posting_datetime in stock related queries (backport #45612)
2025-01-30 21:19:19 +05:30
Dany Robert
786db3d0fa fix: ignore expired batch for pick list 2025-01-30 19:34:06 +05:30
Rohit Waghchaure
cd5174e423 fix: posting_date to posting_datetime in stock related queries
(cherry picked from commit e61ab48145)
2025-01-30 11:36:10 +00:00
rohitwaghchaure
20d5a79839 Merge pull request #45613 from frappe/mergify/bp/version-15-hotfix/pr-45609
fix: reposting issue with s3 backup (backport #45609)
2025-01-30 17:05:16 +05:30
Rohit Waghchaure
73c1bf972e fix: reposting issue with s3 backup
(cherry picked from commit 6b454ca9a7)
2025-01-30 10:29:54 +00:00
mergify[bot]
6301b321d8 fix: Gross Profit Report with Correct Totals and Gross Margin (backport #45548) (#45598)
fix: Gross Profit Report with Correct Totals and Gross Margin (#45548)

Co-authored-by: Sanket322 <shahsanket322003.com>
(cherry picked from commit aaf720ab61)

Co-authored-by: Sanket Shah <113279972+Sanket322@users.noreply.github.com>
2025-01-30 11:21:52 +05:30
mergify[bot]
8b75401db9 perf: stock entry with batch (backport #45486) (#45602)
perf: stock entry with batch

(cherry picked from commit 0b1b964b77)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2025-01-30 11:21:20 +05:30
rohitwaghchaure
b5856d4f1f Merge pull request #45601 from frappe/mergify/bp/version-15-hotfix/pr-45600
fix: validation message (backport #45600)
2025-01-29 20:48:56 +05:30
Rohit Waghchaure
47422111b4 fix: validation message
(cherry picked from commit 4c8dff942d)
2025-01-29 15:12:39 +00:00
Frappe PR Bot
c5cd0fcd29 chore(release): Bumped to Version 15.50.0
# [15.50.0](https://github.com/frappe/erpnext/compare/v15.49.3...v15.50.0) (2025-01-29)

### Bug Fixes

* add condition to check if item is delivered by supplier in make_purchase_order_for_default_supplier() (backport [#45370](https://github.com/frappe/erpnext/issues/45370)) ([#45410](https://github.com/frappe/erpnext/issues/45410)) ([5d7d3d8](5d7d3d8c19))
* add multiple item issue in stock entry (backport [#45544](https://github.com/frappe/erpnext/issues/45544)) ([#45580](https://github.com/frappe/erpnext/issues/45580)) ([8b0efab](8b0efab13e))
* added debounce to prevent multiple clicks (backport [#45369](https://github.com/frappe/erpnext/issues/45369)) ([#45376](https://github.com/frappe/erpnext/issues/45376)) ([bdc65da](bdc65daadd))
* added item_group filter in item_code field in stock balance report (backport [#45340](https://github.com/frappe/erpnext/issues/45340)) ([#45389](https://github.com/frappe/erpnext/issues/45389)) ([412e22f](412e22fb4e))
* allow to fix negative stock for batch using stock reco ([69c5695](69c5695f6e))
* batch qty calculation (backport [#45367](https://github.com/frappe/erpnext/issues/45367)) ([#45388](https://github.com/frappe/erpnext/issues/45388)) ([767529f](767529f0ec))
* Correct Party Bank Account mapping in `Payment Entry` ([4a390ae](4a390ae3de))
* currency decimal on POS Past Order List (backport [#45524](https://github.com/frappe/erpnext/issues/45524)) ([#45527](https://github.com/frappe/erpnext/issues/45527)) ([ff46ae5](ff46ae5bc1))
* disable load_after_mapping when purchase order created from sales order (backport [#45405](https://github.com/frappe/erpnext/issues/45405)) ([#45429](https://github.com/frappe/erpnext/issues/45429)) ([ae5ce97](ae5ce97fd0))
* Do no query GLs if no PCVs are posted ([ad06652](ad06652ed5))
* do not allow to manually submit the SABB ([2b16eb5](2b16eb5381))
* do not check budget during reposting ([#45432](https://github.com/frappe/erpnext/issues/45432)) ([f2b946d](f2b946d325))
* don't update party-type on change of cost center in Journal Entry ([#45291](https://github.com/frappe/erpnext/issues/45291)) ([fb75180](fb75180a7d))
* existing logical error ([6c4655d](6c4655dd72))
* fix creating documents from sales invoice (backport [#45346](https://github.com/frappe/erpnext/issues/45346)) ([#45408](https://github.com/frappe/erpnext/issues/45408)) ([73a21c2](73a21c294c))
* get stock balance filtered by company for validating stock value in jv (backport [#45549](https://github.com/frappe/erpnext/issues/45549)) ([#45578](https://github.com/frappe/erpnext/issues/45578)) ([ef2f411](ef2f4118d9))
* import ([d74c498](d74c498efe))
* import 2 ([b59d253](b59d253d93))
* JobCardTimeLog' object has no attribute 'remaining_time_in_mins' ([ef15429](ef15429d98))
* logical error in where condition of qb query ([c102e51](c102e51eb1))
* **material request:** mapping Sales Order Item Delivery Date to Mate… (backport [#45227](https://github.com/frappe/erpnext/issues/45227)) ([#45424](https://github.com/frappe/erpnext/issues/45424)) ([52fdc7c](52fdc7cecd))
* merge conflict ([57f79a2](57f79a2240))
* **payment entry:** get amount in transaction currency ([b37602c](b37602c716))
* postal_code_move_and_fixes ([0e088dd](0e088dde36))
* precision issue causing incorrect status ([46a2b7a](46a2b7a07e))
* precision issue in stock entry ([fe5e42d](fe5e42d2dc))
* **query:** remove duplicate docstatus condition ([#45586](https://github.com/frappe/erpnext/issues/45586)) ([2d2f30e](2d2f30e6cf))
* remove applied pricing rule ([4e347d8](4e347d835e))
* remove unnecessary auth from plaid connector (backport [#44305](https://github.com/frappe/erpnext/issues/44305)) ([#45421](https://github.com/frappe/erpnext/issues/45421)) ([d9b342f](d9b342f257))
* removed field not present in v15 ([1be1981](1be19819fb))
* resolved pos return setting to default mode of payment instead of user selection (backport [#45377](https://github.com/frappe/erpnext/issues/45377)) ([#45419](https://github.com/frappe/erpnext/issues/45419)) ([224a925](224a92587d))
* return qty error due to precision (backport [#45536](https://github.com/frappe/erpnext/issues/45536)) ([#45581](https://github.com/frappe/erpnext/issues/45581)) ([a2ffdc7](a2ffdc7805))
* secure bulk transaction (backport [#45386](https://github.com/frappe/erpnext/issues/45386)) ([#45426](https://github.com/frappe/erpnext/issues/45426)) ([f9d9672](f9d96726f0))
* set company related values ([1498275](149827562b))
* set expense_account and cost_center based on company in stock entry (backport [#45159](https://github.com/frappe/erpnext/issues/45159)) ([#45416](https://github.com/frappe/erpnext/issues/45416)) ([3eb28bb](3eb28bb0e0))
* set party_account_currency for pos_invoice returns ([172fdad](172fdad244))
* set preferred email in Employee via backend controller (backport [#45320](https://github.com/frappe/erpnext/issues/45320)) ([#45379](https://github.com/frappe/erpnext/issues/45379)) ([f8099a6](f8099a6847))
* Set right party name in bank transaction ([86f4bf6](86f4bf6e01))
* show payment entries in Tax Withheld Vouchers ([28bb9c3](28bb9c39e8))
* System was allowing to save payment schedule amount less than grand total (backport [#45322](https://github.com/frappe/erpnext/issues/45322)) ([#45381](https://github.com/frappe/erpnext/issues/45381)) ([2403cdc](2403cdc4d7))
* update fields on change of item code In `Update Items` of `Sales Order` ([#45125](https://github.com/frappe/erpnext/issues/45125)) ([f60a3bc](f60a3bcedf))
* update voucher outstanding from payment ledger ([e385594](e3855949e1))
* Use `process.extract` to get the corresponding party doc name of the result ([153e961](153e961df7))
* use frappe.datetime.str_to_user (backport [#45216](https://github.com/frappe/erpnext/issues/45216)) ([#45417](https://github.com/frappe/erpnext/issues/45417)) ([6c10393](6c10393164))
* use user defined discount amount or default ([e73aab0](e73aab0df5))
* validate items against selling settings (backport [#45288](https://github.com/frappe/erpnext/issues/45288)) ([#45431](https://github.com/frappe/erpnext/issues/45431)) ([7ff7ec7](7ff7ec7929))
* validate non-stock item for exchange loss/gain (backport [#45306](https://github.com/frappe/erpnext/issues/45306)) ([#45380](https://github.com/frappe/erpnext/issues/45380)) ([4e367de](4e367dedec))
* valuation for batch (backport [#45335](https://github.com/frappe/erpnext/issues/45335)) ([#45420](https://github.com/frappe/erpnext/issues/45420)) ([dec0cae](dec0caeac5))
* variable names ([8f73978](8f73978a26))
* Wrong `bank_ac_no` filter + simplify convoluted logic ([60feb7c](60feb7cbd4))

### Features

* Add chart of accounts for Switzerland ([de43c12](de43c123e2))
* add company level validation for accounting dimension ([8f0d270](8f0d270746))
* Add corrective job card operating cost as additional costs in stock entry ([efc7b9a](efc7b9ac56))
* full screen on pos (backport [#45404](https://github.com/frappe/erpnext/issues/45404)) ([#45418](https://github.com/frappe/erpnext/issues/45418)) ([aca8d66](aca8d663dd))
* pos configuration for print receipt on complete order ([#45392](https://github.com/frappe/erpnext/issues/45392)) ([b9b4f63](b9b4f6316d))
* **Sales Invoice:** allow linking to project without adding timesheets (backport [#44295](https://github.com/frappe/erpnext/issues/44295)) ([#45528](https://github.com/frappe/erpnext/issues/45528)) ([2c2a25a](2c2a25ab16))
* **translations:** add Bengali translations for signature and client details ([4952733](495273365b))
* **UX:** scroll to required field (backport [#44367](https://github.com/frappe/erpnext/issues/44367)) ([#45433](https://github.com/frappe/erpnext/issues/45433)) ([692a448](692a44816f))

### Performance Improvements

* optimize DB calls with frappe.get_all (backport [#45289](https://github.com/frappe/erpnext/issues/45289)) ([#45391](https://github.com/frappe/erpnext/issues/45391)) ([04f5a72](04f5a72e08))

### Reverts

* Revert "feat(Sales Invoice): allow linking to project without adding timesheets (backport [#44295](https://github.com/frappe/erpnext/issues/44295))" ([#45531](https://github.com/frappe/erpnext/issues/45531)) ([b004855](b004855e7c))
2025-01-29 11:28:47 +00:00
ruthra kumar
cae8cee398 Merge pull request #45566 from frappe/version-15-hotfix
chore: release v15
2025-01-29 16:57:29 +05:30
rohitwaghchaure
cc96145ac9 Merge pull request #45595 from rohitwaghchaure/fixed-support-29212
fix: do not allow to manually submit the SABB
2025-01-29 16:38:19 +05:30
Rohit Waghchaure
2b16eb5381 fix: do not allow to manually submit the SABB 2025-01-29 16:36:17 +05:30
ruthra kumar
97d9030f26 Merge pull request #45594 from frappe/mergify/bp/version-15-hotfix/pr-45569
fix: update voucher outstanding from payment ledger (backport #45569)
2025-01-29 16:30:52 +05:30
ruthra kumar
156dcf535d Merge pull request #45592 from frappe/mergify/bp/version-15-hotfix/pr-45586
fix(query): remove duplicate docstatus condition (backport #45586)
2025-01-29 16:19:25 +05:30
ljain112
e3855949e1 fix: update voucher outstanding from payment ledger
(cherry picked from commit dd77070351)
2025-01-29 10:42:27 +00:00
Safvan Huzain
2d2f30e6cf fix(query): remove duplicate docstatus condition (#45586)
fix: remove duplicate docstatus condition in query
(cherry picked from commit 3f2e93dcb6)
2025-01-29 10:29:11 +00:00
ruthra kumar
3117052779 Merge pull request #45589 from frappe/mergify/bp/version-15-hotfix/pr-45441
fix: show payment entries in tax withheld vouchers (backport #45441)
2025-01-29 15:53:46 +05:30
ruthra kumar
eac5c91c8f Merge pull request #45588 from frappe/mergify/bp/version-15-hotfix/pr-45585
refactor: auto add taxes from template (backport #45585)
2025-01-29 15:50:05 +05:30
mergify[bot]
ef2f4118d9 fix: get stock balance filtered by company for validating stock value in jv (backport #45549) (#45578)
* fix: get stock balance filtered by company for validating stock value in jv (#45549)

* fix: get stock balance filtered by company for validating stock value in jv

* test: error is raised  on validate

(cherry picked from commit 9f20854bd9)

* fix: correct args for test case function

---------

Co-authored-by: Lakshit Jain <108322669+ljain112@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: ljain112 <ljain112@gmail.com>
2025-01-29 15:39:30 +05:30
ljain112
8f73978a26 fix: variable names
(cherry picked from commit d97e78e5d3)
2025-01-29 10:06:33 +00:00
ljain112
28bb9c39e8 fix: show payment entries in Tax Withheld Vouchers
(cherry picked from commit 55733d4f18)
2025-01-29 10:06:33 +00:00
ruthra kumar
aef6b62f7d refactor: auto add taxes from template
(cherry picked from commit d1086722bf)
2025-01-29 09:59:20 +00:00
mergify[bot]
a2ffdc7805 fix: return qty error due to precision (backport #45536) (#45581)
fix: return qty error due to precision

(cherry picked from commit 3078578692)

Co-authored-by: Dany Robert <danyrt@wahni.com>
2025-01-29 12:46:44 +05:30
mergify[bot]
8b0efab13e fix: add multiple item issue in stock entry (backport #45544) (#45580)
fix: add multiple item issue in stock entry (#45544)

(cherry picked from commit 5a023dc8d4)

Co-authored-by: Ejaaz Khan <67804911+iamejaaz@users.noreply.github.com>
2025-01-29 12:45:34 +05:30
Mihir Kandoi
6323e641f6 Merge pull request #45542 from frappe/mergify/bp/version-15-hotfix/pr-45282 2025-01-28 18:36:59 +05:30
Mihir Kandoi
6c4655dd72 fix: existing logical error 2025-01-28 16:56:05 +05:30
ruthra kumar
33b5be03a8 Merge pull request #45563 from frappe/mergify/bp/version-15-hotfix/pr-45452
fix(payment entry): get amount in transaction currency (backport #45452)
2025-01-28 14:56:51 +05:30
venkat102
b37602c716 fix(payment entry): get amount in transaction currency
(cherry picked from commit af97f42429)
2025-01-28 09:04:35 +00:00
ruthra kumar
75a4c31948 Merge pull request #45558 from frappe/mergify/bp/version-15-hotfix/pr-45551
feat: Add chart of accounts for Switzerland (backport #45551)
2025-01-28 11:59:40 +05:30
ruthra kumar
eef907a275 chore: rename json to standard name format 2025-01-28 11:41:36 +05:30
eagleautomate
de43c123e2 feat: Add chart of accounts for Switzerland
240812 Schulkontenrahmen VEB - DE

(cherry picked from commit 2c644ec2ef)
2025-01-28 06:04:37 +00:00
ruthra kumar
0576c5c37f Merge pull request #45557 from frappe/mergify/bp/version-15-hotfix/pr-45125
fix: update fields on change of item code In `Update Items` of `Sales Order` (backport #45125)
2025-01-28 11:32:18 +05:30
Sanket Shah
f60a3bcedf fix: update fields on change of item code In Update Items of Sales Order (#45125)
* fix: update fields on change of item code

* fix: minor update

* fix: set the new values always

* Revert "fix: set the new values always"

This reverts commit 44daa0a641.

---------

Co-authored-by: Sanket322 <shahsanket322003.com>
Co-authored-by: ruthra kumar <ruthra@erpnext.com>
(cherry picked from commit 9933d3c8ff)
2025-01-28 05:58:28 +00:00
Mihir Kandoi
1be19819fb fix: removed field not present in v15 2025-01-28 10:09:31 +05:30
Mihir Kandoi
b59d253d93 fix: import 2 2025-01-27 22:55:33 +05:30
Mihir Kandoi
d74c498efe fix: import 2025-01-27 22:17:13 +05:30
Mihir Kandoi
57f79a2240 fix: merge conflict 2025-01-27 22:01:13 +05:30
Raffael Meyer
fb1ea9524b chore: bump actions/cache to v4 (#45541) 2025-01-27 13:29:51 +01:00
ruthra kumar
8d30b4d14e Merge pull request #45539 from frappe/mergify/bp/version-15-hotfix/pr-45345
fix:  maintain existing discounts in get_pricing_rule_for_item (backport #45345)
2025-01-27 17:35:27 +05:30
Mihir Kandoi
c102e51eb1 fix: logical error in where condition of qb query
(cherry picked from commit 47f8a86003)

# Conflicts:
#	erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json
2025-01-27 12:03:40 +00:00
Mihir Kandoi
d6e0c6c969 refactor: added condition which checks for corrective operation setting
(cherry picked from commit 063a205e5a)
2025-01-27 12:03:39 +00:00
Mihir Kandoi
5c9ac27478 test: Added test for new feature
(cherry picked from commit 4fb48b7f22)
2025-01-27 12:03:39 +00:00
Mihir Kandoi
efc7b9ac56 feat: Add corrective job card operating cost as additional costs in stock entry
(cherry picked from commit 2bf10f68a8)

# Conflicts:
#	erpnext/manufacturing/doctype/job_card/job_card.py
2025-01-27 12:03:38 +00:00
ruthra kumar
2c3e765896 Merge pull request #45534 from frappe/mergify/bp/version-15-hotfix/pr-45302
feat: add company level validation for accounting dimension (backport #45302)
2025-01-27 16:09:32 +05:30
Sanket322
4e347d835e fix: remove applied pricing rule
(cherry picked from commit 50223c6bec)
2025-01-27 10:32:53 +00:00
Sanket322
e73aab0df5 fix: use user defined discount amount or default
(cherry picked from commit e2a32b7257)
2025-01-27 10:32:53 +00:00
ruthra kumar
bcd3351999 refactor(test): update test data 2025-01-27 15:46:39 +05:30
Sugesh393
67e45cf002 chore: update variable names for improved readability
(cherry picked from commit 36bae55299)
2025-01-27 15:18:24 +05:30
Sugesh393
149827562b fix: set company related values
(cherry picked from commit 454067198e)
2025-01-27 15:18:19 +05:30
Sugesh393
fac4e99b0e test: add new unit test for company validation in accounting dimension
(cherry picked from commit c94091d68f)
2025-01-27 09:25:02 +00:00
Sugesh393
8f0d270746 feat: add company level validation for accounting dimension
(cherry picked from commit 60efd3e219)
2025-01-27 09:25:01 +00:00
ruthra kumar
a718737931 Merge pull request #45530 from frappe/mergify/bp/version-15-hotfix/pr-45284
fix: set party_account_currency for pos_invoice returns (backport #45284)
2025-01-27 14:54:11 +05:30
Nabin Hait
b004855e7c Revert "feat(Sales Invoice): allow linking to project without adding timesheets (backport #44295)" (#45531)
Revert "feat(Sales Invoice): allow linking to project without adding timeshee…"

This reverts commit 2c2a25ab16.
2025-01-27 14:31:44 +05:30
Sugesh393
6a382f1430 test: add new unit test to check payments amount of pos_invoice returns
(cherry picked from commit 484ecf2479)
2025-01-27 08:58:58 +00:00
Sugesh393
172fdad244 fix: set party_account_currency for pos_invoice returns
(cherry picked from commit 2af6fca7fa)
2025-01-27 08:58:58 +00:00
mergify[bot]
2c2a25ab16 feat(Sales Invoice): allow linking to project without adding timesheets (backport #44295) (#45528)
feat(Sales Invoice): allow linking to project without adding timesheets (#44295)

* feat(Sales Invoice): allow linking to project without adding timesheets

* test: add timesheet data

(cherry picked from commit 11f65f20a0)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-01-27 14:26:19 +05:30
mergify[bot]
ff46ae5bc1 fix: currency decimal on POS Past Order List (backport #45524) (#45527)
fix: currency decimal on POS Past Order List (#45524)

* fix: currency decimal on POS

* fix: removed precision

(cherry picked from commit 2ac8c92e7f)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-01-27 13:21:40 +05:30
mergify[bot]
692a44816f feat(UX): scroll to required field (backport #44367) (#45433)
feat(UX): scroll to required field (#44367)

(cherry picked from commit 4008ca5ddd)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-01-26 12:14:44 +05:30
rohitwaghchaure
f3b8d6867b Merge pull request #45448 from frappe/mergify/bp/version-15-hotfix/pr-45443
fix: allow to fix negative stock for batch using stock reco (backport #45443)
2025-01-25 15:21:16 +05:30
Rohit Waghchaure
69c5695f6e fix: allow to fix negative stock for batch using stock reco
(cherry picked from commit 2e8cde3378)
2025-01-25 09:34:11 +00:00
mergify[bot]
f9d96726f0 fix: secure bulk transaction (backport #45386) (#45426)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
fix: secure bulk transaction (#45386)
2025-01-24 17:18:50 +01:00
rohitwaghchaure
4aa92572ef Merge pull request #45438 from frappe/mergify/bp/version-15-hotfix/pr-45432
fix: do not check budget during reposting (backport #45432)
2025-01-24 20:09:22 +05:30
rohitwaghchaure
f2b946d325 fix: do not check budget during reposting (#45432)
(cherry picked from commit 53704b98b5)
2025-01-24 12:02:13 +00:00
rohitwaghchaure
13c7fceb91 Merge pull request #45435 from frappe/mergify/bp/version-15-hotfix/pr-45423
fix: precision issue in stock entry (backport #45423)
2025-01-24 17:25:43 +05:30
Rohit Waghchaure
fe5e42d2dc fix: precision issue in stock entry
(cherry picked from commit 9f3b8520fe)
2025-01-24 11:38:02 +00:00
mergify[bot]
7ff7ec7929 fix: validate items against selling settings (backport #45288) (#45431)
fix: validate items against selling settings (#45288)

fix: validate_for_duplicate_items

Co-authored-by: Sanket322 <shahsanket322003.com>
(cherry picked from commit d862e9b771)

Co-authored-by: Sanket Shah <113279972+Sanket322@users.noreply.github.com>
2025-01-24 16:37:36 +05:30
mergify[bot]
ae5ce97fd0 fix: disable load_after_mapping when purchase order created from sales order (backport #45405) (#45429)
fix: disable load_after_mapping when purchase order created from sales order (#45405)

(cherry picked from commit 97acbb3134)

Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com>
2025-01-24 15:23:27 +05:30
mergify[bot]
52fdc7cecd fix(material request): mapping Sales Order Item Delivery Date to Mate… (backport #45227) (#45424)
fix(material request): mapping Sales Order Item Delivery Date to Mate… (#45227)

* fix(material request): mapping Sales Order Item Delivery Date to Material Request Item Required By

as mentioned in https://discuss.frappe.io/t/item-delivery-date-on-sales-order-is-not-transferred-to-material-request-item-required-by-date/140479
fixing
When you create a Material Request directly on the Sales Order via → Create → Material Request, Delivery Date on Sales Order Item is not transferred to Material Request Item Required By date.

* fix(linters): meaningless linters formatting message applied

In order to pass the linters test which I find meaningless as it asks for the comma after the last item in a dictionary data type

* fix(linters): formatting code for linters pass

Linters formatting applied

(cherry picked from commit 42edb9f5b1)

Co-authored-by: Tufan Kaynak <31142607+toofun666@users.noreply.github.com>
2025-01-24 14:46:47 +05:30
mergify[bot]
d9b342f257 fix: remove unnecessary auth from plaid connector (backport #44305) (#45421)
fix: remove unnecessary auth from plaid connector (#44305)

(cherry picked from commit e82911041d)

Co-authored-by: Martin Luessi <mluessi@gmail.com>
2025-01-24 14:18:04 +05:30
mergify[bot]
dec0caeac5 fix: valuation for batch (backport #45335) (#45420)
* fix: valuation for batch

(cherry picked from commit 5088d8576f)

# Conflicts:
#	erpnext/stock/deprecated_serial_batch.py

* fix: version

(cherry picked from commit 8028dd2683)

# Conflicts:
#	.github/workflows/server-tests-mariadb.yml

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

---------

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2025-01-24 13:13:57 +05:30
mergify[bot]
224a92587d fix: resolved pos return setting to default mode of payment instead of user selection (backport #45377) (#45419)
fix: resolved pos return setting to default mode of payment instead of user selection (#45377)

* fix: resolved pos return setting to default mode of payment instead of user selection

* refactor: removed console log statement

* refactor: moved get_payment_data to sales_and_purchase_return.py

(cherry picked from commit 54d234e05d)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-01-24 13:13:15 +05:30
mergify[bot]
aca8d663dd feat: full screen on pos (backport #45404) (#45418)
feat: full screen on pos (#45404)

* feat: full screen on pos

* refactor: variables for label

* fix: refactor and handled button label change

* refactor: rename enable fullscreen label

(cherry picked from commit 78c7c1c631)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-01-24 12:40:25 +05:30
mergify[bot]
6c10393164 fix: use frappe.datetime.str_to_user (backport #45216) (#45417)
fix: use frappe.datetime.str_to_user (#45216)

* fix: default_datetime_format

* fix: add_format_datetime

* fix: update to str_to_user  in point_of_sale/pos_controller.js

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>

* fix: convert_to_str_to_user

* fix: linters

* fix: whitespace

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
(cherry picked from commit cd3f03696e)

Co-authored-by: mahsem <137205921+mahsem@users.noreply.github.com>
2025-01-24 12:19:02 +05:30
mergify[bot]
3eb28bb0e0 fix: set expense_account and cost_center based on company in stock entry (backport #45159) (#45416)
fix: set expense_account and cost_center based on company in stock entry (#45159)

* fix: set expense_account and cost_center based on company in stock entry

* fix: remove is_perpetual_inventory_enabled validation for cost_center

(cherry picked from commit 6ec18fb40d)

Co-authored-by: Sugesh G <73237300+Sugesh393@users.noreply.github.com>
2025-01-24 12:17:08 +05:30
Frappe PR Bot
de09da31bc chore(release): Bumped to Version 15.49.3
## [15.49.3](https://github.com/frappe/erpnext/compare/v15.49.2...v15.49.3) (2025-01-24)

### Bug Fixes

* decorator and merge conflicts ([2f60f23](2f60f235a8))
2025-01-24 05:14:20 +00:00
ruthra kumar
835abfd88e Merge pull request #45406 from frappe/auto-match-fix
fix: Wrong bank_ac_no filter + simplify logic in automatch
2025-01-24 10:43:13 +05:30
ruthra kumar
fd427ad2ef Merge pull request #45413 from frappe/mergify/bp/version-15/pr-44790
refactor: configurable posting date for Exc Gain / Loss journal (backport #44790)
2025-01-24 10:42:58 +05:30
ruthra kumar
2f60f235a8 fix: decorator and merge conflicts 2025-01-24 10:26:02 +05:30
ruthra kumar
1c10e4e92f refactor: support JE posting date in semi-auto reconciilation tool
(cherry picked from commit a71718883e)

# Conflicts:
#	erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json
2025-01-24 04:50:33 +00:00
ruthra kumar
c90d33acc3 test: exc gain/loss posting date based on configuration
(cherry picked from commit 2f3281579a)
2025-01-24 04:50:32 +00:00
ruthra kumar
ccaf0d4b85 refactor: only apply configuration on normal payments
patch to update default value

(cherry picked from commit b2c3da135e)
2025-01-24 04:50:32 +00:00
ruthra kumar
d955986342 refactor: allow reconciliation date for exchange gain / loss
(cherry picked from commit 95af63e305)
2025-01-24 04:50:31 +00:00
ruthra kumar
c127cbac57 refactor: configurable posting date for Exc Gain / Loss journal
(cherry picked from commit 5257413a93)
2025-01-24 04:50:31 +00:00
ruthra kumar
c6bc5f5d7d refactor: configurable posting date for Exc Gain / Loss journal
(cherry picked from commit 3fbd2ca0d9)
2025-01-24 04:50:30 +00:00
ruthra kumar
1522600eb5 Merge pull request #45411 from frappe/mergify/bp/version-15-hotfix/pr-45291
fix: don't update party-type on change of cost center in Journal Entry (backport #45291)
2025-01-24 10:16:53 +05:30
Sanket Shah
fb75180a7d fix: don't update party-type on change of cost center in Journal Entry (#45291)
fix: don't update party-type on change of cost center

Co-authored-by: Sanket322 <shahsanket322003.com>
(cherry picked from commit 19c8708e5e)
2025-01-23 13:04:19 +00:00
mergify[bot]
5d7d3d8c19 fix: add condition to check if item is delivered by supplier in make_purchase_order_for_default_supplier() (backport #45370) (#45410)
fix: add condition to check if item is delivered by supplier in make_purchase_order_for_default_supplier() (#45370)

(cherry picked from commit 69464ab7ff)

Co-authored-by: Shanuka Hewage <89955436+Shanuka-98@users.noreply.github.com>
2025-01-23 18:18:48 +05:30
mergify[bot]
73a21c294c fix: fix creating documents from sales invoice (backport #45346) (#45408)
* fix: fix creating documents from sales invoice (#45346)

Co-authored-by: Meike Nedwidek <nedwidek@kk-software.de>
(cherry picked from commit 1758e125e0)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.js

* fix: resolved conflict

---------

Co-authored-by: meike289 <63092915+meike289@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2025-01-23 18:18:17 +05:30
marination
60feb7cbd4 fix: Wrong bank_ac_no filter + simplify convoluted logic 2025-01-23 13:14:25 +01:00
marination
153e961df7 fix: Use process.extract to get the corresponding party doc name of the result
- rapidfuzz accepts an iterable or a dict. dict input gives the dict key and value in the result
2025-01-23 13:13:12 +01:00
marination
86f4bf6e01 fix: Set right party name in bank transaction
- If party name and docname are different, set the docname in Bank Transaction
2025-01-23 13:12:59 +01:00
ruthra kumar
7fdf2a7d45 Merge pull request #45399 from frappe/mergify/bp/version-15-hotfix/pr-44790
refactor: configurable posting date for Exc Gain / Loss journal (backport #44790)
2025-01-23 17:30:38 +05:30
ruthra kumar
3906e5c33f chore: use correct decorator 2025-01-23 17:05:36 +05:30
ruthra kumar
72581dd0bf Merge pull request #45400 from ruthra-kumar/manual_addition_of_translation
refactor: more translation in bengali
2025-01-23 16:52:16 +05:30
ruthra kumar
10ee6f3e22 chore: resolve conflict 2025-01-23 16:36:55 +05:30
ruthra kumar
db4fe59bca Merge pull request #45398 from frappe/mergify/bp/version-15-hotfix/pr-44950
fix: postal_code_move_and_fixes (backport #44950)
2025-01-23 16:35:05 +05:30
samsul580
495273365b feat(translations): add Bengali translations for signature and client details 2025-01-23 16:31:59 +05:30
ruthra kumar
3c3f092382 refactor: support JE posting date in semi-auto reconciilation tool
(cherry picked from commit a71718883e)

# Conflicts:
#	erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json
2025-01-23 10:59:54 +00:00
ruthra kumar
693687d8a3 test: exc gain/loss posting date based on configuration
(cherry picked from commit 2f3281579a)
2025-01-23 10:59:53 +00:00
ruthra kumar
c070a140f2 refactor: only apply configuration on normal payments
patch to update default value

(cherry picked from commit b2c3da135e)
2025-01-23 10:59:53 +00:00
ruthra kumar
f411bcc8b5 refactor: allow reconciliation date for exchange gain / loss
(cherry picked from commit 95af63e305)
2025-01-23 10:59:52 +00:00
ruthra kumar
763cc18aad refactor: configurable posting date for Exc Gain / Loss journal
(cherry picked from commit 5257413a93)
2025-01-23 10:59:52 +00:00
ruthra kumar
671f728c4a refactor: configurable posting date for Exc Gain / Loss journal
(cherry picked from commit 3fbd2ca0d9)
2025-01-23 10:59:52 +00:00
mahsem
0e088dde36 fix: postal_code_move_and_fixes
(cherry picked from commit 185bbb4c20)
2025-01-23 10:48:01 +00:00
Diptanil Saha
546da29761 chore: quickbooks migrator integration removal (#45393) 2025-01-23 14:17:14 +05:30
Frappe PR Bot
4573408866 chore(release): Bumped to Version 15.49.2
## [15.49.2](https://github.com/frappe/erpnext/compare/v15.49.1...v15.49.2) (2025-01-23)

### Bug Fixes

* batch qty calculation (backport [#45367](https://github.com/frappe/erpnext/issues/45367)) ([#45388](https://github.com/frappe/erpnext/issues/45388)) ([42f7ee9](42f7ee905c))
* JobCardTimeLog' object has no attribute 'remaining_time_in_mins' ([4542a75](4542a759ae))
2025-01-23 08:43:35 +00:00
rohitwaghchaure
94aefcc62d Merge pull request #45397 from frappe/mergify/bp/version-15/pr-45395
fix: JobCardTimeLog' object has no attribute 'remaining_time_in_mins' (backport #45394) (backport #45395)
2025-01-23 14:12:17 +05:30
rohitwaghchaure
9fc1c3550f Merge pull request #45396 from frappe/mergify/bp/version-15/pr-45388
fix: batch qty calculation (backport #45367) (backport #45388)
2025-01-23 14:11:50 +05:30
Rohit Waghchaure
4542a759ae fix: JobCardTimeLog' object has no attribute 'remaining_time_in_mins'
(cherry picked from commit 41dda35db7)
(cherry picked from commit ef15429d98)
2025-01-23 08:11:21 +00:00
mergify[bot]
42f7ee905c fix: batch qty calculation (backport #45367) (#45388)
fix: batch qty calculation

(cherry picked from commit f07a71a882)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
(cherry picked from commit 767529f0ec)
2025-01-23 08:11:20 +00:00
rohitwaghchaure
0eac720182 Merge pull request #45395 from frappe/mergify/bp/version-15-hotfix/pr-45394
fix: JobCardTimeLog' object has no attribute 'remaining_time_in_mins' (backport #45394)
2025-01-23 13:40:16 +05:30
Rohit Waghchaure
ef15429d98 fix: JobCardTimeLog' object has no attribute 'remaining_time_in_mins'
(cherry picked from commit 41dda35db7)
2025-01-23 07:53:24 +00:00
Diptanil Saha
b9b4f6316d feat: pos configuration for print receipt on complete order (#45392) 2025-01-23 13:07:27 +05:30
mergify[bot]
04f5a72e08 perf: optimize DB calls with frappe.get_all (backport #45289) (#45391)
perf: optimize DB calls with frappe.get_all (#45289)

* perf: reduce multiple db queries

* fix: use frappe._dict instread of extra iteration

---------

Co-authored-by: Sanket322 <shahsanket322003.com>
(cherry picked from commit 2a400dd3f8)

Co-authored-by: Sanket Shah <113279972+Sanket322@users.noreply.github.com>
2025-01-23 13:01:12 +05:30
mergify[bot]
412e22fb4e fix: added item_group filter in item_code field in stock balance report (backport #45340) (#45389)
fix: added item_group filter in item_code field in stock balance report (#45340)

* fix: added item_group filter in item_code field in stock balance report

* feat: added filter to not show non stock items

(cherry picked from commit fe43d20545)

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-01-23 11:25:33 +05:30
Frappe PR Bot
89f7834517 chore(release): Bumped to Version 15.49.1
## [15.49.1](https://github.com/frappe/erpnext/compare/v15.49.0...v15.49.1) (2025-01-22)

### Bug Fixes

* Do no query GLs if no PCVs are posted ([5d04501](5d04501454))
2025-01-22 09:18:16 +00:00
Deepesh Garg
da8a712249 Merge pull request #45373 from frappe/mergify/bp/version-15/pr-45371
fix: Do no query GLs if no PCVs are posted (#45371)
2025-01-22 14:46:59 +05:30
Deepesh Garg
5d04501454 fix: Do no query GLs if no PCVs are posted
(cherry picked from commit f4d1a54588)
2025-01-22 09:15:09 +00:00
Frappe PR Bot
b9fcc786fa chore(release): Bumped to Version 15.49.0
# [15.49.0](https://github.com/frappe/erpnext/compare/v15.48.4...v15.49.0) (2025-01-22)

### Bug Fixes

* Ambiguous column error while creating Sales Return ([#45275](https://github.com/frappe/erpnext/issues/45275)) ([842d72f](842d72f7c4))
* apply ruff formatter changes ([8e33d93](8e33d93273))
* calculate AED exchange rate based on pegged value with USD ([05e4255](05e42558d1))
* check if tds deducted based on Purchase Taxes and Charges ([#45161](https://github.com/frappe/erpnext/issues/45161)) ([ade8799](ade8799358))
* check if tds deducted based on Purchase Taxes and Charges (backport [#45161](https://github.com/frappe/erpnext/issues/45161)) ([#45277](https://github.com/frappe/erpnext/issues/45277)) ([3abca03](3abca03fc1))
* company in quality inspection ([c0cf1fe](c0cf1fed00))
* conflict ([bdaf376](bdaf3761c0))
* do not reset picked items ([fd83b52](fd83b52513))
* Does not allow to create Sub-Asseblies of Sub Assemblies ([d3c9092](d3c9092266))
* ensure multiple PCVs in same fiscal year are considered in patch ([fcd914c](fcd914cfa0))
* fetching items from blanket order to sales/purchase order ([#45262](https://github.com/frappe/erpnext/issues/45262)) ([7fc19e1](7fc19e19be))
* fixed typo in manufacturing settings and field rename ([#45238](https://github.com/frappe/erpnext/issues/45238)) ([7641627](7641627b71))
* getting scrap items from sub assemblies by fetching scrap items for parent BOM ([da7b691](da7b69109a))
* ignore crm deal in tax_rule search filter (backport [#45134](https://github.com/frappe/erpnext/issues/45134)) ([#45138](https://github.com/frappe/erpnext/issues/45138)) ([afab5be](afab5be63f))
* include pos invoice in modifing key for returned item validation ([70ed8b7](70ed8b78d2))
* linters ([61303db](61303db16d))
* precision on work order total qty ([#45341](https://github.com/frappe/erpnext/issues/45341)) ([5346820](53468202de))
* **Project:** re-phrase welcome email ([#45175](https://github.com/frappe/erpnext/issues/45175)) ([c94430a](c94430a472))
* round off tax withholding amount ([#45271](https://github.com/frappe/erpnext/issues/45271)) ([3c10d80](3c10d809b0))
* sales return for multi-uom ([#45303](https://github.com/frappe/erpnext/issues/45303)) ([e965b6e](e965b6ef45))
* set invoice start date to subscription start date (backport [#45342](https://github.com/frappe/erpnext/issues/45342)) ([#45343](https://github.com/frappe/erpnext/issues/45343)) ([7045c2c](7045c2cc3d))
* status of the serial no for the raw materials ([d956051](d956051e69))
* translation fixes ([e4f09ce](e4f09ce543))
* updated modified timestamp for stock entry type (backport [#45280](https://github.com/frappe/erpnext/issues/45280)) ([#45315](https://github.com/frappe/erpnext/issues/45315)) ([96a3a45](96a3a45078))
* use currency defined in plan for subscription invoice ([#45104](https://github.com/frappe/erpnext/issues/45104)) ([a27eac1](a27eac1ef6))
* use currency defined in plan for subscription invoice (backport [#45104](https://github.com/frappe/erpnext/issues/45104)) ([#45273](https://github.com/frappe/erpnext/issues/45273)) ([2c46be4](2c46be4cfb))
* validate linked sales person ([85910ec](85910ec2f9))

### Features

* add option to update modified on communication recieved (backport [#45307](https://github.com/frappe/erpnext/issues/45307)) ([#45310](https://github.com/frappe/erpnext/issues/45310)) ([bf8d6ae](bf8d6ae6bf))
* add Syscohada charts of accounts ([2667649](26676491e5))
* Added valuation of quantity for each age group in stock ageing … (backport [#45076](https://github.com/frappe/erpnext/issues/45076)) ([#45208](https://github.com/frappe/erpnext/issues/45208)) ([dd58e4c](dd58e4cb53))

### Performance Improvements

* Ignore is_opening column in GL Queries ([#45327](https://github.com/frappe/erpnext/issues/45327)) ([b7de26d](b7de26d123))

### Reverts

* avoid change to translatable string ([93e3847](93e3847e36))
2025-01-22 03:32:58 +00:00
ruthra kumar
15da04d7de Merge pull request #45357 from frappe/version-15-hotfix
chore: release v15
2025-01-22 09:01:34 +05:30
Frappe PR Bot
d1fee96f75 chore(release): Bumped to Version 15.48.4
## [15.48.4](https://github.com/frappe/erpnext/compare/v15.48.3...v15.48.4) (2025-01-15)

### Bug Fixes

* auto fetch batch and serial no for draft stock transactions ([2f2554e](2f2554e9e5))
* batch number search on pos ([#45209](https://github.com/frappe/erpnext/issues/45209)) ([fe5c458](fe5c458c45))
* change string to be able to translate ([#45090](https://github.com/frappe/erpnext/issues/45090)) ([7a3687c](7a3687ca8e))
* deduct tds on excess amount if checked ([07c3605](07c3605905))
* delivery_document_no column issue ([0df1808](0df18080c7))
* do not add ordered items from Quotation to new Sales Order ([f414fa4](f414fa4981))
* don't create invoice if invoice start date is in future ([3f6d774](3f6d7741d9))
* incorrect label in Item-wise sales register ([36d1fbd](36d1fbd6a3))
* incorrect valuation for sales return with different warhouse ([9ee5651](9ee5651848))
* incorrect valuation rate for PI based revaluation ([f7e3854](f7e3854641))
* linter issue ([af21bca](af21bca231))
* minor update for readability ([abfcfdf](abfcfdfe7e))
* not able to see create Quality Inspection button ([a79cae1](a79cae1fef))
* pass right existing address ([80e6112](80e6112549))
* precision loss causing process loss variance ([d84601b](d84601b2a3))
* Semgrep rules ([1d5a73a](1d5a73a325))
* set billing and shipping address on change of company ([42eb88f](42eb88f5f6))
* Skip WIP Warehouse transfer ([bb0695a](bb0695a883))
* test case ([f5667f5](f5667f56e4))
* test case ([7d66e4e](7d66e4efb0))
* tests ([8ba42cf](8ba42cfbf0))
* timeout error for work order ([122b966](122b966a7b))
* **Timesheet:** ignore permissions when updating Task and Project (backport [#45168](https://github.com/frappe/erpnext/issues/45168)) ([#45170](https://github.com/frappe/erpnext/issues/45170)) ([f7448c6](f7448c6f79))
* typo in manufacturing settings (backport [#45190](https://github.com/frappe/erpnext/issues/45190)) ([#45193](https://github.com/frappe/erpnext/issues/45193)) ([47c6e5a](47c6e5a931))
* update  discounting on mixed conditions ([38cb5a9](38cb5a98bf))
2025-01-15 12:28:46 +00:00
rohitwaghchaure
5e13dcfe55 Merge pull request #45263 from frappe/version-15-hotfix
chore: release v15
2025-01-15 17:57:26 +05:30
Frappe PR Bot
74650217c1 chore(release): Bumped to Version 15.48.3
## [15.48.3](https://github.com/frappe/erpnext/compare/v15.48.2...v15.48.3) (2025-01-13)

### Bug Fixes

* delivery_document_no column issue ([47a622d](47a622d0cb))
* incorrect valuation rate for PI based revaluation ([23b846e](23b846ef39))
* test case ([b75c736](b75c7364d6))
2025-01-13 08:20:40 +00:00
rohitwaghchaure
47ab3c5dbe Merge pull request #45235 from frappe/mergify/bp/version-15/pr-45218
fix: incorrect valuation rate for PI based revaluation (backport #45207) (backport #45218)
2025-01-13 13:49:25 +05:30
rohitwaghchaure
b6f5208e29 Merge pull request #45236 from frappe/mergify/bp/version-15/pr-45217
fix: delivery_document_no column issue (backport #45214) (backport #45217)
2025-01-13 13:49:11 +05:30
Rohit Waghchaure
b75c7364d6 fix: test case
(cherry picked from commit 7d66e4efb0)
2025-01-13 06:56:46 +00:00
rohitwaghchaure
85c2d32de6 chore: fix conflicts
(cherry picked from commit bb170c024f)
2025-01-13 06:56:46 +00:00
rohitwaghchaure
120bccdad3 chore: fix conflicts
(cherry picked from commit 9426a32184)
2025-01-13 06:56:45 +00:00
Rohit Waghchaure
47a622d0cb fix: delivery_document_no column issue
(cherry picked from commit 61efb2bb39)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.py
#	erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py
(cherry picked from commit 0df18080c7)
2025-01-13 06:56:45 +00:00
Rohit Waghchaure
23b846ef39 fix: incorrect valuation rate for PI based revaluation
(cherry picked from commit 14ce2337df)
(cherry picked from commit f7e3854641)
2025-01-13 06:56:40 +00:00
Frappe PR Bot
625ff4b276 chore(release): Bumped to Version 15.48.2
## [15.48.2](https://github.com/frappe/erpnext/compare/v15.48.1...v15.48.2) (2025-01-10)

### Bug Fixes

* precision loss causing process loss variance ([ac18c56](ac18c56a0b))
* timeout error for work order ([d6614f2](d6614f2848))
2025-01-10 06:31:50 +00:00
rohitwaghchaure
da11589b74 Merge pull request #45203 from frappe/mergify/bp/version-15/pr-45197
fix: precision loss causing process loss variance (backport #45197)
2025-01-10 12:00:25 +05:30
rohitwaghchaure
7344e46717 Merge pull request #45205 from frappe/mergify/bp/version-15/pr-45179
fix: timeout error for work order (backport #45177) (backport #45179)
2025-01-10 11:59:50 +05:30
Rohit Waghchaure
d6614f2848 fix: timeout error for work order
(cherry picked from commit b4ceda6f2c)
(cherry picked from commit 122b966a7b)
2025-01-10 06:10:09 +00:00
FATHIH MOHAMMED
ac18c56a0b fix: precision loss causing process loss variance
(cherry picked from commit d84601b2a3)
2025-01-10 05:49:26 +00:00
Frappe PR Bot
246f4373b5 chore(release): Bumped to Version 15.48.1
## [15.48.1](https://github.com/frappe/erpnext/compare/v15.48.0...v15.48.1) (2025-01-09)

### Bug Fixes

* not able to see create Quality Inspection button ([5d7a3b5](5d7a3b5979))
2025-01-09 09:31:15 +00:00
rohitwaghchaure
430c4825c0 Merge pull request #45187 from frappe/mergify/bp/version-15/pr-45184
fix: not able to see create Quality Inspection button (backport #45183) (backport #45184)
2025-01-09 14:59:54 +05:30
Rohit Waghchaure
5d7a3b5979 fix: not able to see create Quality Inspection button
(cherry picked from commit b291835ccd)
(cherry picked from commit a79cae1fef)
2025-01-09 09:21:29 +00:00
Frappe PR Bot
6a869139a6 chore(release): Bumped to Version 15.48.0
# [15.48.0](https://github.com/frappe/erpnext/compare/v15.47.5...v15.48.0) (2025-01-08)

### Bug Fixes

* add monthly distributation and write query in qb ([03b06fc](03b06fc3ff))
* Alternative Item button dissapearing on Save event ([642b897](642b89782d))
* Alternative Items button in Work Order ([3194807](3194807a41))
* Bank Reconciliation Statement Report Company Filter ([622bfa6](622bfa6633))
* consider expired batches in stock reco ([c924feb](c924feb0d0))
* discount resetting on date change ([af53381](af53381163)), closes [#44989](https://github.com/frappe/erpnext/issues/44989)
* Hold_to_On_Hold ([9ecafdc](9ecafdc680))
* ignore currency validation while canceling the voucher ([8874f4a](8874f4a9e4))
* ignore party account validation while canceling the voucher ([0f1c6ff](0f1c6ff1c9))
* invoice against purchase receipt with returned quantity ([9daabfc](9daabfca8a))
* issue in returning components against the SCO ([87405f0](87405f0753))
* load price list rate for pos search term ([452dffa](452dffab48))
* load search term price with customer default price list ([59af144](59af144e29))
* Missing company filter breaks `get_account_balance` in Bank Reco ([931b516](931b5166a8))
* Override pre-commit behaviour due to conflicts with CI ([754845a](754845a935))
* **Project:** make status in confirmation dialog translatable ([#45118](https://github.com/frappe/erpnext/issues/45118)) ([0001d86](0001d868c7))
* removed unmerged patches ([4227d76](4227d76f08))
* resolved conflicts ([e9be858](e9be8583b0))
* resolved conflicts ([7318748](7318748a4c))
* Returned Qty in Work Order Consumed Materials report ([f7b501b](f7b501b29b))
* serial and batch no. buttons on pos ([#45048](https://github.com/frappe/erpnext/issues/45048)) ([54e3a74](54e3a74936))
* show new button in coa if create access ([89155f5](89155f529e))
* update customer contact details on pos (backport [#45071](https://github.com/frappe/erpnext/issues/45071)) ([#45106](https://github.com/frappe/erpnext/issues/45106)) ([01254da](01254da4e0))

### Features

* validate discount date in payment schedule (backport [#44646](https://github.com/frappe/erpnext/issues/44646)) ([#44727](https://github.com/frappe/erpnext/issues/44727)) ([500deff](500deff3e9))
* work in progress status for asset ([#45066](https://github.com/frappe/erpnext/issues/45066)) ([1ea36bb](1ea36bba88))
2025-01-08 10:29:45 +00:00
ruthra kumar
e240ff4f6c Merge pull request #45131 from frappe/version-15-hotfix
chore: release v15
2025-01-08 15:58:27 +05:30
Frappe PR Bot
08e58e13ac chore(release): Bumped to Version 15.47.5
## [15.47.5](https://github.com/frappe/erpnext/compare/v15.47.4...v15.47.5) (2025-01-06)

### Bug Fixes

* ignore currency validation while canceling the voucher ([8076942](807694206b))
* ignore party account validation while canceling the voucher ([bc0be5a](bc0be5a00a))
2025-01-06 04:42:56 +00:00
ruthra kumar
c513c7f73d Merge pull request #45094 from frappe/mergify/bp/version-15/pr-45051
fix: ignore currency validation while canceling the voucher (backport #45051)
2025-01-06 10:11:41 +05:30
venkat102
bc0be5a00a fix: ignore party account validation while canceling the voucher
(cherry picked from commit 49885f8eae)
2025-01-06 02:59:36 +00:00
venkat102
807694206b fix: ignore currency validation while canceling the voucher
(cherry picked from commit 15d488b9aa)
2025-01-06 02:59:35 +00:00
Frappe PR Bot
c3d1e122be chore(release): Bumped to Version 15.47.4
## [15.47.4](https://github.com/frappe/erpnext/compare/v15.47.3...v15.47.4) (2025-01-03)

### Bug Fixes

* Added patch and fallback code to prevent future issues similiar to helpdesk ticket 28246 ([ab87265](ab87265395))
* Added patch and fallback code to prevent future issues similiar to helpdesk ticket 28246 ([66544bf](66544bfa10))
* BOM cost update issue ([00102a1](00102a15e3))
* Fixed logic in if condition causing tests to fail ([b3b8083](b3b808335f))
* Removed patch as instructed by mentor ([3049027](3049027f43))
* Removed patch as instructed by mentor ([163af91](163af91c37))
* removed unknown patch? ([f9d038e](f9d038ee4a))
* removed unused code ([d31b0a5](d31b0a507f))
* slow stock transactions (backport [#45025](https://github.com/frappe/erpnext/issues/45025)) ([#45027](https://github.com/frappe/erpnext/issues/45027)) ([85ba96e](85ba96e0f3))
* **style:** set image width in BOM ([6247d5a](6247d5aadb))
* validate components and their qty as per BOM in the stock entry ([b5f6926](b5f6926140))
2025-01-03 01:24:44 +00:00
ruthra kumar
d5fed84182 Merge pull request #45063 from frappe/version-15-hotfix
chore: release v15
2025-01-03 06:53:23 +05:30
ruthra kumar
7f96aee06f Merge pull request #45060 from frappe/mergify/bp/version-15/pr-45056
chore: partial revert #44989 (backport #45056)
2025-01-02 21:10:08 +05:30
ruthra kumar
a5a219cd6e chore: partial revert #44989
(cherry picked from commit 63d547fb4a)
2025-01-02 15:29:55 +00:00
Frappe PR Bot
005df08656 chore(release): Bumped to Version 15.47.3
## [15.47.3](https://github.com/frappe/erpnext/compare/v15.47.2...v15.47.3) (2025-01-01)

### Bug Fixes

* slow stock transactions (backport [#45025](https://github.com/frappe/erpnext/issues/45025)) ([#45027](https://github.com/frappe/erpnext/issues/45027)) ([bb75adb](bb75adb59c))
2025-01-01 10:00:40 +00:00
rohitwaghchaure
059cb6d8b3 Merge pull request #45028 from frappe/mergify/bp/version-15/pr-45027
fix: slow stock transactions (backport #45025) (backport #45027)
2025-01-01 15:29:24 +05:30
mergify[bot]
bb75adb59c fix: slow stock transactions (backport #45025) (#45027)
fix: slow stock transactions (#45025)

(cherry picked from commit e92af10f14)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
(cherry picked from commit 85ba96e0f3)
2025-01-01 09:42:01 +00:00
Frappe PR Bot
3a5959e023 chore(release): Bumped to Version 15.47.2
## [15.47.2](https://github.com/frappe/erpnext/compare/v15.47.1...v15.47.2) (2025-01-01)

### Bug Fixes

* add company filter to project ([d550b43](d550b433c1))
* allow zero valuation rate (backport [#44902](https://github.com/frappe/erpnext/issues/44902)) ([#44910](https://github.com/frappe/erpnext/issues/44910)) ([9060e4c](9060e4ce57))
* apply apply_pricing_rule date change ([f09acc7](f09acc784f))
* apply discount on qty change ([c19725c](c19725ca74))
* clear payment schedule in purchase invoice for is_paid ([6cc7060](6cc70605fa))
* copy accounting dimensions to asset and sales invoice ([#44964](https://github.com/frappe/erpnext/issues/44964)) ([839ffb3](839ffb3f2a))
* duplicate validate for closing stock balance ([#45015](https://github.com/frappe/erpnext/issues/45015)) ([8d650e5](8d650e56ba))
* failing tests fixed ([61367ee](61367ee1ed))
* fetch advance payment entries on pos invoice (backport [#44856](https://github.com/frappe/erpnext/issues/44856)) ([#44931](https://github.com/frappe/erpnext/issues/44931)) ([cc827c8](cc827c8077))
* fetch amount in company  currency ([b135a68](b135a684a5))
* get item tax template based on posting date ([2feeebb](2feeebb5fb))
* ignore duplicate while creating default templates ([6c206c1](6c206c1cb3))
* ignore inventory dimension for SABB and Pick List (backport [#44933](https://github.com/frappe/erpnext/issues/44933)) ([#44941](https://github.com/frappe/erpnext/issues/44941)) ([772b7b9](772b7b95ac))
* ignore validate while making WO from MR (backport [#44939](https://github.com/frappe/erpnext/issues/44939)) ([#44942](https://github.com/frappe/erpnext/issues/44942)) ([c33e075](c33e07550c))
* in_contex_translation_fixes ([1353a14](1353a14a6b))
* include company in filter condition ([7422043](74220430e5))
* incorrect filter for BOM (backport [#44954](https://github.com/frappe/erpnext/issues/44954)) ([#44956](https://github.com/frappe/erpnext/issues/44956)) ([9853bd9](9853bd9ba1))
* incorrect quality inspection linked in purchase receipt (backport [#44985](https://github.com/frappe/erpnext/issues/44985)) ([#45020](https://github.com/frappe/erpnext/issues/45020)) ([0a2cc6b](0a2cc6bcd7))
* limit discount value to 100 in pos cart (backport [#44916](https://github.com/frappe/erpnext/issues/44916)) ([#44932](https://github.com/frappe/erpnext/issues/44932)) ([28442f3](28442f3414))
* load customer default price list in pos during item selection (backport [#44991](https://github.com/frappe/erpnext/issues/44991)) ([#44993](https://github.com/frappe/erpnext/issues/44993)) ([20efe7b](20efe7bb80))
* material request status (backport [#44917](https://github.com/frappe/erpnext/issues/44917)) ([#44918](https://github.com/frappe/erpnext/issues/44918)) ([042d12b](042d12b2c1))
* move code from purchase invoice to buying controller ([98631eb](98631eb266))
* negative stock balance (backport [#44990](https://github.com/frappe/erpnext/issues/44990)) ([#44996](https://github.com/frappe/erpnext/issues/44996)) ([6f71389](6f7138996a))
* not able to make purchase receipt from SCR (backport [#44919](https://github.com/frappe/erpnext/issues/44919)) ([#44925](https://github.com/frappe/erpnext/issues/44925)) ([c241262](c241262266))
* pos payment using non-default mode of payment (backport [#44920](https://github.com/frappe/erpnext/issues/44920)) ([#44971](https://github.com/frappe/erpnext/issues/44971)) ([7dd2b0c](7dd2b0c189)), closes [#41108](https://github.com/frappe/erpnext/issues/41108)
* precision issue (backport [#45013](https://github.com/frappe/erpnext/issues/45013)) ([#45019](https://github.com/frappe/erpnext/issues/45019)) ([52bdf5b](52bdf5b170))
* refactor query in get_total_allocated_amount in bank_transaction ([944dc96](944dc966bc))
* relabel rate to tax rate ([991a336](991a3366a8))
* remove unused variable ([b892282](b8922823a3))
* **report:** Purchase Order Analysis pymysql.err (backport [#44957](https://github.com/frappe/erpnext/issues/44957)) ([#44994](https://github.com/frappe/erpnext/issues/44994)) ([ea4b6e8](ea4b6e8dd7))
* resolved conflicts ([00ae829](00ae829d89))
* set paid amount in party currency in bank reco payment entry ([6703a45](6703a457fe))
* set/update billing address on change of company ([cfa432d](cfa432dbca))
* Show order tax amount in customer currency on the portal (backport [#44915](https://github.com/frappe/erpnext/issues/44915)) ([#44923](https://github.com/frappe/erpnext/issues/44923)) ([5cc9e10](5cc9e10923))
* SQL syntax error in Purchase Receipt query for empty filters ([#44636](https://github.com/frappe/erpnext/issues/44636)) ([2f279a6](2f279a6eb4))
* strings for translation (backport [#44816](https://github.com/frappe/erpnext/issues/44816)) ([#44927](https://github.com/frappe/erpnext/issues/44927)) ([488d808](488d8080c8))
* update item_tax_rate in backend ([8885b07](8885b07114))
* use meta to check field instead of doctype ([e582ff8](e582ff862e))
* Validate party on non receivable / payable account (backport [#44883](https://github.com/frappe/erpnext/issues/44883)) ([#44973](https://github.com/frappe/erpnext/issues/44973)) ([d6903fb](d6903fbc8d))
* whitespace ([2efc701](2efc701e4e))
2025-01-01 08:37:05 +00:00
ruthra kumar
140b62a1e3 Merge pull request #45005 from frappe/version-15-hotfix
chore: release v15
2025-01-01 14:05:41 +05:30
Frappe PR Bot
f25d65ecc4 chore(release): Bumped to Version 15.47.1
## [15.47.1](https://github.com/frappe/erpnext/compare/v15.47.0...v15.47.1) (2024-12-26)

### Bug Fixes

* allow zero valuation rate (backport [#44902](https://github.com/frappe/erpnext/issues/44902)) (backport [#44910](https://github.com/frappe/erpnext/issues/44910)) ([#44913](https://github.com/frappe/erpnext/issues/44913)) ([763951a](763951af27))
2024-12-26 06:02:20 +00:00
mergify[bot]
763951af27 fix: allow zero valuation rate (backport #44902) (backport #44910) (#44913)
fix: allow zero valuation rate (backport #44902) (#44910)

fix: allow zero valuation rate (#44902)

(cherry picked from commit 614a8f106d)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
(cherry picked from commit 9060e4ce57)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-12-26 11:30:55 +05:30
Frappe PR Bot
139a56b8a4 chore(release): Bumped to Version 15.47.0
# [15.47.0](https://github.com/frappe/erpnext/compare/v15.46.2...v15.47.0) (2024-12-25)

### Bug Fixes

* 'str' object has no attribute 'get_sql' ([8b810f5](8b810f5fb8))
* add `Stock UOM` when adding new item in POS list ([#44780](https://github.com/frappe/erpnext/issues/44780)) ([96cc9e2](96cc9e29a1))
* Add hooks for repost allowed doctypes ([b5596d9](b5596d98e3))
* added docs.frappe.io in documentation_url ([#44776](https://github.com/frappe/erpnext/issues/44776)) ([0fd7792](0fd7792f49))
* asset field precision check ([516a325](516a325a31))
* avg. buying amount for product bundle item with serial and batch no in gross profit report ([2edb6f3](2edb6f3224))
* better indicator base amount for Tax Witholding in Journal Entry ([218e777](218e777423))
* buying rate for service item in gross profit report ([a55aaea](a55aaea5a1))
* closing stock balance permissions (backport [#44791](https://github.com/frappe/erpnext/issues/44791)) ([#44793](https://github.com/frappe/erpnext/issues/44793)) ([cdeec8d](cdeec8d24c))
* correct args for get_advance_payment_entries_for_regional ([875797e](875797e655))
* correct tds rate with lower deduction certificate ([5ca60f3](5ca60f3e0a))
* do not set cost_center update_voucher_balance as it is set in init_voucher_balance ([19a8ea2](19a8ea217e))
* do not validate qc for scrap item (backport [#44844](https://github.com/frappe/erpnext/issues/44844)) ([#44853](https://github.com/frappe/erpnext/issues/44853)) ([8092d58](8092d58d9c))
* Duplicate entry ' EF1DE8B2E1B6' for key 'PRIMARY' (backport [#44809](https://github.com/frappe/erpnext/issues/44809)) ([#44814](https://github.com/frappe/erpnext/issues/44814)) ([16b013f](16b013fab2))
* fetch tax withholding category from the voucher ([8f8dd1c](8f8dd1c088))
* incoming rate should be zero for rejected items (backport [#44857](https://github.com/frappe/erpnext/issues/44857)) ([#44859](https://github.com/frappe/erpnext/issues/44859)) ([0969877](0969877cd7))
* incorrect Material Transferred for Manufacturing qty (backport [#44823](https://github.com/frappe/erpnext/issues/44823)) ([#44832](https://github.com/frappe/erpnext/issues/44832)) ([497029f](497029f958))
* Ledger repost support for extending app doctypes ([d137f78](d137f780bd))
* Paid + Write Off Amount issue in Sales Invoice (backport [#44763](https://github.com/frappe/erpnext/issues/44763)) ([#44874](https://github.com/frappe/erpnext/issues/44874)) ([ca7c229](ca7c229e86))
* permissions for marking Quotation as lost ([e6390bf](e6390bfba1))
* POS Closing entry issue (backport [#44772](https://github.com/frappe/erpnext/issues/44772)) ([#44781](https://github.com/frappe/erpnext/issues/44781)) ([2032422](20324224d3))
* posting_time issue ([#44870](https://github.com/frappe/erpnext/issues/44870)) ([7a5c30f](7a5c30fe9b))
* Remove typo ([13a3c81](13a3c816d7))
* set project in GL from the SLE (backport [#44879](https://github.com/frappe/erpnext/issues/44879)) ([#44885](https://github.com/frappe/erpnext/issues/44885)) ([57e6ed4](57e6ed4645))
* show profit and loss after period closing ([771632a](771632a5e2))
* slow posting datetime update (backport [#44799](https://github.com/frappe/erpnext/issues/44799)) ([#44805](https://github.com/frappe/erpnext/issues/44805)) ([ad57e33](ad57e33cd7))
* stock entry not fetching expired batches (backport [#44863](https://github.com/frappe/erpnext/issues/44863)) ([#44868](https://github.com/frappe/erpnext/issues/44868)) ([d6001e5](d6001e5ef9))
* Stock Entry uses incorrect company when generated from Pick List ([#44679](https://github.com/frappe/erpnext/issues/44679)) ([58e8467](58e846709e))
* Swedish tax templates ([cc1834b](cc1834b0cc))
* test case correction ([ddfead2](ddfead2cde))
* typerror on TDS payable monthly report (backport [#37707](https://github.com/frappe/erpnext/issues/37707)) ([db9a319](db9a319104))
* update correct cost center in Accounts Receivable Report ([4c5540a](4c5540aef9))
* update query ([3ab4acf](3ab4acfafa))
* use utility method to generate url ([75aee42](75aee42635))
* **ux:** purchase invoice link in error message ([#44797](https://github.com/frappe/erpnext/issues/44797)) ([01c1ed9](01c1ed98ac))
* Warehouse wise Stock Value chart roles (backport [#44865](https://github.com/frappe/erpnext/issues/44865)) ([#44867](https://github.com/frappe/erpnext/issues/44867)) ([f32cf84](f32cf84413))

### Features

* add difference_posting_date field ([bec1f97](bec1f972b3))
* **subcontracting:** Added provision to create multiple Subcontracting Orders against a single Purchase Order (backport [#44711](https://github.com/frappe/erpnext/issues/44711)) ([#44782](https://github.com/frappe/erpnext/issues/44782)) ([8f81172](8f811728d9))
* swedish COA ([98cc79d](98cc79d942))
* use difference_posting_date for journal entry posting_date ([7498cdf](7498cdf644))

### Performance Improvements

* SABB (backport [#44764](https://github.com/frappe/erpnext/issues/44764)) ([#44789](https://github.com/frappe/erpnext/issues/44789)) ([b706a82](b706a8274f))
* slow query related to stock ledger entry (backport [#44861](https://github.com/frappe/erpnext/issues/44861)) ([#44862](https://github.com/frappe/erpnext/issues/44862)) ([3f3df7e](3f3df7ef2a))
2024-12-25 03:36:34 +00:00
ruthra kumar
b718ca4489 Merge pull request #44887 from frappe/version-15-hotfix
chore: release v15
2024-12-25 09:05:15 +05:30
Frappe PR Bot
1900cebf52 chore(release): Bumped to Version 15.46.2
## [15.46.2](https://github.com/frappe/erpnext/compare/v15.46.1...v15.46.2) (2024-12-23)

### Bug Fixes

* Add hooks for repost allowed doctypes ([640c13a](640c13a5f3))
* Ledger repost support for extending app doctypes ([a79d294](a79d2946a1))
2024-12-23 06:17:04 +00:00
ruthra kumar
f7d860daf1 Merge pull request #44835 from frappe/mergify/bp/version-15/pr-44825
fix: Ledger repost support for extending app doctypes (backport #44825)
2024-12-23 11:45:49 +05:30
Deepesh Garg
640c13a5f3 fix: Add hooks for repost allowed doctypes
(cherry picked from commit 919abd2c03)
2024-12-23 05:57:55 +00:00
Deepesh Garg
a79d2946a1 fix: Ledger repost support for extending app doctypes
(cherry picked from commit ed231abb54)
2024-12-23 05:57:54 +00:00
Frappe PR Bot
9aed428939 chore(release): Bumped to Version 15.46.1
## [15.46.1](https://github.com/frappe/erpnext/compare/v15.46.0...v15.46.1) (2024-12-18)

### Bug Fixes

* 'str' object has no attribute 'get_sql' ([8eb8cc5](8eb8cc5d3c))
2024-12-18 09:10:34 +00:00
ruthra kumar
cd497743f4 Merge pull request #44767 from frappe/mergify/bp/version-15/pr-44765
fix: 'str' object has no attribute 'get_sql' (backport #44765)
2024-12-18 14:39:16 +05:30
ljain112
8eb8cc5d3c fix: 'str' object has no attribute 'get_sql'
(cherry picked from commit 9a43acb65c)
2024-12-18 08:43:16 +00:00
Frappe PR Bot
375b48699f chore(release): Bumped to Version 15.46.0
# [15.46.0](https://github.com/frappe/erpnext/compare/v15.45.5...v15.46.0) (2024-12-18)

### Bug Fixes

* add doc.status to translation from POS ([0ba6e60](0ba6e60608))
* allow all dispatch address for drop ship invoice ([db3a87c](db3a87c837))
* broken CI ([78d7d71](78d7d7148f))
* delink SABB from cancelled SLEs (backport [#44691](https://github.com/frappe/erpnext/issues/44691)) ([#44719](https://github.com/frappe/erpnext/issues/44719)) ([8940747](8940747161))
* duplicate Use Multi-Level BOM checkbox ([#44757](https://github.com/frappe/erpnext/issues/44757)) ([3ac801c](3ac801c884))
* handle zero salvage value case ([632a45d](632a45d82e))
* make rate of depreciation mandatory ([ed42ed0](ed42ed04d2))
* pos invoice return reference missing (backport [#44720](https://github.com/frappe/erpnext/issues/44720)) ([#44729](https://github.com/frappe/erpnext/issues/44729)) ([8aec131](8aec13115c))
* purchase return entry issue (backport [#44721](https://github.com/frappe/erpnext/issues/44721)) ([#44737](https://github.com/frappe/erpnext/issues/44737)) ([8ba7424](8ba7424996))
* remove invalid filter in Account Receivable report ([fdfbb57](fdfbb57779))
* set company bank account if default account not set in mode of payment ([a8f7393](a8f7393706))
* switched asset terminology from cost to value ([47c7356](47c7356b38))
* unsupported operand type (backport [#44722](https://github.com/frappe/erpnext/issues/44722)) ([#44723](https://github.com/frappe/erpnext/issues/44723)) ([158a480](158a4803ca))
* update cc_to multiselect in process statement of accounts ([df9bc33](df9bc33f34))
* update discount when pricing rule is changed ([f1a5000](f1a5000872))
* User permissions in financial statements ([83aeb2e](83aeb2e475))
* using query.walk() for escaping ([40a8ed8](40a8ed8571))
* Wrong allocated_amount for sales_team in gross_profit report ([#42989](https://github.com/frappe/erpnext/issues/42989)) ([328b9e7](328b9e7d9e))

### Features

* change type link to multiselect ([7665eac](7665eac277))
2024-12-18 05:32:46 +00:00
ruthra kumar
bc601f36c9 Merge pull request #44741 from frappe/version-15-hotfix
chore: release v15
2024-12-18 11:01:28 +05:30
Frappe PR Bot
6e01a9b84d chore(release): Bumped to Version 15.45.5
## [15.45.5](https://github.com/frappe/erpnext/compare/v15.45.4...v15.45.5) (2024-12-12)

### Bug Fixes

* 'Use Multi-Level BOM' checkbox default value (backport [#44618](https://github.com/frappe/erpnext/issues/44618)) ([#44620](https://github.com/frappe/erpnext/issues/44620)) ([5cd3994](5cd39941ee))
* add docstatus for translation ([47e1ed1](47e1ed1eff))
* add label strings for translation in pos_controller.js ([ffdd7cf](ffdd7cfa86))
* add labels for translation in production_analytics.py ([7a6cb0f](7a6cb0f157))
* add labels for translation in purchase_order_analysis.py ([f06827c](f06827c6fb))
* add labels for translation in quality_inspection_summary.py ([dd3a747](dd3a747af4))
* add labels for translation in sales_order_analysis.py ([6980d1e](6980d1e142))
* add labels for translation in sales_order.js ([283043e](283043eba7))
* add string for translation in delayed_tasks_summary.py ([43fc8bf](43fc8bf74e))
* add strings for translation in pos_item_cart.js ([71d8dfb](71d8dfb401))
* add strings for translation in timesheet.js ([#44496](https://github.com/frappe/erpnext/issues/44496)) ([106671a](106671a414))
* add strings for translation payment_terms_status_for_sales_order.py ([773e03f](773e03f84f))
* add title for translation in  asset.js ([843ff18](843ff18cf9))
* **Bank Transaction:** error in party matching should not block submitting (backport [#44416](https://github.com/frappe/erpnext/issues/44416)) ([#44574](https://github.com/frappe/erpnext/issues/44574)) ([31c2b81](31c2b818bd))
* BOM for variant items (backport [#44580](https://github.com/frappe/erpnext/issues/44580)) ([#44584](https://github.com/frappe/erpnext/issues/44584)) ([0b26827](0b268279cf))
* BOM has not attr required items (backport [#44598](https://github.com/frappe/erpnext/issues/44598)) ([#44600](https://github.com/frappe/erpnext/issues/44600)) ([608eaaa](608eaaa482))
* BOM name issue (backport [#44575](https://github.com/frappe/erpnext/issues/44575)) ([#44579](https://github.com/frappe/erpnext/issues/44579)) ([03ae9e2](03ae9e27be))
* BOM name issue (backport [#44586](https://github.com/frappe/erpnext/issues/44586)) ([#44589](https://github.com/frappe/erpnext/issues/44589)) ([a5cc307](a5cc307417))
* consider zero valuation rate for serial nos (backport [#44532](https://github.com/frappe/erpnext/issues/44532)) ([#44534](https://github.com/frappe/erpnext/issues/44534)) ([3771c6e](3771c6eeae))
* correct color for draft in list view ([cce1cc6](cce1cc6674))
* currency symbol in SCO and SCR (backport [#44577](https://github.com/frappe/erpnext/issues/44577)) ([#44594](https://github.com/frappe/erpnext/issues/44594)) ([2a17ecd](2a17ecdc39))
* description overwrite on qty change (backport [#44606](https://github.com/frappe/erpnext/issues/44606)) ([#44609](https://github.com/frappe/erpnext/issues/44609)) ([243bf54](243bf542c4))
* do not allow to inward same serial nos multiple times (backport [#44617](https://github.com/frappe/erpnext/issues/44617)) ([#44619](https://github.com/frappe/erpnext/issues/44619)) ([bdb60a5](bdb60a51c3))
* duplicate required items in the CSV (backport [#44498](https://github.com/frappe/erpnext/issues/44498)) ([#44507](https://github.com/frappe/erpnext/issues/44507)) ([539c5b7](539c5b7974))
* incorrect stock UOM for BOM raw materials (backport [#44528](https://github.com/frappe/erpnext/issues/44528)) ([#44531](https://github.com/frappe/erpnext/issues/44531)) ([f4aa4c9](f4aa4c9466))
* inv dimensions fields not creating for standard doctype (backport [#44504](https://github.com/frappe/erpnext/issues/44504)) ([#44515](https://github.com/frappe/erpnext/issues/44515)) ([8733eda](8733eda576))
* make projected qty editable after submit (backport [#44670](https://github.com/frappe/erpnext/issues/44670)) ([#44671](https://github.com/frappe/erpnext/issues/44671)) ([bd9c84d](bd9c84d3b7))
* not able to make PO for returned qty from material request (backport [#44540](https://github.com/frappe/erpnext/issues/44540)) ([#44547](https://github.com/frappe/erpnext/issues/44547)) ([5ef063c](5ef063c634))
* not able to make sales return entry (backport [#44605](https://github.com/frappe/erpnext/issues/44605)) ([#44613](https://github.com/frappe/erpnext/issues/44613)) ([04b07a9](04b07a9e1c))
* precision check for salvage value ([ef5a564](ef5a5643dc))
* prevent set_payment_schedule on return documents ([2560beb](2560beb695))
* required by date in the reorder material request (backport [#44497](https://github.com/frappe/erpnext/issues/44497)) ([#44509](https://github.com/frappe/erpnext/issues/44509)) ([07df87a](07df87ab69))
* restrict advance payment entries with flag ([98bd5f2](98bd5f20c4))
* strings for translation in pos_past_order_summary.js ([ceec5fd](ceec5fdb6c))
* update free item qty while adding same item in seperate row ([f88dc26](f88dc263d5))
* update qty in SABB if qty changed in stock reco (backport [#44542](https://github.com/frappe/erpnext/issues/44542)) ([#44546](https://github.com/frappe/erpnext/issues/44546)) ([99a3271](99a327155e))
* validate returned serial nos and batches (backport [#44669](https://github.com/frappe/erpnext/issues/44669)) ([#44674](https://github.com/frappe/erpnext/issues/44674)) ([33273fa](33273faccb))
* valuation rate for batch in stock reconciliation  (backport [#44657](https://github.com/frappe/erpnext/issues/44657)) ([#44664](https://github.com/frappe/erpnext/issues/44664)) ([2466e4c](2466e4c2fd))
* variant qty while making work order from BOM (backport [#44548](https://github.com/frappe/erpnext/issues/44548)) ([#44551](https://github.com/frappe/erpnext/issues/44551)) ([63b1df3](63b1df38a8))
2024-12-12 10:45:52 +00:00
ruthra kumar
911ec37d13 Merge pull request #44640 from frappe/version-15-hotfix
chore: release v15
2024-12-12 16:14:23 +05:30
David (aider)
6f6574c5ac feat: add unit tests for distributed_discount_amount
(cherry picked from commit a464bd861b)
2024-09-05 10:08:39 +00:00
David
ad05e6dec2 fix: distributed discounts on si
(cherry picked from commit 0bab6f34c1)

# Conflicts:
#	erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
#	erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
#	erpnext/selling/doctype/quotation_item/quotation_item.json
#	erpnext/selling/doctype/sales_order_item/sales_order_item.json
#	erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
2024-09-05 10:08:39 +00:00
554 changed files with 27508 additions and 127236 deletions

4
.github/release.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
changelog:
exclude:
labels:
- skip-release-notes

View File

@@ -0,0 +1,30 @@
name: "Auto-label PRs based on title"
on:
pull_request_target:
types: [opened, reopened]
jobs:
add-label-if-prefix-matches:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Check PR title and add label if it matches prefixes
uses: actions/github-script@v7
continue-on-error: true
with:
script: |
const title = context.payload.pull_request.title.toLowerCase();
const prefixes = ['chore', 'ci', 'style', 'test', 'refactor'];
// Check if the PR title starts with any of the prefixes
if (prefixes.some(prefix => title.startsWith(prefix))) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['skip-release-notes']
});
}

View File

@@ -57,7 +57,7 @@ jobs:
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }}
@@ -66,7 +66,7 @@ jobs:
${{ runner.os }}-
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
@@ -81,7 +81,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}

View File

@@ -76,7 +76,7 @@ jobs:
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }}
@@ -85,7 +85,7 @@ jobs:
${{ runner.os }}-
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
@@ -100,7 +100,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}

View File

@@ -66,7 +66,7 @@ jobs:
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }}
@@ -75,7 +75,7 @@ jobs:
${{ runner.os }}-
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
@@ -90,7 +90,7 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}

View File

@@ -1,5 +1,5 @@
exclude: 'node_modules|.git'
default_stages: [commit]
default_stages: [pre-commit]
fail_fast: false

View File

@@ -62,7 +62,7 @@ New passwords will be created for the ERPNext "Administrator" user, the MariaDB
## Learning and community
1. [Frappe School](https://frappe.school) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community.
1. [Frappe School](https://school.frappe.io) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community.
2. [Official documentation](https://docs.erpnext.com/) - Extensive documentation for ERPNext.
3. [Discussion Forum](https://discuss.erpnext.com/) - Engage with community of ERPNext users and service providers.
4. [Telegram Group](https://erpnext_public.t.me) - Get instant help from huge community of users.

View File

@@ -4,7 +4,7 @@ import inspect
import frappe
from frappe.utils.user import is_website_user
__version__ = "15.45.4"
__version__ = "15.65.1"
def get_default_company(user=None):

View File

@@ -4,7 +4,7 @@
import frappe
from frappe import _, throw
from frappe.utils import cint, cstr
from frappe.utils import add_to_date, cint, cstr, pretty_date
from frappe.utils.nestedset import NestedSet, get_ancestors_of, get_descendants_of
import erpnext
@@ -481,6 +481,7 @@ def get_account_autoname(account_number, account_name, company):
@frappe.whitelist()
def update_account_number(name, account_name, account_number=None, from_descendant=False):
_ensure_idle_system()
account = frappe.get_cached_doc("Account", name)
if not account:
return
@@ -501,7 +502,7 @@ def update_account_number(name, account_name, account_number=None, from_descenda
"name",
)
if old_name:
if old_name and not from_descendant:
# same account in parent company exists
allow_child_account_creation = _("Allow Account Creation Against Child Company")
@@ -542,6 +543,7 @@ def update_account_number(name, account_name, account_number=None, from_descenda
@frappe.whitelist()
def merge_account(old, new):
_ensure_idle_system()
# Validate properties before merging
new_account = frappe.get_cached_doc("Account", new)
old_account = frappe.get_cached_doc("Account", old)
@@ -595,3 +597,31 @@ def sync_update_account_number_in_child(
for d in frappe.db.get_values("Account", filters=filters, fieldname=["company", "name"], as_dict=True):
update_account_number(d["name"], account_name, account_number, from_descendant=True)
def _ensure_idle_system():
# Don't allow renaming if accounting entries are actively being updated, there are two main reasons:
# 1. Correctness: It's next to impossible to ensure that renamed account is not being used *right now*.
# 2. Performance: Renaming requires locking out many tables entirely and severely degrades performance.
if frappe.flags.in_test:
return
last_gl_update = None
try:
# We also lock inserts to GL entry table with for_update here.
last_gl_update = frappe.db.get_value("GL Entry", {}, "modified", for_update=True, wait=False)
except frappe.QueryTimeoutError:
# wait=False fails immediately if there's an active transaction.
last_gl_update = add_to_date(None, seconds=-1)
if not last_gl_update:
return
if last_gl_update > add_to_date(None, minutes=-5):
frappe.throw(
_(
"Last GL Entry update was done {}. This operation is not allowed while system is actively being used. Please wait for 5 minutes before retrying."
).format(pretty_date(last_gl_update)),
title=_("System In Use"),
)

View File

@@ -116,6 +116,7 @@ def identify_is_group(child):
return is_group
@frappe.whitelist()
def get_chart(chart_template, existing_company=None):
chart = {}
if existing_company:

View File

@@ -0,0 +1,532 @@
{
"country_code": "ch",
"name": "240812 Schulkontenrahmen VEB - DE",
"tree": {
"Aktiven": {
"account_number": "1",
"is_group": 1,
"root_type": "Asset",
"Umlaufvermögen": {
"account_number": "10",
"is_group": 1,
"Flüssige Mittel": {
"account_number": "100",
"is_group": 1,
"Kasse": {
"account_number": "1000",
"account_type": "Cash"
},
"Bankguthaben": {
"account_number": "1020",
"account_type": "Bank"
}
},
"Kurzfristig gehaltene Aktiven mit Börsenkurs": {
"account_number": "106",
"is_group": 1,
"Wertschriften": {
"account_number": "1060"
},
"Wertberichtigungen Wertschriften": {
"account_number": "1069"
}
},
"Forderungen aus Lieferungen und Leistungen": {
"account_number": "110",
"is_group": 1,
"Forderungen aus Lieferungen und Leistungen (Debitoren)": {
"account_number": "1100"
},
"Delkredere": {
"account_number": "1109"
}
},
"Übrige kurzfristige Forderungen": {
"account_number": "114",
"is_group": 1,
"Vorschüsse und Darlehen": {
"account_number": "1140"
},
"Wertberichtigungen Vorschüsse und Darlehen": {
"account_number": "1149"
},
"Vorsteuer MWST Material, Waren, Dienstleistungen, Energie": {
"account_number": "1170"
},
"Vorsteuer MWST Investitionen, übriger Betriebsaufwand": {
"account_number": "1171"
},
"Verrechnungssteuer": {
"account_number": "1176"
},
"Forderungen gegenüber Sozialversicherungen und Vorsorgeeinrichtungen": {
"account_number": "1180"
},
"Quellensteuer": {
"account_number": "1189"
},
"Sonstige kurzfristige Forderungen": {
"account_number": "1190"
},
"Wertberichtigungen sonstige kurzfristige Forderungen": {
"account_number": "1199"
}
},
"Vorräte und nicht fakturierte Dienstleistungen": {
"account_number": "120",
"is_group": 1,
"Handelswaren": {
"account_number": "1200"
},
"Rohstoffe": {
"account_number": "1210"
},
"Werkstoffe": {
"account_number": "1220"
},
"Hilfs- und Verbrauchsmaterial": {
"account_number": "1230"
},
"Handelswaren in Konsignation": {
"account_number": "1250"
},
"Fertige Erzeugnisse": {
"account_number": "1260"
},
"Unfertige Erzeugnisse": {
"account_number": "1270"
},
"Nicht fakturierte Dienstleistungen": {
"account_number": "1280"
}
},
"Aktive Rechnungsabgrenzungen": {
"account_number": "130",
"is_group": 1,
"Bezahlter Aufwand des Folgejahres": {
"account_number": "1300"
},
"Noch nicht erhaltener Ertrag": {
"account_number": "1301"
}
}
},
"Anlagevermögen": {
"account_number": "14",
"is_group": 1,
"Finanzanlagen": {
"account_number": "140",
"is_group": 1,
"Wertschriften": {
"account_number": "1400"
},
"Wertberichtigungen Wertschriften": {
"account_number": "1409"
},
"Darlehen": {
"account_number": "1440"
},
"Hypotheken": {
"account_number": "1441"
},
"Wertberichtigungen langfristige Forderungen": {
"account_number": "1449"
}
},
"Beteiligungen": {
"account_number": "148",
"is_group": 1,
"Beteiligungen": {
"account_number": "1480"
},
"Wertberichtigungen Beteiligungen": {
"account_number": "1489"
}
},
"Mobile Sachanlagen": {
"account_number": "150",
"is_group": 1,
"Maschinen und Apparate": {
"account_number": "1500"
},
"Wertberichtigungen Maschinen und Apparate": {
"account_number": "1509"
},
"Mobiliar und Einrichtungen": {
"account_number": "1510"
},
"Wertberichtigungen Mobiliar und Einrichtungen": {
"account_number": "1519"
},
"Büromaschinen, Informatik, Kommunikationstechnologie": {
"account_number": "1520"
},
"Wertberichtigungen Büromaschinen, Informatik, Kommunikationstechnologie": {
"account_number": "1529"
},
"Fahrzeuge": {
"account_number": "1530"
},
"Wertberichtigungen Fahrzeuge": {
"account_number": "1539"
},
"Werkzeuge und Geräte": {
"account_number": "1540"
},
"Wertberichtigungen Werkzeuge und Geräte": {
"account_number": "1549"
}
},
"Immobile Sachanlagen": {
"account_number": "160",
"is_group": 1,
"Geschäftsliegenschaften": {
"account_number": "1600"
},
"Wertberichtigungen Geschäftsliegenschaften": {
"account_number": "1609"
}
},
"Immaterielle Werte": {
"account_number": "170",
"is_group": 1,
"Patente, Know-how, Lizenzen, Rechte, Entwicklungen": {
"account_number": "1700"
},
"Wertberichtigungen Patente, Know-how, Lizenzen, Rechte, Entwicklungen": {
"account_number": "1709"
},
"Goodwill": {
"account_number": "1770"
},
"Wertberichtigungen Goodwill": {
"account_number": "1779"
}
},
"Nicht einbezahltes Grund-, Gesellschafter- oder Stiftungskapital": {
"account_number": "180",
"is_group": 1,
"Nicht einbezahltes Aktien-, Stamm-, Anteilschein- oder Stiftungskapital": {
"account_number": "1850"
}
}
}
},
"Passiven": {
"account_number": "2",
"is_group": 1,
"root_type": "Liability",
"Kurzfristiges Fremdkapital": {
"account_number": "20",
"is_group": 1,
"Verbindlichkeiten aus Lieferungen und Leistungen": {
"account_number": "200",
"is_group": 1,
"Verbindlichkeiten aus Lieferungen und Leistungen (Kreditoren)": {
"account_number": "2000"
},
"Erhaltene Anzahlungen": {
"account_number": "2030"
}
},
"Kurzfristige verzinsliche Verbindlichkeiten": {
"account_number": "210",
"is_group": 1,
"Bankverbindlichkeiten": {
"account_number": "2100"
},
"Verbindlichkeiten aus Finanzierungsleasing": {
"account_number": "2120"
},
"Übrige verzinsliche Verbindlichkeiten": {
"account_number": "2140"
}
},
"Übrige kurzfristige Verbindlichkeiten": {
"account_number": "220",
"is_group": 1,
"Geschuldete MWST (Umsatzsteuer)": {
"account_number": "2200"
},
"Abrechnungskonto MWST": {
"account_number": "2201"
},
"Verrechnungssteuer": {
"account_number": "2206"
},
"Direkte Steuern": {
"account_number": "2208"
},
"Sonstige kurzfristige Verbindlichkeiten": {
"account_number": "2210"
},
"Beschlossene Ausschüttungen": {
"account_number": "2261"
},
"Sozialversicherungen und Vorsorgeeinrichtungen": {
"account_number": "2270"
},
"Quellensteuer": {
"account_number": "2279"
}
},
"Passive Rechnungsabgrenzungen und kurzfristige Rückstellungen": {
"account_number": "230",
"is_group": 1,
"Noch nicht bezahlter Aufwand": {
"account_number": "2300"
},
"Erhaltener Ertrag des Folgejahres": {
"account_number": "2301"
},
"Kurzfristige Rückstellungen": {
"account_number": "2330"
}
}
},
"Langfristiges Fremdkapital": {
"account_number": "24",
"is_group": 1,
"Langfristige verzinsliche Verbindlichkeiten": {
"account_number": "240",
"is_group": 1,
"Bankverbindlichkeiten": {
"account_number": "2400"
},
"Verbindlichkeiten aus Finanzierungsleasing": {
"account_number": "2420"
},
"Obligationenanleihen": {
"account_number": "2430"
},
"Darlehen": {
"account_number": "2450"
},
"Hypotheken": {
"account_number": "2451"
}
},
"Übrige langfristige Verbindlichkeiten": {
"account_number": "250",
"is_group": 1,
"Übrige langfristige Verbindlichkeiten (unverzinslich)": {
"account_number": "2500"
}
},
"Rückstellungen sowie vom Gesetz vorgesehene ähnliche Positionen": {
"account_number": "260",
"is_group": 1,
"Rückstellungen": {
"account_number": "2600"
}
}
},
"Eigenkapital (juristische Personen)": {
"account_number": "28",
"is_group": 1,
"Grund-, Gesellschafter- oder Stiftungskapital": {
"account_number": "280",
"is_group": 1,
"Aktien-, Stamm-, Anteilschein- oder Stiftungskapital": {
"account_number": "2800"
}
},
"Reserven und Jahresgewinn oder Jahresverlust": {
"account_number": "290",
"is_group": 1,
"Gesetzliche Kapitalreserve": {
"account_number": "2900"
},
"Reserve für eigene Kapitalanteile": {
"account_number": "2930"
},
"Aufwertungsreserve": {
"account_number": "2940"
},
"Gesetzliche Gewinnreserve": {
"account_number": "2950"
},
"Freiwillige Gewinnreserven": {
"account_number": "2960"
},
"Gewinnvortrag oder Verlustvortrag": {
"account_number": "2970"
},
"Jahresgewinn oder Jahresverlust": {
"account_number": "2979"
},
"Eigene Aktien, Stammanteile oder Anteilscheine (Minusposten)": {
"account_number": "2980"
}
}
}
},
"Betrieblicher Ertrag aus Lieferungen und Leistungen": {
"account_number": "3",
"is_group": 1,
"root_type": "Income",
"Produktionserlöse": {
"account_number": "3000"
},
"Handelserlöse": {
"account_number": "3200"
},
"Dienstleistungserlöse": {
"account_number": "3400"
},
"Übrige Erlöse aus Lieferungen und Leistungen": {
"account_number": "3600"
},
"Eigenleistungen": {
"account_number": "3700"
},
"Eigenverbrauch": {
"account_number": "3710"
},
"Erlösminderungen": {
"account_number": "3800"
},
"Verluste Forderungen (Debitoren), Veränderung Delkredere": {
"account_number": "3805"
},
"Bestandesänderungen unfertige Erzeugnisse": {
"account_number": "3900"
},
"Bestandesänderungen fertige Erzeugnisse": {
"account_number": "3901"
},
"Bestandesänderungen nicht fakturierte Dienstleistungen": {
"account_number": "3940"
}
},
"Aufwand für Material, Handelswaren, Dienstleistungen und Energie": {
"account_number": "4",
"is_group": 1,
"root_type": "Expense",
"Materialaufwand Produktion": {
"account_number": "4000"
},
"Handelswarenaufwand": {
"account_number": "4200"
},
"Aufwand für bezogene Dienstleistungen": {
"account_number": "4400"
},
"Energieaufwand zur Leistungserstellung": {
"account_number": "4500"
},
"Aufwandminderungen": {
"account_number": "4900"
}
},
"Personalaufwand": {
"account_number": "5",
"is_group": 1,
"root_type": "Expense",
"Lohnaufwand": {
"account_number": "5000"
},
"Sozialversicherungsaufwand": {
"account_number": "5700"
},
"Übriger Personalaufwand": {
"account_number": "5800"
},
"Leistungen Dritter": {
"account_number": "5900"
}
},
"Übriger betrieblicher Aufwand, Abschreibungen und Wertberichtigungen sowie Finanzergebnis": {
"account_number": "6",
"is_group": 1,
"root_type": "Expense",
"Raumaufwand": {
"account_number": "6000"
},
"Unterhalt, Reparaturen, Ersatz mobile Sachanlagen": {
"account_number": "6100"
},
"Leasingaufwand mobile Sachanlagen": {
"account_number": "6105"
},
"Fahrzeug- und Transportaufwand": {
"account_number": "6200"
},
"Fahrzeugleasing und -mieten": {
"account_number": "6260"
},
"Sachversicherungen, Abgaben, Gebühren, Bewilligungen": {
"account_number": "6300"
},
"Energie- und Entsorgungsaufwand": {
"account_number": "6400"
},
"Verwaltungsaufwand": {
"account_number": "6500"
},
"Informatikaufwand inkl. Leasing": {
"account_number": "6570"
},
"Werbeaufwand": {
"account_number": "6600"
},
"Sonstiger betrieblicher Aufwand": {
"account_number": "6700"
},
"Abschreibungen und Wertberichtigungen auf Positionen des Anlagevermögens": {
"account_number": "6800"
},
"Finanzaufwand": {
"account_number": "6900"
},
"Finanzertrag": {
"account_number": "6950"
}
},
"Betrieblicher Nebenerfolg": {
"account_number": "7",
"is_group": 1,
"root_type": "Income",
"Ertrag Nebenbetrieb": {
"account_number": "7000"
},
"Aufwand Nebenbetrieb": {
"account_number": "7010"
},
"Ertrag betriebliche Liegenschaft": {
"account_number": "7500"
},
"Aufwand betriebliche Liegenschaft": {
"account_number": "7510"
}
},
"Betriebsfremder, ausserordentlicher, einmaliger oder periodenfremder Aufwand und Ertrag": {
"account_number": "8",
"is_group": 1,
"root_type": "Expense",
"Betriebsfremder Aufwand": {
"account_number": "8000"
},
"Betriebsfremder Ertrag": {
"account_number": "8100"
},
"Ausserordentlicher, einmaliger oder periodenfremder Aufwand": {
"account_number": "8500"
},
"Ausserordentlicher, einmaliger oder periodenfremder Ertrag": {
"account_number": "8510"
},
"Direkte Steuern": {
"account_number": "8900"
}
},
"Abschluss": {
"account_number": "9",
"is_group": 1,
"root_type": "Equity",
"Jahresgewinn oder Jahresverlust": {
"account_number": "9200"
}
}
}
}

View File

@@ -98,7 +98,7 @@
"Office Maintenance Expenses": {},
"Office Rent": {},
"Postal Expenses": {},
"Print and Stationary": {},
"Print and Stationery": {},
"Rounded Off": {
"account_type": "Round Off"
},

View File

@@ -31,7 +31,8 @@
"label": "Reference Document Type",
"options": "DocType",
"read_only_depends_on": "eval:!doc.__islocal",
"reqd": 1
"reqd": 1,
"search_index": 1
},
{
"default": "0",

View File

@@ -41,6 +41,11 @@ class AccountingDimension(Document):
self.set_fieldname_and_label()
def validate(self):
self.validate_doctype()
validate_column_name(self.fieldname)
self.validate_dimension_defaults()
def validate_doctype(self):
if self.document_type in (
*core_doctypes_list,
"Accounting Dimension",
@@ -49,6 +54,7 @@ class AccountingDimension(Document):
"Accounting Dimension Detail",
"Company",
"Account",
"Finance Book",
):
msg = _("Not allowed to create accounting dimension for {0}").format(self.document_type)
frappe.throw(msg)
@@ -61,9 +67,6 @@ class AccountingDimension(Document):
if not self.is_new():
self.validate_document_type_change()
validate_column_name(self.fieldname)
self.validate_dimension_defaults()
def validate_document_type_change(self):
doctype_before_save = frappe.db.get_value("Accounting Dimension", self.name, "document_type")
if doctype_before_save != self.document_type:
@@ -102,6 +105,7 @@ class AccountingDimension(Document):
def on_update(self):
frappe.flags.accounting_dimensions = None
frappe.flags.accounting_dimensions_details = None
def make_dimension_in_accounting_doctypes(doc, doclist=None):
@@ -262,7 +266,7 @@ def get_checks_for_pl_and_bs_accounts():
frappe.flags.accounting_dimensions_details = frappe.db.sql(
"""SELECT p.label, p.disabled, p.fieldname, c.default_dimension, c.company, c.mandatory_for_pl, c.mandatory_for_bs
FROM `tabAccounting Dimension`p ,`tabAccounting Dimension Detail` c
WHERE p.name = c.parent""",
WHERE p.name = c.parent AND p.disabled = 0""",
as_dict=1,
)

View File

@@ -38,6 +38,11 @@
"show_taxes_as_table_in_print",
"column_break_12",
"show_payment_schedule_in_print",
"item_price_settings_section",
"maintain_same_internal_transaction_rate",
"column_break_feyo",
"maintain_same_rate_action",
"role_to_override_stop_action",
"currency_exchange_section",
"allow_stale",
"column_break_yuug",
@@ -47,6 +52,7 @@
"auto_reconciliation_job_trigger",
"reconciliation_queue_size",
"column_break_resa",
"exchange_gain_loss_posting_date",
"invoicing_settings_tab",
"accounts_transactions_settings_section",
"over_billing_allowance",
@@ -76,9 +82,12 @@
"reports_tab",
"remarks_section",
"general_ledger_remarks_length",
"ignore_is_opening_check_for_reporting",
"column_break_lvjk",
"receivable_payable_remarks_length",
"accounts_receivable_payable_tuning_section",
"receivable_payable_fetch_method",
"legacy_section",
"ignore_is_opening_check_for_reporting",
"payment_request_settings",
"create_pr_in_draft_status"
],
@@ -389,7 +398,7 @@
{
"fieldname": "section_break_jpd0",
"fieldtype": "Section Break",
"label": "Payment Reconciliations"
"label": "Payment Reconciliation Settings"
},
{
"default": "0",
@@ -523,6 +532,66 @@
"fieldname": "ignore_is_opening_check_for_reporting",
"fieldtype": "Check",
"label": "Ignore Is Opening check for reporting"
},
{
"default": "Payment",
"description": "Only applies for Normal Payments",
"fieldname": "exchange_gain_loss_posting_date",
"fieldtype": "Select",
"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",
"fieldtype": "Select",
"label": "Data Fetch Method",
"options": "Buffered Cursor\nUnBuffered Cursor"
},
{
"fieldname": "accounts_receivable_payable_tuning_section",
"fieldtype": "Section Break",
"label": "Accounts Receivable / Payable Tuning"
},
{
"fieldname": "legacy_section",
"fieldtype": "Section Break",
"label": "Legacy Fields"
},
{
"default": "0",
"fieldname": "maintain_same_internal_transaction_rate",
"fieldtype": "Check",
"label": "Maintain Same Rate Throughout Internal Transaction"
},
{
"default": "Stop",
"depends_on": "maintain_same_internal_transaction_rate",
"fieldname": "maintain_same_rate_action",
"fieldtype": "Select",
"label": "Action if Same Rate is Not Maintained Throughout Internal Transaction",
"mandatory_depends_on": "maintain_same_internal_transaction_rate",
"options": "Stop\nWarn"
},
{
"depends_on": "eval: doc.maintain_same_internal_transaction_rate && doc.maintain_same_rate_action == 'Stop'",
"fieldname": "role_to_override_stop_action",
"fieldtype": "Link",
"label": "Role Allowed to Override Stop Action",
"options": "Role"
},
{
"fieldname": "item_price_settings_section",
"fieldtype": "Section Break",
"label": "Item Price Settings"
},
{
"fieldname": "column_break_feyo",
"fieldtype": "Column Break"
}
],
"icon": "icon-cog",
@@ -530,7 +599,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2025-01-18 21:24:19.840745",
"modified": "2025-05-05 12:29:38.302027",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",
@@ -559,4 +628,4 @@
"sort_order": "ASC",
"states": [],
"track_changes": 1
}
}

View File

@@ -45,17 +45,22 @@ class AccountsSettings(Document):
enable_fuzzy_matching: DF.Check
enable_immutable_ledger: DF.Check
enable_party_matching: DF.Check
exchange_gain_loss_posting_date: DF.Literal["Invoice", "Payment", "Reconciliation Date"]
frozen_accounts_modifier: DF.Link | None
general_ledger_remarks_length: DF.Int
ignore_account_closing_balance: DF.Check
ignore_is_opening_check_for_reporting: DF.Check
maintain_same_internal_transaction_rate: DF.Check
maintain_same_rate_action: DF.Literal["Stop", "Warn"]
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"]
receivable_payable_remarks_length: DF.Int
reconciliation_queue_size: DF.Int
role_allowed_to_over_bill: DF.Link | None
role_to_override_stop_action: DF.Link | None
round_row_wise_tax: DF.Check
show_balance_in_coa: DF.Check
show_inclusive_tax_in_print: DF.Check

View File

@@ -159,9 +159,6 @@ def get_payment_entries_for_bank_clearance(
as_dict=1,
)
if bank_account:
condition += "and bank_account = %(bank_account)s"
payment_entries = frappe.db.sql(
f"""
select
@@ -183,7 +180,6 @@ def get_payment_entries_for_bank_clearance(
"account": account,
"from": from_date,
"to": to_date,
"bank_account": bank_account,
},
as_dict=1,
)

View File

@@ -7,6 +7,9 @@ import frappe
from frappe.utils import add_months, getdate
from erpnext.accounts.doctype.cost_center.test_cost_center import create_cost_center
from erpnext.accounts.doctype.mode_of_payment.test_mode_of_payment import (
set_default_account_for_mode_of_payment,
)
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
@@ -191,11 +194,13 @@ def make_pos_sales_invoice():
customer = make_customer(customer="_Test Customer")
mode_of_payment = frappe.get_doc("Mode of Payment", "Wire Transfer")
set_default_account_for_mode_of_payment(mode_of_payment, "_Test Company", "_Test Bank Clearance - _TC")
si = create_sales_invoice(customer=customer, item="_Test Item", is_pos=1, qty=1, rate=1000, do_not_save=1)
si.set("payments", [])
si.append(
"payments", {"mode_of_payment": "Cash", "account": "_Test Bank Clearance - _TC", "amount": 1000}
)
si.append("payments", {"mode_of_payment": "Wire Transfer", "amount": 1000})
si.insert()
si.submit()

View File

@@ -19,10 +19,15 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
},
onload: function (frm) {
if (!frm.doc.company) {
frm.set_value("company", frappe.defaults.get_default("company"));
}
// Set default filter dates
let today = frappe.datetime.get_today();
frm.doc.bank_statement_from_date = frappe.datetime.add_months(today, -1);
frm.doc.bank_statement_to_date = today;
frm.trigger("bank_account");
},
@@ -98,7 +103,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
make_reconciliation_tool(frm) {
frm.get_field("reconciliation_tool_cards").$wrapper.empty();
if (frm.doc.bank_account && frm.doc.bank_statement_to_date) {
if (frm.doc.company && frm.doc.bank_account && frm.doc.bank_statement_to_date) {
frm.trigger("get_cleared_balance").then(() => {
if (
frm.doc.bank_account &&
@@ -114,7 +119,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
},
get_account_opening_balance(frm) {
if (frm.doc.bank_account && frm.doc.bank_statement_from_date) {
if (frm.doc.company && frm.doc.bank_account && frm.doc.bank_statement_from_date) {
frappe.call({
method: "erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_account_balance",
args: {
@@ -130,7 +135,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
},
get_cleared_balance(frm) {
if (frm.doc.bank_account && frm.doc.bank_statement_to_date) {
if (frm.doc.company && frm.doc.bank_account && frm.doc.bank_statement_to_date) {
return frappe.call({
method: "erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_account_balance",
args: {

View File

@@ -8,6 +8,7 @@ import frappe
from frappe import _
from frappe.model.document import Document
from frappe.query_builder.custom import ConstantColumn
from frappe.query_builder.functions import Sum
from frappe.utils import cint, flt
from erpnext import get_default_cost_center
@@ -373,10 +374,37 @@ def auto_reconcile_vouchers(
from_reference_date=None,
to_reference_date=None,
):
frappe.flags.auto_reconcile_vouchers = True
reconciled, partially_reconciled = set(), set()
bank_transactions = get_bank_transactions(bank_account)
if len(bank_transactions) > 10:
frappe.enqueue(
method="erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.start_auto_reconcile",
queue="long",
bank_transactions=bank_transactions,
from_date=from_date,
to_date=to_date,
filter_by_reference_date=filter_by_reference_date,
from_reference_date=from_reference_date,
to_reference_date=to_reference_date,
)
frappe.msgprint(_("Auto Reconciliation has started in the background"))
else:
start_auto_reconcile(
bank_transactions,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
)
def start_auto_reconcile(
bank_transactions, from_date, to_date, filter_by_reference_date, from_reference_date, to_reference_date
):
frappe.flags.auto_reconcile_vouchers = True
reconciled, partially_reconciled = set(), set()
for transaction in bank_transactions:
linked_payments = get_linked_payments(
transaction.name,
@@ -414,7 +442,6 @@ def auto_reconcile_vouchers(
frappe.msgprint(title=_("Auto Reconciliation"), msg=alert_message, indicator=indicator)
frappe.flags.auto_reconcile_vouchers = False
return reconciled, partially_reconciled
def get_auto_reconcile_message(partially_reconciled, reconciled):
@@ -491,16 +518,23 @@ def subtract_allocations(gl_account, vouchers):
voucher_allocated_amounts = get_total_allocated_amount(voucher_docs)
for voucher in vouchers:
rows = voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name"))) or []
filtered_row = list(filter(lambda row: row.get("gl_account") == gl_account, rows))
if amount := None if not filtered_row else filtered_row[0]["total"]:
if amount := get_allocated_amount(voucher_allocated_amounts, voucher, gl_account):
voucher["paid_amount"] -= amount
copied.append(voucher)
return copied
def get_allocated_amount(voucher_allocated_amounts, voucher, gl_account):
if not (voucher_details := voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name")))):
return
if not (row := voucher_details.get(gl_account)):
return
return row.get("total")
def check_matching(
bank_account,
company,
@@ -770,26 +804,20 @@ def get_je_matching_query(
je = frappe.qb.DocType("Journal Entry")
jea = frappe.qb.DocType("Journal Entry Account")
ref_condition = je.cheque_no == transaction.reference_number
ref_rank = frappe.qb.terms.Case().when(ref_condition, 1).else_(0)
amount_field = f"{cr_or_dr}_in_account_currency"
amount_equality = getattr(jea, amount_field) == transaction.unallocated_amount
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
filter_by_date = je.posting_date.between(from_date, to_date)
if cint(filter_by_reference_date):
filter_by_date = je.cheque_date.between(from_reference_date, to_reference_date)
query = (
subquery = (
frappe.qb.from_(jea)
.join(je)
.on(jea.parent == je.name)
.select(
(ref_rank + amount_rank + 1).as_("rank"),
Sum(getattr(jea, amount_field)).as_("paid_amount"),
ConstantColumn("Journal Entry").as_("doctype"),
je.name,
getattr(jea, amount_field).as_("paid_amount"),
je.cheque_no.as_("reference_no"),
je.cheque_date.as_("reference_date"),
je.pay_to_recd_from.as_("party"),
@@ -801,14 +829,26 @@ def get_je_matching_query(
.where(je.voucher_type != "Opening Entry")
.where(je.clearance_date.isnull())
.where(jea.account == common_filters.bank_account)
.where(amount_equality if exact_match else getattr(jea, amount_field) > 0.0)
.where(je.docstatus == 1)
.where(filter_by_date)
.groupby(je.name)
.orderby(je.cheque_date if cint(filter_by_reference_date) else je.posting_date)
)
if frappe.flags.auto_reconcile_vouchers is True:
query = query.where(ref_condition)
subquery = subquery.where(je.cheque_no == transaction.reference_number)
ref_rank = frappe.qb.terms.Case().when(subquery.reference_no == transaction.reference_number, 1).else_(0)
amount_equality = subquery.paid_amount == transaction.unallocated_amount
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
query = (
frappe.qb.from_(subquery)
.select(
"*",
(ref_rank + amount_rank + 1).as_("rank"),
)
.where(amount_equality if exact_match else subquery.paid_amount > 0.0)
)
return query

View File

@@ -277,7 +277,7 @@ def get_import_status(docname):
@frappe.whitelist()
def get_import_logs(docname: str):
frappe.has_permission("Bank Statement Import")
frappe.has_permission("Bank Statement Import", throw=True)
return frappe.get_all(
"Data Import Log",

View File

@@ -45,45 +45,41 @@ class AutoMatchbyAccountIBAN:
if not (self.bank_party_account_number or self.bank_party_iban):
return None
result = self.match_account_in_party()
return result
return self.match_account_in_party()
def match_account_in_party(self) -> tuple | None:
"""Check if there is a IBAN/Account No. match in Customer/Supplier/Employee"""
result = None
parties = get_parties_in_order(self.deposit)
or_filters = self.get_or_filters()
"""
Returns (Party Type, Party) if a matching account is found in Bank Account or Employee:
1. Get party from a matching (iban/account no) Bank Account
2. If not found, get party from Employee with matching bank account details (iban/account no)
"""
if not (self.bank_party_account_number or self.bank_party_iban):
# Nothing to match
return None
for party in parties:
party_result = frappe.db.get_all(
"Bank Account", or_filters=or_filters, pluck="party", limit_page_length=1
)
# Search for a matching Bank Account that has party set
party_result = frappe.db.get_all(
"Bank Account",
or_filters=self.get_or_filters(),
filters={"party_type": ("is", "set"), "party": ("is", "set")},
fields=["party", "party_type"],
limit_page_length=1,
)
if result := party_result[0] if party_result else None:
return (result["party_type"], result["party"])
if party == "Employee" and not party_result:
# Search in Bank Accounts first for Employee, and then Employee record
if "bank_account_no" in or_filters:
or_filters["bank_ac_no"] = or_filters.pop("bank_account_no")
# If no party is found, search in Employee (since it has bank account details)
if employee_result := frappe.db.get_all(
"Employee", or_filters=self.get_or_filters("Employee"), pluck="name", limit_page_length=1
):
return ("Employee", employee_result[0])
party_result = frappe.db.get_all(
party, or_filters=or_filters, pluck="name", limit_page_length=1
)
if "bank_ac_no" in or_filters:
or_filters["bank_account_no"] = or_filters.pop("bank_ac_no")
if party_result:
result = (
party,
party_result[0],
)
break
return result
def get_or_filters(self) -> dict:
def get_or_filters(self, party: str | None = None) -> dict:
"""Return OR filters for Bank Account and IBAN"""
or_filters = {}
if self.bank_party_account_number:
or_filters["bank_account_no"] = self.bank_party_account_number
bank_ac_field = "bank_ac_no" if party == "Employee" else "bank_account_no"
or_filters[bank_ac_field] = self.bank_party_account_number
if self.bank_party_iban:
or_filters["iban"] = self.bank_party_iban
@@ -103,8 +99,7 @@ class AutoMatchbyPartyNameDescription:
if not (self.bank_party_name or self.description):
return None
result = self.match_party_name_desc_in_party()
return result
return self.match_party_name_desc_in_party()
def match_party_name_desc_in_party(self) -> tuple | None:
"""Fuzzy search party name and/or description against parties in the system"""
@@ -113,7 +108,8 @@ class AutoMatchbyPartyNameDescription:
for party in parties:
filters = {"status": "Active"} if party == "Employee" else {"disabled": 0}
names = frappe.get_all(party, filters=filters, pluck=party.lower() + "_name")
field = f"{party.lower()}_name"
names = frappe.get_all(party, filters=filters, fields=[f"{field} as party_name", "name"])
for field in ["bank_party_name", "description"]:
if not self.get(field):
@@ -132,16 +128,14 @@ class AutoMatchbyPartyNameDescription:
def fuzzy_search_and_return_result(self, party, names, field) -> tuple | None:
skip = False
result = process.extract(query=self.get(field), choices=names, scorer=fuzz.token_set_ratio)
result = process.extract(
query=self.get(field),
choices={row.get("name"): row.get("party_name") for row in names},
scorer=fuzz.token_set_ratio,
)
party_name, skip = self.process_fuzzy_result(result)
if not party_name:
return None, skip
return (
party,
party_name,
), skip
return ((party, party_name), skip) if party_name else (None, skip)
def process_fuzzy_result(self, result: list | None):
"""
@@ -150,30 +144,30 @@ class AutoMatchbyPartyNameDescription:
Returns: Result, Skip (whether or not to discontinue matching)
"""
PARTY, SCORE, CUTOFF = 0, 1, 80
SCORE, PARTY_ID, CUTOFF = 1, 2, 80
if not result or not len(result):
return None, False
first_result = result[0]
if len(result) == 1:
return (first_result[PARTY] if first_result[SCORE] > CUTOFF else None), True
return (first_result[PARTY_ID] if first_result[SCORE] > CUTOFF else None), True
second_result = result[1]
if first_result[SCORE] > CUTOFF:
second_result = result[1]
# If multiple matches with the same score, return None but discontinue matching
# Matches were found but were too close to distinguish between
if first_result[SCORE] == second_result[SCORE]:
return None, True
return first_result[PARTY], True
return first_result[PARTY_ID], True
else:
return None, False
def get_parties_in_order(deposit: float) -> list:
parties = ["Supplier", "Employee", "Customer"] # most -> least likely to receive
if flt(deposit) > 0:
parties = ["Customer", "Supplier", "Employee"] # most -> least likely to pay
return parties
return (
["Customer", "Supplier", "Employee"] # most -> least likely to pay us
if flt(deposit) > 0
else ["Supplier", "Employee", "Customer"] # most -> least likely to receive from us
)

View File

@@ -2,27 +2,6 @@
// For license information, please see license.txt
frappe.ui.form.on("Bank Transaction", {
onload(frm) {
frm.set_query("payment_document", "payment_entries", function () {
const payment_doctypes = frm.events.get_payment_doctypes(frm);
return {
filters: {
name: ["in", payment_doctypes],
},
};
});
},
refresh(frm) {
if (!frm.is_dirty() && frm.doc.payment_entries.length > 0) {
frm.add_custom_button(__("Unreconcile Transaction"), () => {
frm.call("remove_payment_entries").then(() => frm.refresh());
});
}
},
bank_account: function (frm) {
set_bank_statement_filter(frm);
},
setup: function (frm) {
frm.set_query("party_type", function () {
return {
@@ -31,6 +10,41 @@ frappe.ui.form.on("Bank Transaction", {
},
};
});
frm.set_query("bank_account", function () {
return {
filters: { is_company_account: 1 },
};
});
frm.set_query("payment_document", "payment_entries", function () {
const payment_doctypes = frm.events.get_payment_doctypes(frm);
return {
filters: {
name: ["in", payment_doctypes],
},
};
});
frm.set_query("payment_entry", "payment_entries", function () {
return {
filters: {
docstatus: ["!=", 2],
},
};
});
},
refresh(frm) {
if (!frm.is_dirty() && frm.doc.payment_entries.length > 0) {
frm.add_custom_button(__("Unreconcile Transaction"), () => {
frm.call("remove_payment_entries").then(() => frm.refresh());
});
}
},
bank_account: function (frm) {
set_bank_statement_filter(frm);
},
get_payment_doctypes: function () {
@@ -39,31 +53,6 @@ frappe.ui.form.on("Bank Transaction", {
},
});
frappe.ui.form.on("Bank Transaction Payments", {
payment_entries_remove: function (frm, cdt, cdn) {
update_clearance_date(frm, cdt, cdn);
},
});
const update_clearance_date = (frm, cdt, cdn) => {
if (frm.doc.docstatus === 1) {
frappe
.xcall("erpnext.accounts.doctype.bank_transaction.bank_transaction.unclear_reference_payment", {
doctype: cdt,
docname: cdn,
bt_name: frm.doc.name,
})
.then((e) => {
if (e == "success") {
frappe.show_alert({
message: __("Document {0} successfully uncleared", [e]),
indicator: "green",
});
}
});
}
};
function set_bank_statement_filter(frm) {
frm.set_query("bank_statement", function () {
return {

View File

@@ -5,7 +5,7 @@ import frappe
from frappe import _
from frappe.model.docstatus import DocStatus
from frappe.model.document import Document
from frappe.utils import flt
from frappe.utils import flt, getdate
class BankTransaction(Document):
@@ -84,16 +84,16 @@ class BankTransaction(Document):
if not self.payment_entries:
return
pe = []
references = set()
for row in self.payment_entries:
reference = (row.payment_document, row.payment_entry)
if reference in pe:
if reference in references:
frappe.throw(
_("{0} {1} is allocated twice in this Bank Transaction").format(
row.payment_document, row.payment_entry
)
)
pe.append(reference)
references.add(reference)
def update_allocated_amount(self):
allocated_amount = (
@@ -104,6 +104,19 @@ class BankTransaction(Document):
self.allocated_amount = flt(allocated_amount, self.precision("allocated_amount"))
self.unallocated_amount = flt(unallocated_amount, self.precision("unallocated_amount"))
def delink_old_payment_entries(self):
if self.flags.updating_linked_bank_transaction:
return
old_doc = self.get_doc_before_save()
payment_entry_names = set(pe.name for pe in self.payment_entries)
for old_pe in old_doc.payment_entries:
if old_pe.name in payment_entry_names:
continue
self.delink_payment_entry(old_pe)
def before_submit(self):
self.allocate_payment_entries()
self.set_status()
@@ -113,13 +126,14 @@ class BankTransaction(Document):
def before_update_after_submit(self):
self.validate_duplicate_references()
self.allocate_payment_entries()
self.update_allocated_amount()
self.delink_old_payment_entries()
self.allocate_payment_entries()
self.set_status()
def on_cancel(self):
for payment_entry in self.payment_entries:
self.clear_linked_payment_entry(payment_entry, for_cancel=True)
self.delink_payment_entry(payment_entry)
self.set_status()
@@ -152,43 +166,55 @@ class BankTransaction(Document):
- 0 > a: Error: already over-allocated
- clear means: set the latest transaction date as clearance date
"""
if self.flags.updating_linked_bank_transaction or not self.payment_entries:
return
remaining_amount = self.unallocated_amount
to_remove = []
payment_entry_docs = [(pe.payment_document, pe.payment_entry) for pe in self.payment_entries]
pe_bt_allocations = get_total_allocated_amount(payment_entry_docs)
gl_entries = get_related_bank_gl_entries(payment_entry_docs)
gl_bank_account = frappe.db.get_value("Bank Account", self.bank_account, "account")
for payment_entry in self.payment_entries:
if payment_entry.allocated_amount == 0.0:
unallocated_amount, should_clear, latest_transaction = get_clearance_details(
self,
payment_entry,
pe_bt_allocations.get((payment_entry.payment_document, payment_entry.payment_entry))
or [],
for payment_entry in list(self.payment_entries):
if payment_entry.allocated_amount != 0:
continue
allocable_amount, should_clear, clearance_date = get_clearance_details(
self,
payment_entry,
pe_bt_allocations.get((payment_entry.payment_document, payment_entry.payment_entry)) or {},
gl_entries.get((payment_entry.payment_document, payment_entry.payment_entry)) or {},
gl_bank_account,
)
if allocable_amount < 0:
frappe.throw(_("Voucher {0} is over-allocated by {1}").format(allocable_amount))
if remaining_amount <= 0:
self.remove(payment_entry)
continue
if allocable_amount == 0:
if should_clear:
self.clear_linked_payment_entry(payment_entry, clearance_date=clearance_date)
self.remove(payment_entry)
continue
should_clear = should_clear and allocable_amount <= remaining_amount
payment_entry.allocated_amount = min(allocable_amount, remaining_amount)
remaining_amount = flt(
remaining_amount - payment_entry.allocated_amount,
self.precision("unallocated_amount"),
)
if payment_entry.payment_document == "Bank Transaction":
self.update_linked_bank_transaction(
payment_entry.payment_entry, payment_entry.allocated_amount
)
elif should_clear:
self.clear_linked_payment_entry(payment_entry, clearance_date=clearance_date)
if 0.0 == unallocated_amount:
if should_clear:
latest_transaction.clear_linked_payment_entry(payment_entry)
to_remove.append(payment_entry)
elif remaining_amount <= 0.0:
to_remove.append(payment_entry)
elif 0.0 < unallocated_amount <= remaining_amount:
payment_entry.allocated_amount = unallocated_amount
remaining_amount -= unallocated_amount
if should_clear:
latest_transaction.clear_linked_payment_entry(payment_entry)
elif 0.0 < unallocated_amount:
payment_entry.allocated_amount = remaining_amount
remaining_amount = 0.0
elif 0.0 > unallocated_amount:
frappe.throw(_("Voucher {0} is over-allocated by {1}").format(unallocated_amount))
for payment_entry in to_remove:
self.remove(payment_entry)
self.update_allocated_amount()
@frappe.whitelist()
def remove_payment_entries(self):
@@ -199,14 +225,64 @@ class BankTransaction(Document):
def remove_payment_entry(self, payment_entry):
"Clear payment entry and clearance"
self.clear_linked_payment_entry(payment_entry, for_cancel=True)
self.delink_payment_entry(payment_entry)
self.remove(payment_entry)
def clear_linked_payment_entry(self, payment_entry, for_cancel=False):
clearance_date = None if for_cancel else self.date
set_voucher_clearance(
payment_entry.payment_document, payment_entry.payment_entry, clearance_date, self
)
def delink_payment_entry(self, payment_entry):
if payment_entry.payment_document == "Bank Transaction":
self.update_linked_bank_transaction(payment_entry.payment_entry, allocated_amount=None)
else:
self.clear_linked_payment_entry(payment_entry, clearance_date=None)
def clear_linked_payment_entry(self, payment_entry, clearance_date=None):
doctype = payment_entry.payment_document
docname = payment_entry.payment_entry
# might be a bank transaction
if doctype not in get_doctypes_for_bank_reconciliation():
return
if doctype == "Sales Invoice":
frappe.db.set_value(
"Sales Invoice Payment",
dict(parenttype=doctype, parent=docname),
"clearance_date",
clearance_date,
)
return
frappe.db.set_value(doctype, docname, "clearance_date", clearance_date)
def update_linked_bank_transaction(self, bank_transaction_name, allocated_amount=None):
"""For when a second bank transaction has fixed another, e.g. refund"""
bt = frappe.get_doc(self.doctype, bank_transaction_name)
if allocated_amount:
bt.append(
"payment_entries",
{
"payment_document": self.doctype,
"payment_entry": self.name,
"allocated_amount": allocated_amount,
},
)
else:
pe = next(
(
pe
for pe in bt.payment_entries
if pe.payment_document == self.doctype and pe.payment_entry == self.name
),
None,
)
if not pe:
return
bt.flags.updating_linked_bank_transaction = True
bt.remove(pe)
bt.save()
def auto_set_party(self):
from erpnext.accounts.doctype.bank_transaction.auto_match_party import AutoMatchParty
@@ -238,71 +314,107 @@ def get_doctypes_for_bank_reconciliation():
return frappe.get_hooks("bank_reconciliation_doctypes")
def get_clearance_details(transaction, payment_entry, bt_allocations):
def get_clearance_details(transaction, payment_entry, bt_allocations, gl_entries, gl_bank_account):
"""
There should only be one bank gle for a voucher.
Could be none for a Bank Transaction.
But if a JE, could affect two banks.
Should only clear the voucher if all bank gles are allocated.
There should only be one bank gl entry for a voucher, except for JE.
For JE, there can be multiple bank gl entries for the same account.
In this case, the allocable_amount will be the sum of amounts of all gl entries of the account.
There will be no gl entry for a Bank Transaction so return the unallocated amount.
Should only clear the voucher if all bank gl entries are allocated.
"""
gl_bank_account = frappe.db.get_value("Bank Account", transaction.bank_account, "account")
gles = get_related_bank_gl_entries(payment_entry.payment_document, payment_entry.payment_entry)
unallocated_amount = min(
transaction.unallocated_amount,
get_paid_amount(payment_entry, transaction.currency, gl_bank_account),
)
unmatched_gles = len(gles)
latest_transaction = transaction
for gle in gles:
if gle["gl_account"] == gl_bank_account:
if gle["amount"] <= 0.0:
frappe.throw(
_("Voucher {0} value is broken: {1}").format(payment_entry.payment_entry, gle["amount"])
transaction_date = getdate(transaction.date)
if payment_entry.payment_document == "Bank Transaction":
bt = frappe.db.get_value(
"Bank Transaction",
payment_entry.payment_entry,
("unallocated_amount", "bank_account"),
as_dict=True,
)
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
)
)
unmatched_gles -= 1
unallocated_amount = gle["amount"]
for a in bt_allocations:
if a["gl_account"] == gle["gl_account"]:
unallocated_amount = gle["amount"] - a["total"]
if frappe.utils.getdate(transaction.date) < a["latest_date"]:
latest_transaction = frappe.get_doc("Bank Transaction", a["latest_name"])
else:
# Must be a Journal Entry affecting more than one bank
for a in bt_allocations:
if a["gl_account"] == gle["gl_account"] and a["total"] == gle["amount"]:
unmatched_gles -= 1
return abs(bt.unallocated_amount), True, transaction_date
return unallocated_amount, unmatched_gles == 0, latest_transaction
if gl_bank_account not in gl_entries:
frappe.throw(
_("{} {} is not affecting bank account {}").format(
payment_entry.payment_document, payment_entry.payment_entry, gl_bank_account
)
)
allocable_amount = gl_entries.pop(gl_bank_account) or 0
if allocable_amount <= 0.0:
frappe.throw(
_("Invalid amount in accounting entries of {} {} for Account {}: {}").format(
payment_entry.payment_document, payment_entry.payment_entry, gl_bank_account, allocable_amount
)
)
matching_bt_allocaion = bt_allocations.pop(gl_bank_account, {})
allocable_amount = flt(
allocable_amount - matching_bt_allocaion.get("total", 0), transaction.precision("unallocated_amount")
)
should_clear = all(
gl_entries[gle_account] == bt_allocations.get(gle_account, {}).get("total", 0)
for gle_account in gl_entries
)
bt_allocation_date = matching_bt_allocaion.get("latest_date", None)
clearance_date = transaction_date if not bt_allocation_date else max(transaction_date, bt_allocation_date)
return allocable_amount, should_clear, clearance_date
def get_related_bank_gl_entries(doctype, docname):
def get_related_bank_gl_entries(docs):
# nosemgrep: frappe-semgrep-rules.rules.frappe-using-db-sql
return frappe.db.sql(
if not docs:
return {}
result = frappe.db.sql(
"""
SELECT
ABS(gle.credit_in_account_currency - gle.debit_in_account_currency) AS amount,
gle.account AS gl_account
FROM
`tabGL Entry` gle
LEFT JOIN
`tabAccount` ac ON ac.name=gle.account
WHERE
ac.account_type = 'Bank'
AND gle.voucher_type = %(doctype)s
AND gle.voucher_no = %(docname)s
AND is_cancelled = 0
""",
dict(doctype=doctype, docname=docname),
SELECT
gle.voucher_type AS doctype,
gle.voucher_no AS docname,
gle.account AS gl_account,
SUM(ABS(gle.credit_in_account_currency - gle.debit_in_account_currency)) AS amount
FROM
`tabGL Entry` gle
LEFT JOIN
`tabAccount` ac ON ac.name = gle.account
WHERE
ac.account_type = 'Bank'
AND (gle.voucher_type, gle.voucher_no) IN %(docs)s
AND gle.is_cancelled = 0
GROUP BY
gle.voucher_type, gle.voucher_no, gle.account
""",
{"docs": docs},
as_dict=True,
)
entries = {}
for row in result:
key = (row["doctype"], row["docname"])
if key not in entries:
entries[key] = {}
entries[key][row["gl_account"]] = row["amount"]
return entries
def get_total_allocated_amount(docs):
"""
Gets the sum of allocations for a voucher on each bank GL account
along with the latest bank transaction name & date
along with the latest bank transaction date
NOTE: query may also include just saved vouchers/payments but with zero allocated_amount
"""
if not docs:
@@ -311,11 +423,10 @@ def get_total_allocated_amount(docs):
# nosemgrep: frappe-semgrep-rules.rules.frappe-using-db-sql
result = frappe.db.sql(
"""
SELECT total, latest_name, latest_date, gl_account, payment_document, payment_entry FROM (
SELECT total, latest_date, gl_account, payment_document, payment_entry FROM (
SELECT
ROW_NUMBER() OVER w AS rownum,
SUM(btp.allocated_amount) OVER(PARTITION BY ba.account, btp.payment_document, btp.payment_entry) AS total,
FIRST_VALUE(bt.name) OVER w AS latest_name,
FIRST_VALUE(bt.date) OVER w AS latest_date,
ba.account AS gl_account,
btp.payment_document,
@@ -338,104 +449,14 @@ def get_total_allocated_amount(docs):
payment_allocation_details = {}
for row in result:
# Why is this *sometimes* a byte string?
if isinstance(row["latest_name"], bytes):
row["latest_name"] = row["latest_name"].decode()
row["latest_date"] = frappe.utils.getdate(row["latest_date"])
payment_allocation_details.setdefault((row["payment_document"], row["payment_entry"]), []).append(row)
row["latest_date"] = getdate(row["latest_date"])
payment_allocation_details.setdefault((row["payment_document"], row["payment_entry"]), {})[
row["gl_account"]
] = row
return payment_allocation_details
def get_paid_amount(payment_entry, currency, gl_bank_account):
if payment_entry.payment_document in ["Payment Entry", "Sales Invoice", "Purchase Invoice"]:
paid_amount_field = "paid_amount"
if payment_entry.payment_document == "Payment Entry":
doc = frappe.get_doc("Payment Entry", payment_entry.payment_entry)
if doc.payment_type == "Receive":
paid_amount_field = (
"received_amount" if doc.paid_to_account_currency == currency else "base_received_amount"
)
elif doc.payment_type == "Pay":
paid_amount_field = (
"paid_amount" if doc.paid_from_account_currency == currency else "base_paid_amount"
)
return frappe.db.get_value(
payment_entry.payment_document, payment_entry.payment_entry, paid_amount_field
)
elif payment_entry.payment_document == "Journal Entry":
return abs(
frappe.db.get_value(
"Journal Entry Account",
{"parent": payment_entry.payment_entry, "account": gl_bank_account},
"sum(debit_in_account_currency-credit_in_account_currency)",
)
or 0
)
elif payment_entry.payment_document == "Expense Claim":
return frappe.db.get_value(
payment_entry.payment_document, payment_entry.payment_entry, "total_amount_reimbursed"
)
elif payment_entry.payment_document == "Loan Disbursement":
return frappe.db.get_value(
payment_entry.payment_document, payment_entry.payment_entry, "disbursed_amount"
)
elif payment_entry.payment_document == "Loan Repayment":
return frappe.db.get_value(payment_entry.payment_document, payment_entry.payment_entry, "amount_paid")
elif payment_entry.payment_document == "Bank Transaction":
dep, wth = frappe.db.get_value(
"Bank Transaction", payment_entry.payment_entry, ("deposit", "withdrawal")
)
return abs(flt(wth) - flt(dep))
else:
frappe.throw(
f"Please reconcile {payment_entry.payment_document}: {payment_entry.payment_entry} manually"
)
def set_voucher_clearance(doctype, docname, clearance_date, self):
if doctype in get_doctypes_for_bank_reconciliation():
if (
doctype == "Payment Entry"
and frappe.db.get_value("Payment Entry", docname, "payment_type") == "Internal Transfer"
and len(get_reconciled_bank_transactions(doctype, docname)) < 2
):
return
if doctype == "Sales Invoice":
frappe.db.set_value(
"Sales Invoice Payment",
dict(parenttype=doctype, parent=docname),
"clearance_date",
clearance_date,
)
return
frappe.db.set_value(doctype, docname, "clearance_date", clearance_date)
elif doctype == "Bank Transaction":
# For when a second bank transaction has fixed another, e.g. refund
bt = frappe.get_doc(doctype, docname)
if clearance_date:
vouchers = [{"payment_doctype": "Bank Transaction", "payment_name": self.name}]
bt.add_payment_entries(vouchers)
bt.save()
else:
for pe in bt.payment_entries:
if pe.payment_document == self.doctype and pe.payment_entry == self.name:
bt.remove(pe)
bt.save()
break
def get_reconciled_bank_transactions(doctype, docname):
return frappe.get_all(
"Bank Transaction Payments",
@@ -444,13 +465,6 @@ def get_reconciled_bank_transactions(doctype, docname):
)
@frappe.whitelist()
def unclear_reference_payment(doctype, docname, bt_name):
bt = frappe.get_doc("Bank Transaction", bt_name)
set_voucher_clearance(doctype, docname, None, bt)
return docname
def remove_from_bank_transaction(doctype, docname):
"""Remove a (cancelled) voucher from all Bank Transactions."""
for bt_name in get_reconciled_bank_transactions(doctype, docname):

View File

@@ -12,6 +12,9 @@ from erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool
get_linked_payments,
reconcile_vouchers,
)
from erpnext.accounts.doctype.mode_of_payment.test_mode_of_payment import (
set_default_account_for_mode_of_payment,
)
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
@@ -434,15 +437,13 @@ def add_vouchers(gl_account="_Test Bank - _TC"):
except frappe.DuplicateEntryError:
pass
mode_of_payment = frappe.get_doc({"doctype": "Mode of Payment", "name": "Cash"})
mode_of_payment = frappe.get_doc({"doctype": "Mode of Payment", "name": "Wire Transfer"})
if not frappe.db.get_value("Mode of Payment Account", {"company": "_Test Company", "parent": "Cash"}):
mode_of_payment.append("accounts", {"company": "_Test Company", "default_account": gl_account})
mode_of_payment.save()
set_default_account_for_mode_of_payment(mode_of_payment, "_Test Company", gl_account)
si = create_sales_invoice(customer="Fayva", qty=1, rate=109080, do_not_save=1)
si.is_pos = 1
si.append("payments", {"mode_of_payment": "Cash", "account": gl_account, "amount": 109080})
si.append("payments", {"mode_of_payment": "Wire Transfer", "amount": 109080})
si.insert()
si.submit()

View File

@@ -128,7 +128,7 @@ class TestCouponCode(unittest.TestCase):
item_code="_Test Tesla Car",
rate=5000,
qty=1,
do_not_submit=True,
do_not_save=True,
)
self.assertEqual(so.items[0].rate, 5000)

View File

@@ -220,6 +220,7 @@ def get_dunning_letter_text(dunning_type: str, doc: str | dict, language: str |
if not language:
language = doc.get("language")
letter_text = None
if language:
letter_text = frappe.db.get_value(
DOCTYPE, {"parent": dunning_type, "language": language}, FIELDS, as_dict=1

View File

@@ -1,6 +1,9 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import json
import frappe
from frappe.model import mapper
from frappe.tests.utils import FrappeTestCase
from frappe.utils import add_days, nowdate, today
@@ -68,6 +71,36 @@ class TestDunning(FrappeTestCase):
dunning.reload()
self.assertEqual(dunning.status, "Resolved")
def test_fetch_overdue_payments(self):
"""
Create SI with overdue payment. Check if overdue payment is fetched in Dunning.
"""
si1 = create_sales_invoice_against_cost_center(
posting_date=add_days(today(), -1 * 6),
qty=1,
rate=100,
)
si2 = create_sales_invoice_against_cost_center(
posting_date=add_days(today(), -1 * 6),
qty=1,
rate=300,
)
dunning = create_dunning_from_sales_invoice(si1.name)
dunning.overdue_payments = []
method = "erpnext.accounts.doctype.sales_invoice.sales_invoice.create_dunning"
updated_dunning = mapper.map_docs(method, json.dumps([si1.name, si2.name]), dunning)
self.assertEqual(len(updated_dunning.overdue_payments), 2)
self.assertEqual(updated_dunning.overdue_payments[0].sales_invoice, si1.name)
self.assertEqual(updated_dunning.overdue_payments[0].outstanding, si1.outstanding_amount)
self.assertEqual(updated_dunning.overdue_payments[1].sales_invoice, si2.name)
self.assertEqual(updated_dunning.overdue_payments[1].outstanding, si2.outstanding_amount)
def test_dunning_and_payment_against_partially_due_invoice(self):
"""
Create SI with first installment overdue. Check impact of Dunning and Payment Entry.

View File

@@ -279,7 +279,8 @@
{
"fieldname": "transaction_exchange_rate",
"fieldtype": "Float",
"label": "Transaction Exchange Rate"
"label": "Transaction Exchange Rate",
"precision": "9"
},
{
"fieldname": "debit_in_transaction_currency",
@@ -357,7 +358,7 @@
"idx": 1,
"in_create": 1,
"links": [],
"modified": "2024-08-22 13:03:39.997475",
"modified": "2025-02-21 14:36:49.431166",
"modified_by": "Administrator",
"module": "Accounts",
"name": "GL Entry",

View File

@@ -7,7 +7,7 @@ from frappe import _
from frappe.model.document import Document
from frappe.model.meta import get_field_precision
from frappe.model.naming import set_name_from_naming_options
from frappe.utils import flt, fmt_money
from frappe.utils import create_batch, flt, fmt_money, now
import erpnext
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
@@ -129,7 +129,7 @@ class GLEntry(Document):
if not self.get(k):
frappe.throw(_("{0} is required").format(_(self.meta.get_label(k))))
if not (self.party_type and self.party):
if not self.is_cancelled and not (self.party_type and self.party):
account_type = frappe.get_cached_value("Account", self.account, "account_type")
if account_type == "Receivable":
frappe.throw(
@@ -451,12 +451,15 @@ def rename_gle_sle_docs():
def rename_temporarily_named_docs(doctype):
"""Rename temporarily named docs using autoname options"""
docs_to_rename = frappe.get_all(doctype, {"to_rename": "1"}, order_by="creation", limit=50000)
for doc in docs_to_rename:
oldname = doc.name
set_name_from_naming_options(frappe.get_meta(doctype).autoname, doc)
newname = doc.name
frappe.db.sql(
f"UPDATE `tab{doctype}` SET name = %s, to_rename = 0 where name = %s",
(newname, oldname),
auto_commit=True,
)
autoname = frappe.get_meta(doctype).autoname
for batch in create_batch(docs_to_rename, 100):
for doc in batch:
oldname = doc.name
set_name_from_naming_options(autoname, doc)
newname = doc.name
frappe.db.sql(
f"UPDATE `tab{doctype}` SET name = %s, to_rename = 0, modified = %s where name = %s",
(newname, now(), oldname),
)
frappe.db.commit()

View File

@@ -124,3 +124,20 @@ class TestGLEntry(unittest.TestCase):
str(e),
"Party Type and Party can only be set for Receivable / Payable account_Test Account Cost for Goods Sold - _TC",
)
def test_validate_account_party_type_shareholder(self):
jv = make_journal_entry(
"Opening Balance Equity - _TC",
"Cash - _TC",
100,
"_Test Cost Center - _TC",
save=False,
submit=False,
)
for row in jv.accounts:
row.party_type = "Shareholder"
break
jv.save().submit()
self.assertEqual(1, jv.docstatus)

View File

@@ -197,7 +197,7 @@ frappe.ui.form.on("Invoice Discounting", {
from_date: frm.doc.posting_date,
to_date: moment(frm.doc.modified).format("YYYY-MM-DD"),
company: frm.doc.company,
group_by: "Group by Voucher (Consolidated)",
categorize_by: "Categorize by Voucher (Consolidated)",
show_cancelled_entries: frm.doc.docstatus === 2,
};
frappe.set_route("query-report", "General Ledger");

View File

@@ -35,7 +35,7 @@ frappe.ui.form.on("Journal Entry", {
to_date: moment(frm.doc.modified).format("YYYY-MM-DD"),
company: frm.doc.company,
finance_book: frm.doc.finance_book,
group_by: "",
categorize_by: "",
show_cancelled_entries: frm.doc.docstatus === 2,
};
frappe.set_route("query-report", "General Ledger");
@@ -430,12 +430,6 @@ frappe.ui.form.on("Journal Entry Account", {
});
}
},
cost_center: function (frm, dt, dn) {
// Don't reset for Gain/Loss type journals, as it will make Debit and Credit values '0'
if (frm.doc.voucher_type != "Exchange Gain Or Loss") {
erpnext.journal_entry.set_account_details(frm, dt, dn);
}
},
account: function (frm, dt, dn) {
erpnext.journal_entry.set_account_details(frm, dt, dn);

View File

@@ -141,6 +141,7 @@ class JournalEntry(AccountsController):
self.validate_empty_accounts_table()
self.validate_inter_company_accounts()
self.validate_depr_entry_voucher_type()
self.validate_company_in_accounting_dimension()
self.validate_advance_accounts()
if self.docstatus == 0:
@@ -249,11 +250,20 @@ class JournalEntry(AccountsController):
def validate_inter_company_accounts(self):
if self.voucher_type == "Inter Company Journal Entry" and self.inter_company_journal_entry_reference:
doc = frappe.get_doc("Journal Entry", self.inter_company_journal_entry_reference)
doc = frappe.db.get_value(
"Journal Entry",
self.inter_company_journal_entry_reference,
["company", "total_debit", "total_credit"],
as_dict=True,
)
account_currency = frappe.get_cached_value("Company", self.company, "default_currency")
previous_account_currency = frappe.get_cached_value("Company", doc.company, "default_currency")
if account_currency == previous_account_currency:
if self.total_credit != doc.total_debit or self.total_debit != doc.total_credit:
credit_precision = self.precision("total_credit")
debit_precision = self.precision("total_debit")
if (flt(self.total_credit, credit_precision) != flt(doc.total_debit, debit_precision)) or (
flt(self.total_debit, debit_precision) != flt(doc.total_credit, credit_precision)
):
frappe.throw(_("Total Credit/ Debit Amount should be same as linked Journal Entry"))
def validate_depr_entry_voucher_type(self):
@@ -575,8 +585,22 @@ class JournalEntry(AccountsController):
if customers:
from erpnext.selling.doctype.customer.customer import check_credit_limit
customer_details = frappe._dict(
frappe.db.get_all(
"Customer Credit Limit",
filters={
"parent": ["in", customers],
"parenttype": ["=", "Customer"],
"company": ["=", self.company],
},
fields=["parent", "bypass_credit_limit_check"],
as_list=True,
)
)
for customer in customers:
check_credit_limit(customer, self.company)
ignore_outstanding_sales_order = bool(customer_details.get(customer))
check_credit_limit(customer, self.company, ignore_outstanding_sales_order)
def validate_cheque_info(self):
if self.voucher_type in ["Bank Entry"]:
@@ -1059,14 +1083,15 @@ class JournalEntry(AccountsController):
gl_map = []
company_currency = erpnext.get_company_currency(self.company)
self.transaction_currency = company_currency
self.transaction_exchange_rate = 1
if self.multi_currency:
for row in self.get("accounts"):
if row.account_currency != company_currency:
self.currency = row.account_currency
self.conversion_rate = row.exchange_rate
# Journal assumes the first foreign currency as transaction currency
self.transaction_currency = row.account_currency
self.transaction_exchange_rate = row.exchange_rate
break
else:
self.currency = company_currency
for d in self.get("accounts"):
if d.debit or d.credit or (self.voucher_type == "Exchange Gain Or Loss"):
@@ -1091,6 +1116,18 @@ class JournalEntry(AccountsController):
"credit_in_account_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
),
"transaction_currency": self.transaction_currency,
"transaction_exchange_rate": self.transaction_exchange_rate,
"debit_in_transaction_currency": flt(
d.debit_in_account_currency, d.precision("debit_in_account_currency")
)
if self.transaction_currency == d.account_currency
else flt(d.debit, d.precision("debit")) / self.transaction_exchange_rate,
"credit_in_transaction_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
)
if self.transaction_currency == d.account_currency
else flt(d.credit, d.precision("credit")) / self.transaction_exchange_rate,
"against_voucher_type": d.reference_type,
"against_voucher": d.reference_name,
"remarks": remarks,

View File

@@ -146,10 +146,9 @@ class TestJournalEntry(unittest.TestCase):
"credit_in_account_currency": 0 if diff > 0 else abs(diff),
},
)
jv.insert()
if account_bal == stock_bal:
self.assertRaises(StockAccountInvalidTransaction, jv.submit)
self.assertRaises(StockAccountInvalidTransaction, jv.save)
frappe.db.rollback()
else:
jv.submit()
@@ -576,7 +575,7 @@ class TestJournalEntry(unittest.TestCase):
order_by="account",
)
expected = [
{"account": "_Test Bank - _TC", "transaction_exchange_rate": 1.0},
{"account": "_Test Bank - _TC", "transaction_exchange_rate": 85.0},
{"account": "_Test Receivable USD - _TC", "transaction_exchange_rate": 85.0},
]
self.assertEqual(expected, actual)
@@ -592,13 +591,14 @@ def make_journal_entry(
save=True,
submit=False,
project=None,
company=None,
):
if not cost_center:
cost_center = "_Test Cost Center - _TC"
jv = frappe.new_doc("Journal Entry")
jv.posting_date = posting_date or nowdate()
jv.company = "_Test Company"
jv.company = company or "_Test Company"
jv.user_remark = "test"
jv.multi_currency = 1
jv.set(

View File

@@ -168,8 +168,9 @@ def validate_loyalty_points(ref_doc, points_to_redeem):
loyalty_amount = flt(points_to_redeem * loyalty_program_details.conversion_factor)
if loyalty_amount > ref_doc.rounded_total:
frappe.throw(_("You can't redeem Loyalty Points having more value than the Rounded Total."))
total_amount = ref_doc.grand_total if ref_doc.is_rounded_total_disabled() else ref_doc.rounded_total
if loyalty_amount > total_amount:
frappe.throw(_("You can't redeem Loyalty Points having more value than the Total Amount."))
if not ref_doc.loyalty_amount and ref_doc.loyalty_amount != loyalty_amount:
ref_doc.loyalty_amount = loyalty_amount

View File

@@ -3,8 +3,25 @@
import unittest
# test_records = frappe.get_test_records('Mode of Payment')
import frappe
class TestModeofPayment(unittest.TestCase):
pass
def set_default_account_for_mode_of_payment(mode_of_payment, company, account):
mode_of_payment.reload()
if frappe.db.exists(
"Mode of Payment Account", {"parent": mode_of_payment.mode_of_payment, "company": company}
):
frappe.db.set_value(
"Mode of Payment Account",
{"parent": mode_of_payment.mode_of_payment, "company": company},
"default_account",
account,
)
return
mode_of_payment.append("accounts", {"company": company, "default_account": account})
mode_of_payment.save()

View File

@@ -258,6 +258,10 @@ frappe.ui.form.on("Payment Entry", {
frappe.flags.allocate_payment_amount = true;
},
validate: async function (frm) {
await frm.events.set_exchange_gain_loss_deduction(frm);
},
validate_company: (frm) => {
if (!frm.doc.company) {
frappe.throw({ message: __("Please select a Company first."), title: __("Mandatory") });
@@ -407,7 +411,7 @@ frappe.ui.form.on("Payment Entry", {
from_date: frm.doc.posting_date,
to_date: moment(frm.doc.modified).format("YYYY-MM-DD"),
company: frm.doc.company,
group_by: "",
categorize_by: "",
show_cancelled_entries: frm.doc.docstatus === 2,
};
frappe.set_route("query-report", "General Ledger");
@@ -812,27 +816,41 @@ frappe.ui.form.on("Payment Entry", {
paid_amount: function (frm) {
frm.set_value("base_paid_amount", flt(frm.doc.paid_amount) * flt(frm.doc.source_exchange_rate));
let company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
if (!frm.doc.received_amount) {
if (frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency) {
frm.set_value("received_amount", frm.doc.paid_amount);
} else if (company_currency == frm.doc.paid_to_account_currency) {
frm.set_value("received_amount", frm.doc.base_paid_amount);
frm.set_value("base_received_amount", frm.doc.base_paid_amount);
}
}
frm.trigger("reset_received_amount");
frm.events.hide_unhide_fields(frm);
},
received_amount: function (frm) {
let company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
frm.set_paid_amount_based_on_received_amount = true;
if (!frm.doc.paid_amount && frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency) {
frm.set_value("paid_amount", frm.doc.received_amount);
if (frm.doc.target_exchange_rate) {
frm.set_value("source_exchange_rate", frm.doc.target_exchange_rate);
}
frm.set_value("base_paid_amount", frm.doc.base_received_amount);
}
frm.set_value(
"base_received_amount",
flt(frm.doc.received_amount) * flt(frm.doc.target_exchange_rate)
);
if (!frm.doc.paid_amount) {
if (frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency) {
frm.set_value("paid_amount", frm.doc.received_amount);
if (frm.doc.target_exchange_rate) {
frm.set_value("source_exchange_rate", frm.doc.target_exchange_rate);
}
frm.set_value("base_paid_amount", frm.doc.base_received_amount);
} else if (company_currency == frm.doc.paid_from_account_currency) {
frm.set_value("paid_amount", frm.doc.base_received_amount);
frm.set_value("base_paid_amount", frm.doc.base_received_amount);
}
}
if (frm.doc.payment_type == "Pay")
frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.received_amount, true);
else frm.events.set_unallocated_amount(frm);
@@ -1879,8 +1897,6 @@ function prompt_for_missing_account(frm, account) {
(values) => resolve(values?.[account]),
__("Please Specify Account")
);
dialog.on_hide = () => resolve("");
});
}

View File

@@ -21,7 +21,6 @@
"party_name",
"book_advance_payments_in_separate_party_account",
"reconcile_on_advance_payment_date",
"advance_reconciliation_takes_effect_on",
"column_break_11",
"bank_account",
"party_bank_account",
@@ -203,14 +202,14 @@
"fieldtype": "Column Break"
},
{
"depends_on": "party",
"depends_on": "eval: doc.party && doc.party_type !== \"Employee\"",
"fieldname": "contact_person",
"fieldtype": "Link",
"label": "Contact",
"options": "Contact"
},
{
"depends_on": "contact_person",
"depends_on": "eval: (doc.contact_person || doc.party_type === \"Employee\") && doc.contact_email",
"fieldname": "contact_email",
"fieldtype": "Data",
"label": "Email",
@@ -224,10 +223,12 @@
"label": "Accounts"
},
{
"allow_on_submit": 1,
"depends_on": "party",
"fieldname": "party_balance",
"fieldtype": "Currency",
"label": "Party Balance",
"no_copy": 1,
"print_hide": 1,
"read_only": 1
},
@@ -253,6 +254,7 @@
"reqd": 1
},
{
"allow_on_submit": 1,
"depends_on": "paid_from",
"fieldname": "paid_from_account_balance",
"fieldtype": "Currency",
@@ -286,6 +288,7 @@
"reqd": 1
},
{
"allow_on_submit": 1,
"depends_on": "paid_to",
"fieldname": "paid_to_account_balance",
"fieldtype": "Currency",
@@ -783,18 +786,9 @@
"options": "No\nYes",
"print_hide": 1,
"search_index": 1
},
{
"default": "Oldest Of Invoice Or Advance",
"fetch_from": "company.reconciliation_takes_effect_on",
"fieldname": "advance_reconciliation_takes_effect_on",
"fieldtype": "Select",
"hidden": 1,
"label": "Advance Reconciliation Takes Effect On",
"no_copy": 1,
"options": "Advance Payment Date\nOldest Of Invoice Or Advance\nReconciliation Date"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [
@@ -806,7 +800,7 @@
"table_fieldname": "payment_entries"
}
],
"modified": "2025-01-13 16:03:47.169699",
"modified": "2025-05-15 18:01:04.013025",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
@@ -846,6 +840,7 @@
"write": 1
}
],
"row_format": "Dynamic",
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",

File diff suppressed because it is too large Load Diff

View File

@@ -49,6 +49,8 @@ class TestPaymentEntry(FrappeTestCase):
pe.insert()
pe.submit()
self.assertEqual(pe.paid_to_account_type, "Cash")
expected_gle = dict(
(d[0], d) for d in [["Debtors - _TC", 0, 1000, so.name], ["_Test Cash - _TC", 1000.0, 0, None]]
)
@@ -282,6 +284,48 @@ class TestPaymentEntry(FrappeTestCase):
self.assertEqual(si.payment_schedule[0].paid_amount, 200.0)
self.assertEqual(si.payment_schedule[1].paid_amount, 36.0)
def test_payment_entry_against_payment_terms_with_discount_on_pi(self):
pi = make_purchase_invoice(do_not_save=1)
create_payment_terms_template_with_discount()
pi.payment_terms_template = "Test Discount Template"
frappe.db.set_value("Company", pi.company, "default_discount_account", "Write Off - _TC")
pi.append(
"taxes",
{
"charge_type": "On Net Total",
"account_head": "_Test Account Service Tax - _TC",
"cost_center": "_Test Cost Center - _TC",
"description": "Service Tax",
"rate": 18,
},
)
pi.save()
pi.submit()
frappe.db.set_single_value("Accounts Settings", "book_tax_discount_loss", 1)
pe_with_tax_loss = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Cash - _TC")
self.assertEqual(pe_with_tax_loss.references[0].payment_term, "30 Credit Days with 10% Discount")
self.assertEqual(pe_with_tax_loss.payment_type, "Pay")
self.assertEqual(pe_with_tax_loss.references[0].allocated_amount, 295.0)
self.assertEqual(pe_with_tax_loss.paid_amount, 265.5)
self.assertEqual(pe_with_tax_loss.difference_amount, 0)
self.assertEqual(pe_with_tax_loss.deductions[0].amount, -25.0) # Loss on Income
self.assertEqual(pe_with_tax_loss.deductions[1].amount, -4.5) # Loss on Tax
self.assertEqual(pe_with_tax_loss.deductions[1].account, "_Test Account Service Tax - _TC")
frappe.db.set_single_value("Accounts Settings", "book_tax_discount_loss", 0)
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Cash - _TC")
self.assertEqual(pe.references[0].payment_term, "30 Credit Days with 10% Discount")
self.assertEqual(pe.payment_type, "Pay")
self.assertEqual(pe.references[0].allocated_amount, 295.0)
self.assertEqual(pe.paid_amount, 265.5)
self.assertEqual(pe.deductions[0].amount, -29.5)
self.assertEqual(pe.difference_amount, 0)
def test_payment_entry_against_payment_terms_with_discount(self):
si = create_sales_invoice(do_not_save=1, qty=1, rate=200)
create_payment_terms_template_with_discount()
@@ -518,6 +562,8 @@ class TestPaymentEntry(FrappeTestCase):
pe.insert()
pe.submit()
self.assertEqual(pe.paid_from_account_type, "Bank")
outstanding_amount, status = frappe.db.get_value(
"Purchase Invoice", pi.name, ["outstanding_amount", "status"]
)

View File

@@ -335,6 +335,7 @@ class PaymentReconciliation(Document):
for payment in non_reconciled_payments:
row = self.append("payments", {})
row.update(payment)
row.is_advance = payment.book_advance_payments_in_separate_party_account
def get_invoice_entries(self):
# Fetch JVs, Sales and Purchase Invoices for 'invoices' to reconcile against
@@ -424,6 +425,9 @@ class PaymentReconciliation(Document):
def allocate_entries(self, args):
self.validate_entries()
exc_gain_loss_posting_date = frappe.db.get_single_value(
"Accounts Settings", "exchange_gain_loss_posting_date", cache=True
)
invoice_exchange_map = self.get_invoice_exchange_map(args.get("invoices"), args.get("payments"))
default_exchange_gain_loss_account = frappe.get_cached_value(
"Company", self.company, "exchange_gain_loss_account"
@@ -450,6 +454,11 @@ class PaymentReconciliation(Document):
res.difference_account = default_exchange_gain_loss_account
res.exchange_rate = inv.get("exchange_rate")
res.update({"gain_loss_posting_date": pay.get("posting_date")})
if not pay.get("is_advance"):
if exc_gain_loss_posting_date == "Invoice":
res.update({"gain_loss_posting_date": inv.get("invoice_date")})
elif exc_gain_loss_posting_date == "Reconciliation Date":
res.update({"gain_loss_posting_date": nowdate()})
if pay.get("amount") == 0:
entries.append(res)

View File

@@ -1,9 +1,9 @@
import json
import frappe
from frappe import _, qb
from frappe import _
from frappe.model.document import Document
from frappe.query_builder.functions import Abs, Sum
from frappe.query_builder.functions import Sum
from frappe.utils import flt, nowdate
from frappe.utils.background_jobs import enqueue
@@ -12,7 +12,6 @@ from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
get_accounting_dimensions,
)
from erpnext.accounts.doctype.payment_entry.payment_entry import (
get_company_defaults,
get_payment_entry,
)
from erpnext.accounts.doctype.subscription_plan.subscription_plan import get_plan_rate
@@ -120,13 +119,13 @@ class PaymentRequest(Document):
title=_("Invalid Amount"),
)
existing_payment_request_amount = flt(
get_existing_payment_request_amount(self.reference_doctype, self.reference_name)
)
ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
if not hasattr(ref_doc, "order_type") or ref_doc.order_type != "Shopping Cart":
ref_amount = get_amount(ref_doc, self.payment_account)
if not ref_amount:
frappe.throw(_("Payment Entry is already created"))
existing_payment_request_amount = flt(get_existing_payment_request_amount(ref_doc))
if existing_payment_request_amount + flt(self.grand_total) > ref_amount:
frappe.throw(
@@ -313,6 +312,7 @@ class PaymentRequest(Document):
"payer_name": data.customer_name,
"order_id": self.name,
"currency": self.currency,
"payment_gateway": self.payment_gateway,
}
)
@@ -543,6 +543,8 @@ def make_payment_request(**args):
gateway_account = get_gateway_details(args) or frappe._dict()
grand_total = get_amount(ref_doc, gateway_account.get("payment_account"))
if not grand_total:
frappe.throw(_("Payment Entry is already created"))
if args.loyalty_points and args.dt == "Sales Order":
from erpnext.accounts.doctype.loyalty_program.loyalty_program import validate_loyalty_points
@@ -553,19 +555,8 @@ def make_payment_request(**args):
frappe.db.set_value("Sales Order", args.dn, "loyalty_amount", loyalty_amount, update_modified=False)
grand_total = grand_total - loyalty_amount
bank_account = (
get_party_bank_account(args.get("party_type"), args.get("party")) if args.get("party_type") else ""
)
draft_payment_request = frappe.db.get_value(
"Payment Request",
{"reference_doctype": args.dt, "reference_name": args.dn, "docstatus": 0},
)
# fetches existing payment request `grand_total` amount
existing_payment_request_amount = get_existing_payment_request_amount(ref_doc.doctype, ref_doc.name)
existing_paid_amount = get_existing_paid_amount(ref_doc.doctype, ref_doc.name)
existing_payment_request_amount = get_existing_payment_request_amount(ref_doc)
def validate_and_calculate_grand_total(grand_total, existing_payment_request_amount):
grand_total -= existing_payment_request_amount
@@ -577,7 +568,7 @@ def make_payment_request(**args):
if args.order_type == "Shopping Cart":
# If Payment Request is in an advanced stage, then create for remaining amount.
if get_existing_payment_request_amount(
ref_doc.doctype, ref_doc.name, ["Initiated", "Partially Paid", "Payment Ordered", "Paid"]
ref_doc, ["Initiated", "Partially Paid", "Payment Ordered", "Paid"]
):
grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount)
else:
@@ -586,14 +577,10 @@ def make_payment_request(**args):
else:
grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount)
if existing_paid_amount:
if ref_doc.party_account_currency == ref_doc.currency:
if ref_doc.conversion_rate:
grand_total -= flt(existing_paid_amount / ref_doc.conversion_rate)
else:
grand_total -= flt(existing_paid_amount)
else:
grand_total -= flt(existing_paid_amount / ref_doc.conversion_rate)
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(
@@ -601,6 +588,11 @@ def make_payment_request(**args):
)
pr = frappe.get_doc("Payment Request", draft_payment_request)
else:
bank_account = (
get_party_bank_account(args.get("party_type"), args.get("party"))
if args.get("party_type")
else ""
)
pr = frappe.new_doc("Payment Request")
if not args.get("payment_request_type"):
@@ -674,22 +666,40 @@ def make_payment_request(**args):
def get_amount(ref_doc, payment_account=None):
"""get amount based on doctype"""
grand_total = 0
dt = ref_doc.doctype
if dt in ["Sales Order", "Purchase Order"]:
grand_total = flt(ref_doc.rounded_total) or flt(ref_doc.grand_total)
advance_amount = flt(ref_doc.advance_paid)
if ref_doc.party_account_currency != ref_doc.currency:
advance_amount = flt(flt(ref_doc.advance_paid) / ref_doc.conversion_rate)
grand_total = (flt(ref_doc.rounded_total) or flt(ref_doc.grand_total)) - advance_amount
elif dt in ["Sales Invoice", "Purchase Invoice"]:
if not ref_doc.get("is_pos"):
if (
dt == "Sales Invoice"
and ref_doc.is_pos
and ref_doc.payments
and any(
[
payment.type == "Phone" and payment.account == payment_account
for payment in ref_doc.payments
]
)
):
grand_total = sum(
[
payment.amount
for payment in ref_doc.payments
if payment.type == "Phone" and payment.account == payment_account
]
)
else:
if ref_doc.party_account_currency == ref_doc.currency:
grand_total = flt(ref_doc.rounded_total or ref_doc.grand_total)
grand_total = flt(ref_doc.outstanding_amount)
else:
grand_total = flt(
flt(ref_doc.base_rounded_total or ref_doc.base_grand_total) / ref_doc.conversion_rate
)
elif dt == "Sales Invoice":
for pay in ref_doc.payments:
if pay.type == "Phone" and pay.account == payment_account:
grand_total = pay.amount
break
grand_total = flt(flt(ref_doc.outstanding_amount) / ref_doc.conversion_rate)
elif dt == "POS Invoice":
for pay in ref_doc.payments:
if pay.type == "Phone" and pay.account == payment_account:
@@ -698,10 +708,7 @@ def get_amount(ref_doc, payment_account=None):
elif dt == "Fees":
grand_total = ref_doc.outstanding_amount
if grand_total > 0:
return flt(grand_total, get_currency_precision())
else:
frappe.throw(_("Payment Entry is already created"))
return flt(grand_total, get_currency_precision()) if grand_total > 0 else 0
def get_irequest_status(payment_requests: None | list = None) -> list:
@@ -744,7 +751,7 @@ def cancel_old_payment_requests(ref_dt, ref_dn):
frappe.db.set_value("Integration Request", ireq.name, "status", "Cancelled")
def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None = None) -> list:
def get_existing_payment_request_amount(ref_doc, statuses: list | None = None) -> list:
"""
Return the total amount of Payment Requests against a reference document.
"""
@@ -752,9 +759,9 @@ def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None =
query = (
frappe.qb.from_(PR)
.select(Sum(PR.grand_total))
.where(PR.reference_doctype == ref_dt)
.where(PR.reference_name == ref_dn)
.select(Sum(PR.outstanding_amount))
.where(PR.reference_doctype == ref_doc.doctype)
.where(PR.reference_name == ref_doc.name)
.where(PR.docstatus == 1)
)
@@ -763,30 +770,12 @@ def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None =
response = query.run()
return response[0][0] if response[0] else 0
os_amount_in_transaction_currency = flt(response[0][0] if response[0] else 0)
if ref_doc.currency != ref_doc.party_account_currency:
os_amount_in_transaction_currency = flt(os_amount_in_transaction_currency / ref_doc.conversion_rate)
def get_existing_paid_amount(doctype, name):
PL = frappe.qb.DocType("Payment Ledger Entry")
PER = frappe.qb.DocType("Payment Entry Reference")
query = (
frappe.qb.from_(PL)
.left_join(PER)
.on(
(PER.reference_doctype == PL.against_voucher_type) & (PER.reference_name == PL.against_voucher_no)
)
.select(Abs(Sum(PL.amount)).as_("total_paid_amount"))
.where(PL.against_voucher_type.eq(doctype))
.where(PL.against_voucher_no.eq(name))
.where(PL.amount < 0)
.where(PL.delinked == 0)
.where(PER.docstatus == 1)
.where(PER.payment_request.isnull())
)
response = query.run()
return response[0][0] if response[0] else 0
return os_amount_in_transaction_currency
def get_gateway_details(args): # nosemgrep

View File

@@ -83,8 +83,7 @@ class TestPaymentRequest(FrappeTestCase):
def test_payment_entry_against_purchase_invoice(self):
si_usd = make_purchase_invoice(
customer="_Test Supplier USD",
debit_to="_Test Payable USD - _TC",
supplier="_Test Supplier USD",
currency="USD",
conversion_rate=50,
)
@@ -108,8 +107,7 @@ class TestPaymentRequest(FrappeTestCase):
def test_multiple_payment_entry_against_purchase_invoice(self):
purchase_invoice = make_purchase_invoice(
customer="_Test Supplier USD",
debit_to="_Test Payable USD - _TC",
supplier="_Test Supplier USD",
currency="USD",
conversion_rate=50,
)
@@ -315,6 +313,16 @@ class TestPaymentRequest(FrappeTestCase):
self.assertEqual(pr.outstanding_amount, 800)
self.assertEqual(pr.grand_total, 1000)
self.assertRaisesRegex(
frappe.exceptions.ValidationError,
re.compile(r"Payment Request is already created"),
make_payment_request,
dt="Sales Order",
dn=so.name,
mute_email=1,
submit_doc=1,
return_doc=1,
)
# complete payment
pe = pr.create_payment_entry()
@@ -333,7 +341,7 @@ class TestPaymentRequest(FrappeTestCase):
# creating a more payment Request must not allowed
self.assertRaisesRegex(
frappe.exceptions.ValidationError,
re.compile(r"Payment Request is already created"),
re.compile(r"Payment Entry is already created"),
make_payment_request,
dt="Sales Order",
dn=so.name,
@@ -363,6 +371,17 @@ class TestPaymentRequest(FrappeTestCase):
self.assertEqual(pr.party_account_currency, "INR")
self.assertEqual(pr.status, "Initiated")
self.assertRaisesRegex(
frappe.exceptions.ValidationError,
re.compile(r"Payment Request is already created"),
make_payment_request,
dt="Purchase Invoice",
dn=pi.name,
mute_email=1,
submit_doc=1,
return_doc=1,
)
# to make partial payment
pe = pr.create_payment_entry(submit=False)
pe.paid_amount = 2000
@@ -391,7 +410,7 @@ class TestPaymentRequest(FrappeTestCase):
# creating a more payment Request must not allowed
self.assertRaisesRegex(
frappe.exceptions.ValidationError,
re.compile(r"Payment Request is already created"),
re.compile(r"Payment Entry is already created"),
make_payment_request,
dt="Purchase Invoice",
dn=pi.name,
@@ -544,6 +563,73 @@ class TestPaymentRequest(FrappeTestCase):
self.assertEqual(pr.grand_total, si.outstanding_amount)
def test_partial_paid_invoice_with_more_payment_entry(self):
pi = make_purchase_invoice(currency="INR", qty=1, rate=500)
pi.submit()
pi_1 = make_purchase_invoice(currency="INR", qty=1, rate=300)
pi_1.submit()
pr = make_payment_request(dt="Purchase Invoice", dn=pi.name, mute_email=1, submit_doc=0, return_doc=1)
pr.grand_total = 200
pr.submit()
pr.create_payment_entry()
pr_1 = make_payment_request(
dt="Purchase Invoice", dn=pi.name, mute_email=1, submit_doc=0, return_doc=1
)
pr_1.grand_total = 200
pr_1.submit()
pr_1.create_payment_entry()
pe = get_payment_entry(dt="Purchase Invoice", dn=pi.name)
pe.paid_amount = 200
pe.references[0].reference_doctype = pi.doctype
pe.references[0].reference_name = pi.name
pe.references[0].grand_total = pi.grand_total
pe.references[0].outstanding_amount = pi.outstanding_amount
pe.references[0].allocated_amount = 100
pe.append(
"references",
{
"reference_doctype": pi_1.doctype,
"reference_name": pi_1.name,
"grand_total": pi_1.grand_total,
"outstanding_amount": pi_1.outstanding_amount,
"allocated_amount": 100,
},
)
pr_2 = make_payment_request(dt="Purchase Invoice", dn=pi.name, mute_email=1)
pi.load_from_db()
self.assertEqual(pr_2.grand_total, pi.outstanding_amount)
def test_consider_journal_entry_and_return_invoice(self):
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
si = create_sales_invoice(currency="INR", qty=5, rate=500)
je = make_journal_entry("_Test Cash - _TC", "Debtors - _TC", 500, save=False)
je.accounts[1].party_type = "Customer"
je.accounts[1].party = si.customer
je.accounts[1].reference_type = "Sales Invoice"
je.accounts[1].reference_name = si.name
je.accounts[1].credit_in_account_currency = 500
je.submit()
pe = get_payment_entry("Sales Invoice", si.name)
pe.paid_amount = 500
pe.references[0].allocated_amount = 500
pe.save()
pe.submit()
cr_note = create_sales_invoice(qty=-1, rate=500, is_return=1, return_against=si.name, do_not_save=1)
cr_note.update_outstanding_for_self = 0
cr_note.save()
cr_note.submit()
si.load_from_db()
pr = make_payment_request(dt="Sales Invoice", dn=si.name, mute_email=1)
self.assertEqual(pr.grand_total, si.outstanding_amount)
def test_partial_paid_invoice_with_submitted_payment_entry(self):
pi = make_purchase_invoice(currency="INR", qty=1, rate=5000)

View File

@@ -24,7 +24,9 @@
"paid_amount",
"discounted_amount",
"column_break_3",
"base_payment_amount"
"base_payment_amount",
"base_outstanding",
"base_paid_amount"
],
"fields": [
{
@@ -155,19 +157,35 @@
"fieldtype": "Currency",
"label": "Payment Amount (Company Currency)",
"options": "Company:company:default_currency"
},
{
"fieldname": "base_outstanding",
"fieldtype": "Currency",
"label": "Outstanding (Company Currency)",
"options": "Company:company:default_currency",
"read_only": 1
},
{
"depends_on": "base_paid_amount",
"fieldname": "base_paid_amount",
"fieldtype": "Currency",
"label": "Paid Amount (Company Currency)",
"options": "Company:company:default_currency",
"read_only": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2022-09-16 13:57:06.382859",
"modified": "2025-03-11 11:06:51.792982",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Schedule",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"sort_field": "modified",
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1

View File

@@ -14,6 +14,8 @@ class PaymentSchedule(Document):
if TYPE_CHECKING:
from frappe.types import DF
base_outstanding: DF.Currency
base_paid_amount: DF.Currency
base_payment_amount: DF.Currency
description: DF.SmallText | None
discount: DF.Float

View File

@@ -47,7 +47,7 @@ frappe.ui.form.on("Period Closing Voucher", {
from_date: frm.doc.posting_date,
to_date: moment(frm.doc.modified).format("YYYY-MM-DD"),
company: frm.doc.company,
group_by: "",
categorize_by: "",
show_cancelled_entries: frm.doc.docstatus === 2,
};
frappe.set_route("query-report", "General Ledger");

View File

@@ -133,13 +133,18 @@ class PeriodClosingVoucher(AccountsController):
self.make_gl_entries()
def on_cancel(self):
self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry", "Payment Ledger Entry")
self.ignore_linked_doctypes = (
"GL Entry",
"Stock Ledger Entry",
"Payment Ledger Entry",
"Account Closing Balance",
)
self.block_if_future_closing_voucher_exists()
self.db_set("gle_processing_status", "In Progress")
self.cancel_gl_entries()
def make_gl_entries(self):
if self.get_gle_count_in_selected_period() > 5000:
if frappe.db.estimate_count("GL Entry") > 100_000:
frappe.enqueue(
process_gl_and_closing_entries,
doc=self,
@@ -154,16 +159,6 @@ class PeriodClosingVoucher(AccountsController):
else:
process_gl_and_closing_entries(self)
def get_gle_count_in_selected_period(self):
return frappe.db.count(
"GL Entry",
{
"posting_date": ["between", [self.period_start_date, self.period_end_date]],
"company": self.company,
"is_cancelled": 0,
},
)
def get_pcv_gl_entries(self):
self.pl_accounts_reverse_gle = []
self.closing_account_gle = []

View File

@@ -27,6 +27,7 @@ class TestPeriodClosingVoucher(unittest.TestCase):
account1="Cash - TPC",
account2="Sales - TPC",
cost_center=cost_center,
company=company,
save=False,
)
jv1.company = company
@@ -39,6 +40,7 @@ class TestPeriodClosingVoucher(unittest.TestCase):
account1="Cost of Goods Sold - TPC",
account2="Cash - TPC",
cost_center=cost_center,
company=company,
save=False,
)
jv2.company = company
@@ -156,6 +158,7 @@ class TestPeriodClosingVoucher(unittest.TestCase):
amount=400,
cost_center=cost_center,
posting_date="2021-03-15",
company=company,
)
jv.company = company
jv.finance_book = create_finance_book().name
@@ -198,6 +201,7 @@ class TestPeriodClosingVoucher(unittest.TestCase):
account1="Cash - TPC",
account2="Sales - TPC",
cost_center=cost_center,
company=company,
save=False,
)
jv1.company = company
@@ -220,6 +224,7 @@ class TestPeriodClosingVoucher(unittest.TestCase):
account1="Cash - TPC",
account2="Sales - TPC",
cost_center=cost_center1,
company=company,
save=False,
)
jv1.company = company
@@ -232,6 +237,7 @@ class TestPeriodClosingVoucher(unittest.TestCase):
account1="Cash - TPC",
account2="Sales - TPC",
cost_center=cost_center2,
company=company,
save=False,
)
jv2.company = company
@@ -261,6 +267,7 @@ class TestPeriodClosingVoucher(unittest.TestCase):
account1="Cash - TPC",
account2="Sales - TPC",
cost_center=cost_center2,
company=company,
save=False,
)

View File

@@ -124,6 +124,11 @@ class POSClosingEntry(StatusUpdater):
def on_submit(self):
consolidate_pos_invoices(closing_entry=self)
frappe.publish_realtime(
f"poe_{self.pos_opening_entry}_closed",
self,
docname=f"POS Opening Entry/{self.pos_opening_entry}",
)
def on_cancel(self):
unconsolidate_pos_invoices(closing_entry=self)

View File

@@ -39,10 +39,12 @@ class TestPOSClosingEntry(unittest.TestCase):
pos_inv1 = create_pos_invoice(rate=3500, do_not_submit=1)
pos_inv1.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3500})
pos_inv1.save()
pos_inv1.submit()
pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1)
pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200})
pos_inv2.save()
pos_inv2.submit()
pcv_doc = make_closing_entry_from_opening(opening_entry)
@@ -68,6 +70,7 @@ class TestPOSClosingEntry(unittest.TestCase):
pos_inv = create_pos_invoice(rate=3500, do_not_submit=1, item_name="Test Item", without_item_code=1)
pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3500})
pos_inv.save()
pos_inv.submit()
pcv_doc = make_closing_entry_from_opening(opening_entry)
@@ -86,10 +89,12 @@ class TestPOSClosingEntry(unittest.TestCase):
pos_inv1 = create_pos_invoice(rate=3500, do_not_submit=1)
pos_inv1.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3500})
pos_inv1.save()
pos_inv1.submit()
pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1)
pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200})
pos_inv2.save()
pos_inv2.submit()
# make return entry of pos_inv2
@@ -111,10 +116,12 @@ class TestPOSClosingEntry(unittest.TestCase):
pos_inv1 = create_pos_invoice(rate=3500, do_not_submit=1)
pos_inv1.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3500})
pos_inv1.save()
pos_inv1.submit()
pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1)
pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200})
pos_inv2.save()
pos_inv2.submit()
pcv_doc = make_closing_entry_from_opening(opening_entry)
@@ -165,6 +172,7 @@ class TestPOSClosingEntry(unittest.TestCase):
opening_entry = create_opening_entry(pos_profile, test_user.name)
pos_inv1 = create_pos_invoice(rate=350, do_not_submit=1, pos_profile=pos_profile.name)
pos_inv1.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3500})
pos_inv1.save()
pos_inv1.submit()
# if in between a mandatory accounting dimension is added to the POS Profile then
@@ -218,14 +226,27 @@ class TestPOSClosingEntry(unittest.TestCase):
opening_entry = create_opening_entry(pos_profile, test_user.name)
pos_inv = create_pos_invoice(
item_code=item_code, qty=5, rate=300, use_serial_batch_fields=1, batch_no=batch_no
item_code=item_code,
qty=5,
rate=300,
use_serial_batch_fields=1,
batch_no=batch_no,
do_not_submit=True,
)
pos_inv.payments[0].amount = pos_inv.grand_total
pos_inv.save()
pos_inv.submit()
pos_inv2 = create_pos_invoice(
item_code=item_code, qty=5, rate=300, use_serial_batch_fields=1, batch_no=batch_no
item_code=item_code,
qty=5,
rate=300,
use_serial_batch_fields=1,
batch_no=batch_no,
do_not_submit=True,
)
batch_qty = frappe.db.get_value("Batch", batch_no, "batch_qty")
self.assertEqual(batch_qty, 10)
pos_inv2.payments[0].amount = pos_inv2.grand_total
pos_inv2.save()
pos_inv2.submit()
batch_qty_with_pos = get_batch_qty(batch_no, "_Test Warehouse - _TC", item_code)
self.assertEqual(batch_qty_with_pos, 0.0)
@@ -256,9 +277,6 @@ class TestPOSClosingEntry(unittest.TestCase):
pcv_doc.reload()
pcv_doc.cancel()
batch_qty = frappe.db.get_value("Batch", batch_no, "batch_qty")
self.assertEqual(batch_qty, 10)
batch_qty_with_pos = get_batch_qty(batch_no, "_Test Warehouse - _TC", item_code)
self.assertEqual(batch_qty_with_pos, 0.0)

View File

@@ -323,3 +323,15 @@ frappe.ui.form.on("POS Invoice", {
});
},
});
frappe.ui.form.on("Sales Invoice Payment", {
mode_of_payment: function (frm) {
frappe.call({
doc: frm.doc,
method: "set_account_for_mode_of_payment",
callback: function (r) {
refresh_field("payments");
},
});
},
});

View File

@@ -1623,6 +1623,5 @@
"states": [],
"timeline_field": "customer",
"title_field": "title",
"track_changes": 1,
"track_seen": 1
}
"track_changes": 1
}

View File

@@ -20,6 +20,10 @@ from erpnext.controllers.queries import item_query as _item_query
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
class PartialPaymentValidationError(frappe.ValidationError):
pass
class POSInvoice(SalesInvoice):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
@@ -192,6 +196,7 @@ class POSInvoice(SalesInvoice):
# run on validate method of selling controller
super(SalesInvoice, self).validate()
self.validate_pos_opening_entry()
self.validate_auto_set_posting_time()
self.validate_mode_of_payment()
self.validate_uom_is_integer("stock_uom", "stock_qty")
@@ -210,6 +215,7 @@ class POSInvoice(SalesInvoice):
self.validate_payment_amount()
self.validate_loyalty_transaction()
self.validate_company_with_pos_company()
self.validate_full_payment()
if self.coupon_code:
from erpnext.accounts.doctype.pricing_rule.utils import validate_coupon_code
@@ -267,6 +273,8 @@ class POSInvoice(SalesInvoice):
against_psi_doc.delete_loyalty_point_entry()
against_psi_doc.make_loyalty_point_entry()
self.db_set("status", "Cancelled")
if self.coupon_code:
from erpnext.accounts.doctype.pricing_rule.utils import update_coupon_code_count
@@ -315,6 +323,18 @@ class POSInvoice(SalesInvoice):
_("Payment related to {0} is not completed").format(pay.mode_of_payment)
)
def validate_pos_opening_entry(self):
opening_entries = frappe.get_list(
"POS Opening Entry", filters={"pos_profile": self.pos_profile, "status": "Open", "docstatus": 1}
)
if len(opening_entries) == 0:
frappe.throw(
title=_("POS Opening Entry Missing"),
msg=_("No open POS Opening Entry found for POS Profile {0}.").format(
frappe.bold(self.pos_profile)
),
)
def validate_stock_availablility(self):
if self.is_return:
return
@@ -477,6 +497,23 @@ class POSInvoice(SalesInvoice):
if self.redeem_loyalty_points and self.loyalty_program and self.loyalty_points:
validate_loyalty_points(self, self.loyalty_points)
def validate_full_payment(self):
invoice_total = flt(self.rounded_total) or flt(self.grand_total)
is_partial_payment_allowed = frappe.db.get_value(
"POS Profile", self.pos_profile, "allow_partial_payment"
)
if self.docstatus == 1 and not is_partial_payment_allowed:
if self.is_return and self.paid_amount != invoice_total:
frappe.throw(
msg=_("Partial Payment in POS Invoice is not allowed."), exc=PartialPaymentValidationError
)
if self.paid_amount < invoice_total:
frappe.throw(
msg=_("Partial Payment in POS Invoice is not allowed."), exc=PartialPaymentValidationError
)
def set_status(self, update=False, status=None, update_modified=True):
if self.is_new():
if self.get("amended_from"):

View File

@@ -7,7 +7,10 @@ import unittest
import frappe
from frappe import _
from erpnext.accounts.doctype.pos_invoice.pos_invoice import make_sales_return
from erpnext.accounts.doctype.mode_of_payment.test_mode_of_payment import (
set_default_account_for_mode_of_payment,
)
from erpnext.accounts.doctype.pos_invoice.pos_invoice import PartialPaymentValidationError, make_sales_return
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.stock.doctype.item.test_item import make_item
@@ -26,6 +29,14 @@ class TestPOSInvoice(unittest.TestCase):
make_stock_entry(target="_Test Warehouse - _TC", item_code="_Test Item", qty=800, basic_rate=100)
frappe.db.sql("delete from `tabTax Rule`")
from erpnext.accounts.doctype.pos_closing_entry.test_pos_closing_entry import init_user_and_profile
from erpnext.accounts.doctype.pos_opening_entry.test_pos_opening_entry import create_opening_entry
cls.test_user, cls.pos_profile = init_user_and_profile()
create_opening_entry(cls.pos_profile, cls.test_user)
mode_of_payment = frappe.get_doc("Mode of Payment", "Bank Draft")
set_default_account_for_mode_of_payment(mode_of_payment, "_Test Company", "_Test Bank - _TC")
def tearDown(self):
if frappe.session.user != "Administrator":
frappe.set_user("Administrator")
@@ -227,12 +238,8 @@ class TestPOSInvoice(unittest.TestCase):
pos = create_pos_invoice(qty=10, do_not_save=True)
pos.set("payments", [])
pos.append(
"payments", {"mode_of_payment": "Bank Draft", "account": "_Test Bank - _TC", "amount": 500}
)
pos.append(
"payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 500, "default": 1}
)
pos.append("payments", {"mode_of_payment": "Bank Draft", "amount": 500})
pos.append("payments", {"mode_of_payment": "Cash", "amount": 500, "default": 1})
pos.insert()
pos.submit()
@@ -270,9 +277,7 @@ class TestPOSInvoice(unittest.TestCase):
do_not_save=1,
)
pos.append(
"payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 1000, "default": 1}
)
pos.append("payments", {"mode_of_payment": "Cash", "amount": 1000, "default": 1})
pos.insert()
pos.submit()
@@ -312,9 +317,7 @@ class TestPOSInvoice(unittest.TestCase):
do_not_save=1,
)
pos.append(
"payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 1000, "default": 1}
)
pos.append("payments", {"mode_of_payment": "Cash", "amount": 2000, "default": 1})
pos.insert()
pos.submit()
@@ -324,6 +327,9 @@ class TestPOSInvoice(unittest.TestCase):
# partial return 1
pos_return1.get("items")[0].qty = -1
pos_return1.set("payments", [])
pos_return1.append("payments", {"mode_of_payment": "Cash", "amount": -1000, "default": 1})
pos_return1.paid_amount = -1000
pos_return1.submit()
pos_return1.reload()
@@ -338,6 +344,9 @@ class TestPOSInvoice(unittest.TestCase):
# partial return 2
pos_return2 = make_sales_return(pos.name)
pos_return2.set("payments", [])
pos_return2.append("payments", {"mode_of_payment": "Cash", "amount": -1000, "default": 1})
pos_return2.paid_amount = -1000
pos_return2.submit()
self.assertEqual(pos_return2.get("items")[0].qty, -1)
@@ -356,10 +365,8 @@ class TestPOSInvoice(unittest.TestCase):
)
pos.set("payments", [])
pos.append("payments", {"mode_of_payment": "Bank Draft", "account": "_Test Bank - _TC", "amount": 50})
pos.append(
"payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 60, "default": 1}
)
pos.append("payments", {"mode_of_payment": "Bank Draft", "amount": 50})
pos.append("payments", {"mode_of_payment": "Cash", "amount": 60, "default": 1})
pos.insert()
pos.submit()
@@ -373,6 +380,15 @@ class TestPOSInvoice(unittest.TestCase):
inv.payments = []
self.assertRaises(frappe.ValidationError, inv.insert)
def test_partial_payment(self):
pos_inv = create_pos_invoice(rate=10000, do_not_save=1)
pos_inv.append(
"payments",
{"mode_of_payment": "Cash", "amount": 9000},
)
pos_inv.insert()
self.assertRaises(PartialPaymentValidationError, pos_inv.submit)
def test_serialized_item_transaction(self):
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_serialized_item
@@ -399,9 +415,7 @@ class TestPOSInvoice(unittest.TestCase):
do_not_save=1,
)
pos.append(
"payments", {"mode_of_payment": "Bank Draft", "account": "_Test Bank - _TC", "amount": 1000}
)
pos.append("payments", {"mode_of_payment": "Bank Draft", "amount": 1000})
pos.insert()
pos.submit()
@@ -420,9 +434,7 @@ class TestPOSInvoice(unittest.TestCase):
do_not_save=1,
)
pos2.append(
"payments", {"mode_of_payment": "Bank Draft", "account": "_Test Bank - _TC", "amount": 1000}
)
pos2.append("payments", {"mode_of_payment": "Bank Draft", "amount": 1000})
pos2.insert()
self.assertRaises(frappe.ValidationError, pos2.submit)
@@ -471,9 +483,7 @@ class TestPOSInvoice(unittest.TestCase):
do_not_save=1,
)
pos2.append(
"payments", {"mode_of_payment": "Bank Draft", "account": "_Test Bank - _TC", "amount": 1000}
)
pos2.append("payments", {"mode_of_payment": "Bank Draft", "amount": 1000})
pos2.insert()
self.assertRaises(frappe.ValidationError, pos2.submit)
@@ -536,9 +546,7 @@ class TestPOSInvoice(unittest.TestCase):
)
pos.get("items")[0].has_serial_no = 1
pos.set("payments", [])
pos.append(
"payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 1000, "default": 1}
)
pos.append("payments", {"mode_of_payment": "Cash", "amount": 1000, "default": 1})
pos = pos.save().submit()
# make a return
@@ -581,7 +589,13 @@ class TestPOSInvoice(unittest.TestCase):
"Test Loyalty Customer", company="_Test Company", loyalty_program="Test Single Loyalty"
)
inv = create_pos_invoice(customer="Test Loyalty Customer", rate=10000)
inv = create_pos_invoice(customer="Test Loyalty Customer", rate=10000, do_not_save=1)
inv.append(
"payments",
{"mode_of_payment": "Cash", "amount": 10000},
)
inv.insert()
inv.submit()
lpe = frappe.get_doc(
"Loyalty Point Entry",
@@ -607,7 +621,13 @@ class TestPOSInvoice(unittest.TestCase):
)
# add 10 loyalty points
create_pos_invoice(customer="Test Loyalty Customer", rate=10000)
pos_inv = create_pos_invoice(customer="Test Loyalty Customer", rate=10000, do_not_save=1)
pos_inv.append(
"payments",
{"mode_of_payment": "Cash", "amount": 10000},
)
pos_inv.paid_amount = 10000
pos_inv.submit()
before_lp_details = get_loyalty_program_details_with_points(
"Test Loyalty Customer", company="_Test Company", loyalty_program="Test Single Loyalty"
@@ -619,7 +639,7 @@ class TestPOSInvoice(unittest.TestCase):
inv.loyalty_amount = inv.loyalty_points * before_lp_details.conversion_factor
inv.append(
"payments",
{"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 10000 - inv.loyalty_amount},
{"mode_of_payment": "Cash", "amount": 10000 - inv.loyalty_amount},
)
inv.paid_amount = 10000
inv.submit()
@@ -640,11 +660,13 @@ class TestPOSInvoice(unittest.TestCase):
frappe.db.sql("delete from `tabPOS Invoice`")
test_user, pos_profile = init_user_and_profile()
pos_inv = create_pos_invoice(rate=300, additional_discount_percentage=10, do_not_submit=1)
pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 270})
pos_inv.append("payments", {"mode_of_payment": "Cash", "amount": 270})
pos_inv.save()
pos_inv.submit()
pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1)
pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200})
pos_inv2.append("payments", {"mode_of_payment": "Cash", "amount": 3200})
pos_inv2.save()
pos_inv2.submit()
consolidate_pos_invoices()
@@ -664,7 +686,7 @@ class TestPOSInvoice(unittest.TestCase):
frappe.db.sql("delete from `tabPOS Invoice`")
test_user, pos_profile = init_user_and_profile()
pos_inv = create_pos_invoice(rate=300, do_not_submit=1)
pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 300})
pos_inv.append("payments", {"mode_of_payment": "Cash", "amount": 300})
pos_inv.append(
"taxes",
{
@@ -676,11 +698,12 @@ class TestPOSInvoice(unittest.TestCase):
"included_in_print_rate": 1,
},
)
pos_inv.save()
pos_inv.submit()
pos_inv2 = create_pos_invoice(rate=300, qty=2, do_not_submit=1)
pos_inv2.additional_discount_percentage = 10
pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 540})
pos_inv2.append("payments", {"mode_of_payment": "Cash", "amount": 540})
pos_inv2.append(
"taxes",
{
@@ -692,6 +715,7 @@ class TestPOSInvoice(unittest.TestCase):
"included_in_print_rate": 1,
},
)
pos_inv2.save()
pos_inv2.submit()
consolidate_pos_invoices()
@@ -717,7 +741,7 @@ class TestPOSInvoice(unittest.TestCase):
frappe.db.sql("delete from `tabPOS Invoice`")
test_user, pos_profile = init_user_and_profile()
pos_inv = create_pos_invoice(item=item, rate=300, do_not_submit=1)
pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 300})
pos_inv.append("payments", {"mode_of_payment": "Cash", "amount": 300})
pos_inv.append(
"taxes",
{
@@ -732,7 +756,7 @@ class TestPOSInvoice(unittest.TestCase):
self.assertRaises(frappe.ValidationError, pos_inv.submit)
pos_inv2 = create_pos_invoice(item=item, rate=400, do_not_submit=1)
pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 400})
pos_inv2.append("payments", {"mode_of_payment": "Cash", "amount": 400})
pos_inv2.append(
"taxes",
{
@@ -744,6 +768,7 @@ class TestPOSInvoice(unittest.TestCase):
"included_in_print_rate": 1,
},
)
pos_inv2.save()
pos_inv2.submit()
consolidate_pos_invoices()
@@ -774,7 +799,10 @@ class TestPOSInvoice(unittest.TestCase):
# POS Invoice 1, for the batch without bundle
pos_inv1 = create_pos_invoice(item="_BATCH ITEM Test For Reserve", rate=300, qty=15, do_not_save=1)
pos_inv1.append(
"payments",
{"mode_of_payment": "Cash", "amount": 4500},
)
pos_inv1.items[0].batch_no = batch_no
pos_inv1.save()
pos_inv1.submit()
@@ -790,8 +818,14 @@ class TestPOSInvoice(unittest.TestCase):
# POS Invoice 2, for the batch with bundle
pos_inv2 = create_pos_invoice(
item="_BATCH ITEM Test For Reserve", rate=300, qty=10, batch_no=batch_no
item="_BATCH ITEM Test For Reserve", rate=300, qty=10, batch_no=batch_no, do_not_save=1
)
pos_inv2.append(
"payments",
{"mode_of_payment": "Cash", "amount": 3000},
)
pos_inv2.save()
pos_inv2.submit()
pos_inv2.reload()
self.assertTrue(pos_inv2.items[0].serial_and_batch_bundle)
@@ -826,6 +860,10 @@ class TestPOSInvoice(unittest.TestCase):
pos_inv1 = create_pos_invoice(
item=item.name, rate=300, qty=1, do_not_submit=1, batch_no="TestBatch 01"
)
pos_inv1.append(
"payments",
{"mode_of_payment": "Cash", "amount": 300},
)
pos_inv1.save()
pos_inv1.submit()

View File

@@ -37,6 +37,7 @@
"column_break_19",
"discount_percentage",
"discount_amount",
"distributed_discount_amount",
"base_rate_with_margin",
"section_break1",
"rate",
@@ -847,11 +848,17 @@
{
"fieldname": "column_break_ciit",
"fieldtype": "Column Break"
},
{
"fieldname": "distributed_discount_amount",
"fieldtype": "Currency",
"label": "Distributed Discount Amount",
"options": "currency"
}
],
"istable": 1,
"links": [],
"modified": "2024-05-07 15:56:53.343317",
"modified": "2024-05-07 15:56:54.343317",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Invoice Item",

View File

@@ -39,6 +39,7 @@ class POSInvoiceItem(Document):
description: DF.TextEditor
discount_amount: DF.Currency
discount_percentage: DF.Percent
distributed_discount_amount: DF.Currency
dn_detail: DF.Data | None
enable_deferred_revenue: DF.Check
expense_account: DF.Link | None

View File

@@ -2,17 +2,21 @@
# For license information, please see license.txt
import hashlib
import json
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.model.mapper import map_child_doc, map_doc
from frappe.query_builder import DocType
from frappe.utils import cint, flt, get_time, getdate, nowdate, nowtime
from frappe.utils.background_jobs import enqueue, is_job_enqueued
from frappe.utils.scheduler import is_scheduler_inactive
from erpnext.accounts.doctype.pos_profile.pos_profile import required_accounting_dimensions
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
get_checks_for_pl_and_bs_accounts,
)
class POSInvoiceMergeLog(Document):
@@ -116,17 +120,18 @@ class POSInvoiceMergeLog(Document):
returns = [d for d in pos_invoice_docs if d.get("is_return") == 1]
sales = [d for d in pos_invoice_docs if d.get("is_return") == 0]
sales_invoice, credit_note = "", ""
sales_invoice, credit_notes = "", {}
sales_invoice_doc = None
if sales:
sales_invoice_doc = self.process_merging_into_sales_invoice(sales)
sales_invoice = sales_invoice_doc.name
if returns:
credit_note = self.process_merging_into_credit_note(returns, sales_invoice_doc)
distinguished_returns = self.distinguish_return_pos_invoices(returns, sales_invoice_doc)
credit_notes = self.process_merging_into_credit_notes(distinguished_returns)
self.save() # save consolidated_sales_invoice & consolidated_credit_note ref in merge log
self.update_pos_invoices(pos_invoice_docs, sales_invoice, credit_note)
self.update_pos_invoices(pos_invoice_docs, sales_invoice, credit_notes)
def on_cancel(self):
pos_invoice_docs = [frappe.get_cached_doc("POS Invoice", d.pos_invoice) for d in self.pos_invoices]
@@ -156,34 +161,50 @@ class POSInvoiceMergeLog(Document):
return sales_invoice
def process_merging_into_credit_note(self, data, sales_invoice_doc=None):
credit_note = self.get_new_sales_invoice()
credit_note.is_return = 1
def process_merging_into_credit_notes(self, data):
credit_notes = {}
for key, value in data.items():
if not value:
continue
credit_note = self.merge_pos_invoice_into(credit_note, data)
referenes = {}
credit_note = self.get_new_sales_invoice()
credit_note.is_return = 1
if sales_invoice_doc:
credit_note.return_against = sales_invoice_doc.name
credit_note = self.merge_pos_invoice_into(credit_note, value)
credit_note.return_against = key
for d in sales_invoice_doc.items:
referenes[d.item_code] = d.name
credit_note.is_consolidated = 1
credit_note.set_posting_time = 1
credit_note.posting_date = getdate(self.posting_date)
credit_note.posting_time = get_time(self.posting_time)
# TODO: return could be against multiple sales invoice which could also have been consolidated?
# credit_note.return_against = self.consolidated_invoice
credit_note.save()
credit_note.submit()
for d in credit_note.items:
d.sales_invoice_item = referenes.get(d.item_code)
self.consolidated_credit_note = credit_note.name
credit_notes[credit_note.name] = [d.name for d in value]
credit_note.is_consolidated = 1
credit_note.set_posting_time = 1
credit_note.posting_date = getdate(self.posting_date)
credit_note.posting_time = get_time(self.posting_time)
# TODO: return could be against multiple sales invoice which could also have been consolidated?
# credit_note.return_against = self.consolidated_invoice
credit_note.save()
credit_note.submit()
return credit_notes
self.consolidated_credit_note = credit_note.name
def distinguish_return_pos_invoices(self, data, sales_invoice_doc=None):
return_invoices = {}
return credit_note.name
return_invoices[sales_invoice_doc.name if sales_invoice_doc else None] = []
for doc in data:
sales_invoices_of_return_against = frappe.db.get_value(
"POS Invoice", doc.return_against, "consolidated_invoice"
)
if sales_invoices_of_return_against:
if sales_invoices_of_return_against in return_invoices:
return_invoices[sales_invoices_of_return_against].append(doc)
else:
return_invoices[sales_invoices_of_return_against] = [doc]
else:
return_invoices[sales_invoice_doc.name if sales_invoice_doc else None].append(doc)
return return_invoices
def merge_pos_invoice_into(self, invoice, data):
items, payments, taxes = [], [], []
@@ -209,33 +230,20 @@ class POSInvoiceMergeLog(Document):
loyalty_amount_sum += doc.loyalty_amount
for item in doc.get("items"):
found = False
for i in items:
if (
i.item_code == item.item_code
and not i.serial_and_batch_bundle
and not i.serial_no
and not i.batch_no
and i.uom == item.uom
and i.net_rate == item.net_rate
and i.warehouse == item.warehouse
):
found = True
i.qty = i.qty + item.qty
i.amount = i.amount + item.net_amount
i.net_amount = i.amount
i.base_amount = i.base_amount + item.base_net_amount
i.base_net_amount = i.base_amount
if not found:
item.rate = item.net_rate
item.amount = item.net_amount
item.base_amount = item.base_net_amount
item.price_list_rate = 0
si_item = map_child_doc(item, invoice, {"doctype": "Sales Invoice Item"})
if item.serial_and_batch_bundle:
si_item.serial_and_batch_bundle = item.serial_and_batch_bundle
items.append(si_item)
item.rate = item.net_rate
item.amount = item.net_amount
item.base_amount = item.base_net_amount
item.price_list_rate = 0
si_item = map_child_doc(item, invoice, {"doctype": "Sales Invoice Item"})
si_item.pos_invoice = doc.name
si_item.pos_invoice_item = item.name
if doc.is_return:
si_item.sales_invoice_item = get_sales_invoice_item(
doc.return_against, item.pos_invoice_item
)
if item.serial_and_batch_bundle:
si_item.serial_and_batch_bundle = item.serial_and_batch_bundle
items.append(si_item)
for tax in doc.get("taxes"):
found = False
@@ -292,22 +300,38 @@ class POSInvoiceMergeLog(Document):
invoice.disable_rounded_total = cint(
frappe.db.get_value("POS Profile", invoice.pos_profile, "disable_rounded_total")
)
accounting_dimensions = required_accounting_dimensions()
accounting_dimensions = get_checks_for_pl_and_bs_accounts()
accounting_dimensions_fields = [d.fieldname for d in accounting_dimensions]
dimension_values = frappe.db.get_value(
"POS Profile", {"name": invoice.pos_profile}, accounting_dimensions, as_dict=1
"POS Profile",
{"name": invoice.pos_profile},
[*accounting_dimensions_fields, "cost_center", "project"],
as_dict=1,
)
for dimension in accounting_dimensions:
dimension_value = dimension_values.get(dimension)
dimension_value = (
data[0].get(dimension.fieldname)
if data[0].get(dimension.fieldname)
else dimension_values.get(dimension.fieldname)
)
if not dimension_value:
if not dimension_value and (dimension.mandatory_for_pl or dimension.mandatory_for_bs):
frappe.throw(
_("Please set Accounting Dimension {} in {}").format(
frappe.bold(frappe.unscrub(dimension)),
frappe.bold(dimension.label),
frappe.get_desk_link("POS Profile", invoice.pos_profile),
)
)
invoice.set(dimension, dimension_value)
invoice.set(dimension.fieldname, dimension_value)
invoice.set(
"cost_center",
data[0].get("cost_center") if data[0].get("cost_center") else dimension_values.get("cost_center"),
)
invoice.set(
"project", data[0].get("project") if data[0].get("project") else dimension_values.get("project")
)
if self.merge_invoices_based_on == "Customer Group":
invoice.flags.ignore_pos_profile = True
@@ -324,16 +348,16 @@ class POSInvoiceMergeLog(Document):
return sales_invoice
def update_pos_invoices(self, invoice_docs, sales_invoice="", credit_note=""):
def update_pos_invoices(self, invoice_docs, sales_invoice="", credit_notes=None):
for doc in invoice_docs:
doc.load_from_db()
doc.update(
{
"consolidated_invoice": None
if self.docstatus == 2
else (credit_note if doc.is_return else sales_invoice)
}
)
inv = sales_invoice
if doc.is_return and credit_notes:
for key, value in credit_notes.items():
if doc.name in value:
inv = key
break
doc.update({"consolidated_invoice": None if self.docstatus == 2 else inv})
doc.set_status(update=True)
doc.save()
@@ -438,9 +462,34 @@ def get_invoice_customer_map(pos_invoices):
pos_invoice_customer_map.setdefault(customer, [])
pos_invoice_customer_map[customer].append(invoice)
for customer, invoices in pos_invoice_customer_map.items():
pos_invoice_customer_map[customer] = split_invoices_by_accounting_dimension(invoices)
return pos_invoice_customer_map
def split_invoices_by_accounting_dimension(pos_invoices):
# pos_invoices = {
# {'dim_field1': 'dim_field1_value1', 'dim_field2': 'dim_field2_value1'}: [],
# {'dim_field1': 'dim_field1_value2', 'dim_field2': 'dim_field2_value1'}: []
# }
pos_invoice_accounting_dimensions_map = {}
for invoice in pos_invoices:
dimension_fields = [d.fieldname for d in get_checks_for_pl_and_bs_accounts()]
accounting_dimensions = frappe.db.get_value(
"POS Invoice", invoice.pos_invoice, [*dimension_fields, "cost_center", "project"], as_dict=1
)
accounting_dimensions_dic_hash = hashlib.sha256(
json.dumps(accounting_dimensions).encode()
).hexdigest()
pos_invoice_accounting_dimensions_map.setdefault(accounting_dimensions_dic_hash, [])
pos_invoice_accounting_dimensions_map[accounting_dimensions_dic_hash].append(invoice)
return pos_invoice_accounting_dimensions_map
def consolidate_pos_invoices(pos_invoices=None, closing_entry=None):
invoices = pos_invoices or (closing_entry and closing_entry.get("pos_transactions"))
if frappe.flags.in_test and not invoices:
@@ -524,20 +573,21 @@ def split_invoices(invoices):
def create_merge_logs(invoice_by_customer, closing_entry=None):
try:
for customer, invoices in invoice_by_customer.items():
for _invoices in split_invoices(invoices):
merge_log = frappe.new_doc("POS Invoice Merge Log")
merge_log.posting_date = (
getdate(closing_entry.get("posting_date")) if closing_entry else nowdate()
)
merge_log.posting_time = (
get_time(closing_entry.get("posting_time")) if closing_entry else nowtime()
)
merge_log.customer = customer
merge_log.pos_closing_entry = closing_entry.get("name") if closing_entry else None
merge_log.set("pos_invoices", _invoices)
merge_log.save(ignore_permissions=True)
merge_log.submit()
for customer, invoices_acc_dim in invoice_by_customer.items():
for invoices in invoices_acc_dim.values():
for _invoices in split_invoices(invoices):
merge_log = frappe.new_doc("POS Invoice Merge Log")
merge_log.posting_date = (
getdate(closing_entry.get("posting_date")) if closing_entry else nowdate()
)
merge_log.posting_time = (
get_time(closing_entry.get("posting_time")) if closing_entry else nowtime()
)
merge_log.customer = customer
merge_log.pos_closing_entry = closing_entry.get("name") if closing_entry else None
merge_log.set("pos_invoices", _invoices)
merge_log.save(ignore_permissions=True)
merge_log.submit()
if closing_entry:
closing_entry.set_status(update=True, status="Submitted")
closing_entry.db_set("error_message", "")
@@ -625,3 +675,26 @@ def get_error_message(message) -> str:
return message["message"]
except Exception:
return str(message)
def get_sales_invoice_item(return_against_pos_invoice, pos_invoice_item):
try:
SalesInvoice = DocType("Sales Invoice")
SalesInvoiceItem = DocType("Sales Invoice Item")
query = (
frappe.qb.from_(SalesInvoice)
.from_(SalesInvoiceItem)
.select(SalesInvoiceItem.name)
.where(
(SalesInvoice.name == SalesInvoiceItem.parent)
& (SalesInvoice.is_return == 0)
& (SalesInvoiceItem.pos_invoice == return_against_pos_invoice)
& (SalesInvoiceItem.pos_invoice_item == pos_invoice_item)
)
)
result = query.run(as_dict=True)
return result[0].name if result else None
except Exception:
return None

View File

@@ -28,14 +28,17 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
pos_inv = create_pos_invoice(rate=300, do_not_submit=1)
pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 300})
pos_inv.save()
pos_inv.submit()
pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1)
pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200})
pos_inv2.save()
pos_inv2.submit()
pos_inv3 = create_pos_invoice(customer="_Test Customer 2", rate=2300, do_not_submit=1)
pos_inv3.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 2300})
pos_inv3.save()
pos_inv3.submit()
consolidate_pos_invoices()
@@ -61,14 +64,17 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
pos_inv = create_pos_invoice(rate=300, do_not_submit=1)
pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 300})
pos_inv.save()
pos_inv.submit()
pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1)
pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200})
pos_inv2.save()
pos_inv2.submit()
pos_inv3 = create_pos_invoice(customer="_Test Customer 2", rate=2300, do_not_submit=1)
pos_inv3.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 2300})
pos_inv3.save()
pos_inv3.submit()
pos_inv_cn = make_sales_return(pos_inv.name)
@@ -122,6 +128,8 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
},
)
inv.insert()
inv.payments[0].amount = inv.grand_total
inv.save()
inv.submit()
inv2 = create_pos_invoice(qty=1, rate=100, do_not_save=True)
@@ -138,6 +146,8 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
},
)
inv2.insert()
inv2.payments[0].amount = inv.grand_total
inv2.save()
inv2.submit()
consolidate_pos_invoices()
@@ -272,7 +282,7 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
inv2.submit()
inv3 = create_pos_invoice(qty=3, rate=600, do_not_save=True)
inv3.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 1000})
inv3.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 1800})
inv3.insert()
inv3.submit()
@@ -280,8 +290,8 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
inv.load_from_db()
consolidated_invoice = frappe.get_doc("Sales Invoice", inv.consolidated_invoice)
self.assertEqual(consolidated_invoice.outstanding_amount, 800)
self.assertNotEqual(consolidated_invoice.status, "Paid")
self.assertNotEqual(consolidated_invoice.outstanding_amount, 800)
self.assertEqual(consolidated_invoice.status, "Paid")
finally:
frappe.set_user("Administrator")
@@ -416,6 +426,7 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
do_not_submit=1,
)
pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 100})
pos_inv.save()
pos_inv.submit()
pos_inv_cn = make_sales_return(pos_inv.name)
@@ -430,6 +441,7 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
do_not_submit=1,
)
pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 100})
pos_inv2.save()
pos_inv2.submit()
consolidate_pos_invoices()
@@ -443,3 +455,58 @@ class TestPOSInvoiceMergeLog(unittest.TestCase):
frappe.set_user("Administrator")
frappe.db.sql("delete from `tabPOS Profile`")
frappe.db.sql("delete from `tabPOS Invoice`")
def test_separate_consolidated_invoice_for_different_accounting_dimensions(self):
"""
Creating 3 POS Invoices where first POS Invoice has different Cost Center than the other two.
Consolidate the Invoices.
Check whether the first POS Invoice is consolidated with a separate Sales Invoice than the other two.
Check whether the second and third POS Invoice are consolidated with the same Sales Invoice.
"""
from erpnext.accounts.doctype.cost_center.test_cost_center import create_cost_center
frappe.db.sql("delete from `tabPOS Invoice`")
create_cost_center(cost_center_name="_Test POS Cost Center 1", is_group=0)
create_cost_center(cost_center_name="_Test POS Cost Center 2", is_group=0)
try:
test_user, pos_profile = init_user_and_profile()
pos_inv = create_pos_invoice(rate=300, do_not_submit=1)
pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 300})
pos_inv.cost_center = "_Test POS Cost Center 1 - _TC"
pos_inv.save()
pos_inv.submit()
pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1)
pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200})
pos_inv.cost_center = "_Test POS Cost Center 2 - _TC"
pos_inv2.save()
pos_inv2.submit()
pos_inv3 = create_pos_invoice(rate=2300, do_not_submit=1)
pos_inv3.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 2300})
pos_inv.cost_center = "_Test POS Cost Center 2 - _TC"
pos_inv3.save()
pos_inv3.submit()
consolidate_pos_invoices()
pos_inv.load_from_db()
self.assertTrue(frappe.db.exists("Sales Invoice", pos_inv.consolidated_invoice))
pos_inv2.load_from_db()
self.assertTrue(frappe.db.exists("Sales Invoice", pos_inv2.consolidated_invoice))
self.assertFalse(pos_inv.consolidated_invoice == pos_inv3.consolidated_invoice)
pos_inv3.load_from_db()
self.assertTrue(frappe.db.exists("Sales Invoice", pos_inv3.consolidated_invoice))
self.assertTrue(pos_inv2.consolidated_invoice == pos_inv3.consolidated_invoice)
finally:
frappe.set_user("Administrator")
frappe.db.sql("delete from `tabPOS Profile`")
frappe.db.sql("delete from `tabPOS Invoice`")

View File

@@ -70,3 +70,6 @@ class POSOpeningEntry(StatusUpdater):
def on_submit(self):
self.set_status(update=True)
def on_cancel(self):
self.set_status(update=True)

View File

@@ -23,11 +23,14 @@
"hide_unavailable_items",
"auto_add_item_to_cart",
"validate_stock_on_save",
"print_receipt_on_order_complete",
"column_break_16",
"update_stock",
"ignore_pricing_rule",
"allow_rate_change",
"allow_discount_change",
"disable_grand_total_to_default_mop",
"allow_partial_payment",
"section_break_23",
"item_groups",
"column_break_25",
@@ -54,7 +57,8 @@
"apply_discount_on",
"accounting_dimensions_section",
"cost_center",
"dimension_col_break"
"dimension_col_break",
"project"
],
"fields": [
{
@@ -375,6 +379,32 @@
"fieldname": "disable_rounded_total",
"fieldtype": "Check",
"label": "Disable Rounded Total"
},
{
"default": "0",
"fieldname": "print_receipt_on_order_complete",
"fieldtype": "Check",
"label": "Print Receipt on Order Complete"
},
{
"default": "0",
"fieldname": "disable_grand_total_to_default_mop",
"fieldtype": "Check",
"label": "Disable auto setting Grand Total to default Payment Mode"
},
{
"fieldname": "project",
"fieldtype": "Link",
"label": "Project",
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Project"
},
{
"default": "0",
"fieldname": "allow_partial_payment",
"fieldtype": "Check",
"label": "Allow Partial Payment"
}
],
"icon": "icon-cog",
@@ -402,7 +432,7 @@
"link_fieldname": "pos_profile"
}
],
"modified": "2022-08-10 12:57:06.241439",
"modified": "2025-04-14 15:58:20.497426",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Profile",
@@ -428,7 +458,8 @@
"role": "Accounts User"
}
],
"sort_field": "modified",
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}

View File

@@ -4,9 +4,14 @@
import frappe
from frappe import _, msgprint, scrub, unscrub
from frappe.core.doctype.user_permission.user_permission import get_permitted_documents
from frappe.model.document import Document
from frappe.utils import get_link_to_form, now
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
get_checks_for_pl_and_bs_accounts,
)
class POSProfile(Document):
# begin: auto-generated types
@@ -24,6 +29,7 @@ class POSProfile(Document):
account_for_change_amount: DF.Link | None
allow_discount_change: DF.Check
allow_partial_payment: DF.Check
allow_rate_change: DF.Check
applicable_for_users: DF.Table[POSProfileUser]
apply_discount_on: DF.Literal["Grand Total", "Net Total"]
@@ -36,6 +42,7 @@ class POSProfile(Document):
currency: DF.Link
customer: DF.Link | None
customer_groups: DF.Table[POSCustomerGroup]
disable_grand_total_to_default_mop: DF.Check
disable_rounded_total: DF.Check
disabled: DF.Check
expense_account: DF.Link | None
@@ -47,6 +54,8 @@ class POSProfile(Document):
letter_head: DF.Link | None
payments: DF.Table[POSPaymentMethod]
print_format: DF.Link | None
print_receipt_on_order_complete: DF.Check
project: DF.Link | None
select_print_heading: DF.Link | None
selling_price_list: DF.Link | None
tax_category: DF.Link | None
@@ -68,15 +77,19 @@ class POSProfile(Document):
self.validate_accounting_dimensions()
def validate_accounting_dimensions(self):
acc_dim_names = required_accounting_dimensions()
for acc_dim in acc_dim_names:
if not self.get(acc_dim):
acc_dims = get_checks_for_pl_and_bs_accounts()
for acc_dim in acc_dims:
if (
self.company == acc_dim.company
and not self.get(acc_dim.fieldname)
and (acc_dim.mandatory_for_pl or acc_dim.mandatory_for_bs)
):
frappe.throw(
_(
"{0} is a mandatory Accounting Dimension. <br>"
"Please set a value for {0} in Accounting Dimensions section."
).format(
unscrub(frappe.bold(acc_dim)),
frappe.bold(acc_dim.label),
),
title=_("Mandatory Accounting Dimension"),
)
@@ -194,17 +207,41 @@ class POSProfile(Document):
def get_item_groups(pos_profile):
item_groups = []
pos_profile = frappe.get_cached_doc("POS Profile", pos_profile)
permitted_item_groups = get_permitted_nodes("Item Group")
if pos_profile.get("item_groups"):
# Get items based on the item groups defined in the POS profile
for data in pos_profile.get("item_groups"):
item_groups.extend(
["%s" % frappe.db.escape(d.name) for d in get_child_nodes("Item Group", data.item_group)]
[
"%s" % frappe.db.escape(d.name)
for d in get_child_nodes("Item Group", data.item_group)
if not permitted_item_groups or d.name in permitted_item_groups
]
)
if not item_groups and permitted_item_groups:
item_groups = ["%s" % frappe.db.escape(d) for d in permitted_item_groups]
return list(set(item_groups))
def get_permitted_nodes(group_type):
nodes = []
permitted_nodes = get_permitted_documents(group_type)
if not permitted_nodes:
return nodes
for node in permitted_nodes:
if frappe.db.get_value(group_type, node, "is_group"):
nodes.extend([d.name for d in get_child_nodes(group_type, node)])
else:
nodes.append(node)
return nodes
def get_child_nodes(group_type, root):
lft, rgt = frappe.db.get_value(group_type, root, ["lft", "rgt"])
return frappe.db.sql(
@@ -214,23 +251,6 @@ def get_child_nodes(group_type, root):
)
def required_accounting_dimensions():
p = frappe.qb.DocType("Accounting Dimension")
c = frappe.qb.DocType("Accounting Dimension Detail")
acc_dim_doc = (
frappe.qb.from_(p)
.inner_join(c)
.on(p.name == c.parent)
.select(c.parent)
.where((c.mandatory_for_bs == 1) | (c.mandatory_for_pl == 1))
.where(p.disabled == 0)
).run(as_dict=1)
acc_dim_names = [scrub(d.parent) for d in acc_dim_doc]
return acc_dim_names
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def pos_profile_query(doctype, txt, searchfield, start, page_len, filters):

View File

@@ -53,6 +53,7 @@
"column_break_42",
"free_item_uom",
"round_free_qty",
"dont_enforce_free_item_qty",
"is_recursive",
"recurse_for",
"apply_recursion_over",
@@ -643,12 +644,19 @@
"fieldname": "has_priority",
"fieldtype": "Check",
"label": "Has Priority"
},
{
"default": "0",
"depends_on": "eval:doc.price_or_product_discount == 'Product'",
"fieldname": "dont_enforce_free_item_qty",
"fieldtype": "Check",
"label": "Don't Enforce Free Item Qty"
}
],
"icon": "fa fa-gift",
"idx": 1,
"links": [],
"modified": "2024-09-16 18:14:51.314765",
"modified": "2025-02-17 18:15:39.824639",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",

View File

@@ -60,6 +60,7 @@ class PricingRule(Document):
disable: DF.Check
discount_amount: DF.Currency
discount_percentage: DF.Float
dont_enforce_free_item_qty: DF.Check
for_price_list: DF.Link | None
free_item: DF.Link | None
free_item_rate: DF.Currency
@@ -415,8 +416,6 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False):
"parent": args.parent,
"parenttype": args.parenttype,
"child_docname": args.get("child_docname"),
"discount_percentage": 0.0,
"discount_amount": 0,
}
)
@@ -455,8 +454,7 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False):
if pricing_rule.coupon_code_based == 1:
if not args.coupon_code:
return item_details
continue
coupon_code = frappe.db.get_value(
doctype="Coupon Code", filters={"pricing_rule": pricing_rule.name}, fieldname="name"
)
@@ -647,7 +645,7 @@ def remove_pricing_rule_for_item(pricing_rules, item_details, item_code=None, ra
if pricing_rule.margin_type in ["Percentage", "Amount"]:
item_details.margin_rate_or_amount = 0.0
item_details.margin_type = None
elif pricing_rule.get("free_item"):
elif pricing_rule.get("free_item") and not pricing_rule.get("dont_enforce_free_item_qty"):
item_details.remove_free_item = (
item_code if pricing_rule.get("same_item") else pricing_rule.get("free_item")
)

View File

@@ -428,6 +428,54 @@ class TestPricingRule(FrappeTestCase):
self.assertEqual(so.items[1].is_free_item, 1)
self.assertEqual(so.items[1].item_code, "_Test Item 2")
def test_dont_enforce_free_item_qty(self):
# this test is only for testing non-enforcement as all other tests in this file already test with enforcement
frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule")
test_record = {
"doctype": "Pricing Rule",
"title": "_Test Pricing Rule",
"apply_on": "Item Code",
"currency": "USD",
"items": [
{
"item_code": "_Test Item",
}
],
"selling": 1,
"rate_or_discount": "Discount Percentage",
"rate": 0,
"min_qty": 0,
"max_qty": 7,
"discount_percentage": 17.5,
"price_or_product_discount": "Product",
"same_item": 0,
"free_item": "_Test Item 2",
"free_qty": 1,
"company": "_Test Company",
}
pricing_rule = frappe.get_doc(test_record.copy()).insert()
# With enforcement
so = make_sales_order(item_code="_Test Item", qty=1, do_not_submit=True)
self.assertEqual(so.items[1].is_free_item, 1)
self.assertEqual(so.items[1].item_code, "_Test Item 2")
# Test 1 : Saving a document with an item with pricing list without it's corresponding free item will cause it the free item to be refetched on save
so.items.pop(1)
so.save()
so.reload()
self.assertEqual(len(so.items), 2)
# Without enforcement
pricing_rule.dont_enforce_free_item_qty = 1
pricing_rule.save()
# Test 2 : Deleted free item will not be fetched again on save without enforcement
so.items.pop(1)
so.save()
so.reload()
self.assertEqual(len(so.items), 1)
def test_cumulative_pricing_rule(self):
frappe.delete_doc_if_exists("Pricing Rule", "_Test Cumulative Pricing Rule")
test_record = {
@@ -1451,6 +1499,7 @@ def make_pricing_rule(**args):
"discount_amount": args.discount_amount or 0.0,
"apply_multiple_pricing_rules": args.apply_multiple_pricing_rules or 0,
"has_priority": args.has_priority or 0,
"enforce_free_item_qty": args.dont_enforce_free_item_qty or 0,
}
)

View File

@@ -713,7 +713,10 @@ def apply_pricing_rule_for_free_items(doc, pricing_rule_args):
args.pop((item.item_code, item.pricing_rules))
for free_item in args.values():
doc.append("items", free_item)
if doc.is_new() or not frappe.get_value(
"Pricing Rule", free_item["pricing_rules"], "dont_enforce_free_item_qty"
):
doc.append("items", free_item)
def get_pricing_rule_items(pr_doc, other_items=False) -> list:

View File

@@ -20,6 +20,7 @@
"is_advance",
"section_break_5",
"difference_amount",
"gain_loss_posting_date",
"column_break_7",
"difference_account",
"exchange_rate",
@@ -153,11 +154,16 @@
"fieldtype": "Check",
"in_list_view": 1,
"label": "Reconciled"
},
{
"fieldname": "gain_loss_posting_date",
"fieldtype": "Date",
"label": "Difference Posting Date"
}
],
"istable": 1,
"links": [],
"modified": "2023-03-20 21:05:43.121945",
"modified": "2025-01-23 16:09:01.058574",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Process Payment Reconciliation Log Allocations",
@@ -167,4 +173,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -20,6 +20,7 @@ class ProcessPaymentReconciliationLogAllocations(Document):
difference_account: DF.Link | None
difference_amount: DF.Currency
exchange_rate: DF.Float
gain_loss_posting_date: DF.Date | None
invoice_number: DF.DynamicLink
invoice_type: DF.Link
is_advance: DF.Data | None

View File

@@ -60,6 +60,20 @@ frappe.ui.form.on("Process Statement Of Accounts", {
},
};
});
frm.set_query("cost_center", function () {
return {
filters: {
company: frm.doc.company,
},
};
});
frm.set_query("project", function () {
return {
filters: {
company: frm.doc.company,
},
};
});
if (frm.doc.__islocal) {
frm.set_value("from_date", frappe.datetime.add_months(frappe.datetime.get_today(), -1));
frm.set_value("to_date", frappe.datetime.get_today());

View File

@@ -12,7 +12,7 @@
"posting_date",
"company",
"account",
"group_by",
"categorize_by",
"cost_center",
"territory",
"ignore_exchange_rate_revaluation_journals",
@@ -174,14 +174,6 @@
"fieldtype": "Date",
"label": "Start Date"
},
{
"default": "Group by Voucher (Consolidated)",
"depends_on": "eval:(doc.report == 'General Ledger');",
"fieldname": "group_by",
"fieldtype": "Select",
"label": "Group By",
"options": "\nGroup by Voucher\nGroup by Voucher (Consolidated)"
},
{
"depends_on": "eval: (doc.report == 'General Ledger');",
"fieldname": "currency",
@@ -397,10 +389,18 @@
"fieldname": "show_remarks",
"fieldtype": "Check",
"label": "Show Remarks"
},
{
"default": "Categorize by Voucher (Consolidated)",
"depends_on": "eval:(doc.report == 'General Ledger');",
"fieldname": "categorize_by",
"fieldtype": "Select",
"label": "Categorize By",
"options": "\nCategorize by Voucher\nCategorize by Voucher (Consolidated)"
}
],
"links": [],
"modified": "2024-12-11 12:11:13.543134",
"modified": "2025-04-30 14:43:23.643006",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Process Statement Of Accounts",
@@ -436,4 +436,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -44,6 +44,7 @@ class ProcessStatementOfAccounts(Document):
ageing_based_on: DF.Literal["Due Date", "Posting Date"]
based_on_payment_terms: DF.Check
body: DF.TextEditor | None
categorize_by: DF.Literal["", "Categorize by Voucher", "Categorize by Voucher (Consolidated)"]
cc_to: DF.TableMultiSelect[ProcessStatementOfAccountsCC]
collection_name: DF.DynamicLink | None
company: DF.Link
@@ -56,7 +57,6 @@ class ProcessStatementOfAccounts(Document):
finance_book: DF.Link | None
frequency: DF.Literal["Weekly", "Monthly", "Quarterly"]
from_date: DF.Date | None
group_by: DF.Literal["", "Group by Voucher", "Group by Voucher (Consolidated)"]
ignore_cr_dr_notes: DF.Check
ignore_exchange_rate_revaluation_journals: DF.Check
include_ageing: DF.Check
@@ -129,8 +129,8 @@ def get_statement_dict(doc, get_statement_dict=False):
tax_id = frappe.get_doc("Customer", entry.customer).tax_id
presentation_currency = (
get_party_account_currency("Customer", entry.customer, doc.company)
or doc.currency
doc.currency
or get_party_account_currency("Customer", entry.customer, doc.company)
or get_company_currency(doc.company)
)
@@ -204,7 +204,7 @@ def get_gl_filters(doc, entry, tax_id, presentation_currency):
"party": [entry.customer],
"party_name": [entry.customer_name] if entry.customer_name else None,
"presentation_currency": presentation_currency,
"group_by": doc.group_by,
"categorize_by": doc.categorize_by,
"currency": doc.currency,
"project": [p.project_name for p in doc.project],
"show_opening_entries": 0,
@@ -236,17 +236,21 @@ def get_ar_filters(doc, entry):
def get_html(doc, filters, entry, col, res, ageing):
base_template_path = "frappe/www/printview.html"
template_path = (
"erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.html"
if doc.report == "General Ledger"
else "erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html"
)
template_path = "erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html"
if doc.report == "General Ledger":
template_path = (
"erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.html"
)
process_soa_html = frappe.get_hooks("process_soa_html")
# fetching custom print format for Process Statement of Accounts
if process_soa_html and process_soa_html.get(doc.report):
template_path = process_soa_html[doc.report][-1]
if doc.letter_head:
from frappe.www.printview import get_letter_head
letter_head = get_letter_head(doc, 0)
html = frappe.render_template(
template_path,
{
@@ -262,7 +266,6 @@ def get_html(doc, filters, entry, col, res, ageing):
else None,
},
)
html = frappe.render_template(
base_template_path,
{"body": html, "css": get_print_style(), "title": "Statement For " + entry.customer},
@@ -321,9 +324,12 @@ def get_recipients_and_cc(customer, doc):
recipients = []
for clist in doc.customers:
if clist.customer == customer:
recipients.append(clist.billing_email)
if clist.billing_email:
for email in clist.billing_email.split(","):
recipients.append(email.strip())
if doc.primary_mandatory and clist.primary_email:
recipients.append(clist.primary_email)
for email in clist.primary_email.split(","):
recipients.append(email.strip())
cc = []
if doc.cc_to != "":
try:

View File

@@ -211,7 +211,7 @@
<tr>
{% if(report.report_name == "Accounts Receivable" or report.report_name == "Accounts Payable") %}
{% if(data[i]["party"]) %}
<td>{{ (data[i]["posting_date"]) }}</td>
<td>{{ frappe.format((data[i]["posting_date"]), 'Date') }}</td>
<td style="text-align: right">{{ data[i]["age"] }}</td>
<td>
{% if not(filters.show_future_payments) %}

View File

@@ -97,6 +97,7 @@ def create_process_soa(**args):
company=args.company or "_Test Company",
customers=args.customers or [{"customer": "_Test Customer"}],
enable_auto_email=1 if args.enable_auto_email else 0,
currency=args.currency or "",
frequency=args.frequency or "Weekly",
report=args.report or "General Ledger",
from_date=args.from_date or getdate(today()),

View File

@@ -332,6 +332,8 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
if (this.frm.doc.__onload && this.frm.doc.__onload.load_after_mapping) return;
let payment_terms_template = this.frm.doc.payment_terms_template;
erpnext.utils.get_party_details(
this.frm,
"erpnext.accounts.party.get_party_details",
@@ -352,6 +354,12 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
me.frm.doc.tax_withholding_category = me.frm.supplier_tds;
me.frm.set_df_property("apply_tds", "read_only", me.frm.supplier_tds ? 0 : 1);
me.frm.set_df_property("tax_withholding_category", "hidden", me.frm.supplier_tds ? 0 : 1);
// while duplicating, don't change payment terms
if (me.frm.doc.__run_link_triggers === false) {
me.frm.set_value("payment_terms_template", payment_terms_template);
me.frm.refresh_field("payment_terms_template");
}
}
);
}
@@ -368,6 +376,18 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
}
}
tax_withholding_category(frm) {
var me = this;
let filtered_taxes = (me.frm.doc.taxes || []).filter((row) => !row.is_tax_withholding_account);
me.frm.clear_table("taxes");
filtered_taxes.forEach((row) => {
me.frm.add_child("taxes", row);
});
me.frm.refresh_field("taxes");
}
credit_to() {
var me = this;
if (this.frm.doc.credit_to) {
@@ -405,6 +425,8 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
this.frm.set_value("is_paid", 0);
frappe.msgprint(__("Please specify Company to proceed"));
}
} else {
this.frm.set_value("paid_amount", 0);
}
this.calculate_outstanding_amount();
this.frm.refresh_fields();

View File

@@ -143,8 +143,10 @@
"contact_mobile",
"contact_email",
"company_shipping_address_section",
"shipping_address",
"dispatch_address",
"dispatch_address_display",
"column_break_126",
"shipping_address",
"shipping_address_display",
"company_billing_address_section",
"billing_address",
@@ -1546,7 +1548,7 @@
{
"fieldname": "company_shipping_address_section",
"fieldtype": "Section Break",
"label": "Company Shipping Address"
"label": "Shipping Address"
},
{
"fieldname": "column_break_126",
@@ -1627,13 +1629,28 @@
"fieldname": "update_outstanding_for_self",
"fieldtype": "Check",
"label": "Update Outstanding for Self"
},
{
"fieldname": "dispatch_address_display",
"fieldtype": "Text Editor",
"label": "Dispatch Address",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "dispatch_address",
"fieldtype": "Link",
"label": "Select Dispatch Address ",
"options": "Address",
"print_hide": 1
}
],
"grid_page_length": 50,
"icon": "fa fa-file-text",
"idx": 204,
"is_submittable": 1,
"links": [],
"modified": "2025-01-14 11:39:04.564610",
"modified": "2025-04-09 16:49:22.175081",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",
@@ -1688,6 +1705,7 @@
"write": 1
}
],
"row_format": "Dynamic",
"search_fields": "posting_date, supplier, bill_no, base_grand_total, outstanding_amount",
"show_name_in_global_search": 1,
"sort_field": "modified",

View File

@@ -10,7 +10,6 @@ from frappe.utils import cint, cstr, flt, formatdate, get_link_to_form, getdate,
import erpnext
from erpnext.accounts.deferred_revenue import validate_service_stop_date
from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt
from erpnext.accounts.doctype.repost_accounting_ledger.repost_accounting_ledger import (
validate_docs_for_deferred_accounting,
validate_docs_for_voucher_types,
@@ -33,7 +32,7 @@ from erpnext.accounts.general_ledger import (
merge_similar_entries,
)
from erpnext.accounts.party import get_due_date, get_party_account
from erpnext.accounts.utils import get_account_currency, get_fiscal_year
from erpnext.accounts.utils import get_account_currency, get_fiscal_year, update_voucher_outstanding
from erpnext.assets.doctype.asset.asset import is_cwip_accounting_enabled
from erpnext.assets.doctype.asset_category.asset_category import get_asset_category_account
from erpnext.buying.utils import check_on_hold_or_closed_status
@@ -118,6 +117,8 @@ class PurchaseInvoice(BuyingController):
currency: DF.Link | None
disable_rounded_total: DF.Check
discount_amount: DF.Currency
dispatch_address: DF.Link | None
dispatch_address_display: DF.TextEditor | None
due_date: DF.Date | None
from_date: DF.Date | None
grand_total: DF.Currency
@@ -838,12 +839,12 @@ class PurchaseInvoice(BuyingController):
def update_supplier_outstanding(self, update_outstanding):
if update_outstanding == "No":
update_outstanding_amt(
self.credit_to,
"Supplier",
self.supplier,
self.doctype,
self.return_against if cint(self.is_return) and self.return_against else self.name,
update_voucher_outstanding(
voucher_type=self.doctype,
voucher_no=self.return_against if cint(self.is_return) and self.return_against else self.name,
account=self.credit_to,
party_type="Supplier",
party=self.supplier,
)
def get_gl_entries(self, warehouse_account=None):
@@ -872,6 +873,7 @@ class PurchaseInvoice(BuyingController):
self.make_payment_gl_entries(gl_entries)
self.make_write_off_gl_entry(gl_entries)
self.make_gle_for_rounding_adjustment(gl_entries)
self.set_transaction_currency_and_rate_in_gl_map(gl_entries)
return gl_entries
def check_asset_cwip_enabled(self):
@@ -917,6 +919,7 @@ class PurchaseInvoice(BuyingController):
"credit_in_account_currency": base_grand_total
if self.party_account_currency == self.company_currency
else grand_total,
"credit_in_transaction_currency": grand_total,
"against_voucher": against_voucher,
"against_voucher_type": self.doctype,
"project": self.project,
@@ -952,7 +955,7 @@ class PurchaseInvoice(BuyingController):
valuation_tax_accounts = [
d.account_head
for d in self.get("taxes")
if d.category in ("Valuation", "Total and Valuation")
if d.category in ("Valuation", "Valuation and Total")
and flt(d.base_tax_amount_after_discount_amount)
]
@@ -968,7 +971,6 @@ class PurchaseInvoice(BuyingController):
for item in self.get("items"):
if flt(item.base_net_amount):
account_currency = get_account_currency(item.expense_account)
if item.item_code:
frappe.get_cached_value("Item", item.item_code, "asset_category")
@@ -977,6 +979,7 @@ class PurchaseInvoice(BuyingController):
and self.auto_accounting_for_stock
and (item.item_code in stock_items or item.is_fixed_asset)
):
account_currency = get_account_currency(item.expense_account)
# warehouse account
warehouse_debit_amount = self.make_stock_adjustment_entry(
gl_entries, item, voucher_wise_stock_value, account_currency
@@ -992,6 +995,7 @@ class PurchaseInvoice(BuyingController):
"project": item.project or self.project,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"debit": warehouse_debit_amount,
"debit_in_transaction_currency": item.net_amount,
},
warehouse_account[item.warehouse]["account_currency"],
item=item,
@@ -1012,6 +1016,7 @@ class PurchaseInvoice(BuyingController):
"project": item.project or self.project,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"debit": -1 * flt(credit_amount, item.precision("base_net_amount")),
"debit_in_transaction_currency": item.net_amount,
},
warehouse_account[item.from_warehouse]["account_currency"],
item=item,
@@ -1026,6 +1031,7 @@ class PurchaseInvoice(BuyingController):
"account": item.expense_account,
"against": self.supplier,
"debit": flt(item.base_net_amount, item.precision("base_net_amount")),
"debit_in_transaction_currency": item.net_amount,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"cost_center": item.cost_center,
"project": item.project,
@@ -1043,6 +1049,10 @@ class PurchaseInvoice(BuyingController):
"account": item.expense_account,
"against": self.supplier,
"debit": warehouse_debit_amount,
"debit_in_transaction_currency": flt(
warehouse_debit_amount / self.conversion_rate,
item.precision("net_amount"),
),
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"cost_center": item.cost_center,
"project": item.project or self.project,
@@ -1055,7 +1065,9 @@ class PurchaseInvoice(BuyingController):
# Amount added through landed-cost-voucher
if landed_cost_entries:
if (item.item_code, item.name) in landed_cost_entries:
for account, amount in landed_cost_entries[(item.item_code, item.name)].items():
for account, base_amount in landed_cost_entries[
(item.item_code, item.name)
].items():
gl_entries.append(
self.get_gl_dict(
{
@@ -1063,8 +1075,9 @@ class PurchaseInvoice(BuyingController):
"against": item.expense_account,
"cost_center": item.cost_center,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"credit": flt(amount["base_amount"]),
"credit_in_account_currency": flt(amount["amount"]),
"credit": flt(base_amount["base_amount"]),
"credit_in_account_currency": flt(base_amount["amount"]),
"credit_in_transaction_currency": item.net_amount,
"project": item.project or self.project,
},
item=item,
@@ -1087,6 +1100,7 @@ class PurchaseInvoice(BuyingController):
"project": item.project or self.project,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"credit": flt(item.rm_supp_cost),
"credit_in_transaction_currency": item.net_amount,
},
warehouse_account[self.supplier_warehouse]["account_currency"],
item=item,
@@ -1100,7 +1114,8 @@ class PurchaseInvoice(BuyingController):
else item.deferred_expense_account
)
dummy, amount = self.get_amount_and_base_amount(item, None)
account_currency = get_account_currency(expense_account)
amount, base_amount = self.get_amount_and_base_amount(item, None)
if provisional_accounting_for_non_stock_items:
self.make_provisional_gl_entry(gl_entries, item)
@@ -1111,7 +1126,8 @@ class PurchaseInvoice(BuyingController):
{
"account": expense_account,
"against": self.supplier,
"debit": amount,
"debit": base_amount,
"debit_in_transaction_currency": amount,
"cost_center": item.cost_center,
"project": item.project or self.project,
},
@@ -1185,6 +1201,10 @@ class PurchaseInvoice(BuyingController):
"account": stock_rbnb,
"against": self.supplier,
"debit": flt(item.item_tax_amount, item.precision("item_tax_amount")),
"debit_in_transaction_currency": flt(
item.item_tax_amount / self.conversion_rate,
item.precision("item_tax_amount"),
),
"remarks": self.remarks or _("Accounting Entry for Stock"),
"cost_center": self.cost_center,
"project": item.project or self.project,
@@ -1300,6 +1320,7 @@ class PurchaseInvoice(BuyingController):
"account": cost_of_goods_sold_account,
"against": item.expense_account,
"debit": stock_adjustment_amt,
"debit_in_transaction_currency": stock_adjustment_amt / self.conversion_rate,
"remarks": self.get("remarks") or _("Stock Adjustment"),
"cost_center": item.cost_center,
"project": item.project or self.project,
@@ -1311,6 +1332,38 @@ class PurchaseInvoice(BuyingController):
warehouse_debit_amount = stock_amount
elif self.is_return and self.update_stock and self.is_internal_supplier and warehouse_debit_amount:
net_rate = item.base_net_amount
if item.sales_incoming_rate: # for internal transfer
net_rate = item.qty * item.sales_incoming_rate
stock_amount = (
net_rate
+ item.item_tax_amount
+ flt(item.landed_cost_voucher_amount)
+ flt(item.get("amount_difference_with_purchase_invoice"))
)
if flt(stock_amount, net_amt_precision) != flt(warehouse_debit_amount, net_amt_precision):
cost_of_goods_sold_account = self.get_company_default("default_expense_account")
stock_adjustment_amt = stock_amount - warehouse_debit_amount
gl_entries.append(
self.get_gl_dict(
{
"account": cost_of_goods_sold_account,
"against": item.expense_account,
"debit": stock_adjustment_amt,
"debit_in_transaction_currency": stock_adjustment_amt / self.conversion_rate,
"remarks": self.get("remarks") or _("Stock Adjustment"),
"cost_center": item.cost_center,
"project": item.project or self.project,
},
account_currency,
item=item,
)
)
return warehouse_debit_amount
def make_tax_gl_entries(self, gl_entries):
@@ -1333,6 +1386,7 @@ class PurchaseInvoice(BuyingController):
dr_or_cr + "_in_account_currency": base_amount
if account_currency == self.company_currency
else amount,
dr_or_cr + "_in_transaction_currency": amount,
"cost_center": tax.cost_center,
},
account_currency,
@@ -1379,6 +1433,10 @@ class PurchaseInvoice(BuyingController):
"cost_center": tax.cost_center,
"against": self.supplier,
"credit": applicable_amount,
"credit_in_transaction_currency": flt(
applicable_amount / self.conversion_rate,
frappe.get_precision("Purchase Invoice Item", "item_tax_amount"),
),
"remarks": self.remarks or _("Accounting Entry for Stock"),
},
item=tax,
@@ -1397,6 +1455,10 @@ class PurchaseInvoice(BuyingController):
"cost_center": tax.cost_center,
"against": self.supplier,
"credit": valuation_tax[tax.name],
"credit_in_transaction_currency": flt(
valuation_tax[tax.name] / self.conversion_rate,
frappe.get_precision("Purchase Invoice Item", "item_tax_amount"),
),
"remarks": self.remarks or _("Accounting Entry for Stock"),
},
item=tax,
@@ -1412,6 +1474,7 @@ class PurchaseInvoice(BuyingController):
"account": self.unrealized_profit_loss_account,
"against": self.supplier,
"credit": flt(self.total_taxes_and_charges),
"credit_in_transaction_currency": flt(self.total_taxes_and_charges),
"credit_in_account_currency": flt(self.base_total_taxes_and_charges),
"cost_center": self.cost_center,
},
@@ -1461,6 +1524,7 @@ class PurchaseInvoice(BuyingController):
"debit_in_account_currency": self.base_paid_amount
if self.party_account_currency == self.company_currency
else self.paid_amount,
"debit_in_transaction_currency": self.paid_amount,
"against_voucher": self.return_against
if cint(self.is_return) and self.return_against
else self.name,
@@ -1482,6 +1546,7 @@ class PurchaseInvoice(BuyingController):
"credit_in_account_currency": self.base_paid_amount
if bank_account_currency == self.company_currency
else self.paid_amount,
"credit_in_transaction_currency": self.paid_amount,
"cost_center": self.cost_center,
},
bank_account_currency,
@@ -1506,6 +1571,7 @@ class PurchaseInvoice(BuyingController):
"debit_in_account_currency": self.base_write_off_amount
if self.party_account_currency == self.company_currency
else self.write_off_amount,
"debit_in_transaction_currency": self.write_off_amount,
"against_voucher": self.return_against
if cint(self.is_return) and self.return_against
else self.name,
@@ -1526,6 +1592,7 @@ class PurchaseInvoice(BuyingController):
"credit_in_account_currency": self.base_write_off_amount
if write_off_account_currency == self.company_currency
else self.write_off_amount,
"credit_in_transaction_currency": self.write_off_amount,
"cost_center": self.cost_center or self.write_off_cost_center,
},
item=self,
@@ -1797,13 +1864,13 @@ class PurchaseInvoice(BuyingController):
self.remove(d)
## Add pending vouchers on which tax was withheld
for voucher_no, voucher_details in voucher_wise_amount.items():
for row in voucher_wise_amount:
self.append(
"tax_withheld_vouchers",
{
"voucher_name": voucher_no,
"voucher_type": voucher_details.get("voucher_type"),
"taxable_amount": voucher_details.get("amount"),
"voucher_name": row.voucher_name,
"voucher_type": row.voucher_type,
"taxable_amount": row.taxable_amount,
},
)

View File

@@ -45,12 +45,16 @@ frappe.listview_settings["Purchase Invoice"] = {
},
onload: function (listview) {
listview.page.add_action_item(__("Purchase Receipt"), () => {
erpnext.bulk_transaction_processing.create(listview, "Purchase Invoice", "Purchase Receipt");
});
if (frappe.model.can_create("Purchase Receipt")) {
listview.page.add_action_item(__("Purchase Receipt"), () => {
erpnext.bulk_transaction_processing.create(listview, "Purchase Invoice", "Purchase Receipt");
});
}
listview.page.add_action_item(__("Payment"), () => {
erpnext.bulk_transaction_processing.create(listview, "Purchase Invoice", "Payment Entry");
});
if (frappe.model.can_create("Payment Entry")) {
listview.page.add_action_item(__("Payment"), () => {
erpnext.bulk_transaction_processing.create(listview, "Purchase Invoice", "Payment Entry");
});
}
},
};

View File

@@ -16,7 +16,7 @@ from erpnext.buying.doctype.purchase_order.test_purchase_order import (
create_purchase_order,
)
from erpnext.buying.doctype.supplier.test_supplier import create_supplier
from erpnext.controllers.accounts_controller import get_payment_terms
from erpnext.controllers.accounts_controller import InvalidQtyError, get_payment_terms
from erpnext.controllers.buying_controller import QtyMismatchError
from erpnext.exceptions import InvalidCurrency
from erpnext.projects.doctype.project.test_project import make_project
@@ -55,6 +55,16 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
def tearDown(self):
frappe.db.rollback()
def test_purchase_invoice_qty(self):
pi = make_purchase_invoice(qty=0, do_not_save=True)
with self.assertRaises(InvalidQtyError):
pi.save()
# No error with qty=1
pi.items[0].qty = 1
pi.save()
self.assertEqual(pi.items[0].qty, 1)
def test_purchase_invoice_received_qty(self):
"""
1. Test if received qty is validated against accepted + rejected
@@ -1695,6 +1705,9 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
# Configure Buying Settings to allow rate change
frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 0)
# Configure Accounts Settings to allow 300% over billing
frappe.db.set_single_value("Accounts Settings", "over_billing_allowance", 300)
# Create PR: rate = 1000, qty = 5
pr = make_purchase_receipt(
item_code="_Test Non Stock Item", rate=1000, posting_date=add_days(nowdate(), -2)
@@ -2094,7 +2107,7 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
1,
)
pi = make_pi_from_pr(pr.name)
self.assertEqual(pi.payment_schedule[0].payment_amount, 2500)
self.assertEqual(pi.payment_schedule[0].payment_amount, 1000)
automatically_fetch_payment_terms(enable=0)
frappe.db.set_value(
@@ -2482,6 +2495,76 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
item.reload()
self.assertEqual(item.last_purchase_rate, 0)
def test_adjust_incoming_rate_from_pi_with_multi_currency_and_partial_billing(self):
frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 0)
frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 1)
pr = make_purchase_receipt(
qty=10, rate=10, currency="USD", do_not_save=1, supplier="_Test Supplier USD"
)
pr.conversion_rate = 5300
pr.save()
pr.submit()
incoming_rate = frappe.db.get_value(
"Stock Ledger Entry",
{"voucher_type": "Purchase Receipt", "voucher_no": pr.name},
"incoming_rate",
)
self.assertEqual(incoming_rate, 53000) # Asserting to confirm if the default calculation is correct
pi = create_purchase_invoice_from_receipt(pr.name)
for row in pi.items:
row.qty = 1
pi.save()
pi.submit()
incoming_rate = frappe.db.get_value(
"Stock Ledger Entry",
{"voucher_type": "Purchase Receipt", "voucher_no": pr.name},
"incoming_rate",
)
# Test 1 : Incoming rate should not change as only the qty has changed and not the rate (this was not the case before)
self.assertEqual(incoming_rate, 53000)
pi = create_purchase_invoice_from_receipt(pr.name)
for row in pi.items:
row.qty = 1
row.rate = 9
pi.save()
pi.submit()
incoming_rate = frappe.db.get_value(
"Stock Ledger Entry",
{"voucher_type": "Purchase Receipt", "voucher_no": pr.name},
"incoming_rate",
)
# Test 2 : Rate in new PI is lower than PR, so incoming rate should also be lower
self.assertEqual(incoming_rate, 50350)
pi = create_purchase_invoice_from_receipt(pr.name)
for row in pi.items:
row.qty = 1
row.rate = 12
pi.save()
pi.submit()
incoming_rate = frappe.db.get_value(
"Stock Ledger Entry",
{"voucher_type": "Purchase Receipt", "voucher_no": pr.name},
"incoming_rate",
)
# Test 3 : Rate in new PI is higher than PR, so incoming rate should also be higher
self.assertEqual(incoming_rate, 54766.667)
frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 0)
frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1)
def test_opening_invoice_rounding_adjustment_validation(self):
pi = make_purchase_invoice(do_not_save=1)
pi.items[0].rate = 99.98
@@ -2569,6 +2652,171 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
"Buying Settings", "bill_for_rejected_quantity_in_purchase_invoice", original_value
)
def test_trx_currency_debit_credit_for_high_precision(self):
exc_rate = 0.737517516
pi = make_purchase_invoice(
currency="USD", conversion_rate=exc_rate, qty=1, rate=2000, do_not_save=True
)
pi.supplier = "_Test Supplier USD"
pi.save().submit()
expected = (
("_Test Account Cost for Goods Sold - _TC", 1475.04, 0.0, 2000.0, 0.0, "USD", exc_rate),
("_Test Payable USD - _TC", 0.0, 1475.04, 0.0, 2000.0, "USD", exc_rate),
)
actual = frappe.db.get_all(
"GL Entry",
filters={"voucher_no": pi.name},
fields=[
"account",
"debit",
"credit",
"debit_in_transaction_currency",
"credit_in_transaction_currency",
"transaction_currency",
"transaction_exchange_rate",
],
order_by="account",
as_list=1,
)
self.assertEqual(actual, expected)
def test_prevents_fully_returned_invoice_with_zero_quantity(self):
from erpnext.controllers.sales_and_purchase_return import StockOverReturnError, make_return_doc
invoice = make_purchase_invoice(qty=10)
return_doc = make_return_doc(invoice.doctype, invoice.name)
return_doc.items[0].qty = -10
return_doc.save().submit()
return_doc = make_return_doc(invoice.doctype, invoice.name)
return_doc.items[0].qty = 0
self.assertRaises(StockOverReturnError, return_doc.save)
def test_apply_discount_on_grand_total(self):
"""
To test if after applying discount on grand total,
the grand total is calculated correctly without any rounding errors
"""
invoice = make_purchase_invoice(qty=3, rate=100, do_not_save=True, do_not_submit=True)
invoice.append(
"items",
{
"item_code": "_Test Item",
"qty": 3,
"rate": 50.3,
},
)
invoice.append(
"taxes",
{
"charge_type": "On Net Total",
"account_head": "_Test Account VAT - _TC",
"description": "VAT",
"rate": 15,
},
)
# the grand total here will be 518.54
invoice.disable_rounded_total = 1
# apply discount on grand total to adjust the grand total to 518
invoice.discount_amount = 0.54
invoice.save()
# check if grand total is 518 and not something like 517.99 due to rounding errors
self.assertEqual(invoice.grand_total, 518)
def test_apply_discount_on_grand_total_with_previous_row_total_tax(self):
"""
To test if after applying discount on grand total,
where the tax is calculated on previous row total, the grand total is calculated correctly
"""
invoice = make_purchase_invoice(qty=2, rate=100, do_not_save=True, do_not_submit=True)
invoice.extend(
"taxes",
[
{
"charge_type": "Actual",
"account_head": "_Test Account VAT - _TC",
"description": "VAT",
"tax_amount": 100,
},
{
"charge_type": "On Previous Row Amount",
"account_head": "_Test Account VAT - _TC",
"description": "VAT",
"row_id": 1,
"rate": 10,
},
{
"charge_type": "On Previous Row Total",
"account_head": "_Test Account VAT - _TC",
"description": "VAT",
"row_id": 1,
"rate": 10,
},
],
)
# the total here will be 340, so applying 40 discount
invoice.discount_amount = 40
invoice.save()
self.assertEqual(invoice.grand_total, 300)
def test_pr_pi_over_billing(self):
from erpnext.stock.doctype.purchase_receipt.purchase_receipt import (
make_purchase_invoice as make_purchase_invoice_from_pr,
)
# Configure Buying Settings to allow rate change
frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 0)
pr = make_purchase_receipt(qty=10, rate=10)
pi = make_purchase_invoice_from_pr(pr.name)
pi.items[0].rate = 12
# Test 1 - This will fail because over billing is not allowed
self.assertRaises(frappe.ValidationError, pi.submit)
frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 1)
# Test 2 - This will now submit because over billing allowance is ignored when set_landed_cost_based_on_purchase_invoice_rate is checked
pi.submit()
frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 0)
frappe.db.set_single_value("Accounts Settings", "over_billing_allowance", 20)
pi.cancel()
pi = make_purchase_invoice_from_pr(pr.name)
pi.items[0].rate = 12
# Test 3 - This will now submit because over billing is allowed upto 20%
pi.submit()
pi.reload()
pi.cancel()
pi = make_purchase_invoice_from_pr(pr.name)
pi.items[0].rate = 13
# Test 4 - Since this PI is overbilled by 130% and only 120% is allowed, it will fail
self.assertRaises(frappe.ValidationError, pi.submit)
def test_discount_percentage_not_set_when_amount_is_manually_set(self):
pi = make_purchase_invoice(do_not_save=True)
discount_amount = 7
pi.discount_amount = discount_amount
pi.save()
self.assertEqual(pi.additional_discount_percentage, None)
pi.set_posting_time = 1
pi.posting_date = add_days(today(), -1)
pi.save()
self.assertEqual(pi.discount_amount, discount_amount)
def set_advance_flag(company, flag, default_account):
frappe.db.set_value(
@@ -2678,7 +2926,7 @@ def make_purchase_invoice(**args):
bundle_id = None
if not args.use_serial_batch_fields and (args.get("batch_no") or args.get("serial_no")):
batches = {}
qty = args.qty or 5
qty = args.qty if args.qty is not None else 5
item_code = args.item or args.item_code or "_Test Item"
if args.get("batch_no"):
batches = frappe._dict({args.batch_no: qty})
@@ -2707,7 +2955,7 @@ def make_purchase_invoice(**args):
"item_code": args.item or args.item_code or "_Test Item",
"item_name": args.item_name,
"warehouse": args.warehouse or "_Test Warehouse - _TC",
"qty": args.qty or 5,
"qty": args.qty if args.qty is not None else 5,
"received_qty": args.received_qty or 0,
"rejected_qty": args.rejected_qty or 0,
"rate": args.rate or 50,

View File

@@ -38,6 +38,7 @@
"column_break_30",
"discount_percentage",
"discount_amount",
"distributed_discount_amount",
"base_rate_with_margin",
"sec_break2",
"rate",
@@ -461,7 +462,8 @@
"depends_on": "eval:!doc.is_fixed_asset && doc.use_serial_batch_fields === 1 && parent.update_stock === 1",
"fieldname": "serial_no",
"fieldtype": "Text",
"label": "Serial No"
"label": "Serial No",
"no_copy": 1
},
{
"depends_on": "eval:!doc.is_fixed_asset && doc.use_serial_batch_fields === 1 && parent.update_stock === 1",
@@ -839,7 +841,7 @@
},
{
"collapsible": 1,
"collapsible_depends_on": "eval: doc.margin_type || doc.discount_amount",
"collapsible_depends_on": "eval: doc.margin_type || doc.discount_amount || doc.distributed_discount_amount",
"fieldname": "section_break_26",
"fieldtype": "Section Break",
"label": "Discount and Margin"
@@ -970,12 +972,18 @@
"no_copy": 1,
"options": "Company:company:default_currency",
"print_hide": 1
},
{
"fieldname": "distributed_discount_amount",
"fieldtype": "Currency",
"label": "Distributed Discount Amount",
"options": "currency"
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2024-10-28 15:06:19.246141",
"modified": "2025-03-12 16:33:13.453290",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",
@@ -985,4 +993,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -34,6 +34,7 @@ class PurchaseInvoiceItem(Document):
description: DF.TextEditor | None
discount_amount: DF.Currency
discount_percentage: DF.Percent
distributed_discount_amount: DF.Currency
enable_deferred_expense: DF.Check
expense_account: DF.Link | None
from_warehouse: DF.Link | None

View File

@@ -196,7 +196,7 @@
"fieldname": "item_wise_tax_detail",
"fieldtype": "Code",
"hidden": 1,
"label": "Item Wise Tax Detail ",
"label": "Item Wise Tax Detail",
"oldfieldname": "item_wise_tax_detail",
"oldfieldtype": "Small Text",
"print_hide": 1,
@@ -235,10 +235,11 @@
"read_only": 1
}
],
"grid_page_length": 50,
"idx": 1,
"istable": 1,
"links": [],
"modified": "2024-04-08 19:51:36.678551",
"modified": "2025-04-15 13:14:48.936047",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Taxes and Charges",

View File

@@ -8,6 +8,8 @@ from frappe import _, qb
from frappe.model.document import Document
from frappe.utils.data import comma_and
from erpnext.stock import get_warehouse_account_map
class RepostAccountingLedger(Document):
# begin: auto-generated types
@@ -97,6 +99,9 @@ class RepostAccountingLedger(Document):
doc = frappe.get_doc(x.voucher_type, x.voucher_no)
if doc.doctype in ["Payment Entry", "Journal Entry"]:
gle_map = doc.build_gl_map()
elif doc.doctype == "Purchase Receipt":
warehouse_account_map = get_warehouse_account_map(doc.company)
gle_map = doc.get_gl_entries(warehouse_account_map)
else:
gle_map = doc.get_gl_entries()
@@ -177,6 +182,14 @@ def start_repost(account_repost_doc=str) -> None:
doc.force_set_against_expense_account()
doc.make_gl_entries()
elif doc.doctype == "Purchase Receipt":
if not repost_doc.delete_cancelled_entries:
doc.docstatus = 2
doc.make_gl_entries_on_cancel()
doc.docstatus = 1
doc.make_gl_entries(from_repost=True)
elif doc.doctype in ["Payment Entry", "Journal Entry", "Expense Claim"]:
if not repost_doc.delete_cancelled_entries:
doc.make_gl_entries(1)

View File

@@ -12,6 +12,8 @@ from erpnext.accounts.doctype.payment_request.payment_request import make_paymen
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.accounts.test.accounts_mixin import AccountsTestMixin
from erpnext.accounts.utils import get_fiscal_year
from erpnext.stock.doctype.item.test_item import make_item
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import get_gl_entries, make_purchase_receipt
class TestRepostAccountingLedger(AccountsTestMixin, FrappeTestCase):
@@ -204,9 +206,81 @@ class TestRepostAccountingLedger(AccountsTestMixin, FrappeTestCase):
self.assertIsNotNone(frappe.db.exists("GL Entry", {"voucher_no": si.name, "is_cancelled": 1}))
self.assertIsNotNone(frappe.db.exists("GL Entry", {"voucher_no": pe.name, "is_cancelled": 1}))
def test_06_repost_purchase_receipt(self):
from erpnext.accounts.doctype.account.test_account import create_account
provisional_account = create_account(
account_name="Provision Account",
parent_account="Current Liabilities - _TC",
company=self.company,
)
another_provisional_account = create_account(
account_name="Another Provision Account",
parent_account="Current Liabilities - _TC",
company=self.company,
)
company = frappe.get_doc("Company", self.company)
company.enable_provisional_accounting_for_non_stock_items = 1
company.default_provisional_account = provisional_account
company.save()
test_cc = company.cost_center
default_expense_account = company.default_expense_account
item = make_item(properties={"is_stock_item": 0})
pr = make_purchase_receipt(company=self.company, item_code=item.name, rate=1000.0, qty=1.0)
pr_gl_entries = get_gl_entries(pr.doctype, pr.name, skip_cancelled=True)
expected_pr_gles = [
{"account": provisional_account, "debit": 0.0, "credit": 1000.0, "cost_center": test_cc},
{"account": default_expense_account, "debit": 1000.0, "credit": 0.0, "cost_center": test_cc},
]
self.assertEqual(expected_pr_gles, pr_gl_entries)
# change the provisional account
frappe.db.set_value(
"Purchase Receipt Item",
pr.items[0].name,
"provisional_expense_account",
another_provisional_account,
)
repost_doc = frappe.new_doc("Repost Accounting Ledger")
repost_doc.company = self.company
repost_doc.delete_cancelled_entries = True
repost_doc.append("vouchers", {"voucher_type": pr.doctype, "voucher_no": pr.name})
repost_doc.save().submit()
pr_gles_after_repost = get_gl_entries(pr.doctype, pr.name, skip_cancelled=True)
expected_pr_gles_after_repost = [
{"account": default_expense_account, "debit": 1000.0, "credit": 0.0, "cost_center": test_cc},
{"account": another_provisional_account, "debit": 0.0, "credit": 1000.0, "cost_center": test_cc},
]
self.assertEqual(len(pr_gles_after_repost), len(expected_pr_gles_after_repost))
self.assertEqual(expected_pr_gles_after_repost, pr_gles_after_repost)
# teardown
repost_doc.cancel()
repost_doc.delete()
pr.reload()
pr.cancel()
company.enable_provisional_accounting_for_non_stock_items = 0
company.default_provisional_account = None
company.save()
def update_repost_settings():
allowed_types = ["Sales Invoice", "Purchase Invoice", "Payment Entry", "Journal Entry"]
allowed_types = [
"Sales Invoice",
"Purchase Invoice",
"Payment Entry",
"Journal Entry",
"Purchase Receipt",
]
repost_settings = frappe.get_doc("Repost Accounting Ledger Settings")
for x in allowed_types:
repost_settings.append("allowed_types", {"document_type": x, "allowed": True})

View File

@@ -16,6 +16,10 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
setup(doc) {
this.setup_posting_date_time_check();
super.setup(doc);
this.frm.make_methods = {
Dunning: this.make_dunning.bind(this),
"Invoice Discounting": this.make_invoice_discounting.bind(this),
};
}
company() {
super.company();
@@ -61,9 +65,10 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
refresh(doc, dt, dn) {
const me = this;
super.refresh();
if (cur_frm.msgbox && cur_frm.msgbox.$wrapper.is(":visible")) {
if (this.frm?.msgbox && this.frm.msgbox.$wrapper.is(":visible")) {
// hide new msgbox
cur_frm.msgbox.hide();
this.frm.msgbox.hide();
}
this.frm.toggle_reqd("due_date", !this.frm.doc.is_return);
@@ -121,12 +126,9 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
},
__("Create")
);
cur_frm.add_custom_button(
this.frm.add_custom_button(
__("Invoice Discounting"),
function () {
cur_frm.events.create_invoice_discounting(cur_frm);
},
this.make_invoice_discounting.bind(this),
__("Create")
);
@@ -135,22 +137,14 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
.reduce((prev, current) => prev || current, false);
if (payment_is_overdue) {
this.frm.add_custom_button(
__("Dunning"),
() => {
this.frm.events.create_dunning(this.frm);
},
__("Create")
);
this.frm.add_custom_button(__("Dunning"), this.make_dunning.bind(this), __("Create"));
}
}
if (doc.docstatus === 1) {
cur_frm.add_custom_button(
__("Maintenance Schedule"),
function () {
cur_frm.cscript.make_maintenance_schedule();
},
this.make_maintenance_schedule.bind(this),
__("Create")
);
}
@@ -185,6 +179,20 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
erpnext.accounts.unreconcile_payment.add_unreconcile_btn(me.frm);
}
make_invoice_discounting() {
frappe.model.open_mapped_doc({
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.create_invoice_discounting",
frm: this.frm,
});
}
make_dunning() {
frappe.model.open_mapped_doc({
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.create_dunning",
frm: this.frm,
});
}
make_maintenance_schedule() {
frappe.model.open_mapped_doc({
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.make_maintenance_schedule",
@@ -774,24 +782,6 @@ frappe.ui.form.on("Sales Invoice", {
};
};
},
// When multiple companies are set up. in case company name is changed set default company address
company: function (frm) {
if (frm.doc.company) {
frappe.call({
method: "erpnext.setup.doctype.company.company.get_default_company_address",
args: { name: frm.doc.company, existing_address: frm.doc.company_address || "" },
debounce: 2000,
callback: function (r) {
if (r.message) {
frm.set_value("company_address", r.message);
} else {
frm.set_value("company_address", "");
}
},
});
}
},
onload: function (frm) {
frm.redemption_conversion_factor = null;
},
@@ -889,8 +879,16 @@ frappe.ui.form.on("Sales Invoice", {
project: function (frm) {
if (frm.doc.project) {
frm.events.add_timesheet_data(frm, {
project: frm.doc.project,
frappe.call({
method: "is_auto_fetch_timesheet_enabled",
doc: frm.doc,
callback: function (r) {
if (cint(r.message)) {
frm.events.add_timesheet_data(frm, {
project: frm.doc.project,
});
}
},
});
}
},
@@ -906,9 +904,25 @@ frappe.ui.form.on("Sales Invoice", {
}
const timesheets = await frm.events.get_timesheet_data(frm, kwargs);
if (kwargs.item_code) {
frm.events.add_timesheet_item(frm, kwargs.item_code, timesheets);
}
return frm.events.set_timesheet_data(frm, timesheets);
},
add_timesheet_item: function (frm, item_code, timesheets) {
const row = frm.add_child("items");
frappe.model.set_value(row.doctype, row.name, "item_code", item_code);
frappe.model.set_value(
row.doctype,
row.name,
"qty",
timesheets.reduce((a, b) => a + (b["billing_hours"] || 0.0), 0.0)
);
},
async get_timesheet_data(frm, kwargs) {
return frappe
.call({
@@ -1006,6 +1020,22 @@ frappe.ui.form.on("Sales Invoice", {
fieldtype: "Date",
reqd: 1,
},
{
label: __("Item Code"),
fieldname: "item_code",
fieldtype: "Link",
options: "Item",
get_query: () => {
return {
query: "erpnext.controllers.queries.item_query",
filters: {
is_sales_item: 1,
customer: frm.doc.customer,
has_variants: 0,
},
};
},
},
{
fieldtype: "Column Break",
fieldname: "col_break_1",
@@ -1030,6 +1060,7 @@ frappe.ui.form.on("Sales Invoice", {
from_time: data.from_time,
to_time: data.to_time,
project: data.project,
item_code: data.item_code,
});
d.hide();
},
@@ -1045,20 +1076,6 @@ frappe.ui.form.on("Sales Invoice", {
frm.set_df_property("return_against", "label", __("Adjustment Against"));
}
},
create_invoice_discounting: function (frm) {
frappe.model.open_mapped_doc({
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.create_invoice_discounting",
frm: frm,
});
},
create_dunning: function (frm) {
frappe.model.open_mapped_doc({
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.create_dunning",
frm: frm,
});
},
});
frappe.ui.form.on("Sales Invoice Timesheet", {
@@ -1067,6 +1084,18 @@ frappe.ui.form.on("Sales Invoice Timesheet", {
},
});
frappe.ui.form.on("Sales Invoice Payment", {
mode_of_payment: function (frm) {
frappe.call({
doc: frm.doc,
method: "set_account_for_mode_of_payment",
callback: function (r) {
refresh_field("payments");
},
});
},
});
var set_timesheet_detail_rate = function (cdt, cdn, currency, timelog) {
frappe.call({
method: "erpnext.projects.doctype.timesheet.timesheet.get_timesheet_detail_rate",

View File

@@ -299,7 +299,8 @@
"oldfieldname": "project_name",
"oldfieldtype": "Link",
"options": "Project",
"print_hide": 1
"print_hide": 1,
"search_index": 1
},
{
"default": "0",
@@ -2176,6 +2177,7 @@
"print_hide": 1
}
],
"grid_page_length": 50,
"icon": "fa fa-file-text",
"idx": 181,
"is_submittable": 1,
@@ -2186,7 +2188,7 @@
"link_fieldname": "consolidated_invoice"
}
],
"modified": "2025-01-14 11:38:30.446370",
"modified": "2025-03-17 19:32:31.809658",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
@@ -2232,6 +2234,7 @@
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"search_fields": "posting_date, due_date, customer, base_grand_total, outstanding_amount",
"show_name_in_global_search": 1,
"sort_field": "modified",
@@ -2241,4 +2244,4 @@
"title_field": "title",
"track_changes": 1,
"track_seen": 1
}
}

View File

@@ -24,7 +24,11 @@ from erpnext.accounts.doctype.tax_withholding_category.tax_withholding_category
)
from erpnext.accounts.general_ledger import get_round_off_account_and_cost_center
from erpnext.accounts.party import get_due_date, get_party_account, get_party_details
from erpnext.accounts.utils import cancel_exchange_gain_loss_journal, get_account_currency
from erpnext.accounts.utils import (
cancel_exchange_gain_loss_journal,
get_account_currency,
update_voucher_outstanding,
)
from erpnext.assets.doctype.asset.depreciation import (
depreciate_asset,
get_disposal_account_and_cost_center,
@@ -263,8 +267,8 @@ class SalesInvoice(SellingController):
self.indicator_title = _("Paid")
def validate(self):
super().validate()
self.validate_auto_set_posting_time()
super().validate()
if not (self.is_pos or self.is_debit_note):
self.so_dn_required()
@@ -456,6 +460,8 @@ class SalesInvoice(SellingController):
self.make_bundle_for_sales_purchase_return(table_name)
self.make_bundle_using_old_serial_batch_fields(table_name)
self.update_stock_reservation_entries()
self.update_stock_ledger()
# this sequence because outstanding may get -ve
@@ -557,6 +563,7 @@ class SalesInvoice(SellingController):
self.make_gl_entries_on_cancel()
if self.update_stock == 1:
self.update_stock_reservation_entries()
self.repost_future_sle_and_gle()
self.db_set("status", "Cancelled")
@@ -671,7 +678,13 @@ class SalesInvoice(SellingController):
"Account", self.debit_to, "account_currency", cache=True
)
if not self.due_date and self.customer:
self.due_date = get_due_date(self.posting_date, "Customer", self.customer, self.company)
self.due_date = get_due_date(
self.posting_date,
"Customer",
self.customer,
self.company,
template_name=self.payment_terms_template,
)
super().set_missing_values(for_validate)
@@ -738,10 +751,10 @@ class SalesInvoice(SellingController):
self.paid_amount = paid_amount
self.base_paid_amount = base_paid_amount
@frappe.whitelist()
def set_account_for_mode_of_payment(self):
for payment in self.payments:
if not payment.account:
payment.account = get_bank_cash_account(payment.mode_of_payment, self.company).get("account")
payment.account = get_bank_cash_account(payment.mode_of_payment, self.company).get("account")
def validate_time_sheets_are_submitted(self):
for data in self.timesheets:
@@ -1083,11 +1096,15 @@ class SalesInvoice(SellingController):
timesheet.billing_amount = ts_doc.total_billable_amount
def update_timesheet_billing_for_project(self):
if not self.timesheets and self.project:
if not self.timesheets and self.project and self.is_auto_fetch_timesheet_enabled():
self.add_timesheet_data()
else:
self.calculate_billing_amount_for_timesheet()
@frappe.whitelist()
def is_auto_fetch_timesheet_enabled(self):
return frappe.db.get_single_value("Projects Settings", "fetch_timesheet_in_sales_invoice")
@frappe.whitelist()
def add_timesheet_data(self):
self.set("timesheets", [])
@@ -1192,14 +1209,14 @@ class SalesInvoice(SellingController):
make_reverse_gl_entries(voucher_type=self.doctype, voucher_no=self.name)
if update_outstanding == "No":
from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt
update_outstanding_amt(
self.debit_to,
"Customer",
self.customer,
self.doctype,
self.return_against if cint(self.is_return) and self.return_against else self.name,
update_voucher_outstanding(
voucher_type=self.doctype,
voucher_no=self.return_against
if cint(self.is_return) and self.return_against
else self.name,
account=self.debit_to,
party_type="Customer",
party=self.customer,
)
elif self.docstatus == 2 and cint(self.update_stock) and cint(auto_accounting_for_stock):
@@ -1230,6 +1247,7 @@ class SalesInvoice(SellingController):
self.make_write_off_gl_entry(gl_entries)
self.make_gle_for_rounding_adjustment(gl_entries)
self.set_transaction_currency_and_rate_in_gl_map(gl_entries)
return gl_entries
def make_customer_gl_entry(self, gl_entries):
@@ -1263,6 +1281,7 @@ class SalesInvoice(SellingController):
"debit_in_account_currency": base_grand_total
if self.party_account_currency == self.company_currency
else grand_total,
"debit_in_transaction_currency": grand_total,
"against_voucher": against_voucher,
"against_voucher_type": self.doctype,
"cost_center": self.cost_center,
@@ -1294,6 +1313,9 @@ class SalesInvoice(SellingController):
if account_currency == self.company_currency
else flt(amount, tax.precision("tax_amount_after_discount_amount"))
),
"credit_in_transaction_currency": flt(
amount, tax.precision("tax_amount_after_discount_amount")
),
"cost_center": tax.cost_center,
},
account_currency,
@@ -1311,6 +1333,7 @@ class SalesInvoice(SellingController):
"against": self.customer,
"debit": flt(self.total_taxes_and_charges),
"debit_in_account_currency": flt(self.base_total_taxes_and_charges),
"debit_in_transaction_currency": flt(self.total_taxes_and_charges),
"cost_center": self.cost_center,
},
account_currency,
@@ -1325,7 +1348,7 @@ class SalesInvoice(SellingController):
)
for item in self.get("items"):
if flt(item.base_net_amount, item.precision("base_net_amount")):
if flt(item.base_net_amount, item.precision("base_net_amount")) or item.is_fixed_asset:
# Do not book income for transfer within same company
if self.is_internal_transfer():
continue
@@ -1409,6 +1432,7 @@ class SalesInvoice(SellingController):
if account_currency == self.company_currency
else flt(amount, item.precision("net_amount"))
),
"credit_in_transaction_currency": flt(amount, item.precision("net_amount")),
"cost_center": item.cost_center,
"project": item.project or self.project,
},
@@ -1460,6 +1484,7 @@ class SalesInvoice(SellingController):
+ cstr(self.loyalty_redemption_account)
+ " for the Loyalty Program",
"credit": self.loyalty_amount,
"credit_in_transaction_currency": self.loyalty_amount,
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
"cost_center": self.cost_center,
@@ -1474,6 +1499,7 @@ class SalesInvoice(SellingController):
"cost_center": self.cost_center or self.loyalty_redemption_cost_center,
"against": self.customer,
"debit": self.loyalty_amount,
"debit_in_transaction_currency": self.loyalty_amount,
"remark": "Loyalty Points redeemed by the customer",
},
item=self,
@@ -1507,6 +1533,7 @@ class SalesInvoice(SellingController):
"credit_in_account_currency": payment_mode.base_amount
if self.party_account_currency == self.company_currency
else payment_mode.amount,
"credit_in_transaction_currency": payment_mode.amount,
"against_voucher": against_voucher,
"against_voucher_type": self.doctype,
"cost_center": self.cost_center,
@@ -1526,6 +1553,7 @@ class SalesInvoice(SellingController):
"debit_in_account_currency": payment_mode.base_amount
if payment_mode_account_currency == self.company_currency
else payment_mode.amount,
"debit_in_transaction_currency": payment_mode.amount,
"cost_center": self.cost_center,
},
payment_mode_account_currency,
@@ -1550,6 +1578,7 @@ class SalesInvoice(SellingController):
"debit_in_account_currency": flt(self.base_change_amount)
if self.party_account_currency == self.company_currency
else flt(self.change_amount),
"debit_in_transaction_currency": flt(self.change_amount),
"against_voucher": self.return_against
if cint(self.is_return) and self.return_against
else self.name,
@@ -1568,6 +1597,7 @@ class SalesInvoice(SellingController):
"account": self.account_for_change_amount,
"against": self.customer,
"credit": self.base_change_amount,
"credit_in_transaction_currency": self.change_amount,
"cost_center": self.cost_center,
},
item=self,
@@ -1599,6 +1629,9 @@ class SalesInvoice(SellingController):
if self.party_account_currency == self.company_currency
else flt(self.write_off_amount, self.precision("write_off_amount"))
),
"credit_in_transaction_currency": flt(
self.write_off_amount, self.precision("write_off_amount")
),
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
"cost_center": self.cost_center,
@@ -1619,6 +1652,9 @@ class SalesInvoice(SellingController):
if write_off_account_currency == self.company_currency
else flt(self.write_off_amount, self.precision("write_off_amount"))
),
"debit_in_transaction_currency": flt(
self.write_off_amount, self.precision("write_off_amount")
),
"cost_center": self.cost_center or self.write_off_cost_center or default_cost_center,
},
write_off_account_currency,
@@ -1663,6 +1699,9 @@ class SalesInvoice(SellingController):
"credit_in_account_currency": flt(
self.rounding_adjustment, self.precision("rounding_adjustment")
),
"credit_in_transaction_currency": flt(
self.rounding_adjustment, self.precision("rounding_adjustment")
),
"credit": flt(
self.base_rounding_adjustment, self.precision("base_rounding_adjustment")
),
@@ -1926,13 +1965,16 @@ def is_overdue(doc, total):
"base_payment_amount" if doc.party_account_currency != doc.currency else "payment_amount"
)
payable_amount = sum(
payment.get(payment_amount_field)
for payment in doc.payment_schedule
if getdate(payment.due_date) < today
payable_amount = flt(
sum(
payment.get(payment_amount_field)
for payment in doc.payment_schedule
if getdate(payment.due_date) < today
),
doc.precision("outstanding_amount"),
)
return (total - outstanding_amount) < payable_amount
return flt(total - outstanding_amount, doc.precision("outstanding_amount")) < payable_amount
def get_discounting_status(sales_invoice):
@@ -2244,6 +2286,18 @@ def make_inter_company_transaction(doctype, source_name, target_doc=None):
set_purchase_references(target)
def update_details(source_doc, target_doc, source_parent):
def _validate_address_link(address, link_doctype, link_name):
return frappe.db.get_value(
"Dynamic Link",
{
"parent": address,
"parenttype": "Address",
"link_doctype": link_doctype,
"link_name": link_name,
},
"parent",
)
target_doc.inter_company_invoice_reference = source_doc.name
if target_doc.doctype in ["Purchase Invoice", "Purchase Order"]:
currency = frappe.db.get_value("Supplier", details.get("party"), "default_currency")
@@ -2254,13 +2308,34 @@ def make_inter_company_transaction(doctype, source_name, target_doc=None):
target_doc.buying_price_list = source_doc.selling_price_list
# Invert Addresses
update_address(target_doc, "supplier_address", "address_display", source_doc.company_address)
update_address(
target_doc, "shipping_address", "shipping_address_display", source_doc.customer_address
)
update_address(
target_doc, "billing_address", "billing_address_display", source_doc.customer_address
)
if source_doc.company_address and _validate_address_link(
source_doc.company_address, "Supplier", details.get("party")
):
update_address(target_doc, "supplier_address", "address_display", source_doc.company_address)
if source_doc.dispatch_address_name and _validate_address_link(
source_doc.dispatch_address_name, "Company", details.get("company")
):
update_address(
target_doc,
"dispatch_address",
"dispatch_address_display",
source_doc.dispatch_address_name,
)
if source_doc.shipping_address_name and _validate_address_link(
source_doc.shipping_address_name, "Company", details.get("company")
):
update_address(
target_doc,
"shipping_address",
"shipping_address_display",
source_doc.shipping_address_name,
)
if source_doc.customer_address and _validate_address_link(
source_doc.customer_address, "Company", details.get("company")
):
update_address(
target_doc, "billing_address", "billing_address_display", source_doc.customer_address
)
if currency:
target_doc.currency = currency
@@ -2281,13 +2356,22 @@ def make_inter_company_transaction(doctype, source_name, target_doc=None):
target_doc.customer = details.get("party")
target_doc.selling_price_list = source_doc.buying_price_list
update_address(
target_doc, "company_address", "company_address_display", source_doc.supplier_address
)
update_address(
target_doc, "shipping_address_name", "shipping_address", source_doc.shipping_address
)
update_address(target_doc, "customer_address", "address_display", source_doc.shipping_address)
if source_doc.supplier_address and _validate_address_link(
source_doc.supplier_address, "Company", details.get("company")
):
update_address(
target_doc, "company_address", "company_address_display", source_doc.supplier_address
)
if source_doc.shipping_address and _validate_address_link(
source_doc.shipping_address, "Customer", details.get("party")
):
update_address(
target_doc, "shipping_address_name", "shipping_address", source_doc.shipping_address
)
if source_doc.shipping_address and _validate_address_link(
source_doc.shipping_address, "Customer", details.get("party")
):
update_address(target_doc, "customer_address", "address_display", source_doc.shipping_address)
if currency:
target_doc.currency = currency
@@ -2678,9 +2762,11 @@ def create_dunning(source_name, target_doc=None, ignore_permissions=False):
target.closing_text = letter_text.get("closing_text")
target.language = letter_text.get("language")
# update outstanding
# update outstanding from doc
if source.payment_schedule and len(source.payment_schedule) == 1:
target.overdue_payments[0].outstanding = source.get("outstanding_amount")
for row in target.overdue_payments:
if row.payment_schedule == source.payment_schedule[0].name:
row.outstanding = source.get("outstanding_amount")
target.validate()

View File

@@ -32,12 +32,16 @@ frappe.listview_settings["Sales Invoice"] = {
right_column: "grand_total",
onload: function (listview) {
listview.page.add_action_item(__("Delivery Note"), () => {
erpnext.bulk_transaction_processing.create(listview, "Sales Invoice", "Delivery Note");
});
if (frappe.model.can_create("Delivery Note")) {
listview.page.add_action_item(__("Delivery Note"), () => {
erpnext.bulk_transaction_processing.create(listview, "Sales Invoice", "Delivery Note");
});
}
listview.page.add_action_item(__("Payment"), () => {
erpnext.bulk_transaction_processing.create(listview, "Sales Invoice", "Payment Entry");
});
if (frappe.model.can_create("Payment Entry")) {
listview.page.add_action_item(__("Payment"), () => {
erpnext.bulk_transaction_processing.create(listview, "Sales Invoice", "Payment Entry");
});
}
},
};

View File

@@ -12,6 +12,9 @@ from frappe.utils import add_days, flt, format_date, getdate, nowdate, today
import erpnext
from erpnext.accounts.doctype.account.test_account import create_account, get_inventory_account
from erpnext.accounts.doctype.mode_of_payment.test_mode_of_payment import (
set_default_account_for_mode_of_payment,
)
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
from erpnext.accounts.doctype.purchase_invoice.purchase_invoice import WarehouseMissingError
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import (
@@ -24,7 +27,7 @@ from erpnext.assets.doctype.asset.test_asset import create_asset, create_asset_d
from erpnext.assets.doctype.asset_depreciation_schedule.asset_depreciation_schedule import (
get_depr_schedule,
)
from erpnext.controllers.accounts_controller import update_invoice_status
from erpnext.controllers.accounts_controller import InvalidQtyError, update_invoice_status
from erpnext.controllers.taxes_and_totals import get_itemised_tax_breakup_data
from erpnext.exceptions import InvalidAccountCurrency, InvalidCurrency
from erpnext.selling.doctype.customer.test_customer import get_customer_dict
@@ -54,8 +57,33 @@ class TestSalesInvoice(FrappeTestCase):
create_items(["_Test Internal Transfer Item"], uoms=[{"uom": "Box", "conversion_factor": 10}])
create_internal_parties()
setup_accounts()
mode_of_payment = frappe.get_doc("Mode of Payment", "Bank Draft")
set_default_account_for_mode_of_payment(mode_of_payment, "_Test Company", "_Test Bank - _TC")
set_default_account_for_mode_of_payment(
mode_of_payment, "_Test Company with perpetual inventory", "_Test Bank - TCP1"
)
frappe.db.set_single_value("Accounts Settings", "acc_frozen_upto", None)
@change_settings(
"Accounts Settings",
{"maintain_same_internal_transaction_rate": 1, "maintain_same_rate_action": "Stop"},
)
def test_invalid_rate_without_override(self):
from frappe import ValidationError
from erpnext.accounts.doctype.sales_invoice.sales_invoice import make_inter_company_purchase_invoice
si = create_sales_invoice(
customer="_Test Internal Customer 3", company="_Test Company", is_internal_customer=1, rate=100
)
pi = make_inter_company_purchase_invoice(si.name)
pi.items[0].rate = 120
with self.assertRaises(ValidationError) as e:
pi.insert()
pi.submit()
self.assertIn("Rate must be same", str(e.exception))
def tearDown(self):
frappe.db.rollback()
@@ -74,6 +102,16 @@ class TestSalesInvoice(FrappeTestCase):
def tearDownClass(self):
unlink_payment_on_cancel_of_invoice(0)
def test_sales_invoice_qty(self):
si = create_sales_invoice(qty=0, do_not_save=True)
with self.assertRaises(InvalidQtyError):
si.save()
# No error with qty=1
si.items[0].qty = 1
si.save()
self.assertEqual(si.items[0].qty, 1)
def test_timestamp_change(self):
w = frappe.copy_doc(test_records[0])
w.docstatus = 0
@@ -964,10 +1002,8 @@ class TestSalesInvoice(FrappeTestCase):
pos.is_pos = 1
pos.update_stock = 1
pos.append(
"payments", {"mode_of_payment": "Bank Draft", "account": "_Test Bank - TCP1", "amount": 50}
)
pos.append("payments", {"mode_of_payment": "Cash", "account": "Cash - TCP1", "amount": 50})
pos.append("payments", {"mode_of_payment": "Bank Draft", "amount": 50})
pos.append("payments", {"mode_of_payment": "Cash", "amount": 50})
taxes = get_taxes_and_charges()
pos.taxes = []
@@ -996,10 +1032,8 @@ class TestSalesInvoice(FrappeTestCase):
pos.is_pos = 1
pos.pos_profile = pos_profile.name
pos.append(
"payments", {"mode_of_payment": "Bank Draft", "account": "_Test Bank - _TC", "amount": 500}
)
pos.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 500})
pos.append("payments", {"mode_of_payment": "Bank Draft", "amount": 500})
pos.append("payments", {"mode_of_payment": "Cash", "amount": 500})
pos.insert()
pos.submit()
@@ -1042,10 +1076,8 @@ class TestSalesInvoice(FrappeTestCase):
pos.is_pos = 1
pos.update_stock = 1
pos.append(
"payments", {"mode_of_payment": "Bank Draft", "account": "_Test Bank - TCP1", "amount": 50}
)
pos.append("payments", {"mode_of_payment": "Cash", "account": "Cash - TCP1", "amount": 60})
pos.append("payments", {"mode_of_payment": "Bank Draft", "amount": 50})
pos.append("payments", {"mode_of_payment": "Cash", "amount": 60})
pos.write_off_outstanding_amount_automatically = 1
pos.insert()
@@ -1085,10 +1117,8 @@ class TestSalesInvoice(FrappeTestCase):
pos.is_pos = 1
pos.update_stock = 1
pos.append(
"payments", {"mode_of_payment": "Bank Draft", "account": "_Test Bank - TCP1", "amount": 50}
)
pos.append("payments", {"mode_of_payment": "Cash", "account": "Cash - TCP1", "amount": 40})
pos.append("payments", {"mode_of_payment": "Bank Draft", "amount": 50})
pos.append("payments", {"mode_of_payment": "Cash", "amount": 40})
pos.write_off_outstanding_amount_automatically = 1
pos.insert()
@@ -1102,7 +1132,7 @@ class TestSalesInvoice(FrappeTestCase):
pos = create_sales_invoice(do_not_save=True)
pos.is_pos = 1
pos.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 100})
pos.append("payments", {"mode_of_payment": "Cash", "amount": 100})
pos.save().submit()
self.assertEqual(pos.outstanding_amount, 0.0)
self.assertEqual(pos.status, "Paid")
@@ -1173,10 +1203,8 @@ class TestSalesInvoice(FrappeTestCase):
for tax in taxes:
pos.append("taxes", tax)
pos.append(
"payments", {"mode_of_payment": "Bank Draft", "account": "_Test Bank - TCP1", "amount": 50}
)
pos.append("payments", {"mode_of_payment": "Cash", "account": "Cash - TCP1", "amount": 60})
pos.append("payments", {"mode_of_payment": "Bank Draft", "amount": 50})
pos.append("payments", {"mode_of_payment": "Cash", "amount": 60})
pos.insert()
pos.submit()
@@ -1819,17 +1847,6 @@ class TestSalesInvoice(FrappeTestCase):
for field in expected_gle:
self.assertEqual(expected_gle[field], gle[field])
def test_invoice_exchange_rate(self):
si = create_sales_invoice(
customer="_Test Customer USD",
debit_to="_Test Receivable USD - _TC",
currency="USD",
conversion_rate=1,
do_not_save=1,
)
self.assertRaises(frappe.ValidationError, si.save)
def test_invalid_currency(self):
# Customer currency = USD
@@ -2584,6 +2601,62 @@ class TestSalesInvoice(FrappeTestCase):
acc_settings.book_deferred_entries_based_on = "Days"
acc_settings.save()
def test_validate_inter_company_transaction_address_links(self):
def _validate_address_link(address, link_doctype, link_name):
return frappe.db.get_value(
"Dynamic Link",
{
"parent": address,
"parenttype": "Address",
"link_doctype": link_doctype,
"link_name": link_name,
},
"parent",
)
si = create_sales_invoice(
company="Wind Power LLC",
customer="_Test Internal Customer",
debit_to="Debtors - WP",
warehouse="Stores - WP",
income_account="Sales - WP",
expense_account="Cost of Goods Sold - WP",
cost_center="Main - WP",
currency="USD",
do_not_save=1,
)
si.selling_price_list = "_Test Price List Rest of the World"
si.submit()
target_doc = make_inter_company_transaction("Sales Invoice", si.name)
target_doc.items[0].update(
{
"expense_account": "Cost of Goods Sold - _TC1",
"cost_center": "Main - _TC1",
"warehouse": "Stores - _TC1",
}
)
target_doc.save()
if target_doc.doctype in ["Purchase Invoice", "Purchase Order"]:
for details in [
("supplier_address", "Supplier", target_doc.supplier),
("dispatch_address", "Company", target_doc.company),
("shipping_address", "Company", target_doc.company),
("billing_address", "Company", target_doc.company),
]:
if address := target_doc.get(details[0]):
self.assertEqual(address, _validate_address_link(address, details[1], details[2]))
else:
for details in [
("company_address", "Company", target_doc.company),
("shipping_address_name", "Customer", target_doc.customer),
("customer_address", "Customer", target_doc.customer),
]:
if address := target_doc.get(details[0]):
self.assertEqual(address, _validate_address_link(address, details[1], details[2]))
def test_inter_company_transaction(self):
si = create_sales_invoice(
company="Wind Power LLC",
@@ -3915,10 +3988,8 @@ class TestSalesInvoice(FrappeTestCase):
pos = create_sales_invoice(qty=10, do_not_save=True)
pos.is_pos = 1
pos.pos_profile = pos_profile.name
pos.append(
"payments", {"mode_of_payment": "Bank Draft", "account": "_Test Bank - _TC", "amount": 500}
)
pos.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 500})
pos.append("payments", {"mode_of_payment": "Bank Draft", "amount": 500})
pos.append("payments", {"mode_of_payment": "Cash", "amount": 500})
pos.save().submit()
pos_return = make_sales_return(pos.name)
@@ -4235,6 +4306,7 @@ class TestSalesInvoice(FrappeTestCase):
si = create_sales_invoice(do_not_submit=True)
project = frappe.new_doc("Project")
project.company = "_Test Company"
project.project_name = "Test Total Billed Amount"
project.save()
@@ -4245,6 +4317,98 @@ class TestSalesInvoice(FrappeTestCase):
doc = frappe.get_doc("Project", project.name)
self.assertEqual(doc.total_billed_amount, si.grand_total)
def test_total_billed_amount_with_different_projects(self):
# This test case is for checking the scenario where project is set at document level and for **some** child items only, not all
from copy import copy
si = create_sales_invoice(do_not_submit=True)
project = frappe.new_doc("Project")
project.company = "_Test Company"
project.project_name = "Test Total Billed Amount"
project.save()
si.project = project.name
si.items.append(copy(si.items[0]))
si.items.append(copy(si.items[0]))
si.items[0].project = project.name
si.items[1].project = project.name
# Not setting project on last item
si.items[1].insert()
si.items[2].insert()
si.submit()
project.reload()
self.assertIsNone(si.items[2].project)
self.assertEqual(project.total_billed_amount, 300)
def test_pos_returns_with_party_account_currency(self):
from erpnext.accounts.doctype.sales_invoice.sales_invoice import make_sales_return
pos_profile = make_pos_profile()
pos_profile.payments = []
pos_profile.append("payments", {"default": 1, "mode_of_payment": "Cash"})
pos_profile.save()
pos = create_sales_invoice(
customer="_Test Customer USD",
currency="USD",
conversion_rate=86.595000000,
qty=2,
do_not_save=True,
)
pos.is_pos = 1
pos.pos_profile = pos_profile.name
pos.debit_to = "_Test Receivable USD - _TC"
pos.append("payments", {"mode_of_payment": "Cash", "amount": 20.35})
pos.save().submit()
pos_return = make_sales_return(pos.name)
self.assertEqual(abs(pos_return.payments[0].amount), pos.payments[0].amount)
def test_create_return_invoice_for_self_update(self):
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.controllers.sales_and_purchase_return import make_return_doc
invoice = create_sales_invoice()
payment_entry = get_payment_entry(dt=invoice.doctype, dn=invoice.name)
payment_entry.reference_no = "test001"
payment_entry.reference_date = getdate()
payment_entry.save()
payment_entry.submit()
r_invoice = make_return_doc(invoice.doctype, invoice.name)
r_invoice.update_outstanding_for_self = 0
r_invoice.save()
self.assertEqual(r_invoice.update_outstanding_for_self, 1)
r_invoice.submit()
self.assertNotEqual(r_invoice.outstanding_amount, 0)
invoice.reload()
self.assertEqual(invoice.outstanding_amount, 0)
def test_prevents_fully_returned_invoice_with_zero_quantity(self):
from erpnext.controllers.sales_and_purchase_return import StockOverReturnError, make_return_doc
invoice = create_sales_invoice(qty=10)
return_doc = make_return_doc(invoice.doctype, invoice.name)
return_doc.items[0].qty = -10
return_doc.save().submit()
return_doc = make_return_doc(invoice.doctype, invoice.name)
return_doc.items[0].qty = 0
self.assertRaises(StockOverReturnError, return_doc.save)
def set_advance_flag(company, flag, default_account):
frappe.db.set_value(
@@ -4297,11 +4461,12 @@ def create_sales_invoice(**args):
si.conversion_rate = args.conversion_rate or 1
si.naming_series = args.naming_series or "T-SINV-"
si.cost_center = args.parent_cost_center
si.is_internal_customer = args.is_internal_customer or 0
bundle_id = None
if si.update_stock and (args.get("batch_no") or args.get("serial_no")):
batches = {}
qty = args.qty or 1
qty = args.qty if args.qty is not None else 1
item_code = args.item or args.item_code or "_Test Item"
if args.get("batch_no"):
batches = frappe._dict({args.batch_no: qty})
@@ -4333,7 +4498,7 @@ def create_sales_invoice(**args):
"description": args.description or "_Test Item",
"warehouse": args.warehouse or "_Test Warehouse - _TC",
"target_warehouse": args.target_warehouse,
"qty": args.qty or 1,
"qty": args.qty if args.qty is not None else 1,
"uom": args.uom or "Nos",
"stock_uom": args.uom or "Nos",
"rate": args.rate if args.get("rate") is not None else 100,
@@ -4499,6 +4664,12 @@ def create_internal_parties():
allowed_to_interact_with="_Test Company with perpetual inventory",
)
create_internal_supplier(
supplier_name="_Test Internal Supplier 3",
represents_company="_Test Company",
allowed_to_interact_with="_Test Company",
)
def create_internal_supplier(supplier_name, represents_company, allowed_to_interact_with):
if not frappe.db.exists("Supplier", supplier_name):

View File

@@ -37,6 +37,7 @@
"column_break_19",
"discount_percentage",
"discount_amount",
"distributed_discount_amount",
"base_rate_with_margin",
"section_break1",
"rate",
@@ -105,6 +106,9 @@
"delivery_note",
"dn_detail",
"delivered_qty",
"column_break_vwhb",
"pos_invoice",
"pos_invoice_item",
"internal_transfer_section",
"purchase_order",
"column_break_92",
@@ -256,7 +260,7 @@
},
{
"collapsible": 1,
"collapsible_depends_on": "eval: doc.margin_type || doc.discount_amount",
"collapsible_depends_on": "eval: doc.margin_type || doc.discount_amount || doc.distributed_discount_amount",
"fieldname": "discount_and_margin",
"fieldtype": "Section Break",
"label": "Discount and Margin"
@@ -630,6 +634,7 @@
"fieldname": "serial_no",
"fieldtype": "Text",
"label": "Serial No",
"no_copy": 1,
"oldfieldname": "serial_no",
"oldfieldtype": "Small Text"
},
@@ -928,6 +933,12 @@
"fieldname": "column_break_ytgd",
"fieldtype": "Column Break"
},
{
"fieldname": "distributed_discount_amount",
"fieldtype": "Currency",
"label": "Distributed Discount Amount",
"options": "currency"
},
{
"fieldname": "available_quantity_section",
"fieldtype": "Section Break",
@@ -945,19 +956,41 @@
"no_copy": 1,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "pos_invoice_item",
"fieldtype": "Data",
"ignore_user_permissions": 1,
"label": "POS Invoice Item",
"no_copy": 1,
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_vwhb",
"fieldtype": "Column Break"
},
{
"fieldname": "pos_invoice",
"fieldtype": "Link",
"label": "POS Invoice",
"no_copy": 1,
"options": "POS Invoice",
"print_hide": 1,
"search_index": 1
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2024-11-25 16:27:33.287341",
"modified": "2025-03-12 16:33:55.503777",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",
"naming_rule": "Random",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -40,6 +40,7 @@ class SalesInvoiceItem(Document):
discount_account: DF.Link | None
discount_amount: DF.Currency
discount_percentage: DF.Percent
distributed_discount_amount: DF.Currency
dn_detail: DF.Data | None
enable_deferred_revenue: DF.Check
expense_account: DF.Link | None
@@ -64,6 +65,8 @@ class SalesInvoiceItem(Document):
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
pos_invoice: DF.Link | None
pos_invoice_item: DF.Data | None
price_list_rate: DF.Currency
pricing_rules: DF.SmallText | None
project: DF.Link | None

View File

@@ -634,9 +634,7 @@ class Subscription(Document):
"""
invoice = frappe.get_all(
self.invoice_document_type,
{
"subscription": self.name,
},
{"subscription": self.name, "docstatus": ("<", 2)},
limit=1,
order_by="to_date desc",
pluck="name",
@@ -675,6 +673,7 @@ class Subscription(Document):
self.invoice_document_type,
{
"subscription": self.name,
"docstatus": 1,
"status": ["!=", "Paid"],
},
)

View File

@@ -13,17 +13,15 @@
"fields": [
{
"fieldname": "voucher_type",
"fieldtype": "Link",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Voucher Type",
"options": "DocType"
"label": "Voucher Type"
},
{
"fieldname": "voucher_name",
"fieldtype": "Dynamic Link",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Voucher Name",
"options": "voucher_type"
"label": "Voucher Name"
},
{
"fieldname": "taxable_amount",
@@ -36,7 +34,7 @@
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2023-01-13 13:40:41.479208",
"modified": "2025-02-05 16:39:14.863698",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Tax Withheld Vouchers",

View File

@@ -18,8 +18,8 @@ class TaxWithheldVouchers(Document):
parentfield: DF.Data
parenttype: DF.Data
taxable_amount: DF.Currency
voucher_name: DF.DynamicLink | None
voucher_type: DF.Link | None
voucher_name: DF.Data | None
voucher_type: DF.Data | None
# end: auto-generated types
pass

View File

@@ -10,6 +10,7 @@ frappe.ui.form.on("Tax Withholding Category", {
filters: {
company: child.company,
root_type: ["in", ["Asset", "Liability"]],
is_group: 0,
},
};
}

View File

@@ -36,27 +36,38 @@ class TaxWithholdingCategory(Document):
def validate(self):
self.validate_dates()
self.validate_accounts()
self.validate_companies_and_accounts()
self.validate_thresholds()
def validate_dates(self):
last_date = None
for d in self.get("rates"):
last_to_date = None
rates = sorted(self.get("rates"), key=lambda d: getdate(d.from_date))
for d in rates:
if getdate(d.from_date) >= getdate(d.to_date):
frappe.throw(_("Row #{0}: From Date cannot be before To Date").format(d.idx))
# validate overlapping of dates
if last_date and getdate(d.to_date) < getdate(last_date):
if last_to_date and getdate(d.from_date) < getdate(last_to_date):
frappe.throw(_("Row #{0}: Dates overlapping with other row").format(d.idx))
def validate_accounts(self):
existing_accounts = []
last_to_date = d.to_date
def validate_companies_and_accounts(self):
existing_accounts = set()
companies = set()
for d in self.get("accounts"):
# validate duplicate company
if d.get("company") in companies:
frappe.throw(_("Company {0} added multiple times").format(frappe.bold(d.get("company"))))
companies.add(d.get("company"))
# validate duplicate account
if d.get("account") in existing_accounts:
frappe.throw(_("Account {0} added multiple times").format(frappe.bold(d.get("account"))))
validate_account_head(d.idx, d.get("account"), d.get("company"))
existing_accounts.append(d.get("account"))
existing_accounts.add(d.get("account"))
def validate_thresholds(self):
for d in self.get("rates"):
@@ -87,6 +98,7 @@ def get_party_details(inv):
def get_party_tax_withholding_details(inv, tax_withholding_category=None):
if inv.doctype == "Payment Entry":
inv.tax_withholding_net_total = inv.net_total
inv.base_tax_withholding_net_total = inv.net_total
pan_no = ""
parties = []
@@ -269,7 +281,10 @@ def get_lower_deduction_certificate(company, posting_date, tax_details, pan_no):
def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=None):
vouchers, voucher_wise_amount = get_invoice_vouchers(
parties, tax_details, inv.company, party_type=party_type
parties,
tax_details,
inv.company,
party_type=party_type,
)
payment_entry_vouchers = get_payment_entry_vouchers(
@@ -326,7 +341,7 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N
# once tds is deducted, not need to add vouchers in the invoice
voucher_wise_amount = {}
else:
tax_amount = get_tds_amount(ldc, parties, inv, tax_details, vouchers)
tax_amount = get_tds_amount(ldc, parties, inv, tax_details, voucher_wise_amount)
elif party_type == "Customer":
if tax_deducted:
@@ -356,13 +371,28 @@ def is_tax_deducted_on_the_basis_of_inv(vouchers):
def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"):
doctype = "Purchase Invoice" if party_type == "Supplier" else "Sales Invoice"
field = (
"base_tax_withholding_net_total as base_net_total" if party_type == "Supplier" else "base_net_total"
)
voucher_wise_amount = {}
voucher_wise_amount = []
vouchers = []
ldcs = frappe.db.get_all(
"Lower Deduction Certificate",
filters={
"valid_from": [">=", tax_details.from_date],
"valid_upto": ["<=", tax_details.to_date],
"company": company,
"supplier": ["in", parties],
},
fields=["supplier", "valid_from", "valid_upto", "rate"],
)
doctype = "Purchase Invoice" if party_type == "Supplier" else "Sales Invoice"
field = [
"base_tax_withholding_net_total as base_net_total" if party_type == "Supplier" else "base_net_total",
"name",
"grand_total",
"posting_date",
]
filters = {
"company": company,
frappe.scrub(party_type): ["in", parties],
@@ -376,15 +406,29 @@ def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"):
{"apply_tds": 1, "tax_withholding_category": tax_details.get("tax_withholding_category")}
)
invoices_details = frappe.get_all(doctype, filters=filters, fields=["name", field])
invoices_details = frappe.get_all(doctype, filters=filters, fields=field)
for d in invoices_details:
vouchers.append(d.name)
voucher_wise_amount.update({d.name: {"amount": d.base_net_total, "voucher_type": doctype}})
d = frappe._dict(
{
"voucher_name": d.name,
"voucher_type": doctype,
"taxable_amount": d.base_net_total,
"grand_total": d.grand_total,
"posting_date": d.posting_date,
}
)
if ldc := [x for x in ldcs if d.posting_date >= x.valid_from and d.posting_date <= x.valid_upto]:
if ldc[0].supplier in parties and ldc[0].rate == 0:
d.update({"taxable_amount": 0})
vouchers.append(d.voucher_name)
voucher_wise_amount.append(d)
journal_entries_details = frappe.db.sql(
"""
SELECT j.name, ja.credit - ja.debit AS amount
SELECT j.name, ja.credit - ja.debit AS amount, ja.reference_type
FROM `tabJournal Entry` j, `tabJournal Entry Account` ja
WHERE
j.name = ja.parent
@@ -406,10 +450,18 @@ def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"):
as_dict=1,
)
if journal_entries_details:
for d in journal_entries_details:
vouchers.append(d.name)
voucher_wise_amount.update({d.name: {"amount": d.amount, "voucher_type": "Journal Entry"}})
for d in journal_entries_details:
vouchers.append(d.name)
voucher_wise_amount.append(
frappe._dict(
{
"voucher_name": d.name,
"voucher_type": "Journal Entry",
"taxable_amount": d.amount,
"reference_type": d.reference_type,
}
)
)
return vouchers, voucher_wise_amount
@@ -508,12 +560,24 @@ def get_advance_tax_across_fiscal_year(tax_deducted_on_advances, tax_details):
return advance_tax_from_across_fiscal_year
def get_tds_amount(ldc, parties, inv, tax_details, vouchers):
def get_tds_amount(ldc, parties, inv, tax_details, voucher_wise_amount):
tds_amount = 0
invoice_filters = {"name": ("in", vouchers), "docstatus": 1, "apply_tds": 1}
pi_grand_total = 0
pi_base_net_total = 0
jv_credit_amt = 0
pe_credit_amt = 0
for row in voucher_wise_amount:
if row.voucher_type == "Purchase Invoice":
pi_grand_total += row.get("grand_total", 0)
pi_base_net_total += row.get("taxable_amount", 0)
if row.voucher_type == "Journal Entry" and row.reference_type != "Purchase Invoice":
jv_credit_amt += row.get("taxable_amount", 0)
## for TDS to be deducted on advances
payment_entry_filters = {
pe_filters = {
"party_type": "Supplier",
"party": ("in", parties),
"docstatus": 1,
@@ -524,70 +588,49 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers):
"company": inv.company,
}
field = "sum(tax_withholding_net_total)"
consider_party_ledger_amt = cint(tax_details.consider_party_ledger_amount)
if cint(tax_details.consider_party_ledger_amount):
invoice_filters.pop("apply_tds", None)
field = "sum(grand_total)"
payment_entry_filters.pop("apply_tax_withholding_amount", None)
payment_entry_filters.pop("tax_withholding_category", None)
supp_inv_credit_amt = frappe.db.get_value("Purchase Invoice", invoice_filters, field) or 0.0
supp_jv_credit_amt = (
frappe.db.get_value(
"Journal Entry Account",
{
"parent": ("in", vouchers),
"docstatus": 1,
"party": ("in", parties),
"reference_type": ("!=", "Purchase Invoice"),
},
"sum(credit_in_account_currency - debit_in_account_currency)",
)
or 0.0
)
if consider_party_ledger_amt:
pe_filters.pop("apply_tax_withholding_amount", None)
pe_filters.pop("tax_withholding_category", None)
# Get Amount via payment entry
payment_entry_amounts = frappe.db.get_all(
payment_entries = frappe.db.get_all(
"Payment Entry",
filters=payment_entry_filters,
fields=["sum(unallocated_amount) as amount", "payment_type"],
group_by="payment_type",
filters=pe_filters,
fields=["name", "unallocated_amount as taxable_amount", "payment_type"],
)
supp_credit_amt = supp_jv_credit_amt
supp_credit_amt += inv.get("tax_withholding_net_total", 0)
for type in payment_entry_amounts:
if type.payment_type == "Pay":
supp_credit_amt += type.amount
else:
supp_credit_amt -= type.amount
for row in payment_entries:
value = row.taxable_amount if row.payment_type == "Pay" else -1 * row.taxable_amount
pe_credit_amt += value
voucher_wise_amount.append(
frappe._dict(
{
"voucher_name": row.name,
"voucher_type": "Payment Entry",
"taxable_amount": value,
}
)
)
threshold = tax_details.get("threshold", 0)
cumulative_threshold = tax_details.get("cumulative_threshold", 0)
supp_credit_amt = jv_credit_amt + pe_credit_amt + inv.get("tax_withholding_net_total", 0)
tax_withholding_net_total = inv.get("base_tax_withholding_net_total", 0)
if inv.doctype != "Payment Entry":
tax_withholding_net_total = inv.get("base_tax_withholding_net_total", 0)
else:
tax_withholding_net_total = inv.get("tax_withholding_net_total", 0)
# if consider_party_ledger_amount is checked, then threshold will be based on grand total
amt_for_threshold = pi_grand_total if consider_party_ledger_amt else pi_base_net_total
has_cumulative_threshold_breached = (
cumulative_threshold and (supp_credit_amt + supp_inv_credit_amt) >= cumulative_threshold
cumulative_threshold_breached = (
cumulative_threshold and (supp_credit_amt + amt_for_threshold) >= cumulative_threshold
)
if (threshold and tax_withholding_net_total >= threshold) or (has_cumulative_threshold_breached):
# Get net total again as TDS is calculated on net total
# Grand is used to just check for threshold breach
net_total = (
frappe.db.get_value("Purchase Invoice", invoice_filters, "sum(tax_withholding_net_total)") or 0.0
)
supp_credit_amt += net_total
if (threshold and tax_withholding_net_total >= threshold) or (cumulative_threshold_breached):
supp_credit_amt += pi_base_net_total
if has_cumulative_threshold_breached and cint(tax_details.tax_on_excess_amount):
supp_credit_amt = net_total + tax_withholding_net_total - cumulative_threshold
if cumulative_threshold_breached and cint(tax_details.tax_on_excess_amount):
supp_credit_amt = pi_base_net_total + tax_withholding_net_total - cumulative_threshold
if ldc and is_valid_certificate(ldc, inv.get("posting_date") or inv.get("transaction_date"), 0):
tds_amount = get_lower_deduction_amount(
@@ -628,6 +671,7 @@ def get_tcs_amount(parties, inv, tax_details, vouchers, adv_vouchers):
conditions.append(ple.party.isin(parties))
conditions.append(ple.voucher_no == ple.against_voucher_no)
conditions.append(ple.company == inv.company)
conditions.append(ple.posting_date[tax_details.from_date : tax_details.to_date])
advance_amt = (
qb.from_(ple).select(Abs(Sum(ple.amount))).where(Criterion.all(conditions)).run()[0][0] or 0.0

View File

@@ -7,7 +7,7 @@ import unittest
import frappe
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
from frappe.tests.utils import FrappeTestCase, change_settings
from frappe.utils import add_days, today
from frappe.utils import add_days, add_months, today
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
from erpnext.accounts.utils import get_fiscal_year
@@ -288,17 +288,18 @@ class TestTaxWithholdingCategory(FrappeTestCase):
frappe.db.set_value(
"Customer", "Test TCS Customer", "tax_withholding_category", "Cumulative Threshold TCS"
)
fiscal_year = get_fiscal_year(today(), company="_Test Company")
vouchers = []
# create advance payment
pe = create_payment_entry(
pe1 = create_payment_entry(
payment_type="Receive", party_type="Customer", party="Test TCS Customer", paid_amount=20000
)
pe.paid_from = "Debtors - _TC"
pe.paid_to = "Cash - _TC"
pe.submit()
vouchers.append(pe)
pe1.paid_from = "Debtors - _TC"
pe1.paid_to = "Cash - _TC"
pe1.submit()
vouchers.append(pe1)
# create invoice
si1 = create_sales_invoice(customer="Test TCS Customer", rate=5000)
@@ -320,6 +321,17 @@ class TestTaxWithholdingCategory(FrappeTestCase):
# make another invoice
# sum of unallocated amount from payment entry and this sales invoice will breach cumulative threashold
# TDS should be calculated
# this payment should not be considered for TCS calculation as it is outside of fiscal year
pe2 = create_payment_entry(
payment_type="Receive", party_type="Customer", party="Test TCS Customer", paid_amount=10000
)
pe2.paid_from = "Debtors - _TC"
pe2.paid_to = "Cash - _TC"
pe2.posting_date = add_days(fiscal_year[1], -10)
pe2.submit()
vouchers.append(pe2)
si2 = create_sales_invoice(customer="Test TCS Customer", rate=15000)
si2.submit()
vouchers.append(si2)
@@ -519,7 +531,7 @@ class TestTaxWithholdingCategory(FrappeTestCase):
payment = get_payment_entry(order.doctype, order.name)
payment.apply_tax_withholding_amount = 1
payment.tax_withholding_category = "Cumulative Threshold TDS"
payment.submit()
payment.save().submit()
self.assertEqual(payment.taxes[0].tax_amount, 4000)
def test_multi_category_single_supplier(self):
@@ -569,6 +581,15 @@ class TestTaxWithholdingCategory(FrappeTestCase):
pi1.submit()
invoices.append(pi1)
pe = create_payment_entry(
payment_type="Pay", party_type="Supplier", party="Test TDS Supplier6", paid_amount=1000
)
pe.apply_tax_withholding_amount = 1
pe.tax_withholding_category = "Test Multi Invoice Category"
pe.save()
pe.submit()
invoices.append(pe)
pi2 = create_purchase_invoice(supplier="Test TDS Supplier6", rate=9000, do_not_save=True)
pi2.apply_tds = 1
pi2.tax_withholding_category = "Test Multi Invoice Category"
@@ -584,6 +605,8 @@ class TestTaxWithholdingCategory(FrappeTestCase):
self.assertTrue(pi2.tax_withheld_vouchers[0].taxable_amount == pi1.net_total)
self.assertTrue(pi2.tax_withheld_vouchers[1].voucher_name == pi.name)
self.assertTrue(pi2.tax_withheld_vouchers[1].taxable_amount == pi.net_total)
self.assertTrue(pi2.tax_withheld_vouchers[2].voucher_name == pe.name)
self.assertTrue(pi2.tax_withheld_vouchers[2].taxable_amount == pe.paid_amount)
# cancel invoices to avoid clashing
for d in reversed(invoices):
@@ -655,6 +678,49 @@ class TestTaxWithholdingCategory(FrappeTestCase):
pi2.cancel()
pi3.cancel()
def test_ldc_at_0_rate(self):
frappe.db.set_value(
"Supplier",
"Test LDC Supplier",
{
"tax_withholding_category": "Test Service Category",
"pan": "ABCTY1234D",
},
)
fiscal_year = get_fiscal_year(today(), company="_Test Company")
valid_from = fiscal_year[1]
valid_upto = add_months(valid_from, 1)
create_lower_deduction_certificate(
supplier="Test LDC Supplier",
certificate_no="1AE0423AAJ",
tax_withholding_category="Test Service Category",
tax_rate=0,
limit=50000,
valid_from=valid_from,
valid_upto=valid_upto,
)
pi1 = create_purchase_invoice(
supplier="Test LDC Supplier", rate=35000, posting_date=valid_from, set_posting_time=True
)
pi1.submit()
self.assertEqual(pi1.taxes, [])
pi2 = create_purchase_invoice(
supplier="Test LDC Supplier",
rate=35000,
posting_date=add_days(valid_upto, 1),
set_posting_time=True,
)
pi2.submit()
self.assertEqual(len(pi2.taxes), 1)
# pi1 net total shouldn't be included as it lies within LDC at rate of '0'
self.assertEqual(pi2.taxes[0].tax_amount, 3500)
pi1.cancel()
pi2.cancel()
def set_previous_fy_and_tax_category(self):
test_company = "_Test Company"
category = "Cumulative Threshold TDS"
@@ -812,7 +878,8 @@ def create_purchase_invoice(**args):
pi = frappe.get_doc(
{
"doctype": "Purchase Invoice",
"posting_date": today(),
"set_posting_time": args.set_posting_time or False,
"posting_date": args.posting_date or today(),
"apply_tds": 0 if args.do_not_apply_tds else 1,
"supplier": args.supplier,
"company": "_Test Company",
@@ -1150,7 +1217,9 @@ def create_tax_withholding_category(
).insert()
def create_lower_deduction_certificate(supplier, tax_withholding_category, tax_rate, certificate_no, limit):
def create_lower_deduction_certificate(
supplier, tax_withholding_category, tax_rate, certificate_no, limit, valid_from=None, valid_upto=None
):
fiscal_year = get_fiscal_year(today(), company="_Test Company")
if not frappe.db.exists("Lower Deduction Certificate", certificate_no):
frappe.get_doc(
@@ -1161,8 +1230,8 @@ def create_lower_deduction_certificate(supplier, tax_withholding_category, tax_r
"certificate_no": certificate_no,
"tax_withholding_category": tax_withholding_category,
"fiscal_year": fiscal_year[0],
"valid_from": fiscal_year[1],
"valid_upto": fiscal_year[2],
"valid_from": valid_from or fiscal_year[1],
"valid_upto": valid_upto or fiscal_year[2],
"rate": tax_rate,
"certificate_limit": limit,
}

View File

@@ -35,7 +35,7 @@ def make_gl_entries(
make_acc_dimensions_offsetting_entry(gl_map)
validate_accounting_period(gl_map)
validate_disabled_accounts(gl_map)
gl_map = process_gl_map(gl_map, merge_entries)
gl_map = process_gl_map(gl_map, merge_entries, from_repost=from_repost)
if gl_map and len(gl_map) > 1:
if gl_map[0].voucher_type != "Period Closing Voucher":
create_payment_ledger_entry(
@@ -81,6 +81,10 @@ def make_acc_dimensions_offsetting_entry(gl_map):
"credit_in_account_currency": credit,
"remarks": _("Offsetting for Accounting Dimension") + f" - {dimension.name}",
"against_voucher": None,
"account_currency": dimension.account_currency,
# Party Type and Party are restricted to Receivable and Payable accounts
"party_type": None,
"party": None,
}
)
offsetting_entry["against_voucher_type"] = None
@@ -108,6 +112,9 @@ def get_accounting_dimensions_for_offsetting_entry(gl_map, company):
accounting_dimensions_to_offset = []
for acc_dimension in acc_dimensions:
values = set([entry.get(acc_dimension.fieldname) for entry in gl_map])
acc_dimension.account_currency = frappe.get_cached_value(
"Account", acc_dimension.offsetting_account, "account_currency"
)
if len(values) > 1:
accounting_dimensions_to_offset.append(acc_dimension)
@@ -163,12 +170,12 @@ def validate_accounting_period(gl_map):
)
def process_gl_map(gl_map, merge_entries=True, precision=None):
def process_gl_map(gl_map, merge_entries=True, precision=None, from_repost=False):
if not gl_map:
return []
if gl_map[0].voucher_type != "Period Closing Voucher":
gl_map = distribute_gl_based_on_cost_center_allocation(gl_map, precision)
gl_map = distribute_gl_based_on_cost_center_allocation(gl_map, precision, from_repost)
if merge_entries:
gl_map = merge_similar_entries(gl_map, precision)
@@ -178,13 +185,17 @@ def process_gl_map(gl_map, merge_entries=True, precision=None):
return gl_map
def distribute_gl_based_on_cost_center_allocation(gl_map, precision=None):
def distribute_gl_based_on_cost_center_allocation(gl_map, precision=None, from_repost=False):
new_gl_map = []
for d in gl_map:
cost_center = d.get("cost_center")
# Validate budget against main cost center
validate_expense_against_budget(d, expense_amount=flt(d.debit, precision) - flt(d.credit, precision))
if not from_repost:
validate_expense_against_budget(
d, expense_amount=flt(d.debit, precision) - flt(d.credit, precision)
)
cost_center_allocation = get_cost_center_allocation_data(
gl_map[0]["company"], gl_map[0]["posting_date"], cost_center
)
@@ -426,7 +437,7 @@ def process_debit_credit_difference(gl_map):
voucher_no = gl_map[0].voucher_no
allowance = get_debit_credit_allowance(voucher_type, precision)
debit_credit_diff = get_debit_credit_difference(gl_map, precision)
debit_credit_diff, trx_cur_debit_credit_diff = get_debit_credit_difference(gl_map, precision)
if abs(debit_credit_diff) > allowance:
if not (
@@ -437,9 +448,9 @@ def process_debit_credit_difference(gl_map):
raise_debit_credit_not_equal_error(debit_credit_diff, voucher_type, voucher_no)
elif abs(debit_credit_diff) >= (1.0 / (10**precision)):
make_round_off_gle(gl_map, debit_credit_diff, precision)
make_round_off_gle(gl_map, debit_credit_diff, trx_cur_debit_credit_diff, precision)
debit_credit_diff = get_debit_credit_difference(gl_map, precision)
debit_credit_diff, trx_cur_debit_credit_diff = get_debit_credit_difference(gl_map, precision)
if abs(debit_credit_diff) > allowance:
if not (
voucher_type == "Journal Entry"
@@ -451,14 +462,23 @@ def process_debit_credit_difference(gl_map):
def get_debit_credit_difference(gl_map, precision):
debit_credit_diff = 0.0
trx_cur_debit_credit_diff = 0
for entry in gl_map:
entry.debit = flt(entry.debit, precision)
entry.credit = flt(entry.credit, precision)
debit_credit_diff += entry.debit - entry.credit
debit_credit_diff = flt(debit_credit_diff, precision)
entry.debit_in_transaction_currency = flt(entry.debit_in_transaction_currency, precision)
entry.credit_in_transaction_currency = flt(entry.credit_in_transaction_currency, precision)
trx_cur_debit_credit_diff += (
entry.debit_in_transaction_currency - entry.credit_in_transaction_currency
)
return debit_credit_diff
debit_credit_diff = flt(debit_credit_diff, precision)
trx_cur_debit_credit_diff = flt(trx_cur_debit_credit_diff, precision)
return debit_credit_diff, trx_cur_debit_credit_diff
def get_debit_credit_allowance(voucher_type, precision):
@@ -485,7 +505,7 @@ def has_opening_entries(gl_map: list) -> bool:
return False
def make_round_off_gle(gl_map, debit_credit_diff, precision):
def make_round_off_gle(gl_map, debit_credit_diff, trx_cur_debit_credit_diff, precision):
round_off_account, round_off_cost_center, round_off_for_opening = get_round_off_account_and_cost_center(
gl_map[0].company, gl_map[0].voucher_type, gl_map[0].voucher_no
)
@@ -530,6 +550,12 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision):
"credit_in_account_currency": debit_credit_diff if debit_credit_diff > 0 else 0,
"debit": abs(debit_credit_diff) if debit_credit_diff < 0 else 0,
"credit": debit_credit_diff if debit_credit_diff > 0 else 0,
"debit_in_transaction_currency": abs(trx_cur_debit_credit_diff)
if trx_cur_debit_credit_diff < 0
else 0,
"credit_in_transaction_currency": trx_cur_debit_credit_diff
if trx_cur_debit_credit_diff > 0
else 0,
"cost_center": round_off_cost_center,
"party_type": None,
"party": None,
@@ -676,11 +702,15 @@ def make_reverse_gl_entries(
debit_in_account_currency = new_gle.get("debit_in_account_currency", 0)
credit_in_account_currency = new_gle.get("credit_in_account_currency", 0)
debit_in_transaction_currency = new_gle.get("debit_in_transaction_currency", 0)
credit_in_transaction_currency = new_gle.get("credit_in_transaction_currency", 0)
new_gle["debit"] = credit
new_gle["credit"] = debit
new_gle["debit_in_account_currency"] = credit_in_account_currency
new_gle["credit_in_account_currency"] = debit_in_account_currency
new_gle["debit_in_transaction_currency"] = credit_in_transaction_currency
new_gle["credit_in_transaction_currency"] = debit_in_transaction_currency
new_gle["remarks"] = "On cancellation of " + new_gle["voucher_no"]
new_gle["is_cancelled"] = 1

View File

@@ -71,6 +71,7 @@ def get_party_details(
party_address=None,
company_address=None,
shipping_address=None,
dispatch_address=None,
pos_profile=None,
):
if not party:
@@ -92,6 +93,7 @@ def get_party_details(
party_address,
company_address,
shipping_address,
dispatch_address,
pos_profile,
)
@@ -111,6 +113,7 @@ def _get_party_details(
party_address=None,
company_address=None,
shipping_address=None,
dispatch_address=None,
pos_profile=None,
):
party_details = frappe._dict(
@@ -134,6 +137,7 @@ def _get_party_details(
party_address,
company_address,
shipping_address,
dispatch_address,
ignore_permissions=ignore_permissions,
)
set_contact_details(party_details, party, party_type)
@@ -191,34 +195,51 @@ def set_address_details(
party_address=None,
company_address=None,
shipping_address=None,
dispatch_address=None,
*,
ignore_permissions=False,
):
billing_address_field = (
# party_billing
party_billing_field = (
"customer_address" if party_type in ["Lead", "Prospect"] else party_type.lower() + "_address"
)
party_details[billing_address_field] = party_address or get_default_address(party_type, party.name)
party_details[party_billing_field] = party_address or get_default_address(party_type, party.name)
if doctype:
party_details.update(
get_fetch_values(doctype, billing_address_field, party_details[billing_address_field])
get_fetch_values(doctype, party_billing_field, party_details[party_billing_field])
)
# address display
party_details.address_display = render_address(
party_details[billing_address_field], check_permissions=not ignore_permissions
)
# shipping address
if party_type in ["Customer", "Lead"]:
party_details.shipping_address_name = shipping_address or get_party_shipping_address(
party_type, party.name
)
party_details.shipping_address = render_address(
party_details["shipping_address_name"], check_permissions=not ignore_permissions
)
if doctype:
party_details.update(
get_fetch_values(doctype, "shipping_address_name", party_details.shipping_address_name)
)
party_details.address_display = render_address(
party_details[party_billing_field], check_permissions=not ignore_permissions
)
# party_shipping
if party_type in ["Customer", "Lead"]:
party_shipping_field = "shipping_address_name"
party_shipping_display = "shipping_address"
default_shipping = shipping_address
else:
# Supplier
party_shipping_field = "dispatch_address"
party_shipping_display = "dispatch_address_display"
default_shipping = dispatch_address
party_details[party_shipping_field] = default_shipping or get_party_shipping_address(
party_type, party.name
)
party_details[party_shipping_display] = render_address(
party_details[party_shipping_field], check_permissions=not ignore_permissions
)
if doctype:
party_details.update(
get_fetch_values(doctype, party_shipping_field, party_details[party_shipping_field])
)
# company_address
if company_address:
party_details.company_address = company_address
else:
@@ -256,22 +277,20 @@ def set_address_details(
**get_fetch_values(doctype, "shipping_address", party_details.billing_address),
)
party_address, shipping_address = (
party_details.get(billing_address_field),
party_details.shipping_address_name,
party_billing, party_shipping = (
party_details.get(party_billing_field),
party_details.get(party_shipping_field),
)
party_details["tax_category"] = get_address_tax_category(
party.get("tax_category"),
party_address,
shipping_address if party_type != "Supplier" else party_address,
party.get("tax_category"), party_billing, party_shipping
)
if doctype in TRANSACTION_TYPES:
with temporary_flag("company", company):
get_regional_address_details(party_details, doctype, company)
return party_address, shipping_address
return party_billing, party_shipping
@erpnext.allow_regional
@@ -279,35 +298,56 @@ def get_regional_address_details(party_details, doctype, company):
pass
def set_contact_details(party_details, party, party_type):
party_details.contact_person = get_default_contact(party_type, party.name)
def complete_contact_details(party_details):
contact_details = frappe._dict()
if not party_details.contact_person:
party_details.update(
{
"contact_person": None,
"contact_display": None,
"contact_email": None,
"contact_mobile": None,
"contact_phone": None,
"contact_designation": None,
"contact_department": None,
}
if party_details.party_type == "Employee":
contact_details = frappe.db.get_value(
"Employee",
party_details.party,
[
"employee_name as contact_display",
"prefered_email as contact_email",
"cell_number as contact_mobile",
"designation as contact_designation",
"department as contact_department",
],
as_dict=True,
)
contact_details.update({"contact_person": None, "contact_phone": None})
elif party_details.contact_person:
contact_details = frappe.db.get_value(
"Contact",
party_details.contact_person,
[
"name as contact_person",
"full_name as contact_display",
"email_id as contact_email",
"mobile_no as contact_mobile",
"phone as contact_phone",
"designation as contact_designation",
"department as contact_department",
],
as_dict=True,
)
else:
fields = [
"name as contact_person",
"full_name as contact_display",
"email_id as contact_email",
"mobile_no as contact_mobile",
"phone as contact_phone",
"designation as contact_designation",
"department as contact_department",
]
contact_details = {
"contact_person": None,
"contact_display": None,
"contact_email": None,
"contact_mobile": None,
"contact_phone": None,
"contact_designation": None,
"contact_department": None,
}
contact_details = frappe.db.get_value("Contact", party_details.contact_person, fields, as_dict=True)
party_details.update(contact_details)
party_details.update(contact_details)
def set_contact_details(party_details, party, party_type):
party_details.contact_person = get_default_contact(party_type, party.name)
complete_contact_details(party_details)
def set_other_values(party_details, party, party_type):
@@ -420,6 +460,12 @@ def get_party_account(party_type, party=None, company=None, include_advance=Fals
if (account and account_currency != existing_gle_currency) or not account:
account = get_party_gle_account(party_type, party, company)
# get default account on the basis of party type
if not account:
account_type = frappe.get_cached_value("Party Type", party_type, "account_type")
default_account_name = "default_" + account_type.lower() + "_account"
account = frappe.get_cached_value("Company", company, default_account_name)
if include_advance and party_type in ["Customer", "Supplier", "Student"]:
advance_account = get_party_advance_account(party_type, party, company)
if advance_account:
@@ -572,12 +618,13 @@ def validate_party_accounts(doc):
@frappe.whitelist()
def get_due_date(posting_date, party_type, party, company=None, bill_date=None):
def get_due_date(posting_date, party_type, party, company=None, bill_date=None, template_name=None):
"""Get due date from `Payment Terms Template`"""
due_date = None
if (bill_date or posting_date) and party:
due_date = bill_date or posting_date
template_name = get_payment_terms_template(party, party_type, company)
if not template_name:
template_name = get_payment_terms_template(party, party_type, company)
if template_name:
due_date = get_due_date_from_template(template_name, posting_date, bill_date).strftime("%Y-%m-%d")
@@ -616,34 +663,34 @@ def get_due_date_from_template(template_name, posting_date, bill_date):
return due_date
def validate_due_date(posting_date, due_date, bill_date=None, template_name=None):
def validate_due_date(posting_date, due_date, bill_date=None, template_name=None, doctype=None):
if getdate(due_date) < getdate(posting_date):
frappe.throw(_("Due Date cannot be before Posting / Supplier Invoice Date"))
else:
if not template_name:
return
validate_due_date_with_template(posting_date, due_date, bill_date, template_name, doctype)
default_due_date = get_due_date_from_template(template_name, posting_date, bill_date).strftime(
"%Y-%m-%d"
)
if not default_due_date:
return
def validate_due_date_with_template(posting_date, due_date, bill_date, template_name, doctype=None):
if not template_name:
return
if default_due_date != posting_date and getdate(due_date) > getdate(default_due_date):
is_credit_controller = (
frappe.db.get_single_value("Accounts Settings", "credit_controller") in frappe.get_roles()
default_due_date = format(get_due_date_from_template(template_name, posting_date, bill_date))
if not default_due_date:
return
if default_due_date != posting_date and getdate(due_date) > getdate(default_due_date):
if frappe.db.get_single_value("Accounts Settings", "credit_controller") in frappe.get_roles():
party_type = "supplier" if doctype == "Purchase Invoice" else "customer"
msgprint(
_("Note: Due Date exceeds allowed {0} credit days by {1} day(s)").format(
party_type, date_diff(due_date, default_due_date)
)
)
if is_credit_controller:
msgprint(
_("Note: Due / Reference Date exceeds allowed customer credit days by {0} day(s)").format(
date_diff(due_date, default_due_date)
)
)
else:
frappe.throw(
_("Due / Reference Date cannot be after {0}").format(formatdate(default_due_date))
)
else:
frappe.throw(_("Due / Reference Date cannot be after {0}").format(formatdate(default_due_date)))
@frappe.whitelist()
@@ -765,11 +812,11 @@ def validate_account_party_type(self):
if self.party_type and self.party:
account_type = frappe.get_cached_value("Account", self.account, "account_type")
if account_type and (account_type not in ["Receivable", "Payable"]):
if account_type and (account_type not in ["Receivable", "Payable", "Equity"]):
frappe.throw(
_(
"Party Type and Party can only be set for Receivable / Payable account<br><br>" "{0}"
).format(self.account)
_("Party Type and Party can only be set for Receivable / Payable account<br><br>{0}").format(
self.account
)
)
@@ -890,12 +937,16 @@ def get_party_shipping_address(doctype: str, name: str) -> str | None:
["is_shipping_address", "=", 1],
["address_type", "=", "Shipping"],
],
pluck="name",
limit=1,
fields=["name", "is_shipping_address"],
order_by="is_shipping_address DESC",
)
return shipping_addresses[0] if shipping_addresses else None
if shipping_addresses and shipping_addresses[0].is_shipping_address == 1:
return shipping_addresses[0].name
if len(shipping_addresses) == 1:
return shipping_addresses[0].name
else:
return None
def get_partywise_advanced_payment_amount(

View File

@@ -44,7 +44,7 @@
{% endfor %}
<tr>
<td class="right" colspan="3" ><strong>Total (debit) </strong></td>
<td class="left" >{{ gl | sum(attribute='debit') }}</td>
<td class="left" >{{ gl | sum(attribute='debit') | round(2) }}</td>
</tr>
<tr>
<td class="top-bottom" colspan="5"><strong>Credit</strong></td>
@@ -61,7 +61,7 @@
{% endfor %}
<tr>
<td class="right" colspan="3"><strong>Total (credit) </strong></td>
<td class="left" >{{ gl | sum(attribute='credit') }}</td>
<td class="left" >{{ gl | sum(attribute='credit') | round(2) }}</td>
</tr>
<tr>
<td class="top-bottom" colspan="5"><b>Narration: </b>{{ gl[0].remarks }}</td>

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