ajout devis_preview.pt
This commit is contained in:
@@ -47,7 +47,7 @@ def to_euroz(x):
|
||||
if x == 0:
|
||||
return ""
|
||||
else:
|
||||
return ("%.2f €" % x).replace('.', ',')
|
||||
return ("%9.2f €" % x).replace('.', ',')
|
||||
|
||||
def to_decz(x):
|
||||
"""Takes a decimal and returns a string"""
|
||||
@@ -326,7 +326,10 @@ def ajax_texte(request):
|
||||
|
||||
liste=[]
|
||||
for row in items:
|
||||
d = '%s | %s | %s' % (row.ref_cli2, row.LIBART, to_euro(row.PRIXHT2))
|
||||
if type == 'AR':
|
||||
d = '%s | %s | %s' % (row.ref_cli2, row.LIBART, to_euro(row.PRIXHT2))
|
||||
else:
|
||||
d = row.LIBART
|
||||
liste.append(d)
|
||||
|
||||
return Response(json.dumps(liste))
|
||||
@@ -335,9 +338,9 @@ def ajax_texte(request):
|
||||
def ajax_article(request):
|
||||
ref = request.GET['ref']
|
||||
|
||||
# lire les articles commencant par
|
||||
# lire l'article
|
||||
items = get_article(request, 'REF', ref)
|
||||
|
||||
# puis retourne son libellé et son prixht
|
||||
liste=[]
|
||||
d = {}
|
||||
d['ref'] = items.ref_cli2
|
||||
|
||||
Reference in New Issue
Block a user