harmonisation dem_devis, devs et facture
This commit is contained in:
@@ -47,9 +47,10 @@ def get_dossier_by_sinistre(request,societe, nosin):
|
||||
results = request.dbsession.execute(query).first()
|
||||
return results
|
||||
|
||||
def get_dossiers_traites(request):
|
||||
query = "SELECT d.*, s.libelle FROM dem_devis d JOIN p_statuts s ON d.STATUS = s.CODE WHERE d.status < 2 ORDER BY d.societe, d.status, d.nomcli";
|
||||
results = request.dbsession.execute(query).fetchall()
|
||||
def get_dossiers_traites(request, societe):
|
||||
query = """SELECT d.date, LPAD(d.no_id,6,'0') AS numero, d.nomcli, CONCAT(d.c_nom,'; ',d.c_adr,'; ',d.c_ville) AS chantier, d.mttrav AS montant, status, s.libelle, d.nosin, d.nopol, d.humidite, d.usermaj
|
||||
FROM dem_devis d JOIN p_statuts s ON d.STATUS = s.CODE WHERE d.societe = :societe AND d.status < 2 ORDER BY d.status, d.nomcli""";
|
||||
results = request.dbsession.execute(query, {'societe': societe}).fetchall()
|
||||
return results
|
||||
|
||||
def get_clients_byName(request, societe, nom):
|
||||
@@ -338,12 +339,14 @@ def get_status_by_id(request, code):
|
||||
results = request.dbsession.execute(query, {'code': code}).first()
|
||||
return results
|
||||
|
||||
def get_devis_en_att(request):
|
||||
query = "SELECT d.*, s.libelle FROM devis d JOIN p_statuts s ON d.STATUS = s.CODE WHERE d.STATUS < 4 ORDER BY d.societe, d.STATUS, d.nomcli;"
|
||||
results = request.dbsession.execute(query).fetchall()
|
||||
def get_devis_en_att(request, societe):
|
||||
query = """SELECT d.date, LPAD(d.no_id,6,'0') AS numero, d.nomcli, CONCAT(d.c_nom,'; ',d.c_adr,'; ',d.c_ville) AS chantier, d.totalht AS montant, d.status, s.libelle, d.nosin, d.nopol, d.usermaj
|
||||
FROM devis d JOIN p_statuts s ON d.STATUS = s.CODE WHERE d.societe=:societe AND d.STATUS < 4 ORDER BY d.societe, d.STATUS, d.nomcli;"""
|
||||
results = request.dbsession.execute(query, {'societe': societe}).fetchall()
|
||||
return results
|
||||
|
||||
def get_factures_en_att(request):
|
||||
query = "SELECT f.*, s.libelle FROM facture f JOIN p_statuts s ON f.STATUS = s.CODE WHERE f.STATUS < 8 ORDER BY f.societe, f.STATUS, f.nomcli;"
|
||||
results = request.dbsession.execute(query).fetchall()
|
||||
def get_factures_en_att(request, societe):
|
||||
query = """SELECT f.date, LPAD(f.no_id,6,'0') AS numero, f.nomcli, CONCAT(f.c_nom,'; ',f.c_adr,'; ',f.c_ville) AS chantier, f.totalht AS montant, f.status, s.libelle, f.nosin, f.nopol, f.usermaj
|
||||
FROM facture f JOIN p_statuts s ON f.STATUS = s.CODE WHERE f.societe=:societe AND f.STATUS < 8 ORDER BY f.societe, f.STATUS, f.nomcli;"""
|
||||
results = request.dbsession.execute(query, {'societe': societe}).fetchall()
|
||||
return results
|
||||
@@ -1,35 +1,105 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<form id="site-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>
|
||||
<button id="submitButton" class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<i class="glyphicon glyphicon-search"></i> Rechercher</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div><!-- row -->
|
||||
|
||||
<br />
|
||||
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th>DATE DE MAJ</th>
|
||||
<th>ID DOSSIER</th>
|
||||
<th>NOM DU CLIENT</th>
|
||||
<th>NOM</th>
|
||||
<th>DERNIER UTILISATEUR</th>
|
||||
<th>STATUT</th>
|
||||
</tr>
|
||||
<tr tal:repeat="item dossiers_traites">
|
||||
<td>${item.DATEMAJ.strftime('%d-%m-%Y')}</td>
|
||||
<td><a href="${request.application_url}/dossier_view/${item.societe}-${item.NO_ID}">${item.societe}-${item.NO_ID}</td>
|
||||
<td>${item.NOMCLI}</td>
|
||||
<td>${item.C_NOM}</td>
|
||||
<td>${item.USERMAJ}</td>
|
||||
<td><span class="badge bg-${item.STATUS}">${item.libelle}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<table id="dossiers_list" 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>
|
||||
<th>Uti.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#generateButton').on('click', function(){
|
||||
$('i.gly-spin').removeClass('gly-spin');
|
||||
$('i').addClass('gly-spin');
|
||||
});
|
||||
var dataSet = ${dt_data};
|
||||
var goto_url = '${goto_url}';
|
||||
var order_option = '${order_option}'
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
$('#dossiers_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
order: [[0, order_option]],
|
||||
columnDefs: [
|
||||
{ className: "text-right", "targets": [4] },
|
||||
{ "targets": 0,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="' + goto_url + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
],
|
||||
createdRow: function( row, data, dataIndex ){
|
||||
if ( data[6] == "Humidité" ) {
|
||||
$('td', row).eq(6).css('background-color', 'Crimson').css('color', 'white');
|
||||
}
|
||||
if ( data[6] == "Devis" || data[6] == "Commandé") {
|
||||
$('td', row).eq(6).css('background-color', 'Orange');
|
||||
}
|
||||
if ( data[6] == "Facturé") {
|
||||
$('td', row).eq(6).css('background-color', 'LightBlue');
|
||||
}
|
||||
if ( data[6] == "Réglée" || data[6] == "Régl part.") {
|
||||
$('td', row).eq(6).css('background-color', 'LightGreen');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
$('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><!-- content -->
|
||||
|
||||
@@ -1,35 +1,105 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<form id="site-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>
|
||||
<button id="submitButton" class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<i class="glyphicon glyphicon-search"></i> Rechercher</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div><!-- row -->
|
||||
|
||||
<br />
|
||||
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th>DATE DE MAJ</th>
|
||||
<th>ID DEVIS</th>
|
||||
<th>NOM DU CLIENT</th>
|
||||
<th>NOM</th>
|
||||
<th>DERNIER UTILISATEUR</th>
|
||||
<th>STATUT</th>
|
||||
</tr>
|
||||
<tr tal:repeat="item list_devis_en_att">
|
||||
<td>${item.DATEMAJ.strftime('%d %b')}</td>
|
||||
<td><a href="${request.application_url}/devis_view/${item.societe}-DE${item.NO_ID}">${item.societe}-DE${item.NO_ID}</td>
|
||||
<td>${item.NOMCLI}</td>
|
||||
<td>${item.C_NOM}</td>
|
||||
<td>${item.USERMAJ}</td>
|
||||
<td><span class="badge bg-${item.STATUS}">${item.libelle}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<table id="dossiers_list" 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>
|
||||
<th>Uti.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#generateButton').on('click', function(){
|
||||
$('i.gly-spin').removeClass('gly-spin');
|
||||
$('i').addClass('gly-spin');
|
||||
});
|
||||
var dataSet = ${dt_data};
|
||||
var goto_url = '${goto_url}';
|
||||
var order_option = '${order_option}'
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
$('#dossiers_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
order: [[0, order_option]],
|
||||
columnDefs: [
|
||||
{ className: "text-right", "targets": [4] },
|
||||
{ "targets": 0,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="' + goto_url + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
],
|
||||
createdRow: function( row, data, dataIndex ){
|
||||
if ( data[6] == "Humidité" ) {
|
||||
$('td', row).eq(6).css('background-color', 'Crimson').css('color', 'white');
|
||||
}
|
||||
if ( data[6] == "Devis" || data[6] == "Commandé") {
|
||||
$('td', row).eq(6).css('background-color', 'Orange');
|
||||
}
|
||||
if ( data[6] == "Facturé") {
|
||||
$('td', row).eq(6).css('background-color', 'LightBlue');
|
||||
}
|
||||
if ( data[6] == "Réglée" || data[6] == "Régl part.") {
|
||||
$('td', row).eq(6).css('background-color', 'LightGreen');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
$('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><!-- content -->
|
||||
|
||||
@@ -1,35 +1,105 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<form id="site-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>
|
||||
<button id="submitButton" class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<i class="glyphicon glyphicon-search"></i> Rechercher</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div><!-- row -->
|
||||
|
||||
<br />
|
||||
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th>DATE DE MAJ</th>
|
||||
<th>ID FACTURE</th>
|
||||
<th>NOM DU CLIENT</th>
|
||||
<th>NOM</th>
|
||||
<th>DERNIER UTILISATEUR</th>
|
||||
<th>STATUT</th>
|
||||
</tr>
|
||||
<tr tal:repeat="item list_factures_en_att">
|
||||
<td>${item.DATEMAJ.strftime('%d %b')}</td>
|
||||
<td><a href="${request.application_url}/devis_view/${item.societe}-FA${item.NO_ID}">${item.societe}-FA${item.NO_ID}</td>
|
||||
<td>${item.NOMCLI}</td>
|
||||
<td>${item.C_NOM}</td>
|
||||
<td>${item.USERMAJ}</td>
|
||||
<td><span class="badge bg-${item.STATUS}">${item.libelle}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<table id="dossiers_list" 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>
|
||||
<th>Uti.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#generateButton').on('click', function(){
|
||||
$('i.gly-spin').removeClass('gly-spin');
|
||||
$('i').addClass('gly-spin');
|
||||
});
|
||||
var dataSet = ${dt_data};
|
||||
var goto_url = '${goto_url}';
|
||||
var order_option = '${order_option}'
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
$('#dossiers_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
order: [[0, order_option]],
|
||||
columnDefs: [
|
||||
{ className: "text-right", "targets": [4] },
|
||||
{ "targets": 0,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="' + goto_url + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
],
|
||||
createdRow: function( row, data, dataIndex ){
|
||||
if ( data[6] == "Humidité" ) {
|
||||
$('td', row).eq(6).css('background-color', 'Crimson').css('color', 'white');
|
||||
}
|
||||
if ( data[6] == "Devis" || data[6] == "Commandé") {
|
||||
$('td', row).eq(6).css('background-color', 'Orange');
|
||||
}
|
||||
if ( data[6] == "Facturé") {
|
||||
$('td', row).eq(6).css('background-color', 'LightBlue');
|
||||
}
|
||||
if ( data[6] == "Réglée" || data[6] == "Régl part.") {
|
||||
$('td', row).eq(6).css('background-color', 'LightGreen');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
$('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><!-- content -->
|
||||
|
||||
@@ -72,7 +72,7 @@ def dossier_lookup(request):
|
||||
# construire la liste
|
||||
for item in chantiers:
|
||||
d = ('%s-%s' % (societe, item.numero),item.date.strftime('%d-%m-%Y'), item.nomcli, item.chantier, to_euro(item.montant),
|
||||
item.nosin, item.status, item.usermaj)
|
||||
item.nosin, item.libelle, item.usermaj)
|
||||
liste.append(d)
|
||||
|
||||
if len(name) == 0 :
|
||||
@@ -1546,38 +1546,97 @@ def upload_om(request):
|
||||
@view_config(route_name='dem_devis', renderer='../templates/dossier/dem_devis.pt', permission='view')
|
||||
def dem_devis(request):
|
||||
logged_in = request.authenticated_userid.upper()
|
||||
goto_url = '/dossier_selected/dossier_view/%s/' % date.today().strftime('%Y-%m-%d')
|
||||
url = request.route_url('dem_devis')
|
||||
member = get_member_by_id(request, logged_in)
|
||||
societe_defaut = member.societe
|
||||
societe = societe_defaut
|
||||
access_defaut = member.access
|
||||
liste=[]
|
||||
|
||||
dossiers_traites = get_dossiers_traites(request)
|
||||
if 'form.submitted' in request.params:
|
||||
societe = request.params['societe']
|
||||
|
||||
dossiers_traites = get_dossiers_traites(request, societe)
|
||||
|
||||
for item in dossiers_traites:
|
||||
d = ('%s-%s' % (societe, item.numero),item.date.strftime('%d-%m-%Y'), item.nomcli, item.chantier, to_euro(item.montant),
|
||||
item.nosin, item.libelle, item.usermaj)
|
||||
liste.append(d)
|
||||
|
||||
order_option = 'desc'
|
||||
|
||||
return {
|
||||
'page_title': 'Dossiers avec statut: "A TRAITER"',
|
||||
'url': url,
|
||||
'dossiers_traites':dossiers_traites,
|
||||
'goto_url': goto_url,
|
||||
'dt_data': json.dumps(liste),
|
||||
'societe': societe,
|
||||
'order_option': order_option,
|
||||
}
|
||||
|
||||
@view_config(route_name='devis_en_att', renderer='../templates/dossier/devis_en_att.pt', permission='view')
|
||||
def devis_en_att(request):
|
||||
logged_in = request.authenticated_userid.upper()
|
||||
goto_url = '/dossier_selected/dossier_view/%s/' % date.today().strftime('%Y-%m-%d')
|
||||
url = request.route_url('devis_en_att')
|
||||
member = get_member_by_id(request, logged_in)
|
||||
societe_defaut = member.societe
|
||||
societe = societe_defaut
|
||||
access_defaut = member.access
|
||||
liste=[]
|
||||
|
||||
if 'form.submitted' in request.params:
|
||||
societe = request.params['societe']
|
||||
|
||||
list_devis_en_att = get_devis_en_att(request, societe)
|
||||
|
||||
for item in list_devis_en_att:
|
||||
d = ('%s-DE%s' % (societe, item.numero),item.date.strftime('%d-%m-%Y'), item.nomcli, item.chantier, to_euro(item.montant),
|
||||
item.nosin, item.libelle, item.usermaj)
|
||||
liste.append(d)
|
||||
|
||||
order_option = 'desc'
|
||||
|
||||
list_devis_en_att = get_devis_en_att(request)
|
||||
|
||||
return {
|
||||
'page_title': "Devis en attente d'acceptation",
|
||||
'url': url,
|
||||
'list_devis_en_att':list_devis_en_att,
|
||||
'goto_url': goto_url,
|
||||
'dt_data': json.dumps(liste),
|
||||
'societe': societe,
|
||||
'order_option': order_option,
|
||||
}
|
||||
|
||||
@view_config(route_name='factures_en_att', renderer='../templates/dossier/factures_en_att.pt', permission='view')
|
||||
def factures_en_att(request):
|
||||
logged_in = request.authenticated_userid.upper()
|
||||
goto_url = '/dossier_selected/dossier_view/%s/' % date.today().strftime('%Y-%m-%d')
|
||||
url = request.route_url('factures_en_att')
|
||||
member = get_member_by_id(request, logged_in)
|
||||
societe_defaut = member.societe
|
||||
societe = societe_defaut
|
||||
access_defaut = member.access
|
||||
liste=[]
|
||||
|
||||
if 'form.submitted' in request.params:
|
||||
societe = request.params['societe']
|
||||
|
||||
list_factures_en_att = get_factures_en_att(request, societe)
|
||||
|
||||
for item in list_factures_en_att:
|
||||
d = ('%s-FA%s' % (societe, item.numero),item.date.strftime('%d-%m-%Y'), item.nomcli, item.chantier, to_euro(item.montant),
|
||||
item.nosin, item.libelle, item.usermaj)
|
||||
liste.append(d)
|
||||
|
||||
order_option = 'desc'
|
||||
|
||||
list_factures_en_att = get_factures_en_att(request)
|
||||
|
||||
return {
|
||||
'page_title': "Factures en attente de réglement",
|
||||
'url': url,
|
||||
'list_factures_en_att':list_factures_en_att,
|
||||
'goto_url': goto_url,
|
||||
'dt_data': json.dumps(liste),
|
||||
'societe': societe,
|
||||
'order_option': order_option,
|
||||
}
|
||||
Reference in New Issue
Block a user