Update Framework, Invoices
This commit is contained in:
parent
cc5c147c27
commit
9b0b5feb7e
174 changed files with 28356 additions and 8093 deletions
|
|
@ -35,10 +35,12 @@ class CreateShoppingOrdersTable extends Migration
|
|||
|
||||
$table->decimal('subtotal_ws', 13, 2)->nullable();
|
||||
$table->decimal('tax', 8, 2)->nullable();
|
||||
|
||||
$table->string('tax_split', 20)->nullable();
|
||||
|
||||
$table->decimal('total_shipping', 13, 2)->nullable();
|
||||
|
||||
$table->unsignedInteger('points')->nullable();
|
||||
|
||||
$table->unsignedInteger('weight')->nullable();
|
||||
|
||||
$table->boolean('paid')->default(false);
|
||||
|
|
|
|||
|
|
@ -27,8 +27,13 @@ class CreateShoppingOrderItemsTable extends Migration
|
|||
$table->unsignedInteger('qty');
|
||||
$table->decimal('price', 8, 2)->nullable();
|
||||
$table->decimal('price_net', 8, 3)->nullable();
|
||||
|
||||
$table->decimal('tax_rate', 5, 2)->nullable();
|
||||
$table->decimal('tax', 8, 3)->nullable();
|
||||
$table->decimal('price_vk_net', 8, 3)->nullable();
|
||||
$table->decimal('discount', 5, 2)->nullable();
|
||||
|
||||
$table->unsignedInteger('points')->nullable();
|
||||
|
||||
$table->string('slug')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSettingsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('identifier')->index()->nullable();
|
||||
$table->string('slug')->unique()->index();
|
||||
|
||||
$table->unsignedInteger('referenz')->default(0);
|
||||
$table->string('action')->nullable();
|
||||
$table->text('object')->nullable();
|
||||
$table->text('full_text')->nullable();
|
||||
$table->text('text')->nullable();
|
||||
$table->integer('int')->nullable();
|
||||
|
||||
$table->unsignedTinyInteger('status')->default(0);
|
||||
|
||||
$table->string('type', 10)->nullable();
|
||||
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('settings');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserInvoiceCreditsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_invoice_credits', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedInteger('auth_user_id')->nullable();
|
||||
$table->unsignedInteger('shopping_order_id')->nullable();
|
||||
$table->unsignedInteger('shopping_user_id')->nullable();
|
||||
|
||||
//invoice //credit
|
||||
$table->string('type', 7)->index();
|
||||
|
||||
$table->string('str_number', 255)->nullable();
|
||||
$table->unsignedInteger('number', 255)->nullable();
|
||||
|
||||
$table->decimal('net', 13, 2)->nullable();
|
||||
$table->decimal('tax_rate', 8, 2)->nullable();
|
||||
$table->decimal('tax', 8, 2)->nullable();
|
||||
$table->decimal('total', 13, 2)->nullable();
|
||||
|
||||
$table->text('file')->nullable();
|
||||
$table->text('contents')->nullable();
|
||||
$table->text('infos')->nullable();
|
||||
|
||||
$table->string('subject')->nullable();
|
||||
$table->text('address')->nullable();
|
||||
|
||||
$table->boolean('paid')->default(false);
|
||||
$table->date('paid_date')->nullable();
|
||||
|
||||
$table->unsignedInteger('cancellation_id')->nullable();
|
||||
$table->date('cancellation_date')->nullable();
|
||||
|
||||
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('auth_user_id')
|
||||
->references('id')
|
||||
->on('users');
|
||||
|
||||
$table->foreign('shopping_order_id')
|
||||
->references('id')
|
||||
->on('shopping_orders');
|
||||
|
||||
$table->foreign('shopping_user_id')
|
||||
->references('id')
|
||||
->on('shopping_users');
|
||||
|
||||
$table->foreign('cancellation_id')
|
||||
->references('id')
|
||||
->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_credits');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserInvoiceCreditsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_invoice_credits', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->unsignedInteger('auth_user_id')->index()->nullable();
|
||||
$table->unsignedInteger('shopping_order_id')->index()->nullable();
|
||||
$table->unsignedInteger('shopping_user_id')->index()->nullable();
|
||||
|
||||
//invoice //credit
|
||||
$table->string('type', 7)->index();
|
||||
$table->unsignedTinyInteger('month')->nullable();
|
||||
$table->unsignedSmallInteger('year')->nullable();
|
||||
|
||||
$table->string('full_number', 255)->nullable();
|
||||
$table->unsignedInteger('number')->nullable();
|
||||
|
||||
$table->decimal('net', 13, 2)->nullable();
|
||||
$table->decimal('tax_rate', 8, 2)->nullable();
|
||||
$table->decimal('tax', 8, 2)->nullable();
|
||||
$table->decimal('total', 13, 2)->nullable();
|
||||
|
||||
$table->text('file')->nullable();
|
||||
$table->text('contents')->nullable();
|
||||
$table->text('infos')->nullable();
|
||||
|
||||
$table->string('subject')->nullable();
|
||||
$table->text('address')->nullable();
|
||||
|
||||
$table->boolean('paid')->default(false);
|
||||
$table->date('paid_date')->nullable();
|
||||
|
||||
$table->unsignedInteger('cancellation_id')->nullable();
|
||||
$table->date('cancellation_date')->nullable();
|
||||
|
||||
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('auth_user_id')
|
||||
->references('id')
|
||||
->on('users');
|
||||
|
||||
$table->foreign('shopping_order_id')
|
||||
->references('id')
|
||||
->on('shopping_orders');
|
||||
|
||||
$table->foreign('shopping_user_id')
|
||||
->references('id')
|
||||
->on('shopping_users');
|
||||
|
||||
$table->foreign('cancellation_id')
|
||||
->references('id')
|
||||
->on('user_invoice_credits');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_invoice_credits');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserInvoicesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_invoices', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('shopping_order_id')->index();
|
||||
|
||||
//invoice //credit
|
||||
$table->unsignedTinyInteger('month')->nullable();
|
||||
$table->unsignedSmallInteger('year')->nullable();
|
||||
$table->date('date')->nullable();
|
||||
|
||||
$table->string('full_number', 255)->nullable();
|
||||
$table->unsignedInteger('number')->nullable();
|
||||
|
||||
$table->string('filename', 255)->nullable();
|
||||
$table->string('dir', 100)->nullable();
|
||||
|
||||
$table->string('delivery_filename', 255)->nullable();
|
||||
$table->string('delivery_dir', 100)->nullable();
|
||||
|
||||
$table->string('disk', 10)->nullable();
|
||||
|
||||
$table->text('infos')->nullable();
|
||||
|
||||
$table->boolean('paid')->default(false);
|
||||
$table->date('paid_date')->nullable();
|
||||
|
||||
$table->boolean('cancellation')->default(false);
|
||||
$table->unsignedInteger('cancellation_id')->nullable();
|
||||
$table->date('cancellation_date')->nullable();
|
||||
|
||||
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('shopping_order_id')
|
||||
->references('id')
|
||||
->on('shopping_orders');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_invoices');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserSalesVolumesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_sales_volumes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('user_id');
|
||||
$table->unsignedInteger('shopping_order_id')->index()->nullable();
|
||||
$table->unsignedInteger('user_invoice_id')->index()->nullable();
|
||||
|
||||
$table->unsignedTinyInteger('month')->nullable();
|
||||
$table->unsignedSmallInteger('year')->nullable();
|
||||
$table->date('date')->nullable();
|
||||
|
||||
$table->integer('points')->nullable();
|
||||
$table->integer('month_points')->nullable();
|
||||
$table->integer('month_shop_points')->nullable();
|
||||
|
||||
$table->decimal('total_net', 13, 2)->nullable();
|
||||
$table->decimal('month_total_net', 13, 2)->nullable();
|
||||
$table->decimal('month_shop_total_net', 13, 2)->nullable();
|
||||
|
||||
$table->string('message', 255)->nullable();
|
||||
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users');
|
||||
|
||||
$table->foreign('shopping_order_id')
|
||||
->references('id')
|
||||
->on('shopping_orders');
|
||||
|
||||
$table->foreign('user_invoice_id')
|
||||
->references('id')
|
||||
->on('user_invoices');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_sales_volumes');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUsersSalesVolumesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('users_sales_volumes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('user_id');
|
||||
$table->unsignedInteger('shopping_order_id')->index()->nullable();
|
||||
|
||||
$table->unsignedTinyInteger('month')->nullable();
|
||||
$table->unsignedSmallInteger('year')->nullable();
|
||||
$table->date('date')->nullable();
|
||||
|
||||
$table->unsignedInteger('points')->nullable();
|
||||
$table->unsignedInteger('month_points')->nullable();
|
||||
|
||||
$table->decimal('total_net', 13, 2)->nullable();
|
||||
$table->decimal('month_total_net', 13, 2)->nullable();
|
||||
|
||||
$table->string('message', 255)->nullable();
|
||||
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users');
|
||||
|
||||
$table->foreign('shopping_order_id')
|
||||
->references('id')
|
||||
->on('shopping_orders');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('users_sales_volumes');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue