Fix flagged items: CRTC email submission, BITS todo, selector docs, stale plans
- CRTC letter now auto-emailed to secretary.general@crtc.gc.ca after eSign - BITS admin todo updated to reference electronic + physical submission - COLIN selectors.py: documented verification status per step - BC config: added CRTC Secretary General email address - plan.md: marked completed items (eSign, portal auth, CRTC email) - go-live-todo.md: marked Compliance Calendar DocType as imported Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
05eec47528
commit
97dd08c821
8 changed files with 413 additions and 13 deletions
|
|
@ -1164,7 +1164,30 @@ class CanadaCRTCHandler(BaseServiceHandler):
|
|||
from_password=regulatory_pw,
|
||||
)
|
||||
|
||||
# 9b: Email print/ship instructions to admin
|
||||
# 9b: Email CRTC notification letter to Secretary General
|
||||
# Per CRTC Telecom Information Bulletin 2015-134, new entrants
|
||||
# must notify the CRTC. Electronic submission is accepted.
|
||||
crtc_letter_path = None
|
||||
for fpath in generated_files:
|
||||
if "crtc" in Path(fpath).name.lower() and fpath.endswith(".pdf"):
|
||||
crtc_letter_path = fpath
|
||||
break
|
||||
if crtc_letter_path and Path(crtc_letter_path).exists():
|
||||
try:
|
||||
self._send_crtc_notification_email(
|
||||
entity_name=formation_order.entity_name,
|
||||
order_number=order_number,
|
||||
letter_path=crtc_letter_path,
|
||||
from_addr=regulatory_from,
|
||||
from_password=regulatory_pw,
|
||||
)
|
||||
LOG.info("[Step 9b] CRTC notification letter emailed to Secretary General")
|
||||
except Exception as crtc_err:
|
||||
LOG.warning("[Step 9b] Could not email CRTC notification: %s — admin will mail physically", crtc_err)
|
||||
else:
|
||||
LOG.warning("[Step 9b] No CRTC letter PDF found in generated files — admin will mail physically")
|
||||
|
||||
# 9c: Email print/ship instructions to admin
|
||||
binder_company = order_data.get("custom_own_ca_company") or ""
|
||||
binder_attn = order_data.get("custom_own_ca_attn") or ""
|
||||
if binder_path:
|
||||
|
|
@ -1556,6 +1579,9 @@ class CanadaCRTCHandler(BaseServiceHandler):
|
|||
f"**BITS Registration — {entity_name}** (Order: {order_number})\n\n"
|
||||
f"The CRTC notification letter has been sent to the Secretary General "
|
||||
f"via the signed letter included in the corporate binder.\n\n"
|
||||
f"**CRTC notification submitted:**\n"
|
||||
f"- Electronic: notification letter emailed to secretary.general@crtc.gc.ca\n"
|
||||
f"- Physical: included in corporate binder (ship to address below)\n\n"
|
||||
f"**Action required:**\n"
|
||||
f"1. Confirm the binder was shipped to the CRTC address:\n"
|
||||
f" {crtc_config.get('secretary_general', 'Secretary General, CRTC')}\n"
|
||||
|
|
@ -1563,7 +1589,8 @@ class CanadaCRTCHandler(BaseServiceHandler):
|
|||
f"{crtc_config.get('city', '')}, {crtc_config.get('province', '')} "
|
||||
f"{crtc_config.get('postal_code', '')}\n"
|
||||
f"2. Monitor for CRTC acknowledgement letter (30-60 days)\n"
|
||||
f"3. File acknowledgement in ERPNext Sensitive ID when received"
|
||||
f"3. File acknowledgement in ERPNext Sensitive ID when received\n"
|
||||
f"4. After acknowledgement: request ATS activation code ({ats_config.get('activation_code_phone', '1-877-249-2782')})"
|
||||
f"{reg_line}"
|
||||
f"{gckey_status}"
|
||||
)
|
||||
|
|
@ -2292,6 +2319,55 @@ class CanadaCRTCHandler(BaseServiceHandler):
|
|||
|
||||
self._send_email(to_email=to_email, subject=subject, body=body)
|
||||
|
||||
def _send_crtc_notification_email(
|
||||
self,
|
||||
entity_name: str,
|
||||
order_number: str,
|
||||
letter_path: str,
|
||||
from_addr: str | None = None,
|
||||
from_password: str | None = None,
|
||||
) -> None:
|
||||
"""Email the signed CRTC notification letter to the Secretary General.
|
||||
|
||||
Sends FROM the customer's regulatory@domain.ca if available, otherwise
|
||||
from Performance West. The CRTC accepts electronic notifications.
|
||||
On dev, redirects to admin email.
|
||||
"""
|
||||
crtc_email = "secretary.general@crtc.gc.ca"
|
||||
admin_email = os.environ.get("ADMIN_EMAIL", "ops@performancewest.net")
|
||||
|
||||
# Dev mode: redirect to admin
|
||||
if os.environ.get("NODE_ENV") == "development":
|
||||
crtc_email = admin_email
|
||||
LOG.info("Dev mode: redirecting CRTC notification to %s", crtc_email)
|
||||
|
||||
subject = f"Notification of New Telecommunications Service Provider — {entity_name}"
|
||||
body = (
|
||||
f"Dear Secretary General,\n\n"
|
||||
f"Please find attached the formal notification letter for {entity_name}, "
|
||||
f"a new telecommunications service provider, pursuant to the Telecommunications Act "
|
||||
f"and CRTC Telecom Information Bulletin 2015-134.\n\n"
|
||||
f"This notification is being filed on behalf of {entity_name} by "
|
||||
f"Performance West Inc., their authorized compliance representative.\n\n"
|
||||
f"Please do not hesitate to contact us if any additional information is required.\n\n"
|
||||
f"Respectfully,\n"
|
||||
f"Performance West Inc.\n"
|
||||
f"525 Randall Ave Ste 100-1195\n"
|
||||
f"Cheyenne, WY 82001\n"
|
||||
f"(888) 411-0383\n"
|
||||
f"info@performancewest.net\n\n"
|
||||
f"Order reference: {order_number}"
|
||||
)
|
||||
|
||||
self._send_email(
|
||||
to_email=crtc_email,
|
||||
subject=subject,
|
||||
body=body,
|
||||
attachment_path=letter_path,
|
||||
from_addr=from_addr,
|
||||
from_password=from_password,
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _send_email(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue