From 602a5bb8a681d2f9a98cab2e349420e0f7653f10 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Tue, 2 Dec 2014 20:44:20 +0100 Subject: [PATCH] [dialog/proprio] On ne propose le paiement par solde que si on a un solde MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit comme l'attribut ldap est optionnel, ça peut arriver sur les nouveaux comptes --- gestion/dialog/proprio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gestion/dialog/proprio.py b/gestion/dialog/proprio.py index 8c7a01e7..7163e8ff 100644 --- a/gestion/dialog/proprio.py +++ b/gestion/dialog/proprio.py @@ -416,7 +416,7 @@ class Dialog(machine.Dialog, blacklist.Dialog): def box_choose_paiment(tag, articles): box_paiement_order = ["liquide", "cheque", "carte"] if "cransAccount" in proprio['objectClass']: - if not "SOLDE" in [art['code'] for art in articles]: + if not "SOLDE" in [art['code'] for art in articles] and proprio["solde"]: box_paiement_order.append("solde") box_paiement["solde"] = box_paiement["solde"] % proprio["solde"][0] choices = []