Files
Odoo-Modules/visa_models2.sql
gsinghpal c66bdf5089 changes
2026-04-03 15:45:18 -04:00

100 lines
10 KiB
PL/PgSQL

BEGIN;
-- ============================================================
-- Scotia Visa — Tech/SaaS recurring subscriptions
-- ============================================================
-- Cursor AI IDE → 6050 IT Expenses, no HST (US company)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Cursor AI IDE Subscription"}', 1, 'auto_reconcile', 'contains', 'CURSOR', true, 140, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 495, 'percentage', 100, '100', '{"en_US": "Cursor AI IDE Subscription"}', 10, 2, 2, NOW(), NOW());
-- VibeCode App → 6050 IT Expenses, no HST (US)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "VibeCode App"}', 1, 'auto_reconcile', 'contains', 'VIBECODEAPP', true, 141, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 495, 'percentage', 100, '100', '{"en_US": "VibeCode App Subscription"}', 10, 2, 2, NOW(), NOW());
-- Authorize.net → 6050 IT/Payment Processing, no HST (US)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Authorize.net Payment Gateway"}', 1, 'auto_reconcile', 'contains', 'AUTHORIZE.NET', true, 142, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 495, 'percentage', 100, '100', '{"en_US": "Authorize.net Gateway Fee"}', 10, 2, 2, NOW(), NOW());
-- OpenAI / ChatGPT → 6050 IT Expenses, no HST (US)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "OpenAI / ChatGPT Subscription"}', 1, 'auto_reconcile', 'contains', 'OPENAI', true, 143, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 495, 'percentage', 100, '100', '{"en_US": "OpenAI ChatGPT/API Subscription"}', 10, 2, 2, NOW(), NOW());
-- Claude AI / Anthropic → 6050 IT Expenses, no HST (US)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Claude AI / Anthropic Subscription"}', 1, 'auto_reconcile', 'contains', 'ANTHROPIC', true, 144, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 495, 'percentage', 100, '100', '{"en_US": "Anthropic Claude AI Subscription"}', 10, 2, 2, NOW(), NOW());
-- Also catch CLAUDE.AI variant
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Claude AI Subscription"}', 1, 'auto_reconcile', 'contains', 'CLAUDE.AI', true, 145, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 495, 'percentage', 100, '100', '{"en_US": "Claude AI Subscription"}', 10, 2, 2, NOW(), NOW());
-- DataTrail Corp → 6028 Car/Van Expenses + HST (GPS tracking for vehicles)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "DataTrail GPS Tracking"}', 1, 'auto_reconcile', 'contains', 'DATATRAIL', true, 146, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 497, 'percentage', 100, '100', '{"en_US": "DataTrail Vehicle GPS Tracking"}', 10, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line_account_tax_rel (account_reconcile_model_line_id, account_tax_id)
VALUES (currval('account_reconcile_model_line_id_seq'), 20);
-- Abacus AI → 6050 IT Expenses, no HST (US)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Abacus AI Platform"}', 1, 'auto_reconcile', 'contains', 'ABACUS', true, 147, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 495, 'percentage', 100, '100', '{"en_US": "Abacus AI Platform Subscription"}', 10, 2, 2, NOW(), NOW());
-- GTmetrix → 6050 IT Expenses + HST (Canadian company - Lyon is billing address)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "GTmetrix Website Monitoring"}', 1, 'auto_reconcile', 'contains', 'GTMETRIX', true, 148, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 495, 'percentage', 100, '100', '{"en_US": "GTmetrix Website Performance Monitoring"}', 10, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line_account_tax_rel (account_reconcile_model_line_id, account_tax_id)
VALUES (currval('account_reconcile_model_line_id_seq'), 20);
-- Icons8 → 6050 IT Expenses, no HST (German company)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Icons8 Design Assets"}', 1, 'auto_reconcile', 'contains', 'ICONS8', true, 149, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 495, 'percentage', 100, '100', '{"en_US": "Icons8 Design Asset Subscription"}', 10, 2, 2, NOW(), NOW());
-- DigitalOcean → 6050 IT Expenses, no HST (US, but bills from NB — still no ON HST)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "DigitalOcean Cloud Hosting"}', 1, 'auto_reconcile', 'contains', 'DIGITALOCEAN', true, 150, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 495, 'percentage', 100, '100', '{"en_US": "DigitalOcean Server Hosting"}', 10, 2, 2, NOW(), NOW());
-- AliExpress → 6160 Office Expense, no HST (Chinese marketplace)
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "AliExpress Purchases"}', 1, 'auto_reconcile', 'contains', 'aliexpress', true, 151, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 507, 'percentage', 100, '100', '{"en_US": "AliExpress Online Purchase"}', 10, 2, 2, NOW(), NOW());
-- Costco (online) → 6160 Office Expense + HST
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Costco Online Purchase"}', 1, 'auto_reconcile', 'contains', 'COSTCO', true, 152, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 507, 'percentage', 100, '100', '{"en_US": "Costco Purchase"}', 10, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line_account_tax_rel (account_reconcile_model_line_id, account_tax_id)
VALUES (currval('account_reconcile_model_line_id_seq'), 20);
-- Ad-free Prime Video → 6070 Dues and Subscriptions + HST
INSERT INTO account_reconcile_model (name, company_id, trigger, match_label, match_label_param, can_be_proposed, sequence, active, create_uid, write_uid, create_date, write_date)
VALUES ('{"en_US": "Prime Video Ad-Free"}', 1, 'auto_reconcile', 'contains', 'Ad free for PrimeVideo', true, 153, true, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line (model_id, company_id, account_id, amount_type, amount, amount_string, label, sequence, create_uid, write_uid, create_date, write_date)
VALUES (currval('account_reconcile_model_id_seq'), 1, 501, 'percentage', 100, '100', '{"en_US": "Amazon Prime Video Ad-Free"}', 10, 2, 2, NOW(), NOW());
INSERT INTO account_reconcile_model_line_account_tax_rel (account_reconcile_model_line_id, account_tax_id)
VALUES (currval('account_reconcile_model_line_id_seq'), 20);
COMMIT;