def ControleRIB(self): etab = self.ctrl_code_etab.GetValue() guichet = self.ctrl_code_guichet.GetValue() numero = self.ctrl_numero.GetValue() cle = self.ctrl_cle.GetValue() bic = u"%s%s%s%s" % (etab, guichet, numero, cle) return UTILS_Prelevements.AlgoControleRIB(bic)
def ControleRIB(self): # Calcul du RIB cle_iban = self.ctrl_cle_iban.GetValue() etab = self.ctrl_code_etab.GetValue() guichet = self.ctrl_code_guichet.GetValue() numero = self.ctrl_numero.GetValue() cle = self.ctrl_cle_rib.GetValue() rib = u"%s%s%s%s" % (etab, guichet, numero, cle) validationRIB = UTILS_Prelevements.AlgoControleRIB(rib) # Calcul du IBAN iban = "" if cle_iban != "" and rib != "": iban = cle_iban + rib if UTILS_Prelevements.ControleIBAN(iban) == False: iban = "" if iban != "": self.ctrl_controle.SetBitmap(self.image_valide) return True else: self.ctrl_controle.SetBitmap(self.image_nonvalide) return False