Atualizando saídas
This commit is contained in:
parent
4908e9064a
commit
26a4bd136b
1 changed files with 17 additions and 7 deletions
24
vendor/model/FinancialOutputs.class.php
vendored
24
vendor/model/FinancialOutputs.class.php
vendored
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue