From 44465c27837f917e9020a8a073019c1063cc6fa9 Mon Sep 17 00:00:00 2001 From: ale Date: Fri, 16 May 2025 14:53:35 -0300 Subject: [PATCH] Quitado total de pivot y de sync subpedido --- app/Subpedido.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Subpedido.php b/app/Subpedido.php index a0c6b5c..29d001e 100644 --- a/app/Subpedido.php +++ b/app/Subpedido.php @@ -16,7 +16,7 @@ class Subpedido extends Model public function productos(): BelongsToMany { - return $this->belongsToMany('App\Producto')->withPivot(["cantidad", "total", "notas"]); + return $this->belongsToMany('App\Producto')->withPivot(["cantidad", "notas"]); } public function grupoDeCompra(): BelongsTo @@ -99,7 +99,6 @@ class Subpedido extends Model $this->productos()->syncWithoutDetaching([ $producto->id => [ 'cantidad' => $cantidad, - 'total' => $cantidad * $producto->precio, 'notas' => $notas, ] ]);