mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-17 02:26:33 +00:00
refactor: DB agnostic method names
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
"generate_csv": 0,
|
"generate_csv": 0,
|
||||||
"idx": 4,
|
"idx": 4,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"modified": "2026-06-18 11:41:42.774023",
|
"modified": "2026-06-18 16:37:42.112788",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Trial Balance",
|
"name": "Trial Balance",
|
||||||
|
|||||||
@@ -583,11 +583,16 @@ def hide_group_accounts(data):
|
|||||||
return non_group_accounts_data
|
return non_group_accounts_data
|
||||||
|
|
||||||
|
|
||||||
def execute_duckdb(filters, duckdb_conn):
|
def execute_synced_report(filters):
|
||||||
validate_filters(filters)
|
from frappe.database.duckdb.database import get_latest_sync
|
||||||
columns = get_columns()
|
|
||||||
data = get_data_duckdb(filters, duckdb_conn)
|
if conn := get_latest_sync("GL Entry"):
|
||||||
return columns, data
|
validate_filters(filters)
|
||||||
|
columns = get_columns()
|
||||||
|
data = get_data_duckdb(filters, conn)
|
||||||
|
return columns, data
|
||||||
|
else:
|
||||||
|
frappe.throw(_("Trial Balance requires {0} to be synced to DuckDB").format(frappe.bold("GL Entry")))
|
||||||
|
|
||||||
|
|
||||||
def get_data_duckdb(filters, conn):
|
def get_data_duckdb(filters, conn):
|
||||||
|
|||||||
Reference in New Issue
Block a user