{"table_name":"aieo_order_invoice_match_report","full_table_name":"wp_aieo_order_invoice_match_report","description":"Stores order records and related transaction data.","detection_method":"static","confidence":"high","create_sql":"CREATE TABLE IF NOT EXISTS wp_aieo_order_invoice_match_report ( report_month CHAR(7) NULL, -- 'YYYY-MM' order_id BIGINT UNSIGNED NULL, customer_email VARCHAR(255) NULL, order_datetime DATETIME NULL, woo_total DECIMAL(12,2) NULL, -- full Woo total woo_net_total DECIMAL(12,2) NULL, -- products-only total (for comparisons) woo_line_items INT UNSIGNED NULL, woo_qty_sum DECIMAL(12,3) NULL, shippingtype VARCHAR(255) NULL, order_status VARCHAR(50) NULL, invoice_id BIGINT UNSIGNED NULL, invoice_code VARCHAR(40) NULL, invoice_branch VARCHAR(150) NULL, invoice_date DATETIME NULL, invoice_total DECIMAL(12,2) NULL, -- ERP line totals (no VAT uplift) invoice_line_items INT UNSIGNED NULL, invoice_qty_sum DECIMAL(12,3) NULL, overlap_sku_count INT UNSIGNED NULL, overlap_pct_vs_order DECIMAL(5,1) NULL, overlap_pct_vs_invoice DECIMAL(5,1) NULL, price_diff_pct DECIMAL(6,2) NULL, date_diff_days INT NULL, match_status VARCHAR(20) NULL, notes VARCHAR(255) NULL, PRIMARY KEY (report_month, order_id), KEY idx_oimr_match_status (match_status), KEY idx_oimr_order_datetime (order_datetime), KEY idx_oimr_customer_email (customer_email), KEY idx_oimr_invoice_id (invoice_id), KEY idx_oimr_invoice_branch (invoice_branch), KEY idx_oimr_order_status (order_status), KEY idx_oimr_report_month_stat (report_month, match_status) ) ENGINE","columns":[{"name":"report_month","type":"CHAR(7)","nullable":true,"primary_key":false},{"name":"customer_email","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"order_datetime","type":"DATETIME","nullable":true,"primary_key":false},{"name":"woo_total","type":"DECIMAL(12,2)","nullable":true,"primary_key":false},{"name":"woo_qty_sum","type":"DECIMAL(12,3)","nullable":true,"primary_key":false},{"name":"shippingtype","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"order_status","type":"VARCHAR(50)","nullable":true,"primary_key":false},{"name":"invoice_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"invoice_code","type":"VARCHAR(40)","nullable":true,"primary_key":false},{"name":"invoice_branch","type":"VARCHAR(150)","nullable":true,"primary_key":false},{"name":"invoice_date","type":"DATETIME","nullable":true,"primary_key":false},{"name":"invoice_total","type":"DECIMAL(12,2)","nullable":true,"primary_key":false},{"name":"invoice_qty_sum","type":"DECIMAL(12,3)","nullable":true,"primary_key":false},{"name":"overlap_sku_count","type":"INT UNSIGNED","nullable":true,"primary_key":false},{"name":"overlap_pct_vs_order","type":"DECIMAL(5,1)","nullable":true,"primary_key":false},{"name":"overlap_pct_vs_invoice","type":"DECIMAL(5,1)","nullable":true,"primary_key":false},{"name":"price_diff_pct","type":"DECIMAL(6,2)","nullable":true,"primary_key":false},{"name":"date_diff_days","type":"INT","nullable":true,"primary_key":false},{"name":"match_status","type":"VARCHAR(20)","nullable":true,"primary_key":false},{"name":"notes","type":"VARCHAR(255)","nullable":true,"primary_key":false}],"plugin":{"slug":"ai-eshop-optimizer","name":"AI eShop Optimizer","active_installs":10,"version":"8.3","wp_org_url":"https://wordpress.org/plugins/ai-eshop-optimizer/"}}