OwlCyberSecurity - MANAGER
Edit File: 2022_08_14_093112_create_invoices_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('invoices', function (Blueprint $table) { $table->id(); $table->enum('status', ['در حال بررسی', 'پیش فاکتور ارسال شد در انتظار پرداخت', 'در حال خرید', 'خریداری شده', 'تحویل دفتر آمریکا', 'تحویل دفتر اروپا', 'تحویل دفتر کانادا', 'تحویل دفتر آسیا', 'ارسال به دوبی', 'تحویل دفتر دوبی', 'تحویل دفتر ایران', 'تحویل مشتری', 'کنسل' ])->nullable()->index(); $table->timestamp('lastmodifydate')->nullable(); $table->date('invoicedate')->nullable()->index(); $table->string('code', 15)->unique()->index(); $table->enum('orderlevel', ['درخواست','فاکتور','سفارش','تسویه','ارسال','تحویل','نامشخص','آماده برای پرداخت','پرداخت شده','ارسال به مشتری','تحویل مشتری'])->nullable()->index(); $table->decimal('prefactorprice')->nullable(); $table->bigInteger('totalprice'); $table->bigInteger('totaltransportprice'); $table->bigInteger('totalitemprice'); $table->bigInteger('invoicingprice'); $table->bigInteger('othercosts' )->nullable(); $table->date('submitdate')->nullable(); $table->date('finalfactorsenddate')->nullable(); $table->string('description', 1000)->nullable(); $table->tinyInteger('new')->nullable(); $table->tinyInteger('isonesteppayment')->nullable(); $table->tinyInteger('isFromCharsooq')->nullable(); $table->bigInteger('agent_id')->nullable()->unsigned()->index(); $table->bigInteger('user_id')->unsigned()->index(); $table->bigInteger('discount_id')->unsigned()->nullable()->index(); $table->bigInteger('address_id')->nullable()->unsigned()->index(); $table->bigInteger('finalTotaltransportprice'); $table->bigInteger('finalTotalitemprice'); $table->bigInteger('finalOthercosts'); $table->integer('old_id'); $table->date('DeliveredToCustomer')->nullable(); $table->boolean('pay_tax')->default(true); $table->text('pay_description')->nullable(); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('invoices'); } };