From 26a4bd136b592000fe94904af33afb949a783312 Mon Sep 17 00:00:00 2001 From: Kenio de Souza Date: Sat, 9 Aug 2025 11:47:50 -0300 Subject: [PATCH] =?UTF-8?q?Atualizando=20sa=C3=ADdas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/model/FinancialOutputs.class.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/vendor/model/FinancialOutputs.class.php b/vendor/model/FinancialOutputs.class.php index e10eea4..33a24b0 100644 --- a/vendor/model/FinancialOutputs.class.php +++ b/vendor/model/FinancialOutputs.class.php @@ -26,7 +26,7 @@ class FinancialOutputs private $financialOutputsId = null; private $financialCategoriesId = null; private $companyId = null; - private $usersId = null; + private $userId = null; private $description = null; private $fixed = null; private $duration = null; @@ -176,13 +176,23 @@ class FinancialOutputs } /** Insere um novo registro no banco */ - public function Save(int $financialOutputsId, int $clientsId, string $description, int $fixed, int $duration, string $startDate, float $outputValue, string $endDate, int $financialAccountsId, string $active, int $financialCategoriesId) + public function Save(int $financialOutputsId, + int $companyId, + string $description, + int $fixed, + int $duration, + string $startDate, + float $outputValue, + string $endDate, + int $financialAccountsId, + string $active, + int $financialCategoriesId) { /** Parametros */ $this->financialOutputsId = $financialOutputsId; - $this->clientsId = $clientsId > 0 ? $clientsId : null; + $this->companyId = $companyId > 0 ? $companyId : null; $this->description = $description; $this->fixed = $fixed; $this->duration = $duration; @@ -215,7 +225,7 @@ class FinancialOutputs /** Preencho os parâmetros do SQL */ $this->stmt->bindParam('financial_outputs_id', $this->financialOutputsId); - $this->stmt->bindParam('company_id', $this->clientsId); + $this->stmt->bindParam('company_id', $this->companyId); $this->stmt->bindParam('financial_accounts_id', $this->financialAccountsId); $this->stmt->bindParam('financial_categories_id', $this->financialCategoriesId); $this->stmt->bindParam('description', $this->description); @@ -262,7 +272,7 @@ class FinancialOutputs $this->stmt = $this->connection->connect()->prepare($this->sql); /** Preencho os parâmetros do SQL */ - $this->stmt->bindParam('user_id', $_SESSION['USERSID']);/** Informa o usuário responsável pelo novo cliente cadastrado */ + $this->stmt->bindParam('user_id', $_SESSION['userId']);/** Informa o usuário responsável pelo novo cliente cadastrado */ $this->stmt->bindParam('company_id', $this->companyId);/** Informa a qual empresa pertence o cliente */ $this->stmt->bindParam('financial_accounts_id', $this->financialAccountsId); $this->stmt->bindParam('financial_outputs_id', $this->financialOutputsId); @@ -328,7 +338,7 @@ class FinancialOutputs $this->stmt = $this->connection->connect()->prepare($this->sql); /** Preencho os parâmetros do SQL */ - $this->stmt->bindParam('user_id', $_SESSION['USERSID']);/** Informa o usuário responsável pelo novo cliente cadastrado */ + $this->stmt->bindParam('user_id', $_SESSION['userId']);/** Informa o usuário responsável pelo novo cliente cadastrado */ $this->stmt->bindParam('company_id', $this->companyId);/** Informa a qual empresa pertence o cliente */ $this->stmt->bindParam('financial_accounts_id', $this->financialAccountsId); $this->stmt->bindParam('financial_categories_id', $this->financialCategoriesId); @@ -382,7 +392,7 @@ class FinancialOutputs $this->stmt = $this->connection->connect()->prepare($this->sql); /** Preencho os parâmetros do SQL */ - $this->stmt->bindParam('user_id', $_SESSION['USERSID']);/** Informa o usuário responsável pelo novo cliente cadastrado */ + $this->stmt->bindParam('user_id', $_SESSION['userId']);/** Informa o usuário responsável pelo novo cliente cadastrado */ $this->stmt->bindParam('company_id', $this->companyId);/** Informa a qual empresa pertence o cliente */ $this->stmt->bindParam('financial_accounts_id', $this->financialAccountsId); $this->stmt->bindParam('financial_outputs_id', $this->lastid);