110 lines
3.9 KiB
Python
110 lines
3.9 KiB
Python
DOMAIN_PROMPTS = {
|
|
'bank_reconciliation': """
|
|
BANK RECONCILIATION CONTEXT:
|
|
You are helping with bank statement reconciliation. Key concepts:
|
|
- Bank statement lines (account.bank.statement.line) represent transactions from the bank feed.
|
|
- Each line needs to be matched to one or more journal items (account.move.line).
|
|
- Matching is done via set_line_bank_statement_line(move_line_ids).
|
|
- Fee differences (e.g., Elavon card processing fees) should be allocated to the fee account.
|
|
- Weekend batches may combine multiple days of card payments.
|
|
- Always verify amounts before proposing a match.
|
|
""",
|
|
|
|
'hst_management': """
|
|
HST/GST MANAGEMENT CONTEXT:
|
|
You are helping with Canadian HST/GST tax management.
|
|
- HST Collected is tracked on account 2005 (credit balance = liability).
|
|
- Input Tax Credits (ITCs) are on account 2006 (debit balance = asset).
|
|
- Net HST = Collected - ITCs. Positive means owing to CRA.
|
|
- Quarterly filing periods. Check for missing tax on invoices/bills.
|
|
- All vendor bills should have ITCs unless explicitly exempt.
|
|
""",
|
|
|
|
'accounts_receivable': """
|
|
ACCOUNTS RECEIVABLE CONTEXT:
|
|
- AR aging: current, 1-30, 31-60, 61-90, 90+ days overdue.
|
|
- Follow-up actions escalate by aging bucket.
|
|
- Payments should be matched to specific invoices.
|
|
- Unmatched payments sit on the Outstanding Receipts account (1122).
|
|
""",
|
|
|
|
'accounts_payable': """
|
|
ACCOUNTS PAYABLE CONTEXT:
|
|
- AP aging mirrors AR: current through 90+ days.
|
|
- Watch for duplicate bills (same vendor + amount + date).
|
|
- Bills should match purchase orders when applicable.
|
|
- Tax on bills should match the vendor's fiscal position.
|
|
""",
|
|
|
|
'journal_review': """
|
|
JOURNAL REVIEW CONTEXT:
|
|
- Check for wrong-direction balances (e.g., expense account with credit balance).
|
|
- Detect duplicate entries (same partner + amount + date + journal).
|
|
- Flag entries on unlikely accounts (revenue on a tax account, etc.).
|
|
- Sequence gaps may indicate deleted entries.
|
|
- Draft entries older than 30 days should be reviewed.
|
|
""",
|
|
|
|
'month_end': """
|
|
MONTH-END CLOSE CONTEXT:
|
|
- Aggregate all domain checks into a close checklist.
|
|
- Verify all bank reconciliations are current.
|
|
- Check accrual account balances (vacation, sick leave, etc.).
|
|
- Verify no entries exist after lock date.
|
|
- Run hash integrity check.
|
|
- Produce period trial balance summary.
|
|
""",
|
|
|
|
'payroll_verification': """
|
|
PAYROLL VERIFICATION CONTEXT:
|
|
- Cross-reference payroll journal entries to bank statement cheques.
|
|
- Verify CPP, EI, and income tax deductions against CRA rate tables.
|
|
- Check CRA remittance account balance vs payments made.
|
|
""",
|
|
|
|
'inventory': """
|
|
INVENTORY & COGS CONTEXT:
|
|
- Stock In Hand tracked on account 1069.
|
|
- Price differences on account 5010 (PO price vs bill price).
|
|
- COGS ratio by product category helps spot anomalies.
|
|
- Large inventory adjustments need review.
|
|
""",
|
|
|
|
'adp': """
|
|
ADP RECONCILIATION CONTEXT:
|
|
- ADP Receivable tracked on account 1101.
|
|
- ADP invoices have customer portion + ADP portion = total.
|
|
- Government deposits should match ADP invoices.
|
|
""",
|
|
|
|
'reporting': """
|
|
FINANCIAL REPORTING CONTEXT:
|
|
- Reports use Odoo's account.report engine.
|
|
- Available: P&L, Balance Sheet, Trial Balance, Cash Flow.
|
|
- Period comparison available for trend analysis.
|
|
- Export to PDF or XLSX for external distribution.
|
|
""",
|
|
|
|
'audit': """
|
|
AUDIT & INTEGRITY CONTEXT:
|
|
- Run comprehensive checks on posted entries.
|
|
- Verify hash chain integrity on journals.
|
|
- Check sequence continuity.
|
|
- Flag entries with chatter messages for review tracking.
|
|
- Audit status per account: todo / reviewed / supervised / anomaly.
|
|
""",
|
|
|
|
'payroll_management': """
|
|
PAYROLL MANAGEMENT CONTEXT:
|
|
- Parse pasted payroll summaries from QBO or fusion_payroll.
|
|
- Create payroll journal entries with proper debit/credit lines.
|
|
- Match payroll cheques to bank statement lines.
|
|
- Calculate CRA obligations (CPP employer + employee, EI, income tax).
|
|
- Prepare CRA remittance payment entries.
|
|
""",
|
|
}
|
|
|
|
|
|
def get_domain_prompt(domain):
|
|
return DOMAIN_PROMPTS.get(domain, '')
|