wp_aieo_order_invoice_match_report
StaticStores order records and related transaction data.
Column Definitions
| Column | Type | Nullable |
|---|---|---|
| report_month | CHAR(7) | YES |
| customer_email | VARCHAR(255) | YES |
| order_datetime | DATETIME | YES |
| woo_total | DECIMAL(12,2) | YES |
| woo_qty_sum | DECIMAL(12,3) | YES |
| shippingtype | VARCHAR(255) | YES |
| order_status | VARCHAR(50) | YES |
| invoice_id | BIGINT UNSIGNED | YES |
| invoice_code | VARCHAR(40) | YES |
| invoice_branch | VARCHAR(150) | YES |
| invoice_date | DATETIME | YES |
| invoice_total | DECIMAL(12,2) | YES |
| invoice_qty_sum | DECIMAL(12,3) | YES |
| overlap_sku_count | INT UNSIGNED | YES |
| overlap_pct_vs_order | DECIMAL(5,1) | YES |
| overlap_pct_vs_invoice | DECIMAL(5,1) | YES |
| price_diff_pct | DECIMAL(6,2) | YES |
| date_diff_days | INT | YES |
| match_status | VARCHAR(20) | YES |
| notes | VARCHAR(255) | YES |
CREATE TABLE Statement
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
Safe to delete?
If you have uninstalled AI eShop Optimizer, this table is generally safe to remove. However, always back up your database first.
Note: Some plugins share tables or are dependencies of other plugins. Verify nothing else depends on this table before dropping it.
How to remove this table
DROP TABLE IF EXISTS `wp_aieo_order_invoice_match_report`;
Run this query using phpMyAdmin, Adminer, or your MySQL client. Back up first.
Other tables from AI eShop Optimizer