Beispiel #1
0
    def ui_print_report(self):
        up_html = """
          <table>
          <tr>
          <th>Тип</th><th>Поставщик</th><th>Дата с</th><th>Дата по</th><th>ИТОГО</th>
          </tr>
          <tr>
          <td>#type#</td><td>#provider#</td><td>#data_from#</td><td>#data_to#</td><td>#sum#</td>
          </tr>
          </table>
          """

        if self.tabWidget.currentIndex() == 0:
            head = "Отчет по приходу ткани"
            up_html = up_html.replace("#type#", self.le_material_type.text())
            up_html = up_html.replace("#provider#",
                                      self.le_material_provider.text())
            up_html = up_html.replace(
                "#data_from#",
                self.de_material_from.date().toString("dd.MM.yyyy"))
            up_html = up_html.replace(
                "#data_to#",
                self.de_material_to.date().toString("dd.MM.yyyy"))
            up_html = up_html.replace("#sum#", self.le_material_sum.text())
            table_widget = self.tw_material
        elif self.tabWidget.currentIndex() == 1:
            head = "Отчет по приходу фурнитуры"
            up_html = up_html.replace("#type#",
                                      self.le_accessories_type.text())
            up_html = up_html.replace("#provider#",
                                      self.le_accessories_provider.text())
            up_html = up_html.replace(
                "#data_from#",
                self.de_accessories_from.date().toString("dd.MM.yyyy"))
            up_html = up_html.replace(
                "#data_to#",
                self.de_accessories_to.date().toString("dd.MM.yyyy"))
            up_html = up_html.replace("#sum#", self.le_accessories_sum.text())
            table_widget = self.tw_accessories

        elif self.tabWidget.currentIndex() == 2:
            head = "Отчет по расходам на поставки"
            up_html = up_html.replace("#type#", self.le_comparing_type.text())
            up_html = up_html.replace("#provider#", "")
            up_html = up_html.replace(
                "#data_from#",
                self.de_comparing_from.date().toString("dd.MM.yyyy"))
            up_html = up_html.replace(
                "#data_to#",
                self.de_comparing_to.date().toString("dd.MM.yyyy"))
            up_html = up_html.replace("#sum#", self.le_comparing_sum.text())
            table_widget = self.tw_comparing
        else:
            return False

        html = table_to_html.tab_html(table_widget,
                                      table_head=head,
                                      up_template=up_html)
        self.print_class = print_qt.PrintHtml(self, html)
    def ui_print(self):
        head = "Себестоймость %s (%s) %s %s-%s" % (
            self.le_art.text(), self.le_size.text(), self.le_param.text(),
            self.de_date_in.date().toString(
                Qt.ISODate), self.de_date_from.date().toString(Qt.ISODate))

        html = table_to_html.tab_html(self.table_widget, table_head=head)
        self.print_class = print_qt.PrintHtml(self, html)
Beispiel #3
0
    def ui_print(self):
        query = """SELECT Last_Name, First_Name FROM staff_worker_info WHERE Id = %s"""
        sql_info = my_sql.sql_select(query, (self.id, ))
        if "mysql.connector.errors" in str(type(sql_info)):
            QMessageBox.critical(self, "Ошибка sql получения имени работника", sql_info.msg, QMessageBox.Ok)
            return False

        head = "Часы работника " + sql_info[0][0] + " " + sql_info[0][1]
        html = table_to_html.tab_html(self.tw_calc_traffic, table_head=head)
        self.print_class = print_qt.PrintHtml(self, html)
Beispiel #4
0
    def ui_print(self):
        query = """SELECT Last_Name, First_Name FROM staff_worker_info WHERE Id = %s"""
        sql_info = my_sql.sql_select(query, (self.id, ))
        if "mysql.connector.errors" in str(type(sql_info)):
            QMessageBox.critical(self, "Ошибка sql получения имени работника",
                                 sql_info.msg, QMessageBox.Ok)
            return False

        head = "Часы работника " + sql_info[0][0] + " " + sql_info[0][1]
        html = table_to_html.tab_html(self.tw_calc_traffic, table_head=head)
        self.print_class = print_qt.PrintHtml(self, html)
    def ui_print(self):
        up_html = """
          <table>
          <tr> <th>Остаток ткани</th><th>На сумму</th><th>Остаток фурнитуры</th><th>На сумму</th> </tr>
          <tr> <td>#material_balance#</td><td>#material_sum#</td><td>#accessories_balance#</td><td>#accessories_sum#</td> </tr>
          </table>"""
        up_html = up_html.replace("#material_balance#", self.le_material_balance.text())
        up_html = up_html.replace("#material_sum#", self.le_material_sum.text())
        up_html = up_html.replace("#accessories_balance#", self.le_accessories_balance.text())
        up_html = up_html.replace("#accessories_sum#", self.le_accessories_sum.text())

        head = "Остаток склада на %s" % (self.de_date_to.date().toString(Qt.ISODate))

        html = table_to_html.tab_html(self.tableWidget, table_head=head, up_template=up_html)
        self.print_class = print_qt.PrintHtml(self, html)
Beispiel #6
0
    def ui_print_preliminary_salary(self):
        up_html = """
          <table>
          <tr> <th>Операции</th><th>Доплаты</th><th>Вычеты</th><th>Итогоу</th> </tr>
          <tr> <td>#le_all_operation#</td><td>#le_all_plus#</td><td>#le_all_minus#</td><td>#le_all_sum#</td> </tr>
          </table>"""
        up_html = up_html.replace("#le_all_operation#", self.le_all_operation_2.text())
        up_html = up_html.replace("#le_all_plus#", self.le_all_plus_2.text())
        up_html = up_html.replace("#le_all_minus#", self.le_all_minus_2.text())
        up_html = up_html.replace("#le_all_sum#", self.le_all_sum_2.text())

        head = "Предварительный расчет зарплаты %s" % (QDate.currentDate().toString("dd.MM.yyyy"))

        html = table_to_html.tab_html(self.tw_main_salary_2, table_head=head, up_template=up_html)
        self.print_class = print_qt.PrintHtml(self, html)
Beispiel #7
0
    def ui_print(self):
        up_html = """
          <table>
          <tr> <th>Продано товара</th><th>На сумму</th><th>Затрачено рублей</th><th>ИТОГО прибыль</th> </tr>
          <tr> <td>#value_sum#</td><td>#sold_sum#</td><td>#seb_sum#</td><td>#all_sum#</td> </tr>
          </table>"""
        up_html = up_html.replace("#value_sum#", self.le_value_sum.text())
        up_html = up_html.replace("#sold_sum#", self.le_sold_sum.text())
        up_html = up_html.replace("#seb_sum#", self.le_seb_sum.text())
        up_html = up_html.replace("#all_sum#", self.le_profit_sum.text())

        head = "Прибыль предприятия %s-%s" % (self.de_date_from.date().toString(Qt.ISODate), self.de_date_to.date().toString(Qt.ISODate))

        html = table_to_html.tab_html(self.tableWidget, table_head=head, up_template=up_html)
        self.print_class = print_qt.PrintHtml(self, html)
    def ui_print(self):
        up_html = """
          <table>
          <tr> <th>Кроев</th><th>Пачек</th><th>Операций</th><th>Готовых изделий</th><th>Брака</th><th>На сумму (покроеную)</th> </tr>
          <tr> <th>#le_cut#</th><th>#le_pack#</th><th>#le_operation#</th><th>#le_product#</th><th>#le_damage#</th><th>#le_sum#</th> </tr>
          </table>"""
        up_html = up_html.replace("#le_cut#", self.le_cut.text())
        up_html = up_html.replace("#le_pack#", self.le_pack.text())
        up_html = up_html.replace("#le_operation#", self.le_operation.text())
        up_html = up_html.replace("#le_product#", self.le_product.text())
        up_html = up_html.replace("#le_damage#", self.le_damage.text())
        up_html = up_html.replace("#le_sum#", self.le_sum.text())

        head = "Произведено компанией %s - %s" % (self.de_date_from.date().toString(Qt.ISODate), self.de_date_to.date().toString(Qt.ISODate))

        html = table_to_html.tab_html(self.tableWidget, table_head=head, up_template=up_html)
        self.print_class = print_qt.PrintHtml(self, html)
    def ui_print(self):
        up_html = """
          <table>
          <tr> <th>Кроев</th><th>Пачек</th><th>Операций</th><th>Готовых изделий</th><th>Брака</th><th>На сумму (покроеную)</th> </tr>
          <tr> <th>#le_cut#</th><th>#le_pack#</th><th>#le_operation#</th><th>#le_product#</th><th>#le_damage#</th><th>#le_sum#</th> </tr>
          </table>"""
        up_html = up_html.replace("#le_cut#", self.le_cut.text())
        up_html = up_html.replace("#le_pack#", self.le_pack.text())
        up_html = up_html.replace("#le_operation#", self.le_operation.text())
        up_html = up_html.replace("#le_product#", self.le_product.text())
        up_html = up_html.replace("#le_damage#", self.le_damage.text())
        up_html = up_html.replace("#le_sum#", self.le_sum.text())

        head = "Произведено компанией %s - %s" % (self.de_date_from.date().toString(Qt.ISODate), self.de_date_to.date().toString(Qt.ISODate))

        html = table_to_html.tab_html(self.tableWidget, table_head=head, up_template=up_html)
        self.print_class = print_qt.PrintHtml(self, html)
Beispiel #10
0
    def ui_print(self):
        head = "Средняя обрезь %s-%s" % (self.de_date_from.date().toString(Qt.ISODate), self.de_date_to.date().toString(Qt.ISODate))

        up_html = """
          <table>
          <tr>
          <th>Минимальное</th><th>Среднее</th><th>Максимальное</th>
          </tr>
          <tr>
          <td>#min#</td><td>#avg#</td><td>#max#</td>
          </tr>
          </table>"""

        up_html = up_html.replace("#min#", str(self.le_min.text()))
        up_html = up_html.replace("#avg#", str(self.le_awg.text()))
        up_html = up_html.replace("#max#", str(self.le_max.text()))

        html = table_to_html.tab_html(self.tw_work, table_head=head, up_template=up_html)
        self.print_class = print_qt.PrintHtml(self, html)
Beispiel #11
0
    def ui_print(self):
        up_html = """
          <table>
          <tr> <th>Продано товара</th><th>На сумму</th><th>Затрачено рублей</th><th>ИТОГО прибыль</th> </tr>
          <tr> <td>#value_sum#</td><td>#sold_sum#</td><td>#seb_sum#</td><td>#all_sum#</td> </tr>
          </table>"""
        up_html = up_html.replace("#value_sum#", self.le_value_sum.text())
        up_html = up_html.replace("#sold_sum#", self.le_sold_sum.text())
        up_html = up_html.replace("#seb_sum#", self.le_seb_sum.text())
        up_html = up_html.replace("#all_sum#", self.le_profit_sum.text())

        head = "Прибыль предприятия %s-%s" % (
            self.de_date_from.date().toString(
                Qt.ISODate), self.de_date_to.date().toString(Qt.ISODate))

        html = table_to_html.tab_html(self.tableWidget,
                                      table_head=head,
                                      up_template=up_html)
        self.print_class = print_qt.PrintHtml(self, html)
Beispiel #12
0
    def ui_print_preliminary_salary(self):
        up_html = """
          <table>
          <tr> <th>Операции</th><th>Доплаты</th><th>Вычеты</th><th>Итогоу</th> </tr>
          <tr> <td>#le_all_operation#</td><td>#le_all_plus#</td><td>#le_all_minus#</td><td>#le_all_sum#</td> </tr>
          </table>"""
        up_html = up_html.replace("#le_all_operation#",
                                  self.le_all_operation_2.text())
        up_html = up_html.replace("#le_all_plus#", self.le_all_plus_2.text())
        up_html = up_html.replace("#le_all_minus#", self.le_all_minus_2.text())
        up_html = up_html.replace("#le_all_sum#", self.le_all_sum_2.text())

        head = "Предварительный расчет зарплаты %s" % (
            QDate.currentDate().toString("dd.MM.yyyy"))

        html = table_to_html.tab_html(self.tw_main_salary_2,
                                      table_head=head,
                                      up_template=up_html)
        self.print_class = print_qt.PrintHtml(self, html)
Beispiel #13
0
    def ui_print_report(self):
        up_html = """
          <table>
          <tr>
          <th>Тип</th><th>Поставщик</th><th>Дата с</th><th>Дата по</th><th>ИТОГО</th>
          </tr>
          <tr>
          <td>#type#</td><td>#provider#</td><td>#data_from#</td><td>#data_to#</td><td>#sum#</td>
          </tr>
          </table>
          """

        if self.tabWidget.currentIndex() == 0:
            head = "Отчет по приходу ткани"
            up_html = up_html.replace("#type#", self.le_material_type.text())
            up_html = up_html.replace("#provider#", self.le_material_provider.text())
            up_html = up_html.replace("#data_from#", self.de_material_from.date().toString("dd.MM.yyyy"))
            up_html = up_html.replace("#data_to#", self.de_material_to.date().toString("dd.MM.yyyy"))
            up_html = up_html.replace("#sum#", self.le_material_sum.text())
            table_widget = self.tw_material
        elif self.tabWidget.currentIndex() == 1:
            head = "Отчет по приходу фурнитуры"
            up_html = up_html.replace("#type#", self.le_accessories_type.text())
            up_html = up_html.replace("#provider#", self.le_accessories_provider.text())
            up_html = up_html.replace("#data_from#", self.de_accessories_from.date().toString("dd.MM.yyyy"))
            up_html = up_html.replace("#data_to#", self.de_accessories_to.date().toString("dd.MM.yyyy"))
            up_html = up_html.replace("#sum#", self.le_accessories_sum.text())
            table_widget = self.tw_accessories

        elif self.tabWidget.currentIndex() == 2:
            head = "Отчет по расходам на поставки"
            up_html = up_html.replace("#type#", self.le_comparing_type.text())
            up_html = up_html.replace("#provider#", "")
            up_html = up_html.replace("#data_from#", self.de_comparing_from.date().toString("dd.MM.yyyy"))
            up_html = up_html.replace("#data_to#", self.de_comparing_to.date().toString("dd.MM.yyyy"))
            up_html = up_html.replace("#sum#", self.le_comparing_sum.text())
            table_widget = self.tw_comparing
        else:
            return False

        html = table_to_html.tab_html(table_widget, table_head=head, up_template=up_html)
        self.print_class = print_qt.PrintHtml(self, html)
    def ui_print(self):
        up_html = """
          <table>
          <tr> <th>Остаток ткани</th><th>На сумму</th><th>Остаток фурнитуры</th><th>На сумму</th> </tr>
          <tr> <td>#material_balance#</td><td>#material_sum#</td><td>#accessories_balance#</td><td>#accessories_sum#</td> </tr>
          </table>"""
        up_html = up_html.replace("#material_balance#",
                                  self.le_material_balance.text())
        up_html = up_html.replace("#material_sum#",
                                  self.le_material_sum.text())
        up_html = up_html.replace("#accessories_balance#",
                                  self.le_accessories_balance.text())
        up_html = up_html.replace("#accessories_sum#",
                                  self.le_accessories_sum.text())

        head = "Остаток склада на %s" % (self.de_date_to.date().toString(
            Qt.ISODate))

        html = table_to_html.tab_html(self.tableWidget,
                                      table_head=head,
                                      up_template=up_html)
        self.print_class = print_qt.PrintHtml(self, html)
Beispiel #15
0
    def ui_print(self):
        head = "Средняя обрезь %s-%s" % (self.de_date_from.date().toString(
            Qt.ISODate), self.de_date_to.date().toString(Qt.ISODate))

        up_html = """
          <table>
          <tr>
          <th>Минимальное</th><th>Среднее</th><th>Максимальное</th>
          </tr>
          <tr>
          <td>#min#</td><td>#avg#</td><td>#max#</td>
          </tr>
          </table>"""

        up_html = up_html.replace("#min#", str(self.le_min.text()))
        up_html = up_html.replace("#avg#", str(self.le_awg.text()))
        up_html = up_html.replace("#max#", str(self.le_max.text()))

        html = table_to_html.tab_html(self.tw_work,
                                      table_head=head,
                                      up_template=up_html)
        self.print_class = print_qt.PrintHtml(self, html)
Beispiel #16
0
 def ui_print(self):
     head = self.windowTitle()
     html = table_to_html.tab_html(self.table_widget, table_head=head)
     self.print_class = print_qt.PrintHtml(self, html)
Beispiel #17
0
 def ui_print(self):
     head = self.windowTitle()
     html = table_to_html.tab_html(self.table_widget, table_head=head)
     self.print_class = print_qt.PrintHtml(self, html)
Beispiel #18
0
 def ui_print_material(self):
     head = "Расход ткани с %s По %s" % (self.de_material_from.date().toString("dd.MM.yyyy"), self.de_material_to.date().toString("dd.MM.yyyy"))
     html = table_to_html.tab_html(self.tw_material, table_head=head)
     html += table_to_html.tab_html(self.tw_material_info, table_head="Подробно")
     self.print_class = print_qt.PrintHtml(self, html)
Beispiel #19
0
    def ui_print(self):
        head = "Налог %s - %s" % (self.de_date_from.date().toString(
            Qt.ISODate), self.de_date_to.date().toString(Qt.ISODate))

        html = table_to_html.tab_html(self.tableWidget, table_head=head)
        self.print_class = print_qt.PrintHtml(self, html)
Beispiel #20
0
 def ui_print(self):
     head = "Покроено по дням %s-%s" % (self.de_date_from.date().toString(Qt.ISODate), self.de_date_to.date().toString(Qt.ISODate))
     html = table_to_html.tab_html(self.tableWidget, table_head=head)
     self.print_class = print_qt.PrintHtml(self, html)
    def ui_print(self):
        head = "Себестоймость %s (%s) %s %s-%s" % (self.le_art.text(), self.le_size.text(), self.le_param.text(),
                                                   self.de_date_in.date().toString(Qt.ISODate), self.de_date_from.date().toString(Qt.ISODate))

        html = table_to_html.tab_html(self.table_widget, table_head=head)
        self.print_class = print_qt.PrintHtml(self, html)
Beispiel #22
0
 def ui_print_comparing(self):
     head = "Прочие расходы с %s По %s" % (self.de_comparing_from.date().toString("dd.MM.yyyy"), self.de_comparing_to.date().toString("dd.MM.yyyy"))
     html = table_to_html.tab_html(self.tw_comparing, table_head=head)
     self.print_class = print_qt.PrintHtml(self, html)
Beispiel #23
0
 def ui_print_accessories(self):
     head = "Расход фурнитуры с %s По %s" % (self.de_accessories_from.date().toString("dd.MM.yyyy"), self.de_accessories_to.date().toString("dd.MM.yyyy"))
     html = table_to_html.tab_html(self.tw_accessories, table_head=head)
     html += table_to_html.tab_html(self.tw_accesories_info, table_head="Подробно")
     self.print_class = print_qt.PrintHtml(self, html)