Se reparo error en el buscador

This commit is contained in:
Guillermo Gutierrez
2023-08-18 09:21:26 -07:00
parent 0946d9e951
commit c74c21a34a
7 changed files with 45 additions and 6 deletions

View File

@@ -65,9 +65,20 @@ class Movimiento extends Model
public function ajusteCambio()
{
if(((float)$this->pago_efectivo) - $this->cambio()>0)
if(((float)$this->pago_efectivo) - $this->cambio()>=0)
{
$this->pago_efectivo-= $this->cambio();
}
}
/**
* Create a new Eloquent model instance.
*
* @return void
*/
public function isTotalMayorCambio() : bool
{
return ($this->pago_tarjeta + $this->pago_vales + $this->pago_transferencia)>$this->precio_venta;
}
}