From 8618402829d9553ddc0c7d7ac41d86147ab2a84d Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Thu, 29 Feb 2024 11:58:14 +0530 Subject: [PATCH] fix: parameters for PI references (cherry picked from commit 8b3d46610eacd27edbceaefff6452efb68a83365) # Conflicts: # erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py # erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py --- .../doctype/landed_cost_voucher/landed_cost_voucher.py | 7 +++++++ .../doctype/purchase_receipt/test_purchase_receipt.py | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py index da974c73999..70874af677b 100644 --- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py +++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py @@ -252,11 +252,18 @@ class LandedCostVoucher(Document): doc.docstatus = 1 doc.make_bundle_using_old_serial_batch_fields(via_landed_cost_voucher=True) doc.update_stock_ledger(allow_negative_stock=True, via_landed_cost_voucher=True) +<<<<<<< HEAD <<<<<<< HEAD doc.make_gl_entries() doc.repost_future_sle_and_gle(via_landed_cost_voucher=True) ======= doc.make_gl_entries(via_landed_cost_voucher=True) +======= + if d.receipt_document_type == "Purchase Receipt": + doc.make_gl_entries(via_landed_cost_voucher=True) + else: + doc.make_gl_entries() +>>>>>>> 8b3d46610e (fix: parameters for PI references) doc.repost_future_sle_and_gle() >>>>>>> baa3fee1bf (fix: add LCV flag to determine negative expenses) diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 497dd331f7a..30b72a96c7d 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -2956,7 +2956,11 @@ class TestPurchaseReceipt(FrappeTestCase): ("Expenses Included In Valuation - _TC", 0, 2000, "Main - _TC"), ) self.assertSequenceEqual(expected_gle, gl_entries) +<<<<<<< HEAD >>>>>>> 53642e7417 (test: LCV entries after billing) +======= + frappe.db.rollback() +>>>>>>> 8b3d46610e (fix: parameters for PI references) def prepare_data_for_internal_transfer():