Пример #1
0
    def __init__(self, parent=0, *args, **kwargs):

        super(StatViewWidget, self).__init__(
            parent=parent, *args, **kwargs)
        FPeriodHolder.__init__(self, *args, **kwargs)

        self.title = u"     Les Activités"
        self.parentWidget().setWindowTitle(Config.NAME_ORGA + self.title)
        self.parent = parent

        self.table_rpt = ReportTableWidget(
            parent=self, main_date=self.main_date)

        self.btt_export = BttExportXLS(u"Exporter")
        self.btt_export.clicked.connect(self.export_xls)

        gridbox = QtGui.QGridLayout()
        gridbox.addWidget(self.btt_export, 0, 3)
        gridbox.setColumnStretch(0, 2)

        vbox = QtGui.QVBoxLayout()
        vbox.addWidget(FPageTitle(self.title))
        vbox.addLayout(gridbox)
        vbox.addWidget(self.periods_bar)
        vbox.addWidget(self.table_rpt)
        self.setLayout(vbox)
Пример #2
0
    def __init__(self, parent=0, *args, **kwargs):

        super(StatViewWidget, self).__init__(
            parent=parent, *args, **kwargs)
        FPeriodHolder.__init__(self, *args, **kwargs)

        self.title = "Les Activités"
        self.parentWidget().setWindowTitle(
            "{} {}".format(Config.APP_NAME, self.title))
        self.parent = parent

        self.table_rpt = ReportTableWidget(
            parent=self, main_date=self.main_date)

        self.btt_export = BttExportXLSX(u"Exporter")
        self.btt_export.clicked.connect(self.export_xls)

        gridbox = QtGui.QGridLayout()
        gridbox.addWidget(self.btt_export, 0, 3)
        gridbox.setColumnStretch(0, 2)

        vbox = QtGui.QVBoxLayout()
        vbox.addWidget(FPageTitle(self.title))
        vbox.addLayout(gridbox)
        vbox.addWidget(self.periods_bar)
        vbox.addWidget(self.table_rpt)
        self.setLayout(vbox)
Пример #3
0
    def __init__(self, parent=0, *args, **kwargs):

        super(PaymentViewWidget, self).__init__(parent=parent, *args, **kwargs)
        FPeriodHolder.__init__(self, *args, **kwargs)

        self.parentWidget().setWindowTitle(Config.APP_NAME + u"   Movements")
        self.parent = parent

        self.title = u"Movements"

        self.on_date = FormatDate(
            QDate(date.today().year,
                  date.today().month, 1))
        self.end_date = FormatDate(QDate.currentDate())
        self.now = datetime.now().strftime("%x")
        self.soldeField = FormLabel("0")
        self.label_balance = FormLabel(u"Solde au {} ".format(self.now))
        balanceBox = QGridLayout()
        balanceBox.addWidget(self.label_balance, 0, 2)
        balanceBox.addWidget(self.soldeField, 0, 3)
        balanceBox.setColumnStretch(0, 1)

        self.table = RapportTableWidget(parent=self)
        self.button = Button(u"Ok")
        self.button.clicked.connect(self.table.refresh_)

        self.btt_export = BttExportXLSX(u"Exporter")
        self.btt_export.clicked.connect(self.export_xls)
        self.add_btt = Button("Créditer")
        self.add_btt.setIcon(
            QIcon(u"{img_media}{img}".format(img_media=Config.img_media,
                                             img="in.png")))
        self.add_btt.clicked.connect(self.add_payment)
        self.sub_btt = Button("Débiter")
        self.sub_btt.setIcon(
            QIcon(u"{img_media}{img}".format(img_media=Config.img_media,
                                             img="out.png")))
        self.sub_btt.clicked.connect(self.sub_payment)

        editbox = QGridLayout()
        editbox.addWidget(FormLabel(u"Date debut"), 0, 1)
        editbox.addWidget(self.on_date, 0, 2)
        editbox.addWidget(FormLabel(u"Date fin"), 1, 1)
        editbox.addWidget(self.end_date, 1, 2)
        editbox.addWidget(self.button, 1, 3)

        editbox.addWidget(self.sub_btt, 1, 5)
        editbox.addWidget(self.add_btt, 1, 6)
        editbox.addWidget(self.btt_export, 1, 7)
        editbox.setColumnStretch(4, 2)
        vbox = QVBoxLayout()
        vbox.addWidget(FPageTitle(self.title))
        vbox.addLayout(editbox)
        vbox.addWidget(self.table)
        vbox.addLayout(balanceBox)
        self.setLayout(vbox)
Пример #4
0
    def __init__(self, parent=0, *args, **kwargs):

        super(StateStockViewWidget, self).__init__(
            parent=parent, *args, **kwargs)
        FPeriodHolder.__init__(self, *args, **kwargs)

        self.title = u"     Les Activités"
        self.parentWidget().setWindowTitle(Config.NAME_ORGA + self.title)
        self.parent = parent

        self.table = ReportTableWidget(parent=self, main_date=self.main_date)

        vbox = QtGui.QVBoxLayout()
        vbox.addWidget(FPageTitle(self.title))
        vbox.addWidget(self.periods_bar)
        vbox.addWidget(self.table)
        self.setLayout(vbox)
Пример #5
0
    def __init__(self, store, parent=0, *args, **kwargs):

        super(By_storeViewWidget, self).__init__(parent=parent, *args, **kwargs)
        FPeriodHolder.__init__(self, *args, **kwargs)

        self.setWindowTitle("Par store")
        store = Store.filter(name__icontains=store).get()
        self.title = FPageTitle(u"Les rapports de stock pour: %s"%
                                                            store.name)
        self.table = By_storeTableWidget(store, parent=self,
                                         main_date=self.main_date)

        vbox = QVBoxLayout()
        vbox.addWidget(self.title)
        vbox.addWidget(self.periods_bar)
        vbox.addWidget(self.table)

        self.setLayout(vbox)
Пример #6
0
    def __init__(self, product, parent=0, *args, **kwargs):

        super(By_productViewWidget, self).__init__(parent=parent, *args, **kwargs)
        FPeriodHolder.__init__(self, *args, **kwargs)

        self.parentWidget().setWindowTitle(Config.NAME_ORGA + u"      Par product")

        product = Product.select().where(Product.name.contains(product)).get()

        self.title = FPageTitle(u"Rapports du product: {name}".format(name=product.name))
        self.table = By_productTableWidget(product, parent=self,
                                           main_date=self.main_date)

        vbox = QVBoxLayout()
        vbox.addWidget(self.title)
        vbox.addWidget(self.periods_bar)
        vbox.addWidget(self.table)

        self.setLayout(vbox)
Пример #7
0
    def __init__(self, parent=0, dmd=None, *args, **kwargs):
        super(MemberManagerWidget, self).__init__(
            parent=parent, *args, **kwargs)
        FPeriodHolder.__init__(self, *args, **kwargs)

        self.parent = parent
        self.dmd = dmd
        self.search_field = LineEdit()
        self.search_field.setPlaceholderText("Rechercher un membre")
        # self.search_field.setMaximumWidth(400)
        self.search_field.setMaximumSize(900, 100)
        self.search_field.textChanged.connect(self.finder)

        self.string_list = []
        self.title_field = FPageTitle(
            "Gestion des membres de la {}".format(self.dmd.scoop))

        self.end_demande_btt = Button("Fin de l'ajout")
        self.end_demande_btt.setMaximumWidth(400)
        self.end_demande_btt.clicked.connect(self.goto_immatriculation)
        if self.dmd.scoop.membres().count() < 4:
            self.end_demande_btt.setEnabled(False)
        self.new_demande_btt = Button("Nouveau Membre")
        self.new_demande_btt.setMaximumWidth(400)
        self.new_demande_btt.setIcon(QIcon.fromTheme('save', QIcon(
            u"{}add.png".format(Config.img_media))))
        self.new_demande_btt.clicked.connect(self.add_member)

        self.table = MemberTableWidget(parent=self)

        editbox = QGridLayout()
        editbox.addWidget(self.search_field, 1, 0)
        editbox.setColumnStretch(1, 1)
        editbox.addWidget(self.new_demande_btt, 1, 3)
        editbox.addWidget(self.end_demande_btt, 1, 4)

        vbox = QVBoxLayout()
        vbox.addWidget(self.title_field)
        vbox.addLayout(editbox)
        vbox.addWidget(self.table)
        self.setLayout(vbox)