From 3366de8c31788221d26c76434aa073581a67fe70 Mon Sep 17 00:00:00 2001 From: ale Date: Mon, 23 Dec 2024 19:49:26 -0300 Subject: [PATCH] Columnas y atributos para es_faltante y es_sobrante --- app/Subpedido.php | 2 +- ...3_221907_pedidos_faltantes_y_sobrantes.php | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2024_12_23_221907_pedidos_faltantes_y_sobrantes.php diff --git a/app/Subpedido.php b/app/Subpedido.php index 62eccb1..3341019 100644 --- a/app/Subpedido.php +++ b/app/Subpedido.php @@ -11,7 +11,7 @@ use App\Filtros\FiltroDeSubpedido; class Subpedido extends Model { public $timestamps = false; - protected $fillable = ['grupo_de_compra_id', 'aprobado', 'nombre', 'devoluciones_total', 'devoluciones_notas']; + protected $fillable = ['grupo_de_compra_id', 'aprobado', 'nombre', 'devoluciones_total', 'devoluciones_notas', 'es_faltantes', 'es_sobrantes']; public function productos() { diff --git a/database/migrations/2024_12_23_221907_pedidos_faltantes_y_sobrantes.php b/database/migrations/2024_12_23_221907_pedidos_faltantes_y_sobrantes.php new file mode 100644 index 0000000..7c4285b --- /dev/null +++ b/database/migrations/2024_12_23_221907_pedidos_faltantes_y_sobrantes.php @@ -0,0 +1,34 @@ +boolean('es_faltantes')->default(false); + $table->boolean('es_sobrantes')->default(false); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('subpedidos', function (Blueprint $table) { + $table->dropColumn('es_faltantes'); + $table->dropColumn('es_sobrantes'); + }); + } +}