fix: parameters for PI references

This commit is contained in:
Gursheen Anand
2024-02-29 11:58:14 +05:30
parent 53642e7417
commit 8b3d46610e
2 changed files with 5 additions and 1 deletions

View File

@@ -250,7 +250,10 @@ class LandedCostVoucher(Document):
# update stock & gl entries for submit state of PR
doc.docstatus = 1
doc.update_stock_ledger(allow_negative_stock=True, 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()
doc.repost_future_sle_and_gle()
def validate_asset_qty_and_status(self, receipt_document_type, receipt_document):

View File

@@ -2519,6 +2519,7 @@ class TestPurchaseReceipt(FrappeTestCase):
("Expenses Included In Valuation - _TC", 0, 2000, "Main - _TC"),
)
self.assertSequenceEqual(expected_gle, gl_entries)
frappe.db.rollback()
def prepare_data_for_internal_transfer():