From 9598b1fc0fdf4c8be6145d0a1d4a9130635b595e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 14 Nov 2024 12:35:41 +0530 Subject: [PATCH] chore: resolve conflicts --- .../doctype/purchase_invoice/test_purchase_invoice.py | 4 +--- erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py | 4 +--- erpnext/accounts/general_ledger.py | 5 ----- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index f234157d949..f0b51c32c05 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2347,7 +2347,6 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1) -<<<<<<< HEAD def test_last_purchase_rate(self): item = create_item("_Test Item For Last Purchase Rate from PI", is_stock_item=1) pi1 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=100) @@ -2365,7 +2364,7 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): pi1.cancel() item.reload() self.assertEqual(item.last_purchase_rate, 0) -======= + def test_opening_invoice_rounding_adjustment_validation(self): pi = make_purchase_invoice(do_not_save=1) pi.items[0].rate = 99.98 @@ -2424,7 +2423,6 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): ] self.assertEqual(len(actual), 3) self.assertEqual(expected, actual) ->>>>>>> b7edc6dea9 (test: opening purchase invoice with rounding adjustment) def set_advance_flag(company, flag, default_account): diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index adbab43001b..90bec018257 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -3924,7 +3924,6 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(len(res), 1) self.assertEqual(res[0][0], pos_return.return_against) -<<<<<<< HEAD @change_settings("Accounts Settings", {"enable_common_party_accounting": True}) def test_common_party_with_foreign_currency_jv(self): from erpnext.accounts.doctype.account.test_account import create_account @@ -4033,7 +4032,7 @@ class TestSalesInvoice(FrappeTestCase): ) self.assertTrue(all([x == "Credit Note" for x in gl_entries])) -======= + def test_validation_on_opening_invoice_with_rounding(self): si = create_sales_invoice(qty=1, rate=99.98, do_not_submit=True) si.is_opening = "Yes" @@ -4084,7 +4083,6 @@ class TestSalesInvoice(FrappeTestCase): fields=["account", "debit", "credit", "is_opening"], ) self.assertEqual(len(res), 3) ->>>>>>> 5021c7ca2c (test: rounding adjustment validation and posting) def _create_opening_invoice_with_inclusive_tax(self): si = create_sales_invoice(qty=1, rate=90, do_not_submit=True) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index c2fbdcc95f1..7d7c6f49e12 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -7,12 +7,7 @@ import copy import frappe from frappe import _ from frappe.model.meta import get_field_precision -<<<<<<< HEAD -from frappe.utils import cint, flt, formatdate, getdate, now -======= from frappe.utils import cint, flt, formatdate, get_link_to_form, getdate, now -from frappe.utils.dashboard import cache_source ->>>>>>> 88e68168e3 (refactor: use separate round off for opening entries) import erpnext from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (