Agregando datos base

This commit is contained in:
2025-01-05 15:50:44 -03:00
parent c576bd836e
commit fd5298b990
28 changed files with 31043 additions and 15 deletions

View File

@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('turnos', function (Blueprint $table) {
$table->id();
$table->date('fecha');
$table->integer('numero_caja');
$table->integer('numero_turno');
$table->integer('fondo');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('turnos');
}
};

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('calculo_fondos', function (Blueprint $table) {
$table->id();
$table->bigInteger('valor');
$table->text('descripcion');
$table->foreignId('turno_id')->constrained('turnos')->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('calculo_fondos');
}
};

View File

@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('documentos', function (Blueprint $table) {
$table->id();
$table->text('descripcion');
$table->bigInteger('valor');
$table->text('tipo_documento');
$table->foreignId('turno_id')->constrained('turnos')->cascadeOnDelete();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('documentos');
}
};

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('efectivos', function (Blueprint $table) {
$table->id();
$table->bigInteger('veinte_mil')->default(0);
$table->bigInteger('diez_mil')->default(0);
$table->bigInteger('cinco_mil')->default(0);
$table->bigInteger('dos_mil')->default(0);
$table->bigInteger('mil')->default(0);
$table->bigInteger('quinientos')->default(0);
$table->bigInteger('cien')->default(0);
$table->bigInteger('cincuenta')->default(0);
$table->bigInteger('diez')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('efectivos');
}
};

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('egresos', function (Blueprint $table) {
$table->id();
$table->text('numero');
$table->text('descripcion');
$table->bigInteger('valor');
$table->text('tipo_egreso');
$table->foreignId('turno_id')->constrained('turnos')->cascadeOnDelete();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('egresos');
}
};

View File

@@ -0,0 +1,48 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('estados_resultado', function (Blueprint $table) {
$table->id();
$table->date('mes');
$table->bigInteger('costo_venta');
$table->bigInteger('cuenta_corriente_factura');
$table->bigInteger('cuenta_corriente_boleta');
$table->bigInteger('cuenta_corriente_sin_respaldo');
$table->bigInteger('cuenta_corriente_partime');
$table->bigInteger('remuneraciones');
$table->bigInteger('finiquitos');
$table->bigInteger('aguinaldo');
$table->bigInteger('bonos_personal');
$table->bigInteger('honorarios_contador');
$table->bigInteger('arriendo');
$table->bigInteger('agua');
$table->bigInteger('luz');
$table->bigInteger('gas');
$table->bigInteger('telefono');
$table->bigInteger('otro_servicio');
$table->decimal('ppm', 15, 2);
$table->bigInteger('iva_a_favor');
$table->bigInteger('dias_habiles');
$table->bigInteger('dias_trabajados');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('estados_resultado');
}
};

View File

@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('gastos_cuenta_corriente', function (Blueprint $table) {
$table->id();
$table->bigInteger('valor');
$table->text('descripcion');
$table->text('tipo_gasto');
$table->foreignId('estado_resultado_id')->constrained('estados_resultado')->cascadeOnDelete();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('gastos_cuenta_corriente');
}
};

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('ingresos', function (Blueprint $table) {
$table->id();
$table->bigInteger('numero');
$table->bigInteger('numero_z');
$table->bigInteger('ingreso_inicial');
$table->bigInteger('ingreso_final');
$table->bigInteger('total');
$table->text('tipo_ingreso');
$table->foreignId('turno_id')->constrained('turnos')->cascadeOnDelete();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('ingresos');
}
};