def __init__(self, databaseconnection, certificatecreator): """ Create a CertificateMaker. takes a databaseconnection and a CertificateCreator. The selection and logic of the passed CertificateCreator is used when making certifcates """ self.databaseconnection=databaseconnection self.cursor=self.databaseconnection.cursor(MySQLdb.cursors.DictCursor); self.certificatecreator=certificatecreator import TableConstructors TableConstructors.createCertificates(self.cursor)
def __init__(self, databaseconnection): """Initialise PurchaseOrderList. Takes a DB-API Connection object""" self.databaseconnection=databaseconnection self.cursor=self.databaseconnection.cursor(MySQLdb.cursors.DictCursor); import TableConstructors TableConstructors.createPurchaseOrderList(self.cursor) TableConstructors.createContractedItems(self.cursor) TableConstructors.createContractedTransactions(self.cursor) TableConstructors.createPlanningItems(self.cursor) self.purchaseorder=None
def __init__(self, databaseconnection, taskgroupid): """Initialise TransactionCreator. Takes a DB-API Connection object and a task group id""" self.databaseconnection=databaseconnection self.cursor=self.databaseconnection.cursor(MySQLdb.cursors.DictCursor); import TableConstructors TableConstructors.createContractedTransactions(self.cursor) TableConstructors.createContractedItems(self.cursor) TableConstructors.createCertificates(self.cursor) self.taskgroupid=taskgroupid self.filters={}
def __init__(self, databaseconnection,purchaseorder): """Initialise CertificateCreator. Takes a DB-API Connection object and a purchase order number""" self.databaseconnection=databaseconnection self.cursor=self.databaseconnection.cursor(MySQLdb.cursors.DictCursor); self.purchaseorder=purchaseorder import TableConstructors TableConstructors.createContractedItems(self.cursor) TableConstructors.createContractedTransactions(self.cursor) TableConstructors.createCertificates(self.cursor) #self.selection is a list of ContractedTransactionId of the items that will be certified self.selection=[]
def __init__(self, databaseconnection, taskgroupid): """Initialise HarvesterTransactionCreator. Takes a DB-API Connection object and a task group id""" TransactionCreator.__init__(self,databaseconnection,taskgroupid) import TableConstructors TableConstructors.createInvoices(self.cursor)
def __init__(self, databaseconnection): """Initialise PlanningList. Takes a DB-API Connection object""" self.databaseconnection=databaseconnection self.cursor=self.databaseconnection.cursor(MySQLdb.cursors.DictCursor); import TableConstructors TableConstructors.createTaskList(self.cursor)