diff --git a/vendor/action/financial_movements/financial_movements_ticket_consult.php b/vendor/action/financial_movements/financial_movements_ticket_consult.php index ef56167..7775af5 100644 --- a/vendor/action/financial_movements/financial_movements_ticket_consult.php +++ b/vendor/action/financial_movements/financial_movements_ticket_consult.php @@ -78,13 +78,13 @@ try{ /** Verifica se é uma tarifa de entrada */ if( strstr($response->resultado->listaHistorico[$i]->descricaoHistorico, 'TAR. ENTRADA') ){ - echo $movement_value_registration_tariff = $Main->MoeadDB(str_replace('R$', '', strstr($response->resultado->listaHistorico[$i]->descricaoHistorico, 'R$'))); + $movement_value_registration_tariff = $Main->MoeadDB(str_replace('R$', '', strstr($response->resultado->listaHistorico[$i]->descricaoHistorico, 'R$'))); } /** Verifica se é uma tarifa de liquidação */ if( strstr($response->resultado->listaHistorico[$i]->descricaoHistorico, 'TAR. LIQUIDAÇÃO') ){ - echo $movement_value_settlement_tariff = $Main->MoeadDB(str_replace('R$', '', strstr($response->resultado->listaHistorico[$i]->descricaoHistorico, 'R$'))); + $movement_value_settlement_tariff = $Main->MoeadDB(str_replace('R$', '', strstr($response->resultado->listaHistorico[$i]->descricaoHistorico, 'R$'))); } } @@ -101,27 +101,27 @@ try{ $movementValuePaid = $Main->MoeadDB(str_replace('R$', '', strstr($response->resultado->listaHistorico[$i]->descricaoHistorico, 'R$'))); /** Descrição da baixa */ - $note = 'Baixado via consulta Sicoob API - '.date('d/m/Y H:i:s') . ' - '.$_SESSION['USERSNAMEFIRST']; + $note = 'Baixado via consulta Sicoob API - '.date('d/m/Y H:i:s'); /** Grava a baixa de pagamento */ - // if($FinancialMovements->SaveMovement($FinancialMovementsValidate->getFinancialMovementsId(), - // 0, - // $FinancialMovementsResult->financial_entries_id, - // substr($response->resultado->listaHistorico[$i]->dataHistorico, 0, 10), - // $movementValuePaid, - // $note, - // 0, - // $movement_value_registration_tariff, - // $movement_value_settlement_tariff)){ + if($FinancialMovements->SaveMovement($FinancialMovementsValidate->getFinancialMovementsId(), + 0, + $FinancialMovementsResult->financial_entries_id, + substr($response->resultado->listaHistorico[$i]->dataHistorico, 0, 10), + $movementValuePaid, + $note, + 0, + $movement_value_registration_tariff, + $movement_value_settlement_tariff)){ - // /** Prepara o retorno */ - // $res = 'Consolidado com sucesso!'; + /** Prepara o retorno */ + $res = 'Consolidado com sucesso!'; - // } else { + } else { - // /** Prepara o retorno */ - // $res = ''.$response->resultado->listaHistorico[$i]->descricaoHistorico.''; - // } + /** Prepara o retorno */ + $res = ''.$response->resultado->listaHistorico[$i]->descricaoHistorico.''; + } } elseif($response->resultado->situacaoBoleto == 'Baixado') {