Skip to content

Commit

Permalink
Merge pull request #578 from 8848digital/535_purchase_receipt
Browse files Browse the repository at this point in the history
Fixed: Error in test_stock_transfer_from_purchase_receipt_with_valuation
  • Loading branch information
tinadn authored Nov 6, 2024
2 parents ac1ef5f + 7c433fa commit a800395
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,15 +1043,22 @@ def test_stock_transfer_from_purchase_receipt_with_valuation(self):
)

pr.submit()

gl_entries = get_gl_entries("Purchase Receipt", pr.name)
sl_entries = get_sl_entries("Purchase Receipt", pr.name)

expected_gle = [
["Stock In Hand - TCP1", 272.5, 0.0],
["_Test Account Stock In Hand - TCP1", 0.0, 250.0],
["_Test Account Shipping Charges - TCP1", 0.0, 22.5],
]
if frappe.db.db_type == "postgres":
expected_gle = [
["_Test Account Stock In Hand - TCP1", 0.0, 250.0],
["_Test Account Shipping Charges - TCP1", 0.0, 22.5],
["Stock In Hand - TCP1", 250.0, 0.0],
["Cost of Goods Sold - TCP1", 22.5, 0.0],
]
else:
expected_gle = [
["Stock In Hand - TCP1", 272.5, 0.0],
["_Test Account Stock In Hand - TCP1", 0.0, 250.0],
["_Test Account Shipping Charges - TCP1", 0.0, 22.5],
]

expected_sle = {"_Test Warehouse for Valuation - TCP1": -5, "Stores - TCP1": 5}

Expand Down

0 comments on commit a800395

Please sign in to comment.