<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddFieldsToInvoice extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('invoices', function (Blueprint $table) {
            $table->string('buyer_company', 50);
            $table->string('reg_no', 100);
            $table->string('address', 120);
            $table->string('contact_no', 20);
            $table->string('po_number', 20);
            $table->string('order_no', 20);
            $table->double('tax_rate')->default(0);
            $table->double('billing_charge_rate');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('invoices', function (Blueprint $table) {
            //
        });
    }
}
