validation and status changes

This commit is contained in:
jayvirsinh_gohil
2019-11-12 18:26:29 +05:30
parent 4decc56b7c
commit a144b67a4e
19 changed files with 72 additions and 62 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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');

View File

@ -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();

View File

@ -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');

View File

@ -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();

View File

@ -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();

View File

@ -13,19 +13,19 @@ class EstimateTemplateSeeder extends Seeder
public function run()
{
EstimateTemplate::create([
'name' => 'Estimate Template1',
'name' => 'Template 1',
'view' => 'estimate1',
'path' => '/assets/img/PDF/Template1.png'
]);
EstimateTemplate::create([
'name' => 'Estimate Template2',
'name' => 'Template 2',
'view' => 'estimate2',
'path' => '/assets/img/PDF/Template2.png'
]);
EstimateTemplate::create([
'name' => 'Estimate Template3',
'name' => 'Template 3',
'view' => 'estimate3',
'path' => '/assets/img/PDF/Template3.png'
]);

View File

@ -13,19 +13,19 @@ class InvoiceTemplateSeeder extends Seeder
public function run()
{
InvoiceTemplate::create([
'name' => 'Invoice Template1',
'name' => 'Template 1',
'view' => 'invoice1',
'path' => '/assets/img/PDF/Template1.png'
]);
InvoiceTemplate::create([
'name' => 'Invoice Template2',
'name' => ' Template 2',
'view' => 'invoice2',
'path' => '/assets/img/PDF/Template2.png'
]);
InvoiceTemplate::create([
'name' => 'Invoice Template3',
'name' => 'Template 3',
'view' => 'invoice3',
'path' => '/assets/img/PDF/Template3.png'
]);