[gest_crans,ldap_crans] Vente avec paiement de la facture via solde crans
This commit is contained in:
parent
8bd394dbe8
commit
4a7b5a2399
2 changed files with 135 additions and 91 deletions
|
@ -3761,7 +3761,7 @@ class Facture(BaseClasseCrans):
|
|||
if not self._modifiable:
|
||||
raise NotImplementedError, "La facture n'est pas modifiable"
|
||||
|
||||
if new not in ['liquide', 'cheque', 'paypal']:
|
||||
if new not in ['liquide', 'cheque', 'paypal', 'solde']:
|
||||
raise ValueError, u'Mode de paiement non accepté'
|
||||
|
||||
self._set('modePaiement', [new])
|
||||
|
@ -3820,6 +3820,10 @@ class Facture(BaseClasseCrans):
|
|||
proprio = self.proprietaire()
|
||||
proprio.solde(operation=art['nombre']*art["pu"], comment="Facture n°%s : %s" % (self.numero(), art['designation']))
|
||||
proprio.save()
|
||||
elif self.modePaiement() == 'solde':
|
||||
proprio = self.proprietaire()
|
||||
proprio.solde(operation=0.0 - self.total(), comment="Facture n°%s" % self.numero())
|
||||
proprio.save()
|
||||
|
||||
def _frais(self):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue