Debug
This commit is contained in:
parent
d8ee39e255
commit
2dd03d01f1
3 changed files with 16 additions and 23 deletions
2
vendor/action/companies/companies_save.php
vendored
2
vendor/action/companies/companies_save.php
vendored
|
|
@ -60,8 +60,6 @@ try{
|
|||
$CompaniesValidate->setContractDate($contractDate);
|
||||
$CompaniesValidate->setComputers($computers);
|
||||
$CompaniesValidate->setServers($servers);
|
||||
|
||||
echo $CompaniesValidate->getUserId();
|
||||
|
||||
/** Verifica se não existem erros a serem informados,
|
||||
* caso não haja erro(s) salvo os dados do cliente ou
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class CompaniesValidate
|
|||
{
|
||||
|
||||
/** Trata a entrada da informação */
|
||||
echo $this->userId = $userId > 0 ? (int)$this->Main->antiInjection($userId) : 0;
|
||||
$this->userId = $userId > 0 ? (int)$this->Main->antiInjection($userId) : 0;
|
||||
|
||||
/** Verifica se a informação foi informada */
|
||||
if($this->userId == 0)
|
||||
|
|
|
|||
35
vendor/model/Companies.class.php
vendored
35
vendor/model/Companies.class.php
vendored
|
|
@ -167,7 +167,7 @@ class Companies
|
|||
string $complement,
|
||||
string $district,
|
||||
string $cityId,
|
||||
string $stateInitials,
|
||||
string $stateId,
|
||||
string $active,
|
||||
int $userId)
|
||||
{
|
||||
|
|
@ -183,7 +183,7 @@ class Companies
|
|||
$this->complement = $complement;
|
||||
$this->district = $district;
|
||||
$this->cityId = $cityId;
|
||||
$this->stateInitials = $stateInitials;
|
||||
$this->stateId = $stateId;
|
||||
$this->active = $active;
|
||||
$this->userId = $userId;
|
||||
|
||||
|
|
@ -199,9 +199,8 @@ class Companies
|
|||
number = :number,
|
||||
complement = :complement,
|
||||
district = :district,
|
||||
city = :city,
|
||||
state = :state,
|
||||
state_initials = :state_initials,
|
||||
city_id = :city_id,
|
||||
state_id = :state_id,
|
||||
active = :active
|
||||
where company_id = :company_id';
|
||||
|
||||
|
|
@ -218,9 +217,8 @@ class Companies
|
|||
$this->stmt->bindParam('number', $this->number);
|
||||
$this->stmt->bindParam('complement', $this->complement);
|
||||
$this->stmt->bindParam('district', $this->district);
|
||||
$this->stmt->bindParam('city', $this->city);
|
||||
$this->stmt->bindParam('state', $this->state);
|
||||
$this->stmt->bindParam('state_initials', $this->stateInitials);
|
||||
$this->stmt->bindParam('city_id', $this->cityId);
|
||||
$this->stmt->bindParam('state_id', $this->stateId);
|
||||
$this->stmt->bindParam('active', $this->active);
|
||||
|
||||
}else{//Se o ID não foi informado, grava-se um novo registro
|
||||
|
|
@ -236,9 +234,8 @@ class Companies
|
|||
number,
|
||||
complement,
|
||||
district,
|
||||
city,
|
||||
state,
|
||||
state_initials,
|
||||
city_id,
|
||||
state_id,
|
||||
active
|
||||
) values (:company_id,
|
||||
:user_id,
|
||||
|
|
@ -250,9 +247,8 @@ class Companies
|
|||
:number,
|
||||
:complement,
|
||||
:district,
|
||||
:city,
|
||||
:state,
|
||||
:state_initials,
|
||||
:city_id,
|
||||
:state_id,
|
||||
:active)';
|
||||
|
||||
|
||||
|
|
@ -261,18 +257,17 @@ class Companies
|
|||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam('company_id', $this->companyId);
|
||||
$this->stmt->bindParam('users_id', $_SESSION['USERSID']);/** Informa o usuário responsável pelo nova empresa cadastrada */
|
||||
$this->stmt->bindParam('users_id', $this->userId);/** Informa o usuário responsável pelo nova empresa cadastrada */
|
||||
$this->stmt->bindParam('name_business', $this->nameBusiness);
|
||||
$this->stmt->bindParam('name_fantasy', $this->nameFantasy);
|
||||
$this->stmt->bindParam('document', $this->document);
|
||||
$this->stmt->bindParam('zip_code', $this->zipCode);
|
||||
$this->stmt->bindParam('cnpj', $this->cnpj);
|
||||
$this->stmt->bindParam('cep', $this->cep);
|
||||
$this->stmt->bindParam('adress', $this->adress);
|
||||
$this->stmt->bindParam('number', $this->number);
|
||||
$this->stmt->bindParam('complement', $this->complement);
|
||||
$this->stmt->bindParam('district', $this->district);
|
||||
$this->stmt->bindParam('city', $this->city);
|
||||
$this->stmt->bindParam('state', $this->state);
|
||||
$this->stmt->bindParam('state_initials', $this->stateInitials);
|
||||
$this->stmt->bindParam('city_id', $this->cityId);
|
||||
$this->stmt->bindParam('state_id', $this->stateId);
|
||||
$this->stmt->bindParam('active', $this->active);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue