Compare commits

...

152 Commits

Author SHA1 Message Date
Frappe PR Bot
fcf9f82092 chore(release): Bumped to Version 15.66.1
## [15.66.1](https://github.com/frappe/erpnext/compare/v15.66.0...v15.66.1) (2025-06-27)

### Bug Fixes

* not able to save material request ([a49026e](a49026e9d2))
2025-06-27 12:28:50 +00:00
rohitwaghchaure
e817561dce Merge pull request #48300 from frappe/mergify/bp/version-15/pr-48297
fix: not able to save material request (backport #48296) (backport #48297)
2025-06-27 17:57:24 +05:30
Rohit Waghchaure
a49026e9d2 fix: not able to save material request
(cherry picked from commit c5e36eb323)
(cherry picked from commit 0e2bca4b34)
2025-06-27 11:18:10 +00:00
Frappe PR Bot
de03618b09 chore(release): Bumped to Version 15.66.0
# [15.66.0](https://github.com/frappe/erpnext/compare/v15.65.4...v15.66.0) (2025-06-25)

### Bug Fixes

* add descendants item groups to fetch the barcode items ([5cabdbf](5cabdbfe06))
* add is_group filter for warehouse ([ad0819f](ad0819feee))
* add party and party_name columns to trend reports ([ceab26d](ceab26d5f1))
* add validation for exchange gain/loss entries ([153ed04](153ed04161))
* **asset-invoice:** handle asset invoice cancellation ([d3daeaf](d3daeaf475))
* auto append_taxes_from_item_tax_template in backend ([2bf8dff](2bf8dffb60))
* coa reset root_type on unchecking is_group on new_node (backport [#48156](https://github.com/frappe/erpnext/issues/48156)) ([#48160](https://github.com/frappe/erpnext/issues/48160)) ([7c2bf02](7c2bf026ef))
* contract autoname ([1223f55](1223f5551f))
* fallback expense account and cost center in subcontracting receipt ([ac22c42](ac22c422c8))
* get already billed amount from current doc instead of database ([#48079](https://github.com/frappe/erpnext/issues/48079)) ([c2c5e45](c2c5e45bc6))
* incoming rate for the stand-alone credit note ([ad40bfe](ad40bfe4ea))
* modify query to fetch valid return qty ([764c71d](764c71d3e1))
* naming series field in bank transaction (backport [#48121](https://github.com/frappe/erpnext/issues/48121)) ([#48149](https://github.com/frappe/erpnext/issues/48149)) ([f0ddf1b](f0ddf1b223))
* **open_opportunity:** remove company=null filter (backport [#48222](https://github.com/frappe/erpnext/issues/48222)) ([#48224](https://github.com/frappe/erpnext/issues/48224)) ([2d7a7d9](2d7a7d9988))
* permission issue during reposting ([6896216](6896216276))
* pos item details fetch uoms on stock settings allow_uom_with_conversion_rate_defined_in_item configuration (backport [#48178](https://github.com/frappe/erpnext/issues/48178)) ([#48179](https://github.com/frappe/erpnext/issues/48179)) ([991ddfe](991ddfe187))
* pos item price in get_item and item search (backport [#47925](https://github.com/frappe/erpnext/issues/47925)) ([#48217](https://github.com/frappe/erpnext/issues/48217)) ([f8cfbda](f8cfbda4e0))
* resolved conflicts ([881dcf8](881dcf817f))
* SABB validation during the LCV ([b3d337a](b3d337a45b))
* setup wizard load chart of accounts and fiscal year on change of country (backport [#48125](https://github.com/frappe/erpnext/issues/48125)) ([#48128](https://github.com/frappe/erpnext/issues/48128)) ([f85b08d](f85b08d2f5))
* stock adjustment entry to make stock balance zero (backport [#48245](https://github.com/frappe/erpnext/issues/48245)) ([#48247](https://github.com/frappe/erpnext/issues/48247)) ([41d22d0](41d22d0255))
* stock reconciliation validation for serial and batch ([89376dd](89376ddf8d))
* target inventory dimension for stock entry ([4e70005](4e70005937))
* Update indexing to populate correct values in trends report chart ([24f892d](24f892d582))
* update journal entry title on amend ([4341ac7](4341ac7e7a))
* Update transaction currency to company currency to show correct currency symbol ([651b952](651b9521b9))
* use currency from opportunity while creating quotation ([#45540](https://github.com/frappe/erpnext/issues/45540)) ([a6c5738](a6c5738f4b))
* use set_query on sales_order link field in work order ([b33bec4](b33bec4dad))

### Features

* add naming series for Contract Doctype ([b3c43e8](b3c43e8527))
* add search field for contract doctype ([27b5d94](27b5d9493a))
2025-06-25 04:48:04 +00:00
ruthra kumar
ecd30c5809 Merge pull request #48229 from frappe/version-15-hotfix
chore: release v15
2025-06-25 10:16:37 +05:30
mergify[bot]
41d22d0255 fix: stock adjustment entry to make stock balance zero (backport #48245) (#48247)
fix: stock adjustment entry to make stock balance zero (#48245)

(cherry picked from commit 66eeda6410)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-06-24 22:16:24 +05:30
ruthra kumar
a913cfea7e Merge pull request #48239 from frappe/mergify/bp/version-15-hotfix/pr-45540
fix: use currency from opportunity while creating quotation (backport #45540)
2025-06-24 19:35:10 +05:30
Sugesh G
a6c5738f4b fix: use currency from opportunity while creating quotation (#45540)
(cherry picked from commit d748b491ee)
2025-06-24 12:10:24 +00:00
ruthra kumar
3a6956ba05 Merge pull request #48230 from frappe/mergify/bp/version-15-hotfix/pr-47627
fix: auto append_taxes_from_item_tax_template in backend (backport #47627)
2025-06-24 17:38:14 +05:30
ruthra kumar
1deadb8daa Merge pull request #48236 from frappe/mergify/bp/version-15-hotfix/pr-48226
Trends reports (backport #48226)
2025-06-24 17:36:44 +05:30
ruthra kumar
463ad0a163 Merge pull request #48235 from frappe/mergify/bp/version-15-hotfix/pr-48079
fix: get already billed amount from current doc instead of database (backport #48079)
2025-06-24 17:35:37 +05:30
ljain112
f6bb86574e chore: fix test case for auto tax appending 2025-06-24 16:45:41 +05:30
Khushi Rawat
889a14b557 Merge pull request #48120 from aerele/fix/asset-invoice-cancel-validation
fix(asset-invoice): handle asset invoice cancellation
2025-06-24 16:24:18 +05:30
ljain112
0b96e1e3ef chore: resolve conflicts 2025-06-24 15:52:24 +05:30
Karuppasamy923
24f892d582 fix: Update indexing to populate correct values in trends report chart
(cherry picked from commit b08d66113c)
2025-06-24 10:18:44 +00:00
Karuppasamy923
651b9521b9 fix: Update transaction currency to company currency to show correct currency symbol
(cherry picked from commit b0e201a332)
2025-06-24 10:18:44 +00:00
Lakshit Jain
c2c5e45bc6 fix: get already billed amount from current doc instead of database (#48079)
* fix: get already billed amount from current doc instead of database

* fix: throw overbilling validation for all items in single call

* refactor: minor fixes

---------

Co-authored-by: Sagar Vora <16315650+sagarvora@users.noreply.github.com>
(cherry picked from commit 47c3c4808e)
2025-06-24 10:11:43 +00:00
ljain112
1ccdb67c55 chore: resolve conflicts 2025-06-24 15:31:34 +05:30
ljain112
2bf8dffb60 fix: auto append_taxes_from_item_tax_template in backend
(cherry picked from commit 4cb1fa2b6b)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
#	erpnext/controllers/tests/test_accounts_controller.py
2025-06-24 09:48:21 +00:00
mergify[bot]
6511eb4c7c refactor: track completed app setup wizards and re-run the setup wizard upon new app installation. (backport #47691) (#48223)
* refactor: track completed app setup wizards and re-run the setup wizard upon new app installation. (#47691)

(cherry picked from commit 75b5ba6e67)

# Conflicts:
#	erpnext/hooks.py
#	erpnext/setup/install.py

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

* fix: permission issue

* fix: space

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2025-06-24 14:51:15 +05:30
Mihir Kandoi
5aed023434 Merge pull request #48225 from frappe/mergify/bp/version-15-hotfix/pr-48078
fix: fallback expense account and cost center in subcontracting receipt (backport #48078)
2025-06-24 12:14:28 +05:30
rohitwaghchaure
764c81a146 Merge pull request #48215 from frappe/mergify/bp/version-15-hotfix/pr-48195
fix: incoming rate for the stand-alone credit note (backport #48195)
2025-06-24 12:02:17 +05:30
mergify[bot]
2d7a7d9988 fix(open_opportunity): remove company=null filter (backport #48222) (#48224)
* fix(open_opportunity): remove company=null filter (#48222)

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

# Conflicts:
#	erpnext/crm/number_card/open_opportunity/open_opportunity.json

* chore: resolve conflicts

---------

Co-authored-by: Akhil Narang <me@akhilnarang.dev>
2025-06-24 11:56:08 +05:30
Mihir Kandoi
ac22c422c8 fix: fallback expense account and cost center in subcontracting receipt
(cherry picked from commit cf1d4362e5)
2025-06-24 06:20:50 +00:00
rohitwaghchaure
f560286610 chore: fix conflicts 2025-06-24 11:34:04 +05:30
ruthra kumar
19a6ce3605 Merge pull request #48220 from frappe/mergify/bp/version-15-hotfix/pr-48180
fix: update journal entry title on amend (backport #48180)
2025-06-24 10:11:28 +05:30
ravibharathi656
4341ac7e7a fix: update journal entry title on amend
(cherry picked from commit 4a3ee4df29)
2025-06-24 04:04:04 +00:00
ruthra kumar
866780b383 Merge pull request #48212 from frappe/mergify/bp/version-15-hotfix/pr-48162
fix: add validation for exchange gain/loss entries (backport #48162)
2025-06-24 09:19:14 +05:30
ruthra kumar
ca2f4e801e Merge pull request #48213 from frappe/mergify/bp/version-15-hotfix/pr-48053
fix: add descendants item groups to fetch the barcode items (backport #48053)
2025-06-24 09:18:19 +05:30
mergify[bot]
f8cfbda4e0 fix: pos item price in get_item and item search (backport #47925) (#48217)
fix: pos item price in get_item and item search (#47925)

* fix: pos get item and item search

* refactor: resolved linter issue and renamed variables

* fix: uom on get_item

* fix: incorrect item quantity on pos selector

* refactor: remove unused import

(cherry picked from commit 919684a787)

Co-authored-by: Diptanil Saha <diptanil@frappe.io>
2025-06-23 22:42:47 +05:30
Rohit Waghchaure
ad40bfe4ea fix: incoming rate for the stand-alone credit note
(cherry picked from commit b06eca8dcb)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
2025-06-23 15:40:49 +00:00
pugazhendhivelu
5cabdbfe06 fix: add descendants item groups to fetch the barcode items
(cherry picked from commit 4b82fe2611)
2025-06-23 14:01:23 +00:00
i-am-vimal
153ed04161 fix: add validation for exchange gain/loss entries
(cherry picked from commit 5c9eddd31e)
2025-06-23 14:00:09 +00:00
ruthra kumar
78013d3d8f Merge pull request #48209 from frappe/mergify/bp/version-15-hotfix/pr-48200
chore: better label and desciption for pegged currency flag (backport #48200)
2025-06-23 19:29:40 +05:30
ruthra kumar
b6dda08290 chore: better label and desciption for pegged currency flag
(cherry picked from commit c5cd7d91c4)
2025-06-23 12:14:42 +00:00
Frappe PR Bot
bd128d3b3a chore(release): Bumped to Version 15.65.4
## [15.65.4](https://github.com/frappe/erpnext/compare/v15.65.3...v15.65.4) (2025-06-19)

### Bug Fixes

* target inventory dimension for stock entry ([0958a3b](0958a3b643))
2025-06-19 16:33:57 +00:00
rohitwaghchaure
42460980b2 Merge pull request #48167 from frappe/mergify/bp/version-15/pr-48166
fix: target inventory dimension for stock entry (backport #48165) (backport #48166)
2025-06-19 22:02:27 +05:30
Rohit Waghchaure
0958a3b643 fix: target inventory dimension for stock entry
(cherry picked from commit d65cb56d66)
(cherry picked from commit 4e70005937)
2025-06-19 15:13:19 +00:00
Frappe PR Bot
e0ca060475 chore(release): Bumped to Version 15.65.3
## [15.65.3](https://github.com/frappe/erpnext/compare/v15.65.2...v15.65.3) (2025-06-19)

### Bug Fixes

* stock reconciliation validation for serial and batch ([3057f6c](3057f6ce35))
* use set_query on sales_order link field in work order ([6a6130e](6a6130e06c))
2025-06-19 05:30:19 +00:00
rohitwaghchaure
84d348b3d4 Merge pull request #48145 from frappe/mergify/bp/version-15/pr-48107
fix: use set_query on sales_order link field in work order (backport #48077) (backport #48107)
2025-06-19 10:58:59 +05:30
rohitwaghchaure
a63457e5b0 Merge pull request #48144 from frappe/mergify/bp/version-15/pr-48113
fix: stock reconciliation validation for serial nos (backport #47988) (backport #48113)
2025-06-19 10:58:43 +05:30
Mihir Kandoi
6a6130e06c fix: use set_query on sales_order link field in work order
(cherry picked from commit 6def182e1a)
(cherry picked from commit b33bec4dad)
2025-06-19 04:37:39 +00:00
Rohit Waghchaure
3057f6ce35 fix: stock reconciliation validation for serial and batch
(cherry picked from commit 69d54d2e0f)
(cherry picked from commit 89376ddf8d)
2025-06-19 04:36:35 +00:00
Bhavan23
ea3015a450 test(sales-invoice): add test case for asset invoice cancellation 2025-06-18 19:21:14 +05:30
Bhavan23
d3daeaf475 fix(asset-invoice): handle asset invoice cancellation 2025-06-18 10:54:24 +05:30
Frappe PR Bot
d2ac603fd7 chore(release): Bumped to Version 15.65.2
## [15.65.2](https://github.com/frappe/erpnext/compare/v15.65.1...v15.65.2) (2025-06-17)

### Bug Fixes

* add validation for calculate ageing with filter for summary and other reports ([23db22a](23db22ac0b))
* add validation for exchange gain/loss entries ([97f1304](97f13049ee))
* add validation for party type ([baa08ce](baa08ce496))
* batch page length ([994454b](994454bfc3))
* budget naming series (backport [#48075](https://github.com/frappe/erpnext/issues/48075)) ([#48080](https://github.com/frappe/erpnext/issues/48080)) ([4d18fd0](4d18fd0e80))
* do not allow capitalization from connection tab for submitted asset ([7b5e2a6](7b5e2a6af0))
* do not reset party account for return doc ([ad5421a](ad5421a413))
* float division by zero ([40504b8](40504b8da2))
* incorrect condition for setting party account on change of company ([f2b9e73](f2b9e73819))
* incorrect warehouse set from SO to MR ([e9365d7](e9365d7272))
* pos invoice consolidation row refer issue (backport [#48057](https://github.com/frappe/erpnext/issues/48057)) ([#48058](https://github.com/frappe/erpnext/issues/48058)) ([db9f0b6](db9f0b6f38))
* prevent saving negative quantity in BOM ([1c9032a](1c9032a4c2))
* unpack non-iterable NoneType object error ([dd39d24](dd39d24da0))
* update asset status after making asset value adjustment record ([ee30357](ee30357835))
2025-06-17 14:51:34 +00:00
ruthra kumar
3340b19c5d Merge pull request #48100 from frappe/version-15-hotfix
chore: release v15
2025-06-17 20:20:01 +05:30
Frappe PR Bot
9febca2981 chore(release): Bumped to Version 15.65.1
## [15.65.1](https://github.com/frappe/erpnext/compare/v15.65.0...v15.65.1) (2025-06-11)

### Bug Fixes

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

### Bug Fixes

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

### Features

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

### Performance Improvements

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

### Reverts

* Revert "fix: calculate discount percentage if discount amount is specified (#…" ([5a5449c](5a5449c60c))
2025-06-10 14:33:55 +00:00
ruthra kumar
bd11146f02 Merge pull request #47996 from frappe/version-15-hotfix
chore: release v15
2025-06-10 20:02:19 +05:30
Frappe PR Bot
63d165c48a chore(release): Bumped to Version 15.64.1
## [15.64.1](https://github.com/frappe/erpnext/compare/v15.64.0...v15.64.1) (2025-06-06)

### Reverts

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

(cherry picked from commit 27dc0f5b70)
2025-06-06 07:05:26 +00:00
Frappe PR Bot
916511ef1a chore(release): Bumped to Version 15.64.0
# [15.64.0](https://github.com/frappe/erpnext/compare/v15.63.0...v15.64.0) (2025-06-03)

### Bug Fixes

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

### Features

* add column "Item Name" to "BOM Stock Report" (backport [#47116](https://github.com/frappe/erpnext/issues/47116)) ([#47485](https://github.com/frappe/erpnext/issues/47485)) ([9192913](9192913832))
* allow to set valuation rate for Rejected Materials (backport [#47582](https://github.com/frappe/erpnext/issues/47582)) ([#47869](https://github.com/frappe/erpnext/issues/47869)) ([3582b32](3582b32f03))
* show item name for raw materials in BOM creator ([0c612be](0c612be6fe))
* specify expense account and cost center for raw materials in Su… (backport [#47756](https://github.com/frappe/erpnext/issues/47756)) ([#47861](https://github.com/frappe/erpnext/issues/47861)) ([01dd733](01dd7337a2))
2025-06-03 11:54:42 +00:00
ruthra kumar
c614ff419b Merge pull request #47868 from frappe/version-15-hotfix
chore: release v15
2025-06-03 17:23:19 +05:30
Frappe PR Bot
f59093c6b7 chore(release): Bumped to Version 15.63.0
# [15.63.0](https://github.com/frappe/erpnext/compare/v15.62.0...v15.63.0) (2025-05-27)

### Bug Fixes

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

### Features

* add validation for Item Tax Template on rate change ([92d5e91](92d5e91e1f))
* Unit Price Contract ([33366fc](33366fce6c))
* Unit Price Items in Buying (RFQ, SQ, PO) ([f8fa775](f8fa775af3))
2025-05-27 14:56:33 +00:00
ruthra kumar
7ede5392bd Merge pull request #47758 from frappe/version-15-hotfix
chore: release v15
2025-05-27 20:24:59 +05:30
Frappe PR Bot
52a5cd9702 chore(release): Bumped to Version 15.62.0
# [15.62.0](https://github.com/frappe/erpnext/compare/v15.61.1...v15.62.0) (2025-05-20)

### Bug Fixes

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

### Features

* add checbox for validating time logs in job card ([80c7661](80c76618ae))
* add option to calculate ageing based on report date or today date ([69337cf](69337cf18b))
2025-05-20 13:54:53 +00:00
ruthra kumar
f3052a446f Merge pull request #47636 from frappe/version-15-hotfix
chore: release v15
2025-05-20 19:23:12 +05:30
Frappe PR Bot
31fa1c9a58 chore(release): Bumped to Version 15.61.1
## [15.61.1](https://github.com/frappe/erpnext/compare/v15.61.0...v15.61.1) (2025-05-15)

### Bug Fixes

* correct expense amount in party ledger summary. ([67741f1](67741f1a21))
2025-05-15 06:05:18 +00:00
ruthra kumar
631a9bfa7c Merge pull request #47557 from frappe/mergify/bp/version-15/pr-47541
fix: correct expense amount in party ledger summary. (backport #47541)
2025-05-15 11:33:53 +05:30
ljain112
67741f1a21 fix: correct expense amount in party ledger summary.
(cherry picked from commit 09a46fcf0e)
2025-05-15 05:47:32 +00:00
Frappe PR Bot
6e699178ae chore(release): Bumped to Version 15.61.0
# [15.61.0](https://github.com/frappe/erpnext/compare/v15.60.2...v15.61.0) (2025-05-13)

### Bug Fixes

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

### Features

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

### Performance Improvements

* Skip link checking on repost's remove_attached_file (backport [#45061](https://github.com/frappe/erpnext/issues/45061)) ([#47450](https://github.com/frappe/erpnext/issues/47450)) ([09e7bfb](09e7bfbacb))
2025-05-13 14:04:07 +00:00
ruthra kumar
0f350ef24d Merge pull request #47528 from frappe/version-15-hotfix
chore: release v15
2025-05-13 19:32:35 +05:30
Frappe PR Bot
7fb557197a chore(release): Bumped to Version 15.60.2
## [15.60.2](https://github.com/frappe/erpnext/compare/v15.60.1...v15.60.2) (2025-05-06)

### Bug Fixes

* 'time to resolve: failed' on issue (backport [#47406](https://github.com/frappe/erpnext/issues/47406)) ([#47407](https://github.com/frappe/erpnext/issues/47407)) ([21612fc](21612fc230))
* backward compatibility for renamed group_by filter on reports (backport [#47362](https://github.com/frappe/erpnext/issues/47362)) ([#47403](https://github.com/frappe/erpnext/issues/47403)) ([0e5c709](0e5c709f7b))
* change shipping address fetching condition ([0aabe4f](0aabe4fd1e))
* completed transactions showing in the list (backport [#47374](https://github.com/frappe/erpnext/issues/47374)) ([#47379](https://github.com/frappe/erpnext/issues/47379)) ([1ef7da8](1ef7da837f))
* do not allocate amount when ref's doctype or name are not set ([c2e36da](c2e36daa32))
* do not mandate depreciation account for assets without depreciation (backport [#47427](https://github.com/frappe/erpnext/issues/47427)) ([#47428](https://github.com/frappe/erpnext/issues/47428)) ([01e975b](01e975b481))
* not able to submit the stock entry ([#47383](https://github.com/frappe/erpnext/issues/47383)) ([035394a](035394ae6a))
* party name in Ledger Summary ([4fc14b3](4fc14b3097))
* precision issue ([b6908a7](b6908a79bd))
* rename unchanged group_by filter related to general ledger report (backport [#47366](https://github.com/frappe/erpnext/issues/47366)) ([#47405](https://github.com/frappe/erpnext/issues/47405)) ([8d1e855](8d1e855dc8))
* renaming group by fieldname and value in reports (backport [#47352](https://github.com/frappe/erpnext/issues/47352)) ([#47360](https://github.com/frappe/erpnext/issues/47360)) ([85a8adf](85a8adf804))
* show party type in due date exceeding message ([f73e99e](f73e99e9d2))
* stock reco recalculate qty not works for opening stock reco ([2bd30e3](2bd30e3c46))
* update accounts on change of mode of payment in sales invoice payment (backport [#47381](https://github.com/frappe/erpnext/issues/47381)) ([#47400](https://github.com/frappe/erpnext/issues/47400)) ([afb44a6](afb44a677c))
* validation for difference account ([f4a43d0](f4a43d07b0))
* warning message before changing the valuation method (backport [#47340](https://github.com/frappe/erpnext/issues/47340)) ([#47342](https://github.com/frappe/erpnext/issues/47342)) ([4ef2b77](4ef2b77973))
2025-05-06 14:11:12 +00:00
ruthra kumar
7733e417a4 Merge pull request #47429 from frappe/version-15-hotfix
chore: release v15
2025-05-06 19:39:35 +05:30
Frappe PR Bot
c1ed750bcb chore(release): Bumped to Version 15.60.1
## [15.60.1](https://github.com/frappe/erpnext/compare/v15.60.0...v15.60.1) (2025-05-02)

### Bug Fixes

* not able to submit the stock entry ([#47383](https://github.com/frappe/erpnext/issues/47383)) ([73a418a](73a418a2bd))
2025-05-02 13:44:13 +00:00
rohitwaghchaure
1d139eb94a Merge pull request #47384 from frappe/mergify/bp/version-15/pr-47383
fix: not able to submit the stock entry (backport #47383)
2025-05-02 19:12:43 +05:30
rohitwaghchaure
73a418a2bd fix: not able to submit the stock entry (#47383)
(cherry picked from commit 035394ae6a)
2025-05-02 13:06:32 +00:00
Frappe PR Bot
96996bd8a9 chore(release): Bumped to Version 15.60.0
# [15.60.0](https://github.com/frappe/erpnext/compare/v15.59.0...v15.60.0) (2025-04-29)

### Bug Fixes

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

### Features

* add dispatch address fields to purchase doctypes ([5f101e7](5f101e7635))
* add dispatch address support in party details and controllers ([1fe1563](1fe1563dab))
* add display dispatch address when dispatch address is selected ([93ea2f9](93ea2f93b6))
* change sabb qty automatically incase of internal transfer PR if sabb only has 1 batch ([#47256](https://github.com/frappe/erpnext/issues/47256)) ([9495a2a](9495a2ac9d))
2025-04-29 13:12:18 +00:00
ruthra kumar
a9e40bc0d8 Merge pull request #47328 from frappe/version-15-hotfix
chore: release v15
2025-04-29 18:40:46 +05:30
Frappe PR Bot
4c3044cd70 chore(release): Bumped to Version 15.59.0
# [15.59.0](https://github.com/frappe/erpnext/compare/v15.58.2...v15.59.0) (2025-04-22)

### Bug Fixes

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

### Features

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

### Reverts

* disable customer if creating from opportunity ([99735e0](99735e0af4))
2025-04-22 13:47:39 +00:00
ruthra kumar
f7efd006c2 Merge pull request #47204 from frappe/version-15-hotfix
chore: release v15
2025-04-22 19:16:15 +05:30
Frappe PR Bot
00a8503dd7 chore(release): Bumped to Version 15.58.2
## [15.58.2](https://github.com/frappe/erpnext/compare/v15.58.1...v15.58.2) (2025-04-17)

### Bug Fixes

* add group by after user permission condition ([0287f34](0287f34928))
2025-04-17 10:54:22 +00:00
ruthra kumar
76a2eb69a0 Merge pull request #47127 from frappe/mergify/bp/version-15/pr-47118
fix: add group by after user permission condition (backport #47118)
2025-04-17 16:22:18 +05:30
venkat102
0287f34928 fix: add group by after user permission condition
(cherry picked from commit 756d496235)
2025-04-17 10:36:57 +00:00
Frappe PR Bot
741f29e57a chore(release): Bumped to Version 15.58.1
## [15.58.1](https://github.com/frappe/erpnext/compare/v15.58.0...v15.58.1) (2025-04-16)

### Bug Fixes

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

### Bug Fixes

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

### Features

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

### Performance Improvements

* refactored customer ledger summary for performance ([50b2196](50b2196020))
* take query out of loop ([9af5052](9af50528f1))
2025-04-16 04:05:56 +00:00
ruthra kumar
7555d27d82 Merge pull request #47091 from frappe/version-15-hotfix
chore: release v15
2025-04-16 09:34:34 +05:30
Frappe PR Bot
2eb7a688cb chore(release): Bumped to Version 15.57.5
## [15.57.5](https://github.com/frappe/erpnext/compare/v15.57.4...v15.57.5) (2025-04-14)

### Bug Fixes

* revert [#46900](https://github.com/frappe/erpnext/issues/46900) - against_voucher filter in general ledger ([969c354](969c3549d5))
2025-04-14 08:24:20 +00:00
ruthra kumar
19a5b923b9 Merge pull request #47053 from frappe/mergify/bp/version-15/pr-47049
Revert "fix: remove against_voucher and against_voucher_type column from General Ledger Report" (backport #47049)
2025-04-14 13:52:55 +05:30
ruthra kumar
a0908522c1 chore: resolve conflict 2025-04-14 13:21:33 +05:30
ruthra kumar
969c3549d5 fix: revert #46900 - against_voucher filter in general ledger
(cherry picked from commit adb331ef71)

# Conflicts:
#	erpnext/accounts/report/general_ledger/general_ledger.py
2025-04-14 07:49:32 +00:00
Frappe PR Bot
1da2577035 chore(release): Bumped to Version 15.57.4
## [15.57.4](https://github.com/frappe/erpnext/compare/v15.57.3...v15.57.4) (2025-04-13)

### Bug Fixes

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

### Bug Fixes

* correct doctype in item_wise_purchase register ([cd68832](cd68832aa0))
2025-04-12 02:01:06 +00:00
ruthra kumar
bcb45ce8ef Merge pull request #47031 from frappe/mergify/bp/version-15/pr-47012
fix: correct doctype in item_wise_purchase register (backport #47012)
2025-04-12 07:29:44 +05:30
ljain112
cd68832aa0 fix: correct doctype in item_wise_purchase register
(cherry picked from commit b8b8dce733)
2025-04-12 01:41:15 +00:00
Frappe PR Bot
8a33866a8c chore(release): Bumped to Version 15.57.2
## [15.57.2](https://github.com/frappe/erpnext/compare/v15.57.1...v15.57.2) (2025-04-11)

### Bug Fixes

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

# Conflicts:
#	erpnext/stock/doctype/stock_settings/stock_settings.json
2025-04-11 14:24:37 +00:00
Rohit Waghchaure
18dd128838 fix: condition for use_batchwise_valuation
(cherry picked from commit cc171d9706)
(cherry picked from commit 0ff7465e27)
2025-04-11 14:24:31 +00:00
Frappe PR Bot
ff41ed534b chore(release): Bumped to Version 15.57.1
## [15.57.1](https://github.com/frappe/erpnext/compare/v15.57.0...v15.57.1) (2025-04-11)

### Bug Fixes

* allow to use batchwise valuation for moving average items ([dded682](dded682feb))
2025-04-11 12:22:21 +00:00
rohitwaghchaure
f2684d9b4c Merge pull request #47018 from frappe/mergify/bp/version-15/pr-47017
fix: allow to use batch-wise valuation for moving average items (backport #47015) (backport #47017)
2025-04-11 17:50:55 +05:30
Rohit Waghchaure
dded682feb fix: allow to use batchwise valuation for moving average items
(cherry picked from commit 65ba79bb85)
(cherry picked from commit e479975f54)
2025-04-11 11:56:35 +00:00
Frappe PR Bot
1326ba5326 chore(release): Bumped to Version 15.57.0
# [15.57.0](https://github.com/frappe/erpnext/compare/v15.56.0...v15.57.0) (2025-04-10)

### Bug Fixes

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

### Features

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

### Performance Improvements

* take query out of loop ([c7fead6](c7fead6bb0))
2025-04-10 07:31:47 +00:00
rohitwaghchaure
d047c965c6 Merge pull request #46990 from frappe/mergify/bp/version-15/pr-46947
feat: available serial no report (backport #46383) (backport #46947)
2025-04-10 12:59:58 +05:30
rohitwaghchaure
72e9844d27 Merge pull request #46987 from frappe/mergify/bp/version-15/pr-46985
fix: item code not showing in the error message (backport #46933) (backport #46985)
2025-04-10 12:59:36 +05:30
rohitwaghchaure
528b7534f7 Merge pull request #46991 from frappe/mergify/bp/version-15/pr-46989
fix: Recreate Stock Ledgers issue (backport #46965) (backport #46989)
2025-04-10 12:59:23 +05:30
rohitwaghchaure
3141e4a54f Merge pull request #46992 from frappe/mergify/bp/version-15/pr-46988
fix: bypass validation during reposting (backport #46978) (backport #46988)
2025-04-10 12:59:02 +05:30
Rohit Waghchaure
eaaac6e596 fix: bypass validation during reposting
(cherry picked from commit 3697b9fd9b)
(cherry picked from commit 01aad96b10)
2025-04-10 06:52:18 +00:00
Rohit Waghchaure
3db70febe1 fix: Recreate Stock Ledgers issue
(cherry picked from commit 229a4cef45)
(cherry picked from commit b819e0a61b)
2025-04-10 06:52:17 +00:00
Mihir Kandoi
88f1cf2943 fix: test file for v15
(cherry picked from commit cc7756dd49)
2025-04-10 06:14:40 +00:00
Mihir Kandoi
81f3f43e14 refactor: split and clean execute function to be more readable
(cherry picked from commit 036af54d54)
(cherry picked from commit 6fedb7b9db)
2025-04-10 06:14:40 +00:00
Mihir Kandoi
c7fead6bb0 perf: take query out of loop
(cherry picked from commit 26de902496)
(cherry picked from commit 9af50528f1)
2025-04-10 06:14:40 +00:00
Mihir Kandoi
bff4902993 fix: remove get_items query.run outside of if condition
(cherry picked from commit 80c17cc005)
(cherry picked from commit e7b5303782)
2025-04-10 06:14:39 +00:00
Mihir Kandoi
9cdd32ad6b refactor: import functions in new report instead of redundant code
(cherry picked from commit 501f07803e)
(cherry picked from commit 0ec026ec7e)
2025-04-10 06:14:39 +00:00
Mihir Kandoi
0f6a7edb53 feat: available serial no report
(cherry picked from commit 5592d8e87f)
(cherry picked from commit c472af87b2)
2025-04-10 06:14:39 +00:00
Rohit Waghchaure
837509ae47 fix: item code not showing in the error message
(cherry picked from commit 86dee69c2f)
(cherry picked from commit 663e2b7e6c)
2025-04-10 06:02:32 +00:00
Frappe PR Bot
52257c946e chore(release): Bumped to Version 15.56.0
# [15.56.0](https://github.com/frappe/erpnext/compare/v15.55.5...v15.56.0) (2025-04-08)

### Bug Fixes

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

### Features

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

### Performance Improvements

* reduce query when validating any doc ([890abf6](890abf6b90))
* Stock entry cancel is slow ([1bdfd33](1bdfd33816))
2025-04-08 13:08:39 +00:00
ruthra kumar
c4ab17b947 Merge pull request #46940 from frappe/version-15-hotfix
chore: release v15
2025-04-08 18:37:09 +05:30
Frappe PR Bot
9397a57d4d chore(release): Bumped to Version 15.55.5
## [15.55.5](https://github.com/frappe/erpnext/compare/v15.55.4...v15.55.5) (2025-04-07)

### Bug Fixes

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

# Conflicts:
#	erpnext/stock/deprecated_serial_batch.py
(cherry picked from commit 23dc9d5872)
2025-04-07 04:56:07 +00:00
Rohit Waghchaure
bf3349a432 fix: set draft QC in purchase document on creation of qc
(cherry picked from commit 2553dea78e)
(cherry picked from commit 54159b9e5e)
2025-04-07 04:55:58 +00:00
Frappe PR Bot
5dd99f896e chore(release): Bumped to Version 15.55.4
## [15.55.4](https://github.com/frappe/erpnext/compare/v15.55.3...v15.55.4) (2025-03-29)

### Bug Fixes

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

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

### Bug Fixes

* incorrect condition ([0721816](0721816763))
2025-03-29 07:03:05 +00:00
rohitwaghchaure
3395e7c2cd Merge pull request #46785 from frappe/mergify/bp/version-15/pr-46781
fix: incorrect condition (backport #46777) (backport #46781)
2025-03-29 12:31:36 +05:30
Rohit Waghchaure
0721816763 fix: incorrect condition
(cherry picked from commit 0c1a8e9c58)
(cherry picked from commit 502b8f25b3)
2025-03-29 06:48:03 +00:00
rohitwaghchaure
e45d0779ef Merge pull request #46752 from frappe/mergify/bp/version-15/pr-46749
Revert "perf: timeout while renaming cost center (backport #46641)" (backport #46749)
2025-03-27 13:13:17 +05:30
rohitwaghchaure
c6ce76170b Revert "perf: timeout while renaming cost center (backport #46641)"
(cherry picked from commit 326126e741)
2025-03-27 06:54:18 +00:00
Frappe PR Bot
de3e6922b5 chore(release): Bumped to Version 15.55.2
## [15.55.2](https://github.com/frappe/erpnext/compare/v15.55.1...v15.55.2) (2025-03-27)

### Bug Fixes

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

### Bug Fixes

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

# Conflicts:
#	erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
(cherry picked from commit af0fb131a2)
2025-03-26 17:09:42 +00:00
Rohit Waghchaure
1b6aeba267 fix: decimal values causing incorrect batch picking
(cherry picked from commit 7bfe703b04)
(cherry picked from commit c5efddae16)
2025-03-26 16:43:35 +00:00
Rohit Waghchaure
e393ce9a47 fix: expense account in the stock entry
(cherry picked from commit 89569d4b32)
(cherry picked from commit 62f342ef8b)
2025-03-26 10:18:49 +00:00
Frappe PR Bot
8951efb457 chore(release): Bumped to Version 15.55.0
# [15.55.0](https://github.com/frappe/erpnext/compare/v15.54.5...v15.55.0) (2025-03-25)

### Bug Fixes

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

### Features

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

### Performance Improvements

* timeout while renaming cost center ([58eb184](58eb1849d7))
2025-03-25 13:50:33 +00:00
ruthra kumar
5db2a19778 Merge pull request #46715 from frappe/version-15-hotfix
chore: release v15
2025-03-25 19:16:44 +05:30
Frappe PR Bot
35ac96f1ec chore(release): Bumped to Version 15.54.5
## [15.54.5](https://github.com/frappe/erpnext/compare/v15.54.4...v15.54.5) (2025-03-19)

### Bug Fixes

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

### Performance Improvements

* faster count estimation (backport [#46550](https://github.com/frappe/erpnext/issues/46550)) ([#46551](https://github.com/frappe/erpnext/issues/46551)) ([01bab8f](01bab8f22b))
2025-03-19 11:18:07 +00:00
ruthra kumar
187ebaaecd Merge pull request #46582 from frappe/version-15-hotfix
chore: release v15
2025-03-19 16:46:43 +05:30
ruthra kumar
1ec971f805 Merge pull request #46496 from frappe/mergify/bp/version-15/pr-46423
Revert "fix: Show Credit Note amount in credit note column" (backport #46423)
2025-03-13 08:20:53 +05:30
ruthra kumar
4d7071299e Revert "fix: Show Credit Note amount in credit note column"
(cherry picked from commit 5a9767ca67)
2025-03-13 02:35:11 +00:00
Frappe PR Bot
08f47b626c chore(release): Bumped to Version 15.54.4
## [15.54.4](https://github.com/frappe/erpnext/compare/v15.54.3...v15.54.4) (2025-03-12)

### Bug Fixes

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

View File

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

View File

@@ -22,4 +22,21 @@ frappe.ui.form.on("Accounts Settings", {
}
);
},
add_taxes_from_taxes_and_charges_template(frm) {
toggle_tax_settings(frm, "add_taxes_from_taxes_and_charges_template");
},
add_taxes_from_item_tax_template(frm) {
toggle_tax_settings(frm, "add_taxes_from_item_tax_template");
},
});
function toggle_tax_settings(frm, field_name) {
if (frm.doc[field_name]) {
const other_field =
field_name === "add_taxes_from_item_tax_template"
? "add_taxes_from_taxes_and_charges_template"
: "add_taxes_from_item_tax_template";
frm.set_value(other_field, 0);
}
}

View File

@@ -31,6 +31,7 @@
"determine_address_tax_category_from",
"column_break_19",
"add_taxes_from_item_tax_template",
"add_taxes_from_taxes_and_charges_template",
"book_tax_discount_loss",
"round_row_wise_tax",
"print_settings",
@@ -596,10 +597,18 @@
},
{
"default": "0",
"description": "Enable this field to fetch the exchange rates for Pegged Currencies.\n\n",
"description": "System will do an implicit conversion using the pegged currency. <br>\nEx: Instead of AED -&gt; INR, system will do AED -&gt; USD -&gt; INR using the pegged exchange rate of AED against USD.",
"documentation_url": "/app/pegged-currencies/Pegged Currencies",
"fieldname": "allow_pegged_currencies_exchange_rates",
"fieldtype": "Check",
"label": "Allow Pegged Currencies Exchange Rates"
"label": "Allow Implicit Pegged Currency Conversion"
},
{
"default": "0",
"description": "If no taxes are set, and Taxes and Charges Template is selected, the system will automatically apply the taxes from the chosen template.",
"fieldname": "add_taxes_from_taxes_and_charges_template",
"fieldtype": "Check",
"label": "Automatically Add Taxes from Taxes and Charges Template"
}
],
"icon": "icon-cog",
@@ -607,7 +616,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2025-06-16 16:40:54.871486",
"modified": "2025-06-23 15:55:33.346398",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",

View File

@@ -25,6 +25,7 @@ class AccountsSettings(Document):
acc_frozen_upto: DF.Date | None
add_taxes_from_item_tax_template: DF.Check
add_taxes_from_taxes_and_charges_template: DF.Check
allow_multi_currency_invoices_against_single_party_account: DF.Check
allow_pegged_currencies_exchange_rates: DF.Check
allow_stale: DF.Check
@@ -74,6 +75,7 @@ class AccountsSettings(Document):
# end: auto-generated types
def validate(self):
self.validate_auto_tax_settings()
old_doc = self.get_doc_before_save()
clear_cache = False
@@ -140,3 +142,13 @@ class AccountsSettings(Document):
if self.has_value_changed("reconciliation_queue_size"):
if cint(self.reconciliation_queue_size) < 5 or cint(self.reconciliation_queue_size) > 100:
frappe.throw(_("Queue Size should be between 5 and 100"))
def validate_auto_tax_settings(self):
if self.add_taxes_from_item_tax_template and self.add_taxes_from_taxes_and_charges_template:
frappe.throw(
_("You cannot enable both the settings '{0}' and '{1}'.").format(
frappe.bold(self.meta.get_label("add_taxes_from_item_tax_template")),
frappe.bold(self.meta.get_label("add_taxes_from_taxes_and_charges_template")),
),
title=_("Auto Tax Settings Error"),
)

View File

@@ -147,8 +147,7 @@ class JournalEntry(AccountsController):
if self.docstatus == 0:
self.apply_tax_withholding()
if not self.title:
self.title = self.get_title()
self.title = self.get_title()
def validate_advance_accounts(self):
journal_accounts = set([x.account for x in self.accounts])

View File

@@ -1356,7 +1356,9 @@ class SalesInvoice(SellingController):
if item.is_fixed_asset:
asset = self.get_asset(item)
if self.is_return:
if (self.docstatus == 2 and not self.is_return) or (
self.docstatus == 1 and self.is_return
):
fixed_asset_gl_entries = get_gl_entries_on_asset_regain(
asset,
item.base_net_amount,
@@ -1369,8 +1371,10 @@ class SalesInvoice(SellingController):
add_asset_activity(asset.name, _("Asset returned"))
if asset.calculate_depreciation:
posting_date = frappe.db.get_value(
"Sales Invoice", self.return_against, "posting_date"
posting_date = (
frappe.db.get_value("Sales Invoice", self.return_against, "posting_date")
if self.is_return
else self.posting_date
)
reverse_depreciation_entry_made_after_disposal(asset, posting_date)
notes = _(
@@ -1467,8 +1471,10 @@ class SalesInvoice(SellingController):
return self._enable_discount_accounting
def set_asset_status(self, asset):
if self.is_return:
if self.is_return and not self.docstatus == 2:
asset.set_status()
elif self.is_return and self.docstatus == 2:
asset.set_status("Sold")
else:
asset.set_status("Sold" if self.docstatus == 1 else None)

View File

@@ -836,6 +836,10 @@ class TestSalesInvoice(FrappeTestCase):
w = self.make()
self.assertEqual(w.outstanding_amount, w.base_rounded_total)
@change_settings(
"Accounts Settings",
{"add_taxes_from_item_tax_template": 0, "add_taxes_from_taxes_and_charges_template": 0},
)
def test_rounded_total_with_cash_discount(self):
si = frappe.copy_doc(test_records[2])
@@ -3135,6 +3139,65 @@ class TestSalesInvoice(FrappeTestCase):
self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount)
self.assertEqual(schedule.journal_entry, schedule.journal_entry)
def test_depreciation_on_cancel_invoice(self):
from erpnext.controllers.sales_and_purchase_return import make_return_doc
create_asset_data()
asset = create_asset(
item_code="Macbook Pro",
purchase_date="2020-01-01",
available_for_use_date="2023-01-01",
depreciation_start_date="2023-04-01",
calculate_depreciation=1,
submit=1,
)
post_depreciation_entries()
si = create_sales_invoice(
item_code="Macbook Pro", asset=asset.name, qty=1, rate=10000, posting_date=getdate("2025-05-01")
)
return_si = make_return_doc("Sales Invoice", si.name)
return_si.posting_date = getdate("2025-05-01")
return_si.submit()
return_si.reload()
return_si.cancel()
asset.load_from_db()
# Check if the asset schedule is updated while cancel the return invoice
expected_values = [
["2023-04-01", 4986.30, 4986.30, True],
["2024-04-01", 20000.0, 24986.30, True],
["2025-04-01", 20000.0, 44986.30, True],
["2025-05-01", 1643.84, 46630.14, True],
]
for i, schedule in enumerate(get_depr_schedule(asset.name, "Active")):
self.assertEqual(getdate(expected_values[i][0]), schedule.schedule_date)
self.assertEqual(expected_values[i][1], schedule.depreciation_amount)
self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount)
self.assertEqual(schedule.journal_entry, schedule.journal_entry)
si.reload()
si.cancel()
asset.load_from_db()
# Check if the asset schedule is updated while cancel the sales invoice
expected_values = [
["2023-04-01", 4986.30, 4986.30, True],
["2024-04-01", 20000.0, 24986.30, True],
["2025-04-01", 20000.0, 44986.30, True],
["2026-04-01", 20000.0, 64986.30, False],
["2027-04-01", 20000.0, 84986.30, False],
["2028-01-01", 15013.70, 100000.0, False],
]
for i, schedule in enumerate(get_depr_schedule(asset.name, "Active")):
self.assertEqual(getdate(expected_values[i][0]), schedule.schedule_date)
self.assertEqual(expected_values[i][1], schedule.depreciation_amount)
self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount)
self.assertEqual(schedule.journal_entry, schedule.journal_entry)
def test_sales_invoice_against_supplier(self):
from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import (
make_customer,
@@ -3429,6 +3492,7 @@ class TestSalesInvoice(FrappeTestCase):
si.posting_date = getdate()
si.submit()
@change_settings("Accounts Settings", {"over_billing_allowance": 0})
def test_over_billing_case_against_delivery_note(self):
"""
Test a case where duplicating the item with qty = 1 in the invoice
@@ -3436,24 +3500,23 @@ class TestSalesInvoice(FrappeTestCase):
"""
from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note
over_billing_allowance = frappe.db.get_single_value("Accounts Settings", "over_billing_allowance")
frappe.db.set_single_value("Accounts Settings", "over_billing_allowance", 0)
dn = create_delivery_note()
dn.submit()
si = make_sales_invoice(dn.name)
# make a copy of first item and add it to invoice
item_copy = frappe.copy_doc(si.items[0])
si.save()
si.items = [] # Clear existing items
si.append("items", item_copy)
si.save()
si.append("items", item_copy)
with self.assertRaises(frappe.ValidationError) as err:
si.submit()
si.save()
self.assertTrue("cannot overbill" in str(err.exception).lower())
frappe.db.set_single_value("Accounts Settings", "over_billing_allowance", over_billing_allowance)
dn.cancel()
@change_settings(
"Accounts Settings",
@@ -4409,6 +4472,94 @@ class TestSalesInvoice(FrappeTestCase):
self.assertRaises(StockOverReturnError, return_doc.save)
def test_stand_alone_credit_note_valuation(self):
from erpnext.stock.doctype.item.test_item import make_item
item_code = "_Test Item for Credit Note Valuation"
make_item_for_si(
item_code,
{
"is_stock_item": 1,
"has_batch_no": 1,
"create_new_batch": 1,
"batch_number_series": "BATCH-TCNV.####",
},
)
si = create_sales_invoice(
item=item_code,
qty=-2,
rate=1200,
is_return=1,
update_stock=1,
)
stock_ledger_entry = frappe.db.get_value(
"Stock Ledger Entry",
{
"voucher_type": "Sales Invoice",
"voucher_no": si.name,
"item_code": item_code,
"warehouse": "_Test Warehouse - _TC",
},
["incoming_rate", "valuation_rate", "actual_qty as qty", "stock_value_difference"],
as_dict=True,
)
self.assertEqual(stock_ledger_entry.incoming_rate, 1200.0)
self.assertEqual(stock_ledger_entry.valuation_rate, 1200.0)
self.assertEqual(stock_ledger_entry.qty, 2.0)
self.assertEqual(stock_ledger_entry.stock_value_difference, 2400.0)
def test_stand_alone_credit_note_zero_valuation(self):
from erpnext.stock.doctype.item.test_item import make_item
item_code = "_Test Item for Credit Note Zero Valuation"
make_item_for_si(
item_code,
{
"is_stock_item": 1,
"has_batch_no": 1,
"create_new_batch": 1,
"batch_number_series": "BATCH-TCNZV.####",
},
)
si = create_sales_invoice(
item=item_code,
qty=-2,
rate=1200,
is_return=1,
update_stock=1,
allow_zero_valuation_rate=1,
)
stock_ledger_entry = frappe.db.get_value(
"Stock Ledger Entry",
{
"voucher_type": "Sales Invoice",
"voucher_no": si.name,
"item_code": item_code,
"warehouse": "_Test Warehouse - _TC",
},
["incoming_rate", "valuation_rate", "actual_qty as qty", "stock_value_difference"],
as_dict=True,
)
self.assertEqual(stock_ledger_entry.incoming_rate, 0.0)
self.assertEqual(stock_ledger_entry.valuation_rate, 0.0)
self.assertEqual(stock_ledger_entry.qty, 2.0)
self.assertEqual(stock_ledger_entry.stock_value_difference, 0.0)
def make_item_for_si(item_code, properties=None):
from erpnext.stock.doctype.item.test_item import make_item
item = make_item(item_code, properties=properties)
item.is_stock_item = 1
item.save()
return item
def set_advance_flag(company, flag, default_account):
frappe.db.set_value(
@@ -4512,6 +4663,7 @@ def create_sales_invoice(**args):
"conversion_factor": args.get("conversion_factor", 1),
"incoming_rate": args.incoming_rate or 0,
"serial_and_batch_bundle": bundle_id,
"allow_zero_valuation_rate": args.allow_zero_valuation_rate or 0,
},
)

View File

@@ -194,8 +194,7 @@ def get_gl_entries(filters, accounting_dimensions):
voucher_type, voucher_subtype, voucher_no, {dimension_fields}
cost_center, project, {transaction_currency_fields}
against_voucher_type, against_voucher, account_currency,
against, is_opening, creation {select_fields},
transaction_currency
against, is_opening, creation {select_fields}
from `tabGL Entry`
where company=%(company)s {get_conditions(filters)}
{order_by_statement}

View File

@@ -101,7 +101,6 @@ def convert_to_presentation_currency(gl_entries, currency_info):
account_currencies = list(set(entry["account_currency"] for entry in gl_entries))
for entry in gl_entries:
transaction_currency = entry.get("transaction_currency")
debit = flt(entry["debit"])
credit = flt(entry["credit"])
debit_in_account_currency = flt(entry["debit_in_account_currency"])
@@ -111,7 +110,7 @@ def convert_to_presentation_currency(gl_entries, currency_info):
if (
len(account_currencies) == 1
and account_currency == presentation_currency
and (transaction_currency is None or account_currency == transaction_currency)
and (debit_in_account_currency or credit_in_account_currency)
):
entry["debit"] = debit_in_account_currency
entry["credit"] = credit_in_account_currency

View File

@@ -24,22 +24,28 @@ def get_chart_data(data, conditions, filters):
datapoints = []
start = 3 if filters.get("based_on") in ["Item", "Supplier"] else 1
if filters.get("based_on") in ["Supplier"]:
start = 3
elif filters.get("based_on") in ["Item"]:
start = 2
else:
start = 1
if filters.get("group_by"):
start += 1
# fetch only periodic columns as labels
columns = conditions.get("columns")[start:-2][1::2]
columns = conditions.get("columns")[start:-2][2::2]
labels = [column.split(":")[0] for column in columns]
datapoints = [0] * len(labels)
for row in data:
# If group by filter, don't add first row of group (it's already summed)
if not row[start - 1]:
if not row[start]:
continue
# Remove None values and compute only periodic data
row = [x if x else 0 for x in row[start:-2]]
row = row[1::2]
row = row[2::2]
for i in range(len(row)):
datapoints[i] += row[i]

View File

@@ -1134,10 +1134,21 @@ class AccountsController(TransactionBase):
return True
def set_taxes_and_charges(self):
if frappe.db.get_single_value("Accounts Settings", "add_taxes_from_item_tax_template"):
if hasattr(self, "taxes_and_charges") and not self.get("taxes") and not self.get("is_pos"):
if tax_master_doctype := self.meta.get_field("taxes_and_charges").options:
self.append_taxes_from_master(tax_master_doctype)
if self.doctype == "Material Request":
# Material Request does not have taxes
return
if self.get("taxes") or self.get("is_pos"):
return
if frappe.get_single_value(
"Accounts Settings", "add_taxes_from_taxes_and_charges_template"
) and hasattr(self, "taxes_and_charges"):
if tax_master_doctype := self.meta.get_field("taxes_and_charges").options:
self.append_taxes_from_master(tax_master_doctype)
if frappe.get_single_value("Accounts Settings", "add_taxes_from_item_tax_template"):
self.append_taxes_from_item_tax_template()
def append_taxes_from_master(self, tax_master_doctype=None):
if self.get("taxes_and_charges"):
@@ -1169,6 +1180,9 @@ class AccountsController(TransactionBase):
"account_head": account_head,
"rate": 0,
"description": account_head,
"set_by_item_tax_template": 1,
"category": "Total",
"add_deduct_tax": "Add",
},
)
@@ -2053,69 +2067,48 @@ class AccountsController(TransactionBase):
def validate_multiple_billing(self, ref_dt, item_ref_dn, based_on):
from erpnext.controllers.status_updater import get_allowance_for
item_allowance = {}
global_qty_allowance, global_amount_allowance = None, None
ref_wise_billed_amount = self.get_reference_wise_billed_amt(ref_dt, item_ref_dn, based_on)
role_allowed_to_over_bill = frappe.get_cached_value(
"Accounts Settings", None, "role_allowed_to_over_bill"
)
user_roles = frappe.get_roles()
if not ref_wise_billed_amount:
return
total_overbilled_amt = 0.0
overbilled_items = []
precision = self.precision(based_on, "items")
precision_allowance = 1 / (10**precision)
reference_names = [d.get(item_ref_dn) for d in self.get("items") if d.get(item_ref_dn)]
reference_details = self.get_billing_reference_details(reference_names, ref_dt + " Item", based_on)
role_allowed_to_overbill = frappe.get_single_value("Accounts Settings", "role_allowed_to_over_bill")
is_overbilling_allowed = role_allowed_to_overbill in frappe.get_roles()
for item in self.get("items"):
if not item.get(item_ref_dn):
continue
for row in ref_wise_billed_amount.values():
total_billed_amt = row.billed_amt
allowance = get_allowance_for(row.item_code, {}, None, None, "amount")[0]
ref_amt = flt(reference_details.get(item.get(item_ref_dn)), self.precision(based_on, item))
based_on_amt = flt(item.get(based_on))
if not ref_amt:
if based_on_amt: # Skip warning for free items
frappe.msgprint(
_(
"System will not check over billing since amount for Item {0} in {1} is zero"
).format(item.item_code, ref_dt),
title=_("Warning"),
indicator="orange",
)
continue
already_billed = self.get_billed_amount_for_item(item, item_ref_dn, based_on)
total_billed_amt = flt(flt(already_billed) + based_on_amt, self.precision(based_on, item))
allowance, item_allowance, global_qty_allowance, global_amount_allowance = get_allowance_for(
item.item_code, item_allowance, global_qty_allowance, global_amount_allowance, "amount"
)
max_allowed_amt = flt(ref_amt * (100 + allowance) / 100)
max_allowed_amt = flt(row.ref_amt * (100 + allowance) / 100)
if total_billed_amt < 0 and max_allowed_amt < 0:
# while making debit note against purchase return entry(purchase receipt) getting overbill error
total_billed_amt = abs(total_billed_amt)
max_allowed_amt = abs(max_allowed_amt)
total_billed_amt, max_allowed_amt = abs(total_billed_amt), abs(max_allowed_amt)
overbill_amt = total_billed_amt - max_allowed_amt
row["max_allowed_amt"] = max_allowed_amt
total_overbilled_amt += overbill_amt
if overbill_amt > 0.01 and role_allowed_to_over_bill not in user_roles:
if self.doctype != "Purchase Invoice":
self.throw_overbill_exception(item, max_allowed_amt)
elif not cint(
if overbill_amt > precision_allowance and not is_overbilling_allowed:
if self.doctype != "Purchase Invoice" or not cint(
frappe.db.get_single_value(
"Buying Settings", "bill_for_rejected_quantity_in_purchase_invoice"
)
):
self.throw_overbill_exception(item, max_allowed_amt)
overbilled_items.append(row)
if role_allowed_to_over_bill in user_roles and total_overbilled_amt > 0.1:
if overbilled_items:
self.throw_overbill_exception(overbilled_items, precision)
if is_overbilling_allowed and total_overbilled_amt > 0.1:
frappe.msgprint(
_("Overbilling of {} ignored because you have {} role.").format(
total_overbilled_amt, role_allowed_to_over_bill
total_overbilled_amt, role_allowed_to_overbill
),
indicator="orange",
alert=True,
@@ -2131,55 +2124,88 @@ class AccountsController(TransactionBase):
)
)
def get_billed_amount_for_item(self, item, item_ref_dn, based_on):
def get_reference_wise_billed_amt(self, ref_dt, item_ref_dn, based_on):
"""
Returns Sum of Amount of
Sales/Purchase Invoice Items
that are linked to `item_ref_dn` (`dn_detail` / `pr_detail`)
that are submitted OR not submitted but are under current invoice
"""
reference_names = [d.get(item_ref_dn) for d in self.items if d.get(item_ref_dn)]
from frappe.query_builder import Criterion
from frappe.query_builder.functions import Sum
if not reference_names:
return
item_doctype = frappe.qb.DocType(item.doctype)
ref_wise_billed_amount = {}
precision = self.precision(based_on, "items")
reference_details = self.get_billing_reference_details(reference_names, ref_dt + " Item", based_on)
already_billed = self.get_already_billed_amount(reference_names, item_ref_dn, based_on)
for item in self.items:
key = item.get(item_ref_dn)
if not key:
continue
ref_amt = flt(reference_details.get(key), precision)
current_amount = flt(item.get(based_on), precision)
if not ref_amt:
if current_amount: # Skip warning for free items
frappe.msgprint(
_(
"System will not check over billing since amount for Item {0} in {1} is zero"
).format(item.item_code, ref_dt),
title=_("Warning"),
indicator="orange",
)
continue
ref_wise_billed_amount.setdefault(
key,
frappe._dict(item_code=item.item_code, billed_amt=0.0, ref_amt=ref_amt, rows=[]),
)
ref_wise_billed_amount[key]["rows"].append(item.idx)
ref_wise_billed_amount[key]["ref_amt"] = ref_amt
ref_wise_billed_amount[key]["billed_amt"] += current_amount
if key in already_billed:
ref_wise_billed_amount[key]["billed_amt"] += flt(already_billed.pop(key, 0), precision)
return ref_wise_billed_amount
def get_already_billed_amount(self, reference_names, item_ref_dn, based_on):
item_doctype = frappe.qb.DocType(self.items[0].doctype)
based_on_field = frappe.qb.Field(based_on)
join_field = frappe.qb.Field(item_ref_dn)
result = (
frappe.qb.from_(item_doctype)
.select(Sum(based_on_field))
.where(join_field == item.get(item_ref_dn))
.where(
Criterion.any(
[ # select all items from other invoices OR current invoices
Criterion.all(
[ # for selecting items from other invoices
item_doctype.docstatus == 1,
item_doctype.parent != self.name,
]
),
Criterion.all(
[ # for selecting items from current invoice, that are linked to same reference
item_doctype.docstatus == 0,
item_doctype.parent == self.name,
item_doctype.name != item.name,
]
),
]
)
)
).run()
return result[0][0] if result else 0
def throw_overbill_exception(self, item, max_allowed_amt):
frappe.throw(
_(
"Cannot overbill for Item {0} in row {1} more than {2}. To allow over-billing, please set allowance in Accounts Settings"
).format(item.item_code, item.idx, max_allowed_amt)
return frappe._dict(
(
frappe.qb.from_(item_doctype)
.select(join_field, Sum(based_on_field))
.where(join_field.isin(reference_names))
.where((item_doctype.docstatus == 1) & (item_doctype.parent != self.name))
.groupby(join_field)
).run()
)
def throw_overbill_exception(self, overbilled_items, precision):
message = (
_("<p>Cannot overbill for the following Items:</p>")
+ "<ul>"
+ "".join(
_("<li>Item {0} in row(s) {1} billed more than {2}</li>").format(
frappe.bold(item.item_code),
", ".join(str(x) for x in item.rows),
frappe.bold(fmt_money(item.max_allowed_amt, precision=precision, currency=self.currency)),
)
for item in overbilled_items
)
+ "</ul>"
)
message += _("<p>To allow over-billing, please set allowance in Accounts Settings.</p>")
frappe.throw(_(message))
def get_company_default(self, fieldname, ignore_validation=False):
from erpnext.accounts.utils import get_company_default

View File

@@ -680,6 +680,14 @@ def get_rate_for_return(
raise_error_if_no_rate=False,
)
if not rate and voucher_type in ["Sales Invoice", "Delivery Note"]:
details = frappe.db.get_value(
voucher_type + " Item", voucher_detail_no, ["rate", "allow_zero_valuation_rate"], as_dict=1
)
if details and not details.allow_zero_valuation_rate:
rate = flt(details.rate)
return rate

View File

@@ -525,6 +525,15 @@ class SellingController(StockController):
self.doctype, self.name, d.item_code, self.return_against, item_row=d
)
if (
self.get("is_return")
and not d.incoming_rate
and not self.get("return_against")
and not self.is_internal_transfer()
and not d.get("allow_zero_valuation_rate")
):
d.incoming_rate = d.rate
# For internal transfers use incoming rate as the valuation rate
if self.is_internal_transfer():
if self.doctype == "Delivery Note" or self.get("update_stock"):

View File

@@ -931,7 +931,10 @@ class TestAccountsController(FrappeTestCase):
self.assertEqual(exc_je_for_si, [])
self.assertEqual(exc_je_for_pe, [])
@change_settings("Accounts Settings", {"add_taxes_from_item_tax_template": 1})
@change_settings(
"Accounts Settings",
{"add_taxes_from_item_tax_template": 0, "add_taxes_from_taxes_and_charges_template": 1},
)
def test_18_fetch_taxes_based_on_taxes_and_charges_template(self):
# Create a Sales Taxes and Charges Template
if not frappe.db.exists("Sales Taxes and Charges Template", "_Test Tax - _TC"):
@@ -960,6 +963,30 @@ class TestAccountsController(FrappeTestCase):
self.assertEqual(sinv.total_taxes_and_charges, 4.5)
@change_settings(
"Accounts Settings",
{"add_taxes_from_item_tax_template": 1, "add_taxes_from_taxes_and_charges_template": 0},
)
def test_19_fetch_taxes_based_on_item_tax_template_template(self):
# Create a Sales Invoice
sinv = frappe.new_doc("Sales Invoice")
sinv.customer = self.customer
sinv.company = self.company
sinv.currency = "INR"
sinv.append(
"items",
{
"item_code": "_Test Item",
"qty": 1,
"rate": 50,
"item_tax_template": "_Test Account Excise Duty @ 10 - _TC",
},
)
sinv.insert()
self.assertEqual(sinv.taxes[0].account_head, "_Test Account Excise Duty - _TC")
self.assertEqual(sinv.total_taxes_and_charges, 5)
def test_20_journal_against_sales_invoice(self):
# Invoice in Foreign Currency
si = self.create_sales_invoice(qty=1, conversion_rate=80, rate=1)

View File

@@ -97,8 +97,10 @@ def get_data(filters, conditions):
elif filters.get("group_by") == "Supplier":
sel_col = "t1.supplier"
if filters.get("based_on") in ["Item", "Customer", "Supplier"]:
if filters.get("based_on") in ["Customer", "Supplier"]:
inc = 3
elif filters.get("based_on") in ["Item"]:
inc = 2
else:
inc = 1
@@ -158,7 +160,7 @@ def get_data(filters, conditions):
# get data for group_by filter
row1 = frappe.db.sql(
""" select t1.currency , {} , {} from `tab{}` t1, `tab{} Item` t2 {}
""" select t4.default_currency AS currency , {} , {} from `tab{}` t1, `tab{} Item` t2 {}
where t2.parent = t1.name and t1.company = {} and {} between {} and {}
and t1.docstatus = 1 and {} = {} and {} = {} {} {}
""".format(
@@ -392,8 +394,12 @@ def based_wise_columns_query(based_on, trans):
else:
frappe.throw(_("Project-wise data is not available for Quotation"))
based_on_details["based_on_select"] += "t1.currency,"
based_on_details["based_on_select"] += "t4.default_currency as currency,"
based_on_details["based_on_cols"].append("Currency:Link/Currency:120")
based_on_details["addl_tables"] += ", `tabCompany` t4"
based_on_details["addl_tables_relational_cond"] = (
based_on_details.get("addl_tables_relational_cond", "") + " and t1.company = t4.name"
)
return based_on_details

View File

@@ -4,18 +4,19 @@
"doctype": "Number Card",
"document_type": "Opportunity",
"dynamic_filters_json": "[[\"Opportunity\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]",
"filters_json": "[[\"Opportunity\",\"company\",\"=\",null,false]]",
"filters_json": "[]",
"function": "Count",
"idx": 0,
"is_public": 1,
"is_standard": 1,
"label": "Open Opportunity",
"modified": "2020-07-22 16:16:16.420446",
"modified": "2025-06-24 11:10:17.468713",
"modified_by": "Administrator",
"module": "CRM",
"name": "Open Opportunity",
"owner": "Administrator",
"show_full_number": 0,
"show_percentage_stats": 1,
"stats_time_interval": "Daily",
"type": "Document Type"
}
}

View File

@@ -57,7 +57,6 @@ setup_wizard_complete = "erpnext.setup.setup_wizard.setup_wizard.setup_demo"
setup_wizard_test = "erpnext.setup.setup_wizard.test_setup_wizard.run_setup_wizard_test"
before_install = [
"erpnext.setup.install.check_setup_wizard_not_completed",
"erpnext.setup.install.check_frappe_version",
]
after_install = "erpnext.setup.install.after_install"

View File

@@ -914,7 +914,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
}
var get_party_currency = function() {
if (me.is_a_mapped_document()) {
if (me.is_a_mapped_document() || me.frm.doc.__onload?.load_after_mapping) {
return;
}

View File

@@ -8,6 +8,13 @@ frappe.pages["setup-wizard"].on_page_load = function (wrapper) {
};
frappe.setup.on("before_load", function () {
if (
frappe.boot.setup_wizard_completed_apps?.length &&
frappe.boot.setup_wizard_completed_apps.includes("erpnext")
) {
return;
}
erpnext.setup.slides_settings.map(frappe.setup.add_slide);
});
@@ -96,7 +103,7 @@ erpnext.setup.slides_settings = [
},
set_fy_dates: function (slide) {
var country = frappe.wizard.values.country;
var country = frappe.wizard.values.country || frappe.defaults.get_default("country");
if (country) {
let fy = erpnext.setup.fiscal_years[country];
@@ -118,7 +125,7 @@ erpnext.setup.slides_settings = [
},
load_chart_of_accounts: function (slide) {
let country = frappe.wizard.values.country;
let country = frappe.wizard.values.country || frappe.defaults.get_default("country");
if (country) {
frappe.call({

View File

@@ -179,6 +179,10 @@ class TestQuotation(FrappeTestCase):
sales_order.delivery_date = nowdate()
sales_order.insert()
@change_settings(
"Accounts Settings",
{"add_taxes_from_item_tax_template": 0, "add_taxes_from_taxes_and_charges_template": 0},
)
def test_make_sales_order_with_terms(self):
from erpnext.selling.doctype.quotation.quotation import make_sales_order
@@ -716,6 +720,10 @@ class TestQuotation(FrappeTestCase):
quotation.items[0].conversion_factor = 2.23
self.assertRaises(frappe.ValidationError, quotation.save)
@change_settings(
"Accounts Settings",
{"add_taxes_from_item_tax_template": 1, "add_taxes_from_taxes_and_charges_template": 0},
)
def test_item_tax_template_for_quotation(self):
from erpnext.stock.doctype.item.test_item import make_item
@@ -757,10 +765,7 @@ class TestQuotation(FrappeTestCase):
item_doc.save()
quotation = make_quotation(item_code="_Test Item Tax Template QTN", qty=1, rate=100, do_not_submit=1)
self.assertFalse(quotation.taxes)
quotation.append_taxes_from_item_tax_template()
quotation.save()
self.assertTrue(quotation.taxes)
for row in quotation.taxes:
self.assertEqual(row.account_head, "_Test Vat - _TC")

View File

@@ -177,6 +177,10 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase):
so.load_from_db()
self.assertEqual(so.per_billed, 0)
@change_settings(
"Accounts Settings",
{"add_taxes_from_item_tax_template": 0, "add_taxes_from_taxes_and_charges_template": 1},
)
def test_make_sales_invoice_with_terms(self):
so = make_sales_order(do_not_submit=True)
@@ -1828,6 +1832,10 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase):
self.assertEqual(so.items[0].work_order_qty, wo.produced_qty)
self.assertEqual(mr.status, "Manufactured")
@change_settings(
"Accounts Settings",
{"add_taxes_from_item_tax_template": 0, "add_taxes_from_taxes_and_charges_template": 0},
)
def test_sales_order_with_shipping_rule(self):
from erpnext.accounts.doctype.shipping_rule.test_shipping_rule import create_shipping_rule
@@ -1853,6 +1861,10 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase):
sales_order.save()
self.assertEqual(sales_order.taxes[0].tax_amount, 0)
@change_settings(
"Accounts Settings",
{"add_taxes_from_item_tax_template": 0, "add_taxes_from_taxes_and_charges_template": 1},
)
def test_sales_order_partial_advance_payment(self):
from erpnext.accounts.doctype.payment_entry.test_payment_entry import (
create_payment_entry,

View File

@@ -8,8 +8,9 @@ import frappe
from frappe.utils import cint
from frappe.utils.nestedset import get_root_of
from erpnext.accounts.doctype.pos_invoice.pos_invoice import get_stock_availability
from erpnext.accounts.doctype.pos_invoice.pos_invoice import get_item_group, get_stock_availability
from erpnext.accounts.doctype.pos_profile.pos_profile import get_child_nodes, get_item_groups
from erpnext.stock.get_item_details import get_conversion_factor
from erpnext.stock.utils import scan_barcode
@@ -66,6 +67,9 @@ def search_by_term(search_term, warehouse, price_list):
if batch_no:
price_filters["batch_no"] = ["in", [batch_no, ""]]
if serial_no:
price_filters["uom"] = item_doc.stock_uom
price = frappe.get_list(
doctype="Item Price",
filters=price_filters,
@@ -109,7 +113,8 @@ def search_by_term(search_term, warehouse, price_list):
def filter_result_items(result, pos_profile):
if result and result.get("items"):
pos_item_groups = frappe.db.get_all("POS Item Group", {"parent": pos_profile}, pluck="item_group")
pos_profile_doc = frappe.get_cached_doc("POS Profile", pos_profile)
pos_item_groups = get_item_group(pos_profile_doc)
if not pos_item_groups:
return
result["items"] = [item for item in result.get("items") if item.get("item_group") in pos_item_groups]
@@ -158,7 +163,8 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te
item.description,
item.stock_uom,
item.image AS item_image,
item.is_stock_item
item.is_stock_item,
item.sales_uom
FROM
`tabItem` item {bin_join_selection}
WHERE
@@ -192,12 +198,9 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te
current_date = frappe.utils.today()
for item in items_data:
uoms = frappe.get_doc("Item", item.item_code).get("uoms", [])
item.actual_qty, _ = get_stock_availability(item.item_code, warehouse)
item.uom = item.stock_uom
item_price = frappe.get_all(
item_prices = frappe.get_all(
"Item Price",
fields=["price_list_rate", "currency", "uom", "batch_no", "valid_from", "valid_upto"],
filters={
@@ -208,27 +211,40 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te
"valid_upto": ["in", [None, "", current_date]],
},
order_by="valid_from desc",
limit=1,
)
if not item_price:
result.append(item)
stock_uom_price = next((d for d in item_prices if d.get("uom") == item.stock_uom), {})
item_uom = item.stock_uom
item_uom_price = stock_uom_price
for price in item_price:
uom = next(filter(lambda x: x.uom == price.uom, uoms), {})
if item.sales_uom and item.sales_uom != item.stock_uom:
item_uom = item.sales_uom
sales_uom_price = next((d for d in item_prices if d.get("uom") == item.sales_uom), {})
if sales_uom_price:
item_uom_price = sales_uom_price
if price.uom != item.stock_uom and uom and uom.conversion_factor:
item.actual_qty = item.actual_qty // uom.conversion_factor
if item_prices and not item_uom_price:
item_uom = item_prices[0].get("uom")
item_uom_price = item_prices[0]
item_conversion_factor = get_conversion_factor(item.item_code, item_uom).get("conversion_factor")
if item.stock_uom != item_uom:
item.actual_qty = item.actual_qty // item_conversion_factor
if item_uom_price and item_uom != item_uom_price.get("uom"):
item_uom_price.price_list_rate = item_uom_price.price_list_rate * item_conversion_factor
result.append(
{
**item,
"price_list_rate": item_uom_price.get("price_list_rate"),
"currency": item_uom_price.get("currency"),
"uom": item_uom,
"batch_no": item_uom_price.get("batch_no"),
}
)
result.append(
{
**item,
"price_list_rate": price.get("price_list_rate"),
"currency": price.get("currency"),
"uom": price.uom or item.uom,
"batch_no": price.batch_no,
}
)
return {"items": result}

View File

@@ -25,22 +25,28 @@ def get_chart_data(data, conditions, filters):
datapoints = []
start = 3 if filters.get("based_on") in ["Item", "Customer"] else 1
if filters.get("based_on") in ["Customer"]:
start = 3
elif filters.get("based_on") in ["Item"]:
start = 2
else:
start = 1
if filters.get("group_by"):
start += 1
# fetch only periodic columns as labels
columns = conditions.get("columns")[start:-2][1::2]
columns = conditions.get("columns")[start:-2][2::2]
labels = [column.split(":")[0] for column in columns]
datapoints = [0] * len(labels)
for row in data:
# If group by filter, don't add first row of group (it's already summed)
if not row[start - 1]:
if not row[start]:
continue
# Remove None values and compute only periodic data
row = [x if x else 0 for x in row[start:-2]]
row = row[1::2]
row = row[2::2]
for i in range(len(row)):
datapoints[i] += row[i]

View File

@@ -24,22 +24,28 @@ def get_chart_data(data, conditions, filters):
datapoints = []
start = 3 if filters.get("based_on") in ["Item", "Customer"] else 1
if filters.get("based_on") in ["Customer"]:
start = 3
elif filters.get("based_on") in ["Item"]:
start = 2
else:
start = 1
if filters.get("group_by"):
start += 1
# fetch only periodic columns as labels
columns = conditions.get("columns")[start:-2][1::2]
columns = conditions.get("columns")[start:-2][2::2]
labels = [column.split(":")[0] for column in columns]
datapoints = [0] * len(labels)
for row in data:
# If group by filter, don't add first row of group (it's already summed)
if not row[start - 1]:
if not row[start]:
continue
# Remove None values and compute only periodic data
row = [x if x else 0 for x in row[start:-2]]
row = row[1::2]
row = row[2::2]
for i in range(len(row)):
datapoints[i] += row[i]

View File

@@ -39,13 +39,6 @@ def after_install():
frappe.db.commit()
def check_setup_wizard_not_completed():
if cint(frappe.db.get_single_value("System Settings", "setup_complete") or 0):
message = """ERPNext can only be installed on a fresh site where the setup wizard is not completed.
You can reinstall this site (after saving your data) using: bench --site [sitename] reinstall"""
frappe.throw(message) # nosemgrep
def check_frappe_version():
def major_version(v: str) -> str:
return v.split(".")[0]

View File

@@ -504,6 +504,7 @@ def update_stock_settings():
stock_settings.auto_insert_price_list_rate_if_missing = 1
stock_settings.update_price_list_based_on = "Rate"
stock_settings.set_qty_in_transactions_based_on_serial_no_input = 1
stock_settings.flags.ignore_permissions = True
stock_settings.save()

View File

@@ -175,6 +175,9 @@ class StockLedgerEntry(Document):
if frappe.flags.in_test and frappe.flags.ignore_serial_batch_bundle_validation:
return
if self.is_adjustment_entry:
return
if not self.get("via_landed_cost_voucher"):
SerialBatchBundle(
sle=self,

View File

@@ -478,6 +478,8 @@ class StockReconciliation(StockController):
frappe.db.set_value("Serial and Batch Entry", batch.name, update_values)
def remove_items_with_no_change(self):
from erpnext.stock.stock_ledger import get_stock_value_difference
"""Remove items if qty or rate is not changed"""
self.difference_amount = 0.0
@@ -513,6 +515,14 @@ class StockReconciliation(StockController):
company=self.company,
)
if not item_dict.get("qty") and not item.qty and not item.valuation_rate and not item.current_qty:
difference_amount = get_stock_value_difference(
item.item_code, item.warehouse, self.posting_date, self.posting_time, self.name
)
if abs(difference_amount) > 0:
return True
if (
(item.qty is None or item.qty == item_dict.get("qty"))
and (item.valuation_rate is None or item.valuation_rate == item_dict.get("rate"))

View File

@@ -619,11 +619,11 @@ class SubcontractingReceipt(SubcontractingController):
self.add_gl_entry(
gl_entries=gl_entries,
account=supplier_warehouse_account,
cost_center=rm_item.cost_center,
cost_center=rm_item.cost_center or item.cost_center,
debit=0.0,
credit=flt(rm_item.amount),
remarks=remarks,
against_account=rm_item.expense_account,
against_account=rm_item.expense_account or item.expense_account,
account_currency=get_account_currency(supplier_warehouse_account),
project=item.project,
item=item,
@@ -631,8 +631,8 @@ class SubcontractingReceipt(SubcontractingController):
# Expense Account (Debit)
self.add_gl_entry(
gl_entries=gl_entries,
account=rm_item.expense_account,
cost_center=rm_item.cost_center,
account=rm_item.expense_account or item.expense_account,
cost_center=rm_item.cost_center or item.cost_center,
debit=flt(rm_item.amount),
credit=0.0,
remarks=remarks,

View File

@@ -4,6 +4,7 @@
import frappe
from frappe import _
from frappe.core.doctype.installed_applications.installed_applications import get_setup_wizard_completed_apps
import erpnext
@@ -45,7 +46,7 @@ def get_level():
activation_level += 1
sales_data.append({doctype: count})
if frappe.db.get_single_value("System Settings", "setup_complete"):
if "erpnext" in get_setup_wizard_completed_apps():
activation_level += 1
communication_number = frappe.db.count("Communication", dict(communication_medium="Email"))