diff --git a/vendor/action/financial_movements/financial_movements_save.php b/vendor/action/financial_movements/financial_movements_save.php index 856f23d..22b1daa 100644 --- a/vendor/action/financial_movements/financial_movements_save.php +++ b/vendor/action/financial_movements/financial_movements_save.php @@ -23,6 +23,7 @@ try{ $financialEntriesId = isset($_POST['financial_entries_id']) ? (int)filter_input(INPUT_POST,'financial_entries_id', FILTER_SANITIZE_NUMBER_INT) : 0; $movementUserConfirmed = isset($_POST['movement_user_confirmed']) ? (int)filter_input(INPUT_POST,'movement_user_confirmed', FILTER_SANITIZE_NUMBER_INT) : 0; $updateValue = isset($_POST['updateValue']) ? (string)filter_input(INPUT_POST,'updateValue', FILTER_SANITIZE_SPECIAL_CHARS) : 'N'; + $description = isset($_POST['description']) ? (string)filter_input(INPUT_POST,'description', FILTER_SANITIZE_SPECIAL_CHARS) : ''; /** Verifica se é somente atualização de valor */ if($updateValue == 'S'){ @@ -41,6 +42,7 @@ try{ $FinancialMovementsValidate->setMovementValuePaid($movementValuePaid); $FinancialMovementsValidate->setMovementValueFees($movementValueFees); $FinancialMovementsValidate->setMovementMovementUserConfirmed($movementUserConfirmed); + $FinancialMovementsValidate->setDescription($description); } /** Verifica se não existem erros a serem informados */ @@ -101,7 +103,8 @@ try{ $FinancialMovementsValidate->getMovementValueFees(), null, null, - $FinancialMovementsValidate->getMovementMovementUserConfirmed() )){ + $FinancialMovementsValidate->getMovementMovementUserConfirmed(), + $FinancialMovementsValidate->getDescription() )){ /** Informa o resultado positivo **/ $result = [ diff --git a/vendor/model/FinancialMovements.class.php b/vendor/model/FinancialMovements.class.php index 1c03ba9..04c3a2b 100644 --- a/vendor/model/FinancialMovements.class.php +++ b/vendor/model/FinancialMovements.class.php @@ -1247,7 +1247,8 @@ class FinancialMovements ? float $movementValueFees, ? float $movementValueRegistrationTariff, ? float $movementValueSettlementTariff, - int $movementUserConfirmed) + int $movementUserConfirmed, + string $description) { /** Parametros de entrada */ $this->financialMovementsId = $financialMovementsId; @@ -1260,6 +1261,7 @@ class FinancialMovements $this->movementValueRegistrationTariff = $movementValueRegistrationTariff; $this->movementValueSettlementTariff = $movementValueSettlementTariff; $this->movementUserConfirmed = $movementUserConfirmed; + $this->description = $description; /** se o movement_user_confirmed foi informado */ if($this->movementUserConfirmed > 0){ @@ -1272,7 +1274,8 @@ class FinancialMovements movement_value_registration_tariff = :movement_value_registration_tariff, movement_value_settlement_tariff = :movement_value_settlement_tariff, movement_date_update = CURRENT_TIMESTAMP, - user_id_update = :user_id_update + user_id_update = :user_id_update, + description = :description where financial_movements_id = :financial_movements_id "; @@ -1299,6 +1302,7 @@ class FinancialMovements $this->stmt->bindParam('movement_value_settlement_tariff', $this->movementValueSettlementTariff); $this->stmt->bindParam('user_id_update', $_SESSION['USERSID']); $this->stmt->bindParam('financial_movements_id', $this->financialMovementsId); + $this->stmt->bindParam('description', $this->description); /** Verifica se é uma entrada*/ if($this->financialEntriesId > 0){ @@ -1326,7 +1330,8 @@ class FinancialMovements movement_value_settlement_tariff = :movement_value_settlement_tariff, status = 2, movement_date_update = CURRENT_TIMESTAMP, - user_id_update = :user_id_update + user_id_update = :user_id_update, + description = :description where financial_movements_id = :financial_movements_id "; @@ -1353,7 +1358,8 @@ class FinancialMovements $this->stmt->bindParam('movement_value_registration_tariff', $this->movementValueRegistrationTariff); $this->stmt->bindParam('movement_value_settlement_tariff', $this->movementValueSettlementTariff); $this->stmt->bindParam('user_id_update', $_SESSION['USERSID']); - $this->stmt->bindParam('financial_movements_id', $this->financialMovementsId); + $this->stmt->bindParam('financial_movements_id', $this->financialMovementsId); + $this->stmt->bindParam('description', $this->description); /** Verifica se é uma entrada*/ if($this->financialEntriesId > 0){ diff --git a/vendor/view/financial_movements/financial_movements_form.php b/vendor/view/financial_movements/financial_movements_form.php index 61980cc..a035dc5 100644 --- a/vendor/view/financial_movements/financial_movements_form.php +++ b/vendor/view/financial_movements/financial_movements_form.php @@ -61,7 +61,7 @@ try{