Agregado "requiere notas" a productos con 'PTC'
This commit is contained in:
parent
82f5862063
commit
177ba193de
|
@ -25,7 +25,8 @@ class ProductoResource extends JsonResource
|
||||||
'imagen' => optional($this->poster)->url(),
|
'imagen' => optional($this->poster)->url(),
|
||||||
'descripcion' => $this->descripcion,
|
'descripcion' => $this->descripcion,
|
||||||
'apto_veganxs' => $this->apto_veganxs,
|
'apto_veganxs' => $this->apto_veganxs,
|
||||||
'apto_celiacxs' => $this->apto_celiacxs
|
'apto_celiacxs' => $this->apto_celiacxs,
|
||||||
|
'requiere_notas' => $this->requiere_notas,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ class NotasProducto extends Migration
|
||||||
{
|
{
|
||||||
Schema::table('producto_subpedido', function (Blueprint $table) {
|
Schema::table('producto_subpedido', function (Blueprint $table) {
|
||||||
$table->string('notas');
|
$table->string('notas');
|
||||||
$table->boolean('requiere-notas');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +27,6 @@ class NotasProducto extends Migration
|
||||||
{
|
{
|
||||||
Schema::table('producto_subpedido', function (Blueprint $table) {
|
Schema::table('producto_subpedido', function (Blueprint $table) {
|
||||||
$table->dropColumn('notas');
|
$table->dropColumn('notas');
|
||||||
$table->dropColumn('requiere-notas');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class ProductoRequiereNotas extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('productos', function (Blueprint $table) {
|
||||||
|
$table->boolean('requiere_notas')->default(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('productos', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('requiere_notas');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -61,7 +61,8 @@ class CanastaSeeder extends Seeder
|
||||||
'nombre' => trim(str_replace('*', ' ',$registro['Producto'])),
|
'nombre' => trim(str_replace('*', ' ',$registro['Producto'])),
|
||||||
'precio' => $registro['Precio'],
|
'precio' => $registro['Precio'],
|
||||||
'proveedor_id' => $this->obtenerProveedor($registro['Producto']),
|
'proveedor_id' => $this->obtenerProveedor($registro['Producto']),
|
||||||
'bono' => $registro[$this::FILA_HEADER] == "B"
|
'bono' => $registro[$this::FILA_HEADER] == "B",
|
||||||
|
'requiere_notas'=> $registro[$this::FILA_HEADER] =="PTC",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue