Agregando calculo de efectivo

This commit is contained in:
2025-01-12 13:30:13 -03:00
parent 7bb61017de
commit 332467f767
8 changed files with 214 additions and 43 deletions

View File

@@ -50,11 +50,7 @@ class Edit extends Component
#[Computed]
public function rendido()
{
$documentos = $this->turno->documentos()->sum('valor');
$egresos = $this->turno->egresos()->sum('valor');
$efectivo = $this->turno->efectivo()->first()?->total ?? 0;
return $documentos + $efectivo + $egresos;
return $this->turno->rendido;
}
#[Computed]
@@ -66,7 +62,7 @@ class Edit extends Component
#[Computed]
public function diferencia()
{
return $this->rendido - $this->debeRendir;
return $this->turno->arqueo;
}
}