| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- -- Accounting category groups schema
- -- Groups accounting categories by first three digits of category code
- CREATE TABLE IF NOT EXISTS accounting_category_group_names (
- id INT AUTO_INCREMENT PRIMARY KEY,
- category_group_code VARCHAR(3) NOT NULL,
- category_group_name VARCHAR(200) NOT NULL,
- description TEXT NULL,
- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
- updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- UNIQUE KEY unique_category_group_code (category_group_code)
- );
- -- Insert default category groups based on Finnish accounting standards
- INSERT IGNORE INTO accounting_category_group_names (category_group_code, category_group_name, description) VALUES
- ('300', 'Myyntituotot', 'Sales revenue'),
- ('301', 'Myyntituotot', 'Sales revenue'),
- ('302', 'Myyntituotot', 'Sales revenue'),
- ('303', 'Myyntituotot', 'Sales revenue'),
- ('308', 'Myyntituotot', 'Sales revenue'),
- ('309', 'Myyntituotot', 'Sales revenue'),
- ('310', 'Myyntituotot', 'Sales revenue'),
- ('311', 'Myyntituotot', 'Sales revenue'),
- ('312', 'Myyntituotot', 'Sales revenue'),
- ('313', 'Myyntituotot', 'Sales revenue'),
- ('314', 'Myyntituotot', 'Sales revenue'),
- ('333', 'Ainekset ja palvelut', 'Cost of goods and services'),
- ('334', 'Henkilöstökulut', 'Personnel expenses'),
- ('335', 'Poistot ja alaskennaukset', 'Depreciation and write-downs'),
- ('336', 'Muut kulut', 'Other expenses'),
- ('337', 'Rahoituskulut', 'Financing costs'),
- ('341', 'Varausten muutokset', 'Asset changes'),
- ('343', 'Varausten myynnit', 'Asset sales'),
- ('344', 'Matkakulut', 'Travel expenses'),
- ('346', 'Muut kulut', 'Other expenses'),
- ('349', 'Poistot', 'Depreciation'),
- ('353', 'Varainsiirrot', 'Asset transfers'),
- ('354', 'Vähennyskelvottomat kulut', 'Non-deductible expenses'),
- ('365', 'Vakuutukset', 'Insurance'),
- ('366', 'Verot ja maksut', 'Taxes and fees'),
- ('367', 'Yhtiölainat ja muut rahoituskulut', 'Company loans and other financing costs');
|