?? GreyFile — Mystic File Browser

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



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

?? Viewing: rapport-2.phtml

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

<html lang="en">

<body>

<?php $t = 1; ?>
<?php $tt = 1; ?>
<?php // Début Détermination des valeurs globales du portefeuille au moment des cessions (212) ?>
<h1><?=$t ?>) Détermination des valeurs globales du portefeuille au moment des cessions (212) en <?= $this->annee ?></h1>


<h2><?=$t ?>.<?=$tt ?>) Evolution du portefeuille dans le temps</h2>

<?php $ttt = 1 ?>
<?php foreach ($this->arrayExplicationWalletApres2019 as $cryptoCode => $arrayInfosWallet) : ?>
<div style="page-break-inside: avoid">
    <h3><?=$t ?>.<?=$tt ?>.<?= $ttt++ ?>) Evolution de la quantité de <?= $cryptoCode ?> détenue dans le portefeuille</h3>
    <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">
                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">
                    <?= isset($infoCumul['qteIn']) ? $this->amount($infoCumul['qteIn'], 'fiat') : '-' ?>
                </td>
                <td style="text-align: right; border: 1px solid #000">
                    <?= isset($infoCumul['qteOut']) ? $this->amount($infoCumul['qteOut'],'fiat') : '-' ?>
                </td>
                <td style="text-align: right; border: 1px solid #000">
                    <?= $this->amount($infoCumul['cumulAvantTransaction'],'fiat') ?>
                </td>
                <td style="text-align: right; border: 1px solid #000">
                    <?= $this->amount($infoCumul['cumulApresTransaction'],'fiat') ?>
                </td>
            </tr>
        <?php endforeach ?>
        </tbody>
    </table>
</div>
<?php endforeach ?>

<br pagebreak="true"/>


<?php $tt++; ?>
<?php $ttt =1 ?>
<?php $indexEvolutionCryptoPortefeuille = 1 ?>
<h2><?= $t ?>.<?= $tt ?>) Calcul de la valeur globale du portefeuille à chaque cession imposable</h2>
<?php foreach ($this->arrayValuesWalletEUR as $cessionIndex => $arrayCessionWalletDetail) : ?>
<?php if( $arrayCessionWalletDetail['datetime']->format('Y') === $this->annee): ?>
    <div style="page-break-inside: avoid">
        <h3><?= $t ?>.<?= $tt ?>.<?= $ttt++ ?>)  Calcul de la valeur globale du portefeuille de la cession <?= ($cessionIndex + 1) ?>
            du <?= $arrayCessionWalletDetail['datetime']->format('d-m-Y H:i:s') ?></h3>

        <table style="font-size: large">
            <?php $totalWalletCession = 0; ?>
            <tr>
                <td style="text-align: center; border: 1px solid #000">
                    Devise
                </td>
                <td style="text-align: center; border: 1px solid #000">
                    Qté
                </td>
                <td style="text-align: center; border: 1px solid #000">
                    Prix unitaire
                </td>
                <td style="text-align: center; border: 1px solid #000">
                    Total
                </td>
            </tr>
            <?php foreach ($arrayCessionWalletDetail['wallet'] as $wallet) : ?>
                <tr>
                    <td style="text-align: center; border: 1px solid #000">
                        <?= $wallet['devise'] ?>
                    </td>
                    <td style="text-align: right; border: 1px solid #000">
                        <?= $wallet['qty'] ?>
                    </td>
                    <td style="text-align: right; border: 1px solid #000">
                        <?= $this->amount($wallet['unitPrice'],'crypto') ?>
                    </td>
                    <td style="text-align: right; border: 1px solid #000">
                        <?= !empty($wallet['totalReel']) ? $this->amount($wallet['totalReel'],'crypto') : $this->amount($wallet['total'],'crypto') ?>
                    </td>

                    <?php $totalWalletCession += !empty($wallet['totalReel']) ? $wallet['totalReel'] : $wallet['total'] ?>
                </tr>
            <?php endforeach; ?>
            <tr>
                <td colspan="4">

                </td>
            </tr>
            <tr>
                <td>

                </td>
                <td>

                </td>
                <td style="text-align: right; border: 1px solid #000">
Total
                </td>
                <td style="text-align: right; border: 1px solid #000">
                    <?= $this->amount($totalWalletCession,'crypto') ?>
                </td>

            </tr>
            <tr>
                <td>

                </td>
                <td>

                </td>
                <td style="text-align: right; border: 3px solid #000">

                    <b style="font-size: 10px">case 212 - cession <?= $cessionIndex + 1 ?></b>
                </td>
                <td style="text-align: right; border: 3px solid #000">

                    <b style="font-size: 10px"><?= $this->amount($totalWalletCession,'fiat-no-cents') ?></b>
                </td>

            </tr>
        </table>
    </div>
    <?php endif ?>
<?php endforeach; ?>

<?php // Fin Détermination des valeurs globales du portefeuille au moment des cessions (212) ?>





<?php // Début Détermination des prix de cession (213), des frais de cession (214) et des prix de cession net des frais (215) ?>
<?php $t++; ?>
<?php $tt=1 ?>
<?php $ttt=1 ?>
<h1><?= $t ?>) Détermination des prix de cession (213), des frais de cession (214) et des prix de cession net des frais (215)</h1>
<h2><?= $t ?>.<?= $tt ?>) Détail des cessions composées de plusieurs transactions</h2>
<?php foreach ($this->arrayDetailFusionLigneMemeDateMemeAsset as $key => $arrayMultiline) : ?>
    <?php if (!empty($arrayMultiline)) : ?>
        <div style="page-break-inside: avoid">
            <?php $cessionIndex = $key + 1 ?>
            <h3><?= $t ?>.<?= $tt++ ?>.<?= $ttt++ ?>) Détail cession <?= $cessionIndex ?></h3>
            <table style="font-size: large">
                <tr>
                    <td style="text-align: center; border: 1px solid #000">
                        #
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        Date
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        Echange
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        Montant échangé
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        Monnaie échangée
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        Montant reçu
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        Monnaie reçue
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        Montant frais
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        Asset frais
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        Montant frais EUR
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        Soulte reçue ou versée
                    </td>
                </tr>

                <?php $totalFeesAmount = 0; ?>
                <?php $totalFeesEUR = 0; ?>
                <?php $totalTradedAmount = 0; ?>
                <?php $totalReceivedAmount = 0; ?>
                <?php foreach ($arrayMultiline as $index => $arrayTransaction) : ?>
                    <?php $totalFeesAmount += $arrayTransaction->feesAmount; ?>
                    <?php $totalTradedAmount += $arrayTransaction->tradedAmount; ?>
                    <?php $totalReceivedAmount += $arrayTransaction->receivedAmount; ?>
                    <?php $totalFeesEUR += $arrayTransaction->feesEUR; ?>
                    <tr>
                        <td style="text-align: center; border: 1px solid #000">
                            <?= $index + 1 ?>
                        </td>
                        <td style="text-align: center; border: 1px solid #000">
                            <?php $datetimeTransaction = new \Datetime($arrayTransaction->datetimeTransaction->date); ?>
                            <?= $datetimeTransaction->format('d-m-Y H:i:s') ?>
                        </td>
                        <td style="text-align: center; border: 1px solid #000">
                            <?= $arrayTransaction->exchange->name ?>
                        </td>
                        <td style="text-align: right; border: 1px solid #000">
                            <?= $this->amount($arrayTransaction->tradedAmount,5) ?>
                        </td>
                        <td style="text-align: center; border: 1px solid #000">
                            <?= $arrayTransaction->tradedCurrency ?>
                        </td>
                        <td style="text-align: right; border: 1px solid #000">
                            <?= $this->amount($arrayTransaction->receivedAmount,'fiat') ?>
                        </td>
                        <td style="text-align: center; border: 1px solid #000">
                            <?= $arrayTransaction->receivedCurrency ?>
                        </td>
                        <td style="text-align: right; border: 1px solid #000">
                            <?= $this->amount($arrayTransaction->feesAmount,'fiat') ?>
                        </td>
                        <td style="text-align: center; border: 1px solid #000">
                            <?= $arrayTransaction->feesCurrency ?>
                        </td>
                        <td style="text-align: right; border: 1px solid #000">
                            <?= $this->amount($arrayTransaction->feesEUR,'fiat') ?>
                        </td>
                        <td style="text-align: right; border: 1px solid #000">0</td>
                    </tr>
                <?php endforeach ?>
                <tr>
                    <td style="text-align: center; border: 1px solid #000">
                        Total
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        <?php $datetimeTransaction = new \Datetime($arrayTransaction->datetimeTransaction->date); ?>
                        <?= $datetimeTransaction->format('d-m-Y H:i:s') ?>
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        <?= $arrayTransaction->exchange->name ?>
                    </td>
                    <td style="text-align: right; border: 1px solid #000">
                        <?= $this->amount($totalTradedAmount,'crypto') ?>
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        <?= $arrayTransaction->tradedCurrency ?>
                    </td>
                    <td style="text-align: right; border: 1px solid #000">
                        <?= $this->amount($totalReceivedAmount,'fiat') ?>
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        <?= $arrayTransaction->receivedCurrency ?>
                    </td>
                    <td style="text-align: right; border: 1px solid #000">
                        <?= $this->amount($totalFeesAmount,'fiat') ?>
                    </td>
                    <td style="text-align: center; border: 1px solid #000">
                        <?= $arrayTransaction->feesCurrency ?>
                    </td>
                    <td style="text-align: right; border: 1px solid #000">
                        <?= $this->amount($totalFeesEUR,'fiat') ?>
                    </td>
                    <td style="text-align: right; border: 1px solid #000"> <?= $this->amount(0,'fiat') ?></td>
                </tr>
<tr>
    <td colspan="11"></td>
</tr>
                <tr>
                    <td colspan="5"></td>

                    <td style="text-align: center; border: 3px solid #000">
                        <b style="font-size: 10px">case 213 - cession <?= $cessionIndex ?></b>
                    </td>
                    <td colspan="3" style="text-align: center;">
                    </td>
                    <td style="text-align: center; border: 3px solid #000">
                        <b style="font-size: 10px">case 214 - cession <?= $cessionIndex ?></b>
                    </td>
                    <td style="text-align: center; border: 3px solid #000">
                        <b style="font-size: 10px">case 216 - cession <?= $cessionIndex ?></b>
                    </td>
                </tr>
                <tr>
                    <td colspan="4"></td>
                    <td style="text-align: right;">

                    </td>
                    <td style="text-align: right; border: 3px solid #000">
                        <b style="font-size: 10px"><?= $this->amount($totalReceivedAmount,'fiat-no-cents') ?></b>
                    </td>
                    <td colspan="3" style="text-align: right;">

                    </td>
                    <td style="text-align: right; border: 3px solid #000">
                        <b style="font-size: 10px"><?= $this->amount($totalFeesEUR,'fiat-no-cents') ?></b>
                    </td>
                    <td style="text-align: right; border: 3px solid #000"><b style="font-size: 10px"><?= $this->amount(0) ?></b></td>
                </tr>

<tr><td colspan="10"></td></tr>
                <tr>
                    <td colspan="9" style="text-align: right;">

                    </td>
                    <td style="text-align: center; border: 3px solid #000">
                        <b style="font-size: 10px">case 215 (213-214) - cession <?= $cessionIndex ?></b>
                    </td>
                    <td style="text-align: center; border: 3px solid #000">
                        <b style="font-size: 10px">case 217 (213 +/- 216) - cession <?= $cessionIndex ?></b>
                    </td>
                </tr>
                <tr>
                    <td colspan="9" style="text-align: right;">

                    </td>
                    <td style="text-align: right; border: 3px solid #000">
                        <b style="font-size: 10px"><?= $this->amount(($totalReceivedAmount - $totalFeesEUR),'fiat-no-cents') ?></b>
                    </td>
                    <td style="text-align: right; border: 3px solid #000">
                        <b style="font-size: 10px"><?= $this->amount(($totalReceivedAmount - $totalFeesEUR),'fiat-no-cents') ?></b>
                    </td>
                </tr>

                <tr><td colspan="10"></td></tr>

                <tr><td colspan="10"></td></tr>
                <tr>
                    <td colspan="10" style="text-align: right;">

                    </td>
                    <td style="text-align: center; border: 3px solid #000">
                        <b style="font-size: 10px">case 218 (213 - 214 +/- 216) - cession <?= $cessionIndex ?></b>
                    </td>
                </tr>
                <tr>
                    <td colspan="10" style="text-align: right;">

                    </td>
                    <td style="text-align: right; border: 3px solid #000">
                        <b style="font-size: 10px"><?= $this->amount(($totalReceivedAmount - $totalFeesEUR),'fiat-no-cents') ?></b>
                    </td>
                </tr>


            </table>
        </div>
    <?php endif ?>
<?php endforeach ?>
<br pagebreak="true"/>
<?php // Fin Détermination des prix de cession (213), des frais de cession (214) et des prix de cession net des frais (215) ?>

</body>
</html>


??

??