Rechnungen + Gutschriften

This commit is contained in:
Kevin Adametz 2021-03-31 17:58:25 +02:00
parent 39ef16686a
commit 35ae3da244
33 changed files with 2834 additions and 34 deletions

View file

@ -52,6 +52,8 @@ class CreateShoppingOrdersTable extends Migration
$table->string('txaction', 20)->nullable()->index();
$table->unsignedTinyInteger('shipped')->default(0);
$table->timestamp('shipped_at')->nullable();
$table->string('tracking', 255)->nullable();
$table->char('mode', 4)->nullable();

View file

@ -32,6 +32,8 @@ class CreateShoppingOrderMarginsTable extends Migration
$table->boolean('cancellation')->default(false);
$table->unsignedTinyInteger('status')->index()->default(0);
$table->timestamp('partner_commission_pending_to')->nullable();
$table->boolean('partner_commission_paid')->default(false);
$table->text('content')->nullable();

View file

@ -0,0 +1,48 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUserCreditsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_credits', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('auth_user_id');
$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->date('date')->nullable();
$table->text('credit')->nullable();
$table->text('user_margins')->nullable();
$table->boolean('paid_out')->default(false);
$table->boolean('cancellation')->default(false);
$table->unsignedTinyInteger('status')->index()->default(0);
$table->timestamps();
$table->foreign('auth_user_id')
->references('id')
->on('users');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_credits');
}
}