Quitado total de pivot y de sync subpedido

This commit is contained in:
Alejandro Tasistro 2025-05-16 14:53:35 -03:00
parent 0b445ee1c5
commit 44465c2783

View file

@ -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,
]
]);