fix: parameters for PI references

(cherry picked from commit 8b3d46610e)
This commit is contained in:
Gursheen Anand
2024-02-29 11:58:14 +05:30
committed by Mergify
parent 7c699c8a38
commit d48455393e
2 changed files with 5 additions and 1 deletions

View File

@@ -224,7 +224,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

@@ -2408,6 +2408,7 @@ class TestPurchaseReceipt(FrappeTestCase):
("Expenses Included In Valuation - _TC", 0, 2000, "Main - _TC"),
)
self.assertSequenceEqual(expected_gle, gl_entries)
frappe.db.rollback()
>>>>>>> 53642e7417 (test: LCV entries after billing)