Skip to content

Commit

Permalink
Update callbacks_main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
victordomingos authored Sep 5, 2018
1 parent 32806aa commit 59c518a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ctt_tracking/callbacks_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ def add_remessa(self, event):
self.oop.text_input_cobr.focus_set()
return

if (float(add_cobr) == 0):
if float(add_cobr) == 0:
num_dias = 0
else:
if add_dias == "":
Expand Down Expand Up @@ -746,10 +746,13 @@ def add_remessa(self, event):
conn.commit()
c.close()
self.oop.lista_destinatarios = db_get_destinatarios()
estado = db_update_estado(add_obj)

estado = db_update_estado(add_obj.strip())
if not estado:
return False
self.inserir_linha("0", add_destin, estado, add_obj, add_vols, add_cobr, "", str(data_dep.date()))
estado = "Informação indisponível"

data_dep_txt = str(data_dep.date()) if float(add_cobr) else ""
self.inserir_linha("0", add_destin, estado, add_obj, add_vols, add_cobr, "", data_dep_txt)
criar_mini_db()
remessa = "({}, {})".format(add_obj, add_destin)
self.oop.status_txt.set("Nova remessa adicionada! {}".format(remessa))
Expand Down Expand Up @@ -1632,4 +1635,4 @@ def hide_detalhe(self, *event):
else:
self.oop.detalheframe.place_forget()

self.bind_tree()
self.bind_tree()

0 comments on commit 59c518a

Please sign in to comment.