?? GreyFile — Mystic File Browser

Current path: home/webdevt/cryptoimpot.fr/module/Application/view/layout/



?? Go up: /home/webdevt/cryptoimpot.fr/module/Application/view

?? Viewing: warning-rapport-old.phtml

<?= $this->doctype() ?>

<html lang="fr">

<body>
<?php function number_clean($num){

  //remove zeros from end of number ie. 140.00000 becomes 140.
  $clean = rtrim($num, '0');
  //remove zeros from front of number ie. 0.33 becomes .33
  //$clean = ltrim($clean, '0');
  //remove decimal point if an integer ie. 140. becomes 140
  $clean = rtrim($clean, '.');

  return $clean;
} ?>
<?php $startAnneeRapport = new DateTime($this->annee . '-01-01 00:00:00');
$endAnneeRapport = new DateTime($this->annee . '-12-31 23:59:59'); ?>
<h1>Rapport d'erreurs</h1>


<h2>Quantité vendue supérieure à la quantité présente dans le portefeuille</h2>
<?php foreach ($this->arrayWarningWalletQte as $cryptoCode => $arrayInfosWallet) : ?>
    <h2>Evolution du <?= $cryptoCode ?> détenu dans le portefeuille</h2>
    <table style="border: 1px solid #000; font-size: large">
        <thead>
    <tr>
        <td style="text-align: center; border: 1px solid #000">
            Date
        </td>
        <td style="text-align: center; border: 1px solid #000">
            deltaRound
        </td>
        <td style="text-align: center; border: 1px solid #000">
            delta
        </td>
        <td style="text-align: center; border: 1px solid #000">
            Qté entrée
        </td>
        <td style="text-align: center; border: 1px solid #000">
            Qté sortie
        </td>
        <td style="text-align: center; border: 1px solid #000">
            Cumul avant transaction
        </td>
        <td style="text-align: center; border: 1px solid #000">
            Cumul après transaction
        </td>

    </tr>
        </thead>
        <tbody>
<?php foreach ($arrayInfosWallet as $indexInfos => $infoCumul) : ?>

        <tr>
            <td style="text-align: center; border: 1px solid #000">
                <?= $infoCumul['dateTime']->format('d-m-Y H:i:s') ?>
            </td>
            <td style="text-align: right; border: 1px solid #000">
                <?= $infoCumul['deltaRound'] ?>
            </td>
            <td style="text-align: right; border: 1px solid #000">
                <?= $infoCumul['delta'] ?>
            </td>

            <td style="text-align: right; border: 1px solid #000">
                <?= !empty($infoCumul['qteIn']) ? number_clean(number_format($infoCumul['qteIn'], 10,',' , ' ' )) : '-' ?>
            </td>
            <td style="text-align: right; border: 1px solid #000">
                <?= !empty($infoCumul['qteOut']) ? number_clean(number_format($infoCumul['qteOut'], 10,',' , ' ' )) : '-' ?>
            </td>
            <td style="text-align: right; border: 1px solid #000">
                <?= number_clean(number_format($infoCumul['cumulAvantTransaction'], 10,',' , ' ' )) ?>
            </td>
            <td style="text-align: right; border: 1px solid #000">
                <?= number_clean(number_format($infoCumul['cumulApresTransaction'], 10,',' , ' ' )) ?>
            </td>
        </tr>

<?php endforeach ?>
        </tbody>
    </table>
<?php endforeach ?>

<br pagebreak="true"/>


<h1>Historique des transactions</h1>
<?php foreach ($this->arrayImport as $import) : ?>
    <?php
    $contentFile = file_get_contents($import->getPath());
    //var_dump($content);
    $linesArray = explode("\n", $contentFile); ?>
    <table>
        <?php foreach ($linesArray as $index => $row) : ?>
            <?php $arrayLine = str_getcsv($row); ?>
            <?php if (count($arrayLine) > 1): ?>
                <?php if ($index == 0) : ?>
                    <thead>
                    <tr>
                        <?php foreach ($arrayLine as $field) : ?>
                            <td style="text-align: center; border: 1px solid #000000"><?= $field ?></td>
                        <?php endforeach ?>
                    </tr>
                    </thead>
                <?php else : ?>
                    <?php $linehtml = '<tr>'; ?>

                    <?php foreach ($arrayLine as $indexfield => $field) : ?>
                        <?php if ($indexfield == 0) {
                            $dateLine = new DateTime($field);
                        } ?>
                        <?php $linehtml .= '<td style="text-align: center; border: 1px solid #000000">' . $field . '</td>'; ?>
                    <?php endforeach ?>
                    <?php $linehtml .= '</tr>'; ?>

                    <?php if ($dateLine <= $endAnneeRapport) {
                        echo $linehtml;
                    } ?>
                <?php endif ?>
            <?php endif ?>
        <?php endforeach ?>
    </table>
<?php endforeach; ?>


</body>
</html>


??

??