From 290a2f4705fff817fde6deda6c045cc15fcd654c Mon Sep 17 00:00:00 2001 From: Kenio de Souza Date: Tue, 2 Sep 2025 10:08:01 -0300 Subject: [PATCH] =?UTF-8?q?Ajustando=20relatorio=20de=20movimenta=C3=A7?= =?UTF-8?q?=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/model/FinancialMovements.class.php | 1 + .../financial_movements_datagrid.php | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/vendor/model/FinancialMovements.class.php b/vendor/model/FinancialMovements.class.php index 0627195..0fbce40 100644 --- a/vendor/model/FinancialMovements.class.php +++ b/vendor/model/FinancialMovements.class.php @@ -731,6 +731,7 @@ class FinancialMovements fm.status, fm.movement_value_registration_tariff, fm.movement_value_settlement_tariff, + fm.note, c.reference, c.cns, c.name_fantasy, diff --git a/vendor/print/financial_movements/financial_movements_datagrid.php b/vendor/print/financial_movements/financial_movements_datagrid.php index 2ccd0cb..3b0a9c2 100644 --- a/vendor/print/financial_movements/financial_movements_datagrid.php +++ b/vendor/print/financial_movements/financial_movements_datagrid.php @@ -40,6 +40,7 @@ try{ $totalOutputsPaid = '0.00'; $totalEntriesPaid = '0.00'; $header = null; + $totalFees = '0.00'; /** Verifica se existe consulta informada para validar os campos */ @@ -129,6 +130,7 @@ try{ $header .= ' PAGAMENTO'; $header .= ' DESCRIÇÃO'; $header .= ' CNS'; + $header .= ' Observação'; $header .= ' VALOR R$'; $header .= ' MULTA R$'; $header .= ' TAXAS R$'; @@ -165,6 +167,11 @@ try{ $FinancialMovementsValidate->getDateEnd()); foreach($FinancialMovementsResult as $FinancialMovementsKey => $Result){ + + + /** Calcula o total de taxas */ + $totalFees += $Result->movement_value_registration_tariff+$Result->movement_value_settlement_tariff; + $body .= ' '; $body .= ' '.$Result->movement_reference.''; @@ -172,8 +179,9 @@ try{ $body .= ' '.(isset($Result->movement_date_paid) ? date('d/m/Y', strtotime($Result->movement_date_paid)) : ($Main->CheckDay($Result->movement_date_scheduled) > 1 ? $Main->diffDate($Result->movement_date_scheduled, date('Y-m-d')).' dia(s) de atraso' : '')).''; $body .= ' '.$Result->description.''; $body .= ' '.$Result->cns.''; + $body .= ' '.( isset($Result->note) ? $Result->note : '' ).''; $body .= ' '.number_format($Result->movement_value, 2, ',', '.').''; - $body .= ' '.( isset($Result->movement_value_fees) ? number_format($Result->movement_value_fees, 2, ',', '.') : '').''; + $body .= ' '.( isset($Result->movement_value_paid) ? number_format(($Result->movement_value_paid-$Result->movement_value), 2, ',', '.') : '').''; $body .= ' '.( isset($Result->movement_value_registration_tariff) ? number_format($Result->movement_value_registration_tariff+$Result->movement_value_settlement_tariff, 2, ',', '.') : '').''; $body .= ' '.( isset($Result->movement_value_paid) ? number_format(($Result->movement_value_paid+($Result->movement_value_registration_tariff+$Result->movement_value_settlement_tariff)), 2, ',', '.') : number_format($Result->movement_value, 2, ',', '.')).''; $body .= ' '; @@ -187,7 +195,9 @@ try{ $body .= ''; $body .= '
'; - $body .= 'Total Geral R$ '.number_format($totalGeneral, 2, ',', '.'); + $body .= 'Total R$ '.number_format($totalGeneral, 2, ',', '.').'
'; + $body .= 'Total Taxas R$ '.number_format($totalFees, 2, ',', '.').'
'; + $body .= 'Total Geral R$ '.number_format(($totalGeneral-$totalFees), 2, ',', '.').'
'; /** Acrescenta os dados ao corpo do relatório */ $mpdf->WriteHTML($body);