bank reconciliation
This commit is contained in:
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddReconciledColumn extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('bill_payments', function ($table) {
|
||||
$table->boolean('reconciled')->default(0);
|
||||
});
|
||||
|
||||
Schema::table('invoice_payments', function ($table) {
|
||||
$table->boolean('reconciled')->default(0);
|
||||
});
|
||||
|
||||
Schema::table('payments', function ($table) {
|
||||
$table->boolean('reconciled')->default(0);
|
||||
});
|
||||
|
||||
Schema::table('revenues', function ($table) {
|
||||
$table->boolean('reconciled')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('bill_payments', function ($table) {
|
||||
$table->dropColumn('reconciled');
|
||||
});
|
||||
|
||||
Schema::table('invoice_payments', function ($table) {
|
||||
$table->dropColumn('reconciled');
|
||||
});
|
||||
|
||||
Schema::table('payments', function ($table) {
|
||||
$table->dropColumn('reconciled');
|
||||
});
|
||||
|
||||
Schema::table('revenues', function ($table) {
|
||||
$table->dropColumn('reconciled');
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateReconciliationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('reconciliations', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('company_id');
|
||||
$table->integer('account_id');
|
||||
$table->dateTime('started_at');
|
||||
$table->dateTime('ended_at');
|
||||
$table->double('closing_balance', 15, 4)->default('0.0000');
|
||||
$table->boolean('reconciled');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index('company_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('reconciliations');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user