ajout module devis
This commit is contained in:
@@ -15,6 +15,11 @@
|
||||
<span class="glyphicon glyphicon-tint logo-success"></span>
|
||||
<h4>RAPPORTS RDF</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/devis_list">
|
||||
<span class="glyphicon glyphicon-text-height logo-small"></span>
|
||||
<h4>DEVIS</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/dossier_lookup">
|
||||
<span class="glyphicon glyphicon-search logo-small"></span>
|
||||
|
||||
117
mondumas/templates/devis/devis_lignes.pt
Normal file
117
mondumas/templates/devis/devis_lignes.pt
Normal file
@@ -0,0 +1,117 @@
|
||||
<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><h4 class="text-primary">${dossier.societe}-${dossier.nochantier}</h4>
|
||||
</td>
|
||||
<td>
|
||||
<h4>${dossier.C_QUALITE} ${dossier.C_NOM}</h4>
|
||||
${dossier.C_ADR}<br />
|
||||
<span tal:condition="dossier.C_ADR2">${dossier.C_ADR2}<br /></span>
|
||||
${dossier.C_CP} ${dossier.C_VILLE}<br />
|
||||
${dossier.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>${dossier.QUALITE} ${dossier.NOM}</h4>
|
||||
${dossier.ADRESSE}<br />
|
||||
<span tal:condition="dossier.ADRESSE2">${dossier.ADRESSE2}<br /></span>
|
||||
${dossier.CP} ${dossier.VILLE}<br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- row -->
|
||||
<!-- 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_decz(dossier.TOTALHT)}</td>
|
||||
<td class="text-right">${layout.to_euroz(dossier.TOTALTVA)}</td>
|
||||
<td class="text-right">${layout.to_euroz(dossier.TOTALTTC)}</td>
|
||||
<td class="text-right">${dossier.TAUXTVA} %</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<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>
|
||||
</tr>
|
||||
<tr tal:repeat="detail details">
|
||||
<td>${detail.REF}</td>
|
||||
<td>${detail.LIB}</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>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<a class="btn btn-success" role="button" href="${request.route_url('devis_create', nodossier=nodossier)}"
|
||||
data-toggle="modal" data-target="#confirmCreate"><span class="glyphicon glyphicon-plus"></span> Nouvelle ligne</a>
|
||||
</p>
|
||||
|
||||
<!-- 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">×</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"
|
||||
data-fv-framework="bootstrap"
|
||||
data-fv-icon-valid="glyphicon glyphicon-ok"
|
||||
data-fv-icon-invalid="glyphicon glyphicon-remove"
|
||||
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
||||
|
||||
<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="CA">Calcul</label>
|
||||
<label class="radio"><input type="radio" name="type_lig" value="ST">Sous-total</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-5 col-xs-offset-3">
|
||||
<button type="submit" class="btn btn-danger" name="form.added">Ajouter</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
100
mondumas/templates/devis/devis_list.pt
Normal file
100
mondumas/templates/devis/devis_list.pt
Normal file
@@ -0,0 +1,100 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
|
||||
<form id="devis-search-form" class="form-horizontal" role="form" action="${url}" method="post"
|
||||
data-fv-framework="bootstrap"
|
||||
data-fv-icon-valid="glyphicon glyphicon-ok"
|
||||
data-fv-icon-invalid="glyphicon glyphicon-remove"
|
||||
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">Société</label>
|
||||
<div class="col-xs-8">
|
||||
<label class="radio-inline"><input type="radio" name="societe" value="PE"
|
||||
tal:attributes="checked societe=='PE'">PE</label>
|
||||
<label class="radio-inline"><input type="radio" name="societe" value="ME"
|
||||
tal:attributes="checked societe=='ME'">ME</label>
|
||||
<label class="radio-inline"><input type="radio" name="societe" value="PL"
|
||||
tal:attributes="checked societe=='PL'">PL</label>
|
||||
<label class="radio-inline"><input type="radio" name="societe" value="PO"
|
||||
tal:attributes="checked societe=='PO'">PO</label>
|
||||
<label class="radio-inline"><input type="radio" name="societe" value="CD"
|
||||
tal:attributes="checked societe=='CD'">CD</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">Nom ou numéro du chantier</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="name" value="${name}"
|
||||
placeholder="Le nom ou le numéro doit avoir de 2 à 30 caractères de long" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<button id="submitButton" class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-search"></span> Rechercher</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div><!-- row -->
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Numéro</th>
|
||||
<th>Date</th>
|
||||
<th>Client</th>
|
||||
<th>Chantier</th>
|
||||
<th class="text-right">Montant</th>
|
||||
<th>Sinistre</th>
|
||||
<th class="text-center">Statut</th>
|
||||
</tr>
|
||||
<tr tal:repeat="detail devis">
|
||||
<td>
|
||||
<a href="/devis_view/${societe}-DE${detail.numero}">${societe}-${detail.numero}</a>
|
||||
</td>
|
||||
<td>${detail.date.strftime('%d-%m-%Y')}</td>
|
||||
<td>${detail.nomcli}</td>
|
||||
<td>${detail.chantier}</td>
|
||||
<td class="text-right">${layout.to_euro(detail.montant)}</td>
|
||||
<td>${detail.nosin}</td>
|
||||
<td class="text-center">${detail.status}</td>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#devis-search-form').formValidation({
|
||||
framework: 'bootstrap',
|
||||
message: 'This value is not valid',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
var code = e.keyCode || e.which;
|
||||
if (code === 13) {
|
||||
e.preventDefault();
|
||||
// simuler clic bouton submit
|
||||
document.getElementById("submitButton").click();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
@@ -7,7 +7,8 @@
|
||||
<div class="col-md-6">
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<td><h4>CHANTIER</h4></td>
|
||||
<td><h4>CHANTIER</h4><h4 class="text-primary">${dossier.societe}-${dossier.nochantier}</h4>
|
||||
</td>
|
||||
<td>
|
||||
<h4>${dossier.C_QUALITE} ${dossier.C_NOM}</h4>
|
||||
${dossier.C_ADR}<br />
|
||||
@@ -28,32 +29,6 @@
|
||||
${dossier.C_TELP} - ${dossier.C_FAX}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Cabinet<br />
|
||||
Expert<br />
|
||||
Référence expert
|
||||
</td>
|
||||
<td>
|
||||
${dossier.nom_cabinet}<br />
|
||||
${dossier.nom_expert}<br />
|
||||
${dossier.REF_EXPERT}<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Police<br />
|
||||
Sinistre<br />
|
||||
Votre référence<br />
|
||||
Observation<br />
|
||||
</td>
|
||||
<td>
|
||||
${dossier.NOPOL}<br />
|
||||
${dossier.NOSIN}<br />
|
||||
${dossier.VREF}<br />
|
||||
${dossier.C_OBS}<br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#tab_suivi"><b>SUIVI du DOSSIER</b></a></li>
|
||||
<li tal:condition="documents and access > 0">
|
||||
<li tal:condition="access > 0">
|
||||
<a data-toggle="tab" href="#tab_documents"><b>DEVIS - FACTURES</b></a></li>
|
||||
<li tal:condition="access > 0">
|
||||
<a data-toggle="tab" href="#tab_attaches"><b>DOCUMENTS ATTACHES</b></a></li>
|
||||
@@ -181,6 +181,10 @@
|
||||
<!-- PANEL DOCUMENTS -->
|
||||
<div id="tab_documents" class="tab-pane fade">
|
||||
<h3>DEVIS - FACTURES</h3>
|
||||
<p>
|
||||
<a class="btn btn-success" role="button" href="${request.route_url('devis_create', nodossier=nodossier)}">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau devis</a>
|
||||
</p>
|
||||
<table class="table table-bordered table-condensed">
|
||||
<tr>
|
||||
<th>Numéro</th>
|
||||
@@ -190,9 +194,12 @@
|
||||
<th class="text-center">Statut</th>
|
||||
</tr>
|
||||
<tr tal:repeat="detail documents">
|
||||
<td>
|
||||
<td tal:condition="detail.web!='W'">
|
||||
<a href="/devis_view/${detail.nodossier}">${detail.nodossier}</a>
|
||||
</td>
|
||||
<td tal:condition="detail.web=='W'">
|
||||
<a href="/devis_lignes/${detail.nodossier}">${detail.nodossier}-${detail.web}</a>
|
||||
</td>
|
||||
<td>${detail.date.strftime('%d-%m-%Y')}</td>
|
||||
<td>${detail.nomcli}</td>
|
||||
<td class="text-right">${layout.to_euro(detail.montant)}</td>
|
||||
|
||||
Reference in New Issue
Block a user