diff --git a/vendor/model/FinancialMovements.class.php b/vendor/model/FinancialMovements.class.php index 509054f..659de5d 100644 --- a/vendor/model/FinancialMovements.class.php +++ b/vendor/model/FinancialMovements.class.php @@ -754,12 +754,12 @@ class FinancialMovements /** Verifica se é uma consulta por número */ if( (int)$this->search > 0 ){ - $this->and .= ' and c.reference = :reference '; + $this->and .= ' and c.cns = :cns '; } else { $this->and .= ' and fm.description like concat(\'%\', :description, \'%\')'; - $this->and .= ' or c.cns like concat(\'%\', :reference, \'%\')'; + $this->and .= ' or c.cns like concat(\'%\', :cns, \'%\')'; $this->and .= ' or c.name_fantasy like concat(\'%\', :fantasy_name, \'%\')'; $this->and .= ' or fm.reference = :movement_reference'; } @@ -878,7 +878,7 @@ class FinancialMovements /** Verifica se é uma consulta por número */ if( (int)$this->search > 0 ){ - $this->and .= ' and c.reference = :reference '; + $this->and .= ' and c.cns = :cns '; } else {