Skip to content

Commit

Permalink
Corrections et version 1.21.13
Browse files Browse the repository at this point in the history
  • Loading branch information
bsongis committed Jan 18, 2018
1 parent 52ea214 commit 927a883
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion facture.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def GetDatePrelevementAutomatique(self):
return date.replace(day=(day if type(day) == int else 1))

def Cloture(self):
print("Cloture de facture", self.date)
print("Cloture de facture", GetPrenomNom(self.inscrit), self.date)
cloture = ClotureFacture(inscrit=self.inscrit,
date=self.date,
cotisation_mensuelle=self.cotisation_mensuelle,
Expand Down
2 changes: 1 addition & 1 deletion panel_facturation.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def OnFacturesInscritChoice(self, _):
def OnFacturesMonthChoice(self, _=None):
inscrits, periode = self.__GetFactureSelection()
for inscrit in inscrits:
if inscrit.has_facture(periode) and periode not in inscrit.clotures:
if inscrit.has_facture(periode) and periode not in inscrit.clotures and (database.creche.temps_facturation != FACTURATION_FIN_MOIS or GetMonthEnd(periode) not in inscrit.clotures):
self.cloture_button.Enable()
break
else:
Expand Down
12 changes: 9 additions & 3 deletions startdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ def __init__(self):
self.ok_button = wx.Button(self, wx.ID_OK)
self.Bind(wx.EVT_BUTTON, self.OnOk, self.ok_button)
self.btnsizer.AddButton(self.ok_button)
btn = wx.Button(self, wx.ID_CANCEL, "Annuler")
self.btnsizer.AddButton(btn)
self.Bind(wx.EVT_BUTTON, self.OnExit, btn)
self.cancel_button = wx.Button(self, wx.ID_CANCEL, "Annuler")
self.btnsizer.AddButton(self.cancel_button)
self.Bind(wx.EVT_BUTTON, self.OnExit, self.cancel_button)
self.btnsizer.Realize()
self.sizer.Add(self.btnsizer, 0, wx.ALL, 5)
self.Bind(wx.EVT_CLOSE, self.OnExit)
Expand Down Expand Up @@ -182,7 +182,12 @@ def Load(self, section=None):
result = False
wx.CallAfter(self.OnLoaded, result)

def disable_buttons(self):
for button in self.ok_button, self.cancel_button:
button.Disable()

def StartFrame(self):
self.disable_buttons()
frame = GertrudeFrame(ProgressHandler(self.info.AppendText, self.SetGauge, 50, 100))
frame.Show()
self.SetGauge(100)
Expand Down Expand Up @@ -222,6 +227,7 @@ def OnOk(self, _):
self.login_ctrl.SetFocus()

def OnExit(self, _):
self.disable_buttons()
self.info.AppendText("\nFermeture ...\n")
if self.loaded:
config.connection.Exit(ProgressHandler(self.info.AppendText, self.SetGauge, 5, 100))
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# You should have received a copy of the GNU General Public License
# along with Gertrude; if not, see <http://www.gnu.org/licenses/>.

VERSION = '1.21.12'
VERSION = '1.21.13'

0 comments on commit 927a883

Please sign in to comment.