Add Phase 11B client aware multi bank ownership and engagement archive
This commit is contained in:
@@ -79,6 +79,13 @@ def import_completed_job(db, *, tenant_id, client_id, job_id, user_id):
|
||||
raise ValueError("Completed Bank Analyzer workbook was not found.")
|
||||
if job.tenant_id not in (None, tenant_id):
|
||||
raise ValueError("Bank Analyzer job belongs to a different firm.")
|
||||
if getattr(job, "client_id", None) and int(job.client_id) != int(client_id):
|
||||
raise ValueError(
|
||||
"This Bank Analyzer job is already bound to a different ERP client. "
|
||||
"Import it using the client confirmed during statement ownership validation."
|
||||
)
|
||||
if getattr(job, "client_id", None) and getattr(job, "ownership_status", "") != "confirmed":
|
||||
raise ValueError("Client-bound Bank Analyzer job has not passed ownership validation.")
|
||||
|
||||
frame = pd.read_excel(job.output_file, sheet_name="Transaction Classification")
|
||||
tally_options = available_tally_guids(db, tenant_id, client_id)
|
||||
|
||||
Reference in New Issue
Block a user