ajout croquis_edit
This commit is contained in:
@@ -357,13 +357,13 @@ def insert_dem_note(request, nodossier, type_note, logged_in):
|
||||
query = "INSERT INTO dem_notes (societe, nochantier, type_note, usermaj) VALUES (:societe, :nochantier, :type_note, :logged_in);"
|
||||
execute_query(request, query, {'societe': societe, 'nochantier': nochantier, 'type_note': type_note, 'logged_in': logged_in})
|
||||
|
||||
def get_dem_notes(request, nodossier, noligne):
|
||||
def get_dem_notes(request, nodossier, noligne, type):
|
||||
societe = nodossier[0:2]
|
||||
nochantier = int(nodossier[3:])
|
||||
|
||||
if noligne == '0':
|
||||
query = "SELECT societe, nochantier, noligne, type_note, libelle FROM dem_notes WHERE societe = :societe AND nochantier = :nochantier ORDER BY libelle;"
|
||||
results = request.dbsession.execute(query, {'societe': societe, 'nochantier': nochantier, 'noligne': noligne}).fetchall()
|
||||
query = "SELECT societe, nochantier, noligne, type_note, libelle FROM dem_notes WHERE societe = :societe AND nochantier = :nochantier AND type_note=:type ORDER BY libelle;"
|
||||
results = request.dbsession.execute(query, {'societe': societe, 'nochantier': nochantier, 'noligne': noligne, 'type': type}).fetchall()
|
||||
else:
|
||||
query = "SELECT * FROM dem_notes WHERE societe = :societe AND nochantier = :nochantier AND noligne = :noligne;"
|
||||
results = request.dbsession.execute(query, {'societe': societe, 'nochantier': nochantier, 'noligne': noligne}).first()
|
||||
|
||||
Reference in New Issue
Block a user