117 lines
3.9 KiB
XML
117 lines
3.9 KiB
XML
<metal:block use-macro="main_template">
|
|
<div metal:fill-slot="content">
|
|
|
|
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
|
|
|
<p>
|
|
<a href="/parametres" class="btn btn-default" role="button">
|
|
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
|
</p>
|
|
|
|
<form id="export_cpta" action="${url}" method="post" class="form-horizontal">
|
|
<input type="hidden" name="etape" value="${etape}" />
|
|
|
|
<h3>1. Extraire le brouillard</h3>
|
|
|
|
<div class="form-group">
|
|
<label class="control-label col-xs-4" for="date_fin">Jusqu'à la date du</label>
|
|
<div class="col-xs-8">
|
|
<div class="input-group date" id="date_fin">
|
|
<input class="form-control" type="text" name="date_fin" value="${layout.date2dmy(date_fin)}"
|
|
data-fv-notempty="true"
|
|
data-fv-notempty-message="La Date de fin est obligatoire"
|
|
data-fv-date="true"
|
|
data-fv-date-format="DD-MM-YYYY"
|
|
data-fv-date-message="La date n'est pas valide" />
|
|
<span class="input-group-addon add-on">
|
|
<span class="glyphicon glyphicon-calendar"></span>
|
|
</span>
|
|
<span class="input-group-btn" tal:condition="etape=='1'">
|
|
<button id="extractButton" class="btn btn-primary" type="submit" name="form.extraction">
|
|
<span class="glyphicon glyphicon-export"></span> Extraire</button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<table class="table table-striped table-bordered table-condensed" cellspacing="0" width="100%" tal:condition="etape=='2'">
|
|
<thead>
|
|
<tr>
|
|
<th class="text-center">Jnl</th>
|
|
<th>Date</th>
|
|
<th>Compte</th>
|
|
<th>Désignation</th>
|
|
<th class="text-right">Débit</th>
|
|
<th class="text-right">Crédit</th>
|
|
<th>Analytique</th>
|
|
<th>Référence</th>
|
|
</tr>
|
|
</thead>
|
|
<tr tal:repeat="item brouillard">
|
|
<td class="text-center">${item.JOURNAL}</td>
|
|
<td>${item.DATE.strftime("%d-%m-%Y")}</td>
|
|
<td>${item.COMPTE}</td>
|
|
<td>${item.LIBELLE}</td>
|
|
<td class="text-right" tal:condition="item.SENS=='D'">${item.MONTANT}</td>
|
|
<td class="text-right" tal:condition="item.SENS=='D'"></td>
|
|
<td class="text-right" tal:condition="item.SENS=='C'"></td>
|
|
<td class="text-right" tal:condition="item.SENS=='C'">${item.MONTANT}</td>
|
|
<td>${item.CENTRE}</td>
|
|
<td>${item.REFERENCE}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-right" colspan="4"><b>Totaux</b></td>
|
|
<td class="text-right"><b>${total_debit}</b></td>
|
|
<td class="text-right"><b>${total_credit}</b></td>
|
|
<td class="text-right" colspan="2"><b>${len(brouillard)} écritures générées</b></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div tal:condition="etape=='2'">
|
|
<h3>2. Générer le fichier d'export</h3>
|
|
<p>Le fichier d'export se trouve dans le dossier <b>\JUSTIFS\EXPORT</b></p>
|
|
<div class="form-group">
|
|
<label class="control-label col-xs-4" for="nom_fichier">Nom du fichier</label>
|
|
<div class="col-xs-8">
|
|
<div class="input-group date" id="nom_fichier">
|
|
<input class="form-control" type="text" name="nom_fichier" value="${nom_fichier}" readonly />
|
|
<span class="input-group-btn">
|
|
<button class="btn btn-primary" type="submit" name="form.generer">
|
|
<span class="glyphicon glyphicon-download-alt"></span> Générer</button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
<br />
|
|
<br />
|
|
<br />
|
|
</div><!-- content -->
|
|
|
|
<div metal:fill-slot="additional_scripts">
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#export_cpta').formValidation();
|
|
$('#date_fin').datetimepicker({
|
|
format: 'DD-MM-YYYY',
|
|
allowInputToggle: true,
|
|
}).on('dp.change', function(e) {
|
|
// Revalidate the date field
|
|
$('#export_cpta').formValidation('revalidateField', 'date_fin');
|
|
});
|
|
});
|
|
$('#extractButton').on('click', function(){
|
|
$('i.gly-spin').removeClass('gly-spin');
|
|
$('i').addClass('gly-spin');
|
|
});
|
|
</script>
|
|
</div>
|
|
</metal:block>
|
|
|
|
|