mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
validation and status changes
This commit is contained in:
@ -18,7 +18,7 @@ class CreateItemsTable extends Migration
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
$table->string('unit')->nullable();
|
||||
$table->integer('price');
|
||||
$table->unsignedBigInteger('price');
|
||||
$table->integer('company_id')->unsigned()->nullable();
|
||||
$table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
|
||||
@ -24,13 +24,13 @@ class CreateInvoicesTable extends Migration
|
||||
$table->string('tax_per_item');
|
||||
$table->string('discount_per_item');
|
||||
$table->text('notes')->nullable();
|
||||
$table->decimal('discount', 15, 0)->nullable();
|
||||
$table->string('discount_type')->nullable();
|
||||
$table->integer('discount_val')->nullable();
|
||||
$table->integer('sub_total');
|
||||
$table->integer('total');
|
||||
$table->integer('tax');
|
||||
$table->integer('due_amount');
|
||||
$table->unsignedBigInteger('discount')->nullable();
|
||||
$table->unsignedBigInteger('discount_val')->nullable();
|
||||
$table->unsignedBigInteger('sub_total');
|
||||
$table->unsignedBigInteger('total');
|
||||
$table->unsignedBigInteger('tax');
|
||||
$table->unsignedBigInteger('due_amount');
|
||||
$table->boolean('sent')->default(false);
|
||||
$table->boolean('viewed')->default(false);
|
||||
$table->string('unique_hash')->nullable();
|
||||
|
||||
@ -17,13 +17,13 @@ class CreateInvoiceItemsTable extends Migration
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
$table->integer('quantity');
|
||||
$table->integer('price');
|
||||
$table->string('discount_type');
|
||||
$table->integer('discount_val');
|
||||
$table->decimal('discount', 15, 0);
|
||||
$table->integer('tax');
|
||||
$table->integer('total');
|
||||
$table->unsignedBigInteger('quantity');
|
||||
$table->unsignedBigInteger('price');
|
||||
$table->unsignedBigInteger('discount_val');
|
||||
$table->unsignedBigInteger('discount');
|
||||
$table->unsignedBigInteger('tax');
|
||||
$table->unsignedBigInteger('total');
|
||||
$table->integer('invoice_id')->unsigned();
|
||||
$table->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade');
|
||||
$table->integer('item_id')->unsigned()->nullable();
|
||||
|
||||
@ -23,12 +23,12 @@ class CreateEstimatesTable extends Migration
|
||||
$table->string('tax_per_item');
|
||||
$table->string('discount_per_item');
|
||||
$table->string('notes')->nullable();
|
||||
$table->decimal('discount', 15, 0)->nullable();
|
||||
$table->string('discount_type')->nullable();
|
||||
$table->integer('discount_val')->nullable();
|
||||
$table->integer('sub_total');
|
||||
$table->integer('total');
|
||||
$table->integer('tax');
|
||||
$table->unsignedBigInteger('discount')->nullable();
|
||||
$table->unsignedBigInteger('discount_val')->nullable();
|
||||
$table->unsignedBigInteger('sub_total');
|
||||
$table->unsignedBigInteger('total');
|
||||
$table->unsignedBigInteger('tax');
|
||||
$table->string('unique_hash')->nullable();
|
||||
$table->integer('user_id')->unsigned()->nullable();
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
|
||||
@ -17,13 +17,13 @@ class CreateEstimateItemsTable extends Migration
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
$table->integer('quantity');
|
||||
$table->string('discount_type');
|
||||
$table->decimal('discount', 15, 0);
|
||||
$table->integer('discount_val');
|
||||
$table->integer('price');
|
||||
$table->integer('tax');
|
||||
$table->integer('total');
|
||||
$table->unsignedBigInteger('quantity');
|
||||
$table->unsignedBigInteger('discount');
|
||||
$table->unsignedBigInteger('discount_val');
|
||||
$table->unsignedBigInteger('price');
|
||||
$table->unsignedBigInteger('tax');
|
||||
$table->unsignedBigInteger('total');
|
||||
$table->integer('item_id')->unsigned()->nullable();
|
||||
$table->foreign('item_id')->references('id')->on('items')->onDelete('cascade');
|
||||
$table->integer('estimate_id')->unsigned();
|
||||
|
||||
@ -17,7 +17,7 @@ class CreateExpensesTable extends Migration
|
||||
$table->increments('id');
|
||||
$table->date('expense_date');
|
||||
$table->string('attachment_receipt')->nullable();
|
||||
$table->integer('amount');
|
||||
$table->unsignedBigInteger('amount');
|
||||
$table->string('notes')->nullable();
|
||||
$table->integer('expense_category_id')->unsigned();
|
||||
$table->foreign('expense_category_id')->references('id')->on('expense_categories')->onDelete('cascade');
|
||||
|
||||
@ -19,7 +19,7 @@ class CreatePaymentsTable extends Migration
|
||||
$table->string('payment_mode')->nullable();
|
||||
$table->date('payment_date');
|
||||
$table->text('notes')->nullable();
|
||||
$table->decimal('amount', 15, 0);
|
||||
$table->unsignedBigInteger('amount');
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
$table->integer('invoice_id')->unsigned()->nullable();
|
||||
|
||||
@ -30,7 +30,7 @@ class CreateTaxesTable extends Migration
|
||||
$table->integer('company_id')->unsigned()->nullable();
|
||||
$table->foreign('company_id')->references('id')->on('companies');
|
||||
$table->string('name');
|
||||
$table->decimal('amount', 15, 0);
|
||||
$table->unsignedBigInteger('amount');
|
||||
$table->decimal('percent', 5, 2);
|
||||
$table->tinyInteger('compound_tax')->default(0);
|
||||
$table->timestamps();
|
||||
|
||||
Reference in New Issue
Block a user