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'); + }); + } +}