<?php

$old_ledgers = [
    [
        'code'        => '120',
        'id'          => 1,
        'system'      => 1,
        'category_id' => 1,
        'chart_id'    => 1,
        'name'        => 'Accounts Receivable',
        'unused'      => 1,
    ],
    [
        'code'        => '140',
        'id'          => 2,
        'system'      => 1,
        'category_id' => 3,
        'chart_id'    => 1,
        'name'        => 'Inventory',
    ],
    [
        'code'        => '150',
        'id'          => 3,
        'system'      => 1,
        'category_id' => 2,
        'chart_id'    => 1,
        'name'        => 'Office Equipment',
    ],
    [
        'code'        => '151',
        'id'          => 4,
        'system'      => 1,
        'category_id' => 2,
        'chart_id'    => 1,
        'name'        => 'Less Accumulated Depreciation on Office Equipment',
    ],
    [
        'code'        => '160',
        'id'          => 5,
        'system'      => 1,
        'category_id' => 2,
        'chart_id'    => 1,
        'name'        => 'Computer Equipment',
    ],
    [
        'code'        => '161',
        'id'          => 6,
        'system'      => 1,
        'category_id' => 2,
        'chart_id'    => 1,
        'name'        => 'Less Accumulated Depreciation on Computer Equipment',
    ],
    [
        'code'        => '090',
        'id'          => 7,
        'system'      => 0,
        'category_id' => 6,
        'chart_id'    => 1,
        'name'        => 'Cash',
    ],
    [
        'code'        => '200',
        'id'          => 8,
        'system'      => 1,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Accounts Payable',
        'unused'      => 1,
    ],
    [
        'code'        => '205',
        'id'          => 9,
        'system'      => 0,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Accruals',
    ],
    [
        'code'        => '210',
        'id'          => 10,
        'system'      => 1,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Unpaid Expense Claims',
    ],
    [
        'code'        => '215',
        'id'          => 11,
        'system'      => 1,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Wages Payable',
    ],
    [
        'code'        => '216',
        'id'          => 12,
        'system'      => 0,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Wages Payable - Payroll',
    ],
    [
        'code'        => '220',
        'id'          => 13,
        'system'      => 1,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Sales Tax',
    ],
    [
        'code'        => '230',
        'id'          => 14,
        'system'      => 0,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Employee Tax Payable',
    ],
    [
        'code'        => '235',
        'id'          => 15,
        'system'      => 0,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Employee Benefits Payable',
    ],
    [
        'code'        => '236',
        'id'          => 16,
        'system'      => 0,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Employee Deductions payable',
    ],
    [
        'code'        => '240',
        'id'          => 17,
        'system'      => 0,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Income Tax Payable',
    ],
    [
        'code'        => '250',
        'id'          => 18,
        'system'      => 0,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Suspense',
    ],
    [
        'code'        => '255',
        'id'          => 19,
        'system'      => 1,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Historical Adjustments',
    ],
    [
        'code'        => '260',
        'id'          => 20,
        'system'      => 1,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Rounding',
    ],
    [
        'code'        => '835',
        'id'          => 21,
        'system'      => 0,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Revenue Received in Advance',
    ],
    [
        'code'        => '855',
        'id'          => 22,
        'system'      => 0,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Clearing Account',
    ],
    [
        'code'        => '290',
        'id'          => 23,
        'system'      => 0,
        'category_id' => 9,
        'chart_id'    => 2,
        'name'        => 'Loan',
    ],
    [
        'code'        => '500',
        'id'          => 24,
        'system'      => 1,
        'category_id' => 11,
        'chart_id'    => 5,
        'name'        => 'Costs of Goods Sold',
    ],
    [
        'code'        => '600',
        'id'          => 25,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Advertising',
    ],
    [
        'code'        => '605',
        'id'          => 26,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Bank Service Charges',
    ],
    [
        'code'        => '606',
        'id'          => 107,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Bank Transaction Charge',
    ],
    [
        'code'        => '607',
        'id'          => 108,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Sales Return',
    ],
    [
        'code'        => '610',
        'id'          => 27,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Janitorial Expenses',
    ],
    [
        'code'        => '615',
        'id'          => 28,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Consulting & Accounting',
    ],
    [
        'code'        => '620',
        'id'          => 29,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Entertainment',
    ],
    [
        'code'        => '624',
        'id'          => 30,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Postage & Delivary',
    ],
    [
        'code'        => '628',
        'id'          => 31,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'General Expenses',
    ],
    [
        'code'        => '632',
        'id'          => 32,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Insurance',
    ],
    [
        'code'        => '636',
        'id'          => 33,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Legal Expenses',
    ],
    [
        'code'        => '640',
        'id'          => 34,
        'system'      => 1,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Utilities',
    ],
    [
        'code'        => '644',
        'id'          => 35,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Automobile Expenses',
    ],
    [
        'code'        => '648',
        'id'          => 36,
        'system'      => 1,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Office Expenses',
    ],
    [
        'code'        => '652',
        'id'          => 37,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Printing & Stationary',
    ],
    [
        'code'        => '656',
        'id'          => 38,
        'system'      => 1,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Rent',
    ],
    [
        'code'        => '660',
        'id'          => 39,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Repairs & Maintenance',
    ],
    [
        'code'        => '664',
        'id'          => 40,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Wages & Salaries',
    ],
    [
        'code'        => '668',
        'id'          => 41,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Payroll Tax Expense',
    ],
    [
        'code'        => '672',
        'id'          => 42,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Dues & Subscriptions',
    ],
    [
        'code'        => '676',
        'id'          => 43,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Telephone & Internet',
    ],
    [
        'code'        => '680',
        'id'          => 44,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Travel',
    ],
    [
        'code'        => '684',
        'id'          => 45,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Bad Debts',
    ],
    [
        'code'        => '700',
        'id'          => 46,
        'system'      => 1,
        'category_id' => 10,
        'chart_id'    => 5,
        'name'        => 'Depreciation',
    ],
    [
        'code'        => '710',
        'id'          => 47,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Income Tax Expense',
    ],
    [
        'code'        => '715',
        'id'          => 48,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Employee Benefits Expense',
    ],
    [
        'code'        => '800',
        'id'          => 49,
        'system'      => 0,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Interest Expense',
    ],
    [
        'code'        => '810',
        'id'          => 50,
        'system'      => 1,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Bank Revaluations',
    ],
    [
        'code'        => '815',
        'id'          => 51,
        'system'      => 1,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Unrealized Currency Gains',
    ],
    [
        'code'        => '820',
        'id'          => 52,
        'system'      => 1,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Realized Currency Gains',
    ],
    [
        'code'        => '825',
        'id'          => 53,
        'system'      => 1,
        'category_id' => 12,
        'chart_id'    => 5,
        'name'        => 'Sales Discount',
    ],
    [
        'code'        => '400',
        'id'          => 54,
        'system'      => 0,
        'category_id' => 13,
        'chart_id'    => 4,
        'name'        => 'Sales',
    ],
    [
        'code'        => '460',
        'id'          => 55,
        'system'      => 0,
        'category_id' => 13,
        'chart_id'    => 4,
        'name'        => 'Interest Income',
    ],
    [
        'code'        => '470',
        'id'          => 56,
        'system'      => 0,
        'category_id' => 13,
        'chart_id'    => 4,
        'name'        => 'Other Revenue',
    ],
    [
        'code'        => '475',
        'id'          => 57,
        'system'      => 1,
        'category_id' => 13,
        'chart_id'    => 4,
        'name'        => 'Purchase Discount',
    ],
    [
        'code'        => '300',
        'id'          => 58,
        'system'      => 0,
        'category_id' => 16,
        'chart_id'    => 3,
        'name'        => 'Owners Contribution',
    ],
    [
        'code'        => '310',
        'id'          => 59,
        'system'      => 0,
        'category_id' => 16,
        'chart_id'    => 3,
        'name'        => 'Owners Draw',
    ],
    [
        'code'        => '320',
        'id'          => 60,
        'system'      => 1,
        'category_id' => 16,
        'chart_id'    => 3,
        'name'        => 'Retained Earnings',
    ],
    [
        'code'        => '330',
        'id'          => 61,
        'system'      => 0,
        'category_id' => 16,
        'chart_id'    => 3,
        'name'        => 'Common Stock',
    ],
    [
        'code'        => '092',
        'id'          => 62,
        'system'      => 0,
        'category_id' => 6,
        'chart_id'    => 1,
        'name'        => 'Savings Account',
    ],
    [
        'code'        => '221',
        'id'          => 63,
        'system'      => 1,
        'category_id' => 7,
        'chart_id'    => 2,
        'name'        => 'Shipment Tax',
    ],
];

$ledgers = [
     'asset' => [
         [
             'name'   => 'Allowance for Doubtful Accounts',
             'code'   => 1001,
             'system' => 1,
         ],
         [
             'name'   => 'Interest Receivable',
             'code'   => 1002,
             'system' => 1,
         ],
         [
             'name'   => 'Supplies',
             'code'   => 1003,
             'system' => 1,
         ],
         [
             'name'   => 'Prepaid Insurance',
             'code'   => 1004,
             'system' => 1,
         ],
         [
             'name'   => 'Prepaid Rent',
             'code'   => 1005,
             'system' => 1,
         ],
         [
             'name'   => 'Prepaid Salary',
             'code'   => 1006,
             'system' => 1,
         ],
         [
             'name'   => 'Land',
             'code'   => 1007,
             'system' => 1,
         ],
         [
             'name'   => 'Furniture & Fixture',
             'code'   => 1008,
             'system' => 1,
         ],
         [
             'name'   => 'Buildings',
             'code'   => 1009,
             'system' => 1,
         ],
         [
             'name'   => 'Copyrights',
             'code'   => 1010,
             'system' => 1,
         ],
         [
             'name'   => 'Goodwill',
             'code'   => 1011,
             'system' => 1,
         ],
         [
             'name'   => 'Patents',
             'code'   => 1012,
             'system' => 1,
         ],
         [
             'name'   => 'Accoumulated Depreciation- Buildings',
             'code'   => 1013,
             'system' => 1,
         ],
         [
             'name'   => 'Accoumulated Depreciation- Furniture & Fixtures',
             'code'   => 1014,
             'system' => 1,
         ],
     ],
     'liability' => [
         [
             'name'   => 'Notes Payable',
             'code'   => 1201,
             'system' => 1,
         ],
         [
             'name'   => 'Salaries and Wages Payable',
             'code'   => 1202,
             'system' => 1,
         ],
         [
             'name'   => 'Unearned Rent Revenue',
             'code'   => 1203,
             'system' => 1,
         ],
         [
             'name'   => 'Interest Payable',
             'code'   => 1204,
             'system' => 1,
         ],
         [
             'name'   => 'Dividends Payable',
             'code'   => 1205,
             'system' => 1,
         ],
         [
             'name'   => 'Bonds Payable',
             'code'   => 1206,
             'system' => 1,
         ],
         [
             'name'   => 'Discount on Bonds Payable',
             'code'   => 1207,
             'system' => 1,
         ],
         [
             'name'   => 'Premium on Bonds Payable',
             'code'   => 1208,
             'system' => 1,
         ],
         [
             'name'   => 'Mortgage Payable',
             'code'   => 1209,
             'system' => 1,
         ],
     ],
     'equity' => [
         [
             'name'   => "Owner's Equity",
             'code'   => 1301,
             'system' => 1,
         ],
         [
             'name'   => 'Paid-in Capital in Excess of Par- Common Stock',
             'code'   => 1302,
             'system' => 1,
         ],
         [
             'name'   => 'Paid-in Capital in Excess of Par- Preferred Stock',
             'code'   => 1303,
             'system' => 1,
         ],
         [
             'name'   => 'Preferred Stock',
             'code'   => 1304,
             'system' => 1,
         ],
         [
             'name'   => 'Treasury Stock',
             'code'   => 1305,
             'system' => 1,
         ],
         [
             'name'   => 'Dividends',
             'code'   => 1306,
             'system' => 1,
         ],
         [
             'name'   => 'Income Summary',
             'code'   => 1307,
             'system' => 1,
         ],
     ],
     'income' => [
        [
            'name'   => 'Service Revenue',
            'code'   => 1401,
            'system' => 1,
        ],
        [
            'name'   => 'Sales Revenue',
            'code'   => 1402,
            'system' => 1,
        ],
        [
            'name'   => 'Shipment',
            'code'   => 1411,
            'system' => 1,
        ],
        [
            'name'   => 'Gain on Disposal of Plant Assets',
            'code'   => 1404,
            'system' => 1,
        ],
        [
            'name'    => 'Asset Sales',
            'code'    => 1405,
            'system'  => 1,
        ],
        [
            'name'    => 'Sales Return Discount',
            'code'    => 1406,
            'system'  => 1,
        ],
        [
            'name'    => 'Sales Return Tax',
            'code'    => 1407,
            'system'  => 1,
        ],
        [
            'name'   => 'Purchase Return',
            'code'   => 1408,
            'system' => 1,
        ],
        [
            'name'   => 'Purchase Return VAT',
            'code'   => 1409,
            'system' => 1,
        ],
     ],
     'expense' => [
        [
            'name'   => 'Amortization Expense',
            'code'   => 1501,
            'system' => 1,
        ],
        [
            'name'   => 'Freight-Out',
            'code'   => 1502,
            'system' => 1,
        ],
        [
            'name'   => 'Insurance Expense',
            'code'   => 1503,
            'system' => 1,
        ],
        [
            'name'   => 'Loss on Disposal of Plant Assets',
            'code'   => 1504,
            'system' => 1,
        ],
        [
            'name'   => 'Maintenance and Repairs Expense',
            'code'   => 1505,
            'system' => 1,
        ],
        [
            'name'   => 'Purchase',
            'code'   => 1506,
            'system' => 1,
        ],
        [
            'name'   => 'Asset Purchase',
            'code'   => 1507,
            'system' => 1,
        ],
        [
            'name'   => 'Purchase VAT',
            'code'   => 1509,
            'system' => 1,
        ],
        [
            'name'   => 'Sales Returns and Allowance',
            'code'   => 1403,
            'system' => 1,
        ],
        [
            'name'   => 'Purchase Return Discount',
            'code'   => 1410,
            'system' => 1,
        ],
        [
            'name'   => 'Bank Transaction Charge',
            'code'   => '1508',
            'system' => 1,
        ]
     ],
 ];
