valor de compra

This commit is contained in:
Felipe
2023-10-09 10:29:05 -05:00
parent eaa4d812c6
commit c262916aae
3 changed files with 946 additions and 753 deletions
+3
View File
@@ -47,6 +47,7 @@ class ShowPromociones extends Component
public $nombre_promocion;
public $descripcion_promocion;
public $valor_promocion;
public $valor_compra_promocion;
public $estado_promocion;
public $fecha_limite_promocion;
public $categoria_id_promocion;
@@ -447,6 +448,7 @@ class ShowPromociones extends Component
$this->validate([
'nombre_promocion' => 'required',
'descripcion_promocion' => 'required',
'valor_compra_promocion' => 'required',
'valor_promocion' => 'required',
'estado_promocion' => 'required',
'fecha_limite_promocion' => 'required',
@@ -476,6 +478,7 @@ class ShowPromociones extends Component
$nueva_promocion->nombre = $this->nombre_promocion;
$nueva_promocion->descripcion = $this->descripcion_promocion;
$nueva_promocion->precio = $this->valor_promocion;
$nueva_promocion->precio_compra = $this->valor_compra_promocion;
$nueva_promocion->visible = $this->estado_promocion;
$nueva_promocion->fecha_limite = $this->fecha_limite_promocion;
$nueva_promocion->categoria_id = $this->categoria_id_promocion;
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('promociones', function (Blueprint $table) {
$table->string('precio_compra')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('promociones', function (Blueprint $table) {
//
});
}
};
File diff suppressed because it is too large Load Diff