'Insurance Expenditure', 'type' => '2'), array('name' => 'Insurance Income', 'type' => '1'), array('name' => 'Utilities', 'type' => '2'), array('name' => 'Drugs', 'type' => '1'), array('name' => 'Sundries Cost Of Goods', 'type' => '7'), array('name' => 'Medical Equipment', 'type' => '3'), array('name' => 'Consultation', 'type' => '1'), array('name' => 'Procedures', 'type' => '1'), array('name' => 'Medico-legal', 'type' => '1'), array('name' => 'Undeposited funds', 'type' => '4'), array('name' => 'Investigations', 'type' => '1'), array('name' => 'Sundries', 'type' => '1'), array('name' => 'Salaries', 'type' => '2'), array('name' => 'Account Payable', 'type' => '9'), array('name' => 'Family Account deposits', 'type' => '6'), array('name' => 'Accounts Receivables', 'type' => '8'), array('name' => 'Drugs Cost Of Goods', 'type' => '7'), array('name' => 'Drugs Inventory Assets', 'type' => '10'), array('name' => 'Other Services', 'type' => '1'), array('name' => 'Fixed Asset Depreciation', 'type' => '2'), array('name' => 'Labs Cost Of Goods', 'type' => '2'), array('name' => 'Radiologies Cost Of Goods', 'type' => '2'), array('name' => 'Dentals Cost Of Goods', 'type' => '2'), array('name' => 'Sundries Inventory Assets', 'type' => '10'), array('name' => 'Equity Account', 'type' => '5'), array('name' => 'Retained Earnings', 'type' => '5'), array('name' => 'Patient Account Balance', 'type' => '6'), array('name' => 'Opening Balance for Banks', 'type' => '5'), array('name' => 'Opening Inventory', 'type' => '5'), array('name' => 'Inpatient Deposits', 'type' => '1'), array('name' => 'Opening Fixed Assets', 'type' => '5'), array('name' => 'Opening Balance for Family Accounts', 'type' => '5'), array('name' => 'Daily Cash Collections', 'type' => '4'), array('name' => 'One Off Discounts', 'type' => '2'), array('name' => 'Ward Discounts', 'type' => '2'), array('name' => 'Stock Adjustment', 'type' => '1'), array('name' => 'Labs Expense Account', 'type' => '2'), array('name' => 'Radiologies Expense Account', 'type' => '2'), array('name' => 'General Items Expense Account', 'type' => '2'), array('name' => 'Dentals Expense Account', 'type' => '2'), array('name' => 'Patient Dependants Expense Account', 'type' => '2'), array('name' => 'Ward Extras Income Account', 'type' => '1'), array('name' => 'General Items Expense Account', 'type' => '2'), array('name' => 'Eye Glasses Cost of Goods', 'type' => '7'), ); foreach ($accounts as $account) { try { // Prevent re-seeding the same data $slug = str_replace(" ", "_", strtolower($account['name'])); if (get_name($slug, 'slug', 'id', 'chart_of_accounts') == 'N/A') { ChartOfAccount::firstOrCreate([ 'name' => $account['name'], 'type' => $account['type'], 'slug' => $slug, 'description' => '', 'sub_account_of' => '0', 'balance' => 0, 'core' => 1, 'created_by' => 1, 'updated_by' => 1 ]); } } catch (\Exception $exception) {} } } }