Reconciliation dashboard wip

This commit is contained in:
Charles-Henri Decultot
2018-11-16 09:41:56 +00:00
parent c75a2b1eed
commit 09cad814cd
11 changed files with 837 additions and 75 deletions

View File

@@ -77,70 +77,6 @@
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.enabled==1",
"fieldname": "section_break_3",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "last_sync_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Last Synchronization Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
"has_web_view": 0,
@@ -153,7 +89,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2018-10-26 17:28:47.689735",
"modified": "2018-11-15 17:37:48.531027",
"modified_by": "Administrator",
"module": "ERPNext Integrations",
"name": "Plaid Settings",

View File

@@ -110,7 +110,7 @@ def add_account_subtype(account_subtype):
@frappe.whitelist()
def sync_transactions(bank, bank_account=None):
last_sync_date = frappe.db.get_value("Plaid Settings", None, "last_sync_date")
last_sync_date = frappe.db.get_value("Bank Account", bank_account, "last_integration_date")
if last_sync_date:
start_date = formatdate(last_sync_date, "YYYY-MM-dd")
else:
@@ -124,7 +124,7 @@ def sync_transactions(bank, bank_account=None):
for transaction in transactions:
result.append(new_bank_transaction(transaction))
frappe.db.set_value("Plaid Settings", None, "last_sync_date", getdate(end_date))
frappe.db.set_value("Bank Account", bank_account, "last_integration_date", getdate(end_date))
return result
except Exception: