def extendBooks(self): print "extending books" message = "%s %s %s %s"%( _("Books Currently end on"), localsettings.formatDate(localsettings.bookEnd),"<br />", _("extend the books now?")) result = QtGui.QMessageBox.question(self.parent, _("Confirm"), message,QtGui.QMessageBox.No | QtGui.QMessageBox.Yes, QtGui.QMessageBox.Yes ) if result == QtGui.QMessageBox.No: return else: months, result = QtGui.QInputDialog.getInteger(self.parent, _("Extend Books"), _("How many months?")) if result: newBookEnd = QtCore.QDate( localsettings.bookEnd).addMonths(months).toPyDate() if extend_books.extend(localsettings.apptix.values(), localsettings.bookEnd, newBookEnd): #now put this date into the settings database. db_format= "%s,%s,%s"% newBookEnd.timetuple()[:3] db_settings.insertData( "bookend", db_format, localsettings.operator)
def extendBooks(self): print "extending books" message = "%s %s %s %s" % (_("Books Currently end on"), localsettings.formatDate( localsettings.bookEnd), "<br />", _("extend the books now?")) result = QtGui.QMessageBox.question( self.parent, _("Confirm"), message, QtGui.QMessageBox.No | QtGui.QMessageBox.Yes, QtGui.QMessageBox.Yes) if result == QtGui.QMessageBox.No: return else: months, result = QtGui.QInputDialog.getInteger( self.parent, _("Extend Books"), _("How many months?")) if result: newBookEnd = QtCore.QDate( localsettings.bookEnd).addMonths(months).toPyDate() if extend_books.extend(localsettings.apptix.values(), localsettings.bookEnd, newBookEnd): # now put this date into the settings database. db_format = "%s,%s,%s" % newBookEnd.timetuple()[:3] db_settings.insertData("bookend", db_format, localsettings.operator)
def apply_(self): LOGGER.info("account letter dialog - applying changes %s") if self.debt_collector != self._dc: db_settings.insertData("debt collector", self.debt_collector) if self.footer != self._footer: db_settings.insertData("account footer", self.footer)