From 753223da7851fffc43bb0697d9ff9b1755c6d1c0 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 2 Mar 2024 15:59:48 +0530 Subject: [PATCH] chore: resolve merge conflict --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 5 ----- erpnext/controllers/tests/test_accounts_controller.py | 3 --- 2 files changed, 8 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 3f427332276..7ea21c9f134 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -485,13 +485,8 @@ class JournalEntry(AccountsController): def validate_against_jv(self): for d in self.get("accounts"): if d.reference_type == "Journal Entry": -<<<<<<< HEAD - account_root_type = frappe.db.get_value("Account", d.account, "root_type") - if account_root_type == "Asset" and flt(d.debit) > 0: -======= account_root_type = frappe.get_cached_value("Account", d.account, "root_type") if account_root_type == "Asset" and flt(d.debit) > 0 and not self.system_generated_gain_loss(): ->>>>>>> 5b67631d40 (fix: allow gain/loss for Journals against Journals) frappe.throw( _( "Row #{0}: For {1}, you can select reference document only if account gets credited" diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index daea1d8b399..e39d03dccb9 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -1506,9 +1506,7 @@ class TestAccountsController(FrappeTestCase): pluck="department", ), ) -<<<<<<< HEAD self.disable_dimensions() -======= def test_50_journal_against_journal(self): # Invoice in Foreign Currency @@ -1576,4 +1574,3 @@ class TestAccountsController(FrappeTestCase): exc_je_for_je = self.get_journals_for(journal_as_payment.doctype, journal_as_payment.name) self.assertEqual(exc_je_for_si, []) self.assertEqual(exc_je_for_je, []) ->>>>>>> 8a5078b826 (test: gain/loss on Journals against Journals)