Separate client service subscriptions from engagement instances

This commit is contained in:
A R R R Associates
2026-08-05 13:42:11 +05:30
parent 3bba0c1e32
commit 0e9eb2bef2
11 changed files with 273 additions and 2 deletions
+5
View File
@@ -25,6 +25,7 @@ from app.modules.services.models import (
from app.modules.services.services import normalize_code, normalize_engagement_type
from app.modules.services.client_services import (
assessment_year_from_financial_year,
attach_engagement_to_plan,
normalize_financial_year,
normalize_period_label,
review_partner_required_for_engagement,
@@ -842,6 +843,10 @@ def import_client_service_assignments(
sub.is_active = is_active
sub.remarks = _clean(_cell(row, headers, "remarks")) or None
sub.updated_by_user_id = current_user.id
attach_engagement_to_plan(
db, engagement=sub, client=client, catalogue=catalogue,
firm_selection=firm_selection, actor_user_id=current_user.id,
)
apply_due_date_rule_to_subscription(db, sub, force=True)
ensure_engagement_quality_workflow(db, subscription=sub, actor_user_id=current_user.id, create_declarations=False)
enforce_quality_gate_on_subscription(sub)