<?php

use Illuminate\Database\Seeder;
use App\Account;

class AccountSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
  public function run()
  {
      $count = -1;
      $account = new Account;
      $data = array();

      // RECEIVABLE ACCOUNT
      // $data[++$count] = ['user_id' => 0, 'bill_subcategory_id'=>0, 'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '1','code' => '001-01', 'name' => 'Receivable Account', 'type' => 'General', 'flag' => '1','created_at' => now(),'updated_at' => now()];

      // REVENUE ACCOUNT
      // $data[++$count] = ['user_id' => 0, 'bill_subcategory_id'=>0, 'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '9','code' => '002-01', 'name' => 'Revenue Account', 'type' => 'General','flag' => '1', 'created_at' => now(),'updated_at' => now()];

       // $data[++$count] = ['user_id' => 0, 'bill_subcategory_id'=>0, 'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '9','code' => '002-01', 'name' => 'Booking - Side Payments', 'type' => 'General','flag' => '1', 'created_at' => now(),'updated_at' => now()];
       
      // HR SEEDS
      $data[++$count] = ['user_id' => 0, 'bill_subcategory_id'=>0, 'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '1','code' => '003-01', 'name' => 'Cash In Hand', 'type' => 'Cash', 'flag' => '1','created_at' => now(),'updated_at' => now()];

      $data[++$count] = ['user_id' => 0, 'bill_subcategory_id'=>0, 'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '2','code' => '004-01', 'name' => 'Bank', 'type' => 'Bank', 'flag' => '1','created_at' => now(),'updated_at' => now()];

      $data[++$count] = ['user_id' => 0,  'bill_subcategory_id'=>0,'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '6','code' => '006-01', 'name' => 'Employee Salary', 'type' => 'General', 'flag' => '1','created_at' => now(),'updated_at' => now()];

      $data[++$count] = ['user_id' => 0, 'bill_subcategory_id'=>0, 'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '5','code' => '007-01', 'name' => 'Income from Loan', 'type' => 'General', 'flag' => '1','created_at' => now(),'updated_at' => now()];

      $data[++$count] = ['user_id' => 0,  'bill_subcategory_id'=>0,'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '3','code' => '008-01', 'name' => 'Loan Receivable', 'type' => 'General', 'flag' => '1','created_at' => now(),'updated_at' => now()];

      $data[++$count] = ['user_id' => 0, 'bill_subcategory_id'=>0, 'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '4','code' => '009-02', 'name' => 'Loan Return Account', 'type' => 'General', 'flag' => '1','created_at' => now(),'updated_at' => now()];

      //BILLS AND PAYMENTS SEEDS
      // $data[++$count] = ['user_id' => 0, 'bill_subcategory_id'=>0, 'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '6','code' => '005-02', 'name' => 'Liability From Expense', 'type' => 'General', 'flag' => '1','created_at' => now(),'updated_at' => now()];

      // $data[++$count] = ['user_id' => 0, 'bill_subcategory_id'=>0, 'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '7','code' => '005-02', 'name' => 'Liability From Expense', 'type' => 'General', 'flag' => '1','created_at' => now(),'updated_at' => now()];


        // $data[++$count] = ['user_id' => 0,  'bill_subcategory_id'=>0,'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '9','code' => '006-01', 'name' => 'Booking Commissions', 'type' => 'General', 'flag' => '1','created_at' => now(),'updated_at' => now()];


        // $data[++$count] = ['user_id' => 0,  'bill_subcategory_id'=>0,'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '10','code' => '006-01', 'name' => 'Capital / Equity', 'type' => 'General', 'flag' => '1','created_at' => now(),'updated_at' => now()];

        $data[++$count] = ['user_id' => 0,  'bill_subcategory_id'=>0,'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '7','code' => '006-01', 'name' => 'Inventory from supplies', 'type' => 'General', 'flag' => '1','created_at' => now(),'updated_at' => now()];

        $data[++$count] = ['user_id' => 0,  'bill_subcategory_id'=>0,'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '8','code' => '006-01', 'name' => 'Control Account', 'type' => 'General', 'flag' => '1','created_at' => now(),'updated_at' => now()];

        $data[++$count] = ['user_id' => 0,  'bill_subcategory_id'=>0,'scale_id' => 0, 'designation_id' => 0,'bank' => 0,'head_id' => '9','code' => '006-01', 'name' => 'Vendor', 'type' => 'General', 'flag' => '1','created_at' => now(),'updated_at' => now()];




        
      foreach ($data as $rows)
      {
          $account->storeSubHead($rows);
      }
  }
}
