Compare commits

...

128 Commits

Author SHA1 Message Date
Frappe PR Bot
2ce8299bc8 chore(release): Bumped to Version 15.54.2
## [15.54.2](https://github.com/frappe/erpnext/compare/v15.54.1...v15.54.2) (2025-03-08)

### Bug Fixes

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

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/sales_invoice.py
2025-03-08 06:56:33 +00:00
ruthra kumar
fff3b1e84e refactor: handle stocked items
(cherry picked from commit ee93ed8c97)
2025-03-08 06:56:33 +00:00
ruthra kumar
5299a1032b refactor: handle stocked items
(cherry picked from commit 7ff3977394)
2025-03-08 06:56:33 +00:00
ruthra kumar
1e5fbc0a48 refactor: set tr currency dr & cr directly on parent document
(cherry picked from commit e9af567033)
2025-03-08 06:56:32 +00:00
ruthra kumar
5c47c35a0f refactor: use highest precision for storing exc rate
(cherry picked from commit b115bf2e2a)
2025-03-08 06:56:32 +00:00
Frappe PR Bot
7c8b34fd8f chore(release): Bumped to Version 15.54.1
## [15.54.1](https://github.com/frappe/erpnext/compare/v15.54.0...v15.54.1) (2025-03-06)

### Bug Fixes

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

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

# Conflicts:
#	erpnext/patches/v15_0/recalculate_amount_difference_field.py
(cherry picked from commit f247f02e49)
2025-03-06 10:42:00 +00:00
Mihir Kandoi
bb553c27ab fix: rename_sla_fields patch
(cherry picked from commit e8d4a487c6)
(cherry picked from commit 7bc7557018)
2025-03-06 08:20:30 +00:00
Frappe PR Bot
528107e224 chore(release): Bumped to Version 15.54.0
# [15.54.0](https://github.com/frappe/erpnext/compare/v15.53.4...v15.54.0) (2025-03-05)

### Bug Fixes

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

### Features

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

### Performance Improvements

* don't track seen for POS Invoice (backport [#46187](https://github.com/frappe/erpnext/issues/46187)) ([#46189](https://github.com/frappe/erpnext/issues/46189)) ([41ab7f3](41ab7f3f7c))
* patch ([ee41e55](ee41e55343))
* replace if function in query ([d0b8e0d](d0b8e0da8d))
2025-03-05 13:31:02 +00:00
ruthra kumar
86b917b04c Merge pull request #46263 from frappe/version-15-hotfix
chore: release v15
2025-03-05 18:59:38 +05:30
Frappe PR Bot
171f966421 chore(release): Bumped to Version 15.53.4
## [15.53.4](https://github.com/frappe/erpnext/compare/v15.53.3...v15.53.4) (2025-03-03)

### Bug Fixes

* removed mandatory property for the cost center field ([8eddc09](8eddc09bba))
2025-03-03 05:12:02 +00:00
rohitwaghchaure
3f76a413f8 Merge pull request #46205 from frappe/mergify/bp/version-15/pr-46186
fix: removed mandatory property for the cost center field (backport #46186)
2025-03-03 10:40:35 +05:30
Frappe PR Bot
bcd02df6fd chore(release): Bumped to Version 15.53.3
## [15.53.3](https://github.com/frappe/erpnext/compare/v15.53.2...v15.53.3) (2025-03-03)

### Bug Fixes

* stock qty not recalculate on changing of the qty ([9186f13](9186f13458))
2025-03-03 04:02:37 +00:00
rohitwaghchaure
7a71c24d5c Merge pull request #46232 from frappe/mergify/bp/version-15/pr-46224
fix: stock qty not recalculate on changing of the qty (backport #46219) (backport #46224)
2025-03-03 09:31:16 +05:30
Rohit Waghchaure
9186f13458 fix: stock qty not recalculate on changing of the qty
(cherry picked from commit 464e3339fe)
(cherry picked from commit 331798babc)
2025-03-03 03:57:22 +00:00
Rohit Waghchaure
8eddc09bba fix: removed mandatory property for the cost center field
(cherry picked from commit 079cf772aa)
2025-02-28 10:25:50 +00:00
Frappe PR Bot
d9c1b58fc3 chore(release): Bumped to Version 15.53.2
## [15.53.2](https://github.com/frappe/erpnext/compare/v15.53.1...v15.53.2) (2025-02-26)

### Bug Fixes

* check value as int ([97d3e86](97d3e8648b))
* enable fetch_timesheet_in_sales_invoice in test ([feb64cb](feb64cb9b5))
* incorrect stock value difference for adjustment entry ([96d44e3](96d44e362d))
* inventory dimension for maintence visit ([ec3b281](ec3b281a3b))
* no permission to get project settings in sales invoice ([b8281c3](b8281c34e2))
* pos opening entry dialog not saving on change data (backport [#46066](https://github.com/frappe/erpnext/issues/46066)) ([#46067](https://github.com/frappe/erpnext/issues/46067)) ([0ae2d61](0ae2d61974))
* **project settings:** add checkbox to auto fetch timesheet in sales invoice ([b3c1df8](b3c1df8561))
* **sales invoice:** check fetch_timesheet_in_sales_invoice enabled before fetching the timesheet ([b1095bb](b1095bb91b))
* valuation rate for batch ([c72dab4](c72dab49f4))
2025-02-26 12:58:53 +00:00
ruthra kumar
f93d1a2633 Merge pull request #46132 from frappe/version-15-hotfix
chore: release v15
2025-02-26 18:27:33 +05:30
Frappe PR Bot
9e824fc4fe chore(release): Bumped to Version 15.53.1
## [15.53.1](https://github.com/frappe/erpnext/compare/v15.53.0...v15.53.1) (2025-02-21)

### Bug Fixes

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

### Bug Fixes

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

### Features

* added ability to use custom html format for process statement of accounts (copy [#45746](https://github.com/frappe/erpnext/issues/45746)) ([#46012](https://github.com/frappe/erpnext/issues/46012)) ([1a4297a](1a4297ac35))
* added option to enforce free item qty in pricing rule ([8fb9228](8fb9228871))
* disable auto setting grand total to default mode of payment (backport [#45591](https://github.com/frappe/erpnext/issues/45591)) ([#45917](https://github.com/frappe/erpnext/issues/45917)) ([e271a5c](e271a5cba0))
2025-02-19 11:50:41 +00:00
ruthra kumar
2bb79c34c3 Merge pull request #45981 from frappe/version-15-hotfix
chore: release v15
2025-02-19 17:19:18 +05:30
Frappe PR Bot
ce90d427e8 chore(release): Bumped to Version 15.52.0
# [15.52.0](https://github.com/frappe/erpnext/compare/v15.51.2...v15.52.0) (2025-02-12)

### Bug Fixes

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

### Features

* add repost accounting ledger entry for payment entry ([757dd3f](757dd3f0b6))
2025-02-12 12:09:09 +00:00
ruthra kumar
0eb4556c83 Merge pull request #45860 from frappe/version-15-hotfix
chore: release v15
2025-02-12 17:37:43 +05:30
Frappe PR Bot
b0c9fbe9fc chore(release): Bumped to Version 15.51.2
## [15.51.2](https://github.com/frappe/erpnext/compare/v15.51.1...v15.51.2) (2025-02-10)

### Bug Fixes

* Attibute error `selling_price_list` ([e8fd2ee](e8fd2eeaa2))
* check_item_quality_inspection is not whitelisted ([d0dbfa1](d0dbfa1cbd))
2025-02-10 16:28:24 +00:00
rohitwaghchaure
0758192c53 Merge pull request #45836 from frappe/mergify/bp/version-15/pr-45835
fix: check_item_quality_inspection is not whitelisted (backport #45835)
2025-02-10 21:56:59 +05:30
rohitwaghchaure
d2cb659220 Merge pull request #45834 from frappe/mergify/bp/version-15/pr-45822
fix: AttributeError in `get_item_details` when selecting/scanning batch in Delivery Note (backport #45774) (backport #45822)
2025-02-10 21:56:40 +05:30
Rohit Waghchaure
d0dbfa1cbd fix: check_item_quality_inspection is not whitelisted
(cherry picked from commit 0a4a09352a)
2025-02-10 15:46:46 +00:00
DaizyModi
e8fd2eeaa2 fix: Attibute error selling_price_list
(cherry picked from commit 820b32eb8a)
(cherry picked from commit 6dc99f95c0)
2025-02-10 13:34:14 +00:00
Frappe PR Bot
8c57e9f8c8 chore(release): Bumped to Version 15.51.1
## [15.51.1](https://github.com/frappe/erpnext/compare/v15.51.0...v15.51.1) (2025-02-07)

### Bug Fixes

* update ctx to args ([13bebe7](13bebe71b0))
2025-02-07 14:22:13 +00:00
ruthra kumar
5f62fc5a99 Merge pull request #45795 from frappe/mergify/bp/version-15/pr-45770
Fix: Update `ctx` to `args` for compatibility. (backport #45770)
2025-02-07 19:50:45 +05:30
Sanket322
13bebe71b0 fix: update ctx to args
(cherry picked from commit d4bc3d182f)
2025-02-07 14:14:41 +00:00
Frappe PR Bot
b1161f446f chore(release): Bumped to Version 15.51.0
# [15.51.0](https://github.com/frappe/erpnext/compare/v15.50.1...v15.51.0) (2025-02-05)

### Bug Fixes

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

### Features

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

### Performance Improvements

* stock entry with batch (backport [#45486](https://github.com/frappe/erpnext/issues/45486)) ([#45602](https://github.com/frappe/erpnext/issues/45602)) ([8b75401](8b75401db9))
2025-02-05 12:08:00 +00:00
ruthra kumar
b8485e1d28 Merge pull request #45703 from frappe/version-15-hotfix
chore: release v15
2025-02-05 17:36:41 +05:30
Frappe PR Bot
fea51b7086 chore(release): Bumped to Version 15.50.1
## [15.50.1](https://github.com/frappe/erpnext/compare/v15.50.0...v15.50.1) (2025-02-04)

### Bug Fixes

* not able to make manufacturing entry for alternate items ([32bfc2f](32bfc2f555))
2025-02-04 10:23:41 +00:00
rohitwaghchaure
49192d90d0 Merge pull request #45707 from frappe/mergify/bp/version-15/pr-45647
fix: not able to make manufacturing entry for alternate items (backport #45646) (backport #45647)
2025-02-04 15:52:11 +05:30
Rohit Waghchaure
32bfc2f555 fix: not able to make manufacturing entry for alternate items
(cherry picked from commit 1607aa1a44)
(cherry picked from commit eef2f3c5d4)
2025-02-04 09:52:11 +00:00
Frappe PR Bot
c5cd0fcd29 chore(release): Bumped to Version 15.50.0
# [15.50.0](https://github.com/frappe/erpnext/compare/v15.49.3...v15.50.0) (2025-01-29)

### Bug Fixes

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

### Features

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

### Performance Improvements

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

### Reverts

* Revert "feat(Sales Invoice): allow linking to project without adding timesheets (backport [#44295](https://github.com/frappe/erpnext/issues/44295))" ([#45531](https://github.com/frappe/erpnext/issues/45531)) ([b004855](b004855e7c))
2025-01-29 11:28:47 +00:00
ruthra kumar
cae8cee398 Merge pull request #45566 from frappe/version-15-hotfix
chore: release v15
2025-01-29 16:57:29 +05:30
Frappe PR Bot
de09da31bc chore(release): Bumped to Version 15.49.3
## [15.49.3](https://github.com/frappe/erpnext/compare/v15.49.2...v15.49.3) (2025-01-24)

### Bug Fixes

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

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

(cherry picked from commit b2c3da135e)
2025-01-24 04:50:32 +00:00
ruthra kumar
d955986342 refactor: allow reconciliation date for exchange gain / loss
(cherry picked from commit 95af63e305)
2025-01-24 04:50:31 +00:00
ruthra kumar
c127cbac57 refactor: configurable posting date for Exc Gain / Loss journal
(cherry picked from commit 5257413a93)
2025-01-24 04:50:31 +00:00
ruthra kumar
c6bc5f5d7d refactor: configurable posting date for Exc Gain / Loss journal
(cherry picked from commit 3fbd2ca0d9)
2025-01-24 04:50:30 +00:00
Frappe PR Bot
4573408866 chore(release): Bumped to Version 15.49.2
## [15.49.2](https://github.com/frappe/erpnext/compare/v15.49.1...v15.49.2) (2025-01-23)

### Bug Fixes

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

(cherry picked from commit f07a71a882)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
(cherry picked from commit 767529f0ec)
2025-01-23 08:11:20 +00:00
Frappe PR Bot
89f7834517 chore(release): Bumped to Version 15.49.1
## [15.49.1](https://github.com/frappe/erpnext/compare/v15.49.0...v15.49.1) (2025-01-22)

### Bug Fixes

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

### Bug Fixes

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

### Features

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

### Performance Improvements

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

### Reverts

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

### Bug Fixes

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

### Bug Fixes

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

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

### Features

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

(cherry picked from commit e92af10f14)

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

### Bug Fixes

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

### Bug Fixes

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

fix: allow zero valuation rate (#44902)

(cherry picked from commit 614a8f106d)

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

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

### Bug Fixes

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

### Features

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

### Performance Improvements

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

### Bug Fixes

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

### Bug Fixes

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

### Bug Fixes

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

### Features

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

### Bug Fixes

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

View File

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

View File

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

View File

@@ -1059,14 +1059,15 @@ class JournalEntry(AccountsController):
gl_map = []
company_currency = erpnext.get_company_currency(self.company)
self.transaction_currency = company_currency
self.transaction_exchange_rate = 1
if self.multi_currency:
for row in self.get("accounts"):
if row.account_currency != company_currency:
self.currency = row.account_currency
self.conversion_rate = row.exchange_rate
# Journal assumes the first foreign currency as transaction currency
self.transaction_currency = row.account_currency
self.transaction_exchange_rate = row.exchange_rate
break
else:
self.currency = company_currency
for d in self.get("accounts"):
if d.debit or d.credit or (self.voucher_type == "Exchange Gain Or Loss"):
@@ -1091,6 +1092,18 @@ class JournalEntry(AccountsController):
"credit_in_account_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
),
"transaction_currency": self.transaction_currency,
"transaction_exchange_rate": self.transaction_exchange_rate,
"debit_in_transaction_currency": flt(
d.debit_in_account_currency, d.precision("debit_in_account_currency")
)
if self.transaction_currency == d.account_currency
else flt(d.debit, d.precision("debit")) / self.transaction_exchange_rate,
"credit_in_transaction_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
)
if self.transaction_currency == d.account_currency
else flt(d.credit, d.precision("credit")) / self.transaction_exchange_rate,
"against_voucher_type": d.reference_type,
"against_voucher": d.reference_name,
"remarks": remarks,

View File

@@ -575,7 +575,7 @@ class TestJournalEntry(unittest.TestCase):
order_by="account",
)
expected = [
{"account": "_Test Bank - _TC", "transaction_exchange_rate": 1.0},
{"account": "_Test Bank - _TC", "transaction_exchange_rate": 85.0},
{"account": "_Test Receivable USD - _TC", "transaction_exchange_rate": 85.0},
]
self.assertEqual(expected, actual)

View File

@@ -1217,15 +1217,22 @@ class PaymentEntry(AccountsController):
self.set("remarks", "\n".join(remarks))
def set_transaction_currency_and_rate(self):
company_currency = erpnext.get_company_currency(self.company)
self.transaction_currency = company_currency
self.transaction_exchange_rate = 1
if self.paid_from_account_currency != company_currency:
self.transaction_currency = self.paid_from_account_currency
self.transaction_exchange_rate = self.source_exchange_rate
elif self.paid_to_account_currency != company_currency:
self.transaction_currency = self.paid_to_account_currency
self.transaction_exchange_rate = self.target_exchange_rate
def build_gl_map(self):
if self.payment_type in ("Receive", "Pay") and not self.get("party_account_field"):
self.setup_party_account_field()
company_currency = erpnext.get_company_currency(self.company)
if self.paid_from_account_currency != company_currency:
self.currency = self.paid_from_account_currency
elif self.paid_to_account_currency != company_currency:
self.currency = self.paid_to_account_currency
self.set_transaction_currency_and_rate()
gl_entries = []
self.add_party_gl_entries(gl_entries)
@@ -1304,6 +1311,9 @@ class PaymentEntry(AccountsController):
"cost_center": cost_center,
dr_or_cr + "_in_account_currency": d.allocated_amount,
dr_or_cr: allocated_amount_in_company_currency,
dr_or_cr + "_in_transaction_currency": d.allocated_amount
if self.transaction_currency == self.party_account_currency
else allocated_amount_in_company_currency / self.transaction_exchange_rate,
},
item=self,
)
@@ -1348,6 +1358,9 @@ class PaymentEntry(AccountsController):
"account_currency": self.party_account_currency,
"cost_center": self.cost_center,
dr_or_cr + "_in_account_currency": self.unallocated_amount,
dr_or_cr + "_in_transaction_currency": self.unallocated_amount
if self.party_account_currency == self.transaction_currency
else base_unallocated_amount / self.transaction_exchange_rate,
dr_or_cr: base_unallocated_amount,
},
item=self,
@@ -1365,6 +1378,7 @@ class PaymentEntry(AccountsController):
def make_advance_gl_entries(
self, entry: object | dict = None, cancel: bool = 0, update_outstanding: str = "Yes"
):
self.set_transaction_currency_and_rate()
gl_entries = []
self.add_advance_gl_entries(gl_entries, entry)
@@ -1444,9 +1458,16 @@ class PaymentEntry(AccountsController):
frappe.db.set_value("Payment Entry Reference", invoice.name, "reconcile_effect_on", posting_date)
dr_or_cr, account = self.get_dr_and_account_for_advances(invoice)
base_allocated_amount = self.calculate_base_allocated_amount_for_reference(invoice)
args_dict["account"] = account
args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice)
args_dict[dr_or_cr] = base_allocated_amount
args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount
args_dict[dr_or_cr + "_in_transaction_currency"] = (
invoice.allocated_amount
if self.party_account_currency == self.transaction_currency
else base_allocated_amount / self.transaction_exchange_rate
)
args_dict.update(
{
"against_voucher_type": invoice.reference_doctype,
@@ -1464,8 +1485,13 @@ class PaymentEntry(AccountsController):
args_dict[dr_or_cr + "_in_account_currency"] = 0
dr_or_cr = "debit" if dr_or_cr == "credit" else "credit"
args_dict["account"] = self.party_account
args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice)
args_dict[dr_or_cr] = base_allocated_amount
args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount
args_dict[dr_or_cr + "_in_transaction_currency"] = (
invoice.allocated_amount
if self.party_account_currency == self.transaction_currency
else base_allocated_amount / self.transaction_exchange_rate
)
args_dict.update(
{
"against_voucher_type": "Payment Entry",
@@ -1487,6 +1513,9 @@ class PaymentEntry(AccountsController):
"account_currency": self.paid_from_account_currency,
"against": self.party if self.payment_type == "Pay" else self.paid_to,
"credit_in_account_currency": self.paid_amount,
"credit_in_transaction_currency": self.paid_amount
if self.paid_from_account_currency == self.transaction_currency
else self.base_paid_amount / self.transaction_exchange_rate,
"credit": self.base_paid_amount,
"cost_center": self.cost_center,
"post_net_value": True,
@@ -1502,6 +1531,9 @@ class PaymentEntry(AccountsController):
"account_currency": self.paid_to_account_currency,
"against": self.party if self.payment_type == "Receive" else self.paid_from,
"debit_in_account_currency": self.received_amount,
"debit_in_transaction_currency": self.received_amount
if self.paid_to_account_currency == self.transaction_currency
else self.base_received_amount / self.transaction_exchange_rate,
"debit": self.base_received_amount,
"cost_center": self.cost_center,
},
@@ -1537,6 +1569,8 @@ class PaymentEntry(AccountsController):
dr_or_cr + "_in_account_currency": base_tax_amount
if account_currency == self.company_currency
else d.tax_amount,
dr_or_cr + "_in_transaction_currency": base_tax_amount
/ self.transaction_exchange_rate,
"cost_center": d.cost_center,
"post_net_value": True,
},
@@ -1562,6 +1596,8 @@ class PaymentEntry(AccountsController):
rev_dr_or_cr + "_in_account_currency": base_tax_amount
if account_currency == self.company_currency
else d.tax_amount,
rev_dr_or_cr + "_in_transaction_currency": base_tax_amount
/ self.transaction_exchange_rate,
"cost_center": self.cost_center,
"post_net_value": True,
},
@@ -1584,6 +1620,7 @@ class PaymentEntry(AccountsController):
"account_currency": account_currency,
"against": self.party or self.paid_from,
"debit_in_account_currency": d.amount,
"debit_in_transaction_currency": d.amount / self.transaction_exchange_rate,
"debit": d.amount,
"cost_center": d.cost_center,
},

View File

@@ -173,4 +173,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -871,6 +871,7 @@ class PurchaseInvoice(BuyingController):
self.make_payment_gl_entries(gl_entries)
self.make_write_off_gl_entry(gl_entries)
self.make_gle_for_rounding_adjustment(gl_entries)
self.set_transaction_currency_and_rate_in_gl_map(gl_entries)
return gl_entries
def check_asset_cwip_enabled(self):
@@ -916,6 +917,7 @@ class PurchaseInvoice(BuyingController):
"credit_in_account_currency": base_grand_total
if self.party_account_currency == self.company_currency
else grand_total,
"credit_in_transaction_currency": grand_total,
"against_voucher": against_voucher,
"against_voucher_type": self.doctype,
"project": self.project,
@@ -951,7 +953,7 @@ class PurchaseInvoice(BuyingController):
valuation_tax_accounts = [
d.account_head
for d in self.get("taxes")
if d.category in ("Valuation", "Total and Valuation")
if d.category in ("Valuation", "Valuation and Total")
and flt(d.base_tax_amount_after_discount_amount)
]
@@ -991,6 +993,7 @@ class PurchaseInvoice(BuyingController):
"project": item.project or self.project,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"debit": warehouse_debit_amount,
"debit_in_transaction_currency": item.net_amount,
},
warehouse_account[item.warehouse]["account_currency"],
item=item,
@@ -1011,6 +1014,7 @@ class PurchaseInvoice(BuyingController):
"project": item.project or self.project,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"debit": -1 * flt(credit_amount, item.precision("base_net_amount")),
"debit_in_transaction_currency": item.net_amount,
},
warehouse_account[item.from_warehouse]["account_currency"],
item=item,
@@ -1025,6 +1029,7 @@ class PurchaseInvoice(BuyingController):
"account": item.expense_account,
"against": self.supplier,
"debit": flt(item.base_net_amount, item.precision("base_net_amount")),
"debit_in_transaction_currency": item.net_amount,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"cost_center": item.cost_center,
"project": item.project,
@@ -1042,6 +1047,10 @@ class PurchaseInvoice(BuyingController):
"account": item.expense_account,
"against": self.supplier,
"debit": warehouse_debit_amount,
"debit_in_transaction_currency": flt(
warehouse_debit_amount / self.conversion_rate,
item.precision("net_amount"),
),
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"cost_center": item.cost_center,
"project": item.project or self.project,
@@ -1054,7 +1063,9 @@ class PurchaseInvoice(BuyingController):
# Amount added through landed-cost-voucher
if landed_cost_entries:
if (item.item_code, item.name) in landed_cost_entries:
for account, amount in landed_cost_entries[(item.item_code, item.name)].items():
for account, base_amount in landed_cost_entries[
(item.item_code, item.name)
].items():
gl_entries.append(
self.get_gl_dict(
{
@@ -1062,8 +1073,9 @@ class PurchaseInvoice(BuyingController):
"against": item.expense_account,
"cost_center": item.cost_center,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"credit": flt(amount["base_amount"]),
"credit_in_account_currency": flt(amount["amount"]),
"credit": flt(base_amount["base_amount"]),
"credit_in_account_currency": flt(base_amount["amount"]),
"credit_in_transaction_currency": item.net_amount,
"project": item.project or self.project,
},
item=item,
@@ -1086,6 +1098,7 @@ class PurchaseInvoice(BuyingController):
"project": item.project or self.project,
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
"credit": flt(item.rm_supp_cost),
"credit_in_transaction_currency": item.net_amount,
},
warehouse_account[self.supplier_warehouse]["account_currency"],
item=item,
@@ -1099,7 +1112,7 @@ class PurchaseInvoice(BuyingController):
else item.deferred_expense_account
)
dummy, amount = self.get_amount_and_base_amount(item, None)
amount, base_amount = self.get_amount_and_base_amount(item, None)
if provisional_accounting_for_non_stock_items:
self.make_provisional_gl_entry(gl_entries, item)
@@ -1110,7 +1123,8 @@ class PurchaseInvoice(BuyingController):
{
"account": expense_account,
"against": self.supplier,
"debit": amount,
"debit": base_amount,
"debit_in_transaction_currency": amount,
"cost_center": item.cost_center,
"project": item.project or self.project,
},
@@ -1184,6 +1198,10 @@ class PurchaseInvoice(BuyingController):
"account": stock_rbnb,
"against": self.supplier,
"debit": flt(item.item_tax_amount, item.precision("item_tax_amount")),
"debit_in_transaction_currency": flt(
item.item_tax_amount / self.conversion_rate,
item.precision("item_tax_amount"),
),
"remarks": self.remarks or _("Accounting Entry for Stock"),
"cost_center": self.cost_center,
"project": item.project or self.project,
@@ -1299,6 +1317,7 @@ class PurchaseInvoice(BuyingController):
"account": cost_of_goods_sold_account,
"against": item.expense_account,
"debit": stock_adjustment_amt,
"debit_in_transaction_currency": item.net_amount,
"remarks": self.get("remarks") or _("Stock Adjustment"),
"cost_center": item.cost_center,
"project": item.project or self.project,
@@ -1332,6 +1351,7 @@ class PurchaseInvoice(BuyingController):
dr_or_cr + "_in_account_currency": base_amount
if account_currency == self.company_currency
else amount,
dr_or_cr + "_in_transaction_currency": amount,
"cost_center": tax.cost_center,
},
account_currency,
@@ -1378,6 +1398,10 @@ class PurchaseInvoice(BuyingController):
"cost_center": tax.cost_center,
"against": self.supplier,
"credit": applicable_amount,
"credit_in_transaction_currency": flt(
applicable_amount / self.conversion_rate,
frappe.get_precision("Purchase Invoice Item", "item_tax_amount"),
),
"remarks": self.remarks or _("Accounting Entry for Stock"),
},
item=tax,
@@ -1396,6 +1420,10 @@ class PurchaseInvoice(BuyingController):
"cost_center": tax.cost_center,
"against": self.supplier,
"credit": valuation_tax[tax.name],
"credit_in_transaction_currency": flt(
valuation_tax[tax.name] / self.conversion_rate,
frappe.get_precision("Purchase Invoice Item", "item_tax_amount"),
),
"remarks": self.remarks or _("Accounting Entry for Stock"),
},
item=tax,
@@ -1411,6 +1439,7 @@ class PurchaseInvoice(BuyingController):
"account": self.unrealized_profit_loss_account,
"against": self.supplier,
"credit": flt(self.total_taxes_and_charges),
"credit_in_transaction_currency": flt(self.total_taxes_and_charges),
"credit_in_account_currency": flt(self.base_total_taxes_and_charges),
"cost_center": self.cost_center,
},
@@ -1460,6 +1489,7 @@ class PurchaseInvoice(BuyingController):
"debit_in_account_currency": self.base_paid_amount
if self.party_account_currency == self.company_currency
else self.paid_amount,
"debit_in_transaction_currency": self.paid_amount,
"against_voucher": self.return_against
if cint(self.is_return) and self.return_against
else self.name,
@@ -1481,6 +1511,7 @@ class PurchaseInvoice(BuyingController):
"credit_in_account_currency": self.base_paid_amount
if bank_account_currency == self.company_currency
else self.paid_amount,
"credit_in_transaction_currency": self.paid_amount,
"cost_center": self.cost_center,
},
bank_account_currency,
@@ -1505,6 +1536,7 @@ class PurchaseInvoice(BuyingController):
"debit_in_account_currency": self.base_write_off_amount
if self.party_account_currency == self.company_currency
else self.write_off_amount,
"debit_in_transaction_currency": self.write_off_amount,
"against_voucher": self.return_against
if cint(self.is_return) and self.return_against
else self.name,
@@ -1525,6 +1557,7 @@ class PurchaseInvoice(BuyingController):
"credit_in_account_currency": self.base_write_off_amount
if write_off_account_currency == self.company_currency
else self.write_off_amount,
"credit_in_transaction_currency": self.write_off_amount,
"cost_center": self.cost_center or self.write_off_cost_center,
},
item=self,

View File

@@ -2639,6 +2639,36 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
"Buying Settings", "bill_for_rejected_quantity_in_purchase_invoice", original_value
)
def test_trx_currency_debit_credit_for_high_precision(self):
exc_rate = 0.737517516
pi = make_purchase_invoice(
currency="USD", conversion_rate=exc_rate, qty=1, rate=2000, do_not_save=True
)
pi.supplier = "_Test Supplier USD"
pi.save().submit()
expected = (
("_Test Account Cost for Goods Sold - _TC", 1475.04, 0.0, 2000.0, 0.0, "USD", exc_rate),
("_Test Payable USD - _TC", 0.0, 1475.04, 0.0, 2000.0, "USD", exc_rate),
)
actual = frappe.db.get_all(
"GL Entry",
filters={"voucher_no": pi.name},
fields=[
"account",
"debit",
"credit",
"debit_in_transaction_currency",
"credit_in_transaction_currency",
"transaction_currency",
"transaction_exchange_rate",
],
order_by="account",
as_list=1,
)
self.assertEqual(actual, expected)
def set_advance_flag(company, flag, default_account):
frappe.db.set_value(

View File

@@ -1241,6 +1241,7 @@ class SalesInvoice(SellingController):
self.make_write_off_gl_entry(gl_entries)
self.make_gle_for_rounding_adjustment(gl_entries)
self.set_transaction_currency_and_rate_in_gl_map(gl_entries)
return gl_entries
def make_customer_gl_entry(self, gl_entries):
@@ -1274,6 +1275,7 @@ class SalesInvoice(SellingController):
"debit_in_account_currency": base_grand_total
if self.party_account_currency == self.company_currency
else grand_total,
"debit_in_transaction_currency": grand_total,
"against_voucher": against_voucher,
"against_voucher_type": self.doctype,
"cost_center": self.cost_center,
@@ -1305,6 +1307,9 @@ class SalesInvoice(SellingController):
if account_currency == self.company_currency
else flt(amount, tax.precision("tax_amount_after_discount_amount"))
),
"credit_in_transaction_currency": flt(
amount, tax.precision("tax_amount_after_discount_amount")
),
"cost_center": tax.cost_center,
},
account_currency,
@@ -1322,6 +1327,7 @@ class SalesInvoice(SellingController):
"against": self.customer,
"debit": flt(self.total_taxes_and_charges),
"debit_in_account_currency": flt(self.base_total_taxes_and_charges),
"debit_in_transaction_currency": flt(self.total_taxes_and_charges),
"cost_center": self.cost_center,
},
account_currency,
@@ -1420,6 +1426,7 @@ class SalesInvoice(SellingController):
if account_currency == self.company_currency
else flt(amount, item.precision("net_amount"))
),
"credit_in_transaction_currency": flt(amount, item.precision("net_amount")),
"cost_center": item.cost_center,
"project": item.project or self.project,
},
@@ -1471,6 +1478,7 @@ class SalesInvoice(SellingController):
+ cstr(self.loyalty_redemption_account)
+ " for the Loyalty Program",
"credit": self.loyalty_amount,
"credit_in_transaction_currency": self.loyalty_amount,
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
"cost_center": self.cost_center,
@@ -1485,6 +1493,7 @@ class SalesInvoice(SellingController):
"cost_center": self.cost_center or self.loyalty_redemption_cost_center,
"against": self.customer,
"debit": self.loyalty_amount,
"debit_in_transaction_currency": self.loyalty_amount,
"remark": "Loyalty Points redeemed by the customer",
},
item=self,
@@ -1518,6 +1527,7 @@ class SalesInvoice(SellingController):
"credit_in_account_currency": payment_mode.base_amount
if self.party_account_currency == self.company_currency
else payment_mode.amount,
"credit_in_transaction_currency": payment_mode.amount,
"against_voucher": against_voucher,
"against_voucher_type": self.doctype,
"cost_center": self.cost_center,
@@ -1537,6 +1547,7 @@ class SalesInvoice(SellingController):
"debit_in_account_currency": payment_mode.base_amount
if payment_mode_account_currency == self.company_currency
else payment_mode.amount,
"debit_in_transaction_currency": payment_mode.amount,
"cost_center": self.cost_center,
},
payment_mode_account_currency,
@@ -1561,6 +1572,7 @@ class SalesInvoice(SellingController):
"debit_in_account_currency": flt(self.base_change_amount)
if self.party_account_currency == self.company_currency
else flt(self.change_amount),
"debit_in_transaction_currency": flt(self.change_amount),
"against_voucher": self.return_against
if cint(self.is_return) and self.return_against
else self.name,
@@ -1579,6 +1591,7 @@ class SalesInvoice(SellingController):
"account": self.account_for_change_amount,
"against": self.customer,
"credit": self.base_change_amount,
"credit_in_transaction_currency": self.change_amount,
"cost_center": self.cost_center,
},
item=self,
@@ -1610,6 +1623,9 @@ class SalesInvoice(SellingController):
if self.party_account_currency == self.company_currency
else flt(self.write_off_amount, self.precision("write_off_amount"))
),
"credit_in_transaction_currency": flt(
self.write_off_amount, self.precision("write_off_amount")
),
"against_voucher": self.return_against if cint(self.is_return) else self.name,
"against_voucher_type": self.doctype,
"cost_center": self.cost_center,
@@ -1630,6 +1646,9 @@ class SalesInvoice(SellingController):
if write_off_account_currency == self.company_currency
else flt(self.write_off_amount, self.precision("write_off_amount"))
),
"debit_in_transaction_currency": flt(
self.write_off_amount, self.precision("write_off_amount")
),
"cost_center": self.cost_center or self.write_off_cost_center or default_cost_center,
},
write_off_account_currency,
@@ -1674,6 +1693,9 @@ class SalesInvoice(SellingController):
"credit_in_account_currency": flt(
self.rounding_adjustment, self.precision("rounding_adjustment")
),
"credit_in_transaction_currency": flt(
self.rounding_adjustment, self.precision("rounding_adjustment")
),
"credit": flt(
self.base_rounding_adjustment, self.precision("base_rounding_adjustment")
),

View File

@@ -519,7 +519,7 @@ class TestTaxWithholdingCategory(FrappeTestCase):
payment = get_payment_entry(order.doctype, order.name)
payment.apply_tax_withholding_amount = 1
payment.tax_withholding_category = "Cumulative Threshold TDS"
payment.submit()
payment.save().submit()
self.assertEqual(payment.taxes[0].tax_amount, 4000)
def test_multi_category_single_supplier(self):

View File

@@ -430,7 +430,7 @@ def process_debit_credit_difference(gl_map):
voucher_no = gl_map[0].voucher_no
allowance = get_debit_credit_allowance(voucher_type, precision)
debit_credit_diff = get_debit_credit_difference(gl_map, precision)
debit_credit_diff, trx_cur_debit_credit_diff = get_debit_credit_difference(gl_map, precision)
if abs(debit_credit_diff) > allowance:
if not (
@@ -441,9 +441,9 @@ def process_debit_credit_difference(gl_map):
raise_debit_credit_not_equal_error(debit_credit_diff, voucher_type, voucher_no)
elif abs(debit_credit_diff) >= (1.0 / (10**precision)):
make_round_off_gle(gl_map, debit_credit_diff, precision)
make_round_off_gle(gl_map, debit_credit_diff, trx_cur_debit_credit_diff, precision)
debit_credit_diff = get_debit_credit_difference(gl_map, precision)
debit_credit_diff, trx_cur_debit_credit_diff = get_debit_credit_difference(gl_map, precision)
if abs(debit_credit_diff) > allowance:
if not (
voucher_type == "Journal Entry"
@@ -455,14 +455,23 @@ def process_debit_credit_difference(gl_map):
def get_debit_credit_difference(gl_map, precision):
debit_credit_diff = 0.0
trx_cur_debit_credit_diff = 0
for entry in gl_map:
entry.debit = flt(entry.debit, precision)
entry.credit = flt(entry.credit, precision)
debit_credit_diff += entry.debit - entry.credit
debit_credit_diff = flt(debit_credit_diff, precision)
entry.debit_in_transaction_currency = flt(entry.debit_in_transaction_currency, precision)
entry.credit_in_transaction_currency = flt(entry.credit_in_transaction_currency, precision)
trx_cur_debit_credit_diff += (
entry.debit_in_transaction_currency - entry.credit_in_transaction_currency
)
return debit_credit_diff
debit_credit_diff = flt(debit_credit_diff, precision)
trx_cur_debit_credit_diff = flt(trx_cur_debit_credit_diff, precision)
return debit_credit_diff, trx_cur_debit_credit_diff
def get_debit_credit_allowance(voucher_type, precision):
@@ -489,7 +498,7 @@ def has_opening_entries(gl_map: list) -> bool:
return False
def make_round_off_gle(gl_map, debit_credit_diff, precision):
def make_round_off_gle(gl_map, debit_credit_diff, trx_cur_debit_credit_diff, precision):
round_off_account, round_off_cost_center, round_off_for_opening = get_round_off_account_and_cost_center(
gl_map[0].company, gl_map[0].voucher_type, gl_map[0].voucher_no
)
@@ -534,6 +543,12 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision):
"credit_in_account_currency": debit_credit_diff if debit_credit_diff > 0 else 0,
"debit": abs(debit_credit_diff) if debit_credit_diff < 0 else 0,
"credit": debit_credit_diff if debit_credit_diff > 0 else 0,
"debit_in_transaction_currency": abs(trx_cur_debit_credit_diff)
if trx_cur_debit_credit_diff < 0
else 0,
"credit_in_transaction_currency": trx_cur_debit_credit_diff
if trx_cur_debit_credit_diff > 0
else 0,
"cost_center": round_off_cost_center,
"party_type": None,
"party": None,

View File

@@ -1119,20 +1119,19 @@ class AccountsController(TransactionBase):
)
# Update details in transaction currency
gl_dict.update(
{
"transaction_currency": self.get("currency") or self.company_currency,
"transaction_exchange_rate": item.get("exchange_rate", 1)
if self.doctype == "Journal Entry" and item
else self.get("conversion_rate", 1),
"debit_in_transaction_currency": self.get_value_in_transaction_currency(
account_currency, gl_dict, "debit"
),
"credit_in_transaction_currency": self.get_value_in_transaction_currency(
account_currency, gl_dict, "credit"
),
}
)
if self.doctype not in ["Purchase Invoice", "Sales Invoice", "Journal Entry", "Payment Entry"]:
gl_dict.update(
{
"transaction_currency": self.get("currency") or self.company_currency,
"transaction_exchange_rate": self.get("conversion_rate", 1),
"debit_in_transaction_currency": self.get_value_in_transaction_currency(
account_currency, gl_dict, "debit"
),
"credit_in_transaction_currency": self.get_value_in_transaction_currency(
account_currency, gl_dict, "credit"
),
}
)
if not args.get("against_voucher_type") and self.get("against_voucher_type"):
gl_dict.update({"against_voucher_type": self.get("against_voucher_type")})
@@ -2758,6 +2757,11 @@ class AccountsController(TransactionBase):
elif self.doctype == "Payment Entry":
self.make_advance_payment_ledger_for_payment()
def set_transaction_currency_and_rate_in_gl_map(self, gl_entries):
for x in gl_entries:
x["transaction_currency"] = self.currency
x["transaction_exchange_rate"] = self.get("conversion_rate") or 1
@frappe.whitelist()
def get_tax_rate(account_head):

View File

@@ -1,69 +1,109 @@
import frappe
from frappe.query_builder.functions import Sum
from frappe.utils import flt
from frappe.utils import flt, getdate
from erpnext.accounts.utils import get_fiscal_year
from erpnext.stock.doctype.purchase_receipt.purchase_receipt import adjust_incoming_rate_for_pr
def execute():
table = frappe.qb.DocType("Purchase Receipt Item")
parent = frappe.qb.DocType("Purchase Receipt")
query = (
frappe.qb.from_(table)
.join(parent)
.on(table.parent == parent.name)
.select(
table.parent,
table.name,
table.amount,
table.billed_amt,
table.amount_difference_with_purchase_invoice,
table.rate,
table.qty,
parent.conversion_rate,
)
.where((table.amount_difference_with_purchase_invoice != 0) & (table.docstatus == 1))
)
try:
if fiscal_year_dates := get_fiscal_year(frappe.utils.datetime.date.today()):
query.where(parent.posting_date.between(fiscal_year_dates[1], fiscal_year_dates[2]))
except Exception:
if not frappe.db.get_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate"):
return
if result := query.run(as_dict=True):
item_wise_billed_qty = get_billed_qty_against_purchase_receipt([item.name for item in result])
purchase_receipts = set()
precision = frappe.get_precision("Purchase Receipt Item", "amount")
for item in result:
adjusted_amt = 0.0
if (
item.billed_amt is not None
and item.amount is not None
and item_wise_billed_qty.get(item.name)
):
adjusted_amt = (
flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate)
) * item.qty
adjusted_amt = flt(
adjusted_amt * flt(item.conversion_rate),
precision,
for company in frappe.get_all("Company", pluck="name"):
table = frappe.qb.DocType("Purchase Receipt Item")
parent = frappe.qb.DocType("Purchase Receipt")
query = (
frappe.qb.from_(table)
.join(parent)
.on(table.parent == parent.name)
.select(
table.parent,
table.name,
table.amount,
table.billed_amt,
table.amount_difference_with_purchase_invoice,
table.rate,
table.qty,
parent.conversion_rate,
)
.where(
(table.amount_difference_with_purchase_invoice != 0)
& (table.docstatus == 1)
& (parent.company == company)
)
)
if adjusted_amt != item.amount_difference_with_purchase_invoice:
frappe.db.set_value(
"Purchase Receipt Item",
item.name,
"amount_difference_with_purchase_invoice",
adjusted_amt,
update_modified=False,
posting_date = "2024-04-01"
# Get the last accounting period end date
accounting_period = frappe.get_all(
"Accounting Period", {"company": company}, ["end_date"], order_by="end_date desc", limit=1
)
if (
accounting_period
and accounting_period[0].end_date
and getdate(accounting_period[0].end_date) > getdate(posting_date)
):
posting_date = accounting_period[0].end_date
# Get the last period closing voucher end date
period_closing_voucher = frappe.get_all(
"Period Closing Voucher",
{"company": company, "docstatus": 1},
["period_end_date"],
order_by="period_end_date desc",
limit=1,
)
if (
period_closing_voucher
and period_closing_voucher[0].period_end_date
and getdate(period_closing_voucher[0].period_end_date) > getdate(posting_date)
):
posting_date = period_closing_voucher[0].period_end_date
try:
fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today())
except Exception:
return
else:
if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date):
posting_date = fiscal_year[1]
query = query.where(parent.posting_date > posting_date)
if result := query.run(as_dict=True):
item_wise_billed_qty = get_billed_qty_against_purchase_receipt([item.name for item in result])
purchase_receipts = set()
precision = frappe.get_precision("Purchase Receipt Item", "amount")
for item in result:
adjusted_amt = 0.0
if (
item.billed_amt is not None
and item.amount is not None
and item_wise_billed_qty.get(item.name)
):
adjusted_amt = (
flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate)
) * item.qty
adjusted_amt = flt(
adjusted_amt * flt(item.conversion_rate),
precision,
)
purchase_receipts.add(item.parent)
for pr in purchase_receipts:
adjust_incoming_rate_for_pr(frappe.get_doc("Purchase Receipt", pr))
if adjusted_amt != item.amount_difference_with_purchase_invoice:
frappe.db.set_value(
"Purchase Receipt Item",
item.name,
"amount_difference_with_purchase_invoice",
adjusted_amt,
update_modified=False,
)
purchase_receipts.add(item.parent)
for pr in purchase_receipts:
adjust_incoming_rate_for_pr(frappe.get_doc("Purchase Receipt", pr))
def get_billed_qty_against_purchase_receipt(pr_names):

View File

@@ -6,8 +6,14 @@ from frappe.model.utils.rename_field import rename_field
def execute():
doctypes = frappe.get_all("Service Level Agreement", pluck="document_type")
for doctype in doctypes:
rename_fieldname(doctype + "-resolution_by", "sla_resolution_by")
rename_fieldname(doctype + "-resolution_date", "sla_resolution_date")
if doctype == "Issue":
continue
if frappe.db.exists("Custom Field", {"fieldname": doctype + "-resolution_by"}):
rename_fieldname(doctype + "-resolution_by", "sla_resolution_by")
if frappe.db.exists("Custom Field", {"fieldname": doctype + "-resolution_date"}):
rename_fieldname(doctype + "-resolution_date", "sla_resolution_date")
rename_field("Issue", "resolution_by", "sla_resolution_by")
rename_field("Issue", "resolution_date", "sla_resolution_date")