Columnas y atributos para es_faltante y es_sobrante
This commit is contained in:
parent
6ad00b2de1
commit
3366de8c31
2 changed files with 35 additions and 1 deletions
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class PedidosFaltantesYSobrantes extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('subpedidos', function (Blueprint $table) {
|
||||
$table->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');
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue