Atualizando consolidação

This commit is contained in:
Kenio 2025-08-27 07:55:18 -03:00
parent 2545b8c6c3
commit 80e2e284b0
4 changed files with 45 additions and 4 deletions

View file

@ -65,7 +65,10 @@
"rateioNomeTitular" : "ORIUS DESENVOLVIMENTO DE SOFTWARE E TECNOLOGIA LTDA",
"rateioCodigoFinalidadeTed" : "10",
"rateioCodigoTipoContaDestinoTed" : "CC",
"rateioQuantidadeDiasFloat" : 1
"rateioQuantidadeDiasFloat" : 1,
"value_registration_tariff": 0.60,
"value_settlement_tariff": 2.20
},
"datagrid" : {"rows": 20,
"pagination": 10},

View file

@ -252,7 +252,14 @@ try{
for($j=0; $j<count($financialMovementsId); $j++){
/** Atualiza os dados do título junto ao banco de dados */
if($FinancialMovements->updateConsolidatedItem($financialMovementsId[$j], $financialConsolidationsId, $Main->MoeadDB($acrescimos[$j]), $Main->MoeadDB($valor_pago[$j]), $Main->DataDB($data_ocorrencia[$j]), $status[$j])){
if($FinancialMovements->updateConsolidatedItem($financialMovementsId[$j],
$financialConsolidationsId,
$Main->MoeadDB($acrescimos[$j]),
$Main->MoeadDB($valor_pago[$j]),
$Main->DataDB($data_ocorrencia[$j]),
$status[$j],
$Main->getValueRegistrationTariff(),
$Main->getValueSettlementTariff())){
/** Contabiliza os itens consolidados */
$sumUpdate++;

View file

@ -1282,7 +1282,14 @@ class FinancialMovements
}
/** Atualiza a consolidação do item */
public function updateConsolidatedItem(int $financialMovementsId, int $financialConsolidationsId, ? float $movementValueFees, float $movementValuePaid, string $movementDatePaid, string $note)
public function updateConsolidatedItem(int $financialMovementsId,
int $financialConsolidationsId,
? float $movementValueFees,
float $movementValuePaid,
string $movementDatePaid,
string $note,
? float $valueRegistrationTariff,
? float $valueSettlementTariff)
{
/** Parametros de entrada */
$this->financialMovementsId = $financialMovementsId;
@ -1291,6 +1298,8 @@ class FinancialMovements
$this->movementValuePaid = $movementValuePaid;
$this->movementDatePaid = $movementDatePaid;
$this->note = $note;
$this->valueRegistrationTariff = $valueRegistrationTariff;
$this->valueSettlementTariff = $valueSettlementTariff;
/** Consulta SQL */
$this->sql = 'update financial_movements set financial_consolidations_id = :financial_consolidations_id,
@ -1298,7 +1307,9 @@ class FinancialMovements
movement_value_paid = :movement_value_paid,
movement_date_paid = :movement_date_paid,
note = :note,
status = 2
status = 2,
movement_value_registration_tariff = :movement_value_registration_tariff,
movement_value_settlement_tariff = :movement_value_settlement_tariff
where financial_movements_id = :financial_movements_id ';
/** Preparo o sql para receber os valores */
@ -1311,6 +1322,8 @@ class FinancialMovements
$this->stmt->bindParam('movement_date_paid', $this->movementDatePaid);
$this->stmt->bindParam('note', $this->note);
$this->stmt->bindParam('financial_movements_id', $this->financialMovementsId);
$this->stmt->bindParam('movement_value_registration_tariff', $this->valueRegistrationTariff);
$this->stmt->bindParam('movement_value_settlement_tariff', $this->valueSettlementTariff);
/** Executo o SQL */
return $this->stmt->execute();

View file

@ -55,6 +55,8 @@ class Main
private $interval = null;
private $month = null;
private $liberation = null;
private $valueRegistrationTariff = null;
private $valueSettlementTariff = null;
function __construct()
@ -68,12 +70,28 @@ class Main
$this->secondKey = $this->config->{'app'}->{'security'}->{'second_key'};
$this->hash = $this->config->{'app'}->{'security'}->{'hash'};
$this->liberation = $this->config->{'app'}->{'security'}->{'liberation'};
/** Informações de taxa(s) de boleto */
$this->valueRegistrationTariff = $this->config->{'app'}->{'ticket'}->{'value_registration_tariff'};
$this->valueSettlementTariff = $this->config->{'app'}->{'ticket'}->{'value_settlement_tariff'};
/** Parametro do tempo de sessão do usuário */
$this->sessionTime = $this->config->{'app'}->{'session_time'};
}
/** Retorna o valor da taxa de registro de boleto */
public function getValueRegistrationTariff()
{
return $this->valueRegistrationTariff;
}
/** Retorna o valor da taxa de liquidação de boleto */
public function getValueSettlementTariff()
{
return $this->valueSettlementTariff;
}
/** Retorna o metodo de criptografia */
private function getMethod()
{