- Laravel 11 backend with API REST - React 18 + TypeScript + Vite frontend - Multi-parser architecture for accounting systems (CONTPAQi, Aspel, SAP) - 27+ financial metrics calculation - PDF report generation with Browsershot - Complete documentation (10 documents) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
54 lines
1.8 KiB
PHP
54 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\ReporteContable;
|
|
use App\Models\CategoriaContable;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class ReportesContablesSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
// Balance General
|
|
$balanceGeneral = ReporteContable::create(['nombre' => 'Balance General']);
|
|
|
|
$categoriasBalance = [
|
|
['nombre' => 'Activos Circulantes', 'orden' => 1],
|
|
['nombre' => 'Activos No Circulantes', 'orden' => 2],
|
|
['nombre' => 'Pasivo Circulante', 'orden' => 3],
|
|
['nombre' => 'Pasivo No Circulante', 'orden' => 4],
|
|
['nombre' => 'Capital Social', 'orden' => 5],
|
|
['nombre' => 'Pérdidas Ejercicios Anteriores', 'orden' => 6],
|
|
['nombre' => 'Utilidades Ejercicios Anteriores', 'orden' => 7],
|
|
];
|
|
|
|
foreach ($categoriasBalance as $categoria) {
|
|
CategoriaContable::create([
|
|
'reporte_contable_id' => $balanceGeneral->id,
|
|
'nombre' => $categoria['nombre'],
|
|
'orden' => $categoria['orden'],
|
|
]);
|
|
}
|
|
|
|
// Estado de Resultados
|
|
$estadoResultados = ReporteContable::create(['nombre' => 'Estado de Resultados']);
|
|
|
|
$categoriasResultados = [
|
|
['nombre' => 'Ingresos', 'orden' => 1],
|
|
['nombre' => 'Costo de Venta', 'orden' => 2],
|
|
['nombre' => 'Gastos Operativos', 'orden' => 3],
|
|
['nombre' => 'Otros Gastos', 'orden' => 4],
|
|
['nombre' => 'Gastos Financieros', 'orden' => 5],
|
|
];
|
|
|
|
foreach ($categoriasResultados as $categoria) {
|
|
CategoriaContable::create([
|
|
'reporte_contable_id' => $estadoResultados->id,
|
|
'nombre' => $categoria['nombre'],
|
|
'orden' => $categoria['orden'],
|
|
]);
|
|
}
|
|
}
|
|
}
|