Atualizando saídas

This commit is contained in:
Kenio 2025-08-09 12:06:18 -03:00
parent 26a4bd136b
commit b869d8d7c7
3 changed files with 5 additions and 24 deletions

View file

@ -15,7 +15,7 @@ try{
/** Parametros de saida */
$description = isset($_POST['description']) ? (string)filter_input(INPUT_POST,'description', FILTER_SANITIZE_SPECIAL_CHARS) : '';
$clientsId = isset($_POST['clients_id']) ? (int)filter_input(INPUT_POST,'clients_id', FILTER_SANITIZE_SPECIAL_CHARS) : 0;
$companyId = isset($_POST['company_id']) ? (int)filter_input(INPUT_POST,'company_id', FILTER_SANITIZE_SPECIAL_CHARS) : 0;
$financialAccountsId = isset($_POST['financial_accounts_id']) ? (int)filter_input(INPUT_POST,'financial_accounts_id', FILTER_SANITIZE_SPECIAL_CHARS) : 0;
$financialCategoriesId = isset($_POST['financial_categories_id']) ? (int)filter_input(INPUT_POST,'financial_categories_id', FILTER_SANITIZE_SPECIAL_CHARS) : 0;
$fixed = isset($_POST['fixed']) ? (int)filter_input(INPUT_POST,'fixed', FILTER_SANITIZE_SPECIAL_CHARS) : 0;
@ -27,7 +27,7 @@ try{
/** Validando os campos de entrada */
$FinancialOutputsValidate->setDescription($description);
$FinancialOutputsValidate->setClientsId($clientsId);
$FinancialOutputsValidate->setCompanyId($companyId);
$FinancialOutputsValidate->setFinancialAccountsId($financialAccountsId);
$FinancialOutputsValidate->setFinancialCategoriesId($financialCategoriesId);
$FinancialOutputsValidate->setFinancialOutputsId($financialOutputsId);
@ -48,7 +48,7 @@ try{
/** Salva o registro junto ao banco de dados */
if($FinancialOutputs->Save($FinancialOutputsValidate->getFinancialOutputsId(),
$FinancialOutputsValidate->getClientsId(),
$FinancialOutputsValidate->getCompanyId(),
$FinancialOutputsValidate->getDescription(),
$FinancialOutputsValidate->getFixed(),
$FinancialOutputsValidate->getDuration(),

View file

@ -25,7 +25,6 @@ class FinancialOutputsValidate
private $info = null;
private $financialOutputsId = null;
private $companyId = null;
private $clientsId = null;
private $usersId = null;
private $financialAccountsId = null;
private $description = null;
@ -81,24 +80,6 @@ class FinancialOutputsValidate
}
/** Método trata campo clients_id */
public function setClientsId(int $clientsId) : void
{
/** Trata a entrada da informação */
$this->clientsId = isset($clientsId) ? (int)$this->Main->antiInjection($clientsId) : 0;
/** Verifica se a informação foi informada */
/*if( $this->clientsId == 0)
{
/** Adição de elemento */
/*array_push($this->errors, 'O campo "Cliente", deve ser selecionado');
}*/
}
/** Método trata campo users_id */
public function setUsersId(int $usersId) : void
{

View file

@ -108,7 +108,7 @@ class FinancialOutputs
$this->stmt = $this->connection->connect()->prepare($this->sql);
/** Preencho os parâmetros do SQL */
//$this->stmt->bindParam(':financial_outputs_id', $this->financialoutputsId);
$this->stmt->bindParam(':financial_outputs_id', $this->financialOutputsId);
/** Executo o SQL */
$this->stmt->execute();
@ -192,7 +192,7 @@ class FinancialOutputs
/** Parametros */
$this->financialOutputsId = $financialOutputsId;
$this->companyId = $companyId > 0 ? $companyId : null;
$this->companyId = $companyId;
$this->description = $description;
$this->fixed = $fixed;
$this->duration = $duration;