<commit_before><?php use_helper('Float'); ?>
<?php use_helper('Vrac'); ?>
<?php use_helper('Date'); ?>

<?php if(count($vracs->rows) > 0): ?>
<?php if(isset($hamza_style) && $hamza_style) : ?>
<div class="row">
    <div class="col-xs-10 col-xs-offset-1">
        <h3>Filtrer</h3>
        <div class="form-group">
            <input type="hidden" data-placeholder="Saisissez un numéro de contrat, un soussigné ou un produit" data-hamzastyle-container="#table_contrats" class="hamzastyle form-control" />
        </div>
    </div>
</div>
<?php endif; ?>


<table id="table_contrats" class="table">
    <thead>
        <tr>
        <th style="width: 0;">&nbsp;</th>
            <th style="width: 70px;">&nbsp;</th>
            <th style="width: 110px;">Date</th>
            <th>Soussignés</th>   
            <th>Produit (Millésime)</th>
            <th style="width: 50px;">Vol.&nbsp;prop. (Vol.&nbsp;enl.)</th>
            <th style="width: 50px;">Prix</th>
            <th style="width: 90px;"></th>
        </tr>
    </thead>
    <tbody>
        <?php
        foreach ($vracs->rows as $value) {
            $elt = $value->getRawValue()->value;
                $vracid = preg_replace('/VRAC-/', '', $elt[VracHistoryView::VALUE_NUMERO]);
                $v = VracClient::getInstance()->findByNumContrat($vracid);
                ?>
                <tr data-words='<?php echo json_encode(array_merge(Search::getWords($elt[VracHistoryView::VALUE_ACHETEUR_NOM]), Search::getWords($elt[VracHistoryView::VALUE_VENDEUR_NOM]), Search::getWords($elt[VracHistoryView::VALUE_MANDATAIRE_NOM]), Search::getWords($elt[VracHistoryView::VALUE_PRODUITLIBELLE]), array(strtolower($elt[VracHistoryView::VALUE_ACHETEUR_NOM]), strtolower($elt[VracHistoryView::VALUE_VENDEUR_NOM]), strtolower($elt[VracHistoryView::VALUE_MANDATAIRE_NOM]), strtolower($elt[VracHistoryView::VALUE_PRODUITLIBELLE]), strtolower(($elt[VracClient::VRAC_VIEW_NUMARCHIVE]) ? $elt[VracClient::VRAC_VIEW_NUMARCHIVE] : ""))), JSON_HEX_APOS | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE) ?>' id="<?php echo vrac_get_id($value) ?>" class="<?php echo statusCssClass($elt[VracHistoryView::VALUE_STATUT]) ?> hamzastyle-item" >
                    <td style="vertical-align: middle;" class="text-center">
                    <span class="<?php echo typeToPictoCssClass($elt[VracHistoryView::VALUE_TYPE]) ?>" style="font-size: 24px;"></span>
                    </td>
                    <td style="vertical-align: middle;">
                    <?php if($elt[VracHistoryView::VALUE_STATUT]): ?>
                    <a href="<?php echo url_for('@vrac_visualisation?numero_contrat='.$vracid) ?>">
                    <?php else: ?>
                    <a href="<?php echo url_for('@vrac_redirect_saisie?numero_contrat='.$vracid) ?>">
                    <?php endif; ?>
                    <?php if($v->numero_archive): ?>
                    <?php echo $v->numero_archive ?>
                    <?php elseif(!$elt[VracHistoryView::VALUE_STATUT]): ?>
                        Brouillon
                    <?php else: ?>
                        Non visé
                    <?php endif; ?>
                    </a>
                    <br />
                    <?php if($v && $v->isTeledeclare()): ?>
                    Télédeclaré
                    <?php endif; ?><commit_msg>Ajout du type de contrat et du millésime<commit_after><?php use_helper('Float'); ?>
<?php use_helper('Vrac'); ?>
<?php use_helper('Date'); ?>

<?php if(count($vracs->rows) > 0): ?>
<?php if(isset($hamza_style) && $hamza_style) : ?>
<div class="row">
    <div class="col-xs-10 col-xs-offset-1">
        <h3>Filtrer</h3>
        <div class="form-group">
            <input type="hidden" data-placeholder="Saisissez un numéro de contrat, un soussigné ou un produit" data-hamzastyle-container="#table_contrats" class="hamzastyle form-control" />
        </div>
    </div>
</div>
<?php endif; ?>


<table id="table_contrats" class="table">
    <thead>
        <tr>
        <th style="width: 0;">&nbsp;</th>
            <th style="width: 70px;">&nbsp;</th>
            <th style="width: 110px;">Date</th>
            <th>Soussignés</th>   
            <th>Produit (Millésime)</th>
            <th style="width: 50px;">Vol.&nbsp;prop. (Vol.&nbsp;enl.)</th>
            <th style="width: 50px;">Prix</th>
            <th style="width: 90px;"></th>
        </tr>
    </thead>
    <tbody>
        <?php
        foreach ($vracs->rows as $value) {
            $elt = $value->getRawValue()->value;
                $vracid = preg_replace('/VRAC-/', '', $elt[VracHistoryView::VALUE_NUMERO]);
                $v = VracClient::getInstance()->findByNumContrat($vracid);
                ?>
                <tr data-words='<?php echo json_encode(array_merge(Search::getWords($elt[VracHistoryView::VALUE_ACHETEUR_NOM]), Search::getWords($elt[VracHistoryView::VALUE_VENDEUR_NOM]), Search::getWords($elt[VracHistoryView::VALUE_MANDATAIRE_NOM]), Search::getWords($elt[VracHistoryView::VALUE_PRODUITLIBELLE]), array(strtolower($elt[VracHistoryView::VALUE_ACHETEUR_NOM]), strtolower($elt[VracHistoryView::VALUE_VENDEUR_NOM]), strtolower($elt[VracHistoryView::VALUE_MANDATAIRE_NOM]), strtolower($elt[VracHistoryView::VALUE_PRODUITLIBELLE]), strtolower($elt[VracClient::VRAC_VIEW_NUMARCHIVE]), strtolower($elt[VracHistoryView::VALUE_MILLESIME]), strtolower(VracClient::$types_transaction[$elt[VracHistoryView::VALUE_TYPE]]))), JSON_HEX_APOS | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE) ?>' id="<?php echo vrac_get_id($value) ?>" class="<?php echo statusCssClass($elt[VracHistoryView::VALUE_STATUT]) ?> hamzastyle-item" >
                    <td style="vertical-align: middle;" class="text-center">
                    <span class="<?php echo typeToPictoCssClass($elt[VracHistoryView::VALUE_TYPE]) ?>" style="font-size: 24px;"></span>
                    </td>
                    <td style="vertical-align: middle;">
                    <?php if($elt[VracHistoryView::VALUE_STATUT]): ?>
                    <a href="<?php echo url_for('@vrac_visualisation?numero_contrat='.$vracid) ?>">
                    <?php else: ?>
                    <a href="<?php echo url_for('@vrac_redirect_saisie?numero_contrat='.$vracid) ?>">
                    <?php endif; ?>
                    <?php if($v->numero_archive): ?>
                    <?php echo $v->numero_archive ?>
                    <?php elseif(!$elt[VracHistoryView::VALUE_STATUT]): ?>
                        Brouillon
                    <?php else: ?>
                        Non visé
                    <?php endif; ?>
                    </a>
                    <br />
                    <?php if($v && $v->isTeledeclare()): ?>
                    Télédeclaré
                    <?php endif; ?>
{'fraction_non_alphanumeric': 0.1737841043890866, 'fraction_numerical': 0.005931198102016607, 'mean_word_length': 2.5915867944621938, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 149, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7659697', 'n_tokens_mistral': 2273, 'n_tokens_neox': 2160, 'n_words': 318}