fix: update sql function usage syntax

based on https://github.com/frappe/frappe/pull/32381
This commit is contained in:
Faris Ansari
2025-05-27 15:27:38 +05:30
parent 9491f6f83f
commit 6bc59d23ea
2 changed files with 2 additions and 2 deletions

View File

@@ -1979,7 +1979,7 @@ class TestPaymentReconciliation(IntegrationTestCase):
def test_reconciliation_on_closed_period_payment(self):
# create backdated fiscal year
first_fy_start_date = frappe.db.get_value("Fiscal Year", {"disabled": 0}, "min(year_start_date)")
first_fy_start_date = frappe.db.get_value("Fiscal Year", {"disabled": 0}, [{'MIN': 'year_start_date'}])
prev_fy_start_date = add_years(first_fy_start_date, -1)
prev_fy_end_date = add_days(first_fy_start_date, -1)
create_fiscal_year(

View File

@@ -2128,7 +2128,7 @@ class TestPurchaseReceipt(IntegrationTestCase):
self.assertEqual(flt(pr.total * pr.conversion_rate, 2), flt(pr.base_total, 2))
# Test - 2: Sum of Debit or Credit should be equal to Purchase Receipt Base Total
amount = frappe.db.get_value("GL Entry", {"docstatus": 1, "voucher_no": pr.name}, ["sum(debit)"])
amount = frappe.db.get_value("GL Entry", {"docstatus": 1, "voucher_no": pr.name}, [{'SUM': 'debit'}])
expected_amount = pr.base_total
self.assertEqual(amount, expected_amount)