Fix import: BaseServiceHandler not BaseComplianceHandler, add _create_admin_todo
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f30b0383a9
commit
9be495dbb9
2 changed files with 26 additions and 4 deletions
|
|
@ -15,15 +15,26 @@ import logging
|
|||
import os
|
||||
from datetime import datetime
|
||||
|
||||
from .base_handler import BaseComplianceHandler
|
||||
from .base_handler import BaseServiceHandler
|
||||
|
||||
logger = logging.getLogger("workers.services.form_499a_discontinuance")
|
||||
|
||||
|
||||
class Form499ADiscontinuanceHandler(BaseComplianceHandler):
|
||||
class Form499ADiscontinuanceHandler(BaseServiceHandler):
|
||||
SERVICE_SLUG = "fcc-499a-discontinuance"
|
||||
SERVICE_NAME = "Form 499-A Discontinuance Filing"
|
||||
|
||||
def _create_admin_todo(self, order_number: str, description: str) -> None:
|
||||
try:
|
||||
from scripts.workers.erpnext_client import ERPNextClient
|
||||
ERPNextClient().create_resource("ToDo", {
|
||||
"description": f"[{self.SERVICE_SLUG}] {order_number}\n\n{description}",
|
||||
"priority": "High",
|
||||
"role": "Accounting Advisor",
|
||||
})
|
||||
except Exception as exc:
|
||||
logger.error("Could not create admin ToDo: %s", exc)
|
||||
|
||||
async def process(self, order_data: dict) -> dict | None:
|
||||
order_number = order_data.get("order_number", "")
|
||||
entity = order_data.get("entity", {})
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import os
|
|||
import tempfile
|
||||
from datetime import datetime
|
||||
|
||||
from .base_handler import BaseComplianceHandler
|
||||
from .base_handler import BaseServiceHandler
|
||||
from .telecom.auto_filing import check_auto_filing, request_admin_review
|
||||
|
||||
logger = logging.getLogger("workers.services.form_499q")
|
||||
|
|
@ -26,10 +26,21 @@ logger = logging.getLogger("workers.services.form_499q")
|
|||
USAC_EFILE_URL = "https://forms.universalservice.org"
|
||||
|
||||
|
||||
class Form499QHandler(BaseComplianceHandler):
|
||||
class Form499QHandler(BaseServiceHandler):
|
||||
SERVICE_SLUG = "fcc-499q"
|
||||
SERVICE_NAME = "FCC Form 499-Q Quarterly Filing"
|
||||
|
||||
def _create_admin_todo(self, order_number: str, description: str) -> None:
|
||||
try:
|
||||
from scripts.workers.erpnext_client import ERPNextClient
|
||||
ERPNextClient().create_resource("ToDo", {
|
||||
"description": f"[{self.SERVICE_SLUG}] {order_number}\n\n{description}",
|
||||
"priority": "High",
|
||||
"role": "Accounting Advisor",
|
||||
})
|
||||
except Exception as exc:
|
||||
logger.error("Could not create admin ToDo: %s", exc)
|
||||
|
||||
async def process(self, order_data: dict) -> dict | None:
|
||||
order_number = order_data.get("order_number", "")
|
||||
entity = order_data.get("entity", {})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue