Example #1
0
    def __init__(self, parent=None):
        """
        Constructor
        """
        QDialog.__init__(self, parent)
        self.setupUi(self)

        #set invisible
        self.pushButton_add.setVisible(False)

        #declare object
        try:
            self.clist = Customer_list()
        except IOError as e:
            raise IOError(e)

        self.cprice = Customer_price()

        #read company list
        self.m_clist = {}
        self.m_clist = self.clist.readCompany()

        #set combo
        self.setCombo(1, self.m_clist)

        #set initial one
        self.comboBox_customer.setCurrentIndex(0)
        self.on_comboBox_customer_activated(0)

        #add customer to text browser
        self.setTextbrowser()
Example #2
0
    def __init__(self, parent=None):
        """
        Constructor
        """
        QDialog.__init__(self, parent)
        self.setupUi(self)

        #set today ( for file usage)
        self.qdate = QDate.currentDate()
        self.dateEdit.setDate(self.qdate)

        #declare customer list object
        try:
            self.cfile = Customer_list()
        except IOError as e:
            raise IOError(e)

        #read company list
        self.m_clist = {}
        self.m_clist = self.cfile.readCompany()

        #set combo box
        self.setCombo(self.m_clist)
Example #3
0
    def __init__(self, parent=None):
        """
        Constructor
        """
        QDialog.__init__(self, parent)
        self.setupUi(self)

        #construct Customer list class
        self.clist = Customer_list()

        #construct accounting class
        self.caccount = Dfile()

        #construct customer price class
        self.cprice = Customer_price()

        #construct standard table
        self.tablemodel = QStandardItemModel(31, len(PRODUCT_NAME))
        self.setTableheader()

        #save customer list int
        self.list_customer = self.clist.readCompany()
        self.setCombo(1, self.list_customer)