Atualizando arquivos
This commit is contained in:
parent
d3451a33bf
commit
c75723bec1
1 changed files with 10 additions and 10 deletions
20
vendor/model/CompaniesBudgets.class.php
vendored
20
vendor/model/CompaniesBudgets.class.php
vendored
|
|
@ -25,7 +25,7 @@ class CompaniesBudgets
|
|||
private $limit = null;
|
||||
private $companiesBudgetsId = null;
|
||||
private $companiesId = null;
|
||||
private $usersId = null;
|
||||
private $userId = null;
|
||||
private $budget = null;
|
||||
private $dateCreate = null;
|
||||
private $dayDue = null;
|
||||
|
|
@ -75,7 +75,7 @@ class CompaniesBudgets
|
|||
$Field = '';
|
||||
|
||||
/** Lista os campos da tabela para objetos */
|
||||
foreach($this->field as $UsersKey => $Result){
|
||||
foreach($this->field as $userKey => $Result){
|
||||
|
||||
/** Pega o nome do Field/Campo */
|
||||
$Field = $Result->Field;
|
||||
|
|
@ -100,8 +100,8 @@ class CompaniesBudgets
|
|||
/** Consulta SQL */
|
||||
$this->sql = 'select cb.companies_budgets_id,
|
||||
cb.company_id,
|
||||
cb.users_id,
|
||||
cb.users_id_update,
|
||||
cb.user_id,
|
||||
cb.user_id_update,
|
||||
cb.financial_categories_id,
|
||||
cb.financial_accounts_id,
|
||||
cb.budget,
|
||||
|
|
@ -146,7 +146,7 @@ class CompaniesBudgets
|
|||
/** Consulta SQL */
|
||||
$this->sql = 'select cb.companies_budgets_id,
|
||||
cb.company_id,
|
||||
cb.users_id,
|
||||
cb.user_id,
|
||||
cb.products_id,
|
||||
cb.budget,
|
||||
cb.date_create,
|
||||
|
|
@ -163,7 +163,7 @@ class CompaniesBudgets
|
|||
cb.description,
|
||||
u.name_first as responsible
|
||||
from companies_budgets cb
|
||||
left join users u on cb.users_id = u.users_id
|
||||
left join user u on cb.user_id = u.user_id
|
||||
where cb.company_id = :company_id';
|
||||
|
||||
/** Preparo o SQL para execução */
|
||||
|
|
@ -229,7 +229,7 @@ class CompaniesBudgets
|
|||
/** Parametros */
|
||||
$this->companiesBudgetsId = $companiesBudgetsId;
|
||||
$this->companyId = $companyId;
|
||||
$this->usersId = $_SESSION['USERSID'];//Carrega o ID do usuário logado
|
||||
$this->userId = $_SESSION['userID'];//Carrega o ID do usuário logado
|
||||
$this->budget = $budget;
|
||||
$this->dayDue = $dayDue;
|
||||
$this->readjustmentIndex = $readjustmentIndex;
|
||||
|
|
@ -270,7 +270,7 @@ class CompaniesBudgets
|
|||
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'insert into companies_budgets(company_id,
|
||||
users_id,
|
||||
user_id,
|
||||
budget,
|
||||
day_due,
|
||||
readjustment_index,
|
||||
|
|
@ -286,7 +286,7 @@ class CompaniesBudgets
|
|||
financial_accounts_id,
|
||||
products_id
|
||||
) values (:company_id,
|
||||
:users_id,
|
||||
:user_id,
|
||||
:budget,
|
||||
:day_due,
|
||||
:readjustment_index,
|
||||
|
|
@ -320,7 +320,7 @@ class CompaniesBudgets
|
|||
}else{
|
||||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam('users_id', $this->usersId);
|
||||
$this->stmt->bindParam('user_id', $this->userId);
|
||||
$this->stmt->bindParam('company_id', $this->companyId);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue