templates/registration/registration_student_registration/show.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Détails | {{ parent() }}{% endblock %}
  3. {% block body %}
  4.     <div class="breadcrumb">
  5.         <h1 class="mr-2">Inscrits</h1>
  6.         <ul>
  7.             <li><a href="{{ path('default') }}" onclick="$('.loader').addClass('is-active');">Accueil</a></li>
  8.             <li><a href="#">Elèves</a></li>
  9.             <li><a href="{{ path('registration_student_registration_index') }}" onclick="$('.loader').addClass('is-active');">Retour</a></li>
  10.             <li>Détails</li>
  11.         </ul>
  12.     </div>
  13.     <div class="separator-breadcrumb border-top"></div>
  14.     <div class="row mb-4">
  15.         <div class="col-md-12">
  16.             <a href="{{ path('registration_student_registration_print_access_card', {'id': registration_student_registration.id}) }}" target="_blank" class="btn btn-dark"><i class="fa fa-print"></i> Carte d'accès</a>
  17.             <a href="{{ path('registration_student_registration_print_card', {'id': registration_student_registration.id}) }}" target="_blank" class="btn btn-dark"><i class="fa fa-print"></i> Carte de sortie</a>
  18.             <a href="{{ path('registration_student_registration_print_attestation_of_attendance', {'id': registration_student_registration.id}) }}" class="btn btn-dark"><i class="fa fa-print"></i> Attestation de fréquentation</a>
  19.             <a href="{{ path('registration_student_registration_print_acknowledgment_receip', {'id': registration_student_registration.id}) }}" class="btn btn-dark"><i class="fa fa-print"></i> Accusé de réception</a>
  20.             <a href="{{ path('registration_student_registration_print', {'id': registration_student_registration.id}) }}" class="btn btn-dark"><i class="fa fa-print"></i> Fiche Inscription</a>
  21.             {% if registration_student_registration.hasTransportFee %}
  22.                 <a href="{{ path('registration_student_registration_print_transpotantion_sheet', {'id': registration_student_registration.id}) }}" class="btn btn-dark"><i class="fa fa-print"></i> Fiche de transport </a>
  23.             {% endif %}
  24.             <a href="{{ path('registration_student_registration_print_fees_details', {'id': registration_student_registration.id}) }}" class="btn btn-dark"><i class="fa fa-print"></i> Détails Frais </a>
  25.             {% if registration_student_registration.registrationStudentAbandonments|length > 0 and not registration_student_registration.isAbandonne %}
  26.                 {% if is_granted('ROLE_ADMIN') %}
  27.                     <a href="#" class="btn btn-warning" onclick="javascript:actionByPathAndElts('{{path('registration_student_registration_abandon', {'id': registration_student_registration.id})}}')"><i class="fa fa-times"></i> Abandonner</a>
  28.                 {% endif %}
  29.             {% endif %}
  30.         </div>
  31.     </div>
  32.     <div class="card user-profile o-hidden mb-4">
  33.         <div class="user-info mt-24">
  34.             {% if registration_student_registration.image %}
  35.                 <img class="profile-picture avatar-lg mb-2" src="{{ vich_uploader_asset(registration_student_registration) }}" alt="" />
  36.                 {% else %}
  37.                     {% if registration_student_registration.student.image %}
  38.                         <img class="profile-picture avatar-lg mb-2" src="{{ vich_uploader_asset(registration_student_registration.student) }}" alt="" />
  39.                     {% endif %}
  40.             {% endif %}
  41.             <p class="m-0 text-24">{{ registration_student_registration.name }}</p>
  42.             <p class="text-muted m-0">Mle: {{ registration_student_registration.student.registrationNumber != 'AUCUN' ? registration_student_registration.student.registrationNumber : registration_student_registration.student.code }}</p>
  43.             <p class="text-muted m-0">Contact: {{ registration_student_registration.student.notificationPhoneNumber }}</p>
  44.             <p class="text-muted m-0">Classe: {{ registration_student_registration.classroom.label }}</p>
  45.         </div>
  46.         <div class="card-body">
  47.             <ul class="nav nav-tabs profile-nav mb-4" id="profileTab" role="tablist">
  48.                 <li class="nav-item"><a class="nav-link active" id="fees-tab" data-toggle="tab" href="#fees" role="tab" aria-controls="fees" aria-selected="false">Frais</a></li>
  49.                 <li class="nav-item"><a class="nav-link" id="shedul-tab" data-toggle="tab" href="#shedul" role="tab" aria-controls="shedul" aria-selected="true">Echéanciers</a></li>
  50.                 <li class="nav-item"><a class="nav-link" id="payments-tab" data-toggle="tab" href="#payments" role="tab" aria-controls="payments" aria-selected="false">Réçus</a></li>
  51.                 {% if registration_student_registration.accountingCredits|length > 0 %}
  52.                     <li class="nav-item"><a class="nav-link" id="credit-tab" data-toggle="tab" href="#credit" role="tab" aria-controls="credit" aria-selected="false">Avoirs</a></li>
  53.                 {% endif %}
  54.                 <li class="nav-item"><a class="nav-link" id="reportCard-tab" data-toggle="tab" href="#reportCard" role="tab" aria-controls="reportCard" aria-selected="false">Bulletins</a></li>
  55.                 {% if registration_student_registration.hasTransportFee %}
  56.                     <li class="nav-item"><a class="nav-link" id="transport-tab" data-toggle="tab" href="#transport" role="tab" aria-controls="transport" aria-selected="false">Transport</a></li>
  57.                 {% endif %}
  58.             </ul>
  59.             <div class="tab-content" id="profileTabContent">
  60.                 <div class="tab-pane fade active show" id="fees" role="tabpanel" aria-labelledby="fees-tab">
  61.                     <a href="#" class="btn btn-primary" data-toggle="modal" data-target="#addFeeModal">Ajouter</a>
  62.                     {# <a href="#" class="btn btn-warning" data-toggle="modal" data-target="#addAnteriorBalanceModal">Ajouter Solde Anterieur</a> #}
  63.                     {% if is_granted('ROLE_SUPPRESSION_FRAIS') %}
  64.                         <a href="#" class="btn btn-danger" onclick="javascript:actionByPathAndElts('{{path('accounting_student_registration_fees_selected_delete')}}')" id="delete-selected-btn"><i class="fa fa-trash"></i> Supprimer</a>
  65.                     {% endif %}
  66.                     <br /><br />
  67.                     {{ include('accounting/accounting_student_registration_fee/_table.html.twig') }}
  68.                 </div>
  69.                 <div class="tab-pane fade" id="shedul" role="tabpanel" aria-labelledby="shedul-tab">
  70.                     <a href="{{ path('registration_student_registration_print_schedule', {'id': registration_student_registration.id}) }}" class="btn btn-dark mb-3"><i class="fa fa-print"></i> Imprimer l'échéancier</a>
  71.                     <br />
  72.                     {{ include('accounting/accounting_student_registration_fee_shedul/_table.html.twig') }}
  73.                 </div>
  74.                 <div class="tab-pane fade" id="payments" role="tabpanel" aria-labelledby="payments-tab">
  75.                     {{ include('accounting/accounting_student_registration_payment/_table.html.twig') }}
  76.                 </div>
  77.                 {% if registration_student_registration.accountingCredits|length > 0 %}
  78.                     <div class="tab-pane fade" id="credit" role="tabpanel" aria-labelledby="credit-tab">
  79.                         <div class="table-responsive">
  80.                             <table class="display table table-striped table-bordered">
  81.                                 <thead>
  82.                                     <tr>
  83.                                         <th>#</th>
  84.                                         <th>AVOIR N°</th>
  85.                                         <th>Date</th>
  86.                                         <th class="text-center">Montant</th>
  87.                                         <th class="text-center">Etat</th>
  88.                                         <th width="10%" class="text-center">Action</th>
  89.                                     </tr>
  90.                                 </thead>
  91.                                 <tbody>
  92.                                 {% for accounting_credit in registration_student_registration.accountingCredits %}
  93.                                         <tr>
  94.                                             <td>{{ loop.index }}</td>
  95.                                             <td>{{ accounting_credit.id }} [{{ accounting_credit.studentRegistration.student }}] [{{ accounting_credit.studentRegistration.classroom.label }}]</td>
  96.                                             <td>{{ accounting_credit.createDate ? accounting_credit.createDate|date('d/m/Y') : '' }}</td>
  97.                                             <td class="text-center">{{ accounting_credit.amount|number_format(0, ',', ' ') }}</td>
  98.                                             {% if accounting_credit.isValidated %}
  99.                                                 <td class="text-center">VALIDE</td>
  100.                                                 {% else %}
  101.                                                     {% if accounting_credit.amount > 0 %}
  102.                                                         <td class="text-center">EN ATTENTE DE VALIDATION</td>
  103.                                                         {% else %}
  104.                                                             <td class="text-center">BROUILLON</td>
  105.                                                     {% endif %}
  106.                                             {% endif %}
  107.                                             <td class="text-center">
  108.                                                 {% if accounting_credit.isValidated %}
  109.                                                     <a href="{{ path('accounting_credit_print', {'id': accounting_credit.id})}}" class="btn-sm btn-dark"><i class="fa fa-print"></i></a>
  110.                                                     {% else %}
  111.                                                     <a href="{{ path('accounting_credit_student_add', {'id': accounting_credit.studentRegistration.id})}}" class="btn-sm btn-primary"><i class="fa fa-eye"></i></a>
  112.                                                 {% endif %}
  113.                                             </td>
  114.                                         </tr>
  115.                                     {#% endif %#}
  116.                                     {% for accounting_credit_line in accounting_credit.accountingCreditLines %}
  117.                                         <tr>
  118.                                             <td class="text-right"></td>
  119.                                             <td class="text-right text-danger">Réçus N°{{ accounting_credit_line.paymentCode }}</td>
  120.                                             <td>{{ accounting_credit_line.paymentDate ? accounting_credit_line.paymentDate|date('d/m/Y') }}</td>
  121.                                             <td class="text-center">{{ accounting_credit_line.paymentAmount|number_format(0, ',', ' ') }}</td>
  122.                                             <td class="text-center">SUPPRIMER</td>
  123.                                             <td class="text-center">
  124.                                                 <a href="{{ path('preview', {'file': 'RECU_N_' ~ registration_student_registration.student.code ~ '_' ~ accounting_credit_line.paymentCode ~ '.pdf', 'dir': 'cashRegister'})}}" class="btn-sm btn-dark"><i class="fa fa-print"></i></a>
  125.                                             </td>
  126.                                         </tr>
  127.                                     {% endfor %}
  128.                                 {% endfor %}
  129.                                 </tbody>
  130.                             </table>
  131.                         </div>
  132.                     </div>
  133.                 {% endif %}
  134.                 <div class="tab-pane fade" id="reportCard" role="tabpanel" aria-labelledby="reportCard-tab">
  135.                     
  136.                 </div>
  137.                 {% if registration_student_registration.hasTransportFee %}
  138.                     <div class="tab-pane fade" id="transport" role="tabpanel" aria-labelledby="transport-tab">
  139.                         {{ include('registration/registration_student_registration/_transport_checkpoint_table.html.twig') }}
  140.                     </div>
  141.                 {% endif %}
  142.             </div>
  143.         </div>
  144.     </div>
  145.     <div class="modal fade" id="addFeeModal" role="dialog" aria-labelledby="addFeeModal" aria-hidden="true">
  146.         <div class="modal-dialog" role="document">
  147.             <div class="modal-content">
  148.                 <div class="modal-header">
  149.                     <h5 class="modal-title" id="addFeeModal_title">Ajouter frais</h5>
  150.                     <button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
  151.                 </div>
  152.                 {{ form_start(accounting_student_registration_fee_form) }}
  153.                     <div class="modal-body">
  154.                         <div class="form-group">
  155.                             <label class="col-form-label" for="accounting_student_registration_fee_fee">Frais:</label>
  156.                             {{ form_widget(accounting_student_registration_fee_form.fee,{'attr': {'class': 'form-control select', 'style': 'width: 100%;'}}) }}
  157.                         </div>
  158.                         <div class="form-group">
  159.                             <label class="col-form-label" for="accounting_student_registration_fee_quantity">Quantité:</label>
  160.                             {{ form_widget(accounting_student_registration_fee_form.quantity,{'attr': {'class': 'form-control', 'style': 'width: 100%;'}}) }}
  161.                         </div>
  162.                         <div class="form-group duration">
  163.                             <label class="col-form-label" for="accounting_student_registration_fee_start_at">Date debut:</label>
  164.                             {{ form_widget(accounting_student_registration_fee_form.start_at,{'attr': {'class': 'form-control', 'style': 'width: 100%;'}}) }}
  165.                         </div>
  166.                     </div>
  167.                     <div class="modal-footer">
  168.                         <button class="btn btn-secondary" type="button" data-dismiss="modal">Annuler</button>
  169.                         <button class="btn btn-primary" onclick="$('.loader').addClass('is-active');" type="submit">Ajouter</button>
  170.                     </div>
  171.                 {{ form_end(accounting_student_registration_fee_form) }}
  172.             </div>
  173.         </div>
  174.     </div>
  175.     {# <div class="modal fade" id="addAnteriorBalanceModal" tabindex="-1" role="dialog" aria-labelledby="addAnteriorBalanceModal" aria-hidden="true">
  176.         <div class="modal-dialog" role="document">
  177.             <div class="modal-content">
  178.                 <div class="modal-header">
  179.                     <h5 class="modal-title" id="addAnteriorBalanceModal_title">Ajouter Solde Anterieur</h5>
  180.                     <button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
  181.                 </div>
  182.                 <form method="get">
  183.                     <div class="modal-body">
  184.                         <div class="form-group">
  185.                             <label class="col-form-label" for="anterior_balance_amount">Montant:</label>
  186.                             <input type="number" class="form-control" name="anterior_balance_amount" id="anterior_balance_amount">
  187.                             <input type="hidden" name="__cd_token___" value="soldeAnterieur">
  188.                         </div>
  189.                     </div>
  190.                     <div class="modal-footer">
  191.                         <button class="btn btn-secondary" type="button" data-dismiss="modal">Annuler</button>
  192.                         <button class="btn btn-primary" type="submit">Ajouter</button>
  193.                     </div>
  194.                 </form>
  195.             </div>
  196.         </div>
  197.     </div> #}
  198. {% endblock %}
  199. {% block javascripts %}
  200.     {{ parent() }}
  201.     <script>
  202.         $(document).ready(function () {
  203.             $('.duration').hide();
  204.             $('#addCheckPointBtn').hide();
  205.             $('#registration_transport_checkpoint_transportZone').change(function(){
  206.                 id = $('#registration_transport_checkpoint_transportZone').val();
  207.                 getZoneInfo(id);
  208.             }).trigger("change");
  209.             $('#registration_transport_checkpoint_transportZoneCheckPoint').change(function(){
  210.                 id2 = $('#registration_transport_checkpoint_transportZoneCheckPoint').val();
  211.                 getSheduleInfo(id2);
  212.             });
  213.             $('#accounting_student_registration_fee_fee').change(function(){
  214.                 idFee = $('#accounting_student_registration_fee_fee').val();
  215.                 getFeeHasDuration(idFee);
  216.             }).trigger("change");
  217.         })
  218.         function getZoneInfo(sId) {
  219.             console.log('entity ' + sId);
  220.             path = '{{ path('api_transport_zone_info') }}';
  221.             $('#registration_transport_checkpoint_transportVehicle').html('');
  222.             $('#registration_transport_checkpoint_transportZoneCheckPoint').html('');
  223.             axios.get(path, {
  224.             params: {
  225.                 id: sId,
  226.             }
  227.             }).then(function (response) {
  228.                 console.log(response.data);
  229.                 if(response.data.code == 200){
  230.                     var checkPointOption = '';
  231.                     var carOption = '';
  232.                     for(var i = 0; i < response.data.checkpoints.length; i++){
  233.                         checkPointOption = "<option value=" + response.data.checkpoints[i].id + ">" + response.data.checkpoints[i].name + "</option>";
  234.                         $('#registration_transport_checkpoint_transportZoneCheckPoint').append(checkPointOption);
  235.                     }
  236.                     if(response.data.carId > 0){
  237.                         carOption = "<option value=" + response.data.carId + ">" + response.data.carName + "</option>";
  238.                         $('#registration_transport_checkpoint_transportVehicle').append(carOption);
  239.                     }
  240.                     getSheduleInfo($('#registration_transport_checkpoint_transportZoneCheckPoint').val());
  241.                     
  242.                     $('#addCheckPointBtn').show();
  243.                 }else{
  244.                     console.log(response.data.message);
  245.                     $('#addCheckPointBtn').hide();
  246.                 }
  247.                 console.log(response.data.message);
  248.                 //$(".loader").removeClass("is-active");
  249.             });
  250.         }
  251.         function getFeeHasDuration(sId) {
  252.             console.log('entity ' + sId);
  253.             path = '{{ path('api_setting_fee_has_duration') }}';
  254.             
  255.             axios.get(path, {
  256.             params: {
  257.                 id: sId,
  258.             }
  259.             }).then(function (response) {
  260.                 console.log(response.data);
  261.                 if(response.data.code == 200){
  262.                     $('.duration').show();
  263.                 }else{
  264.                     console.log(response.data.message);
  265.                     $('.duration').hide();
  266.                 }
  267.                 console.log(response.data.message);
  268.             });
  269.         }
  270.         function getSheduleInfo(sId2) {
  271.             console.log('entity ' + sId2);
  272.             path = '{{ path('api_transport_zone_check_point_info') }}';
  273.             $('#registration_transport_checkpoint_morning_schedule').val('recherche...');
  274.             $('#registration_transport_checkpoint_evening_schedule').val('recherche...');
  275.             axios.get(path, {
  276.             params: {
  277.                 id: sId2,
  278.             }
  279.             }).then(function (response) {
  280.                 console.log(response.data);
  281.                 if(response.data.code == 200){
  282.                     $('#registration_transport_checkpoint_morning_schedule').val(response.data.morningSchedule);
  283.                     $('#registration_transport_checkpoint_evening_schedule').val(response.data.eveningSchedule);
  284.                     
  285.                     $('#addCheckPointBtn').show();
  286.                 }else{
  287.                     console.log(response.data.message);
  288.                     $('#addCheckPointBtn').hide();
  289.                 }
  290.                 console.log(response.data.message);
  291.                 //$(".loader").removeClass("is-active");
  292.             });
  293.         }
  294.         function cancelShedul(path, sid) {
  295.             $('#registration_transport_checkpoint_transportVehicle').html('');
  296.             $('#registration_transport_checkpoint_transportZoneCheckPoint').html('');
  297.             axios.get(path, {
  298.             params: {
  299.                 id: sid,
  300.                 amount: $('#registration_transport_checkpoint_transportZoneCheckPoint').html('')
  301.             }
  302.             }).then(function (response) {
  303.                 console.log(response.data);
  304.                 if(response.data.code == 200){
  305.                     var checkPointOption = '';
  306.                     var carOption = '';
  307.                     for(var i = 0; i < response.data.checkpoints.length; i++){
  308.                         checkPointOption = "<option value=" + response.data.checkpoints[i].id + ">" + response.data.checkpoints[i].name + "</option>";
  309.                         $('#registration_transport_checkpoint_transportZoneCheckPoint').append(checkPointOption);
  310.                     }
  311.                     if(response.data.carId > 0){
  312.                         carOption = "<option value=" + response.data.carId + ">" + response.data.carName + "</option>";
  313.                         $('#registration_transport_checkpoint_transportVehicle').append(carOption);
  314.                     }
  315.                     getSheduleInfo($('#registration_transport_checkpoint_transportZoneCheckPoint').val());
  316.                     
  317.                     $('#addCheckPointBtn').show();
  318.                 }else{
  319.                     console.log(response.data.message);
  320.                     $('#addCheckPointBtn').hide();
  321.                 }
  322.                 console.log(response.data.message);
  323.                 //$(".loader").removeClass("is-active");
  324.             });
  325.         }
  326.         function fee_shedul_update_date_due(obj, path) {
  327.             swalWithBootstrapButtons.fire({
  328.                 title: 'Attention!',
  329.                 text: "Etes vous sûr de vouloir effectuer cette action?",
  330.                 icon: 'warning',
  331.                 showCancelButton: true,
  332.                 confirmButtonText: 'OUI',
  333.                 cancelButtonText: 'NON',
  334.             }).then((result) => {
  335.                 if (result.isConfirmed) {
  336.                     $(".loader").addClass("is-active");
  337.                     axios.get(path, {
  338.                     params: {
  339.                         date_due: obj.val(),
  340.                     }
  341.                     }).then(function (response) {
  342.                         console.log(response.data);
  343.                         if(response.data.code == 200){
  344.                             $(".loader").removeClass("is-active");
  345.                             swalWithBootstrapButtons.fire({
  346.                                 title: 'Effectué!',
  347.                                 text: response.data.message,
  348.                                 icon: 'success',
  349.                                 showCancelButton: false,
  350.                                 confirmButtonText: 'OK'
  351.                             }).then((result) => {
  352.                                     if (result.isConfirmed) {
  353.                                         location.reload();
  354.                                     }
  355.                             });
  356.                         }else{
  357.                             console.log(response.data.message);
  358.                             $(".loader").removeClass("is-active");
  359.                             swalWithBootstrapButtons.fire({
  360.                                 title: 'Echèc!',
  361.                                 text: response.data.message,
  362.                                 icon: 'warning',
  363.                                 showCancelButton: false,
  364.                                 confirmButtonText: 'OK'
  365.                             }).then((result) => {
  366.                                     if (result.isConfirmed) {
  367.                                         location.reload();
  368.                                     }
  369.                             });
  370.                         }
  371.                     });
  372.                 }
  373.             });
  374.         }
  375.     </script>
  376. {% endblock %}