-- ============================================================================
-- CA AUTOMATOR — SEED DATA v1.0
--
-- READ THIS BEFORE USING ANY NUMBER BELOW
-- Every regulatory figure is seeded with verification_status = 'UNVERIFIED'.
-- These are structural placeholders so the engines run on day one. They are NOT
-- a legal source. Before any client work, open Settings > Rate master, check each
-- row against the Income Tax Act 2058 / the current Finance Act / IRD circulars,
-- correct the value, set the clause, and stamp last_verified_on. The app shows a
-- red UNVERIFIED banner on every computation that touches an unverified rate, and
-- prints the same warning on every Excel and Word report until you clear it.
-- ============================================================================

INSERT OR IGNORE INTO firm (id, name, short_name, base_currency)
VALUES (1, 'CA Nishant Marasini', 'CA Nishant Marasini', 'NPR');

INSERT OR IGNORE INTO fiscal_year (id, label_bs, start_bs, end_bs, start_ad, end_ad, is_current) VALUES
 (1, '2080-81', '2080-04-01', '2081-03-31', '2023-07-17', '2024-07-15', 0),
 (2, '2081-82', '2081-04-01', '2082-03-31', '2024-07-16', '2025-07-16', 0),
 (3, '2082-83', '2082-04-01', '2083-03-31', '2025-07-17', '2026-07-16', 1),
 (4, '2083-84', '2083-04-01', '2084-03-31', '2026-07-17', '2027-07-16', 0);

-- ------------------------------------------------------------- RATE MASTER

-- Personal income tax slabs (resident natural person). applies_to distinguishes
-- individual vs couple. value_num = slab ceiling; value_text = rate as fraction.
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, value_text, unit, applies_to, fiscal_year_label, source, clause, verification_status, notes) VALUES
 ('income_tax','slab_1_ceiling','Slab 1 ceiling',500000,'0.01','amount','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder. Confirm slab ceiling and rate against current Finance Act.'),
 ('income_tax','slab_2_ceiling','Slab 2 ceiling',700000,'0.10','amount','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','slab_3_ceiling','Slab 3 ceiling',1000000,'0.20','amount','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','slab_4_ceiling','Slab 4 ceiling',2000000,'0.30','amount','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','slab_5_ceiling','Slab 5 ceiling',5000000,'0.36','amount','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder — top-slab surcharge treatment must be confirmed.'),
 ('income_tax','slab_top','Above top slab',NULL,'0.39','percent','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','slab_1_ceiling','Slab 1 ceiling',600000,'0.01','amount','couple','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','slab_2_ceiling','Slab 2 ceiling',800000,'0.10','amount','couple','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','slab_3_ceiling','Slab 3 ceiling',1100000,'0.20','amount','couple','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','slab_4_ceiling','Slab 4 ceiling',2000000,'0.30','amount','couple','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','slab_5_ceiling','Slab 5 ceiling',5000000,'0.36','amount','couple','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','slab_top','Above top slab',NULL,'0.39','percent','couple','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.');

-- Presumptive tax (Sec 4) — turnover-based flat tax for small taxpayers, an
-- alternative to the standard book-to-tax computation. value_num is the
-- bracket's turnover ceiling, value_text the flat tax for that bracket — same
-- convention as the slab ceilings above, discovered the same dynamic way.
-- Only one area category (metro) is seeded as a skeleton; add
-- presumptive_<area>_<n>_ceiling rows for sub-metro/municipality/rural and
-- confirm every figure — this is a starting structure, not a verified table.
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, value_text, unit, applies_to, fiscal_year_label, source, clause, verification_status, notes) VALUES
 ('income_tax','presumptive_metro_1_ceiling','Presumptive tax — metro, bracket 1',2000000,'2500','amount','all','2082-83','Income Tax Act 2058','Sec 4','UNVERIFIED','Placeholder skeleton.'),
 ('income_tax','presumptive_metro_2_ceiling','Presumptive tax — metro, bracket 2',3000000,'3500','amount','all','2082-83','Income Tax Act 2058','Sec 4','UNVERIFIED','Placeholder skeleton.'),
 ('income_tax','presumptive_metro_3_ceiling','Presumptive tax — metro, bracket 3 (eligibility ceiling)',5000000,'5000','amount','all','2082-83','Income Tax Act 2058','Sec 4','UNVERIFIED','Placeholder — confirm the current turnover ceiling above which presumptive tax is not available at all.');

INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, verification_status, notes) VALUES
 ('income_tax','company_rate_general','Company tax rate — general',0.25,'percent','company','2082-83','Income Tax Act 2058','Sec 2 Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','company_rate_special','Company tax rate — special industry',0.20,'percent','company','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','company_rate_bfi','Company tax rate — bank/financial institution',0.30,'percent','company','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','company_rate_sin_industry','Company tax rate — tobacco, alcohol, gambling',0.30,'percent','company','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder — this whole category list is a starting skeleton; add, remove or rename rows here as the Finance Act changes, no code change needed.'),
 ('income_tax','company_rate_export','Company tax rate — export income (concessional)',0.20,'percent','company','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder — confirm whether this is a distinct rate or a rebate on the general rate.'),
 ('income_tax','company_rate_cooperative','Company tax rate — cooperative',0.20,'percent','company','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder — many cooperatives are exempt outside the Kathmandu valley for specified activities; confirm this client''s exact position rather than trusting this figure.'),
 ('income_tax','donation_cap_pct','Donation deduction cap — % of adjusted taxable income',0.05,'percent','all','2082-83','Income Tax Act 2058','Sec 12','UNVERIFIED','Placeholder — allowed donation is the lower of the actual gift, this %, and the fixed ceiling below.'),
 ('income_tax','donation_cap_amount','Donation deduction cap — fixed ceiling',1000000,'amount','all','2082-83','Income Tax Act 2058','Sec 12','UNVERIFIED','Placeholder.'),
 ('income_tax','loss_carry_forward_years','Loss carry-forward — default window',7,'years','all','2082-83','Income Tax Act 2058','Sec 20','UNVERIFIED','Placeholder — fallback used when no category-specific window below applies.'),
 ('income_tax','loss_carry_forward_years_general','Loss carry-forward — general company rate category',7,'years','company','2082-83','Income Tax Act 2058','Sec 20','UNVERIFIED','Placeholder.'),
 ('income_tax','loss_carry_forward_years_special','Loss carry-forward — special industry / BOOT / power / mining',12,'years','company','2082-83','Income Tax Act 2058','Sec 20','UNVERIFIED','Placeholder — confirm which project types actually qualify for the extended window.'),
 ('income_tax','retirement_deduction_cap','Retirement contribution deduction cap',300000,'amount','individual','2082-83','Income Tax Act 2058','Sec 63','UNVERIFIED','Placeholder — also limited to a % of assessable income; confirm both limbs.'),
 ('income_tax','retirement_deduction_pct','Retirement contribution — % of assessable income limb',0.333,'ratio','individual','2082-83','Income Tax Act 2058','Sec 63','UNVERIFIED','Placeholder.'),
 ('income_tax','insurance_premium_cap','Life insurance premium deduction cap',40000,'amount','individual','2082-83','Income Tax Act 2058','Sec 1(12) Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','health_insurance_cap','Health insurance premium deduction cap',20000,'amount','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','remote_area_cap','Remote area allowance deduction cap',50000,'amount','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder — varies by category A–E.'),
 ('income_tax','female_rebate','Rebate for resident woman (single filing) on tax',0.10,'percent','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','ssf_rebate_slab1','Slab-1 concessional rate where SSF contributor',0.00,'percent','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','ssf_rebate_slab1','Slab-1 concessional rate where SSF contributor',0.00,'percent','couple','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder — confirm this applies the same way on a couple return.');

-- Employment income — permutations beyond a flat basic+allowance calculation:
-- medical tax credit, concessional retirement lump sum, foreign-posting allowance
-- exemption, senior-citizen slab extension, and remote-area allowance by category
-- A-E (the flat remote_area_cap above stays as the fallback when no category is set).
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, verification_status, notes) VALUES
 ('income_tax','medical_credit_pct','Medical tax credit — % of approved expense',0.15,'percent','individual','2082-83','Income Tax Act 2058','Sec 51','UNVERIFIED','Placeholder — credit against tax payable, not a deduction.'),
 ('income_tax','medical_credit_ceiling','Medical tax credit — annual ceiling',750,'amount','individual','2082-83','Income Tax Act 2058','Sec 51','UNVERIFIED','Placeholder — commonly-cited figure; confirm current-year ceiling and any carry-forward of unused credit.'),
 ('income_tax','retirement_exempt_threshold','Retirement lump sum — exempt amount (fixed limb)',500000,'amount','individual','2082-83','Income Tax Act 2058','Sec 65','UNVERIFIED','Placeholder — exempt portion is the higher of this amount or the % limb below.'),
 ('income_tax','retirement_exempt_pct','Retirement lump sum — exempt % of the payment',0.50,'ratio','individual','2082-83','Income Tax Act 2058','Sec 65','UNVERIFIED','Placeholder.'),
 ('income_tax','retirement_lumpsum_rate','Retirement lump sum — flat rate on the balance',0.05,'percent','individual','2082-83','Income Tax Act 2058','Sec 65','UNVERIFIED','Placeholder — final withholding tax, not slab-stacked with regular salary.'),
 ('income_tax','foreign_allowance_exempt_pct','Foreign allowance — exempt portion for an employee posted abroad',0.75,'ratio','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder — confirm this applies beyond government/NRB postings to this client''s facts.'),
 ('income_tax','senior_citizen_slab1_extra_pct','Senior citizen — additional slab-1 exemption',0.25,'ratio','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder — confirm the qualifying age (commonly cited as 65) and that this stacks with the resident-woman rebate.'),
 ('income_tax','remote_area_cap_a','Remote area allowance deduction cap — category A',50000,'amount','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder — category A is the most remote / highest cap in common practice; confirm the current category map.'),
 ('income_tax','remote_area_cap_b','Remote area allowance deduction cap — category B',40000,'amount','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','remote_area_cap_c','Remote area allowance deduction cap — category C',30000,'amount','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','remote_area_cap_d','Remote area allowance deduction cap — category D',20000,'amount','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder.'),
 ('income_tax','remote_area_cap_e','Remote area allowance deduction cap — category E',10000,'amount','individual','2082-83','Income Tax Act 2058','Sch 1','UNVERIFIED','Placeholder — category E is the least remote / lowest cap in common practice.');

-- Depreciation — Schedule 2 pools
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, verification_status, notes) VALUES
 ('depreciation','pool_a_rate','Pool A — buildings/structures',0.05,'percent','pool_a','2082-83','Income Tax Act 2058','Sch 2','UNVERIFIED','Placeholder.'),
 ('depreciation','pool_b_rate','Pool B — office equipment, furniture',0.25,'percent','pool_b','2082-83','Income Tax Act 2058','Sch 2','UNVERIFIED','Placeholder.'),
 ('depreciation','pool_c_rate','Pool C — vehicles, plant',0.20,'percent','pool_c','2082-83','Income Tax Act 2058','Sch 2','UNVERIFIED','Placeholder.'),
 ('depreciation','pool_d_rate','Pool D — other assets',0.15,'percent','pool_d','2082-83','Income Tax Act 2058','Sch 2','UNVERIFIED','Placeholder.'),
 ('depreciation','pool_e_rate','Pool E — intangibles (useful life basis)',0.00,'percent','pool_e','2082-83','Income Tax Act 2058','Sch 2','UNVERIFIED','Amortised over useful life; rate not fixed.'),
 ('depreciation','tranche_q1','Absorption — addition in first six months (Shrawan-Poush)',1.0,'ratio','all','2082-83','Income Tax Act 2058','Sch 2','UNVERIFIED','Placeholder.'),
 ('depreciation','tranche_q2','Absorption — addition in next three months (Magh-Chaitra)',0.6667,'ratio','all','2082-83','Income Tax Act 2058','Sch 2','UNVERIFIED','Placeholder.'),
 ('depreciation','tranche_q3','Absorption — addition in last three months (Baishakh-Ashad)',0.3333,'ratio','all','2082-83','Income Tax Act 2058','Sch 2','UNVERIFIED','Placeholder.'),
 ('depreciation','repair_ceiling','Repair & improvement ceiling on pool opening base',0.07,'percent','all','2082-83','Income Tax Act 2058','Sec 16','UNVERIFIED','Placeholder.'),
 ('depreciation','de_minimis','Pool written off if base below',2000,'amount','all','2082-83','Income Tax Act 2058','Sch 2','UNVERIFIED','Placeholder.'),
 ('depreciation','special_extra_third','Extra depreciation for special industry',0.3333,'ratio','special','2082-83','Income Tax Act 2058','Sch 2','UNVERIFIED','Placeholder.');

-- Fees, interest and penalties
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, verification_status, notes) VALUES
 ('penalty','s117_estimate_fee','Fee for non-submission of estimated return',5000,'amount','all','2082-83','Income Tax Act 2058','Sec 117(1)','UNVERIFIED','Placeholder.'),
 ('penalty','s117_income_return_pct','Fee for late income return — % of assessable income',0.001,'percent','all','2082-83','Income Tax Act 2058','Sec 117(1)(c)','UNVERIFIED','Placeholder — higher of % of income or monthly amount; confirm both limbs.'),
 ('penalty','s117_income_return_month','Fee for late income return — per month amount',100,'amount','all','2082-83','Income Tax Act 2058','Sec 117(1)(c)','UNVERIFIED','Placeholder.'),
 ('penalty','s118_interest_rate','Interest on short payment of instalment tax',0.15,'percent','all','2082-83','Income Tax Act 2058','Sec 118','UNVERIFIED','Placeholder — annual rate applied monthly.'),
 ('penalty','s119_interest_rate','Interest on failure to pay tax',0.15,'percent','all','2082-83','Income Tax Act 2058','Sec 119','UNVERIFIED','Placeholder.'),
 ('penalty','s120_false_statement','Penalty for a false or misleading statement — careless',0.50,'percent','all','2082-83','Income Tax Act 2058','Sec 120','UNVERIFIED','Placeholder — the careless-intent rate.'),
 ('penalty','s120_false_statement_knowing','Penalty for a false or misleading statement — knowing or reckless',1.00,'percent','all','2082-83','Income Tax Act 2058','Sec 120','UNVERIFIED','Placeholder — the knowing/reckless-intent rate.'),
 ('penalty','instalment_1_pct','First instalment — cumulative % due by Poush end',0.40,'percent','all','2082-83','Income Tax Act 2058','Sec 94','UNVERIFIED','Placeholder.'),
 ('penalty','instalment_2_pct','Second instalment — cumulative % due by Chaitra end',0.70,'percent','all','2082-83','Income Tax Act 2058','Sec 94','UNVERIFIED','Placeholder.'),
 ('penalty','instalment_3_pct','Third instalment — cumulative % due by Ashadh end',1.00,'percent','all','2082-83','Income Tax Act 2058','Sec 94','UNVERIFIED','Placeholder.'),
 ('penalty','s117_books_fee','Fee for failure to maintain books of account',10000,'amount','all','2082-83','Income Tax Act 2058','Sec 117(1)(a)','UNVERIFIED','Placeholder.'),
 ('penalty','tds_shortfall_interest_rate','Interest on TDS not deducted or not deposited',0.15,'percent','all','2082-83','Income Tax Act 2058','Sec 90 / Sec 119','UNVERIFIED','Placeholder — confirm the exact clause; modelled at the same rate as Sec 119 pending that check.'),
 ('penalty','tds_return_late_fee','Fee per TDS return filed late',1500,'amount','all','2082-83','Income Tax Act 2058','','UNVERIFIED','Placeholder — confirm the exact clause and amount.');

-- VAT
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, verification_status, notes) VALUES
 ('vat','standard_rate','VAT standard rate',0.13,'percent','all','2082-83','Value Added Tax Act 2052','Sec 7','UNVERIFIED','Placeholder.'),
 ('vat','reg_threshold_goods','Registration threshold — goods',5000000,'amount','all','2082-83','VAT Act/Rules','','UNVERIFIED','Placeholder.'),
 ('vat','reg_threshold_services','Registration threshold — services',3000000,'amount','all','2082-83','VAT Act/Rules','','UNVERIFIED','Placeholder.'),
 ('vat','late_return_fee','Fee per late VAT return',1000,'amount','all','2082-83','VAT Act 2052','Sec 29','UNVERIFIED','Placeholder.'),
 ('vat','late_payment_addl_fee','Additional fee on unpaid VAT (annual)',0.15,'percent','all','2082-83','VAT Act 2052','Sec 19','UNVERIFIED','Placeholder.'),
 ('vat','unregistered_penalty_pct','Penalty on turnover earned while trading above the threshold unregistered',0.10,'percent','all','2082-83','VAT Act 2052','','UNVERIFIED','Placeholder — confirm the exact clause and basis; the VAT itself is separately due on that turnover.');

-- Payroll / social security
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, verification_status, notes) VALUES
 ('payroll','ssf_employee','SSF — employee contribution on basic',0.11,'percent','all','2082-83','Social Security Act 2074','','UNVERIFIED','Placeholder.'),
 ('payroll','ssf_employer','SSF — employer contribution on basic',0.20,'percent','all','2082-83','Social Security Act 2074','','UNVERIFIED','Placeholder.'),
 ('payroll','pf_employee','Provident fund — employee on basic',0.10,'percent','all','2082-83','Labour Act 2074','','UNVERIFIED','Placeholder.'),
 ('payroll','pf_employer','Provident fund — employer on basic',0.10,'percent','all','2082-83','Labour Act 2074','','UNVERIFIED','Placeholder.'),
 ('payroll','gratuity_rate','Gratuity on basic',0.0833,'percent','all','2082-83','Labour Act 2074','','UNVERIFIED','Placeholder.'),
 ('payroll','vehicle_perquisite_monthly_pct','Vehicle facility perquisite — % of prescribed cost, per month',0.005,'percent','all','2082-83','Income Tax Rules 2059','Rule 12','UNVERIFIED','Placeholder — confirm current rule and prescribed-value basis for a company-provided, dual-use vehicle.'),
 ('payroll','accommodation_perquisite_pct','Accommodation facility perquisite — % of remuneration',0.02,'percent','all','2082-83','Income Tax Rules 2059','','UNVERIFIED','Placeholder — taxable value is the higher of actual rent borne by the employer and this % of remuneration.'),
 ('payroll','employer_loan_market_rate','Employer-provided loan — prescribed market interest rate',0.10,'percent','all','2082-83','Income Tax Act 2058','','UNVERIFIED','Placeholder — perquisite is this rate less whatever the employee is actually charged.'),
 ('payroll','rent_tds_rate','TDS on house/land rent paid to a resident person',0.10,'percent','all','2082-83','Income Tax Act 2058','Sec 88(1)','UNVERIFIED','Placeholder — confirm whether this specific lease is to a person or an entity, and any VAT-registered-lessor variation.');

-- ------------------------------------------------------------ TDS / WITHHOLDING
-- Withholding categories for the TDS module — the client acting as a
-- withholding agent on payments it makes (not the salary TDS already covered
-- by its own module, and not house/land rent, which reuses payroll.rent_tds_rate
-- above so the Lease and TDS modules never carry two copies of the same
-- number). Discovered dynamically by the 'tds_rate_' code prefix, same
-- mechanism as company_rate_* — add a new withholding category here and it
-- appears in the module with no code change.
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, verification_status, notes) VALUES
 ('tds','tds_rate_contract','Contract / service fee payment',0.015,'percent','all','2082-83','Income Tax Act 2058','Sec 89','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_consultancy_registered','Consultancy / professional fee — VAT-registered payee',0.015,'percent','all','2082-83','Income Tax Act 2058','Sec 88','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_consultancy_unregistered','Consultancy / professional fee — payee not VAT-registered',0.15,'percent','all','2082-83','Income Tax Act 2058','Sec 88','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_commission','Commission',0.15,'percent','all','2082-83','Income Tax Act 2058','Sec 88','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_interest','Interest paid to a non-bank/individual lender',0.15,'percent','all','2082-83','Income Tax Act 2058','Sec 88','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_dividend','Dividend distribution',0.05,'percent','all','2082-83','Income Tax Act 2058','Sec 88','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_nonresident','Payment to a non-resident',0.15,'percent','all','2082-83','Income Tax Act 2058','Sec 88','UNVERIFIED','Placeholder — treaty relief may apply; verify DTAA position separately.'),
 ('tds','tds_rate_meeting_fee','Meeting / sitting fee',0.15,'percent','all','2082-83','Income Tax Act 2058','Sec 88','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_freight','Freight / carriage',0.015,'percent','all','2082-83','Income Tax Act 2058','Sec 89','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_vehicle_rent','Rent of vehicle (VAT-registered lessor)',0.015,'percent','all','2082-83','Income Tax Act 2058','Sec 88','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_royalty','Royalty',0.15,'percent','all','2082-83','Income Tax Act 2058','Sec 88','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_business_promotion','Business promotion / discount / incentive payment',0.15,'percent','all','2082-83','Income Tax Act 2058','Sec 88','UNVERIFIED','Placeholder.');

-- ============================================================================
-- INDIA (IN) — Country Engine seed, added once rate_master/firm gained
-- country_code (see server/country_service.py). Deliberately NOT a
-- mechanical copy of the Nepal rows above with different numbers: only
-- seeded where the ENGINE'S OWN SHAPE (dynamic slab/category discovery —
-- _dynamic_slabs, _dynamic_categories, the tds_rate_ prefix) genuinely
-- matches how the underlying Indian provision works, not just where a
-- number could be forced in. Same UNVERIFIED convention as the Nepal rows:
-- seeded so an India-jurisdiction firm's engines produce a number at all,
-- never a legal source — confirm every row against the Income-tax Act,
-- 1961 (as amended by the Finance Act in force) before any client work.
--
-- fiscal_year_label is NULL (a standing rule, matching any fy value) rather
-- than a specific year, because current_fy_label() still only knows how to
-- compute a Nepali BS label — see PROJECT_STATE.md's Financial Period
-- engine gap. NULL sidesteps that gap for this data rather than these rows
-- silently never being found.
--
-- UPDATE: depreciation/GST/penalty-interest below now DO have real
-- engine-shape support — see server/india_engines.py (india_depreciation(),
-- india_gst_return(), india_interest_penalty()), added once it existed.
-- GST specifically got its OWN 'gst' domain rather than extending 'vat' —
-- Nepal's `vat` domain (one 'standard_rate' field) genuinely can't
-- represent GST's multi-slab (0/5/12/18/28%) + CGST/SGST/IGST shape, so
-- rather than force a bad fit there, `gst` is a new domain with its own
-- dynamically-discovered gst_rate_ prefix (same mechanism as
-- company_rate_/tds_rate_). Nepal's `vat` domain is untouched.
--
-- Still NOT seeded — Nepal-specific reliefs with no Indian equivalent at all
-- (remote_area_cap*, foreign_allowance_exempt_pct, ssf_rebate_slab1,
-- female_rebate, senior_citizen_slab1_extra_pct, retirement_exempt_*,
-- medical_credit_*), and 80C/80G, whose actual Indian mechanics (a shared
-- multi-instrument basket cap; tiered 50%/100% donee categories) don't map
-- onto retirement_deduction_cap/donation_cap's Nepal-shaped single-cap
-- semantics — forcing a number in would misrepresent how the relief
-- actually works, not just risk a wrong figure.
--
-- India also has no joint/couple filing status at all (every taxpayer
-- files individually) — so, unlike Nepal, there is no 'couple' applies_to
-- variant below; that is a structural fact, not a gap to fill in later.

-- Personal income tax slabs — default ("new") regime. value_num = slab
-- ceiling, value_text = rate, same convention as the Nepal slabs above.
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, value_text, unit, applies_to, fiscal_year_label, source, clause, country_code, verification_status, notes) VALUES
 ('income_tax','slab_1_ceiling','Slab 1 ceiling',300000,'0.00','amount','individual',NULL,'Income-tax Act, 1961','Sec 115BAC(1A)','IN','UNVERIFIED','Placeholder — default-regime structure. Confirm against the Finance Act in force, including the Sec 87A rebate that can make this band effectively tax-free up to a higher total-income threshold.'),
 ('income_tax','slab_2_ceiling','Slab 2 ceiling',700000,'0.05','amount','individual',NULL,'Income-tax Act, 1961','Sec 115BAC(1A)','IN','UNVERIFIED','Placeholder.'),
 ('income_tax','slab_3_ceiling','Slab 3 ceiling',1000000,'0.10','amount','individual',NULL,'Income-tax Act, 1961','Sec 115BAC(1A)','IN','UNVERIFIED','Placeholder.'),
 ('income_tax','slab_4_ceiling','Slab 4 ceiling',1200000,'0.15','amount','individual',NULL,'Income-tax Act, 1961','Sec 115BAC(1A)','IN','UNVERIFIED','Placeholder.'),
 ('income_tax','slab_5_ceiling','Slab 5 ceiling',1500000,'0.20','amount','individual',NULL,'Income-tax Act, 1961','Sec 115BAC(1A)','IN','UNVERIFIED','Placeholder — this engine has no representation of the old (pre-115BAC) regime as an alternative; a taxpayer who elects out of the default regime is not correctly modelled yet.'),
 ('income_tax','slab_top','Above top slab',NULL,'0.30','percent','individual',NULL,'Income-tax Act, 1961','Sec 115BAC(1A)','IN','UNVERIFIED','Placeholder — surcharge and cess on top of this rate are not modelled by this engine at all yet.');

-- Company rates — discovered dynamically by the company_rate_ prefix, same
-- mechanism as the Nepal rows; category names differ, no engine change needed.
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, country_code, verification_status, notes) VALUES
 ('income_tax','company_rate_domestic_standard','Company tax rate — domestic company, standard (no concessional election)',0.30,'percent','company',NULL,'Income-tax Act, 1961','Sec 115BA / Finance Act','IN','UNVERIFIED','Placeholder — 25% applies instead for many domestic companies below a turnover threshold; confirm this client''s actual applicable rate before use.'),
 ('income_tax','company_rate_domestic_concessional','Company tax rate — domestic company electing the concessional regime',0.22,'percent','company',NULL,'Income-tax Act, 1961','Sec 115BAA','IN','UNVERIFIED','Placeholder — conditional on forgoing specified exemptions/deductions; confirm the election is actually in force for this client.'),
 ('income_tax','company_rate_new_manufacturing','Company tax rate — new manufacturing domestic company',0.15,'percent','company',NULL,'Income-tax Act, 1961','Sec 115BAB','IN','UNVERIFIED','Placeholder — conditional on incorporation/commencement dates and specified conditions; confirm eligibility before use.'),
 ('income_tax','company_rate_foreign','Company tax rate — foreign company',0.35,'percent','company',NULL,'Income-tax Act, 1961','Finance Act','IN','UNVERIFIED','Placeholder — this rate has changed across recent Finance Acts; confirm the rate for the year in force.'),
 ('income_tax','loss_carry_forward_years','Loss carry-forward — default window',8,'years','all',NULL,'Income-tax Act, 1961','Sec 72','IN','UNVERIFIED','Placeholder.'),
 ('income_tax','health_insurance_cap','Health insurance premium deduction cap (non-senior)',25000,'amount','individual',NULL,'Income-tax Act, 1961','Sec 80D','IN','UNVERIFIED','Placeholder — Sec 80D has a separate, higher cap for senior-citizen premiums and a parents''-premium limb this engine does not yet model as distinct rows; confirm this client''s actual position rather than trusting this single figure.');

-- Payroll / social security — EPF. The engine's existing pf_employer/
-- pf_employee codes (Nepal's own non-SSF fallback path) already fit EPF's
-- shape exactly; no new code names needed.
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, country_code, verification_status, notes) VALUES
 ('payroll','pf_employee','Employees'' Provident Fund — employee contribution on basic+DA',0.12,'percent','all',NULL,'EPF & MP Act, 1952','','IN','UNVERIFIED','Placeholder — subject to the statutory wage ceiling and scheme-specific carve-outs; confirm this client''s applicable basis.'),
 ('payroll','pf_employer','Employees'' Provident Fund — employer contribution on basic+DA',0.12,'percent','all',NULL,'EPF & MP Act, 1952','','IN','UNVERIFIED','Placeholder — part of the employer contribution is typically routed to the Pension Scheme rather than EPF itself above a wage ceiling; this single figure does not yet model that split.');

-- TDS / withholding — India's own TDS system is, structurally, the same
-- shape as this domain already (a category -> rate table), so the
-- tds_rate_ prefix genuinely fits here, unlike depreciation/vat/penalty above.
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, country_code, verification_status, notes) VALUES
 ('tds','tds_rate_contract','Payment to contractors, non-individual/HUF payee (Sec 194C)',0.02,'percent','all',NULL,'Income-tax Act, 1961','Sec 194C','IN','UNVERIFIED','Placeholder — the individual/HUF payee rate is 1%, not modelled as a separate row yet; Sec 206AA doubles this absent a valid PAN.'),
 ('tds','tds_rate_consultancy','Professional / technical fees (Sec 194J)',0.10,'percent','all',NULL,'Income-tax Act, 1961','Sec 194J','IN','UNVERIFIED','Placeholder — a lower 2% limb applies to specified technical-service/call-centre payments; confirm which limb applies.'),
 ('tds','tds_rate_commission','Commission or brokerage (Sec 194H)',0.05,'percent','all',NULL,'Income-tax Act, 1961','Sec 194H','IN','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_interest','Interest other than on securities (Sec 194A)',0.10,'percent','all',NULL,'Income-tax Act, 1961','Sec 194A','IN','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_dividend','Dividend (Sec 194)',0.10,'percent','all',NULL,'Income-tax Act, 1961','Sec 194','IN','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_rent','Rent of land/building/furniture (Sec 194-I)',0.10,'percent','all',NULL,'Income-tax Act, 1961','Sec 194-I','IN','UNVERIFIED','Placeholder — plant & machinery rent under the same section is 2%, not modelled as a separate row yet.'),
 ('tds','tds_rate_royalty','Royalty / fees for technical services to a resident (Sec 194J)',0.10,'percent','all',NULL,'Income-tax Act, 1961','Sec 194J','IN','UNVERIFIED','Placeholder.'),
 ('tds','tds_rate_nonresident','Payment to a non-resident (Sec 195)',NULL,'percent','all',NULL,'Income-tax Act, 1961','Sec 195','IN','UNVERIFIED','SOURCE REQUIRED — the domestic rate depends entirely on the nature of the payment and is separately overridden by any applicable DTAA; do not use a single figure here without confirming the specific payment type first (same caution already recorded for this in the Transfer Pricing module''s tp_regulatory_rule rows).');

-- India depreciation (Sec 32 block-of-assets), GST (multi-slab) and
-- 234A/234B/234C/234F interest/fee — added once server/india_engines.py
-- existed to give this domain-appropriate shape (see that module's
-- docstring). Same UNVERIFIED convention as every other row in this file.
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, country_code, verification_status, notes) VALUES
 ('depreciation','block_building_5_rate','Block — residential buildings',0.05,'percent','all',NULL,'Income-tax Act, 1961','Sec 32 / Rule 5, Appendix I','IN','UNVERIFIED','Placeholder.'),
 ('depreciation','block_building_10_rate','Block — non-residential/factory buildings',0.10,'percent','all',NULL,'Income-tax Act, 1961','Sec 32 / Rule 5, Appendix I','IN','UNVERIFIED','Placeholder.'),
 ('depreciation','block_furniture_10_rate','Block — furniture and fittings',0.10,'percent','all',NULL,'Income-tax Act, 1961','Sec 32 / Rule 5, Appendix I','IN','UNVERIFIED','Placeholder.'),
 ('depreciation','block_plant_15_rate','Block — plant & machinery, general',0.15,'percent','all',NULL,'Income-tax Act, 1961','Sec 32 / Rule 5, Appendix I','IN','UNVERIFIED','Placeholder — many specific machinery categories carry a different rate (30%/40%/45%/60%); this is only the general/default block.'),
 ('depreciation','block_motor_vehicle_15_rate','Block — motor vehicles, general (not hire business)',0.15,'percent','all',NULL,'Income-tax Act, 1961','Sec 32 / Rule 5, Appendix I','IN','UNVERIFIED','Placeholder.'),
 ('depreciation','block_computer_40_rate','Block — computers and software',0.40,'percent','all',NULL,'Income-tax Act, 1961','Sec 32 / Rule 5, Appendix I','IN','UNVERIFIED','Placeholder.'),
 ('depreciation','block_intangible_25_rate','Block — intangible assets (know-how, patents, licences, franchises)',0.25,'percent','all',NULL,'Income-tax Act, 1961','Sec 32(1)(ii) / Rule 5, Appendix I','IN','UNVERIFIED','Placeholder.');

-- GST — multi-slab, discovered dynamically by the gst_rate_ prefix, same
-- mechanism as company_rate_/tds_rate_. Structurally different from the
-- single-rate `vat` domain, hence its own domain — see india_gst_return().
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, country_code, verification_status, notes) VALUES
 ('gst','gst_rate_0','Nil-rated / exempt',0.00,'percent','all',NULL,'CGST Act, 2017','Sec 9 / Schedule notifications','IN','UNVERIFIED','Placeholder.'),
 ('gst','gst_rate_5','5% slab',0.05,'percent','all',NULL,'CGST Act, 2017','Sec 9 / rate notifications','IN','UNVERIFIED','Placeholder.'),
 ('gst','gst_rate_12','12% slab',0.12,'percent','all',NULL,'CGST Act, 2017','Sec 9 / rate notifications','IN','UNVERIFIED','Placeholder.'),
 ('gst','gst_rate_18','18% slab',0.18,'percent','all',NULL,'CGST Act, 2017','Sec 9 / rate notifications','IN','UNVERIFIED','Placeholder — the default/most common slab, not a safe assumption for every supply.'),
 ('gst','gst_rate_28','28% slab',0.28,'percent','all',NULL,'CGST Act, 2017','Sec 9 / rate notifications','IN','UNVERIFIED','Placeholder.');

-- 234A/234B/234C interest rate and the 234F late-filing fee tiers.
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, country_code, verification_status, notes) VALUES
 ('penalty','s234_interest_rate_pct','Interest rate — Sec 234A/234B/234C (per month)',0.01,'percent','all',NULL,'Income-tax Act, 1961','Sec 234A / 234B / 234C','IN','UNVERIFIED','Placeholder — simple interest, part of a month counted as a full month; confirm current rate.'),
 ('penalty','s234f_income_threshold','Sec 234F fee tier threshold — total income',500000,'amount','all',NULL,'Income-tax Act, 1961','Sec 234F','IN','UNVERIFIED','Placeholder.'),
 ('penalty','s234f_fee_low','Sec 234F fee — total income at or below the threshold',1000,'amount','all',NULL,'Income-tax Act, 1961','Sec 234F','IN','UNVERIFIED','Placeholder.'),
 ('penalty','s234f_fee_high','Sec 234F fee — total income above the threshold',5000,'amount','all',NULL,'Income-tax Act, 1961','Sec 234F','IN','UNVERIFIED','Placeholder — NIL fee below the basic exemption limit is not yet modelled as a separate tier.');

-- ------------------------------------------------------ INDUSTRY DEFAULTS
-- Indicative project-appraisal planning defaults for the Projection module, by
-- sector. Explicitly NOT statutory — no verification workflow applies, unlike
-- rate_master above. Confirm each figure against the specific project.

INSERT OR IGNORE INTO industry_default
 (name, category, asset_turnover, util_ramp, cost_pct, repairs_pct, wc_days, tax_rate, hol_years, hol_rate,
  impl_months, life_years, tenure_years, moratorium_years, capex_split, uom, revenue_mode, gearing_norm, note) VALUES
('Hydropower — Run of River','Infrastructure',0.28,'[0.9, 0.92, 0.94, 0.95, 0.95]','[0, 0.03, 0.005, 0.055, 0.03, 0.005]',0.01,'[45, 0, 0, 30]',0.2,10,0,36,35,15,4,'[0.06, 0.3, 0.46, 0.02, 0.01, 0.13, 0.02]','kWh','turnover',0.7,'Revenue is contracted through the power purchase agreement, so volume risk is low and hydrology risk is high. Confirm the licence-date-linked exemption under section 11 of the Income Tax Act.'),
 ('Solar Power — Grid Connected','Infrastructure',0.22,'[0.88, 0.88, 0.87, 0.87, 0.86]','[0, 0.02, 0.005, 0.045, 0.03, 0.005]',0.008,'[45, 0, 0, 30]',0.2,10,0,18,25,12,2,'[0.08, 0.1, 0.65, 0.02, 0.01, 0.12, 0.02]','kWh','turnover',0.7,'Panel degradation is built into the falling utilisation profile. Evacuation capacity is the usual constraint.'),
 ('Cement Manufacturing','Manufacturing',0.85,'[0.5, 0.62, 0.72, 0.8, 0.85]','[0.46, 0.06, 0.115, 0.045, 0.045, 0.045]',0.018,'[30, 30, 20, 35]',0.2,0,0.2,24,25,12,3,'[0.081, 0.216, 0.477, 0.045, 0.018, 0.063, 0.1]','MT','capacity',0.7,'Power tariff and limestone royalty dominate the cost structure. Captive power materially changes the picture.'),
 ('Steel Rolling / Re-rolling Mill','Manufacturing',1.6,'[0.5, 0.62, 0.72, 0.8, 0.85]','[0.68, 0.035, 0.075, 0.03, 0.03, 0.03]',0.02,'[35, 25, 18, 40]',0.2,0,0.2,18,20,10,2,'[0.064, 0.16, 0.456, 0.04, 0.016, 0.064, 0.2]','MT','capacity',0.7,'Thin margin on high throughput. The billet price pass-through clause is the single most important commercial term.'),
 ('Automobile / Two-Wheeler Assembly','Manufacturing',1.3,'[0.45, 0.6, 0.72, 0.82, 0.88]','[0.66, 0.04, 0.02, 0.035, 0.045, 0.055]',0.015,'[30, 35, 30, 45]',0.2,0,0.2,24,20,10,2,'[0.08, 0.176, 0.4, 0.04, 0.032, 0.072, 0.2]','Units','capacity',0.7,'The duty differential between CKD/SKD kits and built-up imports is what creates the margin. Verify the current tariff.'),
 ('Plastic Products — PVC & HDPE Pipe','Manufacturing',1.45,'[0.5, 0.65, 0.75, 0.83, 0.88]','[0.64, 0.04, 0.055, 0.03, 0.04, 0.045]',0.02,'[45, 30, 25, 40]',0.2,0,0.2,12,20,9,1,'[0.064, 0.16, 0.44, 0.04, 0.024, 0.072, 0.2]','MT','capacity',0.7,'Resin is dollar-linked, so test the exchange rate as well as the resin price.'),
 ('Garment & Textile','Manufacturing',1.3,'[0.48, 0.62, 0.73, 0.82, 0.88]','[0.52, 0.15, 0.035, 0.045, 0.05, 0.06]',0.018,'[45, 30, 30, 35]',0.2,0,0.2,12,15,9,1,'[0.056, 0.176, 0.416, 0.032, 0.04, 0.08, 0.2]','Pieces','capacity',0.65,'Labour intensive. Export incentive and duty drawback should be quantified separately, not assumed into the margin.'),
 ('Paper & Packaging','Manufacturing',1.15,'[0.48, 0.62, 0.72, 0.8, 0.86]','[0.56, 0.06, 0.09, 0.035, 0.04, 0.045]',0.02,'[40, 30, 22, 40]',0.2,0,0.2,18,20,10,2,'[0.065934, 0.17982, 0.442557, 0.032967, 0.024975, 0.073926, 0.17982]','MT','capacity',0.7,'Waste paper sourcing and power reliability set the achievable utilisation.'),
 ('Pharmaceutical Manufacturing','Manufacturing',1.05,'[0.4, 0.58, 0.7, 0.8, 0.87]','[0.42, 0.075, 0.03, 0.055, 0.07, 0.11]',0.02,'[75, 45, 40, 45]',0.2,0,0.2,24,20,10,2,'[0.055, 0.195, 0.374, 0.031, 0.039, 0.086, 0.22]','Units','capacity',0.7,'DDA and WHO-GMP approval is the critical path. Build the approval timeline into the moratorium.'),
 ('Brick & Concrete Block','Manufacturing',1.0,'[0.5, 0.63, 0.73, 0.8, 0.85]','[0.34, 0.13, 0.15, 0.05, 0.04, 0.045]',0.025,'[30, 25, 25, 25]',0.2,0,0.2,12,20,9,1,'[0.123, 0.211, 0.387, 0.053, 0.018, 0.088, 0.12]','Pieces','capacity',0.7,'Strongly seasonal — a six to eight month operating season is normal and should be stated in the report.'),
 ('Furniture & Wood Products','Manufacturing',1.35,'[0.45, 0.6, 0.72, 0.8, 0.86]','[0.54, 0.12, 0.03, 0.04, 0.05, 0.06]',0.02,'[40, 35, 35, 35]',0.2,0,0.2,12,15,8,1,'[0.056, 0.16, 0.424, 0.04, 0.04, 0.08, 0.2]','Pieces','capacity',0.65,'Evidence the legality and seasoning capacity of the timber supply; lenders increasingly ask.'),
 ('Agro Processing — Rice / Flour Mill','Agro',1.85,'[0.5, 0.65, 0.75, 0.83, 0.88]','[0.74, 0.03, 0.04, 0.025, 0.03, 0.035]',0.018,'[25, 35, 20, 25]',0.2,0,0.2,12,20,9,1,'[0.068068, 0.167167, 0.395395, 0.038038, 0.015015, 0.076076, 0.24024]','MT','capacity',0.65,'Paddy procurement is seasonal, so peak working capital sits far above the annual average.'),
 ('Dairy Processing','Agro',1.7,'[0.5, 0.65, 0.75, 0.83, 0.88]','[0.7, 0.04, 0.045, 0.03, 0.035, 0.045]',0.02,'[20, 8, 10, 20]',0.2,0,0.2,15,20,9,1,'[0.066, 0.197, 0.418, 0.049, 0.016, 0.074, 0.18]','Litres','capacity',0.7,'The chilling centre network and cold chain, not the plant, determine effective capacity.'),
 ('Poultry — Layer / Broiler','Agro',1.55,'[0.55, 0.7, 0.8, 0.85, 0.88]','[0.66, 0.055, 0.035, 0.045, 0.035, 0.035]',0.022,'[15, 25, 12, 25]',0.2,0,0.2,12,12,8,1,'[0.092, 0.252, 0.353, 0.042, 0.017, 0.084, 0.16]','Birds / Eggs','capacity',0.65,'Feed is roughly two thirds of total cost. Biosecurity failure is the risk that ends projects of this type.'),
 ('Animal Feed Industry','Agro',1.9,'[0.5, 0.65, 0.76, 0.83, 0.88]','[0.74, 0.03, 0.04, 0.025, 0.03, 0.04]',0.018,'[30, 30, 15, 30]',0.2,0,0.2,12,20,9,1,'[0.061, 0.167, 0.403, 0.038, 0.015, 0.076, 0.24]','MT','capacity',0.7,'Maize and soya price volatility drives the margin more than anything management controls.'),
 ('Fish Farming / Aquaculture','Agro',1.05,'[0.45, 0.62, 0.75, 0.83, 0.88]','[0.58, 0.08, 0.055, 0.045, 0.035, 0.04]',0.022,'[15, 20, 20, 20]',0.2,0,0.2,15,15,9,1,'[0.172, 0.224, 0.31, 0.043, 0.017, 0.094, 0.14]','MT','capacity',0.65,'Pond construction cost and a reliable water source decide viability before any operating assumption matters.'),
 ('Tea / Coffee Processing','Agro',1.15,'[0.45, 0.6, 0.72, 0.82, 0.88]','[0.6, 0.07, 0.05, 0.04, 0.04, 0.055]',0.02,'[50, 30, 40, 30]',0.2,0,0.2,18,25,10,2,'[0.112, 0.192, 0.352, 0.04, 0.016, 0.088, 0.2]','Kg','capacity',0.7,'Annex the green leaf supply agreements; without them the volume assumption is unsupported.'),
 ('Herbal & Ayurvedic Products','Agro',1.1,'[0.4, 0.58, 0.7, 0.8, 0.87]','[0.48, 0.08, 0.035, 0.05, 0.06, 0.09]',0.02,'[60, 45, 40, 40]',0.2,0,0.2,15,20,9,1,'[0.062, 0.187, 0.374, 0.039, 0.031, 0.087, 0.22]','Kg','capacity',0.7,'Collection permits and traceability for non-timber forest produce are a licensing matter, not a formality.'),
 ('Cold Storage','Agro',0.55,'[0.45, 0.6, 0.72, 0.82, 0.88]','[0.06, 0.08, 0.22, 0.06, 0.06, 0.04]',0.02,'[30, 0, 0, 25]',0.2,0,0.2,15,25,12,2,'[0.094, 0.301, 0.414, 0.028, 0.019, 0.084, 0.06]','MT capacity','turnover',0.7,'A tolling business. Power tariff and outage risk dominate; a backup generation plan is essential.'),
 ('Water Bottling & Beverage','Manufacturing',1.2,'[0.45, 0.6, 0.72, 0.82, 0.88]','[0.42, 0.06, 0.07, 0.05, 0.05, 0.11]',0.02,'[30, 25, 15, 30]',0.2,0,0.2,12,20,9,1,'[0.077, 0.189, 0.43, 0.06, 0.017, 0.087, 0.14]','Litres','capacity',0.7,'Distribution reach and empty bottle logistics are what the selling cost line is really buying.'),
 ('Noodles, Snacks & Food Processing','Manufacturing',1.45,'[0.48, 0.62, 0.74, 0.83, 0.88]','[0.58, 0.055, 0.055, 0.04, 0.045, 0.09]',0.02,'[30, 25, 20, 35]',0.2,0,0.2,12,20,9,1,'[0.067, 0.185, 0.437, 0.05, 0.017, 0.084, 0.16]','Cartons','capacity',0.7,'Model the primary and secondary trade margin explicitly; it is usually understated in promoter projections.'),
 ('Hotel & Resort','Tourism',0.42,'[0.35, 0.48, 0.58, 0.65, 0.7]','[0.16, 0.13, 0.055, 0.07, 0.075, 0.06]',0.02,'[30, 12, 5, 30]',0.2,0,0.2,30,30,14,3,'[0.154, 0.403, 0.23, 0.029, 0.077, 0.067, 0.04]','Room nights','capacity',0.65,'Occupancy ramp, average room rate and seasonality are the three assumptions to sensitise. Gestation is long.'),
 ('Restaurant & Food Chain','Service',1.6,'[0.55, 0.7, 0.8, 0.85, 0.88]','[0.34, 0.14, 0.045, 0.075, 0.06, 0.055]',0.03,'[5, 8, 3, 25]',0.25,0,0.25,9,10,7,1,'[0.019, 0.282, 0.32, 0.028, 0.15, 0.141, 0.06]','Covers','capacity',0.55,'If the premises are leased, rent must be added to overhead. Fit-out has a short life and needs early replacement.'),
 ('Hospital / Nursing Home','Health',0.6,'[0.35, 0.5, 0.62, 0.72, 0.8]','[0.22, 0.23, 0.04, 0.075, 0.075, 0.035]',0.025,'[45, 30, 10, 45]',0.2,0,0.2,30,30,12,2,'[0.11988, 0.312687, 0.34965, 0.027972, 0.054945, 0.054945, 0.07992]','Beds','capacity',0.65,'Consultant cost sits in direct labour. Insurance and scheme receivables stretch the collection cycle.'),
 ('School / College','Education',0.55,'[0.4, 0.55, 0.68, 0.78, 0.85]','[0.04, 0.32, 0.03, 0.08, 0.09, 0.045]',0.02,'[30, 0, 0, 20]',0.2,0,0.2,24,30,12,2,'[0.173, 0.442, 0.154, 0.038, 0.086, 0.067, 0.04]','Students','capacity',0.65,'Affiliation approval and the fee realisation cycle are the two items that decide the first three years.'),
 ('IT Services / Software / BPO','Technology',1.15,'[0.45, 0.62, 0.75, 0.85, 0.9]','[0.06, 0.42, 0.02, 0.07, 0.09, 0.06]',0.025,'[60, 0, 0, 30]',0.25,0,0.25,6,10,7,1,'[0.0, 0.082, 0.344, 0.016, 0.18, 0.198, 0.18]','Billable hours','turnover',0.6,'People cost dominates everything. Export of services may attract a concession — verify before applying it.'),
 ('Transport & Logistics','Service',0.95,'[0.5, 0.65, 0.75, 0.82, 0.88]','[0.1, 0.12, 0.31, 0.06, 0.055, 0.035]',0.035,'[40, 5, 0, 25]',0.25,0,0.25,9,12,8,1,'[0.046, 0.092, 0.055, 0.626, 0.028, 0.073, 0.08]','Trips / MT-km','turnover',0.7,'The fleet is the asset base. Fuel and tyres sit in the power and fuel line, and both move with the oil price.'),
 ('Trading / Wholesale Distribution','Trade',2.6,'[0.6, 0.72, 0.82, 0.88, 0.92]','[0.845, 0.02, 0.008, 0.012, 0.03, 0.035]',0.01,'[45, 40, 0, 30]',0.25,0,0.25,6,10,6,1,'[0.018, 0.072, 0.027, 0.063, 0.036, 0.234, 0.55]','Turnover','turnover',0.5,'Most of the outlay is working capital, not fixed assets. This should be financed by a limit, not a term loan.'),
 ('Retail / Departmental Store','Trade',2.1,'[0.55, 0.7, 0.8, 0.86, 0.9]','[0.795, 0.045, 0.02, 0.025, 0.035, 0.04]',0.02,'[5, 55, 0, 40]',0.25,0,0.25,9,12,7,1,'[0.028, 0.121, 0.055, 0.028, 0.099, 0.219, 0.45]','Turnover','turnover',0.5,'Shrinkage and dead stock provision must be layered onto the cost of goods, or the margin is overstated.'),
 ('Real Estate / Housing Development','Real Estate',0.7,'[0.2, 0.45, 0.7, 0.85, 0.9]','[0.62, 0.03, 0.01, 0.04, 0.045, 0.055]',0.008,'[60, 120, 90, 45]',0.25,0,0.25,30,10,8,2,'[0.306, 0.396, 0.036, 0.018, 0.027, 0.117, 0.1]','Sq. ft.','capacity',0.55,'Revenue recognition and the treatment of booking advances need explicit disclosure in the notes.'),
 ('Telecommunications / ISP','Technology',0.7,'[0.3, 0.48, 0.62, 0.74, 0.82]','[0.1, 0.11, 0.075, 0.09, 0.07, 0.085]',0.03,'[35, 0, 0, 30]',0.25,0,0.25,18,15,10,2,'[0.028, 0.093, 0.616, 0.023, 0.028, 0.112, 0.1]','Connections','turnover',0.65,'Network build is front-loaded and subscriber acquisition cost is recovered over years, so the receivable and capex cycle both need close attention.'),
 ('Other / Custom','Custom',1.2,'[0.5, 0.65, 0.75, 0.82, 0.88]','[0.55, 0.08, 0.045, 0.04, 0.05, 0.055]',0.02,'[40, 30, 25, 35]',0.25,0,0.25,12,15,9,1,'[0.07, 0.18, 0.43, 0.045, 0.03, 0.075, 0.17]','Units','turnover',0.65,'A neutral starting point. Every parameter here should be replaced with something specific to the project.');

-- ============================================================================
-- UNITED ARAB EMIRATES (AE) — Country Engine seed, same UNVERIFIED convention
-- as the India section above: seeded so an AE-jurisdiction firm's engines
-- produce a number at all, never a legal source — confirm every row against
-- the Federal Decree-Laws / Cabinet Decisions in force before any client
-- work. fiscal_year_label is NULL (a standing rule) for the same reason as
-- India's rows — see that section's own comment.
--
-- Unlike India, almost nothing UAE-specific needed a new engine at all:
--   VAT       — engines.vat_return() only ever reads vat.standard_rate; a
--               single 5% standard rate (zero-rated/exempt/blocked-input
--               mechanics already modelled) is exactly its shape. No new
--               module, just this seed.
--   Corp. Tax — engines.personal_tax()'s marginal-slab mechanic, called with
--               status='company', already IS the 0%-then-9% two-slab
--               structure below — see the uae_corporate_tax lambda in
--               engines.ENGINES. No new module, just this seed.
--   Penalties — Cabinet Decision 49/2021's fixed-AED/capped-% structure is
--               genuinely unlike Nepal's Sec 117-120 or India's 234A/B/C/F,
--               so this one DID need its own engine — see
--               server/uae_engines.py's uae_penalties().
--
-- Not modelled at all: UAE has no personal income tax (see
-- country_service.MODULE_COUNTRY_APPLICABILITY — personal_tax/salary_tds/tds
-- are excluded for country 'AE' for exactly this reason, not seeded here),
-- and Corporate Tax small-business relief / free-zone Qualifying Income
-- treatment (0% on qualifying free-zone income regardless of the slabs
-- below) is not represented — this engine always applies the standard
-- mainland slabs.

INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, country_code, verification_status, notes) VALUES
 ('vat','standard_rate','VAT standard rate',0.05,'percent','all',NULL,'Federal Decree-Law No. 8 of 2017 on VAT','Art. 3','AE','UNVERIFIED','Placeholder.'),
 ('vat','reg_threshold_mandatory','Mandatory VAT registration threshold — taxable supplies (rolling 12 months)',375000,'amount','all',NULL,'Federal Decree-Law No. 8 of 2017 on VAT / Executive Regulations','Art. 13','AE','UNVERIFIED','Placeholder — reference figure only; not read by the VAT Return engine itself, which computes the return once a firm is already registered.'),
 ('vat','reg_threshold_voluntary','Voluntary VAT registration threshold — taxable supplies or expenses (rolling 12 months)',187500,'amount','all',NULL,'Federal Decree-Law No. 8 of 2017 on VAT / Executive Regulations','Art. 13','AE','UNVERIFIED','Placeholder — reference figure only, same caveat as reg_threshold_mandatory.');

-- Corporate Tax — value_num = slab ceiling (AED), value_text = rate, same
-- convention as engines.personal_tax()'s existing slab rows. applies_to =
-- 'company' matches the uae_corporate_tax lambda's personal_tax(fy,
-- "company", ...) call.
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, value_text, unit, applies_to, fiscal_year_label, source, clause, country_code, verification_status, notes) VALUES
 ('income_tax','slab_1_ceiling','Slab 1 ceiling — 0% band',375000,'0.00','amount','company',NULL,'Federal Decree-Law No. 47 of 2022 on Corporate Tax','Art. 3(1)(a)','AE','UNVERIFIED','Placeholder — this 0% band is the standard-rate structure''s own first slab, not the separate Small Business Relief election (which exempts eligible taxable persons below a revenue threshold entirely); this engine does not model that election.'),
 ('income_tax','slab_top','Above slab 1',NULL,'0.09','percent','company',NULL,'Federal Decree-Law No. 47 of 2022 on Corporate Tax','Art. 3(1)(b)','AE','UNVERIFIED','Placeholder — a separate 15% Domestic Minimum Top-up Tax applies to large multinational groups in scope of OECD Pillar Two; not modelled by this engine.');

-- Administrative penalties (Cabinet Decision No. 49 of 2021, late-payment
-- mechanics as revised by Cabinet Decision No. 108 of 2021 effective 1 Jan
-- 2022) — see server/uae_engines.py's uae_penalties().
INSERT OR IGNORE INTO rate_master
 (domain, code, label, value_num, unit, applies_to, fiscal_year_label, source, clause, country_code, verification_status, notes) VALUES
 ('penalty','late_registration_fee','Failure to register for VAT/Corporate Tax on time — flat fee',10000,'amount','all',NULL,'Cabinet Decision No. 49 of 2021','Sch. 1','AE','UNVERIFIED','Placeholder.'),
 ('penalty','late_deregistration_fee','Failure to submit a deregistration application on time — flat fee',1000,'amount','all',NULL,'Cabinet Decision No. 49 of 2021','Sch. 1','AE','UNVERIFIED','Placeholder — a single flat fee in this engine, not a monthly-repeating charge; confirm against the current Schedule before relying on this for a specific case.'),
 ('penalty','late_return_fee_first','Late filing of a tax return — first occurrence',1000,'amount','all',NULL,'Cabinet Decision No. 49 of 2021','Sch. 1','AE','UNVERIFIED','Placeholder.'),
 ('penalty','late_return_fee_repeat','Late filing of a tax return — repeat within 24 months',2000,'amount','all',NULL,'Cabinet Decision No. 49 of 2021','Sch. 1','AE','UNVERIFIED','Placeholder.'),
 ('penalty','record_keeping_fee_first','Failure to keep required records — first occurrence',10000,'amount','all',NULL,'Cabinet Decision No. 49 of 2021','Sch. 1','AE','UNVERIFIED','Placeholder.'),
 ('penalty','record_keeping_fee_repeat','Failure to keep required records — repeat violation',50000,'amount','all',NULL,'Cabinet Decision No. 49 of 2021','Sch. 1','AE','UNVERIFIED','Placeholder.'),
 ('penalty','late_payment_immediate_pct','Late payment penalty — immediate, on the day after the due date',0.02,'percent','all',NULL,'Cabinet Decision No. 49 of 2021 (as amended by No. 108 of 2021)','Art. 8','AE','UNVERIFIED','Placeholder — the 108/2021 mechanics apply from 1 Jan 2022; confirm this is still the rate in force.'),
 ('penalty','late_payment_monthly_pct','Late payment penalty — recurring monthly charge on tax still unpaid',0.04,'percent','all',NULL,'Cabinet Decision No. 49 of 2021 (as amended by No. 108 of 2021)','Art. 8','AE','UNVERIFIED','Placeholder — charged one month after the due date and every month thereafter, on the tax still outstanding at that point (this engine applies it to the original unpaid amount each month, a simplification — see uae_penalties()''s own docstring).'),
 ('penalty','late_payment_cap_pct','Late payment penalty — total cap, as a multiple of the unpaid tax',3.00,'percent','all',NULL,'Cabinet Decision No. 49 of 2021 (as amended by No. 108 of 2021)','Art. 8','AE','UNVERIFIED','Placeholder — 300%.');

-- ---------------------------------------------------------------- FDI SECTORS
-- Foreign-equity ceiling / income-tax rate / special-industry flag by sector,
-- as at the source Automator's last check. NOT statutory-verified — confirm
-- each row against the current Act, negative list notice and Finance Act.

INSERT OR IGNORE INTO fdi_sector (name, cap_pct, tax_rate, special, note) VALUES
 ('Manufacturing — general',100,20,1,'Special industry: 20% rate and Schedule-2 additional depreciation available.'),
 ('Manufacturing — agro / food processing',100,20,1,'Special industry; agro-processing concessions may apply.'),
 ('Manufacturing — cement / clinker',100,20,1,'Special industry; environment and mining approvals additionally required.'),
 ('Manufacturing — pharmaceuticals',100,20,1,'DDA licensing required.'),
 ('Hydropower and renewable energy',100,20,1,'Electricity survey/generation licence from DoED; IBN if above the prescribed capacity.'),
 ('Information technology / software / BPO',100,25,0,'IT sector has been given a distinct threshold treatment; confirm the current notice.'),
 ('Tourism — star hotel / resort',100,20,1,'Star hotels are a special industry; travel and trekking agencies are restricted.'),
 ('Health — hospital / diagnostics',100,20,1,'Ministry of Health licensing; not-for-profit structures common.'),
 ('Education',100,25,0,'Sector policy restrictions apply; affiliation required.'),
 ('Construction and infrastructure',100,20,1,'Real estate trading is restricted; construction is not.'),
 ('Trading — wholesale / import-export',100,25,0,'Retail is restricted unless an international chain in two or more countries.'),
 ('Banking and financial institutions',85,30,0,'NRB licensing; foreign equity governed by BAFIA and NRB policy.'),
 ('Insurance',80,30,0,'Nepal Insurance Authority licensing and separate equity policy.'),
 ('Telecommunications / ISP',80,30,0,'NTA licence; sector-specific royalty and RTDF obligations.'),
 ('Airlines — domestic',49,25,0,'Sector cap set by aviation policy.'),
 ('Airlines — international',95,25,0,'Sector cap set by aviation policy.'),
 ('Mining and quarrying',100,20,1,'Department of Mines licence.'),
 ('Logistics and warehousing',100,25,0,'Internal courier service is restricted.'),
 ('Agriculture — commercial / processing (non-primary)',100,20,1,'Primary agro-production is restricted; processing is open.'),
 ('Consultancy and professional services',51,25,0,'Foreign equity capped at 51% by the negative list.'),
 ('Other / to be specified',100,25,0,'');

-- ---------------------------------------------------------- AUDIT ENTITY TYPES
INSERT OR IGNORE INTO audit_entity_type (name, note, is_builtin, sort_order) VALUES
 ('Manufacturing','Production/costing cycle, factory overheads, WIP.',1,10),
 ('Trading / Merchandising','Purchase-resale cycle, stock turnover, margins.',1,20),
 ('Service','Time/output-based revenue, WIP on service contracts.',1,30),
 ('Bank / Financial Institution','NRB-regulated; loan portfolio, deposits, treasury.',1,40),
 ('Microfinance / Cooperative','Group lending, member savings, NRB/Department of Cooperatives oversight.',1,50),
 ('Insurance','Underwriting, claims reserving, reinsurance.',1,60),
 ('NGO / INGO','Donor-restricted funds, SWC compliance, project-based budgets.',1,70),
 ('Hospital / Healthcare','Patient billing, drug inventory, medical equipment.',1,80),
 ('Educational Institution','Fee collection, scholarship funds, affiliation compliance.',1,90),
 ('Hotel / Hospitality','Room revenue, F&B cost control, occupancy-linked income.',1,100),
 ('Construction / Contractor','Contract costing, retention money, work-in-progress certification.',1,110),
 ('IT / Software','Revenue recognition on contracts, intangible development cost.',1,120),
 ('Government / Public Enterprise','Budgetary control, public procurement rules, OAG oversight.',1,130),
 ('Remittance / Money Transfer','NRB licensing, agent network reconciliation, AML/CFT.',1,140),
 ('Real Estate / Housing','Land bank, project costing, buyer advances.',1,150),
 ('Other','Not yet catalogued — the workfile records the specific type as free text.',1,9999);

-- ----------------------------------------------------------- AUDIT CRITERIA BANK
INSERT OR IGNORE INTO audit_criterion (area, criterion, applies_to, sort_order, is_builtin) VALUES
 ('Governance & Audit Planning','Terms of reference / audit charter for this engagement obtained and scope agreed with those charged with governance.','all',10,1),
 ('Governance & Audit Planning','Prior period internal audit findings obtained and their closure status verified before this period''s fieldwork begins.','all',20,1),
 ('Governance & Audit Planning','Organisation chart, delegation of authority and approval matrix obtained and understood.','all',30,1),
 ('Governance & Audit Planning','Minutes of board/management meetings for the period reviewed for decisions with a financial or control impact.','all',40,1),
 ('Governance & Audit Planning','Key risks facing the entity for this period identified and audit scope adjusted to cover them.','all',50,1),
 ('Governance & Audit Planning','Materiality for the engagement discussed and agreed with the audit committee/management, where applicable.','all',60,1),
 ('Governance & Audit Planning','Any change in accounting policy, key personnel, or IT system during the period identified and its impact assessed.','all',70,1),
 ('Governance & Audit Planning','Confidentiality and independence considerations for this engagement confirmed.','all',80,1),
 ('Cash & Bank','Bank reconciliation statements for all accounts obtained for the period-end and reviewed for old/unusual reconciling items.','all',1000,1),
 ('Cash & Bank','Cash count (if maintaining physical cash) performed on a surprise basis and reconciled to the cash book.','all',1010,1),
 ('Cash & Bank','Authorisation matrix for payments (cheque/online) reviewed — dual signatory/maker-checker in place for material amounts.','all',1020,1),
 ('Cash & Bank','Bank confirmation obtained directly from the bank(s) for balances, facilities and any lien/charge.','all',1030,1),
 ('Cash & Bank','Petty cash imprest system reviewed — replenishment basis, maximum limit, and supporting vouchers for expenses.','all',1040,1),
 ('Cash & Bank','Post-dated cheques (issued and received) reviewed for proper control and disclosure.','all',1050,1),
 ('Cash & Bank','Foreign currency bank accounts (if any) reviewed for exchange rate application and NRB reporting compliance.','all',1060,1),
 ('Cash & Bank','Dormant or unused bank accounts identified and rationale for keeping them open assessed.','all',1070,1),
 ('Purchases & Accounts Payable','Purchase requisition → purchase order → goods receipt → invoice → payment cycle walked through for segregation of duties.','all',2000,1),
 ('Purchases & Accounts Payable','Sample of purchases traced from requisition to payment to confirm each step was properly authorised.','all',2010,1),
 ('Purchases & Accounts Payable','Vendor master data reviewed for duplicate vendors, missing PAN, and unauthorised additions.','all',2020,1),
 ('Purchases & Accounts Payable','Goods received but not invoiced (GRNI) and invoices received but not recorded reviewed for completeness of payables.','all',2030,1),
 ('Purchases & Accounts Payable','Purchase returns and debit notes reviewed for proper authorisation and accounting.','all',2040,1),
 ('Purchases & Accounts Payable','Aging of accounts payable reviewed for old/disputed balances and follow-up status.','all',2050,1),
 ('Purchases & Accounts Payable','Related-party purchases identified and reviewed for arm''s-length pricing and disclosure.','all',2060,1),
 ('Purchases & Accounts Payable','Advance payments to suppliers reviewed for recoverability and ageing.','all',2070,1),
 ('Sales, Receivables & Revenue','Order → dispatch → invoice → collection cycle walked through for segregation of duties.','all',3000,1),
 ('Sales, Receivables & Revenue','Sample of sales invoices traced to dispatch/delivery documentation to test occurrence and cutoff.','all',3010,1),
 ('Sales, Receivables & Revenue','Credit control policy reviewed — credit limits set, monitored, and exceptions approved.','all',3020,1),
 ('Sales, Receivables & Revenue','Aging of accounts receivable reviewed for overdue balances, and provisioning policy assessed for adequacy.','all',3030,1),
 ('Sales, Receivables & Revenue','Sales returns, credit notes and discounts reviewed for proper authorisation and accounting.','all',3040,1),
 ('Sales, Receivables & Revenue','Revenue recognition policy reviewed against the actual pattern of delivery/performance for this entity.','all',3050,1),
 ('Sales, Receivables & Revenue','Debtors'' balance confirmation performed for a sample of significant customers.','all',3060,1),
 ('Sales, Receivables & Revenue','Related-party sales identified and reviewed for arm''s-length pricing and disclosure.','all',3070,1),
 ('Inventory & Stores','Physical stock count procedure observed (or count results reviewed) and reconciled to the stock ledger.','all',4000,1),
 ('Inventory & Stores','Slow-moving, obsolete and damaged stock identified and provisioning/write-off policy assessed.','all',4010,1),
 ('Inventory & Stores','Stock valuation method (FIFO/weighted average) applied consistently and correctly.','all',4020,1),
 ('Inventory & Stores','Store issue/receipt vouchers reviewed for proper authorisation and timely recording.','all',4030,1),
 ('Inventory & Stores','Perpetual inventory records (if maintained) reconciled to physical counts periodically, not only at year-end.','all',4040,1),
 ('Inventory & Stores','Stock held at third-party locations (consignment, job-work) confirmed and included/excluded correctly.','all',4050,1),
 ('Inventory & Stores','Insurance coverage for inventory reviewed for adequacy against carrying value.','all',4060,1),
 ('Inventory & Stores','Scrap and waste generation reviewed for proper recording and disposal control.','all',4070,1),
 ('Fixed Assets & Capital Expenditure','Fixed asset register reviewed and physically verified on a sample basis (existence).','all',5000,1),
 ('Fixed Assets & Capital Expenditure','Capital expenditure approval process reviewed — budget vs. actual, authorisation levels.','all',5010,1),
 ('Fixed Assets & Capital Expenditure','Depreciation policy and rates reviewed for consistency with the entity''s own accounting policy and Schedule 2 (tax) where separately tracked.','all',5020,1),
 ('Fixed Assets & Capital Expenditure','Asset disposals/write-offs reviewed for proper authorisation, gain/loss computation and removal from the register.','all',5030,1),
 ('Fixed Assets & Capital Expenditure','Capital work-in-progress reviewed for ageing and capitalisation trigger.','all',5040,1),
 ('Fixed Assets & Capital Expenditure','Insurance coverage for fixed assets reviewed for adequacy.','all',5050,1),
 ('Fixed Assets & Capital Expenditure','Idle or unused assets identified and their carrying treatment assessed.','all',5060,1),
 ('Fixed Assets & Capital Expenditure','Title deeds/ownership documents for land and buildings verified as available and in the entity''s name.','all',5070,1),
 ('Payroll & Human Resources','Employee master data reviewed for ghost employees, duplicate records, and proper authorisation of additions/changes.','all',6000,1),
 ('Payroll & Human Resources','Payroll computation for a sample of employees recalculated and traced to bank payment/disbursement.','all',6010,1),
 ('Payroll & Human Resources','Statutory deductions (TDS, SSF/PF, gratuity) reviewed for correct computation and timely deposit.','all',6020,1),
 ('Payroll & Human Resources','Leave, attendance and overtime records reviewed for consistency with payroll processing.','all',6030,1),
 ('Payroll & Human Resources','Employee separation process reviewed — full and final settlement, exit clearance, access revocation.','all',6040,1),
 ('Payroll & Human Resources','Related-party/key management personnel remuneration reviewed for disclosure.','all',6050,1),
 ('Payroll & Human Resources','Statutory registers under the Labour Act (if applicable) reviewed for maintenance and compliance.','all',6060,1),
 ('Payroll & Human Resources','Bonus computation reviewed against the Bonus Act basis where applicable.','all',6070,1),
 ('Statutory & Tax Compliance','Income tax return and instalment payment status reviewed for the period against due dates.','all',7000,1),
 ('Statutory & Tax Compliance','VAT/TDS return filing status reviewed for the period against due dates and reconciled to books.','all',7010,1),
 ('Statutory & Tax Compliance','Any notice, assessment or audit from IRD/OCR/regulator during the period reviewed for status and response.','all',7020,1),
 ('Statutory & Tax Compliance','Statutory registers under the Companies Act (share register, minute books) reviewed for maintenance.','all',7030,1),
 ('Statutory & Tax Compliance','Social Security Fund / provident fund registration and contribution compliance reviewed.','all',7040,1),
 ('Statutory & Tax Compliance','Renewal status of business registration, PAN/VAT certificate, and sector-specific licences reviewed.','all',7050,1),
 ('Statutory & Tax Compliance','Related regulatory filings (NRB, SEBON, sector regulator, as applicable) reviewed for timeliness.','all',7060,1),
 ('IT & General Controls','User access review performed — access rights match current role, terminated employees'' access revoked promptly.','all',8000,1),
 ('IT & General Controls','Data backup policy and its actual execution reviewed for adequacy and recovery testing.','all',8010,1),
 ('IT & General Controls','Password policy and system security settings reviewed for the accounting/ERP system.','all',8020,1),
 ('IT & General Controls','Change management process for the accounting system (if any customisation) reviewed for authorisation and testing.','all',8030,1),
 ('IT & General Controls','Physical access controls over the server/IT room reviewed.','all',8040,1),
 ('IT & General Controls','Business continuity / disaster recovery arrangement reviewed for existence and last test date.','all',8050,1),
 ('Related Party Transactions','Complete list of related parties obtained from management and cross-checked against statutory registers/shareholding.','all',9000,1),
 ('Related Party Transactions','Related-party transactions for the period identified and reviewed for board approval and disclosure.','all',9010,1),
 ('Related Party Transactions','Pricing of related-party transactions assessed for consistency with arm''s-length practice where determinable.','all',9020,1),
 ('Related Party Transactions','Loans/advances to or from related parties reviewed for terms, interest and recovery status.','all',9030,1),
 ('Legal, Contracts & Insurance','Register of material contracts/agreements reviewed for authorisation and key terms.','all',10000,1),
 ('Legal, Contracts & Insurance','Pending litigation or legal notices reviewed for status and adequacy of provision/disclosure.','all',10010,1),
 ('Legal, Contracts & Insurance','Insurance policies in force reviewed for adequacy of coverage and timely renewal.','all',10020,1),
 ('Legal, Contracts & Insurance','Compliance with key regulatory/contractual covenants (e.g. loan covenants) reviewed.','all',10030,1),
 ('Fraud Risk Indicators','Whistleblower/complaint mechanism (if any) reviewed for complaints received and resolution status during the period.','all',11000,1),
 ('Fraud Risk Indicators','Unusual journal entries (round amounts, weekend/after-hours postings, entries by senior management directly) reviewed.','all',11010,1),
 ('Fraud Risk Indicators','Management override risk assessed — instances of overridden controls or approvals bypassed identified.','all',11020,1),
 ('Fraud Risk Indicators','Vendor/customer master data cross-checked against employee master data for related-party/conflict-of-interest matches.','all',11030,1),
 ('Cash & Bank','Loan portfolio reviewed for classification (pass/watch/substandard/doubtful/loss) per NRB directives and provisioning adequacy.','["Bank / Financial Institution"]',12000,1),
 ('Cash & Bank','Loan documentation for a sample of accounts reviewed for completeness (collateral, sanction, disbursement approval).','["Bank / Financial Institution"]',12010,1),
 ('Cash & Bank','Deposit-taking and interest computation reviewed for a sample of accounts.','["Bank / Financial Institution"]',12020,1),
 ('Cash & Bank','NRB directive compliance (CRR, CAR, single obligor limit) reviewed for the period.','["Bank / Financial Institution"]',12030,1),
 ('Cash & Bank','Non-performing loan recovery and write-off process reviewed for proper authorisation.','["Bank / Financial Institution"]',12040,1),
 ('Governance & Audit Planning','Donor agreement terms reviewed for restricted-fund utilisation compliance.','["NGO / INGO"]',12050,1),
 ('Governance & Audit Planning','SWC (Social Welfare Council) approval and reporting compliance reviewed.','["NGO / INGO"]',12060,1),
 ('Governance & Audit Planning','Project-wise budget vs. actual utilisation reviewed for variance explanation.','["NGO / INGO"]',12070,1),
 ('Governance & Audit Planning','Procurement under donor-funded projects reviewed against the donor''s own procurement guidelines.','["NGO / INGO"]',12080,1),
 ('Inventory & Stores','Bill of materials (BOM) vs. actual consumption reviewed for abnormal variance.','["Manufacturing"]',12090,1),
 ('Inventory & Stores','Production yield/wastage reviewed against standard/budgeted norms.','["Manufacturing"]',12100,1),
 ('Inventory & Stores','Factory overhead absorption basis reviewed for consistency with NAS 2.','["Manufacturing"]',12110,1),
 ('Sales, Receivables & Revenue','Room revenue reconciled to the occupancy/night-audit report for a sample of days.','["Hotel / Hospitality"]',12120,1),
 ('Sales, Receivables & Revenue','F&B cost-to-sales ratio reviewed against budget/norm for abnormal variance.','["Hotel / Hospitality"]',12130,1),
 ('Sales, Receivables & Revenue','Patient billing reconciled to treatment/discharge records for a sample of cases.','["Hospital / Healthcare"]',12140,1),
 ('Sales, Receivables & Revenue','Drug and medical consumable inventory reviewed for expiry management and pilferage control.','["Hospital / Healthcare"]',12150,1),
 ('Fixed Assets & Capital Expenditure','Contract costing reviewed — percentage of completion basis and its supporting certification.','["Construction / Contractor"]',12160,1),
 ('Fixed Assets & Capital Expenditure','Retention money held by/against the entity reviewed for correct accounting and ageing.','["Construction / Contractor"]',12170,1),
 ('Sales, Receivables & Revenue','Revenue recognition for multi-element/subscription contracts reviewed for consistency with the entity''s policy.','["IT / Software"]',12180,1),
 ('Cash & Bank','Member savings and group-lending records reviewed for reconciliation to the general ledger.','["Microfinance / Cooperative"]',12190,1),
 ('Cash & Bank','Field-level cash handling by loan officers reviewed for control adequacy.','["Microfinance / Cooperative"]',12200,1);


-- ---------------------------------------------------------- OBLIGATION TYPES
INSERT OR IGNORE INTO obligation_type (code, title, statute, clause, recurrence, due_rule, applies_when, verification_status) VALUES
 ('VAT_MONTHLY','Monthly VAT return','Value Added Tax Act 2052','Sec 18','monthly','25th of the following Nepali month','{"vat_registered":1}','UNVERIFIED'),
 ('VAT_4MONTHLY','Four-monthly VAT return','Value Added Tax Act 2052','Sec 18','quarterly','25th after each four-month period','{"vat_registered":1}','UNVERIFIED'),
 ('VAT_6MONTHLY','Six-monthly VAT return','Value Added Tax Act 2052','Sec 18','half_yearly','25th after each six-month period','{"vat_registered":1}','UNVERIFIED'),
 ('TDS_MONTHLY','Monthly TDS deposit and e-TDS return','Income Tax Act 2058','Sec 90','monthly','25th of the following Nepali month','{}','UNVERIFIED'),
 ('EST_RETURN','Estimated tax return (D-01)','Income Tax Act 2058','Sec 95','annual','By Poush end','{}','UNVERIFIED'),
 ('INST_1','First tax instalment','Income Tax Act 2058','Sec 94','annual','By Poush end','{}','UNVERIFIED'),
 ('INST_2','Second tax instalment','Income Tax Act 2058','Sec 94','annual','By Chaitra end','{}','UNVERIFIED'),
 ('INST_3','Third tax instalment','Income Tax Act 2058','Sec 94','annual','By Ashadh end','{}','UNVERIFIED'),
 ('INCOME_RETURN','Annual income tax return (D-03)','Income Tax Act 2058','Sec 96','annual','Within 3 months of FY end, extendable','{}','UNVERIFIED'),
 ('OCR_AGM','Annual General Meeting','Companies Act 2063','','annual','Within 6 months of FY end','{"entity_type":"pvt_ltd"}','UNVERIFIED'),
 ('OCR_ANNUAL','OCR annual return / compliance filing','Companies Act 2063','Sec 80','annual','Within 30 days of AGM','{"entity_type":"pvt_ltd"}','UNVERIFIED'),
 ('SSF_MONTHLY','SSF contribution deposit','Social Security Act 2074','','monthly','Within 15 days of month end','{}','UNVERIFIED'),
 ('STAT_AUDIT','Statutory audit and adoption at the AGM','Companies Act 2063','','annual','Within the period prescribed by the Companies Act','{}','UNVERIFIED'),
 ('FDI_DOI_REPORT','Industry progress report and statistics to DoI','Foreign Investment and Technology Transfer Act 2075','','annual','As called for, generally annually — applies to clients with foreign investment','{}','UNVERIFIED'),
 ('FDI_NRB_REPORT','Foreign investment statement / report to NRB','NRB Foreign Investment and Foreign Loan Management Bylaws','','annual','Annually and on each transaction — applies to clients with foreign investment','{}','UNVERIFIED'),
 ('LABOUR_AUDIT','Labour audit and employment records','Labour Act 2074','','annual','Annually','{}','UNVERIFIED'),
 ('FDI_CHANGE_EVENT','Change in shareholding, capital, objects or directors — OCR / DoI filing','Companies Act 2063 / FITTA 2075','','one_off','Within 30 days of the decision, generally — applies to clients with foreign investment','{}','UNVERIFIED'),
 ('FDI_DIVIDEND_EVENT','Dividend declaration, dividend tax deposit and repatriation application','Income Tax Act 2058 / FITTA 2075','','one_off','On declaration; tax within the TDS cycle — applies to clients with foreign investment','{}','UNVERIFIED'),
 ('FDI_LICENCE_RENEWAL','Renewal of sector licence and industry registration','Sector-specific','','one_off','As per the licence terms','{}','UNVERIFIED');

-- ---------------------------------------------------------- REPORT TEMPLATES
INSERT OR IGNORE INTO report_template (module_key, format, name, description, is_default) VALUES
 ('depreciation','xlsx','Schedule 2 pool computation','Pool-wise opening base, absorbed additions, disposals, depreciation, closing base',1),
 ('depreciation','docx','Depreciation working paper','Narrative working paper with pool table and review points',1),
 ('salary_tds','xlsx','Salary TDS register','Employee-wise annual computation and monthly TDS',1),
 ('salary_tds','docx','Salary tax certificate note','Per-employee computation statement',1),
 ('biz_tax','xlsx','Business income tax computation','Profit before tax to tax payable, D-03 aligned',1),
 ('biz_tax','docx','Tax computation memorandum','Narrative computation with disallowance notes',1),
 ('penalty','xlsx','Fees, interest and penalty computation','Section-wise exposure schedule',1),
 ('penalty','docx','Penalty exposure note','Client-facing explanation of exposure and mitigation',1),
 ('emi','xlsx','Loan amortisation schedule','Instalment-wise principal/interest split and journal entries',1),
 ('emi','docx','Loan summary note','Loan terms, effective cost and accounting treatment',1),
 ('lease','xlsx','NFRS 16 lease schedule','ROU asset and lease liability amortisation',1),
 ('lease','docx','Lease accounting memorandum','Classification, discount rate and disclosure note',1),
 ('engagement','docx','Engagement letter','Standard engagement letter on firm letterhead',1),
 ('engagement','xlsx','Engagement status report','Portfolio status across clients and deadlines',1);

-- ----------------------------------------------------------- BLOG CATEGORIES
INSERT OR IGNORE INTO blog_category (id, slug, name, intro) VALUES
 (1,'income-tax','Income tax','Filing, computation, assessments and the questions that come up every year.'),
 (2,'vat','VAT','Registration, returns, credits and the reconciliation problems behind them.'),
 (3,'tds','TDS','Deduction rates, deposit timing, e-TDS and the mismatches clients discover late.'),
 (4,'company-law','Company law & OCR','Incorporation, AGMs, returns, share structure and secretarial compliance.'),
 (5,'audit','Audit & assurance','What an audit does, what it does not, and how to be ready for one.'),
 (6,'accounting','Accounting & NFRS','Standards, treatments and the entries people argue about.'),
 (7,'starting-up','Starting a business','Registration, structure choice and the first year of compliance.'),
 (8,'payroll','Payroll & SSF','Salary structuring, contributions, gratuity and year-end reconciliation.');

INSERT OR IGNORE INTO setting (`key`, value) VALUES
 ('autosave_interval_seconds','300'),
 ('snapshot_retention_days','120'),
 ('rate_master_verified','false'),
 ('site_name','CA Nishant Marasini'),
 ('site_tagline','Chartered Accountants');

-- ------------------------------------------------------- TRANSFER PRICING
-- Same discipline as rate_master above: every row is a placeholder, seeded
-- only so the module runs on day one. UAE is one country row — Dubai is
-- never a separate jurisdiction, only a label used in the UI. This is a
-- deliberately small starter set (not an attempt at complete coverage of
-- three countries' TP law) — confirm every row against the actual statute,
-- rule or FTA/CBDT/IRD guidance before relying on it for client work.

INSERT OR IGNORE INTO tp_country (code, name, currency, tax_authority) VALUES
 ('NP','Nepal','NPR','Inland Revenue Department (IRD)'),
 ('IN','India','INR','Central Board of Direct Taxes (CBDT)'),
 ('AE','United Arab Emirates','AED','Federal Tax Authority (FTA)');

-- Every other country a related party could plausibly sit in — location
-- only, not a jurisdiction this app has configured regulatory content for.
-- Related parties can be located anywhere in the world; the three rows
-- above (NP/IN/AE) are the only ones with tp_regulatory_rule content
-- (rules, method recommendations, documentation checklists, compliance
-- matrix/comparison, reports) — everything below exists so an entity's
-- country, a transaction's source/destination, or a relationship's
-- country_test_basis can reference a real country without ever needing a
-- schema change. Adding real regulatory content for one of these later is
-- exactly the "configuration, not a rewrite" extension point the module
-- was built for. Country/currency codes are ISO 3166-1 / ISO 4217 standard
-- reference data, not a legal position, so these rows are not marked
-- UNVERIFIED the way tax rules are.
INSERT OR IGNORE INTO tp_country (code, name, currency, tax_authority) VALUES
 ('DZ','Algeria','DZD',NULL),
 ('AO','Angola','AOA',NULL),
 ('BJ','Benin','XOF',NULL),
 ('BW','Botswana','BWP',NULL),
 ('BF','Burkina Faso','XOF',NULL),
 ('BI','Burundi','BIF',NULL),
 ('CV','Cabo Verde','CVE',NULL),
 ('CM','Cameroon','XAF',NULL),
 ('CF','Central African Republic','XAF',NULL),
 ('TD','Chad','XAF',NULL),
 ('KM','Comoros','KMF',NULL),
 ('CG','Congo','XAF',NULL),
 ('CD','Congo (DRC)','CDF',NULL),
 ('CI','Cote d''Ivoire','XOF',NULL),
 ('DJ','Djibouti','DJF',NULL),
 ('EG','Egypt','EGP',NULL),
 ('GQ','Equatorial Guinea','XAF',NULL),
 ('ER','Eritrea','ERN',NULL),
 ('SZ','Eswatini','SZL',NULL),
 ('ET','Ethiopia','ETB',NULL),
 ('GA','Gabon','XAF',NULL),
 ('GM','Gambia','GMD',NULL),
 ('GH','Ghana','GHS',NULL),
 ('GN','Guinea','GNF',NULL),
 ('GW','Guinea-Bissau','XOF',NULL),
 ('KE','Kenya','KES',NULL),
 ('LS','Lesotho','LSL',NULL),
 ('LR','Liberia','LRD',NULL),
 ('LY','Libya','LYD',NULL),
 ('MG','Madagascar','MGA',NULL),
 ('MW','Malawi','MWK',NULL),
 ('ML','Mali','XOF',NULL),
 ('MR','Mauritania','MRU',NULL),
 ('MU','Mauritius','MUR',NULL),
 ('MA','Morocco','MAD',NULL),
 ('MZ','Mozambique','MZN',NULL),
 ('NA','Namibia','NAD',NULL),
 ('NE','Niger','XOF',NULL),
 ('NG','Nigeria','NGN',NULL),
 ('RW','Rwanda','RWF',NULL),
 ('ST','Sao Tome and Principe','STN',NULL),
 ('SN','Senegal','XOF',NULL),
 ('SC','Seychelles','SCR',NULL),
 ('SL','Sierra Leone','SLE',NULL),
 ('SO','Somalia','SOS',NULL),
 ('ZA','South Africa','ZAR',NULL),
 ('SS','South Sudan','SSP',NULL),
 ('SD','Sudan','SDG',NULL),
 ('TZ','Tanzania','TZS',NULL),
 ('TG','Togo','XOF',NULL),
 ('TN','Tunisia','TND',NULL),
 ('UG','Uganda','UGX',NULL),
 ('ZM','Zambia','ZMW',NULL),
 ('ZW','Zimbabwe','ZWL',NULL),
 ('AR','Argentina','ARS',NULL),
 ('BS','Bahamas','BSD',NULL),
 ('BB','Barbados','BBD',NULL),
 ('BZ','Belize','BZD',NULL),
 ('BO','Bolivia','BOB',NULL),
 ('BR','Brazil','BRL',NULL),
 ('CA','Canada','CAD',NULL),
 ('CL','Chile','CLP',NULL),
 ('CO','Colombia','COP',NULL),
 ('CR','Costa Rica','CRC',NULL),
 ('CU','Cuba','CUP',NULL),
 ('DM','Dominica','XCD',NULL),
 ('DO','Dominican Republic','DOP',NULL),
 ('EC','Ecuador','USD',NULL),
 ('SV','El Salvador','USD',NULL),
 ('GD','Grenada','XCD',NULL),
 ('GT','Guatemala','GTQ',NULL),
 ('GY','Guyana','GYD',NULL),
 ('HT','Haiti','HTG',NULL),
 ('HN','Honduras','HNL',NULL),
 ('JM','Jamaica','JMD',NULL),
 ('MX','Mexico','MXN',NULL),
 ('NI','Nicaragua','NIO',NULL),
 ('PA','Panama','PAB',NULL),
 ('PY','Paraguay','PYG',NULL),
 ('PE','Peru','PEN',NULL),
 ('KN','Saint Kitts and Nevis','XCD',NULL),
 ('LC','Saint Lucia','XCD',NULL),
 ('VC','Saint Vincent and the Grenadines','XCD',NULL),
 ('SR','Suriname','SRD',NULL),
 ('TT','Trinidad and Tobago','TTD',NULL),
 ('US','United States','USD',NULL),
 ('UY','Uruguay','UYU',NULL),
 ('VE','Venezuela','VES',NULL),
 ('AF','Afghanistan','AFN',NULL),
 ('AM','Armenia','AMD',NULL),
 ('AZ','Azerbaijan','AZN',NULL),
 ('BH','Bahrain','BHD',NULL),
 ('BD','Bangladesh','BDT',NULL),
 ('BT','Bhutan','BTN',NULL),
 ('BN','Brunei','BND',NULL),
 ('KH','Cambodia','KHR',NULL),
 ('CN','China','CNY',NULL),
 ('CY','Cyprus','EUR',NULL),
 ('GE','Georgia','GEL',NULL),
 ('HK','Hong Kong','HKD',NULL),
 ('ID','Indonesia','IDR',NULL),
 ('IR','Iran','IRR',NULL),
 ('IQ','Iraq','IQD',NULL),
 ('IL','Israel','ILS',NULL),
 ('JP','Japan','JPY',NULL),
 ('JO','Jordan','JOD',NULL),
 ('KZ','Kazakhstan','KZT',NULL),
 ('KW','Kuwait','KWD',NULL),
 ('KG','Kyrgyzstan','KGS',NULL),
 ('LA','Laos','LAK',NULL),
 ('LB','Lebanon','LBP',NULL),
 ('MO','Macau','MOP',NULL),
 ('MY','Malaysia','MYR',NULL),
 ('MV','Maldives','MVR',NULL),
 ('MN','Mongolia','MNT',NULL),
 ('MM','Myanmar','MMK',NULL),
 ('KP','North Korea','KPW',NULL),
 ('OM','Oman','OMR',NULL),
 ('PK','Pakistan','PKR',NULL),
 ('PS','Palestine','ILS',NULL),
 ('PH','Philippines','PHP',NULL),
 ('QA','Qatar','QAR',NULL),
 ('SA','Saudi Arabia','SAR',NULL),
 ('SG','Singapore','SGD',NULL),
 ('KR','South Korea','KRW',NULL),
 ('LK','Sri Lanka','LKR',NULL),
 ('SY','Syria','SYP',NULL),
 ('TW','Taiwan','TWD',NULL),
 ('TJ','Tajikistan','TJS',NULL),
 ('TH','Thailand','THB',NULL),
 ('TL','Timor-Leste','USD',NULL),
 ('TR','Turkey','TRY',NULL),
 ('TM','Turkmenistan','TMT',NULL),
 ('UZ','Uzbekistan','UZS',NULL),
 ('VN','Vietnam','VND',NULL),
 ('YE','Yemen','YER',NULL),
 ('AL','Albania','ALL',NULL),
 ('AD','Andorra','EUR',NULL),
 ('AT','Austria','EUR',NULL),
 ('BY','Belarus','BYN',NULL),
 ('BE','Belgium','EUR',NULL),
 ('BA','Bosnia and Herzegovina','BAM',NULL),
 ('BG','Bulgaria','BGN',NULL),
 ('HR','Croatia','EUR',NULL),
 ('CZ','Czechia','CZK',NULL),
 ('DK','Denmark','DKK',NULL),
 ('EE','Estonia','EUR',NULL),
 ('FI','Finland','EUR',NULL),
 ('FR','France','EUR',NULL),
 ('DE','Germany','EUR',NULL),
 ('GR','Greece','EUR',NULL),
 ('HU','Hungary','HUF',NULL),
 ('IS','Iceland','ISK',NULL),
 ('IE','Ireland','EUR',NULL),
 ('IT','Italy','EUR',NULL),
 ('XK','Kosovo','EUR',NULL),
 ('LV','Latvia','EUR',NULL),
 ('LI','Liechtenstein','CHF',NULL),
 ('LT','Lithuania','EUR',NULL),
 ('LU','Luxembourg','EUR',NULL),
 ('MT','Malta','EUR',NULL),
 ('MD','Moldova','MDL',NULL),
 ('MC','Monaco','EUR',NULL),
 ('ME','Montenegro','EUR',NULL),
 ('NL','Netherlands','EUR',NULL),
 ('MK','North Macedonia','MKD',NULL),
 ('NO','Norway','NOK',NULL),
 ('PL','Poland','PLN',NULL),
 ('PT','Portugal','EUR',NULL),
 ('RO','Romania','RON',NULL),
 ('RU','Russia','RUB',NULL),
 ('SM','San Marino','EUR',NULL),
 ('RS','Serbia','RSD',NULL),
 ('SK','Slovakia','EUR',NULL),
 ('SI','Slovenia','EUR',NULL),
 ('ES','Spain','EUR',NULL),
 ('SE','Sweden','SEK',NULL),
 ('CH','Switzerland','CHF',NULL),
 ('UA','Ukraine','UAH',NULL),
 ('GB','United Kingdom','GBP',NULL),
 ('VA','Vatican City','EUR',NULL),
 ('AU','Australia','AUD',NULL),
 ('FJ','Fiji','FJD',NULL),
 ('KI','Kiribati','AUD',NULL),
 ('MH','Marshall Islands','USD',NULL),
 ('FM','Micronesia','USD',NULL),
 ('NR','Nauru','AUD',NULL),
 ('NZ','New Zealand','NZD',NULL),
 ('PW','Palau','USD',NULL),
 ('PG','Papua New Guinea','PGK',NULL),
 ('WS','Samoa','WST',NULL),
 ('SB','Solomon Islands','SBD',NULL),
 ('TO','Tonga','TOP',NULL),
 ('TV','Tuvalu','AUD',NULL),
 ('VU','Vanuatu','VUV',NULL);

INSERT OR IGNORE INTO tp_regulatory_rule
 (country, domain, code, label, value_num, value_text, unit, applies_to, law_name, section_article, source_authority, interpretation, verification_status, notes) VALUES

 -- Nepal
 ('NP','definition','related_party_definition','Related party / associated person definition',NULL,'Direct or indirect control, common control, or a specified relationship as set out in the Act','text',NULL,'Income Tax Act, 2058 (2002)','Sec 2 / Sec 33','IRD','Placeholder interpretation only — read the actual section before applying.','UNVERIFIED','Confirm the exact statutory definition and any IRD directive narrowing/widening it.'),
 ('NP','definition','associated_enterprise_ownership_pct','Ownership % threshold indicating control/associated status',NULL,NULL,'percent',NULL,'Income Tax Act, 2058 (2002)',NULL,'IRD',NULL,'UNVERIFIED','SOURCE REQUIRED — no bright-line ownership percentage confirmed yet; do not assume one exists or apply a foreign threshold by analogy.'),
 ('NP','method','accepted_methods','Accepted transfer pricing methods',NULL,'CUP, Resale Price, Cost Plus, TNMM, Profit Split, as applicable','text',NULL,'Income Tax Act, 2058 (2002)','Sec 33','IRD',NULL,'UNVERIFIED','Confirm which methods IRD practice actually accepts and any stated hierarchy/preference.'),
 ('NP','documentation','documentation_requirement','Contemporaneous documentation requirement',NULL,'Maintain documentation supporting arm''s-length pricing of related-party transactions','text',NULL,'Income Tax Act, 2058 (2002)','Sec 33','IRD',NULL,'UNVERIFIED','Confirm the specific documentation content/format IRD expects, if prescribed.'),
 ('NP','filing','return_disclosure','Related-party transaction disclosure in the tax return',NULL,'Disclosure expected as part of the annual income tax return','text',NULL,'Income Tax Act, 2058 (2002)',NULL,'IRD',NULL,'UNVERIFIED','Confirm the exact return schedule/form field, if any, used for this disclosure.'),
 ('NP','deadline','annual_return_deadline','Annual income tax return filing deadline',NULL,'Within 3 months of fiscal year end, subject to extension','text',NULL,'Income Tax Act, 2058 (2002)',NULL,'IRD',NULL,'UNVERIFIED','Confirm the current deadline and any standing extension practice.'),
 ('NP','penalty','adjustment_penalty_basis','Penalty basis for a transfer-pricing adjustment / non-compliance',NULL,'General Income Tax Act penalty/fee provisions for underreporting or non-compliance','text',NULL,'Income Tax Act, 2058 (2002)',NULL,'IRD',NULL,'UNVERIFIED','Confirm whether a TP-specific penalty provision exists or general provisions apply.'),
 ('NP','threshold','arm_length_review_threshold','Transaction-size threshold triggering arm''s-length scrutiny',NULL,NULL,'text',NULL,'Income Tax Act, 2058 (2002)',NULL,'IRD',NULL,'UNVERIFIED','SOURCE REQUIRED — confirm whether IRD applies any materiality threshold in practice.'),

 -- India
 ('IN','definition','associated_enterprise_definition','Associated Enterprise (AE) definition',NULL,'Direct/indirect participation in management, control or capital, or the specified deemed-AE relationships','text',NULL,'Income-tax Act, 1961','Sec 92A','CBDT',NULL,'UNVERIFIED','Confirm the current text of Sec 92A(2)''s deeming provisions.'),
 ('IN','threshold','specified_domestic_transaction_threshold','Specified Domestic Transaction (SDT) aggregate threshold',200000000,NULL,'INR',NULL,'Income-tax Act, 1961','Sec 92BA','CBDT',NULL,'UNVERIFIED','Placeholder figure (historically INR 20 crore) — confirm against the Finance Act currently in force.'),
 ('IN','documentation','local_file_threshold','Local File (contemporaneous documentation) applicability threshold',10000000,NULL,'INR',NULL,'Income-tax Act, 1961','Rule 10D','CBDT',NULL,'UNVERIFIED','Placeholder figure (historically INR 1 crore) — confirm current threshold and conditions.'),
 ('IN','documentation','master_file_threshold','Master File applicability threshold (consolidated group revenue limb)',NULL,NULL,'INR',NULL,'Income-tax Act, 1961','Sec 92D / Rule 10DA','CBDT',NULL,'UNVERIFIED','Master File applicability is multi-limb (consolidated revenue + international transaction value) — confirm both limbs, not just one figure.'),
 ('IN','filing','form_3ceb_requirement','Form 3CEB — Accountant''s Report on international/specified domestic transactions',NULL,'Required where the AE / SDT thresholds are met','text',NULL,'Income-tax Act, 1961','Sec 92E','CBDT',NULL,'UNVERIFIED','Confirm current e-filing procedure and accountant-certification requirements.'),
 ('IN','deadline','form_3ceb_deadline','Form 3CEB / TP documentation filing deadline',NULL,'On or before the specified due date for filing the return of income in AE cases','text',NULL,'Income-tax Act, 1961',NULL,'CBDT',NULL,'UNVERIFIED','Placeholder — this due date has moved in past Finance Acts (historically on/around 31 October); confirm the year in force.'),
 ('IN','method','accepted_methods','Prescribed transfer pricing methods',NULL,'CUP, Resale Price Method, Cost Plus Method, Profit Split Method, TNMM, and any other method prescribed by rule','text',NULL,'Income-tax Act, 1961','Sec 92C / Rule 10B / Rule 10AB','CBDT',NULL,'UNVERIFIED','Confirm the current Rule 10AB "Other Method" conditions.'),
 ('IN','penalty','documentation_penalty','Penalty for failure to maintain/furnish documentation or report',NULL,'Percentage-of-transaction-value and fixed penalties under the relevant sections','text',NULL,'Income-tax Act, 1961','Sec 271AA / 271G / 271BA','CBDT',NULL,'UNVERIFIED','Confirm the current penalty percentages/amounts — these have changed across Finance Acts.'),
 ('IN','threshold','international_transaction_applicability','International transaction — TP provisions applicability',NULL,'Applies where an AE relationship exists and the international transaction / SDT thresholds are met','text',NULL,'Income-tax Act, 1961','Sec 92','CBDT',NULL,'UNVERIFIED','Confirm current guidance on what constitutes a covered "international transaction".'),

 -- United Arab Emirates (Dubai is an emirate within this one jurisdiction, never a separate country row)
 ('AE','definition','related_party_definition','Related Party definition',NULL,'As defined for UAE Corporate Tax purposes — ownership, control and family-relationship tests','text',NULL,'Federal Decree-Law No. 47 of 2022 (Corporate Tax Law)','Article 35','Federal Tax Authority (FTA)',NULL,'UNVERIFIED','Confirm current Article 35 text and any implementing Ministerial/Cabinet Decision.'),
 ('AE','definition','connected_person_definition','Connected Person definition',NULL,'Owners, directors, officers and their relatives, as defined for Corporate Tax purposes','text',NULL,'Federal Decree-Law No. 47 of 2022 (Corporate Tax Law)','Article 36','Federal Tax Authority (FTA)',NULL,'UNVERIFIED','Confirm current Article 36 text and related Ministerial Decisions.'),
 ('AE','documentation','master_local_file_threshold','Master File / Local File applicability threshold (revenue)',NULL,NULL,'AED',NULL,'Federal Decree-Law No. 47 of 2022 (Corporate Tax Law)',NULL,'Federal Tax Authority (FTA)',NULL,'UNVERIFIED','SOURCE REQUIRED — confirm the current revenue threshold and group-revenue conditions against FTA guidance/Ministerial Decision.'),
 ('AE','filing','disclosure_form_requirement','Related Party / Connected Person disclosure with the Corporate Tax return',NULL,'A disclosure form is required alongside the Corporate Tax return where conditions are met','text',NULL,'Federal Decree-Law No. 47 of 2022 (Corporate Tax Law)',NULL,'Federal Tax Authority (FTA)',NULL,'UNVERIFIED','Confirm current disclosure-form content and the exact trigger conditions.'),
 ('AE','method','accepted_methods','Accepted transfer pricing methods (OECD-aligned)',NULL,'CUP, Resale Price, Cost Plus, TNMM, Profit Split, and another method where none of these can be reliably applied','text',NULL,'Federal Decree-Law No. 47 of 2022 (Corporate Tax Law)','Article 34','Federal Tax Authority (FTA)','UAE''s TP framework is stated to be OECD Transfer Pricing Guidelines-aligned.','UNVERIFIED','Confirm the current Ministerial Decision text on transfer pricing.'),
 ('AE','threshold','arm_length_principle_scope','Arm''s-length principle — scope of application',NULL,'Applies to transactions/arrangements between Related Parties and with Connected Persons','text',NULL,'Federal Decree-Law No. 47 of 2022 (Corporate Tax Law)','Article 34','Federal Tax Authority (FTA)',NULL,'UNVERIFIED','Confirm current scope, including any exclusions.'),
 ('AE','deadline','corporate_tax_return_deadline','Corporate Tax return filing deadline',NULL,'Within 9 months of the end of the relevant Tax Period','text',NULL,'Federal Decree-Law No. 47 of 2022 (Corporate Tax Law)',NULL,'Federal Tax Authority (FTA)',NULL,'UNVERIFIED','Confirm against current FTA guidance for the specific Tax Period.'),
 ('AE','penalty','documentation_penalty','Penalty for transfer-pricing documentation non-compliance',NULL,'Administrative penalties apply under the Tax Procedures framework','text',NULL,'Cabinet Decision on Administrative Penalties',NULL,'Federal Tax Authority (FTA)',NULL,'UNVERIFIED','Confirm the current penalty schedule.'),
 ('AE','threshold','small_business_relief_note','Small Business Relief — interaction with TP documentation',NULL,'An election-based relief that may affect documentation obligations for qualifying small businesses','text',NULL,'Federal Decree-Law No. 47 of 2022 (Corporate Tax Law)',NULL,'Federal Tax Authority (FTA)',NULL,'UNVERIFIED','Confirm current revenue threshold and conditions for the election.'),

 -- Standard corporate tax rate per country, so the Adjustment Exposure engine
 -- has something to compute a tax impact with out of the box — same
 -- placeholder discipline as everything else above.
 ('NP','rate','corporate_tax_rate_standard','Standard corporate income tax rate',25,NULL,'percent',NULL,'Income Tax Act, 2058 (2002)',NULL,'IRD',NULL,'UNVERIFIED','Placeholder — confirm the rate for the entity''s actual category (general/special industry/bank/etc.) against the current Finance Act; this app already tracks Nepal company rates in Rate Master under the income_tax domain, cross-check against that.'),
 ('IN','rate','corporate_tax_rate_standard','Standard corporate income tax rate',30,NULL,'percent',NULL,'Income-tax Act, 1961',NULL,'CBDT',NULL,'UNVERIFIED','Placeholder — confirm the rate for the entity''s actual category (domestic company concessional regimes, foreign company, etc.) against the current Finance Act.'),
 ('AE','rate','corporate_tax_rate_standard','Standard corporate tax rate',9,NULL,'percent',NULL,'Federal Decree-Law No. 47 of 2022 (Corporate Tax Law)',NULL,'Federal Tax Authority (FTA)',NULL,'UNVERIFIED','Placeholder — confirm the rate band(s) in force, including the 0% threshold on lower taxable income, against current FTA guidance.');

-- The Withholding Tax Engine (spec) — deliberately domain='withholding' rows
-- on the SAME tp_regulatory_rule table rather than a new one: a withholding
-- rate is just another jurisdiction-scoped, financial-year-scoped rule with
-- provenance, and the Cross-Border Compliance Matrix / Country Comparison
-- screens already group and display every domain generically, so these
-- appear there with zero UI changes. Scope is deliberately "withholding on
-- a cross-border payment to a non-resident/foreign related party" — the
-- domestic TDS rates this firm already applies to resident payees live in
-- Rate Master's own tds domain and are NOT duplicated here. Every value is
-- left NULL/SOURCE REQUIRED: current, category-specific non-resident
-- withholding rates are exactly the kind of frequently-changing figure this
-- app's own discipline says never to state from memory, and treaty relief
-- (a lower rate under a DTAA) is a separate question from the domestic rate
-- shown here — never assume treaty relief applies without checking residency
-- and beneficial-ownership conditions first.
INSERT OR IGNORE INTO tp_regulatory_rule
 (country, domain, code, label, value_num, value_text, unit, applies_to, law_name, section_article, source_authority, interpretation, verification_status, notes) VALUES
 ('NP','withholding','wht_interest_nonresident','Withholding on interest paid to a non-resident',NULL,'SOURCE REQUIRED — confirm current domestic rate before use','percent','interest','Income Tax Act, 2058 (2002)',NULL,'IRD',NULL,'UNVERIFIED','Domestic rate before any DTAA relief; confirm the payee''s treaty eligibility separately (residency certificate, beneficial ownership).'),
 ('NP','withholding','wht_royalty_nonresident','Withholding on royalty paid to a non-resident',NULL,'SOURCE REQUIRED — confirm current domestic rate before use','percent','royalty','Income Tax Act, 2058 (2002)',NULL,'IRD',NULL,'UNVERIFIED','Domestic rate before any DTAA relief.'),
 ('NP','withholding','wht_technical_service_nonresident','Withholding on management/technical service fees paid to a non-resident',NULL,'SOURCE REQUIRED — confirm current domestic rate before use','percent','services','Income Tax Act, 2058 (2002)',NULL,'IRD',NULL,'UNVERIFIED','Domestic rate before any DTAA relief.'),
 ('NP','withholding','wht_dividend_nonresident','Withholding on dividend paid to a non-resident',NULL,'SOURCE REQUIRED — confirm current domestic rate before use','percent','dividend','Income Tax Act, 2058 (2002)',NULL,'IRD',NULL,'UNVERIFIED','Domestic rate before any DTAA relief.'),
 ('IN','withholding','wht_interest_nonresident','Withholding on interest paid to a non-resident (Sec 195)',NULL,'SOURCE REQUIRED — confirm current domestic rate before use','percent','interest','Income-tax Act, 1961','Sec 195','CBDT',NULL,'UNVERIFIED','Domestic rate before any DTAA relief; Form 15CA/15CB procedural requirements apply separately.'),
 ('IN','withholding','wht_royalty_nonresident','Withholding on royalty/fees for technical services paid to a non-resident (Sec 195)',NULL,'SOURCE REQUIRED — confirm current domestic rate before use','percent','royalty','Income-tax Act, 1961','Sec 195 / Sec 115A','CBDT',NULL,'UNVERIFIED','Domestic rate before any DTAA relief.'),
 ('IN','withholding','wht_dividend_nonresident','Withholding on dividend paid to a non-resident (Sec 195)',NULL,'SOURCE REQUIRED — confirm current domestic rate before use','percent','dividend','Income-tax Act, 1961','Sec 195','CBDT',NULL,'UNVERIFIED','Domestic rate before any DTAA relief.'),
 ('AE','withholding','wht_general_nonresident','UAE withholding tax position on cross-border payments',NULL,'UAE Corporate Tax currently applies a 0% withholding tax rate on most payment categories — confirm this remains current and check for any category-specific exception','percent',NULL,'Federal Decree-Law No. 47 of 2022 (Corporate Tax Law)',NULL,'Federal Tax Authority (FTA)',NULL,'UNVERIFIED','Confirm against current FTA guidance — withholding tax rules can be introduced or amended by Cabinet Decision.');

-- Treaty existence rows for the three core country pairs. Deliberately does
-- NOT assert whether each treaty is in force — in_force is left NULL
-- (unknown) and every row starts UNVERIFIED, because getting this wrong in
-- either direction (claiming a treaty exists when it doesn't, or missing one
-- that does) is a real professional-liability risk this app must not create
-- from memory. Confirm each against the firm's own treaty reference/the
-- relevant tax authority's published treaty list before relying on it.
INSERT OR IGNORE INTO tp_treaty
 (country_a, country_b, treaty_name, in_force, source_authority, verification_status, notes) VALUES
 ('NP','IN','Nepal–India Double Taxation Avoidance Agreement (if applicable)',NULL,'IRD / CBDT','UNVERIFIED','Existence, in-force status, and current article numbering must be confirmed against the official treaty text before use — do not rely on this row alone for a treaty-relief position.'),
 ('NP','AE','Nepal–UAE Double Taxation Avoidance Agreement (if applicable)',NULL,'IRD / Federal Tax Authority (FTA)','UNVERIFIED','Existence, in-force status, and current article numbering must be confirmed against the official treaty text before use — do not rely on this row alone for a treaty-relief position.'),
 ('IN','AE','India–UAE Double Taxation Avoidance Agreement (if applicable)',NULL,'CBDT / Federal Tax Authority (FTA)','UNVERIFIED','Existence, in-force status, and current article numbering must be confirmed against the official treaty text before use — do not rely on this row alone for a treaty-relief position.');
