Compare commits

..

1007 Commits

Author SHA1 Message Date
Frappe PR Bot
01f9139ebd chore(release): Bumped to Version 15.37.0
# [15.37.0](https://github.com/frappe/erpnext/compare/v15.36.4...v15.37.0) (2024-09-30)

### Features

* added 'cost of new capitalized asset' column ([96d8b52](96d8b5242d))
2024-09-30 17:21:09 +00:00
rohitwaghchaure
4be557bdce Merge pull request #43453 from frappe/mergify/bp/version-15/pr-43412
feat: added 'cost of new capitalized asset' column (backport #43399) (backport #43412)
2024-09-30 22:49:53 +05:30
Khushi Rawat
96d8b5242d feat: added 'cost of new capitalized asset' column
(cherry picked from commit 1eb9cc33fc)
(cherry picked from commit 27cd51e267)
2024-09-30 15:45:59 +00:00
Frappe PR Bot
2d09ef2509 chore(release): Bumped to Version 15.36.4
## [15.36.4](https://github.com/frappe/erpnext/compare/v15.36.3...v15.36.4) (2024-09-29)

### Bug Fixes

* Data missing in table: None, MandatoryError (backport [#43422](https://github.com/frappe/erpnext/issues/43422)) ([#43429](https://github.com/frappe/erpnext/issues/43429)) ([2c4610c](2c4610c021))
2024-09-29 16:38:13 +00:00
rohitwaghchaure
8b5997e38f Merge pull request #43431 from frappe/mergify/bp/version-15/pr-43429
fix: Data missing in table: None, MandatoryError (backport #43422) (backport #43429)
2024-09-29 22:07:02 +05:30
mergify[bot]
2c4610c021 fix: Data missing in table: None, MandatoryError (backport #43422) (#43429)
fix: Data missing in table: None, MandatoryError (#43422)

(cherry picked from commit 8e33e0e1d2)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
(cherry picked from commit 4b3f143f83)
2024-09-29 15:57:24 +00:00
Frappe PR Bot
e706aa692a chore(release): Bumped to Version 15.36.3
## [15.36.3](https://github.com/frappe/erpnext/compare/v15.36.2...v15.36.3) (2024-09-27)

### Bug Fixes

* Ignore transaction deletion check on ledger entry insertion ([c1f14f2](c1f14f2991))
2024-09-27 18:30:37 +00:00
Deepesh Garg
a5fa287dad Merge pull request #43413 from frappe/mergify/bp/version-15/pr-43411
fix: Ignore transaction deletion check on ledger entry insertion (#43410)
2024-09-27 23:58:16 +05:30
Deepesh Garg
c1f14f2991 fix: Ignore transaction deletion check on ledger entry insertion
(cherry picked from commit 998f6a92a4)
(cherry picked from commit 1d6f97ad94)
2024-09-27 18:25:49 +00:00
Frappe PR Bot
8d188dccd7 chore(release): Bumped to Version 15.36.2
## [15.36.2](https://github.com/frappe/erpnext/compare/v15.36.1...v15.36.2) (2024-09-25)

### Bug Fixes

* add currency in financial statement ([927f800](927f80035d))
* added date condition ([0e18845](0e1884539e))
* AR / AP report to ignore 0.0 outstanding ([979d801](979d801de5))
* **Bank Account:** dashboard connections (backport [#43365](https://github.com/frappe/erpnext/issues/43365)) ([#43367](https://github.com/frappe/erpnext/issues/43367)) ([cfea2de](cfea2de131))
* change dynamic link doctype fieldtype to data ([05c92cc](05c92cce71))
* closing amount reset to expected amount on save (backport [#43358](https://github.com/frappe/erpnext/issues/43358)) ([#43368](https://github.com/frappe/erpnext/issues/43368)) ([0722aa5](0722aa5a3f))
* create_address is failing ([557ef5d](557ef5d214))
* handle missing liability account scenario in `set_liability_account` ([4045928](40459288f6))
* incorrect outstanding on non-pos invoice with write_off_account ([f89a3db](f89a3dbb65))
* incorrect stock balance for inventory dimension (backport [#43284](https://github.com/frappe/erpnext/issues/43284)) ([#43290](https://github.com/frappe/erpnext/issues/43290)) ([f6725e2](f6725e2eed))
* item_query in pos_invoice ([99e004b](99e004b619))
* make to tax category on tax rule to filter with percent ([63d4fdd](63d4fddb49))
* **minor:** include condition to check docstatus ([1f42302](1f42302997))
* not able to cancel Quality Inspection (backport [#43374](https://github.com/frappe/erpnext/issues/43374)) ([#43375](https://github.com/frappe/erpnext/issues/43375)) ([40fbb1d](40fbb1d6ff))
* partial return on POS invoice ([998fef7](998fef779b))
* partial return on POS invoice ([b99ca7d](b99ca7d9e9))
* Payment Ledger Report currency fieldtype fix ([ad2d6a1](ad2d6a1625))
* **Payment Reconciliation:** German translations ([e06a01f](e06a01fae5))
* set group_by condition if empty and voucher_no is set ([ec27077](ec27077d9c))
* shipping rule must match the company ([085a4c6](085a4c61ac))
* show chart tool tip in report currency ([e5ae828](e5ae828580))
* stock dashboard (backport [#43347](https://github.com/frappe/erpnext/issues/43347)) ([#43349](https://github.com/frappe/erpnext/issues/43349)) ([176feb2](176feb20ad))
* transaction exchange rate on GL's for Multi currency Journals ([a7ccc94](a7ccc9420b))
* translate in js ([84e26e2](84e26e21ab))
* Translation for button SO to PO ([73d98ad](73d98addbc))
* ui clean-up (backport [#43305](https://github.com/frappe/erpnext/issues/43305)) ([#43312](https://github.com/frappe/erpnext/issues/43312)) ([7e6d6f0](7e6d6f08a2))
* update clearance date in invoice payment table ([10ecdb9](10ecdb99fe))
2024-09-25 04:40:17 +00:00
ruthra kumar
9de0d4329c Merge pull request #43361 from frappe/version-15-hotfix
chore: release v15
2024-09-25 10:09:04 +05:30
mergify[bot]
40fbb1d6ff fix: not able to cancel Quality Inspection (backport #43374) (#43375)
fix: not able to cancel Quality Inspection (#43374)

(cherry picked from commit 8c32ebee68)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-25 00:02:24 +05:30
mergify[bot]
0722aa5a3f fix: closing amount reset to expected amount on save (backport #43358) (#43368)
fix: closing amount reset to expected amount on save (#43358)

(cherry picked from commit 9974b7c4ae)

Co-authored-by: jabir-elat <44110258+jabir-elat@users.noreply.github.com>
2024-09-24 20:49:42 +05:30
mergify[bot]
cfea2de131 fix(Bank Account): dashboard connections (backport #43365) (#43367)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
fix(Bank Account): dashboard connections (#43365)
2024-09-24 16:20:50 +02:00
Khushi Rawat
fe206b0d77 Merge pull request #43370 from khushi8112/manual-backport-for-asset-depreciation-and-balances-report-fix
fix: Manual backport for asset depreciation and balances report fix
2024-09-24 18:49:01 +05:30
Khushi Rawat
4e621b09ba style: added comment 2024-09-24 18:18:04 +05:30
Khushi Rawat
1f42302997 fix(minor): include condition to check docstatus 2024-09-24 18:17:25 +05:30
Khushi Rawat
0e1884539e fix: added date condition 2024-09-24 18:16:37 +05:30
ruthra kumar
b17a811abf Merge pull request #43364 from frappe/mergify/bp/version-15-hotfix/pr-43356
fix: AR / AP report to ignore 0.0 outstanding (backport #43356)
2024-09-24 16:58:35 +05:30
ruthra kumar
979d801de5 fix: AR / AP report to ignore 0.0 outstanding
(cherry picked from commit 6e2cf79e2c)
2024-09-24 10:14:53 +00:00
ruthra kumar
49d5b7c4d3 Merge pull request #43360 from frappe/mergify/bp/version-15-hotfix/pr-43235
fix: set group_by condition to "Group by Voucher (Consolidated)" if `None` and voucher_no is set (backport #43235)
2024-09-24 15:41:15 +05:30
mergify[bot]
176feb20ad fix: stock dashboard (backport #43347) (#43349)
fix: stock dashboard (#43347)

(cherry picked from commit 9e8be8db51)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-24 15:25:42 +05:30
Vishakh Desai
ec27077d9c fix: set group_by condition if empty and voucher_no is set
(cherry picked from commit a6b0cb6cac)
2024-09-24 09:24:28 +00:00
ruthra kumar
7db135dab5 Merge pull request #43353 from frappe/mergify/bp/version-15-hotfix/pr-43310
fix: update clearance date in invoice payment table (backport #43310)
2024-09-24 11:20:43 +05:30
Kavin
8bc76bae9c refactor: update clearance date in payment entry
(cherry picked from commit c218f7527f)
2024-09-24 05:29:49 +00:00
Kavin
9d2cbccff2 test: add test case for updating clearance date on pos invoice
(cherry picked from commit ce8600520f)
2024-09-24 05:29:49 +00:00
Kavin
10ecdb99fe fix: update clearance date in invoice payment table
(cherry picked from commit 487c2a29a6)
2024-09-24 05:29:49 +00:00
ruthra kumar
2aa1380c81 Merge pull request #43351 from frappe/mergify/bp/version-15-hotfix/pr-43257
fix: item_query in pos_invoice (backport #43257)
2024-09-24 10:27:33 +05:30
ljain112
99e004b619 fix: item_query in pos_invoice
(cherry picked from commit 7f82a06e65)
2024-09-24 02:56:24 +00:00
ruthra kumar
b415e858e7 Merge pull request #43346 from frappe/mergify/bp/version-15-hotfix/pr-43283
fix: shipping rule must match the company (backport #43283)
2024-09-24 08:25:18 +05:30
Nihantra C. Patel
4cec68c7ad Merge pull request #43343 from frappe/mergify/bp/version-15-hotfix/pr-43253
fix: partial return on POS invoice (backport #43253)
2024-09-23 23:36:04 +05:30
barredterra
085a4c61ac fix: shipping rule must match the company
(cherry picked from commit df8f4086f6)
2024-09-23 14:41:18 +00:00
ruthra kumar
5f08ef5cd1 Merge pull request #43344 from frappe/mergify/bp/version-15-hotfix/pr-43299
fix(Payment Reconciliation): German translations (backport #43299)
2024-09-23 20:07:53 +05:30
barredterra
e06a01fae5 fix(Payment Reconciliation): German translations
(cherry picked from commit 32d4f96e02)
2024-09-23 14:35:49 +00:00
Nihantra C. Patel
998fef779b fix: partial return on POS invoice
(cherry picked from commit 18bdd06652)
2024-09-23 14:26:21 +00:00
Nihantra C. Patel
b99ca7d9e9 fix: partial return on POS invoice
(cherry picked from commit 76289fa8dc)
2024-09-23 14:26:21 +00:00
ruthra kumar
0fd2964032 Merge pull request #43336 from frappe/mergify/bp/version-15-hotfix/pr-43316
fix: incorrect outstanding on non-pos invoice with write_off_account (backport #43316)
2024-09-23 18:22:30 +05:30
ruthra kumar
15baa3f305 Merge pull request #43338 from frappe/mergify/bp/version-15-hotfix/pr-43308
fix: show chart tool tip in report currency (backport #43308)
2024-09-23 18:22:06 +05:30
ruthra kumar
5920525369 Merge pull request #43340 from frappe/mergify/bp/version-15-hotfix/pr-43307
fix: change dynamic link doctype fieldtype to data (backport #43307)
2024-09-23 18:21:48 +05:30
venkat102
05c92cce71 fix: change dynamic link doctype fieldtype to data
(cherry picked from commit 1e46f7344a)
2024-09-23 12:23:52 +00:00
ruthra kumar
a0f01dac1a Merge pull request #43334 from frappe/mergify/bp/version-15-hotfix/pr-43331
fix: transaction exchange rate on GL's for Multi currency Journals (backport #43331)
2024-09-23 17:52:51 +05:30
ruthra kumar
e8c174c12b Merge pull request #43333 from frappe/mergify/bp/version-15-hotfix/pr-43321
fix: handle missing liability account scenario in `set_liability_account` (backport #43321)
2024-09-23 17:50:06 +05:30
venkat102
927f80035d fix: add currency in financial statement
(cherry picked from commit 91a27bda84)
2024-09-23 12:11:54 +00:00
venkat102
e5ae828580 fix: show chart tool tip in report currency
(cherry picked from commit 827b3f4542)
2024-09-23 12:11:53 +00:00
ruthra kumar
f89a3dbb65 fix: incorrect outstanding on non-pos invoice with write_off_account
(cherry picked from commit d5e2906e59)
2024-09-23 12:09:50 +00:00
ruthra kumar
2d9142832d test: transaction exchange rate on multi-currency journals
(cherry picked from commit c524825d2d)
2024-09-23 12:03:59 +00:00
ruthra kumar
a7ccc9420b fix: transaction exchange rate on GL's for Multi currency Journals
(cherry picked from commit 8cd9ad5361)
2024-09-23 12:03:59 +00:00
ljain112
40459288f6 fix: handle missing liability account scenario in set_liability_account
(cherry picked from commit ee7ab4b065)
2024-09-23 12:00:39 +00:00
ruthra kumar
250a1c9341 Merge pull request #43332 from frappe/mergify/bp/version-15-hotfix/pr-43328
fix: allow tax rule filter on tax category name with % (backport #43328)
2024-09-23 17:26:06 +05:30
venkat102
63d4fddb49 fix: make to tax category on tax rule to filter with percent
(cherry picked from commit 3aaa13cb29)
2024-09-23 11:47:22 +00:00
mergify[bot]
7e6d6f08a2 fix: ui clean-up (backport #43305) (#43312)
* fix: ui clean-up (#43305)

fix: ui cleanup
(cherry picked from commit b127a0c8b7)

# Conflicts:
#	erpnext/manufacturing/doctype/bom_creator/bom_creator.json
#	erpnext/manufacturing/doctype/plant_floor/plant_floor.json
#	erpnext/public/js/templates/visual_plant_floor_template.html

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-22 11:18:42 +05:30
Smit Vora
d1c72dc27b Merge pull request #43314 from frappe/mergify/bp/version-15-hotfix/pr-42842
refactor: use common functionality to validate account number (backport #42842)
2024-09-21 07:06:49 +05:30
HENRY Florian
86ae644574 refactor: use common functionality to validate account number (#42842)
feat: Allow unique Account number by root type (not unique for accros all Accounts)
(cherry picked from commit 40d97f4fe9)
2024-09-21 01:20:03 +00:00
mergify[bot]
f6725e2eed fix: incorrect stock balance for inventory dimension (backport #43284) (#43290)
fix: incorrect stock balance for inventory dimension (#43284)

(cherry picked from commit 3e7a7a54bf)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-19 09:35:54 +05:30
ruthra kumar
e90532e406 Merge pull request #43293 from frappe/mergify/bp/version-15-hotfix/pr-43274
fix: translate in js (backport #43274)
2024-09-19 09:17:39 +05:30
Doğancan
84e26e21ab fix: translate in js
(cherry picked from commit 25faec5662)
2024-09-19 03:27:13 +00:00
Frappe PR Bot
34ca0c3bb6 chore(release): Bumped to Version 15.36.1
## [15.36.1](https://github.com/frappe/erpnext/compare/v15.36.0...v15.36.1) (2024-09-19)

### Bug Fixes

* create_address is failing ([17ad402](17ad402695))
2024-09-19 01:43:11 +00:00
ruthra kumar
42e4b8a68c Merge pull request #43287 from frappe/mergify/bp/version-15/pr-43279
fix: create_address is failing while creating customer (backport #43279)
2024-09-19 07:11:56 +05:30
ruthra kumar
34d159b3a2 Merge pull request #43213 from sameer55chauhan/patch-4
fix: Payment Ledger Report currency fieldtype fix
2024-09-19 07:05:43 +05:30
Shariq Ansari
17ad402695 fix: create_address is failing
(cherry picked from commit acc1d52ac8)
2024-09-19 01:21:13 +00:00
Shariq Ansari
953b5790ed Merge pull request #43281 from frappe/mergify/bp/version-15-hotfix/pr-43279
fix: create_address is failing while creating customer (backport #43279)
2024-09-18 22:47:56 +05:30
Shariq Ansari
557ef5d214 fix: create_address is failing
(cherry picked from commit acc1d52ac8)
2024-09-18 17:01:49 +00:00
Nihantra C. Patel
680354ac0d Merge pull request #43278 from frappe/mergify/bp/version-15-hotfix/pr-43276
fix: Translation for button SO to PO (backport #43276)
2024-09-18 21:51:03 +05:30
Nihantra C. Patel
73d98addbc fix: Translation for button SO to PO
(cherry picked from commit a5275e9f28)
2024-09-18 16:14:54 +00:00
Frappe PR Bot
479e8573c2 chore(release): Bumped to Version 15.36.0
# [15.36.0](https://github.com/frappe/erpnext/compare/v15.35.2...v15.36.0) (2024-09-18)

### Bug Fixes

* A project without tasks should be able to complete ([dea735d](dea735de4d))
* add currency in options for rate field in pricing rule ([782c9dd](782c9dda1a))
* batch based item price not working (backport [#43172](https://github.com/frappe/erpnext/issues/43172)) ([#43206](https://github.com/frappe/erpnext/issues/43206)) ([61a42ea](61a42ea5d7))
* cancel cost center allocation and journal entry after test ([3d29007](3d29007aeb))
* consistent behaviour on refresh ([01f3068](01f30682ee))
* create and link address while creating prospect & customer ([d6a3d0d](d6a3d0d468))
* create fiscal year without overlapping existing Fiscal Years ([78768f8](78768f883c))
* currency changing while making PO from Supplier Quotation (backport [#43187](https://github.com/frappe/erpnext/issues/43187)) ([#43205](https://github.com/frappe/erpnext/issues/43205)) ([ef6b172](ef6b172616))
* delete exchange gain loss journal entry while deleting payment entry ([5789de2](5789de25b9))
* do not auto apply tds in purchase order ([741c18b](741c18b144))
* do not check appy_tds in Purchase Order Automatically ([5edebb2](5edebb28a5))
* do not validate purchase document for composite asset ([c505156](c5051561e4))
* fetch cost center allocation percentage only from the applicable allocation ([0fe901a](0fe901a137))
* hide and reset discount control on new POS order ([42494db](42494db3c7))
* **holiday-list:** use same date format for same holiday error message (backport [#42606](https://github.com/frappe/erpnext/issues/42606)) ([#43222](https://github.com/frappe/erpnext/issues/43222)) ([f101a1c](f101a1ce3b))
* ignore repost logic on Payment Reconciliation ([d91013a](d91013a467))
* invalid gp calculation ([291f0a5](291f0a580b))
* item list view in website (backport [#43165](https://github.com/frappe/erpnext/issues/43165)) ([#43207](https://github.com/frappe/erpnext/issues/43207)) ([c1a6c56](c1a6c56217))
* map rows on journal entry by validating account, party, debit and credit value ([86e1818](86e1818420))
* prevent KeyError by checking `report_filter` existence ([984acb6](984acb661d))
* revert 091c5496b2 ([2ad6d63](2ad6d637ee))
* set party_type null when payment_type is changed to Internal Transfer ([45ff8fa](45ff8fa296))
* set tax_withholding_category from Purchase Order while creating pi form po ([7027be8](7027be8fbc))
* tds workflow in purchase order ([11359bd](11359bd235))
* typo with po_date when creating remarks ([1657a83](1657a83151))
* updated filtering in depreciation and balances report ([78c6839](78c68397d9))
* **ux:** set amount based on account currency while adding new row ([f7cedac](f7cedac526))
* **ux:** set amount on foreign currency when foreign currency account is selected on last row of journal ([d8d4cd2](d8d4cd23a5))

### Features

* API for crm integration ([f060534](f060534625))
2024-09-18 07:32:30 +00:00
ruthra kumar
6a0b15211a Merge pull request #43254 from frappe/version-15-hotfix
chore: release v15
2024-09-18 13:01:08 +05:30
ruthra kumar
7aeadcbf98 Merge pull request #43268 from frappe/mergify/bp/version-15-hotfix/pr-43239
fix: add currency in options for rate field in pricing rule (backport #43239)
2024-09-18 12:28:59 +05:30
ruthra kumar
82982e25c6 chore: resolve conflict 2024-09-18 12:10:42 +05:30
krishna
782c9dda1a fix: add currency in options for rate field in pricing rule
(cherry picked from commit 636c0131fa)

# Conflicts:
#	erpnext/accounts/doctype/pricing_rule/pricing_rule.json
2024-09-18 06:29:42 +00:00
ruthra kumar
dfe47261ae Merge pull request #43266 from frappe/mergify/bp/version-15-hotfix/pr-43216
fix: get cost center allocation percentage only from the applicable allocation (backport #43216)
2024-09-18 11:40:02 +05:30
venkat102
3d29007aeb fix: cancel cost center allocation and journal entry after test
(cherry picked from commit 3c65b98b49)
2024-09-18 05:49:34 +00:00
venkat102
52a161f076 test: add unit test for validating multiple cost center allocation with different child cost center
(cherry picked from commit 4d5d6150e1)
2024-09-18 05:49:34 +00:00
venkat102
0fe901a137 fix: fetch cost center allocation percentage only from the applicable allocation
(cherry picked from commit 36e5945c66)
2024-09-18 05:49:34 +00:00
Khushi Rawat
8c28cb6b25 Merge pull request #43264 from frappe/mergify/bp/version-15-hotfix/pr-43210
fix: updated filtering in depreciation and balances report (backport #43210)
2024-09-18 02:13:54 +05:30
Khushi Rawat
4ba37e49d8 chore: resolved failing check
(cherry picked from commit af52f0e71f)
2024-09-17 20:27:32 +00:00
Khushi Rawat
1e89c007ed chore: resolved linter check with #nosemgrep
(cherry picked from commit 8c8e25214c)
2024-09-17 20:27:32 +00:00
Khushi Rawat
78c68397d9 fix: updated filtering in depreciation and balances report
(cherry picked from commit 3a34eecdcf)
2024-09-17 20:27:32 +00:00
ruthra kumar
f61cec27ae Merge pull request #43259 from frappe/mergify/bp/version-15-hotfix/pr-43226
fix: map rows on journal entry by validating account, party, debit and credit value (backport #43226)
2024-09-17 20:22:59 +05:30
Navin-S-R
78768f883c fix: create fiscal year without overlapping existing Fiscal Years
(cherry picked from commit 720a330617)
2024-09-17 14:35:39 +00:00
Navin-S-R
edcdfdd194 refactor: update formatting changes
(cherry picked from commit 768bb0312a)
2024-09-17 14:35:39 +00:00
ruthra kumar
861edb438b refactor(test): make use existing test data and dynamic fy creation
(cherry picked from commit f45638015f)
2024-09-17 14:35:39 +00:00
ruthra kumar
d91013a467 fix: ignore repost logic on Payment Reconciliation
(cherry picked from commit 75babd4c18)
2024-09-17 14:35:39 +00:00
Navin-S-R
310b131469 test: reconcile payment jv from closed fiscal year
(cherry picked from commit f47ea46806)
2024-09-17 14:35:39 +00:00
Navin-S-R
86e1818420 fix: map rows on journal entry by validating account, party, debit and credit value
(cherry picked from commit b634aa9cfb)
2024-09-17 14:35:38 +00:00
ruthra kumar
5fe347c909 Merge pull request #43249 from frappe/mergify/bp/version-15-hotfix/pr-43188
fix: invalid gp calculation (backport #43188)
2024-09-17 14:34:58 +05:30
Khushi Rawat
44dde1c58d Merge pull request #43243 from frappe/mergify/bp/version-15-hotfix/pr-43233
fix: do not validate purchase document for composite asset (backport #43233)
2024-09-17 12:31:24 +05:30
Dany Robert
291f0a580b fix: invalid gp calculation
(cherry picked from commit c79851239c)
2024-09-17 06:33:19 +00:00
ruthra kumar
9c4eaa230c Merge pull request #43246 from frappe/mergify/bp/version-15-hotfix/pr-42969
fix: A project without tasks should be able to complete (backport #42969)
2024-09-17 10:43:18 +05:30
Frappe PR Bot
28f1f9355d chore(release): Bumped to Version 15.35.2
## [15.35.2](https://github.com/frappe/erpnext/compare/v15.35.1...v15.35.2) (2024-09-17)

### Bug Fixes

* currency changing while making PO from Supplier Quotation (backport [#43187](https://github.com/frappe/erpnext/issues/43187)) ([#43205](https://github.com/frappe/erpnext/issues/43205)) ([2f56ba7](2f56ba7f42))
2024-09-17 05:00:07 +00:00
ruthra kumar
41db9d3886 Merge pull request #43209 from frappe/mergify/bp/version-15/pr-43205
fix: currency changing while making PO from Supplier Quotation (backport #43187) (backport #43205)
2024-09-17 10:28:43 +05:30
ruthra kumar
53c4c153ca Merge pull request #43245 from frappe/mergify/bp/version-15-hotfix/pr-43225
fix(ux): set amount based on account currency while adding new row (backport #43225)
2024-09-17 10:26:43 +05:30
ruthra kumar
bee27f314f Merge pull request #43230 from frappe/mergify/bp/version-15-hotfix/pr-43212
fix: prevent KeyError by checking `report_filter` existence (backport #43212)
2024-09-17 10:23:58 +05:30
ruthra kumar
c9b6b0d868 refactor(test): fix linter
(cherry picked from commit 4eeae8011e)
2024-09-17 04:49:45 +00:00
lukas.brandhoff
dea735de4d fix: A project without tasks should be able to complete
(cherry picked from commit 268962c25f)
2024-09-17 04:49:44 +00:00
Navin-S-R
f7cedac526 fix(ux): set amount based on account currency while adding new row
(cherry picked from commit 0ff04f774d)
2024-09-17 04:48:42 +00:00
Khushi Rawat
c5051561e4 fix: do not validate purchase document for composite asset
(cherry picked from commit 5fd058dde9)
2024-09-16 18:48:26 +00:00
Shariq Ansari
48158fbde0 Merge pull request #43242 from frappe/mergify/bp/version-15-hotfix/pr-43238
fix: create and link address while creating prospect & customer (backport #43238)
2024-09-16 22:47:00 +05:30
Shariq Ansari
d6a3d0d468 fix: create and link address while creating prospect & customer
(cherry picked from commit 035c15794c)
2024-09-16 16:46:01 +00:00
Smit Vora
30e9f08f37 Merge pull request #43241 from frappe/mergify/bp/version-15-hotfix/pr-43176
fix: hide and reset discount control on new POS order (backport #43176)
2024-09-16 20:01:26 +05:30
ljain112
42494db3c7 fix: hide and reset discount control on new POS order
(cherry picked from commit 5b0053f8dd)
2024-09-16 14:25:20 +00:00
Smit Vora
a6a2b2daae Merge pull request #43237 from frappe/mergify/bp/version-15-hotfix/pr-42849
fix: TDS workflow consistency in Purchase Order (backport #42849)
2024-09-16 19:41:33 +05:30
ljain112
741c18b144 fix: do not auto apply tds in purchase order
(cherry picked from commit 0b942a0614)
2024-09-16 13:16:15 +00:00
ljain112
7027be8fbc fix: set tax_withholding_category from Purchase Order while creating pi form po
(cherry picked from commit b9048ca6fa)
2024-09-16 13:16:15 +00:00
ljain112
01f30682ee fix: consistent behaviour on refresh
(cherry picked from commit b216d71278)
2024-09-16 13:16:15 +00:00
ljain112
5edebb28a5 fix: do not check appy_tds in Purchase Order Automatically
(cherry picked from commit be6c174b43)
2024-09-16 13:16:14 +00:00
ljain112
11359bd235 fix: tds workflow in purchase order
(cherry picked from commit a7888b26a7)
2024-09-16 13:16:13 +00:00
ljain112
2ad6d637ee fix: revert 091c5496b2
(cherry picked from commit eeb6e75dcf)
2024-09-16 13:16:12 +00:00
ruthra kumar
564ff034b7 Merge pull request #43232 from frappe/mergify/bp/version-15-hotfix/pr-43224
fix(ux): set amount on foreign currency when foreign currency account… (backport #43224)
2024-09-16 13:49:32 +05:30
venkat102
d8d4cd23a5 fix(ux): set amount on foreign currency when foreign currency account is selected on last row of journal
(cherry picked from commit 2b66842d34)
2024-09-16 06:16:09 +00:00
ljain112
984acb661d fix: prevent KeyError by checking report_filter existence
(cherry picked from commit c1d2cc2c14)
2024-09-16 03:48:37 +00:00
Shariq Ansari
00f144ed68 Merge pull request #43223 from frappe/mergify/bp/version-15-hotfix/pr-43198
feat: API for crm integration (backport #43198)
2024-09-14 14:46:14 +05:30
Nabin Hait
f060534625 feat: API for crm integration
(cherry picked from commit b7bf9f80f2)
2024-09-14 08:59:51 +00:00
mergify[bot]
f101a1ce3b fix(holiday-list): use same date format for same holiday error message (backport #42606) (#43222)
fix(holiday-list): use same date format for same holiday error message (#42606)

* fix(holiday-list): use same date format for same holiday error message

* chore: fix formatting

---------

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
(cherry picked from commit a435441536)

Co-authored-by: Ananyobrata Pal <74728797+ananyo141@users.noreply.github.com>
2024-09-14 13:36:26 +05:30
sameer Chauhan
ad2d6a1625 fix: Payment Ledger Report currency fieldtype fix 2024-09-13 17:32:44 +05:30
mergify[bot]
2f56ba7f42 fix: currency changing while making PO from Supplier Quotation (backport #43187) (#43205)
fix: currency changing while making PO from Supplier Quotation (#43187)

(cherry picked from commit 2b96e37c34)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
(cherry picked from commit ef6b172616)
2024-09-13 08:01:44 +00:00
mergify[bot]
ef6b172616 fix: currency changing while making PO from Supplier Quotation (backport #43187) (#43205)
fix: currency changing while making PO from Supplier Quotation (#43187)

(cherry picked from commit 2b96e37c34)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-13 13:30:36 +05:30
mergify[bot]
61a42ea5d7 fix: batch based item price not working (backport #43172) (#43206)
* fix: batch based item price not working (#43172)

(cherry picked from commit d9e4ed13cb)

# Conflicts:
#	erpnext/stock/get_item_details.py

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-13 13:30:12 +05:30
mergify[bot]
c1a6c56217 fix: item list view in website (backport #43165) (#43207)
fix: item list view in website (#43165)

(cherry picked from commit ce34bb9793)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-13 13:29:58 +05:30
ruthra kumar
b7e95bfd22 Merge pull request #43202 from frappe/mergify/bp/version-15-hotfix/pr-43191
fix: delete exchange gain loss journal entry while deleting payment entry (backport #43191)
2024-09-13 11:22:46 +05:30
ruthra kumar
7989bc23e1 Merge pull request #43204 from frappe/mergify/bp/version-15-hotfix/pr-43192
refactor(test): use test fixture on pricing rule test suite (backport #43192)
2024-09-13 11:22:13 +05:30
ruthra kumar
055e7820c8 refactor(test): use test fixture on pricing rule test suite
(cherry picked from commit 0ea1d6d960)
2024-09-13 05:20:22 +00:00
Navin-S-R
d618c9a481 test: add unit test for deletion of gain loss jv while deleting payment entry
(cherry picked from commit 7855d3034b)
2024-09-13 05:19:05 +00:00
Navin-S-R
5789de25b9 fix: delete exchange gain loss journal entry while deleting payment entry
(cherry picked from commit 9886cf0d46)
2024-09-13 05:19:04 +00:00
Sagar Vora
4df38d357f Merge pull request #43186 from frappe/mergify/bp/version-15-hotfix/pr-43171
fix: set `party_type` null when `payment_type` is changed to `Internal Transfer` (backport #43171)
2024-09-12 12:03:28 +05:30
Vishakh Desai
45ff8fa296 fix: set party_type null when payment_type is changed to Internal Transfer
(cherry picked from commit 502cf0eb8d)
2024-09-12 06:32:46 +00:00
Frappe PR Bot
7f95e42bec chore(release): Bumped to Version 15.35.1
## [15.35.1](https://github.com/frappe/erpnext/compare/v15.35.0...v15.35.1) (2024-09-12)

### Bug Fixes

* typo with po_date when creating remarks ([31e0bb4](31e0bb477e))
2024-09-12 06:11:04 +00:00
ruthra kumar
578ddb9be4 Merge pull request #43184 from frappe/mergify/bp/version-15/pr-43182
fix: typo with po_date when creating remarks (backport #43182)
2024-09-12 11:39:39 +05:30
ruthra kumar
28607f0026 Merge pull request #43183 from frappe/mergify/bp/version-15-hotfix/pr-43182
fix: typo with po_date when creating remarks (backport #43182)
2024-09-12 11:30:53 +05:30
Smit Vora
31e0bb477e fix: typo with po_date when creating remarks
(cherry picked from commit a55502e0f1)
2024-09-12 05:47:40 +00:00
Smit Vora
1657a83151 fix: typo with po_date when creating remarks
(cherry picked from commit a55502e0f1)
2024-09-12 05:45:00 +00:00
ruthra kumar
aab91a2307 Merge pull request #43169 from ruthra-kumar/no_copy_on_purchase_invoice_status
refactor: enable no-copy on Purchase Invoice status
2024-09-11 13:25:33 +05:30
ruthra kumar
0d9741fdd7 refactor: enable no-copy on Purchase Invoice status 2024-09-11 13:03:20 +05:30
Frappe PR Bot
d9d86dae35 chore(release): Bumped to Version 15.35.0
# [15.35.0](https://github.com/frappe/erpnext/compare/v15.34.2...v15.35.0) (2024-09-11)

### Bug Fixes

* `default_advance_account` field in Process Payment Reconciliation ([75cb298](75cb29890d))
* bom cost update is not working (backport [#43155](https://github.com/frappe/erpnext/issues/43155)) ([#43157](https://github.com/frappe/erpnext/issues/43157)) ([8c8dc24](8c8dc241e5))
* cancel common party advance jv while canceling the invoice ([9bd3d7a](9bd3d7a020))
* Cannot read properties of null (reading 'doc') (backport [#43071](https://github.com/frappe/erpnext/issues/43071)) ([#43118](https://github.com/frappe/erpnext/issues/43118)) ([80b5c16](80b5c16a2e))
* check multi-currency on jv for common party accounting with foreign currency ([d17badd](d17baddb0d))
* concurrency issue while picking materials (backport [#43087](https://github.com/frappe/erpnext/issues/43087)) ([#43152](https://github.com/frappe/erpnext/issues/43152)) ([cd57e00](cd57e009dd))
* **Delivery Note:** translatability of validation errors ([ea4f736](ea4f7365ea))
* ensure `SellingController.onload` gets called for SO & DN ([2c1f72e](2c1f72e44c))
* incorrect actual cost in Procurement Tracker report (backport [#43109](https://github.com/frappe/erpnext/issues/43109)) ([#43138](https://github.com/frappe/erpnext/issues/43138)) ([5110975](5110975c6d))
* incorrect qty after transaction in SLE (backport [#43103](https://github.com/frappe/erpnext/issues/43103)) ([#43105](https://github.com/frappe/erpnext/issues/43105)) ([8447bf3](8447bf34f0))
* **minor:** reorder expected value validation ([6fde07d](6fde07da0e))
* multiple fixes related to remarks for GL Report ([#42753](https://github.com/frappe/erpnext/issues/42753)) ([f45b1db](f45b1db1a4))
* **Opening Invoice Creation Tool:** translatability of messages ([3fd9df0](3fd9df0d2e))
* pass company from asset to asset capitalization ([9e72a84](9e72a844f7))
* permission on guest PR creation ([a23e8b1](a23e8b13be))
* return type of `get_party_details` (backport [#43131](https://github.com/frappe/erpnext/issues/43131)) ([#43134](https://github.com/frappe/erpnext/issues/43134)) ([d2923ba](d2923bae85))
* set today in 'On This Date' in Available Batch Report ([03e3374](03e3374a8b))
* uncomment internal parties ([33174b1](33174b1ba2))
* unhide action button after form redirect ([208bd2b](208bd2b8ff))
* unreconcile allocation child table redirect url voucher no issue ([2dddd79](2dddd7906b))
* validate the item code when updating the other item's price rule ([8f4dc80](8f4dc8048d))

### Features

* added revaluation surplus and impairment acc in standard charts… ([#43022](https://github.com/frappe/erpnext/issues/43022)) ([ea86bc2](ea86bc2235))
* utility report to identify invalid ledger entries ([5929d50](5929d50c72))

### Performance Improvements

* timeout error (backport [#43154](https://github.com/frappe/erpnext/issues/43154)) ([#43158](https://github.com/frappe/erpnext/issues/43158)) ([c9f49ca](c9f49caecc))
2024-09-11 05:11:52 +00:00
ruthra kumar
d61f38b8ed Merge pull request #43151 from frappe/version-15-hotfix
chore: release v15
2024-09-11 10:40:35 +05:30
mergify[bot]
8c8dc241e5 fix: bom cost update is not working (backport #43155) (#43157)
fix: bom cost update is not working (#43155)

(cherry picked from commit 05f9015c0b)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-10 23:07:07 +05:30
mergify[bot]
c9f49caecc perf: timeout error (backport #43154) (#43158)
perf: timeout error (#43154)

(cherry picked from commit 1bf60248d9)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-10 23:06:38 +05:30
mergify[bot]
cd57e009dd fix: concurrency issue while picking materials (backport #43087) (#43152)
fix: concurrency issue while picking materials (#43087)

(cherry picked from commit 5c7dff0e84)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-10 17:01:53 +05:30
ruthra kumar
f11e298984 Merge pull request #43149 from frappe/mergify/bp/version-15-hotfix/pr-43146
fix: permission error on Payment Request creation by Guest (backport #43146)
2024-09-10 16:00:00 +05:30
Khushi Rawat
2eec0c057a Merge pull request #43140 from frappe/mergify/bp/version-15-hotfix/pr-43114
fix: primary action button not showing (backport #43114)
2024-09-10 15:45:09 +05:30
ruthra kumar
50b4257a6f Merge pull request #43148 from frappe/mergify/bp/version-15-hotfix/pr-43144
feat: utility report for identifying invalid ledger entries (backport #43144)
2024-09-10 14:55:03 +05:30
ruthra kumar
a23e8b13be fix: permission on guest PR creation
(cherry picked from commit ea02e5f15a)
2024-09-10 09:18:23 +00:00
ruthra kumar
9f09bf14cb refactor: allow all accounts
(cherry picked from commit 43198c946b)
2024-09-10 09:07:06 +00:00
ruthra kumar
5413372aeb refactor: fetch as dictionary
(cherry picked from commit 2126b10a92)
2024-09-10 09:07:06 +00:00
ruthra kumar
710d30074d refactor: barebones methods with basic logic
(cherry picked from commit b05b378ef0)
2024-09-10 09:07:06 +00:00
ruthra kumar
14e30d12b4 refactor: standard filters
(cherry picked from commit dccbc1f432)
2024-09-10 09:07:06 +00:00
ruthra kumar
5929d50c72 feat: utility report to identify invalid ledger entries
(cherry picked from commit 832c4aaf82)
2024-09-10 09:07:06 +00:00
mergify[bot]
d2923bae85 fix: return type of get_party_details (backport #43131) (#43134)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
fix: return type of `get_party_details` (#43131)
2024-09-09 19:26:38 +02:00
Khushi Rawat
9e72a844f7 fix: pass company from asset to asset capitalization
(cherry picked from commit f3445d645d)
2024-09-09 17:00:01 +00:00
Khushi Rawat
208bd2b8ff fix: unhide action button after form redirect
(cherry picked from commit 5ce5b1b6a2)
2024-09-09 17:00:01 +00:00
mergify[bot]
5110975c6d fix: incorrect actual cost in Procurement Tracker report (backport #43109) (#43138)
fix: incorrect actual cost in Procurement Tracker report (#43109)

(cherry picked from commit 80f101f92e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-09 20:34:56 +05:30
ruthra kumar
82764af09e Merge pull request #43132 from frappe/mergify/bp/version-15-hotfix/pr-43056
fix(Opening Invoice Creation Tool): translatability of messages (backport #43056)
2024-09-09 16:54:08 +05:30
barredterra
3fd9df0d2e fix(Opening Invoice Creation Tool): translatability of messages
(cherry picked from commit f3c5803198)
2024-09-09 09:48:34 +00:00
ruthra kumar
cf81202d94 Merge pull request #43129 from frappe/mergify/bp/version-15-hotfix/pr-42801
fix(Delivery Note): translatability of validation errors (backport #42801)
2024-09-09 15:15:45 +05:30
barredterra
0c0f103b83 refactor: extract common validation method
(cherry picked from commit 08646b7ab7)
2024-09-09 09:14:23 +00:00
barredterra
ea4f7365ea fix(Delivery Note): translatability of validation errors
(cherry picked from commit 34df6e39dc)
2024-09-09 09:14:23 +00:00
ruthra kumar
346c06977c Merge pull request #43127 from frappe/mergify/bp/version-15-hotfix/pr-43051
fix: unreconcile allocation child table redirect url voucher no issue (backport #43051)
2024-09-09 14:38:17 +05:30
Prashant Kamble
2dddd7906b fix: unreconcile allocation child table redirect url voucher no issue
(cherry picked from commit 5d6f6a2fb9)
2024-09-09 09:00:37 +00:00
ruthra kumar
026c2d7590 Merge pull request #43122 from frappe/mergify/bp/version-15-hotfix/pr-43022
feat: added revaluation surplus and impairment acc in standard charts… (backport #43022)
2024-09-09 14:19:34 +05:30
ruthra kumar
8e5252d6f8 Merge pull request #43125 from frappe/mergify/bp/version-15-hotfix/pr-43064
fix: validate the item code when updating the other item's price rule (backport #43064)
2024-09-09 14:16:49 +05:30
ruthra kumar
ffc119a8a4 Merge pull request #43123 from frappe/mergify/bp/version-15-hotfix/pr-43121
fix: set today in 'On This Date' in Available Batch Report (backport #43121)
2024-09-09 14:14:19 +05:30
Bhavan23
8f4dc8048d fix: validate the item code when updating the other item's price rule
(cherry picked from commit 45de18069c)
2024-09-09 08:43:58 +00:00
Nihantra C. Patel
03e3374a8b fix: set today in 'On This Date' in Available Batch Report
(cherry picked from commit 9fd55e4c83)
2024-09-09 08:26:38 +00:00
rahulgupta8848
ea86bc2235 feat: added revaluation surplus and impairment acc in standard charts… (#43022)
feat: added revaluation surplus and impairment acc in standard charts of accounts

Co-authored-by: “rahulgupta8848” <“rahul.gupta@8848digital.com”>
(cherry picked from commit 8202f505cc)
2024-09-09 06:43:00 +00:00
ruthra kumar
60b81a2a59 Merge pull request #43120 from frappe/mergify/bp/version-15-hotfix/pr-43095
fix: check multi-currency on jv for common party accounting with foreign currency (backport #43095)
2024-09-09 11:17:43 +05:30
ruthra kumar
354c34e4d8 chore: resolve conflict 2024-09-09 10:51:45 +05:30
ruthra kumar
a9bd11f59a refactor(test): use change_settings decorator
(cherry picked from commit ee94fb37c8)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
2024-09-09 05:06:38 +00:00
venkat102
33174b1ba2 fix: uncomment internal parties
(cherry picked from commit 454e18ad5f)
2024-09-09 05:06:38 +00:00
venkat102
47b216373d test: add unit test for common party with foreign currency
(cherry picked from commit 740a04a704)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
2024-09-09 05:06:38 +00:00
venkat102
d17baddb0d fix: check multi-currency on jv for common party accounting with foreign currency
(cherry picked from commit 00938bfd4d)
2024-09-09 05:06:38 +00:00
mergify[bot]
80b5c16a2e fix: Cannot read properties of null (reading 'doc') (backport #43071) (#43118)
fix: Cannot read properties of null (reading 'doc')

(cherry picked from commit 62c3389bd6)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2024-09-09 09:56:29 +05:30
Smit Vora
a9b142eccd Merge pull request #43117 from frappe/mergify/bp/version-15-hotfix/pr-42753
fix: multiple fixes related to remarks for GL Report (backport #42753)
2024-09-09 08:00:45 +05:30
Smit Vora
a66d1c30ae Merge pull request #43116 from frappe/mergify/bp/version-15-hotfix/pr-42816
fix: ensure `SellingController.onload` gets called for SO & DN (backport #42816)
2024-09-09 08:00:33 +05:30
Smit Vora
c379b783b1 Merge pull request #43092 from frappe/mergify/bp/version-15-hotfix/pr-43013
fix: `default_advance_account` field in Process Payment Reconciliation (backport #43013)
2024-09-09 08:00:07 +05:30
Smit Vora
f45b1db1a4 fix: multiple fixes related to remarks for GL Report (#42753)
* fix: show remarks in report only if it exists

* fix: additional fixes to reduce redundancy in report print format

* fix: revert changes for supplier invoice reference

* fix: update remarks before submit to ensure all available details before submit are used

* fix: patch to update invoice remarks where it's not set

* fix: update remarks in payment ledger entry

(cherry picked from commit e5a49f738b)
2024-09-09 01:54:40 +00:00
Smit Vora
a69623c131 Merge pull request #43115 from frappe/mergify/bp/version-15-hotfix/pr-42736
refactor: age range in one field (backport #42736)
2024-09-09 07:14:18 +05:30
Sagar Vora
2c1f72e44c fix: ensure SellingController.onload gets called for SO & DN
(cherry picked from commit 8431e3c275)
2024-09-09 01:44:17 +00:00
Smit Vora
3915018400 chore: resolve conflicts with backport 2024-09-09 07:00:32 +05:30
Sanket322
b832b60b28 refactor: age range in one field (#42736)
* fix: age range in one field

* fix: patch for custom reports

* refactor: stock ageing and account payable report

* fix: fixing the test cases

* fix: common patch for reports with ageing

* refactor: rename variable and minor refactor

* fix: fixing the test case

(cherry picked from commit 05de8994b0)
2024-09-09 01:20:13 +00:00
Khushi Rawat
b70eb46222 Merge pull request #43099 from frappe/mergify/bp/version-15-hotfix/pr-43098
fix(minor): reorder expected value validation (backport #43098)
2024-09-08 23:38:07 +05:30
Frappe PR Bot
829660e7f3 chore(release): Bumped to Version 15.34.2
## [15.34.2](https://github.com/frappe/erpnext/compare/v15.34.1...v15.34.2) (2024-09-07)

### Bug Fixes

* incorrect qty after transaction in SLE (backport [#43103](https://github.com/frappe/erpnext/issues/43103)) ([#43105](https://github.com/frappe/erpnext/issues/43105)) ([0bc947f](0bc947f30d))
2024-09-07 12:40:39 +00:00
rohitwaghchaure
4649cf0a25 Merge pull request #43107 from frappe/mergify/bp/version-15/pr-43105
fix: incorrect qty after transaction in SLE (backport #43103) (backport #43105)
2024-09-07 18:09:17 +05:30
mergify[bot]
0bc947f30d fix: incorrect qty after transaction in SLE (backport #43103) (#43105)
fix: incorrect qty after transaction in SLE (#43103)

(cherry picked from commit 5ff87edc85)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
(cherry picked from commit 8447bf34f0)
2024-09-07 12:04:01 +00:00
mergify[bot]
8447bf34f0 fix: incorrect qty after transaction in SLE (backport #43103) (#43105)
fix: incorrect qty after transaction in SLE (#43103)

(cherry picked from commit 5ff87edc85)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-07 17:32:42 +05:30
Khushi Rawat
6fde07da0e fix(minor): reorder expected value validation
(cherry picked from commit 0a6bf1559b)
2024-09-06 18:44:41 +00:00
ruthra kumar
6bd95a6d17 Merge pull request #43097 from frappe/mergify/bp/version-15-hotfix/pr-43077
fix: cancel common party advance jv while canceling the invoice (backport #43077)
2024-09-06 20:41:20 +05:30
venkat102
6c74180e1c test: add unit test for canceling the common party advance jv created from sales invoice
(cherry picked from commit 8c6e3f3c12)
2024-09-06 14:50:08 +00:00
venkat102
9bd3d7a020 fix: cancel common party advance jv while canceling the invoice
(cherry picked from commit 6a928b92df)
2024-09-06 14:50:07 +00:00
ruthra kumar
84b0fa38d5 refactor: fetch advance account on party seleection
(cherry picked from commit c4ed04cb31)
2024-09-06 09:48:47 +00:00
ljain112
75cb29890d fix: default_advance_account field in Process Payment Reconciliation
(cherry picked from commit 143209f91a)

# Conflicts:
#	erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json
2024-09-06 09:48:47 +00:00
ruthra kumar
c31b4e6b4b Merge pull request #43074 from frappe/mergify/bp/version-15-hotfix/pr-43070
fix: AP filter to simulate employee advance as a ledger impacting voucher (backport #43070)
2024-09-06 10:09:30 +05:30
ruthra kumar
cb64f90d7d chore: resolve conflict 2024-09-05 17:22:47 +05:30
Frappe PR Bot
7f261f3448 chore(release): Bumped to Version 15.34.1
## [15.34.1](https://github.com/frappe/erpnext/compare/v15.34.0...v15.34.1) (2024-09-05)

### Bug Fixes

* add the company in payment request bcz delete company transactions (backport [#42664](https://github.com/frappe/erpnext/issues/42664)) ([#42982](https://github.com/frappe/erpnext/issues/42982)) ([42e7725](42e7725442))
* added app permission check for apps page ([a35ce12](a35ce12d60))
* adjust price insertion logic for internal suppliers/customers ([#42988](https://github.com/frappe/erpnext/issues/42988)) ([daa75ee](daa75eea00))
* auto reorder material request mail issue (backport [#43066](https://github.com/frappe/erpnext/issues/43066)) ([#43068](https://github.com/frappe/erpnext/issues/43068)) ([d2b2002](d2b2002664))
* **capitalization:** debit cwip account instead of fixed asset account ([#42857](https://github.com/frappe/erpnext/issues/42857)) ([f3c60ea](f3c60ea0a7))
* company accounts setup_queries ([b99cdb5](b99cdb5be7))
* disabled batches showing in the list (backport [#43024](https://github.com/frappe/erpnext/issues/43024)) ([#43069](https://github.com/frappe/erpnext/issues/43069)) ([56dad7d](56dad7d365))
* don't allow capitalizing only service item for new composite asset ([a833010](a833010d2b))
* improve asset item matching logic ([3bb1867](3bb186736d))
* indentation ([4d7c0c0](4d7c0c004a))
* link Purchase Invoice and Receipt Items to Asset ([1121c66](1121c6663f))
* retain date filter when redirecting in Profit and Loss report ([f0e3fb4](f0e3fb466a))
* typeerror on Payment Entry ([6d51d14](6d51d14dfd))
* typerror on default_currency ([7d6984c](7d6984c873))
* update develop_version in hooks ([6c8e0fd](6c8e0fd1fb))
* validate component quantity according to BOM (backport [#43011](https://github.com/frappe/erpnext/issues/43011)) ([#43014](https://github.com/frappe/erpnext/issues/43014)) ([fee2255](fee2255661))
2024-09-05 11:44:28 +00:00
ruthra kumar
efdc2173b2 refactor: filter to toggle employee advance scenario in AP
(cherry picked from commit 257e13c299)

# Conflicts:
#	erpnext/accounts/report/accounts_payable/accounts_payable.js
2024-09-05 11:44:04 +00:00
ruthra kumar
99828d945f refactor: Handle Emp Advance as separate row in AP report
(cherry picked from commit eedf22b07a)
2024-09-05 11:44:03 +00:00
ruthra kumar
11a6ebaeef Merge pull request #43026 from frappe/version-15-hotfix
chore: release v15
2024-09-05 17:13:12 +05:30
mergify[bot]
d2b2002664 fix: auto reorder material request mail issue (backport #43066) (#43068)
fix: auto reorder material request mail issue (#43066)

fix: auto reorder matreial request mail issue
(cherry picked from commit a8055a6da9)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-05 16:00:47 +05:30
mergify[bot]
56dad7d365 fix: disabled batches showing in the list (backport #43024) (#43069)
fix: disabled batches showing in the list (#43024)

(cherry picked from commit c13a147df1)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-05 16:00:33 +05:30
Khushi Rawat
6869e5dde9 Merge pull request #43039 from khushi8112/backport-asset-value-through-landed-cost-voucher
fix: backport asset value through landed cost voucher
2024-09-05 14:53:51 +05:30
Khushi Rawat
5d5ec2ab7c chore: resolve test failing 2024-09-05 14:31:05 +05:30
Khushi Rawat
f5a4ec129b chore: patch correction 2024-09-05 14:31:05 +05:30
Khushi Rawat
e185a06a15 refactor: rename to in SLE query functions 2024-09-05 14:31:05 +05:30
Khushi Rawat
193d7981ea chore: linters/semgrep check 2024-09-05 14:31:05 +05:30
Khushi Rawat
957eabf53e chore: resolved linter warnings with #nosemgrep 2024-09-05 14:31:05 +05:30
Khushi Rawat
3bb186736d fix: improve asset item matching logic 2024-09-05 14:31:05 +05:30
Khushi Rawat
1121c6663f fix: link Purchase Invoice and Receipt Items to Asset 2024-09-05 14:31:05 +05:30
Smit Vora
944479313c Merge pull request #43046 from frappe/mergify/bp/version-15-hotfix/pr-42988
fix: adjust price insertion logic for internal suppliers/customers (backport #42988)
2024-09-04 13:19:52 +05:30
Lakshit Jain
daa75eea00 fix: adjust price insertion logic for internal suppliers/customers (#42988)
* fix: adjust price insertion logic for internal suppliers/customers

* refactor: correct indentation, specify conditions within function

* fix: typo

---------

Co-authored-by: Smit Vora <smitvora203@gmail.com>
(cherry picked from commit 38f925b376)
2024-09-04 07:27:47 +00:00
ruthra kumar
a2b7fc18ab Merge pull request #43033 from frappe/mergify/bp/version-15-hotfix/pr-43030
fix: typerror on default_currency (backport #43030)
2024-09-03 16:51:22 +05:30
ruthra kumar
7d6984c873 fix: typerror on default_currency
(cherry picked from commit 4a7cc4da87)
2024-09-03 11:11:29 +00:00
Nihantra C. Patel
64cbf446bd Merge pull request #43031 from frappe/mergify/bp/version-15-hotfix/pr-43029
fix: move setup_queries to refresh event for company (backport #43029)
2024-09-03 16:12:27 +05:30
Nihantra C. Patel
b99cdb5be7 fix: company accounts setup_queries
(cherry picked from commit 80ace72541)
2024-09-03 10:36:29 +00:00
ruthra kumar
d6de50634f Merge pull request #43028 from frappe/mergify/bp/version-15-hotfix/pr-42974
fix: retain date filter when redirecting in Profit and Loss report (backport #42974)
2024-09-03 15:51:46 +05:30
vishnu
4d7c0c004a fix: indentation
(cherry picked from commit 598e9c1390)
2024-09-03 10:14:32 +00:00
vishnu
f0e3fb466a fix: retain date filter when redirecting in Profit and Loss report
(cherry picked from commit bb29fc4c3d)
2024-09-03 10:14:31 +00:00
Khushi Rawat
8337439589 Merge pull request #43018 from frappe/mergify/bp/version-15-hotfix/pr-43015
chore: test case failing issue (backport #43015)
2024-09-03 03:55:32 +05:30
Khushi Rawat
88e5ed7998 chore: test case failing issue
(cherry picked from commit 0bdffdfa98)
2024-09-02 22:09:22 +00:00
mergify[bot]
fee2255661 fix: validate component quantity according to BOM (backport #43011) (#43014)
* fix: validate component quantity according to BOM (#43011)

(cherry picked from commit f3b91d4d62)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-09-02 16:29:30 +05:30
Nihantra C. Patel
23d91145d0 Merge pull request #43009 from frappe/mergify/bp/version-15-hotfix/pr-43008
fix: update develop_version in hooks (backport #43008)
2024-09-02 12:21:03 +05:30
Nihantra C. Patel
6c8e0fd1fb fix: update develop_version in hooks
(cherry picked from commit 01b345e046)
2024-09-02 06:13:37 +00:00
Shariq Ansari
512a171ad5 Merge pull request #42994 from frappe/mergify/bp/version-15-hotfix/pr-42993
fix: added app permission check for apps page (backport #42993)
2024-08-30 18:05:55 +05:30
Shariq Ansari
30f034555b chore: linter fix
(cherry picked from commit 1d9ed27a89)
2024-08-30 12:06:10 +00:00
Shariq Ansari
a35ce12d60 fix: added app permission check for apps page
(cherry picked from commit e8f8fb8a8f)
2024-08-30 12:06:10 +00:00
Khushi Rawat
8cf057849e Merge pull request #42986 from frappe/mergify/bp/version-15-hotfix/pr-42857
fix(capitalization): debit cwip account instead of fixed asset account (backport #42857)
2024-08-30 00:46:06 +05:30
Khushi Rawat
f3c60ea0a7 fix(capitalization): debit cwip account instead of fixed asset account (#42857)
* fix(capitalization): debit cwip account instead of fixed asset account

* fix: post entries for capitalized asset through background jobs

* chore: run pre-commit

* fix: correct GL entries posting for composite assets

* fix(minor): resolve failing check

* chore: update gl entry check logic

* chore: handle none values

(cherry picked from commit 5d99f17583)
2024-08-29 11:01:03 +00:00
ruthra kumar
c724573a18 Merge pull request #42985 from frappe/mergify/bp/version-15-hotfix/pr-42983
refactor: link utility report with bank reconciliation statement (backport #42983)
2024-08-29 16:19:47 +05:30
ruthra kumar
53e1b57354 refactor: link utility report with bank reconciliation statement
(cherry picked from commit 00eac65712)
2024-08-29 10:42:57 +00:00
mergify[bot]
42e7725442 fix: add the company in payment request bcz delete company transactions (backport #42664) (#42982)
* fix: add the company in payment request bcz delete company transactions

(cherry picked from commit 12834ccf9a)

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

* fix: link company when make payment request

(cherry picked from commit e3008843d1)

* fix: add the company in payment request bcz delete company transactions --conflicts

---------

Co-authored-by: Nihantra Patel <nihantra@frappe.io>
Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-08-29 15:41:08 +05:30
ruthra kumar
18b7af977c Merge pull request #42981 from frappe/mergify/bp/version-15-hotfix/pr-42979
refactor: better UX on Bank Clearance tool (backport #42979)
2024-08-29 14:07:49 +05:30
ruthra kumar
db746a4def refactor: better UX on Bank Clearance tool
(cherry picked from commit 6a06e26d04)
2024-08-29 08:25:12 +00:00
Khushi Rawat
3d5fb5fc90 Merge pull request #42977 from frappe/mergify/bp/version-15-hotfix/pr-42976
fix: don't allow capitalizing only service item for new composite asset (backport #42976)
2024-08-29 11:47:28 +05:30
Khushi Rawat
a833010d2b fix: don't allow capitalizing only service item for new composite asset
(cherry picked from commit f1d2138258)
2024-08-28 20:43:15 +00:00
ruthra kumar
0d6148f218 Merge pull request #42968 from frappe/mergify/bp/version-15-hotfix/pr-42966
fix: typeerror on Payment Entry (backport #42966)
2024-08-28 13:21:32 +05:30
ruthra kumar
6d51d14dfd fix: typeerror on Payment Entry
(cherry picked from commit e9cf8937cd)
2024-08-28 06:58:04 +00:00
Frappe PR Bot
cb2cb4447a chore(release): Bumped to Version 15.34.0
# [15.34.0](https://github.com/frappe/erpnext/compare/v15.33.5...v15.34.0) (2024-08-28)

### Bug Fixes

* calculation correction for annual depreciation ([fa85482](fa85482662))
* call 'process' directly instead of creating 'process_subscripti ([7582827](758282739e))
* Cannot read properties of null (reading 'doctype') (backport [#42941](https://github.com/frappe/erpnext/issues/42941)) ([#42943](https://github.com/frappe/erpnext/issues/42943)) ([2c99075](2c99075899))
* Column 'valuation_rate' cannot be null (backport [#42909](https://github.com/frappe/erpnext/issues/42909)) ([#42913](https://github.com/frappe/erpnext/issues/42913)) ([8c350d4](8c350d43b2))
* custom stock entry type issue (backport [#42835](https://github.com/frappe/erpnext/issues/42835)) ([#42846](https://github.com/frappe/erpnext/issues/42846)) ([831e2aa](831e2aaf18))
* do not copy date fields in opportunity doctype ([7401dc4](7401dc4015))
* get amount with taxes and charges from payment entry ([c54e97b](c54e97b89a))
* include erpnext in apps page ([7428df8](7428df8778))
* incorrect in and out qty in the Batch-Wise Balance History (backport [#42866](https://github.com/frappe/erpnext/issues/42866)) ([#42876](https://github.com/frappe/erpnext/issues/42876)) ([d9ca680](d9ca680a29))
* incorrect Received Qty Amount in Purchase Order Analysis (backport [#42852](https://github.com/frappe/erpnext/issues/42852)) ([#42854](https://github.com/frappe/erpnext/issues/42854)) ([72c1609](72c16097d6))
* last purchase rate not updated from purchase invoice (backport [#42847](https://github.com/frappe/erpnext/issues/42847)) ([#42853](https://github.com/frappe/erpnext/issues/42853)) ([2203ea9](2203ea9301))
* LCV based on purchase invoice amount with multi-currency (backport [#42890](https://github.com/frappe/erpnext/issues/42890)) ([#42894](https://github.com/frappe/erpnext/issues/42894)) ([ff868a9](ff868a9290))
* make party naming sequential when naming_by set as auto name ([0650c22](0650c22b53))
* not able to make stock entry against MR (backport [#42874](https://github.com/frappe/erpnext/issues/42874)) ([#42875](https://github.com/frappe/erpnext/issues/42875)) ([08bed61](08bed618f6))
* same posting date and time, creation causing incorrect balance qty (backport [#42904](https://github.com/frappe/erpnext/issues/42904)) ([#42920](https://github.com/frappe/erpnext/issues/42920)) ([2624892](26248924b6))
* spec mobile and email fields for notifications ([f56ee58](f56ee58e81))
* timeout while submitting stock entry (backport [#42929](https://github.com/frappe/erpnext/issues/42929)) ([#42931](https://github.com/frappe/erpnext/issues/42931)) ([ec26c92](ec26c92263))
* unsupported operand type(s) for *: 'float' and 'NoneType' (backport [#42916](https://github.com/frappe/erpnext/issues/42916)) ([#42918](https://github.com/frappe/erpnext/issues/42918)) ([8d29dc6](8d29dc6a81))
* update dimesions in exchange_gain_loss jv based on base document ([caa6ca1](caa6ca1d0b))
* Update get_amount to return currency precision grand total ([976abf7](976abf7b3c))
* use of incorrect attribute ([80244ba](80244bafa4))

### Features

* added finance book filter in depreciation and balances report ([5bdd298](5bdd2989c6))
* Disassembly Order (backport [#42655](https://github.com/frappe/erpnext/issues/42655)) ([#42957](https://github.com/frappe/erpnext/issues/42957)) ([8d8dd0c](8d8dd0cd2b))
* report to identify incorrectly cleared cheques ([25193c5](25193c5e92))
2024-08-28 05:04:27 +00:00
ruthra kumar
b3a8fe9391 Merge pull request #42937 from frappe/version-15-hotfix
chore: release v15
2024-08-28 10:33:09 +05:30
ruthra kumar
2a820a85ed Merge pull request #42952 from frappe/mergify/bp/version-15-hotfix/pr-41925
fix: spec mobile and email fields for notifications (backport #41925)
2024-08-28 10:13:26 +05:30
mergify[bot]
8d8dd0cd2b feat: Disassembly Order (backport #42655) (#42957)
* feat: Disassembly Order (#42655)

(cherry picked from commit 663a08e4cd)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-27 23:07:37 +05:30
ruthra kumar
3a5f19853a Merge pull request #42947 from frappe/mergify/bp/version-15-hotfix/pr-42923
fix: get amount with taxes and charges from payment entry (backport #42923)
2024-08-27 17:39:30 +05:30
Khushi Rawat
c0dd794e15 Merge pull request #42944 from frappe/mergify/bp/version-15-hotfix/pr-42939
feat: added finance book filter in depreciation and balances report (backport #42939)
2024-08-27 17:18:10 +05:30
David
f56ee58e81 fix: spec mobile and email fields for notifications
(cherry picked from commit 18993a97ce)
2024-08-27 11:45:40 +00:00
mergify[bot]
2c99075899 fix: Cannot read properties of null (reading 'doctype') (backport #42941) (#42943)
fix: Cannot read properties of null (reading 'doctype') (#42941)

(cherry picked from commit 86d3a9ab03)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-27 17:15:23 +05:30
ruthra kumar
01cd509113 Merge pull request #42950 from frappe/mergify/bp/version-15-hotfix/pr-41949
refactor: item-wise purchase history (query to script report) (backport #41949)
2024-08-27 17:11:46 +05:30
ruthra kumar
5563bea789 Merge pull request #42949 from frappe/mergify/bp/version-15-hotfix/pr-42936
fix: remove unnecessary condition on 'voucher_no' (backport #42936)
2024-08-27 17:08:56 +05:30
Nihantra Patel
a0a932a235 refactor: item-wise purchase history (query to script report) --upd
(cherry picked from commit 2851764ed6)
2024-08-27 11:19:03 +00:00
Nihantra Patel
6f75a3c617 refactor: item-wise purchase history (query to script report) --prettier
(cherry picked from commit 7bae18aba8)
2024-08-27 11:19:03 +00:00
Nihantra Patel
a4d3934f75 refactor: item-wise purchase history (query to script report) --prettier
(cherry picked from commit f740c94363)
2024-08-27 11:19:03 +00:00
Nihantra Patel
b4171e4bd9 refactor: item-wise purchase history (query to script report) -- formatter
(cherry picked from commit 003a9608dc)
2024-08-27 11:19:03 +00:00
Nihantra Patel
76d32ab07a refactor: item-wise purchase history (query to script report)
(cherry picked from commit 49331e6109)
2024-08-27 11:19:03 +00:00
Nihantra Patel
3d469db47b refactor: item-wise purchase history (query to script report)
(cherry picked from commit 5de91cf55e)
2024-08-27 11:19:02 +00:00
ruthra kumar
80244bafa4 fix: use of incorrect attribute
(cherry picked from commit fb32d2cafb)
2024-08-27 11:06:38 +00:00
venkat102
c54e97b89a fix: get amount with taxes and charges from payment entry
(cherry picked from commit b3a901b631)
2024-08-27 11:01:36 +00:00
ruthra kumar
14202fae06 Merge pull request #42453 from mujeerhashmi/patch-2
fix: Update get_amount to return currency precision grand total
2024-08-27 16:29:08 +05:30
Khushi Rawat
9fc0ac1a92 chore: resolved linter warnings with #nosemgrep
(cherry picked from commit adf1e487e1)
2024-08-27 10:54:11 +00:00
Khushi Rawat
5bdd2989c6 feat: added finance book filter in depreciation and balances report
(cherry picked from commit 45804c68f0)
2024-08-27 10:54:10 +00:00
ruthra kumar
42dccadff1 Merge pull request #42940 from frappe/mergify/bp/version-15-hotfix/pr-42921
fix: make party naming sequential when naming_by set as auto name (backport #42921)
2024-08-27 16:13:00 +05:30
venkat102
0650c22b53 fix: make party naming sequential when naming_by set as auto name
(cherry picked from commit c9015f7c04)
2024-08-27 10:07:50 +00:00
mergify[bot]
ec26c92263 fix: timeout while submitting stock entry (backport #42929) (#42931)
fix: timeout while submitting stock entry (#42929)

(cherry picked from commit ca2fde891e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-27 11:03:45 +05:30
mergify[bot]
26248924b6 fix: same posting date and time, creation causing incorrect balance qty (backport #42904) (#42920)
fix: same posting date and time, creation causing incorrect balance qty (#42904)

fix: same posting date and time, creation causing incorrect balance quantity
(cherry picked from commit 27364b7e6b)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-27 09:30:47 +05:30
mergify[bot]
8d29dc6a81 fix: unsupported operand type(s) for *: 'float' and 'NoneType' (backport #42916) (#42918)
fix: unsupported operand type(s) for *: 'float' and 'NoneType' (#42916)

(cherry picked from commit 10434742e9)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-26 18:18:31 +05:30
ruthra kumar
6eb50fa300 Merge pull request #42915 from frappe/mergify/bp/version-15-hotfix/pr-42887
fix: update dimesions in exchange_gain_loss jv based on base document (backport #42887)
2024-08-26 17:56:21 +05:30
mergify[bot]
8c350d43b2 fix: Column 'valuation_rate' cannot be null (backport #42909) (#42913)
fix: Column 'valuation_rate' cannot be null (#42909)

(cherry picked from commit 92bde71ab1)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-26 17:35:20 +05:30
ljain112
caa6ca1d0b fix: update dimesions in exchange_gain_loss jv based on base document
(cherry picked from commit 96df19149d)
2024-08-26 12:01:28 +00:00
ruthra kumar
47f1714be4 Merge pull request #42912 from frappe/mergify/bp/version-15-hotfix/pr-42910
feat: utility report to better diagnose incorrectly cleared Cheques and Deposits (backport #42910)
2024-08-26 16:32:29 +05:30
ruthra kumar
ecb0506dba refactor: build dictionary for Journal
remove redundant filter

(cherry picked from commit 2144e0337d)
2024-08-26 10:11:24 +00:00
ruthra kumar
42382b3945 chore: remove redundant column
(cherry picked from commit 74b36db24e)
2024-08-26 10:11:23 +00:00
ruthra kumar
993114942e refactor: build dict for payment entry
(cherry picked from commit 784dec24c8)
2024-08-26 10:11:23 +00:00
ruthra kumar
5a28a1728e refactor: working state with minimum functions
(cherry picked from commit 4cd023444a)
2024-08-26 10:11:23 +00:00
ruthra kumar
80a5df0e96 refactor: barebones functions
(cherry picked from commit ceaa1be729)
2024-08-26 10:11:23 +00:00
ruthra kumar
25193c5e92 feat: report to identify incorrectly cleared cheques
(cherry picked from commit 28890fa833)
2024-08-26 10:11:23 +00:00
ruthra kumar
1ee14ac135 Merge pull request #42907 from frappe/mergify/bp/version-15-hotfix/pr-42905
refactor: better err msg on clearance tool (backport #42905)
2024-08-26 15:29:48 +05:30
ruthra kumar
a3e5ffe915 refactor: better err msg on clearance tool
(cherry picked from commit 092411b54f)
2024-08-26 08:55:01 +00:00
mergify[bot]
ff868a9290 fix: LCV based on purchase invoice amount with multi-currency (backport #42890) (#42894)
fix: LCV based on purchase invoice amount with multi-currency (#42890)

(cherry picked from commit 6721ae76de)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-26 13:25:18 +05:30
Smit Vora
247ae7a965 Merge pull request #42892 from frappe/mergify/bp/version-15-hotfix/pr-42848
fix: do not copy date fields in opportunity doctype (backport #42848)
2024-08-24 13:12:13 +05:30
Smit Vora
3a149b3c9b chore: resolve conflicts 2024-08-24 12:38:49 +05:30
mergify[bot]
08bed618f6 fix: not able to make stock entry against MR (backport #42874) (#42875)
fix: not able to make stock entry against MR (#42874)

(cherry picked from commit 63ca1025bc)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-23 15:22:39 +05:30
mergify[bot]
d9ca680a29 fix: incorrect in and out qty in the Batch-Wise Balance History (backport #42866) (#42876)
fix: incorrect in and out qty in the Batch-Wise Balance History (#42866)

(cherry picked from commit ce7f6ee71c)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-23 15:22:23 +05:30
ljain112
7401dc4015 fix: do not copy date fields in opportunity doctype
(cherry picked from commit 74afa57a9f)

# Conflicts:
#	erpnext/crm/doctype/opportunity/opportunity.json
2024-08-23 08:48:33 +00:00
Frappe PR Bot
eb7e063d5c chore(release): Bumped to Version 15.33.5
## [15.33.5](https://github.com/frappe/erpnext/compare/v15.33.4...v15.33.5) (2024-08-23)

### Bug Fixes

* include erpnext in apps page ([be736cf](be736cf641))
2024-08-23 00:37:45 +00:00
ruthra kumar
0dbe79645c Merge pull request #42882 from frappe/mergify/bp/version-15/pr-42727
fix: include erpnext in apps page (backport #42727)
2024-08-23 06:05:20 +05:30
Shariq Ansari
995773088a chore: renamed include_as_app to include_in_apps_screen
(cherry picked from commit 5280132423)
2024-08-23 00:19:55 +00:00
Shariq Ansari
be736cf641 fix: include erpnext in apps page
(cherry picked from commit 1d52ef7afe)
2024-08-23 00:19:54 +00:00
ruthra kumar
85089d3d64 Merge pull request #42871 from frappe/mergify/bp/version-15-hotfix/pr-42867
fix: call 'process' directly instead of creating 'process_subscription' (backport #42867)
2024-08-22 17:51:37 +05:30
ruthra kumar
eed6d2b81c Merge pull request #42869 from frappe/mergify/bp/version-15-hotfix/pr-42851
refactor: Allow equity type Account in Payment Entry for shareholders (backport #42851)
2024-08-22 17:30:50 +05:30
Shariq Ansari
edf53f1ab7 Merge pull request #42863 from frappe/mergify/bp/version-15-hotfix/pr-42727
fix: include erpnext in apps page (backport #42727)
2024-08-22 17:24:33 +05:30
ruthra kumar
758282739e fix: call 'process' directly instead of creating 'process_subscripti
reason: 'process' follows simple DB transaction model.
(cherry picked from commit b4d22c2936)
2024-08-22 11:53:32 +00:00
ruthra kumar
49d995c3ac refactor: filter shareholder on company
(cherry picked from commit 63ad9f4f86)
2024-08-22 11:40:39 +00:00
ruthra kumar
72ca2ec9a5 refactor: allow equity types on Payment Entry
(cherry picked from commit 6cbf98294a)
2024-08-22 11:40:39 +00:00
Shariq Ansari
4297895bd9 chore: renamed include_as_app to include_in_apps_screen
(cherry picked from commit 5280132423)
2024-08-22 06:57:25 +00:00
Shariq Ansari
7428df8778 fix: include erpnext in apps page
(cherry picked from commit 1d52ef7afe)
2024-08-22 06:57:25 +00:00
Khushi Rawat
767c79663c Merge pull request #42862 from frappe/mergify/bp/version-15-hotfix/pr-42861
fix(minor): calculation correction for annual depreciation (backport #42861)
2024-08-22 11:56:08 +05:30
Khushi Rawat
fa85482662 fix: calculation correction for annual depreciation
(cherry picked from commit f440243b75)
2024-08-22 05:48:09 +00:00
mergify[bot]
831e2aaf18 fix: custom stock entry type issue (backport #42835) (#42846)
* fix: custom stock entry type issue (#42835)

(cherry picked from commit 9c82c2b5d3)

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

* chore: fix conflicts

* chore: fix linters issue

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-21 16:46:05 +05:30
Frappe PR Bot
9ac665b4bd chore(release): Bumped to Version 15.33.4
## [15.33.4](https://github.com/frappe/erpnext/compare/v15.33.3...v15.33.4) (2024-08-21)

### Bug Fixes

* incorrect Received Qty Amount in Purchase Order Analysis (backport [#42852](https://github.com/frappe/erpnext/issues/42852)) (backport [#42854](https://github.com/frappe/erpnext/issues/42854)) ([#42856](https://github.com/frappe/erpnext/issues/42856)) ([8d8d84b](8d8d84bae4))
* last purchase rate not updated from purchase invoice (backport [#42847](https://github.com/frappe/erpnext/issues/42847)) (backport [#42853](https://github.com/frappe/erpnext/issues/42853)) ([#42855](https://github.com/frappe/erpnext/issues/42855)) ([9f4cb98](9f4cb98de6))
2024-08-21 11:08:23 +00:00
mergify[bot]
8d8d84bae4 fix: incorrect Received Qty Amount in Purchase Order Analysis (backport #42852) (backport #42854) (#42856)
fix: incorrect Received Qty Amount in Purchase Order Analysis (backport #42852) (#42854)

fix: incorrect Received Qty Amount in Purchase Order Analysis (#42852)

(cherry picked from commit fb846ffa12)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-08-21 16:37:08 +05:30
mergify[bot]
9f4cb98de6 fix: last purchase rate not updated from purchase invoice (backport #42847) (backport #42853) (#42855)
fix: last purchase rate not updated from purchase invoice (backport #42847) (#42853)

fix: last purchase rate not updated from purchase invoice (#42847)

(cherry picked from commit 5b9309cf34)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-08-21 16:37:00 +05:30
mergify[bot]
72c16097d6 fix: incorrect Received Qty Amount in Purchase Order Analysis (backport #42852) (#42854)
fix: incorrect Received Qty Amount in Purchase Order Analysis (#42852)

(cherry picked from commit fb846ffa12)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-21 16:12:33 +05:30
mergify[bot]
2203ea9301 fix: last purchase rate not updated from purchase invoice (backport #42847) (#42853)
fix: last purchase rate not updated from purchase invoice (#42847)

(cherry picked from commit 5b9309cf34)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-21 15:20:50 +05:30
Frappe PR Bot
28c9f2adab chore(release): Bumped to Version 15.33.3
## [15.33.3](https://github.com/frappe/erpnext/compare/v15.33.2...v15.33.3) (2024-08-21)

### Bug Fixes

* Auto Create Serial and Batch Bundle For Outward (backport [#42778](https://github.com/frappe/erpnext/issues/42778)) ([#42792](https://github.com/frappe/erpnext/issues/42792)) ([7cc7179](7cc7179b05))
* backport german translations from develop ([9e9de4c](9e9de4c99e))
* bank reconcilation tool cost center company filter adding ([cd59940](cd5994017c))
* Create Sales Order from Quotation for Prospect ([f547bef](f547befeb9))
* create SO from Quot for Prospect --conflicts ([ec0201c](ec0201cb85))
* create SO from Quot for Prospect --conflicts ([5d7fb1d](5d7fb1d945))
* disable rename from warehouse ([3a1ad6e](3a1ad6e844))
* disable rename from warehouse ([40abd82](40abd82e2d))
* dropping index to improve performance (backport [#42820](https://github.com/frappe/erpnext/issues/42820)) ([#42821](https://github.com/frappe/erpnext/issues/42821)) ([b24de3e](b24de3e35b))
* german translations ([751c209](751c20984f))
* german translations of "HR" ([6f7fdbe](6f7fdbefac))
* ignore pricing rule while making DN from Pick List (backport [#42763](https://github.com/frappe/erpnext/issues/42763)) ([#42768](https://github.com/frappe/erpnext/issues/42768)) ([aba54ba](aba54ba18f))
* not able to create the batch (backport [#42784](https://github.com/frappe/erpnext/issues/42784)) ([#42785](https://github.com/frappe/erpnext/issues/42785)) ([0f9849e](0f9849e672))
* **patch:** replace repost with direct sql to update 'against_voucher ([e420fa9](e420fa9779))
* removed extra filter condition ([b84ca04](b84ca04975))
* set up filters for dimensions ([abb8866](abb88662c1))
* translatability of boldened text ([4914481](4914481105))
* update the testcase format ([33542cb](33542cb909))
* update the testcase format ([549dc28](549dc286d0))

### Performance Improvements

* asset creation from purchase receipt ([1040198](1040198ce1))
* data import for stock entries (backport [#42711](https://github.com/frappe/erpnext/issues/42711)) ([#42819](https://github.com/frappe/erpnext/issues/42819)) ([0344442](0344442d42))
2024-08-21 05:22:44 +00:00
ruthra kumar
d04f7ffe87 Merge pull request #42832 from frappe/version-15-hotfix
chore: release v15
2024-08-21 10:51:29 +05:30
Khushi Rawat
21e5c01f11 Merge pull request #42828 from frappe/mergify/bp/version-15-hotfix/pr-42824
perf: asset creation from purchase receipt (backport #42824)
2024-08-20 15:17:51 +05:30
mergify[bot]
ae6c1a30ac refactor: brand js and allow quick entry (backport #42829) (#42830)
* refactor: brand js and allow quick entry (#42829)

* refactor: brand js and allow quick entry

* refactor: brand js and allow quick entry --prettier

* refactor: brand js and allow quick entry --prettier

(cherry picked from commit a1183f0165)

# Conflicts:
#	erpnext/setup/doctype/brand/brand.json

* refactor: brand js and allow quick entry --refactor

---------

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-08-20 15:03:23 +05:30
Khushi Rawat
1040198ce1 perf: asset creation from purchase receipt
(cherry picked from commit 6e84fc5143)
2024-08-20 08:12:48 +00:00
Nihantra C. Patel
69878b7847 Merge pull request #42826 from frappe/mergify/bp/version-15-hotfix/pr-42379
fix: Create Sales Order from Quotation for Prospect (backport #42379)
2024-08-20 11:57:29 +05:30
Nihantra C. Patel
ec0201cb85 fix: create SO from Quot for Prospect --conflicts 2024-08-20 11:34:27 +05:30
Nihantra C. Patel
5d7fb1d945 fix: create SO from Quot for Prospect --conflicts 2024-08-20 11:31:49 +05:30
Nihantra Patel
33542cb909 fix: update the testcase format
(cherry picked from commit ee44022249)
2024-08-20 05:11:02 +00:00
Nihantra Patel
549dc286d0 fix: update the testcase format
(cherry picked from commit 29d50b770e)
2024-08-20 05:11:02 +00:00
Nihantra Patel
f547befeb9 fix: Create Sales Order from Quotation for Prospect
(cherry picked from commit 2f63fae31d)

# Conflicts:
#	erpnext/selling/doctype/quotation/quotation.py
2024-08-20 05:11:02 +00:00
ruthra kumar
a144059c7c Merge pull request #42825 from frappe/mergify/bp/version-15-hotfix/pr-42731
fix: bank reconcilation tool cost center company filter adding (backport #42731)
2024-08-20 10:35:21 +05:30
Parameshwari Palanisamy
b96361e837 refactor: update dialog_manager.js
(cherry picked from commit 6d19aae423)
2024-08-20 04:44:47 +00:00
creative-paramu
cd5994017c fix: bank reconcilation tool cost center company filter adding
(cherry picked from commit 6e2ac09821)
2024-08-20 04:44:47 +00:00
Raffael Meyer
431fb62803 Merge pull request #42823 from barredterra/backport-german-translations 2024-08-19 19:25:16 +02:00
barredterra
9e9de4c99e fix: backport german translations from develop 2024-08-19 16:43:22 +02:00
Raffael Meyer
d3369368db Merge pull request #42804 from frappe/mergify/bp/version-15-hotfix/pr-42800
fix: translatability of boldened text (backport #42800)
2024-08-19 16:03:11 +02:00
mergify[bot]
b24de3e35b fix: dropping index to improve performance (backport #42820) (#42821)
fix: dropping index to improve performance (#42820)

fix: droping index to improve peformance
(cherry picked from commit 5404b21c7d)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-19 17:34:24 +05:30
mergify[bot]
0344442d42 perf: data import for stock entries (backport #42711) (#42819)
perf: data import for stock entries (#42711)

(cherry picked from commit 1511280464)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-19 14:55:41 +05:30
Raffael Meyer
0decd0955b Merge pull request #42805 from barredterra/de-hr-transl 2024-08-17 02:49:22 +02:00
barredterra
6f7fdbefac fix: german translations of "HR" 2024-08-17 02:48:39 +02:00
barredterra
dbd466b6b2 chore: resolve conflicts 2024-08-17 02:24:58 +02:00
barredterra
4914481105 fix: translatability of boldened text
(cherry picked from commit af0ae930ca)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
2024-08-17 00:21:05 +00:00
Raffael Meyer
8514c01a91 Merge pull request #42798 from barredterra/20240816-de-translations 2024-08-16 19:11:37 +02:00
barredterra
751c20984f fix: german translations 2024-08-16 18:54:06 +02:00
Frappe PR Bot
81b1cbd367 chore(release): Bumped to Version 15.33.2
## [15.33.2](https://github.com/frappe/erpnext/compare/v15.33.1...v15.33.2) (2024-08-16)

### Bug Fixes

* **patch:** replace repost with direct sql to update 'against_voucher ([4d9f522](4d9f522f22))
2024-08-16 11:09:43 +00:00
ruthra kumar
a72383da0e Merge pull request #42796 from frappe/mergify/bp/version-15/pr-42791
fix(patch): Use sql to update 'against_voucher' rather than reposting (backport #42791)
2024-08-16 16:38:27 +05:30
ruthra kumar
eb8213c4e7 chore: update patches.txt
(cherry picked from commit 1721175a20)
2024-08-16 10:26:26 +00:00
ruthra kumar
4d9f522f22 fix(patch): replace repost with direct sql to update 'against_voucher
(cherry picked from commit 13bb48434f)
2024-08-16 10:26:26 +00:00
ruthra kumar
528f42c713 Merge pull request #42794 from frappe/mergify/bp/version-15-hotfix/pr-42791
fix(patch): Use sql to update 'against_voucher' rather than reposting (backport #42791)
2024-08-16 15:55:14 +05:30
mergify[bot]
7cc7179b05 fix: Auto Create Serial and Batch Bundle For Outward (backport #42778) (#42792)
fix: Auto Create Serial and Batch Bundle For Outward (#42778)

(cherry picked from commit 48c3b0d094)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-16 15:54:14 +05:30
ruthra kumar
cfaad685a4 chore: update patches.txt
(cherry picked from commit 1721175a20)
2024-08-16 10:02:44 +00:00
ruthra kumar
e420fa9779 fix(patch): replace repost with direct sql to update 'against_voucher
(cherry picked from commit 13bb48434f)
2024-08-16 10:02:44 +00:00
Frappe PR Bot
fbf1160357 chore(release): Bumped to Version 15.33.1
## [15.33.1](https://github.com/frappe/erpnext/compare/v15.33.0...v15.33.1) (2024-08-16)

### Bug Fixes

* not able to create the batch (backport [#42784](https://github.com/frappe/erpnext/issues/42784)) (backport [#42785](https://github.com/frappe/erpnext/issues/42785)) ([#42786](https://github.com/frappe/erpnext/issues/42786)) ([a3e3585](a3e3585e50))
2024-08-16 06:19:07 +00:00
mergify[bot]
a3e3585e50 fix: not able to create the batch (backport #42784) (backport #42785) (#42786)
fix: not able to create the batch (backport #42784) (#42785)

fix: not able to create the batch (#42784)

(cherry picked from commit 32c4fab14f)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-08-16 11:47:53 +05:30
mergify[bot]
0f9849e672 fix: not able to create the batch (backport #42784) (#42785)
fix: not able to create the batch (#42784)

(cherry picked from commit 32c4fab14f)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-16 11:39:15 +05:30
ruthra kumar
3be037221a Merge pull request #42783 from frappe/mergify/bp/version-15-hotfix/pr-42774
refactor: Loosen account currency validation on groups (backport #42774)
2024-08-16 10:41:56 +05:30
ruthra kumar
b2e108afcc refactor: allow foreign currency accounts in Supplier Group
(cherry picked from commit 164498bafb)
2024-08-16 04:30:12 +00:00
ruthra kumar
114a5f8cca refactor: allow foreign currency accounts in customer group
(cherry picked from commit 066e935892)
2024-08-16 04:30:12 +00:00
mergify[bot]
aba54ba18f fix: ignore pricing rule while making DN from Pick List (backport #42763) (#42768)
fix: ignore pricing rule while making DN from Pick List (#42763)

(cherry picked from commit 0db82ec93a)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-14 23:03:01 +05:30
Nihantra C. Patel
6a7768367e Merge pull request #42771 from frappe/mergify/bp/version-15-hotfix/pr-42769
fix: disable rename from warehouse (backport #42769)
2024-08-14 17:15:26 +05:30
Nihantra C. Patel
3a1ad6e844 fix: disable rename from warehouse 2024-08-14 16:37:36 +05:30
Nihantra C. Patel
40abd82e2d fix: disable rename from warehouse
(cherry picked from commit c1812f74e8)

# Conflicts:
#	erpnext/stock/doctype/warehouse/warehouse.json
2024-08-14 11:03:49 +00:00
Khushi Rawat
2933a86458 Merge pull request #42767 from frappe/mergify/bp/version-15-hotfix/pr-42765
fix: set up filters for dimensions (backport #42765)
2024-08-14 14:45:14 +05:30
Khushi Rawat
ecf0d0b388 chore: linters check
(cherry picked from commit 0d42793397)
2024-08-14 09:07:38 +00:00
Khushi Rawat
b84ca04975 fix: removed extra filter condition
(cherry picked from commit 6fa29376a0)
2024-08-14 09:07:38 +00:00
Khushi Rawat
abb88662c1 fix: set up filters for dimensions
(cherry picked from commit 2fd8de2f76)
2024-08-14 09:07:37 +00:00
Frappe PR Bot
73af5be1c3 chore(release): Bumped to Version 15.33.0
# [15.33.0](https://github.com/frappe/erpnext/compare/v15.32.1...v15.33.0) (2024-08-14)

### Bug Fixes

* allow sale of asset for internal transfer ([97cadfe](97cadfe5d3))
* cancel Journal Entry on cancellation of asset value adjustment ([a429f2f](a429f2f626))
* currency changing while making PR from the PO (backport [#42718](https://github.com/frappe/erpnext/issues/42718)) ([#42721](https://github.com/frappe/erpnext/issues/42721)) ([50b1fa5](50b1fa5deb))
* delivery note creation issue (backport [#42696](https://github.com/frappe/erpnext/issues/42696)) ([#42697](https://github.com/frappe/erpnext/issues/42697)) ([6f16ae3](6f16ae3e00))
* dimensions in common party journal entry ([fd4143e](fd4143e686))
* duplicate labels in stock entry (backport [#42756](https://github.com/frappe/erpnext/issues/42756)) ([#42758](https://github.com/frappe/erpnext/issues/42758)) ([8624a0a](8624a0abce))
* error message in coa importer ([20c1bcd](20c1bcd654))
* **Exchange Rate Revaluation:** translatable strings ([da6eea7](da6eea7743))
* fetch months last date to avoid miscalculation ([765c110](765c1104c4))
* force fetch updates for subcription ([582fffc](582fffca93))
* german translation of exit ([a2df276](a2df276880))
* german translations for incoterms ([9789648](9789648175))
* ledger entries for pos return with update outstanding for self ([8cd1952](8cd1952da3))
* Maintain same rate on qty change on Quotation to Sales Order ([7ed7c22](7ed7c22469))
* patch to fix incorrect against_voucher references in ledger ([389227b](389227bce8))
* pre-commit for better code formatting ([94f4c92](94f4c92a03))
* price list when invoice created from timesheet ([2926915](2926915a06))
* price list when invoice created from timesheet ([536dc47](536dc47eb0))
* promotional scheme doctype fields in consitency with pricing rule ([#42432](https://github.com/frappe/erpnext/issues/42432)) ([87d8603](87d8603d1d))
* resolved conflict ([defd554](defd5541b0))
* Sort lists before calling itertools.groupby ([d8939e0](d8939e0bb0))
* text color in sales funnel report based on theme ([a8de8ae](a8de8aecf5))
* typeerror on payment entry ([64e75a8](64e75a8e08))
* update 'Paid Amount' on forex payment request ([c71f06b](c71f06be9e))
* Update Rate as per Valuation Rate for Internal Transfers only if Setting is Enabled ([#42050](https://github.com/frappe/erpnext/issues/42050)) ([6e833cc](6e833cce6a))
* warning message for negative stock (backport [#42683](https://github.com/frappe/erpnext/issues/42683)) ([#42710](https://github.com/frappe/erpnext/issues/42710)) ([a990577](a99057754d))

### Features

* changes in opportunity.py to show contacts and addresses from referenced and opportunities ([3cac4a5](3cac4a598f))
2024-08-14 08:02:34 +00:00
ruthra kumar
81e3d269dc Merge pull request #42745 from frappe/version-15-hotfix
chore: release v15
2024-08-14 13:31:20 +05:30
ruthra kumar
3dafa98eef Merge pull request #42761 from frappe/mergify/bp/version-15-hotfix/pr-42720
fix: incorrect 'against_voucher' for Pos return with 'Update Outstanding for Self' disabled. (backport #42720)
2024-08-14 12:27:24 +05:30
ruthra kumar
3699b96adf refactor: move patch to v14 and update patches.txt
(cherry picked from commit da2286802a)
2024-08-14 06:26:48 +00:00
ruthra kumar
f782af8ab3 test: against_voucher for pos_returns without updating for self
(cherry picked from commit 3fb0858321)
2024-08-14 06:26:48 +00:00
ruthra kumar
2af48e40a1 refactor: update patches.txt
(cherry picked from commit 4dc0d3a003)
2024-08-14 06:26:48 +00:00
ruthra kumar
389227bce8 fix: patch to fix incorrect against_voucher references in ledger
(cherry picked from commit 487d0a55f5)
2024-08-14 06:26:48 +00:00
ruthra kumar
8cd1952da3 fix: ledger entries for pos return with update outstanding for self
(cherry picked from commit 2cd9b28e5b)
2024-08-14 06:26:48 +00:00
Khushi Rawat
f128fcd86c Merge pull request #42759 from frappe/mergify/bp/version-15-hotfix/pr-42719
fix: linkage between asset repair and asset value adjustment (backport #42719)
2024-08-14 11:23:33 +05:30
Khushi Rawat
d890d02b5c test: new depreciation after cancelling asset repair
(cherry picked from commit 88a5824e31)
2024-08-13 19:01:02 +00:00
Khushi Rawat
defd5541b0 fix: resolved conflict
(cherry picked from commit c085b6159b)
2024-08-13 19:01:01 +00:00
mergify[bot]
8624a0abce fix: duplicate labels in stock entry (backport #42756) (#42758)
fix: duplicate labels in stock entry (#42756)

(cherry picked from commit 8aadc18ee8)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-13 20:31:05 +05:30
ruthra kumar
13b79c6781 Merge pull request #42750 from frappe/mergify/bp/version-15-hotfix/pr-40964
fix: price list when invoice created from timesheet (backport #40964)
2024-08-13 17:35:50 +05:30
Nihantra C. Patel
2926915a06 fix: price list when invoice created from timesheet
(cherry picked from commit 882227a460)
2024-08-13 11:41:40 +00:00
Nihantra C. Patel
536dc47eb0 fix: price list when invoice created from timesheet
(cherry picked from commit 39d6df7c7d)
2024-08-13 11:41:39 +00:00
ruthra kumar
225843265e Merge pull request #42749 from frappe/mergify/bp/version-15-hotfix/pr-42221
fix: Force Fetching updates on Subscriptions (backport #42221)
2024-08-13 16:47:35 +05:30
ruthra kumar
a1f98603a6 refactor: test for force-fetch on future subscription
(cherry picked from commit fd680380bb)
2024-08-13 10:53:24 +00:00
ruthra kumar
ab59b33606 chore: minor naming change
(cherry picked from commit d8b6767697)
2024-08-13 10:53:24 +00:00
ruthra kumar
1f1e934675 refactor: don't process future subscriptions
(cherry picked from commit 3a11577411)
2024-08-13 10:53:24 +00:00
ruthra kumar
582fffca93 fix: force fetch updates for subcription
(cherry picked from commit 1ef890db73)
2024-08-13 10:53:23 +00:00
Khushi Rawat
e9b3a24221 Merge pull request #42742 from frappe/mergify/bp/version-15-hotfix/pr-42689
fix: fetch month's last date to avoid miscalculation (backport #42689)
2024-08-13 15:32:04 +05:30
ruthra kumar
0d5ac078f6 Merge pull request #42741 from frappe/mergify/bp/version-15-hotfix/pr-42726
fix: text color in sales funnel report based on theme (backport #42726)
2024-08-13 14:36:13 +05:30
ruthra kumar
f109164f88 Merge pull request #42739 from frappe/mergify/bp/version-15-hotfix/pr-42590
fix: error message in coa importer (backport #42590)
2024-08-13 14:35:53 +05:30
Khushi Rawat
765c1104c4 fix: fetch months last date to avoid miscalculation
(cherry picked from commit 70ff4e7644)
2024-08-13 08:42:33 +00:00
ljain112
a8de8aecf5 fix: text color in sales funnel report based on theme
(cherry picked from commit 61bc0925d5)
2024-08-13 08:36:31 +00:00
ljain112
20c1bcd654 fix: error message in coa importer
(cherry picked from commit 5d0a38dfc7)
2024-08-13 08:33:21 +00:00
ruthra kumar
6eaad90535 Merge pull request #42735 from frappe/mergify/bp/version-15-hotfix/pr-42733
refactor: add a new filter flag in Process Statement of Accounts (backport #42733)
2024-08-13 11:49:29 +05:30
Smit Vora
91a5c562d8 Merge pull request #42489 from frappe/mergify/bp/version-15-hotfix/pr-42050
fix: Update Rate as per Valuation Rate for Internal Transfers only if Setting is Enabled (backport #42050)
2024-08-13 11:25:09 +05:30
ruthra kumar
70d5593ace chore: resolve conflict 2024-08-13 11:21:09 +05:30
ruthra kumar
f3401243be refactor: pass filter to General Ledger
(cherry picked from commit 90880c8c01)
2024-08-13 05:41:35 +00:00
ruthra kumar
19dfeca96d refactor: cr and dr note filter in Statement of Accounts
(cherry picked from commit 0cf478c4c2)

# Conflicts:
#	erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json
2024-08-13 05:41:35 +00:00
ruthra kumar
774db56762 refactor: combine vouchers from both ignore
(cherry picked from commit 4cc5cd5a71)
2024-08-13 05:41:35 +00:00
Khushi Rawat
d15c535f86 Merge pull request #42730 from frappe/mergify/bp/version-15-hotfix/pr-42729
fix: cancel Journal Entry on cancellation of asset value adjustment (backport #42729)
2024-08-13 02:31:24 +05:30
Khushi Rawat
a429f2f626 fix: cancel Journal Entry on cancellation of asset value adjustment
(cherry picked from commit 4b7f1f2d67)
2024-08-12 20:43:30 +00:00
ruthra kumar
dfbc7e8b33 Merge pull request #42725 from frappe/mergify/bp/version-15-hotfix/pr-42672
fix: update 'Paid Amount' on forex payment request (backport #42672)
2024-08-12 16:31:35 +05:30
ruthra kumar
b41f10c1b9 chore: resolve conflict 2024-08-12 16:13:59 +05:30
ruthra kumar
44745a757d test: currency conversion on foreign currency account
(cherry picked from commit f913c0fde1)
2024-08-12 10:38:35 +00:00
ruthra kumar
47bf2d408b test: make use of test fixture
(cherry picked from commit d6d0a1b38d)

# Conflicts:
#	erpnext/accounts/doctype/payment_request/test_payment_request.py
2024-08-12 10:38:35 +00:00
ruthra kumar
c71f06be9e fix: update 'Paid Amount' on forex payment request
(cherry picked from commit 7b0dfb2a05)
2024-08-12 10:38:34 +00:00
mergify[bot]
50b1fa5deb fix: currency changing while making PR from the PO (backport #42718) (#42721)
fix: currency changing while making PR from the PO (#42718)

(cherry picked from commit 17ba0cff44)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-12 15:20:04 +05:30
mergify[bot]
a99057754d fix: warning message for negative stock (backport #42683) (#42710)
fix: warning message for negative stock (#42683)

(cherry picked from commit deccb007c1)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-11 12:35:13 +05:30
mergify[bot]
6f16ae3e00 fix: delivery note creation issue (backport #42696) (#42697)
fix: delivery note creation issue (#42696)

(cherry picked from commit b65072cd98)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-09 15:24:34 +05:30
ruthra kumar
38d80aab99 Merge pull request #42695 from frappe/mergify/bp/version-15-hotfix/pr-42428
fix: Sort lists before calling itertools.groupby (backport #42428)
2024-08-09 12:44:38 +05:30
Corentin Forler
d8939e0bb0 fix: Sort lists before calling itertools.groupby
(cherry picked from commit 45a6ecbd38)
2024-08-09 06:23:57 +00:00
ruthra kumar
f376abf0fe Merge pull request #42693 from frappe/mergify/bp/version-15-hotfix/pr-42691
fix: typeerror on payment entry (backport #42691)
2024-08-09 11:52:18 +05:30
ruthra kumar
64e75a8e08 fix: typeerror on payment entry
(cherry picked from commit 9cdca0d662)
2024-08-09 06:11:16 +00:00
Raffael Meyer
67a210f722 Merge pull request #42684 from barredterra/exit-translation
fix: german translation of exit
2024-08-08 22:23:34 +02:00
barredterra
a2df276880 fix: german translation of exit 2024-08-08 20:20:22 +02:00
Raffael Meyer
151d293aaf Merge pull request #42680 from frappe/mergify/bp/version-15-hotfix/pr-42679
fix(Exchange Rate Revaluation): translatable strings (backport #42679)
2024-08-08 13:17:27 +02:00
barredterra
13f6f3259d refactor(Exchange Rate Revaluation): remove unused variables
(cherry picked from commit 8bd84e9d51)
2024-08-08 10:09:53 +00:00
barredterra
da6eea7743 fix(Exchange Rate Revaluation): translatable strings
(cherry picked from commit dc29fb8759)
2024-08-08 10:09:52 +00:00
ruthra kumar
b28fa8b994 Merge pull request #42678 from frappe/mergify/bp/version-15-hotfix/pr-42673
fix: Maintain same rate on qty change on Quotation to Sales Order (backport #42673)
2024-08-08 13:43:46 +05:30
ruthra kumar
7ed7c22469 fix: Maintain same rate on qty change on Quotation to Sales Order
(cherry picked from commit 91ce9fce9b)
2024-08-08 08:04:30 +00:00
Frappe PR Bot
6a4f06cf4a chore(release): Bumped to Version 15.32.1
## [15.32.1](https://github.com/frappe/erpnext/compare/v15.32.0...v15.32.1) (2024-08-08)

### Bug Fixes

* promotional scheme doctype fields in consitency with pricing rule ([#42432](https://github.com/frappe/erpnext/issues/42432)) ([2aa90fd](2aa90fdc14))
2024-08-08 07:06:38 +00:00
ruthra kumar
dfe0079573 Merge pull request #42674 from frappe/mergify/bp/version-15/pr-42550
fix: promotional scheme doctype fields in consitency with pricing rule (backport #42432) (backport #42550)
2024-08-08 12:35:25 +05:30
Lakshit Jain
a983d65404 chore: resolve conflicts (#42553)
(cherry picked from commit 78eb443614)
2024-08-08 06:43:38 +00:00
Lakshit Jain
2aa90fdc14 fix: promotional scheme doctype fields in consitency with pricing rule (#42432)
* fix: add "round_free_qty" check box in promotional scheme

* fix: add `add_for_price_list` field

* fix: set_query in setup for promotional scheme

---------

(cherry picked from commit 8624aeca54)

# Conflicts:
#	erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.json
#	erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.json
(cherry picked from commit 87d8603d1d)
2024-08-08 06:43:38 +00:00
Shariq Ansari
a81bc28afb Merge pull request #42668 from frappe/mergify/bp/version-15-hotfix/pr-42596
fix: changes in opportunity.py to show contacts and addresses created from opportunity (backport #42596)
2024-08-08 11:39:44 +05:30
Smit Vora
70e40183bb Merge pull request #42551 from frappe/mergify/bp/version-15-hotfix/pr-42392
fix: allow sale of asset for internal transfer (backport #42392)
2024-08-08 11:22:00 +05:30
Smit Vora
bdfc1ddfc3 Merge pull request #42550 from frappe/mergify/bp/version-15-hotfix/pr-42432
fix: promotional scheme doctype fields in consitency with pricing rule (backport #42432)
2024-08-08 11:21:09 +05:30
Raffael Meyer
fb770f5633 Merge pull request #42669 from barredterra/incoterms-translation 2024-08-07 20:52:32 +02:00
barredterra
9789648175 fix: german translations for incoterms 2024-08-07 20:08:54 +02:00
Dietmar Fischer
94f4c92a03 fix: pre-commit for better code formatting
(cherry picked from commit 511a0b9f37)
2024-08-07 14:29:48 +00:00
Dietmar Fischer
3cac4a598f feat: changes in opportunity.py to show contacts and addresses from referenced and opportunities
(cherry picked from commit 61576ca030)
2024-08-07 14:29:47 +00:00
ruthra kumar
654fea8a3b Merge pull request #42661 from frappe/mergify/bp/version-15-hotfix/pr-42578
fix: dimensions in common party journal entry (backport #42578)
2024-08-07 16:23:54 +05:30
ruthra kumar
838d341d91 test: dimension inheritance on Exc Gain/Loss JV on Common party
(cherry picked from commit 8040544216)
2024-08-07 10:34:09 +00:00
ljain112
fd4143e686 fix: dimensions in common party journal entry
(cherry picked from commit ac629ede79)
2024-08-07 10:34:09 +00:00
Frappe PR Bot
2e3b2db03b chore(release): Bumped to Version 15.32.0
# [15.32.0](https://github.com/frappe/erpnext/compare/v15.31.5...v15.32.0) (2024-08-07)

### Bug Fixes

* 'undefined' in PL and BS report summary on Consolidated report ([3da7071](3da7071327))
* all warehouse filter for the stock report (backport [#42584](https://github.com/frappe/erpnext/issues/42584)) ([#42604](https://github.com/frappe/erpnext/issues/42604)) ([830b95b](830b95bdcb))
* company filter for filtring tax withheld vouchers ([3ad1f2d](3ad1f2d0d0))
* disable primary action button only when there are no active capitalization ([2d644ac](2d644ac066))
* Discount and taxes in return document should follow the reference document (backport [#41911](https://github.com/frappe/erpnext/issues/41911)) ([#42574](https://github.com/frappe/erpnext/issues/42574)) ([9321408](9321408154))
* do not update item price and last purchase rate for inter transf… (backport [#42616](https://github.com/frappe/erpnext/issues/42616)) ([#42633](https://github.com/frappe/erpnext/issues/42633)) ([59b9b7d](59b9b7dc91))
* german translations ([f27e9f3](f27e9f3089))
* inter transfer delivery note issue with batch (backport [#42552](https://github.com/frappe/erpnext/issues/42552)) ([#42556](https://github.com/frappe/erpnext/issues/42556)) ([97cc308](97cc3082e1))
* min height for rows in sales funnel ([2f81c99](2f81c99143))
* resolved conflict ([#42557](https://github.com/frappe/erpnext/issues/42557)) ([c3293d1](c3293d110c))
* reverse debit credit for party gl entry in payment entry based on negative amount ([#42367](https://github.com/frappe/erpnext/issues/42367)) ([14f9aef](14f9aef55c))
* set currency on change of company considering customer default currency (backport [#42405](https://github.com/frappe/erpnext/issues/42405)) ([#42547](https://github.com/frappe/erpnext/issues/42547)) ([7c8d13c](7c8d13c51a))
* set query filters for sales / purchase tax template on PE ([dc9cf74](dc9cf74be8))
* use get_last_day to get the correct date (backport [#42564](https://github.com/frappe/erpnext/issues/42564)) ([#42598](https://github.com/frappe/erpnext/issues/42598)) ([2de86eb](2de86eb0f4))

### Features

* expiry date column in Available Batch Report (backport [#42628](https://github.com/frappe/erpnext/issues/42628)) ([#42642](https://github.com/frappe/erpnext/issues/42642)) ([d8768c5](d8768c5377))
2024-08-07 09:30:48 +00:00
ruthra kumar
51fa336350 Merge pull request #42649 from frappe/version-15-hotfix
chore: release v15
2024-08-07 14:59:36 +05:30
Khushi Rawat
0a3c0ecea2 Merge pull request #42654 from frappe/mergify/bp/version-15-hotfix/pr-42593
fix: disable primary action button only when there are no active capitalization (backport #42593)
2024-08-06 20:19:11 +05:30
Khushi Rawat
2d644ac066 fix: disable primary action button only when there are no active capitalization
(cherry picked from commit bb877f4a6b)
2024-08-06 13:43:27 +00:00
mergify[bot]
d8768c5377 feat: expiry date column in Available Batch Report (backport #42628) (#42642)
feat: expiry date column in Available Batch Report (#42628)

(cherry picked from commit faff84c6e5)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-06 14:45:12 +05:30
ruthra kumar
65c1387a04 Merge pull request #42646 from frappe/mergify/bp/version-15-hotfix/pr-42592
fix: company filter for filtring tax withheld vouchers (backport #42592)
2024-08-06 13:38:47 +05:30
ljain112
3ad1f2d0d0 fix: company filter for filtring tax withheld vouchers
(cherry picked from commit cfe2ae604b)
2024-08-06 07:47:21 +00:00
ruthra kumar
af31f3b291 Merge pull request #42644 from frappe/mergify/bp/version-15-hotfix/pr-42545
fix: min height for rows in sales funnel (backport #42545)
2024-08-06 13:09:29 +05:30
ljain112
2f81c99143 fix: min height for rows in sales funnel
(cherry picked from commit fd71d8af52)
2024-08-06 07:33:19 +00:00
ruthra kumar
e679b336ef Merge pull request #42638 from frappe/mergify/bp/version-15-hotfix/pr-42636
refactor: posting date should not be considered for ignore filters in GL (backport #42636)
2024-08-06 11:43:46 +05:30
ruthra kumar
82c17632f7 refactor: posting date is not considered for ignore filters in GL
(cherry picked from commit c930f8ba9d)
2024-08-06 05:26:25 +00:00
mergify[bot]
59b9b7dc91 fix: do not update item price and last purchase rate for inter transf… (backport #42616) (#42633)
fix: do not update item price and last purchase rate for inter transf… (#42616)

fix: do not update item price and last purchase rate for inter transfer transaction
(cherry picked from commit c8af544ef3)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-06 08:19:59 +05:30
ruthra kumar
d242d5330c Merge pull request #42626 from frappe/mergify/bp/version-15-hotfix/pr-42555
refactor: date filters should be mandatory in Sales Pipeline Analytics report (backport #42555)
2024-08-05 15:32:17 +05:30
ruthra kumar
05c606b65d refactor(test): use test fixture and supply from and to dates
(cherry picked from commit 4253caf910)
2024-08-05 09:39:30 +00:00
ruthra kumar
52578b03b4 refactor: consider empty-string as Not Assigned
(cherry picked from commit 213b2ba942)
2024-08-05 09:39:30 +00:00
ruthra kumar
8978a54479 refactor: report columns should be based on from and to dates
(cherry picked from commit 751a25c4b7)
2024-08-05 09:39:30 +00:00
ruthra kumar
b44598cb7a refactor: make 'from_date' and 'to_date' mandatory
(cherry picked from commit 3617b41b95)
2024-08-05 09:39:30 +00:00
ruthra kumar
48e05b6110 refactor: date filters should be explicit
(cherry picked from commit 40c166a0a0)
2024-08-05 09:39:30 +00:00
ruthra kumar
3640bc7f88 Merge pull request #42623 from frappe/mergify/bp/version-15-hotfix/pr-42621
refactor(test): clear data before GL report tests (backport #42621)
2024-08-05 14:02:19 +05:30
ruthra kumar
531410820f refactor(test): clear old records on GL report tests
(cherry picked from commit 56620785a0)
2024-08-05 08:15:31 +00:00
ruthra kumar
d08eba7308 Merge pull request #42614 from frappe/mergify/bp/version-15-hotfix/pr-42597
refactor: filter to ignore system generated cr / dr reconciliation journals on general ledger (backport #42597)
2024-08-05 11:34:00 +05:30
ruthra kumar
c1bfa0a31a refactor(test): filter and reconcile concerned vouchers
(cherry picked from commit 9ade269b7a)
2024-08-05 05:44:25 +00:00
ruthra kumar
155ca14b19 test: clear old data
(cherry picked from commit 991069bfbc)
2024-08-05 05:44:25 +00:00
ruthra kumar
3ee5991896 refactor: make use of date filters on ignore filterss
(cherry picked from commit 03f3ab522f)
2024-08-05 05:44:25 +00:00
ruthra kumar
7ec7e11634 test: ignore filter for system generated cr / dr note journals
(cherry picked from commit 3ffac73598)
2024-08-05 05:44:25 +00:00
ruthra kumar
17a6224a3f refactor: ignore system generated cr / dr notes on general ledger
(cherry picked from commit bb8c9b5a58)
2024-08-05 05:44:25 +00:00
ruthra kumar
e9bcb1bbb2 refactor: ignore filter in general ledger for cr / dr notes
(cherry picked from commit 59d5beee20)
2024-08-05 05:44:25 +00:00
Frappe PR Bot
d8080910c6 chore(release): Bumped to Version 15.31.5
## [15.31.5](https://github.com/frappe/erpnext/compare/v15.31.4...v15.31.5) (2024-08-03)

### Bug Fixes

* use get_last_day to get the correct date (backport [#42564](https://github.com/frappe/erpnext/issues/42564)) ([#42602](https://github.com/frappe/erpnext/issues/42602)) ([02a31ca](02a31caa05))
2024-08-03 03:58:31 +00:00
mergify[bot]
02a31caa05 fix: use get_last_day to get the correct date (backport #42564) (#42602)
fix: use get_last_day to get the correct date (#42564)

(cherry picked from commit 5d58eb67a6)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-08-03 09:27:16 +05:30
mergify[bot]
830b95bdcb fix: all warehouse filter for the stock report (backport #42584) (#42604)
fix: all warehouse filter for the stock report

(cherry picked from commit a4311e345d)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2024-08-03 09:02:25 +05:30
mergify[bot]
2de86eb0f4 fix: use get_last_day to get the correct date (backport #42564) (#42598)
fix: use get_last_day to get the correct date (#42564)

(cherry picked from commit 5d58eb67a6)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-08-02 17:10:37 +05:30
Raffael Meyer
9616c59ed8 Merge pull request #42581 from barredterra/german-translations-01082024 2024-08-01 16:56:24 +02:00
barredterra
f27e9f3089 fix: german translations 2024-08-01 16:33:19 +02:00
mergify[bot]
9321408154 fix: Discount and taxes in return document should follow the reference document (backport #41911) (#42574)
fix: Discount and taxes in return document should follow the reference document (#41911)

* fix: Discount and taxes in return document should follow the reference document

* fix: Ignore Pricing rule on debit/credit note if created against PI/SI with test cases

* fix: linter issue

(cherry picked from commit 281198456d)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-08-01 15:45:18 +05:30
Frappe PR Bot
703b9accb8 chore(release): Bumped to Version 15.31.4
## [15.31.4](https://github.com/frappe/erpnext/compare/v15.31.3...v15.31.4) (2024-08-01)

### Bug Fixes

* inter transfer delivery note issue with batch (backport [#42552](https://github.com/frappe/erpnext/issues/42552)) ([#42556](https://github.com/frappe/erpnext/issues/42556)) ([bf0e2b3](bf0e2b3b52))
2024-08-01 09:12:25 +00:00
rohitwaghchaure
aca0662a64 Merge pull request #42571 from frappe/mergify/bp/version-15/pr-42556
fix: inter transfer delivery note issue with batch (backport #42552) (backport #42556)
2024-08-01 14:41:10 +05:30
mergify[bot]
bf0e2b3b52 fix: inter transfer delivery note issue with batch (backport #42552) (#42556)
fix: inter transfer delivery note issue with batch (#42552)

(cherry picked from commit f620ef20ae)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
(cherry picked from commit 97cc3082e1)
2024-08-01 07:53:46 +00:00
mergify[bot]
97cc3082e1 fix: inter transfer delivery note issue with batch (backport #42552) (#42556)
fix: inter transfer delivery note issue with batch (#42552)

(cherry picked from commit f620ef20ae)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-08-01 13:22:33 +05:30
ruthra kumar
b7b4de7c8d Merge pull request #42566 from frappe/mergify/bp/version-15-hotfix/pr-42563
fix: set query filters for sales / purchase tax template on PE (backport #42563)
2024-07-31 17:28:56 +05:30
ruthra kumar
dc9cf74be8 fix: set query filters for sales / purchase tax template on PE
(cherry picked from commit 9fe47ac101)
2024-07-31 11:39:12 +00:00
ruthra kumar
4e826fb3e9 Merge pull request #42560 from frappe/mergify/bp/version-15-hotfix/pr-42558
fix: 'undefined' in PL and BS report summary on Consolidated report (backport #42558)
2024-07-31 16:19:29 +05:30
Raffael Meyer
553513c4c6 Merge pull request #42561 from barredterra/backport-translations 2024-07-31 12:48:52 +02:00
barredterra
5cfa2d0692 chore: backport german translations from develop 2024-07-31 12:19:13 +02:00
ruthra kumar
3da7071327 fix: 'undefined' in PL and BS report summary on Consolidated report
(cherry picked from commit dd5a5e4919)
2024-07-31 10:04:00 +00:00
Nabin Hait
c3293d110c fix: resolved conflict (#42557) 2024-07-31 14:54:52 +05:30
Lakshit Jain
78eb443614 chore: resolve conflicts (#42553) 2024-07-31 13:38:38 +05:30
ljain112
97cadfe5d3 fix: allow sale of asset for internal transfer
(cherry picked from commit 972329cc16)
2024-07-31 07:54:58 +00:00
Lakshit Jain
87d8603d1d fix: promotional scheme doctype fields in consitency with pricing rule (#42432)
* fix: add "round_free_qty" check box in promotional scheme

* fix: add `add_for_price_list` field

* fix: set_query in setup for promotional scheme

---------

(cherry picked from commit 8624aeca54)

# Conflicts:
#	erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.json
#	erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.json
2024-07-31 07:51:57 +00:00
Smit Vora
7dc68cabcc Merge pull request #42548 from frappe/mergify/bp/version-15-hotfix/pr-42367
fix: reverse debit credit for party gl entry in payment entry based on negative amount (backport #42367)
2024-07-31 13:17:08 +05:30
mergify[bot]
7c8d13c51a fix: set currency on change of company considering customer default currency (backport #42405) (#42547)
fix: set currency on change of company considering customer default currency (#42405)

(cherry picked from commit 4986f28a89)

# Conflicts:
#	erpnext/public/js/controllers/transaction.js

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-07-31 13:02:12 +05:30
Lakshit Jain
14f9aef55c fix: reverse debit credit for party gl entry in payment entry based on negative amount (#42367)
* fix: do not absolute the amount for party gl entries

* fix: reverse debit credit for party gl entry based on negative amount

* refactor: reduce nesting of if condition

---------

(cherry picked from commit a694390a12)
2024-07-31 07:16:57 +00:00
Frappe PR Bot
da3eddeb26 chore(release): Bumped to Version 15.31.3
## [15.31.3](https://github.com/frappe/erpnext/compare/v15.31.2...v15.31.3) (2024-07-31)

### Bug Fixes

* Adjust initial month's depreciation to end of depreciation period ([9d2ef4d](9d2ef4d3e8))
* builtins.KeyError: ('ABC', 'Store - CP') (backport [#42505](https://github.com/frappe/erpnext/issues/42505)) ([#42509](https://github.com/frappe/erpnext/issues/42509)) ([f25b38c](f25b38caf5))
* consider payment entries for checking if tds is deducted ([183ac41](183ac41550))
* dynamic condition in the pricing rule not working (backport [#42467](https://github.com/frappe/erpnext/issues/42467)) ([#42495](https://github.com/frappe/erpnext/issues/42495)) ([ac2ef21](ac2ef21896))
* field_type is small text for v15 ([9e99eda](9e99eda3c3))
* fields alteration related to subcontracting ([80d4dc2](80d4dc2016))
* Fields Modification for Subcontracting DocTypes ([#42383](https://github.com/frappe/erpnext/issues/42383)) ([422824b](422824b9e7))
* ignore duplicates while creating default templates ([aea8271](aea8271f7e))
* incorrect cost_center on AR/AP report ([0c2e948](0c2e9480cb))
* incorrect current qty for the batch in stock reco (backport [#42434](https://github.com/frappe/erpnext/issues/42434)) ([#42459](https://github.com/frappe/erpnext/issues/42459)) ([298a569](298a5699f1))
* keyerror posting_time (backport [#42452](https://github.com/frappe/erpnext/issues/42452)) ([#42460](https://github.com/frappe/erpnext/issues/42460)) ([2d2140a](2d2140aad0))
* not able to save BOM Creator ([#42540](https://github.com/frappe/erpnext/issues/42540)) ([61280e6](61280e6072))
* parenttype in item wise purchase and sales register ([322fbe9](322fbe92ee))
* performance issue for the report Purchase Order Analysis report (backport [#42503](https://github.com/frappe/erpnext/issues/42503)) ([#42507](https://github.com/frappe/erpnext/issues/42507)) ([edf1fcb](edf1fcb742))
* price_list_currency not found error (backport [#42534](https://github.com/frappe/erpnext/issues/42534)) ([#42539](https://github.com/frappe/erpnext/issues/42539)) ([5fa185d](5fa185d480))
* purchase return from rejected warehouse (backport [#42531](https://github.com/frappe/erpnext/issues/42531)) ([#42535](https://github.com/frappe/erpnext/issues/42535)) ([b7d70ac](b7d70ac928))
* set pos data if not return doc ([25fe08e](25fe08eb74))
* **tests:** added tests for usecase ([1390c86](1390c86fc4))
* warehouse filter in Product Bundle Balance (backport [#42532](https://github.com/frappe/erpnext/issues/42532)) ([#42537](https://github.com/frappe/erpnext/issues/42537)) ([826577c](826577c88f))
* Warranty Expiry Date not set in the serial number (backport [#42513](https://github.com/frappe/erpnext/issues/42513)) ([#42515](https://github.com/frappe/erpnext/issues/42515)) ([fc0db19](fc0db1941a))

### Performance Improvements

* huge number of serial no creation (backport [#42522](https://github.com/frappe/erpnext/issues/42522)) ([#42544](https://github.com/frappe/erpnext/issues/42544)) ([6840f6c](6840f6cb26))
2024-07-31 06:03:49 +00:00
ruthra kumar
43dadc763c Merge pull request #42541 from frappe/version-15-hotfix
chore: release v15
2024-07-31 11:32:35 +05:30
Khushi Rawat
64c185f097 Merge pull request #42546 from frappe/mergify/bp/version-15-hotfix/pr-42525
fix: Adjust initial month's depreciation to end of depreciation period (backport #42525)
2024-07-30 19:24:32 +05:30
Khushi Rawat
1390c86fc4 fix(tests): added tests for usecase
(cherry picked from commit f0768010d9)
2024-07-30 13:35:18 +00:00
Khushi Rawat
9d2ef4d3e8 fix: Adjust initial month's depreciation to end of depreciation period
(cherry picked from commit cbb749a3a5)
2024-07-30 13:35:17 +00:00
mergify[bot]
6840f6cb26 perf: huge number of serial no creation (backport #42522) (#42544)
perf: huge number of serial no creation (#42522)

(cherry picked from commit 1c7f7c8d1a)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-30 17:01:43 +05:30
rohitwaghchaure
61280e6072 fix: not able to save BOM Creator (#42540) 2024-07-30 15:13:19 +05:30
mergify[bot]
b7d70ac928 fix: purchase return from rejected warehouse (backport #42531) (#42535)
fix: purchase return from rejected warehouse (#42531)

(cherry picked from commit c5d68333c9)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-30 14:53:42 +05:30
mergify[bot]
826577c88f fix: warehouse filter in Product Bundle Balance (backport #42532) (#42537)
fix: warehouse filter in Product Bundle Balance (#42532)

(cherry picked from commit 0ecfa709d8)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-30 14:53:03 +05:30
mergify[bot]
5fa185d480 fix: price_list_currency not found error (backport #42534) (#42539)
fix: price_list_currency not found error (#42534)

(cherry picked from commit 23fed831a0)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-30 14:52:23 +05:30
ruthra kumar
75271ca1a0 Merge pull request #42533 from frappe/mergify/bp/version-15-hotfix/pr-42476
refactor: checkbox to control Payment Request creation (backport #42476)
2024-07-30 14:04:48 +05:30
ruthra kumar
f03e58f5f6 chore: resolve conflict 2024-07-30 13:39:14 +05:30
ruthra kumar
596110dd65 refactor: checkbox to control Payment Request creation
(cherry picked from commit ce81fd9ba6)

# Conflicts:
#	erpnext/accounts/doctype/payment_request/payment_request.py
2024-07-30 08:07:04 +00:00
ruthra kumar
76018f5b9c Merge pull request #42530 from frappe/mergify/bp/version-15-hotfix/pr-42528
chore: button name should reflect what it creates (backport #42528)
2024-07-30 12:12:28 +05:30
ruthra kumar
1019f6d158 chore: button name should reflect what it creates
(cherry picked from commit 0b6e7f83cd)
2024-07-30 06:31:20 +00:00
mergify[bot]
fc0db1941a fix: Warranty Expiry Date not set in the serial number (backport #42513) (#42515)
fix: Warranty Expiry Date not set in the serial number (#42513)

* fix: Warranty Expiry Date not set in the serial number

* chore: fix linters issue

(cherry picked from commit 8eff168d76)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-29 15:44:01 +05:30
mergify[bot]
f25b38caf5 fix: builtins.KeyError: ('ABC', 'Store - CP') (backport #42505) (#42509)
fix: builtins.KeyError: ('ABC', 'Store - CP') (#42505)

(cherry picked from commit 25dac1f18e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-29 10:21:11 +05:30
mergify[bot]
edf1fcb742 fix: performance issue for the report Purchase Order Analysis report (backport #42503) (#42507)
fix: performance issue for the report Purchase Order Analysis report (#42503)

(cherry picked from commit cb522f8f22)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-29 09:50:02 +05:30
Frappe PR Bot
4b66fcad64 chore(release): Bumped to Version 15.31.2
## [15.31.2](https://github.com/frappe/erpnext/compare/v15.31.1...v15.31.2) (2024-07-27)

### Bug Fixes

* dynamic condition in the pricing rule not working (backport [#42467](https://github.com/frappe/erpnext/issues/42467)) (backport [#42495](https://github.com/frappe/erpnext/issues/42495)) ([#42496](https://github.com/frappe/erpnext/issues/42496)) ([334c4d0](334c4d0676))
2024-07-27 05:38:30 +00:00
mergify[bot]
334c4d0676 fix: dynamic condition in the pricing rule not working (backport #42467) (backport #42495) (#42496)
fix: dynamic condition in the pricing rule not working (backport #42467) (#42495)

fix: dynamic condition in the pricing rule not working (#42467)

(cherry picked from commit 0e817f42ef)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-07-27 11:07:20 +05:30
mergify[bot]
ac2ef21896 fix: dynamic condition in the pricing rule not working (backport #42467) (#42495)
fix: dynamic condition in the pricing rule not working (#42467)

(cherry picked from commit 0e817f42ef)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-27 10:41:07 +05:30
ruthra kumar
b529dc7dd1 Merge pull request #42492 from frappe/mergify/bp/version-15-hotfix/pr-42477
fix: incorrect cost_center on AR/AP report (backport #42477)
2024-07-26 20:10:30 +05:30
ruthra kumar
4b24f8bc04 test: invoice cost center reported in AR/AP report
(cherry picked from commit 9a0894fd65)
2024-07-26 14:14:32 +00:00
ruthra kumar
0c2e9480cb fix: incorrect cost_center on AR/AP report
(cherry picked from commit 3e19041fa3)
2024-07-26 14:14:31 +00:00
Ninad Parikh
6e833cce6a fix: Update Rate as per Valuation Rate for Internal Transfers only if Setting is Enabled (#42050)
* fix: update rate for internal transfers only if settings enabled

* fix: better naming

* fix: create field for storing incoming rate in purchase doctypes

* fix: use qty instead of qty_in_stock_uom

* fix: add description, refactor for readablility

* test: test case to validate internal transfers at arm's length price

* fix: minor fix

* fix: deletion of code not required

---------

Co-authored-by: Smit Vora <smitvora203@gmail.com>
(cherry picked from commit 723ac0ffc4)
2024-07-26 12:58:12 +00:00
Smit Vora
901f83edd5 Merge pull request #42487 from frappe/mergify/bp/version-15-hotfix/pr-42470
fix: Fields Alteration Related to Subcontracting (backport #42470)
2024-07-26 18:23:11 +05:30
Ninad1306
80d4dc2016 fix: fields alteration related to subcontracting
(cherry picked from commit 77590e6077)
2024-07-26 10:56:15 +00:00
Smit Vora
3a279db06b Merge pull request #42468 from frappe/mergify/bp/version-15-hotfix/pr-42383
fix: Fields Modification for Subcontracting DocTypes (backport #42383)
2024-07-26 16:24:10 +05:30
Smit Vora
3053254db7 Merge pull request #42484 from frappe/mergify/bp/version-15-hotfix/pr-42305
fix: consider payment entries for checking if tds is deducted (backport #42305)
2024-07-26 15:17:18 +05:30
Smit Vora
d135193f6c Merge pull request #42482 from frappe/mergify/bp/version-15-hotfix/pr-42444
fix: parenttype in purchase and sales item query (backport #42444)
2024-07-26 15:16:54 +05:30
ljain112
183ac41550 fix: consider payment entries for checking if tds is deducted
(cherry picked from commit 40b59de4cd)
2024-07-26 09:11:50 +00:00
ljain112
322fbe92ee fix: parenttype in item wise purchase and sales register
(cherry picked from commit 35981b8730)
2024-07-26 08:56:43 +00:00
Smit Vora
367b7eeeba Merge pull request #42471 from Ninad1306/backport_changes
fix: Field type is small text for v15
2024-07-26 14:04:39 +05:30
ruthra kumar
dd8fff6d43 Merge pull request #42474 from frappe/mergify/bp/version-15-hotfix/pr-42472
refactor: index on Purchase Invoice 'release_date' (backport #42472)
2024-07-25 21:51:23 +05:30
ruthra kumar
3e3bdf7491 refactor: index on Purchase Invoice 'release_date'
(cherry picked from commit 764dd12b10)
2024-07-25 15:57:59 +00:00
Ninad1306
9e99eda3c3 fix: field_type is small text for v15 2024-07-25 18:39:20 +05:30
Smit Vora
05b9432f6d Merge pull request #42402 from frappe/mergify/bp/version-15-hotfix/pr-42386
fix: set pos data if not return doc (backport #42386)
2024-07-25 11:40:49 +05:30
Ninad Parikh
422824b9e7 fix: Fields Modification for Subcontracting DocTypes (#42383)
* fix: fields renaming and reordering for enhanced user experience

* fix: dashboard data for stock entry

(cherry picked from commit 302339998f)

# Conflicts:
#	erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.json
2024-07-25 04:49:14 +00:00
mergify[bot]
2d2140aad0 fix: keyerror posting_time (backport #42452) (#42460)
fix: keyerror posting_time (#42452)

fix: keyerror: posting_time
(cherry picked from commit 06e2d7265c)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-25 06:48:10 +05:30
ruthra kumar
a24fe951ed Merge pull request #42465 from frappe/mergify/bp/version-15-hotfix/pr-42462
refactor: provision for re-evaluating Exchange Rates in monthly frequency (backport #42462)
2024-07-24 22:11:29 +05:30
Frappe PR Bot
2de69e2b12 chore(release): Bumped to Version 15.31.1
## [15.31.1](https://github.com/frappe/erpnext/compare/v15.31.0...v15.31.1) (2024-07-24)

### Bug Fixes

* incorrect current qty for the batch in stock reco (backport [#42434](https://github.com/frappe/erpnext/issues/42434)) (backport [#42459](https://github.com/frappe/erpnext/issues/42459)) ([#42463](https://github.com/frappe/erpnext/issues/42463)) ([4bae419](4bae4194ab))
2024-07-24 14:00:57 +00:00
mergify[bot]
4bae4194ab fix: incorrect current qty for the batch in stock reco (backport #42434) (backport #42459) (#42463)
fix: incorrect current qty for the batch in stock reco (backport #42434) (#42459)

fix: incorrect current qty for the batch in stock reco (#42434)

(cherry picked from commit 9cd3374101)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-07-24 19:29:40 +05:30
ruthra kumar
7b3a78e04e refactor: hooks for monthly re-evaluation jobs
(cherry picked from commit fc4e5f165c)
2024-07-24 13:15:18 +00:00
ruthra kumar
219310e817 refactor: provision for monthly re-evaluation
(cherry picked from commit ce2b9e0f1a)
2024-07-24 13:15:18 +00:00
mergify[bot]
298a5699f1 fix: incorrect current qty for the batch in stock reco (backport #42434) (#42459)
fix: incorrect current qty for the batch in stock reco (#42434)

(cherry picked from commit 9cd3374101)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-24 18:37:13 +05:30
ruthra kumar
bf34c94483 Merge pull request #42456 from frappe/mergify/bp/version-15-hotfix/pr-42390
refactor: cleaning up stale code related to reposting (backport #42390)
2024-07-24 17:34:53 +05:30
Smit Vora
a7d8202b4e Merge pull request #42440 from frappe/mergify/bp/version-15-hotfix/pr-42377
fix: ignore duplicates while creating default templates (backport #42377)
2024-07-24 14:25:15 +05:30
ruthra kumar
2ae94b2af2 chore: resolve conflicts 2024-07-24 13:01:51 +05:30
ruthra kumar
e607f3c78d refactor(test): remove assert on 'repost_required'
(cherry picked from commit e71cb4eab7)
2024-07-24 07:29:12 +00:00
ruthra kumar
d69361b1c9 refactor: remove attribute check on 'repost_required'
(cherry picked from commit 07fc952a43)
2024-07-24 07:29:11 +00:00
ruthra kumar
949d7f4b53 refactor: repost without checking on flag
(cherry picked from commit 09f429ffba)
2024-07-24 07:29:11 +00:00
ruthra kumar
01dfea3ffa chore: remove stale UI code related to repost
(cherry picked from commit fe46e1d089)
2024-07-24 07:29:11 +00:00
ruthra kumar
8b9860902c chore: remove 'repost_required' from Journal Entry
(cherry picked from commit e81373bb6a)

# Conflicts:
#	erpnext/accounts/doctype/journal_entry/journal_entry.json
2024-07-24 07:29:11 +00:00
ruthra kumar
3d8eac9b5a chore: remove 'repost_required' from purchase invoice
(cherry picked from commit a467888a67)
2024-07-24 07:29:11 +00:00
ruthra kumar
a8fe0e89a8 chore: remove stale 'repost_required' flag from sales invoice
(cherry picked from commit 06c5334f2a)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.json
2024-07-24 07:29:11 +00:00
ruthra kumar
9b52d89e03 chore: remove stale code from sales invoice
(cherry picked from commit f3fda9ce98)
2024-07-24 07:29:11 +00:00
Frappe PR Bot
e28c1e9c4b chore(release): Bumped to Version 15.31.0
# [15.31.0](https://github.com/frappe/erpnext/compare/v15.30.0...v15.31.0) (2024-07-24)

### Bug Fixes

* Consider adding warranty period to serial nos (backport [#42051](https://github.com/frappe/erpnext/issues/42051)) ([#42182](https://github.com/frappe/erpnext/issues/42182)) ([8da28dc](8da28dcfb2))
* correct validation for depreciation posting date ([ffacf42](ffacf4222b))
* Don't allow negative amount on Payment Request [#41905](https://github.com/frappe/erpnext/issues/41905) ([aee2cc2](aee2cc2e03))
* missing cr/dr notes on payment reconciliation ([0a41ccd](0a41ccda99))
* not able to save QC (backport [#42371](https://github.com/frappe/erpnext/issues/42371)) ([#42373](https://github.com/frappe/erpnext/issues/42373)) ([18500b8](18500b8e3a))
* provide initial value for `.reduce()` call ([72bc539](72bc539ffd))
* Purchase Order Analysis Report Data (backport [#42387](https://github.com/frappe/erpnext/issues/42387)) ([#42394](https://github.com/frappe/erpnext/issues/42394)) ([709be13](709be13e82))
* qty in the 'Serial No Ledger' report (backport [#42429](https://github.com/frappe/erpnext/issues/42429)) ([#42433](https://github.com/frappe/erpnext/issues/42433)) ([926fd41](926fd41a2b))
* remove proprietorship and update it with individual ([527781a](527781a588))
* rounding issue causing incorrect quantity in SE (backport [#42380](https://github.com/frappe/erpnext/issues/42380)) ([#42395](https://github.com/frappe/erpnext/issues/42395)) ([54791e9](54791e938b))
* serial and batch bundle for POS Invoice (backport [#41491](https://github.com/frappe/erpnext/issues/41491)) ([#42396](https://github.com/frappe/erpnext/issues/42396)) ([555be2b](555be2be11))
* set filter to show only submitted asset ([29fc975](29fc975fb8))
* Show the rows in AR/AP report where outstanding equals to 0.01 ([886256c](886256c86b))

### Features

* add make_regional_gl_entries override for Sales Invoice ([#42399](https://github.com/frappe/erpnext/issues/42399)) ([22b17de](22b17de2b4))
2024-07-24 07:28:24 +00:00
ruthra kumar
1e16a987dd Merge pull request #42449 from frappe/version-15-hotfix
chore: release v15
2024-07-24 12:57:10 +05:30
Khushi Rawat
c045c9a6dd Merge pull request #42450 from frappe/mergify/bp/version-15-hotfix/pr-42372
fix: correct validation for depreciation posting date (backport #42372)
2024-07-24 12:10:00 +05:30
Syed Mujeer Hashmi
976abf7b3c fix: Update get_amount to return currency precision grand total
In case of multi-currency purchase invoice, we are getting the error "Total Payment Request amount cannot be greater than Purchase Invoice amount" because of rounding difference.
2024-07-24 11:59:45 +05:30
Raffael Meyer
8141c6504e Merge pull request #42437 from frappe/mergify/bp/version-15-hotfix/pr-42419
fix: provide initial value for `.reduce()` call (backport #42419)
2024-07-23 13:06:37 +02:00
Khushi Rawat
ffacf4222b fix: correct validation for depreciation posting date
(cherry picked from commit da4ed90a3e)
2024-07-23 09:54:44 +00:00
Smit Vora
aea8271f7e fix: ignore duplicates while creating default templates
(cherry picked from commit cf55c2ab3d)
2024-07-23 04:56:36 +00:00
barredterra
72bc539ffd fix: provide initial value for .reduce() call
Fixes the error "TypeError: Reduce of empty array with no initial value" (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Reduce_of_empty_array_with_no_initial_value#invalid_cases)

(cherry picked from commit 65f80abf2f)
2024-07-22 18:42:13 +00:00
mergify[bot]
926fd41a2b fix: qty in the 'Serial No Ledger' report (backport #42429) (#42433)
fix: qty in the 'Serial No Ledger' report (#42429)

(cherry picked from commit be2648245b)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-22 18:06:56 +05:30
ruthra kumar
f2bc064da2 Merge pull request #42409 from frappe/mergify/bp/version-15-hotfix/pr-42407
test: basic test case for item-wise purchase register (backport #42407)
2024-07-21 20:08:27 +05:30
mergify[bot]
555be2be11 fix: serial and batch bundle for POS Invoice (backport #41491) (#42396)
* fix: serial and batch bundle for POS Invoice (#41491)

(cherry picked from commit e5dfc5e545)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-21 00:00:14 +05:30
mergify[bot]
8da28dcfb2 fix: Consider adding warranty period to serial nos (backport #42051) (#42182)
fix: Consider adding warranty period to serial nos (#42051)

(cherry picked from commit 55e2b876a2)

Co-authored-by: Syed Mujeer Hashmi <mujeerhashmi@4csolutions.in>
2024-07-20 11:12:17 +05:30
Smit Vora
5741f32080 Merge pull request #42420 from frappe/mergify/bp/version-15-hotfix/pr-42399
feat: add make_regional_gl_entries override for Sales Invoice (backport #42399)
2024-07-20 09:34:39 +05:30
HENRY Florian
22b17de2b4 feat: add make_regional_gl_entries override for Sales Invoice (#42399)
* feat: add make_regional_gl_entries override for Sales Invoice and Stock Controler

* chore: remove regionnal override for stock management

(cherry picked from commit 1bbe020cfd)
2024-07-20 02:56:01 +00:00
Khushi Rawat
96062dec10 Merge pull request #42413 from frappe/mergify/bp/version-15-hotfix/pr-42412
fix: set filter to show only submitted asset (backport #42412)
2024-07-19 19:24:24 +05:30
Khushi Rawat
29fc975fb8 fix: set filter to show only submitted asset
(cherry picked from commit 69b8e10e20)
2024-07-19 13:47:45 +00:00
ruthra kumar
0052ca9173 test: basic test case for item-wise purchase register
(cherry picked from commit c3c5d3f615)
2024-07-19 11:21:08 +00:00
mergify[bot]
54791e938b fix: rounding issue causing incorrect quantity in SE (backport #42380) (#42395)
fix: rounding issue causing incorrect quantity in SE (#42380)

(cherry picked from commit e1b9b432c3)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-19 14:49:56 +05:30
mergify[bot]
709be13e82 fix: Purchase Order Analysis Report Data (backport #42387) (#42394)
fix: Purchase Order Analysis Report Data (#42387)

(cherry picked from commit 67bf9bec47)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-19 14:49:39 +05:30
ruthra kumar
7893a957cb Merge pull request #42403 from frappe/mergify/bp/version-15-hotfix/pr-41959
fix: Don't allow negative amount on Payment Request #41905 (backport #41959)
2024-07-19 10:54:46 +05:30
ruthra kumar
a9146efc17 chore: resolve conflict 2024-07-19 10:36:42 +05:30
hiteshprajapati
aee2cc2e03 fix: Don't allow negative amount on Payment Request #41905
(cherry picked from commit b823aa66bf)

# Conflicts:
#	erpnext/accounts/doctype/payment_request/payment_request.json
2024-07-19 05:04:34 +00:00
ljain112
25fe08eb74 fix: set pos data if not return doc
(cherry picked from commit 65d672da65)
2024-07-19 04:56:27 +00:00
ruthra kumar
307dcea097 Merge pull request #42385 from frappe/mergify/bp/version-15-hotfix/pr-42374
fix: Show the rows in AR/AP report where outstanding equals to 0.01 (backport #42374)
2024-07-18 14:39:27 +05:30
ruthra kumar
0dae0a05d4 test: AR/AP report on miniscule outstanding
(cherry picked from commit bb9e42cce2)
2024-07-18 08:15:39 +00:00
Nabin Hait
886256c86b fix: Show the rows in AR/AP report where outstanding equals to 0.01
(cherry picked from commit e1dedc5402)
2024-07-18 08:15:39 +00:00
ruthra kumar
372a7e905c Merge pull request #42381 from frappe/mergify/bp/version-15-hotfix/pr-42369
fix: missing cr/dr notes on payment reconciliation (backport #42369)
2024-07-18 12:58:42 +05:30
ruthra kumar
3f820734b6 test: payment filter should not affect dr/cr notes
(cherry picked from commit 2d686c06ea)
2024-07-18 07:12:44 +00:00
ruthra kumar
0a41ccda99 fix: missing cr/dr notes on payment reconciliation
(cherry picked from commit a30af68e9e)
2024-07-18 07:12:44 +00:00
mergify[bot]
18500b8e3a fix: not able to save QC (backport #42371) (#42373)
fix: not able to save QC (#42371)

(cherry picked from commit 62fb495a65)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-17 21:36:47 +05:30
Smit Vora
bebd70d752 Merge pull request #42365 from frappe/mergify/bp/version-15-hotfix/pr-42307
fix: remove redundant proprietorship field from customer type and supplier type (backport #42307)
2024-07-17 18:55:22 +05:30
Sanket322
527781a588 fix: remove proprietorship and update it with individual
(cherry picked from commit c8ad6d1b2c)
2024-07-17 08:32:17 +00:00
Frappe PR Bot
4b8b3ee46a chore(release): Bumped to Version 15.30.0
# [15.30.0](https://github.com/frappe/erpnext/compare/v15.29.4...v15.30.0) (2024-07-17)

### Bug Fixes

* address and contact filters for SCO and SCR (backport [#42310](https://github.com/frappe/erpnext/issues/42310)) ([#42312](https://github.com/frappe/erpnext/issues/42312)) ([cb64c73](cb64c73c9e))
* bin deadlock issue (backport [#42342](https://github.com/frappe/erpnext/issues/42342)) ([#42357](https://github.com/frappe/erpnext/issues/42357)) ([29ee2d4](29ee2d46f0))
* cost center filter by company (backport [#42297](https://github.com/frappe/erpnext/issues/42297)) ([#42299](https://github.com/frappe/erpnext/issues/42299)) ([4c9ce1b](4c9ce1b188))
* extra qty pick in pick list (backport [#42345](https://github.com/frappe/erpnext/issues/42345)) ([#42349](https://github.com/frappe/erpnext/issues/42349)) ([1754adf](1754adfcd6))
* **gross profit:** incorrect valuation rate on different warehouses ([f161e59](f161e59cd7))
* incoming rate zero for supplied items in returned SCR (backport [#42314](https://github.com/frappe/erpnext/issues/42314)) ([#42315](https://github.com/frappe/erpnext/issues/42315)) ([076bf17](076bf17439))
* items not fetching in End Transit entry (backport [#42358](https://github.com/frappe/erpnext/issues/42358)) ([#42361](https://github.com/frappe/erpnext/issues/42361)) ([b5a2e5a](b5a2e5a375))
* keep status as In Progress for RIV for Timeout Error (backport [#42274](https://github.com/frappe/erpnext/issues/42274)) ([#42296](https://github.com/frappe/erpnext/issues/42296)) ([1de66e5](1de66e56ee))
* missing discount on POS Credit Notes ([4055ef9](4055ef92b5))
* not able to cancel the inter transfer DN (backport [#42333](https://github.com/frappe/erpnext/issues/42333)) ([#42340](https://github.com/frappe/erpnext/issues/42340)) ([cf2651d](cf2651dd85))
* not able to submit LCV entry (backport [#42303](https://github.com/frappe/erpnext/issues/42303)) ([#42304](https://github.com/frappe/erpnext/issues/42304)) ([6d098b7](6d098b7302))
* remove doctype link from serial no ledger report (backport [#42327](https://github.com/frappe/erpnext/issues/42327)) ([#42348](https://github.com/frappe/erpnext/issues/42348)) ([b741b2a](b741b2a285))
* removed patch from patches.txt ([c45d11c](c45d11cd60))
* same posting date and time causing incorrect valuation rate (backport [#42351](https://github.com/frappe/erpnext/issues/42351)) ([#42356](https://github.com/frappe/erpnext/issues/42356)) ([62fc428](62fc42803f))
* service item capitalization ([#42188](https://github.com/frappe/erpnext/issues/42188)) ([2ffe7d5](2ffe7d5838))
* show total rows credit row in balance sheet ([0d2ef0d](0d2ef0df7d))
* slowness in reposting dependent vouchers. (backport [#42282](https://github.com/frappe/erpnext/issues/42282)) ([#42292](https://github.com/frappe/erpnext/issues/42292)) ([ef16313](ef16313e0a))
* **Warehouse:** add buttons only if the user can use them ([a2b21c7](a2b21c7570))
* While submitting PCV ensure previous FY is closed (backport [#42284](https://github.com/frappe/erpnext/issues/42284)) ([#42300](https://github.com/frappe/erpnext/issues/42300)) ([e250dcc](e250dcc7c8))

### Features

* configurable depreciation calculation via accounts settings ([#42276](https://github.com/frappe/erpnext/issues/42276)) ([ddd1ca7](ddd1ca7f7c))
* create variant with/without image (backport [#41317](https://github.com/frappe/erpnext/issues/41317)) ([#42343](https://github.com/frappe/erpnext/issues/42343)) ([5f1d6ed](5f1d6ede31))
2024-07-17 05:19:44 +00:00
ruthra kumar
85aca0ef55 Merge pull request #42354 from frappe/version-15-hotfix
chore: release v15
2024-07-17 10:48:30 +05:30
Khushi Rawat
55dc157694 Merge pull request #42360 from frappe/mergify/bp/version-15-hotfix/pr-42188
fix: service item capitalization (backport #42188)
2024-07-17 01:51:54 +05:30
Khushi Rawat
c45d11cd60 fix: removed patch from patches.txt 2024-07-17 01:35:03 +05:30
Khushi Rawat
cfab956811 chore: resolved conflicts 2024-07-16 22:46:54 +05:30
Smit Vora
d1ba12f581 Merge pull request #42362 from frappe/mergify/bp/version-15-hotfix/pr-42352
fix: show total rows credit row in balance sheet (backport #42352)
2024-07-16 19:52:39 +05:30
ljain112
0d2ef0df7d fix: show total rows credit row in balance sheet
(cherry picked from commit 327b19cba6)
2024-07-16 13:58:37 +00:00
mergify[bot]
b5a2e5a375 fix: items not fetching in End Transit entry (backport #42358) (#42361)
fix: items not fetching in End Transit entry (#42358)

(cherry picked from commit 001e5b612b)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-16 18:45:18 +05:30
Khushi Rawat
2ffe7d5838 fix: service item capitalization (#42188)
* feat: capitalize with service expenses only

* chore: added test

* refactor: removed Capitalized In field from asset doc

(cherry picked from commit 81e0b96c30)

# Conflicts:
#	erpnext/assets/doctype/asset/asset.py
2024-07-16 12:16:47 +00:00
mergify[bot]
62fc42803f fix: same posting date and time causing incorrect valuation rate (backport #42351) (#42356)
fix: same posting date and time causing incorrect valuation rate (#42351)

(cherry picked from commit 85d2d34116)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-16 16:30:24 +05:30
mergify[bot]
29ee2d46f0 fix: bin deadlock issue (backport #42342) (#42357)
fix: bin deadlock issue (#42342)

(cherry picked from commit 21df38bf18)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-16 16:30:11 +05:30
mergify[bot]
b741b2a285 fix: remove doctype link from serial no ledger report (backport #42327) (#42348)
fix: remove doctype link from serial no ledger report (#42327)

* fix: remove doctype link from serial no ledger report

* fix: remove doctype link from serial no ledger report

* fix: remove doctype link from serial no ledger report --update

(cherry picked from commit 17b437709c)

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-07-16 16:08:11 +05:30
mergify[bot]
1754adfcd6 fix: extra qty pick in pick list (backport #42345) (#42349)
fix: extra qty pick in pick list (#42345)

(cherry picked from commit 6a50b40976)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-16 15:46:44 +05:30
mergify[bot]
5f1d6ede31 feat: create variant with/without image (backport #41317) (#42343)
feat: create variant with/without image (#41317)

* feat: create variant with/without image

* feat: create variant with/without image

* feat: create variant with/without image

* feat: create variant with/without image

* feat: create variant with/without image

* feat: create variant with/without image

* fix: change the variable name use_same_image to use_template_image

(cherry picked from commit 66b35ec9fb)

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-07-15 22:58:30 +05:30
mergify[bot]
cf2651dd85 fix: not able to cancel the inter transfer DN (backport #42333) (#42340)
fix: not able to cancel the inter transfer DN (#42333)

(cherry picked from commit 6d42cd0f4c)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-15 16:52:28 +05:30
ruthra kumar
29158652db Merge pull request #42338 from frappe/mergify/bp/version-15-hotfix/pr-42294
refactor: make reposting implicit (backport #42294)
2024-07-15 15:37:00 +05:30
ruthra kumar
4968395372 chore: contextual comments
(cherry picked from commit 794a62aecb)
2024-07-15 09:41:57 +00:00
ruthra kumar
8e70aeae4a refactor(test): reposting happens implicitly
(cherry picked from commit c283cda169)
2024-07-15 09:41:57 +00:00
ruthra kumar
4ac174703c refactor(test): no need to assert repost_required flag
Reposting happens implicitly upon 'Update After Submit'

(cherry picked from commit 8f135e9859)
2024-07-15 09:41:57 +00:00
ruthra kumar
804f1d4772 refactor: make reposting implicit
(cherry picked from commit 722ef92324)
2024-07-15 09:41:56 +00:00
ruthra kumar
609a0b81ae Merge pull request #42336 from frappe/mergify/bp/version-15-hotfix/pr-42330
fix: incorrect valuation rate for items from different warehouses in Gross Profit (backport #42330)
2024-07-15 15:11:47 +05:30
ruthra kumar
cc09d0d218 chore: resolve conflict 2024-07-15 14:34:30 +05:30
ruthra kumar
43eec001ee test(gross profit): valuation rate from different warehouse
(cherry picked from commit 577ce5ccd4)

# Conflicts:
#	erpnext/accounts/report/gross_profit/test_gross_profit.py
2024-07-15 08:50:15 +00:00
ruthra kumar
f161e59cd7 fix(gross profit): incorrect valuation rate on different warehouses
(cherry picked from commit f9d2dd0a62)
2024-07-15 08:50:15 +00:00
mergify[bot]
076bf17439 fix: incoming rate zero for supplied items in returned SCR (backport #42314) (#42315)
fix: incoming rate zero for supplied items in returned SCR (#42314)

(cherry picked from commit 61daa318fe)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-15 13:28:06 +05:30
mergify[bot]
cb64c73c9e fix: address and contact filters for SCO and SCR (backport #42310) (#42312)
fix: address and contact filters for SCO and SCR (#42310)

(cherry picked from commit 7656220075)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-13 15:59:46 +05:30
Nabin Hait
ce8b423ad6 chore: release v15 (#42308)
* fix(Warehouse): add buttons only if the user can use them

(cherry picked from commit 10ae5aaf52)

* fix: missing discount on POS Credit Notes

(cherry picked from commit 1049550951)

* chore: rename test suite for payable report

(cherry picked from commit 9474f72776)

* refactor: test suite for item-wise sales register

(cherry picked from commit 3aaa22e672)

* refactor(test): use each instance UOM for assertion

(cherry picked from commit cf4fbfb601)

* fix: slowness in reposting dependent vouchers. (backport #42282) (#42292)

fix: slowness in reposting dependent vouchers. (#42282)

(cherry picked from commit b17696a8ae)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* refactor(test): clear old records

* fix: keep status as In Progress for RIV for Timeout Error (backport #42274) (#42296)

fix: keep status as In Progress for RIV for Timeout Error (#42274)

(cherry picked from commit 10280d6140)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* fix: cost center filter by company (backport #42297) (#42299)

fix: cost center filter by company (#42297)

(cherry picked from commit 9838f7e6ba)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* feat: configurable depreciation calculation via accounts settings (#42276)

* feat: configurable depreciation calculation via accounts settings

* refactor: code optimization

* style: changes in description and label

(cherry picked from commit b04da63aad)

* fix: not able to submit LCV entry (backport #42303) (#42304)

fix: not able to submit LCV entry (#42303)

(cherry picked from commit 9cf92eaeab)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* fix: While submitting PCV ensure previous FY is closed (backport #42284) (#42300)

fix: While submitting PCV ensure previous FY is closed (#42284)

(cherry picked from commit d0bbc8ca70)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>

---------

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
Co-authored-by: ruthra kumar <ruthra@erpnext.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-07-12 20:47:27 +05:30
mergify[bot]
e250dcc7c8 fix: While submitting PCV ensure previous FY is closed (backport #42284) (#42300)
fix: While submitting PCV ensure previous FY is closed (#42284)

(cherry picked from commit d0bbc8ca70)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-07-12 20:05:03 +05:30
Khushi Rawat
ad228d80d5 Merge pull request #42301 from frappe/mergify/bp/version-15-hotfix/pr-42276
feat: configurable depreciation calculation via accounts settings (backport #42276)
2024-07-12 18:32:37 +05:30
mergify[bot]
6d098b7302 fix: not able to submit LCV entry (backport #42303) (#42304)
fix: not able to submit LCV entry (#42303)

(cherry picked from commit 9cf92eaeab)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-12 17:27:18 +05:30
Khushi Rawat
ddd1ca7f7c feat: configurable depreciation calculation via accounts settings (#42276)
* feat: configurable depreciation calculation via accounts settings

* refactor: code optimization

* style: changes in description and label

(cherry picked from commit b04da63aad)
2024-07-12 08:57:11 +00:00
mergify[bot]
4c9ce1b188 fix: cost center filter by company (backport #42297) (#42299)
fix: cost center filter by company (#42297)

(cherry picked from commit 9838f7e6ba)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-12 13:40:16 +05:30
mergify[bot]
1de66e56ee fix: keep status as In Progress for RIV for Timeout Error (backport #42274) (#42296)
fix: keep status as In Progress for RIV for Timeout Error (#42274)

(cherry picked from commit 10280d6140)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-12 12:14:55 +05:30
ruthra kumar
5e3810b12a Merge pull request #42291 from frappe/mergify/bp/version-15-hotfix/pr-42192
refactor: tests for item wise sales register report (backport #42192)
2024-07-12 09:28:08 +05:30
ruthra kumar
84a8bb3ce5 refactor(test): clear old records 2024-07-11 21:04:34 +05:30
mergify[bot]
ef16313e0a fix: slowness in reposting dependent vouchers. (backport #42282) (#42292)
fix: slowness in reposting dependent vouchers. (#42282)

(cherry picked from commit b17696a8ae)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-11 19:24:09 +05:30
ruthra kumar
61852bd3f6 refactor(test): use each instance UOM for assertion
(cherry picked from commit cf4fbfb601)
2024-07-11 12:34:12 +00:00
ruthra kumar
cd79d33db2 refactor: test suite for item-wise sales register
(cherry picked from commit 3aaa22e672)
2024-07-11 12:34:12 +00:00
ruthra kumar
4f7e0d2955 chore: rename test suite for payable report
(cherry picked from commit 9474f72776)
2024-07-11 12:34:12 +00:00
ruthra kumar
e07bdcee79 Merge pull request #42289 from frappe/mergify/bp/version-15-hotfix/pr-42287
fix: missing discount on POS Credit Notes (backport #42287)
2024-07-11 17:36:02 +05:30
ruthra kumar
4055ef92b5 fix: missing discount on POS Credit Notes
(cherry picked from commit 1049550951)
2024-07-11 11:59:38 +00:00
Raffael Meyer
2751a9a38c Merge pull request #42273 from frappe/mergify/bp/version-15-hotfix/pr-42232
fix(Warehouse): add buttons only if the user can use them (backport #42232)
2024-07-10 15:26:25 +02:00
barredterra
a2b21c7570 fix(Warehouse): add buttons only if the user can use them
(cherry picked from commit 10ae5aaf52)
2024-07-10 11:15:49 +00:00
Frappe PR Bot
f975333970 chore(release): Bumped to Version 15.29.3
## [15.29.3](https://github.com/frappe/erpnext/compare/v15.29.2...v15.29.3) (2024-07-10)

### Bug Fixes

* actual qty in sales order (backport [#42248](https://github.com/frappe/erpnext/issues/42248)) ([#42256](https://github.com/frappe/erpnext/issues/42256)) ([4866958](4866958a96))
* add missing german translations ([2f89461](2f89461ace))
* added filter to show only submitted assets ([19ed6d1](19ed6d1081))
* auto serial and batch bundle not creating for Asset Capitalization (backport [#42231](https://github.com/frappe/erpnext/issues/42231)) ([#42242](https://github.com/frappe/erpnext/issues/42242)) ([7916d64](7916d6436f))
* Billed Qty and Qty to Bill Calculation in Purchase Order Analysis (backport [#42100](https://github.com/frappe/erpnext/issues/42100)) ([#42249](https://github.com/frappe/erpnext/issues/42249)) ([43c7513](43c7513cfe))
* BOM Creator Recursion Error on duplicate save (backport [#41622](https://github.com/frappe/erpnext/issues/41622)) ([#42179](https://github.com/frappe/erpnext/issues/42179)) ([68a39df](68a39dfa33))
* changes as per review ([57896a8](57896a8f99))
* completed DC will not appear in a delivery trip ([0bab609](0bab609a6f))
* completed DC will not appear in a delivery trip ([#41655](https://github.com/frappe/erpnext/issues/41655)) ([a3444a0](a3444a07b7))
* corrected mismatch in the Purchase Receipt Status [#15620](https://github.com/frappe/erpnext/issues/15620) (backport [#42138](https://github.com/frappe/erpnext/issues/42138)) ([#42252](https://github.com/frappe/erpnext/issues/42252)) ([e1b50ef](e1b50efeea))
* correcting balance sheet calculation for zero liabilities and equity ([d48a2c9](d48a2c9f8e))
* correcting balance sheet calculation for zero liabilities and equity ([#41497](https://github.com/frappe/erpnext/issues/41497)) ([2104d90](2104d903aa))
* custom delimiters ([43ad2fe](43ad2fed63))
* download_import_log if rows are greater than 5000 ([4eb251b](4eb251b59a))
* empty item-wise sales/purchase register reports on initial load ([5ac3b34](5ac3b34a6f))
* field position ([a04938d](a04938d5ae))
* group by in item-wise purchase register ([a967d59](a967d59844))
* **Holiday List:** sort holidays on save to avoid disorienting the user (backport [#42236](https://github.com/frappe/erpnext/issues/42236)) ([#42250](https://github.com/frappe/erpnext/issues/42250)) ([b555615](b5556156c1))
* import log preview ([62aac8b](62aac8bb85))
* import status ([71311ff](71311ffd62))
* **Inventory Dimension:** reduce perms for Stock User (backport [#42226](https://github.com/frappe/erpnext/issues/42226)) ([#42243](https://github.com/frappe/erpnext/issues/42243)) ([3cc59e4](3cc59e4a7a))
* manual pick allow to pick more than available stock (backport [#42155](https://github.com/frappe/erpnext/issues/42155)) ([#42159](https://github.com/frappe/erpnext/issues/42159)) ([a7b6530](a7b6530fde))
* Multiple fixes for General Ledger Report ([ca57fd4](ca57fd4255))
* multiple free items on same Item Group ([9352863](93528631c3))
* path of automatically updates the status of asset maintenance log ([5317418](5317418a53))
* Project Status should be Open again if `percent_complete` is not 100 ([90f5c78](90f5c78607))
* provision to enable do not use batch-wise valuation (backport [#42186](https://github.com/frappe/erpnext/issues/42186)) ([#42198](https://github.com/frappe/erpnext/issues/42198)) ([ec881ac](ec881ace76))
* **Putaway Rule:** reduce perms for Stock User (backport [#42227](https://github.com/frappe/erpnext/issues/42227)) ([#42244](https://github.com/frappe/erpnext/issues/42244)) ([b78a97d](b78a97df85))
* remove deprecated field "statement_import_log" ([2f0b97d](2f0b97d91b))
* removed max discount validation for sales return ([ab987e9](ab987e9a86))
* **Stock Entry Type:** reduce perms for Stock User (backport [#42225](https://github.com/frappe/erpnext/issues/42225)) ([#42245](https://github.com/frappe/erpnext/issues/42245)) ([954d9ab](954d9ab154))
* tax on stock_rbnb on repost of Purchase Receipt ([427439c](427439c3f1))
* **tds:** use doctype reference when mapping keys across multiple doctypes ([#42258](https://github.com/frappe/erpnext/issues/42258)) ([8264e3b](8264e3bc77))
* updated logic for calculating tax_withholding_net_total in payment entry ([3fb5c7a](3fb5c7a3a6))
* use standard method to get `_doc_before_save` ([cfda5f6](cfda5f6d0b))
2024-07-10 10:44:06 +00:00
ruthra kumar
38e176160c Merge pull request #42253 from frappe/version-15-hotfix
chore: release v15
2024-07-10 16:12:52 +05:30
ruthra kumar
92bc227743 Merge pull request #42272 from frappe/mergify/bp/version-15-hotfix/pr-42247
fix: don't merge tax into stock account on purchase receipt repost (backport #42247)
2024-07-10 15:48:28 +05:30
ruthra kumar
7b4fd89658 test: tax account heads on PR report without LCV
(cherry picked from commit 9562628ed6)
2024-07-10 09:58:30 +00:00
ruthra kumar
427439c3f1 fix: tax on stock_rbnb on repost of Purchase Receipt
(cherry picked from commit 8633080dff)
2024-07-10 09:58:30 +00:00
Smit Vora
e0460f4891 Merge pull request #42266 from frappe/mergify/bp/version-15-hotfix/pr-42204
fix: Reopen Project if Completion Percentage is Below 100% (backport #42204)
2024-07-10 15:23:19 +05:30
Smit Vora
38da8afa06 Merge pull request #42265 from frappe/mergify/bp/version-15-hotfix/pr-42127
fix: removed max discount validation for sales return (backport #42127)
2024-07-10 15:23:01 +05:30
Smit Vora
afc1df00ae Merge pull request #42263 from frappe/mergify/bp/version-15-hotfix/pr-42258
fix(tds): use doctype reference when mapping keys across multiple doctypes (backport #42258)
2024-07-10 15:22:36 +05:30
DaizyModi
90f5c78607 fix: Project Status should be Open again if percent_complete is not 100
(cherry picked from commit c52fdffdaf)
2024-07-10 07:10:05 +00:00
ljain112
ab987e9a86 fix: removed max discount validation for sales return
(cherry picked from commit db807d433b)
2024-07-10 07:02:02 +00:00
Smit Vora
23053f45de chore: resolve conflicts 2024-07-10 12:26:35 +05:30
Smit Vora
8264e3bc77 fix(tds): use doctype reference when mapping keys across multiple doctypes (#42258)
* fix(tds): use doctype reference when mapping keys across multiple doctypes

* fix: changes as per review

---------

Co-authored-by: ljain112 <ljain112@gmail.com>
(cherry picked from commit 5c0d52f783)

# Conflicts:
#	erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py
2024-07-10 06:27:29 +00:00
Sagar Vora
b005d7ac52 Merge pull request #42259 from frappe/mergify/bp/version-15-hotfix/pr-42060
fix: updated logic for calculating tax_withholding_net_total in payment entry (backport #42060)
2024-07-10 11:08:53 +05:30
ljain112
3fb5c7a3a6 fix: updated logic for calculating tax_withholding_net_total in payment entry
(cherry picked from commit c8a34cde7f)
2024-07-10 05:11:35 +00:00
ruthra kumar
b9c0f3f402 Merge pull request #41741 from frappe/mergify/bp/version-15-hotfix/pr-41655
fix: completed DC will not appear in a delivery trip (backport #41655)
2024-07-10 10:33:11 +05:30
ruthra kumar
7d0d1cfd18 Merge pull request #41739 from frappe/mergify/bp/version-15-hotfix/pr-41497
fix: correcting balance sheet calculation for zero liabilities and equity (backport #41497)
2024-07-10 10:30:12 +05:30
ruthra kumar
970bb2bca1 Merge pull request #42164 from frappe/mergify/bp/version-15-hotfix/pr-42162
refactor: remove obsolete function call (backport #42162)
2024-07-10 10:26:15 +05:30
ruthra kumar
759781eefe Merge pull request #42240 from frappe/mergify/bp/version-15-hotfix/pr-42026
fix:  Multiple fixes in Bank Statement Import (backport #42026)
2024-07-10 10:24:57 +05:30
mergify[bot]
b5556156c1 fix(Holiday List): sort holidays on save to avoid disorienting the user (backport #42236) (#42250)
fix(Holiday List): sort holidays on save to avoid disorienting the user (#42236)

fix: sort holidays on save to avoid disorienting the user
(cherry picked from commit ad137250fc)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2024-07-09 17:53:38 +05:30
Khushi Rawat
2deea33a85 Merge pull request #42257 from frappe/mergify/bp/version-15-hotfix/pr-42233
fix: added filter to show only submitted assets (backport #42233)
2024-07-09 16:59:20 +05:30
Khushi Rawat
19ed6d1081 fix: added filter to show only submitted assets
(cherry picked from commit cd3a900495)
2024-07-09 11:12:01 +00:00
mergify[bot]
43c7513cfe fix: Billed Qty and Qty to Bill Calculation in Purchase Order Analysis (backport #42100) (#42249)
fix: Billed Qty and Qty to Bill Calculation in Purchase Order Analysis (#42100)

(cherry picked from commit 0c76a8cc9e)

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-07-09 16:17:57 +05:30
mergify[bot]
e1b50efeea fix: corrected mismatch in the Purchase Receipt Status #15620 (backport #42138) (#42252)
* fix: corrected mismatch in the Purchase Receipt Status #15620 (#42138)

(cherry picked from commit 623b4c21cd)

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

* chore: fix conflicts

---------

Co-authored-by: Poorvi-R-Bhat <poorvi.r.bhat@gmail.com>
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-09 16:17:35 +05:30
mergify[bot]
4866958a96 fix: actual qty in sales order (backport #42248) (#42256)
fix: actual qty in sales order (#42248)

(cherry picked from commit 1186ee128c)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-09 16:17:20 +05:30
mergify[bot]
3cc59e4a7a fix(Inventory Dimension): reduce perms for Stock User (backport #42226) (#42243)
* fix(Inventory Dimension): reduce perms for Stock User (#42226)

(cherry picked from commit edc1f84250)

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

* chore: fix conflicts

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-09 14:52:30 +05:30
mergify[bot]
b78a97df85 fix(Putaway Rule): reduce perms for Stock User (backport #42227) (#42244)
* fix(Putaway Rule): reduce perms for Stock User (#42227)

(cherry picked from commit 96b275c61e)

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

* chore: fix conflicts

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-09 14:52:17 +05:30
mergify[bot]
954d9ab154 fix(Stock Entry Type): reduce perms for Stock User (backport #42225) (#42245)
* fix(Stock Entry Type): reduce perms for Stock User (#42225)

(cherry picked from commit 4936514c8d)

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

* chore: fix conflicts

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-09 14:52:06 +05:30
mergify[bot]
68a39dfa33 fix: BOM Creator Recursion Error on duplicate save (backport #41622) (#42179)
fix: BOM Creator Recursion Error on duplicate save (#41622)

(cherry picked from commit 9cfe09bdf6)

Co-authored-by: Richard Case <110036763+casesolved-co-uk@users.noreply.github.com>
2024-07-09 12:19:10 +05:30
mergify[bot]
7916d6436f fix: auto serial and batch bundle not creating for Asset Capitalization (backport #42231) (#42242)
fix: auto serial and batch bundle not creating for Asset Capitalization (#42231)

(cherry picked from commit 5f53ad3117)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-09 12:13:19 +05:30
ruthra kumar
f281e064f2 chore: resolve conflict 2024-07-09 10:39:02 +05:30
ljain112
57896a8f99 fix: changes as per review
(cherry picked from commit ba08b2e8e8)
2024-07-09 04:40:37 +00:00
ljain112
a04938d5ae fix: field position
(cherry picked from commit 98ad01c736)

# Conflicts:
#	erpnext/accounts/doctype/bank_statement_import/bank_statement_import.json
2024-07-09 04:40:37 +00:00
ljain112
4eb251b59a fix: download_import_log if rows are greater than 5000
(cherry picked from commit 2112d8f772)
2024-07-09 04:40:37 +00:00
ljain112
62aac8bb85 fix: import log preview
(cherry picked from commit 1ad264de48)
2024-07-09 04:40:37 +00:00
ljain112
71311ffd62 fix: import status
(cherry picked from commit 07f68884e0)
2024-07-09 04:40:37 +00:00
ljain112
2f0b97d91b fix: remove deprecated field "statement_import_log"
(cherry picked from commit b202409428)

# Conflicts:
#	erpnext/accounts/doctype/bank_statement_import/bank_statement_import.json
2024-07-09 04:40:37 +00:00
ljain112
43ad2fed63 fix: custom delimiters
(cherry picked from commit 13fb560401)

# Conflicts:
#	erpnext/accounts/doctype/bank_statement_import/bank_statement_import.json
2024-07-09 04:40:37 +00:00
Raffael Meyer
3f82ce2e77 Merge pull request #42235 from barredterra/de_transaltions_08062024 2024-07-08 19:50:51 +02:00
barredterra
2f89461ace fix: add missing german translations 2024-07-08 19:34:39 +02:00
mergify[bot]
ec881ace76 fix: provision to enable do not use batch-wise valuation (backport #42186) (#42198)
* fix: provision to enable do not use batch-wise valuation (#42186)

fix: provision to enable do not use batchwise valuation
(cherry picked from commit f06ba0cc36)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-08 11:02:02 +05:30
Sagar Vora
b6bee319da Merge pull request #42215 from frappe/mergify/bp/version-15-hotfix/pr-42146
fix: Multiple fixes for General Ledger Report (backport #42146)
2024-07-08 10:06:50 +05:30
Sagar Vora
ca57fd4255 fix: Multiple fixes for General Ledger Report
(cherry picked from commit 97f02015c2)
2024-07-08 04:36:11 +00:00
Frappe PR Bot
c9e3dee5b2 chore(release): Bumped to Version 15.29.2
## [15.29.2](https://github.com/frappe/erpnext/compare/v15.29.1...v15.29.2) (2024-07-05)

### Bug Fixes

* blank item-wise sales/purchase register reports on first load ([8baef24](8baef24541))
* group by in item-wise purchase register ([20d481d](20d481de5e))
2024-07-05 02:47:13 +00:00
ruthra kumar
a8cd49112d Merge pull request #42191 from frappe/mergify/bp/version-15/pr-41975
fix: group by in item-wise purchase register (backport #41975)
2024-07-05 08:15:58 +05:30
ruthra kumar
8baef24541 fix: blank item-wise sales/purchase register reports on first load 2024-07-05 07:43:13 +05:30
Nihantra C. Patel
20d481de5e fix: group by in item-wise purchase register
(cherry picked from commit 3fab00135b)
2024-07-05 02:05:29 +00:00
ruthra kumar
276b9bc2b9 Merge pull request #42185 from frappe/mergify/bp/version-15-hotfix/pr-42183
fix: empty item-wise sales/purchase register reports on initial load (backport #42183)
2024-07-04 15:12:15 +05:30
ruthra kumar
5ac3b34a6f fix: empty item-wise sales/purchase register reports on initial load
(cherry picked from commit ee862126e4)
2024-07-04 09:36:58 +00:00
ruthra kumar
8ab49f4d9d Merge pull request #42181 from frappe/mergify/bp/version-15-hotfix/pr-41975
fix: group by in item-wise purchase register (backport #41975)
2024-07-04 14:59:52 +05:30
Nihantra C. Patel
b3715b2b82 Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-41655 2024-07-04 14:43:29 +05:30
Nihantra C. Patel
a967d59844 fix: group by in item-wise purchase register
(cherry picked from commit 3fab00135b)
2024-07-04 09:09:09 +00:00
ruthra kumar
cf937edc4e Merge pull request #42173 from frappe/mergify/bp/version-15-hotfix/pr-42143
refactor: validation to prevent recursion with mixed conditions (backport #42143)
2024-07-04 09:20:23 +05:30
ruthra kumar
12bec3be9d test: validation on mixed condition and recursion on pricing rule
(cherry picked from commit eb4af58bf0)
2024-07-03 15:27:43 +00:00
ruthra kumar
0774607f52 test: validation on mixed condition with recursion
(cherry picked from commit 9bd4e7b709)
2024-07-03 15:27:43 +00:00
ruthra kumar
cfda5f6d0b fix: use standard method to get _doc_before_save
(cherry picked from commit 9d7be293ae)
2024-07-03 15:27:43 +00:00
ruthra kumar
4ecb02cb41 refactor: validation to prevent recursion with mixed conditions
(cherry picked from commit 406dfd528f)
2024-07-03 15:27:43 +00:00
ruthra kumar
fcfe78b3bc Merge pull request #42170 from frappe/mergify/bp/version-15-hotfix/pr-42165
fix: multiple free items on same Item Group (backport #42165)
2024-07-03 20:55:45 +05:30
Frappe PR Bot
7568af67e9 chore(release): Bumped to Version 15.29.1
## [15.29.1](https://github.com/frappe/erpnext/compare/v15.29.0...v15.29.1) (2024-07-03)

### Bug Fixes

* path of automatically updates the status of asset maintenance log ([473aaf4](473aaf4e5b))
2024-07-03 14:56:03 +00:00
Raffael Meyer
5dbdcb1158 Merge pull request #42171 from frappe/mergify/bp/version-15/pr-42168
fix: path of automatically updates the status of asset maintenance log (backport #42157) (backport #42168)
2024-07-03 16:54:44 +02:00
Nihantra C. Patel
473aaf4e5b fix: path of automatically updates the status of asset maintenance log
(cherry picked from commit 909aa8f359)
(cherry picked from commit 5317418a53)
2024-07-03 14:15:05 +00:00
Raffael Meyer
de130cb1ab Merge pull request #42168 from frappe/mergify/bp/version-15-hotfix/pr-42157
fix: path of automatically updates the status of asset maintenance log (backport #42157)
2024-07-03 16:11:11 +02:00
ruthra kumar
93528631c3 fix: multiple free items on same Item Group
(cherry picked from commit c4ae0d283f)
2024-07-03 12:28:38 +00:00
Nihantra C. Patel
5317418a53 fix: path of automatically updates the status of asset maintenance log
(cherry picked from commit 909aa8f359)
2024-07-03 10:55:50 +00:00
Markus Lobedann
4f623c3b66 refactor: remove obsolete function call (#42162)
(cherry picked from commit 4512432816)
2024-07-03 10:22:39 +00:00
mergify[bot]
a7b6530fde fix: manual pick allow to pick more than available stock (backport #42155) (#42159)
fix: manual pick allow to pick more than available stock (#42155)

(cherry picked from commit 938dd4b2aa)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-03 15:42:37 +05:30
Frappe PR Bot
5812577854 chore(release): Bumped to Version 15.29.0
# [15.29.0](https://github.com/frappe/erpnext/compare/v15.28.2...v15.29.0) (2024-07-03)

### Bug Fixes

* add auto-update for overdue status ([#42105](https://github.com/frappe/erpnext/issues/42105)) ([317cc03](317cc0358c))
* add string for translation (backport [#41903](https://github.com/frappe/erpnext/issues/41903)) ([#41963](https://github.com/frappe/erpnext/issues/41963)) ([48dc24b](48dc24b9bf))
* always post to tax account heads if LCV is booked ([706a6c1](706a6c1ad7))
* batch picking in pick list based on Stock Settings (backport [#42021](https://github.com/frappe/erpnext/issues/42021)) ([#42134](https://github.com/frappe/erpnext/issues/42134)) ([a45f8ca](a45f8ca5fd))
* batch reset while making SABB (backport [#42076](https://github.com/frappe/erpnext/issues/42076)) ([#42123](https://github.com/frappe/erpnext/issues/42123)) ([c3f5a49](c3f5a494f3))
* decimal issue in pick list (backport [#41972](https://github.com/frappe/erpnext/issues/41972)) ([#41982](https://github.com/frappe/erpnext/issues/41982)) ([9945a90](9945a90b3f))
* **Delivery Note:** only show permitted actions ([cef6d0d](cef6d0d74d))
* do not show zero balance stock items in stock balance report (backport [#41958](https://github.com/frappe/erpnext/issues/41958)) ([#41961](https://github.com/frappe/erpnext/issues/41961)) ([c10b123](c10b123a81))
* expense account from item group not fetched (backport [#41957](https://github.com/frappe/erpnext/issues/41957)) ([#41962](https://github.com/frappe/erpnext/issues/41962)) ([760b2e2](760b2e24f2))
* fixed asset value in Fixed Asset Register (backport [#41930](https://github.com/frappe/erpnext/issues/41930)) ([#42027](https://github.com/frappe/erpnext/issues/42027)) ([f2feeaf](f2feeaf264))
* handle none type object error ([b0aef9e](b0aef9e42b))
* incorrect against_account upon reposting ([a41577a](a41577a1cd))
* incorrect Difference Amount (backport [#42008](https://github.com/frappe/erpnext/issues/42008)) ([#42013](https://github.com/frappe/erpnext/issues/42013)) ([838cc5b](838cc5b72a))
* incorrect discount on other item ([77f4199](77f4199e2a))
* incorrect dr/cr on Adv Payment against Journals ([4e74257](4e74257ba9))
* incorrect time period in asset depreciation schedule (backport [#41805](https://github.com/frappe/erpnext/issues/41805)) ([#42043](https://github.com/frappe/erpnext/issues/42043)) ([cf4d4ba](cf4d4ba3e9))
* lead status filter (backport [#41816](https://github.com/frappe/erpnext/issues/41816)) ([#42046](https://github.com/frappe/erpnext/issues/42046)) ([3536a75](3536a754ff))
* manufacturing date issue in the batch (backport [#42034](https://github.com/frappe/erpnext/issues/42034)) ([#42037](https://github.com/frappe/erpnext/issues/42037)) ([a981633](a981633d94))
* move condition for shipment ([2180239](21802396ce))
* not able to make purchase return (backport [#42053](https://github.com/frappe/erpnext/issues/42053)) ([#42055](https://github.com/frappe/erpnext/issues/42055)) ([8a91bf3](8a91bf3154))
* pricing rule with and without 'apply multiple' and priority ([f3aa885](f3aa885488))
* provisional entry for non stock items ([d61dab8](d61dab8569))
* Re-open allows SO's to be over credit limit ([7fcb0f5](7fcb0f578a))
* refactor Asset Repair and Stock Entry linkage to resolve amendme… (backport [#41919](https://github.com/frappe/erpnext/issues/41919)) ([#42058](https://github.com/frappe/erpnext/issues/42058)) ([97c49b9](97c49b93b6))
* reload asset when creating asset depreciation ([7b5d504](7b5d5043c5))
* reposting file attachment permission issue (backport [#42068](https://github.com/frappe/erpnext/issues/42068)) ([#42075](https://github.com/frappe/erpnext/issues/42075)) ([1f3374f](1f3374fcdf))
* resolve gl entries duplication in asset purchase workflow (backport [#41845](https://github.com/frappe/erpnext/issues/41845)) ([#42120](https://github.com/frappe/erpnext/issues/42120)) ([58e18e2](58e18e2b1f))
* **Sales Order:** only show permitted actions ([a0011c5](a0011c5b52))
* show zero stock items filter in the stock balance report (backport [#42147](https://github.com/frappe/erpnext/issues/42147)) ([#42152](https://github.com/frappe/erpnext/issues/42152)) ([11ebbf2](11ebbf2a9c))
* stock qty validation in SCR (backport [#42124](https://github.com/frappe/erpnext/issues/42124)) ([#42133](https://github.com/frappe/erpnext/issues/42133)) ([d9e62fe](d9e62fef21))
* Stock Reservation Entry was not getting created (backport [#42033](https://github.com/frappe/erpnext/issues/42033)) ([#42035](https://github.com/frappe/erpnext/issues/42035)) ([e278fc6](e278fc683f))
* **test:** incorrect field for customer default billing currency ([3b15708](3b15708f18))
* this.frm.events.update_cost is not a function (backport [#41960](https://github.com/frappe/erpnext/issues/41960)) ([#41965](https://github.com/frappe/erpnext/issues/41965)) ([3b4d397](3b4d39766f))
* timeout error while submitting JV (backport [#42040](https://github.com/frappe/erpnext/issues/42040)) ([#42099](https://github.com/frappe/erpnext/issues/42099)) ([a0e06a4](a0e06a4ba5))
* timeout while cancelling LCV (backport [#42030](https://github.com/frappe/erpnext/issues/42030)) (backport [#42031](https://github.com/frappe/erpnext/issues/42031)) ([#42032](https://github.com/frappe/erpnext/issues/42032)) ([068de08](068de08bbb))
* unhide serial no field (backport [#42045](https://github.com/frappe/erpnext/issues/42045)) ([#42047](https://github.com/frappe/erpnext/issues/42047)) ([482832f](482832f3c2))
* valuation rate for the legacy batches (backport [#42011](https://github.com/frappe/erpnext/issues/42011)) ([#42020](https://github.com/frappe/erpnext/issues/42020)) ([f6be19c](f6be19cb7c))
* Wrong Delete Batch on Purchase Receipt (backport [#42007](https://github.com/frappe/erpnext/issues/42007)) ([#42012](https://github.com/frappe/erpnext/issues/42012)) ([68b318a](68b318a94b))

### Features

* accounting dimension filters in gp report ([fe9dffb](fe9dffb271))
* default account head for operating cost (backport [#41985](https://github.com/frappe/erpnext/issues/41985)) ([#41987](https://github.com/frappe/erpnext/issues/41987)) ([44c1671](44c16713ba))
* **gp:** group by cost center ([068ae87](068ae87b8d))
* Turkish Chart Of Accounts (backport [#41756](https://github.com/frappe/erpnext/issues/41756)) ([#42028](https://github.com/frappe/erpnext/issues/42028)) ([63b26e6](63b26e679b))

### Performance Improvements

* code optimization to handle large asset creation (backport [#42018](https://github.com/frappe/erpnext/issues/42018)) ([#42025](https://github.com/frappe/erpnext/issues/42025)) ([c27f272](c27f272f06))
* dont run queries unnecessarily, improved filters ([#41993](https://github.com/frappe/erpnext/issues/41993)) ([b59c91a](b59c91a341))
* Performance optmization for Purchase Invoice submission (backport [#40263](https://github.com/frappe/erpnext/issues/40263)) ([#41946](https://github.com/frappe/erpnext/issues/41946)) ([d396c18](d396c18689))
2024-07-03 05:06:09 +00:00
ruthra kumar
ebb8d90b4d Merge pull request #42142 from frappe/version-15-hotfix
chore: release v15
2024-07-03 10:33:25 +05:30
mergify[bot]
11ebbf2a9c fix: show zero stock items filter in the stock balance report (backport #42147) (#42152)
fix: show zero stock items filter in the stock balance report (#42147)

(cherry picked from commit 1dae2156e3)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-03 10:09:09 +05:30
ruthra kumar
c9cde259ec Merge branch 'version-15' into version-15-hotfix 2024-07-03 10:06:49 +05:30
ruthra kumar
b15ec238c9 Merge pull request #42151 from frappe/mergify/bp/version-15-hotfix/pr-42073
fix: always post to tax account heads if LCV is booked (backport #42073)
2024-07-03 07:23:08 +05:30
ruthra kumar
09c39face8 Merge pull request #42140 from nabinhait/provisional_entry_fix3
fix: provisional entry for non stock items
2024-07-03 07:20:56 +05:30
ruthra kumar
c3cc363648 refactor(test): fix flaky test
(cherry picked from commit 0e256b8b29)
2024-07-03 01:35:15 +00:00
ruthra kumar
e55fd7204a refactor(test): cleanup test data
(cherry picked from commit 6ba6b5aa33)
2024-07-03 01:35:15 +00:00
ruthra kumar
b7cbafae14 test: Repost should not merge expense accounts from LCV
(cherry picked from commit fa56555150)
2024-07-03 01:35:15 +00:00
ruthra kumar
706a6c1ad7 fix: always post to tax account heads if LCV is booked
(cherry picked from commit 0fcd5d5130)
2024-07-03 01:35:15 +00:00
Khushi Rawat
28e8bb7085 Merge pull request #42130 from frappe/mergify/bp/version-15-hotfix/pr-42105
fix: add auto-update for overdue status (backport #42105)
2024-07-02 23:17:04 +05:30
Khushi Rawat
8b3ffc9949 Merge pull request #42145 from frappe/mergify/bp/version-15-hotfix/pr-42144
fix: handle none type object error (backport #42144)
2024-07-02 16:54:36 +05:30
Khushi Rawat
b0aef9e42b fix: handle none type object error
(cherry picked from commit 6760c9c4e2)
2024-07-02 11:08:42 +00:00
Nabin Hait
d61dab8569 fix: provisional entry for non stock items 2024-07-02 16:10:03 +05:30
mergify[bot]
a45f8ca5fd fix: batch picking in pick list based on Stock Settings (backport #42021) (#42134)
fix: batch picking in pick list based on Stock Settings (#42021)

(cherry picked from commit 97c9941143)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-02 10:51:06 +05:30
mergify[bot]
d9e62fef21 fix: stock qty validation in SCR (backport #42124) (#42133)
fix: stock qty validation in SCR (#42124)

(cherry picked from commit 99f2735ad3)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-01 19:12:58 +05:30
mergify[bot]
3b4d39766f fix: this.frm.events.update_cost is not a function (backport #41960) (#41965)
* fix: this.frm.events.update_cost is not a function (#41960)

(cherry picked from commit d5ed4582c3)

# Conflicts:
#	erpnext/manufacturing/doctype/workstation/workstation.json
#	erpnext/manufacturing/doctype/workstation/workstation.py

* chore: fix conflicts

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-01 18:18:58 +05:30
ruthra kumar
61c0ce6ca8 Merge pull request #42132 from frappe/mergify/bp/version-15-hotfix/pr-42126
fix: Re-open allows SO's to be over credit limit (backport #42126)
2024-07-01 17:21:19 +05:30
ruthra kumar
bff99d89b9 chore: resolve conflict 2024-07-01 17:05:22 +05:30
ruthra kumar
b63eab8cbb test: credit check on Sales Order re-open
(cherry picked from commit 60694e09c4)

# Conflicts:
#	erpnext/selling/doctype/sales_order/test_sales_order.py
2024-07-01 11:33:36 +00:00
ruthra kumar
7fcb0f578a fix: Re-open allows SO's to be over credit limit
(cherry picked from commit 5eed781263)
2024-07-01 11:33:36 +00:00
Khushi Rawat
317cc0358c fix: add auto-update for overdue status (#42105)
* fix: auto-update for overdue status

* chore: use qb.update

(cherry picked from commit c5e474f4f5)
2024-07-01 11:27:02 +00:00
mergify[bot]
58e18e2b1f fix: resolve gl entries duplication in asset purchase workflow (backport #41845) (#42120)
* fix: resolve gl entries duplication in asset purchase workflow (#41845)

* fix: resolve gl entries duplication in asset purchase workflow

* fix: prevent duplicate entry when creating purchase receipt from purchase invoice

* chore: test case added

* fix: fixed missing asset category issue

(cherry picked from commit 55a4bd469b)

* fix: use f-string instead of format call

---------

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-07-01 16:54:14 +05:30
mergify[bot]
97c49b93b6 fix: refactor Asset Repair and Stock Entry linkage to resolve amendme… (backport #41919) (#42058)
* fix: refactor Asset Repair and Stock Entry linkage to resolve amendme… (#41919)

* fix: refactor Asset Repair and Stock Entry linkage to resolve amendment issues

* chore: added missing patch to patches.txt

* chore: fixing previous changes

* chore: fixing minor issues

* fix: code changes to enhance efficiency

* chore: replaced frappe.qb with db.sql because of conflict

* fix: minor changes

(cherry picked from commit ba79e68190)

# Conflicts:
#	erpnext/assets/doctype/asset_repair/asset_repair.json
#	erpnext/assets/doctype/asset_repair_consumed_item/asset_repair_consumed_item.json
#	erpnext/patches.txt
#	erpnext/stock/doctype/stock_entry/stock_entry.json

* chore: fixed conflicts

* fix: removed unmerged patches

* fix: use f-string instead of format call

---------

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-07-01 16:53:29 +05:30
mergify[bot]
c3f5a494f3 fix: batch reset while making SABB (backport #42076) (#42123)
fix: batch reset while making SABB (#42076)

(cherry picked from commit 8f424528dd)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-01 15:12:36 +05:30
mergify[bot]
a0e06a4ba5 fix: timeout error while submitting JV (backport #42040) (#42099)
* fix: timeout error while submitting JV (#42040)

(cherry picked from commit 32bdcdb08f)

# Conflicts:
#	erpnext/accounts/doctype/account/account.json
#	erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
#	erpnext/accounts/utils.py
#	erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-07-01 14:15:13 +05:30
ruthra kumar
deaeb103d5 Merge pull request #42106 from frappe/mergify/bp/version-15-hotfix/pr-42029
fix: incorrect ledger entries on Advance payment against Journals for customer (backport #42029)
2024-06-30 05:55:54 +05:30
ruthra kumar
3c58e0af50 refactor: handle purchase invoice as reference
(cherry picked from commit 9ec6aef95d)
2024-06-30 00:08:42 +00:00
ruthra kumar
cb703ff17c chore: better test name
(cherry picked from commit ad7efd5939)
2024-06-30 00:08:41 +00:00
ruthra kumar
6a0111c7db test: advance payment entry against journal - supplier type
(cherry picked from commit 1b384b9942)
2024-06-30 00:08:41 +00:00
ruthra kumar
e00348fd52 test: advance payment against journal entry - customer type
(cherry picked from commit 5e84272cf9)
2024-06-30 00:08:41 +00:00
ruthra kumar
4e74257ba9 fix: incorrect dr/cr on Adv Payment against Journals
(cherry picked from commit f6c1dffb35)
2024-06-30 00:08:41 +00:00
Frappe PR Bot
fb76daaf9e chore(release): Bumped to Version 15.28.2
## [15.28.2](https://github.com/frappe/erpnext/compare/v15.28.1...v15.28.2) (2024-06-29)

### Bug Fixes

* expense account from item group not fetched (backport [#41957](https://github.com/frappe/erpnext/issues/41957)) ([#41962](https://github.com/frappe/erpnext/issues/41962)) ([d310074](d310074222))
2024-06-29 16:18:59 +00:00
rohitwaghchaure
0df706f14d Merge pull request #42101 from frappe/mergify/bp/version-15/pr-41962
fix: expense account from item group not fetched (backport #41957) (backport #41962)
2024-06-29 21:47:42 +05:30
mergify[bot]
d310074222 fix: expense account from item group not fetched (backport #41957) (#41962)
fix: expense account from item group not fetched

(cherry picked from commit 86ebe58231)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
(cherry picked from commit 760b2e24f2)
2024-06-29 05:31:05 +00:00
mergify[bot]
760b2e24f2 fix: expense account from item group not fetched (backport #41957) (#41962)
fix: expense account from item group not fetched

(cherry picked from commit 86ebe58231)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2024-06-29 10:59:57 +05:30
mergify[bot]
1f3374fcdf fix: reposting file attachment permission issue (backport #42068) (#42075)
* fix: reposting file attachment permission issue (#42068)

(cherry picked from commit 03e674e21d)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-29 07:32:45 +05:30
Frappe PR Bot
c47dcc0eb7 chore(release): Bumped to Version 15.28.1
## [15.28.1](https://github.com/frappe/erpnext/compare/v15.28.0...v15.28.1) (2024-06-28)

### Bug Fixes

* not able to make purchase return (backport [#42053](https://github.com/frappe/erpnext/issues/42053)) ([#42055](https://github.com/frappe/erpnext/issues/42055)) ([460acc3](460acc3e22))
2024-06-28 09:19:54 +00:00
rohitwaghchaure
b738b0fe9f Merge pull request #42056 from frappe/mergify/bp/version-15/pr-42055
fix: not able to make purchase return (backport #42053) (backport #42055)
2024-06-28 14:48:34 +05:30
mergify[bot]
d396c18689 perf: Performance optmization for Purchase Invoice submission (backport #40263) (#41946)
* perf: Optimization for providional gl entries

(cherry picked from commit d7b738ff61)

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

* perf: Performance optimization for validating budget

(cherry picked from commit f204d810bb)

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

* perf: Cached accounting dimensions details

(cherry picked from commit 8cd8b8f885)

* perf: Optimzed code for merging similar gl entries

(cherry picked from commit aa75a60142)

* fix: linter issues

(cherry picked from commit acc0b2faf8)

* perf: Cache accounting dimension filter map

(cherry picked from commit e4bd173875)

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

* fix: minor fixes

(cherry picked from commit 5cd9bf3bda)

* perf: skip unnecessary validation while transaction  cancellation

(cherry picked from commit 05385e4acb)

* perf: refactored handling provisional gl entries for non-stock items

(cherry picked from commit 49c74369a5)

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

* perf: validate expense against budget only if budget exists

(cherry picked from commit c15b2d5490)

* perf: Get bin details only for stock items

(cherry picked from commit 6ff9e6ee84)

# Conflicts:
#	erpnext/stock/get_item_details.py

* fix: added index for price_list column in Item Price

(cherry picked from commit d279e23623)

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

* perf: Caching in checking allowance for qty and amount

(cherry picked from commit 8d682fa884)

* perf: Caching in gl entry

(cherry picked from commit b07769d8d7)

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

* chore: resolve conflicts

* chore: resolve conflict in purchase_invoice.py

---------

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2024-06-27 17:32:43 +05:30
mergify[bot]
460acc3e22 fix: not able to make purchase return (backport #42053) (#42055)
fix: not able to make purchase return (#42053)

(cherry picked from commit 9738c04ef0)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
(cherry picked from commit 8a91bf3154)
2024-06-27 11:02:28 +00:00
mergify[bot]
8a91bf3154 fix: not able to make purchase return (backport #42053) (#42055)
fix: not able to make purchase return (#42053)

(cherry picked from commit 9738c04ef0)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-27 16:31:06 +05:30
Frappe PR Bot
b7eabc3112 chore: release v15 (#42024)
* fix(Sales Order): only show permitted actions

(cherry picked from commit c29d955371)

* fix(Delivery Note): only show permitted actions

(cherry picked from commit 418bdc1dcc)

* fix: do not show zero balance stock items in stock balance report (backport #41958) (#41961)

fix: do not show zero balance stock in stock balance

(cherry picked from commit 7f7b363d48)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>

* fix: add string for translation (backport #41903) (#41963)

fix: add string for translation (#41903)

fix: add string for translation
(cherry picked from commit f28c692dca)

Co-authored-by: mahsem <137205921+mahsem@users.noreply.github.com>

* refactor: remove use of can_create for Payment Request (#41647)

(cherry picked from commit 47bc5691a1)

* fix: move condition for shipment

* fix: incorrect discount on other item

When discount is applied on other item, don't update `discount_amount`
as the amount is calculated for current item

(cherry picked from commit 654764e398)

* fix: incorrect against_account upon reposting

(cherry picked from commit 20c4098399)

* fix: decimal issue in pick list (backport #41972) (#41982)

fix: decimal issue in pick list (#41972)

(cherry picked from commit 21adc7b63e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* refactor: renamed number of depreciations booked to opening booked de… (#41515)

* refactor: renamed number of depreciations booked to opening booked depreciations

* feat: introduced new field for showing total number of booked depreciations

* fix: reload asset when creating asset depreciation

* chore: added nosemgrep for security checks

* feat: default account head for operating cost (backport #41985) (#41987)

* feat: default account head for operating cost (#41985)

(cherry picked from commit fd7666a029)

# Conflicts:
#	erpnext/manufacturing/doctype/bom/bom.py
#	erpnext/setup/doctype/company/company.json

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* perf: dont run queries unnecessarily, improved filters (#41993)

* perf: dont run queries unnecessarily, improved filters

* perf: dont run query if `in` filter is empty

(cherry picked from commit ac6d85aed6)

* chore: remove validation on payment entry

(cherry picked from commit e7740033ca)

* refactor: convert amount to base currency for advances

(cherry picked from commit c9ede1ffbe)

* refactor: for advances uses the party account in references table

(cherry picked from commit 7dce6e03c7)

* refactor(test): simpler create_account helper method

(cherry picked from commit 475e0ddeee)

* test: exc gain/loss booking on advances under asset/liability

(cherry picked from commit 827d67d02f)

* test: advance against purchase invoice

(cherry picked from commit 90c84822d0)

* refactor: validation to force accounts to be on same currency

(cherry picked from commit 0f0b4d88bc)

* refactor: validation in customer group

(cherry picked from commit 4f9a228175)

* refactor: validation in Supplier Group

(cherry picked from commit 107b614518)

* refactor: better error messages

(cherry picked from commit 83ff94b9b8)

* chore: fix test data

(cherry picked from commit 07d59443b7)

* chore: remove dead code

(cherry picked from commit 7e318c0132)

* fix(test): incorrect field for customer default billing currency

(cherry picked from commit c696d13a5e)

* refactor(test): enfore use of customer/supplier master

While using advance accounts in foreign currency, always use
Customer/Supplier master to maintain them

(cherry picked from commit 64e63887be)

* refactor(test): make and use a different party for subscription

(cherry picked from commit 3fabf4aaa4)

* fix: pricing rule with and without 'apply multiple' and priority

Either all of the pricing rules identified for an item should have
'apply multiple' enabled. If not, Priority is applied and only the
highest priority is applied

(cherry picked from commit 5e875b238c)

* test: priority takes effect on with and without apply multiple

(cherry picked from commit efebc3662e)

* feat: accounting dimension filters in gp report

(cherry picked from commit d165638bbb)

* feat(gp): group by cost center

(cherry picked from commit e26bc17c75)

* fix: Wrong Delete Batch on Purchase Receipt (backport #42007) (#42012)

fix: Wrong Delete Batch on Purchase Receipt (#42007)

(cherry picked from commit d50487ce53)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* fix: incorrect Difference Amount (backport #42008) (#42013)

fix: incorrect Difference Amount (#42008)

(cherry picked from commit 7d91c6cbd5)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* fix: valuation rate for the legacy batches (backport #42011) (#42020)

fix: valuation rate for the legacy batches (#42011)

(cherry picked from commit 9ab333d105)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* fix: timeout while cancelling LCV (backport #42030) (backport #42031) (#42032)

fix: timeout while cancelling LCV (backport #42030) (#42031)

fix: timeout while cancelling LCV (#42030)

fix: timeout while canelling LCV
(cherry picked from commit 21bf7fd1f8)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* fix: Stock Reservation Entry was not getting created (backport #42033) (#42035)

fix: Stock Reservation Entry was not getting created (#42033)

(cherry picked from commit 1a9899b32b)

Co-authored-by: Poorvi-R-Bhat <poorvi.r.bhat@gmail.com>

* fix: manufacturing date issue in the batch (backport #42034) (#42037)

* fix: manufacturing date issue in the batch (#42034)

(cherry picked from commit eca3e02f8d)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* fix: fixed asset value in Fixed Asset Register (backport #41930) (#42027)

fix: fixed asset value in Fixed Asset Register (#41930)

(cherry picked from commit 1c643a0ead)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>

* feat: Turkish Chart Of Accounts (backport #41756) (#42028)

* feat: Create Turkish Chart Of Accounts

(cherry picked from commit 5c8ea86a3f)

* feat: Create Turkish Chart Of Accounts

(cherry picked from commit b401ba2c26)

---------

Co-authored-by: fzozyurt <fzozyurt@outlook.com>

* perf: code optimization to handle large asset creation (backport #42018) (#42025)

perf: code optimization to handle large asset creation (#42018)

(cherry picked from commit 5738d93f95)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>

* fix: incorrect time period in asset depreciation schedule (backport #41805) (#42043)

fix: incorrect time period in asset depreciation schedule (#41805)

* fix(wip): depreciation calculation for existing asset

* fix(wip): added validation for incorrect depreciation period

* fix: depreciation schedule time period issue for existing asset

* chore: run pre-commit checks and apply fixes

* style: apply formatting changes

* style: made some necessary changes

* chore: modified test

(cherry picked from commit 625f16dee0)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>

* chore: patch to enable total number of booked depreciations field (backport #41940) (#42042)

* chore: patch to enable total number of booked depreciations field (#41940)

* chore: patch to enable total number of booked depreciations field

* fix: conflict resolved

* refactor: replaced fb_row.db_set with set_value

(cherry picked from commit 5fdd1d3278)

# Conflicts:
#	erpnext/patches.txt

* fix: resolved conflicts

* fix: removed unmerged patches

---------

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>

* fix: lead status filter (backport #41816) (#42046)

fix: lead status filter (#41816)

(cherry picked from commit 8ae2b8ff8c)

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>

* fix: unhide serial no field (backport #42045) (#42047)

* fix: unhide serial no field (#42045)

(cherry picked from commit 80c6981cfa)

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

* fix: resolved conflicts

---------

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>

---------

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
Co-authored-by: mahsem <137205921+mahsem@users.noreply.github.com>
Co-authored-by: ruthra kumar <ruthra@erpnext.com>
Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
Co-authored-by: Sagar Vora <sagar@resilient.tech>
Co-authored-by: Dany Robert <danyrt@wahni.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
Co-authored-by: Poorvi-R-Bhat <poorvi.r.bhat@gmail.com>
Co-authored-by: fzozyurt <fzozyurt@outlook.com>
Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-06-26 21:52:35 +05:30
mergify[bot]
482832f3c2 fix: unhide serial no field (backport #42045) (#42047)
* fix: unhide serial no field (#42045)

(cherry picked from commit 80c6981cfa)

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

* fix: resolved conflicts

---------

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-06-26 18:01:33 +05:30
mergify[bot]
3536a754ff fix: lead status filter (backport #41816) (#42046)
fix: lead status filter (#41816)

(cherry picked from commit 8ae2b8ff8c)

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-06-26 17:47:30 +05:30
mergify[bot]
b29435744f chore: patch to enable total number of booked depreciations field (backport #41940) (#42042)
* chore: patch to enable total number of booked depreciations field (#41940)

* chore: patch to enable total number of booked depreciations field

* fix: conflict resolved

* refactor: replaced fb_row.db_set with set_value

(cherry picked from commit 5fdd1d3278)

# Conflicts:
#	erpnext/patches.txt

* fix: resolved conflicts

* fix: removed unmerged patches

---------

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-06-26 17:43:57 +05:30
mergify[bot]
cf4d4ba3e9 fix: incorrect time period in asset depreciation schedule (backport #41805) (#42043)
fix: incorrect time period in asset depreciation schedule (#41805)

* fix(wip): depreciation calculation for existing asset

* fix(wip): added validation for incorrect depreciation period

* fix: depreciation schedule time period issue for existing asset

* chore: run pre-commit checks and apply fixes

* style: apply formatting changes

* style: made some necessary changes

* chore: modified test

(cherry picked from commit 625f16dee0)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-06-26 16:51:16 +05:30
mergify[bot]
c27f272f06 perf: code optimization to handle large asset creation (backport #42018) (#42025)
perf: code optimization to handle large asset creation (#42018)

(cherry picked from commit 5738d93f95)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-06-26 16:51:07 +05:30
mergify[bot]
63b26e679b feat: Turkish Chart Of Accounts (backport #41756) (#42028)
* feat: Create Turkish Chart Of Accounts

(cherry picked from commit 5c8ea86a3f)

* feat: Create Turkish Chart Of Accounts

(cherry picked from commit b401ba2c26)

---------

Co-authored-by: fzozyurt <fzozyurt@outlook.com>
2024-06-26 16:50:41 +05:30
mergify[bot]
f2feeaf264 fix: fixed asset value in Fixed Asset Register (backport #41930) (#42027)
fix: fixed asset value in Fixed Asset Register (#41930)

(cherry picked from commit 1c643a0ead)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-06-26 16:49:55 +05:30
mergify[bot]
a981633d94 fix: manufacturing date issue in the batch (backport #42034) (#42037)
* fix: manufacturing date issue in the batch (#42034)

(cherry picked from commit eca3e02f8d)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-26 13:00:36 +05:30
mergify[bot]
e278fc683f fix: Stock Reservation Entry was not getting created (backport #42033) (#42035)
fix: Stock Reservation Entry was not getting created (#42033)

(cherry picked from commit 1a9899b32b)

Co-authored-by: Poorvi-R-Bhat <poorvi.r.bhat@gmail.com>
2024-06-26 09:11:01 +05:30
mergify[bot]
068de08bbb fix: timeout while cancelling LCV (backport #42030) (backport #42031) (#42032)
fix: timeout while cancelling LCV (backport #42030) (#42031)

fix: timeout while cancelling LCV (#42030)

fix: timeout while canelling LCV
(cherry picked from commit 21bf7fd1f8)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-06-25 18:42:43 +05:30
mergify[bot]
f6be19cb7c fix: valuation rate for the legacy batches (backport #42011) (#42020)
fix: valuation rate for the legacy batches (#42011)

(cherry picked from commit 9ab333d105)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-25 13:07:03 +05:30
mergify[bot]
838cc5b72a fix: incorrect Difference Amount (backport #42008) (#42013)
fix: incorrect Difference Amount (#42008)

(cherry picked from commit 7d91c6cbd5)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-24 17:04:24 +05:30
mergify[bot]
68b318a94b fix: Wrong Delete Batch on Purchase Receipt (backport #42007) (#42012)
fix: Wrong Delete Batch on Purchase Receipt (#42007)

(cherry picked from commit d50487ce53)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-24 17:04:13 +05:30
Deepesh Garg
6a0ab23c87 Merge pull request #42006 from frappe/mergify/bp/version-15-hotfix/pr-41751
feat: accounting dimension filters in gp report (#41751)
2024-06-24 11:24:24 +05:30
Dany Robert
068ae87b8d feat(gp): group by cost center
(cherry picked from commit e26bc17c75)
2024-06-24 05:22:39 +00:00
Dany Robert
fe9dffb271 feat: accounting dimension filters in gp report
(cherry picked from commit d165638bbb)
2024-06-24 05:22:39 +00:00
ruthra kumar
521cfb3d4e Merge pull request #41998 from frappe/mergify/bp/version-15-hotfix/pr-41976
fix: pricing rule with and without 'apply multiple' and priority (backport #41976)
2024-06-23 05:49:07 +05:30
ruthra kumar
bc6cbb2656 Merge pull request #41997 from frappe/mergify/bp/version-15-hotfix/pr-41844
refactor: allow foreign currency advance accounts (backport #41844)
2024-06-23 05:43:10 +05:30
ruthra kumar
f52f726e06 test: priority takes effect on with and without apply multiple
(cherry picked from commit efebc3662e)
2024-06-23 00:02:10 +00:00
ruthra kumar
f3aa885488 fix: pricing rule with and without 'apply multiple' and priority
Either all of the pricing rules identified for an item should have
'apply multiple' enabled. If not, Priority is applied and only the
highest priority is applied

(cherry picked from commit 5e875b238c)
2024-06-23 00:02:10 +00:00
ruthra kumar
c45ce75f57 refactor(test): make and use a different party for subscription
(cherry picked from commit 3fabf4aaa4)
2024-06-22 23:58:11 +00:00
ruthra kumar
6dbe820416 refactor(test): enfore use of customer/supplier master
While using advance accounts in foreign currency, always use
Customer/Supplier master to maintain them

(cherry picked from commit 64e63887be)
2024-06-22 23:58:11 +00:00
ruthra kumar
3b15708f18 fix(test): incorrect field for customer default billing currency
(cherry picked from commit c696d13a5e)
2024-06-22 23:58:10 +00:00
ruthra kumar
a1ebd16284 chore: remove dead code
(cherry picked from commit 7e318c0132)
2024-06-22 23:58:10 +00:00
ruthra kumar
d1679d4663 chore: fix test data
(cherry picked from commit 07d59443b7)
2024-06-22 23:58:10 +00:00
ruthra kumar
2bd10d388f refactor: better error messages
(cherry picked from commit 83ff94b9b8)
2024-06-22 23:58:10 +00:00
ruthra kumar
545d0b9730 refactor: validation in Supplier Group
(cherry picked from commit 107b614518)
2024-06-22 23:58:10 +00:00
ruthra kumar
4bde345399 refactor: validation in customer group
(cherry picked from commit 4f9a228175)
2024-06-22 23:58:10 +00:00
ruthra kumar
78ad3f6cdc refactor: validation to force accounts to be on same currency
(cherry picked from commit 0f0b4d88bc)
2024-06-22 23:58:10 +00:00
ruthra kumar
88e1c28e7d test: advance against purchase invoice
(cherry picked from commit 90c84822d0)
2024-06-22 23:58:09 +00:00
ruthra kumar
259d7cde39 test: exc gain/loss booking on advances under asset/liability
(cherry picked from commit 827d67d02f)
2024-06-22 23:58:09 +00:00
ruthra kumar
6ebd4ba2cc refactor(test): simpler create_account helper method
(cherry picked from commit 475e0ddeee)
2024-06-22 23:58:09 +00:00
ruthra kumar
47071cec5d refactor: for advances uses the party account in references table
(cherry picked from commit 7dce6e03c7)
2024-06-22 23:58:09 +00:00
ruthra kumar
5d2f296ca8 refactor: convert amount to base currency for advances
(cherry picked from commit c9ede1ffbe)
2024-06-22 23:58:09 +00:00
ruthra kumar
199a64937b chore: remove validation on payment entry
(cherry picked from commit e7740033ca)
2024-06-22 23:58:09 +00:00
Sagar Vora
a535933a09 Merge pull request #41995 from frappe/mergify/bp/version-15-hotfix/pr-41993
perf: dont run queries unnecessarily, improved filters (backport #41993)
2024-06-22 21:51:27 +05:30
Sagar Vora
b59c91a341 perf: dont run queries unnecessarily, improved filters (#41993)
* perf: dont run queries unnecessarily, improved filters

* perf: dont run query if `in` filter is empty

(cherry picked from commit ac6d85aed6)
2024-06-22 15:58:00 +00:00
Frappe PR Bot
e99ef572a2 chore(release): Bumped to Version 15.28.0
# [15.28.0](https://github.com/frappe/erpnext/compare/v15.27.7...v15.28.0) (2024-06-22)

### Features

* default account head for operating cost (backport [#41985](https://github.com/frappe/erpnext/issues/41985)) ([#41987](https://github.com/frappe/erpnext/issues/41987)) ([6f3a6ca](6f3a6ca2ca))
2024-06-22 05:49:34 +00:00
rohitwaghchaure
ea9095c824 Merge pull request #41991 from frappe/mergify/bp/version-15/pr-41987
feat: default account head for operating cost (backport #41985) (backport #41987)
2024-06-22 11:18:18 +05:30
mergify[bot]
6f3a6ca2ca feat: default account head for operating cost (backport #41985) (#41987)
* feat: default account head for operating cost (#41985)

(cherry picked from commit fd7666a029)

# Conflicts:
#	erpnext/manufacturing/doctype/bom/bom.py
#	erpnext/setup/doctype/company/company.json

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
(cherry picked from commit 44c16713ba)
2024-06-22 05:12:33 +00:00
mergify[bot]
44c16713ba feat: default account head for operating cost (backport #41985) (#41987)
* feat: default account head for operating cost (#41985)

(cherry picked from commit fd7666a029)

# Conflicts:
#	erpnext/manufacturing/doctype/bom/bom.py
#	erpnext/setup/doctype/company/company.json

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-22 10:39:53 +05:30
Khushi Rawat
8d299d1495 Merge pull request #41989 from khushi8112/rename-number-of-depreciation-v15-hotfix
refactor: renamed number of depreciations booked to opening booked depreciations
2024-06-22 01:19:16 +05:30
Khushi Rawat
f9574366b5 chore: added nosemgrep for security checks 2024-06-22 01:01:03 +05:30
Khushi Rawat
7b5d5043c5 fix: reload asset when creating asset depreciation 2024-06-22 00:57:00 +05:30
Khushi Rawat
ca343f12d8 refactor: renamed number of depreciations booked to opening booked de… (#41515)
* refactor: renamed number of depreciations booked to opening booked depreciations

* feat: introduced new field for showing total number of booked depreciations
2024-06-21 19:53:46 +05:30
ruthra kumar
9515b96049 Merge pull request #41984 from frappe/mergify/bp/version-15-hotfix/pr-41981
fix: incorrect against_account upon reposting (backport #41981)
2024-06-21 19:10:33 +05:30
mergify[bot]
9945a90b3f fix: decimal issue in pick list (backport #41972) (#41982)
fix: decimal issue in pick list (#41972)

(cherry picked from commit 21adc7b63e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-21 18:26:05 +05:30
ruthra kumar
a41577a1cd fix: incorrect against_account upon reposting
(cherry picked from commit 20c4098399)
2024-06-21 12:30:39 +00:00
ruthra kumar
657daf9a43 Merge pull request #41977 from frappe/mergify/bp/version-15-hotfix/pr-41956
fix: incorrect discount on other item (backport #41956)
2024-06-21 15:55:22 +05:30
ruthra kumar
77f4199e2a fix: incorrect discount on other item
When discount is applied on other item, don't update `discount_amount`
as the amount is calculated for current item

(cherry picked from commit 654764e398)
2024-06-21 10:23:42 +00:00
Raffael Meyer
7b322e7437 Merge pull request #41441 from frappe/mergify/bp/version-15-hotfix/pr-41384
fix(SO, DN): only show permitted actions (backport #41384)
2024-06-20 15:58:39 +02:00
barredterra
21802396ce fix: move condition for shipment 2024-06-20 14:32:01 +02:00
barredterra
9bad219f0a refactor: remove use of can_create for Payment Request (#41647)
(cherry picked from commit 47bc5691a1)
2024-06-20 14:28:24 +02:00
barredterra
ddbf9317a1 Merge remote-tracking branch 'upstream/version-15-hotfix' into mergify/bp/version-15-hotfix/pr-41384 2024-06-20 14:27:08 +02:00
mergify[bot]
48dc24b9bf fix: add string for translation (backport #41903) (#41963)
fix: add string for translation (#41903)

fix: add string for translation
(cherry picked from commit f28c692dca)

Co-authored-by: mahsem <137205921+mahsem@users.noreply.github.com>
2024-06-20 17:05:39 +05:30
mergify[bot]
c10b123a81 fix: do not show zero balance stock items in stock balance report (backport #41958) (#41961)
fix: do not show zero balance stock in stock balance

(cherry picked from commit 7f7b363d48)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2024-06-20 17:04:58 +05:30
Frappe PR Bot
fa6a479ed9 chore(release): Bumped to Version 15.27.7
## [15.27.7](https://github.com/frappe/erpnext/compare/v15.27.6...v15.27.7) (2024-06-19)

### Bug Fixes

* add LCV flag to determine negative expenses ([83ccb32](83ccb32be6))
* add strings for translation in pos_item_cart.js ([f4852d4](f4852d472a))
* add test case for update received qty in MR ([858058c](858058c9e1))
* add test case for update received qty in MR ([aaee028](aaee02835b))
* add test case for update received qty in MR ([125d97a](125d97a182))
* add test case for update received qty in MR - import sorter ([084658e](084658e8ff))
* add test case for update received qty in MR - import sorter ([21596c6](21596c6c23))
* allow Employee role to select Department (backport [#41877](https://github.com/frappe/erpnext/issues/41877)) ([#41881](https://github.com/frappe/erpnext/issues/41881)) ([3bc5076](3bc5076dfc))
* batch qty in the dropdown field ([67d1709](67d1709ef8))
* consistent query field name in item wise purchase register with item wise sales register ([a43c181](a43c181673))
* download materials request plan in PP ([7193633](7193633773))
* download materials request plan in PP ([ef2a6c7](ef2a6c788e))
* download materials request plan in PP -prettier ([3370825](337082512e))
* download materials request plan in production plan ([9cb7c27](9cb7c279a4))
* duplicate rows fetching in RFQ ([c159e3b](c159e3b06f))
* handle NoneType error where customer details are not available in sales register ([ceafa0c](ceafa0ce28))
* incorrect batch return from sales return ([b64b433](b64b4330a3))
* item_code filter in item-wise sales-purchase register ([98c8fed](98c8feded0))
* migrate lead notes ([5663432](5663432bd8))
* only show user and date if available ([24ee765](24ee765e6a))
* parameters for PI references ([8618402](8618402829))
* regional overide for updating item valution ([5ea2cdc](5ea2cdcaad))
* reposting validation related PCV ([794ade8](794ade832f))
* reset perpetual inventory flag after test ([4c11f2b](4c11f2bff2))
* return from accepted and rejected warehouse at a same time not working ([6c57971](6c57971abc))
* update received qty in MR on purchase invoice submit with update stock ([7e9f6ae](7e9f6aee58))
* update received qty in MR on purchase invoice submit with update stock ([4551b4b](4551b4b638))
* use invoice outstanding on Dunning ([#41817](https://github.com/frappe/erpnext/issues/41817)) ([04f0c96](04f0c96af7))
2024-06-19 06:28:10 +00:00
ruthra kumar
a60879fec0 Merge pull request #41941 from frappe/version-15-hotfix
chore: release v15
2024-06-19 11:56:54 +05:30
ruthra kumar
cd1db37c74 chore: fix linter 2024-06-19 11:25:02 +05:30
ruthra kumar
e3608f285f Merge branch 'version-15' into version-15-hotfix 2024-06-19 11:02:14 +05:30
Raffael Meyer
c110a9f2ad Merge pull request #41945 from frappe/mergify/bp/version-15-hotfix/pr-41421
fix: migrate lead notes (backport #41421)
2024-06-19 01:17:52 +02:00
barredterra
24ee765e6a fix: only show user and date if available
(cherry picked from commit 895aede590)
2024-06-18 22:57:25 +00:00
barredterra
5663432bd8 fix: migrate lead notes
(cherry picked from commit 382d0ff453)
2024-06-18 22:57:24 +00:00
ruthra kumar
d64432c3f4 Merge pull request #41938 from frappe/mergify/bp/version-15-hotfix/pr-41900
refactor: ignore unreconcile doc for PO and SO on cancel/delete (backport #41900)
2024-06-18 10:54:51 +05:30
ljain112
7cc5579eca refactor: ignore unreconcile doc for PO and SO on cancel/delete
(cherry picked from commit b618d685c6)
2024-06-18 04:58:09 +00:00
rohitwaghchaure
60b16a4b1e Merge pull request #41935 from frappe/mergify/bp/version-15-hotfix/pr-41931
fix: reposting validation related PCV (backport #41931)
2024-06-18 09:41:43 +05:30
mergify[bot]
ff8027b8eb Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-41384 2024-06-17 17:46:28 +00:00
Rohit Waghchaure
794ade832f fix: reposting validation related PCV
(cherry picked from commit 194f1dc674)
2024-06-17 12:21:59 +00:00
rohitwaghchaure
75edb7708f Merge pull request #41932 from frappe/mergify/bp/version-15-hotfix/pr-41907
fix: add strings for translation in pos_item_cart.js (backport #41907)
2024-06-17 17:49:24 +05:30
mahsem
f4852d472a fix: add strings for translation in pos_item_cart.js
fix: add strings for translation in pos_item_cart.js
(cherry picked from commit 2fb3e5da4a)
2024-06-17 11:40:49 +00:00
rohitwaghchaure
db7fb7d7b1 Merge pull request #41928 from frappe/mergify/bp/version-15-hotfix/pr-41927
fix: consistent query field name in item wise purchase register with item wise sales register (backport #41927)
2024-06-17 16:53:28 +05:30
rohitwaghchaure
ae0725d55a Merge pull request #41929 from frappe/mergify/bp/version-15-hotfix/pr-41920
fix: handle NoneType error where customer details are not available in sales register (backport #41920)
2024-06-17 16:52:59 +05:30
Nihantra C. Patel
d48a2c9f8e fix: correcting balance sheet calculation for zero liabilities and equity 2024-06-17 15:14:59 +05:30
Nihantra C. Patel
0bab609a6f fix: completed DC will not appear in a delivery trip 2024-06-17 15:09:31 +05:30
ljain112
ceafa0ce28 fix: handle NoneType error where customer details are not available in sales register
(cherry picked from commit f876fec6f5)
2024-06-17 09:29:38 +00:00
ljain112
a43c181673 fix: consistent query field name in item wise purchase register with item wise sales register
(cherry picked from commit 6d539e0fc0)
2024-06-17 09:28:27 +00:00
rohitwaghchaure
ae83236b7c Merge pull request #41926 from frappe/mergify/bp/version-15-hotfix/pr-41921
fix: item_code filter in item-wise sales-purchase register (backport #41921)
2024-06-17 14:56:21 +05:30
Nihantra Patel
98c8feded0 fix: item_code filter in item-wise sales-purchase register
(cherry picked from commit 757aef3972)
2024-06-17 08:32:26 +00:00
rohitwaghchaure
5a2005395b Merge pull request #41918 from frappe/mergify/bp/version-15-hotfix/pr-41898
fix: update received qty in MR on purchase invoice submit with update stock (backport #41898)
2024-06-17 13:59:54 +05:30
rohitwaghchaure
ecb889707d Merge pull request #41924 from frappe/mergify/bp/version-15-hotfix/pr-41922
fix: duplicate rows fetching in RFQ (backport #41922)
2024-06-17 13:58:15 +05:30
ruthra kumar
e3539ac2de Merge pull request #41913 from frappe/mergify/bp/version-15-hotfix/pr-40187
fix: valuation tax entries on LCV after billing PR (backport #40187)
2024-06-17 13:53:17 +05:30
Rohit Waghchaure
c159e3b06f fix: duplicate rows fetching in RFQ
(cherry picked from commit 555510c128)
2024-06-17 07:36:59 +00:00
Nihantra C. Patel
7e9f6aee58 fix: update received qty in MR on purchase invoice submit with update stock 2024-06-17 11:39:42 +05:30
Nihantra Patel
084658e8ff fix: add test case for update received qty in MR - import sorter
(cherry picked from commit 77959596db)
2024-06-17 06:06:35 +00:00
Nihantra Patel
21596c6c23 fix: add test case for update received qty in MR - import sorter
(cherry picked from commit 73f22ba9a0)
2024-06-17 06:06:35 +00:00
Nihantra Patel
858058c9e1 fix: add test case for update received qty in MR
(cherry picked from commit 62e4e88f1d)
2024-06-17 06:06:34 +00:00
Nihantra Patel
aaee02835b fix: add test case for update received qty in MR
(cherry picked from commit cff1050159)
2024-06-17 06:06:34 +00:00
Nihantra Patel
125d97a182 fix: add test case for update received qty in MR
(cherry picked from commit ebb0cef601)
2024-06-17 06:06:34 +00:00
Nihantra Patel
4551b4b638 fix: update received qty in MR on purchase invoice submit with update stock
(cherry picked from commit 13cb53fa89)

# Conflicts:
#	erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
2024-06-17 06:06:34 +00:00
rohitwaghchaure
9771bbdb75 Merge pull request #41917 from frappe/mergify/bp/version-15-hotfix/pr-41916
fix: incorrect batch return from sales return (backport #41916)
2024-06-17 11:35:24 +05:30
Rohit Waghchaure
b64b4330a3 fix: incorrect batch return from sales return
(cherry picked from commit 317047c808)
2024-06-17 05:47:25 +00:00
ruthra kumar
b577d95ecd chore: resolve conflicts 2024-06-16 20:50:03 +05:30
Gursheen Anand
248e9cac71 chore: resolve conflicts
(cherry picked from commit 54a58e9205)

# Conflicts:
#	erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py
2024-06-15 15:12:22 +00:00
Gursheen Anand
4c11f2bff2 fix: reset perpetual inventory flag after test
(cherry picked from commit 0b36cbe307)

# Conflicts:
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
2024-06-15 15:12:22 +00:00
Gursheen Anand
8618402829 fix: parameters for PI references
(cherry picked from commit 8b3d46610e)

# Conflicts:
#	erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
2024-06-15 15:12:22 +00:00
Gursheen Anand
c7c9d33954 test: LCV entries after billing
(cherry picked from commit 53642e7417)

# Conflicts:
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
2024-06-15 15:12:22 +00:00
Gursheen Anand
83ccb32be6 fix: add LCV flag to determine negative expenses
(cherry picked from commit baa3fee1bf)

# Conflicts:
#	erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py
2024-06-15 15:12:21 +00:00
Smit Vora
69de359728 Merge pull request #41890 from frappe/mergify/bp/version-15-hotfix/pr-41842
fix: regional overide for updating item valution (backport #41842)
2024-06-15 09:16:01 +05:30
ljain112
5ea2cdcaad fix: regional overide for updating item valution
(cherry picked from commit 1a10f0bcbd)
2024-06-13 08:09:51 +00:00
rohitwaghchaure
ac2e760d81 Merge pull request #41888 from frappe/mergify/bp/version-15-hotfix/pr-41886
fix: download materials request plan in production plan (backport #41886)
2024-06-13 11:23:59 +05:30
Kishan0330
164973a42c refactor: change warehousesData variable name
(cherry picked from commit f4e369977a)
2024-06-13 05:45:17 +00:00
Kishan0330
9cb7c279a4 fix: download materials request plan in production plan
(cherry picked from commit 6e55651795)
2024-06-13 05:45:17 +00:00
Frappe PR Bot
9ccfbe1bf5 chore(release): Bumped to Version 15.27.6
## [15.27.6](https://github.com/frappe/erpnext/compare/v15.27.5...v15.27.6) (2024-06-12)

### Bug Fixes

* batch qty in the dropdown field ([2c9b390](2c9b3908dd))
* return from accepted and rejected warehouse at a same time not working ([00b7c49](00b7c49b4b))
2024-06-12 11:54:13 +00:00
rohitwaghchaure
5004d95f59 Merge pull request #41873 from frappe/mergify/bp/version-15/pr-41868
fix: batch qty in the dropdown field (backport #41865) (backport #41868)
2024-06-12 17:22:57 +05:30
rohitwaghchaure
2990b4ec85 Merge pull request #41875 from frappe/mergify/bp/version-15/pr-41874
fix: return from accepted and rejected warehouse at a same time not working (backport #41872) (backport #41874)
2024-06-12 17:22:39 +05:30
mergify[bot]
3bc5076dfc fix: allow Employee role to select Department (backport #41877) (#41881)
* fix: allow Employee role to select Department (#41877)

(cherry picked from commit 56082f5a29)

# Conflicts:
#	erpnext/setup/doctype/department/department.json

* chore: fix conflicts

---------

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2024-06-12 17:19:36 +05:30
Frappe PR Bot
b34191e81f chore(release): Bumped to Version 15.27.5
## [15.27.5](https://github.com/frappe/erpnext/compare/v15.27.4...v15.27.5) (2024-06-12)

### Bug Fixes

* use invoice outstanding on Dunning ([#41817](https://github.com/frappe/erpnext/issues/41817)) ([a89b4f4](a89b4f49fe))
2024-06-12 11:32:40 +00:00
ruthra kumar
59be55fd8a Merge pull request #41879 from frappe/mergify/bp/version-15/pr-41817
fix: use invoice outstanding on Dunning (backport #41817)
2024-06-12 17:01:13 +05:30
ruthra kumar
a89b4f49fe fix: use invoice outstanding on Dunning (#41817)
(cherry picked from commit cf0a29b05f)
2024-06-12 11:13:34 +00:00
ruthra kumar
2f5533c676 Merge pull request #41876 from frappe/mergify/bp/version-15-hotfix/pr-41817
fix: use invoice outstanding on Dunning (backport #41817)
2024-06-12 16:42:08 +05:30
ruthra kumar
04f0c96af7 fix: use invoice outstanding on Dunning (#41817)
(cherry picked from commit cf0a29b05f)
2024-06-12 10:54:57 +00:00
Rohit Waghchaure
00b7c49b4b fix: return from accepted and rejected warehouse at a same time not working
(cherry picked from commit 17731f09ef)
(cherry picked from commit 6c57971abc)
2024-06-12 10:51:44 +00:00
rohitwaghchaure
6e9ad4ddd2 Merge pull request #41874 from frappe/mergify/bp/version-15-hotfix/pr-41872
fix: return from accepted and rejected warehouse at a same time not working (backport #41872)
2024-06-12 16:20:15 +05:30
Rohit Waghchaure
6c57971abc fix: return from accepted and rejected warehouse at a same time not working
(cherry picked from commit 17731f09ef)
2024-06-12 10:17:33 +00:00
Rohit Waghchaure
2c9b3908dd fix: batch qty in the dropdown field
(cherry picked from commit eb426c69fe)
(cherry picked from commit 67d1709ef8)
2024-06-12 10:17:32 +00:00
rohitwaghchaure
c04ba3864e Merge pull request #41868 from frappe/mergify/bp/version-15-hotfix/pr-41865
fix: batch qty in the dropdown field (backport #41865)
2024-06-12 15:46:06 +05:30
rohitwaghchaure
da15df1f28 Merge pull request #41869 from frappe/mergify/bp/version-15-hotfix/pr-41650
chore: typo in bom_operation.json (backport #41650)
2024-06-12 15:22:51 +05:30
rohitwaghchaure
94ef2eabb1 Merge pull request #41870 from frappe/mergify/bp/version-15-hotfix/pr-41867
fix: download materials request plan in PP (backport #41867)
2024-06-12 15:22:33 +05:30
Nihantra C. Patel
337082512e fix: download materials request plan in PP -prettier
(cherry picked from commit a1c4e0e93c)
2024-06-12 07:33:12 +00:00
Himanshu Shivhare
764235b390 chore: typo in bom_operation.json (#41650)
chore: typo in bom_operation.json
(cherry picked from commit 7ee2a19f53)
2024-06-12 07:33:11 +00:00
Nihantra C. Patel
7193633773 fix: download materials request plan in PP
(cherry picked from commit cb52b76342)
2024-06-12 07:33:11 +00:00
Nihantra C. Patel
ef2a6c788e fix: download materials request plan in PP
(cherry picked from commit f4acdd9636)
2024-06-12 07:33:11 +00:00
Rohit Waghchaure
67d1709ef8 fix: batch qty in the dropdown field
(cherry picked from commit eb426c69fe)
2024-06-12 07:32:03 +00:00
Frappe PR Bot
4d2d38cd9d chore(release): Bumped to Version 15.27.4
## [15.27.4](https://github.com/frappe/erpnext/compare/v15.27.3...v15.27.4) (2024-06-11)

### Bug Fixes

* Add additional condition application ([1fca6ea](1fca6ea5e7))
* Add posting date to key for consolidated view ([9472085](94720851c6))
* Add timestamp to key for immutable views ([9e9bc8b](9e9bc8b59c))
* asset depreciations and balances report correction (backport [#41824](https://github.com/frappe/erpnext/issues/41824)) ([#41851](https://github.com/frappe/erpnext/issues/41851)) ([28b7fad](28b7fad579))
* calculate totals and taxes ([5544309](5544309048))
* Do no apply pricing rule on qty change for mapped docs ([822bc58](822bc581f3))
* do not fetch items with no active BOM in PP (backport [#41833](https://github.com/frappe/erpnext/issues/41833)) ([#41835](https://github.com/frappe/erpnext/issues/41835)) ([30c0b2b](30c0b2bb54))
* enable no_copy for timesheet in sales invoice ([f1ad0f6](f1ad0f6f26))
* fixing Item-wise sales register ([f36db7e](f36db7ebaf))
* fixing Item-wise sales register [#41373](https://github.com/frappe/erpnext/issues/41373) ([5e0fa1b](5e0fa1b75e))
* fixing Item-wise sales register and purchase register [#41373](https://github.com/frappe/erpnext/issues/41373) ([a4b28ba](a4b28ba354))
* Item-wise Sales and Purchase register with no item codes [#41373](https://github.com/frappe/erpnext/issues/41373) ([96405e8](96405e8e49))
* stock_value_change for legacy serial nos (backport [#41825](https://github.com/frappe/erpnext/issues/41825)) ([#41826](https://github.com/frappe/erpnext/issues/41826)) ([a7971cf](a7971cf844))
* terms and conditions for material request (backport [#41834](https://github.com/frappe/erpnext/issues/41834)) ([#41837](https://github.com/frappe/erpnext/issues/41837)) ([1ead667](1ead66721d))
* typo in method - holiday list (backport [#41811](https://github.com/frappe/erpnext/issues/41811)) ([#41812](https://github.com/frappe/erpnext/issues/41812)) ([4d3e883](4d3e883130))
* valuation rate for backdated legacy serial/batches (backport [#41788](https://github.com/frappe/erpnext/issues/41788)) ([#41821](https://github.com/frappe/erpnext/issues/41821)) ([8d31243](8d31243a42))
* valuation rate for serial and batch bundle for current bundle (backport [#41850](https://github.com/frappe/erpnext/issues/41850)) ([#41860](https://github.com/frappe/erpnext/issues/41860)) ([3e4c568](3e4c568ddc))
* **Vehicle:** allow doc renaming and add test (backport [#41729](https://github.com/frappe/erpnext/issues/41729)) ([#41785](https://github.com/frappe/erpnext/issues/41785)) ([4d37739](4d37739dd3))
2024-06-11 13:18:31 +00:00
rohitwaghchaure
b87b438881 Merge pull request #41854 from frappe/version-15-hotfix
chore: release v15
2024-06-11 18:47:08 +05:30
mergify[bot]
3e4c568ddc fix: valuation rate for serial and batch bundle for current bundle (backport #41850) (#41860)
fix: valuation rate for serial and batch bundle for current bundle (#41850)

(cherry picked from commit 7249a691b3)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-11 18:29:54 +05:30
mergify[bot]
28b7fad579 fix: asset depreciations and balances report correction (backport #41824) (#41851)
fix: asset depreciations and balances report correction (#41824)

* fix: asset depreciations and balances report correction

* chore: suppress linter warnings with # nosemgrep

(cherry picked from commit 857c689405)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-06-11 18:18:11 +05:30
Frappe PR Bot
6157119bcf chore(release): Bumped to Version 15.27.3
## [15.27.3](https://github.com/frappe/erpnext/compare/v15.27.2...v15.27.3) (2024-06-11)

### Bug Fixes

* Add timestamp to key for immutable views ([439ef10](439ef109f3))
2024-06-11 09:50:57 +00:00
Deepesh Garg
144d7828e9 Merge pull request #41856 from frappe/mergify/bp/version-15/pr-41855
fix: Add timestamp to key for immutable views (#41852)
2024-06-11 15:17:29 +05:30
Deepesh Garg
439ef109f3 fix: Add timestamp to key for immutable views
(cherry picked from commit 6bded59f1c)
(cherry picked from commit 9e9bc8b59c)
2024-06-11 09:41:12 +00:00
Deepesh Garg
366f68e49c Merge pull request #41855 from frappe/mergify/bp/version-15-hotfix/pr-41852
fix: Add timestamp to key for immutable views (#41852)
2024-06-11 15:06:50 +05:30
Deepesh Garg
9e9bc8b59c fix: Add timestamp to key for immutable views
(cherry picked from commit 6bded59f1c)
2024-06-11 09:36:07 +00:00
ruthra kumar
75f3b47424 Merge pull request #41847 from frappe/mergify/bp/version-15-hotfix/pr-41707
refactor: add `Is opening` flag for payment entry (backport #41707)
2024-06-11 11:02:57 +05:30
ruthra kumar
acc2e88e7b Merge pull request #41846 from frappe/mergify/bp/version-15-hotfix/pr-41685
refactor: enabling partial TDS application on partial invoice (backport #41685)
2024-06-11 10:53:48 +05:30
ruthra kumar
818a553668 test: is_opening flag for advance in separate party account
(cherry picked from commit 17f968e1e1)
2024-06-11 04:57:07 +00:00
ruthra kumar
1fc802da6f refactor: restrict to 'Advance in Separate Party Account' type
(cherry picked from commit c36f0e4a33)
2024-06-11 04:57:07 +00:00
ruthra kumar
c664a27b1e refactor: is_opening in payment entry
(cherry picked from commit 05d17d0d73)
2024-06-11 04:57:07 +00:00
ruthra kumar
c0668373c7 refactor: enabling partial TDS application on partial invoice
(cherry picked from commit 091c5496b2)
2024-06-11 10:23:53 +05:30
ruthra kumar
45edc57af8 Merge pull request #41839 from frappe/mergify/bp/version-15-hotfix/pr-41793
fix: calculate totals and taxes (backport #41793)
2024-06-10 15:23:01 +05:30
Nihantra C. Patel
5544309048 fix: calculate totals and taxes
(cherry picked from commit a7ec0c1cec)
2024-06-10 09:49:03 +00:00
mergify[bot]
1ead66721d fix: terms and conditions for material request (backport #41834) (#41837)
fix: terms and conditions for material request (#41834)

(cherry picked from commit 4b026d66dc)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-10 15:17:19 +05:30
mergify[bot]
30c0b2bb54 fix: do not fetch items with no active BOM in PP (backport #41833) (#41835)
fix: do not fetch items with no active BOM in PP (#41833)

(cherry picked from commit 36413d14d8)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-10 15:16:57 +05:30
Frappe PR Bot
f2909e9784 chore(release): Bumped to Version 15.27.2
## [15.27.2](https://github.com/frappe/erpnext/compare/v15.27.1...v15.27.2) (2024-06-10)

### Bug Fixes

* Add additional condition application ([45c16f6](45c16f615c))
* fixing Item-wise sales register ([9a629f8](9a629f860c))
* fixing Item-wise sales register [#41373](https://github.com/frappe/erpnext/issues/41373) ([d75d64e](d75d64eb25))
* fixing Item-wise sales register and purchase register [#41373](https://github.com/frappe/erpnext/issues/41373) ([50ef81a](50ef81a997))
* Item-wise Sales and Purchase register with no item codes [#41373](https://github.com/frappe/erpnext/issues/41373) ([3e0123b](3e0123ba7b))
2024-06-10 04:54:40 +00:00
Deepesh Garg
cd478dd74f Merge pull request #41831 from frappe/mergify/bp/version-15/pr-41827
fix: Item-wise Sales and Purchase register with no item codes (#41424)
2024-06-10 10:23:23 +05:30
Deepesh Garg
14c98fe6f0 chore: resolve conflicts
(cherry picked from commit c29db5afcd)
2024-06-10 04:52:42 +00:00
Deepesh Garg
45c16f615c fix: Add additional condition application
(cherry picked from commit 8ec364df6f)

# Conflicts:
#	erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
(cherry picked from commit 1fca6ea5e7)
2024-06-10 04:52:42 +00:00
Deepesh Garg
7ca848c2db chore: update condition queries in qb
(cherry picked from commit d2af36e1eb)

# Conflicts:
#	erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
#	erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
(cherry picked from commit 209af58f83)
2024-06-10 04:52:41 +00:00
Poorvi-R-Bhat
d75d64eb25 fix: fixing Item-wise sales register #41373
(cherry picked from commit eafa88b8e9)

# Conflicts:
#	erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
(cherry picked from commit 5e0fa1b75e)
2024-06-10 04:52:41 +00:00
Poorvi-R-Bhat
50ef81a997 fix: fixing Item-wise sales register and purchase register #41373
(cherry picked from commit 76073ae228)

# Conflicts:
#	erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
(cherry picked from commit a4b28ba354)
2024-06-10 04:52:41 +00:00
Poorvi-R-Bhat
3e0123ba7b fix: Item-wise Sales and Purchase register with no item codes #41373
(cherry picked from commit 1b45ecfcae)

# Conflicts:
#	erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
#	erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
(cherry picked from commit 96405e8e49)
2024-06-10 04:52:41 +00:00
Poorvi
9a629f860c fix: fixing Item-wise sales register
(cherry picked from commit c90185f533)
(cherry picked from commit f36db7ebaf)
2024-06-10 04:52:41 +00:00
Deepesh Garg
873a0dd844 Merge pull request #41827 from frappe/mergify/bp/version-15-hotfix/pr-41424
fix: Item-wise Sales and Purchase register with no item codes (#41424)
2024-06-09 20:19:33 +05:30
Deepesh Garg
c29db5afcd chore: resolve conflicts 2024-06-09 20:02:39 +05:30
Deepesh Garg
1fca6ea5e7 fix: Add additional condition application
(cherry picked from commit 8ec364df6f)

# Conflicts:
#	erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
2024-06-09 06:13:28 +00:00
Deepesh Garg
209af58f83 chore: update condition queries in qb
(cherry picked from commit d2af36e1eb)

# Conflicts:
#	erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
#	erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
2024-06-09 06:13:28 +00:00
Poorvi-R-Bhat
5e0fa1b75e fix: fixing Item-wise sales register #41373
(cherry picked from commit eafa88b8e9)

# Conflicts:
#	erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
2024-06-09 06:13:28 +00:00
Poorvi-R-Bhat
a4b28ba354 fix: fixing Item-wise sales register and purchase register #41373
(cherry picked from commit 76073ae228)

# Conflicts:
#	erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
2024-06-09 06:13:27 +00:00
Poorvi-R-Bhat
96405e8e49 fix: Item-wise Sales and Purchase register with no item codes #41373
(cherry picked from commit 1b45ecfcae)

# Conflicts:
#	erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py
#	erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py
2024-06-09 06:13:27 +00:00
Poorvi
f36db7ebaf fix: fixing Item-wise sales register
(cherry picked from commit c90185f533)
2024-06-09 06:13:26 +00:00
mergify[bot]
a7971cf844 fix: stock_value_change for legacy serial nos (backport #41825) (#41826)
fix: stock_value_change for legacy serial nos (#41825)

(cherry picked from commit f6a4d391c0)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-07 23:05:50 +05:30
ruthra kumar
3f1d97259a Merge pull request #41823 from ruthra-kumar/enable_no_copy_for_timesheet
fix: enable no copy for timesheet in Sales Invoice
2024-06-07 20:24:44 +05:30
mergify[bot]
8d31243a42 fix: valuation rate for backdated legacy serial/batches (backport #41788) (#41821)
fix: valuation rate for backdated legacy serial/batches (#41788)

(cherry picked from commit 3956354e08)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-07 18:25:58 +05:30
ruthra kumar
f1ad0f6f26 fix: enable no_copy for timesheet in sales invoice 2024-06-07 16:50:21 +05:30
mergify[bot]
4d37739dd3 fix(Vehicle): allow doc renaming and add test (backport #41729) (#41785)
* fix(Vehicle): allow doc renaming and add test (#41729)

fix(Vehicle): allow renaming doc and add test

(cherry picked from commit c76f466528)

# Conflicts:
#	erpnext/setup/doctype/vehicle/vehicle.json

* fix: resolve conflicts for backporting

---------

Co-authored-by: Viny Selopal <52369157+vinyselopal@users.noreply.github.com>
Co-authored-by: Viny Selopal <viny0698@gmail.com>
2024-06-07 15:45:50 +05:30
mergify[bot]
4d3e883130 fix: typo in method - holiday list (backport #41811) (#41812)
fix: typo in method - holiday list (#41811)

(cherry picked from commit 699cfd85c6)

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-06-06 19:46:02 +05:30
Frappe PR Bot
df4307fef8 chore(release): Bumped to Version 15.27.1
## [15.27.1](https://github.com/frappe/erpnext/compare/v15.27.0...v15.27.1) (2024-06-06)

### Bug Fixes

* Add posting date to key for consolidated view ([edd4e67](edd4e674d3))
2024-06-06 12:20:49 +00:00
Deepesh Garg
6039fb75e7 Merge pull request #41810 from frappe/mergify/bp/version-15/pr-41809
fix: Add posting date to key for consolidated view (#41808)
2024-06-06 17:49:05 +05:30
Deepesh Garg
edd4e674d3 fix: Add posting date to key for consolidated view
(cherry picked from commit 2c164b47a1)
(cherry picked from commit 94720851c6)
2024-06-06 12:18:29 +00:00
Deepesh Garg
b4838ab098 Merge pull request #41802 from frappe/mergify/bp/version-15-hotfix/pr-41727
fix: Do no apply pricing rule on qty change for mapped docs (#41727)
2024-06-06 17:48:25 +05:30
Deepesh Garg
3507d2e37d Merge pull request #41809 from frappe/mergify/bp/version-15-hotfix/pr-41808
fix: Add posting date to key for consolidated view (#41808)
2024-06-06 17:47:35 +05:30
Deepesh Garg
94720851c6 fix: Add posting date to key for consolidated view
(cherry picked from commit 2c164b47a1)
2024-06-06 12:15:12 +00:00
ruthra kumar
08c06d1142 Merge pull request #41807 from frappe/mergify/bp/version-15-hotfix/pr-41804
chore: repost settings permission overhaul (backport #41804)
2024-06-06 16:34:28 +05:30
ruthra kumar
0e562e9933 chore: repost settings permission overhaul
(cherry picked from commit 458d8f5ed8)
2024-06-06 16:14:27 +05:30
Deepesh Garg
822bc581f3 fix: Do no apply pricing rule on qty change for mapped docs
(cherry picked from commit 2b1242170c)
2024-06-06 03:44:14 +00:00
Frappe PR Bot
dcdaa02173 chore(release): Bumped to Version 15.27.0
# [15.27.0](https://github.com/frappe/erpnext/compare/v15.26.1...v15.27.0) (2024-06-05)

### Bug Fixes

* Auditor permissions (backport [#41659](https://github.com/frappe/erpnext/issues/41659)) ([#41661](https://github.com/frappe/erpnext/issues/41661)) ([27f3981](27f3981269))
* bank account no fieldname mismatch (backport [#41778](https://github.com/frappe/erpnext/issues/41778)) ([#41783](https://github.com/frappe/erpnext/issues/41783)) ([b94a6f2](b94a6f2d5c))
* batch selection issue (backport [#41692](https://github.com/frappe/erpnext/issues/41692)) ([#41693](https://github.com/frappe/erpnext/issues/41693)) ([24775db](24775db97e))
* **Company:** Allow Equity type account in unrealised exchange gain/loss account (backport [#41740](https://github.com/frappe/erpnext/issues/41740)) ([#41747](https://github.com/frappe/erpnext/issues/41747)) ([460ee5d](460ee5d542))
* condition filter for transaction pricing rule ([e493b11](e493b11ae3))
* convert percentage from str to float (backport [#41766](https://github.com/frappe/erpnext/issues/41766)) ([#41776](https://github.com/frappe/erpnext/issues/41776)) ([cd0852f](cd0852f05d))
* Copy depreciation schedule on asset split only if it exists (backport [#41775](https://github.com/frappe/erpnext/issues/41775)) ([#41784](https://github.com/frappe/erpnext/issues/41784)) ([03bf480](03bf48032e))
* filtered out data having none values in date field (backport [#41457](https://github.com/frappe/erpnext/issues/41457)) ([#41765](https://github.com/frappe/erpnext/issues/41765)) ([97b1b7f](97b1b7f842))
* Filters in account balance report ([0b9d89b](0b9d89b966))
* French chart of account the 4191 code must be of type Income Account ([797b718](797b718e5a))
* get assets received but not billed account only if any asset item is received (backport [#41734](https://github.com/frappe/erpnext/issues/41734)) ([#41735](https://github.com/frappe/erpnext/issues/41735)) ([638c944](638c94451e))
* Ignore disabling default currency field while creating new company (backport [#41699](https://github.com/frappe/erpnext/issues/41699)) ([#41761](https://github.com/frappe/erpnext/issues/41761)) ([dc922ab](dc922abfbe))
* incorrect accumulated depr amount in asset depr ledger (backport [#41654](https://github.com/frappe/erpnext/issues/41654)) ([#41763](https://github.com/frappe/erpnext/issues/41763)) ([a93cd02](a93cd02d54))
* incorrect batch selection while sales return (backport [#41768](https://github.com/frappe/erpnext/issues/41768)) ([#41772](https://github.com/frappe/erpnext/issues/41772)) ([95c0dc9](95c0dc9b38))
* key error for stock ledger report (backport [#41700](https://github.com/frappe/erpnext/issues/41700)) ([#41703](https://github.com/frappe/erpnext/issues/41703)) ([b22d714](b22d714103))
* link opportunity in prospect after creating opportunity from prospect (backport [#41769](https://github.com/frappe/erpnext/issues/41769)) ([#41777](https://github.com/frappe/erpnext/issues/41777)) ([d30aee5](d30aee5dd6))
* local var referenced before assignment (backport [#41780](https://github.com/frappe/erpnext/issues/41780)) ([#41782](https://github.com/frappe/erpnext/issues/41782)) ([3777cae](3777cae860))
* **minor:** corrected wrong filter condition (backport [#41755](https://github.com/frappe/erpnext/issues/41755)) ([#41762](https://github.com/frappe/erpnext/issues/41762)) ([a67fa68](a67fa6863e))
* payment term when creating PO from SO (backport [#41376](https://github.com/frappe/erpnext/issues/41376)) ([#41744](https://github.com/frappe/erpnext/issues/41744)) ([806ff5b](806ff5bc19))
* Select both account number and company in the account form (backport [#41731](https://github.com/frappe/erpnext/issues/41731)) ([#41737](https://github.com/frappe/erpnext/issues/41737)) ([c5d72cd](c5d72cd934))
* show material to supplier button (backport [#41686](https://github.com/frappe/erpnext/issues/41686)) ([#41688](https://github.com/frappe/erpnext/issues/41688)) ([1a24914](1a24914aed))
* **stock settings:** Allowed any number in stock frozen upto days field (backport [#41736](https://github.com/frappe/erpnext/issues/41736)) ([#41749](https://github.com/frappe/erpnext/issues/41749)) ([278682f](278682f4df))
* test for pricing rule transaction with cond ([0823de8](0823de86ad))
* Transaction currency value in Journal Entry (backport [#41717](https://github.com/frappe/erpnext/issues/41717)) ([#41720](https://github.com/frappe/erpnext/issues/41720)) ([77f58ca](77f58caa93))
* TypeError: 'float' object is not iterable (backport [#41758](https://github.com/frappe/erpnext/issues/41758)) ([#41764](https://github.com/frappe/erpnext/issues/41764)) ([12addb7](12addb7565))
* Use full name instead of abbreviation ([#41759](https://github.com/frappe/erpnext/issues/41759)) ([5448d5d](5448d5d1cb))
* work order created message pops up if no items are selected (backport [#41677](https://github.com/frappe/erpnext/issues/41677)) ([#41682](https://github.com/frappe/erpnext/issues/41682)) ([4e9faf6](4e9faf6ad6))

### Features

* optional to reconcile all serial nos / batches in stock reconciliation (backport [#41696](https://github.com/frappe/erpnext/issues/41696)) ([#41713](https://github.com/frappe/erpnext/issues/41713)) ([38249f4](38249f4170))
2024-06-05 01:20:36 +00:00
ruthra kumar
cd511c5277 Merge pull request #41773 from frappe/version-15-hotfix
chore: release v15
2024-06-05 06:49:10 +05:30
mergify[bot]
03bf48032e fix: Copy depreciation schedule on asset split only if it exists (backport #41775) (#41784)
fix: Copy depreciation schedule on asset split only if it exists (#41775)

(cherry picked from commit 689e1cfc23)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-06-04 22:25:40 +05:30
mergify[bot]
b94a6f2d5c fix: bank account no fieldname mismatch (backport #41778) (#41783)
fix: bank account no fieldname mismatch (#41778)

(cherry picked from commit d163dbec7d)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-06-04 22:25:28 +05:30
mergify[bot]
3777cae860 fix: local var referenced before assignment (backport #41780) (#41782)
fix: local var referenced before assignment (#41780)

(cherry picked from commit 4ff3e6caaa)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-06-04 22:25:20 +05:30
mergify[bot]
a67fa6863e fix(minor): corrected wrong filter condition (backport #41755) (#41762)
* fix(minor): corrected wrong filter condition (#41755)

(cherry picked from commit 60eb03a6c6)

# Conflicts:
#	erpnext/assets/report/fixed_asset_register/fixed_asset_register.py

* fix: resolved conflict

---------

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-06-04 21:53:28 +05:30
mergify[bot]
cd0852f05d fix: convert percentage from str to float (backport #41766) (#41776)
fix: convert percentage from str to float (#41766)

(cherry picked from commit 71f5470dfd)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-06-04 21:50:28 +05:30
mergify[bot]
d30aee5dd6 fix: link opportunity in prospect after creating opportunity from prospect (backport #41769) (#41777)
fix: link opportunity in prospect after creating opportunity from prospect (#41769)

(cherry picked from commit 12e48f0b63)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-06-04 21:50:18 +05:30
mergify[bot]
12addb7565 fix: TypeError: 'float' object is not iterable (backport #41758) (#41764)
* fix: TypeError: 'float' object is not iterable (#41758)

(cherry picked from commit cf508ce1ed)

# Conflicts:
#	erpnext/manufacturing/doctype/bom_creator/bom_creator.py
#	erpnext/public/js/bom_configurator/bom_configurator.bundle.js

* chore: fix conflicts

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-04 14:54:34 +05:30
mergify[bot]
95c0dc9b38 fix: incorrect batch selection while sales return (backport #41768) (#41772)
fix: incorrect batch selection while sales return (#41768)

(cherry picked from commit cb6d8afa26)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-04 14:54:20 +05:30
mergify[bot]
97b1b7f842 fix: filtered out data having none values in date field (backport #41457) (#41765)
* fix: filtered out data having none values in date field

(cherry picked from commit 3bd455ac85)

* style: code optimization

(cherry picked from commit a36b7fb95a)

---------

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-06-04 12:21:16 +05:30
mergify[bot]
27f3981269 fix: Auditor permissions (backport #41659) (#41661)
* fix: allow Auditor to select a company

(cherry picked from commit 06401cc84f)

* fix: allow Auditor to read a Fiscal Year

(cherry picked from commit eaa4efbc45)

---------

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
2024-06-04 12:19:36 +05:30
mergify[bot]
77f58caa93 fix: Transaction currency value in Journal Entry (backport #41717) (#41720)
fix: Transaction currency value in Journal Entry

(cherry picked from commit 169d77da54)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2024-06-04 12:18:28 +05:30
mergify[bot]
a93cd02d54 fix: incorrect accumulated depr amount in asset depr ledger (backport #41654) (#41763)
fix: incorrect accumulated depr amount in asset depr ledger (#41654)

* fix: incorrect accumulated depr amount in asset depr ledger

* refactor: depreciation amount retrieval with query builder

* style: apply formatting changes from pre-commit

(cherry picked from commit a8fc32dc32)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-06-04 12:03:55 +05:30
mergify[bot]
dc922abfbe fix: Ignore disabling default currency field while creating new company (backport #41699) (#41761)
fix: Ignore disabling default currency field while creating new company (#41699)

(cherry picked from commit 80f6228d45)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-06-04 11:55:35 +05:30
Nabin Hait
5448d5d1cb fix: Use full name instead of abbreviation (#41759) 2024-06-04 11:41:30 +05:30
mergify[bot]
278682f4df fix(stock settings): Allowed any number in stock frozen upto days field (backport #41736) (#41749)
fix(stock settings): Allowed any number in stock frozen upto days field (#41736)

(cherry picked from commit 740c495014)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-06-04 11:22:32 +05:30
mergify[bot]
460ee5d542 fix(Company): Allow Equity type account in unrealised exchange gain/loss account (backport #41740) (#41747)
fix(Company): Allow Equity type account in unrealised exchange gain/loss account (#41740)

(cherry picked from commit d30c797d24)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-06-03 18:38:25 +05:30
mergify[bot]
806ff5bc19 fix: payment term when creating PO from SO (backport #41376) (#41744)
fix: payment term when creating PO from SO (#41376)

* fix: payment term when creating PO from SO

* fix: payment term when creating PO from SO

* fix: payment term when creating PO from SO

* fix: payment term when creating PO from SO

(cherry picked from commit 441596f795)

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-06-03 18:37:39 +05:30
mergify[bot]
c5d72cd934 fix: Select both account number and company in the account form (backport #41731) (#41737)
fix: Select both account number and company in the account form (#41731)

* fix: Both the account number and the company should be selected in the account form

* fix: select both account number and company in the account form

(cherry picked from commit 5a75c847fe)

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-06-03 18:36:58 +05:30
ruthra kumar
dd0cd8c4f8 Merge pull request #41746 from frappe/mergify/bp/version-15-hotfix/pr-41742
chore: System Manager should have  submit permission for repost doctypes (backport #41742)
2024-06-03 18:33:44 +05:30
ruthra kumar
d5158c6062 chore: Sys Manager shluld have submit permission for repost doctypes
(cherry picked from commit 4558f64c0f)
2024-06-03 12:21:05 +00:00
Nihantra C. Patel
a3444a07b7 fix: completed DC will not appear in a delivery trip (#41655)
* fix: completed DC will not appear in a delivery trip

* fix: completed DC will not appear in a delivery trip

(cherry picked from commit 4f0214d00e)

# Conflicts:
#	erpnext/stock/doctype/delivery_note/delivery_note.js
2024-06-03 11:57:39 +00:00
mergify[bot]
638c94451e fix: get assets received but not billed account only if any asset item is received (backport #41734) (#41735)
fix: get assets received but not billed account only if any asset item is received (#41734)

fix: get assets received but not billed account only if any asset item received
(cherry picked from commit 39885b2b01)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-06-03 16:18:29 +05:30
Nihantra C. Patel
2104d903aa fix: correcting balance sheet calculation for zero liabilities and equity (#41497)
* fix: correcting balance sheet calculation for zero liabilities and equity

* fix: correcting balance sheet calculation for zero liabilities and equity

(cherry picked from commit 3c3313594d)

# Conflicts:
#	erpnext/accounts/report/balance_sheet/balance_sheet.py
2024-06-03 10:36:56 +00:00
ruthra kumar
8ff5a67b99 Merge pull request #41714 from frappe/mergify/bp/version-15-hotfix/pr-41658
fix: condition-wise filter for transaction based pricing rule (backport #41658)
2024-06-01 18:31:11 +05:30
mergify[bot]
38249f4170 feat: optional to reconcile all serial nos / batches in stock reconciliation (backport #41696) (#41713)
* feat: optional to reconcile all serial nos / batches in stock reconciliation (#41696)

feat: optional to reconcile all serial/batch
(cherry picked from commit ee846f5950)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-06-01 18:30:33 +05:30
Dany Robert
0823de86ad fix: test for pricing rule transaction with cond
(cherry picked from commit 3f2343614b)
2024-06-01 12:45:20 +00:00
Dany Robert
e493b11ae3 fix: condition filter for transaction pricing rule
(cherry picked from commit e3fd82766f)
2024-06-01 12:45:19 +00:00
ruthra kumar
f73737db50 Merge pull request #41706 from frappe/mergify/bp/version-15-hotfix/pr-41232
fix: French chart of account the 4191 code must be of type Income Account (backport #41232)
2024-06-01 16:06:59 +05:30
Deepesh Garg
8d997c6703 Merge pull request #41678 from frappe/mergify/bp/version-15-hotfix/pr-41676
fix: Filters in account balance report (#41676)
2024-05-31 20:02:20 +05:30
Florian HENRY
797b718e5a fix: French chart of account the 4191 code must be of type Income Account
(cherry picked from commit 72057adc94)
2024-05-31 09:56:01 +00:00
mergify[bot]
b22d714103 fix: key error for stock ledger report (backport #41700) (#41703)
fix: key error for stock ledger report (#41700)

(cherry picked from commit 4e37ed9033)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-31 12:22:07 +05:30
Frappe PR Bot
55121a22a5 chore(release): Bumped to Version 15.26.1
## [15.26.1](https://github.com/frappe/erpnext/compare/v15.26.0...v15.26.1) (2024-05-30)

### Bug Fixes

* batch selection issue (backport [#41692](https://github.com/frappe/erpnext/issues/41692)) (backport [#41693](https://github.com/frappe/erpnext/issues/41693)) ([#41694](https://github.com/frappe/erpnext/issues/41694)) ([64835b9](64835b99ec))
2024-05-30 13:57:20 +00:00
mergify[bot]
64835b99ec fix: batch selection issue (backport #41692) (backport #41693) (#41694)
fix: batch selection issue (backport #41692) (#41693)

fix: batch selection issue (#41692)

(cherry picked from commit 968120d0eb)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-05-30 19:26:02 +05:30
mergify[bot]
4e9faf6ad6 fix: work order created message pops up if no items are selected (backport #41677) (#41682)
fix: work order created message pops up if no items are selected (#41677)

(cherry picked from commit 388ba7f945)

Co-authored-by: Nijith anil <83776819+nijithanil@users.noreply.github.com>
2024-05-30 18:51:26 +05:30
mergify[bot]
24775db97e fix: batch selection issue (backport #41692) (#41693)
fix: batch selection issue (#41692)

(cherry picked from commit 968120d0eb)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-30 18:49:12 +05:30
mergify[bot]
1a24914aed fix: show material to supplier button (backport #41686) (#41688)
fix: show material to supplier button (#41686)

(cherry picked from commit be9f960705)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-30 16:13:53 +05:30
Frappe PR Bot
56d83d44be chore(release): Bumped to Version 15.26.0
# [15.26.0](https://github.com/frappe/erpnext/compare/v15.25.0...v15.26.0) (2024-05-29)

### Bug Fixes

* add in some indices to speed up Purchase Order deletion ([3ed3b21](3ed3b214c8))
* cost center filter according to the company in project ([193b844](193b844bf1))
* cost center filter according to the company in project ([e6aaab3](e6aaab38b0))
* cost center filter according to the company in project ([563e15e](563e15e1c8))
* multiple issues related to serial and batch bundle (backport [#41662](https://github.com/frappe/erpnext/issues/41662)) ([#41668](https://github.com/frappe/erpnext/issues/41668)) ([dc0bb22](dc0bb220ed))
* not allow template item in product bundle item ([8fb3294](8fb3294674))
* not allow template item in product bundle item ([b64f5a4](b64f5a4e54))
* not allow template item in product bundle item - v15/v14 ([9864377](9864377b47))
* opening stock not showing in the stock ledger report for the bat… (backport [#41584](https://github.com/frappe/erpnext/issues/41584)) ([#41590](https://github.com/frappe/erpnext/issues/41590)) ([162ec7d](162ec7d6e8))
* SCR batch qty issue (backport [#41595](https://github.com/frappe/erpnext/issues/41595)) ([#41599](https://github.com/frappe/erpnext/issues/41599)) ([17ea958](17ea958170))
* set expense account as Assets RBNB only if it is booked in linked PR (backport [#41368](https://github.com/frappe/erpnext/issues/41368)) ([#41673](https://github.com/frappe/erpnext/issues/41673)) ([0a0970e](0a0970e0e7))
* Unable to 'Get Suppliers' using tags in Request for Quotation (backport [#41626](https://github.com/frappe/erpnext/issues/41626)) ([#41627](https://github.com/frappe/erpnext/issues/41627)) ([ca855e8](ca855e8ab8))

### Features

* Add Party details to Serial No Ledger Report ([#41656](https://github.com/frappe/erpnext/issues/41656)) ([7462de6](7462de66ce))

### Performance Improvements

* sales order UI render (backport [#41591](https://github.com/frappe/erpnext/issues/41591)) ([#41592](https://github.com/frappe/erpnext/issues/41592)) ([09d112a](09d112a061))
2024-05-29 07:54:16 +00:00
ruthra kumar
e940d13068 Merge pull request #41666 from frappe/version-15-hotfix
chore: release v15
2024-05-29 13:22:52 +05:30
Deepesh Garg
0b9d89b966 fix: Filters in account balance report
(cherry picked from commit 1c9fe691ea)
2024-05-29 07:20:47 +00:00
mergify[bot]
0a0970e0e7 fix: set expense account as Assets RBNB only if it is booked in linked PR (backport #41368) (#41673)
fix: set expense account as Assets RBNB only if it is booked in linked PR (#41368)

* fix: set expense account as Assets RBNB only if it is booked in linked PR

* fix: broken translations

(cherry picked from commit 014486de39)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-05-29 11:07:07 +05:30
Deepesh Garg
d29686f882 Merge pull request #41375 from Nihantra-Patel/no_add_variant_item_15-14
fix: not allow template item in product bundle item - v15/v14
2024-05-29 10:30:47 +05:30
mergify[bot]
dc0bb220ed fix: multiple issues related to serial and batch bundle (backport #41662) (#41668)
* fix: multiple issues related to serial and batch bundle (#41662)

(cherry picked from commit ce834f5dba)

# Conflicts:
#	erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
#	erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json

* chore: fix conflicts

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-28 21:57:13 +05:30
Marica
2e8ae4dc30 Merge pull request #41667 from frappe/mergify/bp/version-15-hotfix/pr-41656
feat: Add Party details to Serial No Ledger Report (backport #41656)
2024-05-28 16:36:44 +05:30
Marica
7462de66ce feat: Add Party details to Serial No Ledger Report (#41656)
- Since no party details are present in Serial No anymore, it is hard to get a view of which SN was sold to/purchased from which party
- Add Party fields to report

(cherry picked from commit e3cf53a8b7)
2024-05-28 09:59:35 +00:00
ruthra kumar
c8098e9691 Merge pull request #41649 from frappe/mergify/bp/version-15-hotfix/pr-41401
fix: cost center filter according to the company in project (backport #41401)
2024-05-27 10:42:09 +05:30
Nihantra C. Patel
193b844bf1 fix: cost center filter according to the company in project
(cherry picked from commit 501c6aa126)
2024-05-27 04:41:12 +00:00
Nihantra C. Patel
e6aaab38b0 fix: cost center filter according to the company in project
(cherry picked from commit cfde8088b4)
2024-05-27 04:41:12 +00:00
Nihantra C. Patel
563e15e1c8 fix: cost center filter according to the company in project
(cherry picked from commit 249e8264dd)
2024-05-27 04:41:11 +00:00
mergify[bot]
ca855e8ab8 fix: Unable to 'Get Suppliers' using tags in Request for Quotation (backport #41626) (#41627)
fix: Unable to 'Get Suppliers' using tags in Request for Quotation (#41626)

(cherry picked from commit 683c1f04c8)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-24 13:09:15 +05:30
Akhil Narang
7a0aef218f Merge pull request #41625 from frappe/mergify/bp/version-15-hotfix/pr-41601
fix: add in some indices to speed up Purchase Order deletion (backport #41601)
2024-05-24 12:27:29 +05:30
Akhil Narang
8f24fd6a60 Merge pull request #41611 from frappe/mergify/bp/version-15-hotfix/pr-41609
refactor: use `json` directly instead of using `frappe.json` (backport #41609)
2024-05-24 11:07:12 +05:30
Akhil Narang
c68afbc715 chore: resolve conflicts 2024-05-24 11:05:59 +05:30
Akhil Narang
3ed3b214c8 fix: add in some indices to speed up Purchase Order deletion
`tabSales Order`.`inter_company_order_reference`
`tabSales Invoice Item`.`purchase_order`

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

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
2024-05-24 05:28:24 +00:00
ruthra kumar
26569742fd Merge pull request #41605 from frappe/mergify/bp/version-15-hotfix/pr-41603
refactor: remove 'format:' based naming in internal doctypes (backport #41603)
2024-05-24 10:54:55 +05:30
ruthra kumar
d96c5885a3 Merge pull request #41607 from frappe/mergify/bp/version-15-hotfix/pr-41594
refactor: 'Payment Period Based On Invoice Date' report (backport #41594)
2024-05-24 10:53:51 +05:30
Akhil Narang
7af1b5d4ec refactor: use json directly instead of using frappe.json (#41609)
(cherry picked from commit 3f06f1905f)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-05-24 10:51:09 +05:30
ruthra kumar
1ad2f06500 chore: resolve conflicts 2024-05-23 17:49:05 +05:30
ruthra kumar
22dd642413 refactor: replace against_voucher with against_voucher_no
(cherry picked from commit c4e2abb973)
2024-05-23 12:16:51 +00:00
ruthra kumar
37c90ef873 refactor: remove debit and credit
(cherry picked from commit 014b542cf3)
2024-05-23 12:16:50 +00:00
ruthra kumar
e0cb3ecc0f refactor: query payment ledger for payments
(cherry picked from commit cb3c20dcd3)
2024-05-23 12:16:50 +00:00
ruthra kumar
3176bb480f refactor: remove 'format:' based naming in internal doctypes
(cherry picked from commit e2ec3e453a)

# Conflicts:
#	erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.json
#	erpnext/accounts/doctype/repost_payment_ledger/repost_payment_ledger.json
2024-05-23 12:15:33 +00:00
mergify[bot]
17ea958170 fix: SCR batch qty issue (backport #41595) (#41599)
fix: SCR batch qty issue (#41595)

(cherry picked from commit 418439b58f)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-23 16:30:30 +05:30
Akhil Narang
c16debb8ee Merge pull request #41596 from frappe/mergify/bp/version-15-hotfix/pr-41576
chore: sync ruff config with framework (backport #41576)
2024-05-23 14:15:08 +05:30
Ankush Menat
58feaf1f4a ci: ruff only fix imports
(cherry picked from commit 85b1a8001b)
2024-05-23 07:22:22 +00:00
Ankush Menat
dc813ddaec ci: dont auto apply fixes
I've personally encountered ~5 instances of bad auto fixes, let
developers apply the fixes.

(cherry picked from commit 3b4913ec81)
2024-05-23 07:22:22 +00:00
mergify[bot]
09d112a061 perf: sales order UI render (backport #41591) (#41592)
perf: sales order UI render (#41591)

(cherry picked from commit ad817cddad)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-23 11:50:34 +05:30
mergify[bot]
162ec7d6e8 fix: opening stock not showing in the stock ledger report for the bat… (backport #41584) (#41590)
fix: opening stock not showing in the stock ledger report for the bat… (#41584)

fix: opening stock not showing in the stock ledger report for the batch filter
(cherry picked from commit 04a49cef24)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-22 19:58:27 +05:30
Frappe PR Bot
a3fdfba46f chore(release): Bumped to Version 15.25.0
# [15.25.0](https://github.com/frappe/erpnext/compare/v15.24.1...v15.25.0) (2024-05-22)

### Bug Fixes

* added validation message for low gross purchase amount (backport [#41502](https://github.com/frappe/erpnext/issues/41502)) ([#41553](https://github.com/frappe/erpnext/issues/41553)) ([89ba7a2](89ba7a22fb))
* Auto reconcile only after selecting bank account (backport [#41489](https://github.com/frappe/erpnext/issues/41489)) ([#41554](https://github.com/frappe/erpnext/issues/41554)) ([33eb251](33eb251727))
* bold total in exponential smoothing forecasting (backport [#41393](https://github.com/frappe/erpnext/issues/41393)) ([#41404](https://github.com/frappe/erpnext/issues/41404)) ([8101b51](8101b51899))
* BOM creator validation for parent row no (backport [#41413](https://github.com/frappe/erpnext/issues/41413)) ([#41558](https://github.com/frappe/erpnext/issues/41558)) ([953de99](953de995bc))
* convert invoice_portion value from str to float (backport [#41485](https://github.com/frappe/erpnext/issues/41485)) ([#41555](https://github.com/frappe/erpnext/issues/41555)) ([0a36139](0a36139ef4))
* correct report name in inner button (backport [#41568](https://github.com/frappe/erpnext/issues/41568)) ([#41572](https://github.com/frappe/erpnext/issues/41572)) ([4ccc426](4ccc426fec))
* create custom field for accounting dimensions only if the field not exists already ([#41557](https://github.com/frappe/erpnext/issues/41557)) ([68fa55c](68fa55ca02))
* Deadlock on submitting Sales Invoice (backport [#41417](https://github.com/frappe/erpnext/issues/41417)) ([#41562](https://github.com/frappe/erpnext/issues/41562)) ([49db19d](49db19d57a))
* Demo data clearing ([46ec61f](46ec61f0c9))
* Filters in trend reports ([52d5d7a](52d5d7a4d3))
* job card time logs overlap issue (backport [#41567](https://github.com/frappe/erpnext/issues/41567)) ([#41571](https://github.com/frappe/erpnext/issues/41571)) ([6554f19](6554f192fb))
* minor Dr and Cr between Purchase Receipt and Purchase Invoice ([3872cdc](3872cdc54a))
* not able to delete line items in the subcontracting receipt (backport [#41569](https://github.com/frappe/erpnext/issues/41569)) ([#41570](https://github.com/frappe/erpnext/issues/41570)) ([26c3235](26c3235bf9))
* not able to submit landed cost voucher (backport [#41481](https://github.com/frappe/erpnext/issues/41481)) ([#41486](https://github.com/frappe/erpnext/issues/41486)) ([a070ad7](a070ad786d))
* possible sql error on General Ledger ([e0a0cb7](e0a0cb7b25))
* print format bold for field "total" ([e36880d](e36880da2d))
* priority not working for multiple pricing rules (backport [#41516](https://github.com/frappe/erpnext/issues/41516)) ([#41525](https://github.com/frappe/erpnext/issues/41525)) ([5fd68f9](5fd68f9fcb))
* Show acheived amount and variance for parent item groups (backport [#41495](https://github.com/frappe/erpnext/issues/41495)) ([#41551](https://github.com/frappe/erpnext/issues/41551)) ([5e0bff3](5e0bff3a60))
* stock levels for batch (backport [#41494](https://github.com/frappe/erpnext/issues/41494)) ([#41501](https://github.com/frappe/erpnext/issues/41501)) ([938888c](938888cddd))
* timeout error while submitting purchase invoice (backport [#41520](https://github.com/frappe/erpnext/issues/41520)) ([#41522](https://github.com/frappe/erpnext/issues/41522)) ([fcd9f89](fcd9f89dee))
* typerror on hide_fields ([8ae9da5](8ae9da5484))
* Unable to add items in POS Invoice ([a90186f](a90186f9ae))
* validate reorder group warehouse (backport [#41478](https://github.com/frappe/erpnext/issues/41478)) ([#41480](https://github.com/frappe/erpnext/issues/41480)) ([a1ce514](a1ce514cf3))
* valuation rate for legacy serial nos (backport [#41543](https://github.com/frappe/erpnext/issues/41543)) ([#41545](https://github.com/frappe/erpnext/issues/41545)) ([f121b33](f121b33e29))

### Features

* Config to enable immutable ledger ([32c935b](32c935bc30))
* enter serial range in Serial/Batch Selector (backport [#41530](https://github.com/frappe/erpnext/issues/41530)) ([#41534](https://github.com/frappe/erpnext/issues/41534)) ([7225347](7225347387))
2024-05-22 08:49:10 +00:00
ruthra kumar
1b4987c5b4 Merge pull request #41574 from frappe/version-15-hotfix
chore: release v15
2024-05-22 14:17:49 +05:30
mergify[bot]
5e0bff3a60 fix: Show acheived amount and variance for parent item groups (backport #41495) (#41551)
fix: Show achieved amount and variance for parent item groups

(cherry picked from commit 8ac11ae88d)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-05-21 18:02:37 +05:30
mergify[bot]
6554f192fb fix: job card time logs overlap issue (backport #41567) (#41571)
* fix: job card time logs overlap issue (#41567)

(cherry picked from commit ac4bcd5ca7)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-21 15:01:45 +05:30
mergify[bot]
4ccc426fec fix: correct report name in inner button (backport #41568) (#41572)
fix: correct report name in inner button (#41568)

Previously, the report name was incorrectly listed as "Cash Flow Statement" instead of "Cash Flow". This mismatch caused the "Cash Flow" report to not open correctly in the chart of accounts tree view, as the report ID is "Cash Flow".

(cherry picked from commit d7df2cbdc5)

Co-authored-by: jabir-elat <44110258+jabir-elat@users.noreply.github.com>
2024-05-21 14:44:03 +05:30
mergify[bot]
26c3235bf9 fix: not able to delete line items in the subcontracting receipt (backport #41569) (#41570)
fix: not able to delete line items in the subcontracting receipt (#41569)

(cherry picked from commit 4261c3474b)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-21 14:41:13 +05:30
Nabin Hait
68fa55ca02 fix: create custom field for accounting dimensions only if the field not exists already (#41557) 2024-05-21 12:21:15 +05:30
mergify[bot]
49db19d57a fix: Deadlock on submitting Sales Invoice (backport #41417) (#41562)
fix: Deadlock on submitting Sales Invoice (#41417)

(cherry picked from commit 4e4c1e4bef)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-21 11:10:26 +05:30
mergify[bot]
953de995bc fix: BOM creator validation for parent row no (backport #41413) (#41558)
fix: BOM creator validation for parent row no (#41413)

fix: bom creator valiation for parent row no
(cherry picked from commit ae3f5a38e1)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-20 19:42:54 +05:30
mergify[bot]
0a36139ef4 fix: convert invoice_portion value from str to float (backport #41485) (#41555)
fix: convert invoice_portion value from str to float (#41485)

(cherry picked from commit a1d489195d)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-05-20 18:36:48 +05:30
mergify[bot]
33eb251727 fix: Auto reconcile only after selecting bank account (backport #41489) (#41554)
fix: Auto reconcile only after selecting bank account (#41489)

(cherry picked from commit f24d61daea)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2024-05-20 18:36:38 +05:30
mergify[bot]
89ba7a22fb fix: added validation message for low gross purchase amount (backport #41502) (#41553)
fix: added validation message for low gross purchase amount

(cherry picked from commit 8a30701893)

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
2024-05-20 18:36:26 +05:30
Frappe PR Bot
b1d345ba0b chore(release): Bumped to Version 15.24.1
## [15.24.1](https://github.com/frappe/erpnext/compare/v15.24.0...v15.24.1) (2024-05-20)

### Bug Fixes

* valuation rate for legacy serial nos (backport [#41543](https://github.com/frappe/erpnext/issues/41543)) (backport [#41545](https://github.com/frappe/erpnext/issues/41545)) ([#41546](https://github.com/frappe/erpnext/issues/41546)) ([4ddd6e6](4ddd6e685b))
2024-05-20 10:22:57 +00:00
mergify[bot]
4ddd6e685b fix: valuation rate for legacy serial nos (backport #41543) (backport #41545) (#41546)
fix: valuation rate for legacy serial nos (backport #41543) (#41545)

fix: valuation rate for legacy serial nos (#41543)

fix: valuation rate for serial nos
(cherry picked from commit 214b38f7c8)

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-05-20 15:51:42 +05:30
ruthra kumar
a853f6add8 Merge pull request #41547 from frappe/mergify/bp/version-15-hotfix/pr-41492
refactor: For advances booked in Separate account, reconciliation date can be configured (backport #41492)
2024-05-20 15:17:38 +05:30
ruthra kumar
6c455be6a7 test: reconciliation date for advance payments
(cherry picked from commit 30aa4e031d)
2024-05-20 09:30:14 +00:00
ruthra kumar
53e5fc16d5 refactor: enable no-copy on advance payment flags
(cherry picked from commit cafa2f52e5)
2024-05-20 09:30:14 +00:00
ruthra kumar
349caf895b chore: better description
(cherry picked from commit 000c1b49dc)
2024-05-20 09:30:14 +00:00
ruthra kumar
2b307ff526 refactor: advance payments, allow configurable reconciliation date
(cherry picked from commit 070e2d4d26)
2024-05-20 09:30:13 +00:00
mergify[bot]
f121b33e29 fix: valuation rate for legacy serial nos (backport #41543) (#41545)
fix: valuation rate for legacy serial nos (#41543)

fix: valuation rate for serial nos
(cherry picked from commit 214b38f7c8)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-20 13:57:40 +05:30
ruthra kumar
0d55a25e6c Merge pull request #41544 from ruthra-kumar/fix_filters_in_trends_reports
fix: Filters in trend reports
2024-05-20 11:10:24 +05:30
ruthra kumar
52d5d7a4d3 fix: Filters in trend reports 2024-05-20 10:36:42 +05:30
ruthra kumar
e5e1aadc9a Merge pull request #41526 from frappe/mergify/bp/version-15-hotfix/pr-41523
fix: minor Dr and Cr between Purchase Receipt and Purchase Invoice (backport #41523)
2024-05-20 09:17:25 +05:30
ruthra kumar
3872cdc54a fix: minor Dr and Cr between Purchase Receipt and Purchase Invoice 2024-05-20 08:31:12 +05:30
SelenSoft
c609436283 chore: Update turkish translations (#41286) 2024-05-19 15:30:17 +02:00
ruthra kumar
6052e37fc2 Merge pull request #41531 from frappe/mergify/bp/version-15-hotfix/pr-41529
refactor: ignore internal doctypes on Dunning cancellation (backport #41529)
2024-05-18 13:37:35 +05:30
mergify[bot]
7225347387 feat: enter serial range in Serial/Batch Selector (backport #41530) (#41534)
feat: enter serial range in Serial/Batch Selector (#41530)

* feat: util for generating serial nos from range string

* feat: enter serial range in Serial/Batch Selector

(cherry picked from commit 7b9fd394b0)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2024-05-18 10:39:21 +05:30
mergify[bot]
5fd68f9fcb fix: priority not working for multiple pricing rules (backport #41516) (#41525)
* fix: priority not working for multiple pricing rules (#41516)

(cherry picked from commit 5cf5b18aea)

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

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-18 07:18:06 +05:30
ruthra kumar
97e6415afa refactor: ignore internal doctypes on Dunning cancellation
(cherry picked from commit 63c2cf13fd)
2024-05-17 15:31:36 +00:00
mergify[bot]
fcd9f89dee fix: timeout error while submitting purchase invoice (backport #41520) (#41522)
fix: timeout error while submitting purchase invoice (#41520)

(cherry picked from commit 61a4188440)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-17 16:56:11 +05:30
ruthra kumar
2bac4b1681 Merge pull request #41519 from frappe/mergify/bp/version-15-hotfix/pr-41517
fix: typerror on hide_fields (backport #41517)
2024-05-17 14:52:55 +05:30
ruthra kumar
8ae9da5484 fix: typerror on hide_fields
(cherry picked from commit deb9766f2a)
2024-05-17 09:20:33 +00:00
ruthra kumar
2f2615f9e2 Merge pull request #41513 from frappe/mergify/bp/version-15-hotfix/pr-41511
fix: possible sql error on General Ledger (backport #41511)
2024-05-17 11:11:59 +05:30
Frappe PR Bot
9b7bda958b chore(release): Bumped to Version 15.24.0
# [15.24.0](https://github.com/frappe/erpnext/compare/v15.23.3...v15.24.0) (2024-05-17)

### Features

* Config to enable immutable ledger ([68faf57](68faf575db))
2024-05-17 05:27:58 +00:00
Deepesh Garg
8c8b22bc61 Merge pull request #41509 from frappe/mergify/bp/version-15-hotfix/pr-41451
fix: Demo data clearing (#41451)
2024-05-17 10:57:01 +05:30
ruthra kumar
e0a0cb7b25 fix: possible sql error on General Ledger
(cherry picked from commit 76131f8e10)
2024-05-17 05:26:55 +00:00
Deepesh Garg
00144c92af Merge pull request #41508 from frappe/mergify/bp/version-15/pr-41438
feat: Config to enable immutable ledger
2024-05-17 10:56:45 +05:30
Deepesh Garg
7cbe03174f chore: resolve conflicts 2024-05-17 10:37:32 +05:30
Deepesh Garg
46ec61f0c9 fix: Demo data clearing
(cherry picked from commit d6fe220fab)
2024-05-17 03:47:50 +00:00
Deepesh Garg
e14d4e839f Merge pull request #41505 from frappe/mergify/bp/version-15-hotfix/pr-41504
fix: Unable to add items in POS Invoice (#41504)
2024-05-17 09:15:01 +05:30
Deepesh Garg
ce60b77fa5 chore: Resolve conflicts
(cherry picked from commit 9315607ee7)

# Conflicts:
#	erpnext/accounts/doctype/accounts_settings/accounts_settings.json
2024-05-17 03:42:44 +00:00
Deepesh Garg
f09a6d76a7 chore: Resolve conflicts
(cherry picked from commit 983c55eca1)
2024-05-17 03:42:43 +00:00
Deepesh Garg
68faf575db feat: Config to enable immutable ledger
(cherry picked from commit d56f52b0ba)

# Conflicts:
#	erpnext/accounts/doctype/accounts_settings/accounts_settings.json
#	erpnext/accounts/general_ledger.py
(cherry picked from commit 32c935bc30)

# Conflicts:
#	erpnext/accounts/doctype/accounts_settings/accounts_settings.json
2024-05-17 03:42:43 +00:00
Deepesh Garg
e1f8148129 Merge pull request #41438 from frappe/mergify/bp/version-15-hotfix/pr-41429
feat: Config to enable immutable ledger (#41429)
2024-05-17 09:11:24 +05:30
Deepesh Garg
414a91187f Merge branch 'version-15-hotfix' into mergify/bp/version-15-hotfix/pr-41429 2024-05-16 21:02:55 +05:30
Deepesh Garg
9315607ee7 chore: Resolve conflicts 2024-05-16 20:59:47 +05:30
Deepesh Garg
983c55eca1 chore: Resolve conflicts 2024-05-16 20:27:50 +05:30
Deepesh Garg
a90186f9ae fix: Unable to add items in POS Invoice
(cherry picked from commit 7a3f8a5afb)
2024-05-16 14:02:49 +00:00
mergify[bot]
938888cddd fix: stock levels for batch (backport #41494) (#41501)
fix: stock levels for batch (#41494)

(cherry picked from commit 500c546691)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-16 16:33:02 +05:30
mergify[bot]
7620ae203e chore(BOM Explorer): display items in the same order as in the BOM (backport #41496) (#41498)
chore(BOM Explorer): display items in the same order as in the BOM (#41496)

(cherry picked from commit bd381cc0c6)

Co-authored-by: Samuel Danieli <23150094+scdanieli@users.noreply.github.com>
2024-05-16 15:59:06 +05:30
ruthra kumar
2e6c8632a1 Merge pull request #41499 from frappe/mergify/bp/version-15-hotfix/pr-40072
fix: print format bold for field "total" (backport #40072)
2024-05-16 15:32:17 +05:30
Nihantra C. Patel
e36880da2d fix: print format bold for field "total"
(cherry picked from commit 3c9640df27)
2024-05-16 09:50:48 +00:00
mergify[bot]
8101b51899 fix: bold total in exponential smoothing forecasting (backport #41393) (#41404)
fix: bold total in exponential smoothing forecasting (#41393)

* fix: bold total in exponential smoothing forecasting

* fix: bold total in exponential smoothing forecasting

(cherry picked from commit ba60b5911a)

Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com>
2024-05-16 15:14:43 +05:30
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
mergify[bot]
a070ad786d 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>
2024-05-15 18:05:39 +05:30
mergify[bot]
a1ce514cf3 fix: validate reorder group warehouse (backport #41478) (#41480)
fix: validate reorder group warehouse (#41478)

(cherry picked from commit 0363afcfd0)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2024-05-15 15:15:24 +05:30
barredterra
cef6d0d74d fix(Delivery Note): only show permitted actions
(cherry picked from commit 418bdc1dcc)
2024-05-13 13:43:05 +00:00
barredterra
a0011c5b52 fix(Sales Order): only show permitted actions
(cherry picked from commit c29d955371)
2024-05-13 13:43:05 +00:00
Deepesh Garg
32c935bc30 feat: Config to enable immutable ledger
(cherry picked from commit d56f52b0ba)

# Conflicts:
#	erpnext/accounts/doctype/accounts_settings/accounts_settings.json
#	erpnext/accounts/general_ledger.py
2024-05-13 12:14:15 +00:00
Nihantra C. Patel
8fb3294674 fix: not allow template item in product bundle item 2024-05-08 10:40:24 +05:30
Nihantra C. Patel
b64f5a4e54 fix: not allow template item in product bundle item 2024-05-08 10:38:58 +05:30
Nihantra C. Patel
9864377b47 fix: not allow template item in product bundle item - v15/v14 2024-05-08 10:32:28 +05:30
407 changed files with 18561 additions and 4293 deletions

View File

@@ -59,12 +59,14 @@ repos:
rev: v0.2.0
hooks:
- id: ruff
name: "Run ruff linter and apply fixes"
args: ["--fix"]
name: "Run ruff import sorter"
args: ["--select=I", "--fix"]
- id: ruff
name: "Run ruff linter"
- id: ruff-format
name: "Format Python code"
name: "Run ruff formatter"
ci:
autoupdate_schedule: weekly

View File

@@ -2,8 +2,9 @@ import functools
import inspect
import frappe
from frappe.utils.user import is_website_user
__version__ = "15.23.2"
__version__ = "15.37.0"
def get_default_company(user=None):
@@ -149,3 +150,13 @@ def allow_regional(fn):
return frappe.get_attr(overrides[function_path][-1])(*args, **kwargs)
return caller
def check_app_permission():
if frappe.session.user == "Administrator":
return True
if is_website_user():
return False
return True

View File

@@ -22,8 +22,7 @@ frappe.ui.form.on("Account", {
// hide fields if group
frm.toggle_display(["tax_rate"], cint(frm.doc.is_group) == 0);
// disable fields
frm.toggle_enable(["is_group", "company"], false);
frm.toggle_enable(["is_group", "company", "account_number"], frm.is_new());
if (cint(frm.doc.is_group) == 0) {
frm.toggle_display("freeze_account", frm.doc.__onload && frm.doc.__onload.can_freeze_account);

View File

@@ -55,8 +55,7 @@
"fieldtype": "Data",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Account Number",
"read_only": 1
"label": "Account Number"
},
{
"default": "0",
@@ -72,7 +71,6 @@
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"read_only": 1,
"remember_last_selected_value": 1,
"reqd": 1
},
@@ -123,7 +121,8 @@
"label": "Account Type",
"oldfieldname": "account_type",
"oldfieldtype": "Select",
"options": "\nAccumulated Depreciation\nAsset Received But Not Billed\nBank\nCash\nChargeable\nCapital Work in Progress\nCost of Goods Sold\nCurrent Asset\nCurrent Liability\nDepreciation\nDirect Expense\nDirect Income\nEquity\nExpense Account\nExpenses Included In Asset Valuation\nExpenses Included In Valuation\nFixed Asset\nIncome Account\nIndirect Expense\nIndirect Income\nLiability\nPayable\nReceivable\nRound Off\nStock\nStock Adjustment\nStock Received But Not Billed\nService Received But Not Billed\nTax\nTemporary"
"options": "\nAccumulated Depreciation\nAsset Received But Not Billed\nBank\nCash\nChargeable\nCapital Work in Progress\nCost of Goods Sold\nCurrent Asset\nCurrent Liability\nDepreciation\nDirect Expense\nDirect Income\nEquity\nExpense Account\nExpenses Included In Asset Valuation\nExpenses Included In Valuation\nFixed Asset\nIncome Account\nIndirect Expense\nIndirect Income\nLiability\nPayable\nReceivable\nRound Off\nStock\nStock Adjustment\nStock Received But Not Billed\nService Received But Not Billed\nTax\nTemporary",
"search_index": 1
},
{
"description": "Rate at which this tax is applied",
@@ -192,7 +191,7 @@
"idx": 1,
"is_tree": 1,
"links": [],
"modified": "2023-07-20 18:18:44.405723",
"modified": "2024-06-27 16:23:04.444354",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",
@@ -253,4 +252,4 @@
"sort_order": "ASC",
"states": [],
"track_changes": 1
}
}

View File

@@ -103,14 +103,12 @@ class Account(NestedSet):
self.name = get_autoname_with_number(self.account_number, self.account_name, self.company)
def validate(self):
from erpnext.accounts.utils import validate_field_number
if frappe.local.flags.allow_unverified_charts:
return
self.validate_parent()
self.validate_parent_child_account_type()
self.validate_root_details()
validate_field_number("Account", self.name, self.account_number, self.company, "account_number")
self.validate_account_number()
self.validate_group_or_ledger()
self.set_root_and_report_type()
self.validate_mandatory()
@@ -202,7 +200,7 @@ class Account(NestedSet):
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.bold(_("Account Type")), doc_before_save.account_type, doc_before_save.account_type
)
frappe.msgprint(msg)
self.add_comment("Comment", msg)
@@ -311,6 +309,22 @@ class Account(NestedSet):
if frappe.db.get_value("GL Entry", {"account": self.name}):
frappe.throw(_("Currency can not be changed after making entries using some other currency"))
def validate_account_number(self, account_number=None):
if not account_number:
account_number = self.account_number
if account_number:
account_with_same_number = frappe.db.get_value(
"Account",
{"account_number": account_number, "company": self.company, "name": ["!=", self.name]},
)
if account_with_same_number:
frappe.throw(
_("Account Number {0} already used in account {1}").format(
account_number, account_with_same_number
)
)
def create_account_for_child_company(self, parent_acc_name_map, descendants, parent_acc_name):
for company in descendants:
company_bold = frappe.bold(company)
@@ -464,19 +478,6 @@ def get_account_autoname(account_number, account_name, company):
return " - ".join(parts)
def validate_account_number(name, account_number, company):
if account_number:
account_with_same_number = frappe.db.get_value(
"Account", {"account_number": account_number, "company": company, "name": ["!=", name]}
)
if account_with_same_number:
frappe.throw(
_("Account Number {0} already used in account {1}").format(
account_number, account_with_same_number
)
)
@frappe.whitelist()
def update_account_number(name, account_name, account_number=None, from_descendant=False):
account = frappe.get_cached_doc("Account", name)
@@ -517,7 +518,7 @@ def update_account_number(name, account_name, account_number=None, from_descenda
frappe.throw(message, title=_("Rename Not Allowed"))
validate_account_number(name, account_number, account.company)
account.validate_account_number(account_number)
if account_number:
frappe.db.set_value("Account", name, "account_number", account_number.strip())
else:

View File

@@ -222,7 +222,7 @@ frappe.treeview_settings["Account"] = {
"General Ledger",
"Balance Sheet",
"Profit and Loss Statement",
"Cash Flow Statement",
"Cash Flow",
"Accounts Payable",
"Accounts Receivable",
]) {

View File

@@ -1,531 +0,0 @@
{
"country_code": "tr",
"name": "Turkey - Tek D\u00fczen Hesap Plan\u0131",
"tree": {
"Duran Varl\u0131klar": {
"Di\u011fer Alacaklar": {
"Ba\u011fl\u0131 Ortakl\u0131klardan Alacaklar": {},
"Di\u011fer Alacak Senetleri Reeskontu(-)": {},
"Di\u011fer \u00c7e\u015fitli Alacaklar": {},
"Ortaklardan Alacaklar": {},
"Personelden Alacaklar": {},
"\u0130\u015ftiraklerden Alacaklar": {},
"\u015e\u00fcpheli Di\u011fer Alacaklar Kar\u015f\u0131l\u0131\u011f\u0131(-)": {}
},
"Di\u011fer Duran Varl\u0131klar": {
"Birikmi\u015f Amortismanlar(-)": {},
"Di\u011fer KDV": {},
"Di\u011fer \u00c7e\u015fitli Duran Varl\u0131klar": {},
"Elden \u00c7\u0131kar\u0131lacak Stoklar Ve Maddi Duran Varl\u0131klar": {},
"Gelecek Y\u0131llar \u0130htiyac\u0131 Stoklar": {},
"Gelecek Y\u0131llarda \u0130ndirilecek KDV": {},
"Pe\u015fin \u00d6denen Vergi Ve Fonlar": {},
"Stok De\u011fer D\u00fc\u015f\u00fckl\u00fc\u011f\u00fc Kar\u015f\u0131l\u0131\u011f\u0131(-)": {}
},
"Gelecek Y\u0131llara Ait Giderler ve Gelir Tahakkuklar\u0131": {
"Gelecek Y\u0131llara Ait Giderler": {},
"Gelir Tahakkuklar\u0131": {}
},
"Maddi Duran Varl\u0131klar": {
"Arazi Ve Arsalar": {},
"Binalar": {},
"Birikmi\u015f Amortismanlar(-)": {},
"Demirba\u015flar": {},
"Di\u011fer Maddi Duran Varl\u0131klar": {},
"Ta\u015f\u0131tlar": {},
"Tesis, Makine Ve Cihazlar": {},
"Verilen Avanslar": {},
"Yap\u0131lmakta Olan Yat\u0131r\u0131mlar": {},
"Yer Alt\u0131 Ve Yer \u00dcst\u00fc D\u00fczenleri": {}
},
"Maddi Olmayan Duran Varl\u0131klar": {
"Ara\u015ft\u0131rma Ve Geli\u015ftirme Giderleri": {},
"Birikmi\u015f Amortismanlar(-)": {},
"Di\u011fer Maddi Olmayan Duran Varl\u0131klar": {},
"Haklar": {},
"Kurulu\u015f Ve \u00d6rg\u00fctlenme Giderleri": {},
"Verilen Avanslar": {},
"\u00d6zel Maliyetler": {},
"\u015eerefiye": {}
},
"Mali Duran Varl\u0131klar": {
"Ba\u011fl\u0131 Menkul K\u0131ymetler": {},
"Ba\u011fl\u0131 Menkul K\u0131ymetler De\u011fer D\u00fc\u015f\u00fckl\u00fc\u011f\u00fc Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
"Ba\u011fl\u0131 Ortakl\u0131klar": {},
"Ba\u011fl\u0131 Ortakl\u0131klar Sermaye Paylar\u0131 De\u011fer D\u00fc\u015f\u00fckl\u00fc\u011f\u00fc Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
"Ba\u011fl\u0131 Ortakl\u0131klara Sermaye Taahh\u00fctleri(-)": {},
"Di\u011fer Mali Duran Varl\u0131klar": {},
"Di\u011fer Mali Duran Varl\u0131klar Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
"\u0130\u015ftirakler": {},
"\u0130\u015ftirakler Sermaye Paylar\u0131 De\u011fer D\u00fc\u015f\u00fckl\u00fc\u011f\u00fc Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
"\u0130\u015ftiraklere Sermaye Taahh\u00fctleri(-)": {}
},
"Ticari Alacaklar": {
"Alacak Senetleri": {},
"Alacak Senetleri Reeskontu(-)": {},
"Al\u0131c\u0131lar": {},
"Kazaqn\u0131lmam\u0131\u015f Finansal Kiralama Faiz Gelirleri(-)": {},
"Verilen Depozito Ve Teminatlar": {},
"\u015e\u00fcpheli Ticari Alacaklar Kar\u015f\u0131l\u0131\u011f\u0131(-)": {}
},
"root_type": "",
"\u00d6zel T\u00fckenmeye Tabi Varl\u0131klar": {
"Arama Giderleri": {},
"Birikmi\u015f T\u00fckenme Paylar\u0131(-)": {},
"Di\u011fer \u00d6zel T\u00fckenmeye Tabi Varl\u0131klar": {},
"Haz\u0131rl\u0131k Ve Geli\u015ftirme Giderleri": {},
"Verilen Avanslar": {}
}
},
"D\u00f6nen Varl\u0131klar": {
"Di\u011fer Alacaklar": {
"Ba\u011fl\u0131 Ortakl\u0131klardan Alacaklar": {},
"Di\u011fer Alacak Senetleri Reeskontu(-)": {},
"Di\u011fer \u00c7e\u015fitli Alacaklar": {},
"Ortaklardan Alacaklar": {},
"Personelden Alacaklar": {},
"\u0130\u015ftiraklerden Alacaklar": {},
"\u015e\u00fcpheli Di\u011fer Alacaklar": {},
"\u015e\u00fcpheli Di\u011fer Alacaklar Kar\u015f\u0131l\u0131\u011f\u0131(-)": {}
},
"Di\u011fer D\u00f6nen Varl\u0131klar": {
"Devreden KDV": {},
"Di\u011fer D\u00f6nen Varl\u0131klar Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
"Di\u011fer KDV": {},
"Di\u011fer \u00c7e\u015fitli D\u00f6nen Varl\u0131klar": {},
"Personel Avanslar\u0131": {},
"Pe\u015fin \u00d6denen Vergiler Ve Fonlar": {},
"Say\u0131m Ve Tesell\u00fcm Noksanlar\u0131": {},
"\u0130ndirilecek KDV": {},
"\u0130\u015f Avanslar\u0131": {}
},
"Gelecek Aylara Ait Giderler ve Gelir Tahakkuklar\u0131": {
"Gelecek Aylara Ait Giderler": {},
"Gelir Tahakkuklar\u0131": {}
},
"Haz\u0131r De\u011ferler": {
"Al\u0131nan \u00c7ekler": {},
"Bankalar": {
"account_type": "Bank"
},
"Di\u011fer Haz\u0131r De\u011ferler": {},
"Kasa": {
"account_type": "Cash"
},
"Verilen \u00c7ekler ve \u00d6deme Emirleri(-)": {}
},
"Menkul K\u0131ymetler": {
"Di\u011fer Menkul K\u0131ymetler": {},
"Hisse Senetleri": {},
"Kamu Kesimi Tahvil, Senet ve Bonolar\u0131": {},
"Menkul K\u0131ymetler De\u011fer D\u00fc\u015f\u00fckl\u00fc\u011f\u00fc Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
"\u00d6zel Kesim Tahvil Senet Ve Bonolar\u0131": {}
},
"Stoklar": {
"Mamuller": {},
"Stok De\u011fer D\u00fc\u015f\u00fckl\u00fc\u011f\u00fc Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
"Ticari Mallar": {},
"Verilen Sipari\u015f Avanslar\u0131": {},
"Yar\u0131 Mamuller": {},
"\u0130lk Madde Malzeme": {}
},
"Ticari Alacaklar": {
"Alacak Senetleri": {},
"Alacak Senetleri Reeskontu(-)": {},
"Al\u0131c\u0131lar": {},
"Di\u011fer Ticari Alacaklar": {},
"Kazan\u0131lmam\u0131\u015f Finansal Kiralama Faiz Gelirleri(-)": {},
"Verilen Depozito ve Teminatlar": {},
"\u015e\u00fcpheli Ticari Alacaklar": {},
"\u015e\u00fcpheli Ticari Alacaklar Kar\u015f\u0131l\u0131\u011f\u0131": {}
},
"Y\u0131llara Yayg\u0131n \u0130n\u015faat ve Onar\u0131m Maliyetleri": {
"Ta\u015feronlara Verilen Avanslar": {},
"Y\u0131llara Yayg\u0131n \u0130n\u015faat Ve Onar\u0131m Maliyetleri": {}
},
"root_type": ""
},
"Gelir Tablosu Hesaplar\u0131": {
"Br\u00fct Sat\u0131\u015flar": {
"Di\u011fer Gelirler": {},
"Yurt D\u0131\u015f\u0131 Sat\u0131\u015flar": {},
"Yurt \u0130\u00e7i Sat\u0131\u015flar": {}
},
"Di\u011fer Faaliyetlerden Olu\u015fan Gelir ve K\u00e2rlar": {
"Ba\u011fl\u0131 Ortakl\u0131klardan Temett\u00fc Gelirleri": {},
"Di\u011fer Ola\u011fan Gelir Ve K\u00e2rlar": {},
"Enflasyon D\u00fczeltme K\u00e2rlar\u0131": {},
"Faiz Gelirleri": {},
"Kambiyo K\u00e2rlar\u0131": {},
"Komisyon Gelirleri": {},
"Konusu Kalmayan Kar\u015f\u0131l\u0131klar": {},
"Menkul K\u0131ymet Sat\u0131\u015f K\u00e2rlar\u0131": {},
"Reeskont Faiz Gelirleri": {},
"\u0130\u015ftiraklerden Temett\u00fc Gelirleri": {}
},
"Di\u011fer Faaliyetlerden Olu\u015fan Gider ve Zararlar (-)": {
"Di\u011fer Ola\u011fan Gider Ve Zararlar(-)": {},
"Enflasyon D\u00fczeltmesi Zararlar\u0131(-)": {},
"Kambiyo Zararlar\u0131(-)": {},
"Kar\u015f\u0131l\u0131k Giderleri(-)": {},
"Komisyon Giderleri(-)": {},
"Menkul K\u0131ymet Sat\u0131\u015f Zararlar\u0131(-)": {},
"Reeskont Faiz Giderleri(-)": {}
},
"D\u00f6nem Net K\u00e2r\u0131 Ve Zarar\u0131": {
"D\u00f6nem K\u00e2r\u0131 Vergi Ve Di\u011fer Yasal Y\u00fck\u00fcml\u00fcl\u00fck Kar\u015f\u0131l\u0131klar\u0131(-)": {},
"D\u00f6nem K\u00e2r\u0131 Veya Zarar\u0131": {},
"D\u00f6nem Net K\u00e2r\u0131 Veya Zarar\u0131": {},
"Enflasyon D\u00fczeltme Hesab\u0131": {},
"Y\u0131llara Yayg\u0131n \u0130n\u015faat Ve Enflasyon D\u00fczeltme Hesab\u0131": {}
},
"Faaliyet Giderleri(-)": {
"Ara\u015ft\u0131rma Ve Geli\u015ftirme Giderleri(-)": {},
"Genel Y\u00f6netim Giderleri(-)": {},
"Pazarlama Sat\u0131\u015f Ve Da\u011f\u0131t\u0131m Giderleri(-)": {}
},
"Finansman Giderleri": {
"K\u0131sa Vadeli Bor\u00e7lanma Giderleri(-)": {},
"Uzun Vadeli Bor\u00e7lanma Giderleri(-)": {}
},
"Ola\u011fan D\u0131\u015f\u0131 Gelir Ve K\u00e2rlar": {
"Di\u011fer Ola\u011fan D\u0131\u015f\u0131 Gelir Ve K\u00e2rlar": {},
"\u00d6nceki D\u00f6nem Gelir Ve K\u00e2rlar\u0131": {}
},
"Ola\u011fan D\u0131\u015f\u0131 Gider Ve Zaralar(-)": {
"Di\u011fer Ola\u011fan D\u0131\u015f\u0131 Gider Ve Zararlar(-)": {},
"\u00c7al\u0131\u015fmayan K\u0131s\u0131m Gider Ve Zararlar\u0131(-)": {},
"\u00d6nceki D\u00f6nem Gider Ve Zararlar\u0131(-)": {}
},
"Sat\u0131\u015f \u0130ndirimleri (-)": {
"Di\u011fer \u0130ndirimler": {},
"Sat\u0131\u015f \u0130ndirimleri(-)": {},
"Sat\u0131\u015ftan \u0130adeler(-)": {}
},
"Sat\u0131\u015flar\u0131n Maliyeti(-)": {
"Di\u011fer Sat\u0131\u015flar\u0131n Maliyeti(-)": {},
"Sat\u0131lan Hizmet Maliyeti(-)": {},
"Sat\u0131lan Mamuller Maliyeti(-)": {},
"Sat\u0131lan Ticari Mallar Maliyeti(-)": {}
},
"root_type": ""
},
"K\u0131sa Vadeli Yabanc\u0131 Kaynaklar": {
"Al\u0131nan Avanslar": {
"Al\u0131nan Di\u011fer Avanslar": {
"account_type": "Payable"
},
"Al\u0131nan Sipari\u015f Avanslar\u0131": {
"account_type": "Payable"
},
"account_type": "Payable"
},
"Bor\u00e7 ve Gider Kar\u015f\u0131l\u0131klar\u0131": {
"Di\u011fer Bor\u00e7 Ve Gider Kar\u015f\u0131l\u0131klar\u0131": {
"account_type": "Payable"
},
"D\u00f6nem K\u00e2r\u0131 Vergi Ve Di\u011fer Yasal Y\u00fck\u00fcml\u00fcl\u00fck Kar\u015f\u0131l\u0131klar\u0131": {
"account_type": "Tax"
},
"D\u00f6nem K\u00e2r\u0131n\u0131n Pe\u015fin \u00d6denen Vergi Ve Di\u011fer Y\u00fck\u00fcml\u00fcl\u00fckler(-)": {
"account_type": "Tax"
},
"K\u0131dem Tazminat\u0131 Kar\u015f\u0131l\u0131\u011f\u0131": {},
"Maliyet Giderleri Kar\u015f\u0131l\u0131\u011f\u0131": {},
"account_type": "Payable"
},
"Di\u011fer Bor\u00e7lar": {
"Ba\u011fl\u0131 Ortakl\u0131klara Bor\u00e7lar": {
"account_type": "Payable"
},
"Di\u011fer Bor\u00e7 Senetleri Reeskontu(-)": {
"account_type": "Payable"
},
"Di\u011fer \u00c7e\u015fitli Bor\u00e7lar": {
"account_type": "Payable"
},
"Ortaklara Bor\u00e7lar": {
"account_type": "Payable"
},
"Personele Bor\u00e7lar": {
"account_type": "Payable"
},
"account_type": "Payable",
"\u0130\u015ftiraklere Bor\u00e7lar": {
"account_type": "Payable"
}
},
"Di\u011fer K\u0131sa Vadeli Yabanc\u0131 Kaynaklar": {
"Di\u011fer KDV": {
"account_type": "Tax"
},
"Di\u011fer \u00c7e\u015fitli Yabanc\u0131 Kaynaklar": {},
"Hesaplanan KDV": {
"account_type": "Tax"
},
"Merkez Ve \u015eubeler Cari Hesab\u0131": {},
"Say\u0131m Ve Tesell\u00fcm Fazlalar\u0131": {},
"account_type": "Payable"
},
"Gelecek Aylara Ait Gelirler Ve Gider Tahakkuklar\u0131": {
"Gelecek Aylara Ait Gelirler": {},
"Gider Tahakkuklar\u0131": {}
},
"Mali Bor\u00e7lar": {
"Banka Kredileri": {
"account_type": "Payable"
},
"Di\u011fer Mali Bor\u00e7lar": {
"account_type": "Payable"
},
"Ertelenmi\u015f Finansal Kiralama Bor\u00e7lanma Maliyetleri(-)": {
"account_type": "Payable"
},
"Finansal Kiralama \u0130\u015flemlerinden Bor\u00e7lar": {
"account_type": "Payable"
},
"Menkul K\u0131ymetler \u0130hra\u00e7 Fark\u0131(-)": {
"account_type": "Payable"
},
"Tahvil Anapara Bor\u00e7, Taksit Ve Faizleri": {
"account_type": "Payable"
},
"Uzun Vadeli Kredilerin Anapara Taksitleri Ve Faizleri": {
"account_type": "Payable"
},
"account_type": "Payable",
"\u00c7\u0131kar\u0131lan Bonolar Ve Senetler": {
"account_type": "Payable"
},
"\u00c7\u0131kar\u0131lm\u0131\u015f Di\u011fer Menkul K\u0131ymetler": {
"account_type": "Payable"
}
},
"Ticari Bor\u00e7lar": {
"Al\u0131nan Depozito Ve Teminatlar": {
"account_type": "Payable"
},
"Bor\u00e7 Senetleri": {
"account_type": "Payable"
},
"Bor\u00e7 Senetleri Reeskontu(-)": {
"account_type": "Payable"
},
"Di\u011fer Ticari Bor\u00e7lar": {
"account_type": "Payable"
},
"Sat\u0131c\u0131lar": {
"account_type": "Payable"
},
"account_type": "Payable"
},
"Y\u0131llara Yayg\u0131n \u0130n\u015faat Ve Onar\u0131m Hakedi\u015fleri": {
"350 Y\u0131llara Yayg\u0131n \u0130n\u015faat Ve Onar\u0131m Hakedi\u015fleri Bedelleri": {
"account_type": "Payable"
},
"account_type": "Payable"
},
"root_type": "",
"\u00d6denecek Vergi ve Di\u011fer Y\u00fck\u00fcml\u00fcl\u00fckler": {
"Vadesi Ge\u00e7mi\u015f, Ertelenmi\u015f Veya Taksitlendirilmi\u015f Vergi Ve Di\u011fer Y\u00fck\u00fcml\u00fcl\u00fckler": {
"account_type": "Tax"
},
"account_type": "Tax",
"\u00d6denecek Di\u011fer Y\u00fck\u00fcml\u00fcl\u00fckler": {
"account_type": "Tax"
},
"\u00d6denecek Sosyal G\u00fcvenl\u00fck Kesintileri": {
"account_type": "Tax"
},
"\u00d6denecek Vergi Ve Fonlar": {
"account_type": "Tax"
}
}
},
"Maliyet Hesaplar\u0131": {
"Ara\u015ft\u0131rma Ve Geli\u015ftirme Giderleri": {},
"Direkt \u0130lk Madde Ve Malzeme Giderleri": {
"Direk \u0130lk Madde Ve Malzeme Giderleri Hesab\u0131": {},
"Direkt \u0130lk Madde Ve Malzeme Fiyat Fark\u0131": {},
"Direkt \u0130lk Madde Ve Malzeme Miktar Fark\u0131": {},
"Direkt \u0130lk Madde Ve Malzeme Yans\u0131tma Hesab\u0131": {}
},
"Direkt \u0130\u015f\u00e7ilik Giderleri": {
"Direkt \u0130\u015f\u00e7ilik Giderleri": {},
"Direkt \u0130\u015f\u00e7ilik Giderleri Yans\u0131tma Hesab\u0131": {},
"Direkt \u0130\u015f\u00e7ilik S\u00fcre Farklar\u0131": {},
"Direkt \u0130\u015f\u00e7ilik \u00dccret Farklar\u0131": {}
},
"Finansman Giderleri": {
"Finansman Giderleri": {},
"Finansman Giderleri Fark Hesab\u0131": {},
"Finansman Giderleri Yans\u0131tma Hesab\u0131": {}
},
"Genel Y\u00f6netim Giderleri": {
"Genel Y\u00f6netim Gider Farklar\u0131 Hesab\u0131": {},
"Genel Y\u00f6netim Giderleri": {},
"Genel Y\u00f6netim Giderleri Yans\u0131tma Hesab\u0131": {}
},
"Genel \u00dcretim Giderleri": {
"Genel \u00dcretim Giderleri": {},
"Genel \u00dcretim Giderleri B\u00fct\u00e7e Farklar\u0131": {},
"Genel \u00dcretim Giderleri Kapasite Farklar\u0131": {},
"Genel \u00dcretim Giderleri Verimlilik Giderleri": {},
"Genel \u00dcretim Giderleri Yans\u0131tma Hesab\u0131": {}
},
"Hizmet \u00dcretim Maliyeti": {
"Hizmet \u00dcretim Maliyeti": {},
"Hizmet \u00dcretim Maliyeti Fark Hesaplar\u0131": {},
"Hizmet \u00dcretim Maliyeti Yans\u0131tma Hesab\u0131": {}
},
"Maliyet Muhasebesi Ba\u011flant\u0131 Hesaplar\u0131": {
"Maliyet Muhasebesi Ba\u011flant\u0131 Hesab\u0131": {},
"Maliyet Muhasebesi Yans\u0131tma Hesab\u0131": {}
},
"Pazarlama, Sat\u0131\u015f Ve Da\u011f\u0131t\u0131m Giderleri": {
"Atra\u015ft\u0131rma Ve Geli\u015ftirme Giderleri": {},
"Pazarlama Sat\u0131\u015f Ve Dag\u0131t\u0131m Giderleri Yans\u0131tma Hesab\u0131": {},
"Pazarlama Sat\u0131\u015f Ve Da\u011f\u0131t\u0131m Giderleri Fark Hesab\u0131": {}
},
"root_type": ""
},
"Naz\u0131m Hesaplar": {
"root_type": ""
},
"Serbest Hesaplar": {
"root_type": ""
},
"Uzun Vadeli Yabanc\u0131 Kaynaklar": {
"Al\u0131nan Avanslar": {
"Al\u0131nan Di\u011fer Avanslar": {
"account_type": "Payable"
},
"Al\u0131nan Sipari\u015f Avanslar\u0131": {
"account_type": "Payable"
},
"account_type": "Payable"
},
"Bor\u00e7 Ve Gider Kar\u015f\u0131l\u0131klar\u0131": {
"Di\u011fer Bor\u00e7 Ve Gider Kar\u015f\u0131l\u0131klar\u0131": {
"account_type": "Payable"
},
"K\u0131dem Tazminat\u0131 Kar\u015f\u0131l\u0131\u011f\u0131": {},
"account_type": "Payable"
},
"Di\u011fer Bor\u00e7lar": {
"Ba\u011fl\u0131 Ortakl\u0131klara Bor\u00e7lar": {
"account_type": "Payable"
},
"Di\u011fer Bor\u00e7 Senetleri Reeskontu(-)": {
"account_type": "Payable"
},
"Di\u011fer \u00c7e\u015fitli Bor\u00e7lar": {
"account_type": "Payable"
},
"Kamuya Olan Ertelenmi\u015f Veya Taksitlendirilmi\u015f Bor\u00e7lar": {
"account_type": "Payable"
},
"Ortaklara Bor\u00e7lar": {
"account_type": "Payable"
},
"account_type": "Payable",
"\u0130\u015ftiraklere Bor\u00e7lar": {
"account_type": "Payable"
}
},
"Di\u011fer Uzun Vadeli Yabanc\u0131 Kaynaklar": {
"Di\u011fer \u00c7e\u015fitli Uzun Vadeli Yabanc\u0131 Kaynaklar": {
"account_type": "Payable"
},
"Gelecek Y\u0131llara Ertelenmi\u015f Veya Terkin Edilecek KDV": {
"account_type": "Payable"
},
"Tesise Kat\u0131lma Paylar\u0131": {
"account_type": "Payable"
},
"account_type": "Payable"
},
"Gelecek Y\u0131llara Ait Gelirler Ve Gider Tahakkuklar\u0131": {
"Gelecek Y\u0131llara Ait Gelirler": {},
"Gider Tahakkuklar\u0131": {}
},
"Mali Bor\u00e7lar": {
"Banka Kredileri": {
"account_type": "Payable"
},
"Di\u011fer Mali Bor\u00e7lar": {
"account_type": "Payable"
},
"Ertelenmi\u015f Finansal Kiralama Bor\u00e7lanma Maliyetleri(-)": {
"account_type": "Payable"
},
"Finansal Kiralama \u0130\u015flemlerinden Bor\u00e7lar": {
"account_type": "Payable"
},
"Menkul K\u0131ymetler \u0130hra\u00e7 Fark\u0131(-)": {
"account_type": "Payable"
},
"account_type": "Payable",
"\u00c7\u0131kar\u0131lm\u0131\u015f Di\u011fer Menkul K\u0131ymetler": {
"account_type": "Payable"
},
"\u00c7\u0131kar\u0131lm\u0131\u015f Tahviller": {
"account_type": "Payable"
}
},
"Ticari Bor\u00e7lar": {
"Al\u0131nan Depozito Ve Teminatlar": {
"account_type": "Payable"
},
"Bor\u00e7 Senetleri": {
"account_type": "Payable"
},
"Bor\u00e7 Senetleri Reeskontu(-)": {
"account_type": "Payable"
},
"Di\u011fer Ticari Bor\u00e7lar": {
"account_type": "Payable"
},
"Sat\u0131c\u0131lar": {
"account_type": "Payable"
},
"account_type": "Payable"
},
"root_type": ""
},
"\u00d6z Kaynaklar": {
"D\u00f6nem Net K\u00e2r\u0131 (Zarar\u0131)": {
"D\u00f6nem Net K\u00e2r\u0131": {},
"D\u00f6nem Net Zarar\u0131(-)": {}
},
"Ge\u00e7mi\u015f Y\u0131llar K\u00e2rlar\u0131": {
"Ge\u00e7mi\u015f Y\u0131llar K\u00e2rlar\u0131": {}
},
"Ge\u00e7mi\u015f Y\u0131llar Zararlar\u0131(-)": {
"Ge\u00e7mi\u015f Y\u0131llar Zararlar\u0131(-)": {}
},
"K\u00e2r Yedekleri": {
"Di\u011fer K\u00e2r Yedekleri": {},
"Ola\u011fan\u00fcst\u00fc Yedekler": {},
"Stat\u00fc Yedekleri": {},
"Yasal Yedekler": {},
"\u00d6zel Fonlar": {}
},
"Sermaye Yedekleri": {
"Di\u011fer Sermaye Yedekleri": {},
"Hisse Senedi \u0130ptal K\u00e2rlar\u0131": {},
"Hisse Senetleri \u0130hra\u00e7 Primleri": {},
"Maddi Duran Varl\u0131k Yeniden De\u011ferlenme Art\u0131\u015flar\u0131": {},
"Maliyet Art\u0131\u015flar\u0131 Fonu": {},
"\u0130\u015ftirakler Yeniden De\u011ferleme Art\u0131\u015flar\u0131": {}
},
"root_type": "",
"\u00d6denmi\u015f Sermaye": {
"Sermaye": {},
"\u00d6denmi\u015f Sermaye(-)": {
"account_type": "Payable"
}
}
}
}
}

View File

@@ -1525,7 +1525,8 @@
"41-Clients et comptes rattach\u00e9s (PASSIF)": {
"Clients cr\u00e9diteurs": {
"Clients - Avances et acomptes re\u00e7us sur commandes": {
"account_number": "4191"
"account_number": "4191",
"account_type": "Income Account"
},
"Clients - Dettes pour emballages et mat\u00e9riels consign\u00e9s": {
"account_number": "4196"
@@ -3141,4 +3142,4 @@
"account_number": "7"
}
}
}
}

View File

@@ -109,7 +109,8 @@
"Utility Expenses": {},
"Write Off": {},
"Exchange Gain/Loss": {},
"Gain/Loss on Asset Disposal": {}
"Gain/Loss on Asset Disposal": {},
"Impairment": {}
},
"root_type": "Expense"
},
@@ -132,7 +133,8 @@
"Source of Funds (Liabilities)": {
"Capital Account": {
"Reserves and Surplus": {},
"Shareholders Funds": {}
"Shareholders Funds": {},
"Revaluation Surplus": {}
},
"Current Liabilities": {
"Accounts Payable": {

View File

@@ -72,6 +72,7 @@ def get():
_("Write Off"): {},
_("Exchange Gain/Loss"): {},
_("Gain/Loss on Asset Disposal"): {},
_("Impairment"): {},
},
"root_type": "Expense",
},
@@ -104,6 +105,7 @@ def get():
_("Dividends Paid"): {"account_type": "Equity"},
_("Opening Balance Equity"): {"account_type": "Equity"},
_("Retained Earnings"): {"account_type": "Equity"},
_("Revaluation Surplus"): {"account_type": "Equity"},
"root_type": "Equity",
},
}

View File

@@ -255,14 +255,16 @@ def get_accounting_dimensions(as_list=True, filters=None):
def get_checks_for_pl_and_bs_accounts():
dimensions = frappe.db.sql(
"""SELECT p.label, p.disabled, p.fieldname, c.default_dimension, c.company, c.mandatory_for_pl, c.mandatory_for_bs
FROM `tabAccounting Dimension`p ,`tabAccounting Dimension Detail` c
WHERE p.name = c.parent""",
as_dict=1,
)
if frappe.flags.accounting_dimensions_details is None:
# nosemgrep
frappe.flags.accounting_dimensions_details = frappe.db.sql(
"""SELECT p.label, p.disabled, p.fieldname, c.default_dimension, c.company, c.mandatory_for_pl, c.mandatory_for_bs
FROM `tabAccounting Dimension`p ,`tabAccounting Dimension Detail` c
WHERE p.name = c.parent""",
as_dict=1,
)
return dimensions
return frappe.flags.accounting_dimensions_details
def get_dimension_with_children(doctype, dimensions):

View File

@@ -78,6 +78,8 @@ class TestAccountingDimension(unittest.TestCase):
def tearDown(self):
disable_dimension()
frappe.flags.accounting_dimensions_details = None
frappe.flags.dimension_filter_map = None
def create_dimension():

View File

@@ -66,37 +66,41 @@ class AccountingDimensionFilter(Document):
def get_dimension_filter_map():
filters = frappe.db.sql(
"""
SELECT
a.applicable_on_account, d.dimension_value, p.accounting_dimension,
p.allow_or_restrict, a.is_mandatory
FROM
`tabApplicable On Account` a,
`tabAccounting Dimension Filter` p
LEFT JOIN `tabAllowed Dimension` d ON d.parent = p.name
WHERE
p.name = a.parent
AND p.disabled = 0
""",
as_dict=1,
)
dimension_filter_map = {}
for f in filters:
f.fieldname = scrub(f.accounting_dimension)
build_map(
dimension_filter_map,
f.fieldname,
f.applicable_on_account,
f.dimension_value,
f.allow_or_restrict,
f.is_mandatory,
if not frappe.flags.get("dimension_filter_map"):
# nosemgrep
filters = frappe.db.sql(
"""
SELECT
a.applicable_on_account, d.dimension_value, p.accounting_dimension,
p.allow_or_restrict, a.is_mandatory
FROM
`tabApplicable On Account` a, `tabAllowed Dimension` d,
`tabAccounting Dimension Filter` p
WHERE
p.name = a.parent
AND p.disabled = 0
AND p.name = d.parent
""",
as_dict=1,
)
return dimension_filter_map
dimension_filter_map = {}
for f in filters:
f.fieldname = scrub(f.accounting_dimension)
build_map(
dimension_filter_map,
f.fieldname,
f.applicable_on_account,
f.dimension_value,
f.allow_or_restrict,
f.is_mandatory,
)
frappe.flags.dimension_filter_map = dimension_filter_map
return frappe.flags.dimension_filter_map
def build_map(map_object, dimension, account, filter_value, allow_or_restrict, is_mandatory):

View File

@@ -47,6 +47,8 @@ class TestAccountingDimensionFilter(unittest.TestCase):
def tearDown(self):
disable_dimension_filter()
disable_dimension()
frappe.flags.accounting_dimensions_details = None
frappe.flags.dimension_filter_map = None
for si in self.invoice_list:
si.load_from_db()

View File

@@ -3,4 +3,23 @@
frappe.ui.form.on("Accounts Settings", {
refresh: function (frm) {},
enable_immutable_ledger: function (frm) {
if (!frm.doc.enable_immutable_ledger) {
return;
}
let msg = __("Enabling this will change the way how cancelled transactions are handled.");
msg += " ";
msg += __("Please enable only if the understand the effects of enabling this.");
msg += "<br>";
msg += "Do you still want to enable immutable ledger?";
frappe.confirm(
msg,
() => {},
() => {
frm.set_value("enable_immutable_ledger", 0);
}
);
},
});

View File

@@ -12,6 +12,7 @@
"unlink_advance_payment_on_cancelation_of_order",
"column_break_13",
"delete_linked_ledger_entries",
"enable_immutable_ledger",
"invoicing_features_section",
"check_supplier_invoice_uniqueness",
"automatically_fetch_payment_terms",
@@ -54,6 +55,8 @@
"post_change_gl_entries",
"assets_tab",
"asset_settings_section",
"calculate_depr_using_total_days",
"column_break_gjcc",
"book_asset_depreciation_entry_automatically",
"closing_settings_tab",
"period_closing_settings_section",
@@ -70,7 +73,9 @@
"remarks_section",
"general_ledger_remarks_length",
"column_break_lvjk",
"receivable_payable_remarks_length"
"receivable_payable_remarks_length",
"payment_request_settings",
"create_pr_in_draft_status"
],
"fields": [
{
@@ -454,6 +459,36 @@
"fieldname": "remarks_section",
"fieldtype": "Section Break",
"label": "Remarks Column Length"
},
{
"default": "0",
"description": "On enabling this cancellation entries will be posted on the actual cancellation date and reports will consider cancelled entries as well",
"fieldname": "enable_immutable_ledger",
"fieldtype": "Check",
"label": "Enable Immutable Ledger"
},
{
"fieldname": "column_break_gjcc",
"fieldtype": "Column Break"
},
{
"default": "0",
"description": "Enable this option to calculate daily depreciation by considering the total number of days in the entire depreciation period, (including leap years) while using daily pro-rata based depreciation",
"fieldname": "calculate_depr_using_total_days",
"fieldtype": "Check",
"label": "Calculate daily depreciation using total days in depreciation period"
},
{
"description": "Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.",
"fieldname": "payment_request_settings",
"fieldtype": "Tab Break",
"label": "Payment Request"
},
{
"default": "1",
"fieldname": "create_pr_in_draft_status",
"fieldtype": "Check",
"label": "Create in Draft Status"
}
],
"icon": "icon-cog",
@@ -461,7 +496,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2024-03-15 12:11:36.085158",
"modified": "2024-07-26 06:48:52.714630",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",
@@ -490,4 +525,4 @@
"sort_order": "ASC",
"states": [],
"track_changes": 1
}
}

View File

@@ -33,12 +33,15 @@ class AccountsSettings(Document):
book_deferred_entries_based_on: DF.Literal["Days", "Months"]
book_deferred_entries_via_journal_entry: DF.Check
book_tax_discount_loss: DF.Check
calculate_depr_using_total_days: DF.Check
check_supplier_invoice_uniqueness: DF.Check
create_pr_in_draft_status: DF.Check
credit_controller: DF.Link | None
delete_linked_ledger_entries: DF.Check
determine_address_tax_category_from: DF.Literal["Billing Address", "Shipping Address"]
enable_common_party_accounting: DF.Check
enable_fuzzy_matching: DF.Check
enable_immutable_ledger: DF.Check
enable_party_matching: DF.Check
frozen_accounts_modifier: DF.Link | None
general_ledger_remarks_length: DF.Int

View File

@@ -208,8 +208,54 @@
"label": "Disabled"
}
],
"links": [],
"modified": "2023-09-22 21:31:34.763977",
"links": [
{
"group": "Transactions",
"link_doctype": "Payment Request",
"link_fieldname": "bank_account"
},
{
"group": "Transactions",
"link_doctype": "Payment Order",
"link_fieldname": "bank_account"
},
{
"group": "Transactions",
"link_doctype": "Bank Guarantee",
"link_fieldname": "bank_account"
},
{
"group": "Transactions",
"link_doctype": "Payroll Entry",
"link_fieldname": "bank_account"
},
{
"group": "Transactions",
"link_doctype": "Bank Transaction",
"link_fieldname": "bank_account"
},
{
"group": "Accounting",
"link_doctype": "Payment Entry",
"link_fieldname": "bank_account"
},
{
"group": "Accounting",
"link_doctype": "Journal Entry",
"link_fieldname": "bank_account"
},
{
"group": "Party",
"link_doctype": "Customer",
"link_fieldname": "default_bank_account"
},
{
"group": "Party",
"link_doctype": "Supplier",
"link_fieldname": "default_bank_account"
}
],
"modified": "2024-09-24 06:57:41.292970",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Account",
@@ -246,4 +292,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -1,20 +0,0 @@
from frappe import _
def get_data():
return {
"fieldname": "bank_account",
"non_standard_fieldnames": {
"Customer": "default_bank_account",
"Supplier": "default_bank_account",
},
"transactions": [
{
"label": _("Payments"),
"items": ["Payment Entry", "Payment Request", "Payment Order", "Payroll Entry"],
},
{"label": _("Party"), "items": ["Customer", "Supplier"]},
{"items": ["Bank Guarantee"]},
{"items": ["Journal Entry"]},
],
}

View File

@@ -38,6 +38,11 @@ frappe.ui.form.on("Bank Clearance", {
frm.add_custom_button(__("Get Payment Entries"), () => frm.trigger("get_payment_entries"));
frm.change_custom_button_type(__("Get Payment Entries"), null, "primary");
if (frm.doc.payment_entries.length) {
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");
}
},
update_clearance_date: function (frm) {
@@ -45,13 +50,7 @@ frappe.ui.form.on("Bank Clearance", {
method: "update_clearance_date",
doc: frm.doc,
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.refresh();
},
});
},
@@ -60,17 +59,8 @@ frappe.ui.form.on("Bank Clearance", {
return frappe.call({
method: "get_payment_entries",
doc: frm.doc,
callback: function (r, rt) {
frm.refresh_field("payment_entries");
if (frm.doc.payment_entries.length) {
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");
}
callback: function () {
frm.refresh();
},
});
},

View File

@@ -6,7 +6,7 @@ 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 frappe.utils import flt, fmt_money, get_link_to_form, getdate
from pypika import Order
import erpnext
@@ -96,8 +96,11 @@ class BankClearance(Document):
if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date):
frappe.throw(
_("Row #{0}: Clearance date {1} cannot be before Cheque Date {2}").format(
d.idx, d.clearance_date, d.cheque_date
_("Row #{0}: For {1} Clearance date {2} cannot be before Cheque Date {3}").format(
d.idx,
get_link_to_form(d.payment_document, d.payment_entry),
d.clearance_date,
d.cheque_date,
)
)
@@ -105,8 +108,18 @@ class BankClearance(Document):
if not d.clearance_date:
d.clearance_date = None
payment_entry = frappe.get_doc(d.payment_document, d.payment_entry)
payment_entry.db_set("clearance_date", d.clearance_date)
if d.payment_document == "Sales Invoice":
frappe.db.set_value(
"Sales Invoice Payment",
{"parent": d.payment_entry, "account": self.get("account"), "amount": [">", 0]},
"clearance_date",
d.clearance_date,
)
else:
frappe.db.set_value(
d.payment_document, d.payment_entry, "clearance_date", d.clearance_date
)
clearance_date_updated = True

View File

@@ -6,16 +6,29 @@ import unittest
import frappe
from frappe.utils import add_months, getdate
from erpnext.accounts.doctype.cost_center.test_cost_center import create_cost_center
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
from erpnext.stock.doctype.item.test_item import create_item
from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse
from erpnext.tests.utils import if_lending_app_installed, if_lending_app_not_installed
class TestBankClearance(unittest.TestCase):
@classmethod
def setUpClass(cls):
create_warehouse(
warehouse_name="_Test Warehouse",
properties={"parent_warehouse": "All Warehouses - _TC"},
company="_Test Company",
)
create_item("_Test Item")
create_cost_center(cost_center_name="_Test Cost Center", company="_Test Company")
clear_payment_entries()
clear_loan_transactions()
clear_pos_sales_invoices()
make_bank_account()
add_transactions()
@@ -83,11 +96,41 @@ class TestBankClearance(unittest.TestCase):
bank_clearance.get_payment_entries()
self.assertEqual(len(bank_clearance.payment_entries), 3)
def test_update_clearance_date_on_si(self):
sales_invoice = make_pos_sales_invoice()
date = getdate()
bank_clearance = frappe.get_doc("Bank Clearance")
bank_clearance.account = "_Test Bank Clearance - _TC"
bank_clearance.from_date = add_months(date, -1)
bank_clearance.to_date = date
bank_clearance.include_pos_transactions = 1
bank_clearance.get_payment_entries()
self.assertNotEqual(len(bank_clearance.payment_entries), 0)
for payment in bank_clearance.payment_entries:
if payment.payment_entry == sales_invoice.name:
payment.clearance_date = date
bank_clearance.update_clearance_date()
si_clearance_date = frappe.db.get_value(
"Sales Invoice Payment",
{"parent": sales_invoice.name, "account": bank_clearance.account},
"clearance_date",
)
self.assertEqual(si_clearance_date, date)
def clear_payment_entries():
frappe.db.delete("Payment Entry")
def clear_pos_sales_invoices():
frappe.db.delete("Sales Invoice", {"is_pos": 1})
@if_lending_app_installed
def clear_loan_transactions():
for dt in [
@@ -115,9 +158,45 @@ def add_transactions():
def make_payment_entry():
pi = make_purchase_invoice(supplier="_Test Supplier", qty=1, rate=690)
from erpnext.buying.doctype.supplier.test_supplier import create_supplier
supplier = create_supplier(supplier_name="_Test Supplier")
pi = make_purchase_invoice(
supplier=supplier,
supplier_warehouse="_Test Warehouse - _TC",
expense_account="Cost of Goods Sold - _TC",
uom="Nos",
qty=1,
rate=690,
)
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank Clearance - _TC")
pe.reference_no = "Conrad Oct 18"
pe.reference_date = "2018-10-24"
pe.insert()
pe.submit()
def make_pos_sales_invoice():
from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import (
make_customer,
)
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 Clearance - _TC"}
)
mode_of_payment.save()
customer = make_customer(customer="_Test Customer")
si = create_sales_invoice(customer=customer, item="_Test Item", is_pos=1, qty=1, rate=1000, do_not_save=1)
si.set("payments", [])
si.append(
"payments", {"mode_of_payment": "Cash", "account": "_Test Bank Clearance - _TC", "amount": 1000}
)
si.insert()
si.submit()
return si

View File

@@ -59,6 +59,10 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
);
frm.add_custom_button(__("Auto Reconcile"), function () {
if (!frm.doc.bank_account) {
frappe.msgprint(__("Please select Bank Account"));
return;
}
frappe.call({
method: "erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.auto_reconcile_vouchers",
args: {

View File

@@ -495,12 +495,12 @@ def check_matching(
bank_account,
company,
transaction,
document_types,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
document_types=None,
from_date=None,
to_date=None,
filter_by_reference_date=None,
from_reference_date=None,
to_reference_date=None,
):
exact_match = True if "exact_match" in document_types else False
@@ -540,14 +540,14 @@ def get_queries(
bank_account,
company,
transaction,
document_types,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
exact_match,
common_filters,
document_types=None,
from_date=None,
to_date=None,
filter_by_reference_date=None,
from_reference_date=None,
to_reference_date=None,
exact_match=None,
common_filters=None,
):
# get queries to get matching vouchers
account_from_to = "paid_to" if transaction.deposit > 0.0 else "paid_from"
@@ -580,15 +580,15 @@ def get_matching_queries(
bank_account,
company,
transaction,
document_types,
exact_match,
account_from_to,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
common_filters,
document_types=None,
exact_match=None,
account_from_to=None,
from_date=None,
to_date=None,
filter_by_reference_date=None,
from_reference_date=None,
to_reference_date=None,
common_filters=None,
):
queries = []
currency = get_account_currency(bank_account)

View File

@@ -120,52 +120,66 @@ frappe.ui.form.on("Bank Statement Import", {
},
show_import_status(frm) {
let import_log = JSON.parse(frm.doc.statement_import_log || "[]");
let successful_records = import_log.filter((log) => log.success);
let failed_records = import_log.filter((log) => !log.success);
if (successful_records.length === 0) return;
if (frm.doc.status == "Pending") return;
let message;
if (failed_records.length === 0) {
let message_args = [successful_records.length];
if (frm.doc.import_type === "Insert New Records") {
message =
successful_records.length > 1
? __("Successfully imported {0} records.", message_args)
: __("Successfully imported {0} record.", message_args);
} else {
message =
successful_records.length > 1
? __("Successfully updated {0} records.", message_args)
: __("Successfully updated {0} record.", message_args);
}
} else {
let message_args = [successful_records.length, import_log.length];
if (frm.doc.import_type === "Insert New Records") {
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} 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} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",
message_args
);
}
}
frm.dashboard.set_headline(message);
frappe.call({
method: "erpnext.accounts.doctype.bank_statement_import.bank_statement_import.get_import_status",
args: {
docname: frm.doc.name,
},
callback: function (r) {
let successful_records = cint(r.message.success);
let failed_records = cint(r.message.failed);
let total_records = cint(r.message.total_records);
if (!total_records) {
return;
}
let message;
if (failed_records === 0) {
let message_args = [successful_records];
if (frm.doc.import_type === "Insert New Records") {
message =
successful_records > 1
? __("Successfully imported {0} records.", message_args)
: __("Successfully imported {0} record.", message_args);
} else {
message =
successful_records > 1
? __("Successfully updated {0} records.", message_args)
: __("Successfully updated {0} record.", message_args);
}
} else {
let message_args = [successful_records, total_records];
if (frm.doc.import_type === "Insert New Records") {
message =
successful_records > 1
? __(
"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
);
} else {
message =
successful_records > 1
? __(
"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
);
}
}
frm.dashboard.set_headline(message);
},
});
},
show_report_error_button(frm) {
@@ -287,7 +301,7 @@ frappe.ui.form.on("Bank Statement Import", {
// method: 'frappe.core.doctype.data_import.data_import.get_preview_from_template',
show_import_preview(frm, preview_data) {
let import_log = JSON.parse(frm.doc.statement_import_log || "[]");
let import_log = preview_data.import_log;
if (frm.import_preview && frm.import_preview.doctype === frm.doc.reference_doctype) {
frm.import_preview.preview_data = preview_data;
@@ -326,6 +340,15 @@ frappe.ui.form.on("Bank Statement Import", {
);
},
export_import_log(frm) {
open_url_post(
"/api/method/erpnext.accounts.doctype.bank_statement_import.bank_statement_import.download_import_log",
{
data_import_name: frm.doc.name,
}
);
},
show_import_warnings(frm, preview_data) {
let columns = preview_data.columns;
let warnings = JSON.parse(frm.doc.template_warnings || "[]");
@@ -401,49 +424,50 @@ frappe.ui.form.on("Bank Statement Import", {
frm.trigger("show_import_log");
},
show_import_log(frm) {
let import_log = JSON.parse(frm.doc.statement_import_log || "[]");
let logs = import_log;
frm.toggle_display("import_log", false);
frm.toggle_display("import_log_section", logs.length > 0);
render_import_log(frm) {
frappe.call({
method: "erpnext.accounts.doctype.bank_statement_import.bank_statement_import.get_import_logs",
args: {
docname: frm.doc.name,
},
callback: function (r) {
let logs = r.message;
if (logs.length === 0) {
frm.get_field("import_log_preview").$wrapper.empty();
return;
}
if (logs.length === 0) return;
let rows = logs
.map((log) => {
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>`,
]);
} else {
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>` : "";
return title + message;
})
.join("");
let id = frappe.dom.get_unique_id();
html = `${messages}
frm.toggle_display("import_log_section", true);
let rows = logs
.map((log) => {
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>`,
]);
} else {
html = __("Successfully updated {0}", [
`<span class="underline">${frappe.utils.get_form_link(
frm.doc.reference_doctype,
log.docname,
true
)}<span>`,
]);
}
} else {
let messages = JSON.parse(log.messages || "[]")
.map((m) => {
let title = m.title ? `<strong>${m.title}</strong>` : "";
let message = m.message ? `<div>${m.message}</div>` : "";
return title + message;
})
.join("");
let id = frappe.dom.get_unique_id();
html = `${messages}
<button class="btn btn-default btn-xs" type="button" data-toggle="collapse" data-target="#${id}" aria-expanded="false" aria-controls="${id}" style="margin-top: 15px;">
${__("Show Traceback")}
</button>
@@ -452,16 +476,16 @@ frappe.ui.form.on("Bank Statement Import", {
<pre>${log.exception}</pre>
</div>
</div>`;
}
let indicator_color = log.success ? "green" : "red";
let title = log.success ? __("Success") : __("Failure");
}
let indicator_color = log.success ? "green" : "red";
let title = log.success ? __("Success") : __("Failure");
if (frm.doc.show_failed_logs && log.success) {
return "";
}
if (frm.doc.show_failed_logs && log.success) {
return "";
}
return `<tr>
<td>${log.row_indexes.join(", ")}</td>
return `<tr>
<td>${JSON.parse(log.row_indexes).join(", ")}</td>
<td>
<div class="indicator ${indicator_color}">${title}</div>
</td>
@@ -469,16 +493,16 @@ frappe.ui.form.on("Bank Statement Import", {
${html}
</td>
</tr>`;
})
.join("");
})
.join("");
if (!rows && frm.doc.show_failed_logs) {
rows = `<tr><td class="text-center text-muted" colspan=3>
if (!rows && frm.doc.show_failed_logs) {
rows = `<tr><td class="text-center text-muted" colspan=3>
${__("No failed logs")}
</td></tr>`;
}
}
frm.get_field("import_log_preview").$wrapper.html(`
frm.get_field("import_log_preview").$wrapper.html(`
<table class="table table-bordered">
<tr class="text-muted">
<th width="10%">${__("Row Number")}</th>
@@ -488,5 +512,34 @@ frappe.ui.form.on("Bank Statement Import", {
${rows}
</table>
`);
},
});
},
show_import_log(frm) {
frm.toggle_display("import_log_section", false);
if (frm.is_new() || frm.import_in_progress) {
return;
}
frappe.call({
method: "frappe.client.get_count",
args: {
doctype: "Data Import Log",
filters: {
data_import: frm.doc.name,
},
},
callback: function (r) {
let count = r.message;
if (count < 5000) {
frm.trigger("render_import_log");
} else {
frm.toggle_display("import_log_section", false);
frm.add_custom_button(__("Export Import Log"), () => frm.trigger("export_import_log"));
}
},
});
},
});

View File

@@ -11,6 +11,8 @@
"bank_account",
"bank",
"column_break_4",
"custom_delimiters",
"delimiter_options",
"google_sheets_url",
"refresh_google_sheet",
"html_5",
@@ -24,7 +26,6 @@
"section_import_preview",
"import_preview",
"import_log_section",
"statement_import_log",
"show_failed_logs",
"import_log_preview",
"reference_doctype",
@@ -194,15 +195,23 @@
"fieldtype": "Column Break"
},
{
"fieldname": "statement_import_log",
"fieldtype": "Code",
"label": "Statement Import Log",
"options": "JSON"
"default": "0",
"fieldname": "custom_delimiters",
"fieldtype": "Check",
"label": "Custom delimiters"
},
{
"default": ",;\\t|",
"depends_on": "custom_delimiters",
"description": "If your CSV uses a different delimiter, add that character here, ensuring no spaces or additional characters are included.",
"fieldname": "delimiter_options",
"fieldtype": "Data",
"label": "Delimiter options"
}
],
"hide_toolbar": 1,
"links": [],
"modified": "2022-09-07 11:11:40.293317",
"modified": "2024-06-25 17:32:07.658250",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Import",

View File

@@ -31,13 +31,14 @@ class BankStatementImport(DataImport):
bank: DF.Link | None
bank_account: DF.Link
company: DF.Link
custom_delimiters: DF.Check
delimiter_options: DF.Data | None
google_sheets_url: DF.Data | None
import_file: DF.Attach | None
import_type: DF.Literal["", "Insert New Records", "Update Existing Records"]
mute_emails: DF.Check
reference_doctype: DF.Link
show_failed_logs: DF.Check
statement_import_log: DF.Code | None
status: DF.Literal["Pending", "Success", "Partial Success", "Error"]
submit_after_import: DF.Check
template_options: DF.Code | None
@@ -120,6 +121,11 @@ def download_errored_template(data_import_name):
data_import.export_errored_rows()
@frappe.whitelist()
def download_import_log(data_import_name):
return frappe.get_doc("Bank Statement Import", data_import_name).download_import_log()
def parse_data_from_template(raw_data):
data = []
@@ -241,6 +247,47 @@ def write_xlsx(data, sheet_name, wb=None, column_widths=None, file_path=None):
return True
@frappe.whitelist()
def get_import_status(docname):
import_status = {}
data_import = frappe.get_doc("Bank Statement Import", docname)
import_status["status"] = data_import.status
logs = frappe.get_all(
"Data Import Log",
fields=["count(*) as count", "success"],
filters={"data_import": docname},
group_by="success",
)
total_payload_count = 0
for log in logs:
total_payload_count += log.get("count", 0)
if log.get("success"):
import_status["success"] = log.get("count")
else:
import_status["failed"] = log.get("count")
import_status["total_records"] = total_payload_count
return import_status
@frappe.whitelist()
def get_import_logs(docname: str):
frappe.has_permission("Bank Statement Import")
return frappe.get_all(
"Data Import Log",
fields=["success", "docname", "messages", "exception", "row_indexes"],
filters={"data_import": docname},
limit_page_length=5000,
order_by="log_index",
)
@frappe.whitelist()
def upload_bank_statement(**args):
args = frappe._dict(args)

View File

@@ -68,6 +68,9 @@ class AutoMatchbyAccountIBAN:
party, or_filters=or_filters, pluck="name", limit_page_length=1
)
if "bank_ac_no" in or_filters:
or_filters["bank_account_no"] = or_filters.pop("bank_ac_no")
if party_result:
result = (
party,

View File

@@ -142,6 +142,8 @@ class Budget(Document):
def validate_expense_against_budget(args, expense_amount=0):
args = frappe._dict(args)
if not frappe.get_all("Budget", limit=1):
return
if args.get("company") and not args.fiscal_year:
args.fiscal_year = get_fiscal_year(args.get("posting_date"), company=args.get("company"))[0]
@@ -149,6 +151,9 @@ def validate_expense_against_budget(args, expense_amount=0):
"Company", args.get("company"), "exception_budget_approver_role"
)
if not frappe.get_cached_value("Budget", {"fiscal_year": args.fiscal_year, "company": args.company}): # nosec
return
if not args.account:
args.account = args.get("expense_account")
@@ -175,12 +180,12 @@ def validate_expense_against_budget(args, expense_amount=0):
if (
args.get(budget_against)
and args.account
and frappe.db.get_value("Account", {"name": args.account, "root_type": "Expense"})
and (frappe.get_cached_value("Account", 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"])
lft, rgt = frappe.get_cached_value(doctype, args.get(budget_against), ["lft", "rgt"])
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

View File

@@ -1,94 +1,42 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2016-05-16 11:54:09.286135",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"actions": [],
"creation": "2016-05-16 11:54:09.286135",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"account",
"budget_amount"
],
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
"fieldname": "account",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Account",
"options": "Account",
"reqd": 1,
"search_index": 1
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "budget_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Budget Amount",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
"fieldname": "budget_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Budget Amount",
"options": "Company:company:default_currency",
"reqd": 1
}
],
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2017-01-02 17:02:53.339420",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget Account",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_seen": 0
],
"istable": 1,
"links": [],
"modified": "2024-03-04 15:43:27.016947",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget Account",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@@ -47,9 +47,11 @@ def validate_columns(data):
no_of_columns = max([len(d) for d in data])
if no_of_columns > 8:
if no_of_columns != 8:
frappe.throw(
_("More columns found than expected. Please compare the uploaded file with standard template"),
_(
"Columns are not according to template. Please compare the uploaded file with standard template"
),
title=(_("Wrong Template")),
)

View File

@@ -4,7 +4,7 @@
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import add_days, format_date, getdate
from frappe.utils import add_days, flt, format_date, getdate
class MainCostCenterCantBeChild(frappe.ValidationError):
@@ -60,7 +60,7 @@ class CostCenterAllocation(Document):
self.validate_child_cost_centers()
def validate_total_allocation_percentage(self):
total_percentage = sum([d.percentage for d in self.get("allocation_percentages", [])])
total_percentage = sum([flt(d.percentage) for d in self.get("allocation_percentages", [])])
if total_percentage != 100:
frappe.throw(_("Total percentage against cost centers should be 100"), WrongPercentageAllocation)

View File

@@ -22,8 +22,10 @@ class TestCostCenterAllocation(unittest.TestCase):
cost_centers = [
"Main Cost Center 1",
"Main Cost Center 2",
"Main Cost Center 3",
"Sub Cost Center 1",
"Sub Cost Center 2",
"Sub Cost Center 3",
]
for cc in cost_centers:
create_cost_center(cost_center_name=cc, company="_Test Company")
@@ -36,7 +38,7 @@ class TestCostCenterAllocation(unittest.TestCase):
)
jv = make_journal_entry(
"_Test Cash - _TC", "Sales - _TC", 100, cost_center="Main Cost Center 1 - _TC", submit=True
"Cash - _TC", "Sales - _TC", 100, cost_center="Main Cost Center 1 - _TC", submit=True
)
expected_values = [["Sub Cost Center 1 - _TC", 0.0, 60], ["Sub Cost Center 2 - _TC", 0.0, 40]]
@@ -120,7 +122,7 @@ class TestCostCenterAllocation(unittest.TestCase):
def test_valid_from_based_on_existing_gle(self):
# GLE posted against Sub Cost Center 1 on today
jv = make_journal_entry(
"_Test Cash - _TC",
"Cash - _TC",
"Sales - _TC",
100,
cost_center="Main Cost Center 1 - _TC",
@@ -141,6 +143,53 @@ class TestCostCenterAllocation(unittest.TestCase):
jv.cancel()
def test_multiple_cost_center_allocation_on_same_main_cost_center(self):
coa1 = create_cost_center_allocation(
"_Test Company",
"Main Cost Center 3 - _TC",
{"Sub Cost Center 1 - _TC": 30, "Sub Cost Center 2 - _TC": 30, "Sub Cost Center 3 - _TC": 40},
valid_from=add_days(today(), -5),
)
coa2 = create_cost_center_allocation(
"_Test Company",
"Main Cost Center 3 - _TC",
{"Sub Cost Center 1 - _TC": 50, "Sub Cost Center 2 - _TC": 50},
valid_from=add_days(today(), -1),
)
jv = make_journal_entry(
"Cash - _TC",
"Sales - _TC",
100,
cost_center="Main Cost Center 3 - _TC",
posting_date=today(),
submit=True,
)
expected_values = {"Sub Cost Center 1 - _TC": 50, "Sub Cost Center 2 - _TC": 50}
gle = frappe.qb.DocType("GL Entry")
gl_entries = (
frappe.qb.from_(gle)
.select(gle.cost_center, gle.debit, gle.credit)
.where(gle.voucher_type == "Journal Entry")
.where(gle.voucher_no == jv.name)
.where(gle.account == "Sales - _TC")
.orderby(gle.cost_center)
).run(as_dict=1)
self.assertTrue(gl_entries)
for gle in gl_entries:
self.assertTrue(gle.cost_center in expected_values)
self.assertEqual(gle.debit, 0)
self.assertEqual(gle.credit, expected_values[gle.cost_center])
coa1.cancel()
coa2.cancel()
jv.cancel()
def create_cost_center_allocation(
company,

View File

@@ -141,7 +141,19 @@ class Dunning(AccountsController):
def on_cancel(self):
super().on_cancel()
self.ignore_linked_doctypes = ["GL Entry"]
self.ignore_linked_doctypes = [
"GL Entry",
"Stock Ledger Entry",
"Repost Item Valuation",
"Repost Payment Ledger",
"Repost Payment Ledger Items",
"Repost Accounting Ledger",
"Repost Accounting Ledger Items",
"Unreconcile Payment",
"Unreconcile Payment Entries",
"Payment Ledger Entry",
"Serial and Batch Bundle",
]
def resolve_dunning(doc, state):

View File

@@ -85,18 +85,16 @@ frappe.ui.form.on("Exchange Rate Revaluation", {
},
make_jv: function (frm) {
let revaluation_journal = null;
let zero_balance_journal = null;
frappe.call({
method: "make_jv_entries",
doc: frm.doc,
freeze: true,
freeze_message: "Making Journal Entries...",
freeze_message: __("Creating Journal Entries..."),
callback: function (r) {
if (r.message) {
let response = r.message;
if (response["revaluation_jv"] || response["zero_balance_jv"]) {
frappe.msgprint(__("Journals have been created"));
frappe.msgprint(__("Journal entries have been created"));
}
}
},

View File

@@ -82,7 +82,7 @@
"icon": "fa fa-calendar",
"idx": 1,
"links": [],
"modified": "2024-01-30 12:35:38.645968",
"modified": "2024-05-27 17:29:55.560840",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Fiscal Year",
@@ -127,6 +127,10 @@
{
"read": 1,
"role": "Stock Manager"
},
{
"read": 1,
"role": "Auditor"
}
],
"show_name_in_global_search": 1,

View File

@@ -179,7 +179,8 @@
"fieldname": "voucher_detail_no",
"fieldtype": "Data",
"label": "Voucher Detail No",
"read_only": 1
"read_only": 1,
"search_index": 1
},
{
"fieldname": "project",
@@ -290,7 +291,7 @@
"idx": 1,
"in_create": 1,
"links": [],
"modified": "2023-12-18 15:38:14.006208",
"modified": "2024-07-02 14:31:51.496466",
"modified_by": "Administrator",
"module": "Accounts",
"name": "GL Entry",
@@ -322,7 +323,7 @@
],
"quick_entry": 1,
"search_fields": "voucher_no,account,posting_date,against_voucher",
"sort_field": "modified",
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -32,8 +32,6 @@ class GLEntry(Document):
account: DF.Link | None
account_currency: DF.Link | None
against: DF.Text | None
against_link: DF.DynamicLink | None
against_type: DF.Link | None
against_voucher: DF.DynamicLink | None
against_voucher_type: DF.Link | None
company: DF.Link | None
@@ -328,7 +326,7 @@ def update_outstanding_amt(
party_condition = ""
if against_voucher_type == "Sales Invoice":
party_account = frappe.db.get_value(against_voucher_type, against_voucher, "debit_to")
party_account = frappe.get_cached_value(against_voucher_type, against_voucher, "debit_to")
account_condition = f"and account in ({frappe.db.escape(account)}, {frappe.db.escape(party_account)})"
else:
account_condition = f" and account = {frappe.db.escape(account)}"
@@ -392,7 +390,9 @@ 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.get_cached_value(
"Accounts Settings", None, "frozen_accounts_modifier"
)
if not frozen_accounts_modifier:
frappe.throw(_("Account {0} is frozen").format(account))

View File

@@ -25,30 +25,6 @@ frappe.ui.form.on("Journal Entry", {
refresh: function (frm) {
erpnext.toggle_naming_series();
if (frm.doc.repost_required && frm.doc.docstatus === 1) {
frm.set_intro(
__(
"Accounting entries for this Journal Entry need to be reposted. Please click on 'Repost' button to update."
)
);
frm.add_custom_button(__("Repost Accounting Entries"), () => {
frm.call({
doc: frm.doc,
method: "repost_accounting_entries",
freeze: true,
freeze_message: __("Reposting..."),
callback: (r) => {
if (!r.exc) {
frappe.msgprint(__("Accounting Entries are reposted."));
frm.refresh();
}
},
});
})
.removeClass("btn-default")
.addClass("btn-warning");
}
if (frm.doc.docstatus > 0) {
frm.add_custom_button(
__("Ledger"),
@@ -384,21 +360,23 @@ erpnext.accounts.JournalEntry = class JournalEntry extends frappe.ui.form.Contro
accounts_add(doc, cdt, cdn) {
var row = frappe.get_doc(cdt, cdn);
row.exchange_rate = 1;
$.each(doc.accounts, function (i, d) {
if (d.account && d.party && d.party_type) {
row.account = d.account;
row.party = d.party;
row.party_type = d.party_type;
row.exchange_rate = d.exchange_rate;
}
});
// set difference
if (doc.difference) {
if (doc.difference > 0) {
row.credit_in_account_currency = doc.difference;
row.credit_in_account_currency = doc.difference / row.exchange_rate;
row.credit = doc.difference;
} else {
row.debit_in_account_currency = -doc.difference;
row.debit_in_account_currency = -doc.difference / row.exchange_rate;
row.debit = -doc.difference;
}
}
@@ -704,6 +682,7 @@ $.extend(erpnext.journal_entry, {
callback: function (r) {
if (r.message) {
$.extend(d, r.message);
erpnext.journal_entry.set_amount_on_last_row(frm, dt, dn);
erpnext.journal_entry.set_debit_credit_in_company_currency(frm, dt, dn);
refresh_field("accounts");
}
@@ -711,4 +690,26 @@ $.extend(erpnext.journal_entry, {
});
}
},
set_amount_on_last_row: function (frm, dt, dn) {
let row = locals[dt][dn];
let length = frm.doc.accounts.length;
if (row.idx != length) return;
let difference = frm.doc.accounts.reduce((total, row) => {
if (row.idx == length) return total;
return total + row.debit - row.credit;
}, 0);
if (difference) {
if (difference > 0) {
row.credit_in_account_currency = difference / row.exchange_rate;
row.credit = difference;
} else {
row.debit_in_account_currency = -difference / row.exchange_rate;
row.debit = -difference;
}
}
refresh_field("accounts");
},
});

View File

@@ -64,8 +64,7 @@
"stock_entry",
"subscription_section",
"auto_repeat",
"amended_from",
"repost_required"
"amended_from"
],
"fields": [
{
@@ -544,15 +543,6 @@
"label": "Is System Generated",
"no_copy": 1,
"read_only": 1
},
{
"default": "0",
"fieldname": "repost_required",
"fieldtype": "Check",
"hidden": 1,
"label": "Repost Required",
"print_hide": 1,
"read_only": 1
}
],
"icon": "fa fa-file-text",
@@ -567,7 +557,7 @@
"table_fieldname": "payment_entries"
}
],
"modified": "2023-11-23 12:11:04.128015",
"modified": "2024-07-18 15:32:29.413598",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry",
@@ -618,4 +608,4 @@
"states": [],
"title_field": "title",
"track_changes": 1
}
}

View File

@@ -47,9 +47,7 @@ class JournalEntry(AccountsController):
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.journal_entry_account.journal_entry_account import (
JournalEntryAccount,
)
from erpnext.accounts.doctype.journal_entry_account.journal_entry_account import JournalEntryAccount
accounts: DF.Table[JournalEntryAccount]
amended_from: DF.Link | None
@@ -194,15 +192,18 @@ class JournalEntry(AccountsController):
self.update_asset_value()
self.update_inter_company_jv()
self.update_invoice_discounting()
self.update_booked_depreciation()
def on_update_after_submit(self):
if hasattr(self, "repost_required"):
self.needs_repost = self.check_if_fields_updated(
fields_to_check=[], child_tables={"accounts": []}
)
if self.needs_repost:
self.validate_for_repost()
self.db_set("repost_required", self.needs_repost)
# Flag will be set on Reconciliation
# Reconciliation tool will anyways repost ledger entries. So, no need to check and do implicit repost.
if self.flags.get("ignore_reposting_on_reconciliation"):
return
self.needs_repost = self.check_if_fields_updated(fields_to_check=[], child_tables={"accounts": []})
if self.needs_repost:
self.validate_for_repost()
self.repost_accounting_entries()
def on_cancel(self):
# References for this Journal are removed on the `on_cancel` event in accounts_controller
@@ -225,6 +226,7 @@ class JournalEntry(AccountsController):
self.unlink_inter_company_jv()
self.unlink_asset_adjustment_entry()
self.update_invoice_discounting()
self.update_booked_depreciation(1)
def get_title(self):
return self.pay_to_recd_from or self.accounts[0].account
@@ -439,6 +441,25 @@ class JournalEntry(AccountsController):
if status:
inv_disc_doc.set_status(status=status)
def update_booked_depreciation(self, cancel=0):
for d in self.get("accounts"):
if (
self.voucher_type == "Depreciation Entry"
and d.reference_type == "Asset"
and d.reference_name
and frappe.get_cached_value("Account", d.account, "root_type") == "Expense"
and d.debit
):
asset = frappe.get_doc("Asset", d.reference_name)
for fb_row in asset.get("finance_books"):
if fb_row.finance_book == self.finance_book:
if cancel:
fb_row.total_number_of_booked_depreciations -= 1
else:
fb_row.total_number_of_booked_depreciations += 1
fb_row.db_update()
break
def unlink_advance_entry_reference(self):
for d in self.get("accounts"):
if d.is_advance == "Yes" and d.reference_type in ("Sales Invoice", "Purchase Invoice"):
@@ -1031,6 +1052,17 @@ class JournalEntry(AccountsController):
def build_gl_map(self):
gl_map = []
company_currency = erpnext.get_company_currency(self.company)
if self.multi_currency:
for row in self.get("accounts"):
if row.account_currency != company_currency:
self.currency = row.account_currency
self.conversion_rate = row.exchange_rate
break
else:
self.currency = company_currency
for d in self.get("accounts"):
if d.debit or d.credit or (self.voucher_type == "Exchange Gain Or Loss"):
r = [d.user_remark, self.remark]

View File

@@ -454,12 +454,9 @@ class TestJournalEntry(unittest.TestCase):
# Change cost center for bank account - _Test Cost Center for BS Account
create_cost_center(cost_center_name="_Test Cost Center for BS Account", company="_Test Company")
jv.accounts[1].cost_center = "_Test Cost Center for BS Account - _TC"
# Ledger reposted implicitly upon 'Update After Submit'
jv.save()
# Check if repost flag gets set on update after submit
self.assertTrue(jv.repost_required)
jv.repost_accounting_entries()
# Check GL entries after reposting
jv.load_from_db()
self.expected_gle[0]["cost_center"] = "_Test Cost Center for BS Account - _TC"
@@ -481,6 +478,60 @@ class TestJournalEntry(unittest.TestCase):
for field in self.fields:
self.assertEqual(self.expected_gle[i][field], gl_entries[i][field])
def test_negative_debit_and_credit_with_same_account_head(self):
from erpnext.accounts.general_ledger import process_gl_map
# Create JV with defaut cost center - _Test Cost Center
frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0)
jv = make_journal_entry("_Test Bank - _TC", "_Test Bank - _TC", 100 * -1, save=True)
jv.append(
"accounts",
{
"account": "_Test Cash - _TC",
"debit": 100 * -1,
"credit": 100 * -1,
"debit_in_account_currency": 100 * -1,
"credit_in_account_currency": 100 * -1,
"exchange_rate": 1,
},
)
jv.flags.ignore_validate = True
jv.save()
self.assertEqual(len(jv.accounts), 3)
gl_map = jv.build_gl_map()
for row in gl_map:
if row.account == "_Test Cash - _TC":
self.assertEqual(row.debit_in_account_currency, 100 * -1)
self.assertEqual(row.credit_in_account_currency, 100 * -1)
gl_map = process_gl_map(gl_map, False)
for row in gl_map:
if row.account == "_Test Cash - _TC":
self.assertEqual(row.debit_in_account_currency, 100)
self.assertEqual(row.credit_in_account_currency, 100)
def test_transaction_exchange_rate_on_journals(self):
jv = make_journal_entry("_Test Bank - _TC", "_Test Receivable USD - _TC", 100, save=False)
jv.accounts[0].update({"debit_in_account_currency": 8500, "exchange_rate": 1})
jv.accounts[1].update({"party_type": "Customer", "party": "_Test Customer USD", "exchange_rate": 85})
jv.submit()
actual = frappe.db.get_all(
"GL Entry",
filters={"voucher_no": jv.name, "is_cancelled": 0},
fields=["account", "transaction_exchange_rate"],
order_by="account",
)
expected = [
{"account": "_Test Bank - _TC", "transaction_exchange_rate": 1.0},
{"account": "_Test Receivable USD - _TC", "transaction_exchange_rate": 85.0},
]
self.assertEqual(expected, actual)
def make_journal_entry(
account1,

View File

@@ -28,7 +28,12 @@ frappe.ui.form.on("Opening Invoice Creation Tool", {
frm.refresh_fields();
frm.page.clear_indicator();
frm.dashboard.hide_progress();
frappe.msgprint(__("Opening {0} Invoices created", [frm.doc.invoice_type]));
if (frm.doc.invoice_type == "Sales") {
frappe.msgprint(__("Opening Sales Invoices have been created."));
} else {
frappe.msgprint(__("Opening Purchase Invoices have been created."));
}
},
1500,
data.title
@@ -48,12 +53,19 @@ frappe.ui.form.on("Opening Invoice Creation Tool", {
!frm.doc.import_in_progress && frm.trigger("make_dashboard");
frm.page.set_primary_action(__("Create Invoices"), () => {
let btn_primary = frm.page.btn_primary.get(0);
let freeze_message;
if (frm.doc.invoice_type == "Sales") {
freeze_message = __("Creating Sales Invoices ...");
} else {
freeze_message = __("Creating Purchase Invoices ...");
}
return frm.call({
doc: frm.doc,
btn: $(btn_primary),
method: "make_invoices",
freeze: 1,
freeze_message: __("Creating {0} Invoice", [frm.doc.invoice_type]),
freeze_message: freeze_message,
});
});

View File

@@ -35,6 +35,11 @@ frappe.ui.form.on("Payment Entry", {
var account_types = ["Pay", "Internal Transfer"].includes(frm.doc.payment_type)
? ["Bank", "Cash"]
: [frappe.boot.party_account_types[frm.doc.party_type]];
if (frm.doc.party_type == "Shareholder") {
account_types.push("Equity");
}
return {
filters: {
account_type: ["in", account_types],
@@ -90,6 +95,9 @@ frappe.ui.form.on("Payment Entry", {
var account_types = ["Receive", "Internal Transfer"].includes(frm.doc.payment_type)
? ["Bank", "Cash"]
: [frappe.boot.party_account_types[frm.doc.party_type]];
if (frm.doc.party_type == "Shareholder") {
account_types.push("Equity");
}
return {
filters: {
account_type: ["in", account_types],
@@ -165,8 +173,25 @@ frappe.ui.form.on("Payment Entry", {
filters: filters,
};
});
},
frm.set_query("sales_taxes_and_charges_template", function () {
return {
filters: {
company: frm.doc.company,
disabled: false,
},
};
});
frm.set_query("purchase_taxes_and_charges_template", function () {
return {
filters: {
company: frm.doc.company,
disabled: false,
},
};
});
},
refresh: function (frm) {
erpnext.hide_company(frm);
frm.events.hide_unhide_fields(frm);
@@ -213,7 +238,7 @@ frappe.ui.form.on("Payment Entry", {
hide_unhide_fields: function (frm) {
var company_currency = frm.doc.company
? frappe.get_doc(":Company", frm.doc.company).default_currency
? frappe.get_doc(":Company", frm.doc.company)?.default_currency
: "";
frm.toggle_display(
@@ -280,7 +305,7 @@ frappe.ui.form.on("Payment Entry", {
set_dynamic_labels: function (frm) {
var company_currency = frm.doc.company
? frappe.get_doc(":Company", frm.doc.company).default_currency
? frappe.get_doc(":Company", frm.doc.company)?.default_currency
: "";
frm.set_currency_labels(
@@ -360,7 +385,15 @@ frappe.ui.form.on("Payment Entry", {
payment_type: function (frm) {
if (frm.doc.payment_type == "Internal Transfer") {
$.each(
["party", "party_balance", "paid_from", "paid_to", "references", "total_allocated_amount"],
[
"party",
"party_type",
"party_balance",
"paid_from",
"paid_to",
"references",
"total_allocated_amount",
],
function (i, field) {
frm.set_value(field, null);
}
@@ -395,6 +428,12 @@ frappe.ui.form.on("Payment Entry", {
return {
query: "erpnext.controllers.queries.employee_query",
};
} else if (frm.doc.party_type == "Shareholder") {
return {
filters: {
company: frm.doc.company,
},
};
}
});
@@ -627,7 +666,7 @@ frappe.ui.form.on("Payment Entry", {
frm.set_value("source_exchange_rate", 1);
} else if (frm.doc.paid_from) {
if (["Internal Transfer", "Pay"].includes(frm.doc.payment_type)) {
let company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
let company_currency = frappe.get_doc(":Company", frm.doc.company)?.default_currency;
frappe.call({
method: "erpnext.setup.utils.get_exchange_rate",
args: {

View File

@@ -20,6 +20,7 @@
"party",
"party_name",
"book_advance_payments_in_separate_party_account",
"reconcile_on_advance_payment_date",
"column_break_11",
"bank_account",
"party_bank_account",
@@ -88,6 +89,7 @@
"custom_remarks",
"remarks",
"base_in_words",
"is_opening",
"column_break_16",
"letter_head",
"print_heading",
@@ -750,6 +752,7 @@
"fieldtype": "Check",
"hidden": 1,
"label": "Book Advance Payments in Separate Party Account",
"no_copy": 1,
"read_only": 1
},
{
@@ -765,6 +768,26 @@
"label": "In Words",
"print_hide": 1,
"read_only": 1
},
{
"default": "0",
"fetch_from": "company.reconcile_on_advance_payment_date",
"fieldname": "reconcile_on_advance_payment_date",
"fieldtype": "Check",
"hidden": 1,
"label": "Reconcile on Advance Payment Date",
"no_copy": 1,
"read_only": 1
},
{
"default": "No",
"depends_on": "eval: doc.book_advance_payments_in_separate_party_account == 1",
"fieldname": "is_opening",
"fieldtype": "Select",
"label": "Is Opening",
"options": "No\nYes",
"print_hide": 1,
"search_index": 1
}
],
"index_web_pages_for_search": 1,
@@ -778,7 +801,7 @@
"table_fieldname": "payment_entries"
}
],
"modified": "2024-04-11 11:25:07.366347",
"modified": "2024-05-31 17:07:06.197249",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",

View File

@@ -37,7 +37,6 @@ from erpnext.accounts.utils import (
get_account_currency,
get_balance_on,
get_outstanding_invoices,
get_party_types_from_account_type,
)
from erpnext.controllers.accounts_controller import (
AccountsController,
@@ -76,14 +75,12 @@ class PaymentEntry(AccountsController):
self.setup_party_account_field()
self.set_missing_values()
self.set_liability_account()
self.validate_advance_account_currency()
self.set_missing_ref_details(force=True)
self.validate_payment_type()
self.validate_party_details()
self.set_exchange_rate()
self.validate_mandatory()
self.validate_reference_documents()
self.set_tax_withholding()
self.set_amounts()
self.validate_amounts()
self.apply_taxes()
@@ -97,6 +94,7 @@ class PaymentEntry(AccountsController):
self.validate_allocated_amount()
self.validate_paid_invoices()
self.ensure_supplier_is_not_blocked()
self.set_tax_withholding()
self.set_status()
self.set_total_in_words()
@@ -116,11 +114,13 @@ class PaymentEntry(AccountsController):
self.book_advance_payments_in_separate_party_account = False
if self.party_type not in ("Customer", "Supplier"):
self.is_opening = "No"
return
if not frappe.db.get_value(
"Company", self.company, "book_advance_payments_in_separate_party_account"
):
self.is_opening = "No"
return
# Important to set this flag for the gl building logic to work properly
@@ -132,6 +132,7 @@ class PaymentEntry(AccountsController):
if (account_type == "Payable" and self.party_type == "Customer") or (
account_type == "Receivable" and self.party_type == "Supplier"
):
self.is_opening = "No"
return
if self.references:
@@ -141,11 +142,24 @@ class PaymentEntry(AccountsController):
# If there are referencers other than `allowed_types`, treat this as a normal payment entry
if reference_types - allowed_types:
self.book_advance_payments_in_separate_party_account = False
self.is_opening = "No"
return
liability_account = get_party_account(
self.party_type, self.party, self.company, include_advance=True
)[1]
accounts = get_party_account(self.party_type, self.party, self.company, include_advance=True)
liability_account = accounts[1] if len(accounts) > 1 else None
fieldname = (
"default_advance_received_account"
if self.party_type == "Customer"
else "default_advance_paid_account"
)
if not liability_account:
throw(
_("Please set default {0} in Company {1}").format(
frappe.bold(frappe.get_meta("Company").get_label(fieldname)), frappe.bold(self.company)
)
)
self.set(self.party_account_field, liability_account)
@@ -159,22 +173,6 @@ class PaymentEntry(AccountsController):
alert=True,
)
def validate_advance_account_currency(self):
if self.book_advance_payments_in_separate_party_account is True:
company_currency = frappe.get_cached_value("Company", self.company, "default_currency")
if self.payment_type == "Receive" and self.paid_from_account_currency != company_currency:
frappe.throw(
_("Booking advances in foreign currency account: {0} ({1}) is not yet supported.").format(
frappe.bold(self.paid_from), frappe.bold(self.paid_from_account_currency)
)
)
if self.payment_type == "Pay" and self.paid_to_account_currency != company_currency:
frappe.throw(
_("Booking advances in foreign currency account: {0} ({1}) is not yet supported.").format(
frappe.bold(self.paid_to), frappe.bold(self.paid_to_account_currency)
)
)
def on_cancel(self):
self.ignore_linked_doctypes = (
"GL Entry",
@@ -769,9 +767,7 @@ class PaymentEntry(AccountsController):
if not self.apply_tax_withholding_amount:
return
order_amount = self.get_order_net_total()
net_total = flt(order_amount) + flt(self.unallocated_amount)
net_total = self.calculate_tax_withholding_net_total()
# Adding args as purchase invoice to get TDS amount
args = frappe._dict(
@@ -815,7 +811,26 @@ class PaymentEntry(AccountsController):
for d in to_remove:
self.remove(d)
def get_order_net_total(self):
def calculate_tax_withholding_net_total(self):
net_total = 0
order_details = self.get_order_wise_tax_withholding_net_total()
for d in self.references:
tax_withholding_net_total = order_details.get(d.reference_name)
if not tax_withholding_net_total:
continue
net_taxable_outstanding = max(
0, d.outstanding_amount - (d.total_amount - tax_withholding_net_total)
)
net_total += min(net_taxable_outstanding, d.allocated_amount)
net_total += self.unallocated_amount
return net_total
def get_order_wise_tax_withholding_net_total(self):
if self.party_type == "Supplier":
doctype = "Purchase Order"
else:
@@ -823,12 +838,15 @@ class PaymentEntry(AccountsController):
docnames = [d.reference_name for d in self.references if d.reference_doctype == doctype]
tax_withholding_net_total = frappe.db.get_value(
doctype, {"name": ["in", docnames]}, ["sum(base_tax_withholding_net_total)"]
return frappe._dict(
frappe.db.get_all(
doctype,
filters={"name": ["in", docnames]},
fields=["name", "base_tax_withholding_net_total"],
as_list=True,
)
)
return tax_withholding_net_total
def apply_taxes(self):
self.initialize_taxes()
self.determine_exclusive_rate()
@@ -1112,90 +1130,82 @@ class PaymentEntry(AccountsController):
self.make_advance_gl_entries(cancel=cancel)
def add_party_gl_entries(self, gl_entries):
if self.party_account:
if self.payment_type == "Receive":
against_account = self.paid_to
else:
against_account = self.paid_from
if not self.party_account:
return
party_gl_dict = self.get_gl_dict(
if self.payment_type == "Receive":
against_account = self.paid_to
else:
against_account = self.paid_from
party_account_type = frappe.db.get_value("Party Type", self.party_type, "account_type")
party_gl_dict = self.get_gl_dict(
{
"account": self.party_account,
"party_type": self.party_type,
"party": self.party,
"against": against_account,
"account_currency": self.party_account_currency,
"cost_center": self.cost_center,
},
item=self,
)
for d in self.get("references"):
# re-defining dr_or_cr for every reference in order to avoid the last value affecting calculation of reverse
dr_or_cr = "credit" if self.payment_type == "Receive" else "debit"
cost_center = self.cost_center
if d.reference_doctype == "Sales Invoice" and not cost_center:
cost_center = frappe.db.get_value(d.reference_doctype, d.reference_name, "cost_center")
gle = party_gl_dict.copy()
allocated_amount_in_company_currency = self.calculate_base_allocated_amount_for_reference(d)
if (
d.reference_doctype in ["Sales Invoice", "Purchase Invoice"]
and d.allocated_amount < 0
and (
(party_account_type == "Receivable" and self.payment_type == "Pay")
or (party_account_type == "Payable" and self.payment_type == "Receive")
)
):
# reversing dr_cr because because it will get reversed in gl processing due to negative amount
dr_or_cr = "debit" if dr_or_cr == "credit" else "credit"
gle.update(
{
"account": self.party_account,
"party_type": self.party_type,
"party": self.party,
"against": against_account,
"account_currency": self.party_account_currency,
"cost_center": self.cost_center,
},
item=self,
dr_or_cr: allocated_amount_in_company_currency,
dr_or_cr + "_in_account_currency": d.allocated_amount,
"against_voucher_type": d.reference_doctype,
"against_voucher": d.reference_name,
"cost_center": cost_center,
}
)
gl_entries.append(gle)
if self.unallocated_amount:
dr_or_cr = "credit" if self.payment_type == "Receive" else "debit"
exchange_rate = self.get_exchange_rate()
base_unallocated_amount = self.unallocated_amount * exchange_rate
gle = party_gl_dict.copy()
gle.update(
{
dr_or_cr + "_in_account_currency": self.unallocated_amount,
dr_or_cr: base_unallocated_amount,
}
)
dr_or_cr = "credit" if self.payment_type == "Receive" else "debit"
for d in self.get("references"):
# re-defining dr_or_cr for every reference in order to avoid the last value affecting calculation of reverse
dr_or_cr = "credit" if self.payment_type == "Receive" else "debit"
cost_center = self.cost_center
if d.reference_doctype == "Sales Invoice" and not cost_center:
cost_center = frappe.db.get_value(d.reference_doctype, d.reference_name, "cost_center")
gle = party_gl_dict.copy()
allocated_amount_in_company_currency = self.calculate_base_allocated_amount_for_reference(d)
reverse_dr_or_cr = 0
if d.reference_doctype in ["Sales Invoice", "Purchase Invoice"]:
is_return = frappe.db.get_value(d.reference_doctype, d.reference_name, "is_return")
payable_party_types = get_party_types_from_account_type("Payable")
receivable_party_types = get_party_types_from_account_type("Receivable")
if (
is_return
and self.party_type in receivable_party_types
and (self.payment_type == "Pay")
):
reverse_dr_or_cr = 1
elif (
is_return
and self.party_type in payable_party_types
and (self.payment_type == "Receive")
):
reverse_dr_or_cr = 1
if is_return and not reverse_dr_or_cr:
dr_or_cr = "debit" if dr_or_cr == "credit" else "credit"
if self.book_advance_payments_in_separate_party_account:
gle.update(
{
dr_or_cr: abs(allocated_amount_in_company_currency),
dr_or_cr + "_in_account_currency": abs(d.allocated_amount),
"against_voucher_type": d.reference_doctype,
"against_voucher": d.reference_name,
"cost_center": cost_center,
"against_voucher_type": "Payment Entry",
"against_voucher": self.name,
}
)
gl_entries.append(gle)
if self.unallocated_amount:
dr_or_cr = "credit" if self.payment_type == "Receive" else "debit"
exchange_rate = self.get_exchange_rate()
base_unallocated_amount = self.unallocated_amount * exchange_rate
gle = party_gl_dict.copy()
gle.update(
{
dr_or_cr + "_in_account_currency": self.unallocated_amount,
dr_or_cr: base_unallocated_amount,
}
)
if self.book_advance_payments_in_separate_party_account:
gle.update(
{
"against_voucher_type": "Payment Entry",
"against_voucher": self.name,
}
)
gl_entries.append(gle)
gl_entries.append(gle)
def make_advance_gl_entries(
self, entry: object | dict = None, cancel: bool = 0, update_outstanding: str = "Yes"
@@ -1230,13 +1240,21 @@ class PaymentEntry(AccountsController):
if reference.reference_doctype == "Sales Invoice":
return "credit", reference.account
if reference.reference_doctype == "Purchase Invoice":
return "debit", reference.account
if reference.reference_doctype == "Payment Entry":
# reference.account_type and reference.payment_type is only available for Reverse payments
if reference.account_type == "Receivable" and reference.payment_type == "Pay":
return "credit", self.party_account
else:
return "debit", self.party_account
return "debit", reference.account
if reference.reference_doctype == "Journal Entry":
if self.party_type == "Customer" and self.payment_type == "Receive":
return "credit", reference.account
else:
return "debit", reference.account
def add_advance_gl_for_reference(self, gl_entries, invoice):
args_dict = {
@@ -1249,17 +1267,20 @@ class PaymentEntry(AccountsController):
"voucher_detail_no": invoice.name,
}
date_field = "posting_date"
if invoice.reference_doctype in ["Sales Order", "Purchase Order"]:
date_field = "transaction_date"
posting_date = frappe.db.get_value(invoice.reference_doctype, invoice.reference_name, date_field)
if getdate(posting_date) < getdate(self.posting_date):
if self.reconcile_on_advance_payment_date:
posting_date = self.posting_date
else:
date_field = "posting_date"
if invoice.reference_doctype in ["Sales Order", "Purchase Order"]:
date_field = "transaction_date"
posting_date = frappe.db.get_value(invoice.reference_doctype, invoice.reference_name, date_field)
if getdate(posting_date) < getdate(self.posting_date):
posting_date = self.posting_date
dr_or_cr, account = self.get_dr_and_account_for_advances(invoice)
args_dict["account"] = account
args_dict[dr_or_cr] = invoice.allocated_amount
args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice)
args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount
args_dict.update(
{
@@ -1278,7 +1299,7 @@ class PaymentEntry(AccountsController):
args_dict[dr_or_cr + "_in_account_currency"] = 0
dr_or_cr = "debit" if dr_or_cr == "credit" else "credit"
args_dict["account"] = self.party_account
args_dict[dr_or_cr] = invoice.allocated_amount
args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice)
args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount
args_dict.update(
{
@@ -1731,7 +1752,7 @@ def get_outstanding_reference_documents(args, validate=False):
d["bill_no"] = frappe.db.get_value(d.voucher_type, d.voucher_no, "bill_no")
# Get negative outstanding sales /purchase invoices
if args.get("party_type") != "Employee" and not args.get("voucher_no"):
if args.get("party_type") != "Employee":
negative_outstanding_invoices = get_negative_outstanding_invoices(
args.get("party_type"),
args.get("party"),

View File

@@ -82,7 +82,7 @@ class TestPaymentEntry(FrappeTestCase):
expected_gle = dict(
(d[0], d)
for d in [["_Test Receivable USD - _TC", 0, 5500, so.name], ["Cash - _TC", 5500.0, 0, None]]
for d in [["_Test Receivable USD - _TC", 0, 5500, so.name], [pe.paid_to, 5500.0, 0, None]]
)
self.validate_gl_entries(pe.name, expected_gle)
@@ -1729,6 +1729,141 @@ class TestPaymentEntry(FrappeTestCase):
self.check_gl_entries()
self.check_pl_entries()
def test_opening_flag_for_advance_as_liability(self):
company = "_Test Company"
advance_account = create_account(
parent_account="Current Assets - _TC",
account_name="Advances Received",
company=company,
account_type="Receivable",
)
# Enable Advance in separate party account
frappe.db.set_value(
"Company",
company,
{
"book_advance_payments_in_separate_party_account": 1,
"default_advance_received_account": advance_account,
},
)
# Advance Payment
adv = create_payment_entry(
party_type="Customer",
party="_Test Customer",
payment_type="Receive",
paid_from="Debtors - _TC",
paid_to="_Test Cash - _TC",
)
adv.is_opening = "Yes"
adv.save() # use save() to trigger set_liability_account()
adv.submit()
gl_with_opening_set = frappe.db.get_all(
"GL Entry", filters={"voucher_no": adv.name, "is_opening": "Yes"}
)
# 'Is Opening' can be 'Yes' for Advances in separate party account
self.assertNotEqual(gl_with_opening_set, [])
# Disable Advance in separate party account
frappe.db.set_value(
"Company",
company,
{
"book_advance_payments_in_separate_party_account": 0,
"default_advance_received_account": None,
},
)
payment = create_payment_entry(
party_type="Customer",
party="_Test Customer",
payment_type="Receive",
paid_from="Debtors - _TC",
paid_to="_Test Cash - _TC",
)
payment.is_opening = "Yes"
payment.save()
payment.submit()
gl_with_opening_set = frappe.db.get_all(
"GL Entry", filters={"voucher_no": payment.name, "is_opening": "Yes"}
)
# 'Is Opening' should always be 'No' for normal advance payments
self.assertEqual(gl_with_opening_set, [])
@change_settings("Accounts Settings", {"delete_linked_ledger_entries": 1})
def test_delete_linked_exchange_gain_loss_journal(self):
from erpnext.accounts.doctype.account.test_account import create_account
from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import (
make_customer,
)
debtors = create_account(
account_name="Debtors USD",
parent_account="Accounts Receivable - _TC",
company="_Test Company",
account_currency="USD",
account_type="Receivable",
)
# create a customer
customer = make_customer(customer="_Test Party USD")
cust_doc = frappe.get_doc("Customer", customer)
cust_doc.default_currency = "USD"
test_account_details = {
"company": "_Test Company",
"account": debtors,
}
cust_doc.append("accounts", test_account_details)
cust_doc.save()
# create a sales invoice
si = create_sales_invoice(
customer=customer,
currency="USD",
conversion_rate=83.970000000,
debit_to=debtors,
do_not_save=1,
)
si.party_account_currency = "USD"
si.save()
si.submit()
# create a payment entry for the invoice
pe = get_payment_entry("Sales Invoice", si.name)
pe.reference_no = "1"
pe.reference_date = frappe.utils.nowdate()
pe.paid_amount = 100
pe.source_exchange_rate = 90
pe.append(
"deductions",
{
"account": "_Test Exchange Gain/Loss - _TC",
"cost_center": "_Test Cost Center - _TC",
"amount": 2710,
},
)
pe.save()
pe.submit()
# check creation of journal entry
jv = frappe.get_all(
"Journal Entry Account",
{"reference_type": pe.doctype, "reference_name": pe.name, "docstatus": 1},
pluck="parent",
)
self.assertTrue(jv)
# check cancellation of payment entry and journal entry
pe.cancel()
self.assertTrue(pe.docstatus == 2)
self.assertTrue(frappe.db.get_value("Journal Entry", {"name": jv[0]}, "docstatus") == 2)
# check deletion of payment entry and journal entry
pe.delete()
self.assertRaises(frappe.DoesNotExistError, frappe.get_doc, pe.doctype, pe.name)
self.assertRaises(frappe.DoesNotExistError, frappe.get_doc, "Journal Entry", jv[0])
def create_payment_entry(**args):
payment_entry = frappe.new_doc("Payment Entry")

View File

@@ -161,11 +161,12 @@ class PaymentLedgerEntry(Document):
def on_update(self):
adv_adj = self.flags.adv_adj
if not self.flags.from_repost:
self.validate_account_details()
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)
if not self.delinked:
self.validate_account_details()
self.validate_dimensions_for_pl_and_bs()
self.validate_allowed_dimensions()
validate_balance_type(self.account, adv_adj)
# update outstanding amount
if (

View File

@@ -509,7 +509,11 @@ class TestPaymentLedgerEntry(FrappeTestCase):
@change_settings(
"Accounts Settings",
{"unlink_payment_on_cancellation_of_invoice": 1, "delete_linked_ledger_entries": 1},
{
"unlink_payment_on_cancellation_of_invoice": 1,
"delete_linked_ledger_entries": 1,
"unlink_advance_payment_on_cancelation_of_order": 1,
},
)
def test_advance_payment_unlink_on_order_cancellation(self):
transaction_date = nowdate()

View File

@@ -36,7 +36,7 @@ frappe.ui.form.on("Payment Order", {
// payment Entry
if (frm.doc.docstatus === 1 && frm.doc.payment_order_type === "Payment Request") {
frm.add_custom_button(__("Create Payment Entries"), function () {
frm.add_custom_button(__("Create Journal Entries"), function () {
frm.trigger("make_payment_records");
});
}

View File

@@ -267,6 +267,7 @@ class PaymentReconciliation(Document):
conditions.append(doc.docstatus == 1)
conditions.append(doc[frappe.scrub(self.party_type)] == self.party)
conditions.append(doc.is_return == 1)
conditions.append(doc.outstanding_amount != 0)
if self.payment_name:
conditions.append(doc.name.like(f"%{self.payment_name}%"))

View File

@@ -5,7 +5,7 @@
import frappe
from frappe import qb
from frappe.tests.utils import FrappeTestCase, change_settings
from frappe.utils import add_days, flt, nowdate
from frappe.utils import add_days, add_years, flt, getdate, nowdate, today
from erpnext import get_default_cost_center
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
@@ -13,6 +13,7 @@ from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_pay
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.utils import get_fiscal_year
from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order
from erpnext.stock.doctype.item.test_item import create_item
@@ -109,6 +110,14 @@ class TestPaymentReconciliation(FrappeTestCase):
"account_currency": "INR",
"account_type": "Payable",
},
# 'Receivable' account for capturing advance received, under 'Liabilities' group
{
"attribute": "advance_receivable_account",
"account_name": "Advance Received",
"parent_account": "Current Liabilities - _PR",
"account_currency": "INR",
"account_type": "Receivable",
},
]
for x in accounts:
@@ -1525,6 +1534,390 @@ class TestPaymentReconciliation(FrappeTestCase):
]
self.assertEqual(pl_entries, expected_ple)
def test_advance_payment_reconciliation_date(self):
frappe.db.set_value(
"Company",
self.company,
{
"book_advance_payments_in_separate_party_account": 1,
"default_advance_paid_account": self.advance_payable_account,
"reconcile_on_advance_payment_date": 1,
},
)
self.supplier = "_Test Supplier"
amount = 1500
pe = self.create_payment_entry(amount=amount)
pe.posting_date = add_days(nowdate(), -1)
pe.party_type = "Supplier"
pe.party = self.supplier
pe.payment_type = "Pay"
pe.paid_from = self.cash
pe.paid_to = self.advance_payable_account
pe.save().submit()
pi = self.create_purchase_invoice(qty=10, rate=100)
self.assertNotEqual(pe.posting_date, pi.posting_date)
pr = self.create_payment_reconciliation(party_is_customer=False)
pr.default_advance_account = self.advance_payable_account
pr.from_payment_date = pe.posting_date
pr.get_unreconciled_entries()
self.assertEqual(len(pr.invoices), 1)
self.assertEqual(len(pr.payments), 1)
invoices = [invoice.as_dict() for invoice in pr.invoices]
payments = [payment.as_dict() for payment in pr.payments]
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
pr.reconcile()
# Assert Ledger Entries
gl_entries = frappe.db.get_all(
"GL Entry",
filters={"voucher_no": pe.name, "is_cancelled": 0, "posting_date": pe.posting_date},
)
self.assertEqual(len(gl_entries), 4)
pl_entries = frappe.db.get_all(
"Payment Ledger Entry",
filters={"voucher_no": pe.name, "delinked": 0, "posting_date": pe.posting_date},
)
self.assertEqual(len(pl_entries), 3)
def test_advance_payment_reconciliation_against_journal_for_customer(self):
frappe.db.set_value(
"Company",
self.company,
{
"book_advance_payments_in_separate_party_account": 1,
"default_advance_received_account": self.advance_receivable_account,
"reconcile_on_advance_payment_date": 0,
},
)
amount = 200.0
je = self.create_journal_entry(self.debit_to, self.bank, amount)
je.accounts[0].cost_center = self.main_cc.name
je.accounts[0].party_type = "Customer"
je.accounts[0].party = self.customer
je.accounts[1].cost_center = self.main_cc.name
je = je.save().submit()
pe = self.create_payment_entry(amount=amount).save().submit()
pr = self.create_payment_reconciliation()
pr.default_advance_account = self.advance_receivable_account
pr.get_unreconciled_entries()
self.assertEqual(len(pr.invoices), 1)
self.assertEqual(len(pr.payments), 1)
invoices = [invoice.as_dict() for invoice in pr.invoices]
payments = [payment.as_dict() for payment in pr.payments]
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
pr.reconcile()
# Assert Ledger Entries
gl_entries = frappe.db.get_all(
"GL Entry",
filters={"voucher_no": pe.name, "is_cancelled": 0},
)
self.assertEqual(len(gl_entries), 4)
pl_entries = frappe.db.get_all(
"Payment Ledger Entry",
filters={"voucher_no": pe.name, "delinked": 0},
)
self.assertEqual(len(pl_entries), 3)
gl_entries = frappe.db.get_all(
"GL Entry",
filters={"voucher_no": pe.name, "is_cancelled": 0},
fields=["account", "voucher_no", "against_voucher", "debit", "credit"],
order_by="account, against_voucher, debit",
)
expected_gle = [
{
"account": self.advance_receivable_account,
"voucher_no": pe.name,
"against_voucher": pe.name,
"debit": 0.0,
"credit": amount,
},
{
"account": self.advance_receivable_account,
"voucher_no": pe.name,
"against_voucher": pe.name,
"debit": amount,
"credit": 0.0,
},
{
"account": self.debit_to,
"voucher_no": pe.name,
"against_voucher": je.name,
"debit": 0.0,
"credit": amount,
},
{
"account": self.bank,
"voucher_no": pe.name,
"against_voucher": None,
"debit": amount,
"credit": 0.0,
},
]
self.assertEqual(gl_entries, expected_gle)
pl_entries = frappe.db.get_all(
"Payment Ledger Entry",
filters={"voucher_no": pe.name},
fields=["account", "voucher_no", "against_voucher_no", "amount"],
order_by="account, against_voucher_no, amount",
)
expected_ple = [
{
"account": self.advance_receivable_account,
"voucher_no": pe.name,
"against_voucher_no": pe.name,
"amount": -amount,
},
{
"account": self.advance_receivable_account,
"voucher_no": pe.name,
"against_voucher_no": pe.name,
"amount": amount,
},
{
"account": self.debit_to,
"voucher_no": pe.name,
"against_voucher_no": je.name,
"amount": -amount,
},
]
self.assertEqual(pl_entries, expected_ple)
def test_advance_payment_reconciliation_against_journal_for_supplier(self):
self.supplier = make_supplier("_Test Supplier")
frappe.db.set_value(
"Company",
self.company,
{
"book_advance_payments_in_separate_party_account": 1,
"default_advance_paid_account": self.advance_payable_account,
"reconcile_on_advance_payment_date": 0,
},
)
amount = 200.0
je = self.create_journal_entry(self.creditors, self.bank, -amount)
je.accounts[0].cost_center = self.main_cc.name
je.accounts[0].party_type = "Supplier"
je.accounts[0].party = self.supplier
je.accounts[1].cost_center = self.main_cc.name
je = je.save().submit()
pe = self.create_payment_entry(amount=amount)
pe.payment_type = "Pay"
pe.party_type = "Supplier"
pe.paid_from = self.bank
pe.paid_to = self.creditors
pe.party = self.supplier
pe.save().submit()
pr = self.create_payment_reconciliation(party_is_customer=False)
pr.default_advance_account = self.advance_payable_account
pr.get_unreconciled_entries()
self.assertEqual(len(pr.invoices), 1)
self.assertEqual(len(pr.payments), 1)
invoices = [invoice.as_dict() for invoice in pr.invoices]
payments = [payment.as_dict() for payment in pr.payments]
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
pr.reconcile()
# Assert Ledger Entries
gl_entries = frappe.db.get_all(
"GL Entry",
filters={"voucher_no": pe.name, "is_cancelled": 0},
)
self.assertEqual(len(gl_entries), 4)
pl_entries = frappe.db.get_all(
"Payment Ledger Entry",
filters={"voucher_no": pe.name, "delinked": 0},
)
self.assertEqual(len(pl_entries), 3)
gl_entries = frappe.db.get_all(
"GL Entry",
filters={"voucher_no": pe.name, "is_cancelled": 0},
fields=["account", "voucher_no", "against_voucher", "debit", "credit"],
order_by="account, against_voucher, debit",
)
expected_gle = [
{
"account": self.advance_payable_account,
"voucher_no": pe.name,
"against_voucher": pe.name,
"debit": 0.0,
"credit": amount,
},
{
"account": self.advance_payable_account,
"voucher_no": pe.name,
"against_voucher": pe.name,
"debit": amount,
"credit": 0.0,
},
{
"account": self.creditors,
"voucher_no": pe.name,
"against_voucher": je.name,
"debit": amount,
"credit": 0.0,
},
{
"account": self.bank,
"voucher_no": pe.name,
"against_voucher": None,
"debit": 0.0,
"credit": amount,
},
]
self.assertEqual(gl_entries, expected_gle)
pl_entries = frappe.db.get_all(
"Payment Ledger Entry",
filters={"voucher_no": pe.name},
fields=["account", "voucher_no", "against_voucher_no", "amount"],
order_by="account, against_voucher_no, amount",
)
expected_ple = [
{
"account": self.advance_payable_account,
"voucher_no": pe.name,
"against_voucher_no": pe.name,
"amount": -amount,
},
{
"account": self.advance_payable_account,
"voucher_no": pe.name,
"against_voucher_no": pe.name,
"amount": amount,
},
{
"account": self.creditors,
"voucher_no": pe.name,
"against_voucher_no": je.name,
"amount": -amount,
},
]
self.assertEqual(pl_entries, expected_ple)
def test_cr_note_payment_limit_filter(self):
transaction_date = nowdate()
amount = 100
for _ in range(6):
self.create_sales_invoice(qty=1, rate=amount, posting_date=transaction_date)
cr_note = self.create_sales_invoice(
qty=-1, rate=amount, posting_date=transaction_date, do_not_save=True, do_not_submit=True
)
cr_note.is_return = 1
cr_note = cr_note.save().submit()
pr = self.create_payment_reconciliation()
pr.get_unreconciled_entries()
self.assertEqual(len(pr.invoices), 6)
self.assertEqual(len(pr.payments), 6)
invoices = [x.as_dict() for x in pr.get("invoices")]
payments = [x.as_dict() for x in pr.get("payments")]
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
pr.reconcile()
pr.get_unreconciled_entries()
self.assertEqual(pr.get("invoices"), [])
self.assertEqual(pr.get("payments"), [])
self.create_sales_invoice(qty=1, rate=amount, posting_date=transaction_date)
cr_note = self.create_sales_invoice(
qty=-1, rate=amount, posting_date=transaction_date, do_not_save=True, do_not_submit=True
)
cr_note.is_return = 1
cr_note = cr_note.save().submit()
# Limit should not affect in fetching the unallocated cr_note
pr.invoice_limit = 5
pr.payment_limit = 5
pr.get_unreconciled_entries()
self.assertEqual(len(pr.invoices), 1)
self.assertEqual(len(pr.payments), 1)
def test_reconciliation_on_closed_period_payment(self):
# create backdated fiscal year
first_fy_start_date = frappe.db.get_value("Fiscal Year", {"disabled": 0}, "min(year_start_date)")
prev_fy_start_date = add_years(first_fy_start_date, -1)
prev_fy_end_date = add_days(first_fy_start_date, -1)
create_fiscal_year(
company=self.company, year_start_date=prev_fy_start_date, year_end_date=prev_fy_end_date
)
# make journal entry for previous year
je_1 = frappe.new_doc("Journal Entry")
je_1.posting_date = add_days(prev_fy_start_date, 20)
je_1.company = self.company
je_1.user_remark = "test"
je_1.set(
"accounts",
[
{
"account": self.debit_to,
"cost_center": self.cost_center,
"party_type": "Customer",
"party": self.customer,
"debit_in_account_currency": 0,
"credit_in_account_currency": 1000,
},
{
"account": self.bank,
"cost_center": self.sub_cc.name,
"credit_in_account_currency": 0,
"debit_in_account_currency": 500,
},
{
"account": self.cash,
"cost_center": self.sub_cc.name,
"credit_in_account_currency": 0,
"debit_in_account_currency": 500,
},
],
)
je_1.submit()
# make period closing voucher
pcv = make_period_closing_voucher(
company=self.company, cost_center=self.cost_center, posting_date=prev_fy_end_date
)
pcv.reload()
# check if period closing voucher is completed
self.assertEqual(pcv.gle_processing_status, "Completed")
# make journal entry for active year
je_2 = self.create_journal_entry(
acc1=self.debit_to, acc2=self.income_account, amount=1000, posting_date=today()
)
je_2.accounts[0].party_type = "Customer"
je_2.accounts[0].party = self.customer
je_2.submit()
# process reconciliation on closed period payment
pr = self.create_payment_reconciliation(party_is_customer=True)
pr.from_invoice_date = pr.to_invoice_date = pr.from_payment_date = pr.to_payment_date = None
pr.get_unreconciled_entries()
invoices = [invoice.as_dict() for invoice in pr.invoices]
payments = [payment.as_dict() for payment in pr.payments]
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
pr.reconcile()
je_1.reload()
je_2.reload()
# check whether the payment reconciliation is done on the closed period
self.assertEqual(pr.get("invoices"), [])
self.assertEqual(pr.get("payments"), [])
def make_customer(customer_name, currency=None):
if not frappe.db.exists("Customer", customer_name):
@@ -1552,3 +1945,61 @@ def make_supplier(supplier_name, currency=None):
return supplier.name
else:
return supplier_name
def create_fiscal_year(company, year_start_date, year_end_date):
fy_docname = frappe.db.exists(
"Fiscal Year", {"year_start_date": year_start_date, "year_end_date": year_end_date}
)
if not fy_docname:
fy_doc = frappe.get_doc(
{
"doctype": "Fiscal Year",
"year": f"{getdate(year_start_date).year}-{getdate(year_end_date).year}",
"year_start_date": year_start_date,
"year_end_date": year_end_date,
"companies": [{"company": company}],
}
).save()
return fy_doc
else:
fy_doc = frappe.get_doc("Fiscal Year", fy_docname)
if not frappe.db.exists("Fiscal Year Company", {"parent": fy_docname, "company": company}):
fy_doc.append("companies", {"company": company})
fy_doc.save()
return fy_doc
def make_period_closing_voucher(company, cost_center, posting_date=None, submit=True):
from erpnext.accounts.doctype.account.test_account import create_account
parent_account = frappe.db.get_value(
"Account", {"company": company, "account_name": "Current Liabilities", "is_group": 1}, "name"
)
surplus_account = create_account(
account_name="Reserve and Surplus",
is_group=0,
company=company,
root_type="Liability",
report_type="Balance Sheet",
account_currency="INR",
parent_account=parent_account,
doctype="Account",
)
pcv = frappe.get_doc(
{
"doctype": "Period Closing Voucher",
"transaction_date": posting_date or today(),
"posting_date": posting_date or today(),
"company": company,
"fiscal_year": get_fiscal_year(posting_date or today(), company=company)[0],
"cost_center": cost_center,
"closing_account_head": surplus_account,
"remarks": "test",
}
)
pcv.insert()
if submit:
pcv.submit()
return pcv

View File

@@ -9,6 +9,7 @@
"transaction_date",
"column_break_2",
"naming_series",
"company",
"mode_of_payment",
"party_details",
"party_type",
@@ -144,6 +145,7 @@
"fieldname": "grand_total",
"fieldtype": "Currency",
"label": "Amount",
"non_negative": 1,
"options": "currency"
},
{
@@ -389,13 +391,20 @@
"options": "Payment Request",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"read_only": 1
}
],
"in_create": 1,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2023-09-27 09:51:42.277638",
"modified": "2024-08-07 16:39:54.288002",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Request",
@@ -433,4 +442,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -15,7 +15,7 @@ from erpnext.accounts.doctype.payment_entry.payment_entry import (
)
from erpnext.accounts.doctype.subscription_plan.subscription_plan import get_plan_rate
from erpnext.accounts.party import get_party_account, get_party_bank_account
from erpnext.accounts.utils import get_account_currency
from erpnext.accounts.utils import get_account_currency, get_currency_precision
from erpnext.utilities import payment_app_import_guard
@@ -84,6 +84,7 @@ class PaymentRequest(Document):
subscription_plans: DF.Table[SubscriptionPlanDetail]
swift_number: DF.ReadOnly | None
transaction_date: DF.Date | None
company: DF.Link | None
# end: auto-generated types
def validate(self):
@@ -338,6 +339,17 @@ class PaymentRequest(Document):
payment_entry.received_amount = amount
payment_entry.get("references")[0].allocated_amount = amount
# Update 'Paid Amount' on Forex transactions
if self.currency != ref_doc.company_currency:
if (
self.payment_request_type == "Outward"
and payment_entry.paid_from_account_currency == ref_doc.company_currency
and payment_entry.paid_from_account_currency != payment_entry.paid_to_account_currency
):
payment_entry.paid_amount = payment_entry.base_paid_amount = (
payment_entry.target_exchange_rate * payment_entry.received_amount
)
for dimension in get_accounting_dimensions():
payment_entry.update({dimension: self.get(dimension)})
@@ -480,6 +492,7 @@ def make_payment_request(**args):
"message": gateway_account.get("message") or get_dummy_message(ref_doc),
"reference_doctype": args.dt,
"reference_name": args.dn,
"company": ref_doc.get("company"),
"party_type": args.get("party_type") or "Customer",
"party": args.get("party") or ref_doc.get("customer"),
"bank_account": bank_account,
@@ -500,8 +513,11 @@ def make_payment_request(**args):
if args.order_type == "Shopping Cart" or args.mute_email:
pr.flags.mute_email = True
pr.insert(ignore_permissions=True)
if frappe.db.get_single_value("Accounts Settings", "create_pr_in_draft_status", cache=True):
pr.insert(ignore_permissions=True)
if args.submit_doc:
if pr.get("__unsaved"):
pr.insert(ignore_permissions=True)
pr.submit()
if args.order_type == "Shopping Cart":
@@ -540,7 +556,7 @@ def get_amount(ref_doc, payment_account=None):
grand_total = ref_doc.outstanding_amount
if grand_total > 0:
return grand_total
return flt(grand_total, get_currency_precision())
else:
frappe.throw(_("Payment Entry is already created"))

View File

@@ -4,10 +4,12 @@
import unittest
import frappe
from frappe.tests.utils import FrappeTestCase
from erpnext.accounts.doctype.payment_request.payment_request import make_payment_request
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.buying.doctype.purchase_order.test_purchase_order import create_purchase_order
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
from erpnext.setup.utils import get_exchange_rate
@@ -32,7 +34,7 @@ payment_method = [
]
class TestPaymentRequest(unittest.TestCase):
class TestPaymentRequest(FrappeTestCase):
def setUp(self):
if not frappe.db.get_value("Payment Gateway", payment_gateway["gateway"], "name"):
frappe.get_doc(payment_gateway).insert(ignore_permissions=True)
@@ -260,3 +262,19 @@ class TestPaymentRequest(unittest.TestCase):
# Try to make Payment Request more than SO amount, should give validation
pr2.grand_total = 900
self.assertRaises(frappe.ValidationError, pr2.save)
def test_conversion_on_foreign_currency_accounts(self):
po_doc = create_purchase_order(supplier="_Test Supplier USD", currency="USD", do_not_submit=1)
po_doc.conversion_rate = 80
po_doc.items[0].qty = 1
po_doc.items[0].rate = 10
po_doc.save().submit()
pr = make_payment_request(dt=po_doc.doctype, dn=po_doc.name, recipient_id="nabin@erpnext.com")
pr = frappe.get_doc(pr).save().submit()
pe = pr.create_payment_entry()
self.assertEqual(pe.base_paid_amount, 800)
self.assertEqual(pe.paid_amount, 800)
self.assertEqual(pe.base_received_amount, 800)
self.assertEqual(pe.received_amount, 10)

View File

@@ -136,18 +136,28 @@ class PeriodClosingVoucher(AccountsController):
def check_if_previous_year_closed(self):
last_year_closing = add_days(self.year_start_date, -1)
previous_fiscal_year = get_fiscal_year(last_year_closing, company=self.company, boolean=True)
if not previous_fiscal_year:
return
if previous_fiscal_year and not frappe.db.exists(
previous_fiscal_year_start_date = previous_fiscal_year[0][1]
if not frappe.db.exists(
"GL Entry",
{"posting_date": ("<=", last_year_closing), "company": self.company, "is_cancelled": 0},
{
"posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]),
"company": self.company,
"is_cancelled": 0,
},
):
return
if previous_fiscal_year and not frappe.db.exists(
if not frappe.db.exists(
"Period Closing Voucher",
{"posting_date": ("<=", last_year_closing), "docstatus": 1, "company": self.company},
{
"posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]),
"docstatus": 1,
"company": self.company,
},
):
frappe.throw(_("Previous Year is not closed, please close it first"))

View File

@@ -194,7 +194,9 @@ function refresh_payments(d, frm) {
}
if (payment) {
payment.expected_amount += flt(p.amount);
payment.closing_amount = payment.expected_amount;
if (payment.closing_amount === 0) {
payment.closing_amount = payment.expected_amount;
}
payment.difference = payment.closing_amount - payment.expected_amount;
} else {
frm.add_child("payment_reconciliation", {

View File

@@ -70,7 +70,7 @@ class POSClosingEntry(StatusUpdater):
for key, value in pos_occurences.items():
if len(value) > 1:
error_list.append(
_(f"{frappe.bold(key)} is added multiple times on rows: {frappe.bold(value)}")
_("{0} is added multiple times on rows: {1}").format(frappe.bold(key), frappe.bold(value))
)
if error_list:
@@ -87,19 +87,15 @@ class POSClosingEntry(StatusUpdater):
as_dict=1,
)[0]
if pos_invoice.consolidated_invoice:
invalid_row.setdefault("msg", []).append(
_("POS Invoice is {}").format(frappe.bold("already consolidated"))
)
invalid_row.setdefault("msg", []).append(_("POS Invoice is already consolidated"))
invalid_rows.append(invalid_row)
continue
if pos_invoice.pos_profile != self.pos_profile:
invalid_row.setdefault("msg", []).append(
_("POS Profile doesn't matches {}").format(frappe.bold(self.pos_profile))
_("POS Profile doesn't match {}").format(frappe.bold(self.pos_profile))
)
if pos_invoice.docstatus != 1:
invalid_row.setdefault("msg", []).append(
_("POS Invoice is not {}").format(frappe.bold("submitted"))
)
invalid_row.setdefault("msg", []).append(_("POS Invoice is not submitted"))
if pos_invoice.owner != self.user:
invalid_row.setdefault("msg", []).append(
_("POS Invoice isn't created by user {}").format(frappe.bold(self.owner))

View File

@@ -17,6 +17,10 @@ from erpnext.accounts.doctype.pos_invoice.test_pos_invoice import create_pos_inv
from erpnext.accounts.doctype.pos_opening_entry.test_pos_opening_entry import create_opening_entry
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
from erpnext.selling.page.point_of_sale.point_of_sale import get_items
from erpnext.stock.doctype.item.test_item import make_item
from erpnext.stock.doctype.serial_and_batch_bundle.test_serial_and_batch_bundle import (
get_batch_from_bundle,
)
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry
@@ -179,6 +183,94 @@ class TestPOSClosingEntry(unittest.TestCase):
accounting_dimension_department.save()
disable_dimension()
def test_merging_into_sales_invoice_for_batched_item(self):
frappe.flags.print_message = False
from erpnext.accounts.doctype.pos_closing_entry.test_pos_closing_entry import (
init_user_and_profile,
)
from erpnext.accounts.doctype.pos_invoice_merge_log.pos_invoice_merge_log import (
consolidate_pos_invoices,
)
from erpnext.stock.doctype.batch.batch import get_batch_qty
frappe.db.sql("delete from `tabPOS Invoice`")
item_doc = make_item(
"_Test Item With Batch FOR POS Merge Test",
properties={
"is_stock_item": 1,
"has_batch_no": 1,
"batch_number_series": "BATCH-PM-POS-MERGE-.####",
"create_new_batch": 1,
},
)
item_code = item_doc.name
se = make_stock_entry(
target="_Test Warehouse - _TC",
item_code=item_code,
qty=10,
basic_rate=100,
use_serial_batch_fields=0,
)
batch_no = get_batch_from_bundle(se.items[0].serial_and_batch_bundle)
test_user, pos_profile = init_user_and_profile()
opening_entry = create_opening_entry(pos_profile, test_user.name)
pos_inv = create_pos_invoice(
item_code=item_code, qty=5, rate=300, use_serial_batch_fields=1, batch_no=batch_no
)
pos_inv2 = create_pos_invoice(
item_code=item_code, qty=5, rate=300, use_serial_batch_fields=1, batch_no=batch_no
)
batch_qty = frappe.db.get_value("Batch", batch_no, "batch_qty")
self.assertEqual(batch_qty, 10)
batch_qty_with_pos = get_batch_qty(batch_no, "_Test Warehouse - _TC", item_code)
self.assertEqual(batch_qty_with_pos, 0.0)
pcv_doc = make_closing_entry_from_opening(opening_entry)
pcv_doc.submit()
piv_merge = frappe.db.get_value("POS Invoice Merge Log", {"pos_closing_entry": pcv_doc.name}, "name")
self.assertTrue(piv_merge)
piv_merge_doc = frappe.get_doc("POS Invoice Merge Log", piv_merge)
self.assertTrue(piv_merge_doc.pos_invoices[0].pos_invoice)
self.assertTrue(piv_merge_doc.pos_invoices[1].pos_invoice)
pos_inv.load_from_db()
self.assertTrue(pos_inv.consolidated_invoice)
pos_inv2.load_from_db()
self.assertTrue(pos_inv2.consolidated_invoice)
batch_qty = frappe.db.get_value("Batch", batch_no, "batch_qty")
self.assertEqual(batch_qty, 0.0)
batch_qty_with_pos = get_batch_qty(batch_no, "_Test Warehouse - _TC", item_code)
self.assertEqual(batch_qty_with_pos, 0.0)
frappe.flags.print_message = True
pcv_doc.reload()
pcv_doc.cancel()
batch_qty = frappe.db.get_value("Batch", batch_no, "batch_qty")
self.assertEqual(batch_qty, 10)
batch_qty_with_pos = get_batch_qty(batch_no, "_Test Warehouse - _TC", item_code)
self.assertEqual(batch_qty_with_pos, 0.0)
pos_inv.reload()
pos_inv2.reload()
pos_inv.cancel()
pos_inv2.cancel()
batch_qty_with_pos = get_batch_qty(batch_no, "_Test Warehouse - _TC", item_code)
self.assertEqual(batch_qty_with_pos, 10.0)
def init_user_and_profile(**args):
user = "test@example.com"

View File

@@ -40,6 +40,19 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex
};
});
this.frm.set_query("item_code", "items", function (doc) {
return {
query: "erpnext.accounts.doctype.pos_invoice.pos_invoice.item_query",
filters: {
has_variants: ["=", 0],
is_sales_item: ["=", 1],
disabled: ["=", 0],
is_fixed_asset: ["=", 0],
pos_profile: ["=", doc.pos_profile],
},
};
});
erpnext.accounts.dimensions.setup_dimension_filters(this.frm, this.frm.doctype);
}

View File

@@ -6,6 +6,7 @@ import frappe
from frappe import _, bold
from frappe.query_builder.functions import IfNull, Sum
from frappe.utils import cint, flt, get_link_to_form, getdate, nowdate
from frappe.utils.nestedset import get_descendants_of
from erpnext.accounts.doctype.loyalty_program.loyalty_program import validate_loyalty_points
from erpnext.accounts.doctype.payment_request.payment_request import make_payment_request
@@ -15,6 +16,7 @@ from erpnext.accounts.doctype.sales_invoice.sales_invoice import (
update_multi_mode_option,
)
from erpnext.accounts.party import get_due_date, get_party_account
from erpnext.controllers.queries import item_query as _item_query
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
@@ -188,7 +190,7 @@ class POSInvoice(SalesInvoice):
def validate(self):
if not cint(self.is_pos):
frappe.throw(
_("POS Invoice should have {} field checked.").format(frappe.bold("Include Payment"))
_("POS Invoice should have the field {0} checked.").format(frappe.bold(_("Include Payment")))
)
# run on validate method of selling controller
@@ -228,7 +230,10 @@ class POSInvoice(SalesInvoice):
self.apply_loyalty_points()
self.check_phone_payments()
self.set_status(update=True)
self.submit_serial_batch_bundle()
self.make_bundle_for_sales_purchase_return()
for table_name in ["items", "packed_items"]:
self.make_bundle_using_old_serial_batch_fields(table_name)
self.submit_serial_batch_bundle(table_name)
if self.coupon_code:
from erpnext.accounts.doctype.pricing_rule.utils import update_coupon_code_count
@@ -282,10 +287,11 @@ class POSInvoice(SalesInvoice):
{"is_cancelled": 1, "voucher_no": ""},
)
frappe.get_doc("Serial and Batch Bundle", row.serial_and_batch_bundle).cancel()
row.db_set("serial_and_batch_bundle", None)
def submit_serial_batch_bundle(self):
for item in self.items:
def submit_serial_batch_bundle(self, table_name):
for item in self.get(table_name):
if item.serial_and_batch_bundle:
doc = frappe.get_doc("Serial and Batch Bundle", item.serial_and_batch_bundle)
@@ -354,10 +360,16 @@ class POSInvoice(SalesInvoice):
error_msg = []
for d in self.get("items"):
error_msg = ""
if d.get("has_serial_no") and not d.serial_and_batch_bundle:
if d.get("has_serial_no") and (
(not d.use_serial_batch_fields and not d.serial_and_batch_bundle)
or (d.use_serial_batch_fields and not d.serial_no)
):
error_msg = f"Row #{d.idx}: Please select Serial No. for item {bold(d.item_code)}"
elif d.get("has_batch_no") and not d.serial_and_batch_bundle:
elif d.get("has_batch_no") and (
(not d.use_serial_batch_fields and not d.serial_and_batch_bundle)
or (d.use_serial_batch_fields and not d.batch_no)
):
error_msg = f"Row #{d.idx}: Please select Batch No. for item {bold(d.item_code)}"
if error_msg:
@@ -439,7 +451,7 @@ class POSInvoice(SalesInvoice):
if self.is_return and entry.amount > 0:
frappe.throw(_("Row #{0} (Payment Table): Amount must be negative").format(entry.idx))
if self.is_return:
if self.is_return and self.docstatus != 0:
invoice_total = self.rounded_total or self.grand_total
total_amount_in_payments = flt(total_amount_in_payments, self.precision("grand_total"))
if total_amount_in_payments and total_amount_in_payments < invoice_total:
@@ -827,3 +839,29 @@ def add_return_modes(doc, pos_profile):
]:
payment_mode = get_mode_of_payment_info(mode_of_payment, doc.company)
append_payment(payment_mode[0])
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=False):
if pos_profile := filters.get("pos_profile")[1]:
pos_profile = frappe.get_cached_doc("POS Profile", pos_profile)
if item_groups := get_item_group(pos_profile):
filters["item_group"] = ["in", tuple(item_groups)]
del filters["pos_profile"]
else:
filters.pop("pos_profile", None)
return _item_query(doctype, txt, searchfield, start, page_len, filters, as_dict)
def get_item_group(pos_profile):
item_groups = []
if pos_profile.get("item_groups"):
# Get items based on the item groups defined in the POS profile
for row in pos_profile.get("item_groups"):
item_groups.extend(get_descendants_of("Item Group", row.item_group))
return list(set(item_groups))

View File

@@ -318,29 +318,28 @@ class TestPOSInvoice(unittest.TestCase):
pos.insert()
pos.submit()
pos.reload()
pos_return1 = make_sales_return(pos.name)
# partial return 1
pos_return1.get("items")[0].qty = -1
pos_return1.submit()
pos_return1.reload()
bundle_id = frappe.get_doc(
"Serial and Batch Bundle", pos_return1.get("items")[0].serial_and_batch_bundle
)
bundle_id.remove(bundle_id.entries[1])
bundle_id.save()
bundle_id.load_from_db()
serial_no = bundle_id.entries[0].serial_no
self.assertEqual(serial_no, serial_nos[0])
pos_return1.insert()
pos_return1.submit()
# partial return 2
pos_return2 = make_sales_return(pos.name)
pos_return2.submit()
self.assertEqual(pos_return2.get("items")[0].qty, -1)
serial_no = get_serial_nos_from_bundle(pos_return2.get("items")[0].serial_and_batch_bundle)[0]
self.assertEqual(serial_no, serial_nos[1])
@@ -781,8 +780,6 @@ class TestPOSInvoice(unittest.TestCase):
pos_inv1.submit()
pos_inv1.reload()
self.assertFalse(pos_inv1.items[0].serial_and_batch_bundle)
batches = get_auto_batch_nos(
frappe._dict({"item_code": "_BATCH ITEM Test For Reserve", "warehouse": "_Test Warehouse - _TC"})
)
@@ -958,7 +955,7 @@ def create_pos_invoice(**args):
pos_inv.set_missing_values()
bundle_id = None
if args.get("batch_no") or args.get("serial_no"):
if not args.use_serial_batch_fields and (args.get("batch_no") or args.get("serial_no")):
type_of_transaction = args.type_of_transaction or "Outward"
if pos_inv.is_return:
@@ -999,6 +996,9 @@ def create_pos_invoice(**args):
"expense_account": args.expense_account or "Cost of Goods Sold - _TC",
"cost_center": args.cost_center or "_Test Cost Center - _TC",
"serial_and_batch_bundle": bundle_id,
"use_serial_batch_fields": args.use_serial_batch_fields,
"serial_no": args.serial_no if args.use_serial_batch_fields else None,
"batch_no": args.batch_no if args.use_serial_batch_fields else None,
}
# append in pos invoice items without item_code by checking flag without_item_code
if args.without_item_code:
@@ -1024,6 +1024,8 @@ def create_pos_invoice(**args):
pos_inv.insert()
if not args.do_not_submit:
pos_inv.submit()
if args.use_serial_batch_fields:
pos_inv.reload()
else:
pos_inv.payment_schedule = []
else:

View File

@@ -634,7 +634,6 @@
"depends_on": "eval:doc.use_serial_batch_fields === 1",
"fieldname": "batch_no",
"fieldtype": "Link",
"hidden": 1,
"label": "Batch No",
"options": "Batch",
"print_hide": 1
@@ -655,7 +654,6 @@
"depends_on": "eval:doc.use_serial_batch_fields === 1",
"fieldname": "serial_no",
"fieldtype": "Text",
"hidden": 1,
"in_list_view": 1,
"label": "Serial No",
"oldfieldname": "serial_no",
@@ -827,7 +825,7 @@
"read_only": 1
},
{
"depends_on": "eval:doc.use_serial_batch_fields === 1",
"depends_on": "eval:doc.use_serial_batch_fields === 0 || doc.serial_and_batch_bundle",
"fieldname": "serial_and_batch_bundle",
"fieldtype": "Link",
"label": "Serial and Batch Bundle",
@@ -853,7 +851,7 @@
],
"istable": 1,
"links": [],
"modified": "2024-02-25 15:50:17.140269",
"modified": "2024-05-07 15:56:53.343317",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Invoice Item",
@@ -863,4 +861,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -54,7 +54,7 @@ class POSInvoiceMergeLog(Document):
for key, value in pos_occurences.items():
if len(value) > 1:
error_list.append(
_(f"{frappe.bold(key)} is added multiple times on rows: {frappe.bold(value)}")
_("{0} is added multiple times on rows: {1}").format(frappe.bold(key), frappe.bold(value))
)
if error_list:
@@ -97,16 +97,15 @@ class POSInvoiceMergeLog(Document):
return_against_status = frappe.db.get_value("POS Invoice", return_against, "status")
if return_against_status != "Consolidated":
# if return entry is not getting merged in the current pos closing and if it is not consolidated
bold_unconsolidated = frappe.bold("not Consolidated")
msg = _("Row #{}: Original Invoice {} of return invoice {} is {}.").format(
d.idx, bold_return_against, bold_pos_invoice, bold_unconsolidated
)
msg = _(
"Row #{}: The original Invoice {} of return invoice {} is not consolidated."
).format(d.idx, bold_return_against, bold_pos_invoice)
msg += " "
msg += _(
"Original invoice should be consolidated before or along with the return invoice."
"The original invoice should be consolidated before or along with the return invoice."
)
msg += "<br><br>"
msg += _("You can add original invoice {} manually to proceed.").format(
msg += _("You can add the original invoice {} manually to proceed.").format(
bold_return_against
)
frappe.throw(msg)
@@ -131,6 +130,7 @@ class POSInvoiceMergeLog(Document):
pos_invoice_docs = [frappe.get_cached_doc("POS Invoice", d.pos_invoice) for d in self.pos_invoices]
self.update_pos_invoices(pos_invoice_docs)
self.serial_and_batch_bundle_reference_for_pos_invoice()
self.cancel_linked_invoices()
def process_merging_into_sales_invoice(self, data):
@@ -191,6 +191,7 @@ class POSInvoiceMergeLog(Document):
for i in items:
if (
i.item_code == item.item_code
and not i.serial_and_batch_bundle
and not i.serial_no
and not i.batch_no
and i.uom == item.uom
@@ -312,6 +313,12 @@ class POSInvoiceMergeLog(Document):
doc.set_status(update=True)
doc.save()
def serial_and_batch_bundle_reference_for_pos_invoice(self):
for d in self.pos_invoices:
pos_invoice = frappe.get_doc("POS Invoice", d.pos_invoice)
for table_name in ["items", "packed_items"]:
pos_invoice.set_serial_and_batch_bundle(table_name)
def cancel_linked_invoices(self):
for si_name in [self.consolidated_invoice, self.consolidated_credit_note]:
if not si_name:
@@ -481,7 +488,7 @@ def create_merge_logs(invoice_by_customer, closing_entry=None):
if closing_entry:
closing_entry.set_status(update=True, status="Failed")
if isinstance(error_message, list):
error_message = frappe.json.dumps(error_message)
error_message = json.dumps(error_message)
closing_entry.db_set("error_message", error_message)
raise

View File

@@ -74,15 +74,21 @@
"discount_amount",
"discount_percentage",
"for_price_list",
"section_break_13",
"threshold_percentage",
"priority",
"dynamic_condition_tab",
"condition",
"column_break_66",
"section_break_13",
"apply_multiple_pricing_rules",
"apply_discount_on_rate",
"column_break_66",
"threshold_percentage",
"validate_pricing_rule_section",
"validate_applied_rule",
"column_break_texp",
"rule_description",
"priority_section",
"has_priority",
"column_break_sayg",
"priority",
"help_section",
"pricing_rule_help",
"reference_section",
@@ -413,7 +419,8 @@
"depends_on": "eval:doc.rate_or_discount==\"Rate\"",
"fieldname": "rate",
"fieldtype": "Currency",
"label": "Rate"
"label": "Rate",
"options": "currency"
},
{
"default": "0",
@@ -477,7 +484,7 @@
{
"collapsible": 1,
"fieldname": "section_break_13",
"fieldtype": "Section Break",
"fieldtype": "Tab Break",
"label": "Advanced Settings"
},
{
@@ -487,6 +494,7 @@
"label": "Threshold for Suggestion (In Percentage)"
},
{
"depends_on": "has_priority",
"description": "Higher the number, higher the priority",
"fieldname": "priority",
"fieldtype": "Select",
@@ -513,6 +521,7 @@
{
"default": "0",
"depends_on": "eval:doc.price_or_product_discount == 'Price'",
"description": "If enabled, then system will only validate the pricing rule and not apply automatically. User has to manually set the discount percentage / margin / free items to validate the pricing rule",
"fieldname": "validate_applied_rule",
"fieldtype": "Check",
"label": "Validate Applied Rule"
@@ -525,7 +534,8 @@
},
{
"fieldname": "help_section",
"fieldtype": "Section Break",
"fieldtype": "Tab Break",
"label": "Help Article",
"options": "Simple"
},
{
@@ -603,12 +613,42 @@
"fieldname": "apply_recursion_over",
"fieldtype": "Float",
"label": "Apply Recursion Over (As Per Transaction UOM)"
},
{
"fieldname": "priority_section",
"fieldtype": "Section Break",
"label": "Priority"
},
{
"fieldname": "dynamic_condition_tab",
"fieldtype": "Tab Break",
"label": "Dynamic Condition"
},
{
"fieldname": "validate_pricing_rule_section",
"fieldtype": "Section Break",
"label": "Validate Pricing Rule"
},
{
"fieldname": "column_break_texp",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_sayg",
"fieldtype": "Column Break"
},
{
"default": "0",
"description": "Enable this checkbox even if you want to set the zero priority",
"fieldname": "has_priority",
"fieldtype": "Check",
"label": "Has Priority"
}
],
"icon": "fa fa-gift",
"idx": 1,
"links": [],
"modified": "2023-02-14 04:53:34.887358",
"modified": "2024-09-16 18:14:51.314765",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",
@@ -670,4 +710,4 @@
"sort_order": "DESC",
"states": [],
"title_field": "title"
}
}

View File

@@ -27,9 +27,7 @@ class PricingRule(Document):
from frappe.types import DF
from erpnext.accounts.doctype.pricing_rule_brand.pricing_rule_brand import PricingRuleBrand
from erpnext.accounts.doctype.pricing_rule_item_code.pricing_rule_item_code import (
PricingRuleItemCode,
)
from erpnext.accounts.doctype.pricing_rule_item_code.pricing_rule_item_code import PricingRuleItemCode
from erpnext.accounts.doctype.pricing_rule_item_group.pricing_rule_item_group import (
PricingRuleItemGroup,
)
@@ -67,6 +65,7 @@ class PricingRule(Document):
free_item_rate: DF.Currency
free_item_uom: DF.Link | None
free_qty: DF.Float
has_priority: DF.Check
is_cumulative: DF.Check
is_recursive: DF.Check
item_groups: DF.Table[PricingRuleItemGroup]
@@ -140,6 +139,7 @@ class PricingRule(Document):
self.validate_price_list_with_currency()
self.validate_dates()
self.validate_condition()
self.validate_mixed_with_recursion()
if not self.margin_type:
self.margin_rate_or_amount = 0.0
@@ -156,6 +156,12 @@ class PricingRule(Document):
frappe.throw(_("Duplicate {0} found in the table").format(self.apply_on))
def validate_mandatory(self):
if self.has_priority and not self.priority:
throw(_("Priority is mandatory"), frappe.MandatoryError, _("Please Set Priority"))
if self.priority and not self.has_priority:
self.has_priority = 1
for apply_on, field in apply_on_dict.items():
if self.apply_on == apply_on and len(self.get(field) or []) < 1:
throw(_("{0} is not added in the table").format(apply_on), frappe.MandatoryError)
@@ -180,7 +186,8 @@ class PricingRule(Document):
if not self.priority:
throw(
_("As the field {0} is enabled, the field {1} is mandatory.").format(
frappe.bold("Apply Discount on Discounted Rate"), frappe.bold("Priority")
frappe.bold(_("Apply Discount on Discounted Rate")),
frappe.bold(_("Priority")),
)
)
@@ -188,7 +195,7 @@ class PricingRule(Document):
throw(
_(
"As the field {0} is enabled, the value of the field {1} should be more than 1."
).format(frappe.bold("Apply Discount on Discounted Rate"), frappe.bold("Priority"))
).format(frappe.bold(_("Apply Discount on Discounted Rate")), frappe.bold(_("Priority")))
)
def validate_applicable_for_selling_or_buying(self):
@@ -303,6 +310,10 @@ class PricingRule(Document):
):
frappe.throw(_("Invalid condition expression"))
def validate_mixed_with_recursion(self):
if self.mixed_conditions and self.is_recursive:
frappe.throw(_("Recursive Discounts with Mixed condition is not supported by the system"))
# --------------------------------------------------------------------------------

View File

@@ -5,14 +5,17 @@
import unittest
import frappe
from frappe.tests.utils import FrappeTestCase, change_settings
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.controllers.sales_and_purchase_return import make_return_doc
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
from erpnext.stock.doctype.item.test_item import make_item
from erpnext.stock.get_item_details import get_item_details
class TestPricingRule(unittest.TestCase):
class TestPricingRule(FrappeTestCase):
def setUp(self):
delete_existing_pricing_rules()
setup_pricing_rule_data()
@@ -929,6 +932,30 @@ class TestPricingRule(unittest.TestCase):
for doc in [si, si1]:
doc.delete()
def test_pricing_rule_for_transaction_with_condition(self):
make_item("PR Transaction Condition")
frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule")
make_pricing_rule(
selling=1,
min_qty=0,
price_or_product_discount="Product",
apply_on="Transaction",
free_item="PR Transaction Condition",
free_qty=1,
free_item_rate=10,
condition="customer=='_Test Customer 1'",
)
si = create_sales_invoice(qty=5, customer="_Test Customer 1", do_not_submit=True)
self.assertEqual(len(si.items), 2)
self.assertEqual(si.items[1].rate, 10)
si1 = create_sales_invoice(qty=5, customer="_Test Customer 2", do_not_submit=True)
self.assertEqual(len(si1.items), 1)
for doc in [si, si1]:
doc.delete()
def test_remove_pricing_rule(self):
item = make_item("Water Flask")
make_item_price("Water Flask", "_Test Price List", 100)
@@ -1157,6 +1184,199 @@ class TestPricingRule(unittest.TestCase):
frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 1")
frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 2")
def test_priority_of_multiple_pricing_rules(self):
frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 1")
frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 2")
test_record = {
"doctype": "Pricing Rule",
"title": "_Test Pricing Rule 1",
"name": "_Test Pricing Rule 1",
"apply_on": "Item Code",
"currency": "USD",
"items": [
{
"item_code": "_Test Item",
}
],
"selling": 1,
"price_or_product_discount": "Price",
"rate_or_discount": "Discount Percentage",
"discount_percentage": 10,
"has_priority": 1,
"priority": 1,
"company": "_Test Company",
}
frappe.get_doc(test_record.copy()).insert()
test_record = {
"doctype": "Pricing Rule",
"title": "_Test Pricing Rule 2",
"name": "_Test Pricing Rule 2",
"apply_on": "Item Code",
"currency": "USD",
"items": [
{
"item_code": "_Test Item",
}
],
"selling": 1,
"price_or_product_discount": "Price",
"rate_or_discount": "Discount Percentage",
"discount_percentage": 20,
"has_priority": 1,
"priority": 3,
"company": "_Test Company",
}
frappe.get_doc(test_record.copy()).insert()
so = make_sales_order(item_code="_Test Item", qty=1, price_list_rate=1000, do_not_submit=True)
self.assertEqual(so.items[0].discount_percentage, 20)
self.assertEqual(so.items[0].rate, 800)
frappe.delete_doc_if_exists("Sales Order", so.name)
frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 1")
frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 2")
def test_pricing_rules_with_and_without_apply_multiple(self):
item = make_item("PR Item 99")
test_records = [
{
"doctype": "Pricing Rule",
"title": "_Test discount on item group",
"name": "_Test discount on item group",
"apply_on": "Item Group",
"item_groups": [
{
"item_group": "Products",
}
],
"selling": 1,
"price_or_product_discount": "Price",
"rate_or_discount": "Discount Percentage",
"discount_percentage": 60,
"has_priority": 1,
"company": "_Test Company",
"apply_multiple_pricing_rules": True,
},
{
"doctype": "Pricing Rule",
"title": "_Test fixed rate on item code",
"name": "_Test fixed rate on item code",
"apply_on": "Item Code",
"items": [
{
"item_code": item.name,
}
],
"selling": 1,
"price_or_product_discount": "Price",
"rate_or_discount": "Rate",
"rate": 25,
"has_priority": 1,
"company": "_Test Company",
"apply_multiple_pricing_rules": False,
},
]
for item_group_priority, item_code_priority in [(2, 4), (4, 2)]:
item_group_rule = frappe.get_doc(test_records[0].copy())
item_group_rule.priority = item_group_priority
item_group_rule.insert()
item_code_rule = frappe.get_doc(test_records[1].copy())
item_code_rule.priority = item_code_priority
item_code_rule.insert()
si = create_sales_invoice(qty=5, customer="_Test Customer 1", item=item.name, do_not_submit=True)
si.save()
self.assertEqual(len(si.pricing_rules), 1)
# Item Code rule should've applied as it has higher priority
expected_rule = item_group_rule if item_group_priority > item_code_priority else item_code_rule
self.assertEqual(si.pricing_rules[0].pricing_rule, expected_rule.name)
si.delete()
item_group_rule.delete()
item_code_rule.delete()
def test_validation_on_mixed_condition_with_recursion(self):
pricing_rule = make_pricing_rule(
discount_percentage=10,
selling=1,
priority=2,
min_qty=4,
title="_Test Pricing Rule with Min Qty - 2",
)
pricing_rule.mixed_conditions = True
pricing_rule.is_recursive = True
self.assertRaises(frappe.ValidationError, pricing_rule.save)
def test_ignore_pricing_rule_for_credit_note(self):
frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule")
pricing_rule = make_pricing_rule(
discount_percentage=20,
selling=1,
buying=1,
priority=1,
title="_Test Pricing Rule",
)
si = create_sales_invoice(do_not_submit=True, customer="_Test Customer 1", qty=1)
item = si.items[0]
si.submit()
self.assertEqual(item.discount_percentage, 20)
self.assertEqual(item.rate, 80)
# change discount on pricing rule
pricing_rule.discount_percentage = 30
pricing_rule.save()
credit_note = make_return_doc(si.doctype, si.name)
credit_note.save()
self.assertEqual(credit_note.ignore_pricing_rule, 1)
self.assertEqual(credit_note.pricing_rules, [])
self.assertEqual(credit_note.items[0].discount_percentage, 20)
self.assertEqual(credit_note.items[0].rate, 80)
self.assertEqual(credit_note.items[0].pricing_rules, None)
credit_note.delete()
si.cancel()
def test_ignore_pricing_rule_for_debit_note(self):
frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule")
pricing_rule = make_pricing_rule(
discount_percentage=20,
buying=1,
priority=1,
title="_Test Pricing Rule",
)
pi = make_purchase_invoice(do_not_submit=True, supplier="_Test Supplier 1", qty=1)
item = pi.items[0]
pi.submit()
self.assertEqual(item.discount_percentage, 20)
self.assertEqual(item.rate, 40)
# change discount on pricing rule
pricing_rule.discount_percentage = 30
pricing_rule.save()
# create debit note from purchase invoice
debit_note = make_return_doc(pi.doctype, pi.name)
debit_note.save()
self.assertEqual(debit_note.ignore_pricing_rule, 1)
self.assertEqual(debit_note.pricing_rules, [])
self.assertEqual(debit_note.items[0].discount_percentage, 20)
self.assertEqual(debit_note.items[0].rate, 40)
self.assertEqual(debit_note.items[0].pricing_rules, None)
debit_note.delete()
pi.cancel()
test_dependencies = ["Campaign"]
@@ -1185,6 +1405,7 @@ def make_pricing_rule(**args):
"priority": args.priority or 1,
"discount_amount": args.discount_amount or 0.0,
"apply_multiple_pricing_rules": args.apply_multiple_pricing_rules or 0,
"has_priority": args.has_priority or 0,
}
)

View File

@@ -33,6 +33,9 @@ def get_pricing_rules(args, doc=None):
for apply_on in ["Item Code", "Item Group", "Brand"]:
pricing_rules.extend(_get_pricing_rules(apply_on, args, values))
if pricing_rules and pricing_rules[0].has_priority:
continue
if pricing_rules and not apply_multiple_pricing_rules(pricing_rules):
break
@@ -171,12 +174,9 @@ def _get_pricing_rules(apply_on, args, values):
def apply_multiple_pricing_rules(pricing_rules):
apply_multiple_rule = [
d.apply_multiple_pricing_rules for d in pricing_rules if d.apply_multiple_pricing_rules
]
if not apply_multiple_rule:
return False
for d in pricing_rules:
if not d.apply_multiple_pricing_rules:
return False
return True
@@ -486,7 +486,7 @@ def get_qty_and_rate_for_other_item(doc, pr_doc, pricing_rules, row_item):
continue
stock_qty = row.get("qty") * (row.get("conversion_factor") or 1.0)
amount = stock_qty * (row.get("price_list_rate") or row.get("rate"))
amount = stock_qty * (flt(row.get("price_list_rate")) or flt(row.get("rate")))
pricing_rules = filter_pricing_rules_for_qty_amount(stock_qty, amount, pricing_rules, row)
if pricing_rules and pricing_rules[0]:
@@ -561,6 +561,7 @@ def apply_pricing_rule_on_transaction(doc):
if pricing_rules:
pricing_rules = filter_pricing_rules_for_qty_amount(doc.total_qty, doc.total, pricing_rules)
pricing_rules = filter_pricing_rule_based_on_condition(pricing_rules, doc)
if not pricing_rules:
remove_free_item(doc)

View File

@@ -20,6 +20,17 @@ frappe.ui.form.on("Process Payment Reconciliation", {
},
};
});
frm.set_query("default_advance_account", function (doc) {
return {
filters: {
company: doc.company,
is_group: 0,
account_type: doc.party_type == "Customer" ? "Receivable" : "Payable",
root_type: doc.party_type == "Customer" ? "Liability" : "Asset",
},
};
});
frm.set_query("cost_center", function (doc) {
return {
filters: {
@@ -102,6 +113,7 @@ frappe.ui.form.on("Process Payment Reconciliation", {
company(frm) {
frm.set_value("party", "");
frm.set_value("receivable_payable_account", "");
frm.set_value("default_advance_account", "");
},
party_type(frm) {
frm.set_value("party", "");
@@ -109,6 +121,7 @@ frappe.ui.form.on("Process Payment Reconciliation", {
party(frm) {
frm.set_value("receivable_payable_account", "");
frm.set_value("default_advance_account", "");
if (!frm.doc.receivable_payable_account && frm.doc.party_type && frm.doc.party) {
return frappe.call({
method: "erpnext.accounts.party.get_party_account",
@@ -116,10 +129,16 @@ frappe.ui.form.on("Process Payment Reconciliation", {
company: frm.doc.company,
party_type: frm.doc.party_type,
party: frm.doc.party,
include_advance: 1,
},
callback: (r) => {
if (!r.exc && r.message) {
frm.set_value("receivable_payable_account", r.message);
if (typeof r.message === "string") {
frm.set_value("receivable_payable_account", r.message);
} else if (Array.isArray(r.message)) {
frm.set_value("receivable_payable_account", r.message[0]);
frm.set_value("default_advance_account", r.message[1]);
}
}
frm.refresh();
},

View File

@@ -13,6 +13,7 @@
"column_break_io6c",
"party",
"receivable_payable_account",
"default_advance_account",
"filter_section",
"from_invoice_date",
"to_invoice_date",
@@ -141,12 +142,23 @@
{
"fieldname": "section_break_a8yx",
"fieldtype": "Section Break"
},
{
"depends_on": "eval:doc.party",
"description": "Only 'Payment Entries' made against this advance account are supported.",
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/advance-in-separate-party-account",
"fieldname": "default_advance_account",
"fieldtype": "Link",
"label": "Default Advance Account",
"mandatory_depends_on": "doc.party_type",
"options": "Account",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2023-08-11 10:56:51.699137",
"modified": "2024-08-27 14:48:56.715320",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Process Payment Reconciliation",
@@ -180,4 +192,4 @@
"sort_order": "DESC",
"states": [],
"title_field": "company"
}
}

View File

@@ -1,6 +1,8 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import json
import frappe
from frappe import _, qb
from frappe.model.document import Document
@@ -21,6 +23,7 @@ class ProcessPaymentReconciliation(Document):
bank_cash_account: DF.Link | None
company: DF.Link
cost_center: DF.Link | None
default_advance_account: DF.Link
error_log: DF.LongText | None
from_invoice_date: DF.Date | None
from_payment_date: DF.Date | None
@@ -99,6 +102,7 @@ def get_pr_instance(doc: str):
"party_type",
"party",
"receivable_payable_account",
"default_advance_account",
"from_invoice_date",
"to_invoice_date",
"from_payment_date",
@@ -504,7 +508,7 @@ def is_any_doc_running(for_filter: str | dict | None = None) -> str | None:
running_doc = None
if for_filter:
if isinstance(for_filter, str):
for_filter = frappe.json.loads(for_filter)
for_filter = json.loads(for_filter)
running_doc = frappe.db.get_value(
"Process Payment Reconciliation",

View File

@@ -16,6 +16,7 @@
"cost_center",
"territory",
"ignore_exchange_rate_revaluation_journals",
"ignore_cr_dr_notes",
"column_break_14",
"to_date",
"finance_book",
@@ -383,10 +384,16 @@
"fieldname": "ignore_exchange_rate_revaluation_journals",
"fieldtype": "Check",
"label": "Ignore Exchange Rate Revaluation Journals"
},
{
"default": "0",
"fieldname": "ignore_cr_dr_notes",
"fieldtype": "Check",
"label": "Ignore System Generated Credit / Debit Notes"
}
],
"links": [],
"modified": "2023-12-18 12:20:08.965120",
"modified": "2024-08-13 10:41:18.381165",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Process Statement Of Accounts",

View File

@@ -54,6 +54,7 @@ class ProcessStatementOfAccounts(Document):
frequency: DF.Literal["Weekly", "Monthly", "Quarterly"]
from_date: DF.Date | None
group_by: DF.Literal["", "Group by Voucher", "Group by Voucher (Consolidated)"]
ignore_cr_dr_notes: DF.Check
ignore_exchange_rate_revaluation_journals: DF.Check
include_ageing: DF.Check
include_break: DF.Check
@@ -133,6 +134,9 @@ def get_statement_dict(doc, get_statement_dict=False):
if doc.ignore_exchange_rate_revaluation_journals:
filters.update({"ignore_err": True})
if doc.ignore_cr_dr_notes:
filters.update({"ignore_cr_dr_notes": True})
if doc.report == "General Ledger":
filters.update(get_gl_filters(doc, entry, tax_id, presentation_currency))
col, res = get_soa(filters)

View File

@@ -2,6 +2,18 @@
// For license information, please see license.txt
frappe.ui.form.on("Promotional Scheme", {
setup: function (frm) {
frm.set_query("for_price_list", "price_discount_slabs", (doc) => {
return {
filters: {
selling: doc.selling,
buying: doc.buying,
currency: doc.currency,
},
};
});
},
refresh: function (frm) {
frm.trigger("set_options_for_applicable_for");
frm.trigger("toggle_reqd_apply_on");

View File

@@ -51,6 +51,7 @@ price_discount_fields = [
"discount_percentage",
"validate_applied_rule",
"apply_multiple_pricing_rules",
"for_price_list",
]
product_discount_fields = [
@@ -63,6 +64,7 @@ product_discount_fields = [
"recurse_for",
"apply_recursion_over",
"apply_multiple_pricing_rules",
"round_free_qty",
]
@@ -146,6 +148,7 @@ class PromotionalScheme(Document):
self.validate_applicable_for()
self.validate_pricing_rules()
self.validate_mixed_with_recursion()
def validate_applicable_for(self):
if self.applicable_for:
@@ -163,7 +166,7 @@ class PromotionalScheme(Document):
docnames = []
# If user has changed applicable for
if self._doc_before_save.applicable_for == self.applicable_for:
if self.get_doc_before_save() and self.get_doc_before_save().applicable_for == self.applicable_for:
return
docnames = frappe.get_all("Pricing Rule", filters={"promotional_scheme": self.name})
@@ -177,6 +180,7 @@ class PromotionalScheme(Document):
frappe.delete_doc("Pricing Rule", docname.name)
def on_update(self):
self.validate()
pricing_rules = (
frappe.get_all(
"Pricing Rule",
@@ -188,6 +192,15 @@ class PromotionalScheme(Document):
)
self.update_pricing_rules(pricing_rules)
def validate_mixed_with_recursion(self):
if self.mixed_conditions:
if self.product_discount_slabs:
for slab in self.product_discount_slabs:
if slab.is_recursive:
frappe.throw(
_("Recursive Discounts with Mixed condition is not supported by the system")
)
def update_pricing_rules(self, pricing_rules):
rules = {}
count = 0

View File

@@ -129,6 +129,25 @@ class TestPromotionalScheme(unittest.TestCase):
[pr.min_qty, pr.free_item, pr.free_qty, pr.recurse_for], [12, "_Test Item 2", 1, 12]
)
def test_validation_on_recurse_with_mixed_condition(self):
ps = make_promotional_scheme()
ps.set("price_discount_slabs", [])
ps.set(
"product_discount_slabs",
[
{
"rule_description": "12+1",
"min_qty": 12,
"free_item": "_Test Item 2",
"free_qty": 1,
"is_recursive": 1,
"recurse_for": 12,
}
],
)
ps.mixed_conditions = True
self.assertRaises(frappe.ValidationError, ps.save)
def make_promotional_scheme(**args):
args = frappe._dict(args)

View File

@@ -21,6 +21,7 @@
"rate",
"discount_amount",
"discount_percentage",
"for_price_list",
"section_break_11",
"warehouse",
"threshold_percentage",
@@ -120,6 +121,13 @@
"fieldtype": "Float",
"label": "Discount Percentage"
},
{
"depends_on": "eval:doc.rate_or_discount!=\"Rate\"",
"fieldname": "for_price_list",
"fieldtype": "Link",
"label": "For Price List",
"options": "Price List"
},
{
"fieldname": "section_break_11",
"fieldtype": "Section Break"
@@ -169,7 +177,7 @@
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-11-16 00:25:33.843996",
"modified": "2024-07-23 12:33:46.574950",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Promotional Scheme Price Discount",
@@ -177,4 +185,4 @@
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}
}

View File

@@ -19,6 +19,7 @@ class PromotionalSchemePriceDiscount(Document):
disable: DF.Check
discount_amount: DF.Currency
discount_percentage: DF.Float
for_price_list: DF.Link | None
max_amount: DF.Currency
max_qty: DF.Float
min_amount: DF.Currency

View File

@@ -22,6 +22,7 @@
"column_break_9",
"free_item_uom",
"free_item_rate",
"round_free_qty",
"section_break_12",
"warehouse",
"threshold_percentage",
@@ -181,12 +182,18 @@
"fieldtype": "Float",
"label": "Apply Recursion Over (As Per Transaction UOM)",
"mandatory_depends_on": "is_recursive"
},
{
"default": "0",
"fieldname": "round_free_qty",
"fieldtype": "Check",
"label": "Round Free Qty"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-03-12 12:53:58.199108",
"modified": "2024-07-22 17:25:07.880984",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Promotional Scheme Product Discount",
@@ -195,4 +202,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -53,6 +53,7 @@ class PromotionalSchemeProductDiscount(Document):
"20",
]
recurse_for: DF.Float
round_free_qty: DF.Check
rule_description: DF.SmallText
same_item: DF.Check
threshold_percentage: DF.Percent

View File

@@ -77,31 +77,6 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
erpnext.accounts.ledger_preview.show_stock_ledger_preview(this.frm);
}
if (this.frm.doc.repost_required && this.frm.doc.docstatus === 1) {
this.frm.set_intro(
__(
"Accounting entries for this invoice need to be reposted. Please click on 'Repost' button to update."
)
);
this.frm
.add_custom_button(__("Repost Accounting Entries"), () => {
this.frm.call({
doc: this.frm.doc,
method: "repost_accounting_entries",
freeze: true,
freeze_message: __("Reposting..."),
callback: (r) => {
if (!r.exc) {
frappe.msgprint(__("Accounting Entries are reposted."));
me.frm.refresh();
}
},
});
})
.removeClass("btn-default")
.addClass("btn-warning");
}
if (!doc.is_return && doc.docstatus == 1 && doc.outstanding_amount != 0) {
if (doc.on_hold) {
this.frm.add_custom_button(
@@ -485,10 +460,12 @@ function hide_fields(doc) {
var item_fields_stock = ["warehouse_section", "received_qty", "rejected_qty"];
cur_frm.fields_dict["items"].grid.set_column_disp(
item_fields_stock,
cint(doc.update_stock) == 1 || cint(doc.is_return) == 1 ? true : false
);
if (cur_frm.fields_dict["items"]) {
cur_frm.fields_dict["items"].grid.set_column_disp(
item_fields_stock,
cint(doc.update_stock) == 1 || cint(doc.is_return) == 1 ? true : false
);
}
cur_frm.refresh_fields();
}
@@ -671,8 +648,8 @@ frappe.ui.form.on("Purchase Invoice", {
},
onload: function (frm) {
if (frm.doc.__onload && frm.is_new()) {
if (frm.doc.supplier) {
if (frm.doc.__onload && frm.doc.supplier) {
if (frm.is_new()) {
frm.doc.apply_tds = frm.doc.__onload.supplier_tds ? 1 : 0;
}
if (!frm.doc.__onload.supplier_tds) {

View File

@@ -170,7 +170,6 @@
"against_expense_account",
"column_break_63",
"unrealized_profit_loss_account",
"repost_required",
"subscription_section",
"subscription",
"auto_repeat",
@@ -364,7 +363,8 @@
"description": "Once set, this invoice will be on hold till the set date",
"fieldname": "release_date",
"fieldtype": "Date",
"label": "Release Date"
"label": "Release Date",
"search_index": 1
},
{
"fieldname": "cb_17",
@@ -1271,6 +1271,7 @@
"fieldtype": "Select",
"in_standard_filter": 1,
"label": "Status",
"no_copy": 1,
"options": "\nDraft\nReturn\nDebit Note Issued\nSubmitted\nPaid\nPartly Paid\nUnpaid\nOverdue\nCancelled\nInternal Transfer",
"print_hide": 1
},
@@ -1603,15 +1604,6 @@
"fieldtype": "Check",
"label": "Use Company Default Round Off Cost Center"
},
{
"default": "0",
"fieldname": "repost_required",
"fieldtype": "Check",
"hidden": 1,
"label": "Repost Required",
"options": "Account",
"read_only": 1
},
{
"default": "0",
"fieldname": "use_transaction_date_exchange_rate",
@@ -1639,7 +1631,7 @@
"idx": 204,
"is_submittable": 1,
"links": [],
"modified": "2024-04-11 11:28:42.802211",
"modified": "2024-09-11 12:59:19.130593",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",

View File

@@ -3,7 +3,7 @@
import frappe
from frappe import _, throw
from frappe import _, qb, throw
from frappe.model.mapper import get_mapped_doc
from frappe.query_builder.functions import Sum
from frappe.utils import cint, cstr, flt, formatdate, get_link_to_form, getdate, nowdate
@@ -159,7 +159,6 @@ class PurchaseInvoice(BuyingController):
rejected_warehouse: DF.Link | None
release_date: DF.Date | None
remarks: DF.SmallText | None
repost_required: DF.Check
represents_company: DF.Link | None
return_against: DF.Link | None
rounded_total: DF.Currency
@@ -286,7 +285,6 @@ class PurchaseInvoice(BuyingController):
self.set_against_expense_account()
self.validate_write_off_account()
self.validate_multiple_billing("Purchase Receipt", "pr_detail", "amount")
self.create_remarks()
self.set_status()
self.validate_purchase_receipt_if_update_stock()
validate_inter_company_party(
@@ -323,10 +321,11 @@ class PurchaseInvoice(BuyingController):
def create_remarks(self):
if not self.remarks:
if self.bill_no and self.bill_date:
self.remarks = _("Against Supplier Invoice {0} dated {1}").format(
self.bill_no, formatdate(self.bill_date)
)
if self.bill_no:
self.remarks = _("Against Supplier Invoice {0}").format(self.bill_no)
if self.bill_date:
self.remarks += " " + _("dated {0}").format(formatdate(self.bill_date))
else:
self.remarks = _("No Remarks")
@@ -362,16 +361,16 @@ class PurchaseInvoice(BuyingController):
if account.report_type != "Balance Sheet":
frappe.throw(
_(
"Please ensure {} account is a Balance Sheet account. You can change the parent account to a Balance Sheet account or select a different account."
).format(frappe.bold("Credit To")),
"Please ensure that the {0} account is a Balance Sheet account. You can change the parent account to a Balance Sheet account or select a different account."
).format(frappe.bold(_("Credit To"))),
title=_("Invalid Account"),
)
if self.supplier and account.account_type != "Payable":
frappe.throw(
_(
"Please ensure {} account {} is a Payable account. Change the account type to Payable or select a different account."
).format(frappe.bold("Credit To"), frappe.bold(self.credit_to)),
"Please ensure that the {0} account {1} is a Payable account. You can change the account type to Payable or select a different account."
).format(frappe.bold(_("Credit To")), frappe.bold(self.credit_to)),
title=_("Invalid Account"),
)
@@ -448,7 +447,7 @@ class PurchaseInvoice(BuyingController):
stock_not_billed_account = self.get_company_default("stock_received_but_not_billed")
stock_items = self.get_stock_items()
asset_received_but_not_billed = None
self.asset_received_but_not_billed = None
if self.update_stock:
self.validate_item_code()
@@ -531,26 +530,60 @@ class PurchaseInvoice(BuyingController):
frappe.msgprint(msg, title=_("Expense Head Changed"))
item.expense_account = stock_not_billed_account
elif item.is_fixed_asset and item.pr_detail:
if not asset_received_but_not_billed:
asset_received_but_not_billed = self.get_company_default("asset_received_but_not_billed")
item.expense_account = asset_received_but_not_billed
elif item.is_fixed_asset:
account_type = (
"capital_work_in_progress_account"
if is_cwip_accounting_enabled(item.asset_category)
else "fixed_asset_account"
)
asset_category_account = get_asset_category_account(
account_type, item=item.item_code, company=self.company
)
if not asset_category_account:
form_link = get_link_to_form("Asset Category", item.asset_category)
throw(
_("Please set Fixed Asset Account in {} against {}.").format(form_link, self.company),
title=_("Missing Account"),
account = None
if not item.pr_detail and item.po_detail:
receipt_item = frappe.get_cached_value(
"Purchase Receipt Item",
{
"purchase_order": item.purchase_order,
"purchase_order_item": item.po_detail,
"docstatus": 1,
},
["name", "parent"],
as_dict=1,
)
item.expense_account = asset_category_account
if receipt_item:
item.pr_detail = receipt_item.name
item.purchase_receipt = receipt_item.parent
if item.pr_detail:
if not self.asset_received_but_not_billed:
self.asset_received_but_not_billed = self.get_company_default(
"asset_received_but_not_billed"
)
# check if 'Asset Received But Not Billed' account is credited in Purchase receipt or not
arbnb_booked_in_pr = frappe.db.get_value(
"GL Entry",
{
"voucher_type": "Purchase Receipt",
"voucher_no": item.purchase_receipt,
"account": self.asset_received_but_not_billed,
},
"name",
)
if arbnb_booked_in_pr:
account = self.asset_received_but_not_billed
if not account:
account_type = (
"capital_work_in_progress_account"
if is_cwip_accounting_enabled(item.asset_category)
else "fixed_asset_account"
)
account = get_asset_category_account(
account_type, item=item.item_code, company=self.company
)
if not account:
form_link = get_link_to_form("Asset Category", item.asset_category)
throw(
_("Please set Fixed Asset Account in {} against {}.").format(
form_link, self.company
),
title=_("Missing Account"),
)
item.expense_account = account
elif not item.expense_account and for_validate:
throw(_("Expense account is mandatory for item {0}").format(item.item_code or item.item_name))
@@ -558,7 +591,7 @@ class PurchaseInvoice(BuyingController):
for item in self.get("items"):
validate_account_head(item.idx, item.expense_account, self.company, "Expense")
def set_against_expense_account(self):
def set_against_expense_account(self, force=False):
against_accounts = []
for item in self.get("items"):
if item.expense_account and (item.expense_account not in against_accounts):
@@ -566,6 +599,10 @@ class PurchaseInvoice(BuyingController):
self.against_expense_account = ",".join(against_accounts)
def force_set_against_expense_account(self):
self.set_against_expense_account()
frappe.db.set_value(self.doctype, self.name, "against_expense_account", self.against_expense_account)
def po_required(self):
if frappe.db.get_value("Buying Settings", None, "po_required") == "Yes":
if frappe.get_value(
@@ -581,7 +618,7 @@ class PurchaseInvoice(BuyingController):
"To submit the invoice without purchase order please set {0} as {1} in {2}"
).format(
frappe.bold(_("Purchase Order Required")),
frappe.bold("No"),
frappe.bold(_("No")),
get_link_to_form("Buying Settings", "Buying Settings", "Buying Settings"),
)
throw(msg, title=_("Mandatory Purchase Order"))
@@ -602,7 +639,7 @@ class PurchaseInvoice(BuyingController):
"To submit the invoice without purchase receipt please set {0} as {1} in {2}"
).format(
frappe.bold(_("Purchase Receipt Required")),
frappe.bold("No"),
frappe.bold(_("No")),
get_link_to_form("Buying Settings", "Buying Settings", "Buying Settings"),
)
throw(msg, title=_("Mandatory Purchase Receipt"))
@@ -648,6 +685,19 @@ class PurchaseInvoice(BuyingController):
where name=`tabPurchase Invoice Item`.parent and update_stock = 1)""",
}
)
self.status_updater.append(
{
"source_dt": "Purchase Invoice Item",
"target_dt": "Material Request Item",
"join_field": "material_request_item",
"target_field": "received_qty",
"target_parent_dt": "Material Request",
"target_parent_field": "per_received",
"target_ref_field": "stock_qty",
"source_field": "stock_qty",
"percent_join_field": "material_request",
}
)
if cint(self.is_return):
self.status_updater.append(
{
@@ -681,6 +731,9 @@ class PurchaseInvoice(BuyingController):
validate_docs_for_voucher_types(["Purchase Invoice"])
validate_docs_for_deferred_accounting([], [self.name])
def before_submit(self):
self.create_remarks()
def on_submit(self):
super().on_submit()
@@ -707,6 +760,7 @@ class PurchaseInvoice(BuyingController):
# Updating stock ledger should always be called after updating prevdoc status,
# because updating ordered qty in bin depends upon updated ordered qty in PO
if self.update_stock == 1:
self.make_bundle_for_sales_purchase_return()
self.make_bundle_using_old_serial_batch_fields()
self.update_stock_ledger()
@@ -728,27 +782,25 @@ class PurchaseInvoice(BuyingController):
self.process_common_party_accounting()
def on_update_after_submit(self):
if hasattr(self, "repost_required"):
fields_to_check = [
"cash_bank_account",
"write_off_account",
"unrealized_profit_loss_account",
"is_opening",
]
child_tables = {"items": ("expense_account",), "taxes": ("account_head",)}
self.needs_repost = self.check_if_fields_updated(fields_to_check, child_tables)
if self.needs_repost:
self.validate_for_repost()
self.db_set("repost_required", self.needs_repost)
fields_to_check = [
"cash_bank_account",
"write_off_account",
"unrealized_profit_loss_account",
"is_opening",
]
child_tables = {"items": ("expense_account",), "taxes": ("account_head",)}
self.needs_repost = self.check_if_fields_updated(fields_to_check, child_tables)
if self.needs_repost:
self.validate_for_repost()
self.repost_accounting_entries()
def make_gl_entries(self, gl_entries=None, from_repost=False):
if not gl_entries:
gl_entries = self.get_gl_entries()
update_outstanding = "No" if (cint(self.is_paid) or self.write_off_account) else "Yes"
if self.docstatus == 1:
if not gl_entries:
gl_entries = self.get_gl_entries()
if gl_entries:
update_outstanding = "No" if (cint(self.is_paid) or self.write_off_account) else "Yes"
if self.docstatus == 1:
if gl_entries:
make_gl_entries(
gl_entries,
update_outstanding=update_outstanding,
@@ -756,32 +808,43 @@ class PurchaseInvoice(BuyingController):
from_repost=from_repost,
)
self.make_exchange_gain_loss_journal()
elif self.docstatus == 2:
provisional_entries = [a for a in gl_entries if a.voucher_type == "Purchase Receipt"]
make_reverse_gl_entries(voucher_type=self.doctype, voucher_no=self.name)
if provisional_entries:
for entry in provisional_entries:
frappe.db.set_value(
"GL Entry",
{
"voucher_type": "Purchase Receipt",
"voucher_detail_no": entry.voucher_detail_no,
},
"is_cancelled",
1,
)
if update_outstanding == "No":
update_outstanding_amt(
self.credit_to,
"Supplier",
self.supplier,
self.doctype,
self.return_against if cint(self.is_return) and self.return_against else self.name,
)
elif self.docstatus == 2 and cint(self.update_stock) and self.auto_accounting_for_stock:
elif self.docstatus == 2:
make_reverse_gl_entries(voucher_type=self.doctype, voucher_no=self.name)
self.cancel_provisional_entries()
self.update_supplier_outstanding(update_outstanding)
def cancel_provisional_entries(self):
rows = set()
purchase_receipts = set()
for d in self.items:
if d.purchase_receipt:
purchase_receipts.add(d.purchase_receipt)
rows.add(d.name)
if rows:
# cancel gl entries
gle = qb.DocType("GL Entry")
gle_update_query = (
qb.update(gle)
.set(gle.is_cancelled, 1)
.where(
(gle.voucher_type == "Purchase Receipt")
& (gle.voucher_no.isin(purchase_receipts))
& (gle.voucher_detail_no.isin(rows))
)
)
gle_update_query.run()
def update_supplier_outstanding(self, update_outstanding):
if update_outstanding == "No":
update_outstanding_amt(
self.credit_to,
"Supplier",
self.supplier,
self.doctype,
self.return_against if cint(self.is_return) and self.return_against else self.name,
)
def get_gl_entries(self, warehouse_account=None):
self.auto_accounting_for_stock = erpnext.is_perpetual_inventory_enabled(self.company)
@@ -894,8 +957,8 @@ class PurchaseInvoice(BuyingController):
"Company", self.company, "enable_provisional_accounting_for_non_stock_items"
)
)
purchase_receipt_doc_map = {}
if provisional_accounting_for_non_stock_items:
self.get_provisional_accounts()
for item in self.get("items"):
if flt(item.base_net_amount):
@@ -1034,46 +1097,7 @@ class PurchaseInvoice(BuyingController):
dummy, amount = self.get_amount_and_base_amount(item, None)
if provisional_accounting_for_non_stock_items:
if item.purchase_receipt:
provisional_account, pr_qty, pr_base_rate = frappe.get_cached_value(
"Purchase Receipt Item",
item.pr_detail,
["provisional_expense_account", "qty", "base_rate"],
)
provisional_account = provisional_account or self.get_company_default(
"default_provisional_account"
)
purchase_receipt_doc = purchase_receipt_doc_map.get(item.purchase_receipt)
if not purchase_receipt_doc:
purchase_receipt_doc = frappe.get_doc(
"Purchase Receipt", item.purchase_receipt
)
purchase_receipt_doc_map[item.purchase_receipt] = purchase_receipt_doc
# Post reverse entry for Stock-Received-But-Not-Billed if it is booked in Purchase Receipt
expense_booked_in_pr = frappe.db.get_value(
"GL Entry",
{
"is_cancelled": 0,
"voucher_type": "Purchase Receipt",
"voucher_no": item.purchase_receipt,
"voucher_detail_no": item.pr_detail,
"account": provisional_account,
},
"name",
)
if expense_booked_in_pr:
# Intentionally passing purchase invoice item to handle partial billing
purchase_receipt_doc.add_provisional_gl_entry(
item,
gl_entries,
self.posting_date,
provisional_account,
reverse=1,
item_amount=(min(item.qty, pr_qty) * pr_base_rate),
)
self.make_provisional_gl_entry(gl_entries, item)
if not self.is_internal_transfer():
gl_entries.append(
@@ -1169,10 +1193,67 @@ class PurchaseInvoice(BuyingController):
if item.is_fixed_asset and item.landed_cost_voucher_amount:
self.update_gross_purchase_amount_for_linked_assets(item)
def get_provisional_accounts(self):
self.provisional_accounts = frappe._dict()
linked_purchase_receipts = set([d.purchase_receipt for d in self.items if d.purchase_receipt])
pr_items = frappe.get_all(
"Purchase Receipt Item",
filters={"parent": ("in", linked_purchase_receipts)},
fields=["name", "provisional_expense_account", "qty", "base_rate"],
)
default_provisional_account = self.get_company_default("default_provisional_account")
provisional_accounts = set(
[
d.provisional_expense_account
if d.provisional_expense_account
else default_provisional_account
for d in pr_items
]
)
provisional_gl_entries = frappe.get_all(
"GL Entry",
filters={
"voucher_type": "Purchase Receipt",
"voucher_no": ("in", linked_purchase_receipts),
"account": ("in", provisional_accounts),
"is_cancelled": 0,
},
fields=["voucher_detail_no"],
)
rows_with_provisional_entries = [d.voucher_detail_no for d in provisional_gl_entries]
for item in pr_items:
self.provisional_accounts[item.name] = {
"provisional_account": item.provisional_expense_account or default_provisional_account,
"qty": item.qty,
"base_rate": item.base_rate,
"has_provisional_entry": item.name in rows_with_provisional_entries,
}
def make_provisional_gl_entry(self, gl_entries, item):
if item.purchase_receipt:
pr_item = self.provisional_accounts.get(item.pr_detail, {})
if pr_item.get("has_provisional_entry"):
purchase_receipt_doc = frappe.get_cached_doc("Purchase Receipt", item.purchase_receipt)
# Intentionally passing purchase invoice item to handle partial billing
purchase_receipt_doc.add_provisional_gl_entry(
item,
gl_entries,
self.posting_date,
pr_item.get("provisional_account"),
reverse=1,
item_amount=(min(item.qty, pr_item.get("qty")) * pr_item.get("base_rate")),
)
def update_gross_purchase_amount_for_linked_assets(self, item):
assets = frappe.db.get_all(
"Asset",
filters={"purchase_invoice": self.name, "item_code": item.item_code},
filters={
"purchase_invoice": self.name,
"item_code": item.item_code,
"purchase_invoice_item": ("in", [item.name, ""]),
},
fields=["name", "asset_quantity"],
)
for asset in assets:
@@ -1612,6 +1693,9 @@ class PurchaseInvoice(BuyingController):
self.db_set("release_date", None)
def set_tax_withholding(self):
self.set("advance_tax", [])
self.set("tax_withheld_vouchers", [])
if not self.apply_tds:
return
@@ -1653,8 +1737,6 @@ class PurchaseInvoice(BuyingController):
self.remove(d)
## Add pending vouchers on which tax was withheld
self.set("tax_withheld_vouchers", [])
for voucher_no, voucher_details in voucher_wise_amount.items():
self.append(
"tax_withheld_vouchers",
@@ -1669,7 +1751,6 @@ class PurchaseInvoice(BuyingController):
self.calculate_taxes_and_totals()
def allocate_advance_tds(self, tax_withholding_details, advance_taxes):
self.set("advance_tax", [])
for tax in advance_taxes:
allocated_amount = 0
pending_amount = flt(tax.tax_amount - tax.allocated_amount)

View File

@@ -10,13 +10,19 @@ import erpnext
from erpnext.accounts.doctype.account.test_account import create_account, get_inventory_account
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
from erpnext.buying.doctype.purchase_order.purchase_order import get_mapped_purchase_invoice
from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order
from erpnext.buying.doctype.purchase_order.purchase_order import make_purchase_invoice as make_pi_from_po
from erpnext.buying.doctype.purchase_order.test_purchase_order import (
create_pr_against_po,
create_purchase_order,
)
from erpnext.buying.doctype.supplier.test_supplier import create_supplier
from erpnext.controllers.accounts_controller import get_payment_terms
from erpnext.controllers.buying_controller import QtyMismatchError
from erpnext.exceptions import InvalidCurrency
from erpnext.projects.doctype.project.test_project import make_project
from erpnext.stock.doctype.item.test_item import create_item
from erpnext.stock.doctype.material_request.material_request import make_purchase_order
from erpnext.stock.doctype.material_request.test_material_request import make_material_request
from erpnext.stock.doctype.purchase_receipt.purchase_receipt import (
make_purchase_invoice as create_purchase_invoice_from_receipt,
)
@@ -72,6 +78,31 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
# teardown
pi.delete()
def test_update_received_qty_in_material_request(self):
from erpnext.buying.doctype.purchase_order.purchase_order import make_purchase_invoice
"""
Test if the received_qty in Material Request is updated correctly when
a Purchase Invoice with update_stock=True is submitted.
"""
mr = make_material_request(item_code="_Test Item", qty=10)
mr.save()
mr.submit()
po = make_purchase_order(mr.name)
po.supplier = "_Test Supplier"
po.save()
po.submit()
# Create a Purchase Invoice with update_stock=True
pi = make_purchase_invoice(po.name)
pi.update_stock = True
pi.insert()
pi.submit()
# Check if the received quantity is updated in Material Request
mr.reload()
self.assertEqual(mr.items[0].received_qty, 10)
def test_gl_entries_without_perpetual_inventory(self):
frappe.db.set_value("Company", "_Test Company", "round_off_account", "Round Off - _TC")
pi = frappe.copy_doc(test_records[0])
@@ -1974,18 +2005,15 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
check_gl_entries(self, pi.name, expected_gle, nowdate())
pi.items[0].expense_account = "Service - _TC"
# Ledger reposted implicitly upon 'Update After Submit'
pi.save()
pi.load_from_db()
self.assertTrue(pi.repost_required)
pi.repost_accounting_entries()
expected_gle = [
["Creditors - _TC", 0.0, 1000, nowdate()],
["Service - _TC", 1000, 0.0, nowdate()],
]
check_gl_entries(self, pi.name, expected_gle, nowdate())
pi.load_from_db()
self.assertFalse(pi.repost_required)
@change_settings("Buying Settings", {"supplier_group": None})
def test_purchase_invoice_without_supplier_group(self):
@@ -2158,6 +2186,112 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
self.assertEqual(row.serial_no, "\n".join(serial_nos[:2]))
self.assertEqual(row.rejected_serial_no, serial_nos[2])
def test_make_pr_and_pi_from_po(self):
from erpnext.assets.doctype.asset.test_asset import create_asset_category
if not frappe.db.exists("Asset Category", "Computers"):
create_asset_category()
item = create_item(
item_code="_Test_Item", is_stock_item=0, is_fixed_asset=1, asset_category="Computers"
)
po = create_purchase_order(item_code=item.item_code)
pr = create_pr_against_po(po.name, 10)
pi = make_pi_from_po(po.name)
pi.insert()
pi.submit()
pr_gl_entries = frappe.db.sql(
"""select account, debit, credit
from `tabGL Entry` where voucher_type='Purchase Receipt' and voucher_no=%s
order by account asc""",
pr.name,
as_dict=1,
)
pr_expected_values = [
["Asset Received But Not Billed - _TC", 0, 5000],
["CWIP Account - _TC", 5000, 0],
]
for i, gle in enumerate(pr_gl_entries):
self.assertEqual(pr_expected_values[i][0], gle.account)
self.assertEqual(pr_expected_values[i][1], gle.debit)
self.assertEqual(pr_expected_values[i][2], gle.credit)
pi_gl_entries = frappe.db.sql(
"""select account, debit, credit
from `tabGL Entry` where voucher_type='Purchase Invoice' and voucher_no=%s
order by account asc""",
pi.name,
as_dict=1,
)
pi_expected_values = [
["Asset Received But Not Billed - _TC", 5000, 0],
["Creditors - _TC", 0, 5000],
]
for i, gle in enumerate(pi_gl_entries):
self.assertEqual(pi_expected_values[i][0], gle.account)
self.assertEqual(pi_expected_values[i][1], gle.debit)
self.assertEqual(pi_expected_values[i][2], gle.credit)
def test_adjust_incoming_rate_from_pi_with_multi_currency(self):
from erpnext.stock.doctype.landed_cost_voucher.test_landed_cost_voucher import (
make_landed_cost_voucher,
)
frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 0)
frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 1)
# Increase the cost of the item
pr = make_purchase_receipt(
qty=10, rate=1, currency="USD", do_not_save=1, supplier="_Test Supplier USD"
)
pr.conversion_rate = 6300
pr.plc_conversion_rate = 1
pr.save()
pr.submit()
self.assertEqual(pr.conversion_rate, 6300)
self.assertEqual(pr.plc_conversion_rate, 1)
self.assertEqual(pr.base_grand_total, 6300 * 10)
stock_value_difference = frappe.db.get_value(
"Stock Ledger Entry",
{"voucher_type": "Purchase Receipt", "voucher_no": pr.name},
"stock_value_difference",
)
self.assertEqual(stock_value_difference, 6300 * 10)
make_landed_cost_voucher(
company=pr.company,
receipt_document_type="Purchase Receipt",
receipt_document=pr.name,
charges=3000,
distribute_charges_based_on="Qty",
)
pi = create_purchase_invoice_from_receipt(pr.name)
for row in pi.items:
row.rate = 1.1
pi.save()
pi.submit()
stock_value_difference = frappe.db.get_value(
"Stock Ledger Entry",
{"voucher_type": "Purchase Receipt", "voucher_no": pr.name},
"stock_value_difference",
)
self.assertEqual(stock_value_difference, 7230 * 10)
frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 0)
frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1)
def set_advance_flag(company, flag, default_account):
frappe.db.set_value(

View File

@@ -57,6 +57,7 @@
"base_net_rate",
"base_net_amount",
"valuation_rate",
"sales_incoming_rate",
"item_tax_amount",
"landed_cost_voucher_amount",
"rm_supp_cost",
@@ -105,6 +106,8 @@
"purchase_receipt",
"pr_detail",
"sales_invoice_item",
"material_request",
"material_request_item",
"item_weight_details",
"weight_per_unit",
"total_weight",
@@ -934,12 +937,44 @@
{
"fieldname": "column_break_vbbb",
"fieldtype": "Column Break"
},
{
"fieldname": "material_request",
"fieldtype": "Link",
"label": "Material Request",
"no_copy": 1,
"options": "Material Request",
"print_hide": 1,
"read_only": 1,
"search_index": 1
},
{
"fieldname": "material_request_item",
"fieldtype": "Data",
"hidden": 1,
"label": "Material Request Item",
"no_copy": 1,
"oldfieldname": "pr_detail",
"oldfieldtype": "Data",
"print_hide": 1,
"read_only": 1,
"search_index": 1
},
{
"description": "Valuation rate for the item as per Sales Invoice (Only for Internal Transfers)",
"fieldname": "sales_incoming_rate",
"fieldtype": "Currency",
"hidden": 1,
"label": "Sales Incoming Rate",
"no_copy": 1,
"options": "Company:company:default_currency",
"print_hide": 1
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2024-03-19 19:09:47.210965",
"modified": "2024-07-19 12:12:42.449298",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",
@@ -949,4 +984,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -52,6 +52,8 @@ class PurchaseInvoiceItem(Document):
manufacturer_part_no: DF.Data | None
margin_rate_or_amount: DF.Float
margin_type: DF.Literal["", "Percentage", "Amount"]
material_request: DF.Link | None
material_request_item: DF.Data | None
net_amount: DF.Currency
net_rate: DF.Currency
page_break: DF.Check
@@ -77,6 +79,7 @@ class PurchaseInvoiceItem(Document):
rejected_serial_no: DF.Text | None
rejected_warehouse: DF.Link | None
rm_supp_cost: DF.Currency
sales_incoming_rate: DF.Currency
sales_invoice_item: DF.Data | None
serial_and_batch_bundle: DF.Link | None
serial_no: DF.Text | None

View File

@@ -1,7 +1,5 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format:ACC-REPOST-{#####}",
"creation": "2023-07-04 13:07:32.923675",
"default_view": "List",
"doctype": "DocType",
@@ -55,14 +53,15 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2023-09-26 14:21:27.362567",
"modified": "2024-06-03 17:30:37.012593",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Repost Accounting Ledger",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
@@ -71,7 +70,9 @@
"read": 1,
"report": 1,
"role": "System Manager",
"select": 1,
"share": 1,
"submit": 1,
"write": 1
}
],

View File

@@ -167,6 +167,10 @@ def start_repost(account_repost_doc=str) -> None:
doc.make_gl_entries_on_cancel()
doc.docstatus = 1
if doc.doctype == "Sales Invoice":
doc.force_set_against_income_account()
else:
doc.force_set_against_expense_account()
doc.make_gl_entries()
elif doc.doctype in ["Payment Entry", "Journal Entry", "Expense Claim"]:

View File

@@ -17,7 +17,7 @@
"in_create": 1,
"issingle": 1,
"links": [],
"modified": "2023-11-07 14:24:13.321522",
"modified": "2024-06-06 13:56:37.908879",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Repost Accounting Ledger Settings",
@@ -30,13 +30,17 @@
"print": 1,
"read": 1,
"role": "Administrator",
"select": 1,
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"read": 1,
"role": "System Manager",
"select": 1
"select": 1,
"write": 1
}
],
"sort_field": "modified",

View File

@@ -1,6 +1,5 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2022-10-19 21:59:33.553852",
"doctype": "DocType",
"editable_grid": 1,
@@ -99,13 +98,15 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2023-09-26 14:21:35.719727",
"modified": "2024-06-03 17:31:04.472279",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Repost Payment Ledger",
"owner": "Administrator",
"permissions": [
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
@@ -114,7 +115,9 @@
"read": 1,
"report": 1,
"role": "System Manager",
"select": 1,
"share": 1,
"submit": 1,
"write": 1
},
{

View File

@@ -68,31 +68,6 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
this.frm.toggle_reqd("due_date", !this.frm.doc.is_return);
if (this.frm.doc.repost_required && this.frm.doc.docstatus === 1) {
this.frm.set_intro(
__(
"Accounting entries for this invoice needs to be reposted. Please click on 'Repost' button to update."
)
);
this.frm
.add_custom_button(__("Repost Accounting Entries"), () => {
this.frm.call({
doc: this.frm.doc,
method: "repost_accounting_entries",
freeze: true,
freeze_message: __("Reposting..."),
callback: (r) => {
if (!r.exc) {
frappe.msgprint(__("Accounting Entries are reposted"));
me.frm.refresh();
}
},
});
})
.removeClass("btn-default")
.addClass("btn-warning");
}
if (this.frm.doc.is_return) {
this.frm.return_print_format = "Sales Invoice Return";
}
@@ -157,7 +132,7 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
const payment_is_overdue = doc.payment_schedule
.map((row) => Date.parse(row.due_date) < Date.now())
.reduce((prev, current) => prev || current);
.reduce((prev, current) => prev || current, false);
if (payment_is_overdue) {
this.frm.add_custom_button(
@@ -502,9 +477,13 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
frappe.msgprint(__("Please specify Company to proceed"));
} else {
var me = this;
const for_validate = me.frm.doc.is_return ? true : false;
return this.frm.call({
doc: me.frm.doc,
method: "set_missing_values",
args: {
for_validate: for_validate,
},
callback: function (r) {
if (!r.exc) {
if (r.message && r.message.print_format) {

View File

@@ -213,7 +213,6 @@
"is_internal_customer",
"is_discounted",
"remarks",
"repost_required",
"connections_tab"
],
"fields": [
@@ -787,6 +786,7 @@
"hide_days": 1,
"hide_seconds": 1,
"label": "Time Sheets",
"no_copy": 1,
"options": "Sales Invoice Timesheet",
"print_hide": 1
},
@@ -2124,15 +2124,6 @@
"label": "Write Off",
"width": "50%"
},
{
"default": "0",
"fieldname": "repost_required",
"fieldtype": "Check",
"hidden": 1,
"label": "Repost Required",
"no_copy": 1,
"read_only": 1
},
{
"fieldname": "incoterm",
"fieldtype": "Link",
@@ -2187,7 +2178,7 @@
"link_fieldname": "consolidated_invoice"
}
],
"modified": "2024-05-08 18:02:28.549041",
"modified": "2024-07-18 15:30:39.428519",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",

View File

@@ -161,7 +161,6 @@ class SalesInvoice(SellingController):
project: DF.Link | None
redeem_loyalty_points: DF.Check
remarks: DF.SmallText | None
repost_required: DF.Check
represents_company: DF.Link | None
return_against: DF.Link | None
rounded_total: DF.Currency
@@ -279,7 +278,6 @@ class SalesInvoice(SellingController):
self.check_sales_order_on_hold_or_close("sales_order")
self.validate_debit_to_acc()
self.clear_unallocated_advances("Sales Invoice Advance", "advances")
self.add_remarks()
self.validate_fixed_asset()
self.set_income_account_for_fixed_assets()
self.validate_item_cost_centers()
@@ -342,6 +340,7 @@ class SalesInvoice(SellingController):
):
validate_loyalty_points(self, self.loyalty_points)
self.allow_write_off_only_on_pos()
self.reset_default_field_value("set_warehouse", "items", "warehouse")
def validate_accounts(self):
@@ -423,6 +422,9 @@ class SalesInvoice(SellingController):
self.set_account_for_mode_of_payment()
self.set_paid_amount()
def before_submit(self):
self.add_remarks()
def on_submit(self):
self.validate_pos_paid_amount()
@@ -450,6 +452,7 @@ class SalesInvoice(SellingController):
if not self.get(table_name):
continue
self.make_bundle_for_sales_purchase_return(table_name)
self.make_bundle_using_old_serial_batch_fields(table_name)
self.update_stock_ledger()
@@ -514,7 +517,7 @@ class SalesInvoice(SellingController):
)
if pos_closing_entry and pos_closing_entry[0]:
msg = _("To cancel a {} you need to cancel the POS Closing Entry {}.").format(
frappe.bold("Consolidated Sales Invoice"),
frappe.bold(_("Consolidated Sales Invoice")),
get_link_to_form("POS Closing Entry", pos_closing_entry[0]),
)
frappe.throw(msg, title=_("Not Allowed"))
@@ -555,7 +558,6 @@ class SalesInvoice(SellingController):
self.repost_future_sle_and_gle()
self.db_set("status", "Cancelled")
self.db_set("repost_required", 0)
if frappe.db.get_single_value("Selling Settings", "sales_update_frequency") == "Each Transaction":
update_company_current_month_sales(self.company)
@@ -705,24 +707,23 @@ class SalesInvoice(SellingController):
data.sales_invoice = sales_invoice
def on_update_after_submit(self):
if hasattr(self, "repost_required"):
fields_to_check = [
"additional_discount_account",
"cash_bank_account",
"account_for_change_amount",
"write_off_account",
"loyalty_redemption_account",
"unrealized_profit_loss_account",
"is_opening",
]
child_tables = {
"items": ("income_account", "expense_account", "discount_account"),
"taxes": ("account_head",),
}
self.needs_repost = self.check_if_fields_updated(fields_to_check, child_tables)
if self.needs_repost:
self.validate_for_repost()
self.db_set("repost_required", self.needs_repost)
fields_to_check = [
"additional_discount_account",
"cash_bank_account",
"account_for_change_amount",
"write_off_account",
"loyalty_redemption_account",
"unrealized_profit_loss_account",
"is_opening",
]
child_tables = {
"items": ("income_account", "expense_account", "discount_account"),
"taxes": ("account_head",),
}
self.needs_repost = self.check_if_fields_updated(fields_to_check, child_tables)
if self.needs_repost:
self.validate_for_repost()
self.repost_accounting_entries()
def set_paid_amount(self):
paid_amount = 0.0
@@ -860,7 +861,7 @@ class SalesInvoice(SellingController):
if account.report_type != "Balance Sheet":
msg = (
_("Please ensure {} account is a Balance Sheet account.").format(frappe.bold("Debit To"))
_("Please ensure {} account is a Balance Sheet account.").format(frappe.bold(_("Debit To")))
+ " "
)
msg += _(
@@ -871,7 +872,7 @@ class SalesInvoice(SellingController):
if self.customer and account.account_type != "Receivable":
msg = (
_("Please ensure {} account {} is a Receivable account.").format(
frappe.bold("Debit To"), frappe.bold(self.debit_to)
frappe.bold(_("Debit To")), frappe.bold(self.debit_to)
)
+ " "
)
@@ -942,12 +943,17 @@ class SalesInvoice(SellingController):
against_acc.append(d.income_account)
self.against_income_account = ",".join(against_acc)
def force_set_against_income_account(self):
self.set_against_income_account()
frappe.db.set_value(self.doctype, self.name, "against_income_account", self.against_income_account)
def add_remarks(self):
if not self.remarks:
if self.po_no and self.po_date:
self.remarks = _("Against Customer Order {0} dated {1}").format(
self.po_no, formatdate(self.po_date)
)
if self.po_no:
self.remarks = _("Against Customer Order {0}").format(self.po_no)
if self.po_date:
self.remarks += " " + _("dated {0}").format(formatdate(self.po_date))
else:
self.remarks = _("No Remarks")
@@ -1016,6 +1022,10 @@ class SalesInvoice(SellingController):
raise_exception=1,
)
def allow_write_off_only_on_pos(self):
if not self.is_pos and self.write_off_account:
self.write_off_account = None
def validate_write_off_account(self):
if flt(self.write_off_amount) and not self.write_off_account:
self.write_off_account = frappe.get_cached_value("Company", self.company, "write_off_account")
@@ -1207,6 +1217,8 @@ class SalesInvoice(SellingController):
self.make_precision_loss_gl_entry(gl_entries)
self.make_discount_gl_entries(gl_entries)
gl_entries = make_regional_gl_entries(gl_entries, self)
# merge gl entries before adding pos entries
gl_entries = merge_similar_entries(gl_entries)
@@ -1312,6 +1324,10 @@ class SalesInvoice(SellingController):
for item in self.get("items"):
if flt(item.base_net_amount, item.precision("base_net_amount")):
# Do not book income for transfer within same company
if self.is_internal_transfer():
continue
if item.is_fixed_asset:
asset = self.get_asset(item)
@@ -1370,37 +1386,33 @@ class SalesInvoice(SellingController):
self.set_asset_status(asset)
else:
# Do not book income for transfer within same company
if not self.is_internal_transfer():
income_account = (
item.income_account
if (not item.enable_deferred_revenue or self.is_return)
else item.deferred_revenue_account
)
income_account = (
item.income_account
if (not item.enable_deferred_revenue or self.is_return)
else item.deferred_revenue_account
)
amount, base_amount = self.get_amount_and_base_amount(
item, enable_discount_accounting
)
amount, base_amount = self.get_amount_and_base_amount(item, enable_discount_accounting)
account_currency = get_account_currency(income_account)
gl_entries.append(
self.get_gl_dict(
{
"account": income_account,
"against": self.customer,
"credit": flt(base_amount, item.precision("base_net_amount")),
"credit_in_account_currency": (
flt(base_amount, item.precision("base_net_amount"))
if account_currency == self.company_currency
else flt(amount, item.precision("net_amount"))
),
"cost_center": item.cost_center,
"project": item.project or self.project,
},
account_currency,
item=item,
)
account_currency = get_account_currency(income_account)
gl_entries.append(
self.get_gl_dict(
{
"account": income_account,
"against": self.customer,
"credit": flt(base_amount, item.precision("base_net_amount")),
"credit_in_account_currency": (
flt(base_amount, item.precision("base_net_amount"))
if account_currency == self.company_currency
else flt(amount, item.precision("net_amount"))
),
"cost_center": item.cost_center,
"project": item.project or self.project,
},
account_currency,
item=item,
)
)
# expense account gl entries
if cint(self.update_stock) and erpnext.is_perpetual_inventory_enabled(self.company):
@@ -1475,6 +1487,10 @@ class SalesInvoice(SellingController):
if skip_change_gl_entries and payment_mode.account == self.account_for_change_amount:
payment_mode.base_amount -= flt(self.change_amount)
against_voucher = self.name
if self.is_return and self.return_against and not self.update_outstanding_for_self:
against_voucher = self.return_against
if payment_mode.base_amount:
# POS, make payment entries
gl_entries.append(
@@ -1488,7 +1504,7 @@ class SalesInvoice(SellingController):
"credit_in_account_currency": payment_mode.base_amount
if self.party_account_currency == self.company_currency
else payment_mode.amount,
"against_voucher": self.name,
"against_voucher": against_voucher,
"against_voucher_type": self.doctype,
"cost_center": self.cost_center,
},
@@ -2220,6 +2236,11 @@ def make_inter_company_purchase_invoice(source_name, target_doc=None):
return make_inter_company_transaction("Sales Invoice", source_name, target_doc)
@erpnext.allow_regional
def make_regional_gl_entries(gl_entries, doc):
return gl_entries
def make_inter_company_transaction(doctype, source_name, target_doc=None):
if doctype in ["Sales Invoice", "Sales Order"]:
source_doc = frappe.get_doc(doctype, source_name)
@@ -2677,6 +2698,10 @@ def create_dunning(source_name, target_doc=None, ignore_permissions=False):
target.closing_text = letter_text.get("closing_text")
target.language = letter_text.get("language")
# update outstanding
if source.payment_schedule and len(source.payment_schedule) == 1:
target.overdue_payments[0].outstanding = source.get("outstanding_amount")
target.validate()
return get_mapped_doc(

View File

@@ -2,11 +2,13 @@
# License: GNU General Public License v3. See license.txt
import copy
import json
import frappe
from frappe import qb
from frappe.model.dynamic_links import get_dynamic_link_map
from frappe.tests.utils import FrappeTestCase, change_settings
from frappe.utils import add_days, flt, getdate, nowdate, today
from frappe.utils import add_days, flt, format_date, getdate, nowdate, today
import erpnext
from erpnext.accounts.doctype.account.test_account import create_account, get_inventory_account
@@ -2201,13 +2203,14 @@ class TestSalesInvoice(FrappeTestCase):
self.assertEqual(si.total_taxes_and_charges, 228.82)
self.assertEqual(si.rounding_adjustment, -0.01)
expected_values = [
["_Test Account Service Tax - _TC", 0.0, 114.41],
["_Test Account VAT - _TC", 0.0, 114.41],
[si.debit_to, 1500, 0.0],
["Round Off - _TC", 0.01, 0.01],
["Sales - _TC", 0.0, 1271.18],
]
round_off_account = frappe.get_cached_value("Company", "_Test Company", "round_off_account")
expected_values = {
"_Test Account Service Tax - _TC": [0.0, 114.41],
"_Test Account VAT - _TC": [0.0, 114.41],
si.debit_to: [1500, 0.0],
round_off_account: [0.01, 0.01],
"Sales - _TC": [0.0, 1271.18],
}
gl_entries = frappe.db.sql(
"""select account, sum(debit) as debit, sum(credit) as credit
@@ -2218,10 +2221,10 @@ class TestSalesInvoice(FrappeTestCase):
as_dict=1,
)
for i, gle in enumerate(gl_entries):
self.assertEqual(expected_values[i][0], gle.account)
self.assertEqual(expected_values[i][1], gle.debit)
self.assertEqual(expected_values[i][2], gle.credit)
for gle in gl_entries:
expected_account_values = expected_values[gle.account]
self.assertEqual(expected_account_values[0], gle.debit)
self.assertEqual(expected_account_values[1], gle.credit)
def test_rounding_adjustment_3(self):
from erpnext.accounts.doctype.accounting_dimension.test_accounting_dimension import (
@@ -2269,6 +2272,7 @@ class TestSalesInvoice(FrappeTestCase):
self.assertEqual(si.total_taxes_and_charges, 480.86)
self.assertEqual(si.rounding_adjustment, -0.02)
round_off_account = frappe.get_cached_value("Company", "_Test Company", "round_off_account")
expected_values = dict(
(d[0], d)
for d in [
@@ -2276,7 +2280,7 @@ class TestSalesInvoice(FrappeTestCase):
["_Test Account Service Tax - _TC", 0.0, 240.43],
["_Test Account VAT - _TC", 0.0, 240.43],
["Sales - _TC", 0.0, 4007.15],
["Round Off - _TC", 0.02, 0.01],
[round_off_account, 0.02, 0.01],
]
)
@@ -2305,8 +2309,9 @@ class TestSalesInvoice(FrappeTestCase):
as_dict=1,
)
self.assertEqual(round_off_gle.cost_center, "_Test Cost Center 2 - _TC")
self.assertEqual(round_off_gle.location, "Block 1")
if round_off_gle:
self.assertEqual(round_off_gle.cost_center, "_Test Cost Center 2 - _TC")
self.assertEqual(round_off_gle.location, "Block 1")
disable_dimension()
@@ -2936,13 +2941,9 @@ class TestSalesInvoice(FrappeTestCase):
si.items[0].income_account = "Service - _TC"
si.additional_discount_account = "_Test Account Sales - _TC"
si.taxes[0].account_head = "TDS Payable - _TC"
# Ledger reposted implicitly upon 'Update After Submit'
si.save()
si.load_from_db()
self.assertTrue(si.repost_required)
si.repost_accounting_entries()
expected_gle = [
["_Test Account Sales - _TC", 22.0, 0.0, nowdate()],
["Debtors - _TC", 88, 0.0, nowdate()],
@@ -2952,9 +2953,6 @@ class TestSalesInvoice(FrappeTestCase):
check_gl_entries(self, si.name, expected_gle, add_days(nowdate(), -1))
si.load_from_db()
self.assertFalse(si.repost_required)
def test_asset_depreciation_on_sale_with_pro_rata(self):
"""
Tests if an Asset set to depreciate yearly on June 30, that gets sold on Sept 30, creates an additional depreciation entry on its date of sale.
@@ -3086,6 +3084,128 @@ class TestSalesInvoice(FrappeTestCase):
party_link.delete()
frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 0)
def test_sales_invoice_against_supplier_usd_with_dimensions(self):
from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import (
make_customer,
)
from erpnext.accounts.doctype.party_link.party_link import create_party_link
from erpnext.buying.doctype.supplier.test_supplier import create_supplier
# create a customer
customer = make_customer(customer="_Test Common Supplier USD")
cust_doc = frappe.get_doc("Customer", customer)
cust_doc.default_currency = "USD"
cust_doc.save()
# create a supplier
supplier = create_supplier(supplier_name="_Test Common Supplier USD").name
supp_doc = frappe.get_doc("Supplier", supplier)
supp_doc.default_currency = "USD"
supp_doc.save()
# create a party link between customer & supplier
party_link = create_party_link("Supplier", supplier, customer)
# enable common party accounting
frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 1)
# create a dimension and make it mandatory
if not frappe.get_all("Accounting Dimension", filters={"document_type": "Department"}):
dim = frappe.get_doc(
{
"doctype": "Accounting Dimension",
"document_type": "Department",
"dimension_defaults": [{"company": "_Test Company", "mandatory_for_bs": True}],
}
)
dim.save()
else:
dim = frappe.get_doc(
"Accounting Dimension",
frappe.get_all("Accounting Dimension", filters={"document_type": "Department"})[0],
)
dim.disabled = False
dim.dimension_defaults = []
dim.append("dimension_defaults", {"company": "_Test Company", "mandatory_for_bs": True})
dim.save()
# create a sales invoice
si = create_sales_invoice(
customer=customer, parent_cost_center="_Test Cost Center - _TC", do_not_submit=True
)
si.department = "All Departments"
si.save().submit()
# check outstanding of sales invoice
si.reload()
self.assertEqual(si.status, "Paid")
self.assertEqual(flt(si.outstanding_amount), 0.0)
# check creation of journal entry
jv = frappe.get_all(
"Journal Entry Account",
{
"account": si.debit_to,
"party_type": "Customer",
"party": si.customer,
"reference_type": si.doctype,
"reference_name": si.name,
"department": "All Departments",
},
pluck="credit_in_account_currency",
)
self.assertTrue(jv)
self.assertEqual(jv[0], si.grand_total)
dim.disabled = True
dim.save()
party_link.delete()
frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 0)
def test_sales_invoice_cancel_with_common_party_advance_jv(self):
from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import (
make_customer,
)
from erpnext.accounts.doctype.party_link.party_link import create_party_link
from erpnext.buying.doctype.supplier.test_supplier import create_supplier
# create a customer
customer = make_customer(customer="_Test Common Supplier")
# create a supplier
supplier = create_supplier(supplier_name="_Test Common Supplier").name
# create a party link between customer & supplier
party_link = create_party_link("Supplier", supplier, customer)
# enable common party accounting
frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 1)
# create a sales invoice
si = create_sales_invoice(customer=customer)
# check creation of journal entry
jv = frappe.db.get_value(
"Journal Entry Account",
filters={
"reference_type": si.doctype,
"reference_name": si.name,
"docstatus": 1,
},
fieldname="parent",
)
self.assertTrue(jv)
# cancel sales invoice
si.cancel()
# check cancellation of journal entry
jv_status = frappe.db.get_value("Journal Entry", jv, "docstatus")
self.assertEqual(jv_status, 2)
party_link.delete()
frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 0)
def test_payment_statuses(self):
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
@@ -3720,9 +3840,9 @@ class TestSalesInvoice(FrappeTestCase):
map_docs(
method="erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice",
source_names=frappe.json.dumps([dn1.name, dn2.name]),
source_names=json.dumps([dn1.name, dn2.name]),
target_doc=si,
args=frappe.json.dumps({"customer": dn1.customer, "merge_taxes": 1, "filtered_children": []}),
args=json.dumps({"customer": dn1.customer, "merge_taxes": 1, "filtered_children": []}),
)
si.save().submit()
@@ -3761,6 +3881,130 @@ class TestSalesInvoice(FrappeTestCase):
]
self.assertEqual(expected, actual)
def test_pos_returns_without_update_outstanding_for_self(self):
from erpnext.accounts.doctype.sales_invoice.sales_invoice import make_sales_return
pos_profile = make_pos_profile()
pos_profile.payments = []
pos_profile.append("payments", {"default": 1, "mode_of_payment": "Cash"})
pos_profile.save()
pos = create_sales_invoice(qty=10, do_not_save=True)
pos.is_pos = 1
pos.pos_profile = pos_profile.name
pos.append(
"payments", {"mode_of_payment": "Bank Draft", "account": "_Test Bank - _TC", "amount": 500}
)
pos.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 500})
pos.save().submit()
pos_return = make_sales_return(pos.name)
pos_return.update_outstanding_for_self = False
pos_return.save().submit()
gle = qb.DocType("GL Entry")
res = (
qb.from_(gle)
.select(gle.against_voucher)
.distinct()
.where(
gle.is_cancelled.eq(0) & gle.voucher_no.eq(pos_return.name) & gle.against_voucher.notnull()
)
.run(as_list=1)
)
self.assertEqual(len(res), 1)
self.assertEqual(res[0][0], pos_return.return_against)
@change_settings("Accounts Settings", {"enable_common_party_accounting": True})
def test_common_party_with_foreign_currency_jv(self):
from erpnext.accounts.doctype.account.test_account import create_account
from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import (
make_customer,
)
from erpnext.accounts.doctype.party_link.party_link import create_party_link
from erpnext.buying.doctype.supplier.test_supplier import create_supplier
from erpnext.setup.utils import get_exchange_rate
creditors = create_account(
account_name="Creditors USD",
parent_account="Accounts Payable - _TC",
company="_Test Company",
account_currency="USD",
account_type="Payable",
)
debtors = create_account(
account_name="Debtors USD",
parent_account="Accounts Receivable - _TC",
company="_Test Company",
account_currency="USD",
account_type="Receivable",
)
# create a customer
customer = make_customer(customer="_Test Common Party USD")
cust_doc = frappe.get_doc("Customer", customer)
cust_doc.default_currency = "USD"
test_account_details = {
"company": "_Test Company",
"account": debtors,
}
cust_doc.append("accounts", test_account_details)
cust_doc.save()
# create a supplier
supplier = create_supplier(supplier_name="_Test Common Party USD").name
supp_doc = frappe.get_doc("Supplier", supplier)
supp_doc.default_currency = "USD"
test_account_details = {
"company": "_Test Company",
"account": creditors,
}
supp_doc.append("accounts", test_account_details)
supp_doc.save()
# create a party link between customer & supplier
create_party_link("Supplier", supplier, customer)
# create a sales invoice
si = create_sales_invoice(
customer=customer,
currency="USD",
conversion_rate=get_exchange_rate("USD", "INR"),
debit_to=debtors,
do_not_save=1,
)
si.party_account_currency = "USD"
si.save()
si.submit()
# check outstanding of sales invoice
si.reload()
self.assertEqual(si.status, "Paid")
self.assertEqual(flt(si.outstanding_amount), 0.0)
# check creation of journal entry
jv = frappe.get_all(
"Journal Entry Account",
{
"account": si.debit_to,
"party_type": "Customer",
"party": si.customer,
"reference_type": si.doctype,
"reference_name": si.name,
},
pluck="credit_in_account_currency",
)
self.assertTrue(jv)
self.assertEqual(jv[0], si.grand_total)
def test_invoice_remarks(self):
si = frappe.copy_doc(test_records[0])
si.po_no = "Test PO"
si.po_date = nowdate()
si.save()
si.submit()
self.assertEqual(si.remarks, f"Against Customer Order Test PO dated {format_date(nowdate())}")
def set_advance_flag(company, flag, default_account):
frappe.db.set_value(

View File

@@ -870,7 +870,8 @@
"label": "Purchase Order",
"options": "Purchase Order",
"print_hide": 1,
"read_only": 1
"read_only": 1,
"search_index": 1
},
{
"fieldname": "column_break_92",
@@ -926,7 +927,7 @@
"idx": 1,
"istable": 1,
"links": [],
"modified": "2024-02-25 15:56:44.828634",
"modified": "2024-05-23 16:36:18.970862",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",
@@ -936,4 +937,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -38,6 +38,12 @@ frappe.ui.form.on("Subscription", {
__("Actions")
);
frm.add_custom_button(
__("Force-Fetch Subscription Updates"),
() => frm.trigger("force_fetch_subscription_updates"),
__("Actions")
);
frm.add_custom_button(
__("Cancel Subscription"),
() => frm.trigger("cancel_this_subscription"),
@@ -82,4 +88,11 @@ frappe.ui.form.on("Subscription", {
}
});
},
force_fetch_subscription_updates: function (frm) {
frm.call("force_fetch_subscription_updates").then((r) => {
if (!r.exec) {
frm.reload_doc();
}
});
},
});

View File

@@ -717,6 +717,28 @@ class Subscription(Document):
self.update_subscription_period(posting_date or nowdate())
self.save()
@frappe.whitelist()
def force_fetch_subscription_updates(self):
"""
Process Subscription and create Invoices even if current date doesn't lie between current_invoice_start and currenct_invoice_end
It makes use of 'Proces Subscription' to force processing in a specific 'posting_date'
"""
# Don't process future subscriptions
if nowdate() < self.current_invoice_start:
frappe.msgprint(_("Subscription for Future dates cannot be processed."))
return
processing_date = None
if self.generate_invoice_at == "Beginning of the current subscription period":
processing_date = self.current_invoice_start
elif self.generate_invoice_at == "End of the current subscription period":
processing_date = self.current_invoice_end
elif self.generate_invoice_at == "Days before the current subscription period":
processing_date = add_days(self.current_invoice_start, -self.number_of_days)
self.process(posting_date=processing_date)
def is_prorate() -> int:
return cint(frappe.db.get_single_value("Subscription Settings", "prorate"))

View File

@@ -476,7 +476,7 @@ class TestSubscription(FrappeTestCase):
start_date="2021-01-01",
submit_invoice=0,
generate_new_invoices_past_due_date=1,
party="_Test Subscription Customer",
party="_Test Subscription Customer John Doe",
)
# create invoices for the first two moths
@@ -521,6 +521,18 @@ class TestSubscription(FrappeTestCase):
subscription.process(posting_date="2023-01-22")
self.assertEqual(len(subscription.invoices), 2)
def test_future_subscription(self):
"""Force-Fetch should not process future subscriptions"""
subscription = create_subscription(
start_date=add_months(nowdate(), 1),
submit_invoice=0,
generate_new_invoices_past_due_date=1,
party="_Test Subscription Customer John Doe",
)
subscription.force_fetch_subscription_updates()
subscription.reload()
self.assertEqual(len(subscription.invoices), 0)
def make_plans():
create_plan(plan_name="_Test Plan Name", cost=900, currency="INR")
@@ -565,10 +577,16 @@ def create_parties():
if not frappe.db.exists("Customer", "_Test Subscription Customer"):
customer = frappe.new_doc("Customer")
customer.customer_name = "_Test Subscription Customer"
customer.billing_currency = "USD"
customer.default_currency = "USD"
customer.append("accounts", {"company": "_Test Company", "account": "_Test Receivable USD - _TC"})
customer.insert()
if not frappe.db.exists("Customer", "_Test Subscription Customer John Doe"):
customer = frappe.new_doc("Customer")
customer.customer_name = "_Test Subscription Customer John Doe"
customer.append("accounts", {"company": "_Test Company", "account": "_Test Receivable - _TC"})
customer.insert()
def reset_settings():
settings = frappe.get_single("Subscription Settings")

View File

@@ -185,7 +185,7 @@ def get_tax_template(posting_date, args):
conditions.append("(from_date is null) and (to_date is null)")
conditions.append(
"ifnull(tax_category, '') = {}".format(frappe.db.escape(cstr(args.get("tax_category"))))
"ifnull(tax_category, '') = {}".format(frappe.db.escape(cstr(args.get("tax_category")), False))
)
if "tax_category" in args.keys():
del args["tax_category"]

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