Atualizando arquivos

This commit is contained in:
Kenio 2025-08-04 11:29:17 -03:00
parent 6cc5d67cac
commit 32bb2aeb50
2 changed files with 17 additions and 17 deletions

View file

@ -27,7 +27,7 @@ try{
$often = isset($_POST['often']) ? (int)filter_input(INPUT_POST, 'often', FILTER_SANITIZE_NUMBER_INT) : 0;
$dateStart = isset($_POST['date_start']) ? (string)filter_input(INPUT_POST, 'date_start', FILTER_SANITIZE_SPECIAL_CHARS) : '';
$companyId = isset($_POST['company_id']) ? (int)filter_input(INPUT_POST, 'company_id', FILTER_SANITIZE_NUMBER_INT) : 0;
$clientsBudgetsId = isset($_POST['clients_budgets_id']) ? (int)filter_input(INPUT_POST,'clients_budgets_id', FILTER_SANITIZE_NUMBER_INT) : 0;
$companiesBudgetsId = isset($_POST['companies_budgets_id']) ? (int)filter_input(INPUT_POST,'companies_budgets_id', FILTER_SANITIZE_NUMBER_INT) : 0;
$financialCategoriesId = isset($_POST['financial_categories_id']) ? (int)filter_input(INPUT_POST,'financial_categories_id', FILTER_SANITIZE_NUMBER_INT) : 0;
$financialAccountsId = isset($_POST['financial_accounts_id']) ? (int)filter_input(INPUT_POST,'financial_accounts_id', FILTER_SANITIZE_NUMBER_INT) : 0;
$productsId = isset($_POST['products_id']) ? (string)filter_input(INPUT_POST,'products_id', FILTER_SANITIZE_SPECIAL_CHARS) : '';
@ -45,7 +45,7 @@ try{
$CompaniesBudgetsValidate->setOften($often);
$CompaniesBudgetsValidate->setDateStart($dateStart);
$CompaniesBudgetsValidate->setCompanyId($companyId);
$CompaniesBudgetsValidate->setClientsBudgetsId($clientsBudgetsId);
$CompaniesBudgetsValidate->setCompaniesBudgetsId($companiesBudgetsId);
$CompaniesBudgetsValidate->setFinancialCategoriesId($financialCategoriesId);
$CompaniesBudgetsValidate->setFinancialAccountsId($financialAccountsId);
$CompaniesBudgetsValidate->setProductsId($productsId);
@ -64,7 +64,7 @@ try{
} else {
/** Salva as alterações ou cadastra um novo registro */
$budgetsId = $CompaniesBudgets->Save($CompaniesBudgetsValidate->getClientsBudgetsId(),
$budgetsId = $CompaniesBudgets->Save($CompaniesBudgetsValidate->getCompaniesBudgetsId(),
$CompaniesBudgetsValidate->getCompanyId(),
$CompaniesBudgetsValidate->getBudget(),
$CompaniesBudgetsValidate->getDayDue(),
@ -130,7 +130,7 @@ try{
'cod' => 200,
'title' => 'Atenção',
'message' => '<div class="alert alert-success" role="alert">' . ($CompaniesBudgetsValidate->getClientsBudgetsId() > 0 ? 'Orçamento atualizado com sucesso!' : 'Orçamento cadastrado com sucesso!') .'</div>',
'message' => '<div class="alert alert-success" role="alert">' . ($CompaniesBudgetsValidate->getcompaniesBudgetsId() > 0 ? 'Orçamento atualizado com sucesso!' : 'Orçamento cadastrado com sucesso!') .'</div>',
'procedure' => $procedure
];

View file

@ -23,9 +23,9 @@ class CompaniesBudgetsValidate
private $Main = null;
private $errors = array();
private $info = null;
private $clientBudgetsId = null;
private $companiesBudgetsId = null;
private $companyId = null;
private $usersId = null;
private $UserId = null;
private $budget = null;
private $dateCreate = null;
private $dayDue = null;
@ -60,14 +60,14 @@ class CompaniesBudgetsValidate
}
/** Método trata campo companies_budgets_id */
public function setClientBudgetsId(int $clientBudgetsId) : void
public function setCompaniesBudgetsId(int $companiesBudgetsId) : void
{
/** Trata a entrada da informação */
$this->clientBudgetsId = isset($clientBudgetsId) ? (int)$this->Main->antiInjection($clientBudgetsId) : null;
$this->companiesBudgetsId = isset($companiesBudgetsId) ? (int)$this->Main->antiInjection($companiesBudgetsId) : null;
/** Verifica se a informação foi informada */
if(empty($this->clientBudgetsId))
if(empty($this->companiesBudgetsId))
{
/** Adição de elemento */
@ -180,14 +180,14 @@ class CompaniesBudgetsValidate
}
/** Método trata campo users_id */
public function setUsersId(int $usersId) : void
public function setUserId(int $UserId) : void
{
/** Trata a entrada da informação */
$this->usersId = isset($usersId) ? (int)$this->Main->antiInjection($usersId) : null;
$this->UserId = isset($UserId) ? (int)$this->Main->antiInjection($UserId) : null;
/** Verifica se a informação foi informada */
if(empty($this->usersId))
if(empty($this->UserId))
{
/** Adição de elemento */
@ -482,11 +482,11 @@ class CompaniesBudgetsValidate
}
/** Método retorna campo companies_budgets_id */
public function getClientBudgetsId() : ? int
public function getCompaniesBudgetsId() : ? int
{
/** Retorno da informação */
return (int)$this->clientBudgetsId;
return (int)$this->companiesBudgetsId;
}
@ -500,7 +500,7 @@ class CompaniesBudgetsValidate
}
/** Método retorna campo clients_id */
public function getClientsBudgetsId() : ? int
public function getCompaniesBudgetsId() : ? int
{
/** Retorno da informação */
@ -509,11 +509,11 @@ class CompaniesBudgetsValidate
}
/** Método retorna campo users_id */
public function getUsersId() : ? int
public function getUserId() : ? int
{
/** Retorno da informação */
return (int)$this->usersId;
return (int)$this->UserId;
}