diff --git a/vendor/model/FinancialMovements.class.php b/vendor/model/FinancialMovements.class.php index e349ffa..4357b52 100644 --- a/vendor/model/FinancialMovements.class.php +++ b/vendor/model/FinancialMovements.class.php @@ -304,20 +304,20 @@ class FinancialMovements fm.status, fm.note, fm.movement_user_confirmed, - c.reference as reference_client, + c.cns as reference_client, fc.reference from financial_movements fm left join companies c on fm.company_id = c.company_id - left join client_budgets cb on fm.client_budgets_id = cb.client_budgets_id + left join companies_budgets cb on fm.companies_budgets_id = cb.companies_budgets_id left join financial_categories fc on cb.financial_categories_id = fc.financial_categories_id - where fm.client_budgets_id = :client_budgets_id + where fm.companies_budgets_id = :companies_budgets_id and fm.status < 3'; /** Preparo o SQL para execução */ $this->stmt = $this->connection->connect()->prepare($this->sql); /** Preencho os parâmetros do SQL */ - $this->stmt->bindParam(':client_budgets_id', $this->companiesBudgetsId); + $this->stmt->bindParam(':companies_budgets_id', $this->companiesBudgetsId); /** Executo o SQL */ $this->stmt->execute(); @@ -481,7 +481,7 @@ class FinancialMovements fm.financial_consolidations_id, fm.user_id, fm.company_id, - fm.client_budgets_id, + fm.companies_budgets_id, fm.users_id_update, fm.description, fm.movement_value, @@ -1078,7 +1078,14 @@ class FinancialMovements } /** Insere um novo registro no banco */ - public function InsertMovements(int $financialAccountsId, int $financialEntriesId, int $financialOutputsId, int $companyId, float $movementValue, string $movementDateScheduled, ? string $reference, ? string $description) + public function InsertMovements(int $financialAccountsId, + int $financialEntriesId, + int $financialOutputsId, + int $companyId, + float $movementValue, + string $movementDateScheduled, + ? string $reference, + ? string $description) {