mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
fix: purchase invoice return GLe
voucher_wise_stock_value contains tuples and the condition was looking for string, so it's never triggered. Caused by https://github.com/frappe/erpnext/pull/24200
This commit is contained in:
@@ -38,6 +38,23 @@ class StockTestMixin:
|
||||
|
||||
self.assertEqual(v, act_value, msg=f"{k} doesn't match \n{exp_sle}\n{act_sle}")
|
||||
|
||||
def assertGLEs(self, doc, expected_gles, gle_filters=None, order_by=None):
|
||||
filters = {"voucher_no": doc.name, "voucher_type": doc.doctype, "is_cancelled": 0}
|
||||
|
||||
if gle_filters:
|
||||
filters.update(gle_filters)
|
||||
actual_gles = frappe.get_all(
|
||||
"GL Entry",
|
||||
fields=["*"],
|
||||
filters=filters,
|
||||
order_by=order_by or "posting_date, creation",
|
||||
)
|
||||
|
||||
for exp_gle, act_gle in zip(expected_gles, actual_gles):
|
||||
for k, exp_value in exp_gle.items():
|
||||
act_value = act_gle[k]
|
||||
self.assertEqual(exp_value, act_value, msg=f"{k} doesn't match \n{exp_gle}\n{act_gle}")
|
||||
|
||||
|
||||
class TestStockUtilities(FrappeTestCase, StockTestMixin):
|
||||
def test_barcode_scanning(self):
|
||||
|
||||
Reference in New Issue
Block a user