chore: Resolve conflicts

This commit is contained in:
Deepesh Garg
2022-02-01 15:02:23 +05:30
parent a54c84728f
commit aa16a4bb5f
5 changed files with 1 additions and 83 deletions

View File

@@ -543,17 +543,12 @@ class PurchaseInvoice(BuyingController):
if d.category in ('Valuation', 'Total and Valuation')
and flt(d.base_tax_amount_after_discount_amount)]
<<<<<<< HEAD
=======
exchange_rate_map, net_rate_map = get_purchase_document_details(self)
enable_discount_accounting = cint(frappe.db.get_single_value('Accounts Settings', 'enable_discount_accounting'))
provisional_accounting_for_non_stock_items = cint(frappe.db.get_value('Company', self.company, \
'enable_provisional_accounting_for_non_stock_items'))
purchase_receipt_doc_map = {}
>>>>>>> 528c71382f (feat: Provisional accounting for expenses (#29451))
for item in self.get("items"):
if flt(item.base_net_amount):
account_currency = get_account_currency(item.expense_account)

View File

@@ -345,22 +345,5 @@ erpnext.patches.v13_0.agriculture_deprecation_warning
erpnext.patches.v13_0.update_maintenance_schedule_field_in_visit
erpnext.patches.v13_0.hospitality_deprecation_warning
erpnext.patches.v13_0.delete_bank_reconciliation_detail
<<<<<<< HEAD
erpnext.patches.v13_0.update_sane_transfer_against
=======
erpnext.patches.v13_0.enable_provisional_accounting
[post_model_sync]
erpnext.patches.v14_0.rename_ongoing_status_in_sla_documents
erpnext.patches.v14_0.add_default_exit_questionnaire_notification_template
erpnext.patches.v14_0.delete_shopify_doctypes
erpnext.patches.v14_0.delete_hub_doctypes
erpnext.patches.v14_0.delete_hospitality_doctypes # 20-01-2022
erpnext.patches.v14_0.delete_agriculture_doctypes
erpnext.patches.v14_0.rearrange_company_fields
erpnext.patches.v14_0.update_leave_notification_template
erpnext.patches.v14_0.restore_einvoice_fields
erpnext.patches.v13_0.update_sane_transfer_against
erpnext.patches.v12_0.add_company_link_to_einvoice_settings
erpnext.patches.v14_0.migrate_cost_center_allocations
>>>>>>> 528c71382f (feat: Provisional accounting for expenses (#29451))
erpnext.patches.v13_0.enable_provisional_accounting

View File

@@ -721,8 +721,6 @@
"fieldtype": "Link",
"label": "Repair and Maintenance Account",
"options": "Account"
<<<<<<< HEAD
=======
},
{
"fieldname": "section_break_28",
@@ -742,7 +740,6 @@
"label": "Default Provisional Account",
"no_copy": 1,
"options": "Account"
>>>>>>> 528c71382f (feat: Provisional accounting for expenses (#29451))
}
],
"icon": "fa fa-building",
@@ -750,11 +747,7 @@
"image_field": "company_logo",
"is_tree": 1,
"links": [],
<<<<<<< HEAD
"modified": "2021-12-02 14:52:08.187233",
=======
"modified": "2022-01-25 10:33:16.826067",
>>>>>>> 528c71382f (feat: Provisional accounting for expenses (#29451))
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",

View File

@@ -266,21 +266,10 @@ class PurchaseReceipt(BuyingController):
return process_gl_map(gl_entries)
def make_item_gl_entries(self, gl_entries, warehouse_account=None):
<<<<<<< HEAD
stock_rbnb = self.get_company_default("stock_received_but_not_billed")
landed_cost_entries = get_item_account_wise_additional_cost(self.name)
expenses_included_in_valuation = self.get_company_default("expenses_included_in_valuation")
auto_accounting_for_non_stock_items = cint(frappe.db.get_value('Company', self.company, 'enable_perpetual_inventory_for_non_stock_items'))
=======
from erpnext.accounts.doctype.purchase_invoice.purchase_invoice import (
get_purchase_document_details,
)
if erpnext.is_perpetual_inventory_enabled(self.company):
stock_rbnb = self.get_company_default("stock_received_but_not_billed")
landed_cost_entries = get_item_account_wise_additional_cost(self.name)
expenses_included_in_valuation = self.get_company_default("expenses_included_in_valuation")
>>>>>>> 528c71382f (feat: Provisional accounting for expenses (#29451))
warehouse_with_no_account = []
stock_items = self.get_stock_items()

View File

@@ -1331,7 +1331,6 @@ class TestPurchaseReceipt(ERPNextTestCase):
self.assertEqual(pr.status, "To Bill")
self.assertAlmostEqual(pr.per_billed, 50.0, places=2)
<<<<<<< HEAD
def test_service_item_purchase_with_perpetual_inventory(self):
company = '_Test Company with perpetual inventory'
service_item = '_Test Non Stock Item'
@@ -1356,31 +1355,10 @@ class TestPurchaseReceipt(ERPNextTestCase):
item_row_with_diff_rate = frappe.copy_doc(pr.items[0])
item_row_with_diff_rate.rate = 100
pr.append('items', item_row_with_diff_rate)
=======
def test_purchase_receipt_with_exchange_rate_difference(self):
from erpnext.accounts.doctype.purchase_invoice.purchase_invoice import (
make_purchase_receipt as create_purchase_receipt,
)
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import (
make_purchase_invoice as create_purchase_invoice,
)
pi = create_purchase_invoice(company="_Test Company with perpetual inventory",
cost_center = "Main - TCP1",
warehouse = "Stores - TCP1",
expense_account ="_Test Account Cost for Goods Sold - TCP1",
currency = "USD", conversion_rate = 70)
pr = create_purchase_receipt(pi.name)
pr.conversion_rate = 80
pr.items[0].purchase_invoice = pi.name
pr.items[0].purchase_invoice_item = pi.items[0].name
>>>>>>> 528c71382f (feat: Provisional accounting for expenses (#29451))
pr.save()
pr.submit()
<<<<<<< HEAD
item_one_gl_entry = frappe.db.get_all("GL Entry", {
'voucher_type': pr.doctype,
'voucher_no': pr.name,
@@ -1405,26 +1383,6 @@ class TestPurchaseReceipt(ERPNextTestCase):
'enable_perpetual_inventory_for_non_stock_items', before_test_value
)
=======
# Get exchnage gain and loss account
exchange_gain_loss_account = frappe.db.get_value(
'Company', pr.company, 'exchange_gain_loss_account'
)
# fetching the latest GL Entry with exchange gain and loss account account
amount = frappe.db.get_value(
'GL Entry',
{
'account': exchange_gain_loss_account,
'voucher_no': pr.name
},
'credit'
)
discrepancy_caused_by_exchange_rate_diff = abs(pi.items[0].base_net_amount - pr.items[0].base_net_amount)
self.assertEqual(discrepancy_caused_by_exchange_rate_diff, amount)
>>>>>>> 528c71382f (feat: Provisional accounting for expenses (#29451))
def test_payment_terms_are_fetched_when_creating_purchase_invoice(self):
from erpnext.accounts.doctype.payment_entry.test_payment_entry import (
create_payment_terms_template,