Files
dumas_gestion/mondumas/templates/devis/devis_web.pt

127 lines
5.8 KiB
XML

<metal:block use-macro="main_template">
<div metal:fill-slot="content">
<br />
<!-- ENTETE -->
<div class="row">
<!-- CHANTIER -->
<div class="col-md-6">
<table class="table table-condensed">
<tr>
<td><h4>CHANTIER</h4>
<p><a href="/dossier_view/${devis.societe}-${devis.nochantier}">${devis.societe}-${devis.nochantier}</a></p>
</td>
<td>
<h4>${devis.C_QUALITE} ${devis.C_NOM}</h4>
${devis.C_ADR}<br />
<span tal:condition="devis.C_ADR2">${devis.C_ADR2}<br /></span>
${devis.C_CP} ${devis.C_VILLE}<br />
${devis.C_EMAIL}
</td>
</tr>
</table>
</div>
<!-- Mon compte -->
<div class="col-md-6 ${bg_color}">
<table class="table table-condensed ">
<tr>
<td><h4>CLIENT</h4></td>
<td>
<h4>${devis.QUALITE} ${devis.NOM}</h4>
${devis.ADRESSE}<br />
<span tal:condition="devis.ADRESSE2">${devis.ADRESSE2}<br /></span>
${devis.CP} ${devis.VILLE}<br />
</td>
</tr>
</table>
</div>
</div> <!-- row -->
<br />
<!-- ENTETE DEVIS -->
<table class="table table-bordered table-condensed">
<tr class="well">
<th class="text-right">Total HT</th>
<th class="text-right">Total TVA</th>
<th class="text-right">Total TTC</th>
<th class="text-right">TVA</th>
</tr>
<tr>
<td class="text-right">${layout.to_euro(devis.TOTALHT)}</td>
<td class="text-right">${layout.to_euro(devis.TOTALTVA)}</td>
<td class="text-right">${layout.to_euro(devis.TOTALTTC)}</td>
<td class="text-right">${devis.TAUXTVA} %</td>
</tr>
</table>
<form id="devis_web-form" action="${url}" method="post">
<a class="btn btn-default" role="button" href="${request.route_url('devis_preview', nodevis=nodevis)}">
<span class="glyphicon glyphicon-eye-open"></span> Aperçu PDF</a>
<button id="generateButton" class="btn btn-warning" type="submit" name="form.generate">
<i class="glyphicon glyphicon-refresh"></i> Générer PDF</button>
</form>
<br />
<table class="table table-bordered table-condensed">
<tr class="well">
<th>Réf</th>
<th>Désignation</th>
<th class="text-right">Qté</th>
<th class="text-right">PU HT</th>
<th class="text-right">Montant HT</th>
<th></th>
<th></th>
</tr>
<tr tal:repeat="detail details">
<td><a href="/devis_ligne/${detail.type_ligne}/${nodevis}/${detail.nolig}">${detail.ref}</a></td>
<td>${detail.libelle}</td>
<td class="text-right">${layout.to_decz(detail.qte)}</td>
<td class="text-right">${layout.to_euroz(detail.prixht)}</td>
<td class="text-right">${layout.to_euroz(detail.mtht)}</td>
<td class="text-center">${detail.usermaj}</td>
<td class="text-center">
<a class="btn btn-primary btn-xs" role="button" tal:condition="detail.nolig>1"
href="${request.route_url('devis_lig_mv',move='up',nodevis=nodevis,nolig=detail.nolig)}">
<span class="glyphicon glyphicon-arrow-up"></span></a>
<a class="btn btn-primary btn-xs" role="button" tal:condition="detail.nolig < max_no"
href="${request.route_url('devis_lig_mv',move='dn',nodevis=nodevis,nolig=detail.nolig)}">
<span class="glyphicon glyphicon-arrow-down"></span></a>
</td>
</tr>
</table>
<p>
<a class="btn btn-success" role="button" href="#"
data-toggle="modal" data-target="#confirmCreate"><span class="glyphicon glyphicon-plus"></span> Nouvelle ligne</a>
</p>
<br />
<br />
<!-- Modal : Confirmation CREATION -->
<div class="modal fade" id="confirmCreate" role="dialog" aria-labelledby="confirmCreateLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Ajouter une ligne de devis</h4>
</div>
<div class="modal-body">
<!-- The form is placed inside the body of modal -->
<form id="add_justif-form" class="form-horizontal" action="${url}" method="post">
<div class="form-group">
<label class="control-label col-xs-4">Sélectionner le type :</label>
<div class="col-xs-8">
<label class="radio"><input type="radio" name="type_lig" value="TX" checked>Titre, sous-titre, ligne detexte</label>
<label class="radio"><input type="radio" name="type_lig" value="AR">Article</label>
<label class="radio"><input type="radio" name="type_lig" value="ST">Sous-total</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
<button type="submit" class="btn btn-success" name="form.submited">Ajouter</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</metal:block>