Compare commits

..

1198 Commits

Author SHA1 Message Date
Frappe PR Bot
c1f7d5a2d1 chore(release): Bumped to Version 15.23.3
## [15.23.3](https://github.com/frappe/erpnext/compare/v15.23.2...v15.23.3) (2024-05-15)

### Bug Fixes

* not able to submit landed cost voucher (backport [#41481](https://github.com/frappe/erpnext/issues/41481)) (backport [#41486](https://github.com/frappe/erpnext/issues/41486)) ([#41487](https://github.com/frappe/erpnext/issues/41487)) ([66684e7](66684e7e23))
2024-05-15 13:27:07 +00:00
mergify[bot]
66684e7e23 fix: not able to submit landed cost voucher (backport #41481) (backport #41486) (#41487)
fix: not able to submit landed cost voucher (backport #41481) (#41486)

fix: not able to submit landed cost voucher (#41481)

(cherry picked from commit 81a9521f04)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-05-15 18:55:40 +05:30
Frappe PR Bot
7b8b58f8ca chore(release): Bumped to Version 15.23.2
## [15.23.2](https://github.com/frappe/erpnext/compare/v15.23.1...v15.23.2) (2024-05-15)

### Bug Fixes

* 'Bill for Rejected Quantity in Purchase Invoice' feature not working (backport [#41437](https://github.com/frappe/erpnext/issues/41437)) ([#41445](https://github.com/frappe/erpnext/issues/41445)) ([b8db903](b8db903320))
* address filter and quotation to for prospect ([37741b5](37741b5b45))
* address filter and quotation to for prospect ([394b1f4](394b1f499d))
* address filter and quotation to for prospect ([cdbb515](cdbb515379))
* Asset cancelation issue ([e18be9b](e18be9b21e))
* consistent use of "Address & Contact" (backport [#41386](https://github.com/frappe/erpnext/issues/41386)) ([#41388](https://github.com/frappe/erpnext/issues/41388)) ([b6f82a6](b6f82a656f))
* daily prorata based depreciation bug in wdv method ([c335c2c](c335c2c85a))
* data getting override in delivery trip (backport [#41431](https://github.com/frappe/erpnext/issues/41431)) ([#41433](https://github.com/frappe/erpnext/issues/41433)) ([15d2881](15d2881bc8))
* Duplicate party name column in AR/AP report ([55edbec](55edbec6fa))
* incorrect  total days calculation ([01b25b5](01b25b5821))
* **minor:** removed extra parameter ([ce2c6c3](ce2c6c3165))
* pro rata based depreciation with opening accumulated depreciation ([72f3fb2](72f3fb2a2c))
* PSOA ageing ([6590d78](6590d78298))
* removed same named function ([955ce9b](955ce9b670))
* removed unrelated code modification ([0aca1e8](0aca1e8e05))
* resolved conflict ([520e1e9](520e1e9c8f))
* resolved conflict ([3a72f4b](3a72f4bd30))
* resolved conflict ([8cca74d](8cca74d5ef))
* Unknown column 'tabBatch.batch_no' in 'where clause' (backport [#41418](https://github.com/frappe/erpnext/issues/41418)) ([#41444](https://github.com/frappe/erpnext/issues/41444)) ([d988c7b](d988c7bd06))
* update description of Supplier Invoice Number ([a7533ff](a7533ff7f6))
* valuation issue for batch (backport [#41425](https://github.com/frappe/erpnext/issues/41425)) ([#41430](https://github.com/frappe/erpnext/issues/41430)) ([f55a131](f55a131dea))
* **wip:** daily depreciation bug ([1016ec2](1016ec2a14))
* **wip:** depreciation calculation after asset value adjustment ([3eff9c9](3eff9c9779))
* zero valuation rate for batched item (backport [#41446](https://github.com/frappe/erpnext/issues/41446)) ([#41447](https://github.com/frappe/erpnext/issues/41447)) ([5c3a096](5c3a0965bc))
2024-05-15 05:12:37 +00:00
Deepesh Garg
71da5d0928 Merge pull request #41459 from frappe/version-15-hotfix
chore: release v15
2024-05-15 10:41:19 +05:30
Nabin Hait
2569b244e2 Merge pull request #41473 from frappe/mergify/bp/version-15-hotfix/pr-41235
Depreciation based on daily prorata (backport #41235)
2024-05-15 09:10:56 +05:30
Nabin Hait
09aefa96ad Merge pull request #41474 from nabinhait/linter-fix5
style: linter issue
2024-05-15 09:10:08 +05:30
Nabin Hait
fd3efd53be style: linter issue 2024-05-15 09:09:16 +05:30
Nabin Hait
6d43d840db style: new line before function
(cherry picked from commit 7d86881579)
2024-05-15 03:11:37 +00:00
Khushi Rawat
955ce9b670 fix: removed same named function
(cherry picked from commit d22df324ec)
2024-05-15 03:11:37 +00:00
Khushi Rawat
b57919e2ce refactor: code optimization
(cherry picked from commit 7b264e5e11)
2024-05-15 03:11:37 +00:00
Khushi Rawat
72f3fb2a2c fix: pro rata based depreciation with opening accumulated depreciation
(cherry picked from commit c0c8c1bb02)
2024-05-15 03:11:37 +00:00
Khushi Rawat
12f383f252 test: made minor change in existing test
(cherry picked from commit d40b55468c)
2024-05-15 03:11:37 +00:00
Khushi Rawat
01b25b5821 fix: incorrect total days calculation
(cherry picked from commit fccd37d32d)
2024-05-15 03:11:36 +00:00
Khushi Rawat
c335c2c85a fix: daily prorata based depreciation bug in wdv method
(cherry picked from commit b8a98a273b)
2024-05-15 03:11:36 +00:00
Khushi Rawat
1016ec2a14 fix(wip): daily depreciation bug
(cherry picked from commit f337392f3e)
2024-05-15 03:11:36 +00:00
Nabin Hait
8da2841fdd Merge pull request #41471 from frappe/mergify/bp/version-15-hotfix/pr-41467
Asset cancelation issue (backport #41467)
2024-05-15 08:19:23 +05:30
Khushi Rawat
ccda17ede2 style: code optimization
(cherry picked from commit e843683ad1)
2024-05-14 17:12:46 +00:00
Khushi Rawat
e18be9b21e fix: Asset cancelation issue
(cherry picked from commit fa2b6c4490)
2024-05-14 17:12:45 +00:00
Deepesh Garg
53ea9ff102 Merge pull request #41259 from frappe/mergify/bp/version-15-hotfix/pr-41258
fix: PSOA ageing (#41258)
2024-05-14 20:08:45 +05:30
Nabin Hait
cb9df5e171 Merge pull request #41428 from frappe/mergify/bp/version-15-hotfix/pr-40468
fix: update description of Supplier Invoice Number (backport #40468)
2024-05-14 20:04:18 +05:30
Nabin Hait
041bcc96a9 Merge pull request #41449 from frappe/mergify/bp/version-15-hotfix/pr-41412
fix: Duplicate party name column in AR/AP report (backport #41412)
2024-05-14 20:03:22 +05:30
Nabin Hait
230cff583f Merge pull request #41461 from frappe/mergify/bp/version-15-hotfix/pr-41089
Refactor: Rename purchase receipt amount field to purchase amount (backport #41089)
2024-05-14 19:58:15 +05:30
Nabin Hait
b543093bde Merge pull request #41462 from frappe/mergify/bp/version-15-hotfix/pr-41420
Get prorata depreciation based on total days per year (backport #41420)
2024-05-14 19:45:44 +05:30
Nabin Hait
520e1e9c8f fix: resolved conflict 2024-05-14 19:37:34 +05:30
Nabin Hait
3a72f4bd30 fix: resolved conflict 2024-05-14 19:34:29 +05:30
Nabin Hait
8cca74d5ef fix: resolved conflict 2024-05-14 19:29:23 +05:30
Khushi Rawat
ce2c6c3165 fix(minor): removed extra parameter
(cherry picked from commit 98e7dfe97f)
2024-05-14 13:56:25 +00:00
Khushi Rawat
0b21026eef refactor: removed code duplicacies
(cherry picked from commit 6b24143f72)
2024-05-14 13:56:25 +00:00
Khushi Rawat
3eff9c9779 fix(wip): depreciation calculation after asset value adjustment
(cherry picked from commit d3200fb67f)
2024-05-14 13:56:24 +00:00
Khushi Rawat
0aca1e8e05 fix: removed unrelated code modification
(cherry picked from commit 360c3b36ed)
2024-05-14 12:47:53 +00:00
“Khushi
9b3f309598 refactor: renamed purchase receipt amount field to purchase amount
(cherry picked from commit 31841b4ab2)

# Conflicts:
#	erpnext/assets/doctype/asset/asset.json
#	erpnext/assets/doctype/asset/asset.py
#	erpnext/patches.txt
2024-05-14 12:47:53 +00:00
mergify[bot]
5c3a0965bc fix: zero valuation rate for batched item (backport #41446) (#41447)
fix: zero valuation rate for batched item (#41446)

(cherry picked from commit e3a80ebdf3)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-14 14:22:51 +05:30
Deepesh Garg
55edbec6fa fix: Duplicate party name column in AR/AP report
(cherry picked from commit 7501fe8ebd)
2024-05-14 02:53:48 +00:00
mergify[bot]
d988c7bd06 fix: Unknown column 'tabBatch.batch_no' in 'where clause' (backport #41418) (#41444)
fix: Unknown column 'tabBatch.batch_no' in 'where clause' (#41418)

fix: unknown column 'tabBatch.batch_no' in 'where clause'
(cherry picked from commit 6bd13d7452)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-14 05:21:17 +05:30
mergify[bot]
b8db903320 fix: 'Bill for Rejected Quantity in Purchase Invoice' feature not working (backport #41437) (#41445)
fix: 'Bill for Rejected Quantity in Purchase Invoice' feature not working (#41437)

(cherry picked from commit 3309359822)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-14 05:20:02 +05:30
Frappe PR Bot
1b2c2515bc chore(release): Bumped to Version 15.23.1
## [15.23.1](https://github.com/frappe/erpnext/compare/v15.23.0...v15.23.1) (2024-05-13)

### Bug Fixes

* valuation issue for batch (backport [#41425](https://github.com/frappe/erpnext/issues/41425)) (backport [#41430](https://github.com/frappe/erpnext/issues/41430)) ([#41434](https://github.com/frappe/erpnext/issues/41434)) ([aa2b644](aa2b64476e))
2024-05-13 11:24:52 +00:00
mergify[bot]
aa2b64476e fix: valuation issue for batch (backport #41425) (backport #41430) (#41434)
fix: valuation issue for batch (backport #41425) (#41430)

fix: valuation issue for batch (#41425)

(cherry picked from commit 065163146c)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-05-13 16:53:35 +05:30
mergify[bot]
15d2881bc8 fix: data getting override in delivery trip (backport #41431) (#41433)
fix: data getting override in delivery trip (#41431)

fix: data getting override
(cherry picked from commit 663fcb374d)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-13 16:31:49 +05:30
mergify[bot]
f55a131dea fix: valuation issue for batch (backport #41425) (#41430)
fix: valuation issue for batch (#41425)

(cherry picked from commit 065163146c)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-13 16:24:59 +05:30
Deepesh Garg
4036ef8764 chore: better description
(cherry picked from commit eccd5b4c5d)
2024-05-13 09:43:36 +00:00
Nihantra Patel
a7533ff7f6 fix: update description of Supplier Invoice Number
(cherry picked from commit d721de13aa)
2024-05-13 09:43:36 +00:00
mergify[bot]
b6f82a656f fix: consistent use of "Address & Contact" (backport #41386) (#41388)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
fix: consistent use of "Address & Contact" (#41386)
2024-05-10 17:42:05 +02:00
mergify[bot]
4190ffc654 chore: typo in Stock Settings (backport #41396) (#41405)
chore: typo in Stock Settings (#41396)

(cherry picked from commit 628d7e6458)

Co-authored-by: rehanrehman389 <32939507+rehanrehman389@users.noreply.github.com>
2024-05-10 15:45:04 +05:30
ruthra kumar
6b5b3afbca Merge pull request #41395 from frappe/mergify/bp/version-15-hotfix/pr-41040
fix: address filter and quotation to for prospect (backport #41040)
2024-05-09 12:48:30 +05:30
ruthra kumar
f337af9e90 refactor: make use of doc.quotation_to
(cherry picked from commit 754c7f6d1c)
2024-05-09 06:46:01 +00:00
Nihantra Patel
37741b5b45 fix: address filter and quotation to for prospect
(cherry picked from commit 2896e3666c)
2024-05-09 06:46:01 +00:00
Nihantra Patel
394b1f499d fix: address filter and quotation to for prospect
(cherry picked from commit 24a68a79df)
2024-05-09 06:46:00 +00:00
Nihantra Patel
cdbb515379 fix: address filter and quotation to for prospect
(cherry picked from commit fe5b88522e)
2024-05-09 06:46:00 +00:00
Frappe PR Bot
5f376009d0 chore(release): Bumped to Version 15.23.0
# [15.23.0](https://github.com/frappe/erpnext/compare/v15.22.2...v15.23.0) (2024-05-09)

### Bug Fixes

* Add PO reference ([c417b0c](c417b0c15a))
* correct ordered qty on SO when removing PO item - v15 ([#41342](https://github.com/frappe/erpnext/issues/41342)) ([5c1043f](5c1043fe88))
* Cost center not getting saved in PSOA ([fbbc0af](fbbc0af7bc))
* Do not deduct TCS for opening invoices ([1999b7a](1999b7a6c5))
* filter validation for batch-wise balance history report (backport [#41356](https://github.com/frappe/erpnext/issues/41356)) ([#41361](https://github.com/frappe/erpnext/issues/41361)) ([913cea0](913cea0018))
* future subscripition updates ([b27a55e](b27a55e802))
* GL Entries against orders as an advance ([e49a401](e49a401c23))
* incorrect qty picked in the pick list (backport [#41378](https://github.com/frappe/erpnext/issues/41378)) ([#41381](https://github.com/frappe/erpnext/issues/41381)) ([a293ec0](a293ec0db3))
* incorrect query for Purchase Invoice rate in GP ([20daae4](20daae4de9))
* **Item:** allow UOM conversion for non-stock items (backport [#41267](https://github.com/frappe/erpnext/issues/41267)) ([#41346](https://github.com/frappe/erpnext/issues/41346)) ([cd3ca1e](cd3ca1ee25))
* Merge debit and credit in transaction currency while merging gle with similar head ([9a58823](9a58823867))
* missing Item Name on Save for Quotation created from Item (backport [#41233](https://github.com/frappe/erpnext/issues/41233)) ([#41304](https://github.com/frappe/erpnext/issues/41304)) ([6491577](6491577501))
* Patch to fix the incorrect debit and credit in transaction currency ([f7e165b](f7e165b5ff))
* Patch to remove cancelled asset capitalization from asset ([a755540](a755540708))
* pick list with multiple batch issue (backport [#41335](https://github.com/frappe/erpnext/issues/41335)) ([#41338](https://github.com/frappe/erpnext/issues/41338)) ([1b1dfa8](1b1dfa8893))
* pricing rule rounding ([b93828c](b93828cd33))
* Purchase Invoice gain loss gl entry for periodic inventory ([0513481](0513481ec8))
* resolved conflict ([5039f45](5039f45be4))
* resolved conflict ([81afdcf](81afdcf745))
* search for item price in stock UOM (backport [#41075](https://github.com/frappe/erpnext/issues/41075)) ([#41313](https://github.com/frappe/erpnext/issues/41313)) ([112f96b](112f96bae0))
* update project URLs (backport [#41331](https://github.com/frappe/erpnext/issues/41331)) ([#41332](https://github.com/frappe/erpnext/issues/41332)) ([bb619a6](bb619a64fe))

### Features

* **Item Price:** make UOM mandatory (backport [#40588](https://github.com/frappe/erpnext/issues/40588)) ([#41312](https://github.com/frappe/erpnext/issues/41312)) ([cab0e30](cab0e30ceb))

### Performance Improvements

* index on item code for the Pick List Item doctype (backport [#41357](https://github.com/frappe/erpnext/issues/41357)) ([#41364](https://github.com/frappe/erpnext/issues/41364)) ([bba738f](bba738f5f4))
2024-05-09 05:31:55 +00:00
ruthra kumar
2ac0009b87 Merge pull request #41355 from frappe/version-15-hotfix
chore: release v15
2024-05-09 11:00:41 +05:30
rohitwaghchaure
307e394da4 Merge branch 'version-15' into version-15-hotfix 2024-05-09 07:30:20 +05:30
mergify[bot]
a293ec0db3 fix: incorrect qty picked in the pick list (backport #41378) (#41381)
fix: incorrect qty picked in the pick list (#41378)

(cherry picked from commit 5ed1b6b8fb)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-08 23:15:21 +05:30
Nabin Hait
d4aae4f311 Merge pull request #41380 from frappe/mergify/bp/version-15-hotfix/pr-41236
fix: Merge debit and credit in transaction currency while merging gle with similar head (backport #41236)
2024-05-08 19:25:17 +05:30
Nabin Hait
4dd58aba78 Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-41236 2024-05-08 19:02:23 +05:30
Nabin Hait
0b20a5d82e Merge pull request #41383 from frappe/mergify/bp/version-15-hotfix/pr-40121
fix: Patch to remove cancelled asset capitalization from asset (backport #40121)
2024-05-08 19:01:02 +05:30
Nabin Hait
5039f45be4 fix: resolved conflict 2024-05-08 18:23:30 +05:30
Nabin Hait
a755540708 fix: Patch to remove cancelled asset capitalization from asset
(cherry picked from commit 1951f71eeb)
2024-05-08 12:42:57 +00:00
Nabin Hait
81afdcf745 fix: resolved conflict 2024-05-08 17:57:43 +05:30
Nabin Hait
f7e165b5ff fix: Patch to fix the incorrect debit and credit in transaction currency
(cherry picked from commit e0d12ba4d0)

# Conflicts:
#	erpnext/patches.txt
2024-05-08 12:23:49 +00:00
Nabin Hait
9a58823867 fix: Merge debit and credit in transaction currency while merging gle with similar head
(cherry picked from commit e43697d359)
2024-05-08 12:23:48 +00:00
mergify[bot]
bba738f5f4 perf: index on item code for the Pick List Item doctype (backport #41357) (#41364)
* perf: index on item code for the Pick List Item doctype (#41357)

(cherry picked from commit 0887161f2a)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-08 11:37:51 +05:30
mergify[bot]
913cea0018 fix: filter validation for batch-wise balance history report (backport #41356) (#41361)
fix: filter validation for batch-wise balance history report (#41356)

fix: filter validation for batchwise balance history report
(cherry picked from commit 544fc60093)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-08 00:15:10 +05:30
ruthra kumar
6602ce9960 Merge pull request #41349 from frappe/mergify/bp/version-15-hotfix/pr-41288
fix: pricing rule rounding (backport #41288)
2024-05-07 10:18:26 +05:30
ruthra kumar
f2864ebdf6 refactor(test): test floor based rounding
(cherry picked from commit c41a037174)
2024-05-07 04:32:13 +00:00
ruthra kumar
b93828cd33 fix: pricing rule rounding
Consider a pricing rule of 20:1 with recursion enabled, free items
should follow the below progression

|   Qty | Free item qty |
|-------+---------------|
|  0-19 |             0 |
| 20-39 |             1 |
| 40-59 |             2 |

(cherry picked from commit 9bf37426c1)
2024-05-07 04:32:12 +00:00
mergify[bot]
cd3ca1ee25 fix(Item): allow UOM conversion for non-stock items (backport #41267) (#41346)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
fix(Item): allow UOM conversion for non-stock items (#41267)
2024-05-06 20:51:11 +02:00
mergify[bot]
6491577501 fix: missing Item Name on Save for Quotation created from Item (backport #41233) (#41304)
fix: missing Item Name on Save for Quotation created from Item (#41233)

* fix: missing Item Name on Save for Quotation created from Item

* fix: missing Item Name on Save for Quotation created from Item

(cherry picked from commit c8e92cb1b2)

Co-authored-by: HENRY Florian <florian.henry@open-concept.pro>
2024-05-06 21:45:27 +05:30
Nihantra C. Patel
5c1043fe88 fix: correct ordered qty on SO when removing PO item - v15 (#41342) 2024-05-06 21:36:27 +05:30
Frappe PR Bot
78637823c8 chore(release): Bumped to Version 15.22.2
## [15.22.2](https://github.com/frappe/erpnext/compare/v15.22.1...v15.22.2) (2024-05-06)

### Bug Fixes

* pick list with multiple batch issue (backport [#41335](https://github.com/frappe/erpnext/issues/41335)) (backport [#41338](https://github.com/frappe/erpnext/issues/41338)) ([#41340](https://github.com/frappe/erpnext/issues/41340)) ([ee12ec3](ee12ec36cc))
2024-05-06 08:41:26 +00:00
mergify[bot]
ee12ec36cc fix: pick list with multiple batch issue (backport #41335) (backport #41338) (#41340)
fix: pick list with multiple batch issue (backport #41335) (#41338)

fix: pick list with multiple batch issue (#41335)

fix: pick list with batchb issue
(cherry picked from commit ebfbe94aaf)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-05-06 14:10:08 +05:30
mergify[bot]
1b1dfa8893 fix: pick list with multiple batch issue (backport #41335) (#41338)
fix: pick list with multiple batch issue (#41335)

fix: pick list with batchb issue
(cherry picked from commit ebfbe94aaf)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-06 13:36:52 +05:30
ruthra kumar
a482ee1fe4 Merge pull request #41337 from frappe/mergify/bp/version-15-hotfix/pr-41334
fix: incorrect query for Purchase Invoice rate in GP (backport #41334)
2024-05-06 13:13:37 +05:30
ruthra kumar
20daae4de9 fix: incorrect query for Purchase Invoice rate in GP
(cherry picked from commit bd8382c592)
2024-05-06 07:24:48 +00:00
mergify[bot]
bb619a64fe fix: update project URLs (backport #41331) (#41332)
fix: update project URLs (#41331)

(cherry picked from commit 6142d07f1a)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-05-06 11:42:25 +05:30
Deepesh Garg
67954a93b2 Merge pull request #41325 from frappe/mergify/bp/version-15-hotfix/pr-41318
fix: Cost center not getting saved in PSOA (#41318)
2024-05-06 11:29:01 +05:30
Deepesh Garg
0b44cebe00 chore: resolve conflicts 2024-05-06 11:12:11 +05:30
Deepesh Garg
21ab8fe89c Merge pull request #41323 from frappe/mergify/bp/version-15-hotfix/pr-41314
fix: Do not deduct TCS for opening invoices (#41314)
2024-05-05 23:19:44 +05:30
Deepesh Garg
fbbc0af7bc fix: Cost center not getting saved in PSOA
(cherry picked from commit 58f7039630)

# Conflicts:
#	erpnext/accounts/doctype/psoa_cost_center/psoa_cost_center.json
2024-05-04 08:27:08 +00:00
Deepesh Garg
1999b7a6c5 fix: Do not deduct TCS for opening invoices
(cherry picked from commit eb9f579b8f)
2024-05-04 08:26:06 +00:00
Frappe PR Bot
fa5462d674 chore(release): Bumped to Version 15.22.1
## [15.22.1](https://github.com/frappe/erpnext/compare/v15.22.0...v15.22.1) (2024-05-03)

### Bug Fixes

* Add PO reference ([44330a6](44330a618b))
* GL Entries against orders as an advance ([4d312cb](4d312cbc65))
2024-05-03 17:32:36 +00:00
Deepesh Garg
b3736d6c6c Merge pull request #41321 from frappe/mergify/bp/version-15-hotfix/pr-41279
fix: GL Entries against orders as an advance (#41279)
2024-05-03 23:01:38 +05:30
Deepesh Garg
031ecb5cb0 Merge pull request #41320 from frappe/mergify/bp/version-15/pr-41279
fix: GL Entries against orders as an advance (#41279)
2024-05-03 23:01:18 +05:30
Deepesh Garg
2faeefb063 test: Add bank account
(cherry picked from commit eac7be2d0f)
2024-05-03 14:12:29 +00:00
Deepesh Garg
d384860c34 test: Update failing tests
(cherry picked from commit 42ef95759d)
2024-05-03 14:12:29 +00:00
Deepesh Garg
c417b0c15a fix: Add PO reference
(cherry picked from commit eb31017058)
2024-05-03 14:12:29 +00:00
Deepesh Garg
e49a401c23 fix: GL Entries against orders as an advance
(cherry picked from commit 8289f3c724)
2024-05-03 14:12:29 +00:00
Deepesh Garg
27f51f1234 test: Add bank account
(cherry picked from commit eac7be2d0f)
2024-05-03 14:12:15 +00:00
Deepesh Garg
ad0f563816 test: Update failing tests
(cherry picked from commit 42ef95759d)
2024-05-03 14:12:14 +00:00
Deepesh Garg
44330a618b fix: Add PO reference
(cherry picked from commit eb31017058)
2024-05-03 14:12:14 +00:00
Deepesh Garg
4d312cbc65 fix: GL Entries against orders as an advance
(cherry picked from commit 8289f3c724)
2024-05-03 14:12:14 +00:00
Deepesh Garg
6bac561789 Merge pull request #41315 from frappe/mergify/bp/version-15-hotfix/pr-41311
fix: future subscription updates (#41311)
2024-05-03 15:57:16 +05:30
Deepesh Garg
31254009cc test: Add posting dates
(cherry picked from commit 7fa22069d8)
2024-05-03 06:35:27 +00:00
Deepesh Garg
b27a55e802 fix: future subscripition updates
(cherry picked from commit 8e30debc10)
2024-05-03 06:35:27 +00:00
mergify[bot]
cab0e30ceb feat(Item Price): make UOM mandatory (backport #40588) (#41312)
* feat(Item Price): make UOM mandatory (#40588)

(cherry picked from commit a61148c464)

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

* chore: `conflicts`

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-05-03 11:17:12 +05:30
mergify[bot]
112f96bae0 fix: search for item price in stock UOM (backport #41075) (#41313)
fix: search for item price in stock UOM (#41075)

(cherry picked from commit e4db0562ac)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2024-05-03 10:28:08 +05:30
Deepesh Garg
66b85c96f4 Merge pull request #41310 from frappe/mergify/bp/version-15-hotfix/pr-41260
fix: Purchase Invoice gain loss gl entry for periodic inventory (#41260)
2024-05-03 09:28:18 +05:30
Deepesh Garg
0513481ec8 fix: Purchase Invoice gain loss gl entry for periodic inventory
(cherry picked from commit 2402447568)
2024-05-03 03:25:54 +00:00
Frappe PR Bot
f62762b4d1 chore(release): Bumped to Version 15.22.0
# [15.22.0](https://github.com/frappe/erpnext/compare/v15.21.2...v15.22.0) (2024-05-02)

### Bug Fixes

* added brand column in Warehouse wise Item Balance Age and Value … (backport [#41280](https://github.com/frappe/erpnext/issues/41280)) ([#41282](https://github.com/frappe/erpnext/issues/41282)) ([4bbf0a4](4bbf0a46b5))
* advance account validation in company master ([dd67b0e](dd67b0ee61))
* args when get the delivery note in delivery trip ([61d6838](61d6838b2c))
* args when get the delivery note in delivery trip ([e9acacd](e9acacdd5d))
* basic rate for SABB ([7b79873](7b7987363f))
* compute tree-view parent field name ([#41234](https://github.com/frappe/erpnext/issues/41234)) ([c3077ee](c3077ee067))
* display term name for single term invoices ([a7d1a88](a7d1a88519))
* duplicate column in the stock ledger report ([a62298a](a62298a635))
* enable advance in separate acc only for customer and Supplier ([c3073d6](c3073d6e74))
* expense causing p&l test case to fail ([acfee42](acfee42735))
* handle and receivable accounts based on response type ([f65b28a](f65b28a189))
* handle stock balance unbuffered_cursor error (backport [#41186](https://github.com/frappe/erpnext/issues/41186)) ([#41188](https://github.com/frappe/erpnext/issues/41188)) ([b34582e](b34582e6ba))
* Ignore user perm in Bank Reco Tool for company ([737c480](737c4809e3))
* incorrectly applying TDS when Advance is in previous FY ([08f888a](08f888a326))
* Invoice with no GLEs in deferred report ([44c3ad6](44c3ad6810))
* missing def expense if no exp in first month ([0a65a37](0a65a37eed))
* mode of payment has precedance ([c6145a1](c6145a1101))
* multiple pricing rules with discount amount and discount percentage not working (backport [#41211](https://github.com/frappe/erpnext/issues/41211)) (backport [#41241](https://github.com/frappe/erpnext/issues/41241)) ([#41275](https://github.com/frappe/erpnext/issues/41275)) ([de77894](de77894e59))
* paid amount in bank reconciliation tool ([759c7f5](759c7f5490))
* party and party type label on accounting preview ([ee9822f](ee9822fd42))
* permission issue when user permission restricts on company ([8d70a0e](8d70a0e0bc))
* rendering the email template when user HTML ([3068dad](3068dad410))
* test case for zero deferred expense ([23c3c3c](23c3c3cc0c))
* validation to prevent foreign currency advance accounts in PE ([fb4a75c](fb4a75c5aa))
* validation to prevent overallocation ([ea596eb](ea596eb4a2))
* warehouse type filter for stock reports ([48351d6](48351d6da8))

### Features

* allow to do reposting for all transactions (audit) ([4555f8a](4555f8a9a6))
2024-05-02 04:23:27 +00:00
ruthra kumar
27e0ed30fe Merge pull request #41263 from frappe/version-15-hotfix
chore: release v15
2024-05-02 09:52:07 +05:30
mergify[bot]
4bbf0a46b5 fix: added brand column in Warehouse wise Item Balance Age and Value … (backport #41280) (#41282)
fix: added brand column in Warehouse wise Item Balance Age and Value … (#41280)

fix: added brand coulmn in Warehouse wise Item Balance Age and Value report
(cherry picked from commit 1cbc200770)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-01 16:03:37 +05:30
mergify[bot]
de77894e59 fix: multiple pricing rules with discount amount and discount percentage not working (backport #41211) (backport #41241) (#41275)
fix: multiple pricing rules with discount amount and discount percentage not working (backport #41211) (#41241)

fix: multiple pricing rules with discount amount and discount percentage not working (#41211)

(cherry picked from commit 54313b5db9)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-05-01 15:46:52 +05:30
ruthra kumar
5a9615a1f2 Merge pull request #41270 from frappe/mergify/bp/version-15-hotfix/pr-41268
fix: validation to prevent overallocation (backport #41268)
2024-04-30 18:40:22 +05:30
Fritz
c3077ee067 fix: compute tree-view parent field name (#41234)
fix: Fixing treeView lookup incompatibility, see : See https://github.com/frappe/frappe/pull/26199
2024-04-30 17:57:58 +05:30
ruthra kumar
ea596eb4a2 fix: validation to prevent overallocation
(cherry picked from commit bf755fab55)
2024-04-30 12:08:48 +00:00
Deepesh Garg
6590d78298 fix: PSOA ageing
(cherry picked from commit fed2d11905)
2024-04-30 07:41:09 +00:00
Deepesh Garg
378605cd00 Merge pull request #41253 from frappe/mergify/bp/version-15-hotfix/pr-41171
fix: Invoice with no GLEs in deferred report (#41171)
2024-04-30 13:10:53 +05:30
ruthra kumar
56e455c745 Merge pull request #41255 from frappe/mergify/bp/version-15-hotfix/pr-41252
fix: permission issue when user permission restricts on company (backport #41252)
2024-04-30 12:40:02 +05:30
ruthra kumar
8d70a0e0bc fix: permission issue when user permission restricts on company 2024-04-30 12:20:10 +05:30
Deepesh Garg
b67e9e4aa8 chore: remove debug flag
(cherry picked from commit ecf07bd128)
2024-04-30 05:46:18 +00:00
Deepesh Garg
44c3ad6810 fix: Invoice with no GLEs in deferred report
(cherry picked from commit 1c613ada6f)
2024-04-30 05:46:17 +00:00
Deepesh Garg
69c05e5843 Merge pull request #41251 from frappe/mergify/bp/version-15-hotfix/pr-41173
fix: paid amount in bank reconciliation tool (#41173)
2024-04-30 11:15:39 +05:30
Deepesh Garg
6ab91a5c88 Merge pull request #41250 from frappe/mergify/bp/version-15-hotfix/pr-41219
fix: Ignore user perm in Bank Reco Tool for company (#41219)
2024-04-30 11:15:19 +05:30
Deepesh Garg
759c7f5490 fix: paid amount in bank reconciliation tool
(cherry picked from commit a48966f08c)
2024-04-30 04:55:51 +00:00
Deepesh Garg
03b4a85825 chore: resolve conflicts 2024-04-30 10:25:51 +05:30
Deepesh Garg
737c4809e3 fix: Ignore user perm in Bank Reco Tool for company
(cherry picked from commit 9f346e7ba0)

# Conflicts:
#	erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.json
2024-04-30 04:53:24 +00:00
Deepesh Garg
3657badb31 Merge pull request #41239 from frappe/mergify/bp/version-15-hotfix/pr-41237
fix: party and party type label on accounting preview (#41237)
2024-04-30 10:23:17 +05:30
ruthra kumar
ef69a46e6a Merge pull request #41249 from frappe/mergify/bp/version-15-hotfix/pr-41240
fix: display term name for single term invoices in AR/AP (backport #41240)
2024-04-30 07:42:41 +05:30
ruthra kumar
78106836be Merge pull request #41247 from frappe/mergify/bp/version-15-hotfix/pr-41194
fix: TDS incorrectly applied when Advance is in previous FY (backport #41194)
2024-04-30 07:18:04 +05:30
ruthra kumar
a7d1a88519 fix: display term name for single term invoices
(cherry picked from commit 5fa4cfee04)
2024-04-30 01:40:17 +00:00
ruthra kumar
15ac3d8b0b test: TDS deduction across fiscal year
(cherry picked from commit 2f9a144023)
2024-04-30 01:27:55 +00:00
ruthra kumar
08f888a326 fix: incorrectly applying TDS when Advance is in previous FY
(cherry picked from commit b195f519e2)
2024-04-30 01:27:54 +00:00
Nikhil Kothari
ee9822fd42 fix: party and party type label on accounting preview
(cherry picked from commit f7f3b22786)
2024-04-29 13:24:48 +00:00
Deepesh Garg
17eb2f02f4 Merge pull request #41226 from frappe/mergify/bp/version-15-hotfix/pr-40865
fix: missing def expense if no exp in first month (#40865)
2024-04-29 17:25:15 +05:30
Ankush Menat
067419b7cd chore: delete invalid translations (#41227) 2024-04-29 10:31:22 +05:30
Dany Robert
acfee42735 fix: expense causing p&l test case to fail
(cherry picked from commit 01888c98bc)
2024-04-29 04:55:32 +00:00
Dany Robert
62966ac550 chore: semgrep
(cherry picked from commit 581af4eced)
2024-04-29 04:55:32 +00:00
Dany Robert
23c3c3cc0c fix: test case for zero deferred expense
(cherry picked from commit 7ef4dbcaf6)
2024-04-29 04:55:32 +00:00
Dany Robert
0a65a37eed fix: missing def expense if no exp in first month
(cherry picked from commit 5c9ce575f6)
2024-04-29 04:55:31 +00:00
ruthra kumar
0df1005cb2 Merge pull request #41209 from frappe/mergify/bp/version-15-hotfix/pr-41208
fix: set receivable account based on response type (backport #41208)
2024-04-26 20:30:55 +05:30
rohitwaghchaure
807b2d5c0a Merge pull request #41206 from frappe/mergify/bp/version-15-hotfix/pr-41165
feat: allow to do reposting for all stock transactions (audit) (backport #41165)
2024-04-26 14:25:40 +05:30
ruthra kumar
f65b28a189 fix: handle and receivable accounts based on response type
(cherry picked from commit 066859cca0)
2024-04-26 08:43:23 +00:00
rohitwaghchaure
a292e52b34 chore: fix conflicts 2024-04-26 13:47:03 +05:30
Rohit Waghchaure
4555f8a9a6 feat: allow to do reposting for all transactions (audit)
(cherry picked from commit aefbe21b46)

# Conflicts:
#	erpnext/stock/doctype/stock_reposting_settings/stock_reposting_settings.json
2024-04-26 08:15:11 +00:00
rohitwaghchaure
0fea5564b6 Merge pull request #41201 from frappe/mergify/bp/version-15-hotfix/pr-41185
fix: args when get the delivery note in delivery trip (backport #41185)
2024-04-26 13:34:44 +05:30
rohitwaghchaure
476b7f43a2 Merge pull request #41202 from frappe/mergify/bp/version-15-hotfix/pr-41182
fix: rendering the email template when user HTML (backport #41182)
2024-04-26 13:34:27 +05:30
rohitwaghchaure
d5d846f481 Merge pull request #41203 from frappe/mergify/bp/version-15-hotfix/pr-41167
fix: warehouse type filter for stock reports (backport #41167)
2024-04-26 13:34:00 +05:30
rohitwaghchaure
6fd356b654 chore: fix conflicts 2024-04-26 13:13:55 +05:30
Rohit Waghchaure
48351d6da8 fix: warehouse type filter for stock reports
(cherry picked from commit 4250ac821f)
2024-04-26 07:41:48 +00:00
Nihantra C. Patel
3068dad410 fix: rendering the email template when user HTML
(cherry picked from commit 7cb66f7fd3)
2024-04-26 07:41:37 +00:00
Nihantra Patel
61d6838b2c fix: args when get the delivery note in delivery trip
(cherry picked from commit ca577f7aaa)
2024-04-26 07:40:36 +00:00
Nihantra Patel
e9acacdd5d fix: args when get the delivery note in delivery trip
(cherry picked from commit 2f359e201d)

# Conflicts:
#	erpnext/stock/doctype/delivery_note/delivery_note.py
2024-04-26 07:40:36 +00:00
rohitwaghchaure
3bb26fde2b Merge pull request #41199 from frappe/mergify/bp/version-15-hotfix/pr-41195
fix: basic rate for SABB (backport #41195)
2024-04-26 12:54:46 +05:30
Rohit Waghchaure
7b7987363f fix: basic rate for SABB
(cherry picked from commit 7fa94843aa)
2024-04-26 07:21:46 +00:00
rohitwaghchaure
3193ef0a89 Merge pull request #41197 from frappe/mergify/bp/version-15-hotfix/pr-41192
fix: duplicate column in the stock ledger report (backport #41192)
2024-04-26 12:49:25 +05:30
Rohit Waghchaure
a62298a635 fix: duplicate column in the stock ledger report
(cherry picked from commit be7fd6bfb4)
2024-04-26 06:53:14 +00:00
Frappe PR Bot
6a7b6f6262 chore(release): Bumped to Version 15.21.2
## [15.21.2](https://github.com/frappe/erpnext/compare/v15.21.1...v15.21.2) (2024-04-26)

### Bug Fixes

* enable advance in separate acc only for customer and Supplier ([6da927a](6da927a573))
2024-04-26 02:10:51 +00:00
ruthra kumar
5b389bf5ca Merge pull request #41191 from frappe/mergify/bp/version-15/pr-41183
fix: restrict Advance in separate party to customer and supplier (backport #41183)
2024-04-26 07:39:32 +05:30
ruthra kumar
6da927a573 fix: enable advance in separate acc only for customer and Supplier
(cherry picked from commit 3c1af2acf0)
2024-04-26 01:50:34 +00:00
ruthra kumar
e6c7832485 Merge pull request #41189 from frappe/mergify/bp/version-15-hotfix/pr-41183
fix: restrict Advance in separate party to customer and supplier (backport #41183)
2024-04-25 20:35:50 +05:30
ruthra kumar
c3073d6e74 fix: enable advance in separate acc only for customer and Supplier
(cherry picked from commit 3c1af2acf0)
2024-04-25 14:30:58 +00:00
mergify[bot]
b34582e6ba fix: handle stock balance unbuffered_cursor error (backport #41186) (#41188)
fix: handle stock balance unbuffered_cursor error (#41186)

(cherry picked from commit 341fb6d8f3)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-04-25 17:26:26 +05:30
ruthra kumar
5136ffd10d Merge pull request #41139 from frappe/mergify/bp/version-15-hotfix/pr-41086
fix: prevent foreign currency  accounts as advance accounts. (backport #41086)
2024-04-25 09:37:49 +05:30
Frappe PR Bot
cacb5bfe03 chore(release): Bumped to Version 15.21.1
## [15.21.1](https://github.com/frappe/erpnext/compare/v15.21.0...v15.21.1) (2024-04-25)

### Bug Fixes

* mode of payment has precedance ([0dfd6fa](0dfd6facc1))
2024-04-25 03:38:33 +00:00
ruthra kumar
88fcb8aebb Merge pull request #41180 from frappe/mergify/bp/version-15/pr-41142
fix: mode of payment has precedance in Payment Entry (backport #41142)
2024-04-25 09:07:05 +05:30
ruthra kumar
0dfd6facc1 fix: mode of payment has precedance
Mode of Payment is given precedence over company/party bank account

(cherry picked from commit 4aef969879)
2024-04-25 03:34:30 +00:00
ruthra kumar
5988941032 Merge pull request #41177 from frappe/mergify/bp/version-15-hotfix/pr-41142
fix: mode of payment has precedance in Payment Entry (backport #41142)
2024-04-25 08:55:20 +05:30
ruthra kumar
c6145a1101 fix: mode of payment has precedance
Mode of Payment is given precedence over company/party bank account

(cherry picked from commit 4aef969879)
2024-04-25 03:13:13 +00:00
Frappe PR Bot
2fb035fe1b chore(release): Bumped to Version 15.21.0
# [15.21.0](https://github.com/frappe/erpnext/compare/v15.20.6...v15.21.0) (2024-04-24)

### Bug Fixes

* account and stock manager read perm ([572e844](572e844a91))
* allow Employee role to select cost center & project (accounting dimensions) (backport [#41160](https://github.com/frappe/erpnext/issues/41160)) ([#41162](https://github.com/frappe/erpnext/issues/41162)) ([90d6e55](90d6e550aa))
* Allow updating cost center and project for repostable doctypes ([e278688](e278688a4b))
* balance qty for stock ledger report ([74ed656](74ed656bb9))
* do not add actual expense twice for validating budget ([c72478c](c72478c74d))
* do not add qty to supplied items (backport [#41061](https://github.com/frappe/erpnext/issues/41061)) ([#41066](https://github.com/frappe/erpnext/issues/41066)) ([1ae447e](1ae447e4fc))
* don't attempt to set gender from salutation (backport [#40997](https://github.com/frappe/erpnext/issues/40997)) ([#41073](https://github.com/frappe/erpnext/issues/41073)) ([ee7aaf0](ee7aaf0ea4))
* duplicate serial and batch bundle in stock entry and stock reco ([c10c211](c10c21157d))
* incorrect stock posting for current qty ([05d5c48](05d5c48d29))
* Missing args while fetching items from delivery note ([3b4575a](3b4575af3d))
* not able to update default supplier from Supplier Quotation Comparison report ([80891da](80891daaed))
* Party type in Payment Order ([83931e8](83931e872b))
* Payment entry against employee ([060d46a](060d46af42))
* Permission for lower dedcution certificate ([d7ddb00](d7ddb00e86))
* search not working for so in the Production Plan ([#36459](https://github.com/frappe/erpnext/issues/36459)) ([544e56a](544e56a71c))
* stock reco negative qty validation ([aee03fe](aee03fe2ef))
* validate uom is integer for PR item (backport [#41074](https://github.com/frappe/erpnext/issues/41074)) ([#41077](https://github.com/frappe/erpnext/issues/41077)) ([93242ca](93242ca883))
* validation for fraction number in Work Order ([ef2553e](ef2553edf9))
* validation for zero qty in SABB ([85796b3](85796b3534))

### Features

* Available batches report as on specific date ([791e426](791e4269d2))
* show expense breakup ([e047e1e](e047e1eb15))
2024-04-24 10:48:02 +00:00
Deepesh Garg
f3be4cd2b3 Merge pull request #41150 from frappe/version-15-hotfix
chore: release v15
2024-04-24 16:16:41 +05:30
Deepesh Garg
15bb41d3c2 Merge pull request #41164 from frappe/mergify/bp/version-15-hotfix/pr-41106
chore: Remove heatmap from party dashboards (#41106)
2024-04-24 13:00:50 +05:30
Deepesh Garg
410990b2a3 chore: Remove heatmap from party dashboards
(cherry picked from commit a8f03e8baa)
2024-04-24 06:32:03 +00:00
Deepesh Garg
51a2b74db9 Merge pull request #41101 from frappe/mergify/bp/version-15-hotfix/pr-41085
fix: Permission for lower deduction certificate (#41085)
2024-04-24 12:00:50 +05:30
Deepesh Garg
bfc34939f2 Merge pull request #41048 from frappe/mergify/bp/version-15-hotfix/pr-40962
fix: Allow updating cost center and project for repostable doctypes (#40962)
2024-04-24 12:00:28 +05:30
mergify[bot]
90d6e550aa fix: allow Employee role to select cost center & project (accounting dimensions) (backport #41160) (#41162)
* fix: allow Employee role to select cost center & project (accounting dimensions)

(cherry picked from commit d0d496a515)

# Conflicts:
#	erpnext/accounts/doctype/cost_center/cost_center.json
#	erpnext/projects/doctype/project/project.json

* chore: fix conflicts

---------

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2024-04-24 11:43:46 +05:30
Deepesh Garg
4f5af0ff9f chore: Resolve conflicts 2024-04-24 11:32:26 +05:30
rohitwaghchaure
ab21b518e1 Merge pull request #41156 from frappe/mergify/bp/version-15-hotfix/pr-41135
feat: Available batches as on specific date report (backport #41135)
2024-04-24 11:14:16 +05:30
Nabin Hait
d4e2adbdb2 Merge pull request #41141 from frappe/mergify/bp/version-15-hotfix/pr-41136
fix: Missing args while fetching items from delivery note in Installation Note (backport #41136)
2024-04-24 10:58:34 +05:30
ruthra kumar
85e0e8110a Merge pull request #41149 from frappe/mergify/bp/version-15-hotfix/pr-41147
refactor: better description and pop up on Advance accounts (backport #41147)
2024-04-24 07:19:19 +05:30
Rohit Waghchaure
791e4269d2 feat: Available batches report as on specific date
(cherry picked from commit b8f7979794)
2024-04-23 16:48:56 +00:00
rohitwaghchaure
3df5aa04b5 Merge pull request #41153 from frappe/mergify/bp/version-15-hotfix/pr-41145
fix: incorrect stock posting for current qty (backport #41145)
2024-04-23 17:12:03 +05:30
Rohit Waghchaure
05d5c48d29 fix: incorrect stock posting for current qty
(cherry picked from commit d4fe313de2)
2024-04-23 11:21:47 +00:00
ruthra kumar
2b736b52d6 chore: resolve conflicts 2024-04-23 15:35:02 +05:30
ruthra kumar
24954b909b refactor: popup to inform on limited support for Advance accounts
(cherry picked from commit 9dbd321133)
2024-04-23 09:17:00 +00:00
ruthra kumar
ed5affe25a refactor: better description for advance account
(cherry picked from commit de9c8fc9d6)

# Conflicts:
#	erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json
#	erpnext/setup/doctype/company/company.json
2024-04-23 09:17:00 +00:00
rohitwaghchaure
8591a151de Merge pull request #41143 from frappe/mergify/bp/version-15-hotfix/pr-41098
fix: stock reconciliation negative qty validation (backport #41098)
2024-04-23 13:43:08 +05:30
rohitwaghchaure
b2a0e4b810 chore: fix conflicts 2024-04-23 13:17:23 +05:30
Rohit Waghchaure
aee03fe2ef fix: stock reco negative qty validation
(cherry picked from commit 289495c308)

# Conflicts:
#	erpnext/stock/stock_ledger.py
2024-04-23 07:44:47 +00:00
Deepesh Garg
62702b8bd6 Merge pull request #41134 from frappe/mergify/bp/version-15-hotfix/pr-41104
fix: Payment entry against employee (#41104)
2024-04-23 12:04:13 +05:30
Deepesh Garg
cfb36cc9a8 Merge pull request #41131 from frappe/mergify/bp/version-15-hotfix/pr-40797
fix: Party type in Payment Order (#40797)
2024-04-23 12:03:47 +05:30
Nabin Hait
3b4575af3d fix: Missing args while fetching items from delivery note
(cherry picked from commit bbe323fbb4)
2024-04-23 04:55:06 +00:00
ruthra kumar
dd67b0ee61 fix: advance account validation in company master
(cherry picked from commit 1ad065fc54)
2024-04-23 01:45:45 +00:00
ruthra kumar
fb4a75c5aa fix: validation to prevent foreign currency advance accounts in PE
(cherry picked from commit e3fc5990ee)
2024-04-23 01:45:45 +00:00
Deepesh Garg
060d46af42 fix: Payment entry against employee
(cherry picked from commit 93e6c6ccab)
2024-04-22 06:08:47 +00:00
Deepesh Garg
83931e872b fix: Party type in Payment Order
(cherry picked from commit 91fa41c9ec)
2024-04-22 06:05:12 +00:00
Gursheen Kaur Anand
a8866b61a1 Merge pull request #41124 from frappe/mergify/bp/version-15-hotfix/pr-40769
fix: budget validation for purchase orders (backport #40769)
2024-04-21 18:57:15 +05:30
rohitwaghchaure
f733eddf0b Merge pull request #41122 from frappe/mergify/bp/version-15-hotfix/pr-41120
fix: search not working for so in the Production Plan (backport #36459) (backport #41120)
2024-04-21 17:24:42 +05:30
Gursheen Anand
ba99bc5fff refactor: show list for expense breakup
(cherry picked from commit 9a12376e29)
2024-04-21 11:26:31 +00:00
Gursheen Anand
e047e1eb15 feat: show expense breakup
(cherry picked from commit 59292a09c4)
2024-04-21 11:26:31 +00:00
Gursheen Anand
c72478c74d fix: do not add actual expense twice for validating budget
(cherry picked from commit af26ac96e9)
2024-04-21 11:26:30 +00:00
rohitwaghchaure
544e56a71c fix: search not working for so in the Production Plan (#36459)
fix: search not working for so
(cherry picked from commit 8c57d56240)
(cherry picked from commit 9a6e762b8b)
2024-04-21 11:21:04 +00:00
rohitwaghchaure
bb5096075f Merge pull request #41114 from frappe/mergify/bp/version-15-hotfix/pr-41099
fix: not able to update default supplier from Supplier Quotation Comparison report (backport #41099)
2024-04-20 19:47:01 +05:30
Rohit Waghchaure
80891daaed fix: not able to update default supplier from Supplier Quotation Comparison report
(cherry picked from commit ad8e189c26)
2024-04-20 05:51:36 +00:00
rohitwaghchaure
77a764e5bd Merge pull request #41107 from frappe/mergify/bp/version-15-hotfix/pr-41102
fix: balance qty for stock ledger report (backport #41102)
2024-04-20 11:16:06 +05:30
Rohit Waghchaure
74ed656bb9 fix: balance qty for stock ledger report
(cherry picked from commit f00ae0b92b)
2024-04-19 16:22:16 +00:00
rohitwaghchaure
82ce228433 Merge pull request #41097 from frappe/mergify/bp/version-15-hotfix/pr-41067
fix: validation for zero qty in SABB (backport #41067)
2024-04-19 21:49:55 +05:30
Deepesh Garg
d7ddb00e86 fix: Permission for lower dedcution certificate
(cherry picked from commit f6f118855b)

# Conflicts:
#	erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.json
2024-04-19 10:11:47 +00:00
Rohit Waghchaure
85796b3534 fix: validation for zero qty in SABB
(cherry picked from commit 497f560b4b)
2024-04-19 09:41:27 +00:00
Frappe PR Bot
b582570022 chore(release): Bumped to Version 15.20.6
## [15.20.6](https://github.com/frappe/erpnext/compare/v15.20.5...v15.20.6) (2024-04-19)

### Bug Fixes

* account and stock manager read perm ([6cc7c08](6cc7c08ccf))
2024-04-19 08:40:13 +00:00
Gursheen Kaur Anand
8914bce3d8 Merge pull request #41095 from frappe/mergify/bp/version-15/pr-41093
fix: accounts manager perm for FY (backport #41093)
2024-04-19 14:08:59 +05:30
Gursheen Anand
6cc7c08ccf fix: account and stock manager read perm
(cherry picked from commit 572e844a91)
2024-04-19 08:05:05 +00:00
Gursheen Kaur Anand
a1fb289290 Merge pull request #41093 from GursheenK/fy-accounts-manager-perm
fix: accounts manager perm for FY
2024-04-19 13:28:32 +05:30
Gursheen Anand
572e844a91 fix: account and stock manager read perm 2024-04-19 13:05:25 +05:30
rohitwaghchaure
906b9562de Merge pull request #41084 from frappe/mergify/bp/version-15-hotfix/pr-41083
fix: validation for fraction number in Work Order (backport #41083)
2024-04-18 15:56:07 +05:30
Rohit Waghchaure
ef2553edf9 fix: validation for fraction number in Work Order
(cherry picked from commit f8305c2fc0)
2024-04-18 09:15:49 +00:00
mergify[bot]
93242ca883 fix: validate uom is integer for PR item (backport #41074) (#41077)
fix: validate uom is integer for PR item

(cherry picked from commit 9a290fdfc9)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-04-18 07:53:20 +05:30
mergify[bot]
ee7aaf0ea4 fix: don't attempt to set gender from salutation (backport #40997) (#41073)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
fix: don't attempt to set gender from salutation (#40997)
2024-04-17 17:53:43 +02:00
mergify[bot]
1ae447e4fc fix: do not add qty to supplied items (backport #41061) (#41066)
fix: do not add qty to supplied items

(cherry picked from commit 8233c392fb)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-04-17 17:30:43 +05:30
Frappe PR Bot
5ecb022abc chore(release): Bumped to Version 15.20.5
## [15.20.5](https://github.com/frappe/erpnext/compare/v15.20.4...v15.20.5) (2024-04-17)

### Bug Fixes

* duplicate serial and batch bundle in stock entry and stock reco ([a1db5f0](a1db5f0f0a))
2024-04-17 09:25:54 +00:00
rohitwaghchaure
12ab3972de Merge pull request #41058 from frappe/mergify/bp/version-15/pr-41056
fix: duplicate serial and batch bundle in stock entry and stock reco (backport #41053) (backport #41056)
2024-04-17 14:54:34 +05:30
Rohit Waghchaure
a1db5f0f0a fix: duplicate serial and batch bundle in stock entry and stock reco
(cherry picked from commit 732b6e1417)
(cherry picked from commit c10c21157d)
2024-04-17 09:00:05 +00:00
rohitwaghchaure
5195d8a765 Merge pull request #41056 from frappe/mergify/bp/version-15-hotfix/pr-41053
fix: duplicate serial and batch bundle in stock entry and stock reco (backport #41053)
2024-04-17 14:29:14 +05:30
Rohit Waghchaure
c10c21157d fix: duplicate serial and batch bundle in stock entry and stock reco
(cherry picked from commit 732b6e1417)
2024-04-17 07:50:06 +00:00
Deepesh Garg
116a429c45 chore: resolve conflicts 2024-04-17 12:09:05 +05:30
Deepesh Garg
6c10783823 chore: resolve conflicts 2024-04-17 11:47:52 +05:30
Frappe PR Bot
00d45c34ba chore(release): Bumped to Version 15.20.4
## [15.20.4](https://github.com/frappe/erpnext/compare/v15.20.3...v15.20.4) (2024-04-17)

### Bug Fixes

* Delayed Order Report not working (backport [#41037](https://github.com/frappe/erpnext/issues/41037)) ([#41039](https://github.com/frappe/erpnext/issues/41039)) ([40d059c](40d059c7c1))
* do not validate batch qty for LCV ([5de9b6a](5de9b6ac75))
* Don't set delivery date as today while making SO from Quotation ([fea906b](fea906b883))
* expense account set as COGS for stock entry Material Issue (backport [#41026](https://github.com/frappe/erpnext/issues/41026)) ([#41029](https://github.com/frappe/erpnext/issues/41029)) ([f59e433](f59e43320b))
* get address if multiple companies ([dcfc768](dcfc768d33))
* get address if multiple companies ([ccdbad9](ccdbad9f90))
* **gp:** SLEs not fetched for correct warehouse ([881dc02](881dc02349))
* incorrect exc gain/loss for PE against JE for payable accounts ([361d7f1](361d7f1ba5))
* landed cost voucher for legacy pr with batch ([4e215c6](4e215c6b7b))
* Link Validation Error on Dunning cancellation ([0053d57](0053d57ec4))
* Multiple partial payment requests against Purchase Invoice ([e287376](e287376cc8))
* not able to submit subcontracting receipt (backport [#41041](https://github.com/frappe/erpnext/issues/41041)) ([#41045](https://github.com/frappe/erpnext/issues/41045)) ([b27ad76](b27ad76557))
* Subcontracting Receipt GL Entries (backport [#40773](https://github.com/frappe/erpnext/issues/40773)) ([#40979](https://github.com/frappe/erpnext/issues/40979)) ([9abc71f](9abc71f9c8))
* Test case ([641b2a4](641b2a4705))
* test cases ([0ee91a2](0ee91a2e54))
* type of transaction validation for the stock entry (backport [#40986](https://github.com/frappe/erpnext/issues/40986)) ([#40992](https://github.com/frappe/erpnext/issues/40992)) ([4342b89](4342b891eb))
* **ux:** Sales Order Stock Reservation Dialog (backport [#40707](https://github.com/frappe/erpnext/issues/40707)) ([#40980](https://github.com/frappe/erpnext/issues/40980)) ([14a1a18](14a1a18243))
* voucher no. is link field for non english user interface ([1c28ed4](1c28ed4d5b))
* zero division error ([e9c6c5a](e9c6c5a8eb))
2024-04-17 06:13:12 +00:00
rohitwaghchaure
44610621ab Merge pull request #41031 from frappe/version-15-hotfix
chore: release v15
2024-04-17 11:41:42 +05:30
Deepesh Garg
5f41036f4a chore: resolve conflicts 2024-04-17 11:38:13 +05:30
Deepesh Garg
e278688a4b fix: Allow updating cost center and project for repostable doctypes
(cherry picked from commit c3845ac0f1)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.json
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json
2024-04-17 05:55:02 +00:00
ruthra kumar
088aa94fa1 Merge pull request #40789 from frappe/mergify/bp/version-15-hotfix/pr-40786
fix(gp): SLEs not fetched for correct warehouse (backport #40786)
2024-04-17 10:35:09 +05:30
ruthra kumar
c34b814c16 Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-40786 2024-04-17 10:19:08 +05:30
Dany Robert
881dc02349 fix(gp): SLEs not fetched for correct warehouse
(cherry picked from commit f958e8be06)
2024-04-17 10:17:40 +05:30
mergify[bot]
b27ad76557 fix: not able to submit subcontracting receipt (backport #41041) (#41045)
fix: not able to submit subcontracting receipt (#41041)

(cherry picked from commit 5b1493b56c)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-04-17 06:37:38 +05:30
mergify[bot]
40d059c7c1 fix: Delayed Order Report not working (backport #41037) (#41039)
fix: Delayed Order Report not working (#41037)

(cherry picked from commit d69a18b826)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-04-16 18:24:38 +05:30
ruthra kumar
52b42dfc14 Merge pull request #41035 from frappe/mergify/bp/version-15-hotfix/pr-40373
fix: get address if multiple companies (backport #40373)
2024-04-16 16:39:39 +05:30
Nihantra C. Patel
dcfc768d33 fix: get address if multiple companies
(cherry picked from commit 655a1797be)
2024-04-16 11:01:58 +00:00
Nihantra Patel
ccdbad9f90 fix: get address if multiple companies
(cherry picked from commit c6cf1bec76)
2024-04-16 11:01:57 +00:00
mergify[bot]
f59e43320b fix: expense account set as COGS for stock entry Material Issue (backport #41026) (#41029)
fix: expense account set as COGS for stock entry Material Issue (#41026)

(cherry picked from commit 03231e99ef)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-04-16 14:22:43 +05:30
ruthra kumar
ec337d3465 Merge pull request #41023 from frappe/mergify/bp/version-15-hotfix/pr-41020
fix: incorrect exc gain/loss for PE against JE for payable accounts (backport #41020)
2024-04-16 11:22:26 +05:30
ruthra kumar
59950290a2 test: exc gain/loss journals booking in Payable accounts
(cherry picked from commit 8821c98625)
2024-04-16 05:29:53 +00:00
ruthra kumar
361d7f1ba5 fix: incorrect exc gain/loss for PE against JE for payable accounts
(cherry picked from commit 81b574053f)
2024-04-16 05:29:52 +00:00
Deepesh Garg
80adafc207 Merge pull request #41017 from frappe/mergify/bp/version-15-hotfix/pr-40812
fix: Multiple partial payment requests against Purchase Invoice (#40812)
2024-04-16 09:35:17 +05:30
Deepesh Garg
641b2a4705 fix: Test case
(cherry picked from commit 071e5ed648)
2024-04-15 16:21:41 +00:00
Deepesh Garg
e287376cc8 fix: Multiple partial payment requests against Purchase Invoice
(cherry picked from commit 45d5f6e00a)
2024-04-15 16:21:41 +00:00
ruthra kumar
21dfb68763 Merge pull request #41009 from frappe/mergify/bp/version-15-hotfix/pr-40714
fix: voucher no. is link field for non english user interface (backport #40714)
2024-04-15 14:26:54 +05:30
“Khushi
1c28ed4d5b fix: voucher no. is link field for non english user interface
(cherry picked from commit 2b8928cae6)
2024-04-15 14:02:33 +05:30
Nabin Hait
10059309da Merge pull request #41005 from frappe/mergify/bp/version-15-hotfix/pr-40858
fix: Don't set delivery date as today while making SO from Quotation (backport #40858)
2024-04-15 13:05:27 +05:30
Nabin Hait
0ee91a2e54 fix: test cases
(cherry picked from commit 65c74fa3c7)
2024-04-15 07:03:39 +00:00
Nabin Hait
fea906b883 fix: Don't set delivery date as today while making SO from Quotation
(cherry picked from commit fec20decc1)
2024-04-15 07:03:38 +00:00
Deepesh Garg
128391be0a Merge pull request #40990 from frappe/mergify/bp/version-15-hotfix/pr-40985
fix: Add payment request to dimension list (#40985)
2024-04-13 16:37:21 +05:30
Frappe PR Bot
2febb2965e chore(release): Bumped to Version 15.20.3
## [15.20.3](https://github.com/frappe/erpnext/compare/v15.20.2...v15.20.3) (2024-04-13)

### Bug Fixes

* do not validate batch qty for LCV (backport [#40975](https://github.com/frappe/erpnext/issues/40975)) (backport [#40981](https://github.com/frappe/erpnext/issues/40981)) ([#40991](https://github.com/frappe/erpnext/issues/40991)) ([7d12674](7d12674430))
* type of transaction validation for the stock entry (backport [#40986](https://github.com/frappe/erpnext/issues/40986)) (backport [#40992](https://github.com/frappe/erpnext/issues/40992)) ([#40994](https://github.com/frappe/erpnext/issues/40994)) ([e07557c](e07557c9c5))
2024-04-13 10:29:03 +00:00
mergify[bot]
e07557c9c5 fix: type of transaction validation for the stock entry (backport #40986) (backport #40992) (#40994)
fix: type of transaction validation for the stock entry (backport #40986) (#40992)

* fix: type of transaction validation for the stock entry

(cherry picked from commit 8ad0295f1b)

* chore: fix test case

---------

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
(cherry picked from commit 4342b891eb)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-04-13 15:57:50 +05:30
mergify[bot]
7d12674430 fix: do not validate batch qty for LCV (backport #40975) (backport #40981) (#40991)
fix: do not validate batch qty for LCV

(cherry picked from commit baf0c83cc5)
(cherry picked from commit 5de9b6ac75)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2024-04-13 15:57:41 +05:30
mergify[bot]
4342b891eb fix: type of transaction validation for the stock entry (backport #40986) (#40992)
* fix: type of transaction validation for the stock entry

(cherry picked from commit 8ad0295f1b)

* chore: fix test case

---------

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2024-04-13 15:30:58 +05:30
ruthra kumar
2d94ea074c chore: patch to setup exiting dimensions in Payment Request
(cherry picked from commit 3f8d785f02)
2024-04-13 04:52:23 +00:00
ruthra kumar
4dbeabc8ef refactor: add payment request to dimension list
(cherry picked from commit e93b4a1f2c)
2024-04-13 04:52:23 +00:00
Frappe PR Bot
7711b13766 chore(release): Bumped to Version 15.20.2
## [15.20.2](https://github.com/frappe/erpnext/compare/v15.20.1...v15.20.2) (2024-04-12)

### Bug Fixes

* Subcontracting Receipt GL Entries (backport [#40773](https://github.com/frappe/erpnext/issues/40773)) (backport [#40979](https://github.com/frappe/erpnext/issues/40979)) ([#40983](https://github.com/frappe/erpnext/issues/40983)) ([3d6ba6f](3d6ba6f21f))
2024-04-12 10:03:02 +00:00
mergify[bot]
3d6ba6f21f fix: Subcontracting Receipt GL Entries (backport #40773) (backport #40979) (#40983)
fix: Subcontracting Receipt GL Entries (backport #40773) (#40979)

* fix: Subcontracting Receipt GL Entries

(cherry picked from commit 9808ae92a4)

# Conflicts:
#	erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py

* chore: `conflicts`

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
(cherry picked from commit 9abc71f9c8)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-04-12 15:31:40 +05:30
mergify[bot]
9abc71f9c8 fix: Subcontracting Receipt GL Entries (backport #40773) (#40979)
* fix: Subcontracting Receipt GL Entries

(cherry picked from commit 9808ae92a4)

# Conflicts:
#	erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py

* chore: `conflicts`

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-04-12 15:15:11 +05:30
rohitwaghchaure
52ee6dcaed Merge pull request #40981 from frappe/mergify/bp/version-15-hotfix/pr-40975
fix: do not validate batch qty for LCV (backport #40975)
2024-04-12 14:52:54 +05:30
Rohit Waghchaure
5de9b6ac75 fix: do not validate batch qty for LCV
(cherry picked from commit baf0c83cc5)
2024-04-12 08:36:12 +00:00
mergify[bot]
14a1a18243 fix(ux): Sales Order Stock Reservation Dialog (backport #40707) (#40980)
fix(ux): Sales Order Stock Reservation Dialog

(cherry picked from commit 5daf19da40)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-04-12 13:28:17 +05:30
ruthra kumar
3762259d3d Merge pull request #40974 from frappe/mergify/bp/version-15-hotfix/pr-40973
fix: Link Validation Error on Dunning cancellation (backport #40973)
2024-04-12 10:44:18 +05:30
ruthra kumar
0053d57ec4 fix: Link Validation Error on Dunning cancellation
(cherry picked from commit 205fd9888c)
2024-04-12 04:57:40 +00:00
Frappe PR Bot
c24d9675e8 chore(release): Bumped to Version 15.20.1
## [15.20.1](https://github.com/frappe/erpnext/compare/v15.20.0...v15.20.1) (2024-04-11)

### Bug Fixes

* landed cost voucher for legacy pr with batch ([83a5284](83a5284ba9))
* zero division error ([72fc083](72fc0836e1))
2024-04-11 13:23:28 +00:00
rohitwaghchaure
e90b60b5cb Merge pull request #40971 from frappe/mergify/bp/version-15/pr-40969
fix: zero division error (backport #40967) (backport #40969)
2024-04-11 18:52:09 +05:30
rohitwaghchaure
5d2ac5b3e9 Merge pull request #40970 from frappe/mergify/bp/version-15/pr-40968
fix: landed cost voucher for legacy pr with batch (backport #40966) (backport #40968)
2024-04-11 18:51:54 +05:30
Rohit Waghchaure
72fc0836e1 fix: zero division error
(cherry picked from commit f9e230e758)
(cherry picked from commit e9c6c5a8eb)
2024-04-11 12:47:35 +00:00
rohitwaghchaure
ea8c57263b Merge pull request #40969 from frappe/mergify/bp/version-15-hotfix/pr-40967
fix: zero division error (backport #40967)
2024-04-11 18:15:36 +05:30
Rohit Waghchaure
83a5284ba9 fix: landed cost voucher for legacy pr with batch
(cherry picked from commit fa91cda46c)
(cherry picked from commit 4e215c6b7b)
2024-04-11 12:31:50 +00:00
rohitwaghchaure
af0679076b Merge pull request #40968 from frappe/mergify/bp/version-15-hotfix/pr-40966
fix: landed cost voucher for legacy pr with batch (backport #40966)
2024-04-11 17:59:36 +05:30
Rohit Waghchaure
e9c6c5a8eb fix: zero division error
(cherry picked from commit f9e230e758)
2024-04-11 12:25:39 +00:00
Rohit Waghchaure
4e215c6b7b fix: landed cost voucher for legacy pr with batch
(cherry picked from commit fa91cda46c)
2024-04-11 12:12:52 +00:00
Frappe PR Bot
04ca25e199 chore(release): Bumped to Version 15.20.0
# [15.20.0](https://github.com/frappe/erpnext/compare/v15.19.2...v15.20.0) (2024-04-11)

### Bug Fixes

* check if there is any existing depreciation schedule ([dcb7e27](dcb7e27a5e))
* Default company bank account ([d8c5f15](d8c5f15bc0))
* depr amount pro rata and related tests ([350d53d](350d53dbe1))
* depr amount pro rata and related tests ([854d4a9](854d4a9c79))
* Don't call get_fiscal_year if setup is not done yet ([9beaf65](9beaf65d19))
* exclude some query builder lines from ruff rules ([41d7c03](41d7c03cbb))
* Fetch outstanding and total amount for reference journal entry ([c72f61e](c72f61ef2f))
* Get default party bank account and company bank account for a party ([1745673](174567350e))
* Get pro-rata amount based on correct days ([1276855](1276855f40))
* Get pro-rata amount based on correct days ([5bf7c79](5bf7c799e2))
* group warehouse added in the stock reconciliation ([e6d6172](e6d6172b4c))
* ignore dimension validation for cancelled entries ([b288c73](b288c73437))
* Ignore permissions while fetching module settings properties ([5e9f31c](5e9f31cf21))
* incorrect currency symbol in General Ledger print ([9f4663b](9f4663b4d0))
* incorrect operator causing incorrect validation ([80c2a33](80c2a33fd7))
* invalid ledger entries on payment against reverse payments ([f3eb559](f3eb559a71))
* linter issues ([8016b0a](8016b0aee7))
* notify update when update outstanding amount ([b10d3c4](b10d3c4da2))
* notify update when update outstanding amount - Linters ([f514819](f51481983d))
* pass empty string email content of pos invoice ([7a9291b](7a9291b3d1))
* pick list validation didn't consider existing draft pick list ([722abf1](722abf1b6b))
* pro-rata amount for straight line method ([16a5475](16a5475c0c))
* query_report.trigger_refresh is not a function ([4f48ede](4f48ede7a0))
* Recalculate sales commission on item update ([5117494](5117494a52))
* Receive payment entry from Employee ([0cee954](0cee954f84))
* resolved merge conflict ([edd143b](edd143b084))
* Show amount in transaction currency in general ledger report ([67bac41](67bac41df4))
* show currency symbol in base currency in fixed asset register report ([7904389](79043894b2))
* Show itemised TDS breakup based on Apply TDS checkbox on item level ([4e3c885](4e3c885808))
* **test:** Advance Received should be under liability account ([4f13f47](4f13f4779a))
* **test:** for reverse payments, only advance acc should have effect ([3668de7](3668de7cb7))
* translatable web footer ([#40834](https://github.com/frappe/erpnext/issues/40834)) ([e8497b2](e8497b2d80))
* **treewide:** manual ruff fixes ([7828eee](7828eee014))
* use 'eq' and isnull() on qb conditions ([2268995](22689958da))
* use reference type name to update exc rate ([5b62f20](5b62f2050b))
* Values in transaciton currency ([3b179ba](3b179bad89))
* workstation refresh after prompt ([9f12c96](9f12c964dc))
* wrong value for total amount in payments ([807def0](807def0f04))

### Features

* ledger health doctype ([5d978c2](5d978c2729))
* new hook `fields_for_group_similar_items` to group additional fields for print formats ([#40831](https://github.com/frappe/erpnext/issues/40831)) ([4ef4466](4ef4466e67))
2024-04-11 07:38:28 +00:00
Nabin Hait
205e7afb9d Merge pull request #40918 from frappe/version-15-hotfix
chore: release v15
2024-04-11 13:07:06 +05:30
Nabin Hait
3b166ea249 Merge pull request #40891 from frappe/mergify/bp/version-15-hotfix/pr-40698
fix: Get pro-rata amount based on correct days (backport #40698)
2024-04-11 11:56:32 +05:30
Nabin Hait
694187b853 Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-40698 2024-04-11 11:53:20 +05:30
Nabin Hait
91fe25356e Merge pull request #40960 from nabinhait/itemised-tds-breakup-v15-hotfix
fix: Show itemised TDS breakup based on Apply TDS checkbox on item level
2024-04-11 11:49:34 +05:30
Nabin Hait
2e35065070 Merge pull request #40961 from nabinhait/permission-issue-v15
fix: Ignore permissions while fetching module settings properties
2024-04-11 11:49:21 +05:30
Nabin Hait
cca7f17b19 Merge pull request #40963 from frappe/revert-40630-mergify/bp/version-15-hotfix/pr-40514
Revert "fix: pass empty string email content of pos invoice (backport #40514)"
2024-04-11 11:48:49 +05:30
Nabin Hait
4591ba063c Revert "fix: pass empty string email content of pos invoice (backport #40514)" 2024-04-11 11:43:59 +05:30
Nabin Hait
5ba9fbcbdb Merge pull request #40953 from frappe/mergify/bp/version-15-hotfix/pr-40916
fix: check if there is any existing depreciation schedule (backport #40916)
2024-04-11 11:32:44 +05:30
Nabin Hait
23d4b01137 Merge pull request #40825 from frappe/mergify/bp/version-15-hotfix/pr-40584
fix: show currency symbol in base currency in fixed asset register report (backport #40584)
2024-04-11 11:30:51 +05:30
Nabin Hait
a93a9122bb Merge pull request #40955 from frappe/mergify/bp/version-15-hotfix/pr-40861
fix: Get default party bank account and company bank account for a party (backport #40861)
2024-04-11 11:29:30 +05:30
Nabin Hait
ac99d8543d Merge pull request #40958 from frappe/mergify/bp/version-15-hotfix/pr-40920
fix: Fetch correct outstanding and total amount for reference journal entry (backport #40920)
2024-04-11 11:28:53 +05:30
Nabin Hait
5e9f31cf21 fix: Ignore permissions while fetching module settings properties 2024-04-11 11:23:19 +05:30
Nabin Hait
4e3c885808 fix: Show itemised TDS breakup based on Apply TDS checkbox on item level 2024-04-11 11:20:38 +05:30
Nabin Hait
711bc3ff1c Merge pull request #40951 from frappe/mergify/bp/version-15-hotfix/pr-40833
fix: wrong value for total amount in payments (backport #40833)
2024-04-11 11:12:07 +05:30
Nabin Hait
c72f61ef2f fix: Fetch outstanding and total amount for reference journal entry
(cherry picked from commit f331f9b15c)
2024-04-11 05:35:43 +00:00
Nabin Hait
174567350e fix: Get default party bank account and company bank account for a party
(cherry picked from commit f87be1d96e)
2024-04-11 05:25:34 +00:00
Nabin Hait
dcb7e27a5e fix: check if there is any existing depreciation schedule
(cherry picked from commit 433c8c450c)
2024-04-11 05:24:08 +00:00
Nabin Hait
959d9c5fda Merge branch 'version-15' into version-15-hotfix 2024-04-11 10:51:32 +05:30
Deepesh Garg
955ffce775 Merge pull request #40630 from frappe/mergify/bp/version-15-hotfix/pr-40514
fix: pass empty string email content of pos invoice (#40514)
2024-04-10 21:36:57 +05:30
Deepesh Garg
6f3a70d35f Merge pull request #40697 from frappe/mergify/bp/version-15-hotfix/pr-40641
chore: Reduce usage of cur_frm (#40641)
2024-04-10 21:35:08 +05:30
mergify[bot]
0ec1f01b00 Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-40584 2024-04-10 15:57:49 +00:00
HarryPaulo
807def0f04 fix: wrong value for total amount in payments
(cherry picked from commit bf88b8eb65)
2024-04-10 15:57:11 +00:00
Deepesh Garg
87e30a2981 Merge pull request #40950 from frappe/mergify/bp/version-15-hotfix/pr-40863
fix: Show amount in transaction currency in general ledger report (#40863)
2024-04-10 21:24:39 +05:30
Deepesh Garg
0e1c7e8788 Merge pull request #40946 from frappe/mergify/bp/version-15-hotfix/pr-40844
fix: notify update when update outstanding amount (#40844)
2024-04-10 21:22:42 +05:30
Deepesh Garg
21454e4dfb Merge pull request #40948 from frappe/mergify/bp/version-15-hotfix/pr-40931
fix: Don't call get_fiscal_year if setup is not done yet (backport #40931)
2024-04-10 21:22:22 +05:30
Deepesh Garg
18700c26f9 Merge pull request #40945 from frappe/mergify/bp/version-15-hotfix/pr-40849
fix: Values in transaction currency (backport #40849)
2024-04-10 21:22:06 +05:30
Nabin Hait
67bac41df4 fix: Show amount in transaction currency in general ledger report
(cherry picked from commit d868122f12)
2024-04-10 15:26:25 +00:00
Corentin Flr
9beaf65d19 fix: Don't call get_fiscal_year if setup is not done yet
(cherry picked from commit c203fafb1b)
2024-04-10 15:18:26 +00:00
HarryPaulo
f51481983d fix: notify update when update outstanding amount - Linters
(cherry picked from commit 198b90eb01)
2024-04-10 15:17:17 +00:00
HarryPaulo
b10d3c4da2 fix: notify update when update outstanding amount
(cherry picked from commit f67f163e7d)
2024-04-10 15:17:16 +00:00
Deepesh Garg
3b179bad89 fix: Values in transaciton currency
(cherry picked from commit a3c9fd6567)
2024-04-10 15:16:39 +00:00
Akhil Narang
29e3a400f9 Merge pull request #40935 from akhilnarang/v15-ruff
chore: backport ruff linting/formatting
2024-04-10 16:36:13 +05:30
Akhil Narang
3141a1702c chore: gitignore ruff format
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-10 16:11:12 +05:30
ruthra kumar
22689958da fix: use 'eq' and isnull() on qb conditions
(cherry picked from commit eee86d2e4b)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-10 16:11:12 +05:30
Akhil Narang
41d7c03cbb fix: exclude some query builder lines from ruff rules
`== None` and `== True` are intentional here

(cherry picked from commit ac69513f60)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-10 16:11:10 +05:30
Akhil Narang
7828eee014 fix(treewide): manual ruff fixes
(cherry picked from commit f63396ef47)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-10 16:11:10 +05:30
ruthra kumar
9b1e36ebf0 Merge pull request #40938 from frappe/mergify/bp/version-15-hotfix/pr-40936
fix: ignore dimension validation for cancelled entries (backport #40936)
2024-04-10 15:28:16 +05:30
Akhil Narang
960ef14b7a refactor(treewide): formatting and ruff fixes, + manually enabled F401
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-10 14:15:58 +05:30
ruthra kumar
b288c73437 fix: ignore dimension validation for cancelled entries
(cherry picked from commit 971c867f29)
2024-04-10 08:29:25 +00:00
barredterra
9eeedd8515 chore: switch to ruff for python formatting/linting
(cherry picked from commit 8afb7790de)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-10 13:10:19 +05:30
ruthra kumar
0f58a3918a Merge pull request #40930 from frappe/mergify/bp/version-15-hotfix/pr-40695
feat: Periodically monitor ledger health (backport #40695)
2024-04-09 20:00:23 +05:30
ruthra kumar
501c88ca3a Merge pull request #40928 from frappe/mergify/bp/version-15-hotfix/pr-40926
fix: incorrect currency symbol in General Ledger print (backport #40926)
2024-04-09 19:54:48 +05:30
ruthra kumar
b22784878f chore: use super() instead of super(__class__, self)
(cherry picked from commit 24d37d22a3)
2024-04-09 12:25:56 +00:00
ruthra kumar
d8f627a9d7 chore: make ledger health doctype read_only
(cherry picked from commit dc79213bb3)
2024-04-09 12:25:55 +00:00
ruthra kumar
711a6eaaaf test: ledger monitoring function
(cherry picked from commit 4776d660b5)
2024-04-09 12:25:55 +00:00
ruthra kumar
9834e3ab7f chore: schedule job to run daily
(cherry picked from commit f96cf111ed)
2024-04-09 12:25:55 +00:00
ruthra kumar
a331eadf29 chore: permission and UI changes
(cherry picked from commit 1a43ed763b)
2024-04-09 12:25:55 +00:00
ruthra kumar
bf0cfae9c9 refactor: only run checks on specified companies
(cherry picked from commit 00eeacd06a)
2024-04-09 12:25:54 +00:00
ruthra kumar
522cfd0c9a refactor: make health check configurable for companies
(cherry picked from commit 704925549b)
2024-04-09 12:25:54 +00:00
ruthra kumar
9bae5e37cd refactor: control monitoring through settings page
(cherry picked from commit a42482ce35)
2024-04-09 12:25:53 +00:00
ruthra kumar
9fbb4f676b chore: settings page for health monitor
(cherry picked from commit b2fb7843d1)
2024-04-09 12:25:53 +00:00
ruthra kumar
0f927f99a4 refactor: barebones method to run checks
(cherry picked from commit 8c8d9be810)
2024-04-09 12:25:53 +00:00
ruthra kumar
6bf997ee96 refactor: flag for general and payment ledger mismatch
(cherry picked from commit d620b9eae8)
2024-04-09 12:25:52 +00:00
ruthra kumar
b8bcae9252 refactor: date on which vouchers was reported
(cherry picked from commit 402ffc6d27)
2024-04-09 12:25:51 +00:00
ruthra kumar
5d978c2729 feat: ledger health doctype
(cherry picked from commit 9ed74dd8cc)
2024-04-09 12:25:51 +00:00
ruthra kumar
9f4663b4d0 fix: incorrect currency symbol in General Ledger print
(cherry picked from commit 429e036e8c)
2024-04-09 12:16:47 +00:00
rohitwaghchaure
8cc5b99986 Merge pull request #40922 from frappe/mergify/bp/version-15-hotfix/pr-40909
fix: pick list validation didn't consider existing draft pick list (backport #40909)
2024-04-09 17:28:18 +05:30
rohitwaghchaure
7a0e313895 chore: fix conflicts 2024-04-09 16:57:02 +05:30
Rohit Waghchaure
722abf1b6b fix: pick list validation didn't consider existing draft pick list
(cherry picked from commit 3bce4d92f6)

# Conflicts:
#	erpnext/stock/doctype/pick_list/pick_list.py
2024-04-09 11:25:22 +00:00
Sagar Vora
566d4fa76e Merge pull request #40907 from frappe/mergify/bp/version-15-hotfix/pr-40831 2024-04-08 10:19:31 +00:00
Smit Vora
4ef4466e67 feat: new hook fields_for_group_similar_items to group additional fields for print formats (#40831)
(cherry picked from commit f7c9e1538b)
2024-04-08 10:18:24 +00:00
ruthra kumar
6cefe45e5b Merge pull request #40905 from frappe/mergify/bp/version-15-hotfix/pr-40878
refactor: merge taxes from delivery note to Sales Invoice (backport #40878)
2024-04-08 15:47:11 +05:30
ruthra kumar
d4a74923c1 test: tax merging from 2 Delivery Note to Sales Invoice
(cherry picked from commit 39a48a2e2a)
2024-04-08 09:09:46 +00:00
ruthra kumar
e9b87fdd42 refactor: merge taxes from delivery note to Sales Invoice
(cherry picked from commit 550cbbd91c)
2024-04-08 09:09:46 +00:00
ruthra kumar
7f790ca908 Merge pull request #40903 from frappe/mergify/bp/version-15-hotfix/pr-40876
fix: ledger entries for Payment against reverse payment reconciliation (backport #40876)
2024-04-08 09:11:33 +05:30
ruthra kumar
2373dd9b95 chore: resolve conflicts 2024-04-08 08:52:41 +05:30
ruthra kumar
67df5ae0ec refactor(test): include new fields in assertion
(cherry picked from commit 64b7f624a5)
2024-04-08 01:59:13 +00:00
ruthra kumar
7c0d46409f test: advance payment against reverse payment reconciliation
(cherry picked from commit 141f462368)
2024-04-08 01:59:13 +00:00
ruthra kumar
4ad423b1b9 test: reverse payment against payment for supplier
(cherry picked from commit 248cc6105b)
2024-04-08 01:59:12 +00:00
ruthra kumar
3668de7cb7 fix(test): for reverse payments, only advance acc should have effect
This applies for Payments against Reverse-Payment reconcilition

(cherry picked from commit 74bc38e0af)
2024-04-08 01:59:12 +00:00
ruthra kumar
d9826e3dfc refactor: supplementary field to better handle reverse payments
(cherry picked from commit bdd36b0001)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json
2024-04-08 01:59:12 +00:00
ruthra kumar
f3eb559a71 fix: invalid ledger entries on payment against reverse payments
On Advance payments booked on separate party account, reconciliation
against a reverse payment posted invalid ledger entries.

(cherry picked from commit 9fd2dddfde)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.py
2024-04-08 01:59:11 +00:00
ruthra kumar
4f13f4779a fix(test): Advance Received should be under liability account
(cherry picked from commit a75e095d00)
2024-04-08 01:59:10 +00:00
Frappe PR Bot
3566a8adc6 chore(release): Bumped to Version 15.19.2
## [15.19.2](https://github.com/frappe/erpnext/compare/v15.19.1...v15.19.2) (2024-04-07)

### Bug Fixes

* depr amount pro rata and related tests ([e41d23d](e41d23d26c))
* Get pro-rata amount based on correct days ([f229282](f229282754))
* pro-rata amount for straight line method ([e71f334](e71f33425c))
2024-04-07 10:40:27 +00:00
Nabin Hait
7fdc8f7c38 Merge pull request #40902 from frappe/mergify/bp/version-15/pr-40901
fix: Get pro-rata depreciation amount based on correct days (backport #40901)
2024-04-07 16:09:14 +05:30
Nabin Hait
e71f33425c fix: pro-rata amount for straight line method
(cherry picked from commit 16a5475c0c)
2024-04-07 10:14:39 +00:00
Nabin Hait
6ddd08d0b0 fix:linter issue
(cherry picked from commit 8247fd1727)
2024-04-07 10:14:39 +00:00
Nabin Hait
e41d23d26c fix: depr amount pro rata and related tests
(cherry picked from commit 350d53dbe1)
2024-04-07 10:14:39 +00:00
Nabin Hait
f229282754 fix: Get pro-rata amount based on correct days
(cherry picked from commit 1276855f40)
2024-04-07 10:14:38 +00:00
Nabin Hait
77fd0436a8 Merge pull request #40901 from nabinhait/pro-rata-depr-v15
fix: Get pro-rata depreciation amount based on correct days
2024-04-07 15:43:32 +05:30
Nabin Hait
16a5475c0c fix: pro-rata amount for straight line method 2024-04-07 15:21:46 +05:30
Nabin Hait
8247fd1727 fix:linter issue 2024-04-07 15:18:29 +05:30
rohitwaghchaure
159d633a62 Merge pull request #40836 from frappe/mergify/bp/version-15-hotfix/pr-40834
fix: translatable web footer (backport #40834)
2024-04-07 14:36:03 +05:30
rohitwaghchaure
99a57e689d Merge pull request #40860 from frappe/mergify/bp/version-15-hotfix/pr-40848
fix: group warehouse added in the stock reconciliation (backport #40848)
2024-04-07 14:34:58 +05:30
rohitwaghchaure
97bf4a829a Merge pull request #40894 from frappe/mergify/bp/version-15-hotfix/pr-40883
fix: incorrect operator causing incorrect validation (backport #40883)
2024-04-07 14:33:43 +05:30
Nabin Hait
350d53dbe1 fix: depr amount pro rata and related tests 2024-04-07 14:14:13 +05:30
Nabin Hait
1276855f40 fix: Get pro-rata amount based on correct days 2024-04-07 14:14:06 +05:30
Nabin Hait
edd143b084 fix: resolved merge conflict 2024-04-07 12:15:52 +05:30
Rohit Waghchaure
80c2a33fd7 fix: incorrect operator causing incorrect validation
(cherry picked from commit 6b317b0c0d)
2024-04-07 06:34:23 +00:00
rohitwaghchaure
25e0a808cd Merge pull request #40889 from frappe/mergify/bp/version-15-hotfix/pr-40887
fix: query_report.trigger_refresh is not a function (backport #40887)
2024-04-07 12:02:46 +05:30
Nabin Hait
0cd94b017f fix:linter issue
(cherry picked from commit be0cb5289f)

# Conflicts:
#	erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py
2024-04-07 06:32:22 +00:00
Nabin Hait
854d4a9c79 fix: depr amount pro rata and related tests
(cherry picked from commit e8dcbe2625)
2024-04-07 06:32:22 +00:00
Nabin Hait
5bf7c799e2 fix: Get pro-rata amount based on correct days
(cherry picked from commit 6c1e9fab27)
2024-04-07 06:32:22 +00:00
Rohit Waghchaure
4f48ede7a0 fix: query_report.trigger_refresh is not a function
(cherry picked from commit 30bbb58ca1)
2024-04-07 06:27:51 +00:00
ruthra kumar
0532b1fd94 Merge pull request #40869 from frappe/mergify/bp/version-15-hotfix/pr-40856
fix: unwanted Exc Gain/Loss journals on Payment against Journal entry (backport #40856)
2024-04-05 10:52:43 +05:30
ruthra kumar
4b78eb7e76 test: payment against JE reconciliation with different rates
(cherry picked from commit fe84558b77)
2024-04-05 05:04:02 +00:00
ruthra kumar
5b62f2050b fix: use reference type name to update exc rate
(cherry picked from commit c15690e475)
2024-04-05 05:04:02 +00:00
Rohit Waghchaure
e6d6172b4c fix: group warehouse added in the stock reconciliation
(cherry picked from commit 8f53bc0096)
2024-04-04 10:10:24 +00:00
Deepesh Garg
91f689575e Merge pull request #40810 from frappe/mergify/bp/version-15-hotfix/pr-40796
fix: Default company bank account (#40796)
2024-04-04 14:28:07 +05:30
Frappe PR Bot
dc0c85a227 chore(release): Bumped to Version 15.19.1
## [15.19.1](https://github.com/frappe/erpnext/compare/v15.19.0...v15.19.1) (2024-04-04)

### Bug Fixes

* Receive payment entry from Employee ([3e7abf5](3e7abf5fe5))
2024-04-04 08:57:45 +00:00
Deepesh Garg
5c5a0c965d Merge pull request #40809 from frappe/mergify/bp/version-15-hotfix/pr-40770
fix: Recalculate sales commission on item update (#40770)
2024-04-04 14:27:40 +05:30
Deepesh Garg
162b6bf50b Merge pull request #40855 from frappe/mergify/bp/version-15/pr-40808
fix: Receive payment entry from Employee (#40755)
2024-04-04 14:26:36 +05:30
Deepesh Garg
3e7abf5fe5 fix: Receive payment entry from Employee
(cherry picked from commit 29e5c6807e)
(cherry picked from commit 0cee954f84)
2024-04-04 08:55:02 +00:00
Deepesh Garg
7131e7836d Merge pull request #40808 from frappe/mergify/bp/version-15-hotfix/pr-40755
fix: Receive payment entry from Employee (#40755)
2024-04-04 14:24:13 +05:30
rohitwaghchaure
806a802daa Merge pull request #40853 from frappe/mergify/bp/version-15-hotfix/pr-40852
fix: workstation refresh after prompt (backport #40852)
2024-04-04 12:07:47 +05:30
Nihantra C. Patel
9f12c964dc fix: workstation refresh after prompt
(cherry picked from commit bed1af26e3)
2024-04-04 06:21:36 +00:00
Frappe PR Bot
f78df8dccb chore(release): Bumped to Version 15.19.0
# [15.19.0](https://github.com/frappe/erpnext/compare/v15.18.3...v15.19.0) (2024-04-03)

### Bug Fixes

* added validation if parent id is missing in BOM Creator ([87ce9d8](87ce9d834f))
* barcode not fetched on selection of item ([2b1b51b](2b1b51b5bb))
* button to select serial / batch bundle in the subcontracting receipt ([d2a6509](d2a6509950))
* cost center shouldn't update debit/credit in Exc gain/loss JV ([71704be](71704beb6f))
* do not fetch received items in purchase receipt ([3761e74](3761e74436))
* enable list view for the issues on the portal ([b089eda](b089eda8bf))
* markdown to text editor set for supplier quotation ([5fb6428](5fb642831c))
* payment_order_status should be no_copy ([2dd697e](2dd697ee77))
* Priority not copied from project template ([a3a6bf6](a3a6bf6ae1))
* rate changed on changing of the qty ([41b3a59](41b3a59aae))
* sales / prchase return validation issue ([7a21997](7a21997701))
* show future payments allocated sales returns is considered as payment ([0561d0a](0561d0a81c))
* Show Stock Ageing Data filter not working in stock balance report ([2185a29](2185a29555))
* Warehouse linked company name in multicompany setup (backport [#40779](https://github.com/frappe/erpnext/issues/40779)) ([#40781](https://github.com/frappe/erpnext/issues/40781)) ([33b6244](33b6244ae6))

### Features

* allow to pick manually qty / batches / serial nos ([5ea11af](5ea11af36b))
2024-04-03 10:32:58 +00:00
Deepesh Garg
955078abb0 Merge pull request #40820 from frappe/version-15-hotfix
chore: release v15
2024-04-03 16:01:44 +05:30
rohitwaghchaure
405719cd3d Merge pull request #40838 from frappe/mergify/bp/version-15-hotfix/pr-40723
feat: allow to pick manually qty / batches / serial nos (backport #40723)
2024-04-02 22:55:34 +05:30
rohitwaghchaure
52c4157723 chore: fix conflicts 2024-04-02 22:23:22 +05:30
Rohit Waghchaure
5ea11af36b feat: allow to pick manually qty / batches / serial nos
(cherry picked from commit 50dd9fa8a3)

# Conflicts:
#	erpnext/stock/doctype/pick_list/pick_list.json
2024-04-02 16:45:23 +00:00
Raffael Meyer
e8497b2d80 fix: translatable web footer (#40834)
(cherry picked from commit f3bcdbe5bd)
2024-04-02 15:16:15 +00:00
rohitwaghchaure
d3044e635e Merge pull request #40832 from frappe/mergify/bp/version-15-hotfix/pr-40828
chore: remove rate of material based on Manual (backport #40828)
2024-04-02 19:41:04 +05:30
rohitwaghchaure
ca6caa86bc chore: fix conflicts 2024-04-02 19:18:02 +05:30
rohitwaghchaure
152921b82a chore: fix conflicts 2024-04-02 19:17:41 +05:30
Rohit Waghchaure
ecc317d690 chore: remove rate of material based on Manual
(cherry picked from commit 0b63dbf221)

# Conflicts:
#	erpnext/manufacturing/doctype/bom/bom.json
#	erpnext/manufacturing/doctype/bom_creator/bom_creator.json
2024-04-02 12:42:22 +00:00
Nabin Hait
8016b0aee7 fix: linter issues
(cherry picked from commit 21a40a2236)
2024-04-02 10:27:55 +00:00
Nabin Hait
79043894b2 fix: show currency symbol in base currency in fixed asset register report
(cherry picked from commit 8b6220efd8)
2024-04-02 10:27:55 +00:00
rohitwaghchaure
6607e6b2c3 Merge pull request #40822 from frappe/mergify/bp/version-15-hotfix/pr-40816
fix: added validation if parent id is missing in BOM Creator (backport #40816)
2024-04-02 15:37:29 +05:30
Rohit Waghchaure
87ce9d834f fix: added validation if parent id is missing in BOM Creator
(cherry picked from commit 0a1fab762f)
2024-04-02 09:43:37 +00:00
rohitwaghchaure
204aea856d Merge pull request #40817 from frappe/mergify/bp/version-15-hotfix/pr-40814
fix: barcode not fetched on selection of item (backport #40814)
2024-04-02 14:22:58 +05:30
Rohit Waghchaure
2b1b51b5bb fix: barcode not fetched on selection of item
(cherry picked from commit b0730293e2)
2024-04-02 05:52:11 +00:00
Deepesh Garg
d8c5f15bc0 fix: Default company bank account
(cherry picked from commit 7ac91deb83)
2024-04-01 15:09:57 +00:00
Deepesh Garg
5117494a52 fix: Recalculate sales commission on item update
(cherry picked from commit f76da50b7e)
2024-04-01 15:09:05 +00:00
Deepesh Garg
0cee954f84 fix: Receive payment entry from Employee
(cherry picked from commit 29e5c6807e)
2024-04-01 15:08:35 +00:00
rohitwaghchaure
3971ff5f72 Merge pull request #40806 from frappe/mergify/bp/version-15-hotfix/pr-40735
fix: Show Stock Ageing Data filter not working in stock balance report (backport #40735)
2024-04-01 19:47:20 +05:30
rohitwaghchaure
f32de045e3 chore: fix conflicts 2024-04-01 18:53:04 +05:30
Rohit Waghchaure
2185a29555 fix: Show Stock Ageing Data filter not working in stock balance report
(cherry picked from commit 621421bda2)

# Conflicts:
#	erpnext/stock/report/stock_ageing/stock_ageing.py
2024-04-01 11:25:46 +00:00
ruthra kumar
d12f89cdb2 Merge pull request #40804 from frappe/mergify/bp/version-15-hotfix/pr-40181
fix: show future payments consider allocated sales returns (backport #40181)
2024-04-01 14:13:50 +05:30
Devin Slauenwhite
0561d0a81c fix: show future payments allocated sales returns is considered as payment
(cherry picked from commit 3381d0d945)
2024-04-01 07:34:45 +00:00
Devin Slauenwhite
ed4c6ef1a7 test: show future payments allocated sales returns is considered as payment
(cherry picked from commit daaa00bd4a)
2024-04-01 07:34:44 +00:00
rohitwaghchaure
ec91148672 Merge pull request #40738 from frappe/mergify/bp/version-15-hotfix/pr-40731
fix: markdown to text editor set for supplier quotation (backport #40731)
2024-03-31 21:14:15 +05:30
rohitwaghchaure
458d82aff2 Merge pull request #40784 from frappe/mergify/bp/version-15-hotfix/pr-40783
fix: button to select serial / batch bundle in the subcontracting receipt (backport #40783)
2024-03-31 21:13:45 +05:30
rohitwaghchaure
390b4986f9 chore: fix conflicts 2024-03-31 11:41:00 +05:30
rohitwaghchaure
6ecafe7606 chore: fix linter issue 2024-03-31 11:39:55 +05:30
rohitwaghchaure
04da610288 chore: fix conflicts 2024-03-30 20:05:21 +05:30
rohitwaghchaure
b397535392 chore: fix conflicts 2024-03-30 20:04:53 +05:30
Rohit Waghchaure
d2a6509950 fix: button to select serial / batch bundle in the subcontracting receipt
(cherry picked from commit d73b1f3e6a)

# Conflicts:
#	erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json
#	erpnext/subcontracting/doctype/subcontracting_receipt_supplied_item/subcontracting_receipt_supplied_item.json
2024-03-30 05:54:14 +00:00
mergify[bot]
33b6244ae6 fix: Warehouse linked company name in multicompany setup (backport #40779) (#40781)
fix: Warehouse linked company name in multicompany setup (#40779)

(cherry picked from commit 679aea607b)

Co-authored-by: jeshani <56191568+jeshani@users.noreply.github.com>
2024-03-30 10:18:33 +05:30
Frappe PR Bot
8ab26cd76d chore(release): Bumped to Version 15.18.3
## [15.18.3](https://github.com/frappe/erpnext/compare/v15.18.2...v15.18.3) (2024-03-29)

### Bug Fixes

* sales / prchase return validation issue ([2eac2ef](2eac2ef69f))
2024-03-29 19:09:53 +00:00
rohitwaghchaure
3a380245c6 Merge pull request #40765 from frappe/mergify/bp/version-15/pr-40761
chore: show item name in the validation message (backport #40757) (backport #40761)
2024-03-30 00:38:40 +05:30
rohitwaghchaure
8cde784383 Merge pull request #40759 from frappe/mergify/bp/version-15/pr-40746
fix: sales / purchase return validation issue (backport #40741) (backport #40746)
2024-03-30 00:38:32 +05:30
ruthra kumar
8ef0a66d3e Merge pull request #40767 from frappe/mergify/bp/version-15-hotfix/pr-40758
fix: payment_order_status should be no_copy (backport #40758)
2024-03-29 13:49:16 +05:30
Ashish Shah
2dd697ee77 fix: payment_order_status should be no_copy
payment_order_status should be no_copy

(cherry picked from commit adee2ba541)
2024-03-29 07:57:04 +00:00
Rohit Waghchaure
a8ac196cde chore: show item name in the validation message
(cherry picked from commit d05412f96a)
(cherry picked from commit 0b4b0874f4)
2024-03-29 07:56:05 +00:00
rohitwaghchaure
bd7467a812 Merge pull request #40761 from frappe/mergify/bp/version-15-hotfix/pr-40757
chore: show item name in the validation message (backport #40757)
2024-03-29 13:24:18 +05:30
ruthra kumar
babcc420cc Merge pull request #40763 from frappe/mergify/bp/version-15-hotfix/pr-40760
fix: cost center shouldn't update debit/credit in Exc gain/loss JV (backport #40760)
2024-03-29 11:46:56 +05:30
ruthra kumar
71704beb6f fix: cost center shouldn't update debit/credit in Exc gain/loss JV
(cherry picked from commit 398d3022ef)
2024-03-29 06:13:51 +00:00
Rohit Waghchaure
0b4b0874f4 chore: show item name in the validation message
(cherry picked from commit d05412f96a)
2024-03-29 06:06:54 +00:00
Frappe PR Bot
6077cd8160 chore(release): Bumped to Version 15.18.2
## [15.18.2](https://github.com/frappe/erpnext/compare/v15.18.1...v15.18.2) (2024-03-29)

### Bug Fixes

* use sql to clear comments ([e2196ef](e2196efe1a))
2024-03-29 05:41:25 +00:00
ruthra kumar
aa4998a3b5 Merge pull request #40748 from frappe/mergify/bp/version-15/pr-40739
refactor: use sql to clear comments (backport #40739)
2024-03-29 11:10:07 +05:30
Rohit Waghchaure
2eac2ef69f fix: sales / prchase return validation issue
(cherry picked from commit 59dc4a96e1)
(cherry picked from commit 7a21997701)
2024-03-29 05:28:31 +00:00
ruthra kumar
e2196efe1a fix: use sql to clear comments
(cherry picked from commit 1f46c1530e)
2024-03-29 10:49:33 +05:30
rohitwaghchaure
0eb908e950 Merge pull request #40756 from frappe/mergify/bp/version-15-hotfix/pr-40752
chore: allow to override serial batch selector using custom app (backport #40752)
2024-03-29 09:15:37 +05:30
Rohit Waghchaure
8ca4f63572 chore: allow to override serial batch selector
(cherry picked from commit 0d9d42ae61)
2024-03-29 03:41:49 +00:00
Deepesh Garg
3c3b08f517 Merge pull request #40750 from frappe/mergify/bp/version-15/pr-40742
refactor: configurable exchange gain or loss posting date (#37630)
2024-03-28 22:12:29 +05:30
ruthra kumar
0247d5c87f chore: resolve conflicts
(cherry picked from commit 565bfa16f2)
2024-03-28 15:26:55 +00:00
ruthra kumar
ba4d1bc1a4 test: varying posting date for gain loss journal
(cherry picked from commit 514d5434a3)
(cherry picked from commit fd33437d7a)
2024-03-28 15:26:54 +00:00
ruthra kumar
22d352e875 refactor: pass gain loss posting date to controller
(cherry picked from commit 7e600a6494)

# Conflicts:
#	erpnext/accounts/utils.py
(cherry picked from commit 125722ae41)
2024-03-28 15:26:54 +00:00
ruthra kumar
63c3f51ffa refactor: introduce fields in popup
(cherry picked from commit 5323bb7bee)

# Conflicts:
#	erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
(cherry picked from commit 39571d828e)
2024-03-28 15:26:54 +00:00
ruthra kumar
efd40772ee refactor: gain_loss posting date fields in the allocation table
(cherry picked from commit 55dbcee36a)

# Conflicts:
#	erpnext/accounts/doctype/payment_reconciliation_allocation/payment_reconciliation_allocation.json
(cherry picked from commit 1fe80c2d02)
2024-03-28 15:26:53 +00:00
rohitwaghchaure
fb67648c68 Merge pull request #40746 from frappe/mergify/bp/version-15-hotfix/pr-40741
fix: sales / purchase return validation issue (backport #40741)
2024-03-28 18:10:42 +05:30
ruthra kumar
3d61086ac0 Merge pull request #40745 from frappe/mergify/bp/version-15-hotfix/pr-40739
refactor: use sql to clear comments (backport #40739)
2024-03-28 17:57:14 +05:30
Rohit Waghchaure
7a21997701 fix: sales / prchase return validation issue
(cherry picked from commit 59dc4a96e1)
2024-03-28 12:24:15 +00:00
Deepesh Garg
f2ecc1d2d5 Merge pull request #40742 from frappe/mergify/bp/version-15-hotfix/pr-37630
refactor: configurable exchange gain or loss posting date (#37630)
2024-03-28 17:46:30 +05:30
ruthra kumar
f50a2586b6 refactor: use sql to clear comments
(cherry picked from commit 1f46c1530e)
2024-03-28 12:12:17 +00:00
ruthra kumar
565bfa16f2 chore: resolve conflicts 2024-03-28 17:22:53 +05:30
ruthra kumar
fd33437d7a test: varying posting date for gain loss journal
(cherry picked from commit 514d5434a3)
2024-03-28 10:59:24 +00:00
ruthra kumar
125722ae41 refactor: pass gain loss posting date to controller
(cherry picked from commit 7e600a6494)

# Conflicts:
#	erpnext/accounts/utils.py
2024-03-28 10:59:24 +00:00
ruthra kumar
39571d828e refactor: introduce fields in popup
(cherry picked from commit 5323bb7bee)

# Conflicts:
#	erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
2024-03-28 10:59:23 +00:00
ruthra kumar
1fe80c2d02 refactor: gain_loss posting date fields in the allocation table
(cherry picked from commit 55dbcee36a)

# Conflicts:
#	erpnext/accounts/doctype/payment_reconciliation_allocation/payment_reconciliation_allocation.json
2024-03-28 10:59:22 +00:00
Nihantra Patel
5fb642831c fix: markdown to text editor set for supplier quotation
(cherry picked from commit 9828d34b19)

# Conflicts:
#	erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
2024-03-28 07:16:15 +00:00
rohitwaghchaure
beb8807b2e Merge pull request #40733 from frappe/mergify/bp/version-15-hotfix/pr-40713
fix: enable list view for the issues on the portal (backport #40713)
2024-03-28 12:11:21 +05:30
Rohit Waghchaure
b089eda8bf fix: enable list view for the issues on the portal
(cherry picked from commit bddc1e3974)
2024-03-28 05:38:12 +00:00
rohitwaghchaure
5f125c5e2f Merge pull request #40722 from frappe/mergify/bp/version-15-hotfix/pr-40718
fix: do not fetch received items in purchase receipt (backport #40718)
2024-03-27 22:59:38 +05:30
Rohit Waghchaure
3761e74436 fix: do not fetch received items in purchase receipt
(cherry picked from commit 5bff434902)
2024-03-27 17:11:25 +00:00
rohitwaghchaure
b7525263ff Merge pull request #40711 from frappe/mergify/bp/version-15-hotfix/pr-40708
fix: Priority not copied from project template (backport #40708)
2024-03-27 16:18:26 +05:30
Rohit Waghchaure
a3a6bf6ae1 fix: Priority not copied from project template
(cherry picked from commit 33fd7b8a1f)
2024-03-27 10:18:20 +00:00
Frappe PR Bot
ca3827efea chore(release): Bumped to Version 15.18.1
## [15.18.1](https://github.com/frappe/erpnext/compare/v15.18.0...v15.18.1) (2024-03-27)

### Bug Fixes

* rate changed on changing of the qty ([471f1c8](471f1c835c))
2024-03-27 08:37:31 +00:00
rohitwaghchaure
d2584dd3e8 Merge pull request #40704 from frappe/mergify/bp/version-15/pr-40703
fix: rate changed on changing of the qty (backport #40700) (backport #40703)
2024-03-27 14:06:20 +05:30
Rohit Waghchaure
471f1c835c fix: rate changed on changing of the qty
(cherry picked from commit cd36a1051f)
(cherry picked from commit 41b3a59aae)
2024-03-27 08:24:00 +00:00
rohitwaghchaure
ac4b7f20ca Merge pull request #40703 from frappe/mergify/bp/version-15-hotfix/pr-40700
fix: rate changed on changing of the qty (backport #40700)
2024-03-27 13:52:54 +05:30
Rohit Waghchaure
41b3a59aae fix: rate changed on changing of the qty
(cherry picked from commit cd36a1051f)
2024-03-27 08:07:18 +00:00
Deepesh Garg
c1b9ad2f3a chore: Reduce usage of cur_frm
(cherry picked from commit e44809bcc9)
2024-03-27 06:16:31 +00:00
Frappe PR Bot
70ce49e32c chore(release): Bumped to Version 15.18.0
# [15.18.0](https://github.com/frappe/erpnext/compare/v15.17.6...v15.18.0) (2024-03-27)

### Bug Fixes

* Add default finance book check in P&L statement ([f087159](f08715972a))
* Batch No is mandatory while making manufacture entry ([a638c9c](a638c9c8af))
* Book depreciation until the asset disposal date and removed unwanted commits ([2d7ff5d](2d7ff5d4cf))
* Cannot read properties of undefined (reading 'rate') ([d287ed5](d287ed5e47))
* existing batch from different warehouse not showing in the dropdown ([79d0478](79d047802a))
* incorrect total qty in job card ([68d57c3](68d57c3947))
* item not coming in quick entry ([008894d](008894d32b))
* permissions during bulk transaction logs ([6e6ca42](6e6ca42261))
* pick list not picked qty less than 1 ([5310ec3](5310ec38ca))
* rate not fetching from the item price ([fd02060](fd02060cd2))
* rate reset to zero ([4636ef0](4636ef0a29))
* remove faulty translation ([#40667](https://github.com/frappe/erpnext/issues/40667)) ([afa930f](afa930ff48))
* style for tax breakup ([501b09a](501b09a170))
* translatability of bom configurator labels ([cf49cec](cf49cec203))
* Turkish translations ([#40650](https://github.com/frappe/erpnext/issues/40650)) ([17a0876](17a087663b))
* use serial/batch fields for subcontracting receipt and in transit stock entry ([9ec24bc](9ec24bcc6c))
* use Text Editor for rendering tax breakup table ([a95bb27](a95bb27c65))
* validate gl for previous fiscal year ([4b973b2](4b973b2f86))
* validation error for the subcontracting receipt ([23ae82d](23ae82d282))
* wrong buying amount if delivered and billed qty varies ([c224240](c2242406f4))

### Features

* bisect doctype ([884a18f](884a18f8f1))
* nodes doctype ([bfccfa4](bfccfa4af1))

### Performance Improvements

* add in some indexes (backport [#40590](https://github.com/frappe/erpnext/issues/40590)) ([#40605](https://github.com/frappe/erpnext/issues/40605)) ([f66cf7d](f66cf7d838))
2024-03-27 03:27:37 +00:00
Deepesh Garg
d09821e1e1 Merge pull request #40678 from frappe/version-15-hotfix
chore: release v15
2024-03-27 08:56:26 +05:30
rohitwaghchaure
b6ac3e7d08 Merge pull request #40689 from frappe/mergify/bp/version-15-hotfix/pr-40685
fix: validation error for the subcontracting receipt (backport #40685)
2024-03-27 08:04:58 +05:30
Raffael Meyer
afa930ff48 fix: remove faulty translation (#40667) 2024-03-27 00:21:16 +01:00
Rohit Waghchaure
23ae82d282 fix: validation error for the subcontracting receipt
(cherry picked from commit 016585c248)
2024-03-26 14:27:36 +00:00
rohitwaghchaure
ad8961030e Merge pull request #40688 from frappe/mergify/bp/version-15-hotfix/pr-40684
fix: incorrect total qty in job card (backport #40684)
2024-03-26 19:54:46 +05:30
Rohit Waghchaure
68d57c3947 fix: incorrect total qty in job card
(cherry picked from commit c3546cf8e2)
2024-03-26 14:04:03 +00:00
rohitwaghchaure
9b9892da03 Merge pull request #40680 from frappe/mergify/bp/version-15-hotfix/pr-40674
fix: existing batch from different warehouse not showing in the dropdown (backport #40674)
2024-03-26 16:33:14 +05:30
Rohit Waghchaure
79d047802a fix: existing batch from different warehouse not showing in the dropdown
(cherry picked from commit 662cf21afb)
2024-03-26 10:35:51 +00:00
rohitwaghchaure
108e80419e Merge pull request #40673 from frappe/mergify/bp/version-15-hotfix/pr-40672
fix: item not coming in quick entry (backport #40672)
2024-03-26 14:33:46 +05:30
Rohit Waghchaure
008894d32b fix: item not coming in quick entry
(cherry picked from commit dcbb54c41f)
2024-03-26 06:13:17 +00:00
Deepesh Garg
634054c07b Merge pull request #40430 from frappe/mergify/bp/version-15-hotfix/pr-40385
fix: Book depreciation until the asset disposal date and remove unwanted commits (#40385)
2024-03-26 09:05:20 +05:30
SelenSoft
17a087663b fix: Turkish translations (#40650)
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
2024-03-25 23:27:51 +01:00
Deepesh Garg
b04cef9f3f Merge pull request #40653 from frappe/mergify/bp/version-15-hotfix/pr-40640
fix: Add default finance book check in P&L statement (backport #40640)
2024-03-25 17:08:40 +05:30
Deepesh Garg
f08715972a fix: Add default finance book check in P&L statement
(cherry picked from commit 5be3417fdf)
2024-03-25 09:14:45 +00:00
Frappe PR Bot
22f3935024 chore(release): Bumped to Version 15.17.6
## [15.17.6](https://github.com/frappe/erpnext/compare/v15.17.5...v15.17.6) (2024-03-25)

### Bug Fixes

* reset update outstanding flag for old records ([1753a13](1753a138e9))
2024-03-25 02:55:11 +00:00
ruthra kumar
0b0b3f0d9d Merge pull request #40645 from frappe/mergify/bp/version-15/pr-40622
fix: reset update_outstanding_for_self flag for old records (backport #40622)
2024-03-25 08:24:03 +05:30
ruthra kumar
0658285a3b refactor: hide on print formats
(cherry picked from commit fdcdc8a56e)
2024-03-25 07:44:37 +05:30
ruthra kumar
1753a138e9 fix: reset update outstanding flag for old records
(cherry picked from commit a88bf8419e)
2024-03-25 07:44:16 +05:30
rohitwaghchaure
4e4e6c669d Merge pull request #40639 from frappe/mergify/bp/version-15-hotfix/pr-40638
fix: Batch No is mandatory while making manufacture entry (backport #40638)
2024-03-24 21:19:51 +05:30
Rohit Waghchaure
a638c9c8af fix: Batch No is mandatory while making manufacture entry
(cherry picked from commit 43fd60a877)
2024-03-24 13:02:10 +00:00
rohitwaghchaure
a95295b9f9 Merge pull request #40637 from frappe/mergify/bp/version-15-hotfix/pr-40594
fix: use serial/batch fields for subcontracting receipt and in transit in stock entry (backport #40594)
2024-03-24 17:45:50 +05:30
ruthra kumar
e33c383345 Merge pull request #40624 from frappe/mergify/bp/version-15-hotfix/pr-40622
refactor: reset update_outstanding_for_self flag for old records (backport #40622)
2024-03-24 16:39:03 +05:30
ruthra kumar
996f7d30b9 chore: resolve conflict 2024-03-24 16:24:10 +05:30
Rohit Waghchaure
9ec24bcc6c fix: use serial/batch fields for subcontracting receipt and in transit stock entry
(cherry picked from commit 3423334e4f)
2024-03-24 10:34:52 +00:00
Danny
7a9291b3d1 fix: pass empty string email content of pos invoice
(cherry picked from commit ee7bd98878)
2024-03-23 09:10:55 +00:00
Deepesh Garg
bfa316ad09 Merge pull request #40591 from frappe/mergify/bp/version-15-hotfix/pr-40587
refactor(Item Price): validate dates (#40587)
2024-03-23 08:58:47 +05:30
ruthra kumar
d238cdbdd5 refactor: hide on print formats
(cherry picked from commit fdcdc8a56e)
2024-03-22 14:54:02 +00:00
ruthra kumar
f25b5bdfab refactor: reset flag for old records
(cherry picked from commit a88bf8419e)

# Conflicts:
#	erpnext/patches.txt
2024-03-22 14:54:02 +00:00
Frappe PR Bot
c39d02fa14 chore(release): Bumped to Version 15.17.5
## [15.17.5](https://github.com/frappe/erpnext/compare/v15.17.4...v15.17.5) (2024-03-22)

### Bug Fixes

* rate reset to zero ([1ed9133](1ed9133bb6))
2024-03-22 10:30:44 +00:00
rohitwaghchaure
4a1c56113e Merge pull request #40619 from frappe/mergify/bp/version-15/pr-40617
fix: rate reset to zero (backport #40616) (backport #40617)
2024-03-22 15:59:36 +05:30
Rohit Waghchaure
1ed9133bb6 fix: rate reset to zero
(cherry picked from commit 6821baa850)
(cherry picked from commit 4636ef0a29)
2024-03-22 10:08:05 +00:00
rohitwaghchaure
9f13b6ed2b Merge pull request #40617 from frappe/mergify/bp/version-15-hotfix/pr-40616
fix: rate reset to zero (backport #40616)
2024-03-22 15:36:51 +05:30
Rohit Waghchaure
4636ef0a29 fix: rate reset to zero
(cherry picked from commit 6821baa850)
2024-03-22 09:50:50 +00:00
ruthra kumar
fcbe2556d3 Merge pull request #40613 from frappe/mergify/bp/version-15-hotfix/pr-38496
feat: utility to debug financial reports - Bisect Accounting Statements (backport #38496)
2024-03-22 14:19:42 +05:30
ruthra kumar
345d5a657a chore: resolve JS linter issue 2024-03-22 14:03:43 +05:30
ruthra kumar
e7b3ef0c90 chore: resolve linter issues
(cherry picked from commit 0890b414b1)
2024-03-22 07:53:45 +00:00
ruthra kumar
b371369699 refactor: cache results
(cherry picked from commit 14c8c8c33d)
2024-03-22 07:53:45 +00:00
ruthra kumar
067f101c99 refactor: flag to differentiate generated and default values
(cherry picked from commit 0925706d5e)
2024-03-22 07:53:44 +00:00
ruthra kumar
0305aafff8 refactor: save results in node
(cherry picked from commit ca14ae8f1b)
2024-03-22 07:53:44 +00:00
ruthra kumar
a59dc8b40c chore: restrict only to administrator and type info
(cherry picked from commit 90c6d4dc85)
2024-03-22 07:53:44 +00:00
ruthra kumar
6b1b2e863a chore: change data type for summary fields
(cherry picked from commit 228aa1a244)
2024-03-22 07:53:44 +00:00
ruthra kumar
415be361b4 refactor: adding labels to important section
(cherry picked from commit 993e2bfbf9)
2024-03-22 07:53:44 +00:00
ruthra kumar
509d6e3ca9 chore: UI cleanup
(cherry picked from commit ea3071db66)
2024-03-22 07:53:44 +00:00
ruthra kumar
6ff311c4e9 chore: add screen freeze on wait
(cherry picked from commit 395299803f)
2024-03-22 07:53:43 +00:00
ruthra kumar
348359ad5a chore: code cleanup
(cherry picked from commit 5e2d21c033)
2024-03-22 07:53:43 +00:00
ruthra kumar
1a08482655 chore: hide internal variables section
(cherry picked from commit c4c3090f46)
2024-03-22 07:53:43 +00:00
ruthra kumar
b686e1f972 chore: rename btree and remove debugging statements
(cherry picked from commit 6492019383)
2024-03-22 07:53:42 +00:00
ruthra kumar
5674ea450d chore: hide internal fields and better painting logic for heatmap
(cherry picked from commit f6831fba13)
2024-03-22 07:53:42 +00:00
ruthra kumar
f376659785 refactor: working heatmap
(cherry picked from commit 16db6c2f47)
2024-03-22 07:53:42 +00:00
ruthra kumar
c678134de6 chore: hide some internal fields
(cherry picked from commit bd3dc6482e)
2024-03-22 07:53:41 +00:00
ruthra kumar
a25f6493de refactor: calculate summary on tree navigation
(cherry picked from commit f7b7b2b438)
2024-03-22 07:53:41 +00:00
ruthra kumar
59ce9ccc8e refactor: use DB to store tree and state
(cherry picked from commit 99fbd8ad18)
2024-03-22 07:53:41 +00:00
ruthra kumar
a14eceb41a chore: use doctype as btree
(cherry picked from commit 9d20256366)
2024-03-22 07:53:41 +00:00
ruthra kumar
bfccfa4af1 feat: nodes doctype
(cherry picked from commit 85f2a6dd54)
2024-03-22 07:53:41 +00:00
ruthra kumar
0bce5d6057 chore: remove unwanted code
(cherry picked from commit de2eba0d98)
2024-03-22 07:53:40 +00:00
ruthra kumar
fd566f134d refactor: add basic navigation
1. remove unnecessary columns
2. added basic tree navigation

(cherry picked from commit 705ef4f5a3)
2024-03-22 07:53:40 +00:00
ruthra kumar
40176a6b41 refactor: ability to build and load tree from DB
(cherry picked from commit b2dde55f2c)
2024-03-22 07:53:40 +00:00
ruthra kumar
9f859c2bd3 refactor: introduce node class
(cherry picked from commit d53b34c0ce)
2024-03-22 07:53:40 +00:00
ruthra kumar
62987372ba refactor: more buttons
(cherry picked from commit a427029151)
2024-03-22 07:53:40 +00:00
ruthra kumar
80b77ffc87 refactor: date validation
(cherry picked from commit 2de3e6ce6d)
2024-03-22 07:53:39 +00:00
ruthra kumar
ed64d691fc refactor: support for BFS and DFS
(cherry picked from commit 03a38ed025)
2024-03-22 07:53:39 +00:00
ruthra kumar
1f235a7ba3 refactor: simplify DFS
(cherry picked from commit 26503a205f)
2024-03-22 07:53:39 +00:00
ruthra kumar
ce039f279b refactor: Depth First Search(DFS)
(cherry picked from commit 5a25c80f2e)
2024-03-22 07:53:39 +00:00
ruthra kumar
b6c2dbe581 refactor: some logic
(cherry picked from commit 4c8a8c3bcd)
2024-03-22 07:53:39 +00:00
ruthra kumar
884a18f8f1 feat: bisect doctype
(cherry picked from commit decdbd2782)
2024-03-22 07:53:39 +00:00
ruthra kumar
0393855243 refactor: primitive summary for p&l and balance sheet
(cherry picked from commit eb4c476490)
2024-03-22 07:53:38 +00:00
ruthra kumar
0e0b8e5ab4 Merge pull request #40608 from frappe/mergify/bp/version-15-hotfix/pr-40520
fix: permissions during bulk transaction logs (backport #40520)
2024-03-22 10:33:28 +05:30
David
6e6ca42261 fix: permissions during bulk transaction logs
(cherry picked from commit 49dd4c1ef3)
2024-03-22 04:38:45 +00:00
ruthra kumar
7344296a39 Merge pull request #40597 from frappe/mergify/bp/version-15-hotfix/pr-40386
fix: wrong buying amount if delivered and billed qty varies (backport #40386)
2024-03-22 09:04:37 +05:30
mergify[bot]
f66cf7d838 perf: add in some indexes (backport #40590) (#40605)
perf: add in some indexes (#40590)

`Sales Invoice Item.purchase_order`
`Delivery Note Item.purchase_order`

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
(cherry picked from commit 1cd38c860a)

Co-authored-by: Akhil Narang <me@akhilnarang.dev>
2024-03-22 08:51:57 +05:30
Frappe PR Bot
2b80cb99be chore(release): Bumped to Version 15.17.4
## [15.17.4](https://github.com/frappe/erpnext/compare/v15.17.3...v15.17.4) (2024-03-21)

### Bug Fixes

* rate not fetching from the item price ([0d95ace](0d95acefa2))
2024-03-21 17:30:02 +00:00
rohitwaghchaure
57e0b4ea5f Merge pull request #40602 from frappe/mergify/bp/version-15/pr-40600
fix: rate not fetching from the item price (backport #40595) (backport #40600)
2024-03-21 22:58:48 +05:30
Rohit Waghchaure
0d95acefa2 fix: rate not fetching from the item price
(cherry picked from commit d893a465d7)
(cherry picked from commit fd02060cd2)
2024-03-21 17:13:04 +00:00
rohitwaghchaure
5b155e37aa Merge pull request #40600 from frappe/mergify/bp/version-15-hotfix/pr-40595
fix: rate not fetching from the item price (backport #40595)
2024-03-21 22:40:47 +05:30
Rohit Waghchaure
fd02060cd2 fix: rate not fetching from the item price
(cherry picked from commit d893a465d7)
2024-03-21 16:50:13 +00:00
ruthra kumar
f5008a1467 test: buying amt calculation if DN and SI differ in qty
(cherry picked from commit ccb51ded95)
2024-03-21 15:46:01 +00:00
Dany Robert
c2242406f4 fix: wrong buying amount if delivered and billed qty varies
(cherry picked from commit b8da0d9334)
2024-03-21 15:46:01 +00:00
barredterra
df6226f07f chore: resolve conflicts 2024-03-21 14:16:27 +01:00
barredterra
357a1c9752 refactor(Item Price): validate dates
(cherry picked from commit cbcc47b5c4)

# Conflicts:
#	erpnext/stock/doctype/item_price/item_price.py
2024-03-21 13:13:27 +00:00
ruthra kumar
9e5e244e7a Merge pull request #40582 from frappe/mergify/bp/version-15-hotfix/pr-40580
refactor: config changes in Transaction Deletion Record (backport #40580)
2024-03-21 11:02:39 +05:30
Gursheen Kaur Anand
3dcd7380ac Merge pull request #40576 from frappe/mergify/bp/version-15-hotfix/pr-40572
fix: PCV validation for previous fiscal year (backport #40572)
2024-03-21 10:57:26 +05:30
ruthra kumar
b7dc28fff9 refactor: config changes in Transaction Deletion Record
(cherry picked from commit 4ba67fb3ec)
2024-03-21 05:17:25 +00:00
rohitwaghchaure
fa95bd331a Merge pull request #40564 from frappe/mergify/bp/version-15-hotfix/pr-40545
fix: translatability of bom configurator labels (backport #40545)
2024-03-21 01:58:16 +05:30
Gursheen Anand
4b973b2f86 fix: validate gl for previous fiscal year
(cherry picked from commit a1d108c062)
2024-03-20 15:30:03 +00:00
ruthra kumar
5194b87dc4 Merge pull request #40575 from frappe/mergify/bp/version-15-hotfix/pr-39717
refactor: Transaction Deletion record for large volumes (backport #39717)
2024-03-20 20:40:27 +05:30
Frappe PR Bot
85aeb1f3b1 chore(release): Bumped to Version 15.17.3
## [15.17.3](https://github.com/frappe/erpnext/compare/v15.17.2...v15.17.3) (2024-03-20)

### Bug Fixes

* style for tax breakup ([07bb836](07bb8360d5))
* use Text Editor for rendering tax breakup table ([64672e6](64672e655a))
2024-03-20 14:58:46 +00:00
Gursheen Kaur Anand
03a40f491b Merge pull request #40568 from frappe/mergify/bp/version-15/pr-40563
fix: use `Text Editor` for rendering tax breakup table (backport #40563)
2024-03-20 20:27:31 +05:30
Gursheen Kaur Anand
36c6820096 Merge pull request #40570 from frappe/mergify/bp/version-15-hotfix/pr-40563
fix: use `Text Editor` for rendering tax breakup table (backport #40563)
2024-03-20 20:27:03 +05:30
Gursheen Kaur Anand
9c204b7106 chore: resolve conflicts 2024-03-20 20:04:44 +05:30
Gursheen Kaur Anand
8e5d481cba chore: resolve conflicts 2024-03-20 20:03:03 +05:30
Gursheen Kaur Anand
37eae8eb4e chore: resolve conflicts 2024-03-20 19:58:01 +05:30
Gursheen Kaur Anand
4ede3a9ba5 chore: resolve conflicts 2024-03-20 19:57:24 +05:30
ruthra kumar
e7d2451f60 chore: fix linting issue in JS
(cherry picked from commit 02c522b7cd)
2024-03-20 14:13:21 +00:00
ruthra kumar
5bbccf1fbd refactor(test): test cases modified to handle new approach
(cherry picked from commit 81309576b0)
2024-03-20 14:13:21 +00:00
ruthra kumar
40574f0d72 refactor: ability to process in single transaction
(cherry picked from commit a158b825d7)
2024-03-20 14:13:20 +00:00
ruthra kumar
1104deb58e refactor: link running doc validation to company master
(cherry picked from commit 5a3afea8c7)
2024-03-20 14:13:20 +00:00
ruthra kumar
29804f6a41 chore: rename entry point
(cherry picked from commit 5fe0b20be1)
2024-03-20 14:13:20 +00:00
ruthra kumar
ae6260f717 chore: move status and error log to their own section
(cherry picked from commit 3cec62d4f8)
2024-03-20 14:13:19 +00:00
ruthra kumar
aceee829d2 refactor: minor UI tweaks
(cherry picked from commit 0455d0c46c)
2024-03-20 14:13:19 +00:00
ruthra kumar
02c3303fee refactor: exception propogation
(cherry picked from commit 4a55240e63)
2024-03-20 14:13:18 +00:00
ruthra kumar
3f45f63ff8 chore: code cleanup
(cherry picked from commit eea260b9f9)
2024-03-20 14:13:17 +00:00
ruthra kumar
3de53999ce refactor: better method naming
(cherry picked from commit 30463657bf)
2024-03-20 14:13:17 +00:00
ruthra kumar
b31e43e3db refactor: barebones hook on all doctypes with 'company' field
(cherry picked from commit ec194ef076)
2024-03-20 14:13:16 +00:00
ruthra kumar
d4c2e6c77d refactor: make sure only one task is running for doc
(cherry picked from commit 78c9cc63b1)
2024-03-20 14:13:16 +00:00
ruthra kumar
049c54bb32 chore: hide docfield in list view
(cherry picked from commit 98afb4d468)
2024-03-20 14:13:15 +00:00
ruthra kumar
d35bef12b6 refactor: validations to prevent duplicate jobs
(cherry picked from commit 31a2da552b)
2024-03-20 14:13:15 +00:00
ruthra kumar
90ad3d3176 refactor: no copy on summary table and more validations
(cherry picked from commit 55e93b3fe1)
2024-03-20 14:13:15 +00:00
ruthra kumar
db9cc5350d refactor: reset all flags and remove unwanted code
(cherry picked from commit 2dbe68a09d)
2024-03-20 14:13:15 +00:00
ruthra kumar
f67c447402 chore: show correct status in list view
(cherry picked from commit 1014940953)
2024-03-20 14:13:14 +00:00
ruthra kumar
cbaee05740 refactor: validate status before running events
(cherry picked from commit 86b5e2e277)
2024-03-20 14:13:14 +00:00
ruthra kumar
c827be4345 refactor: make Excluded doctype table read only
(cherry picked from commit 7c4cff2649)
2024-03-20 14:13:14 +00:00
ruthra kumar
efebec3f95 chore: remove unwanted UI code
(cherry picked from commit b98a5e4edc)
2024-03-20 14:13:14 +00:00
ruthra kumar
c3dd68ecc3 refactor: use separate child table for summary
(cherry picked from commit 49d3bcbc8d)
2024-03-20 14:13:13 +00:00
ruthra kumar
2bb1bfc4a0 refactor: chained callback
(cherry picked from commit b12ca65fcc)
2024-03-20 14:13:13 +00:00
ruthra kumar
195bffdf44 refactor: reorder flags in Tasks section
(cherry picked from commit cccb2d5141)
2024-03-20 14:13:13 +00:00
ruthra kumar
17ed1bb12c refactor: use flags to decide on current stage
(cherry picked from commit 6a77d86a53)
2024-03-20 14:13:13 +00:00
ruthra kumar
f9321767a6 refactor: UI trigger
(cherry picked from commit 8944ab8b6a)
2024-03-20 14:13:13 +00:00
ruthra kumar
9c5108e492 refactor: tasks section and UI niceties
(cherry picked from commit d0dc2c6e77)
2024-03-20 14:13:12 +00:00
ruthra kumar
529abd619a refactor: set status and trigger job on submit
(cherry picked from commit 6fbb67b1d2)
2024-03-20 14:13:12 +00:00
ruthra kumar
03fc3cec70 refactor: more options for 'status' and move it to top
(cherry picked from commit 0d65d878de)
2024-03-20 14:13:11 +00:00
Ankush Menat
501b09a170 fix: style for tax breakup
(cherry picked from commit 967540da18)
2024-03-20 13:06:45 +00:00
Gursheen Anand
a95bb27c65 fix: use Text Editor for rendering tax breakup table
(cherry picked from commit 1c63983873)

# Conflicts:
#	erpnext/buying/doctype/purchase_order/purchase_order.json
#	erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
2024-03-20 13:06:45 +00:00
Ankush Menat
07bb8360d5 fix: style for tax breakup
(cherry picked from commit 967540da18)
2024-03-20 13:06:38 +00:00
Gursheen Anand
64672e655a fix: use Text Editor for rendering tax breakup table
(cherry picked from commit 1c63983873)

# Conflicts:
#	erpnext/buying/doctype/purchase_order/purchase_order.json
#	erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
2024-03-20 13:06:38 +00:00
barredterra
cf49cec203 fix: translatability of bom configurator labels
(cherry picked from commit 4cfe99d74f)
2024-03-20 10:50:39 +00:00
rohitwaghchaure
bc5654b900 Merge pull request #40562 from frappe/mergify/bp/version-15-hotfix/pr-40561
fix: Cannot read properties of undefined (reading 'rate') (backport #40561)
2024-03-20 16:17:08 +05:30
Rohit Waghchaure
d287ed5e47 fix: Cannot read properties of undefined (reading 'rate')
(cherry picked from commit ac92a22914)
2024-03-20 09:31:42 +00:00
rohitwaghchaure
f881d23c05 Merge pull request #40560 from frappe/mergify/bp/version-15-hotfix/pr-40559
fix: pick list not picked materials having required qty less than 1 (backport #40559)
2024-03-20 14:16:44 +05:30
Rohit Waghchaure
5310ec38ca fix: pick list not picked qty less than 1
(cherry picked from commit 1a9ae33110)
2024-03-20 08:23:08 +00:00
Frappe PR Bot
1937059870 chore(release): Bumped to Version 15.17.2
## [15.17.2](https://github.com/frappe/erpnext/compare/v15.17.1...v15.17.2) (2024-03-20)

### Bug Fixes

* achieved targets for sales partners ([1ac8887](1ac888715c))
* advance journal fetching logic in Advances section ([bfa78aa](bfa78aaf74))
* attribute error on Bank Statement Import retry ([a0bf22c](a0bf22c9a5))
* auto-update due date for invoices via data import ([9cdde50](9cdde50f7c))
* balance qty in the stock ledger report (backport [#40506](https://github.com/frappe/erpnext/issues/40506)) ([#40507](https://github.com/frappe/erpnext/issues/40507)) ([69f442d](69f442dd79))
* currency symbol for Landed Cost Voucher Amount (backport [#40550](https://github.com/frappe/erpnext/issues/40550)) ([#40554](https://github.com/frappe/erpnext/issues/40554)) ([1c90797](1c90797879))
* Data too long for column 'stock_queue' (backport [#40436](https://github.com/frappe/erpnext/issues/40436)) ([#40451](https://github.com/frappe/erpnext/issues/40451)) ([ba6b856](ba6b8561c9))
* don't validate for currency, if account is unavailable ([5729ee5](5729ee563c))
* flaky Accounts Receivable test case ([0bb4a7d](0bb4a7d13a))
* incorrect gross profit on the quotation (backport [#40438](https://github.com/frappe/erpnext/issues/40438)) ([#40442](https://github.com/frappe/erpnext/issues/40442)) ([ce2626e](ce2626e911))
* index error on Exchange Rate Revaluation creation ([ebd967d](ebd967d7d3))
* invalid exchange loss booking on invoice againts base accounts ([72c9cd5](72c9cd5582))
* missing range for ageing summary ([dacc69c](dacc69c56f))
* not able to delete cancelled delivery note (backport [#40508](https://github.com/frappe/erpnext/issues/40508)) ([#40510](https://github.com/frappe/erpnext/issues/40510)) ([917a21b](917a21b989))
* rate changing while making PR (negative discount) (backport [#40539](https://github.com/frappe/erpnext/issues/40539)) ([#40540](https://github.com/frappe/erpnext/issues/40540)) ([0bdda12](0bdda1226f))
* Remove custom queries for customer ([3133505](313350534f))
* serial and batch for internal transfer (backport [#40467](https://github.com/frappe/erpnext/issues/40467)) ([#40477](https://github.com/frappe/erpnext/issues/40477)) ([61d59b3](61d59b392a))
* show correct variance for durations with no vouchers ([bc78bc3](bc78bc33f1))
* stock reco negative batch (backport [#40533](https://github.com/frappe/erpnext/issues/40533)) ([#40535](https://github.com/frappe/erpnext/issues/40535)) ([7f1f780](7f1f7809c8))
* stopped mr showing in the popup (backport [#40478](https://github.com/frappe/erpnext/issues/40478)) ([#40480](https://github.com/frappe/erpnext/issues/40480)) ([74b30a6](74b30a6a1d))
* **Supplier Quotation Comparison:** group by options ([1e16d2c](1e16d2ca25))
* Taxes not getting updated on change ([75b610d](75b610d7fc))
* **test:** manually filter rows and assert ([df13517](df1351783e))
* Update Existing Price List Rate not working (backport [#40333](https://github.com/frappe/erpnext/issues/40333)) ([#40527](https://github.com/frappe/erpnext/issues/40527)) ([44bbf4b](44bbf4b983))
* use in_import flag for checking imported records ([8242a9c](8242a9cd46))
2024-03-20 05:23:16 +00:00
rohitwaghchaure
717c78dcda Merge pull request #40538 from frappe/version-15-hotfix
chore: release v15
2024-03-20 10:52:04 +05:30
mergify[bot]
1c90797879 fix: currency symbol for Landed Cost Voucher Amount (backport #40550) (#40554)
fix: currency symbol for Landed Cost Voucher Amount (#40550)

(cherry picked from commit 0725707cb1)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-19 20:42:57 +05:30
Raffael Meyer
ba9f9bff19 Merge pull request #40548 from frappe/mergify/bp/version-15-hotfix/pr-40546
fix(Supplier Quotation Comparison): group by options (backport #40546)
2024-03-19 13:07:25 +01:00
barredterra
1e16d2ca25 fix(Supplier Quotation Comparison): group by options
(cherry picked from commit 87e36d290e)
2024-03-19 11:51:36 +00:00
Raffael Meyer
745e653339 Merge pull request #40544 from frappe/mergify/bp/version-15-hotfix/pr-40542 2024-03-19 12:49:32 +01:00
barredterra
f0e00daa1c refactor: usage of in_list
(cherry picked from commit d238751e6b)
2024-03-19 11:13:02 +00:00
mergify[bot]
0bdda1226f fix: rate changing while making PR (negative discount) (backport #40539) (#40540)
fix: rate changing while making PR (negative discount) (#40539)

(cherry picked from commit 8136954484)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-19 15:37:37 +05:30
rohitwaghchaure
05436dfcac Merge branch 'version-15' into version-15-hotfix 2024-03-19 15:28:47 +05:30
mergify[bot]
7f1f7809c8 fix: stock reco negative batch (backport #40533) (#40535)
fix: stock reco negative batch (#40533)

(cherry picked from commit a64c2ecf39)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-19 15:18:50 +05:30
mergify[bot]
44bbf4b983 fix: Update Existing Price List Rate not working (backport #40333) (#40527)
fix: Update Existing Price List Rate not working (#40333)

(cherry picked from commit 09ea7edb86)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-19 14:26:41 +05:30
Gursheen Kaur Anand
0ddb310dd4 Merge pull request #40531 from frappe/mergify/bp/version-15-hotfix/pr-40528
fix(minor): missing range for ageing summary in PSOA (backport #40528)
2024-03-19 12:44:04 +05:30
Gursheen Anand
dacc69c56f fix: missing range for ageing summary
(cherry picked from commit 643cc022fd)
2024-03-19 07:11:18 +00:00
ruthra kumar
7b4ede9c04 Merge pull request #40523 from frappe/mergify/bp/version-15-hotfix/pr-40502
refactor: toggle between 'http' and 'https' on exchange rate API (backport #40502)
2024-03-19 10:21:28 +05:30
ruthra kumar
1a0a70b5cd refactor: toggle between 'http' and 'https' on exchange rate API
(cherry picked from commit 8b81274769)
2024-03-19 04:30:16 +00:00
ruthra kumar
093b95604f Merge pull request #40516 from frappe/mergify/bp/version-15-hotfix/pr-40511
fix: invalid exchange loss booking on invoice against base accounts (backport #40511)
2024-03-18 21:00:38 +05:30
ruthra kumar
dd30a46f29 refactor(test): ensure Exchange gain/loss journals aren't created
(cherry picked from commit e1c2d006ca)
2024-03-18 15:14:44 +00:00
ruthra kumar
72c9cd5582 fix: invalid exchange loss booking on invoice againts base accounts
(cherry picked from commit 3d5dba6976)
2024-03-18 15:14:43 +00:00
mergify[bot]
917a21b989 fix: not able to delete cancelled delivery note (backport #40508) (#40510)
fix: not able to delete cancelled delivery note (#40508)

(cherry picked from commit 7695759f3c)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-18 15:26:32 +05:30
mergify[bot]
69f442dd79 fix: balance qty in the stock ledger report (backport #40506) (#40507)
fix: balance qty in the stock ledger report (#40506)

(cherry picked from commit 00de529a1e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-18 13:03:27 +05:30
Gursheen Kaur Anand
a82df6ac7b Merge pull request #40503 from GursheenK/achieved-targets-for-territory-v15
fix: achieved targets for territory / partners bpv15
2024-03-18 11:21:59 +05:30
Gursheen Anand
bc78bc33f1 fix: show correct variance for durations with no vouchers 2024-03-18 10:18:16 +05:30
Gursheen Anand
1a3ea0c108 test: sales partner targets with invoices 2024-03-18 10:18:16 +05:30
Gursheen Anand
1ac888715c fix: achieved targets for sales partners 2024-03-18 10:18:16 +05:30
Deepesh Garg
6ecd545f17 Merge pull request #40492 from frappe/mergify/bp/version-15-hotfix/pr-40428
chore: Remove custom party queries (#40428)
2024-03-17 19:47:39 +05:30
ruthra kumar
be730fe66a Merge pull request #40499 from frappe/mergify/bp/version-15-hotfix/pr-40494
fix: AttributeError in Bank Statement Import (backport #40494)
2024-03-17 08:10:18 +05:30
ruthra kumar
09c1da9570 Merge pull request #40497 from frappe/mergify/bp/version-15-hotfix/pr-40495
fix: index error on Exchange Rate Revaluation creation (backport #40495)
2024-03-17 08:06:17 +05:30
ruthra kumar
a0bf22c9a5 fix: attribute error on Bank Statement Import retry
(cherry picked from commit aec630c74f)
2024-03-17 02:23:46 +00:00
ruthra kumar
5729ee563c fix: don't validate for currency, if account is unavailable
(cherry picked from commit 3cde81be65)
2024-03-17 02:23:46 +00:00
ruthra kumar
ebd967d7d3 fix: index error on Exchange Rate Revaluation creation
(cherry picked from commit bb279e368c)
2024-03-17 02:21:37 +00:00
Deepesh Garg
313350534f fix: Remove custom queries for customer
(cherry picked from commit 60ba25caf2)
2024-03-16 14:34:36 +00:00
Deepesh Garg
e3336c603c chore: Add supplier query back
(cherry picked from commit effc9d1492)
2024-03-16 14:34:36 +00:00
Deepesh Garg
2e38f4d599 chore: remove invalid comment
(cherry picked from commit e87b44f758)
2024-03-16 14:34:36 +00:00
Deepesh Garg
2512d4c7f2 chore: Remove custom party queries
(cherry picked from commit c9623b6fd6)
2024-03-16 14:34:36 +00:00
Deepesh Garg
823e377ef1 Merge pull request #40454 from frappe/mergify/bp/version-15-hotfix/pr-40433
fix: Taxes not getting updated on change (#40433)
2024-03-16 19:23:22 +05:30
ruthra kumar
db5cd4eace Merge pull request #40490 from frappe/mergify/bp/version-15-hotfix/pr-40485
refactor: validate SO and SI references in Delivery Notes (backport #40485)
2024-03-16 15:27:37 +05:30
ruthra kumar
409a65ec64 test: SO reference validation
(cherry picked from commit 4f396d3049)
2024-03-16 09:29:15 +00:00
ruthra kumar
28d3525b42 refactor: validate SO and SI references
(cherry picked from commit 4d090bd3b8)
2024-03-16 09:29:14 +00:00
ruthra kumar
f7ef0d69b7 Merge pull request #40474 from frappe/mergify/bp/version-15-hotfix/pr-40473
refactor: enable no-copy for update_outstanding_for_self (backport #40473)
2024-03-16 10:07:51 +05:30
ruthra kumar
0ca5f98ba3 Merge pull request #40471 from frappe/mergify/bp/version-15-hotfix/pr-40260
refactor: support payment against reverse payment reconciliation (backport #40260)
2024-03-16 10:06:25 +05:30
ruthra kumar
78eb6bd9ea Merge pull request #40466 from frappe/mergify/bp/version-15-hotfix/pr-40461
refactor: disallow '0' qty return invoices with stock effect (backport #40461)
2024-03-16 10:05:22 +05:30
mergify[bot]
74b30a6a1d fix: stopped mr showing in the popup (backport #40478) (#40480)
fix: stopped mr showing in the popup (#40478)

(cherry picked from commit 1ff8a6f24f)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-16 09:35:56 +05:30
ruthra kumar
ed4c8461d3 chore: resolve conflict 2024-03-15 20:16:38 +05:30
mergify[bot]
61d59b392a fix: serial and batch for internal transfer (backport #40467) (#40477)
fix: serial and batch for internal transfer (#40467)

* fix: serial and batch for internal transfer

* chore: fix test cases

(cherry picked from commit 59222813af)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-15 18:19:56 +05:30
ruthra kumar
fba13c6dbc refactor: enable no-copy for update_outstanding_for_self
(cherry picked from commit a1e8caa5c1)
2024-03-15 11:33:09 +00:00
Gursheen Kaur Anand
3397b80ddf Merge pull request #40470 from frappe/mergify/bp/version-15-hotfix/pr-40198
fix: auto-update due date for invoices via data import (backport #40198)
2024-03-15 13:16:56 +05:30
ruthra kumar
d82b1fc600 refactor(test): generate and use unique party
(cherry picked from commit a3d4aff29c)
2024-03-15 07:22:42 +00:00
ruthra kumar
7ea1edc4ff test: advance payment reconciliation against payment
'advance' payments booked in separate party account

(cherry picked from commit 2a08072443)
2024-03-15 07:22:42 +00:00
ruthra kumar
1762f9919a test: reverse payment reconciliation
(cherry picked from commit 6d9074d585)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/test_payment_entry.py
2024-03-15 07:22:41 +00:00
ruthra kumar
17fb287cd9 refactor: support payment against reverse payment reconciliation
(cherry picked from commit 5f15297f28)
2024-03-15 07:22:41 +00:00
Gursheen Anand
8242a9cd46 fix: use in_import flag for checking imported records
(cherry picked from commit f504f2caf3)
2024-03-15 07:16:26 +00:00
Gursheen Anand
9cdde50f7c fix: auto-update due date for invoices via data import
(cherry picked from commit c096133897)
2024-03-15 07:16:25 +00:00
ruthra kumar
5957ef9b9d test: validation to prevent '0' qty return with stock effect
(cherry picked from commit 647bba0f00)
2024-03-15 05:37:36 +00:00
ruthra kumar
144aec8d6a refactor: disallow '0' qty return invoices with stock effect
(cherry picked from commit 898affbee9)
2024-03-15 05:37:36 +00:00
ruthra kumar
3fe45404ea Merge pull request #40460 from frappe/mergify/bp/version-15-hotfix/pr-40420
fix: advance journal fetching logic in Advances section (backport #40420)
2024-03-14 15:51:15 +05:30
ruthra kumar
bfa78aaf74 fix: advance journal fetching logic in Advances section
(cherry picked from commit e786a93c2e)
2024-03-14 10:06:05 +00:00
Frappe PR Bot
436e030961 chore(release): Bumped to Version 15.17.1
## [15.17.1](https://github.com/frappe/erpnext/compare/v15.17.0...v15.17.1) (2024-03-14)

### Bug Fixes

* **test:** manually filter row and assert ([057e433](057e43330f))
2024-03-14 09:17:23 +00:00
ruthra kumar
217cef6f4e Merge pull request #40440 from frappe/mergify/bp/version-15/pr-40372
refactor: checkbox to toggle standalone Credit/Debit note behaviour (backport #40372)
2024-03-14 14:46:16 +05:30
mergify[bot]
54b5064f76 chore: fix test case (backport #40457) (#40458)
chore: fix test case

(cherry picked from commit ec83d54826)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2024-03-14 14:43:05 +05:30
ruthra kumar
057e43330f fix(test): manually filter row and assert 2024-03-14 13:19:45 +05:30
Deepesh Garg
75b610d7fc fix: Taxes not getting updated on change
(cherry picked from commit 65ae9616ba)
2024-03-14 06:44:05 +00:00
mergify[bot]
ba6b8561c9 fix: Data too long for column 'stock_queue' (backport #40436) (#40451)
fix: Data too long for column 'stock_queue' (#40436)

(cherry picked from commit cd79dcccb6)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-14 11:49:10 +05:30
ruthra kumar
54a8473a91 Merge pull request #40447 from frappe/mergify/copy/version-15-hotfix/pr-40445
fix: flaky Accounts Receivable test case (copy #40445)
2024-03-14 10:29:27 +05:30
ruthra kumar
df1351783e fix(test): manually filter rows and assert 2024-03-14 10:14:35 +05:30
ruthra kumar
0bb4a7d13a fix: flaky Accounts Receivable test case
(cherry picked from commit 40bce240bde508801d07b9c38ededea5b4f297c8)
2024-03-13 16:53:44 +00:00
mergify[bot]
ce2626e911 fix: incorrect gross profit on the quotation (backport #40438) (#40442)
fix: incorrect gross profit on the quotation (#40438)

(cherry picked from commit f4a945aee4)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-13 21:56:20 +05:30
ruthra kumar
9ffb4c5ca9 chore: resolve conflicts 2024-03-13 17:55:22 +05:30
ruthra kumar
e07f9e6754 chore: better popup message
(cherry picked from commit 445d2acf50)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
2024-03-13 12:08:39 +00:00
ruthra kumar
ed7a115511 test: cr note flag to update self
(cherry picked from commit ce3b1f09f5)
2024-03-13 12:08:38 +00:00
ruthra kumar
19763ce545 refactor: make AR/AP report aware of always standalone cr/dr notes
(cherry picked from commit 4d0c2d8e82)
2024-03-13 12:08:37 +00:00
ruthra kumar
95093ba7cd chore: patch for updating flag in Cr/Dr notes
(cherry picked from commit 849f478894)

# Conflicts:
#	erpnext/patches.txt
2024-03-13 12:08:37 +00:00
ruthra kumar
b56fe0e800 refactor: post ledger entries based on toggle
(cherry picked from commit 77aac6f571)
2024-03-13 12:08:36 +00:00
ruthra kumar
006971ecc6 refactor: checkbox in purchase invoice
(cherry picked from commit 767f2157e6)
2024-03-13 12:08:35 +00:00
ruthra kumar
9ccc22ca61 chore: update popup message
(cherry picked from commit adf13a19c4)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
2024-03-13 12:08:35 +00:00
ruthra kumar
18957d7cc4 refactor: checkbox to toggle always standalone credit note
(cherry picked from commit 2cefe2a20e)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json
2024-03-13 12:08:34 +00:00
ruthra kumar
bc53b67065 Merge pull request #40427 from frappe/mergify/bp/version-15-hotfix/pr-40372
refactor: checkbox to toggle standalone Credit/Debit note behaviour (backport #40372)
2024-03-13 16:28:50 +05:30
Nabin Hait
2d7ff5d4cf fix: Book depreciation until the asset disposal date and removed unwanted commits
(cherry picked from commit dedae4fecf)
2024-03-13 07:48:27 +00:00
ruthra kumar
70375dfbde refactor: pass 'name' to get_link_to_form 2024-03-13 13:15:07 +05:30
ruthra kumar
1093e0d46f chore: resolve conflicts 2024-03-13 12:17:46 +05:30
ruthra kumar
d87b98d945 chore: better popup message
(cherry picked from commit 445d2acf50)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
2024-03-13 06:13:11 +00:00
ruthra kumar
752b01d83b test: cr note flag to update self
(cherry picked from commit ce3b1f09f5)
2024-03-13 06:13:11 +00:00
ruthra kumar
a0f78584e9 refactor: make AR/AP report aware of always standalone cr/dr notes
(cherry picked from commit 4d0c2d8e82)
2024-03-13 06:13:11 +00:00
ruthra kumar
4b44ae435a chore: patch for updating flag in Cr/Dr notes
(cherry picked from commit 849f478894)

# Conflicts:
#	erpnext/patches.txt
2024-03-13 06:13:10 +00:00
ruthra kumar
1c68946fb9 refactor: post ledger entries based on toggle
(cherry picked from commit 77aac6f571)
2024-03-13 06:13:10 +00:00
ruthra kumar
824d6b4102 refactor: checkbox in purchase invoice
(cherry picked from commit 767f2157e6)
2024-03-13 06:13:10 +00:00
ruthra kumar
b5f22c39ec chore: update popup message
(cherry picked from commit adf13a19c4)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
2024-03-13 06:13:10 +00:00
ruthra kumar
f83098e493 refactor: checkbox to toggle always standalone credit note
(cherry picked from commit 2cefe2a20e)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json
2024-03-13 06:13:09 +00:00
Frappe PR Bot
33185e0a3b chore(release): Bumped to Version 15.17.0
# [15.17.0](https://github.com/frappe/erpnext/compare/v15.16.2...v15.17.0) (2024-03-13)

### Bug Fixes

* **accounts:** Allow setting Number of new Cost Center (backport [#40212](https://github.com/frappe/erpnext/issues/40212)) ([#40314](https://github.com/frappe/erpnext/issues/40314)) ([7001e0a](7001e0a820))
* advance paid amount and ledger entries against SO/PO ([6a5a941](6a5a941a5a))
* barcode field on line item not working (backport [#40381](https://github.com/frappe/erpnext/issues/40381)) ([#40384](https://github.com/frappe/erpnext/issues/40384)) ([9ce68de](9ce68deff5))
* batch no not copied while making Material Consumption entry (backport [#40290](https://github.com/frappe/erpnext/issues/40290)) ([#40300](https://github.com/frappe/erpnext/issues/40300)) ([6d1c144](6d1c144a66))
* Blanket order rate getting changed on converting to order ([d8c6eb0](d8c6eb0bf2))
* conditionally apply `is_group` filter in accounting dimension query (backport [#40414](https://github.com/frappe/erpnext/issues/40414)) ([#40416](https://github.com/frappe/erpnext/issues/40416)) ([40752c1](40752c1f5c))
* decimal issue while making the stock entry (backport [#40394](https://github.com/frappe/erpnext/issues/40394)) ([#40397](https://github.com/frappe/erpnext/issues/40397)) ([91af7c0](91af7c033a))
* error message wording ([#40403](https://github.com/frappe/erpnext/issues/40403)) ([2a40808](2a40808b05))
* Filter for projects in Sales Cycle ([173b3b8](173b3b85f6))
* get_user_default_as_list args order ([44ff607](44ff607dcd))
* if input manualy material request on WO the material_request_item is not set so validate WO give error (backport [#40180](https://github.com/frappe/erpnext/issues/40180)) ([#40421](https://github.com/frappe/erpnext/issues/40421)) ([a5e6763](a5e6763be5))
* incorrect advance paid in Sales/Purchase Order ([6832908](6832908e92))
* incorrect work order status (backport [#40407](https://github.com/frappe/erpnext/issues/40407)) ([#40411](https://github.com/frappe/erpnext/issues/40411)) ([605132a](605132a31c))
* load ignored doctype and include Mode of Payment Account ([#40334](https://github.com/frappe/erpnext/issues/40334)) ([5fac500](5fac50036a))
* MR Default Supplier search query (backport [#40273](https://github.com/frappe/erpnext/issues/40273)) ([#40351](https://github.com/frappe/erpnext/issues/40351)) ([a195dd3](a195dd3c1f))
* negative stock error for the batch (backport [#40389](https://github.com/frappe/erpnext/issues/40389)) ([#40391](https://github.com/frappe/erpnext/issues/40391)) ([478b988](478b988290))
* not able to cancel purchase receipt for old subcontracting flow (backport [#40298](https://github.com/frappe/erpnext/issues/40298)) ([#40302](https://github.com/frappe/erpnext/issues/40302)) ([e0e80f7](e0e80f7eed))
* qc created for raw materials during manufacture entry (backport [#40408](https://github.com/frappe/erpnext/issues/40408)) ([#40413](https://github.com/frappe/erpnext/issues/40413)) ([f932265](f932265218))
* recursion issue while submitting work order (backport [#40400](https://github.com/frappe/erpnext/issues/40400)) ([#40402](https://github.com/frappe/erpnext/issues/40402)) ([d6e87f3](d6e87f3f17))
* Sender email in process statements of accounts ([953f640](953f64091a))
* **Shipment Parcel:** make length, width and height non-mandatory ([1476196](1476196966))
* stock ledger balance qty for the batch (backport [#40274](https://github.com/frappe/erpnext/issues/40274)) ([#40301](https://github.com/frappe/erpnext/issues/40301)) ([62aefce](62aefcef04))
* use serial batch fields for subcontracting receipt (backport [#40311](https://github.com/frappe/erpnext/issues/40311)) ([#40315](https://github.com/frappe/erpnext/issues/40315)) ([4b15c00](4b15c00b11))
* use serial/batch field for rejected items (backport [#40327](https://github.com/frappe/erpnext/issues/40327)) ([#40329](https://github.com/frappe/erpnext/issues/40329)) ([7ca7242](7ca72423b9))
* Use serial/batch fields for delivery note return (backport [#40374](https://github.com/frappe/erpnext/issues/40374)) ([#40376](https://github.com/frappe/erpnext/issues/40376)) ([32660ab](32660abdc8))

### Features

* add recursion qty field in promotional scheme ([5f4b23d](5f4b23d4af))
2024-03-13 04:29:12 +00:00
Deepesh Garg
0e4e0b3084 Merge pull request #40395 from frappe/version-15-hotfix
chore: release v15
2024-03-13 09:57:54 +05:30
mergify[bot]
a5e6763be5 fix: if input manualy material request on WO the material_request_item is not set so validate WO give error (backport #40180) (#40421)
fix: if input manualy material request on WO the material_request_item is not set so validate WO give error (#40180)

(cherry picked from commit f24f51b7de)

Co-authored-by: HENRY Florian <florian.henry@open-concept.pro>
2024-03-12 21:56:14 +05:30
mergify[bot]
26a1d84935 chore: Add translation to buttons in Update stock_summary_template.html (backport #40099) (#40419)
chore: Add translation to buttons in Update stock_summary_template.html (#40099)

chore: Add translation to buttons in Update stock_summary_template.html
(cherry picked from commit f3b4237ab6)

Co-authored-by: Ernesto Ruiz <eruiz@wbapps.com>
2024-03-12 21:31:30 +05:30
mergify[bot]
40752c1f5c fix: conditionally apply is_group filter in accounting dimension query (backport #40414) (#40416)
fix: conditionally apply `is_group` filter in accounting dimension query (#40414)

(cherry picked from commit daf4ae2a6b)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2024-03-12 20:45:31 +05:30
Raffael Meyer
0ad203ab89 Merge pull request #40406 from frappe/mergify/bp/version-15-hotfix/pr-40403
fix: error message wording (backport #40403)
2024-03-12 14:29:49 +01:00
mergify[bot]
605132a31c fix: incorrect work order status (backport #40407) (#40411)
fix: incorrect work order status (#40407)

(cherry picked from commit 948297692e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-12 18:34:25 +05:30
mergify[bot]
f932265218 fix: qc created for raw materials during manufacture entry (backport #40408) (#40413)
fix: qc created for raw materials during manufacture entry (#40408)

(cherry picked from commit f8a1a7f515)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-12 18:29:11 +05:30
Raffael Meyer
2a40808b05 fix: error message wording (#40403)
(cherry picked from commit 79a0473705)
2024-03-12 11:26:56 +00:00
mergify[bot]
d6e87f3f17 fix: recursion issue while submitting work order (backport #40400) (#40402)
* fix: recursion issue while submitting work order (#40400)

(cherry picked from commit 72614bb8ff)

* chore: fix linter issue

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-12 16:50:00 +05:30
mergify[bot]
91af7c033a fix: decimal issue while making the stock entry (backport #40394) (#40397)
fix: decimal issue while making the stock entry (#40394)

(cherry picked from commit 4a02d1497c)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-12 15:35:55 +05:30
rohitwaghchaure
581c8b1a22 Merge branch 'version-15' into version-15-hotfix 2024-03-12 15:18:55 +05:30
mergify[bot]
478b988290 fix: negative stock error for the batch (backport #40389) (#40391)
fix: negative stock error for the batch (#40389)

(cherry picked from commit a419812864)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-12 14:55:34 +05:30
Gursheen Kaur Anand
c0b60413b6 Merge pull request #40393 from frappe/mergify/bp/version-15-hotfix/pr-40388
feat: add recursion qty field in promotional scheme (backport #40388)
2024-03-12 14:51:09 +05:30
Gursheen Anand
11f30e90ab test: pricing rule for product discounts
(cherry picked from commit 0ffc5cf012)
2024-03-12 08:59:40 +00:00
Gursheen Anand
5f4b23d4af feat: add recursion qty field in promotional scheme
(cherry picked from commit 7075c50b85)
2024-03-12 08:59:39 +00:00
mergify[bot]
9ce68deff5 fix: barcode field on line item not working (backport #40381) (#40384)
fix: barcode field on line item not working (#40381)

(cherry picked from commit 0da19a40a7)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-12 13:48:48 +05:30
mergify[bot]
32660abdc8 fix: Use serial/batch fields for delivery note return (backport #40374) (#40376)
fix: Use serial/batch fields for delivery note return (#40374)

fix: User serial/batch fields for delivery note return
(cherry picked from commit b9a8dd468b)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-11 17:27:02 +05:30
ruthra kumar
76fc420b21 Merge pull request #40375 from frappe/mergify/bp/version-15-hotfix/pr-40299
refactor: run qb directly instead of converting to sql (backport #40299)
2024-03-11 17:02:50 +05:30
ruthra kumar
c111ce9bf4 chore: replace parameter with qb conditions
(cherry picked from commit 0344ff2aac)
2024-03-11 11:15:43 +00:00
ruthra kumar
03bde07966 refactor: run qb directly instead of converting to sql
(cherry picked from commit 711b72b26c)
2024-03-11 11:15:43 +00:00
mergify[bot]
a195dd3c1f fix: MR Default Supplier search query (backport #40273) (#40351)
fix: MR Default Supplier search query

(cherry picked from commit c0a1f298a1)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-03-11 11:07:40 +05:30
mergify[bot]
7d3d2eb928 ci: add prettier to pre-commit (backport #40206) (#40362)
* ci: add prettier to pre-commit

(cherry picked from commit 2c16036ef3)

* style: format js files

---------

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-03-11 10:47:18 +05:30
Deepesh Garg
5f789d9abe Merge pull request #40364 from frappe/mergify/bp/version-15-hotfix/pr-40344
fix: get_user_default_as_list args order (#40344)
2024-03-10 22:32:45 +05:30
Devin Slauenwhite
44ff607dcd fix: get_user_default_as_list args order
(cherry picked from commit ac1961b687)
2024-03-10 15:45:35 +00:00
Deepesh Garg
54fd9ec21e Merge pull request #40358 from frappe/mergify/bp/version-15-hotfix/pr-40323
fix: Filter for projects in Sales Cycle (#40323)
2024-03-10 21:11:55 +05:30
Deepesh Garg
399c5629f4 Merge pull request #40360 from frappe/mergify/bp/version-15-hotfix/pr-40325
fix: Sender email in process statements of accounts (#40325)
2024-03-10 19:57:06 +05:30
Deepesh Garg
953f64091a fix: Sender email in process statements of accounts
(cherry picked from commit 65a2f3d12c)
2024-03-10 13:58:04 +00:00
Deepesh Garg
173b3b85f6 fix: Filter for projects in Sales Cycle
(cherry picked from commit d0e0b66b2f)
2024-03-10 13:57:13 +00:00
Deepesh Garg
8b5afbbaca Merge pull request #40356 from frappe/mergify/bp/version-15-hotfix/pr-40355
fix: Blanket order rate getting changed on converting to order (#40355)
2024-03-10 19:26:24 +05:30
Deepesh Garg
df1a51e291 Merge pull request #40337 from frappe/mergify/bp/version-15-hotfix/pr-40334
fix: load ignored doctype and include Mode of Payment Account (#40334)
2024-03-10 19:25:09 +05:30
Deepesh Garg
d8c6eb0bf2 fix: Blanket order rate getting changed on converting to order
(cherry picked from commit 9702a65a0f)
2024-03-10 13:14:59 +00:00
ruthra kumar
b6e90c4973 Merge pull request #40354 from frappe/mergify/bp/version-15-hotfix/pr-39681
fix: incorrect advance paid in Sales/Purchase Order (backport #39681)
2024-03-10 17:15:15 +05:30
ruthra kumar
b8582db124 chore: resolve conflicts 2024-03-10 16:52:02 +05:30
ruthra kumar
d6a3b179ec refactor(test): make sure party has USD account
1. Don't reset 'party_account_currency' of SO/PO  upon Payment Entry
cancellation. This happens when there are no payments against a SO/PO

(cherry picked from commit e52c4c8f22)
2024-03-10 11:09:54 +00:00
ruthra kumar
6a5a941a5a fix: advance paid amount and ledger entries against SO/PO
(cherry picked from commit d9a0494fc3)

# Conflicts:
#	erpnext/accounts/utils.py
2024-03-10 11:09:53 +00:00
ruthra kumar
9317adfa33 refactor(test): use get_party_account for reference details section
(cherry picked from commit cb2529cec8)
2024-03-10 11:09:53 +00:00
ruthra kumar
d3039be5bc refactor(test): reference details will have account
(cherry picked from commit 158112896e)
2024-03-10 11:09:52 +00:00
ruthra kumar
6832908e92 fix: incorrect advance paid in Sales/Purchase Order
(cherry picked from commit 9d9b83362a)
2024-03-10 11:09:52 +00:00
Nihantra C. Patel
5fac50036a fix: load ignored doctype and include Mode of Payment Account (#40334)
(cherry picked from commit 68baa3612a)
2024-03-07 12:14:18 +00:00
Frappe PR Bot
3035dcab07 chore(release): Bumped to Version 15.16.2
## [15.16.2](https://github.com/frappe/erpnext/compare/v15.16.1...v15.16.2) (2024-03-07)

### Bug Fixes

* use serial/batch field for rejected items (backport [#40327](https://github.com/frappe/erpnext/issues/40327)) (backport [#40329](https://github.com/frappe/erpnext/issues/40329)) ([#40332](https://github.com/frappe/erpnext/issues/40332)) ([5af335d](5af335dc33))
2024-03-07 09:25:12 +00:00
mergify[bot]
5af335dc33 fix: use serial/batch field for rejected items (backport #40327) (backport #40329) (#40332)
fix: use serial/batch field for rejected items (backport #40327) (#40329)

fix: use serial/batch field for rejected items (#40327)

(cherry picked from commit 01856a6e9d)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-03-07 14:53:29 +05:30
mergify[bot]
7ca72423b9 fix: use serial/batch field for rejected items (backport #40327) (#40329)
fix: use serial/batch field for rejected items (#40327)

(cherry picked from commit 01856a6e9d)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-07 14:36:59 +05:30
Raffael Meyer
9b4a1b0a69 Merge pull request #40321 from frappe/mergify/bp/version-15-hotfix/pr-40317
fix(Shipment Parcel): make length, width and height non-mandatory (backport #40317)
2024-03-06 19:49:56 +01:00
barredterra
1476196966 fix(Shipment Parcel): make length, width and height non-mandatory
It's tedious to enter all these values and some shipping providers only need to know the weigth and quantity. Companies can alwas cutomize the values to be mandatory, but the reverse is not possible. I'll make sure that the erpnext-shipping app does not break because of this (or fix any problems).

(cherry picked from commit 898c6e30eb)
2024-03-06 18:26:18 +00:00
Frappe PR Bot
643189a0ce chore(release): Bumped to Version 15.16.1
## [15.16.1](https://github.com/frappe/erpnext/compare/v15.16.0...v15.16.1) (2024-03-06)

### Bug Fixes

* batch no not copied while making Material Consumption entry (backport [#40290](https://github.com/frappe/erpnext/issues/40290)) (backport [#40300](https://github.com/frappe/erpnext/issues/40300)) ([#40303](https://github.com/frappe/erpnext/issues/40303)) ([f21918d](f21918d06c))
* not able to cancel purchase receipt for old subcontracting flow (backport [#40298](https://github.com/frappe/erpnext/issues/40298)) (backport [#40302](https://github.com/frappe/erpnext/issues/40302)) ([#40305](https://github.com/frappe/erpnext/issues/40305)) ([3814c5a](3814c5a54a))
* stock ledger balance qty for the batch (backport [#40274](https://github.com/frappe/erpnext/issues/40274)) (backport [#40301](https://github.com/frappe/erpnext/issues/40301)) ([#40304](https://github.com/frappe/erpnext/issues/40304)) ([539eb79](539eb794c0))
* use serial batch fields for subcontracting receipt (backport [#40311](https://github.com/frappe/erpnext/issues/40311)) (backport [#40315](https://github.com/frappe/erpnext/issues/40315)) ([#40316](https://github.com/frappe/erpnext/issues/40316)) ([e357497](e357497bcb))
2024-03-06 14:48:42 +00:00
mergify[bot]
e357497bcb fix: use serial batch fields for subcontracting receipt (backport #40311) (backport #40315) (#40316)
fix: use serial batch fields for subcontracting receipt (backport #40311) (#40315)

fix: use serial batch fields for subcontracting receipt (#40311)

(cherry picked from commit cef6291311)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-03-06 20:17:30 +05:30
mergify[bot]
f21918d06c fix: batch no not copied while making Material Consumption entry (backport #40290) (backport #40300) (#40303)
fix: batch no not copied while making Material Consumption entry (backport #40290) (#40300)

fix: batch no not copied while making Material Consumption entry (#40290)

(cherry picked from commit 1eaa386657)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-03-06 20:17:20 +05:30
mergify[bot]
539eb794c0 fix: stock ledger balance qty for the batch (backport #40274) (backport #40301) (#40304)
fix: stock ledger balance qty for the batch (backport #40274) (#40301)

fix: stock ledger balance qty for the batch (#40274)

(cherry picked from commit e178ffc3c1)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-03-06 20:17:09 +05:30
mergify[bot]
3814c5a54a fix: not able to cancel purchase receipt for old subcontracting flow (backport #40298) (backport #40302) (#40305)
fix: not able to cancel purchase receipt for old subcontracting flow (backport #40298) (#40302)

fix: not able to cancel purchase receipt for old subcontracting flow (#40298)

(cherry picked from commit 48da952fd7)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-03-06 20:17:01 +05:30
mergify[bot]
4b15c00b11 fix: use serial batch fields for subcontracting receipt (backport #40311) (#40315)
fix: use serial batch fields for subcontracting receipt (#40311)

(cherry picked from commit cef6291311)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-06 19:59:21 +05:30
mergify[bot]
7001e0a820 fix(accounts): Allow setting Number of new Cost Center (backport #40212) (#40314)
fix(accounts): Allow setting Number of new Cost Center (#40212)

(cherry picked from commit a93d14b3f7)

Co-authored-by: Corentin Flr <10946971+cogk@users.noreply.github.com>
2024-03-06 19:49:42 +05:30
mergify[bot]
e0e80f7eed fix: not able to cancel purchase receipt for old subcontracting flow (backport #40298) (#40302)
fix: not able to cancel purchase receipt for old subcontracting flow (#40298)

(cherry picked from commit 48da952fd7)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-06 13:16:57 +05:30
mergify[bot]
62aefcef04 fix: stock ledger balance qty for the batch (backport #40274) (#40301)
fix: stock ledger balance qty for the batch (#40274)

(cherry picked from commit e178ffc3c1)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-06 13:06:19 +05:30
mergify[bot]
6d1c144a66 fix: batch no not copied while making Material Consumption entry (backport #40290) (#40300)
fix: batch no not copied while making Material Consumption entry (#40290)

(cherry picked from commit 1eaa386657)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-06 13:06:12 +05:30
Frappe PR Bot
eb9b2e896e chore(release): Bumped to Version 15.16.0
# [15.16.0](https://github.com/frappe/erpnext/compare/v15.15.0...v15.16.0) (2024-03-06)

### Bug Fixes

* allow editable accounting dimensions for repostable doctypes ([cd24a2a](cd24a2a05d))
* allow gain/loss for Journals against Journals ([d8cf6ba](d8cf6ba38d))
* check child rows before update ([e20c1ac](e20c1acb6e))
* disable editable account heads ([c55c0f7](c55c0f7173))
* do not allow to cancel incomplete reposting (backport [#40224](https://github.com/frappe/erpnext/issues/40224)) ([#40230](https://github.com/frappe/erpnext/issues/40230)) ([63209f4](63209f4eac))
* don't override reference exchange rate ([4513d83](4513d83f22))
* handle partial invoice against provisional entry ([87596e6](87596e6e29))
* ignore self on GL account validation for Bank Account ([1947a67](1947a67f3d))
* include Debit To/Credit To account while fetching advance ([23d7a1f](23d7a1fc76))
* incorrect exchange rate if JE has multi parties ([b785901](b785901efa))
* incorrect TCS on customer and suppliers with same name ([d74647d](d74647d5a5))
* make use of 'flt' to prevent really low precision exc gain/loss ([9057bff](9057bff786))
* make warning for previously existing SO an alert ([4f9b194](4f9b194fe9))
* over billing qty along with rate ([00d410c](00d410cc1d))
* **Project:** filter department by company ([13e3343](13e334398e))
* provisional reverse entry amount ([0182b95](0182b95230))
* rate change on changing of the qty (backport [#40241](https://github.com/frappe/erpnext/issues/40241)) ([#40243](https://github.com/frappe/erpnext/issues/40243)) ([1d42171](1d421713be))
* remove free item row only if pricing rule matches ([6352bfe](6352bfe34e))
* report path from the Item and Putaway Rule list (backport [#40190](https://github.com/frappe/erpnext/issues/40190)) ([#40266](https://github.com/frappe/erpnext/issues/40266)) ([c7b96df](c7b96df69c))
* serial no valuation rate (backport [#40221](https://github.com/frappe/erpnext/issues/40221)) ([#40223](https://github.com/frappe/erpnext/issues/40223)) ([85ae9ee](85ae9eee25))
* **setup:** avoid duplicate entry for Analytics role (backport [#40183](https://github.com/frappe/erpnext/issues/40183)) ([#40185](https://github.com/frappe/erpnext/issues/40185)) ([9cb8d33](9cb8d33923))
* test for repost accounting in JVs ([1634955](16349553c7))
* test for reposting pi ([6230bbc](6230bbc77d))
* uom wise price in sales or purchase transaction (backport [#40216](https://github.com/frappe/erpnext/issues/40216)) ([#40225](https://github.com/frappe/erpnext/issues/40225)) ([b398cc6](b398cc6579))

### Features

* add company filter to child table field ([0ede99b](0ede99b3cb))
* add patch for making repostable dimension fields editable ([4b57126](4b5712688a))
* allow on submit for selected fields ([6c3b5bb](6c3b5bb402))
* repost ledger button in JV ([e5eeb21](e5eeb216e8))
* update after submit in JV ([cdab3fa](cdab3fa970))
* validate before allowing repost ([8585cfc](8585cfc533))

### Performance Improvements

* serial and batch bundle valuation (reposting) (backport [#40255](https://github.com/frappe/erpnext/issues/40255)) ([#40262](https://github.com/frappe/erpnext/issues/40262)) ([93f3af7](93f3af7dba))
2024-03-06 03:31:25 +00:00
Deepesh Garg
5e89676d05 Merge pull request #40280 from frappe/version-15-hotfix
chore: release v15
2024-03-06 09:00:14 +05:30
ruthra kumar
50e49bef85 Merge pull request #40284 from frappe/mergify/bp/version-15-hotfix/pr-40278
fix: incorrect TCS on customer and suppliers with same name (backport #40278)
2024-03-05 15:48:25 +05:30
ruthra kumar
d74647d5a5 fix: incorrect TCS on customer and suppliers with same name
(cherry picked from commit 9904a9868c)
2024-03-05 09:54:46 +00:00
mergify[bot]
ee119f30fb chore: fixed fetch from (backport #40270) (#40275)
chore: fixed fetch from (#40270)

(cherry picked from commit 34051bc04f)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-05 14:32:36 +05:30
mergify[bot]
c7b96df69c fix: report path from the Item and Putaway Rule list (backport #40190) (#40266)
fix: report path from the Item and Putaway Rule list (#40190)

(cherry picked from commit 8e2f9787c1)

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-03-04 20:03:42 +05:30
mergify[bot]
63209f4eac fix: do not allow to cancel incomplete reposting (backport #40224) (#40230)
* fix: do not allow to cancel incomplete reposting (#40224)

(cherry picked from commit 72ac56b6c4)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-04 13:14:21 +05:30
mergify[bot]
93f3af7dba perf: serial and batch bundle valuation (reposting) (backport #40255) (#40262)
* perf: serial and batch bundle valuation (reposting) (#40255)

perf: serial and batch bundle valuation
(cherry picked from commit 6379238893)

* chore: fix styles

* chore: fix linters

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-04 13:13:49 +05:30
Gursheen Kaur Anand
0b1417e891 Merge pull request #40256 from GursheenK/editable-journals-v15
feat: editable journals v15
2024-03-04 11:15:41 +05:30
Gursheen Anand
16349553c7 fix: test for repost accounting in JVs 2024-03-04 00:25:57 +05:30
Gursheen Anand
4b5712688a feat: add patch for making repostable dimension fields editable 2024-03-04 00:25:54 +05:30
Gursheen Anand
cd24a2a05d fix: allow editable accounting dimensions for repostable doctypes 2024-03-04 00:24:32 +05:30
Gursheen Anand
c55c0f7173 fix: disable editable account heads 2024-03-04 00:24:26 +05:30
Gursheen Anand
6230bbc77d fix: test for reposting pi 2024-03-04 00:18:09 +05:30
Gursheen Anand
e20c1acb6e fix: check child rows before update 2024-03-04 00:18:09 +05:30
Gursheen Anand
6173654093 chore: correct typo 2024-03-04 00:18:09 +05:30
Gursheen Anand
b0be08f05d test: reposting entries for JV 2024-03-04 00:18:09 +05:30
Gursheen Anand
7aeb53a806 refactor: use qb for JV tests 2024-03-04 00:18:09 +05:30
Gursheen Anand
e5eeb216e8 feat: repost ledger button in JV 2024-03-04 00:18:09 +05:30
Gursheen Anand
8585cfc533 feat: validate before allowing repost 2024-03-04 00:18:04 +05:30
Gursheen Anand
a512ec7af5 refactor: better abstraction for controller code 2024-03-04 00:16:39 +05:30
Gursheen Anand
cdab3fa970 feat: update after submit in JV 2024-03-04 00:16:32 +05:30
Gursheen Anand
6c3b5bb402 feat: allow on submit for selected fields 2024-03-04 00:14:28 +05:30
Gursheen Anand
db7348a1de refactor: remove controller logic for setting balances 2024-03-04 00:13:32 +05:30
Gursheen Anand
84672e2275 refactor: exclude balances while setting currency 2024-03-04 00:13:32 +05:30
Gursheen Anand
c68939a0e0 refactor: exclude balance while setting acc details 2024-03-04 00:13:32 +05:30
Gursheen Anand
0c234e5c1a refactor: remove balance formatter 2024-03-04 00:13:32 +05:30
Gursheen Anand
689f277d13 refactor: remove balance fields from jv account 2024-03-04 00:11:23 +05:30
Gursheen Kaur Anand
328728e3a4 Merge pull request #40252 from frappe/mergify/bp/version-15-hotfix/pr-40250
fix(minor): company filter in cost center allocation (backport #40250)
2024-03-03 18:24:27 +05:30
Gursheen Anand
0ede99b3cb feat: add company filter to child table field
(cherry picked from commit 51909077bd)
2024-03-03 12:45:39 +00:00
Gursheen Kaur Anand
d130aadcf3 Merge pull request #40205 from frappe/mergify/bp/version-15-hotfix/pr-39584
fix: use receipt amount for reverse provisional entry (backport #39584)
2024-03-03 17:55:31 +05:30
mergify[bot]
1d421713be fix: rate change on changing of the qty (backport #40241) (#40243)
fix: rate change on changing of the qty (#40241)

(cherry picked from commit e7d707797a)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-02 16:50:01 +05:30
ruthra kumar
0b091aaf14 Merge pull request #40239 from frappe/mergify/bp/version-15-hotfix/pr-40220
refactor: Gain/Loss Journal creation for Journals against Journals (backport #40220)
2024-03-02 15:57:18 +05:30
ruthra kumar
e5fdca7b05 test: gain/loss on Journals against Journals
(cherry picked from commit 8a5078b826)
2024-03-02 10:08:19 +00:00
ruthra kumar
d8cf6ba38d fix: allow gain/loss for Journals against Journals
(cherry picked from commit 5b67631d40)
2024-03-02 10:08:19 +00:00
ruthra kumar
9057bff786 fix: make use of 'flt' to prevent really low precision exc gain/loss
(cherry picked from commit 0aa72f841d)
2024-03-02 10:08:18 +00:00
ruthra kumar
014d21a050 Merge pull request #40233 from frappe/mergify/bp/version-15-hotfix/pr-40149
fix: incorrect exchange rate if JE has multi parties (backport #40149)
2024-03-02 14:35:25 +05:30
ruthra kumar
05e4d1c240 test: exchange rate fetch on JE with multiple forex parties
(cherry picked from commit ed95d41a51)
2024-03-02 08:22:47 +00:00
ruthra kumar
4513d83f22 fix: don't override reference exchange rate
(cherry picked from commit eaac02655b)
2024-03-02 08:22:47 +00:00
ruthra kumar
b785901efa fix: incorrect exchange rate if JE has multi parties
(cherry picked from commit 694c17487d)
2024-03-02 08:22:45 +00:00
mergify[bot]
b398cc6579 fix: uom wise price in sales or purchase transaction (backport #40216) (#40225)
fix: uom wise price in sales or purchase transaction (#40216)

fix: uom wise price
(cherry picked from commit 13b05aa7fb)

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-03-02 13:00:52 +05:30
mergify[bot]
85ae9eee25 fix: serial no valuation rate (backport #40221) (#40223)
fix: serial no valuation rate (#40221)

(cherry picked from commit a5232d9c10)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-03-01 22:48:15 +05:30
ruthra kumar
70ab25a611 Merge pull request #40201 from frappe/mergify/bp/version-15-hotfix/pr-40197
fix: ignore self on GL account validation for Bank Account (backport #40197)
2024-03-01 09:45:39 +05:30
Raffael Meyer
0d8358bdd1 Merge pull request #40210 from frappe/mergify/bp/version-15-hotfix/pr-40203
fix(Project): filter department by company (backport #40203)
2024-02-29 23:34:38 +01:00
barredterra
13e334398e fix(Project): filter department by company
(cherry picked from commit 5e736f0d06)
2024-02-29 17:30:05 +00:00
Gursheen Anand
823abfd6e0 test: partial billing for provisional accounting
(cherry picked from commit c5770f2ecc)
2024-02-29 15:48:36 +00:00
Gursheen Anand
e55dc2a7c0 test: overbilling for provisional accounting
(cherry picked from commit ff3ca50a4b)
2024-02-29 15:48:36 +00:00
Gursheen Anand
00d410cc1d fix: over billing qty along with rate
(cherry picked from commit cc96d2b50c)
2024-02-29 15:48:36 +00:00
Gursheen Anand
87596e6e29 fix: handle partial invoice against provisional entry
(cherry picked from commit 2a46799188)
2024-02-29 15:48:36 +00:00
Gursheen Anand
0182b95230 fix: provisional reverse entry amount
(cherry picked from commit 3e59c66806)
2024-02-29 15:48:36 +00:00
ruthra kumar
1947a67f3d fix: ignore self on GL account validation for Bank Account
(cherry picked from commit 3c19186654)
2024-02-29 14:25:48 +00:00
ruthra kumar
8720115f01 Merge pull request #40199 from frappe/mergify/bp/version-15-hotfix/pr-40196
fix: include debit_to or credit_to account while fetching advance on Sales/Purchase Invoice (backport #40196)
2024-02-29 19:54:45 +05:30
ruthra kumar
a5b3c1e7cb test: advance pulling logic on Sales/Purchase Invoice
(cherry picked from commit 646e9ca0dd)
2024-02-29 12:22:48 +00:00
ruthra kumar
23d7a1fc76 fix: include Debit To/Credit To account while fetching advance
(cherry picked from commit 3327599c9d)
2024-02-29 12:22:48 +00:00
Gursheen Kaur Anand
c7ca929ddb Merge pull request #40189 from frappe/mergify/bp/version-15-hotfix/pr-40176
fix(minor): make warning for previously existing SO an alert (backport #40176)
2024-02-29 11:59:36 +05:30
Gursheen Anand
4f9b194fe9 fix: make warning for previously existing SO an alert
(cherry picked from commit 24dcd64c16)
2024-02-29 06:04:16 +00:00
Gursheen Kaur Anand
cda1c5ca10 Merge pull request #40182 from frappe/mergify/bp/version-15-hotfix/pr-40174
fix: promotional scheme remove free item if pricing rule matches (backport #40174)
2024-02-29 11:34:00 +05:30
mergify[bot]
9cb8d33923 fix(setup): avoid duplicate entry for Analytics role (backport #40183) (#40185)
fix(setup): avoid duplicate entry for Analytics role (#40183)

(cherry picked from commit 29f91a7919)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2024-02-29 11:09:24 +05:30
Gursheen Anand
6352bfe34e fix: remove free item row only if pricing rule matches
(cherry picked from commit fea20db262)
2024-02-29 04:49:35 +00:00
Frappe PR Bot
23011df86b chore(release): Bumped to Version 15.15.0
# [15.15.0](https://github.com/frappe/erpnext/compare/v15.14.7...v15.15.0) (2024-02-28)

### Bug Fixes

* add flags for repost to ensure correct accounting from India Compliance App ([7d14ecf](7d14ecfcb8))
* amount label according to party type ([d541ba3](d541ba3e61))
* Cannot read properties of undefined (backport [#40081](https://github.com/frappe/erpnext/issues/40081)) ([#40083](https://github.com/frappe/erpnext/issues/40083)) ([53d943e](53d943ec70))
* capacity planning issue in the job card (backport [#40092](https://github.com/frappe/erpnext/issues/40092)) ([#40101](https://github.com/frappe/erpnext/issues/40101)) ([27703b5](27703b54bd))
* change label name ([824df72](824df72eeb))
* check for pricing rules on item ([32d9642](32d9642379))
* check_credit_limit on_update_after_submit of Sales Order ([83d7111](83d7111649))
* communication_date in party dashboards (backport [#40005](https://github.com/frappe/erpnext/issues/40005)) ([#40021](https://github.com/frappe/erpnext/issues/40021)) ([4269ef8](4269ef8c98))
* Completed Work Orders report not working ([ca03e9c](ca03e9cfd3))
* Cr/Dr notes with POS Payments ([2e07b03](2e07b03307))
* currency symbol in landed cost voucher and material request (backport [#40138](https://github.com/frappe/erpnext/issues/40138)) ([#40141](https://github.com/frappe/erpnext/issues/40141)) ([57bb031](57bb031602))
* Data too long for column 'serial_no' at row 1 (backport [#40098](https://github.com/frappe/erpnext/issues/40098)) ([#40139](https://github.com/frappe/erpnext/issues/40139)) ([9d19ec4](9d19ec43c8))
* default taxable value for item not found in item list ([7e43f6b](7e43f6b7e0))
* delete PLE containing invoice in against ([190bd45](190bd45bd7))
* do not make MR against raw materials of available sub assemblies (backport [#40085](https://github.com/frappe/erpnext/issues/40085)) ([#40087](https://github.com/frappe/erpnext/issues/40087)) ([cf5fa21](cf5fa210bb))
* Fiscal Year exception on demo data setup ([56ee843](56ee843233))
* incorrect item name in MR (backport [#40018](https://github.com/frappe/erpnext/issues/40018)) ([#40024](https://github.com/frappe/erpnext/issues/40024)) ([9f8f3db](9f8f3db953))
* Issues regarding asset cancellation and deletion ([8eb2f67](8eb2f67910))
* negative stock error while making stock reconciliation (backport [#40016](https://github.com/frappe/erpnext/issues/40016)) ([#40026](https://github.com/frappe/erpnext/issues/40026)) ([c964c45](c964c45f4e))
* on unreconciliation, update advance paid ([4d1f56c](4d1f56c4bd))
* only check for delinked PLEs ([a75a69a](a75a69a01e))
* only consider contributed qty towards achieved targets ([194f46b](194f46be57))
* parent warehouse checks in the production plan for sub-assemblies (backport [#40150](https://github.com/frappe/erpnext/issues/40150)) ([#40157](https://github.com/frappe/erpnext/issues/40157)) ([4784117](4784117a8f))
* remove cancelled payment entry from Payment Period Based On Invoice Date ([72da308](72da3083e6))
* remove cancelled payment entry from PPBOID report ([0be5203](0be520331c))
* remove config for default bank account in test ([36b442a](36b442a951))
* remove microsecond from posting datetime (backport [#40017](https://github.com/frappe/erpnext/issues/40017)) ([#40022](https://github.com/frappe/erpnext/issues/40022)) ([eaa3849](eaa3849df4))
* removed unwanted patch ([ee2d108](ee2d108bef))
* resolved conflict ([6928674](692867427c))
* resolved conflict ([a0c0ab7](a0c0ab7709))
* skip max discount validation for rate adjustment ([3b96aae](3b96aaeead))
* skip SO & DN validation for debit note ([cd42089](cd42089e20))
* Supplier users not able to see RFQ on the Portal (backport [#40161](https://github.com/frappe/erpnext/issues/40161)) ([#40165](https://github.com/frappe/erpnext/issues/40165)) ([6a63a6c](6a63a6c98a))
* timesheet per billed state edge case (backport [#40010](https://github.com/frappe/erpnext/issues/40010)) ([#40029](https://github.com/frappe/erpnext/issues/40029)) ([a543bf4](a543bf47ef))
* translatable columns in Sales Pipeline Analytics report ([1c5a7e2](1c5a7e29f2))
* type error for missing frm obj ([6b5e1cf](6b5e1cfeb7))
* unique gl account for plaid bank accounts ([65853da](65853da505))
* use correct variable name on hotfix branches ([0694fd1](0694fd19fd))
* use frm instead of cur_frm ([341f903](341f9030f5))
* use serial batch fields for packed items (backport [#40140](https://github.com/frappe/erpnext/issues/40140)) ([#40142](https://github.com/frappe/erpnext/issues/40142)) ([1860399](1860399ccb))

### Features

* show contributed qty in transaction summary ([38abfdb](38abfdb8ae))
* update billed amount in PO and PR ([e7e8149](e7e8149fbe))

### Performance Improvements

* new column Posting Datetime in SLE to optimize stock ledger related queries (backport [#39800](https://github.com/frappe/erpnext/issues/39800)) ([#40004](https://github.com/frappe/erpnext/issues/40004)) ([b9181e8](b9181e85dc))
2024-02-28 05:13:40 +00:00
Deepesh Garg
4291b9fa8d Merge pull request #40148 from frappe/version-15-hotfix
chore: release v15
2024-02-28 10:42:31 +05:30
Deepesh Garg
930df21a5f Merge pull request #40170 from frappe/mergify/bp/version-15-hotfix/pr-40137
fix: default taxable value for item not found in item list (#40137)
2024-02-28 08:24:15 +05:30
mergify[bot]
6a63a6c98a fix: Supplier users not able to see RFQ on the Portal (backport #40161) (#40165)
* fix: Supplier users not able to see RFQ on the Portal (#40161)

(cherry picked from commit f8ba560394)

* chore: fix travis

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-27 22:30:26 +05:30
ljain112
7e43f6b7e0 fix: default taxable value for item not found in item list
(cherry picked from commit 5885978fc2)
2024-02-27 16:40:19 +00:00
Deepesh Garg
84a359c760 Merge pull request #40163 from vorasmit/ic-deps-v15
fix: add flags for repost to ensure correct accounting from India Compliance App (#40162)
2024-02-27 22:08:45 +05:30
Smit Vora
7d14ecfcb8 fix: add flags for repost to ensure correct accounting from India Compliance App 2024-02-27 20:30:28 +05:30
Gursheen Kaur Anand
07fd93a6f6 Merge pull request #40152 from frappe/mergify/bp/version-15-hotfix/pr-40095
fix: unique GL account for plaid bank accounts (backport #40095)
2024-02-27 17:08:37 +05:30
mergify[bot]
4784117a8f fix: parent warehouse checks in the production plan for sub-assemblies (backport #40150) (#40157)
fix: parent warehouse checks in the production plan for sub-assemblies (#40150)

(cherry picked from commit 6f5815e44f)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-27 17:03:21 +05:30
Gursheen Kaur Anand
7a9beb4d47 Merge pull request #40154 from frappe/mergify/bp/version-15-hotfix/pr-40102
feat: toggle updation of billed amount in previous purchase docs (backport #40102)
2024-02-27 16:40:14 +05:30
Gursheen Kaur Anand
87f36ce425 chore: fix typo 2024-02-27 16:24:14 +05:30
Gursheen Kaur Anand
48992cd205 chore: resolve conflicts 2024-02-27 16:18:27 +05:30
Gursheen Kaur Anand
99d1f1d67b chore: resolve conflicts 2024-02-27 16:15:49 +05:30
Gursheen Kaur Anand
eadea0207c chore: resolve conflicts 2024-02-27 16:13:49 +05:30
Gursheen Anand
e67d579ac4 test: pr billed amount against debit note
(cherry picked from commit 6d40844894)
2024-02-27 10:24:01 +00:00
Gursheen Anand
bac2f66344 test: po billed amount against debit note
(cherry picked from commit 81dbfe189e)

# Conflicts:
#	erpnext/buying/doctype/purchase_order/test_purchase_order.py
2024-02-27 10:24:01 +00:00
Gursheen Anand
e7e8149fbe feat: update billed amount in PO and PR
(cherry picked from commit 9f6535472d)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
2024-02-27 10:24:00 +00:00
Gursheen Anand
36b442a951 fix: remove config for default bank account in test
(cherry picked from commit c42444ab3b)
2024-02-27 10:10:20 +00:00
Gursheen Anand
65853da505 fix: unique gl account for plaid bank accounts
(cherry picked from commit bf6e32a960)
2024-02-27 10:10:20 +00:00
Gursheen Kaur Anand
df7afc3154 Merge pull request #40145 from frappe/mergify/bp/version-15-hotfix/pr-40143
fix(minor): type error for missing form object in hide_company util (backport #40143)
2024-02-27 13:33:13 +05:30
Gursheen Anand
341f9030f5 fix: use frm instead of cur_frm
(cherry picked from commit ceeb8fc9e5)
2024-02-27 07:45:36 +00:00
Gursheen Anand
6b5e1cfeb7 fix: type error for missing frm obj
(cherry picked from commit 20fa3da950)
2024-02-27 07:45:36 +00:00
ruthra kumar
9f8a27833a Merge pull request #40135 from frappe/mergify/bp/version-15-hotfix/pr-40133
fix: reset advance amount on unreconciliation of Sales/Purchase Orders (backport #40133)
2024-02-27 10:33:07 +05:30
mergify[bot]
1860399ccb fix: use serial batch fields for packed items (backport #40140) (#40142)
fix: use serial batch fields for packed items (#40140)

(cherry picked from commit bc9c480246)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-27 07:57:37 +05:30
mergify[bot]
57bb031602 fix: currency symbol in landed cost voucher and material request (backport #40138) (#40141)
fix: currency symbol in landed cost voucher and material request (#40138)

(cherry picked from commit 8aa2b7c183)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-26 23:16:49 +05:30
mergify[bot]
9d19ec43c8 fix: Data too long for column 'serial_no' at row 1 (backport #40098) (#40139)
* fix: Data too long for column 'serial_no' at row 1 (#40098)

(cherry picked from commit 08caa7cfa1)

# Conflicts:
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-26 23:00:01 +05:30
ruthra kumar
0694fd19fd fix: use correct variable name on hotfix branches 2024-02-26 20:35:22 +05:30
ruthra kumar
94bb6241ef test: advance paid update on sales/purchase order unreconciliation
(cherry picked from commit 1f01ff3487)
2024-02-26 12:22:55 +00:00
ruthra kumar
4d1f56c4bd fix: on unreconciliation, update advance paid
(cherry picked from commit c9e2f03a3a)
2024-02-26 12:22:55 +00:00
ruthra kumar
ad53633c66 Merge pull request #40118 from frappe/mergify/bp/version-15-hotfix/pr-40113
refactor: patch to setup dimensions in Reconciliation tool (backport #40113)
2024-02-26 14:21:40 +05:30
ruthra kumar
2bf6125b71 refactor: patch to setup dimensions in Reconciliation tool
(cherry picked from commit 461fb183fc)
2024-02-26 13:08:47 +05:30
Frappe PR Bot
792de1be03 chore(release): Bumped to Version 15.14.7
## [15.14.7](https://github.com/frappe/erpnext/compare/v15.14.6...v15.14.7) (2024-02-26)

### Bug Fixes

* Issues regarding asset cancellation and deletion ([6fc4dac](6fc4dac4db))
* removed unwanted patch ([3c98368](3c98368e45))
* resolved conflict ([fc565ec](fc565ecd99))
* resolved conflict ([d196aa5](d196aa5a36))
2024-02-26 07:33:28 +00:00
Nabin Hait
66156fcfa7 Merge pull request #40031 from frappe/mergify/bp/version-15/pr-39983
fix: Issues regarding asset cancellation and deletion (backport #39983)
2024-02-26 13:02:20 +05:30
Nabin Hait
fc565ecd99 fix: resolved conflict 2024-02-26 12:21:57 +05:30
Nabin Hait
d196aa5a36 fix: resolved conflict 2024-02-26 12:21:25 +05:30
Gursheen Kaur Anand
e68d2d1c7a Merge pull request #40109 from frappe/mergify/bp/version-15-hotfix/pr-40105
fix(minor): tax amount label according to party type (backport #40105)
2024-02-26 11:10:08 +05:30
Gursheen Kaur Anand
93f64396ac Merge pull request #40111 from frappe/mergify/bp/version-15-hotfix/pr-40062
fix: sales person / partner achieved targets in report (backport #40062)
2024-02-26 11:08:15 +05:30
Gursheen Anand
91c21d13e5 test: sales person target variance
(cherry picked from commit 7566c1ee78)
2024-02-26 05:09:45 +00:00
Gursheen Anand
38abfdb8ae feat: show contributed qty in transaction summary
(cherry picked from commit a823f16dff)
2024-02-26 05:09:45 +00:00
Gursheen Anand
194f46be57 fix: only consider contributed qty towards achieved targets
(cherry picked from commit 339698d172)
2024-02-26 05:09:45 +00:00
Gursheen Anand
d541ba3e61 fix: amount label according to party type
(cherry picked from commit 9c8d103d8a)
2024-02-26 05:05:27 +00:00
mergify[bot]
27703b54bd fix: capacity planning issue in the job card (backport #40092) (#40101)
fix: capacity planning issue in the job card (#40092)

* fix: capacity planning issue in the job card

* test: test case to test capacity planning for workstation

(cherry picked from commit 75f8464724)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-25 19:22:51 +05:30
ruthra kumar
9ffbf5623a Merge pull request #40097 from frappe/mergify/bp/version-15-hotfix/pr-40096
fix: Fiscal Year exception on demo data setup (backport #40096)
2024-02-25 16:09:51 +05:30
ruthra kumar
56ee843233 fix: Fiscal Year exception on demo data setup
(cherry picked from commit 3c3c57c674)
2024-02-25 10:13:09 +00:00
ruthra kumar
383dfdd4ab Merge pull request #40091 from frappe/mergify/bp/version-15-hotfix/pr-40073
refactor: update payments section on item removal (backport #40073)
2024-02-25 09:34:42 +05:30
ruthra kumar
5c269a9947 refactor: update payments section on item removal
(cherry picked from commit 406793a6ff)
2024-02-25 03:58:19 +00:00
mergify[bot]
cf5fa210bb fix: do not make MR against raw materials of available sub assemblies (backport #40085) (#40087)
fix: do not make MR against raw materials of available sub assemblies (#40085)

(cherry picked from commit 4c9048fb39)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-24 21:02:17 +05:30
mergify[bot]
53d943ec70 fix: Cannot read properties of undefined (backport #40081) (#40083)
fix: Cannot read properties of undefined

(cherry picked from commit 44ed52c5cf)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2024-02-24 17:04:36 +05:30
rohitwaghchaure
d755b9d38c Merge pull request #40080 from frappe/mergify/bp/version-15-hotfix/pr-40079
chore: change label name (backport #40079)
2024-02-24 13:29:04 +05:30
Rohit Waghchaure
824df72eeb fix: change label name
(cherry picked from commit 635174f1ce)
2024-02-24 07:40:56 +00:00
Gursheen Kaur Anand
e4baacd79e Merge pull request #40066 from frappe/mergify/bp/version-15-hotfix/pr-40040
fix: skip max discount validation for rate adjustment (backport #40040)
2024-02-23 15:10:38 +05:30
Gursheen Kaur Anand
38b384dfa2 Merge pull request #40064 from frappe/mergify/bp/version-15-hotfix/pr-40035
fix: delete PLE containing invoice in against (backport #40035)
2024-02-23 15:07:48 +05:30
ruthra kumar
10fe201bc8 Merge pull request #40068 from frappe/mergify/bp/version-15-hotfix/pr-39830
fix: check_credit_limit on_update_after_submit of Sales Order (backport #39830)
2024-02-23 14:48:08 +05:30
ruthra kumar
bcb280c5e8 test: credit limit on update after submit
(cherry picked from commit 467c0898e9)
2024-02-23 08:51:39 +00:00
Nihantra C. Patel
83d7111649 fix: check_credit_limit on_update_after_submit of Sales Order
(cherry picked from commit 17452b7693)
2024-02-23 08:51:38 +00:00
Gursheen Anand
cd42089e20 fix: skip SO & DN validation for debit note
(cherry picked from commit e2d16955dd)
2024-02-23 07:28:38 +00:00
Gursheen Anand
3b96aaeead fix: skip max discount validation for rate adjustment
(cherry picked from commit 5a3b133d65)
2024-02-23 07:28:37 +00:00
Ankush Menat
83b4cc5091 build: specify frappe dependency (#40061)
build: specify frappe dependency 

Added 15.10 as dependency because stock balance depends on https://github.com/frappe/frappe/pull/24346
2024-02-23 12:43:01 +05:30
Gursheen Anand
a75a69a01e fix: only check for delinked PLEs
(cherry picked from commit 146c5b3e16)
2024-02-23 07:10:08 +00:00
Gursheen Anand
190bd45bd7 fix: delete PLE containing invoice in against
(cherry picked from commit c1e1fd8829)
2024-02-23 07:10:08 +00:00
ruthra kumar
c752bec2d9 Merge pull request #40058 from frappe/mergify/bp/version-15-hotfix/pr-40011
fix: Ledger entries for Cr/Dr notes with POS Payments (backport #40011)
2024-02-23 06:20:30 +05:30
ruthra kumar
8fef484f0f Merge pull request #40056 from frappe/mergify/bp/version-15-hotfix/pr-39831
fix: remove cancelled payment entry from Payment Period Based On Invoice Date (backport #39831)
2024-02-23 06:20:14 +05:30
ruthra kumar
b40baf5e63 refactor: skip popup for POS invoices
(cherry picked from commit 3634c4c284)
2024-02-23 00:33:08 +00:00
ruthra kumar
2c8ba892ac test: ledger entries of Cr Note of POS Invoice
(cherry picked from commit 4288713abe)
2024-02-23 00:33:07 +00:00
ruthra kumar
2e07b03307 fix: Cr/Dr notes with POS Payments
(cherry picked from commit 68a23730f3)
2024-02-23 00:33:07 +00:00
Nihantra C. Patel
0be520331c fix: remove cancelled payment entry from PPBOID report
(cherry picked from commit 186cc3d748)
2024-02-23 00:30:50 +00:00
Nihantra C. Patel
72da3083e6 fix: remove cancelled payment entry from Payment Period Based On Invoice Date
(cherry picked from commit a2a8a8f2e0)
2024-02-23 00:30:50 +00:00
ruthra kumar
a3ddd326d6 Merge pull request #40049 from frappe/mergify/bp/version-15-hotfix/pr-39828
fix: translate Sales Pipeline Analytics report (backport #39828)
2024-02-22 20:46:55 +05:30
Nihantra C. Patel
1c5a7e29f2 fix: translatable columns in Sales Pipeline Analytics report
(cherry picked from commit c5050c935b)
2024-02-22 14:54:53 +00:00
Frappe PR Bot
f723d7b561 chore(release): Bumped to Version 15.14.6
## [15.14.6](https://github.com/frappe/erpnext/compare/v15.14.5...v15.14.6) (2024-02-22)

### Bug Fixes

* communication_date in party dashboards (backport [#40005](https://github.com/frappe/erpnext/issues/40005)) ([#40043](https://github.com/frappe/erpnext/issues/40043)) ([6662c32](6662c321a5))
2024-02-22 11:14:07 +00:00
mergify[bot]
6662c321a5 fix: communication_date in party dashboards (backport #40005) (#40043)
fix: accommodate for changed orderby statement

(cherry picked from commit 87df7ff717)

Co-authored-by: Gursheen Anand <gursheen@frappe.io>
2024-02-22 16:40:46 +05:30
mergify[bot]
4269ef8c98 fix: communication_date in party dashboards (backport #40005) (#40021)
fix: accommodate for changed orderby statement

(cherry picked from commit 87df7ff717)

Co-authored-by: Gursheen Anand <gursheen@frappe.io>
2024-02-22 16:20:02 +05:30
mergify[bot]
a543bf47ef fix: timesheet per billed state edge case (backport #40010) (#40029)
fix: timesheet per billed state edge case (#40010)

If value is 100.0000x then it won't set status correctly but will set it the next time it's loaded from db.

(cherry picked from commit 38e88db2c9)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-02-22 12:29:53 +05:30
mergify[bot]
c964c45f4e fix: negative stock error while making stock reconciliation (backport #40016) (#40026)
* fix: negative stock error while making stock reconciliation (#40016)

fix: negative stock error while making stock reco
(cherry picked from commit da184d709b)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-22 11:38:49 +05:30
Nabin Hait
3c98368e45 fix: removed unwanted patch
(cherry picked from commit 85471533e9)
2024-02-22 05:40:58 +00:00
Nabin Hait
6fc4dac4db fix: Issues regarding asset cancellation and deletion
(cherry picked from commit 17f85de6fb)

# Conflicts:
#	erpnext/assets/doctype/asset/depreciation.py
#	erpnext/assets/doctype/asset_capitalization/asset_capitalization.py
2024-02-22 05:40:57 +00:00
Frappe PR Bot
afc87a4486 chore(release): Bumped to Version 15.14.5
## [15.14.5](https://github.com/frappe/erpnext/compare/v15.14.4...v15.14.5) (2024-02-22)

### Bug Fixes

* check for pricing rules on item ([5084b9b](5084b9bd4b))
2024-02-22 05:38:47 +00:00
Deepesh Garg
5137966fe5 Merge pull request #40030 from frappe/mergify/bp/version-15/pr-40019
fix: TypeError for item pricing rules (#39999)
2024-02-22 11:07:32 +05:30
Nabin Hait
6f364df48c Merge pull request #39990 from frappe/mergify/bp/version-15-hotfix/pr-39983
fix: Issues regarding asset cancellation and deletion (backport #39983)
2024-02-22 11:07:01 +05:30
Gursheen Anand
5084b9bd4b fix: check for pricing rules on item
(cherry picked from commit ecd83b12ab)
(cherry picked from commit 32d9642379)
2024-02-22 05:36:43 +00:00
mergify[bot]
eaa3849df4 fix: remove microsecond from posting datetime (backport #40017) (#40022)
fix: remove microsecond from posting datetime (#40017)

(cherry picked from commit 0b04d04da3)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-22 09:51:07 +05:30
mergify[bot]
9f8f3db953 fix: incorrect item name in MR (backport #40018) (#40024)
fix: incorrect item name in MR (#40018)

(cherry picked from commit 864d7ae04c)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-22 09:50:45 +05:30
Gursheen Kaur Anand
43c218c673 Merge pull request #40019 from frappe/mergify/bp/version-15-hotfix/pr-39999
fix: TypeError for item pricing rules (backport #39999)
2024-02-22 09:10:17 +05:30
Gursheen Anand
32d9642379 fix: check for pricing rules on item
(cherry picked from commit ecd83b12ab)
2024-02-22 03:37:17 +00:00
mergify[bot]
b9181e85dc perf: new column Posting Datetime in SLE to optimize stock ledger related queries (backport #39800) (#40004)
* perf: new column posting datetime in SLE to optimize stock ledger related queries

(cherry picked from commit d80ca523a4)

# Conflicts:
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py

* test: test cases to test clash timestamp entries

(cherry picked from commit f04676aaed)

* chore: remove microsecond from posting_datetime

(cherry picked from commit a73ba2c0d2)

* chore: fix conflicts

---------

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2024-02-21 21:14:28 +05:30
rohitwaghchaure
66a05087b8 Merge pull request #40001 from frappe/mergify/bp/version-15-hotfix/pr-39998
fix: Completed Work Orders report not working (backport #39998)
2024-02-21 17:44:44 +05:30
Rohit Waghchaure
ca03e9cfd3 fix: Completed Work Orders report not working
(cherry picked from commit 11f4cb914a)
2024-02-21 11:21:04 +00:00
Nabin Hait
692867427c fix: resolved conflict 2024-02-21 11:38:21 +05:30
Nabin Hait
a0c0ab7709 fix: resolved conflict 2024-02-21 11:37:47 +05:30
Nabin Hait
ee2d108bef fix: removed unwanted patch
(cherry picked from commit 85471533e9)
2024-02-21 05:45:27 +00:00
Nabin Hait
8eb2f67910 fix: Issues regarding asset cancellation and deletion
(cherry picked from commit 17f85de6fb)

# Conflicts:
#	erpnext/assets/doctype/asset/depreciation.py
#	erpnext/assets/doctype/asset_capitalization/asset_capitalization.py
2024-02-21 05:45:27 +00:00
Frappe PR Bot
3d7e87185c chore(release): Bumped to Version 15.14.4
## [15.14.4](https://github.com/frappe/erpnext/compare/v15.14.3...v15.14.4) (2024-02-21)

### Bug Fixes

* 'NoneType' object is not iterable (backport [#39977](https://github.com/frappe/erpnext/issues/39977)) ([#39981](https://github.com/frappe/erpnext/issues/39981)) ([0f87ec1](0f87ec15ad))
* **Bank Transaction:** precision for `(un)allocated_amount` ([bf5d2f5](bf5d2f5fe4))
* batch filter not working in stock ledger report (backport [#39934](https://github.com/frappe/erpnext/issues/39934)) ([#39935](https://github.com/frappe/erpnext/issues/39935)) ([1513595](15135952fc))
* do not empty serial batch fields (backport [#39948](https://github.com/frappe/erpnext/issues/39948)) ([#39956](https://github.com/frappe/erpnext/issues/39956)) ([acd2e93](acd2e93f8c))
* fetch company terms ([14fe0af](14fe0af887))
* float division by zero ([b954bdf](b954bdfdf9))
* group node in warehouse filter in Item-wise Sales Register ([74819b8](74819b8e70))
* **Issue:** create communication ([f5d7fbd](f5d7fbdaf8))
* no need call for company method in sales invoice js ([bef38f7](bef38f74fe))
* not able to make purchase receipt ([3732946](37329469c3))
* party item code in Blanket Order ([518b22b](518b22bffc))
* reposting failed status not updated (backport [#39970](https://github.com/frappe/erpnext/issues/39970)) ([#39972](https://github.com/frappe/erpnext/issues/39972)) ([46f7569](46f7569a54))
* set batch created from bundle to batch field in stock transaction (backport [#39966](https://github.com/frappe/erpnext/issues/39966)) ([#39987](https://github.com/frappe/erpnext/issues/39987)) ([2ee51d3](2ee51d36ff))
* show active bom in the dropdown while making stock entry and MR (backport [#39974](https://github.com/frappe/erpnext/issues/39974)) ([#39976](https://github.com/frappe/erpnext/issues/39976)) ([7201448](720144898f))
* update_dimension is required and not need party account method ([a56d5b8](a56d5b805c))
* use serial batch fields not enabled for new stock entry ([40d4e32](40d4e3261e))
2024-02-21 05:29:45 +00:00
rohitwaghchaure
177110349d Merge pull request #39979 from frappe/version-15-hotfix
chore: release v15
2024-02-21 10:58:33 +05:30
rohitwaghchaure
ed553b89a4 Merge branch 'version-15' into version-15-hotfix 2024-02-21 09:34:20 +05:30
mergify[bot]
2ee51d36ff fix: set batch created from bundle to batch field in stock transaction (backport #39966) (#39987)
fix: set batch created from bundle to batch field in stock transaction (#39966)

* fix: set batch created from bundle to batch field in stock transaction

* fix: validation for serial and batch no

(cherry picked from commit 4b24fcd221)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-21 00:04:01 +05:30
mergify[bot]
0f87ec15ad fix: 'NoneType' object is not iterable (backport #39977) (#39981)
fix: 'NoneType' object is not iterable (#39977)

(cherry picked from commit 8e7d47b3a7)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-20 15:53:12 +05:30
mergify[bot]
720144898f fix: show active bom in the dropdown while making stock entry and MR (backport #39974) (#39976)
fix: show active bom in the dropdown while making stock entry and MR (#39974)

(cherry picked from commit 133f8bd92a)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-20 13:13:00 +05:30
mergify[bot]
46f7569a54 fix: reposting failed status not updated (backport #39970) (#39972)
fix: reposting failed status not updated (#39970)

(cherry picked from commit d4264f7ba1)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-20 12:35:46 +05:30
rohitwaghchaure
a102172982 Merge pull request #39968 from frappe/mergify/bp/version-15-hotfix/pr-39967
fix: float division by zero (backport #39967)
2024-02-20 12:07:38 +05:30
Rohit Waghchaure
b954bdfdf9 fix: float division by zero
(cherry picked from commit e8ae4ed61d)
2024-02-20 01:02:35 +00:00
Frappe PR Bot
9c01a5f7ed chore(release): Bumped to Version 15.14.3
## [15.14.3](https://github.com/frappe/erpnext/compare/v15.14.2...v15.14.3) (2024-02-19)

### Bug Fixes

* do not empty serial batch fields (backport [#39948](https://github.com/frappe/erpnext/issues/39948)) ([#39956](https://github.com/frappe/erpnext/issues/39956)) ([2db79cd](2db79cdf3b))
2024-02-19 05:33:59 +00:00
rohitwaghchaure
0c9d7434f9 Merge pull request #39957 from frappe/mergify/bp/version-15/pr-39956
fix: do not empty serial batch fields (backport #39948) (backport #39956)
2024-02-19 11:02:11 +05:30
mergify[bot]
2db79cdf3b fix: do not empty serial batch fields (backport #39948) (#39956)
fix: do not empty serial batch fields (#39948)

(cherry picked from commit a4cbfabe0e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
(cherry picked from commit acd2e93f8c)
2024-02-19 05:16:58 +00:00
mergify[bot]
acd2e93f8c fix: do not empty serial batch fields (backport #39948) (#39956)
fix: do not empty serial batch fields (#39948)

(cherry picked from commit a4cbfabe0e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-19 10:45:28 +05:30
ruthra kumar
c81a15eac3 Merge pull request #39955 from frappe/mergify/bp/version-15-hotfix/pr-39914
refactor: add total row if only one party is being filtered (backport #39914)
2024-02-19 09:16:34 +05:30
ruthra kumar
18fcbb6f97 Merge pull request #39953 from frappe/mergify/bp/version-15-hotfix/pr-39942
fix: group node in warehouse filter in Item-wise Sales Register (backport #39942)
2024-02-19 09:15:09 +05:30
ruthra kumar
baa83ece21 refactor: add total row if only one party is being filtered
(cherry picked from commit b1dfa2537b)
2024-02-19 02:57:35 +00:00
ruthra kumar
74819b8e70 fix: group node in warehouse filter in Item-wise Sales Register
(cherry picked from commit 44538bd02a)
2024-02-19 02:56:17 +00:00
ruthra kumar
a2a5b34099 Merge pull request #39950 from frappe/mergify/bp/version-15-hotfix/pr-39943
refactor: use popup to inform on additional reconciliation step for Cr/Dr Notes (backport #39943)
2024-02-19 07:48:27 +05:30
ruthra kumar
ce11180793 refactor: use popup to inform on additional reconciliation step
(cherry picked from commit 0d260faa00)
2024-02-19 07:31:33 +05:30
Raffael Meyer
0b7a95351a Merge pull request #39907 from frappe/mergify/bp/version-15-hotfix/pr-39857
fix: fetch company terms (backport #39857)
2024-02-17 01:11:09 +01:00
Raffael Meyer
d225508ab1 Merge pull request #39928 from frappe/mergify/bp/version-15-hotfix/pr-39926
fix(Bank Transaction): precision for `(un)allocated_amount` (backport #39926)
2024-02-17 00:33:24 +01:00
Raffael Meyer
d213db90af Merge pull request #39940 from frappe/mergify/bp/version-15-hotfix/pr-39938
fix(Issue): create communication (backport #39938)
2024-02-16 20:47:30 +01:00
barredterra
f5d7fbdaf8 fix(Issue): create communication
Ignore permisions and mandatory. Required, for example, when Issue is created by Customer via portal.

(cherry picked from commit 3f1d008741)
2024-02-16 19:15:39 +00:00
Frappe PR Bot
fd76847cfa chore(release): Bumped to Version 15.14.2
## [15.14.2](https://github.com/frappe/erpnext/compare/v15.14.1...v15.14.2) (2024-02-16)

### Bug Fixes

* batch filter not working in stock ledger report (backport [#39934](https://github.com/frappe/erpnext/issues/39934)) ([#39935](https://github.com/frappe/erpnext/issues/39935)) ([3cd3159](3cd315973c))
2024-02-16 16:20:27 +00:00
rohitwaghchaure
709faaac69 Merge pull request #39937 from frappe/mergify/bp/version-15/pr-39935
fix: batch filter not working in stock ledger report (backport #39934) (backport #39935)
2024-02-16 21:48:52 +05:30
mergify[bot]
3cd315973c fix: batch filter not working in stock ledger report (backport #39934) (#39935)
fix: batch filter not working in stock ledger report

(cherry picked from commit a995e87567)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
(cherry picked from commit 15135952fc)
2024-02-16 15:19:21 +00:00
mergify[bot]
15135952fc fix: batch filter not working in stock ledger report (backport #39934) (#39935)
fix: batch filter not working in stock ledger report

(cherry picked from commit a995e87567)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2024-02-16 20:47:20 +05:30
Frappe PR Bot
6d6a3a10fb chore(release): Bumped to Version 15.14.1
## [15.14.1](https://github.com/frappe/erpnext/compare/v15.14.0...v15.14.1) (2024-02-16)

### Bug Fixes

* use serial batch fields not enabled for new stock entry ([72ff56b](72ff56be13))
2024-02-16 10:29:29 +00:00
rohitwaghchaure
7af62fb6c8 Merge pull request #39932 from frappe/mergify/bp/version-15/pr-39931
fix: use serial batch fields not enabled for new stock entry (backport #39930) (backport #39931)
2024-02-16 15:58:17 +05:30
Rohit Waghchaure
72ff56be13 fix: use serial batch fields not enabled for new stock entry
(cherry picked from commit dc9115a586)
(cherry picked from commit 40d4e3261e)
2024-02-16 10:25:03 +00:00
rohitwaghchaure
b91f65d4cf Merge pull request #39931 from frappe/mergify/bp/version-15-hotfix/pr-39930
fix: use serial batch fields not enabled for new stock entry (backport #39930)
2024-02-16 15:53:44 +05:30
Rohit Waghchaure
40d4e3261e fix: use serial batch fields not enabled for new stock entry
(cherry picked from commit dc9115a586)
2024-02-16 10:20:35 +00:00
barredterra
bf5d2f5fe4 fix(Bank Transaction): precision for (un)allocated_amount
(cherry picked from commit 8a702a6338)
2024-02-15 19:05:21 +00:00
rohitwaghchaure
bb77f85d89 Merge pull request #39922 from frappe/mergify/bp/version-15-hotfix/pr-39916
fix: not able to make purchase receipt (backport #39916)
2024-02-15 17:55:41 +05:30
Rohit Waghchaure
37329469c3 fix: not able to make purchase receipt
(cherry picked from commit 2fb0499923)
2024-02-15 12:04:49 +00:00
rohitwaghchaure
ab03ab388c Merge pull request #39918 from frappe/mergify/bp/version-15-hotfix/pr-39905
fix: party item code in Blanket Order (backport #39905)
2024-02-15 17:31:50 +05:30
rohitwaghchaure
c50639334f chore: fix linter issue
(cherry picked from commit 230a7d8d53)
2024-02-15 09:33:40 +00:00
Rohit Waghchaure
518b22bffc fix: party item code in Blanket Order
(cherry picked from commit 1a8f7f9403)
2024-02-15 09:33:39 +00:00
kunhi
a56d5b805c fix: update_dimension is required and not need party account method
(cherry picked from commit e6949d71f6)
2024-02-14 14:54:55 +00:00
kunhi
bef38f74fe fix: no need call for company method in sales invoice js
(cherry picked from commit e3bd8d10b0)
2024-02-14 14:54:54 +00:00
kunhi
14fe0af887 fix: fetch company terms
(cherry picked from commit d97b6d38ef)
2024-02-14 14:54:54 +00:00
Frappe PR Bot
c78d085e24 chore(release): Bumped to Version 15.14.0
# [15.14.0](https://github.com/frappe/erpnext/compare/v15.13.0...v15.14.0) (2024-02-14)

### Bug Fixes

*  production plan issue with sales order (backport [#39901](https://github.com/frappe/erpnext/issues/39901)) ([#39904](https://github.com/frappe/erpnext/issues/39904)) ([88a7248](88a7248888))
* add permissions to SRE (backport [#39780](https://github.com/frappe/erpnext/issues/39780)) ([#39786](https://github.com/frappe/erpnext/issues/39786)) ([ba05648](ba05648741))
* Brazilian COA for demo data creation ([#39839](https://github.com/frappe/erpnext/issues/39839)) ([4daee6d](4daee6d9c7))
* calculate `stock_value_diff` ([5a66c85](5a66c8585c))
* create SBB for `transfer_qty` in SE (backport [#39835](https://github.com/frappe/erpnext/issues/39835)) ([#39863](https://github.com/frappe/erpnext/issues/39863)) ([92e6017](92e6017a29))
* do not consider rejected warehouses in pick list (backport [#39539](https://github.com/frappe/erpnext/issues/39539)) (backport [#39804](https://github.com/frappe/erpnext/issues/39804)) ([#39811](https://github.com/frappe/erpnext/issues/39811)) ([30dacce](30daccecc7))
* incorrect planned qty in PP (backport [#39785](https://github.com/frappe/erpnext/issues/39785)) ([#39793](https://github.com/frappe/erpnext/issues/39793)) ([60e04ab](60e04ab661))
* landed cost voucher not submitting because of incorrect reference (backport [#39898](https://github.com/frappe/erpnext/issues/39898)) ([#39900](https://github.com/frappe/erpnext/issues/39900)) ([a548f12](a548f12941))
* remove duplicates from tax category map ([3c6114a](3c6114ab72))
* set rate for PO created against BO (backport [#39765](https://github.com/frappe/erpnext/issues/39765)) ([#39767](https://github.com/frappe/erpnext/issues/39767)) ([2213886](22138867f5))
* stock entry for use serial batch fields (backport [#39843](https://github.com/frappe/erpnext/issues/39843)) ([#39844](https://github.com/frappe/erpnext/issues/39844)) ([43fce29](43fce29a04))
* use correct field name in accounts controller (backport [#39884](https://github.com/frappe/erpnext/issues/39884)) ([#39897](https://github.com/frappe/erpnext/issues/39897)) ([f08b424](f08b424972))
* **ux:** set rate as price list rate on uom change in MR (backport [#39816](https://github.com/frappe/erpnext/issues/39816)) ([#39818](https://github.com/frappe/erpnext/issues/39818)) ([63b4d20](63b4d20bdf))
* validate duplicate SBB (backport [#39862](https://github.com/frappe/erpnext/issues/39862)) ([#39866](https://github.com/frappe/erpnext/issues/39866)) ([a2f1a96](a2f1a964f1))
* warehouse issue in pick list (backport [#39826](https://github.com/frappe/erpnext/issues/39826)) ([#39827](https://github.com/frappe/erpnext/issues/39827)) ([b625b05](b625b05ddc))

### Features

* get RM costs from consumption entry in manufacture SE (backport [#39822](https://github.com/frappe/erpnext/issues/39822)) ([#39847](https://github.com/frappe/erpnext/issues/39847)) ([2d5f186](2d5f186812))

### Performance Improvements

* cached get_last_purchase_details to fix performance issue (backport [#39854](https://github.com/frappe/erpnext/issues/39854)) ([#39856](https://github.com/frappe/erpnext/issues/39856)) ([c643e70](c643e70e2f))
* production plan submission (backport [#39846](https://github.com/frappe/erpnext/issues/39846)) ([#39860](https://github.com/frappe/erpnext/issues/39860)) ([10f17df](10f17dfcc8))
2024-02-14 12:06:08 +00:00
rohitwaghchaure
8c12b3dbe0 Merge pull request #39880 from frappe/version-15-hotfix
chore: release v15
2024-02-14 17:34:57 +05:30
mergify[bot]
88a7248888 fix: production plan issue with sales order (backport #39901) (#39904)
fix:  production plan issue with sales order (#39901)

(cherry picked from commit d0df5df4a6)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-14 16:58:28 +05:30
mergify[bot]
a548f12941 fix: landed cost voucher not submitting because of incorrect reference (backport #39898) (#39900)
fix: landed cost voucher not submitting because of incorrect reference (#39898)

(cherry picked from commit 6239fd704b)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-14 15:57:40 +05:30
mergify[bot]
f08b424972 fix: use correct field name in accounts controller (backport #39884) (#39897)
fix: use correct field name in accounts controller (#39884)

Changes to get advance payments in SI or PI from JV's

(cherry picked from commit b124081065)

Co-authored-by: Rohit Gunjegaonkar <135806454+rohitg-pbspl@users.noreply.github.com>
2024-02-14 13:21:55 +05:30
Raffael Meyer
375859a25f Merge pull request #39894 from frappe/mergify/bp/version-15-hotfix/pr-39868
fix(Purchase Receipt): calculate `stock_value_diff` (backport #39868)
2024-02-14 01:21:38 +01:00
barredterra
5a66c8585c fix: calculate stock_value_diff
`d.item_tax_amount` is already in base currency.

(cherry picked from commit 5df5851798)
2024-02-13 23:52:33 +00:00
mergify[bot]
a2f1a964f1 fix: validate duplicate SBB (backport #39862) (#39866)
* fix: validate duplicate SBB

(cherry picked from commit 094ecc1f62)

* test: duplicate SBB

(cherry picked from commit 55e66db315)

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-13 09:09:03 +05:30
mergify[bot]
92e6017a29 fix: create SBB for transfer_qty in SE (backport #39835) (#39863)
fix: create SBB for `transfer_qty` in SE

(cherry picked from commit d59caf08e6)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-12 19:59:07 +05:30
mergify[bot]
10f17dfcc8 perf: production plan submission (backport #39846) (#39860)
perf: production plan submission

(cherry picked from commit aa1c69dd7a)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-12 18:17:36 +05:30
mergify[bot]
c643e70e2f perf: cached get_last_purchase_details to fix performance issue (backport #39854) (#39856)
perf: cached get_last_purchase_details to fix performance issue (#39854)

(cherry picked from commit b966c06a4f)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-12 15:53:50 +05:30
mergify[bot]
4daee6d9c7 fix: Brazilian COA for demo data creation (#39839)
fix: Brazilian COA for demo data creation (#39839)

fix: Brazilian COA
(cherry picked from commit 4b1c851da1)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2024-02-11 18:12:18 +05:30
Frappe PR Bot
a29468f6fe chore(release): Bumped to Version 15.13.0
# [15.13.0](https://github.com/frappe/erpnext/compare/v15.12.2...v15.13.0) (2024-02-11)

### Features

* get RM costs from consumption entry in manufacture SE (backport [#39822](https://github.com/frappe/erpnext/issues/39822)) (backport [#39847](https://github.com/frappe/erpnext/issues/39847)) ([#39849](https://github.com/frappe/erpnext/issues/39849)) ([beb4137](beb4137dac))
2024-02-11 12:20:07 +00:00
mergify[bot]
beb4137dac feat: get RM costs from consumption entry in manufacture SE (backport #39822) (backport #39847) (#39849)
feat: get RM costs from consumption entry in manufacture SE (backport #39822) (#39847)

feat: get RM costs from consumption entry in manufacture SE (#39822)

(cherry picked from commit 39067c7614)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
(cherry picked from commit 2d5f186812)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-02-11 17:48:47 +05:30
mergify[bot]
2d5f186812 feat: get RM costs from consumption entry in manufacture SE (backport #39822) (#39847)
feat: get RM costs from consumption entry in manufacture SE (#39822)

(cherry picked from commit 39067c7614)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-11 17:29:21 +05:30
mergify[bot]
43fce29a04 fix: stock entry for use serial batch fields (backport #39843) (#39844)
fix: stock entry for use serial batch fields (#39843)

(cherry picked from commit e5824fc3f1)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-11 11:28:48 +05:30
mergify[bot]
63b4d20bdf fix(ux): set rate as price list rate on uom change in MR (backport #39816) (#39818)
* fix: add price list rate field in MR Item

(cherry picked from commit 61a29eb5fb)

* fix: set rate as price list rate on uom change

(cherry picked from commit 5cf0759b0c)

* chore: linter

(cherry picked from commit 1745371cd6)

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-10 15:58:33 +05:30
mergify[bot]
b625b05ddc fix: warehouse issue in pick list (backport #39826) (#39827)
fix: warehouse issue in pick list (#39826)

(cherry picked from commit 159a123dc7)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-09 11:32:51 +05:30
mergify[bot]
30daccecc7 fix: do not consider rejected warehouses in pick list (backport #39539) (backport #39804) (#39811)
* fix: do not consider rejected warehouses in pick list (backport #39539) (#39804)

* fix: do not consider rejected warehouses in pick list (#39539)

* fix: do not picked rejected materials

* test: test case for pick list without rejected materials

(cherry picked from commit f6725e4342)

# Conflicts:
#	erpnext/selling/doctype/sales_order/test_sales_order.py
#	erpnext/stock/doctype/pick_list/pick_list.json
#	erpnext/stock/doctype/pick_list/pick_list.py

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

* chore: fixed test case

---------

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

# Conflicts:
#	erpnext/selling/doctype/sales_order/test_sales_order.py

* chore: fix conflicts

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-02-08 14:41:58 +05:30
ruthra kumar
db4efd3332 Merge pull request #39803 from frappe/mergify/bp/version-15/pr-39783
fix: cancelling cr/dr notes should update the linked Invoice status (backport #39783)
2024-02-08 10:23:53 +05:30
ruthra kumar
7556457e3e refactor(test): Forex Credit Note cancellation against Invoice
(cherry picked from commit 2f676ced5c)
2024-02-08 04:36:15 +00:00
ruthra kumar
5590b04c89 refactor(test): assert Invoice status as well
(cherry picked from commit 33efe0d12d)
2024-02-08 04:36:14 +00:00
ruthra kumar
490cbc53d8 test: Invoice status on Cr/Dr note cancellation
(cherry picked from commit 31a8c3bdc4)
2024-02-08 04:36:14 +00:00
ruthra kumar
592b3ff7b7 refactor: cancel Cr/Dr JE's on Sales/Purchase return cancel
(cherry picked from commit 0549535603)
2024-02-08 04:36:14 +00:00
ruthra kumar
0bde22fe46 Merge pull request #39799 from frappe/mergify/bp/version-15-hotfix/pr-39783
fix: cancelling cr/dr notes should update the linked Invoice status (backport #39783)
2024-02-08 10:00:34 +05:30
mergify[bot]
60e04ab661 fix: incorrect planned qty in PP (backport #39785) (#39793)
fix: incorrect planned qty in PP

(cherry picked from commit a8ebc94a36)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-08 09:13:38 +05:30
ruthra kumar
83bf2c17e0 refactor(test): Forex Credit Note cancellation against Invoice
(cherry picked from commit 2f676ced5c)
2024-02-07 15:00:48 +00:00
ruthra kumar
a805796c0a refactor(test): assert Invoice status as well
(cherry picked from commit 33efe0d12d)
2024-02-07 15:00:47 +00:00
ruthra kumar
0bff065f0b test: Invoice status on Cr/Dr note cancellation
(cherry picked from commit 31a8c3bdc4)
2024-02-07 15:00:46 +00:00
ruthra kumar
5fd4ca56f5 refactor: cancel Cr/Dr JE's on Sales/Purchase return cancel
(cherry picked from commit 0549535603)
2024-02-07 15:00:45 +00:00
Frappe PR Bot
bc9a63497a chore(release): Bumped to Version 15.12.2
## [15.12.2](https://github.com/frappe/erpnext/compare/v15.12.1...v15.12.2) (2024-02-07)

### Bug Fixes

* remove duplicates from tax category map ([1f21607](1f21607e4f))
2024-02-07 14:22:43 +00:00
Gursheen Kaur Anand
b9dc0f3896 Merge pull request #39794 from frappe/mergify/bp/version-15/pr-39787
fix: remove duplicates from tax category map (backport #39787)
2024-02-07 19:51:02 +05:30
Gursheen Anand
1f21607e4f fix: remove duplicates from tax category map
(cherry picked from commit 3c6114ab72)
2024-02-07 13:54:03 +00:00
Gursheen Kaur Anand
a5ad318a37 Merge pull request #39787 from GursheenK/duplicates-in-tax-category-bpv15
fix: remove duplicates from tax category map
2024-02-07 19:22:27 +05:30
mergify[bot]
ba05648741 fix: add permissions to SRE (backport #39780) (#39786)
fix: add permissions to SRE

(cherry picked from commit 50f54d983d)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-07 19:03:25 +05:30
Gursheen Anand
3c6114ab72 fix: remove duplicates from tax category map 2024-02-07 18:27:08 +05:30
Frappe PR Bot
488e693ed8 chore(release): Bumped to Version 15.12.1
## [15.12.1](https://github.com/frappe/erpnext/compare/v15.12.0...v15.12.1) (2024-02-07)

### Bug Fixes

* set rate for PO created against BO (backport [#39765](https://github.com/frappe/erpnext/issues/39765)) (backport [#39767](https://github.com/frappe/erpnext/issues/39767)) ([#39775](https://github.com/frappe/erpnext/issues/39775)) ([ae2a8db](ae2a8db0d7))
2024-02-07 06:07:15 +00:00
mergify[bot]
ae2a8db0d7 fix: set rate for PO created against BO (backport #39765) (backport #39767) (#39775)
fix: set rate for PO created against BO (backport #39765) (#39767)

* fix: set rate for PO created against BO

(cherry picked from commit 0e5b4e5f07)

# Conflicts:
#	erpnext/manufacturing/doctype/blanket_order/blanket_order.py

* chore: `conflicts`

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
(cherry picked from commit 22138867f5)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-02-07 11:35:55 +05:30
mergify[bot]
22138867f5 fix: set rate for PO created against BO (backport #39765) (#39767)
* fix: set rate for PO created against BO

(cherry picked from commit 0e5b4e5f07)

# Conflicts:
#	erpnext/manufacturing/doctype/blanket_order/blanket_order.py

* chore: `conflicts`

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-07 10:48:58 +05:30
Frappe PR Bot
2ba283d138 chore(release): Bumped to Version 15.12.0
# [15.12.0](https://github.com/frappe/erpnext/compare/v15.11.1...v15.12.0) (2024-02-06)

### Bug Fixes

* Blanket Order Ordered Quantity (backport [#39725](https://github.com/frappe/erpnext/issues/39725)) ([#39739](https://github.com/frappe/erpnext/issues/39739)) ([b126720](b126720826))
* conditionally display show btn setting ([e931432](e9314325cc))
* correctly calculate diff amount for included taxes ([#39655](https://github.com/frappe/erpnext/issues/39655)) ([7f4cd3c](7f4cd3cd15))
* do not throw validation for cancelled sle ([02f56ee](02f56ee20e))
* don't overwrite existing terms in transaction ([dcdd3e8](dcdd3e8cc4))
* Exchange rate on MR to PO creation for muticurrency POs ([#39646](https://github.com/frappe/erpnext/issues/39646)) ([29eb090](29eb090528))
* fetch/change tax template on basis of base_net_rate instead of net_rate ([#39448](https://github.com/frappe/erpnext/issues/39448)) ([d7c7748](d7c7748c03))
* incorrect landed cost voucher amount ([a40864d](a40864dede))
* out of range for valuation_rate column in SE (backport [#39687](https://github.com/frappe/erpnext/issues/39687)) ([#39691](https://github.com/frappe/erpnext/issues/39691)) ([41e4632](41e46326c0))
* Percentage handling in queries ([#39692](https://github.com/frappe/erpnext/issues/39692)) ([e76f598](e76f59803c))
* **portal:** show PO pay button if payments installed ([cea4ed6](cea4ed6f88))
* Pricing rule application/removal on qty change ([#39084](https://github.com/frappe/erpnext/issues/39084)) ([f310707](f31070741a))
* production plan date filters for orders (backport [#39702](https://github.com/frappe/erpnext/issues/39702)) ([#39720](https://github.com/frappe/erpnext/issues/39720)) ([3eac436](3eac436e7b))
* remove applied pricing rule on qty change (backport [#39688](https://github.com/frappe/erpnext/issues/39688)) ([#39737](https://github.com/frappe/erpnext/issues/39737)) ([f246684](f246684694))
* remove file from the disk after the completion of reposting ([b582e9c](b582e9c42c))
* show warehouse title field in sales docs (backport [#39746](https://github.com/frappe/erpnext/issues/39746)) ([#39755](https://github.com/frappe/erpnext/issues/39755)) ([53992de](53992deb10))
* update company in serial no doc (backport [#39733](https://github.com/frappe/erpnext/issues/39733)) ([#39747](https://github.com/frappe/erpnext/issues/39747)) ([00e86bf](00e86bf318))
* use old serial / batch fields to make serial batch bundle ([282c19e](282c19e7e1))
* **work order:** resolve type error during job card creation (backport [#39713](https://github.com/frappe/erpnext/issues/39713)) ([#39714](https://github.com/frappe/erpnext/issues/39714)) ([5fe40ac](5fe40ac085))

### Features

* copy emails from lead to customer ([#38647](https://github.com/frappe/erpnext/issues/38647)) ([986273b](986273b6d3))
* make material request for job card from workstation dashboard ([3bef12c](3bef12cb55))
* Period-wise closing entries for TB ([#39712](https://github.com/frappe/erpnext/issues/39712)) ([1822325](1822325f34))
* reference for POS SI payments ([#39523](https://github.com/frappe/erpnext/issues/39523)) ([4ee8cf3](4ee8cf3907))
* visual plant floor ([75bd1e6](75bd1e6b65))

### Performance Improvements

* memory consumption for the stock balance report ([#39626](https://github.com/frappe/erpnext/issues/39626)) ([5e29aab](5e29aab83b))
* Move dimension validation out of GL Entry doctype ([#39730](https://github.com/frappe/erpnext/issues/39730)) ([451c288](451c288011))
* timeout for auto material request through reorder level ([1b2831b](1b2831bdfe))
* timeout while submitting the purchase receipt entry ([55a8326](55a8326d06))
2024-02-06 18:44:29 +00:00
rohitwaghchaure
af8af2b36e Merge pull request #39758 from frappe/version-15-hotfix
chore: release v15
2024-02-07 00:13:18 +05:30
rohitwaghchaure
789aee4544 Merge pull request #39770 from frappe/mergify/bp/version-15-hotfix/pr-39769
fix: do not throw validation for canceled SLE (backport #39769)
2024-02-06 23:46:00 +05:30
Rohit Waghchaure
02f56ee20e fix: do not throw validation for cancelled sle
(cherry picked from commit 32ccf3524a)
2024-02-06 17:43:17 +00:00
rohitwaghchaure
c78d4c15d3 Merge pull request #39768 from frappe/mergify/bp/version-15-hotfix/pr-39764
fix: remove file from the disk after the completion of reposting (backport #39764)
2024-02-06 22:22:46 +05:30
Rohit Waghchaure
7833138c57 test: test case to check removed attached file
(cherry picked from commit 76b57a4338)
2024-02-06 15:58:17 +00:00
Rohit Waghchaure
b582e9c42c fix: remove file from the disk after the completion of reposting
(cherry picked from commit fb330d1b5a)
2024-02-06 15:58:16 +00:00
rohitwaghchaure
faf79f4d2a Merge pull request #39761 from frappe/mergify/bp/version-15-hotfix/pr-39718
fix: use old serial / batch fields to make serial batch bundle (backport #39718)
2024-02-06 16:26:33 +05:30
ruthra kumar
47c2bd7335 Merge pull request #39751 from frappe/mergify/bp/version-15-hotfix/pr-39694
refactor: enforce unique GL Account for each 'Bank Account' (backport #39694)
2024-02-06 15:48:31 +05:30
Rohit Waghchaure
73618f0605 test: test case to check use serial / batch fields feature
(cherry picked from commit 01650120d4)
2024-02-06 10:18:06 +00:00
Rohit Waghchaure
a08b97e886 test: fixed test cases
(cherry picked from commit c1e869f040)
2024-02-06 10:18:05 +00:00
Rohit Waghchaure
282c19e7e1 fix: use old serial / batch fields to make serial batch bundle
(cherry picked from commit 9fafc83632)
2024-02-06 10:18:05 +00:00
mergify[bot]
53992deb10 fix: show warehouse title field in sales docs (backport #39746) (#39755)
fix: show warehouse title field in sales docs

(cherry picked from commit ee14faaa39)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-06 12:45:37 +05:30
ruthra kumar
4235e08668 refactor(test): make use of test fixtures in Payment Order
(cherry picked from commit 322cdbaccf)
2024-02-06 04:00:23 +00:00
ruthra kumar
949f4c3790 refactor(test): generate uniq GL acc and Bank acc for each test case
(cherry picked from commit a9a2ec81de)
2024-02-06 04:00:23 +00:00
ruthra kumar
11d4382e19 refactor: ensure unique accounts for each Bank Account's
(cherry picked from commit 2caa2d677c)
2024-02-06 04:00:23 +00:00
mergify[bot]
00e86bf318 fix: update company in serial no doc (backport #39733) (#39747)
fix: update company in serial no doc

(cherry picked from commit 7a04f0f7ba)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-05 21:55:56 +05:30
rohitwaghchaure
d3c4bd7f5f Merge pull request #39745 from frappe/mergify/bp/version-15-hotfix/pr-39742
perf: timeout while submitting the purchase receipt entry (backport #39742)
2024-02-05 21:17:59 +05:30
rohitwaghchaure
cb15ff1d74 Merge pull request #39743 from frappe/mergify/bp/version-15-hotfix/pr-39730
perf: Move dimension validation out of GL Entry doctype (backport #39730)
2024-02-05 21:17:43 +05:30
Rohit Waghchaure
55a8326d06 perf: timeout while submitting the purchase receipt entry
(cherry picked from commit 1fa6233377)
2024-02-05 15:33:04 +00:00
Deepesh Garg
451c288011 perf: Move dimension validation out of GL Entry doctype (#39730)
(cherry picked from commit b834ed10d6)
2024-02-05 15:31:36 +00:00
rohitwaghchaure
7923bd7964 Merge pull request #39741 from frappe/mergify/bp/version-15-hotfix/pr-38362
feat: visual plant floor (backport #38362)
2024-02-05 19:42:20 +05:30
Rohit Waghchaure
3bef12cb55 feat: make material request for job card from workstation dashboard
(cherry picked from commit 6fea9d6dfe)
2024-02-05 13:50:45 +00:00
Rohit Waghchaure
75bd1e6b65 feat: visual plant floor
(cherry picked from commit 68c997aa06)
2024-02-05 13:50:44 +00:00
mergify[bot]
b126720826 fix: Blanket Order Ordered Quantity (backport #39725) (#39739)
* fix: disable no-copy for blanket order in PO

(cherry picked from commit 5ce5c352e4)

* fix: update BO Ordered Quantity on PO Close/Open

(cherry picked from commit 61ded697a7)

* test: BO on PO Close/Open

(cherry picked from commit 27d6c8b6d5)

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-05 16:31:20 +05:30
mergify[bot]
f246684694 fix: remove applied pricing rule on qty change (backport #39688) (#39737)
fix: remove pricing rule

(cherry picked from commit 7c6a5a0f23)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-05 16:09:00 +05:30
mergify[bot]
1822325f34 feat: Period-wise closing entries for TB (#39712)
feat: Period-wise closing entries for TB (#39712)

(cherry picked from commit 6e6c818084)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2024-02-05 14:34:33 +05:30
mergify[bot]
986273b6d3 feat: copy emails from lead to customer (#38647)
feat: copy emails from lead to customer

(cherry picked from commit 906ac093e3)

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
2024-02-05 14:05:44 +05:30
rohitwaghchaure
f4ac00595d Merge pull request #39729 from frappe/mergify/bp/version-15-hotfix/pr-39659
perf: timeout for auto material request through reorder level (backport #39659)
2024-02-05 13:20:22 +05:30
rohitwaghchaure
66661d0649 Merge pull request #39732 from frappe/mergify/bp/version-15-hotfix/pr-39626
perf: memory consumption for the stock balance report (backport #39626)
2024-02-05 13:17:41 +05:30
rohitwaghchaure
326751c8bd Merge pull request #39727 from frappe/mergify/bp/version-15-hotfix/pr-39684
fix: incorrect landed cost voucher amount (backport #39684)
2024-02-05 13:17:11 +05:30
rohitwaghchaure
5e29aab83b perf: memory consumption for the stock balance report (#39626)
(cherry picked from commit b70f3de16b)
2024-02-05 06:18:52 +00:00
Rohit Waghchaure
1b2831bdfe perf: timeout for auto material request through reorder level
(cherry picked from commit 951023f434)
2024-02-05 06:10:56 +00:00
Rohit Waghchaure
a40864dede fix: incorrect landed cost voucher amount
(cherry picked from commit d78a1e7814)
2024-02-05 06:09:51 +00:00
mergify[bot]
3eac436e7b fix: production plan date filters for orders (backport #39702) (#39720)
fix: production plan date filters for orders (#39702)

(cherry picked from commit 407045a1de)

Co-authored-by: Gursheen Kaur Anand <40693548+GursheenK@users.noreply.github.com>
2024-02-05 10:14:42 +05:30
mergify[bot]
5fe40ac085 fix(work order): resolve type error during job card creation (backport #39713) (#39714)
fix(work order): resolve type error during job card creation (#39713)

fix: type error
(cherry picked from commit c81d597ca5)

Co-authored-by: Vishnu  VS <Vishnuviswambaran2002@gmail.com>
2024-02-04 22:59:17 +05:30
mergify[bot]
4ee8cf3907 feat: reference for POS SI payments (#39523)
feat: reference for POS SI payments (#39523)

* feat: reference field in SI payment

* fix: document link for pos si

* refactor: pos invoice queries

(cherry picked from commit d9a72c1e61)

Co-authored-by: Gursheen Kaur Anand <40693548+GursheenK@users.noreply.github.com>
2024-02-04 17:54:56 +05:30
mergify[bot]
d7c7748c03 fix: fetch/change tax template on basis of base_net_rate instead of net_rate (#39448)
fix: fetch/change tax template on basis of base_net_rate instead of net_rate (#39448)

fix: change tax template on basis of base_net_rate instead of net_rate

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit e9fe10c6f1)

Co-authored-by: Divyam Mistry <73271406+divyam-mistry@users.noreply.github.com>
2024-02-03 09:09:59 +05:30
mergify[bot]
f31070741a fix: Pricing rule application/removal on qty change (#39084)
fix: Pricing rule application/removal on qty change

(cherry picked from commit f52d7c7665)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2024-02-03 08:49:50 +05:30
Frappe PR Bot
317a74b58c chore(release): Bumped to Version 15.11.1
## [15.11.1](https://github.com/frappe/erpnext/compare/v15.11.0...v15.11.1) (2024-02-02)

### Bug Fixes

* Percentage handling in queries ([#39692](https://github.com/frappe/erpnext/issues/39692)) ([0405a2b](0405a2b817))
2024-02-02 15:24:10 +00:00
mergify[bot]
0405a2b817 fix: Percentage handling in queries (#39692)
fix: Percentage handling in queries (#39692)

fix: Percentage handling in queries (#39692)

* fix: Percentage handling in queries

* test: Account with percent sign

* chore: add test records

(cherry picked from commit 6d87cfeb8d)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit e76f59803c)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-02-02 20:53:03 +05:30
mergify[bot]
e76f59803c fix: Percentage handling in queries (#39692)
fix: Percentage handling in queries (#39692)

* fix: Percentage handling in queries

* test: Account with percent sign

* chore: add test records

(cherry picked from commit 6d87cfeb8d)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2024-02-02 20:27:36 +05:30
mergify[bot]
41e46326c0 fix: out of range for valuation_rate column in SE (backport #39687) (#39691)
fix: out of range for valuation_rate column in SE

(cherry picked from commit 1e15a3cc15)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-02-02 15:24:45 +05:30
Gursheen Kaur Anand
8574941cb6 Merge pull request #39648 from frappe/mergify/bp/version-15-hotfix/pr-39519
fix: don't overwrite existing terms in transaction (backport #39519)
2024-02-01 23:48:18 +05:30
ruthra kumar
4f994cf26c Merge pull request #39666 from frappe/mergify/bp/version-15-hotfix/pr-39655
fix: correctly calculate diff amount for included taxes (backport #39655)
2024-02-01 19:44:57 +05:30
ruthra kumar
bb3591deec Merge pull request #39680 from frappe/mergify/bp/version-15-hotfix/pr-39674
refactor: use pop up to inform of possible data issue (backport #39674)
2024-02-01 17:31:18 +05:30
ruthra kumar
e2d041f51c refactor: use pop up to inform of possible data issue
and leave a comment in communcation trail as well

(cherry picked from commit 78483e2ee6)
2024-02-01 11:43:19 +00:00
ruthra kumar
63f306f1b4 Merge pull request #39676 from frappe/mergify/bp/version-15-hotfix/pr-39671
refactor: move ignore ERR filter from SOA to General Ledger (backport #39671)
2024-02-01 16:38:33 +05:30
ruthra kumar
72c95d31d1 refactor(test): use party with USD billing currency
(cherry picked from commit beff566c82)
2024-02-01 10:41:39 +00:00
ruthra kumar
1ee15f65a8 test: ignore_err filter out in General Ledger
(cherry picked from commit affca3a519)
2024-02-01 10:41:39 +00:00
ruthra kumar
0a235584ad refactor: move ignore ERR filters from SOA to General Ledger
(cherry picked from commit c077eda64e)
2024-02-01 10:41:39 +00:00
Gursheen Kaur Anand
7f4cd3cd15 fix: correctly calculate diff amount for included taxes (#39655)
(cherry picked from commit 772f540bef)
2024-02-01 04:44:40 +00:00
barredterra
ba55d0ede7 chore: resolve conflicts 2024-01-31 13:19:19 +01:00
rohitwaghchaure
c74482a27c Merge pull request #39658 from frappe/mergify/bp/version-15-hotfix/pr-39643
fix(portal): show PO pay button if payments installed (backport #39643)
2024-01-31 17:30:48 +05:30
rohitwaghchaure
510ab769f1 chore: fix conflicts 2024-01-31 15:23:14 +05:30
Gursheen Anand
e9314325cc fix: conditionally display show btn setting
(cherry picked from commit 0c9572bb48)

# Conflicts:
#	erpnext/buying/doctype/buying_settings/buying_settings.json
2024-01-31 09:16:12 +00:00
Gursheen Anand
cea4ed6f88 fix(portal): show PO pay button if payments installed
(cherry picked from commit ae7be84d87)
2024-01-31 09:16:11 +00:00
mergify[bot]
29eb090528 fix: Exchange rate on MR to PO creation for muticurrency POs (#39646)
fix: Exchange rate on MR to PO creation for muticurrency POs (#39646)

(cherry picked from commit cfd1666181)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2024-01-31 12:49:48 +05:30
mergify[bot]
aebb0c7979 chore: cleanup doctype descriptions (backport #39637) (#39652)
* chore: cleanup doctype descriptions (#39637)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 6b8f046fb4)

# Conflicts:
#	erpnext/accounts/doctype/accounts_settings/accounts_settings.json
#	erpnext/accounts/doctype/fiscal_year/fiscal_year.json
#	erpnext/stock/doctype/item_price/item_price.json
#	erpnext/stock/doctype/stock_settings/stock_settings.json

* chore: fix conflicts

---------

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2024-01-31 12:38:37 +05:30
barredterra
dcdd3e8cc4 fix: don't overwrite existing terms in transaction
(cherry picked from commit 77b044f1a6)

# Conflicts:
#	erpnext/public/js/controllers/transaction.js
2024-01-31 00:14:44 +00:00
Frappe PR Bot
f84f82c7d7 chore(release): Bumped to Version 15.11.0
# [15.11.0](https://github.com/frappe/erpnext/compare/v15.10.8...v15.11.0) (2024-01-30)

### Bug Fixes

* AttributeError in company transaction deletion ([222005c](222005ca44))
* **Batch:** reload doc after splitting ([a97b8fd](a97b8fd876))
* check page obj before adding menu ([0aa73e3](0aa73e31ce))
* default enable closing stock balance (backport [#39551](https://github.com/frappe/erpnext/issues/39551)) ([#39554](https://github.com/frappe/erpnext/issues/39554)) ([4853ab1](4853ab1fec))
* do not auto-populate item delivery date ([5cdc22a](5cdc22adf3))
* email list for auto reorder material request ([98c5653](98c56535d8))
* enqueue JV submission when more than 100 accounts ([07bcc24](07bcc24e35))
* fetch correct quantity and amount for grouped asset ([3bdd1e9](3bdd1e9514))
* honour currency precision while fetching balance ([e0a3820](e0a38207f6))
* incorrect active serial nos (backport [#39389](https://github.com/frappe/erpnext/issues/39389)) ([#39589](https://github.com/frappe/erpnext/issues/39589)) ([7def475](7def475eb1))
* incorrect amount in the material request item (backport [#39567](https://github.com/frappe/erpnext/issues/39567)) ([#39569](https://github.com/frappe/erpnext/issues/39569)) ([e0c35d6](e0c35d60b4))
* Item Tax template is not working for e-commerce ([2905db1](2905db19e5))
* make SO item code reqd ([171586d](171586db9b))
* not able to edit address through portal ([1f5dbeb](1f5dbebe68))
* not able to save BOM (duplicate key error) (backport [#39620](https://github.com/frappe/erpnext/issues/39620)) ([#39623](https://github.com/frappe/erpnext/issues/39623)) ([53c7055](53c705506b))
* not able to save subcontracting purchase receipt (old flow) (backport [#39590](https://github.com/frappe/erpnext/issues/39590)) ([#39592](https://github.com/frappe/erpnext/issues/39592)) ([63eef68](63eef680d0))
* not able to submit subcontracting pr (old flow) (backport [#39622](https://github.com/frappe/erpnext/issues/39622)) ([#39625](https://github.com/frappe/erpnext/issues/39625)) ([960443d](960443d268))
* Payment Terms Status for Sales Order report should show all payment terms from order not only this comming from template ([b2e0d24](b2e0d24954))
* perf issue while submitting stock entry (backport [#39634](https://github.com/frappe/erpnext/issues/39634)) ([#39642](https://github.com/frappe/erpnext/issues/39642)) ([d785c6c](d785c6ce3e))
* prevent extra transfer against inter transfer transaction (backport [#39213](https://github.com/frappe/erpnext/issues/39213)) ([#39596](https://github.com/frappe/erpnext/issues/39596)) ([6d4ca6a](6d4ca6a1ee))
* qtn tests using delivery date ([6b20a7e](6b20a7eed1))
* return doc obj after submit ([da33079](da33079f12))
* Serial No Ledger permission issue ([f9d1995](f9d1995954))
* skip liability account for internal transfer ([e2d85c5](e2d85c513c))
* type error on company doc ([a7d1368](a7d13686c7))

### Features

* In words in payment entry ([5df2f5d](5df2f5d523))
* New financial views - Growth and margin views for P&L and balance sheet ([#39588](https://github.com/frappe/erpnext/issues/39588)) ([a83f310](a83f3106f3))
* Partly billed status in Purchase Receipt ([#39543](https://github.com/frappe/erpnext/issues/39543)) ([e4230cf](e4230cf6d9))
2024-01-30 14:14:58 +00:00
rohitwaghchaure
32f77eae5d Merge pull request #39639 from frappe/version-15-hotfix
chore: release v15
2024-01-30 19:42:27 +05:30
mergify[bot]
d785c6ce3e fix: perf issue while submitting stock entry (backport #39634) (#39642)
fix: perf issue while submitting stock entry (#39634)

(cherry picked from commit b14886b227)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-01-30 15:43:50 +05:30
ruthra kumar
bc8ab51f9d Merge pull request #39633 from frappe/mergify/bp/version-15-hotfix/pr-39559
fix: prevent Return Invoices(Credit/Debit Note) from using a different account  (backport #39559)
2024-01-30 11:20:25 +05:30
ruthra kumar
5c9c3bee70 test: debit note account mismatch
(cherry picked from commit bdca718103)
2024-01-30 05:31:53 +00:00
ruthra kumar
c9ea83591f test: account mismatch validation
(cherry picked from commit 8bdc760733)
2024-01-30 05:31:53 +00:00
ruthra kumar
10fcf5af5f refactor: prevent '{debit/credit}_to' account mismatch
(cherry picked from commit 6f2fae1b61)
2024-01-30 05:31:52 +00:00
mergify[bot]
e4230cf6d9 feat: Partly billed status in Purchase Receipt (#39543)
feat: Partly billed status in Purchase Receipt (#39543)

(cherry picked from commit a673220feb)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2024-01-29 22:41:09 +05:30
mergify[bot]
53c705506b fix: not able to save BOM (duplicate key error) (backport #39620) (#39623)
fix: not able to save BOM (duplicate key error) (#39620)

(cherry picked from commit 4e182b89ce)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-01-29 21:22:34 +05:30
mergify[bot]
960443d268 fix: not able to submit subcontracting pr (old flow) (backport #39622) (#39625)
fix: not able to submit subcontracting pr (old flow) (#39622)

(cherry picked from commit 5cf47ae5f9)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-01-29 21:22:21 +05:30
Gursheen Kaur Anand
f71af209c0 Merge pull request #39618 from frappe/mergify/bp/version-15-hotfix/pr-39616
fix(minor): do not auto-populate item delivery date from qtn (backport #39616)
2024-01-29 16:53:39 +05:30
Gursheen Anand
6b20a7eed1 fix: qtn tests using delivery date
(cherry picked from commit 079cd30b9c)
2024-01-29 10:22:01 +00:00
Gursheen Anand
5cdc22adf3 fix: do not auto-populate item delivery date
(cherry picked from commit 49cb11c1f3)
2024-01-29 10:22:00 +00:00
mergify[bot]
9e36ab7de7 fix amount not updated when change rate in material request (backport #39606) (#39615)
fix amount not updated when change rate in material request (#39606)

* fix amount not updated when change rate in material request

* make code consistent

(cherry picked from commit efade9b9ae)

Co-authored-by: Jeffry Suryadharma <41689493+jeffrysurya@users.noreply.github.com>
2024-01-29 13:36:27 +05:30
Gursheen Kaur Anand
daafe45dd4 Merge pull request #39612 from frappe/mergify/bp/version-15-hotfix/pr-39562
fix: enqueue JV submission when > 100 accounts (backport #39562)
2024-01-29 11:55:58 +05:30
Gursheen Kaur Anand
706d1111ad Merge pull request #39610 from frappe/mergify/bp/version-15-hotfix/pr-39598
fix(minor): type error in financial statements for dashboard (backport #39598)
2024-01-29 11:42:17 +05:30
Gursheen Anand
da33079f12 fix: return doc obj after submit
(cherry picked from commit fc677811b7)
2024-01-29 06:10:03 +00:00
Gursheen Anand
07bcc24e35 fix: enqueue JV submission when more than 100 accounts
(cherry picked from commit 53b44ccf29)
2024-01-29 06:10:02 +00:00
Nabin Hait
0f0a5b73f6 Merge pull request #39566 from frappe/mergify/bp/version-15-hotfix/pr-39489
fix: fetch correct quantity and amount for grouped asset (backport #39489)
2024-01-29 11:38:33 +05:30
Gursheen Anand
0aa73e31ce fix: check page obj before adding menu
(cherry picked from commit 2486b646a1)
2024-01-29 06:07:13 +00:00
Frappe PR Bot
a3d4f63ba1 chore(release): Bumped to Version 15.10.8
## [15.10.8](https://github.com/frappe/erpnext/compare/v15.10.7...v15.10.8) (2024-01-29)

### Bug Fixes

* not able to save subcontracting purchase receipt (old flow) (backport [#39590](https://github.com/frappe/erpnext/issues/39590)) (backport [#39592](https://github.com/frappe/erpnext/issues/39592)) ([#39608](https://github.com/frappe/erpnext/issues/39608)) ([ff166e8](ff166e8104))
2024-01-29 04:39:51 +00:00
mergify[bot]
ff166e8104 fix: not able to save subcontracting purchase receipt (old flow) (backport #39590) (backport #39592) (#39608)
fix: not able to save subcontracting purchase receipt (old flow) (backport #39590) (#39592)

fix: not able to save subcontracting purchase receipt (old flow) (#39590)

(cherry picked from commit 67d828dab3)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-01-29 10:08:40 +05:30
mergify[bot]
a118417645 refactor: provision to filter on dimensions in reconciliation tool (#39054)
* refactor: dimensions section in allocation table in reconciliation

(cherry picked from commit 1cde804c77)

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

* refactor: update dimension doctypes in hooks

(cherry picked from commit cfb3d87267)

* refactor: dimensions filter section in payment reconciliation

(cherry picked from commit 20e0acc20a)

* refactor: column break in dimension section

(cherry picked from commit 20576e0f47)

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

* refactor: handle dimension filters

(cherry picked from commit c1fe4bcc64)

* refactor: pass dimension filters to query

(cherry picked from commit ff60ec85b8)

* refactor: set query filters for dimensions

(cherry picked from commit ad8475cb8b)

* refactor: pass dimension details to query

(cherry picked from commit 5dc22e1811)

* refactor: replace sql with query builder for Jourals query

(cherry picked from commit 9c5a79209e)

* refactor: partial change on outstanding invoice popup

(cherry picked from commit 2154502955)

* fix: typo's and parameter changes

(cherry picked from commit 0ec17590ae)

* refactor: Credit Note and its Exc gain/loss JE inherits dimensions

(cherry picked from commit ab939cc6e8)

* refactor: apply dimension filters on cr/dr notes

(cherry picked from commit 188ff8cde7)

* chore: test dimension filter output

(cherry picked from commit e3c44231ab)

* test: dimension inheritance for cr note reconciliation

(cherry picked from commit ba5a7c8cd8)

* refactor: pass dimension values to Gain/Loss journal

(cherry picked from commit c44eb432a5)

# Conflicts:
#	erpnext/accounts/utils.py

* test: dimension inheritance in PE reconciliation

(cherry picked from commit 6148fb024b)

* refactor: pass dimensions on advance allocation

(cherry picked from commit cbd443a78a)

* test: dimension inheritance on adv allocation

(cherry picked from commit fcf4687c52)

* refactor: dynamic dimension filters in pop up

(cherry picked from commit f8bbb0619c)

* refactor: update dimensions, only if provided

(cherry picked from commit ec0f17ca8b)

* refactor: handle dynamic dimension in order query

(cherry picked from commit 7c2cb70387)

* chore: resolve conflicts

---------

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2024-01-28 13:50:08 +05:30
mergify[bot]
a83f3106f3 feat: New financial views - Growth and margin views for P&L and balance sheet (#39588)
feat: New financial views - Growth and margin views for P&L and balance sheet (#39588)
2024-01-28 13:48:55 +05:30
mergify[bot]
6d4ca6a1ee fix: prevent extra transfer against inter transfer transaction (backport #39213) (#39596)
fix: prevent extra transfer against inter transfer transaction (#39213)

* fix: prevent extra transfer against inter transfer transaction

* fix: internal transfer dashboard

(cherry picked from commit 8fdc244e16)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-01-27 23:25:13 +05:30
ruthra kumar
ebec463166 Merge pull request #39594 from frappe/mergify/bp/version-15-hotfix/pr-39591
refactor: Do proper currency conversion on Future Payments column in AR/AP report (backport #39591)
2024-01-27 13:19:27 +05:30
ruthra kumar
10488520e7 test: future payment with foreign currency
(cherry picked from commit 7b37389115)
2024-01-27 07:23:17 +00:00
ruthra kumar
9e15a3c981 refactor: do currency conversion on future amount columns
(cherry picked from commit 0de4197c88)
2024-01-27 07:23:16 +00:00
mergify[bot]
63eef680d0 fix: not able to save subcontracting purchase receipt (old flow) (backport #39590) (#39592)
fix: not able to save subcontracting purchase receipt (old flow) (#39590)

(cherry picked from commit 67d828dab3)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-01-27 12:15:11 +05:30
mergify[bot]
7def475eb1 fix: incorrect active serial nos (backport #39389) (#39589)
fix: incorrect active serial nos

(cherry picked from commit 64cb1153de)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2024-01-27 11:57:58 +05:30
Frappe PR Bot
0e2f57ba89 chore(release): Bumped to Version 15.10.7
## [15.10.7](https://github.com/frappe/erpnext/compare/v15.10.6...v15.10.7) (2024-01-27)

### Bug Fixes

* incorrect amount in the material request item (backport [#39567](https://github.com/frappe/erpnext/issues/39567)) (backport [#39569](https://github.com/frappe/erpnext/issues/39569)) ([#39587](https://github.com/frappe/erpnext/issues/39587)) ([30bdba4](30bdba4801))
2024-01-27 04:43:59 +00:00
mergify[bot]
30bdba4801 fix: incorrect amount in the material request item (backport #39567) (backport #39569) (#39587)
fix: incorrect amount in the material request item (backport #39567) (#39569)

fix: incorrect amount in the material request item (#39567)

fix: incoorect amount in the material request
(cherry picked from commit 2bdfdeeb9a)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-01-27 10:12:45 +05:30
mergify[bot]
ed06f0cd1b refactor: BOM creator item selector with short description (backport #39433) (#39435)
refactor: BOM creator item selector with short description

(cherry picked from commit 0f881bc90a)

Co-authored-by: Florian HENRY <florian.henry@open-concept.pro>
2024-01-27 09:51:14 +05:30
Gursheen Kaur Anand
9abc07e34b Merge pull request #39585 from frappe/mergify/bp/version-15-hotfix/pr-39532
fix: type error in transaction.js (backport #39532)
2024-01-26 23:46:57 +05:30
Gursheen Anand
a7d13686c7 fix: type error on company doc
(cherry picked from commit 030d35628d)
2024-01-26 17:31:07 +00:00
Deepesh Garg
ab99414242 Merge pull request #39577 from frappe/mergify/bp/version-15-hotfix/pr-39511
refactor(Sales Invoice): set account and sum for payments (#39511)
2024-01-26 10:04:23 +05:30
Deepesh Garg
fa8fb7a49e Merge pull request #39575 from frappe/mergify/bp/version-15-hotfix/pr-39108
feat: In words in payment entry (#39108)
2024-01-26 09:46:01 +05:30
barredterra
4fc3a264f9 refactor(Sales Invoice): set account for mode of payment
(cherry picked from commit 3815f07c33)
2024-01-26 04:15:14 +00:00
Deepesh Garg
5df2f5d523 feat: In words in payment entry
(cherry picked from commit b21da472f6)
2024-01-26 04:01:45 +00:00
mergify[bot]
e0c35d60b4 fix: incorrect amount in the material request item (backport #39567) (#39569)
fix: incorrect amount in the material request item (#39567)

fix: incoorect amount in the material request
(cherry picked from commit 2bdfdeeb9a)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-01-25 17:22:31 +05:30
Gursheen Kaur Anand
14aa9d3d0f Merge pull request #39564 from frappe/mergify/bp/version-15-hotfix/pr-39557
fix: make SO item code mandatory (backport #39557)
2024-01-25 16:39:39 +05:30
Nabin Hait
3bdd1e9514 fix: fetch correct quantity and amount for grouped asset
(cherry picked from commit 06f48c678b)
2024-01-25 10:51:53 +00:00
Gursheen Anand
171586db9b fix: make SO item code reqd
(cherry picked from commit 7f8303a493)
2024-01-25 10:50:38 +00:00
ruthra kumar
c3557a87ef Merge pull request #39552 from frappe/mergify/bp/version-15-hotfix/pr-38218
fix: honour currency precision while fetching balance (backport #38218)
2024-01-25 13:25:15 +05:30
mergify[bot]
4853ab1fec fix: default enable closing stock balance (backport #39551) (#39554)
fix: default enable closing stock balance (#39551)

(cherry picked from commit d1fb90edff)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-01-25 12:51:55 +05:30
Dany Robert
ed032b3224 chore: avoid explicit escaping for precision
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
(cherry picked from commit a8949174c8)
2024-01-25 07:00:45 +00:00
Dany Robert
8b7900e6a7 chore: change f-string to sql params
(cherry picked from commit 383a4b132e)
2024-01-25 07:00:45 +00:00
Dany Robert
e0a38207f6 fix: honour currency precision while fetching balance
(cherry picked from commit bfaa93b0ca)
2024-01-25 07:00:45 +00:00
Frappe PR Bot
53b844f173 chore(release): Bumped to Version 15.10.6
## [15.10.6](https://github.com/frappe/erpnext/compare/v15.10.5...v15.10.6) (2024-01-25)

### Bug Fixes

* Item Tax template is not working for e-commerce ([83c1208](83c120849f))
2024-01-25 06:48:53 +00:00
rohitwaghchaure
34e581715a Merge pull request #39550 from frappe/mergify/bp/version-15/pr-39549
fix: Item Tax template is not working for e-commerce (backport #39547) (backport #39549)
2024-01-25 12:17:43 +05:30
Rohit Waghchaure
83c120849f fix: Item Tax template is not working for e-commerce
(cherry picked from commit 7d3240ae3a)
(cherry picked from commit 2905db19e5)
2024-01-25 06:24:19 +00:00
rohitwaghchaure
e08c7bad63 Merge pull request #39549 from frappe/mergify/bp/version-15-hotfix/pr-39547
fix: Item Tax template is not working for e-commerce (backport #39547)
2024-01-25 11:53:30 +05:30
Rohit Waghchaure
2905db19e5 fix: Item Tax template is not working for e-commerce
(cherry picked from commit 7d3240ae3a)
2024-01-25 06:07:23 +00:00
ruthra kumar
bd7e8ed230 Merge pull request #39538 from frappe/mergify/bp/version-15-hotfix/pr-39331
fix: Payment Terms Status for Sales Order report show all payment terms from orders (not only when there is a payment terms template) (backport #39331)
2024-01-24 16:27:29 +05:30
Florian HENRY
b2e0d24954 fix: Payment Terms Status for Sales Order report should show all payment terms from order not only this comming from template
(cherry picked from commit 6c8f52b26f)
2024-01-24 10:43:08 +00:00
rohitwaghchaure
84a94cec6b Merge pull request #39531 from frappe/mergify/bp/version-15-hotfix/pr-39525
fix: email list for auto reorder material request (backport #39525)
2024-01-24 14:49:28 +05:30
Frappe PR Bot
cc195777f4 chore(release): Bumped to Version 15.10.5
## [15.10.5](https://github.com/frappe/erpnext/compare/v15.10.4...v15.10.5) (2024-01-24)

### Bug Fixes

* AttributeError in company transaction deletion ([3549cd3](3549cd39f1))
2024-01-24 07:59:52 +00:00
ruthra kumar
60c10f4457 Merge pull request #39534 from frappe/mergify/bp/version-15/pr-39529
fix: AttributeError in company transaction deletion (backport #39529)
2024-01-24 13:28:34 +05:30
ruthra kumar
871dc6b0da Merge pull request #39533 from frappe/mergify/bp/version-15-hotfix/pr-39529
fix: AttributeError in company transaction deletion (backport #39529)
2024-01-24 13:28:22 +05:30
ruthra kumar
3549cd39f1 fix: AttributeError in company transaction deletion
(cherry picked from commit b127aa308e)
2024-01-24 07:43:02 +00:00
ruthra kumar
222005ca44 fix: AttributeError in company transaction deletion
(cherry picked from commit b127aa308e)
2024-01-24 07:40:59 +00:00
Rohit Waghchaure
98c56535d8 fix: email list for auto reorder material request
(cherry picked from commit 764f3422a0)
2024-01-24 07:07:16 +00:00
rohitwaghchaure
f6a779e1aa Merge pull request #39527 from frappe/mergify/bp/version-15-hotfix/pr-39521
fix: not able to edit address through portal (backport #39521)
2024-01-24 12:17:05 +05:30
Rohit Waghchaure
1f5dbebe68 fix: not able to edit address through portal
(cherry picked from commit b046d980ad)
2024-01-24 06:20:31 +00:00
Gursheen Kaur Anand
4073dfb90b Merge pull request #39522 from frappe/mergify/bp/version-15-hotfix/pr-39493
fix: skip setting liability account for internal transfer (backport #39493)
2024-01-24 11:08:53 +05:30
Gursheen Anand
e2d85c513c fix: skip liability account for internal transfer
(cherry picked from commit 236b73565e)
2024-01-24 05:04:45 +00:00
rohitwaghchaure
880f648846 Merge pull request #39513 from frappe/mergify/bp/version-15-hotfix/pr-39503
fix: Serial No Ledger permission issue (backport #39503)
2024-01-24 10:27:23 +05:30
Raffael Meyer
84d2a80f30 Merge pull request #39516 from frappe/mergify/bp/version-15-hotfix/pr-39512 2024-01-23 19:00:53 +01:00
barredterra
fe41e2a341 refactor(Batch): use const instead of var
(cherry picked from commit 7a7a213285)
2024-01-23 16:55:27 +00:00
barredterra
a97b8fd876 fix(Batch): reload doc after splitting
to show updated qty

(cherry picked from commit 34ec2f8a2b)
2024-01-23 16:55:27 +00:00
barredterra
6ed42e939b refactor: split batch
(cherry picked from commit 3c7e7a76f0)
2024-01-23 16:55:26 +00:00
Rohit Waghchaure
f9d1995954 fix: Serial No Ledger permission issue
(cherry picked from commit 1a670ff266)
2024-01-23 13:37:35 +00:00
Frappe PR Bot
028ae5b34f chore(release): Bumped to Version 15.10.4
## [15.10.4](https://github.com/frappe/erpnext/compare/v15.10.3...v15.10.4) (2024-01-23)

### Bug Fixes

* added button to make serial / batch from Purchase Invoice ([96e1db8](96e1db80ac))
* auto create serial no on scan ([ca93f67](ca93f671df))
* duplicate name error while making variant ([b649c50](b649c50ecc))
* key error during reposting ([b4981f8](b4981f8816))
* linting issue ([86f3f62](86f3f62e00))
* party field in pdf html ([9a08349](9a0834987c))
* set unallocated amount after base tax ([74613c7](74613c7fe8))
* UOM needs to be whole number not being checked in quotations ([c7d5857](c7d5857014))
* use most reliable section reference per report line ([b388adc](b388adcb2e))
* UX improvements for Serial and Batch Bundle ([c761459](c76145985d))
2024-01-23 11:59:22 +00:00
ruthra kumar
2a7f7df3e5 Merge pull request #39505 from frappe/version-15-hotfix
chore: release v15
2024-01-23 17:28:01 +05:30
rohitwaghchaure
1331fb75a3 Merge pull request #39496 from frappe/mergify/bp/version-15-hotfix/pr-39478
fix: UX improvements for Serial and Batch Bundle (backport #39478)
2024-01-23 13:18:16 +05:30
Rohit Waghchaure
ca93f671df fix: auto create serial no on scan
(cherry picked from commit fc0d2aeeff)
2024-01-23 06:27:59 +00:00
Rohit Waghchaure
c76145985d fix: UX improvements for Serial and Batch Bundle
(cherry picked from commit 5d94f0bde5)
2024-01-23 06:27:59 +00:00
rohitwaghchaure
a6b4d5b101 Merge pull request #39492 from frappe/mergify/bp/version-15-hotfix/pr-39488
fix: UOM needs to be whole number not being checked in quotations (backport #39488)
2024-01-23 11:54:54 +05:30
Rohit Waghchaure
c7d5857014 fix: UOM needs to be whole number not being checked in quotations
(cherry picked from commit aaf83da3e9)
2024-01-22 11:55:29 +00:00
Gursheen Kaur Anand
b53e072082 Merge pull request #39483 from frappe/mergify/bp/version-15-hotfix/pr-39462
fix: party field in PDF for AP / AR reports (backport #39462)
2024-01-22 17:05:48 +05:30
ruthra kumar
dc88614f89 Merge pull request #39486 from frappe/mergify/bp/version-15-hotfix/pr-39484
refactor: move 'project' set_query to sales_common.js (backport #39484)
2024-01-22 16:48:52 +05:30
ruthra kumar
0acbbefa8b refactor: move 'project' set_query to sales_common.js
(cherry picked from commit 52814724eb)
2024-01-22 10:21:28 +00:00
Gursheen Anand
9a0834987c fix: party field in pdf html
(cherry picked from commit b2d9380596)
2024-01-22 09:51:29 +00:00
ruthra kumar
3e9449d511 Merge pull request #39480 from frappe/mergify/bp/version-15-hotfix/pr-39457
refactor: delete transactions in background (backport #39457)
2024-01-22 10:44:04 +05:30
ruthra kumar
80e3597338 refactor: delete transactions in background
(cherry picked from commit a50808a077)
2024-01-22 04:28:27 +00:00
rohitwaghchaure
3c84d5ec02 Merge pull request #39479 from frappe/mergify/bp/version-15-hotfix/pr-39476
fix: added button to make serial / batch from Purchase Invoice (backport #39476)
2024-01-22 07:36:55 +05:30
Rohit Waghchaure
b0e872aad4 test: fixed test
(cherry picked from commit 63ffce58cc)
2024-01-21 16:53:46 +00:00
Rohit Waghchaure
96e1db80ac fix: added button to make serial / batch from Purchase Invoice
(cherry picked from commit b4393bc03d)
2024-01-21 16:53:46 +00:00
rohitwaghchaure
35d3edfca4 Merge pull request #39477 from frappe/mergify/bp/version-15-hotfix/pr-39475
fix: key error during reposting (backport #39475)
2024-01-21 22:23:26 +05:30
Rohit Waghchaure
b4981f8816 fix: key error during reposting
(cherry picked from commit ebc8230d45)
2024-01-21 14:22:36 +00:00
Gursheen Kaur Anand
7c666435a2 Merge pull request #39474 from frappe/mergify/bp/version-15-hotfix/pr-39229
fix: use most reliable section reference per report line (backport #39229)
2024-01-21 14:23:12 +05:30
David Arnold
b388adcb2e fix: use most reliable section reference per report line
(cherry picked from commit b5be17c6df)
2024-01-21 08:14:55 +00:00
Gursheen Kaur Anand
3ba413a150 Merge pull request #39471 from frappe/mergify/bp/version-15-hotfix/pr-39424
Revert "fix(minor): financial statements period end date" (backport #39424)
2024-01-20 18:51:34 +05:30
Gursheen Kaur Anand
ddb84d9036 Revert "fix(minor): financial statements period end date"
(cherry picked from commit 73625a2622)
2024-01-20 12:29:27 +00:00
mergify[bot]
00a3ee313b refactor(UX): Accounts workspace cleanup (backport #39232) (#39456)
* refactor(UX): Accounts workspace cleanup (#39232)

* refactor(UX): Accounts workspace cleanup

* chore: move asset workspace outside accounting

* fix: remove redundant links from parent workspace

* chore: change icons for payable & receivable workspaces

* chore: remove redundant links from subworkspaces

(cherry picked from commit 35067282cf)

* chore: fix conflicts

---------

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2024-01-19 12:40:25 +05:30
Gursheen Kaur Anand
f8d7ca515c Merge pull request #39451 from frappe/mergify/bp/version-15-hotfix/pr-39449
fix: unallocated amount after taxes and charges (backport #39449)
2024-01-19 10:57:35 +05:30
Frappe PR Bot
550213b4f4 chore(release): Bumped to Version 15.10.3
## [15.10.3](https://github.com/frappe/erpnext/compare/v15.10.2...v15.10.3) (2024-01-19)

### Bug Fixes

* duplicate name error while making variant ([0c222aa](0c222aa504))
2024-01-19 00:44:51 +00:00
rohitwaghchaure
a962657c7b Merge pull request #39444 from frappe/mergify/bp/version-15/pr-39443
fix: duplicate name error while making variant (backport #39436) (backport #39443)
2024-01-19 06:13:35 +05:30
Gursheen Anand
86f3f62e00 fix: linting issue
(cherry picked from commit 99b94af49f)
2024-01-18 10:45:49 +00:00
Gursheen Anand
74613c7fe8 fix: set unallocated amount after base tax
(cherry picked from commit e9bc63aacf)
2024-01-18 10:45:49 +00:00
Rohit Waghchaure
0c222aa504 fix: duplicate name error while making variant
(cherry picked from commit d7e6b83e64)
(cherry picked from commit b649c50ecc)
2024-01-18 01:24:00 +00:00
rohitwaghchaure
3244ef3a68 Merge pull request #39443 from frappe/mergify/bp/version-15-hotfix/pr-39436
fix: duplicate name error while making variant (backport #39436)
2024-01-18 06:52:17 +05:30
Rohit Waghchaure
b649c50ecc fix: duplicate name error while making variant
(cherry picked from commit d7e6b83e64)
2024-01-18 01:21:52 +00:00
Frappe PR Bot
d5c26efb8c chore(release): Bumped to Version 15.10.2
## [15.10.2](https://github.com/frappe/erpnext/compare/v15.10.1...v15.10.2) (2024-01-17)

### Bug Fixes

* added indexing to improve performance ([50fe419](50fe4191d3))
* added item group in stock reco ([eec6c25](eec6c25f9e))
* Asset module tests ([9e33216](9e33216c24))
* asset WDV depreciation calc according to IT act ([2448ba6](2448ba6bc4))
* batches not coming correctly in the batch selector ([1394a1c](1394a1c5e9))
* broken dimension filters in Sales/Purchase register ([04037b7](04037b7e38))
* Cancel asset capitalisation record on cancellation of asset and vice-versa ([011c5a6](011c5a69f0))
* circular dependency error while deleting QC ([7ca8e49](7ca8e49b38))
* composite asset capitalization using asset components ([8bc8bc1](8bc8bc1822))
* consider all years in holiday list ([21eed78](21eed78fa1))
* consistency in display reserved_stock checkbox on Sales Order Item according global settings and item.is_stock_item (backport [#38322](https://github.com/frappe/erpnext/issues/38322)) ([#39417](https://github.com/frappe/erpnext/issues/39417)) ([53f61f1](53f61f1ad1))
* date in master document for dictionary condition ([9aae439](9aae439b1f))
* fetch name for fy ([53208df](53208dfb3e))
* Ignore default payment terms template for opening invoices ([5dc2e80](5dc2e80987))
* incorrect percentage received in purchase invoice ([758b9b8](758b9b8a81))
* incorrect sql error if account name has '%' ([b43f703](b43f70325c))
* modified date ([cd870ee](cd870ee30c))
* modified date ([f048017](f0480173fb))
* modified date was not set ([2dc8686](2dc8686a81))
* modified date was not updated ([61595c7](61595c7ede))
* performance issue related to stock entry (backport [#39301](https://github.com/frappe/erpnext/issues/39301)) ([#39303](https://github.com/frappe/erpnext/issues/39303)) ([d882305](d882305c72))
* permission issue for the BIN ([8816b27](8816b2740a))
* possible typerror in utils.js ([80956b7](80956b7956))
* project filters on Delivery Note and Sales Order ([a51f956](a51f956f3e))
* project query controller logic ([07e2901](07e2901e4b))
* reset default after test ([e6f3a14](e6f3a14289))
* SBB Total Qty validation for SE ([ca18853](ca18853785))
* test for asset depreciation ([ff1647a](ff1647a1d2))
* **test:** test case for project query ([1b8f572](1b8f572e80))
* unreconcile Bank Transaction on cancel of payment voucher ([16860c2](16860c228d))
* Update subscription period ([e219042](e219042304))
* use child table values instead of global min max ([04c96dd](04c96ddc6c))
* WDV as per IT Act: calculate yearly amount first and then split it based on months ([e3cd35b](e3cd35b959))
2024-01-17 17:06:29 +00:00
Deepesh Garg
e00533ff4e Merge pull request #39405 from frappe/version-15-hotfix
chore: release v15
2024-01-17 22:34:57 +05:30
Nabin Hait
6509548474 Merge pull request #39438 from frappe/mergify/bp/version-15-hotfix/pr-39429
fix: composite asset capitalization using asset components (backport #39429)
2024-01-17 22:13:50 +05:30
mergify[bot]
c8b3478fe1 Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-39429 2024-01-17 16:26:04 +00:00
Nabin Hait
f453aaeab0 Merge pull request #39439 from nabinhait/test-case-fix-asset-depr
fix: test for asset depreciation
2024-01-17 21:54:55 +05:30
Nabin Hait
ff1647a1d2 fix: test for asset depreciation 2024-01-17 21:53:00 +05:30
Nabin Hait
8bc8bc1822 fix: composite asset capitalization using asset components
(cherry picked from commit 5df40661d2)
2024-01-17 15:36:04 +00:00
Nabin Hait
9f86b92eb7 Merge pull request #39431 from frappe/mergify/bp/version-15-hotfix/pr-39427
fix: Asset module tests (backport #39427)
2024-01-17 17:38:46 +05:30
Nabin Hait
04c8e9b355 Merge pull request #39422 from frappe/mergify/bp/version-15-hotfix/pr-39386
fix: Cancel asset capitalisation record on cancellation of asset and vice-versa (backport #39386)
2024-01-17 17:33:21 +05:30
Nabin Hait
fbfd0a6db0 Merge pull request #39420 from frappe/mergify/bp/version-15-hotfix/pr-39385
fix: WDV as per IT Act: calculate yearly amount first and then split it based on months (backport #39385)
2024-01-17 17:29:12 +05:30
Nabin Hait
9e33216c24 fix: Asset module tests
(cherry picked from commit 97f69986ff)
2024-01-17 11:56:41 +00:00
Deepesh Garg
62f7d984be Merge pull request #39425 from frappe/mergify/bp/version-15-hotfix/pr-39423
fix: Update subscription period (#39423)
2024-01-17 15:03:51 +05:30
Deepesh Garg
e219042304 fix: Update subscription period
(cherry picked from commit 7eefedfb11)
2024-01-17 07:28:57 +00:00
Nabin Hait
011c5a69f0 fix: Cancel asset capitalisation record on cancellation of asset and vice-versa
(cherry picked from commit efe9f6656f)
2024-01-17 06:45:39 +00:00
Nabin Hait
e3cd35b959 fix: WDV as per IT Act: calculate yearly amount first and then split it based on months
(cherry picked from commit 22bd6a54b2)
2024-01-17 06:44:26 +00:00
mergify[bot]
53f61f1ad1 fix: consistency in display reserved_stock checkbox on Sales Order Item according global settings and item.is_stock_item (backport #38322) (#39417)
fix: consistency in display reserved_stock checkbox on Sales Order Item according global settings and item.is_stock_item (#38322)

* fix: consistency in display reserved_stock checkbox on Sales Order Item according global settings and item.is_stock_item

* fix: evaluate depends_on for fdata visibility in grid

* fix: evaluate depends_on for fdata visibility in grid

* chore: change after review

* chore: change for review

(cherry picked from commit af80d253db)

Co-authored-by: HENRY Florian <florian.henry@open-concept.pro>
2024-01-17 10:45:57 +05:30
rohitwaghchaure
c939aa5cf8 Merge pull request #39409 from frappe/mergify/bp/version-15-hotfix/pr-39406
fix: permission issue for the Bin (backport #39406)
2024-01-16 16:55:50 +05:30
ruthra kumar
93a861fac5 Merge pull request #39412 from frappe/mergify/bp/version-15-hotfix/pr-39402
fix: project query controller logic (backport #39402)
2024-01-16 16:49:56 +05:30
ruthra kumar
5a65a10dba refactor: better ordering of query result
(cherry picked from commit bfe42fdccb)
2024-01-16 10:55:36 +00:00
ruthra kumar
1b8f572e80 fix(test): test case for project query
(cherry picked from commit 3349dde5e2)
2024-01-16 10:55:36 +00:00
ruthra kumar
07e2901e4b fix: project query controller logic
(cherry picked from commit 4eefb445a7)
2024-01-16 10:55:35 +00:00
Rohit Waghchaure
8816b2740a fix: permission issue for the BIN
(cherry picked from commit 6e4d4a55cd)
2024-01-16 10:22:22 +00:00
ruthra kumar
bcf8053fd9 Merge pull request #39383 from frappe/mergify/bp/version-15-hotfix/pr-39332
refactor: prevent foreign currency subscription for a party (backport #39332)
2024-01-16 11:19:37 +05:30
ruthra kumar
cd1820f680 refactor(test): set default currency for party 2024-01-16 10:47:51 +05:30
ruthra kumar
235e3893a0 Merge pull request #39393 from frappe/mergify/bp/version-15-hotfix/pr-39391
fix: possible typerror in utils.js (backport #39391)
2024-01-15 20:49:48 +05:30
ruthra kumar
80956b7956 fix: possible typerror in utils.js
and remove unwanted debugging statements

(cherry picked from commit 60b26ad8b2)
2024-01-15 15:16:51 +00:00
Nabin Hait
9897c26ae6 Merge pull request #39285 from frappe/mergify/bp/version-15-hotfix/pr-39052
fix: asset WDV depreciation calc according to IT act [dev] (backport #39052)
2024-01-15 16:58:45 +05:30
ruthra kumar
32afe7de31 refactor(test): supply default currency for subscription plans
(cherry picked from commit 1387b0ba7f)
2024-01-15 09:36:50 +00:00
ruthra kumar
c288db0356 refactor: making currency mandatory for subcscription plans
(cherry picked from commit 19975dcb7b)
2024-01-15 09:36:50 +00:00
ruthra kumar
61f073f8b1 refactor: prevent foreign currency subscription for a party
(cherry picked from commit 6b5fa2c673)
2024-01-15 09:36:49 +00:00
Frappe PR Bot
8a356cbe51 chore(release): Bumped to Version 15.10.1
## [15.10.1](https://github.com/frappe/erpnext/compare/v15.10.0...v15.10.1) (2024-01-15)

### Bug Fixes

* SBB Total Qty validation for SE (backport [#39335](https://github.com/frappe/erpnext/issues/39335)) (backport [#39348](https://github.com/frappe/erpnext/issues/39348)) ([#39353](https://github.com/frappe/erpnext/issues/39353)) ([b8f4c31](b8f4c3193a))
2024-01-15 06:47:45 +00:00
mergify[bot]
1503ba92e3 ci: bump node in release workflow (backport #39377) (backport #39378) (#39380)
ci: bump node in release workflow (backport #39377) (#39378)

* ci: bump node in release workflow

(cherry picked from commit aef87cced7)

# Conflicts:
#	.github/workflows/release.yml

* chore: `conflicts`

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
(cherry picked from commit e282ba78c1)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-01-15 12:12:35 +05:30
mergify[bot]
e282ba78c1 ci: bump node in release workflow (backport #39377) (#39378)
* ci: bump node in release workflow

(cherry picked from commit aef87cced7)

# Conflicts:
#	.github/workflows/release.yml

* chore: `conflicts`

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-01-15 12:08:44 +05:30
ruthra kumar
1b8b92b8d7 Merge pull request #39376 from frappe/mergify/bp/version-15-hotfix/pr-39336
refactor: disallow bank transactions on different currencies (backport #39336)
2024-01-15 10:41:26 +05:30
ruthra kumar
f2e19ca6fd Merge pull request #39375 from frappe/mergify/bp/version-15-hotfix/pr-39371
fix: incorrect sql error if account name has '%' (backport #39371)
2024-01-15 10:40:54 +05:30
ruthra kumar
32c6111728 refactor(test): supply default currency to Bank Transaction
(cherry picked from commit a27a4db3de)
2024-01-15 04:32:46 +00:00
ruthra kumar
f609b8ae5d refactor: better error message
(cherry picked from commit b4354cbc8d)
2024-01-15 04:32:46 +00:00
ruthra kumar
dbbba046ab refactor: disallow bank transactions on different currencies
(cherry picked from commit cdd0acc672)
2024-01-15 04:32:45 +00:00
ruthra kumar
b43f70325c fix: incorrect sql error if account name has '%'
(cherry picked from commit 641c3de0ca)
2024-01-15 04:10:40 +00:00
rohitwaghchaure
3f5b1bcd05 Merge pull request #39373 from frappe/mergify/bp/version-15-hotfix/pr-39372
fix: batches not coming correctly in the batch selector (backport #39372)
2024-01-15 06:34:11 +05:30
Rohit Waghchaure
1394a1c5e9 fix: batches not coming correctly in the batch selector
(cherry picked from commit 114f2b4326)
2024-01-14 18:19:30 +00:00
Deepesh Garg
7ca9ffbaa7 Merge pull request #39329 from frappe/mergify/bp/version-15-hotfix/pr-38974
fix: unreconciled Bank Transaction on cancel of payment voucher (#38974)
2024-01-14 17:55:32 +05:30
rohitwaghchaure
137ce76a35 Merge pull request #39369 from frappe/mergify/bp/version-15-hotfix/pr-39224
Update purchase_taxes_and_charges.json label Rate to Tax Rate (backport #39224)
2024-01-14 11:59:41 +05:30
rohitwaghchaure
cd870ee30c fix: modified date
(cherry picked from commit 6827edb2c5)
2024-01-14 05:57:45 +00:00
rohitwaghchaure
2dc8686a81 fix: modified date was not set
(cherry picked from commit 566876ae7a)
2024-01-14 05:57:44 +00:00
mahsem
6bdf944ecf Update purchase_taxes_and_charges.json label Rate to Tax Rate
Change Rate label to existing Tax Rate label so it can be correctly translated in other languages

(cherry picked from commit bd464197c4)
2024-01-14 05:57:44 +00:00
rohitwaghchaure
9842fb5b64 Merge pull request #39361 from frappe/mergify/bp/version-15-hotfix/pr-39225
Update sales_taxes_and_charges.json (backport #39225)
2024-01-14 11:24:20 +05:30
rohitwaghchaure
c548c57207 Merge pull request #39365 from frappe/mergify/bp/version-15-hotfix/pr-39359
fix: added item group in stock reco (backport #39359)
2024-01-14 11:24:00 +05:30
rohitwaghchaure
cb326ac0db Merge pull request #39362 from rohitwaghchaure/fixed-closing-stock-balance-field-issue
chore: removed extra field
2024-01-14 10:44:47 +05:30
rohitwaghchaure
f0480173fb fix: modified date 2024-01-14 10:43:34 +05:30
Rohit Waghchaure
eec6c25f9e fix: added item group in stock reco
(cherry picked from commit 116ff8241c)
2024-01-14 04:58:42 +00:00
Rohit Waghchaure
bf4e514cde chore: removed extra field 2024-01-14 10:21:38 +05:30
rohitwaghchaure
61595c7ede fix: modified date was not updated
(cherry picked from commit f567af49a6)
2024-01-14 04:46:29 +00:00
mahsem
d510b46f13 Update sales_taxes_and_charges.json
Change Rate label to existing Tax Rate label so it can be correctly translated in other languages

(cherry picked from commit 2b93be1139)
2024-01-14 04:46:29 +00:00
rohitwaghchaure
15e116375b Merge pull request #39325 from frappe/mergify/bp/version-15-hotfix/pr-39305
fix: naming series variable parsing for FY (backport #39305)
2024-01-14 09:39:06 +05:30
mergify[bot]
b8f4c3193a fix: SBB Total Qty validation for SE (backport #39335) (backport #39348) (#39353)
fix: SBB Total Qty validation for SE

(cherry picked from commit c20241fcb5)
(cherry picked from commit ca18853785)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-01-13 10:25:53 +05:30
rohitwaghchaure
832aa5f5ab Merge pull request #39348 from frappe/mergify/bp/version-15-hotfix/pr-39335
fix: SBB Total Qty validation for SE (backport #39335)
2024-01-12 21:19:26 +05:30
s-aga-r
ca18853785 fix: SBB Total Qty validation for SE
(cherry picked from commit c20241fcb5)
2024-01-12 15:30:36 +00:00
rohitwaghchaure
049864e7a2 Merge pull request #39342 from frappe/mergify/bp/version-15-hotfix/pr-38970
fix: use local attribute range in multiple item variant dialog (backport #38970)
2024-01-12 20:57:14 +05:30
rohitwaghchaure
62db0d77ca Merge pull request #39345 from frappe/mergify/bp/version-15-hotfix/pr-39333
fix: added indexing to improve performance (backport #39333)
2024-01-12 20:55:57 +05:30
Rohit Waghchaure
50fe4191d3 fix: added indexing to improve performance
(cherry picked from commit ac81323fec)
2024-01-12 13:10:47 +00:00
Gursheen Anand
04c96ddc6c fix: use child table values instead of global min max
(cherry picked from commit 43fed29514)
2024-01-12 13:08:31 +00:00
mergify[bot]
d7840559a0 chore: remove share, print and email permissions from Buying Settings (backport #39337) (#39339)
chore: remove share, print and email permissions from Buying Settings

(cherry picked from commit 3c46abca6c)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2024-01-12 16:49:00 +05:30
Raffael Meyer
6f06313023 Merge pull request #39327 from frappe/mergify/bp/version-15-hotfix/pr-39117
fix: consider all years in holiday list (backport #39117)
2024-01-11 15:04:29 +01:00
barredterra
6b2e3503d9 chore: resolve merge confilcts 2024-01-11 14:56:20 +01:00
barredterra
b2fc5e4988 test: cancel voucher linked to Bank Transaction
(cherry picked from commit 517bedeb7e)
2024-01-11 13:37:48 +00:00
barredterra
16860c228d fix: unreconcile Bank Transaction on cancel of payment voucher
(cherry picked from commit 0a95b38166)

# Conflicts:
#	erpnext/accounts/doctype/bank_transaction/bank_transaction.py
#	erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.js
2024-01-11 13:37:48 +00:00
barredterra
8a84f8a465 test: improve test for local holidays
(cherry picked from commit 60329ade9e)
2024-01-11 13:29:01 +00:00
barredterra
21eed78fa1 fix: consider all years in holiday list
(cherry picked from commit 300aaa39fe)
2024-01-11 13:29:00 +00:00
Gursheen Anand
e6f3a14289 fix: reset default after test
(cherry picked from commit 813b7a96fb)
2024-01-11 13:27:13 +00:00
Gursheen Anand
2beb3f8718 test: naming series variable parsing
(cherry picked from commit bbdf98a8f0)
2024-01-11 13:27:06 +00:00
Gursheen Anand
9aae439b1f fix: date in master document for dictionary condition
(cherry picked from commit d96a777edd)
2024-01-11 13:27:02 +00:00
Nabin Hait
b748095589 Merge pull request #39220 from frappe/mergify/bp/version-15-hotfix/pr-39202
fix: parse naming series with FY name (backport #39202)
2024-01-11 18:24:34 +05:30
ruthra kumar
7bd2acdef1 Merge pull request #39323 from frappe/mergify/bp/version-15-hotfix/pr-39212
fix: project filters on Delivery Note and Sales Order (backport #39212)
2024-01-11 18:07:12 +05:30
ruthra kumar
a51f956f3e fix: project filters on Delivery Note and Sales Order
(cherry picked from commit 9ba6ff67d5)
2024-01-11 12:34:43 +00:00
ruthra kumar
494c26e48a Merge pull request #39319 from frappe/mergify/bp/version-15-hotfix/pr-39317
fix: broken dimension filters in Sales/Purchase register (backport #39317)
2024-01-11 17:12:35 +05:30
Deepesh Garg
da7b2febe0 Merge pull request #39295 from frappe/mergify/bp/version-15-hotfix/pr-39256
fix: Ignore default payment terms template for opening invoices (#39256)
2024-01-11 17:06:53 +05:30
ruthra kumar
04037b7e38 fix: broken dimension filters in Sales/Purchase register
(cherry picked from commit 7b3f9386d7)
2024-01-11 11:20:43 +00:00
rohitwaghchaure
484db65797 Merge pull request #39315 from frappe/mergify/bp/version-15-hotfix/pr-39215
fix: incorrect percentage received in purchase invoice (backport #39215)
2024-01-11 15:14:44 +05:30
rohitwaghchaure
3f4cf15def Merge pull request #39312 from frappe/mergify/bp/version-15-hotfix/pr-39299
fix: circular dependency error on deletion of QC and Stock Entry (backport #39299)
2024-01-11 15:14:34 +05:30
Rohit Waghchaure
758b9b8a81 fix: incorrect percentage received in purchase invoice
(cherry picked from commit 8d2c78867e)
2024-01-11 09:21:41 +00:00
Rohit Waghchaure
7ca8e49b38 fix: circular dependency error while deleting QC
(cherry picked from commit 7cc324e31e)
2024-01-11 09:20:42 +00:00
mergify[bot]
d882305c72 fix: performance issue related to stock entry (backport #39301) (#39303)
fix: performance issue related to stock entry (#39301)

(cherry picked from commit c67b0a3a64)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-01-10 22:18:16 +05:30
Deepesh Garg
5dc2e80987 fix: Ignore default payment terms template for opening invoices
(cherry picked from commit 53bf44d2b8)
2024-01-10 10:37:45 +00:00
anandbaburajan
2448ba6bc4 fix: asset WDV depreciation calc according to IT act
(cherry picked from commit 026824880d)
2024-01-10 06:48:06 +00:00
Gursheen Anand
53208dfb3e fix: fetch name for fy
(cherry picked from commit d0ea598cdf)
2024-01-08 16:22:58 +00:00
1350 changed files with 48485 additions and 33254 deletions

View File

@@ -9,6 +9,13 @@ trim_trailing_whitespace = true
charset = utf-8
# python, js indentation settings
[{*.py,*.js}]
[{*.py,*.js,*.vue,*.css,*.scss,*.html}]
indent_style = tab
indent_size = 4
max_line_length = 110
# JSON files - mostly doctype schema files
[{*.json}]
insert_final_newline = false
indent_style = space
indent_size = 2

View File

@@ -124,6 +124,7 @@
"beforeEach": true,
"onScan": true,
"extend_cscript": true,
"localforage": true
"localforage": true,
"Plaid": true
}
}

View File

@@ -28,4 +28,7 @@ b147b85e6ac19a9220cd1e2958a6ebd99373283a
494bd9ef78313436f0424b918f200dab8fc7c20b
# bulk format python code with black
baec607ff5905b1c67531096a9cf50ec7ff00a5d
baec607ff5905b1c67531096a9cf50ec7ff00a5d
# ruff
960ef14b7a68cfec9e309ec12845f521cb6a721c

View File

@@ -17,7 +17,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18
node-version: 20
- name: Setup dependencies
run: |

View File

@@ -20,6 +20,23 @@ repos:
- id: check-yaml
- id: debug-statements
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
types_or: [javascript, vue, scss]
# Ignore any files that might contain jinja / bundles
exclude: |
(?x)^(
erpnext/public/dist/.*|
cypress/.*|
.*node_modules.*|
.*boilerplate.*|
erpnext/public/js/controllers/.*|
erpnext/templates/pages/order.js|
erpnext/templates/includes/.*
)$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.44.0
hooks:
@@ -38,28 +55,15 @@ repos:
erpnext/templates/includes/.*
)$
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
hooks:
- id: flake8
additional_dependencies: [
'flake8-bugbear',
'flake8-tuple',
]
args: ['--config', '.github/helper/.flake8_strict']
exclude: ".*setup.py$"
- id: ruff
name: "Run ruff linter and apply fixes"
args: ["--fix"]
- repo: https://github.com/adityahase/black
rev: 9cb0a69f4d0030cdf687eddf314468b39ed54119
hooks:
- id: black
additional_dependencies: ['click==8.0.4']
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
exclude: ".*setup.py$"
- id: ruff-format
name: "Format Python code"
ci:

View File

@@ -1,25 +1,13 @@
module.exports = {
parserPreset: 'conventional-changelog-conventionalcommits',
parserPreset: "conventional-changelog-conventionalcommits",
rules: {
'subject-empty': [2, 'never'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
"subject-empty": [2, "never"],
"type-case": [2, "always", "lower-case"],
"type-empty": [2, "never"],
"type-enum": [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
"always",
["build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test"],
],
},
};

View File

@@ -3,7 +3,7 @@ import inspect
import frappe
__version__ = "15.10.0"
__version__ = "15.23.3"
def get_default_company(user=None):
@@ -13,7 +13,7 @@ def get_default_company(user=None):
if not user:
user = frappe.session.user
companies = get_user_default_as_list(user, "company")
companies = get_user_default_as_list("company", user)
if companies:
default_company = companies[0]
else:
@@ -36,10 +36,8 @@ def get_default_cost_center(company):
if not frappe.flags.company_cost_center:
frappe.flags.company_cost_center = {}
if not company in frappe.flags.company_cost_center:
frappe.flags.company_cost_center[company] = frappe.get_cached_value(
"Company", company, "cost_center"
)
if company not in frappe.flags.company_cost_center:
frappe.flags.company_cost_center[company] = frappe.get_cached_value("Company", company, "cost_center")
return frappe.flags.company_cost_center[company]
@@ -47,7 +45,7 @@ def get_company_currency(company):
"""Returns the default company currency"""
if not frappe.flags.company_currency:
frappe.flags.company_currency = {}
if not company in frappe.flags.company_currency:
if company not in frappe.flags.company_currency:
frappe.flags.company_currency[company] = frappe.db.get_value(
"Company", company, "default_currency", cache=True
)
@@ -81,7 +79,7 @@ def is_perpetual_inventory_enabled(company):
if not hasattr(frappe.local, "enable_perpetual_inventory"):
frappe.local.enable_perpetual_inventory = {}
if not company in frappe.local.enable_perpetual_inventory:
if company not in frappe.local.enable_perpetual_inventory:
frappe.local.enable_perpetual_inventory[company] = (
frappe.get_cached_value("Company", company, "enable_perpetual_inventory") or 0
)
@@ -96,7 +94,7 @@ def get_default_finance_book(company=None):
if not hasattr(frappe.local, "default_finance_book"):
frappe.local.default_finance_book = {}
if not company in frappe.local.default_finance_book:
if company not in frappe.local.default_finance_book:
frappe.local.default_finance_book[company] = frappe.get_cached_value(
"Company", company, "default_finance_book"
)
@@ -108,7 +106,7 @@ def get_party_account_type(party_type):
if not hasattr(frappe.local, "party_account_types"):
frappe.local.party_account_types = {}
if not party_type in frappe.local.party_account_types:
if party_type not in frappe.local.party_account_types:
frappe.local.party_account_types[party_type] = (
frappe.db.get_value("Party Type", party_type, "account_type") or ""
)

View File

@@ -11,14 +11,14 @@ class ERPNextAddress(Address):
def validate(self):
self.validate_reference()
self.update_compnay_address()
super(ERPNextAddress, self).validate()
super().validate()
def link_address(self):
"""Link address based on owner"""
if self.is_your_company_address:
return
return super(ERPNextAddress, self).link_address()
return super().link_address()
def update_compnay_address(self):
for link in self.get("links"):
@@ -26,11 +26,11 @@ class ERPNextAddress(Address):
self.is_your_company_address = 1
def validate_reference(self):
if self.is_your_company_address and not [
row for row in self.links if row.link_doctype == "Company"
]:
if self.is_your_company_address and not [row for row in self.links if row.link_doctype == "Company"]:
frappe.throw(
_("Address needs to be linked to a Company. Please add a row for Company in the Links table."),
_(
"Address needs to be linked to a Company. Please add a row for Company in the Links table."
),
title=_("Company Not Linked"),
)

View File

@@ -1,4 +1,4 @@
frappe.provide('frappe.dashboards.chart_sources');
frappe.provide("frappe.dashboards.chart_sources");
frappe.dashboards.chart_sources["Account Balance Timeline"] = {
method: "erpnext.accounts.dashboard_chart_source.account_balance_timeline.account_balance_timeline.get",
@@ -9,14 +9,14 @@ frappe.dashboards.chart_sources["Account Balance Timeline"] = {
fieldtype: "Link",
options: "Company",
default: frappe.defaults.get_user_default("Company"),
reqd: 1
reqd: 1,
},
{
fieldname: "account",
label: __("Account"),
fieldtype: "Link",
options: "Account",
reqd: 1
reqd: 1,
},
]
],
};

View File

@@ -37,7 +37,7 @@ def get(
filters = frappe.parse_json(filters) or frappe.parse_json(chart.filters_json)
account = filters.get("account")
company = filters.get("company")
filters.get("company")
if not account and chart_name:
frappe.throw(
@@ -83,7 +83,6 @@ def build_result(account, dates, gl_entries):
# get balances in debit
for entry in gl_entries:
# entry date is after the current pointer, so move the pointer forward
while getdate(entry.posting_date) > result[date_index][0]:
date_index += 1
@@ -133,8 +132,6 @@ def get_dates_from_timegrain(from_date, to_date, timegrain):
dates = [get_period_ending(from_date, timegrain)]
while getdate(dates[-1]) < getdate(to_date):
date = get_period_ending(
add_to_date(dates[-1], years=years, months=months, days=days), timegrain
)
date = get_period_ending(add_to_date(dates[-1], years=years, months=months, days=days), timegrain)
dates.append(date)
return dates

View File

@@ -24,14 +24,10 @@ from erpnext.accounts.utils import get_account_currency
def validate_service_stop_date(doc):
"""Validates service_stop_date for Purchase Invoice and Sales Invoice"""
enable_check = (
"enable_deferred_revenue" if doc.doctype == "Sales Invoice" else "enable_deferred_expense"
)
enable_check = "enable_deferred_revenue" if doc.doctype == "Sales Invoice" else "enable_deferred_expense"
old_stop_dates = {}
old_doc = frappe.db.get_all(
"{0} Item".format(doc.doctype), {"parent": doc.name}, ["name", "service_stop_date"]
)
old_doc = frappe.db.get_all(f"{doc.doctype} Item", {"parent": doc.name}, ["name", "service_stop_date"])
for d in old_doc:
old_stop_dates[d.name] = d.service_stop_date or ""
@@ -62,16 +58,14 @@ def build_conditions(process_type, account, company):
)
if account:
conditions += "AND %s='%s'" % (deferred_account, account)
conditions += f"AND {deferred_account}='{account}'"
elif company:
conditions += f"AND p.company = {frappe.db.escape(company)}"
return conditions
def convert_deferred_expense_to_expense(
deferred_process, start_date=None, end_date=None, conditions=""
):
def convert_deferred_expense_to_expense(deferred_process, start_date=None, end_date=None, conditions=""):
# book the expense/income on the last day, but it will be trigger on the 1st of month at 12:00 AM
if not start_date:
@@ -81,16 +75,14 @@ def convert_deferred_expense_to_expense(
# check for the purchase invoice for which GL entries has to be done
invoices = frappe.db.sql_list(
"""
f"""
select distinct item.parent
from `tabPurchase Invoice Item` item, `tabPurchase Invoice` p
where item.service_start_date<=%s and item.service_end_date>=%s
and item.enable_deferred_expense = 1 and item.parent=p.name
and item.docstatus = 1 and ifnull(item.amount, 0) > 0
{0}
""".format(
conditions
),
{conditions}
""",
(end_date, start_date),
) # nosec
@@ -103,9 +95,7 @@ def convert_deferred_expense_to_expense(
send_mail(deferred_process)
def convert_deferred_revenue_to_income(
deferred_process, start_date=None, end_date=None, conditions=""
):
def convert_deferred_revenue_to_income(deferred_process, start_date=None, end_date=None, conditions=""):
# book the expense/income on the last day, but it will be trigger on the 1st of month at 12:00 AM
if not start_date:
@@ -115,16 +105,14 @@ def convert_deferred_revenue_to_income(
# check for the sales invoice for which GL entries has to be done
invoices = frappe.db.sql_list(
"""
f"""
select distinct item.parent
from `tabSales Invoice Item` item, `tabSales Invoice` p
where item.service_start_date<=%s and item.service_end_date>=%s
and item.enable_deferred_revenue = 1 and item.parent=p.name
and item.docstatus = 1 and ifnull(item.amount, 0) > 0
{0}
""".format(
conditions
),
{conditions}
""",
(end_date, start_date),
) # nosec
@@ -243,9 +231,7 @@ def calculate_monthly_amount(
already_booked_amount, already_booked_amount_in_account_currency = get_already_booked_amount(
doc, item
)
base_amount = flt(
item.base_net_amount - already_booked_amount, item.precision("base_net_amount")
)
base_amount = flt(item.base_net_amount - already_booked_amount, item.precision("base_net_amount"))
if account_currency == doc.company_currency:
amount = base_amount
else:
@@ -265,17 +251,13 @@ def calculate_amount(doc, item, last_gl_entry, total_days, total_booking_days, a
if account_currency == doc.company_currency:
amount = base_amount
else:
amount = flt(
item.net_amount * total_booking_days / flt(total_days), item.precision("net_amount")
)
amount = flt(item.net_amount * total_booking_days / flt(total_days), item.precision("net_amount"))
else:
already_booked_amount, already_booked_amount_in_account_currency = get_already_booked_amount(
doc, item
)
base_amount = flt(
item.base_net_amount - already_booked_amount, item.precision("base_net_amount")
)
base_amount = flt(item.base_net_amount - already_booked_amount, item.precision("base_net_amount"))
if account_currency == doc.company_currency:
amount = base_amount
else:
@@ -296,26 +278,22 @@ def get_already_booked_amount(doc, item):
gl_entries_details = frappe.db.sql(
"""
select sum({0}) as total_credit, sum({1}) as total_credit_in_account_currency, voucher_detail_no
select sum({}) as total_credit, sum({}) as total_credit_in_account_currency, voucher_detail_no
from `tabGL Entry` where company=%s and account=%s and voucher_type=%s and voucher_no=%s and voucher_detail_no=%s
and is_cancelled = 0
group by voucher_detail_no
""".format(
total_credit_debit, total_credit_debit_currency
),
""".format(total_credit_debit, total_credit_debit_currency),
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
as_dict=True,
)
journal_entry_details = frappe.db.sql(
"""
SELECT sum(c.{0}) as total_credit, sum(c.{1}) as total_credit_in_account_currency, reference_detail_no
SELECT sum(c.{}) as total_credit, sum(c.{}) as total_credit_in_account_currency, reference_detail_no
FROM `tabJournal Entry` p , `tabJournal Entry Account` c WHERE p.name = c.parent and
p.company = %s and c.account=%s and c.reference_type=%s and c.reference_name=%s and c.reference_detail_no=%s
and p.docstatus < 2 group by reference_detail_no
""".format(
total_credit_debit, total_credit_debit_currency
),
""".format(total_credit_debit, total_credit_debit_currency),
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
as_dict=True,
)
@@ -337,9 +315,7 @@ def get_already_booked_amount(doc, item):
def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
enable_check = (
"enable_deferred_revenue" if doc.doctype == "Sales Invoice" else "enable_deferred_expense"
)
enable_check = "enable_deferred_revenue" if doc.doctype == "Sales Invoice" else "enable_deferred_expense"
accounts_frozen_upto = frappe.db.get_single_value("Accounts Settings", "acc_frozen_upto")
@@ -384,45 +360,45 @@ def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
)
if not amount:
return
gl_posting_date = end_date
prev_posting_date = None
# check if books nor frozen till endate:
if accounts_frozen_upto and getdate(end_date) <= getdate(accounts_frozen_upto):
gl_posting_date = get_last_day(add_days(accounts_frozen_upto, 1))
prev_posting_date = end_date
if via_journal_entry:
book_revenue_via_journal_entry(
doc,
credit_account,
debit_account,
amount,
base_amount,
gl_posting_date,
project,
account_currency,
item.cost_center,
item,
deferred_process,
submit_journal_entry,
)
else:
make_gl_entries(
doc,
credit_account,
debit_account,
against,
amount,
base_amount,
gl_posting_date,
project,
account_currency,
item.cost_center,
item,
deferred_process,
)
gl_posting_date = end_date
prev_posting_date = None
# check if books nor frozen till endate:
if accounts_frozen_upto and getdate(end_date) <= getdate(accounts_frozen_upto):
gl_posting_date = get_last_day(add_days(accounts_frozen_upto, 1))
prev_posting_date = end_date
if via_journal_entry:
book_revenue_via_journal_entry(
doc,
credit_account,
debit_account,
amount,
base_amount,
gl_posting_date,
project,
account_currency,
item.cost_center,
item,
deferred_process,
submit_journal_entry,
)
else:
make_gl_entries(
doc,
credit_account,
debit_account,
against,
amount,
base_amount,
gl_posting_date,
project,
account_currency,
item.cost_center,
item,
deferred_process,
)
# Returned in case of any errors because it tries to submit the same record again and again in case of errors
if frappe.flags.deferred_accounting_error:
@@ -440,9 +416,7 @@ def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
via_journal_entry = cint(
frappe.db.get_singles_value("Accounts Settings", "book_deferred_entries_via_journal_entry")
)
submit_journal_entry = cint(
frappe.db.get_singles_value("Accounts Settings", "submit_journal_entries")
)
submit_journal_entry = cint(frappe.db.get_singles_value("Accounts Settings", "submit_journal_entries"))
book_deferred_entries_based_on = frappe.db.get_singles_value(
"Accounts Settings", "book_deferred_entries_based_on"
)
@@ -462,9 +436,7 @@ def process_deferred_accounting(posting_date=None):
posting_date = today()
if not cint(
frappe.db.get_singles_value(
"Accounts Settings", "automatically_process_deferred_accounting_entry"
)
frappe.db.get_singles_value("Accounts Settings", "automatically_process_deferred_accounting_entry")
):
return
@@ -587,16 +559,13 @@ def book_revenue_via_journal_entry(
deferred_process=None,
submit="No",
):
if amount == 0:
return
journal_entry = frappe.new_doc("Journal Entry")
journal_entry.posting_date = posting_date
journal_entry.company = doc.company
journal_entry.voucher_type = (
"Deferred Revenue" if doc.doctype == "Sales Invoice" else "Deferred Expense"
)
journal_entry.voucher_type = "Deferred Revenue" if doc.doctype == "Sales Invoice" else "Deferred Expense"
journal_entry.process_deferred_accounting = deferred_process
debit_entry = {
@@ -645,7 +614,6 @@ def book_revenue_via_journal_entry(
def get_deferred_booking_accounts(doctype, voucher_detail_no, dr_or_cr):
if doctype == "Sales Invoice":
credit_account, debit_account = frappe.db.get_value(
"Sales Invoice Item",

View File

@@ -26,19 +26,14 @@ frappe.ui.form.on("Account", {
frm.toggle_enable(["is_group", "company"], false);
if (cint(frm.doc.is_group) == 0) {
frm.toggle_display(
"freeze_account",
frm.doc.__onload && frm.doc.__onload.can_freeze_account
);
frm.toggle_display("freeze_account", frm.doc.__onload && frm.doc.__onload.can_freeze_account);
}
// read-only for root accounts
if (!frm.is_new()) {
if (!frm.doc.parent_account) {
frm.set_read_only();
frm.set_intro(
__("This is a root account and cannot be edited.")
);
frm.set_intro(__("This is a root account and cannot be edited."));
} else {
// credit days and type if customer or supplier
frm.set_intro(null);
@@ -80,27 +75,33 @@ frappe.ui.form.on("Account", {
);
if (frm.doc.is_group == 1) {
frm.add_custom_button(__('Convert to Non-Group'), function () {
return frappe.call({
doc: frm.doc,
method: 'convert_group_to_ledger',
callback: function() {
frm.refresh();
}
});
}, __('Actions'));
} else if (cint(frm.doc.is_group) == 0
&& frappe.boot.user.can_read.indexOf("GL Entry") !== -1) {
frm.add_custom_button(__('General Ledger'), function () {
frappe.route_options = {
"account": frm.doc.name,
"from_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
"to_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
"company": frm.doc.company
};
frappe.set_route("query-report", "General Ledger");
}, __('View'));
frm.add_custom_button(
__("Convert to Non-Group"),
function () {
return frappe.call({
doc: frm.doc,
method: "convert_group_to_ledger",
callback: function () {
frm.refresh();
},
});
},
__("Actions")
);
} else if (cint(frm.doc.is_group) == 0 && frappe.boot.user.can_read.indexOf("GL Entry") !== -1) {
frm.add_custom_button(
__("General Ledger"),
function () {
frappe.route_options = {
account: frm.doc.name,
from_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
to_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
company: frm.doc.company,
};
frappe.set_route("query-report", "General Ledger");
},
__("View")
);
frm.add_custom_button(
__("Convert to Group"),
@@ -193,14 +194,8 @@ frappe.ui.form.on("Account", {
if (r.message) {
frappe.set_route("Form", "Account", r.message);
} else {
frm.set_value(
"account_number",
data.account_number
);
frm.set_value(
"account_name",
data.account_name
);
frm.set_value("account_number", data.account_number);
frm.set_value("account_name", data.account_name);
}
d.hide();
}

View File

@@ -88,7 +88,7 @@ class Account(NestedSet):
if frappe.local.flags.ignore_update_nsm:
return
else:
super(Account, self).on_update()
super().on_update()
def onload(self):
frozen_accounts_modifier = frappe.db.get_value(
@@ -118,6 +118,7 @@ class Account(NestedSet):
self.validate_balance_must_be_debit_or_credit()
self.validate_account_currency()
self.validate_root_company_and_sync_account_to_children()
self.validate_receivable_payable_account_type()
def validate_parent_child_account_type(self):
if self.parent_account:
@@ -188,6 +189,24 @@ class Account(NestedSet):
"Balance Sheet" if self.root_type in ("Asset", "Liability", "Equity") else "Profit and Loss"
)
def validate_receivable_payable_account_type(self):
doc_before_save = self.get_doc_before_save()
receivable_payable_types = ["Receivable", "Payable"]
if (
doc_before_save
and doc_before_save.account_type in receivable_payable_types
and doc_before_save.account_type != self.account_type
):
# check for ledger entries
if frappe.db.get_all("GL Entry", filters={"account": self.name, "is_cancelled": 0}, limit=1):
msg = _(
"There are ledger entries against this account. Changing {0} to non-{1} in live system will cause incorrect output in 'Accounts {2}' report"
).format(
frappe.bold("Account Type"), doc_before_save.account_type, doc_before_save.account_type
)
frappe.msgprint(msg)
self.add_comment("Comment", msg)
def validate_root_details(self):
doc_before_save = self.get_doc_before_save()
@@ -199,9 +218,7 @@ class Account(NestedSet):
def validate_root_company_and_sync_account_to_children(self):
# ignore validation while creating new compnay or while syncing to child companies
if (
frappe.local.flags.ignore_root_company_validation or self.flags.ignore_root_company_validation
):
if frappe.local.flags.ignore_root_company_validation or self.flags.ignore_root_company_validation:
return
ancestors = get_root_company(self.company)
if ancestors:
@@ -399,7 +416,7 @@ class Account(NestedSet):
if self.check_gle_exists():
throw(_("Account with existing transaction can not be deleted"))
super(Account, self).on_trash(True)
super().on_trash(True)
@frappe.whitelist()
@@ -407,9 +424,8 @@ class Account(NestedSet):
def get_parent_account(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql(
"""select name from tabAccount
where is_group = 1 and docstatus != 2 and company = %s
and %s like %s order by name limit %s offset %s"""
% ("%s", searchfield, "%s", "%s", "%s"),
where is_group = 1 and docstatus != 2 and company = {}
and {} like {} order by name limit {} offset {}""".format("%s", searchfield, "%s", "%s", "%s"),
(filters["company"], "%%%s%%" % txt, page_len, start),
as_list=1,
)
@@ -575,7 +591,5 @@ def sync_update_account_number_in_child(
if old_acc_number:
filters["account_number"] = old_acc_number
for d in frappe.db.get_values(
"Account", filters=filters, fieldname=["company", "name"], as_dict=True
):
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)

View File

@@ -1,4 +1,4 @@
frappe.provide("frappe.treeview_settings")
frappe.provide("frappe.treeview_settings");
frappe.treeview_settings["Account"] = {
breadcrumb: "Accounts",
@@ -7,12 +7,12 @@ frappe.treeview_settings["Account"] = {
filters: [
{
fieldname: "company",
fieldtype:"Select",
fieldtype: "Select",
options: erpnext.utils.get_tree_options("company"),
label: __("Company"),
default: erpnext.utils.get_tree_default("company"),
on_change: function() {
var me = frappe.treeview_settings['Account'].treeview;
on_change: function () {
var me = frappe.treeview_settings["Account"].treeview;
var company = me.page.fields_dict.company.get_value();
if (!company) {
frappe.throw(__("Please set a Company"));
@@ -22,30 +22,36 @@ frappe.treeview_settings["Account"] = {
args: {
company: company,
},
callback: function(r) {
if(r.message) {
callback: function (r) {
if (r.message) {
let root_company = r.message.length ? r.message[0] : "";
me.page.fields_dict.root_company.set_value(root_company);
frappe.db.get_value("Company", {"name": company}, "allow_account_creation_against_child_company", (r) => {
frappe.flags.ignore_root_company_validation = r.allow_account_creation_against_child_company;
});
frappe.db.get_value(
"Company",
{ name: company },
"allow_account_creation_against_child_company",
(r) => {
frappe.flags.ignore_root_company_validation =
r.allow_account_creation_against_child_company;
}
);
}
}
},
});
}
},
},
{
fieldname: "root_company",
fieldtype:"Data",
fieldtype: "Data",
label: __("Root Company"),
hidden: true,
disable_onchange: true
}
disable_onchange: true,
},
],
root_label: "Accounts",
get_tree_nodes: 'erpnext.accounts.utils.get_children',
on_get_node: function(nodes, deep=false) {
get_tree_nodes: "erpnext.accounts.utils.get_children",
on_get_node: function (nodes, deep = false) {
if (frappe.boot.user.can_read.indexOf("GL Entry") == -1) return;
let accounts = [];
@@ -57,151 +63,231 @@ frappe.treeview_settings["Account"] = {
}
frappe.db.get_single_value("Accounts Settings", "show_balance_in_coa").then((value) => {
if(value) {
if (value) {
const get_balances = frappe.call({
method: 'erpnext.accounts.utils.get_account_balances',
method: "erpnext.accounts.utils.get_account_balances",
args: {
accounts: accounts,
company: cur_tree.args.company
company: cur_tree.args.company,
},
});
get_balances.then(r => {
get_balances.then((r) => {
if (!r.message || r.message.length == 0) return;
for (let account of r.message) {
const node = cur_tree.nodes && cur_tree.nodes[account.value];
if (!node || node.is_root) continue;
// show Dr if positive since balance is calculated as debit - credit else show Cr
const balance = account.balance_in_account_currency || account.balance;
const dr_or_cr = balance > 0 ? "Dr": "Cr";
const dr_or_cr = balance > 0 ? "Dr" : "Cr";
const format = (value, currency) => format_currency(Math.abs(value), currency);
if (account.balance!==undefined) {
node.parent && node.parent.find('.balance-area').remove();
$('<span class="balance-area pull-right">'
+ (account.balance_in_account_currency ?
(format(account.balance_in_account_currency, account.account_currency) + " / ") : "")
+ format(account.balance, account.company_currency)
+ " " + dr_or_cr
+ '</span>').insertBefore(node.$ul);
if (account.balance !== undefined) {
node.parent && node.parent.find(".balance-area").remove();
$(
'<span class="balance-area pull-right">' +
(account.balance_in_account_currency
? format(
account.balance_in_account_currency,
account.account_currency
) + " / "
: "") +
format(account.balance, account.company_currency) +
" " +
dr_or_cr +
"</span>"
).insertBefore(node.$ul);
}
}
});
}
});
},
add_tree_node: 'erpnext.accounts.utils.add_ac',
menu_items:[
add_tree_node: "erpnext.accounts.utils.add_ac",
menu_items: [
{
label: __('New Company'),
action: function() { frappe.new_doc("Company", true) },
condition: 'frappe.boot.user.can_create.indexOf("Company") !== -1'
}
label: __("New Company"),
action: function () {
frappe.new_doc("Company", true);
},
condition: 'frappe.boot.user.can_create.indexOf("Company") !== -1',
},
],
fields: [
{fieldtype:'Data', fieldname:'account_name', label:__('New Account Name'), reqd:true,
description: __("Name of new Account. Note: Please don't create accounts for Customers and Suppliers")},
{fieldtype:'Data', fieldname:'account_number', label:__('Account Number'),
description: __("Number of new Account, it will be included in the account name as a prefix")},
{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
description: __('Further accounts can be made under Groups, but entries can be made against non-Groups')},
{fieldtype:'Select', fieldname:'root_type', label:__('Root Type'),
options: ['Asset', 'Liability', 'Equity', 'Income', 'Expense'].join('\n'),
depends_on: 'eval:doc.is_group && !doc.parent_account'},
{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
options: frappe.get_meta("Account").fields.filter(d => d.fieldname=='account_type')[0].options,
description: __("Optional. This setting will be used to filter in various transactions.")
{
fieldtype: "Data",
fieldname: "account_name",
label: __("New Account Name"),
reqd: true,
description: __(
"Name of new Account. Note: Please don't create accounts for Customers and Suppliers"
),
},
{
fieldtype: "Data",
fieldname: "account_number",
label: __("Account Number"),
description: __("Number of new Account, it will be included in the account name as a prefix"),
},
{
fieldtype: "Check",
fieldname: "is_group",
label: __("Is Group"),
description: __(
"Further accounts can be made under Groups, but entries can be made against non-Groups"
),
},
{
fieldtype: "Select",
fieldname: "root_type",
label: __("Root Type"),
options: ["Asset", "Liability", "Equity", "Income", "Expense"].join("\n"),
depends_on: "eval:doc.is_group && !doc.parent_account",
},
{
fieldtype: "Select",
fieldname: "account_type",
label: __("Account Type"),
options: frappe.get_meta("Account").fields.filter((d) => d.fieldname == "account_type")[0]
.options,
description: __("Optional. This setting will be used to filter in various transactions."),
},
{
fieldtype: "Float",
fieldname: "tax_rate",
label: __("Tax Rate"),
depends_on: 'eval:doc.is_group==0&&doc.account_type=="Tax"',
},
{
fieldtype: "Link",
fieldname: "account_currency",
label: __("Currency"),
options: "Currency",
description: __("Optional. Sets company's default currency, if not specified."),
},
{fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate'),
depends_on: 'eval:doc.is_group==0&&doc.account_type=="Tax"'},
{fieldtype:'Link', fieldname:'account_currency', label:__('Currency'), options:"Currency",
description: __("Optional. Sets company's default currency, if not specified.")}
],
ignore_fields:["parent_account"],
onload: function(treeview) {
frappe.treeview_settings['Account'].treeview = {};
$.extend(frappe.treeview_settings['Account'].treeview, treeview);
ignore_fields: ["parent_account"],
onload: function (treeview) {
frappe.treeview_settings["Account"].treeview = {};
$.extend(frappe.treeview_settings["Account"].treeview, treeview);
function get_company() {
return treeview.page.fields_dict.company.get_value();
}
// tools
treeview.page.add_inner_button(__("Chart of Cost Centers"), function() {
frappe.set_route('Tree', 'Cost Center', {company: get_company()});
}, __('View'));
treeview.page.add_inner_button(
__("Chart of Cost Centers"),
function () {
frappe.set_route("Tree", "Cost Center", { company: get_company() });
},
__("View")
);
treeview.page.add_inner_button(__("Opening Invoice Creation Tool"), function() {
frappe.set_route('Form', 'Opening Invoice Creation Tool', {company: get_company()});
}, __('View'));
treeview.page.add_inner_button(
__("Opening Invoice Creation Tool"),
function () {
frappe.set_route("Form", "Opening Invoice Creation Tool", { company: get_company() });
},
__("View")
);
treeview.page.add_inner_button(__("Period Closing Voucher"), function() {
frappe.set_route('List', 'Period Closing Voucher', {company: get_company()});
}, __('View'));
treeview.page.add_inner_button(
__("Period Closing Voucher"),
function () {
frappe.set_route("List", "Period Closing Voucher", { company: get_company() });
},
__("View")
);
treeview.page.add_inner_button(__("Journal Entry"), function() {
frappe.new_doc('Journal Entry', {company: get_company()});
}, __('Create'));
treeview.page.add_inner_button(__("Company"), function() {
frappe.new_doc('Company');
}, __('Create'));
treeview.page.add_inner_button(
__("Journal Entry"),
function () {
frappe.new_doc("Journal Entry", { company: get_company() });
},
__("Create")
);
treeview.page.add_inner_button(
__("Company"),
function () {
frappe.new_doc("Company");
},
__("Create")
);
// financial statements
for (let report of ['Trial Balance', 'General Ledger', 'Balance Sheet',
'Profit and Loss Statement', 'Cash Flow Statement', 'Accounts Payable', 'Accounts Receivable']) {
treeview.page.add_inner_button(__(report), function() {
frappe.set_route('query-report', report, {company: get_company()});
}, __('Financial Statements'));
for (let report of [
"Trial Balance",
"General Ledger",
"Balance Sheet",
"Profit and Loss Statement",
"Cash Flow Statement",
"Accounts Payable",
"Accounts Receivable",
]) {
treeview.page.add_inner_button(
__(report),
function () {
frappe.set_route("query-report", report, { company: get_company() });
},
__("Financial Statements")
);
}
},
post_render: function(treeview) {
frappe.treeview_settings['Account'].treeview["tree"] = treeview.tree;
treeview.page.set_primary_action(__("New"), function() {
let root_company = treeview.page.fields_dict.root_company.get_value();
post_render: function (treeview) {
frappe.treeview_settings["Account"].treeview["tree"] = treeview.tree;
treeview.page.set_primary_action(
__("New"),
function () {
let root_company = treeview.page.fields_dict.root_company.get_value();
if(root_company) {
frappe.throw(__("Please add the account to root level Company - {0}"), [root_company]);
} else {
treeview.new_node();
}
}, "add");
if (root_company) {
frappe.throw(__("Please add the account to root level Company - {0}"), [root_company]);
} else {
treeview.new_node();
}
},
"add"
);
},
toolbar: [
{
label:__("Add Child"),
condition: function(node) {
return frappe.boot.user.can_create.indexOf("Account") !== -1
&& (!frappe.treeview_settings['Account'].treeview.page.fields_dict.root_company.get_value()
|| frappe.flags.ignore_root_company_validation)
&& node.expandable && !node.hide_add;
label: __("Add Child"),
condition: function (node) {
return (
frappe.boot.user.can_create.indexOf("Account") !== -1 &&
(!frappe.treeview_settings[
"Account"
].treeview.page.fields_dict.root_company.get_value() ||
frappe.flags.ignore_root_company_validation) &&
node.expandable &&
!node.hide_add
);
},
click: function() {
var me = frappe.views.trees['Account'];
click: function () {
var me = frappe.views.trees["Account"];
me.new_node();
},
btnClass: "hidden-xs"
btnClass: "hidden-xs",
},
{
condition: function(node) {
return !node.root && frappe.boot.user.can_read.indexOf("GL Entry") !== -1
condition: function (node) {
return !node.root && frappe.boot.user.can_read.indexOf("GL Entry") !== -1;
},
label: __("View Ledger"),
click: function(node, btn) {
click: function (node, btn) {
frappe.route_options = {
"account": node.label,
"from_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
"to_date": erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
"company": frappe.treeview_settings['Account'].treeview.page.fields_dict.company.get_value()
account: node.label,
from_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
to_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
company:
frappe.treeview_settings["Account"].treeview.page.fields_dict.company.get_value(),
};
frappe.set_route("query-report", "General Ledger");
},
btnClass: "hidden-xs"
}
btnClass: "hidden-xs",
},
],
extend_toolbar: true
}
extend_toolbar: true,
};

View File

@@ -31,7 +31,6 @@ def create_charts(
"tax_rate",
"account_currency",
]:
account_number = cstr(child.get("account_number")).strip()
account_name, account_name_in_db = add_suffix_if_duplicate(
account_name, account_number, accounts
@@ -39,7 +38,9 @@ def create_charts(
is_group = identify_is_group(child)
report_type = (
"Balance Sheet" if root_type in ["Asset", "Liability", "Equity"] else "Profit and Loss"
"Balance Sheet"
if root_type in ["Asset", "Liability", "Equity"]
else "Profit and Loss"
)
account = frappe.get_doc(
@@ -141,7 +142,7 @@ def get_chart(chart_template, existing_company=None):
for fname in os.listdir(path):
fname = frappe.as_unicode(fname)
if fname.endswith(".json"):
with open(os.path.join(path, fname), "r") as f:
with open(os.path.join(path, fname)) as f:
chart = f.read()
if chart and json.loads(chart).get("name") == chart_template:
return json.loads(chart).get("tree")
@@ -173,7 +174,7 @@ def get_charts_for_country(country, with_standard=False):
for fname in os.listdir(path):
fname = frappe.as_unicode(fname)
if (fname.startswith(country_code) or fname.startswith(country)) and fname.endswith(".json"):
with open(os.path.join(path, fname), "r") as f:
with open(os.path.join(path, fname)) as f:
_get_chart_name(f.read())
# if more than one charts, returned then add the standard
@@ -247,7 +248,13 @@ def validate_bank_account(coa, bank_account):
def _get_account_names(account_master):
for account_name, child in account_master.items():
if account_name not in ["account_number", "account_type", "root_type", "is_group", "tax_rate"]:
if account_name not in [
"account_number",
"account_type",
"root_type",
"is_group",
"tax_rate",
]:
accounts.append(account_name)
_get_account_names(child)

View File

@@ -56,7 +56,9 @@
"Constru\u00e7\u00f5es em Andamento de Im\u00f3veis Destinados \u00e0 Venda": {},
"Estoques Destinados \u00e0 Doa\u00e7\u00e3o": {},
"Im\u00f3veis Destinados \u00e0 Venda": {},
"Insumos (materiais diretos)": {},
"Insumos (materiais diretos)": {
"account_type": "Stock"
},
"Insumos Agropecu\u00e1rios": {},
"Mercadorias para Revenda": {},
"Outras 11": {},
@@ -146,6 +148,65 @@
"root_type": "Asset"
},
"CUSTOS DE PRODU\u00c7\u00c3O": {
"CUSTO DOS PRODUTOS E SERVI\u00c7OS VENDIDOS": {
"CUSTO DOS PRODUTOS VENDIDOS": {
"CUSTO DOS PRODUTOS VENDIDOS PARA AS DEMAIS ATIVIDADES": {
"Custos dos Produtos Vendidos em Geral": {
"account_type": "Cost of Goods Sold"
},
"Outros Custos 4": {},
"account_type": "Cost of Goods Sold"
},
"CUSTO DOS PRODUTOS VENDIDOS PARA ASSIST\u00caNCIA SOCIAL": {
"Custos dos Produtos para Assist\u00eancia Social - Gratuidades": {},
"Custos dos Produtos para Assist\u00eancia Social - Vendidos": {},
"Outras": {}
},
"CUSTO DOS PRODUTOS VENDIDOS PARA EDUCA\u00c7\u00c3O": {
"Custos dos Produtos para Educa\u00e7\u00e3o - Gratuidades": {},
"Custos dos Produtos para Educa\u00e7\u00e3o - Vendidos": {},
"Outros Custos 6": {}
},
"CUSTO DOS PRODUTOS VENDIDOS PARA SA\u00daDE": {
"Custos dos Produtos para Sa\u00fade - Gratuidades": {},
"Custos dos Produtos para Sa\u00fade \u2013 Vendidos": {},
"Outros Custos 5": {}
},
"account_type": "Cost of Goods Sold"
},
"CUSTO DOS SERVI\u00c7OS PRESTADOS": {
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA AS DEMAIS ATIVIDADES": {
"Custo dos Servi\u00e7os Prestados em Geral": {},
"Outros Custos": {}
},
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA ASSIST\u00caNCIA SOCIAL": {
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios/Contratos/Parcerias": {},
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es 1": {},
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es/Subven\u00e7\u00f5es Vinculadas 1": {},
"Custo dos Servi\u00e7os Prestados a Gratuidade 1": {},
"Custo dos Servi\u00e7os Prestados a Pacientes Particulares": {},
"Outros Custos 2": {}
},
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA EDUCA\u00c7\u00c3O": {
"Custo dos Servi\u00e7os Prestados a Alunos N\u00e3o Bolsistas": {},
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios/Contratos/Parcerias (Exceto PROUNI)": {},
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es": {},
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es/Subven\u00e7\u00f5es Vinculadas": {},
"Custo dos Servi\u00e7os Prestados a Gratuidade": {},
"Custo dos Servi\u00e7os Prestados ao PROUNI": {},
"Outros Custos 1": {}
},
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA SA\u00daDE": {
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios SUS": {},
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios/Contratos/Parcerias 1": {},
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es 2": {},
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es/Subven\u00e7\u00f5es Vinculadas 2": {},
"Custo dos Servi\u00e7os Prestados a Gratuidade 2": {},
"Custo dos Servi\u00e7os Prestados a Pacientes Particulares 1": {},
"Outros Custos 3": {}
}
}
},
"CUSTO DOS BENS E SERVI\u00c7OS PRODUZIDOS": {
"CUSTO DOS PRODUTOS DE FABRICA\u00c7\u00c3O PR\u00d3PRIA PRODUZIDOS": {
"Alimenta\u00e7\u00e3o do Trabalhador": {},
@@ -621,7 +682,9 @@
"Receita das Unidades Imobili\u00e1rias Vendidas": {},
"Receita de Exporta\u00e7\u00e3o Direta de Mercadorias e Produtos": {},
"Receita de Exporta\u00e7\u00e3o de Servi\u00e7os": {},
"Receita de Loca\u00e7\u00e3o de Bens M\u00f3veis e Im\u00f3veis": {},
"Receita de Loca\u00e7\u00e3o de Bens M\u00f3veis e Im\u00f3veis": {
"account_type": "Income Account"
},
"Receita de Vendas de Mercadorias e Produtos a Comercial Exportadora com Fim Espec\u00edfico de Exporta\u00e7\u00e3o": {}
}
}
@@ -645,65 +708,6 @@
}
},
"RESULTADO OPERACIONAL": {
"CUSTO DOS PRODUTOS E SERVI\u00c7OS VENDIDOS": {
"CUSTO DOS PRODUTOS VENDIDOS": {
"CUSTO DOS PRODUTOS VENDIDOS PARA AS DEMAIS ATIVIDADES": {
"Custos dos Produtos Vendidos em Geral": {
"account_type": "Cost of Goods Sold"
},
"Outros Custos 4": {},
"account_type": "Cost of Goods Sold"
},
"CUSTO DOS PRODUTOS VENDIDOS PARA ASSIST\u00caNCIA SOCIAL": {
"Custos dos Produtos para Assist\u00eancia Social - Gratuidades": {},
"Custos dos Produtos para Assist\u00eancia Social - Vendidos": {},
"Outras": {}
},
"CUSTO DOS PRODUTOS VENDIDOS PARA EDUCA\u00c7\u00c3O": {
"Custos dos Produtos para Educa\u00e7\u00e3o - Gratuidades": {},
"Custos dos Produtos para Educa\u00e7\u00e3o - Vendidos": {},
"Outros Custos 6": {}
},
"CUSTO DOS PRODUTOS VENDIDOS PARA SA\u00daDE": {
"Custos dos Produtos para Sa\u00fade - Gratuidades": {},
"Custos dos Produtos para Sa\u00fade \u2013 Vendidos": {},
"Outros Custos 5": {}
},
"account_type": "Cost of Goods Sold"
},
"CUSTO DOS SERVI\u00c7OS PRESTADOS": {
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA AS DEMAIS ATIVIDADES": {
"Custo dos Servi\u00e7os Prestados em Geral": {},
"Outros Custos": {}
},
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA ASSIST\u00caNCIA SOCIAL": {
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios/Contratos/Parcerias": {},
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es 1": {},
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es/Subven\u00e7\u00f5es Vinculadas 1": {},
"Custo dos Servi\u00e7os Prestados a Gratuidade 1": {},
"Custo dos Servi\u00e7os Prestados a Pacientes Particulares": {},
"Outros Custos 2": {}
},
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA EDUCA\u00c7\u00c3O": {
"Custo dos Servi\u00e7os Prestados a Alunos N\u00e3o Bolsistas": {},
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios/Contratos/Parcerias (Exceto PROUNI)": {},
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es": {},
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es/Subven\u00e7\u00f5es Vinculadas": {},
"Custo dos Servi\u00e7os Prestados a Gratuidade": {},
"Custo dos Servi\u00e7os Prestados ao PROUNI": {},
"Outros Custos 1": {}
},
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA SA\u00daDE": {
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios SUS": {},
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios/Contratos/Parcerias 1": {},
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es 2": {},
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es/Subven\u00e7\u00f5es Vinculadas 2": {},
"Custo dos Servi\u00e7os Prestados a Gratuidade 2": {},
"Custo dos Servi\u00e7os Prestados a Pacientes Particulares 1": {},
"Outros Custos 3": {}
}
}
},
"DESPESAS OPERACIONAIS": {
"DESPESAS OPERACIONAIS 1": {
"DESPESAS OPERACIONAIS 2": {

View File

@@ -6,6 +6,7 @@ import unittest
import frappe
from frappe.test_runner import make_test_records
from frappe.utils import nowdate
from erpnext.accounts.doctype.account.account import (
InvalidAccountMergeError,
@@ -260,28 +261,20 @@ class TestAccount(unittest.TestCase):
acc.insert()
self.assertTrue(
frappe.db.exists(
"Account", {"account_name": "Test Group Account", "company": "_Test Company 4"}
)
frappe.db.exists("Account", {"account_name": "Test Group Account", "company": "_Test Company 4"})
)
self.assertTrue(
frappe.db.exists(
"Account", {"account_name": "Test Group Account", "company": "_Test Company 5"}
)
frappe.db.exists("Account", {"account_name": "Test Group Account", "company": "_Test Company 5"})
)
# Try renaming child company account
acc_tc_5 = frappe.db.get_value(
"Account", {"account_name": "Test Group Account", "company": "_Test Company 5"}
)
self.assertRaises(
frappe.ValidationError, update_account_number, acc_tc_5, "Test Modified Account"
)
self.assertRaises(frappe.ValidationError, update_account_number, acc_tc_5, "Test Modified Account")
# Rename child company account with allow_account_creation_against_child_company enabled
frappe.db.set_value(
"Company", "_Test Company 5", "allow_account_creation_against_child_company", 1
)
frappe.db.set_value("Company", "_Test Company 5", "allow_account_creation_against_child_company", 1)
update_account_number(acc_tc_5, "Test Modified Account")
self.assertTrue(
@@ -290,9 +283,7 @@ class TestAccount(unittest.TestCase):
)
)
frappe.db.set_value(
"Company", "_Test Company 5", "allow_account_creation_against_child_company", 0
)
frappe.db.set_value("Company", "_Test Company 5", "allow_account_creation_against_child_company", 0)
to_delete = [
"Test Group Account - _TC3",
@@ -317,13 +308,24 @@ class TestAccount(unittest.TestCase):
self.assertEqual(acc.account_currency, "INR")
# Make a JV against this account
make_journal_entry(
"Test Currency Account - _TC", "Miscellaneous Expenses - _TC", 100, submit=True
)
make_journal_entry("Test Currency Account - _TC", "Miscellaneous Expenses - _TC", 100, submit=True)
acc.account_currency = "USD"
self.assertRaises(frappe.ValidationError, acc.save)
def test_account_balance(self):
from erpnext.accounts.utils import get_balance_on
if not frappe.db.exists("Account", "Test Percent Account %5 - _TC"):
acc = frappe.new_doc("Account")
acc.account_name = "Test Percent Account %5"
acc.parent_account = "Tax Assets - _TC"
acc.company = "_Test Company"
acc.insert()
balance = get_balance_on(account="Test Percent Account %5 - _TC", date=nowdate())
self.assertEqual(balance, 0)
def _make_test_records(verbose=None):
from frappe.test_runner import make_test_objects

View File

@@ -40,16 +40,12 @@ class AccountClosingBalance(Document):
def make_closing_entries(closing_entries, voucher_name, company, closing_date):
accounting_dimensions = get_accounting_dimensions()
previous_closing_entries = get_previous_closing_entries(
company, closing_date, accounting_dimensions
)
previous_closing_entries = get_previous_closing_entries(company, closing_date, accounting_dimensions)
combined_entries = closing_entries + previous_closing_entries
merged_entries = aggregate_with_last_account_closing_balance(
combined_entries, accounting_dimensions
)
merged_entries = aggregate_with_last_account_closing_balance(combined_entries, accounting_dimensions)
for key, value in merged_entries.items():
for _key, value in merged_entries.items():
cle = frappe.new_doc("Account Closing Balance")
cle.update(value)
cle.update(value["dimensions"])

View File

@@ -1,74 +1,89 @@
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Accounting Dimension', {
refresh: function(frm) {
frm.set_query('document_type', () => {
frappe.ui.form.on("Accounting Dimension", {
refresh: function (frm) {
frm.set_query("document_type", () => {
let invalid_doctypes = frappe.model.core_doctypes_list;
invalid_doctypes.push('Accounting Dimension', 'Project',
'Cost Center', 'Accounting Dimension Detail', 'Company');
invalid_doctypes.push(
"Accounting Dimension",
"Project",
"Cost Center",
"Accounting Dimension Detail",
"Company"
);
return {
filters: {
name: ['not in', invalid_doctypes]
}
name: ["not in", invalid_doctypes],
},
};
});
frm.set_query("offsetting_account", "dimension_defaults", function(doc, cdt, cdn) {
frm.set_query("offsetting_account", "dimension_defaults", function (doc, cdt, cdn) {
let d = locals[cdt][cdn];
return {
filters: {
company: d.company,
root_type: ["in", ["Asset", "Liability"]],
is_group: 0
}
}
is_group: 0,
},
};
});
if (!frm.is_new()) {
frm.add_custom_button(__('Show {0}', [frm.doc.document_type]), function () {
frm.add_custom_button(__("Show {0}", [frm.doc.document_type]), function () {
frappe.set_route("List", frm.doc.document_type);
});
let button = frm.doc.disabled ? "Enable" : "Disable";
frm.add_custom_button(__(button), function() {
frm.set_value('disabled', 1 - frm.doc.disabled);
frm.add_custom_button(__(button), function () {
frm.set_value("disabled", 1 - frm.doc.disabled);
frappe.call({
method: "erpnext.accounts.doctype.accounting_dimension.accounting_dimension.disable_dimension",
args: {
doc: frm.doc
doc: frm.doc,
},
freeze: true,
callback: function(r) {
callback: function (r) {
let message = frm.doc.disabled ? "Dimension Disabled" : "Dimension Enabled";
frm.save();
frappe.show_alert({message:__(message), indicator:'green'});
}
frappe.show_alert({ message: __(message), indicator: "green" });
},
});
});
}
},
document_type: function(frm) {
label: function (frm) {
frm.set_value("fieldname", frappe.model.scrub(frm.doc.label));
},
frm.set_value('label', frm.doc.document_type);
frm.set_value('fieldname', frappe.model.scrub(frm.doc.document_type));
document_type: function (frm) {
frm.set_value("label", frm.doc.document_type);
frappe.db.get_value('Accounting Dimension', {'document_type': frm.doc.document_type}, 'document_type', (r) => {
if (r && r.document_type) {
frm.set_df_property('document_type', 'description', "Document type is already set as dimension");
frappe.db.get_value(
"Accounting Dimension",
{ document_type: frm.doc.document_type },
"document_type",
(r) => {
if (r && r.document_type) {
frm.set_df_property(
"document_type",
"description",
"Document type is already set as dimension"
);
}
}
});
);
},
});
frappe.ui.form.on('Accounting Dimension Detail', {
dimension_defaults_add: function(frm, cdt, cdn) {
frappe.ui.form.on("Accounting Dimension Detail", {
dimension_defaults_add: function (frm, cdt, cdn) {
let row = locals[cdt][cdn];
row.reference_document = frm.doc.document_type;
}
},
});

View File

@@ -11,6 +11,10 @@ from frappe.model import core_doctypes_list
from frappe.model.document import Document
from frappe.utils import cstr
from erpnext.accounts.doctype.repost_accounting_ledger.repost_accounting_ledger import (
get_allowed_types_from_settings,
)
class AccountingDimension(Document):
# begin: auto-generated types
@@ -36,7 +40,8 @@ class AccountingDimension(Document):
self.set_fieldname_and_label()
def validate(self):
if self.document_type in core_doctypes_list + (
if self.document_type in (
*core_doctypes_list,
"Accounting Dimension",
"Project",
"Cost Center",
@@ -44,13 +49,10 @@ class AccountingDimension(Document):
"Company",
"Account",
):
msg = _("Not allowed to create accounting dimension for {0}").format(self.document_type)
frappe.throw(msg)
exists = frappe.db.get_value(
"Accounting Dimension", {"document_type": self.document_type}, ["name"]
)
exists = frappe.db.get_value("Accounting Dimension", {"document_type": self.document_type}, ["name"])
if exists and self.is_new():
frappe.throw(_("Document Type already used as a dimension"))
@@ -106,9 +108,9 @@ def make_dimension_in_accounting_doctypes(doc, doclist=None):
doc_count = len(get_accounting_dimensions())
count = 0
repostable_doctypes = get_allowed_types_from_settings()
for doctype in doclist:
if (doc_count + 1) % 2 == 0:
insert_after_field = "dimension_col_break"
else:
@@ -121,6 +123,7 @@ def make_dimension_in_accounting_doctypes(doc, doclist=None):
"options": doc.document_type,
"insert_after": insert_after_field,
"owner": "Administrator",
"allow_on_submit": 1 if doctype in repostable_doctypes else 0,
}
meta = frappe.get_meta(doctype, cached=False)
@@ -142,7 +145,7 @@ def add_dimension_to_budget_doctype(df, doc):
df.update(
{
"insert_after": "cost_center",
"depends_on": "eval:doc.budget_against == '{0}'".format(doc.document_type),
"depends_on": f"eval:doc.budget_against == '{doc.document_type}'",
}
)
@@ -176,19 +179,17 @@ def delete_accounting_dimension(doc):
frappe.db.sql(
"""
DELETE FROM `tabCustom Field`
WHERE fieldname = %s
AND dt IN (%s)"""
% ("%s", ", ".join(["%s"] * len(doclist))), # nosec
tuple([doc.fieldname] + doclist),
WHERE fieldname = {}
AND dt IN ({})""".format("%s", ", ".join(["%s"] * len(doclist))), # nosec
tuple([doc.fieldname, *doclist]),
)
frappe.db.sql(
"""
DELETE FROM `tabProperty Setter`
WHERE field_name = %s
AND doc_type IN (%s)"""
% ("%s", ", ".join(["%s"] * len(doclist))), # nosec
tuple([doc.fieldname] + doclist),
WHERE field_name = {}
AND doc_type IN ({})""".format("%s", ", ".join(["%s"] * len(doclist))), # nosec
tuple([doc.fieldname, *doclist]),
)
budget_against_property = frappe.get_doc("Property Setter", "Budget-budget_against-options")
@@ -237,7 +238,6 @@ def get_doctypes_with_dimensions():
def get_accounting_dimensions(as_list=True, filters=None):
if not filters:
filters = {"disabled": 0}
@@ -266,7 +266,6 @@ def get_checks_for_pl_and_bs_accounts():
def get_dimension_with_children(doctype, dimensions):
if isinstance(dimensions, str):
dimensions = [dimensions]
@@ -274,9 +273,7 @@ def get_dimension_with_children(doctype, dimensions):
for dimension in dimensions:
lft, rgt = frappe.db.get_value(doctype, dimension, ["lft", "rgt"])
children = frappe.get_all(
doctype, filters={"lft": [">=", lft], "rgt": ["<=", rgt]}, order_by="lft"
)
children = frappe.get_all(doctype, filters={"lft": [">=", lft], "rgt": ["<=", rgt]}, order_by="lft")
all_dimensions += [c.name for c in children]
return all_dimensions
@@ -284,14 +281,10 @@ def get_dimension_with_children(doctype, dimensions):
@frappe.whitelist()
def get_dimensions(with_cost_center_and_project=False):
c = frappe.qb.DocType("Accounting Dimension Detail")
p = frappe.qb.DocType("Accounting Dimension")
dimension_filters = (
frappe.qb.from_(p)
.select(p.label, p.fieldname, p.document_type)
.where(p.disabled == 0)
.run(as_dict=1)
frappe.qb.from_(p).select(p.label, p.fieldname, p.document_type).where(p.disabled == 0).run(as_dict=1)
)
default_dimensions = (
frappe.qb.from_(c)

View File

@@ -1,10 +1,9 @@
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Accounting Dimension Filter', {
refresh: function(frm, cdt, cdn) {
let help_content =
`<table class="table table-bordered" style="background-color: var(--scrollbar-track-color);">
frappe.ui.form.on("Accounting Dimension Filter", {
refresh: function (frm, cdt, cdn) {
let help_content = `<table class="table table-bordered" style="background-color: var(--scrollbar-track-color);">
<tr><td>
<p>
<i class="fa fa-hand-right"></i>
@@ -13,77 +12,80 @@ frappe.ui.form.on('Accounting Dimension Filter', {
</td></tr>
</table>`;
frm.set_df_property('dimension_filter_help', 'options', help_content);
frm.set_df_property("dimension_filter_help", "options", help_content);
},
onload: function(frm) {
frm.set_query('applicable_on_account', 'accounts', function() {
onload: function (frm) {
frm.set_query("applicable_on_account", "accounts", function () {
return {
filters: {
'company': frm.doc.company
}
company: frm.doc.company,
},
};
});
frappe.db.get_list('Accounting Dimension',
{fields: ['document_type']}).then((res) => {
let options = ['Cost Center', 'Project'];
frappe.db.get_list("Accounting Dimension", { fields: ["document_type"] }).then((res) => {
let options = ["Cost Center", "Project"];
res.forEach((dimension) => {
options.push(dimension.document_type);
});
frm.set_df_property('accounting_dimension', 'options', options);
frm.set_df_property("accounting_dimension", "options", options);
});
frm.trigger('setup_filters');
frm.trigger("setup_filters");
},
setup_filters: function(frm) {
setup_filters: function (frm) {
let filters = {};
if (frm.doc.accounting_dimension) {
frappe.model.with_doctype(frm.doc.accounting_dimension, function() {
frappe.model.with_doctype(frm.doc.accounting_dimension, function () {
if (frappe.model.is_tree(frm.doc.accounting_dimension)) {
filters['is_group'] = 0;
filters["is_group"] = 0;
}
if (frappe.meta.has_field(frm.doc.accounting_dimension, 'company')) {
filters['company'] = frm.doc.company;
if (frappe.meta.has_field(frm.doc.accounting_dimension, "company")) {
filters["company"] = frm.doc.company;
}
frm.set_query('dimension_value', 'dimensions', function() {
frm.set_query("dimension_value", "dimensions", function () {
return {
filters: filters
filters: filters,
};
});
});
}
},
accounting_dimension: function(frm) {
accounting_dimension: function (frm) {
frm.clear_table("dimensions");
let row = frm.add_child("dimensions");
row.accounting_dimension = frm.doc.accounting_dimension;
frm.fields_dict["dimensions"].grid.update_docfield_property("dimension_value", "label", frm.doc.accounting_dimension);
frm.fields_dict["dimensions"].grid.update_docfield_property(
"dimension_value",
"label",
frm.doc.accounting_dimension
);
frm.refresh_field("dimensions");
frm.trigger('setup_filters');
frm.trigger("setup_filters");
},
apply_restriction_on_values: function(frm) {
apply_restriction_on_values: function (frm) {
/** If restriction on values is not applied, we should set "allow_or_restrict" to "Restrict" with an empty allowed dimension table.
* Hence it's not "restricted" on any value.
*/
*/
if (!frm.doc.apply_restriction_on_values) {
frm.set_value("allow_or_restrict", "Restrict");
frm.clear_table("dimensions");
frm.refresh_field("dimensions");
}
}
},
});
frappe.ui.form.on('Allowed Dimension', {
dimensions_add: function(frm, cdt, cdn) {
frappe.ui.form.on("Allowed Dimension", {
dimensions_add: function (frm, cdt, cdn) {
let row = locals[cdt][cdn];
row.accounting_dimension = frm.doc.accounting_dimension;
frm.refresh_field("dimensions");
}
},
});

View File

@@ -55,9 +55,7 @@ class TestAccountingDimensionFilter(unittest.TestCase):
def create_accounting_dimension_filter():
if not frappe.db.get_value(
"Accounting Dimension Filter", {"accounting_dimension": "Cost Center"}
):
if not frappe.db.get_value("Accounting Dimension Filter", {"accounting_dimension": "Cost Center"}):
frappe.get_doc(
{
"doctype": "Accounting Dimension Filter",

View File

@@ -1,30 +1,33 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Accounting Period', {
onload: function(frm) {
if(frm.doc.closed_documents.length === 0 || (frm.doc.closed_documents.length === 1 && frm.doc.closed_documents[0].document_type == undefined)) {
frappe.ui.form.on("Accounting Period", {
onload: function (frm) {
if (
frm.doc.closed_documents.length === 0 ||
(frm.doc.closed_documents.length === 1 && frm.doc.closed_documents[0].document_type == undefined)
) {
frappe.call({
method: "get_doctypes_for_closing",
doc:frm.doc,
callback: function(r) {
if(r.message) {
doc: frm.doc,
callback: function (r) {
if (r.message) {
cur_frm.clear_table("closed_documents");
r.message.forEach(function(element) {
r.message.forEach(function (element) {
var c = frm.add_child("closed_documents");
c.document_type = element.document_type;
c.closed = element.closed;
});
refresh_field("closed_documents");
}
}
},
});
}
frm.set_query("document_type", "closed_documents", () => {
return {
query: "erpnext.controllers.queries.get_doctypes_for_closing",
}
};
});
}
},
});

View File

@@ -84,7 +84,10 @@ class AccountingPeriod(Document):
for doctype_for_closing in self.get_doctypes_for_closing():
self.append(
"closed_documents",
{"document_type": doctype_for_closing.document_type, "closed": doctype_for_closing.closed},
{
"document_type": doctype_for_closing.document_type,
"closed": doctype_for_closing.closed,
},
)

View File

@@ -34,9 +34,7 @@ class TestAccountingPeriod(unittest.TestCase):
ap1 = create_accounting_period(period_name="Test Accounting Period 2")
ap1.save()
doc = create_sales_invoice(
do_not_save=1, cost_center="_Test Company - _TC", warehouse="Stores - _TC"
)
doc = create_sales_invoice(do_not_save=1, cost_center="_Test Company - _TC", warehouse="Stores - _TC")
self.assertRaises(ClosedAccountingPeriod, doc.save)
def tearDown(self):

View File

@@ -1,8 +1,6 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Accounts Settings', {
refresh: function(frm) {
}
frappe.ui.form.on("Accounts Settings", {
refresh: function (frm) {},
});

View File

@@ -1,7 +1,6 @@
{
"actions": [],
"creation": "2013-06-24 15:49:57",
"description": "Settings for Accounts",
"doctype": "DocType",
"document_type": "Other",
"editable_grid": 1,
@@ -106,7 +105,7 @@
},
{
"default": "0",
"description": "Enabling ensure each Purchase Invoice has a unique value in Supplier Invoice No. field",
"description": "Enabling this ensures each Purchase Invoice has a unique value in Supplier Invoice No. field within a particular fiscal year",
"fieldname": "check_supplier_invoice_uniqueness",
"fieldtype": "Check",
"label": "Check Supplier Invoice Number Uniqueness"
@@ -462,7 +461,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2023-11-20 09:37:47.650347",
"modified": "2024-03-15 12:11:36.085158",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",
@@ -491,4 +490,4 @@
"sort_order": "ASC",
"states": [],
"track_changes": 1
}
}

View File

@@ -1,8 +1,11 @@
frappe.ui.form.on('Accounts Settings', {
refresh: function(frm) {
frappe.ui.form.on("Accounts Settings", {
refresh: function (frm) {
frm.set_df_property("acc_frozen_upto", "label", "Books Closed Through");
frm.set_df_property("frozen_accounts_modifier", "label", "Role Allowed to Close Books & Make Changes to Closed Periods");
frm.set_df_property(
"frozen_accounts_modifier",
"label",
"Role Allowed to Close Books & Make Changes to Closed Periods"
);
frm.set_df_property("credit_controller", "label", "Credit Manager");
}
},
});

View File

@@ -1,38 +1,36 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.provide('erpnext.integrations');
frappe.provide("erpnext.integrations");
frappe.ui.form.on('Bank', {
onload: function(frm) {
frappe.ui.form.on("Bank", {
onload: function (frm) {
add_fields_to_mapping_table(frm);
},
refresh: function(frm) {
refresh: function (frm) {
add_fields_to_mapping_table(frm);
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
frm.toggle_display(["address_html", "contact_html"], !frm.doc.__islocal);
if (frm.doc.__islocal) {
frm.set_df_property('address_and_contact', 'hidden', 1);
frm.set_df_property("address_and_contact", "hidden", 1);
frappe.contacts.clear_address_and_contact(frm);
}
else {
frm.set_df_property('address_and_contact', 'hidden', 0);
} else {
frm.set_df_property("address_and_contact", "hidden", 0);
frappe.contacts.render_address_and_contact(frm);
}
if (frm.doc.plaid_access_token) {
frm.add_custom_button(__('Refresh Plaid Link'), () => {
frm.add_custom_button(__("Refresh Plaid Link"), () => {
new erpnext.integrations.refreshPlaidLink(frm.doc.plaid_access_token);
});
}
}
},
});
let add_fields_to_mapping_table = function (frm) {
let options = [];
frappe.model.with_doctype("Bank Transaction", function() {
frappe.model.with_doctype("Bank Transaction", function () {
let meta = frappe.get_meta("Bank Transaction");
meta.fields.forEach(value => {
meta.fields.forEach((value) => {
if (!["Section Break", "Column Break"].includes(value.fieldtype)) {
options.push(value.fieldname);
}
@@ -40,30 +38,32 @@ let add_fields_to_mapping_table = function (frm) {
});
frm.fields_dict.bank_transaction_mapping.grid.update_docfield_property(
'bank_transaction_field', 'options', options
"bank_transaction_field",
"options",
options
);
};
erpnext.integrations.refreshPlaidLink = class refreshPlaidLink {
constructor(access_token) {
this.access_token = access_token;
this.plaidUrl = 'https://cdn.plaid.com/link/v2/stable/link-initialize.js';
this.plaidUrl = "https://cdn.plaid.com/link/v2/stable/link-initialize.js";
this.init_config();
}
async init_config() {
this.plaid_env = await frappe.db.get_single_value('Plaid Settings', 'plaid_env');
this.plaid_env = await frappe.db.get_single_value("Plaid Settings", "plaid_env");
this.token = await this.get_link_token_for_update();
this.init_plaid();
}
async get_link_token_for_update() {
const token = frappe.xcall(
'erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.get_link_token_for_update',
"erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.get_link_token_for_update",
{ access_token: this.access_token }
)
);
if (!token) {
frappe.throw(__('Cannot retrieve link token for update. Check Error Log for more information'));
frappe.throw(__("Cannot retrieve link token for update. Check Error Log for more information"));
}
return token;
}
@@ -90,35 +90,45 @@ erpnext.integrations.refreshPlaidLink = class refreshPlaidLink {
resolve();
return;
}
const el = document.createElement('script');
el.type = 'text/javascript';
const el = document.createElement("script");
el.type = "text/javascript";
el.async = true;
el.src = src;
el.addEventListener('load', resolve);
el.addEventListener('error', reject);
el.addEventListener('abort', reject);
el.addEventListener("load", resolve);
el.addEventListener("error", reject);
el.addEventListener("abort", reject);
document.head.appendChild(el);
});
}
onScriptLoaded(me) {
me.linkHandler = Plaid.create({ // eslint-disable-line no-undef
me.linkHandler = Plaid.create({
// eslint-disable-line no-undef
env: me.plaid_env,
token: me.token,
onSuccess: me.plaid_success
onSuccess: me.plaid_success,
});
}
onScriptError(error) {
frappe.msgprint(__("There was an issue connecting to Plaid's authentication server. Check browser console for more information"));
frappe.msgprint(
__(
"There was an issue connecting to Plaid's authentication server. Check browser console for more information"
)
);
console.log(error);
}
plaid_success(token, response) {
frappe.xcall('erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.update_bank_account_ids', {
response: response,
}).then(() => {
frappe.show_alert({ message: __('Plaid Link Updated'), indicator: 'green' });
});
frappe
.xcall(
"erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.update_bank_account_ids",
{
response: response,
}
)
.then(() => {
frappe.show_alert({ message: __("Plaid Link Updated"), indicator: "green" });
});
}
};

View File

@@ -1,45 +1,49 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Account', {
setup: function(frm) {
frm.set_query("account", function() {
frappe.ui.form.on("Bank Account", {
setup: function (frm) {
frm.set_query("account", function () {
return {
filters: {
'account_type': 'Bank',
'company': frm.doc.company,
'is_group': 0
}
account_type: "Bank",
company: frm.doc.company,
is_group: 0,
},
};
});
frm.set_query("party_type", function() {
frm.set_query("party_type", function () {
return {
query: "erpnext.setup.doctype.party_type.party_type.get_party_type",
};
});
},
refresh: function(frm) {
frappe.dynamic_link = { doc: frm.doc, fieldname: 'name', doctype: 'Bank Account' }
refresh: function (frm) {
frappe.dynamic_link = { doc: frm.doc, fieldname: "name", doctype: "Bank Account" };
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
frm.toggle_display(["address_html", "contact_html"], !frm.doc.__islocal);
if (frm.doc.__islocal) {
frappe.contacts.clear_address_and_contact(frm);
}
else {
} else {
frappe.contacts.render_address_and_contact(frm);
}
if (frm.doc.integration_id) {
frm.add_custom_button(__("Unlink external integrations"), function() {
frappe.confirm(__("This action will unlink this account from any external service integrating ERPNext with your bank accounts. It cannot be undone. Are you certain ?"), function() {
frm.set_value("integration_id", "");
});
frm.add_custom_button(__("Unlink external integrations"), function () {
frappe.confirm(
__(
"This action will unlink this account from any external service integrating ERPNext with your bank accounts. It cannot be undone. Are you certain ?"
),
function () {
frm.set_value("integration_id", "");
}
);
});
}
},
is_company_account: function(frm) {
frm.set_df_property('account', 'reqd', frm.doc.is_company_account);
}
is_company_account: function (frm) {
frm.set_df_property("account", "reqd", frm.doc.is_company_account);
},
});

View File

@@ -9,6 +9,7 @@ from frappe.contacts.address_and_contact import (
load_address_and_contact,
)
from frappe.model.document import Document
from frappe.utils import comma_and, get_link_to_form
class BankAccount(Document):
@@ -52,6 +53,20 @@ class BankAccount(Document):
def validate(self):
self.validate_company()
self.validate_iban()
self.validate_account()
self.update_default_bank_account()
def validate_account(self):
if self.account:
if accounts := frappe.db.get_all(
"Bank Account", filters={"account": self.account, "name": ["!=", self.name]}, as_list=1
):
frappe.throw(
_("'{0}' account is already used by {1}. Use another account.").format(
frappe.bold(self.account),
frappe.bold(comma_and([get_link_to_form(self.doctype, x[0]) for x in accounts])),
)
)
def validate_company(self):
if self.is_company_account and not self.company:
@@ -86,19 +101,51 @@ class BankAccount(Document):
if to_check % 97 != 1:
frappe.throw(_("IBAN is not valid"))
def update_default_bank_account(self):
if self.is_default and not self.disabled:
frappe.db.set_value(
"Bank Account",
{
"party_type": self.party_type,
"party": self.party,
"is_company_account": self.is_company_account,
"is_default": 1,
"disabled": 0,
},
"is_default",
0,
)
@frappe.whitelist()
def make_bank_account(doctype, docname):
doc = frappe.new_doc("Bank Account")
doc.party_type = doctype
doc.party = docname
doc.is_default = 1
return doc
def get_party_bank_account(party_type, party):
return frappe.db.get_value(party_type, party, "default_bank_account")
return frappe.db.get_value(
"Bank Account",
{"party_type": party_type, "party": party, "is_default": 1, "disabled": 0},
"name",
)
def get_default_company_bank_account(company, party_type, party):
default_company_bank_account = frappe.db.get_value(party_type, party, "default_bank_account")
if default_company_bank_account:
if company != frappe.get_cached_value("Bank Account", default_company_bank_account, "company"):
default_company_bank_account = None
if not default_company_bank_account:
default_company_bank_account = frappe.db.get_value(
"Bank Account", {"company": company, "is_company_account": 1, "is_default": 1}
)
return default_company_bank_account
@frappe.whitelist()

View File

@@ -37,11 +37,11 @@ class TestBankAccount(unittest.TestCase):
try:
bank_account.validate_iban()
except ValidationError:
msg = "BankAccount.validate_iban() failed for valid IBAN {}".format(iban)
msg = f"BankAccount.validate_iban() failed for valid IBAN {iban}"
self.fail(msg=msg)
for not_iban in invalid_ibans:
bank_account.iban = not_iban
msg = "BankAccount.validate_iban() accepted invalid IBAN {}".format(not_iban)
msg = f"BankAccount.validate_iban() accepted invalid IBAN {not_iban}"
with self.assertRaises(ValidationError, msg=msg):
bank_account.validate_iban()

View File

@@ -1,8 +1,6 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Account Subtype', {
refresh: function() {
}
frappe.ui.form.on("Bank Account Subtype", {
refresh: function () {},
});

View File

@@ -1,8 +1,7 @@
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Account Type', {
frappe.ui.form.on("Bank Account Type", {
// refresh: function(frm) {
// }
});

View File

@@ -2,80 +2,76 @@
// License: GNU General Public License v3. See license.txt
frappe.ui.form.on("Bank Clearance", {
setup: function(frm) {
setup: function (frm) {
frm.add_fetch("account", "account_currency", "account_currency");
frm.set_query("account", function() {
frm.set_query("account", function () {
return {
"filters": {
"account_type": ["in",["Bank","Cash"]],
"is_group": 0,
}
filters: {
account_type: ["in", ["Bank", "Cash"]],
is_group: 0,
},
};
});
frm.set_query("bank_account", function () {
return {
filters: {
'is_company_account': 1
is_company_account: 1,
},
};
});
},
onload: function(frm) {
let default_bank_account = frappe.defaults.get_user_default("Company")?
locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"]: "";
onload: function (frm) {
let default_bank_account = frappe.defaults.get_user_default("Company")
? locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"]
: "";
frm.set_value("account", default_bank_account);
frm.set_value("from_date", frappe.datetime.month_start());
frm.set_value("to_date", frappe.datetime.month_end());
},
refresh: function(frm) {
refresh: function (frm) {
frm.disable_save();
frm.add_custom_button(__('Get Payment Entries'), () =>
frm.trigger("get_payment_entries")
);
frm.add_custom_button(__("Get Payment Entries"), () => frm.trigger("get_payment_entries"));
frm.change_custom_button_type(__('Get Payment Entries'), null, 'primary');
frm.change_custom_button_type(__("Get Payment Entries"), null, "primary");
},
update_clearance_date: function(frm) {
update_clearance_date: function (frm) {
return frappe.call({
method: "update_clearance_date",
doc: frm.doc,
callback: function(r, rt) {
callback: function (r, rt) {
frm.refresh_field("payment_entries");
frm.refresh_fields();
if (!frm.doc.payment_entries.length) {
frm.change_custom_button_type(__('Get Payment Entries'), null, 'primary');
frm.change_custom_button_type(__('Update Clearance Date'), null, 'default');
frm.change_custom_button_type(__("Get Payment Entries"), null, "primary");
frm.change_custom_button_type(__("Update Clearance Date"), null, "default");
}
}
},
});
},
get_payment_entries: function(frm) {
get_payment_entries: function (frm) {
return frappe.call({
method: "get_payment_entries",
doc: frm.doc,
callback: function(r, rt) {
callback: function (r, rt) {
frm.refresh_field("payment_entries");
if (frm.doc.payment_entries.length) {
frm.add_custom_button(__('Update Clearance Date'), () =>
frm.add_custom_button(__("Update Clearance Date"), () =>
frm.trigger("update_clearance_date")
);
frm.change_custom_button_type(__('Get Payment Entries'), null, 'default');
frm.change_custom_button_type(__('Update Clearance Date'), null, 'primary');
frm.change_custom_button_type(__("Get Payment Entries"), null, "default");
frm.change_custom_button_type(__("Update Clearance Date"), null, "primary");
}
}
},
});
}
},
});

View File

@@ -5,7 +5,9 @@
import frappe
from frappe import _, msgprint
from frappe.model.document import Document
from frappe.query_builder.custom import ConstantColumn
from frappe.utils import flt, fmt_money, getdate
from pypika import Order
import erpnext
@@ -125,7 +127,7 @@ def get_payment_entries_for_bank_clearance(
condition = "and (clearance_date IS NULL or clearance_date='0000-00-00')"
journal_entries = frappe.db.sql(
"""
f"""
select
"Journal Entry" as payment_document, t1.name as payment_entry,
t1.cheque_no as cheque_number, t1.cheque_date,
@@ -139,9 +141,7 @@ def get_payment_entries_for_bank_clearance(
and ifnull(t1.is_opening, 'No') = 'No' {condition}
group by t2.account, t1.name
order by t1.posting_date ASC, t1.name DESC
""".format(
condition=condition
),
""",
{"account": account, "from": from_date, "to": to_date},
as_dict=1,
)
@@ -150,7 +150,7 @@ def get_payment_entries_for_bank_clearance(
condition += "and bank_account = %(bank_account)s"
payment_entries = frappe.db.sql(
"""
f"""
select
"Payment Entry" as payment_document, name as payment_entry,
reference_no as cheque_number, reference_date as cheque_date,
@@ -165,9 +165,7 @@ def get_payment_entries_for_bank_clearance(
{condition}
order by
posting_date ASC, name DESC
""".format(
condition=condition
),
""",
{
"account": account,
"from": from_date,
@@ -179,45 +177,65 @@ def get_payment_entries_for_bank_clearance(
pos_sales_invoices, pos_purchase_invoices = [], []
if include_pos_transactions:
pos_sales_invoices = frappe.db.sql(
"""
select
"Sales Invoice Payment" as payment_document, sip.name as payment_entry, sip.amount as debit,
si.posting_date, si.customer as against_account, sip.clearance_date,
account.account_currency, 0 as credit
from `tabSales Invoice Payment` sip, `tabSales Invoice` si, `tabAccount` account
where
sip.account=%(account)s and si.docstatus=1 and sip.parent = si.name
and account.name = sip.account and si.posting_date >= %(from)s and si.posting_date <= %(to)s
order by
si.posting_date ASC, si.name DESC
""",
{"account": account, "from": from_date, "to": to_date},
as_dict=1,
)
si_payment = frappe.qb.DocType("Sales Invoice Payment")
si = frappe.qb.DocType("Sales Invoice")
acc = frappe.qb.DocType("Account")
pos_purchase_invoices = frappe.db.sql(
"""
select
"Purchase Invoice" as payment_document, pi.name as payment_entry, pi.paid_amount as credit,
pi.posting_date, pi.supplier as against_account, pi.clearance_date,
account.account_currency, 0 as debit
from `tabPurchase Invoice` pi, `tabAccount` account
where
pi.cash_bank_account=%(account)s and pi.docstatus=1 and account.name = pi.cash_bank_account
and pi.posting_date >= %(from)s and pi.posting_date <= %(to)s
order by
pi.posting_date ASC, pi.name DESC
""",
{"account": account, "from": from_date, "to": to_date},
as_dict=1,
)
pos_sales_invoices = (
frappe.qb.from_(si_payment)
.inner_join(si)
.on(si_payment.parent == si.name)
.inner_join(acc)
.on(si_payment.account == acc.name)
.select(
ConstantColumn("Sales Invoice").as_("payment_document"),
si.name.as_("payment_entry"),
si_payment.reference_no.as_("cheque_number"),
si_payment.amount.as_("debit"),
si.posting_date,
si.customer.as_("against_account"),
si_payment.clearance_date,
acc.account_currency,
ConstantColumn(0).as_("credit"),
)
.where(
(si.docstatus == 1)
& (si_payment.account == account)
& (si.posting_date >= from_date)
& (si.posting_date <= to_date)
)
.orderby(si.posting_date)
.orderby(si.name, order=Order.desc)
).run(as_dict=True)
pi = frappe.qb.DocType("Purchase Invoice")
pos_purchase_invoices = (
frappe.qb.from_(pi)
.inner_join(acc)
.on(pi.cash_bank_account == acc.name)
.select(
ConstantColumn("Purchase Invoice").as_("payment_document"),
pi.name.as_("payment_entry"),
pi.paid_amount.as_("credit"),
pi.posting_date,
pi.supplier.as_("against_account"),
pi.clearance_date,
acc.account_currency,
ConstantColumn(0).as_("debit"),
)
.where(
(pi.docstatus == 1)
& (pi.cash_bank_account == account)
& (pi.posting_date >= from_date)
& (pi.posting_date <= to_date)
)
.orderby(pi.posting_date)
.orderby(pi.name, order=Order.desc)
).run(as_dict=True)
entries = (
list(payment_entries)
+ list(journal_entries)
+ list(pos_sales_invoices)
+ list(pos_purchase_invoices)
list(payment_entries) + list(journal_entries) + list(pos_sales_invoices) + list(pos_purchase_invoices)
)
return entries

View File

@@ -68,9 +68,7 @@ class TestBankClearance(unittest.TestCase):
)
loan.submit()
make_loan_disbursement_entry(loan.name, loan.loan_amount, disbursement_date=getdate())
repayment_entry = create_repayment_entry(
loan.name, "_Test Customer", getdate(), loan.loan_amount
)
repayment_entry = create_repayment_entry(loan.name, "_Test Customer", getdate(), loan.loan_amount)
repayment_entry.save()
repayment_entry.submit()

View File

@@ -1,39 +1,39 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
cur_frm.add_fetch('bank_account','account','account');
cur_frm.add_fetch('bank_account','bank_account_no','bank_account_no');
cur_frm.add_fetch('bank_account','iban','iban');
cur_frm.add_fetch('bank_account','branch_code','branch_code');
cur_frm.add_fetch('bank','swift_number','swift_number');
cur_frm.add_fetch("bank_account", "account", "account");
cur_frm.add_fetch("bank_account", "bank_account_no", "bank_account_no");
cur_frm.add_fetch("bank_account", "iban", "iban");
cur_frm.add_fetch("bank_account", "branch_code", "branch_code");
cur_frm.add_fetch("bank", "swift_number", "swift_number");
frappe.ui.form.on('Bank Guarantee', {
setup: function(frm) {
frm.set_query("bank", function() {
return {
filters: {
company: frm.doc.company
}
};
});
frm.set_query("bank_account", function() {
frappe.ui.form.on("Bank Guarantee", {
setup: function (frm) {
frm.set_query("bank", function () {
return {
filters: {
company: frm.doc.company,
bank: frm.doc.bank
}
}
},
};
});
frm.set_query("project", function() {
frm.set_query("bank_account", function () {
return {
filters: {
customer: frm.doc.customer
}
company: frm.doc.company,
bank: frm.doc.bank,
},
};
});
frm.set_query("project", function () {
return {
filters: {
customer: frm.doc.customer,
},
};
});
},
bg_type: function(frm) {
bg_type: function (frm) {
if (frm.doc.bg_type == "Receiving") {
frm.set_value("reference_doctype", "Sales Order");
} else if (frm.doc.bg_type == "Providing") {
@@ -41,34 +41,33 @@ frappe.ui.form.on('Bank Guarantee', {
}
},
reference_docname: function(frm) {
reference_docname: function (frm) {
if (frm.doc.reference_docname && frm.doc.reference_doctype) {
let party_field = frm.doc.reference_doctype == "Sales Order" ? "customer" : "supplier";
frappe.call({
method: "erpnext.accounts.doctype.bank_guarantee.bank_guarantee.get_voucher_details",
args: {
"bank_guarantee_type": frm.doc.bg_type,
"reference_name": frm.doc.reference_docname
bank_guarantee_type: frm.doc.bg_type,
reference_name: frm.doc.reference_docname,
},
callback: function(r) {
callback: function (r) {
if (r.message) {
if (r.message[party_field]) frm.set_value(party_field, r.message[party_field]);
if (r.message.project) frm.set_value("project", r.message.project);
if (r.message.grand_total) frm.set_value("amount", r.message.grand_total);
}
}
},
});
}
},
start_date: function(frm) {
start_date: function (frm) {
var end_date = frappe.datetime.add_days(cur_frm.doc.start_date, cur_frm.doc.validity - 1);
cur_frm.set_value("end_date", end_date);
},
validity: function(frm) {
validity: function (frm) {
var end_date = frappe.datetime.add_days(cur_frm.doc.start_date, cur_frm.doc.validity - 1);
cur_frm.set_value("end_date", end_date);
}
},
});

View File

@@ -8,21 +8,22 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
return {
filters: {
company: frm.doc.company,
'is_company_account': 1
is_company_account: 1,
},
};
});
let no_bank_transactions_text =
`<div class="text-muted text-center">${__("No Matching Bank Transactions Found")}</div>`
let no_bank_transactions_text = `<div class="text-muted text-center">${__(
"No Matching Bank Transactions Found"
)}</div>`;
set_field_options("no_bank_transactions", no_bank_transactions_text);
},
onload: function (frm) {
// Set default filter dates
let today = frappe.datetime.get_today()
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');
frm.trigger("bank_account");
},
filter_by_reference_date: function (frm) {
@@ -37,34 +38,27 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
refresh: function (frm) {
frm.disable_save();
frappe.require("bank-reconciliation-tool.bundle.js", () =>
frm.trigger("make_reconciliation_tool")
);
frappe.require("bank-reconciliation-tool.bundle.js", () => frm.trigger("make_reconciliation_tool"));
frm.add_custom_button(__("Upload Bank Statement"), () =>
frappe.call({
method:
"erpnext.accounts.doctype.bank_statement_import.bank_statement_import.upload_bank_statement",
args: {
dt: frm.doc.doctype,
dn: frm.doc.name,
company: frm.doc.company,
bank_account: frm.doc.bank_account,
},
callback: function (r) {
if (!r.exc) {
var doc = frappe.model.sync(r.message);
frappe.set_route(
"Form",
doc[0].doctype,
doc[0].name
);
}
},
})
frappe.call({
method: "erpnext.accounts.doctype.bank_statement_import.bank_statement_import.upload_bank_statement",
args: {
dt: frm.doc.doctype,
dn: frm.doc.name,
company: frm.doc.company,
bank_account: frm.doc.bank_account,
},
callback: function (r) {
if (!r.exc) {
var doc = frappe.model.sync(r.message);
frappe.set_route("Form", doc[0].doctype, doc[0].name);
}
},
})
);
frm.add_custom_button(__('Auto Reconcile'), function() {
frm.add_custom_button(__("Auto Reconcile"), function () {
frappe.call({
method: "erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.auto_reconcile_vouchers",
args: {
@@ -75,33 +69,22 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
from_reference_date: frm.doc.from_reference_date,
to_reference_date: frm.doc.to_reference_date,
},
})
});
});
frm.add_custom_button(__('Get Unreconciled Entries'), function() {
frm.add_custom_button(__("Get Unreconciled Entries"), function () {
frm.trigger("make_reconciliation_tool");
});
frm.change_custom_button_type(__('Get Unreconciled Entries'), null, 'primary');
frm.change_custom_button_type(__("Get Unreconciled Entries"), null, "primary");
},
bank_account: function (frm) {
frappe.db.get_value(
"Bank Account",
frm.doc.bank_account,
"account",
(r) => {
frappe.db.get_value(
"Account",
r.account,
"account_currency",
(r) => {
frm.doc.account_currency = r.account_currency;
frm.trigger("render_chart");
}
);
}
);
frappe.db.get_value("Bank Account", frm.doc.bank_account, "account", (r) => {
frappe.db.get_value("Account", r.account, "account_currency", (r) => {
frm.doc.account_currency = r.account_currency;
frm.trigger("render_chart");
});
});
frm.trigger("get_account_opening_balance");
},
@@ -120,11 +103,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
) {
frm.trigger("render_chart");
frm.trigger("render");
frappe.utils.scroll_to(
frm.get_field("reconciliation_tool_cards").$wrapper,
true,
30
);
frappe.utils.scroll_to(frm.get_field("reconciliation_tool_cards").$wrapper, true, 30);
}
});
}
@@ -133,11 +112,10 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
get_account_opening_balance(frm) {
if (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",
method: "erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_account_balance",
args: {
bank_account: frm.doc.bank_account,
till_date: frappe.datetime.add_days(frm.doc.bank_statement_from_date, -1)
till_date: frappe.datetime.add_days(frm.doc.bank_statement_from_date, -1),
},
callback: (response) => {
frm.set_value("account_opening_balance", response.message);
@@ -149,8 +127,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
get_cleared_balance(frm) {
if (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",
method: "erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_account_balance",
args: {
bank_account: frm.doc.bank_account,
till_date: frm.doc.bank_statement_to_date,
@@ -163,41 +140,30 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
},
render_chart(frm) {
frm.cards_manager = new erpnext.accounts.bank_reconciliation.NumberCardManager(
{
$reconciliation_tool_cards: frm.get_field(
"reconciliation_tool_cards"
).$wrapper,
bank_statement_closing_balance:
frm.doc.bank_statement_closing_balance,
cleared_balance: frm.cleared_balance,
currency: frm.doc.account_currency,
}
);
frm.cards_manager = new erpnext.accounts.bank_reconciliation.NumberCardManager({
$reconciliation_tool_cards: frm.get_field("reconciliation_tool_cards").$wrapper,
bank_statement_closing_balance: frm.doc.bank_statement_closing_balance,
cleared_balance: frm.cleared_balance,
currency: frm.doc.account_currency,
});
},
render(frm) {
if (frm.doc.bank_account) {
frm.bank_reconciliation_data_table_manager = new erpnext.accounts.bank_reconciliation.DataTableManager(
{
frm.bank_reconciliation_data_table_manager =
new erpnext.accounts.bank_reconciliation.DataTableManager({
company: frm.doc.company,
bank_account: frm.doc.bank_account,
$reconciliation_tool_dt: frm.get_field(
"reconciliation_tool_dt"
).$wrapper,
$no_bank_transactions: frm.get_field(
"no_bank_transactions"
).$wrapper,
$reconciliation_tool_dt: frm.get_field("reconciliation_tool_dt").$wrapper,
$no_bank_transactions: frm.get_field("no_bank_transactions").$wrapper,
bank_statement_from_date: frm.doc.bank_statement_from_date,
bank_statement_to_date: frm.doc.bank_statement_to_date,
filter_by_reference_date: frm.doc.filter_by_reference_date,
from_reference_date: frm.doc.from_reference_date,
to_reference_date: frm.doc.to_reference_date,
bank_statement_closing_balance:
frm.doc.bank_statement_closing_balance,
bank_statement_closing_balance: frm.doc.bank_statement_closing_balance,
cards_manager: frm.cards_manager,
}
);
});
}
},
});

View File

@@ -26,6 +26,7 @@
{
"fieldname": "company",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"label": "Company",
"options": "Company"
},
@@ -118,7 +119,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2023-03-07 11:02:24.535714",
"modified": "2024-04-28 14:40:50.910884",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation Tool",
@@ -139,4 +140,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -9,7 +9,6 @@ from frappe import _
from frappe.model.document import Document
from frappe.query_builder.custom import ConstantColumn
from frappe.utils import cint, flt
from pypika.terms import Parameter
from erpnext import get_default_cost_center
from erpnext.accounts.doctype.bank_transaction.bank_transaction import get_total_allocated_amount
@@ -82,9 +81,7 @@ def get_bank_transactions(bank_account, from_date=None, to_date=None):
def get_account_balance(bank_account, till_date):
# returns account balance till the specified date
account = frappe.db.get_value("Bank Account", bank_account, "account")
filters = frappe._dict(
{"account": account, "report_date": till_date, "include_pos_transactions": 1}
)
filters = frappe._dict({"account": account, "report_date": till_date, "include_pos_transactions": 1})
data = get_entries(filters)
balance_as_per_system = get_balance_on(filters["account"], filters["report_date"])
@@ -97,10 +94,7 @@ def get_account_balance(bank_account, till_date):
amounts_not_reflected_in_system = get_amounts_not_reflected_in_system(filters)
bank_bal = (
flt(balance_as_per_system)
- flt(total_debit)
+ flt(total_credit)
+ amounts_not_reflected_in_system
flt(balance_as_per_system) - flt(total_debit) + flt(total_credit) + amounts_not_reflected_in_system
)
return bank_bal
@@ -509,6 +503,18 @@ def check_matching(
to_reference_date,
):
exact_match = True if "exact_match" in document_types else False
common_filters = frappe._dict(
{
"amount": transaction.unallocated_amount,
"payment_type": "Receive" if transaction.deposit > 0.0 else "Pay",
"reference_no": transaction.reference_number,
"party_type": transaction.party_type,
"party": transaction.party,
"bank_account": bank_account,
}
)
queries = get_queries(
bank_account,
company,
@@ -520,24 +526,14 @@ def check_matching(
from_reference_date,
to_reference_date,
exact_match,
common_filters,
)
filters = {
"amount": transaction.unallocated_amount,
"payment_type": "Receive" if transaction.deposit > 0.0 else "Pay",
"reference_no": transaction.reference_number,
"party_type": transaction.party_type,
"party": transaction.party,
"bank_account": bank_account,
}
matching_vouchers = []
for query in queries:
matching_vouchers.extend(frappe.db.sql(query, filters, as_dict=True))
matching_vouchers.extend(query.run(as_dict=True))
return (
sorted(matching_vouchers, key=lambda x: x["rank"], reverse=True) if matching_vouchers else []
)
return sorted(matching_vouchers, key=lambda x: x["rank"], reverse=True) if matching_vouchers else []
def get_queries(
@@ -551,6 +547,7 @@ def get_queries(
from_reference_date,
to_reference_date,
exact_match,
common_filters,
):
# get queries to get matching vouchers
account_from_to = "paid_to" if transaction.deposit > 0.0 else "paid_from"
@@ -571,6 +568,7 @@ def get_queries(
filter_by_reference_date,
from_reference_date,
to_reference_date,
common_filters,
)
or []
)
@@ -590,6 +588,7 @@ def get_matching_queries(
filter_by_reference_date,
from_reference_date,
to_reference_date,
common_filters,
):
queries = []
currency = get_account_currency(bank_account)
@@ -604,6 +603,7 @@ def get_matching_queries(
filter_by_reference_date,
from_reference_date,
to_reference_date,
common_filters,
)
queries.append(query)
@@ -616,16 +616,17 @@ def get_matching_queries(
filter_by_reference_date,
from_reference_date,
to_reference_date,
common_filters,
)
queries.append(query)
if transaction.deposit > 0.0 and "sales_invoice" in document_types:
query = get_si_matching_query(exact_match, currency)
query = get_si_matching_query(exact_match, currency, common_filters)
queries.append(query)
if transaction.withdrawal > 0.0:
if "purchase_invoice" in document_types:
query = get_pi_matching_query(exact_match, currency)
query = get_pi_matching_query(exact_match, currency, common_filters)
queries.append(query)
if "bank_transaction" in document_types:
@@ -646,17 +647,13 @@ def get_bt_matching_query(exact_match, transaction):
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
amount_condition = amount_equality if exact_match else getattr(bt, field) > 0.0
ref_rank = (
frappe.qb.terms.Case().when(bt.reference_number == transaction.reference_number, 1).else_(0)
)
ref_rank = frappe.qb.terms.Case().when(bt.reference_number == transaction.reference_number, 1).else_(0)
unallocated_rank = (
frappe.qb.terms.Case().when(bt.unallocated_amount == transaction.unallocated_amount, 1).else_(0)
)
party_condition = (
(bt.party_type == transaction.party_type)
& (bt.party == transaction.party)
& bt.party.isnotnull()
(bt.party_type == transaction.party_type) & (bt.party == transaction.party) & bt.party.isnotnull()
)
party_rank = frappe.qb.terms.Case().when(party_condition, 1).else_(0)
@@ -680,7 +677,7 @@ def get_bt_matching_query(exact_match, transaction):
.where(amount_condition)
.where(bt.docstatus == 1)
)
return str(query)
return query
def get_pe_matching_query(
@@ -692,6 +689,7 @@ def get_pe_matching_query(
filter_by_reference_date,
from_reference_date,
to_reference_date,
common_filters,
):
# get matching payment entries query
to_from = "to" if transaction.deposit > 0.0 else "from"
@@ -707,9 +705,7 @@ def get_pe_matching_query(
amount_condition = amount_equality if exact_match else pe.paid_amount > 0.0
party_condition = (
(pe.party_type == transaction.party_type)
& (pe.party == transaction.party)
& pe.party.isnotnull()
(pe.party_type == transaction.party_type) & (pe.party == transaction.party) & pe.party.isnotnull()
)
party_rank = frappe.qb.terms.Case().when(party_condition, 1).else_(0)
@@ -723,7 +719,7 @@ def get_pe_matching_query(
(ref_rank + amount_rank + party_rank + 1).as_("rank"),
ConstantColumn("Payment Entry").as_("doctype"),
pe.name,
pe.paid_amount,
pe.paid_amount_after_tax.as_("paid_amount"),
pe.reference_no,
pe.reference_date,
pe.party,
@@ -734,16 +730,16 @@ def get_pe_matching_query(
.where(pe.docstatus == 1)
.where(pe.payment_type.isin([payment_type, "Internal Transfer"]))
.where(pe.clearance_date.isnull())
.where(getattr(pe, account_from_to) == Parameter("%(bank_account)s"))
.where(getattr(pe, account_from_to) == common_filters.bank_account)
.where(amount_condition)
.where(filter_by_date)
.orderby(pe.reference_date if cint(filter_by_reference_date) else pe.posting_date)
)
if frappe.flags.auto_reconcile_vouchers == True:
if frappe.flags.auto_reconcile_vouchers is True:
query = query.where(ref_condition)
return str(query)
return query
def get_je_matching_query(
@@ -754,6 +750,7 @@ def get_je_matching_query(
filter_by_reference_date,
from_reference_date,
to_reference_date,
common_filters,
):
# get matching journal entry query
# We have mapping at the bank level
@@ -793,29 +790,29 @@ def get_je_matching_query(
.where(je.docstatus == 1)
.where(je.voucher_type != "Opening Entry")
.where(je.clearance_date.isnull())
.where(jea.account == Parameter("%(bank_account)s"))
.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)
.orderby(je.cheque_date if cint(filter_by_reference_date) else je.posting_date)
)
if frappe.flags.auto_reconcile_vouchers == True:
if frappe.flags.auto_reconcile_vouchers is True:
query = query.where(ref_condition)
return str(query)
return query
def get_si_matching_query(exact_match, currency):
def get_si_matching_query(exact_match, currency, common_filters):
# get matching sales invoice query
si = frappe.qb.DocType("Sales Invoice")
sip = frappe.qb.DocType("Sales Invoice Payment")
amount_equality = sip.amount == Parameter("%(amount)s")
amount_equality = sip.amount == common_filters.amount
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
amount_condition = amount_equality if exact_match else sip.amount > 0.0
party_condition = si.customer == Parameter("%(party)s")
party_condition = si.customer == common_filters.party
party_rank = frappe.qb.terms.Case().when(party_condition, 1).else_(0)
query = (
@@ -836,23 +833,23 @@ def get_si_matching_query(exact_match, currency):
)
.where(si.docstatus == 1)
.where(sip.clearance_date.isnull())
.where(sip.account == Parameter("%(bank_account)s"))
.where(sip.account == common_filters.bank_account)
.where(amount_condition)
.where(si.currency == currency)
)
return str(query)
return query
def get_pi_matching_query(exact_match, currency):
def get_pi_matching_query(exact_match, currency, common_filters):
# get matching purchase invoice query when they are also used as payment entries (is_paid)
purchase_invoice = frappe.qb.DocType("Purchase Invoice")
amount_equality = purchase_invoice.paid_amount == Parameter("%(amount)s")
amount_equality = purchase_invoice.paid_amount == common_filters.amount
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
amount_condition = amount_equality if exact_match else purchase_invoice.paid_amount > 0.0
party_condition = purchase_invoice.supplier == Parameter("%(party)s")
party_condition = purchase_invoice.supplier == common_filters.party
party_rank = frappe.qb.terms.Case().when(party_condition, 1).else_(0)
query = (
@@ -872,9 +869,9 @@ def get_pi_matching_query(exact_match, currency):
.where(purchase_invoice.docstatus == 1)
.where(purchase_invoice.is_paid == 1)
.where(purchase_invoice.clearance_date.isnull())
.where(purchase_invoice.cash_bank_account == Parameter("%(bank_account)s"))
.where(purchase_invoice.cash_bank_account == common_filters.bank_account)
.where(amount_condition)
.where(purchase_invoice.currency == currency)
)
return str(query)
return query

View File

@@ -1,12 +1,11 @@
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import unittest
import frappe
from frappe import qb
from frappe.tests.utils import FrappeTestCase, change_settings
from frappe.utils import add_days, flt, getdate, today
from frappe.tests.utils import FrappeTestCase
from frappe.utils import add_days, today
from erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool import (
auto_reconcile_vouchers,
@@ -22,7 +21,7 @@ class TestBankReconciliationTool(AccountsTestMixin, FrappeTestCase):
self.create_customer()
self.clear_old_entries()
bank_dt = qb.DocType("Bank")
q = qb.from_(bank_dt).delete().where(bank_dt.name == "HDFC").run()
qb.from_(bank_dt).delete().where(bank_dt.name == "HDFC").run()
self.create_bank_account()
def tearDown(self):
@@ -76,6 +75,7 @@ class TestBankReconciliationTool(AccountsTestMixin, FrappeTestCase):
"deposit": 100,
"bank_account": self.bank_account,
"reference_number": "123",
"currency": "INR",
}
)
.save()

View File

@@ -7,11 +7,9 @@ frappe.ui.form.on("Bank Statement Import", {
frm.import_in_progress = false;
if (data_import !== frm.doc.name) return;
frappe.model.clear_doc("Bank Statement Import", frm.doc.name);
frappe.model
.with_doc("Bank Statement Import", frm.doc.name)
.then(() => {
frm.refresh();
});
frappe.model.with_doc("Bank Statement Import", frm.doc.name).then(() => {
frm.refresh();
});
});
frappe.realtime.on("data_import_progress", (data) => {
frm.import_in_progress = true;
@@ -38,20 +36,9 @@ frappe.ui.form.on("Bank Statement Import", {
: __("Updating {0} of {1}, {2}", message_args);
}
if (data.skipping) {
message = __(
"Skipping {0} of {1}, {2}",
[
data.current,
data.total,
eta_message,
]
);
message = __("Skipping {0} of {1}, {2}", [data.current, data.total, eta_message]);
}
frm.dashboard.show_progress(
__("Import Progress"),
percent,
message
);
frm.dashboard.show_progress(__("Import Progress"), percent, message);
frm.page.set_indicator(__("In Progress"), "orange");
// hide progress when complete
@@ -93,15 +80,12 @@ frappe.ui.form.on("Bank Statement Import", {
frm.trigger("show_report_error_button");
if (frm.doc.status === "Partial Success") {
frm.add_custom_button(__("Export Errored Rows"), () =>
frm.trigger("export_errored_rows")
);
frm.add_custom_button(__("Export Errored Rows"), () => frm.trigger("export_errored_rows"));
}
if (frm.doc.status.includes("Success")) {
frm.add_custom_button(
__("Go to {0} List", [__(frm.doc.reference_doctype)]),
() => frappe.set_route("List", frm.doc.reference_doctype)
frm.add_custom_button(__("Go to {0} List", [__(frm.doc.reference_doctype)]), () =>
frappe.set_route("List", frm.doc.reference_doctype)
);
}
},
@@ -118,13 +102,8 @@ frappe.ui.form.on("Bank Statement Import", {
frm.disable_save();
if (frm.doc.status !== "Success") {
if (!frm.is_new() && frm.has_import_file()) {
let label =
frm.doc.status === "Pending"
? __("Start Import")
: __("Retry");
frm.page.set_primary_action(label, () =>
frm.events.start_import(frm)
);
let label = frm.doc.status === "Pending" ? __("Start Import") : __("Retry");
frm.page.set_primary_action(label, () => frm.events.start_import(frm));
} else {
frm.page.set_primary_action(__("Save"), () => frm.save());
}
@@ -166,24 +145,24 @@ frappe.ui.form.on("Bank Statement Import", {
message =
successful_records.length > 1
? __(
"Successfully imported {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
)
"Successfully imported {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
)
: __(
"Successfully imported {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
);
"Successfully imported {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
);
} else {
message =
successful_records.length > 1
? __(
"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
)
"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
)
: __(
"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
);
"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
);
}
}
frm.dashboard.set_headline(message);
@@ -226,8 +205,7 @@ frappe.ui.form.on("Bank Statement Import", {
},
download_template() {
let method =
"/api/method/frappe.core.doctype.data_import.data_import.download_template";
let method = "/api/method/frappe.core.doctype.data_import.data_import.download_template";
open_url_post(method, {
doctype: "Bank Transaction",
@@ -240,7 +218,7 @@ frappe.ui.form.on("Bank Statement Import", {
"description",
"reference_number",
"bank_account",
"currency"
"currency",
],
},
});
@@ -311,10 +289,7 @@ frappe.ui.form.on("Bank Statement Import", {
show_import_preview(frm, preview_data) {
let import_log = JSON.parse(frm.doc.statement_import_log || "[]");
if (
frm.import_preview &&
frm.import_preview.doctype === frm.doc.reference_doctype
) {
if (frm.import_preview && frm.import_preview.doctype === frm.doc.reference_doctype) {
frm.import_preview.preview_data = preview_data;
frm.import_preview.import_log = import_log;
frm.import_preview.refresh();
@@ -330,19 +305,10 @@ frappe.ui.form.on("Bank Statement Import", {
frm,
events: {
remap_column(changed_map) {
let template_options = JSON.parse(
frm.doc.template_options || "{}"
);
template_options.column_to_field_map =
template_options.column_to_field_map || {};
Object.assign(
template_options.column_to_field_map,
changed_map
);
frm.set_value(
"template_options",
JSON.stringify(template_options)
);
let template_options = JSON.parse(frm.doc.template_options || "{}");
template_options.column_to_field_map = template_options.column_to_field_map || {};
Object.assign(template_options.column_to_field_map, changed_map);
frm.set_value("template_options", JSON.stringify(template_options));
frm.save().then(() => frm.trigger("import_file"));
},
},
@@ -376,8 +342,7 @@ frappe.ui.form.on("Bank Statement Import", {
let other_warnings = [];
for (let warning of warnings) {
if (warning.row) {
warnings_by_row[warning.row] =
warnings_by_row[warning.row] || [];
warnings_by_row[warning.row] = warnings_by_row[warning.row] || [];
warnings_by_row[warning.row].push(warning);
} else {
other_warnings.push(warning);
@@ -392,9 +357,7 @@ frappe.ui.form.on("Bank Statement Import", {
if (w.field) {
let label =
w.field.label +
(w.field.parent !== frm.doc.reference_doctype
? ` (${w.field.parent})`
: "");
(w.field.parent !== frm.doc.reference_doctype ? ` (${w.field.parent})` : "");
return `<li>${label}: ${w.message}</li>`;
}
return `<li>${w.message}</li>`;
@@ -413,10 +376,9 @@ frappe.ui.form.on("Bank Statement Import", {
.map((warning) => {
let header = "";
if (warning.col) {
let column_number = `<span class="text-uppercase">${__(
"Column {0}",
[warning.col]
)}</span>`;
let column_number = `<span class="text-uppercase">${__("Column {0}", [
warning.col,
])}</span>`;
let column_header = columns[warning.col].header_title;
header = `${column_number} (${column_header})`;
}
@@ -455,36 +417,28 @@ frappe.ui.form.on("Bank Statement Import", {
let html = "";
if (log.success) {
if (frm.doc.import_type === "Insert New Records") {
html = __(
"Successfully imported {0}", [
`<span class="underline">${frappe.utils.get_form_link(
frm.doc.reference_doctype,
log.docname,
true
)}<span>`,
]
);
html = __("Successfully imported {0}", [
`<span class="underline">${frappe.utils.get_form_link(
frm.doc.reference_doctype,
log.docname,
true
)}<span>`,
]);
} else {
html = __(
"Successfully updated {0}", [
`<span class="underline">${frappe.utils.get_form_link(
frm.doc.reference_doctype,
log.docname,
true
)}<span>`,
]
);
html = __("Successfully updated {0}", [
`<span class="underline">${frappe.utils.get_form_link(
frm.doc.reference_doctype,
log.docname,
true
)}<span>`,
]);
}
} else {
let messages = log.messages
.map(JSON.parse)
.map((m) => {
let title = m.title
? `<strong>${m.title}</strong>`
: "";
let message = m.message
? `<div>${m.message}</div>`
: "";
let title = m.title ? `<strong>${m.title}</strong>` : "";
let message = m.message ? `<div>${m.message}</div>` : "";
return title + message;
})
.join("");

View File

@@ -45,7 +45,7 @@ class BankStatementImport(DataImport):
# end: auto-generated types
def __init__(self, *args, **kwargs):
super(BankStatementImport, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
def validate(self):
doc_before_save = self.get_doc_before_save()
@@ -54,7 +54,6 @@ class BankStatementImport(DataImport):
or (doc_before_save and doc_before_save.import_file != self.import_file)
or (doc_before_save and doc_before_save.google_sheets_url != self.google_sheets_url)
):
template_options_dict = {}
column_to_field_map = {}
bank = frappe.get_doc("Bank", self.bank)
@@ -69,7 +68,6 @@ class BankStatementImport(DataImport):
self.validate_google_sheets_url()
def start_import(self):
preview = frappe.get_doc("Bank Statement Import", self.name).get_preview_from_template(
self.import_file, self.google_sheets_url
)
@@ -125,7 +123,7 @@ def download_errored_template(data_import_name):
def parse_data_from_template(raw_data):
data = []
for i, row in enumerate(raw_data):
for _i, row in enumerate(raw_data):
if all(v in INVALID_VALUES for v in row):
# empty row
continue
@@ -135,9 +133,7 @@ def parse_data_from_template(raw_data):
return data
def start_import(
data_import, bank_account, import_file_path, google_sheets_url, bank, template_options
):
def start_import(data_import, bank_account, import_file_path, google_sheets_url, bank, template_options):
"""This method runs in background job"""
update_mapping_db(bank, template_options)
@@ -148,6 +144,9 @@ def start_import(
import_file = ImportFile("Bank Transaction", file=file, import_type="Insert New Records")
data = parse_data_from_template(import_file.raw_data)
# Importer expects 'Data Import' class, which has 'payload_count' attribute
if not data_import.get("payload_count"):
data_import.payload_count = len(data) - 1
if import_file_path:
add_bank_account(data, bank_account)

View File

@@ -1,36 +1,34 @@
let imports_in_progress = [];
frappe.listview_settings['Bank Statement Import'] = {
frappe.listview_settings["Bank Statement Import"] = {
onload(listview) {
frappe.realtime.on('data_import_progress', data => {
frappe.realtime.on("data_import_progress", (data) => {
if (!imports_in_progress.includes(data.data_import)) {
imports_in_progress.push(data.data_import);
}
});
frappe.realtime.on('data_import_refresh', data => {
imports_in_progress = imports_in_progress.filter(
d => d !== data.data_import
);
frappe.realtime.on("data_import_refresh", (data) => {
imports_in_progress = imports_in_progress.filter((d) => d !== data.data_import);
listview.refresh();
});
},
get_indicator: function(doc) {
get_indicator: function (doc) {
var colors = {
'Pending': 'orange',
'Not Started': 'orange',
'Partial Success': 'orange',
'Success': 'green',
'In Progress': 'orange',
'Error': 'red'
Pending: "orange",
"Not Started": "orange",
"Partial Success": "orange",
Success: "green",
"In Progress": "orange",
Error: "red",
};
let status = doc.status;
if (imports_in_progress.includes(doc.name)) {
status = 'In Progress';
status = "In Progress";
}
if (status == 'Pending') {
status = 'Not Started';
if (status == "Pending") {
status = "Not Started";
}
return [__(status), colors[status], 'status,=,' + doc.status];
return [__(status), colors[status], "status,=," + doc.status];
},
hide_name_column: true
hide_name_column: true,
};

View File

@@ -1,5 +1,3 @@
from typing import Tuple, Union
import frappe
from frappe.utils import flt
from rapidfuzz import fuzz, process
@@ -19,7 +17,7 @@ class AutoMatchParty:
def get(self, key):
return self.__dict__.get(key, None)
def match(self) -> Union[Tuple, None]:
def match(self) -> tuple | None:
result = None
result = AutoMatchbyAccountIBAN(
bank_party_account_number=self.bank_party_account_number,
@@ -50,7 +48,7 @@ class AutoMatchbyAccountIBAN:
result = self.match_account_in_party()
return result
def match_account_in_party(self) -> Union[Tuple, None]:
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)
@@ -97,7 +95,7 @@ class AutoMatchbyPartyNameDescription:
def get(self, key):
return self.__dict__.get(key, None)
def match(self) -> Union[Tuple, None]:
def match(self) -> tuple | None:
# fuzzy search by customer/supplier & employee
if not (self.bank_party_name or self.description):
return None
@@ -105,7 +103,7 @@ class AutoMatchbyPartyNameDescription:
result = self.match_party_name_desc_in_party()
return result
def match_party_name_desc_in_party(self) -> Union[Tuple, None]:
def match_party_name_desc_in_party(self) -> tuple | None:
"""Fuzzy search party name and/or description against parties in the system"""
result = None
parties = get_parties_in_order(self.deposit)
@@ -129,7 +127,7 @@ class AutoMatchbyPartyNameDescription:
return result
def fuzzy_search_and_return_result(self, party, names, field) -> Union[Tuple, None]:
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)
party_name, skip = self.process_fuzzy_result(result)
@@ -142,7 +140,7 @@ class AutoMatchbyPartyNameDescription:
party_name,
), skip
def process_fuzzy_result(self, result: Union[list, None]):
def process_fuzzy_result(self, result: list | None):
"""
If there are multiple valid close matches return None as result may be faulty.
Return the result only if one accurate match stands out.

View File

@@ -3,7 +3,7 @@
frappe.ui.form.on("Bank Transaction", {
onload(frm) {
frm.set_query("payment_document", "payment_entries", function() {
frm.set_query("payment_document", "payment_entries", function () {
const payment_doctypes = frm.events.get_payment_doctypes(frm);
return {
filters: {
@@ -23,7 +23,7 @@ frappe.ui.form.on("Bank Transaction", {
set_bank_statement_filter(frm);
},
setup: function(frm) {
setup: function (frm) {
frm.set_query("party_type", function () {
return {
filters: {
@@ -33,16 +33,10 @@ frappe.ui.form.on("Bank Transaction", {
});
},
get_payment_doctypes: function() {
get_payment_doctypes: function () {
// get payment doctypes from all the apps
return [
"Payment Entry",
"Journal Entry",
"Sales Invoice",
"Purchase Invoice",
"Bank Transaction",
];
}
return ["Payment Entry", "Journal Entry", "Sales Invoice", "Purchase Invoice", "Bank Transaction"];
},
});
frappe.ui.form.on("Bank Transaction Payments", {
@@ -54,10 +48,11 @@ frappe.ui.form.on("Bank Transaction Payments", {
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 }
)
.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({

View File

@@ -3,6 +3,7 @@
import frappe
from frappe import _
from frappe.model.docstatus import DocStatus
from frappe.model.document import Document
from frappe.utils import flt
@@ -48,6 +49,26 @@ class BankTransaction(Document):
def validate(self):
self.validate_duplicate_references()
self.validate_currency()
def validate_currency(self):
"""
Bank Transaction should be on the same currency as the Bank Account.
"""
if self.currency and self.bank_account:
if account := frappe.get_cached_value("Bank Account", self.bank_account, "account"):
account_currency = frappe.get_cached_value("Account", account, "account_currency")
if self.currency != account_currency:
frappe.throw(
_(
"Transaction currency: {0} cannot be different from Bank Account({1}) currency: {2}"
).format(
frappe.bold(self.currency),
frappe.bold(self.bank_account),
frappe.bold(account_currency),
)
)
def set_status(self):
if self.docstatus == 2:
@@ -75,10 +96,13 @@ class BankTransaction(Document):
pe.append(reference)
def update_allocated_amount(self):
self.allocated_amount = (
allocated_amount = (
sum(p.allocated_amount for p in self.payment_entries) if self.payment_entries else 0.0
)
self.unallocated_amount = abs(flt(self.withdrawal) - flt(self.deposit)) - self.allocated_amount
unallocated_amount = abs(flt(self.withdrawal) - flt(self.deposit)) - allocated_amount
self.allocated_amount = flt(allocated_amount, self.precision("allocated_amount"))
self.unallocated_amount = flt(unallocated_amount, self.precision("unallocated_amount"))
def before_submit(self):
self.allocate_payment_entries()
@@ -158,7 +182,7 @@ class BankTransaction(Document):
frappe.throw(_("Voucher {0} is over-allocated by {1}").format(unallocated_amount))
for payment_entry in to_remove:
self.remove(to_remove)
self.remove(payment_entry)
@frappe.whitelist()
def remove_payment_entries(self):
@@ -213,9 +237,7 @@ def get_clearance_details(transaction, payment_entry):
"""
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)
bt_allocations = get_total_allocated_amount(
payment_entry.payment_document, payment_entry.payment_entry
)
bt_allocations = get_total_allocated_amount(payment_entry.payment_document, payment_entry.payment_entry)
unallocated_amount = min(
transaction.unallocated_amount,
@@ -310,7 +332,6 @@ def get_total_allocated_amount(doctype, docname):
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)
@@ -349,9 +370,7 @@ def get_paid_amount(payment_entry, currency, gl_bank_account):
)
elif payment_entry.payment_document == "Loan Repayment":
return frappe.db.get_value(
payment_entry.payment_document, payment_entry.payment_entry, "amount_paid"
)
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(
@@ -361,9 +380,7 @@ def get_paid_amount(payment_entry, currency, gl_bank_account):
else:
frappe.throw(
"Please reconcile {0}: {1} manually".format(
payment_entry.payment_document, payment_entry.payment_entry
)
f"Please reconcile {payment_entry.payment_document}: {payment_entry.payment_entry} manually"
)
@@ -415,3 +432,21 @@ 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):
bt = frappe.get_doc("Bank Transaction", bt_name)
if bt.docstatus == DocStatus.cancelled():
continue
modified = False
for pe in bt.payment_entries:
if pe.payment_document == doctype and pe.payment_entry == docname:
bt.remove(pe)
modified = True
if modified:
bt.save()

View File

@@ -1,15 +1,15 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.listview_settings['Bank Transaction'] = {
frappe.listview_settings["Bank Transaction"] = {
add_fields: ["unallocated_amount"],
get_indicator: function(doc) {
if(doc.docstatus == 2) {
get_indicator: function (doc) {
if (doc.docstatus == 2) {
return [__("Cancelled"), "red", "docstatus,=,2"];
} else if(flt(doc.unallocated_amount)<=0) {
} else if (flt(doc.unallocated_amount) <= 0) {
return [__("Reconciled"), "green", "unallocated_amount,=,0"];
} else if(flt(doc.unallocated_amount)>0) {
} else if (flt(doc.unallocated_amount) > 0) {
return [__("Unreconciled"), "orange", "unallocated_amount,>,0"];
}
}
},
};

View File

@@ -18,12 +18,12 @@ def upload_bank_statement():
fcontent = frappe.local.uploaded_file
fname = frappe.local.uploaded_filename
if frappe.safe_encode(fname).lower().endswith("csv".encode("utf-8")):
if frappe.safe_encode(fname).lower().endswith(b"csv"):
from frappe.utils.csvutils import read_csv_content
rows = read_csv_content(fcontent, False)
elif frappe.safe_encode(fname).lower().endswith("xlsx".encode("utf-8")):
elif frappe.safe_encode(fname).lower().endswith(b"xlsx"):
from frappe.utils.xlsxutils import read_xlsx_file_from_attached_file
rows = read_xlsx_file_from_attached_file(fcontent=fcontent)

View File

@@ -2,10 +2,10 @@
# See license.txt
import json
import unittest
import frappe
from frappe import utils
from frappe.model.docstatus import DocStatus
from frappe.tests.utils import FrappeTestCase
from erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool import (
@@ -32,8 +32,16 @@ class TestBankTransaction(FrappeTestCase):
frappe.db.delete(dt)
clear_loan_transactions()
make_pos_profile()
add_transactions()
add_vouchers()
# generate and use a uniq hash identifier for 'Bank Account' and it's linked GL 'Account' to avoid validation error
uniq_identifier = frappe.generate_hash(length=10)
gl_account = create_gl_account("_Test Bank " + uniq_identifier)
bank_account = create_bank_account(
gl_account=gl_account, bank_account_name="Checking Account " + uniq_identifier
)
add_transactions(bank_account=bank_account)
add_vouchers(gl_account=gl_account)
# This test checks if ERPNext is able to provide a linked payment for a bank transaction based on the amount of the bank transaction.
def test_linked_payments(self):
@@ -81,6 +89,29 @@ class TestBankTransaction(FrappeTestCase):
clearance_date = frappe.db.get_value("Payment Entry", payment.name, "clearance_date")
self.assertFalse(clearance_date)
def test_cancel_voucher(self):
bank_transaction = frappe.get_doc(
"Bank Transaction",
dict(description="1512567 BG/000003025 OPSKATTUZWXXX AT776000000098709849 Herr G"),
)
payment = frappe.get_doc("Payment Entry", dict(party="Mr G", paid_amount=1700))
vouchers = json.dumps(
[
{
"payment_doctype": "Payment Entry",
"payment_name": payment.name,
"amount": bank_transaction.unallocated_amount,
}
]
)
reconcile_vouchers(bank_transaction.name, vouchers)
payment.reload()
payment.cancel()
bank_transaction.reload()
self.assertEqual(bank_transaction.docstatus, DocStatus.submitted())
self.assertEqual(bank_transaction.unallocated_amount, 1700)
self.assertEqual(bank_transaction.payment_entries, [])
# Check if ERPNext can correctly filter a linked payments based on the debit/credit amount
def test_debit_credit_output(self):
bank_transaction = frappe.get_doc(
@@ -196,7 +227,9 @@ def clear_loan_transactions():
frappe.db.delete("Loan Repayment")
def create_bank_account(bank_name="Citi Bank", account_name="_Test Bank - _TC"):
def create_bank_account(
bank_name="Citi Bank", gl_account="_Test Bank - _TC", bank_account_name="Checking Account"
):
try:
frappe.get_doc(
{
@@ -208,21 +241,35 @@ def create_bank_account(bank_name="Citi Bank", account_name="_Test Bank - _TC"):
pass
try:
frappe.get_doc(
bank_account = frappe.get_doc(
{
"doctype": "Bank Account",
"account_name": "Checking Account",
"account_name": bank_account_name,
"bank": bank_name,
"account": account_name,
"account": gl_account,
}
).insert(ignore_if_duplicate=True)
except frappe.DuplicateEntryError:
pass
return bank_account.name
def add_transactions():
create_bank_account()
def create_gl_account(gl_account_name="_Test Bank - _TC"):
gl_account = frappe.get_doc(
{
"doctype": "Account",
"company": "_Test Company",
"parent_account": "Current Assets - _TC",
"account_type": "Bank",
"is_group": 0,
"account_name": gl_account_name,
}
).insert()
return gl_account.name
def add_transactions(bank_account="_Test Bank - _TC"):
doc = frappe.get_doc(
{
"doctype": "Bank Transaction",
@@ -230,7 +277,7 @@ def add_transactions():
"date": "2018-10-23",
"deposit": 1200,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank",
"bank_account": bank_account,
}
).insert()
doc.submit()
@@ -242,7 +289,7 @@ def add_transactions():
"date": "2018-10-23",
"deposit": 1700,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank",
"bank_account": bank_account,
}
).insert()
doc.submit()
@@ -254,7 +301,7 @@ def add_transactions():
"date": "2018-10-26",
"withdrawal": 690,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank",
"bank_account": bank_account,
}
).insert()
doc.submit()
@@ -266,7 +313,7 @@ def add_transactions():
"date": "2018-10-27",
"deposit": 3900,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank",
"bank_account": bank_account,
}
).insert()
doc.submit()
@@ -278,13 +325,13 @@ def add_transactions():
"date": "2018-10-27",
"withdrawal": 109080,
"currency": "INR",
"bank_account": "Checking Account - Citi Bank",
"bank_account": bank_account,
}
).insert()
doc.submit()
def add_vouchers():
def add_vouchers(gl_account="_Test Bank - _TC"):
try:
frappe.get_doc(
{
@@ -300,7 +347,7 @@ def add_vouchers():
pi = make_purchase_invoice(supplier="Conrad Electronic", qty=1, rate=690)
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account=gl_account)
pe.reference_no = "Conrad Oct 18"
pe.reference_date = "2018-10-24"
pe.insert()
@@ -319,14 +366,14 @@ def add_vouchers():
pass
pi = make_purchase_invoice(supplier="Mr G", qty=1, rate=1200)
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account=gl_account)
pe.reference_no = "Herr G Oct 18"
pe.reference_date = "2018-10-24"
pe.insert()
pe.submit()
pi = make_purchase_invoice(supplier="Mr G", qty=1, rate=1700)
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account=gl_account)
pe.reference_no = "Herr G Nov 18"
pe.reference_date = "2018-11-01"
pe.insert()
@@ -357,10 +404,10 @@ def add_vouchers():
pass
pi = make_purchase_invoice(supplier="Poore Simon's", qty=1, rate=3900, is_paid=1, do_not_save=1)
pi.cash_bank_account = "_Test Bank - _TC"
pi.cash_bank_account = gl_account
pi.insert()
pi.submit()
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account=gl_account)
pe.reference_no = "Poore Simon's Oct 18"
pe.reference_date = "2018-10-28"
pe.paid_amount = 690
@@ -369,7 +416,7 @@ def add_vouchers():
pe.submit()
si = create_sales_invoice(customer="Poore Simon's", qty=1, rate=3900)
pe = get_payment_entry("Sales Invoice", si.name, bank_account="_Test Bank - _TC")
pe = get_payment_entry("Sales Invoice", si.name, bank_account=gl_account)
pe.reference_no = "Poore Simon's Oct 18"
pe.reference_date = "2018-10-28"
pe.insert()
@@ -389,19 +436,13 @@ def add_vouchers():
mode_of_payment = frappe.get_doc({"doctype": "Mode of Payment", "name": "Cash"})
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": "_Test Bank - _TC"}
)
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()
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": "_Test Bank - _TC", "amount": 109080}
)
si.append("payments", {"mode_of_payment": "Cash", "account": gl_account, "amount": 109080})
si.insert()
si.submit()

View File

@@ -0,0 +1,100 @@
// Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on("Bisect Accounting Statements", {
onload(frm) {
frm.trigger("render_heatmap");
},
refresh(frm) {
frm.add_custom_button(__("Bisect Left"), () => {
frm.trigger("bisect_left");
});
frm.add_custom_button(__("Bisect Right"), () => {
frm.trigger("bisect_right");
});
frm.add_custom_button(__("Up"), () => {
frm.trigger("move_up");
});
frm.add_custom_button(__("Build Tree"), () => {
frm.trigger("build_tree");
});
},
render_heatmap(frm) {
let bisect_heatmap = frm.get_field("bisect_heatmap").$wrapper;
bisect_heatmap.addClass("bisect_heatmap_location");
// milliseconds in a day
let msiad = 24 * 60 * 60 * 1000;
let datapoints = {};
let fr_dt = new Date(frm.doc.from_date).getTime();
let to_dt = new Date(frm.doc.to_date).getTime();
let bisect_start = new Date(frm.doc.current_from_date).getTime();
let bisect_end = new Date(frm.doc.current_to_date).getTime();
for (let x = fr_dt; x <= to_dt; x += msiad) {
let epoch_in_seconds = x / 1000;
if (bisect_start <= x && x <= bisect_end) {
datapoints[epoch_in_seconds] = 1.0;
} else {
datapoints[epoch_in_seconds] = 0.0;
}
}
new frappe.Chart(".bisect_heatmap_location", {
type: "heatmap",
data: {
dataPoints: datapoints,
start: new Date(frm.doc.from_date),
end: new Date(frm.doc.to_date),
},
countLabel: "Bisecting",
discreteDomains: 1,
});
},
bisect_left(frm) {
frm.call({
doc: frm.doc,
method: "bisect_left",
freeze: true,
freeze_message: __("Bisecting Left ..."),
callback: (r) => {
frm.trigger("render_heatmap");
},
});
},
bisect_right(frm) {
frm.call({
doc: frm.doc,
freeze: true,
freeze_message: __("Bisecting Right ..."),
method: "bisect_right",
callback: (r) => {
frm.trigger("render_heatmap");
},
});
},
move_up(frm) {
frm.call({
doc: frm.doc,
freeze: true,
freeze_message: __("Moving up in tree ..."),
method: "move_up",
callback: (r) => {
frm.trigger("render_heatmap");
},
});
},
build_tree(frm) {
frm.call({
doc: frm.doc,
freeze: true,
freeze_message: __("Rebuilding BTree for period ..."),
method: "build_tree",
callback: (r) => {
frm.trigger("render_heatmap");
},
});
},
});

View File

@@ -0,0 +1,194 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2023-09-15 21:28:28.054773",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"section_break_cvfg",
"company",
"column_break_hcam",
"from_date",
"column_break_qxbi",
"to_date",
"column_break_iwny",
"algorithm",
"section_break_8ph9",
"current_node",
"section_break_ngid",
"bisect_heatmap",
"section_break_hmsy",
"bisecting_from",
"current_from_date",
"column_break_uqyd",
"bisecting_to",
"current_to_date",
"section_break_hbyo",
"heading_cppb",
"p_l_summary",
"column_break_aivo",
"balance_sheet_summary",
"b_s_summary",
"column_break_gvwx",
"difference_heading",
"difference"
],
"fields": [
{
"fieldname": "column_break_qxbi",
"fieldtype": "Column Break"
},
{
"fieldname": "from_date",
"fieldtype": "Datetime",
"label": "From Date"
},
{
"fieldname": "to_date",
"fieldtype": "Datetime",
"label": "To Date"
},
{
"default": "BFS",
"fieldname": "algorithm",
"fieldtype": "Select",
"label": "Algorithm",
"options": "BFS\nDFS"
},
{
"fieldname": "column_break_iwny",
"fieldtype": "Column Break"
},
{
"fieldname": "current_node",
"fieldtype": "Link",
"label": "Current Node",
"options": "Bisect Nodes"
},
{
"fieldname": "section_break_hmsy",
"fieldtype": "Section Break"
},
{
"fieldname": "current_from_date",
"fieldtype": "Datetime",
"read_only": 1
},
{
"fieldname": "current_to_date",
"fieldtype": "Datetime",
"read_only": 1
},
{
"fieldname": "column_break_uqyd",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_hbyo",
"fieldtype": "Section Break"
},
{
"fieldname": "p_l_summary",
"fieldtype": "Float",
"read_only": 1
},
{
"fieldname": "b_s_summary",
"fieldtype": "Float",
"read_only": 1
},
{
"fieldname": "difference",
"fieldtype": "Float",
"read_only": 1
},
{
"fieldname": "column_break_aivo",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_gvwx",
"fieldtype": "Column Break"
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company"
},
{
"fieldname": "column_break_hcam",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_ngid",
"fieldtype": "Section Break"
},
{
"fieldname": "section_break_8ph9",
"fieldtype": "Section Break",
"hidden": 1
},
{
"fieldname": "bisect_heatmap",
"fieldtype": "HTML",
"label": "Heatmap"
},
{
"fieldname": "heading_cppb",
"fieldtype": "Heading",
"label": "Profit and Loss Summary"
},
{
"fieldname": "balance_sheet_summary",
"fieldtype": "Heading",
"label": "Balance Sheet Summary"
},
{
"fieldname": "difference_heading",
"fieldtype": "Heading",
"label": "Difference"
},
{
"fieldname": "bisecting_from",
"fieldtype": "Heading",
"label": "Bisecting From"
},
{
"fieldname": "bisecting_to",
"fieldtype": "Heading",
"label": "Bisecting To"
},
{
"fieldname": "section_break_cvfg",
"fieldtype": "Section Break"
}
],
"hide_toolbar": 1,
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2023-12-01 16:49:54.073890",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bisect Accounting Statements",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"role": "Administrator",
"share": 1,
"write": 1
}
],
"read_only": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@@ -0,0 +1,226 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import datetime
from collections import deque
from math import floor
import frappe
from dateutil.relativedelta import relativedelta
from frappe import _
from frappe.model.document import Document
from frappe.utils import getdate
from frappe.utils.data import guess_date_format
class BisectAccountingStatements(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
algorithm: DF.Literal["BFS", "DFS"]
b_s_summary: DF.Float
company: DF.Link | None
current_from_date: DF.Datetime | None
current_node: DF.Link | None
current_to_date: DF.Datetime | None
difference: DF.Float
from_date: DF.Datetime | None
p_l_summary: DF.Float
to_date: DF.Datetime | None
# end: auto-generated types
def validate(self):
self.validate_dates()
def validate_dates(self):
if getdate(self.from_date) > getdate(self.to_date):
frappe.throw(
_("From Date: {0} cannot be greater than To date: {1}").format(
frappe.bold(self.from_date), frappe.bold(self.to_date)
)
)
def bfs(self, from_date: datetime, to_date: datetime):
# Make Root node
node = frappe.new_doc("Bisect Nodes")
node.root = None
node.period_from_date = from_date
node.period_to_date = to_date
node.insert()
period_queue = deque([node])
while period_queue:
cur_node = period_queue.popleft()
delta = cur_node.period_to_date - cur_node.period_from_date
if delta.days == 0:
continue
else:
cur_floor = floor(delta.days / 2)
next_to_date = cur_node.period_from_date + relativedelta(days=+cur_floor)
left_node = frappe.new_doc("Bisect Nodes")
left_node.period_from_date = cur_node.period_from_date
left_node.period_to_date = next_to_date
left_node.root = cur_node.name
left_node.generated = False
left_node.insert()
cur_node.left_child = left_node.name
period_queue.append(left_node)
next_from_date = cur_node.period_from_date + relativedelta(days=+(cur_floor + 1))
right_node = frappe.new_doc("Bisect Nodes")
right_node.period_from_date = next_from_date
right_node.period_to_date = cur_node.period_to_date
right_node.root = cur_node.name
right_node.generated = False
right_node.insert()
cur_node.right_child = right_node.name
period_queue.append(right_node)
cur_node.save()
def dfs(self, from_date: datetime, to_date: datetime):
# Make Root node
node = frappe.new_doc("Bisect Nodes")
node.root = None
node.period_from_date = from_date
node.period_to_date = to_date
node.insert()
period_stack = [node]
while period_stack:
cur_node = period_stack.pop()
delta = cur_node.period_to_date - cur_node.period_from_date
if delta.days == 0:
continue
else:
cur_floor = floor(delta.days / 2)
next_to_date = cur_node.period_from_date + relativedelta(days=+cur_floor)
left_node = frappe.new_doc("Bisect Nodes")
left_node.period_from_date = cur_node.period_from_date
left_node.period_to_date = next_to_date
left_node.root = cur_node.name
left_node.generated = False
left_node.insert()
cur_node.left_child = left_node.name
period_stack.append(left_node)
next_from_date = cur_node.period_from_date + relativedelta(days=+(cur_floor + 1))
right_node = frappe.new_doc("Bisect Nodes")
right_node.period_from_date = next_from_date
right_node.period_to_date = cur_node.period_to_date
right_node.root = cur_node.name
right_node.generated = False
right_node.insert()
cur_node.right_child = right_node.name
period_stack.append(right_node)
cur_node.save()
@frappe.whitelist()
def build_tree(self):
frappe.db.delete("Bisect Nodes")
# Convert str to datetime format
dt_format = guess_date_format(self.from_date)
from_date = datetime.datetime.strptime(self.from_date, dt_format)
to_date = datetime.datetime.strptime(self.to_date, dt_format)
if self.algorithm == "BFS":
self.bfs(from_date, to_date)
if self.algorithm == "DFS":
self.dfs(from_date, to_date)
# set root as current node
root = frappe.db.get_all("Bisect Nodes", filters={"root": ["is", "not set"]})[0]
self.get_report_summary()
self.current_node = root.name
self.current_from_date = self.from_date
self.current_to_date = self.to_date
self.save()
def get_report_summary(self):
filters = {
"company": self.company,
"filter_based_on": "Date Range",
"period_start_date": self.current_from_date,
"period_end_date": self.current_to_date,
"periodicity": "Yearly",
}
pl_summary = frappe.get_doc("Report", "Profit and Loss Statement")
self.p_l_summary = pl_summary.execute_script_report(filters=filters)[5]
bs_summary = frappe.get_doc("Report", "Balance Sheet")
self.b_s_summary = bs_summary.execute_script_report(filters=filters)[5]
self.difference = abs(self.p_l_summary - self.b_s_summary)
def update_node(self):
current_node = frappe.get_doc("Bisect Nodes", self.current_node)
current_node.balance_sheet_summary = self.b_s_summary
current_node.profit_loss_summary = self.p_l_summary
current_node.difference = self.difference
current_node.generated = True
current_node.save()
def current_node_has_summary_info(self):
"Assertion method"
return frappe.db.get_value("Bisect Nodes", self.current_node, "generated")
def fetch_summary_info_from_current_node(self):
current_node = frappe.get_doc("Bisect Nodes", self.current_node)
self.p_l_summary = current_node.balance_sheet_summary
self.b_s_summary = current_node.profit_loss_summary
self.difference = abs(self.p_l_summary - self.b_s_summary)
def fetch_or_calculate(self):
if self.current_node_has_summary_info():
self.fetch_summary_info_from_current_node()
else:
self.get_report_summary()
self.update_node()
@frappe.whitelist()
def bisect_left(self):
if self.current_node is not None:
cur_node = frappe.get_doc("Bisect Nodes", self.current_node)
if cur_node.left_child is not None:
lft_node = frappe.get_doc("Bisect Nodes", cur_node.left_child)
self.current_node = cur_node.left_child
self.current_from_date = lft_node.period_from_date
self.current_to_date = lft_node.period_to_date
self.fetch_or_calculate()
self.save()
else:
frappe.msgprint(_("No more children on Left"))
@frappe.whitelist()
def bisect_right(self):
if self.current_node is not None:
cur_node = frappe.get_doc("Bisect Nodes", self.current_node)
if cur_node.right_child is not None:
rgt_node = frappe.get_doc("Bisect Nodes", cur_node.right_child)
self.current_node = cur_node.right_child
self.current_from_date = rgt_node.period_from_date
self.current_to_date = rgt_node.period_to_date
self.fetch_or_calculate()
self.save()
else:
frappe.msgprint(_("No more children on Right"))
@frappe.whitelist()
def move_up(self):
if self.current_node is not None:
cur_node = frappe.get_doc("Bisect Nodes", self.current_node)
if cur_node.root is not None:
root = frappe.get_doc("Bisect Nodes", cur_node.root)
self.current_node = cur_node.root
self.current_from_date = root.period_from_date
self.current_to_date = root.period_to_date
self.fetch_or_calculate()
self.save()
else:
frappe.msgprint(_("Reached Root"))

View File

@@ -0,0 +1,9 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestBisectAccountingStatements(FrappeTestCase):
pass

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Bisect Nodes", {
// refresh(frm) {
// },
// });

View File

@@ -0,0 +1,97 @@
{
"actions": [],
"autoname": "autoincrement",
"creation": "2023-09-27 14:56:38.112462",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"root",
"left_child",
"right_child",
"period_from_date",
"period_to_date",
"difference",
"balance_sheet_summary",
"profit_loss_summary",
"generated"
],
"fields": [
{
"fieldname": "root",
"fieldtype": "Link",
"label": "Root",
"options": "Bisect Nodes"
},
{
"fieldname": "left_child",
"fieldtype": "Link",
"label": "Left Child",
"options": "Bisect Nodes"
},
{
"fieldname": "right_child",
"fieldtype": "Link",
"label": "Right Child",
"options": "Bisect Nodes"
},
{
"fieldname": "period_from_date",
"fieldtype": "Datetime",
"label": "Period_from_date"
},
{
"fieldname": "period_to_date",
"fieldtype": "Datetime",
"label": "Period To Date"
},
{
"fieldname": "difference",
"fieldtype": "Float",
"label": "Difference"
},
{
"fieldname": "balance_sheet_summary",
"fieldtype": "Float",
"label": "Balance Sheet Summary"
},
{
"fieldname": "profit_loss_summary",
"fieldtype": "Float",
"label": "Profit and Loss Summary"
},
{
"default": "0",
"fieldname": "generated",
"fieldtype": "Check",
"label": "Generated"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-12-01 17:46:12.437996",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bisect Nodes",
"naming_rule": "Autoincrement",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Administrator",
"share": 1,
"write": 1
}
],
"read_only": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@@ -0,0 +1,29 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class BisectNodes(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
balance_sheet_summary: DF.Float
difference: DF.Float
generated: DF.Check
left_child: DF.Link | None
name: DF.Int | None
period_from_date: DF.Datetime | None
period_to_date: DF.Datetime | None
profit_loss_summary: DF.Float
right_child: DF.Link | None
root: DF.Link | None
# end: auto-generated types
pass

View File

@@ -0,0 +1,9 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestBisectNodes(FrappeTestCase):
pass

View File

@@ -2,48 +2,48 @@
// For license information, please see license.txt
frappe.provide("erpnext.accounts.dimensions");
frappe.ui.form.on('Budget', {
onload: function(frm) {
frm.set_query("account", "accounts", function() {
frappe.ui.form.on("Budget", {
onload: function (frm) {
frm.set_query("account", "accounts", function () {
return {
filters: {
company: frm.doc.company,
report_type: "Profit and Loss",
is_group: 0
}
is_group: 0,
},
};
});
frm.set_query("monthly_distribution", function() {
frm.set_query("monthly_distribution", function () {
return {
filters: {
fiscal_year: frm.doc.fiscal_year
}
fiscal_year: frm.doc.fiscal_year,
},
};
});
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
},
refresh: function(frm) {
frm.trigger("toggle_reqd_fields")
refresh: function (frm) {
frm.trigger("toggle_reqd_fields");
},
budget_against: function(frm) {
frm.trigger("set_null_value")
frm.trigger("toggle_reqd_fields")
budget_against: function (frm) {
frm.trigger("set_null_value");
frm.trigger("toggle_reqd_fields");
},
set_null_value: function(frm) {
if(frm.doc.budget_against == 'Cost Center') {
frm.set_value('project', null)
set_null_value: function (frm) {
if (frm.doc.budget_against == "Cost Center") {
frm.set_value("project", null);
} else {
frm.set_value('cost_center', null)
frm.set_value("cost_center", null);
}
},
toggle_reqd_fields: function(frm) {
frm.toggle_reqd("cost_center", frm.doc.budget_against=="Cost Center");
frm.toggle_reqd("project", frm.doc.budget_against=="Project");
}
toggle_reqd_fields: function (frm) {
frm.toggle_reqd("cost_center", frm.doc.budget_against == "Cost Center");
frm.toggle_reqd("project", frm.doc.budget_against == "Project");
},
});

View File

@@ -70,10 +70,11 @@ class Budget(Document):
select
b.name, ba.account from `tabBudget` b, `tabBudget Account` ba
where
ba.parent = b.name and b.docstatus < 2 and b.company = %s and %s=%s and
b.fiscal_year=%s and b.name != %s and ba.account in (%s) """
% ("%s", budget_against_field, "%s", "%s", "%s", ",".join(["%s"] * len(accounts))),
(self.company, budget_against, self.fiscal_year, self.name) + tuple(accounts),
ba.parent = b.name and b.docstatus < 2 and b.company = {} and {}={} and
b.fiscal_year={} and b.name != {} and ba.account in ({}) """.format(
"%s", budget_against_field, "%s", "%s", "%s", ",".join(["%s"] * len(accounts))
),
(self.company, budget_against, self.fiscal_year, self.name, *tuple(accounts)),
as_dict=1,
)
@@ -96,12 +97,14 @@ class Budget(Document):
if account_details.is_group:
frappe.throw(_("Budget cannot be assigned against Group Account {0}").format(d.account))
elif account_details.company != self.company:
frappe.throw(_("Account {0} does not belongs to company {1}").format(d.account, self.company))
frappe.throw(
_("Account {0} does not belongs to company {1}").format(d.account, self.company)
)
elif account_details.report_type != "Profit and Loss":
frappe.throw(
_("Budget cannot be assigned against {0}, as it's not an Income or Expense account").format(
d.account
)
_(
"Budget cannot be assigned against {0}, as it's not an Income or Expense account"
).format(d.account)
)
if d.account in account_list:
@@ -174,30 +177,24 @@ def validate_expense_against_budget(args, expense_amount=0):
and args.account
and frappe.db.get_value("Account", {"name": args.account, "root_type": "Expense"})
):
doctype = dimension.get("document_type")
if frappe.get_cached_value("DocType", doctype, "is_tree"):
lft, rgt = frappe.db.get_value(doctype, args.get(budget_against), ["lft", "rgt"])
condition = """and exists(select name from `tab%s`
where lft<=%s and rgt>=%s and name=b.%s)""" % (
doctype,
lft,
rgt,
budget_against,
) # nosec
condition = f"""and exists(select name from `tab{doctype}`
where lft<={lft} and rgt>={rgt} and name=b.{budget_against})""" # nosec
args.is_tree = True
else:
condition = "and b.%s=%s" % (budget_against, frappe.db.escape(args.get(budget_against)))
condition = f"and b.{budget_against}={frappe.db.escape(args.get(budget_against))}"
args.is_tree = False
args.budget_against_field = budget_against
args.budget_against_doctype = doctype
budget_records = frappe.db.sql(
"""
f"""
select
b.{budget_against_field} as budget_against, ba.budget_amount, b.monthly_distribution,
b.{budget_against} as budget_against, ba.budget_amount, b.monthly_distribution,
ifnull(b.applicable_on_material_request, 0) as for_material_request,
ifnull(applicable_on_purchase_order, 0) as for_purchase_order,
ifnull(applicable_on_booking_actual_expenses,0) as for_actual_expenses,
@@ -210,9 +207,7 @@ def validate_expense_against_budget(args, expense_amount=0):
b.name=ba.parent and b.fiscal_year=%s
and ba.account=%s and b.docstatus=1
{condition}
""".format(
condition=condition, budget_against_field=budget_against
),
""",
(args.fiscal_year, args.account),
as_dict=True,
) # nosec
@@ -224,12 +219,18 @@ def validate_expense_against_budget(args, expense_amount=0):
def validate_budget_records(args, budget_records, expense_amount):
for budget in budget_records:
if flt(budget.budget_amount):
amount = expense_amount or get_amount(args, budget)
yearly_action, monthly_action = get_actions(args, budget)
args["for_material_request"] = budget.for_material_request
args["for_purchase_order"] = budget.for_purchase_order
if yearly_action in ("Stop", "Warn"):
compare_expense_with_budget(
args, flt(budget.budget_amount), _("Annual"), yearly_action, budget.budget_against, amount
args,
flt(budget.budget_amount),
_("Annual"),
yearly_action,
budget.budget_against,
expense_amount,
)
if monthly_action in ["Stop", "Warn"]:
@@ -240,18 +241,32 @@ def validate_budget_records(args, budget_records, expense_amount):
args["month_end_date"] = get_last_day(args.posting_date)
compare_expense_with_budget(
args, budget_amount, _("Accumulated Monthly"), monthly_action, budget.budget_against, amount
args,
budget_amount,
_("Accumulated Monthly"),
monthly_action,
budget.budget_against,
expense_amount,
)
def compare_expense_with_budget(args, budget_amount, action_for, action, budget_against, amount=0):
actual_expense = get_actual_expense(args)
total_expense = actual_expense + amount
args.actual_expense, args.requested_amount, args.ordered_amount = get_actual_expense(args), 0, 0
if not amount:
args.requested_amount, args.ordered_amount = get_requested_amount(args), get_ordered_amount(args)
if args.get("doctype") == "Material Request" and args.for_material_request:
amount = args.requested_amount + args.ordered_amount
elif args.get("doctype") == "Purchase Order" and args.for_purchase_order:
amount = args.ordered_amount
total_expense = args.actual_expense + amount
if total_expense > budget_amount:
if actual_expense > budget_amount:
if args.actual_expense > budget_amount:
error_tense = _("is already")
diff = actual_expense - budget_amount
diff = args.actual_expense - budget_amount
else:
error_tense = _("will be")
diff = total_expense - budget_amount
@@ -268,9 +283,10 @@ def compare_expense_with_budget(args, budget_amount, action_for, action, budget_
frappe.bold(fmt_money(diff, currency=currency)),
)
if (
frappe.flags.exception_approver_role
and frappe.flags.exception_approver_role in frappe.get_roles(frappe.session.user)
msg += get_expense_breakup(args, currency, budget_against)
if frappe.flags.exception_approver_role and frappe.flags.exception_approver_role in frappe.get_roles(
frappe.session.user
):
action = "Warn"
@@ -280,6 +296,83 @@ def compare_expense_with_budget(args, budget_amount, action_for, action, budget_
frappe.msgprint(msg, indicator="orange", title=_("Budget Exceeded"))
def get_expense_breakup(args, currency, budget_against):
msg = "<hr>Total Expenses booked through - <ul>"
common_filters = frappe._dict(
{
args.budget_against_field: budget_against,
"account": args.account,
"company": args.company,
}
)
msg += (
"<li>"
+ frappe.utils.get_link_to_report(
"General Ledger",
label="Actual Expenses",
filters=common_filters.copy().update(
{
"from_date": frappe.get_cached_value("Fiscal Year", args.fiscal_year, "year_start_date"),
"to_date": frappe.get_cached_value("Fiscal Year", args.fiscal_year, "year_end_date"),
"is_cancelled": 0,
}
),
)
+ " - "
+ frappe.bold(fmt_money(args.actual_expense, currency=currency))
+ "</li>"
)
msg += (
"<li>"
+ frappe.utils.get_link_to_report(
"Material Request",
label="Material Requests",
report_type="Report Builder",
doctype="Material Request",
filters=common_filters.copy().update(
{
"status": [["!=", "Stopped"]],
"docstatus": 1,
"material_request_type": "Purchase",
"schedule_date": [["fiscal year", "2023-2024"]],
"item_code": args.item_code,
"per_ordered": [["<", 100]],
}
),
)
+ " - "
+ frappe.bold(fmt_money(args.requested_amount, currency=currency))
+ "</li>"
)
msg += (
"<li>"
+ frappe.utils.get_link_to_report(
"Purchase Order",
label="Unbilled Orders",
report_type="Report Builder",
doctype="Purchase Order",
filters=common_filters.copy().update(
{
"status": [["!=", "Closed"]],
"docstatus": 1,
"transaction_date": [["fiscal year", "2023-2024"]],
"item_code": args.item_code,
"per_billed": [["<", 100]],
}
),
)
+ " - "
+ frappe.bold(fmt_money(args.ordered_amount, currency=currency))
+ "</li></ul>"
)
return msg
def get_actions(args, budget):
yearly_action = budget.action_if_annual_budget_exceeded
monthly_action = budget.action_if_accumulated_monthly_budget_exceeded
@@ -295,31 +388,15 @@ def get_actions(args, budget):
return yearly_action, monthly_action
def get_amount(args, budget):
amount = 0
if args.get("doctype") == "Material Request" and budget.for_material_request:
amount = (
get_requested_amount(args, budget) + get_ordered_amount(args, budget) + get_actual_expense(args)
)
elif args.get("doctype") == "Purchase Order" and budget.for_purchase_order:
amount = get_ordered_amount(args, budget) + get_actual_expense(args)
return amount
def get_requested_amount(args, budget):
def get_requested_amount(args):
item_code = args.get("item_code")
condition = get_other_condition(args, budget, "Material Request")
condition = get_other_condition(args, "Material Request")
data = frappe.db.sql(
""" select ifnull((sum(child.stock_qty - child.ordered_qty) * rate), 0) as amount
from `tabMaterial Request Item` child, `tabMaterial Request` parent where parent.name = child.parent and
child.item_code = %s and parent.docstatus = 1 and child.stock_qty > child.ordered_qty and {0} and
parent.material_request_type = 'Purchase' and parent.status != 'Stopped'""".format(
condition
),
child.item_code = %s and parent.docstatus = 1 and child.stock_qty > child.ordered_qty and {} and
parent.material_request_type = 'Purchase' and parent.status != 'Stopped'""".format(condition),
item_code,
as_list=1,
)
@@ -327,17 +404,15 @@ def get_requested_amount(args, budget):
return data[0][0] if data else 0
def get_ordered_amount(args, budget):
def get_ordered_amount(args):
item_code = args.get("item_code")
condition = get_other_condition(args, budget, "Purchase Order")
condition = get_other_condition(args, "Purchase Order")
data = frappe.db.sql(
""" select ifnull(sum(child.amount - child.billed_amt), 0) as amount
f""" select ifnull(sum(child.amount - child.billed_amt), 0) as amount
from `tabPurchase Order Item` child, `tabPurchase Order` parent where
parent.name = child.parent and child.item_code = %s and parent.docstatus = 1 and child.amount > child.billed_amt
and parent.status != 'Closed' and {0}""".format(
condition
),
and parent.status != 'Closed' and {condition}""",
item_code,
as_list=1,
)
@@ -345,12 +420,12 @@ def get_ordered_amount(args, budget):
return data[0][0] if data else 0
def get_other_condition(args, budget, for_doc):
def get_other_condition(args, for_doc):
condition = "expense_account = '%s'" % (args.expense_account)
budget_against_field = args.get("budget_against_field")
if budget_against_field and args.get(budget_against_field):
condition += " and child.%s = '%s'" % (budget_against_field, args.get(budget_against_field))
condition += f" and child.{budget_against_field} = '{args.get(budget_against_field)}'"
if args.get("fiscal_year"):
date_field = "schedule_date" if for_doc == "Material Request" else "transaction_date"
@@ -358,12 +433,8 @@ def get_other_condition(args, budget, for_doc):
"Fiscal Year", args.get("fiscal_year"), ["year_start_date", "year_end_date"]
)
condition += """ and parent.%s
between '%s' and '%s' """ % (
date_field,
start_date,
end_date,
)
condition += f""" and parent.{date_field}
between '{start_date}' and '{end_date}' """
return condition
@@ -382,21 +453,17 @@ def get_actual_expense(args):
args.update(lft_rgt)
condition2 = """and exists(select name from `tab{doctype}`
condition2 = f"""and exists(select name from `tab{args.budget_against_doctype}`
where lft>=%(lft)s and rgt<=%(rgt)s
and name=gle.{budget_against_field})""".format(
doctype=args.budget_against_doctype, budget_against_field=budget_against_field # nosec
)
and name=gle.{budget_against_field})"""
else:
condition2 = """and exists(select name from `tab{doctype}`
where name=gle.{budget_against} and
gle.{budget_against} = %({budget_against})s)""".format(
doctype=args.budget_against_doctype, budget_against=budget_against_field
)
condition2 = f"""and exists(select name from `tab{args.budget_against_doctype}`
where name=gle.{budget_against_field} and
gle.{budget_against_field} = %({budget_against_field})s)"""
amount = flt(
frappe.db.sql(
"""
f"""
select sum(gle.debit) - sum(gle.credit)
from `tabGL Entry` gle
where
@@ -407,9 +474,7 @@ def get_actual_expense(args):
and gle.company=%(company)s
and gle.docstatus=1
{condition2}
""".format(
condition1=condition1, condition2=condition2
),
""",
(args),
)[0][0]
) # nosec

View File

@@ -41,9 +41,7 @@ class TestBudget(unittest.TestCase):
budget = make_budget(budget_against="Cost Center")
frappe.db.set_value(
"Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop"
)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
@@ -63,9 +61,7 @@ class TestBudget(unittest.TestCase):
budget = make_budget(budget_against="Cost Center")
frappe.db.set_value(
"Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop"
)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
@@ -97,9 +93,7 @@ class TestBudget(unittest.TestCase):
)
fiscal_year = get_fiscal_year(nowdate())[0]
frappe.db.set_value(
"Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop"
)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
frappe.db.set_value("Budget", budget.name, "fiscal_year", fiscal_year)
mr = frappe.get_doc(
@@ -138,9 +132,7 @@ class TestBudget(unittest.TestCase):
)
fiscal_year = get_fiscal_year(nowdate())[0]
frappe.db.set_value(
"Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop"
)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
frappe.db.set_value("Budget", budget.name, "fiscal_year", fiscal_year)
po = create_purchase_order(transaction_date=nowdate(), do_not_submit=True)
@@ -158,9 +150,7 @@ class TestBudget(unittest.TestCase):
budget = make_budget(budget_against="Project")
frappe.db.set_value(
"Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop"
)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
project = frappe.get_value("Project", {"project_name": "_Test Project"})
@@ -223,7 +213,7 @@ class TestBudget(unittest.TestCase):
if month > 9:
month = 9
for i in range(month + 1):
for _i in range(month + 1):
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC",
@@ -237,9 +227,7 @@ class TestBudget(unittest.TestCase):
frappe.db.get_value("GL Entry", {"voucher_type": "Journal Entry", "voucher_no": jv.name})
)
frappe.db.set_value(
"Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop"
)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
self.assertRaises(BudgetError, jv.cancel)
@@ -255,7 +243,7 @@ class TestBudget(unittest.TestCase):
month = 9
project = frappe.get_value("Project", {"project_name": "_Test Project"})
for i in range(month + 1):
for _i in range(month + 1):
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC",
@@ -270,9 +258,7 @@ class TestBudget(unittest.TestCase):
frappe.db.get_value("GL Entry", {"voucher_type": "Journal Entry", "voucher_no": jv.name})
)
frappe.db.set_value(
"Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop"
)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
self.assertRaises(BudgetError, jv.cancel)
@@ -284,9 +270,7 @@ class TestBudget(unittest.TestCase):
set_total_expense_zero(nowdate(), "cost_center", "_Test Cost Center 2 - _TC")
budget = make_budget(budget_against="Cost Center", cost_center="_Test Company - _TC")
frappe.db.set_value(
"Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop"
)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
@@ -316,9 +300,7 @@ class TestBudget(unittest.TestCase):
).insert(ignore_permissions=True)
budget = make_budget(budget_against="Cost Center", cost_center=cost_center)
frappe.db.set_value(
"Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop"
)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
@@ -423,13 +405,11 @@ def make_budget(**args):
fiscal_year = get_fiscal_year(nowdate())[0]
if budget_against == "Project":
project_name = "{0}%".format("_Test Project/" + fiscal_year)
project_name = "{}%".format("_Test Project/" + fiscal_year)
budget_list = frappe.get_all("Budget", fields=["name"], filters={"name": ("like", project_name)})
else:
cost_center_name = "{0}%".format(cost_center or "_Test Cost Center - _TC/" + fiscal_year)
budget_list = frappe.get_all(
"Budget", fields=["name"], filters={"name": ("like", cost_center_name)}
)
cost_center_name = "{}%".format(cost_center or "_Test Cost Center - _TC/" + fiscal_year)
budget_list = frappe.get_all("Budget", fields=["name"], filters={"name": ("like", cost_center_name)})
for d in budget_list:
frappe.db.sql("delete from `tabBudget` where name = %(name)s", d)
frappe.db.sql("delete from `tabBudget Account` where parent = %(name)s", d)
@@ -451,24 +431,18 @@ def make_budget(**args):
budget.action_if_annual_budget_exceeded = "Stop"
budget.action_if_accumulated_monthly_budget_exceeded = "Ignore"
budget.budget_against = budget_against
budget.append(
"accounts", {"account": "_Test Account Cost for Goods Sold - _TC", "budget_amount": 200000}
)
budget.append("accounts", {"account": "_Test Account Cost for Goods Sold - _TC", "budget_amount": 200000})
if args.applicable_on_material_request:
budget.applicable_on_material_request = 1
budget.action_if_annual_budget_exceeded_on_mr = (
args.action_if_annual_budget_exceeded_on_mr or "Warn"
)
budget.action_if_annual_budget_exceeded_on_mr = args.action_if_annual_budget_exceeded_on_mr or "Warn"
budget.action_if_accumulated_monthly_budget_exceeded_on_mr = (
args.action_if_accumulated_monthly_budget_exceeded_on_mr or "Warn"
)
if args.applicable_on_purchase_order:
budget.applicable_on_purchase_order = 1
budget.action_if_annual_budget_exceeded_on_po = (
args.action_if_annual_budget_exceeded_on_po or "Warn"
)
budget.action_if_annual_budget_exceeded_on_po = args.action_if_annual_budget_exceeded_on_po or "Warn"
budget.action_if_accumulated_monthly_budget_exceeded_on_po = (
args.action_if_accumulated_monthly_budget_exceeded_on_po or "Warn"
)

View File

@@ -1,11 +1,10 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.ui.form.on('Cashier Closing', {
setup: function(frm){
frappe.ui.form.on("Cashier Closing", {
setup: function (frm) {
if (frm.doc.user == "" || frm.doc.user == null) {
frm.doc.user = frappe.session.user;
}
}
},
});

View File

@@ -1,4 +1,4 @@
frappe.ui.form.on('Chart of Accounts Importer', {
frappe.ui.form.on("Chart of Accounts Importer", {
onload: function (frm) {
frm.set_value("company", "");
frm.set_value("import_file", "");
@@ -8,31 +8,34 @@ frappe.ui.form.on('Chart of Accounts Importer', {
frm.disable_save();
// make company mandatory
frm.set_df_property('company', 'reqd', frm.doc.company ? 0 : 1);
frm.set_df_property('import_file_section', 'hidden', frm.doc.company ? 0 : 1);
frm.set_df_property("company", "reqd", frm.doc.company ? 0 : 1);
frm.set_df_property("import_file_section", "hidden", frm.doc.company ? 0 : 1);
if (frm.doc.import_file) {
frappe.run_serially([
() => generate_tree_preview(frm),
() => create_import_button(frm),
() => frm.set_df_property('chart_preview', 'hidden', 0)
() => frm.set_df_property("chart_preview", "hidden", 0),
]);
}
frm.set_df_property('chart_preview', 'hidden',
$(frm.fields_dict['chart_tree'].wrapper).html()!="" ? 0 : 1);
frm.set_df_property(
"chart_preview",
"hidden",
$(frm.fields_dict["chart_tree"].wrapper).html() != "" ? 0 : 1
);
},
download_template: function(frm) {
download_template: function (frm) {
var d = new frappe.ui.Dialog({
title: __("Download Template"),
fields: [
{
label : "File Type",
label: "File Type",
fieldname: "file_type",
fieldtype: "Select",
reqd: 1,
options: ["Excel", "CSV"]
options: ["Excel", "CSV"],
},
{
label: "Template Type",
@@ -41,21 +44,27 @@ frappe.ui.form.on('Chart of Accounts Importer', {
reqd: 1,
options: ["Sample Template", "Blank Template"],
change: () => {
let template_type = d.get_value('template_type');
let template_type = d.get_value("template_type");
if (template_type === "Sample Template") {
d.set_df_property('template_type', 'description',
d.set_df_property(
"template_type",
"description",
`The Sample Template contains all the required accounts pre filled in the template.
You can add more accounts or change existing accounts in the template as per your choice.`);
You can add more accounts or change existing accounts in the template as per your choice.`
);
} else {
d.set_df_property('template_type', 'description',
d.set_df_property(
"template_type",
"description",
`The Blank Template contains just the account type and root type required to build the Chart
of Accounts. Please enter the account names and add more rows as per your requirement.`);
of Accounts. Please enter the account names and add more rows as per your requirement.`
);
}
}
},
},
{
label : "Company",
label: "Company",
fieldname: "company",
fieldtype: "Link",
reqd: 1,
@@ -63,25 +72,25 @@ frappe.ui.form.on('Chart of Accounts Importer', {
default: frm.doc.company,
},
],
primary_action: function() {
primary_action: function () {
let data = d.get_values();
if (!data.template_type) {
frappe.throw(__('Please select <b>Template Type</b> to download template'));
frappe.throw(__("Please select <b>Template Type</b> to download template"));
}
open_url_post(
'/api/method/erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.download_template',
"/api/method/erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.download_template",
{
file_type: data.file_type,
template_type: data.template_type,
company: data.company
company: data.company,
}
);
d.hide();
},
primary_action_label: __('Download')
primary_action_label: __("Download"),
});
d.show();
},
@@ -89,7 +98,7 @@ frappe.ui.form.on('Chart of Accounts Importer', {
import_file: function (frm) {
if (!frm.doc.import_file) {
frm.page.set_indicator("");
$(frm.fields_dict['chart_tree'].wrapper).empty(); // empty wrapper on removing file
$(frm.fields_dict["chart_tree"].wrapper).empty(); // empty wrapper on removing file
}
},
@@ -99,89 +108,97 @@ frappe.ui.form.on('Chart of Accounts Importer', {
frappe.call({
method: "erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.validate_company",
args: {
company: frm.doc.company
company: frm.doc.company,
},
callback: function(r) {
if(r.message===false) {
callback: function (r) {
if (r.message === false) {
frm.set_value("company", "");
frappe.throw(__("Transactions against the Company already exist! Chart of Accounts can only be imported for a Company with no transactions."));
frappe.throw(
__(
"Transactions against the Company already exist! Chart of Accounts can only be imported for a Company with no transactions."
)
);
} else {
frm.trigger("refresh");
}
}
},
});
}
}
},
});
var create_import_button = function(frm) {
frm.page.set_primary_action(__("Import"), function () {
var create_import_button = function (frm) {
frm.page
.set_primary_action(__("Import"), function () {
return frappe.call({
method: "erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.import_coa",
args: {
file_name: frm.doc.import_file,
company: frm.doc.company,
},
freeze: true,
freeze_message: __("Creating Accounts..."),
callback: function (r) {
if (!r.exc) {
clearInterval(frm.page["interval"]);
frm.page.set_indicator(__("Import Successful"), "blue");
create_reset_button(frm);
}
},
});
})
.addClass("btn btn-primary");
};
var create_reset_button = function (frm) {
frm.page
.set_primary_action(__("Reset"), function () {
frm.page.clear_primary_action();
delete frm.page["show_import_button"];
frm.reload_doc();
})
.addClass("btn btn-primary");
};
var validate_coa = function (frm) {
if (frm.doc.import_file) {
let parent = __("All Accounts");
return frappe.call({
method: "erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.import_coa",
method: "erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.get_coa",
args: {
file_name: frm.doc.import_file,
company: frm.doc.company
},
freeze: true,
freeze_message: __("Creating Accounts..."),
callback: function(r) {
if (!r.exc) {
clearInterval(frm.page["interval"]);
frm.page.set_indicator(__('Import Successful'), 'blue');
create_reset_button(frm);
}
}
});
}).addClass('btn btn-primary');
};
var create_reset_button = function(frm) {
frm.page.set_primary_action(__("Reset"), function () {
frm.page.clear_primary_action();
delete frm.page["show_import_button"];
frm.reload_doc();
}).addClass('btn btn-primary');
};
var validate_coa = function(frm) {
if (frm.doc.import_file) {
let parent = __('All Accounts');
return frappe.call({
'method': 'erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.get_coa',
'args': {
file_name: frm.doc.import_file,
parent: parent,
doctype: 'Chart of Accounts Importer',
doctype: "Chart of Accounts Importer",
file_type: frm.doc.file_type,
for_validate: 1
for_validate: 1,
},
callback: function(r) {
if (r.message['show_import_button']) {
frm.page['show_import_button'] = Boolean(r.message['show_import_button']);
callback: function (r) {
if (r.message["show_import_button"]) {
frm.page["show_import_button"] = Boolean(r.message["show_import_button"]);
}
}
},
});
}
};
var generate_tree_preview = function(frm) {
let parent = __('All Accounts');
$(frm.fields_dict['chart_tree'].wrapper).empty(); // empty wrapper to load new data
var generate_tree_preview = function (frm) {
let parent = __("All Accounts");
$(frm.fields_dict["chart_tree"].wrapper).empty(); // empty wrapper to load new data
// generate tree structure based on the csv data
return new frappe.ui.Tree({
parent: $(frm.fields_dict['chart_tree'].wrapper),
parent: $(frm.fields_dict["chart_tree"].wrapper),
label: parent,
expandable: true,
method: 'erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.get_coa',
method: "erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.get_coa",
args: {
file_name: frm.doc.import_file,
parent: parent,
doctype: 'Chart of Accounts Importer',
file_type: frm.doc.file_type
doctype: "Chart of Accounts Importer",
file_type: frm.doc.file_type,
},
onclick: function(node) {
onclick: function (node) {
parent = node.value;
}
},
});
};

View File

@@ -38,9 +38,7 @@ class ChartofAccountsImporter(Document):
def validate(self):
if self.import_file:
get_coa(
"Chart of Accounts Importer", "All Accounts", file_name=self.import_file, for_validate=1
)
get_coa("Chart of Accounts Importer", "All Accounts", file_name=self.import_file, for_validate=1)
def validate_columns(data):
@@ -116,7 +114,7 @@ def generate_data_from_csv(file_doc, as_dict=False):
file_path = file_doc.get_full_path()
data = []
with open(file_path, "r") as in_file:
with open(file_path) as in_file:
csv_reader = list(csv.reader(in_file))
headers = csv_reader[0]
del csv_reader[0] # delete top row and headers row
@@ -215,10 +213,10 @@ def build_forest(data):
for row in data:
account_name, parent_account, account_number, parent_account_number = row[0:4]
if account_number:
account_name = "{} - {}".format(account_number, account_name)
account_name = f"{account_number} - {account_name}"
if parent_account_number:
parent_account_number = cstr(parent_account_number).strip()
parent_account = "{} - {}".format(parent_account_number, parent_account)
parent_account = f"{parent_account_number} - {parent_account}"
if parent_account == account_name == child:
return [parent_account]
@@ -230,7 +228,7 @@ def build_forest(data):
frappe.bold(parent_account)
)
)
return [child] + parent_account_list
return [child, *parent_account_list]
charts_map, paths = {}, []
@@ -250,12 +248,12 @@ def build_forest(data):
) = i
if not account_name:
error_messages.append("Row {0}: Please enter Account Name".format(line_no))
error_messages.append(f"Row {line_no}: Please enter Account Name")
name = account_name
if account_number:
account_number = cstr(account_number).strip()
account_name = "{} - {}".format(account_number, account_name)
account_name = f"{account_number} - {account_name}"
charts_map[account_name] = {}
charts_map[account_name]["account_name"] = name
@@ -352,9 +350,9 @@ def get_template(template_type, company):
def get_sample_template(writer, company):
currency = frappe.db.get_value("Company", company, "default_currency")
with open(os.path.join(os.path.dirname(__file__), "coa_sample_template.csv"), "r") as f:
with open(os.path.join(os.path.dirname(__file__), "coa_sample_template.csv")) as f:
for row in f:
row = row.strip().split(",") + [currency]
row = [*row.strip().split(","), currency]
writer.writerow(row)
return writer
@@ -463,7 +461,7 @@ def unset_existing_data(company):
"Purchase Taxes and Charges Template",
]:
frappe.db.sql(
'''delete from `tab{0}` where `company`="%s"'''.format(doctype) % (company) # nosec
f'''delete from `tab{doctype}` where `company`="%s"''' % (company) # nosec
)

View File

@@ -3,18 +3,20 @@
frappe.provide("erpnext.cheque_print");
frappe.ui.form.on('Cheque Print Template', {
refresh: function(frm) {
if(!frm.doc.__islocal) {
frm.add_custom_button(frm.doc.has_print_format?__("Update Print Format"):__("Create Print Format"),
function() {
frappe.ui.form.on("Cheque Print Template", {
refresh: function (frm) {
if (!frm.doc.__islocal) {
frm.add_custom_button(
frm.doc.has_print_format ? __("Update Print Format") : __("Create Print Format"),
function () {
erpnext.cheque_print.view_cheque_print(frm);
}).addClass("btn-primary");
}
).addClass("btn-primary");
$(frm.fields_dict.cheque_print_preview.wrapper).empty()
$(frm.fields_dict.cheque_print_preview.wrapper).empty();
var template = '<div style="position: relative; overflow-x: scroll;">\
var template =
'<div style="position: relative; overflow-x: scroll;">\
<div id="cheque_preview" style="width: {{ cheque_width }}cm; \
height: {{ cheque_height }}cm;\
background-repeat: no-repeat;\
@@ -48,30 +50,30 @@ frappe.ui.form.on('Cheque Print Template', {
</div>\
</div>';
$(frappe.render(template, frm.doc)).appendTo(frm.fields_dict.cheque_print_preview.wrapper)
$(frappe.render(template, frm.doc)).appendTo(frm.fields_dict.cheque_print_preview.wrapper);
if (frm.doc.scanned_cheque) {
$(frm.fields_dict.cheque_print_preview.wrapper).find("#cheque_preview").css('background-image', 'url(' + frm.doc.scanned_cheque + ')');
$(frm.fields_dict.cheque_print_preview.wrapper)
.find("#cheque_preview")
.css("background-image", "url(" + frm.doc.scanned_cheque + ")");
}
}
}
},
});
erpnext.cheque_print.view_cheque_print = function(frm) {
erpnext.cheque_print.view_cheque_print = function (frm) {
frappe.call({
method: "erpnext.accounts.doctype.cheque_print_template.cheque_print_template.create_or_update_cheque_print_format",
args:{
"template_name": frm.doc.name
args: {
template_name: frm.doc.name,
},
callback: function(r) {
callback: function (r) {
if (!r.exe && !frm.doc.has_print_format) {
var doc = frappe.model.sync(r.message);
frappe.set_route("Form", r.message.doctype, r.message.name);
} else {
frappe.msgprint(__("Print settings updated in respective print format"));
}
else {
frappe.msgprint(__("Print settings updated in respective print format"))
}
}
})
}
},
});
};

View File

@@ -66,71 +66,71 @@ def create_or_update_cheque_print_format(template_name):
cheque_print.html = """
<style>
.print-format {
.print-format {{
padding: 0px;
}
@media screen {
.print-format {
}}
@media screen {{
.print-format {{
padding: 0in;
}
}
}}
}}
</style>
<div style="position: relative; top:%(starting_position_from_top_edge)scm">
<div style="width:%(cheque_width)scm;height:%(cheque_height)scm;">
<span style="top:%(acc_pay_dist_from_top_edge)scm; left:%(acc_pay_dist_from_left_edge)scm;
<div style="position: relative; top:{starting_position_from_top_edge}cm">
<div style="width:{cheque_width}cm;height:{cheque_height}cm;">
<span style="top:{acc_pay_dist_from_top_edge}cm; left:{acc_pay_dist_from_left_edge}cm;
border-bottom: solid 1px;border-top:solid 1px; width:2cm;text-align: center; position: absolute;">
%(message_to_show)s
{message_to_show}
</span>
<span style="top:%(date_dist_from_top_edge)scm; left:%(date_dist_from_left_edge)scm;
<span style="top:{date_dist_from_top_edge}cm; left:{date_dist_from_left_edge}cm;
position: absolute;">
{{ frappe.utils.formatdate(doc.reference_date) or '' }}
{{{{ frappe.utils.formatdate(doc.reference_date) or '' }}}}
</span>
<span style="top:%(acc_no_dist_from_top_edge)scm;left:%(acc_no_dist_from_left_edge)scm;
<span style="top:{acc_no_dist_from_top_edge}cm;left:{acc_no_dist_from_left_edge}cm;
position: absolute; min-width: 6cm;">
{{ doc.account_no or '' }}
{{{{ doc.account_no or '' }}}}
</span>
<span style="top:%(payer_name_from_top_edge)scm;left: %(payer_name_from_left_edge)scm;
<span style="top:{payer_name_from_top_edge}cm;left: {payer_name_from_left_edge}cm;
position: absolute; min-width: 6cm;">
{{doc.party_name}}
{{{{doc.party_name}}}}
</span>
<span style="top:%(amt_in_words_from_top_edge)scm; left:%(amt_in_words_from_left_edge)scm;
position: absolute; display: block; width: %(amt_in_word_width)scm;
line-height:%(amt_in_words_line_spacing)scm; word-wrap: break-word;">
{{frappe.utils.money_in_words(doc.base_paid_amount or doc.base_received_amount)}}
<span style="top:{amt_in_words_from_top_edge}cm; left:{amt_in_words_from_left_edge}cm;
position: absolute; display: block; width: {amt_in_word_width}cm;
line-height:{amt_in_words_line_spacing}cm; word-wrap: break-word;">
{{{{frappe.utils.money_in_words(doc.base_paid_amount or doc.base_received_amount)}}}}
</span>
<span style="top:%(amt_in_figures_from_top_edge)scm;left: %(amt_in_figures_from_left_edge)scm;
<span style="top:{amt_in_figures_from_top_edge}cm;left: {amt_in_figures_from_left_edge}cm;
position: absolute; min-width: 4cm;">
{{doc.get_formatted("base_paid_amount") or doc.get_formatted("base_received_amount")}}
{{{{doc.get_formatted("base_paid_amount") or doc.get_formatted("base_received_amount")}}}}
</span>
<span style="top:%(signatory_from_top_edge)scm;left: %(signatory_from_left_edge)scm;
<span style="top:{signatory_from_top_edge}cm;left: {signatory_from_left_edge}cm;
position: absolute; min-width: 6cm;">
{{doc.company}}
{{{{doc.company}}}}
</span>
</div>
</div>""" % {
"starting_position_from_top_edge": doc.starting_position_from_top_edge
</div>""".format(
starting_position_from_top_edge=doc.starting_position_from_top_edge
if doc.cheque_size == "A4"
else 0.0,
"cheque_width": doc.cheque_width,
"cheque_height": doc.cheque_height,
"acc_pay_dist_from_top_edge": doc.acc_pay_dist_from_top_edge,
"acc_pay_dist_from_left_edge": doc.acc_pay_dist_from_left_edge,
"message_to_show": doc.message_to_show if doc.message_to_show else _("Account Pay Only"),
"date_dist_from_top_edge": doc.date_dist_from_top_edge,
"date_dist_from_left_edge": doc.date_dist_from_left_edge,
"acc_no_dist_from_top_edge": doc.acc_no_dist_from_top_edge,
"acc_no_dist_from_left_edge": doc.acc_no_dist_from_left_edge,
"payer_name_from_top_edge": doc.payer_name_from_top_edge,
"payer_name_from_left_edge": doc.payer_name_from_left_edge,
"amt_in_words_from_top_edge": doc.amt_in_words_from_top_edge,
"amt_in_words_from_left_edge": doc.amt_in_words_from_left_edge,
"amt_in_word_width": doc.amt_in_word_width,
"amt_in_words_line_spacing": doc.amt_in_words_line_spacing,
"amt_in_figures_from_top_edge": doc.amt_in_figures_from_top_edge,
"amt_in_figures_from_left_edge": doc.amt_in_figures_from_left_edge,
"signatory_from_top_edge": doc.signatory_from_top_edge,
"signatory_from_left_edge": doc.signatory_from_left_edge,
}
cheque_width=doc.cheque_width,
cheque_height=doc.cheque_height,
acc_pay_dist_from_top_edge=doc.acc_pay_dist_from_top_edge,
acc_pay_dist_from_left_edge=doc.acc_pay_dist_from_left_edge,
message_to_show=doc.message_to_show if doc.message_to_show else _("Account Pay Only"),
date_dist_from_top_edge=doc.date_dist_from_top_edge,
date_dist_from_left_edge=doc.date_dist_from_left_edge,
acc_no_dist_from_top_edge=doc.acc_no_dist_from_top_edge,
acc_no_dist_from_left_edge=doc.acc_no_dist_from_left_edge,
payer_name_from_top_edge=doc.payer_name_from_top_edge,
payer_name_from_left_edge=doc.payer_name_from_left_edge,
amt_in_words_from_top_edge=doc.amt_in_words_from_top_edge,
amt_in_words_from_left_edge=doc.amt_in_words_from_left_edge,
amt_in_word_width=doc.amt_in_word_width,
amt_in_words_line_spacing=doc.amt_in_words_line_spacing,
amt_in_figures_from_top_edge=doc.amt_in_figures_from_top_edge,
amt_in_figures_from_left_edge=doc.amt_in_figures_from_left_edge,
signatory_from_top_edge=doc.signatory_from_top_edge,
signatory_from_left_edge=doc.signatory_from_left_edge,
)
cheque_print.save(ignore_permissions=True)

View File

@@ -3,75 +3,80 @@
frappe.provide("erpnext.accounts");
frappe.ui.form.on('Cost Center', {
onload: function(frm) {
frm.set_query("parent_cost_center", function() {
frappe.ui.form.on("Cost Center", {
onload: function (frm) {
frm.set_query("parent_cost_center", function () {
return {
filters: {
company: frm.doc.company,
is_group: 1
}
}
is_group: 1,
},
};
});
},
refresh: function(frm) {
refresh: function (frm) {
if (!frm.is_new()) {
frm.add_custom_button(__('Update Cost Center Name / Number'), function () {
frm.add_custom_button(__("Update Cost Center Name / Number"), function () {
frm.trigger("update_cost_center_number");
});
}
let intro_txt = '';
let intro_txt = "";
let doc = frm.doc;
frm.toggle_display('cost_center_name', doc.__islocal);
frm.toggle_enable(['is_group', 'company'], doc.__islocal);
frm.toggle_display("cost_center_name", doc.__islocal);
frm.toggle_enable(["is_group", "company"], doc.__islocal);
if(!doc.__islocal && doc.is_group==1) {
intro_txt += __('Note: This Cost Center is a Group. Cannot make accounting entries against groups.');
if (!doc.__islocal && doc.is_group == 1) {
intro_txt += __(
"Note: This Cost Center is a Group. Cannot make accounting entries against groups."
);
}
frm.events.hide_unhide_group_ledger(frm);
frm.toggle_display('sb1', doc.is_group==0);
frm.toggle_display("sb1", doc.is_group == 0);
frm.set_intro(intro_txt);
if(!frm.doc.__islocal) {
frm.add_custom_button(__('Chart of Cost Centers'),
function() { frappe.set_route("Tree", "Cost Center"); });
if (!frm.doc.__islocal) {
frm.add_custom_button(__("Chart of Cost Centers"), function () {
frappe.set_route("Tree", "Cost Center");
});
frm.add_custom_button(__('Budget'),
function() { frappe.set_route("List", "Budget", {'cost_center': frm.doc.name}); });
frm.add_custom_button(__("Budget"), function () {
frappe.set_route("List", "Budget", { cost_center: frm.doc.name });
});
}
},
update_cost_center_number: function(frm) {
update_cost_center_number: function (frm) {
var d = new frappe.ui.Dialog({
title: __('Update Cost Center Name / Number'),
title: __("Update Cost Center Name / Number"),
fields: [
{
"label": "Cost Center Name",
"fieldname": "cost_center_name",
"fieldtype": "Data",
"reqd": 1,
"default": frm.doc.cost_center_name
label: "Cost Center Name",
fieldname: "cost_center_name",
fieldtype: "Data",
reqd: 1,
default: frm.doc.cost_center_name,
},
{
"label": "Cost Center Number",
"fieldname": "cost_center_number",
"fieldtype": "Data",
"default": frm.doc.cost_center_number
label: "Cost Center Number",
fieldname: "cost_center_number",
fieldtype: "Data",
default: frm.doc.cost_center_number,
},
{
"label": __("Merge with existing"),
"fieldname": "merge",
"fieldtype": "Check",
"default": 0
}
label: __("Merge with existing"),
fieldname: "merge",
fieldtype: "Check",
default: 0,
},
],
primary_action: function() {
primary_action: function () {
let data = d.get_values();
if(data.cost_center_name === frm.doc.cost_center_name && data.cost_center_number === frm.doc.cost_center_number) {
if (
data.cost_center_name === frm.doc.cost_center_name &&
data.cost_center_number === frm.doc.cost_center_number
) {
d.hide();
return;
}
@@ -83,12 +88,12 @@ frappe.ui.form.on('Cost Center', {
cost_center_name: data.cost_center_name,
cost_center_number: cstr(data.cost_center_number),
company: frm.doc.company,
merge: data.merge
merge: data.merge,
},
callback: function(r) {
callback: function (r) {
frappe.dom.unfreeze();
if(!r.exc) {
if(r.message) {
if (!r.exc) {
if (r.message) {
frappe.set_route("Form", "Cost Center", r.message);
} else {
frm.set_value("cost_center_name", data.cost_center_name);
@@ -96,44 +101,42 @@ frappe.ui.form.on('Cost Center', {
}
d.hide();
}
}
},
});
},
primary_action_label: __('Update')
primary_action_label: __("Update"),
});
d.show();
},
parent_cost_center(frm) {
if(!frm.doc.company) {
frappe.msgprint(__('Please enter company name first'));
if (!frm.doc.company) {
frappe.msgprint(__("Please enter company name first"));
}
},
hide_unhide_group_ledger(frm) {
let doc = frm.doc;
if (doc.is_group == 1) {
frm.add_custom_button(__('Convert to Non-Group'),
() => frm.events.convert_to_ledger(frm));
frm.add_custom_button(__("Convert to Non-Group"), () => frm.events.convert_to_ledger(frm));
} else if (doc.is_group == 0) {
frm.add_custom_button(__('Convert to Group'),
() => frm.events.convert_to_group(frm));
frm.add_custom_button(__("Convert to Group"), () => frm.events.convert_to_group(frm));
}
},
convert_to_group(frm) {
frm.call('convert_ledger_to_group').then(r => {
if(r.message === 1) {
frm.call("convert_ledger_to_group").then((r) => {
if (r.message === 1) {
frm.refresh();
}
});
},
convert_to_ledger(frm) {
frm.call('convert_group_to_ledger').then(r => {
if(r.message === 1) {
frm.call("convert_group_to_ledger").then((r) => {
if (r.message === 1) {
frm.refresh();
}
});
}
},
});

View File

@@ -41,7 +41,7 @@
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Cost Center Number",
"read_only": 1
"read_only_depends_on": "eval:!doc.__islocal"
},
{
"fieldname": "parent_cost_center",
@@ -125,7 +125,7 @@
"idx": 1,
"is_tree": 1,
"links": [],
"modified": "2022-01-31 13:22:58.916273",
"modified": "2024-04-24 10:55:54.083042",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cost Center",
@@ -163,6 +163,15 @@
{
"read": 1,
"role": "Purchase User"
},
{
"email": 1,
"export": 1,
"print": 1,
"report": 1,
"role": "Employee",
"select": 1,
"share": 1
}
],
"search_fields": "parent_cost_center, is_group",
@@ -170,4 +179,4 @@
"sort_field": "modified",
"sort_order": "ASC",
"states": []
}
}

View File

@@ -34,9 +34,7 @@ class CostCenter(NestedSet):
def autoname(self):
from erpnext.accounts.utils import get_autoname_with_number
self.name = get_autoname_with_number(
self.cost_center_number, self.cost_center_name, self.company
)
self.name = get_autoname_with_number(self.cost_center_number, self.cost_center_name, self.company)
def validate(self):
self.validate_mandatory()
@@ -109,14 +107,14 @@ class CostCenter(NestedSet):
new_cost_center = get_name_with_abbr(newdn, self.company)
# Validate properties before merging
super(CostCenter, self).before_rename(olddn, new_cost_center, merge, "is_group")
super().before_rename(olddn, new_cost_center, merge, "is_group")
if not merge:
new_cost_center = get_name_with_number(new_cost_center, self.cost_center_number)
return new_cost_center
def after_rename(self, olddn, newdn, merge=False):
super(CostCenter, self).after_rename(olddn, newdn, merge)
super().after_rename(olddn, newdn, merge)
if not merge:
new_cost_center = frappe.db.get_value(

View File

@@ -1,54 +1,84 @@
frappe.treeview_settings["Cost Center"] = {
breadcrumb: "Accounts",
get_tree_root: false,
filters: [{
fieldname: "company",
fieldtype:"Select",
options: erpnext.utils.get_tree_options("company"),
label: __("Company"),
default: erpnext.utils.get_tree_default("company")
}],
root_label: "Cost Centers",
get_tree_nodes: 'erpnext.accounts.utils.get_children',
add_tree_node: 'erpnext.accounts.utils.add_cc',
menu_items:[
filters: [
{
label: __('New Company'),
action: function() { frappe.new_doc("Company", true) },
condition: 'frappe.boot.user.can_create.indexOf("Company") !== -1'
}
fieldname: "company",
fieldtype: "Select",
options: erpnext.utils.get_tree_options("company"),
label: __("Company"),
default: erpnext.utils.get_tree_default("company"),
},
],
fields:[
{fieldtype:'Data', fieldname:'cost_center_name', label:__('New Cost Center Name'), reqd:true},
{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
description:__('Further cost centers can be made under Groups but entries can be made against non-Groups')},
{fieldtype:'Data', fieldname:'cost_center_number', label:__('Cost Center Number'),
description: __("Number of new Cost Center, it will be included in the cost center name as a prefix")}
root_label: "Cost Centers",
get_tree_nodes: "erpnext.accounts.utils.get_children",
add_tree_node: "erpnext.accounts.utils.add_cc",
menu_items: [
{
label: __("New Company"),
action: function () {
frappe.new_doc("Company", true);
},
condition: 'frappe.boot.user.can_create.indexOf("Company") !== -1',
},
],
ignore_fields:["parent_cost_center"],
onload: function(treeview) {
fields: [
{ fieldtype: "Data", fieldname: "cost_center_name", label: __("New Cost Center Name"), reqd: true },
{
fieldtype: "Check",
fieldname: "is_group",
label: __("Is Group"),
description: __(
"Further cost centers can be made under Groups but entries can be made against non-Groups"
),
},
{
fieldtype: "Data",
fieldname: "cost_center_number",
label: __("Cost Center Number"),
description: __(
"Number of new Cost Center, it will be included in the cost center name as a prefix"
),
},
],
ignore_fields: ["parent_cost_center"],
onload: function (treeview) {
function get_company() {
return treeview.page.fields_dict.company.get_value();
}
// tools
treeview.page.add_inner_button(__("Chart of Accounts"), function() {
frappe.set_route('Tree', 'Account', {company: get_company()});
}, __('View'));
treeview.page.add_inner_button(
__("Chart of Accounts"),
function () {
frappe.set_route("Tree", "Account", { company: get_company() });
},
__("View")
);
// make
treeview.page.add_inner_button(__("Budget List"), function() {
frappe.set_route('List', 'Budget', {company: get_company()});
}, __('Budget'));
treeview.page.add_inner_button(
__("Budget List"),
function () {
frappe.set_route("List", "Budget", { company: get_company() });
},
__("Budget")
);
treeview.page.add_inner_button(__("Monthly Distribution"), function() {
frappe.set_route('List', 'Monthly Distribution', {company: get_company()});
}, __('Budget'));
treeview.page.add_inner_button(
__("Monthly Distribution"),
function () {
frappe.set_route("List", "Monthly Distribution", { company: get_company() });
},
__("Budget")
);
treeview.page.add_inner_button(__("Budget Variance Report"), function() {
frappe.set_route('query-report', 'Budget Variance Report', {company: get_company()});
}, __('Budget'));
}
}
treeview.page.add_inner_button(
__("Budget Variance Report"),
function () {
frappe.set_route("query-report", "Budget Variance Report", { company: get_company() });
},
__("Budget")
);
},
};

View File

@@ -10,7 +10,6 @@ test_records = frappe.get_test_records("Cost Center")
class TestCostCenter(unittest.TestCase):
def test_cost_center_creation_against_child_node(self):
if not frappe.db.get_value("Cost Center", {"name": "_Test Cost Center 2 - _TC"}):
frappe.get_doc(test_records[1]).insert()

View File

@@ -1,19 +1,24 @@
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Cost Center Allocation', {
setup: function(frm) {
let filters = {"is_group": 0};
if (frm.doc.company) {
$.extend(filters, {
"company": frm.doc.company
});
}
frm.set_query('main_cost_center', function() {
frappe.ui.form.on("Cost Center Allocation", {
setup: function (frm) {
frm.set_query("main_cost_center", function () {
return {
filters: filters
filters: {
company: frm.doc.company,
is_group: 0,
},
};
});
}
frm.set_query("cost_center", "allocation_percentages", function () {
return {
filters: {
company: frm.doc.company,
is_group: 0,
},
};
});
},
});

View File

@@ -48,7 +48,7 @@ class CostCenterAllocation(Document):
# end: auto-generated types
def __init__(self, *args, **kwargs):
super(CostCenterAllocation, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self._skip_from_date_validation = False
def validate(self):
@@ -63,9 +63,7 @@ class CostCenterAllocation(Document):
total_percentage = sum([d.percentage for d in self.get("allocation_percentages", [])])
if total_percentage != 100:
frappe.throw(
_("Total percentage against cost centers should be 100"), WrongPercentageAllocation
)
frappe.throw(_("Total percentage against cost centers should be 100"), WrongPercentageAllocation)
def validate_from_date_based_on_existing_gle(self):
# Check if GLE exists against the main cost center

View File

@@ -1,44 +1,41 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Coupon Code', {
setup: function(frm) {
frm.set_query("pricing_rule", function() {
frappe.ui.form.on("Coupon Code", {
setup: function (frm) {
frm.set_query("pricing_rule", function () {
return {
filters: [
["Pricing Rule","coupon_code_based", "=", "1"]
]
filters: [["Pricing Rule", "coupon_code_based", "=", "1"]],
};
});
},
coupon_name:function(frm){
if (frm.doc.__islocal===1) {
coupon_name: function (frm) {
if (frm.doc.__islocal === 1) {
frm.trigger("make_coupon_code");
}
},
coupon_type:function(frm){
if (frm.doc.__islocal===1) {
coupon_type: function (frm) {
if (frm.doc.__islocal === 1) {
frm.trigger("make_coupon_code");
}
},
make_coupon_code: function(frm) {
var coupon_name=frm.doc.coupon_name;
make_coupon_code: function (frm) {
var coupon_name = frm.doc.coupon_name;
var coupon_code;
if (frm.doc.coupon_type=='Gift Card') {
coupon_code=Math.random().toString(12).substring(2, 12).toUpperCase();
if (frm.doc.coupon_type == "Gift Card") {
coupon_code = Math.random().toString(12).substring(2, 12).toUpperCase();
} else if (frm.doc.coupon_type == "Promotional") {
coupon_name = coupon_name.replace(/\s/g, "");
coupon_code = coupon_name.toUpperCase().slice(0, 8);
}
else if(frm.doc.coupon_type=='Promotional'){
coupon_name=coupon_name.replace(/\s/g,'');
coupon_code=coupon_name.toUpperCase().slice(0,8);
}
frm.doc.coupon_code=coupon_code;
frm.refresh_field('coupon_code');
frm.doc.coupon_code = coupon_code;
frm.refresh_field("coupon_code");
},
refresh: function(frm) {
refresh: function (frm) {
if (frm.doc.pricing_rule) {
frm.add_custom_button(__("Add/Edit Coupon Conditions"), function(){
frm.add_custom_button(__("Add/Edit Coupon Conditions"), function () {
frappe.set_route("Form", "Pricing Rule", frm.doc.pricing_rule);
});
}
}
},
});

View File

@@ -1,28 +1,41 @@
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Currency Exchange Settings', {
service_provider: function(frm) {
if (frm.doc.service_provider == "exchangerate.host") {
let result = ['result'];
let params = {
date: '{transaction_date}',
from: '{from_currency}',
to: '{to_currency}'
};
add_param(frm, "https://api.exchangerate.host/convert", params, result);
} else if (frm.doc.service_provider == "frankfurter.app") {
let result = ['rates', '{to_currency}'];
let params = {
base: '{from_currency}',
symbols: '{to_currency}'
};
add_param(frm, "https://frankfurter.app/{transaction_date}", params, result);
}
}
frappe.ui.form.on("Currency Exchange Settings", {
service_provider: function (frm) {
frm.call({
method: "erpnext.accounts.doctype.currency_exchange_settings.currency_exchange_settings.get_api_endpoint",
args: {
service_provider: frm.doc.service_provider,
use_http: frm.doc.use_http,
},
callback: function (r) {
if (r && r.message) {
if (frm.doc.service_provider == "exchangerate.host") {
let result = ["result"];
let params = {
date: "{transaction_date}",
from: "{from_currency}",
to: "{to_currency}",
};
add_param(frm, r.message, params, result);
} else if (frm.doc.service_provider == "frankfurter.app") {
let result = ["rates", "{to_currency}"];
let params = {
base: "{from_currency}",
symbols: "{to_currency}",
};
add_param(frm, r.message, params, result);
}
}
},
});
},
use_http: function (frm) {
frm.trigger("service_provider");
},
});
function add_param(frm, api, params, result) {
var row;
frm.clear_table("req_params");
@@ -30,13 +43,13 @@ function add_param(frm, api, params, result) {
frm.doc.api_endpoint = api;
$.each(params, function(key, value) {
$.each(params, function (key, value) {
row = frm.add_child("req_params");
row.key = key;
row.value = value;
});
$.each(result, function(key, value) {
$.each(result, function (key, value) {
row = frm.add_child("result_key");
row.key = value;
});

View File

@@ -9,6 +9,7 @@
"disabled",
"service_provider",
"api_endpoint",
"use_http",
"access_key",
"url",
"column_break_3",
@@ -91,12 +92,19 @@
"fieldname": "access_key",
"fieldtype": "Data",
"label": "Access Key"
},
{
"default": "0",
"depends_on": "eval: doc.service_provider != \"Custom\"",
"fieldname": "use_http",
"fieldtype": "Check",
"label": "Use HTTP Protocol"
}
],
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2023-10-04 15:30:25.333860",
"modified": "2024-03-18 08:32:26.895076",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Currency Exchange Settings",

View File

@@ -31,6 +31,7 @@ class CurrencyExchangeSettings(Document):
result_key: DF.Table[CurrencyExchangeSettingsResult]
service_provider: DF.Literal["frankfurter.app", "exchangerate.host", "Custom"]
url: DF.Data | None
use_http: DF.Check
# end: auto-generated types
def validate(self):
@@ -42,7 +43,6 @@ class CurrencyExchangeSettings(Document):
def set_parameters_and_result(self):
if self.service_provider == "exchangerate.host":
if not self.access_key:
frappe.throw(
_("Access Key is required for Service Provider: {0}").format(
@@ -53,7 +53,7 @@ class CurrencyExchangeSettings(Document):
self.set("result_key", [])
self.set("req_params", [])
self.api_endpoint = "https://api.exchangerate.host/convert"
self.api_endpoint = get_api_endpoint(self.service_provider, self.use_http)
self.append("result_key", {"key": "result"})
self.append("req_params", {"key": "access_key", "value": self.access_key})
self.append("req_params", {"key": "amount", "value": "1"})
@@ -64,7 +64,7 @@ class CurrencyExchangeSettings(Document):
self.set("result_key", [])
self.set("req_params", [])
self.api_endpoint = "https://frankfurter.app/{transaction_date}"
self.api_endpoint = get_api_endpoint(self.service_provider, self.use_http)
self.append("result_key", {"key": "rates"})
self.append("result_key", {"key": "{to_currency}"})
self.append("req_params", {"key": "base", "value": "{from_currency}"})
@@ -77,9 +77,7 @@ class CurrencyExchangeSettings(Document):
transaction_date=nowdate(), to_currency="INR", from_currency="USD"
)
api_url = self.api_endpoint.format(
transaction_date=nowdate(), to_currency="INR", from_currency="USD"
)
api_url = self.api_endpoint.format(transaction_date=nowdate(), to_currency="INR", from_currency="USD")
try:
response = requests.get(api_url, params=params)
@@ -99,7 +97,23 @@ class CurrencyExchangeSettings(Document):
]
except Exception:
frappe.throw(_("Invalid result key. Response:") + " " + response.text)
if not isinstance(value, (int, float)):
if not isinstance(value, int | float):
frappe.throw(_("Returned exchange rate is neither integer not float."))
self.url = response.url
@frappe.whitelist()
def get_api_endpoint(service_provider: str | None = None, use_http: bool = False):
if service_provider and service_provider in ["exchangerate.host", "frankfurter.app"]:
if service_provider == "exchangerate.host":
api = "api.exchangerate.host/convert"
elif service_provider == "frankfurter.app":
api = "frankfurter.app/{transaction_date}"
protocol = "https://"
if use_http:
protocol = "http://"
return protocol + api
return None

View File

@@ -10,7 +10,7 @@ frappe.ui.form.on("Dunning", {
company: frm.doc.company,
customer: frm.doc.customer,
outstanding_amount: [">", 0],
status: "Overdue"
status: "Overdue",
},
};
});
@@ -19,16 +19,16 @@ frappe.ui.form.on("Dunning", {
filters: {
company: frm.doc.company,
root_type: "Income",
is_group: 0
}
is_group: 0,
},
};
});
frm.set_query("cost_center", () => {
return {
filters: {
company: frm.doc.company,
is_group: 0
}
is_group: 0,
},
};
});
@@ -51,7 +51,8 @@ frappe.ui.form.on("Dunning", {
__("Payment"),
function () {
frm.events.make_payment_entry(frm);
}, __("Create")
},
__("Create")
);
frm.page.set_inner_btn_group_as_primary(__("Create"));
}
@@ -69,7 +70,7 @@ frappe.ui.form.on("Dunning", {
get_query_filters: {
docstatus: 1,
status: "Overdue",
company: frm.doc.company
company: frm.doc.company,
},
allow_child_item_selection: true,
child_fieldname: "payment_schedule",
@@ -78,9 +79,12 @@ frappe.ui.form.on("Dunning", {
});
}
frappe.dynamic_link = { doc: frm.doc, fieldname: 'customer', doctype: 'Customer' };
frappe.dynamic_link = { doc: frm.doc, fieldname: "customer", doctype: "Customer" };
frm.toggle_display("customer_name", (frm.doc.customer_name && frm.doc.customer_name !== frm.doc.customer));
frm.toggle_display(
"customer_name",
frm.doc.customer_name && frm.doc.customer_name !== frm.doc.customer
);
},
// When multiple companies are set up. in case company name is changed set default company address
company: function (frm) {
@@ -90,8 +94,8 @@ frappe.ui.form.on("Dunning", {
args: { name: frm.doc.company, existing_address: frm.doc.company_address || "" },
debounce: 2000,
callback: function (r) {
frm.set_value("company_address", r && r.message || "");
}
frm.set_value("company_address", (r && r.message) || "");
},
});
if (frm.fields_dict.currency) {
@@ -125,16 +129,16 @@ frappe.ui.form.on("Dunning", {
transaction_date: frm.doc.posting_date,
from_currency: frm.doc.currency,
to_currency: company_currency,
args: "for_selling"
args: "for_selling",
},
freeze: true,
freeze_message: __("Fetching exchange rates ..."),
callback: function(r) {
callback: function (r) {
const exchange_rate = flt(r.message);
if (exchange_rate != frm.doc.conversion_rate) {
frm.set_value("conversion_rate", exchange_rate);
}
}
},
});
} else {
frm.trigger("conversion_rate");
@@ -166,8 +170,7 @@ frappe.ui.form.on("Dunning", {
get_dunning_letter_text: function (frm) {
if (frm.doc.dunning_type) {
frappe.call({
method:
"erpnext.accounts.doctype.dunning.dunning.get_dunning_letter_text",
method: "erpnext.accounts.doctype.dunning.dunning.get_dunning_letter_text",
args: {
dunning_type: frm.doc.dunning_type,
language: frm.doc.language,
@@ -204,10 +207,7 @@ frappe.ui.form.on("Dunning", {
calculate_overdue_days: function (frm) {
frm.doc.overdue_payments.forEach((row) => {
if (frm.doc.posting_date && row.due_date) {
const overdue_days = moment(frm.doc.posting_date).diff(
row.due_date,
"days"
);
const overdue_days = moment(frm.doc.posting_date).diff(row.due_date, "days");
frappe.model.set_value(row.doctype, row.name, "overdue_days", overdue_days);
}
});
@@ -215,15 +215,16 @@ frappe.ui.form.on("Dunning", {
calculate_interest: function (frm) {
frm.doc.overdue_payments.forEach((row) => {
const interest_per_day = frm.doc.rate_of_interest / 100 / 365;
const interest = flt((interest_per_day * row.overdue_days * row.outstanding), precision("interest", row));
const interest = flt(
interest_per_day * row.overdue_days * row.outstanding,
precision("interest", row)
);
frappe.model.set_value(row.doctype, row.name, "interest", interest);
});
},
calculate_totals: function (frm) {
const total_interest = frm.doc.overdue_payments
.reduce((prev, cur) => prev + cur.interest, 0);
const total_outstanding = frm.doc.overdue_payments
.reduce((prev, cur) => prev + cur.outstanding, 0);
const total_interest = frm.doc.overdue_payments.reduce((prev, cur) => prev + cur.interest, 0);
const total_outstanding = frm.doc.overdue_payments.reduce((prev, cur) => prev + cur.outstanding, 0);
const dunning_amount = total_interest + frm.doc.dunning_fee;
const base_dunning_amount = dunning_amount * frm.doc.conversion_rate;
const grand_total = total_outstanding + dunning_amount;
@@ -240,8 +241,7 @@ frappe.ui.form.on("Dunning", {
},
make_payment_entry: function (frm) {
return frappe.call({
method:
"erpnext.accounts.doctype.payment_entry.payment_entry.get_payment_entry",
method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_payment_entry",
args: {
dt: frm.doc.doctype,
dn: frm.doc.name,
@@ -257,5 +257,5 @@ frappe.ui.form.on("Dunning", {
frappe.ui.form.on("Overdue Payment", {
interest: function (frm) {
frm.trigger("calculate_totals");
}
});
},
});

View File

@@ -139,6 +139,10 @@ class Dunning(AccountsController):
)
row.dunning_level = len(past_dunnings) + 1
def on_cancel(self):
super().on_cancel()
self.ignore_linked_doctypes = ["GL Entry"]
def resolve_dunning(doc, state):
"""

View File

@@ -109,9 +109,7 @@ class TestDunning(FrappeTestCase):
def create_dunning(overdue_days, dunning_type_name=None):
posting_date = add_days(today(), -1 * overdue_days)
sales_invoice = create_sales_invoice_against_cost_center(
posting_date=posting_date, qty=1, rate=100
)
sales_invoice = create_sales_invoice_against_cost_center(posting_date=posting_date, qty=1, rate=100)
dunning = create_dunning_from_sales_invoice(sales_invoice.name)
if dunning_type_name:

View File

@@ -1,75 +1,79 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Exchange Rate Revaluation', {
setup: function(frm) {
frm.set_query("party_type", "accounts", function() {
frappe.ui.form.on("Exchange Rate Revaluation", {
setup: function (frm) {
frm.set_query("party_type", "accounts", function () {
return {
"filters": {
"name": ["in", Object.keys(frappe.boot.party_account_types)],
}
filters: {
name: ["in", Object.keys(frappe.boot.party_account_types)],
},
};
});
frm.set_query("account", "accounts", function(doc) {
frm.set_query("account", "accounts", function (doc) {
return {
"filters": {
"company": doc.company
}
filters: {
company: doc.company,
},
};
});
},
refresh: function(frm) {
if(frm.doc.docstatus==1) {
refresh: function (frm) {
if (frm.doc.docstatus == 1) {
frappe.call({
method: 'check_journal_entry_condition',
method: "check_journal_entry_condition",
doc: frm.doc,
callback: function(r) {
callback: function (r) {
if (r.message) {
frm.add_custom_button(__('Journal Entries'), function() {
return frm.events.make_jv(frm);
}, __('Create'));
frm.add_custom_button(
__("Journal Entries"),
function () {
return frm.events.make_jv(frm);
},
__("Create")
);
}
}
},
});
}
},
validate_rounding_loss: function(frm) {
validate_rounding_loss: function (frm) {
let allowance = frm.doc.rounding_loss_allowance;
if (!(allowance >= 0 && allowance < 1)) {
frappe.throw(__("Rounding Loss Allowance should be between 0 and 1"));
}
},
rounding_loss_allowance: function(frm) {
rounding_loss_allowance: function (frm) {
frm.events.validate_rounding_loss(frm);
},
validate: function(frm) {
validate: function (frm) {
frm.events.validate_rounding_loss(frm);
},
get_entries: function(frm, account) {
get_entries: function (frm, account) {
frappe.call({
method: "get_accounts_data",
doc: cur_frm.doc,
account: account,
callback: function(r){
callback: function (r) {
frappe.model.clear_table(frm.doc, "accounts");
if(r.message) {
if (r.message) {
r.message.forEach((d) => {
cur_frm.add_child("accounts",d);
cur_frm.add_child("accounts", d);
});
frm.events.get_total_gain_loss(frm);
refresh_field("accounts");
}
}
},
});
},
get_total_gain_loss: function(frm) {
if(!(frm.doc.accounts && frm.doc.accounts.length)) return;
get_total_gain_loss: function (frm) {
if (!(frm.doc.accounts && frm.doc.accounts.length)) return;
let total_gain_loss = 0;
frm.doc.accounts.forEach((d) => {
@@ -80,7 +84,7 @@ frappe.ui.form.on('Exchange Rate Revaluation', {
frm.refresh_fields();
},
make_jv : function(frm) {
make_jv: function (frm) {
let revaluation_journal = null;
let zero_balance_journal = null;
frappe.call({
@@ -88,66 +92,68 @@ frappe.ui.form.on('Exchange Rate Revaluation', {
doc: frm.doc,
freeze: true,
freeze_message: "Making Journal Entries...",
callback: function(r){
callback: function (r) {
if (r.message) {
let response = r.message;
if(response['revaluation_jv'] || response['zero_balance_jv']) {
if (response["revaluation_jv"] || response["zero_balance_jv"]) {
frappe.msgprint(__("Journals have been created"));
}
}
}
},
});
}
},
});
frappe.ui.form.on("Exchange Rate Revaluation Account", {
new_exchange_rate: function(frm, cdt, cdn) {
new_exchange_rate: function (frm, cdt, cdn) {
var row = frappe.get_doc(cdt, cdn);
row.new_balance_in_base_currency = flt(row.new_exchange_rate * flt(row.balance_in_account_currency),
precision("new_balance_in_base_currency", row));
row.new_balance_in_base_currency = flt(
row.new_exchange_rate * flt(row.balance_in_account_currency),
precision("new_balance_in_base_currency", row)
);
row.gain_loss = row.new_balance_in_base_currency - flt(row.balance_in_base_currency);
refresh_field("accounts");
frm.events.get_total_gain_loss(frm);
},
account: function(frm, cdt, cdn) {
account: function (frm, cdt, cdn) {
var row = locals[cdt][cdn];
if (row.account) {
get_account_details(frm, cdt, cdn);
}
},
party: function(frm, cdt, cdn) {
party: function (frm, cdt, cdn) {
var row = locals[cdt][cdn];
if (row.party && row.account) {
get_account_details(frm, cdt, cdn);
}
},
accounts_remove: function(frm) {
accounts_remove: function (frm) {
frm.events.get_total_gain_loss(frm);
}
},
});
var get_account_details = function(frm, cdt, cdn) {
var get_account_details = function (frm, cdt, cdn) {
var row = frappe.get_doc(cdt, cdn);
if(!frm.doc.company || !frm.doc.posting_date) {
if (!frm.doc.company || !frm.doc.posting_date) {
frappe.throw(__("Please select Company and Posting Date to getting entries"));
}
frappe.call({
method: "erpnext.accounts.doctype.exchange_rate_revaluation.exchange_rate_revaluation.get_account_details",
args:{
args: {
account: row.account,
company: frm.doc.company,
posting_date: frm.doc.posting_date,
party_type: row.party_type,
party: row.party,
rounding_loss_allowance: frm.doc.rounding_loss_allowance
rounding_loss_allowance: frm.doc.rounding_loss_allowance,
},
callback: function(r){
callback: function (r) {
$.extend(row, r.message);
refresh_field("accounts");
frm.events.get_total_gain_loss(frm);
}
},
});
};

View File

@@ -268,7 +268,6 @@ class ExchangeRateRevaluation(Document):
# Handle Accounts with '0' balance in Account/Base Currency
for d in [x for x in account_details if x.zero_balance]:
if d.balance != 0:
current_exchange_rate = new_exchange_rate = 0
@@ -281,7 +280,8 @@ class ExchangeRateRevaluation(Document):
new_balance_in_account_currency = 0
current_exchange_rate = (
calculate_exchange_rate_using_last_gle(company, d.account, d.party_type, d.party) or 0.0
calculate_exchange_rate_using_last_gle(company, d.account, d.party_type, d.party)
or 0.0
)
gain_loss = new_balance_in_account_currency - (
@@ -335,9 +335,7 @@ class ExchangeRateRevaluation(Document):
revaluation_jv = self.make_jv_for_revaluation()
if revaluation_jv:
frappe.msgprint(
f"Revaluation Journal: {get_link_to_form('Journal Entry', revaluation_jv.name)}"
)
frappe.msgprint(f"Revaluation Journal: {get_link_to_form('Journal Entry', revaluation_jv.name)}")
return {
"revaluation_jv": revaluation_jv.name if revaluation_jv else None,
@@ -394,7 +392,8 @@ class ExchangeRateRevaluation(Document):
journal_account.update(
{
dr_or_cr: flt(
abs(d.get("balance_in_account_currency")), d.precision("balance_in_account_currency")
abs(d.get("balance_in_account_currency")),
d.precision("balance_in_account_currency"),
),
reverse_dr_or_cr: 0,
"debit": 0,
@@ -520,7 +519,9 @@ class ExchangeRateRevaluation(Document):
abs(d.get("balance_in_account_currency")), d.precision("balance_in_account_currency")
),
"cost_center": erpnext.get_default_cost_center(self.company),
"exchange_rate": flt(d.get("current_exchange_rate"), d.precision("current_exchange_rate")),
"exchange_rate": flt(
d.get("current_exchange_rate"), d.precision("current_exchange_rate")
),
"reference_type": "Exchange Rate Revaluation",
"reference_name": self.name,
}
@@ -598,7 +599,7 @@ def calculate_exchange_rate_using_last_gle(company, account, party_type, party):
@frappe.whitelist()
def get_account_details(
company, posting_date, account, party_type=None, party=None, rounding_loss_allowance: float = None
company, posting_date, account, party_type=None, party=None, rounding_loss_allowance: float | None = None
):
if not (company and posting_date):
frappe.throw(_("Company and Posting Date is mandatory"))
@@ -611,7 +612,7 @@ def get_account_details(
frappe.throw(_("Party Type and Party is mandatory for {0} account").format(account_type))
account_details = {}
company_currency = erpnext.get_company_currency(company)
erpnext.get_company_currency(company)
account_details = {
"account_currency": account_currency,
@@ -625,24 +626,22 @@ def get_account_details(
rounding_loss_allowance=rounding_loss_allowance,
)
if account_balance and (
account_balance[0].balance or account_balance[0].balance_in_account_currency
):
account_with_new_balance = ExchangeRateRevaluation.calculate_new_account_balance(
if account_balance and (account_balance[0].balance or account_balance[0].balance_in_account_currency):
if account_with_new_balance := ExchangeRateRevaluation.calculate_new_account_balance(
company, posting_date, account_balance
)
row = account_with_new_balance[0]
account_details.update(
{
"balance_in_base_currency": row["balance_in_base_currency"],
"balance_in_account_currency": row["balance_in_account_currency"],
"current_exchange_rate": row["current_exchange_rate"],
"new_exchange_rate": row["new_exchange_rate"],
"new_balance_in_base_currency": row["new_balance_in_base_currency"],
"new_balance_in_account_currency": row["new_balance_in_account_currency"],
"zero_balance": row["zero_balance"],
"gain_loss": row["gain_loss"],
}
)
):
row = account_with_new_balance[0]
account_details.update(
{
"balance_in_base_currency": row["balance_in_base_currency"],
"balance_in_account_currency": row["balance_in_account_currency"],
"current_exchange_rate": row["current_exchange_rate"],
"new_exchange_rate": row["new_exchange_rate"],
"new_balance_in_base_currency": row["new_balance_in_base_currency"],
"new_balance_in_account_currency": row["new_balance_in_account_currency"],
"zero_balance": row["zero_balance"],
"gain_loss": row["gain_loss"],
}
)
return account_details

View File

@@ -1,21 +1,14 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import unittest
import frappe
from frappe import qb
from frappe.tests.utils import FrappeTestCase, change_settings
from frappe.utils import add_days, flt, today
from erpnext import get_default_cost_center
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_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
from erpnext.accounts.party import get_party_account
from erpnext.accounts.test.accounts_mixin import AccountsTestMixin
from erpnext.stock.doctype.item.test_item import create_item
class TestExchangeRateRevaluation(AccountsTestMixin, FrappeTestCase):
@@ -73,9 +66,7 @@ class TestExchangeRateRevaluation(AccountsTestMixin, FrappeTestCase):
err.extend("accounts", accounts)
row = err.accounts[0]
row.new_exchange_rate = 85
row.new_balance_in_base_currency = flt(
row.new_exchange_rate * flt(row.balance_in_account_currency)
)
row.new_balance_in_base_currency = flt(row.new_exchange_rate * flt(row.balance_in_account_currency))
row.gain_loss = row.new_balance_in_base_currency - flt(row.balance_in_base_currency)
err.set_total_gain_loss()
err = err.save().submit()
@@ -127,9 +118,9 @@ class TestExchangeRateRevaluation(AccountsTestMixin, FrappeTestCase):
pe.save().submit()
# Cancel the auto created gain/loss JE to simulate balance only in base currency
je = frappe.db.get_all(
"Journal Entry Account", filters={"reference_name": si.name}, pluck="parent"
)[0]
je = frappe.db.get_all("Journal Entry Account", filters={"reference_name": si.name}, pluck="parent")[
0
]
frappe.get_doc("Journal Entry", je).cancel()
err = frappe.new_doc("Exchange Rate Revaluation")
@@ -235,9 +226,9 @@ class TestExchangeRateRevaluation(AccountsTestMixin, FrappeTestCase):
self.assertEqual(flt(acc.debit, precision), 0.0)
self.assertEqual(flt(acc.credit, precision), 0.0)
row = [x for x in je.accounts if x.account == self.debtors_usd][0]
row = next(x for x in je.accounts if x.account == self.debtors_usd)
self.assertEqual(flt(row.credit_in_account_currency, precision), 5.0) # in USD
row = [x for x in je.accounts if x.account != self.debtors_usd][0]
row = next(x for x in je.accounts if x.account != self.debtors_usd)
self.assertEqual(flt(row.debit_in_account_currency, precision), 421.06) # in INR
# total_debit and total_credit will be 0.0, as JV is posting only to account currency fields
@@ -294,5 +285,5 @@ class TestExchangeRateRevaluation(AccountsTestMixin, FrappeTestCase):
"new_balance_in_account_currency": 100.0,
}
for key, val in expected_data.items():
for key, _val in expected_data.items():
self.assertEqual(expected_data.get(key), account_details.get(key))

View File

@@ -1,8 +1,6 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Finance Book', {
refresh: function(frm) {
}
frappe.ui.form.on("Finance Book", {
refresh: function (frm) {},
});

View File

@@ -1,17 +1,21 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.ui.form.on('Fiscal Year', {
onload: function(frm) {
if(frm.doc.__islocal) {
frm.set_value("year_start_date",
frappe.datetime.add_days(frappe.defaults.get_default("year_end_date"), 1));
frappe.ui.form.on("Fiscal Year", {
onload: function (frm) {
if (frm.doc.__islocal) {
frm.set_value(
"year_start_date",
frappe.datetime.add_days(frappe.defaults.get_default("year_end_date"), 1)
);
}
},
year_start_date: function(frm) {
year_start_date: function (frm) {
if (!frm.doc.is_short_year) {
let year_end_date =
frappe.datetime.add_days(frappe.datetime.add_months(frm.doc.year_start_date, 12), -1);
let year_end_date = frappe.datetime.add_days(
frappe.datetime.add_months(frm.doc.year_start_date, 12),
-1
);
frm.set_value("year_end_date", year_end_date);
}
},

View File

@@ -3,7 +3,7 @@
"allow_import": 1,
"autoname": "field:year",
"creation": "2013-01-22 16:50:25",
"description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.",
"description": "Represents a Financial Year. All accounting entries and other major transactions are tracked against the Fiscal Year.",
"doctype": "DocType",
"document_type": "Setup",
"engine": "InnoDB",
@@ -82,11 +82,12 @@
"icon": "fa fa-calendar",
"idx": 1,
"links": [],
"modified": "2020-11-05 12:16:53.081573",
"modified": "2024-01-30 12:35:38.645968",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Fiscal Year",
"owner": "Administrator",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
@@ -118,9 +119,18 @@
{
"read": 1,
"role": "Employee"
},
{
"read": 1,
"role": "Accounts Manager"
},
{
"read": 1,
"role": "Stock Manager"
}
],
"show_name_in_global_search": 1,
"sort_field": "name",
"sort_order": "DESC"
"sort_order": "DESC",
"states": []
}

View File

@@ -108,9 +108,9 @@ class FiscalYear(Document):
if overlap:
frappe.throw(
_("Year start date or end date is overlapping with {0}. To avoid please set company").format(
existing.name
),
_(
"Year start date or end date is overlapping with {0}. To avoid please set company"
).format(existing.name),
frappe.NameError,
)
@@ -126,9 +126,9 @@ def check_duplicate_fiscal_year(doc):
not frappe.flags.in_test
):
frappe.throw(
_("Fiscal Year Start Date and Fiscal Year End Date are already set in Fiscal Year {0}").format(
fiscal_year
)
_(
"Fiscal Year Start Date and Fiscal Year End Date are already set in Fiscal Year {0}"
).format(fiscal_year)
)

View File

@@ -39,7 +39,7 @@ def test_record_generator():
]
start = 2012
end = now_datetime().year + 5
end = now_datetime().year + 25
for year in range(start, end):
test_records.append(
{

View File

@@ -1,8 +1,8 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('GL Entry', {
refresh: function(frm) {
frm.page.btn_secondary.hide()
}
frappe.ui.form.on("GL Entry", {
refresh: function (frm) {
frm.page.btn_secondary.hide();
},
});

View File

@@ -13,16 +13,9 @@ import erpnext
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
get_checks_for_pl_and_bs_accounts,
)
from erpnext.accounts.doctype.accounting_dimension_filter.accounting_dimension_filter import (
get_dimension_filter_map,
)
from erpnext.accounts.party import validate_party_frozen_disabled, validate_party_gle_currency
from erpnext.accounts.utils import get_account_currency, get_fiscal_year
from erpnext.exceptions import (
InvalidAccountCurrency,
InvalidAccountDimensionError,
MandatoryAccountDimensionError,
)
from erpnext.exceptions import InvalidAccountCurrency
exclude_from_linked_with = True
@@ -98,7 +91,6 @@ class GLEntry(Document):
if not self.flags.from_repost and self.voucher_type != "Period Closing Voucher":
self.validate_account_details(adv_adj)
self.validate_dimensions_for_pl_and_bs()
self.validate_allowed_dimensions()
validate_balance_type(self.account, adv_adj)
validate_frozen_account(self.account, adv_adj)
@@ -115,13 +107,18 @@ class GLEntry(Document):
]:
# Update outstanding amt on against voucher
if (
self.against_voucher_type in ["Journal Entry", "Sales Invoice", "Purchase Invoice", "Fees"]
self.against_voucher_type
in ["Journal Entry", "Sales Invoice", "Purchase Invoice", "Fees"]
and self.against_voucher
and self.flags.update_outstanding == "Yes"
and not frappe.flags.is_reverse_depr_entry
):
update_outstanding_amt(
self.account, self.party_type, self.party, self.against_voucher_type, self.against_voucher
self.account,
self.party_type,
self.party,
self.against_voucher_type,
self.against_voucher,
)
def check_mandatory(self):
@@ -187,12 +184,13 @@ class GLEntry(Document):
and self.company == dimension.company
and dimension.mandatory_for_pl
and not dimension.disabled
and not self.is_cancelled
):
if not self.get(dimension.fieldname):
frappe.throw(
_("Accounting Dimension <b>{0}</b> is required for 'Profit and Loss' account {1}.").format(
dimension.label, self.account
)
_(
"Accounting Dimension <b>{0}</b> is required for 'Profit and Loss' account {1}."
).format(dimension.label, self.account)
)
if (
@@ -200,50 +198,15 @@ class GLEntry(Document):
and self.company == dimension.company
and dimension.mandatory_for_bs
and not dimension.disabled
and not self.is_cancelled
):
if not self.get(dimension.fieldname):
frappe.throw(
_("Accounting Dimension <b>{0}</b> is required for 'Balance Sheet' account {1}.").format(
dimension.label, self.account
)
_(
"Accounting Dimension <b>{0}</b> is required for 'Balance Sheet' account {1}."
).format(dimension.label, self.account)
)
def validate_allowed_dimensions(self):
dimension_filter_map = get_dimension_filter_map()
for key, value in dimension_filter_map.items():
dimension = key[0]
account = key[1]
if self.account == account:
if value["is_mandatory"] and not self.get(dimension):
frappe.throw(
_("{0} is mandatory for account {1}").format(
frappe.bold(frappe.unscrub(dimension)), frappe.bold(self.account)
),
MandatoryAccountDimensionError,
)
if value["allow_or_restrict"] == "Allow":
if self.get(dimension) and self.get(dimension) not in value["allowed_dimensions"]:
frappe.throw(
_("Invalid value {0} for {1} against account {2}").format(
frappe.bold(self.get(dimension)),
frappe.bold(frappe.unscrub(dimension)),
frappe.bold(self.account),
),
InvalidAccountDimensionError,
)
else:
if self.get(dimension) and self.get(dimension) in value["allowed_dimensions"]:
frappe.throw(
_("Invalid value {0} for {1} against account {2}").format(
frappe.bold(self.get(dimension)),
frappe.bold(frappe.unscrub(dimension)),
frappe.bold(self.account),
),
InvalidAccountDimensionError,
)
def check_pl_account(self):
if (
self.is_opening == "Yes"
@@ -289,9 +252,7 @@ class GLEntry(Document):
if not self.cost_center:
return
is_group, company = frappe.get_cached_value(
"Cost Center", self.cost_center, ["is_group", "company"]
)
is_group, company = frappe.get_cached_value("Cost Center", self.cost_center, ["is_group", "company"])
if company != self.company:
frappe.throw(
@@ -360,7 +321,7 @@ def update_outstanding_amt(
account, party_type, party, against_voucher_type, against_voucher, on_cancel=False
):
if party_type and party:
party_condition = " and party_type={0} and party={1}".format(
party_condition = " and party_type={} and party={}".format(
frappe.db.escape(party_type), frappe.db.escape(party)
)
else:
@@ -368,23 +329,19 @@ def update_outstanding_amt(
if against_voucher_type == "Sales Invoice":
party_account = frappe.db.get_value(against_voucher_type, against_voucher, "debit_to")
account_condition = "and account in ({0}, {1})".format(
frappe.db.escape(account), frappe.db.escape(party_account)
)
account_condition = f"and account in ({frappe.db.escape(account)}, {frappe.db.escape(party_account)})"
else:
account_condition = " and account = {0}".format(frappe.db.escape(account))
account_condition = f" and account = {frappe.db.escape(account)}"
# get final outstanding amt
bal = flt(
frappe.db.sql(
"""
f"""
select sum(debit_in_account_currency) - sum(credit_in_account_currency)
from `tabGL Entry`
where against_voucher_type=%s and against_voucher=%s
and voucher_type != 'Invoice Discounting'
{0} {1}""".format(
party_condition, account_condition
),
{party_condition} {account_condition}""",
(against_voucher_type, against_voucher),
)[0][0]
or 0.0
@@ -395,12 +352,10 @@ def update_outstanding_amt(
elif against_voucher_type == "Journal Entry":
against_voucher_amount = flt(
frappe.db.sql(
"""
f"""
select sum(debit_in_account_currency) - sum(credit_in_account_currency)
from `tabGL Entry` where voucher_type = 'Journal Entry' and voucher_no = %s
and account = %s and (against_voucher is null or against_voucher='') {0}""".format(
party_condition
),
and account = %s and (against_voucher is null or against_voucher='') {party_condition}""",
(against_voucher, account),
)[0][0]
)
@@ -419,7 +374,9 @@ def update_outstanding_amt(
# Validation : Outstanding can not be negative for JV
if bal < 0 and not on_cancel:
frappe.throw(
_("Outstanding for {0} cannot be less than zero ({1})").format(against_voucher, fmt_money(bal))
_("Outstanding for {0} cannot be less than zero ({1})").format(
against_voucher, fmt_money(bal)
)
)
if against_voucher_type in ["Sales Invoice", "Purchase Invoice", "Fees"]:
@@ -435,9 +392,7 @@ def update_outstanding_amt(
def validate_frozen_account(account, adv_adj=None):
frozen_account = frappe.get_cached_value("Account", account, "freeze_account")
if frozen_account == "Yes" and not adv_adj:
frozen_accounts_modifier = frappe.db.get_value(
"Accounts Settings", None, "frozen_accounts_modifier"
)
frozen_accounts_modifier = frappe.db.get_value("Accounts Settings", None, "frozen_accounts_modifier")
if not frozen_accounts_modifier:
frappe.throw(_("Account {0} is frozen").format(account))
@@ -492,7 +447,7 @@ def rename_temporarily_named_docs(doctype):
set_name_from_naming_options(frappe.get_meta(doctype).autoname, doc)
newname = doc.name
frappe.db.sql(
"UPDATE `tab{}` SET name = %s, to_rename = 0 where name = %s".format(doctype),
f"UPDATE `tab{doctype}` SET name = %s, to_rename = 0 where name = %s",
(newname, oldname),
auto_commit=True,
)

View File

@@ -14,9 +14,7 @@ from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journ
class TestGLEntry(unittest.TestCase):
def test_round_off_entry(self):
frappe.db.set_value("Company", "_Test Company", "round_off_account", "_Test Write Off - _TC")
frappe.db.set_value(
"Company", "_Test Company", "round_off_cost_center", "_Test Cost Center - _TC"
)
frappe.db.set_value("Company", "_Test Company", "round_off_cost_center", "_Test Cost Center - _TC")
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
@@ -73,7 +71,9 @@ class TestGLEntry(unittest.TestCase):
)
self.assertTrue(all(entry.to_rename == 0 for entry in new_gl_entries))
self.assertTrue(all(new.name != old.name for new, old in zip(gl_entries, new_gl_entries)))
self.assertTrue(
all(new.name != old.name for new, old in zip(gl_entries, new_gl_entries, strict=False))
)
new_naming_series_current_value = frappe.db.sql(
"SELECT current from tabSeries where name = %s", naming_series

View File

@@ -1,47 +1,49 @@
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Invoice Discounting', {
frappe.ui.form.on("Invoice Discounting", {
setup: (frm) => {
frm.set_query("sales_invoice", "invoices", (doc) => {
return {
"filters": {
"docstatus": 1,
"company": doc.company,
"outstanding_amount": [">", 0]
filters: {
docstatus: 1,
company: doc.company,
outstanding_amount: [">", 0],
},
};
});
frm.events.filter_accounts("bank_account", frm, [["account_type", "=", "Bank"]]);
frm.events.filter_accounts("bank_charges_account", frm, [["root_type", "=", "Expense"]]);
frm.events.filter_accounts("short_term_loan", frm, [["root_type", "=", "Liability"]]);
frm.events.filter_accounts("accounts_receivable_discounted", frm, [["account_type", "=", "Receivable"]]);
frm.events.filter_accounts("accounts_receivable_discounted", frm, [
["account_type", "=", "Receivable"],
]);
frm.events.filter_accounts("accounts_receivable_credit", frm, [["account_type", "=", "Receivable"]]);
frm.events.filter_accounts("accounts_receivable_unpaid", frm, [["account_type", "=", "Receivable"]]);
},
filter_accounts: (fieldname, frm, addl_filters) => {
let filters = [
["company", "=", frm.doc.company],
["is_group", "=", 0]
["is_group", "=", 0],
];
if(addl_filters){
filters = $.merge(filters , addl_filters);
if (addl_filters) {
filters = $.merge(filters, addl_filters);
}
frm.set_query(fieldname, () => { return { "filters": filters }; });
frm.set_query(fieldname, () => {
return { filters: filters };
});
},
refresh_filters: (frm) =>{
let invoice_accounts = Object.keys(frm.doc.invoices).map(function(key) {
refresh_filters: (frm) => {
let invoice_accounts = Object.keys(frm.doc.invoices).map(function (key) {
return frm.doc.invoices[key].debit_to;
});
let filters = [
["account_type", "=", "Receivable"],
["name", "not in", invoice_accounts]
["name", "not in", invoice_accounts],
];
frm.events.filter_accounts("accounts_receivable_credit", frm, filters);
frm.events.filter_accounts("accounts_receivable_discounted", frm, filters);
@@ -52,19 +54,19 @@ frappe.ui.form.on('Invoice Discounting', {
frm.events.show_general_ledger(frm);
if (frm.doc.docstatus === 0) {
frm.add_custom_button(__('Get Invoices'), function() {
frm.add_custom_button(__("Get Invoices"), function () {
frm.events.get_invoices(frm);
});
}
if (frm.doc.docstatus === 1 && frm.doc.status !== "Settled") {
if (frm.doc.status == "Sanctioned") {
frm.add_custom_button(__('Disburse Loan'), function() {
frm.add_custom_button(__("Disburse Loan"), function () {
frm.events.create_disbursement_entry(frm);
}).addClass("btn-primary");
}
if (frm.doc.status == "Disbursed") {
frm.add_custom_button(__('Close Loan'), function() {
frm.add_custom_button(__("Close Loan"), function () {
frm.events.close_loan(frm);
}).addClass("btn-primary");
}
@@ -92,119 +94,121 @@ frappe.ui.form.on('Invoice Discounting', {
calculate_total_amount: (frm) => {
let total_amount = 0.0;
for (let row of (frm.doc.invoices || [])) {
for (let row of frm.doc.invoices || []) {
total_amount += flt(row.outstanding_amount);
}
frm.set_value("total_amount", total_amount);
},
get_invoices: (frm) => {
var d = new frappe.ui.Dialog({
title: __('Get Invoices based on Filters'),
title: __("Get Invoices based on Filters"),
fields: [
{
"label": "Customer",
"fieldname": "customer",
"fieldtype": "Link",
"options": "Customer"
label: "Customer",
fieldname: "customer",
fieldtype: "Link",
options: "Customer",
},
{
"label": "From Date",
"fieldname": "from_date",
"fieldtype": "Date"
label: "From Date",
fieldname: "from_date",
fieldtype: "Date",
},
{
"label": "To Date",
"fieldname": "to_date",
"fieldtype": "Date"
label: "To Date",
fieldname: "to_date",
fieldtype: "Date",
},
{
"fieldname": "col_break",
"fieldtype": "Column Break",
fieldname: "col_break",
fieldtype: "Column Break",
},
{
"label": "Min Amount",
"fieldname": "min_amount",
"fieldtype": "Currency"
label: "Min Amount",
fieldname: "min_amount",
fieldtype: "Currency",
},
{
"label": "Max Amount",
"fieldname": "max_amount",
"fieldtype": "Currency"
}
label: "Max Amount",
fieldname: "max_amount",
fieldtype: "Currency",
},
],
primary_action: function() {
primary_action: function () {
var data = d.get_values();
frappe.call({
method: "erpnext.accounts.doctype.invoice_discounting.invoice_discounting.get_invoices",
args: {
filters: data
filters: data,
},
callback: function(r) {
if(!r.exc) {
callback: function (r) {
if (!r.exc) {
d.hide();
$.each(r.message, function(i, v) {
frm.doc.invoices = frm.doc.invoices.filter(row => row.sales_invoice);
$.each(r.message, function (i, v) {
frm.doc.invoices = frm.doc.invoices.filter((row) => row.sales_invoice);
let row = frm.add_child("invoices");
$.extend(row, v);
frm.events.refresh_filters(frm);
});
refresh_field("invoices");
}
}
},
});
},
primary_action_label: __('Get Invocies')
primary_action_label: __("Get Invocies"),
});
d.show();
},
create_disbursement_entry: (frm) => {
frappe.call({
method:"create_disbursement_entry",
method: "create_disbursement_entry",
doc: frm.doc,
callback: function(r) {
if(!r.exc){
callback: function (r) {
if (!r.exc) {
var doclist = frappe.model.sync(r.message);
frappe.set_route("Form", doclist[0].doctype, doclist[0].name);
}
}
},
});
},
close_loan: (frm) => {
frappe.call({
method:"close_loan",
method: "close_loan",
doc: frm.doc,
callback: function(r) {
if(!r.exc){
callback: function (r) {
if (!r.exc) {
var doclist = frappe.model.sync(r.message);
frappe.set_route("Form", doclist[0].doctype, doclist[0].name);
}
}
},
});
},
show_general_ledger: (frm) => {
if(frm.doc.docstatus > 0) {
cur_frm.add_custom_button(__('Accounting Ledger'), function() {
frappe.route_options = {
voucher_no: frm.doc.name,
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)",
show_cancelled_entries: frm.doc.docstatus === 2
};
frappe.set_route("query-report", "General Ledger");
}, __("View"));
if (frm.doc.docstatus > 0) {
cur_frm.add_custom_button(
__("Accounting Ledger"),
function () {
frappe.route_options = {
voucher_no: frm.doc.name,
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)",
show_cancelled_entries: frm.doc.docstatus === 2,
};
frappe.set_route("query-report", "General Ledger");
},
__("View")
);
}
}
},
});
frappe.ui.form.on('Discounted Invoice', {
frappe.ui.form.on("Discounted Invoice", {
sales_invoice: (frm) => {
frm.events.calculate_total_amount(frm);
frm.events.refresh_filters(frm);
@@ -212,5 +216,5 @@ frappe.ui.form.on('Discounted Invoice', {
invoices_remove: (frm) => {
frm.events.calculate_total_amount(frm);
frm.events.refresh_filters(frm);
}
},
});

View File

@@ -83,9 +83,7 @@ class InvoiceDiscounting(AccountsController):
frappe.throw(
_(
"Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2}"
).format(
record.idx, frappe.bold(actual_outstanding), frappe.bold(record.sales_invoice)
)
).format(record.idx, frappe.bold(actual_outstanding), frappe.bold(record.sales_invoice))
)
def calculate_total_amount(self):
@@ -105,7 +103,9 @@ class InvoiceDiscounting(AccountsController):
self.status = status
self.db_set("status", status)
for d in self.invoices:
frappe.get_doc("Sales Invoice", d.sales_invoice).set_status(update=True, update_modified=False)
frappe.get_doc("Sales Invoice", d.sales_invoice).set_status(
update=True, update_modified=False
)
else:
self.status = "Draft"
if self.docstatus == 1:

View File

@@ -1,21 +1,16 @@
frappe.listview_settings['Invoice Discounting'] = {
frappe.listview_settings["Invoice Discounting"] = {
add_fields: ["status"],
get_indicator: function(doc)
{
if(doc.status == "Draft") {
get_indicator: function (doc) {
if (doc.status == "Draft") {
return [__("Draft"), "red", "status,=,Draft"];
}
else if(doc.status == "Sanctioned") {
} else if (doc.status == "Sanctioned") {
return [__("Sanctioned"), "green", "status,=,Sanctioned"];
}
else if(doc.status == "Disbursed") {
} else if (doc.status == "Disbursed") {
return [__("Disbursed"), "blue", "status,=,Disbursed"];
}
else if(doc.status == "Settled") {
} else if (doc.status == "Settled") {
return [__("Settled"), "orange", "status,=,Settled"];
}
else if(doc.status == "Canceled") {
} else if (doc.status == "Canceled") {
return [__("Canceled"), "red", "status,=,Canceled"];
}
}
},
};

View File

@@ -75,8 +75,8 @@ class TestInvoiceDiscounting(unittest.TestCase):
gle = get_gl_entries("Invoice Discounting", inv_disc.name)
expected_gle = {inv.debit_to: [0.0, 200], self.ar_credit: [200, 0.0]}
for i, gle in enumerate(gle):
self.assertEqual([gle.debit, gle.credit], expected_gle.get(gle.account))
for _i, gle_value in enumerate(gle):
self.assertEqual([gle_value.debit, gle_value.credit], expected_gle.get(gle_value.account))
def test_loan_on_submit(self):
inv = create_sales_invoice(rate=300)
@@ -92,9 +92,7 @@ class TestInvoiceDiscounting(unittest.TestCase):
period=60,
)
self.assertEqual(inv_disc.status, "Sanctioned")
self.assertEqual(
inv_disc.loan_end_date, add_days(inv_disc.loan_start_date, inv_disc.loan_period)
)
self.assertEqual(inv_disc.loan_end_date, add_days(inv_disc.loan_start_date, inv_disc.loan_period))
def test_on_disbursed(self):
inv = create_sales_invoice(rate=500)
@@ -262,13 +260,9 @@ class TestInvoiceDiscounting(unittest.TestCase):
je_on_payment.submit()
self.assertEqual(je_on_payment.accounts[0].account, self.ar_discounted)
self.assertEqual(
je_on_payment.accounts[0].credit_in_account_currency, flt(inv.outstanding_amount)
)
self.assertEqual(je_on_payment.accounts[0].credit_in_account_currency, flt(inv.outstanding_amount))
self.assertEqual(je_on_payment.accounts[1].account, self.bank_account)
self.assertEqual(
je_on_payment.accounts[1].debit_in_account_currency, flt(inv.outstanding_amount)
)
self.assertEqual(je_on_payment.accounts[1].debit_in_account_currency, flt(inv.outstanding_amount))
inv.reload()
self.assertEqual(inv.outstanding_amount, 0)
@@ -304,13 +298,9 @@ class TestInvoiceDiscounting(unittest.TestCase):
je_on_payment.submit()
self.assertEqual(je_on_payment.accounts[0].account, self.ar_unpaid)
self.assertEqual(
je_on_payment.accounts[0].credit_in_account_currency, flt(inv.outstanding_amount)
)
self.assertEqual(je_on_payment.accounts[0].credit_in_account_currency, flt(inv.outstanding_amount))
self.assertEqual(je_on_payment.accounts[1].account, self.bank_account)
self.assertEqual(
je_on_payment.accounts[1].debit_in_account_currency, flt(inv.outstanding_amount)
)
self.assertEqual(je_on_payment.accounts[1].debit_in_account_currency, flt(inv.outstanding_amount))
inv.reload()
self.assertEqual(inv.outstanding_amount, 0)

View File

@@ -1,27 +1,49 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Item Tax Template', {
setup: function(frm) {
frm.set_query("tax_type", "taxes", function(doc) {
frappe.ui.form.on("Item Tax Template", {
setup: function (frm) {
frm.set_query("tax_type", "taxes", function (doc) {
return {
filters: [
['Account', 'company', '=', frm.doc.company],
['Account', 'is_group', '=', 0],
['Account', 'account_type', 'in', ['Tax', 'Chargeable', 'Income Account', 'Expense Account', 'Expenses Included In Valuation']]
]
}
["Account", "company", "=", frm.doc.company],
["Account", "is_group", "=", 0],
[
"Account",
"account_type",
"in",
[
"Tax",
"Chargeable",
"Income Account",
"Expense Account",
"Expenses Included In Valuation",
],
],
],
};
});
},
company: function (frm) {
frm.set_query("tax_type", "taxes", function(doc) {
frm.set_query("tax_type", "taxes", function (doc) {
return {
filters: [
['Account', 'company', '=', frm.doc.company],
['Account', 'is_group', '=', 0],
['Account', 'account_type', 'in', ['Tax', 'Chargeable', 'Income Account', 'Expense Account', 'Expenses Included In Valuation']]
]
}
["Account", "company", "=", frm.doc.company],
["Account", "is_group", "=", 0],
[
"Account",
"account_type",
"in",
[
"Tax",
"Chargeable",
"Income Account",
"Expense Account",
"Expenses Included In Valuation",
],
],
],
};
});
}
},
});

View File

@@ -32,7 +32,7 @@ class ItemTaxTemplate(Document):
def autoname(self):
if self.company and self.title:
abbr = frappe.get_cached_value("Company", self.company, "abbr")
self.name = "{0} - {1}".format(self.title, abbr)
self.name = f"{self.title} - {abbr}"
def validate_tax_accounts(self):
"""Check whether Tax Rate is not entered twice for same Tax Type"""

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