def mainProcess(self): coy = { "stype": "R", "tables": ("ctlmst", ), "cols": (("ctm_cono", "", 0, "Coy-Num"), ("ctm_name", "", 0, "Name", "Y")), "where": [("ctm_cono", "!=", self.opts["conum"])] } r1s = (("Yes", "Y"), ("No", "N")) fld = ((("T", 0, 0, 0), "IUI", 3, "Copy From Company", "", 0, "N", self.doCoyNum, coy, None, ("notzero", )), (("T", 0, 1, 0), ("IRB", r1s), 1, "Include Control Records", "", "N", "N", None, None, None, None), (("T", 0, 2, 0), ("IRB", r1s), 1, "Include Opening Balances", "", "N", "N", None, None, None, None), (("T", 0, 3, 0), ("IRB", r1s), 1, "Include Transactions", "", "N", "N", None, None, None, None), (("T", 0, 4, 0), ("IRB", r1s), 1, "Include Budgets", "", "N", "N", None, None, None, None), (("T", 0, 5, 0), ("IRB", r1s), 1, "Include Standard Journals", "", "N", "N", None, None, None, None), (("T", 0, 6, 0), ("IRB", r1s), 1, "Include Reports", "", "N", "N", None, None, None, None), (("T", 0, 7, 0), ("IRB", r1s), 1, "Include Detail Records", "", "N", "N", None, None, None, None), (("T", 0, 8, 0), ("IRB", r1s), 1, "Include Stream Records", "", "N", "N", None, None, None, None), (("T", 0, 9, 0), ("IRB", r1s), 1, "Equalise Year Ends", "", "N", "N", None, None, None, None)) tnd = ((self.doEnd, "y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], eflds=fld, tend=tnd, txit=txt)
def mainProcess(self): dlm = { "stype": "R", "tables": ("drsdel", ), "cols": (("del_code", "", 0, "Del-Cod"), ("del_add1", "", 0, "Address")) } self.fld = [[("T", 0, 0, 0), "INa", 7, "Code", "Address Code", "", "N", self.doCode, dlm, None, ("notblank", )], (("T", 0, 1, 0), "INA", 30, "Address Line 1", "", "", "N", None, None, self.doDelete, ("notblank", )), (("T", 0, 2, 0), "INA", 30, "Address Line 2", "", "", "N", None, None, None, ("efld", )), (("T", 0, 3, 0), "INA", 30, "Address Line 3", "", "", "N", None, None, None, ("efld", )), (("T", 0, 4, 0), "INA", 30, "Address Line 4", "", "", "N", None, None, None, ("efld", ))] if "args" in self.opts: self.fld[0][1] = "ONa" self.fld[0][5] = self.opts["args"] but = (("Accept", None, self.doAccept, 0, ("T", 0, 2), ("T", 0, 0)), ("Cancel", None, self.doCancel, 0, ("T", 0, 2), ("T", 0, 0)), ("Quit", None, self.doExit, 1, None, None)) tnd = ((self.doEnd, "Y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], eflds=self.fld, butt=but, tend=tnd, txit=txt)
def mainProcess(self): fmt = { "stype": "R", "tables": ("bwlflf", ), "cols": (("bff_code", "", 0, "Cod"), ("bff_desc", "", 0, "Description", "Y")), "where": [("bff_cono", "=", self.opts["conum"])] } dte = { "stype": "R", "tables": ("bwlflm", ), "cols": (("bfm_date", "", 0, "Match-Date"), ), "where": [("bfm_cono", "=", self.opts["conum"]), ("bfm_round", "=", 1)], "whera": [("T", "bfm_fmat", 0, 0)], "group": "bfm_date" } r1s = (("Fixture", "F"), ("Practice", "P")) fld = ((("T", 0, 0, 0), "I@bfm_fmat", 0, "", "", "", "N", self.doFmat, fmt, None, ("efld", )), (("T", 0, 0, 0), "ONA", 30, ""), (("T", 0, 1, 0), ("IRB", r1s), 0, "Type", "", "F", "N", self.doType, dte, None, None), (("T", 0, 2, 0), "I@bfm_date", 0, "First Round Date", "", "", "N", self.doDate, dte, None, ("efld", ))) tnd = ((self.doEnd, "y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], tops=False, eflds=fld, tend=tnd, txit=txt, view=("Y", "V"), mail=("Y", "N"))
def doEdit(self): self.edit = True self.newr = False tit = "Edit Rate" vtr = { "stype": "R", "tables": ("ctlvrf",), "cols": ( ("vtr_date", "", 0, "Start-Date"), ("vtr_rate", "", 0, "Rate")), "where": [ ("vtr_cono", "=", self.opts["conum"]), ("vtr_code", "=", self.code)]} fld = ( (("T",0,0,0),"OUA",1,"V.A.T. Code"), (("T",0,1,0),"ONA",30,"Description"), (("T",0,2,0),"OUA",1,"Category"), (("T",0,3,0),"Id1",10,"Start-Date","The Starting Date", "","N",self.doEStart,vtr,self.doEDelete,("efld",)), (("T",0,4,0),"IUD",6.2,"Rate-%","The Rate", "","N",self.doERate,None,self.doEDelete,("notzero",))) state = self.df.disableButtonsTags() self.df.setWidget(self.df.mstFrame, state="hide") self.ed = TartanDialog(self.opts["mf"], title=tit, tops=True, eflds=fld, tend=((self.doEEnd,"n"),), txit=(self.doEExit,)) self.ed.loadEntry("T", 0, 0, data=self.code) self.ed.loadEntry("T", 0, 1, data=self.desc) self.ed.loadEntry("T", 0, 2, data=self.cat) self.ed.mstFrame.wait_window() self.df.setWidget(self.df.mstFrame, state="show") self.df.enableButtonsTags(state=state) if self.exit: self.df.focusField("T", 0, 1) else: self.doExit()
def doSelCoy(self): tit = ("Company Selection", ) self.coys = self.sql.getRec("ctlmst", cols=["ctm_cono", "ctm_name"], order="ctm_cono") coy = { "stype": "C", "head": ("Num", "Name"), "typs": (("UI", 3), ("NA", 30)), "data": self.coys, "mode": "M", "comnd": self.doCoyCmd } r1s = (("Yes", "Y"), ("Include", "I"), ("Exclude", "E")) fld = ((("T", 0, 0, 0), ("IRB", r1s), 0, "All Companies", "", "Y", "N", self.doAllCoy, None, None, None, None), (("T", 0, 1, 0), "INA", 30, "Companies", "", "", "N", self.doCoySel, coy, None, None, None)) self.cf = TartanDialog(self.opts["mf"], tops=True, title=tit, eflds=fld, tend=((self.doCoyEnd, "y"), ), txit=(self.doCoyExit, )) self.cf.mstFrame.wait_window()
def mainProcess(self): self.tit = ("%03i %s" % (self.opts["conum"], self.opts["conam"]), "Staff Loans Interrogation (%s)" % self.__class__.__name__) wgm = { "stype": "R", "tables": ("waglmf", "wagmst"), "cols": ( ("wlm_empno", "", 0, "EmpNo"), ("wgm_sname", "", 0, "Surname", "Y"), ("wgm_fname", "", 0, "Names")), "where": [ ("wlm_cono", "=", self.opts["conum"]), ("wgm_cono=wlm_cono",), ("wgm_empno=wlm_empno",)], "group": "wlm_empno"} lnm = { "stype": "R", "tables": ("waglmf",), "cols": ( ("wlm_empno", "", 0, "EmpNo"), ("wlm_loan", "", 0, "Ln"), ("wlm_desc", "", 0, "Description", "Y")), "where": [("wlm_cono", "=", self.opts["conum"])], "whera": [["T", "wlm_empno", 0, 0]], "order": "wlm_empno, wlm_loan", "index": 1} r1s = (("Yes", "Y"), ("No", "N")) tag = ( ("General", self.doGeneral, ("T",0,0), ("T",0,1)), ("Trans", self.doTrans1, ("T",0,0), ("T",0,1))) fld = ( (("T",0,0,0),"IUI",5,"Emp-Num","Employee Number", "","N",self.doEmp,wgm,None,("notzero",)), (("T",0,0,0),"ONA",40,"Name"), (("T",0,1,0),"IUI",5,"Loan-Num","Loan Number", "","N",self.doLoan,lnm,None,("notzero",)), (("T",0,1,0),"ONA",40,"Desc"), (("T",1,0,0),"OUI",3,"Deduction Code"), (("T",1,1,0),"OUD",6.2,"Interest Percentage"), (("T",1,2,0),"OD1",10,"Start Date"), (("T",1,3,0),"OSD",13.2,"Deduction Amount"), (("T",1,4,0),"OSD",13.2,"Total Advances"), (("T",1,5,0),"OSD",13.2,"Total Interest"), (("T",1,6,0),"OSD",13.2,"Total Repayments"), (("T",1,7,0),"OSD",13.2,"Total Adjustments"), (("T",1,8,0),"OSD",13.2,"Balance"), (("T",1,9,0),"Od1",10,"Last Interest Raised"), (("T",1,10,0),"Od1",10,"Last Payment Received"), (("T",2,0,0),("IRB",r1s),0,"History","", "Y","Y",self.doTrans2,None,None,None)) tnd = ((self.doEndTop,"N"), None, None) txt = (self.doExit, None, None) cnd = (None, None, None) cxt = (None, None, None) but = ( ("Clear",None,self.doClear,0,("T",0,0),("T",0,1)), ("Print",None,self.doPrint,0,("T",0,0),("T",0,1)), ("Quit",None,self.doExit,1,None,None)) self.df = TartanDialog(self.opts["mf"], title=self.tit, eflds=fld, tags=tag, tend=tnd, txit=txt, cend=cnd, cxit=cxt, butt=but)
def mainProcess(self): cod = { "stype": "R", "tables": ("memctc", ), "cols": (("mcc_code", "", 0, "Cd"), ("mcc_desc", "", 0, "Description", "Y")), "where": [("mcc_cono", "=", self.opts["conum"])], "whera": [["T", "mcc_type", 3]], "order": "mcc_code", "size": (400, 600) } r1s = (("Actual", "A"), ("Pending", "P")) fld = ((("T", 0, 0, 0), ("IRB", r1s), 0, "Report Type", "", "A", "Y", self.doRepTyp, None, None, None), (("T", 0, 1, 0), "Id1", 10, "Starting Date", "", self.sysdtw, "Y", self.doStartDate, None, None, None), (("T", 0, 2, 0), "ID1", 10, "Ending Date", "Ending Date", self.sysdtw, "Y", self.doEndDate, None, None, ("notzero", )), (("T", 0, 3, 0), ("IRB", self.ctyp), 0, "Change Type", "", "A", "Y", self.doChgTyp, None, None, None), (("T", 0, 4, 0), ("IRB", self.catg), 0, "Category", "", "X", "Y", self.doCat, None, None, None), (("T", 0, 5, 0), "IUI", 2, "Code", "", 0, "Y", self.doCod, cod, None, None)) tnd = ((self.doEnd, "Y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], title=self.tit, eflds=fld, tend=tnd, txit=txt, view=("Y", "V"), mail=("Y", "N"))
def doChanges(self): tit = ("Change Items", ) fld = ((("T", 0, 1, 0), "ONA", 3, "Group"), (("T", 0, 2, 0), "ONA", 20, "Code"), (("T", 0, 3, 0), "INA", 30, "Description", "", "", "N", self.doChgDes, None, None, ("notblank", )), (("T", 0, 4, 0), "ISD", 11.2, "Quantity", "", "", "N", self.doChgQty, None, None, ("notzero", )), (("T", 0, 5, 0), "IUD", 10.2, "Selling Price", "", "", "N", self.doChgPrc, None, None, ("notzero", )), (("T", 0, 6, 0), "IUD", 6.2, "Discount Percent", "", "", "N", self.doChgDis, None, None, ("efld", ))) but = (("Delete", None, self.doChgDel, 1, None, None), ) tnd = ((self.doChgEnd, "n"), ) txt = (self.doChgExit, ) self.cg = TartanDialog(self.opts["mf"], title=tit, tops=True, eflds=fld, butt=but, tend=tnd, txit=txt) self.cg.loadEntry("T", 0, 0, data=self.change[0]) self.cg.loadEntry("T", 0, 1, data=self.change[1]) self.cg.loadEntry("T", 0, 2, data=self.change[2]) self.cg.loadEntry("T", 0, 3, data=self.change[3]) self.cg.loadEntry("T", 0, 4, data=self.change[5]) self.cg.loadEntry("T", 0, 5, data=self.change[6]) self.cg.focusField("T", 0, 3, clr=False) self.cg.mstFrame.wait_window()
def doReprnt(self): tit = ("Reprint Orders", ) odr = { "stype": "R", "tables": ("strpom", "crsmst"), "cols": [("pom_ordno", "", 0, "Doc-Num"), ("pom_date", "", 0, "Date"), ("pom_acno", "", 0, "Acc-Num"), ("crm_name", "", 0, "Name", "Y")], "where": [("pom_cono", "=", self.opts["conum"]), ("pom_cono=crm_cono", ), ("pom_acno=crm_acno", )], "screen": self.opts["mf"].body } r1s = (("Copies", "C"), ("Originals", "O")) fld = ((("T", 0, 0, 0), ("IRB", r1s), 0, "Document Mode", "", "C", "N", self.doMode, None, None, None), (("T", 0, 1, 0), "IUI", 9, "From Number", "From Document Number", "", "N", self.doOrd, odr, None, ("notzero", )), [("T", 0, 2, 0), "IUI", 9, "To Number", "To Document Number", "", "N", None, odr, None, ("notzero", )]) state = self.df.disableButtonsTags() self.rp = TartanDialog(self.opts["mf"], title=tit, tops=True, eflds=fld, tend=((self.doReprntEnd, "n"), ), txit=(self.doReprntExit, ), view=("N", "V"), mail=("B", "Y")) self.rp.mstFrame.wait_window() self.df.enableButtonsTags(state=state) self.df.focusField(self.df.frt, self.df.pag, self.df.col)
def mainProcess(self): usr = { "stype": "R", "tables": ("ctllog", ), "cols": (("clg_user", "", 0, "User Name", "F"), ), "group": "clg_user" } self.mod = { "stype": "C", "titl": "Available Module", "head": ("Module", "T", "System", "Description"), "typs": (("NA", 6), ("UI", 1), ("NA", 30), ("NA", 30)), "data": [] } r1s = (("Descending", "D"), ("Ascending", "A")) fld = ((("T", 0, 0, 0), "Id1", 10, "Date From", "", 0, "N", self.doDate, None, None, ("efld", )), (("T", 0, 1, 0), "ID1", 10, "Date To", "", self.sysdtw, "N", self.doDate, None, None, ("efld", )), (("T", 0, 2, 0), "INA", 20, "User Name", "", "", "N", self.doUsr, usr, None, ("efld", )), (("T", 0, 3, 0), "INA", 20, "Module", "", "", "N", self.doMod, self.mod, None, ("efld", )), (("T", 0, 4, 0), ("IRB", r1s), 0, "Date Order", "", "D", "N", self.doOrder, None, None, None)) tnd = ((self.doEnd, "y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], tops=False, eflds=fld, tend=tnd, txit=txt, view=("Y", "V"), mail=("Y", "N"))
def doMessag(self): tit = ("Order Message", ) cod = { "stype": "R", "tables": ("ctlmes", ), "cols": [("mss_message", "", 0, "Cod"), ("mss_detail", "", 60, "Details")], "where": [("mss_system", "=", "STR")], "screen": self.df.mstFrame } fld = ((("T", 0, 0, 0), "IUI", 3, "Message Code", "", "", "N", self.doMesCod, cod, None, None), (("T", 0, 1, 0), "ITv", (30, 6), "Message", "", self.message, "N", None, None, None, None)) but = (("Accept", None, self.doMesEnd, 0, ("T", 0, 1), ("T", 0, 0)), ) state = self.df.disableButtonsTags() self.mg = TartanDialog(self.opts["mf"], title=tit, tops=True, eflds=fld, tend=((self.doMesEnd, "n"), ), txit=(self.doMesExit, ), butt=but) self.mg.mstFrame.wait_window() self.df.enableButtonsTags(state=state) self.df.focusField(self.df.frt, self.df.pag, self.df.col)
def mainProcess(self): self.tit = ("%03i %s" % (self.opts["conum"], self.opts["conam"]), "General Ledger Trial Balance (%s)" % self.__class__.__name__) r1s = (("Yes", "Y"), ("No", "N")) if "args" in self.opts and "noprint" in self.opts["args"]: var = self.opts["args"]["work"][0] view = None mail = None else: var = ["N", "Y", "", "", "Y"] view = ("Y", "V") mail = ("Y", "N") fld = ((("T", 0, 0, 0), ("IRB", r1s), 0, "Opening Balances Only", "", var[0], "Y", self.doOpeBal1, None, None, None), (("T", 0, 1, 0), ("IRB", r1s), 0, "Include Opening Balances", "", var[1], "N", self.doOpeBal2, None, None, None), (("T", 0, 2, 0), "Id2", 7, "Starting Period", "", self.s_per, "N", self.doStartPer, None, None, ("efld", )), (("T", 0, 3, 0), "Id2", 7, "Ending Period", "", self.e_per, "N", self.doEndPer, None, None, ("efld", )), (("T", 0, 4, 0), ("IRB", r1s), 0, "Ignore Zero Balances", "", var[4], "N", self.doZerBal, None, None, None)) tnd = ((self.doEnd, "y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], title=self.tit, eflds=fld, tend=tnd, txit=txt, view=view, mail=mail)
def mainProcess(self): lm1 = { "stype": "R", "tables": ("lonmf1", ), "cols": [("lm1_acno", "", 0, "Acc-Num"), ("lm1_name", "", 0, "Name", "Y"), ("lm1_addr1", "", 0, "Address Line 1")], "where": [("lm1_cono", "=", self.opts["conum"])] } fld = ((("T", 0, 0, 0), "IRW", 7, "Old Account", "Old Account Number", "", "Y", self.doOldAcc, lm1, None, ("notblank", )), (("T", 0, 0, 0), "O@lm1_name", 0, ""), (("T", 0, 1, 0), "I@lm1_acno", 0, "New Account", "New Account Number", "", "Y", self.doNewAcc, None, None, ("notblank", ))) tnd = ((self.doProcess, "y"), ) txt = (self.doExit, ) but = [("Generate", None, self.doGenerate, 0, ("T", 0, 1), ("T", 0, 2), "Generate New Account Numbers Based on Names of Accounts")] self.df = TartanDialog(self.opts["mf"], eflds=fld, tend=tnd, txit=txt, butt=but)
def mainProcess(self): self.tit = ("Wages Messages Listing (%s)" % self.__class__.__name__) fld = [] tnd = ((self.doEnd,"Y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], title=self.tit, eflds=fld, tend=tnd, txit=txt, view=("N","V"))
def drawDialog(self): tpm = { "stype": "R", "tables": ("tplmst", ), "cols": (("tpm_tname", "", 0, "Template"), ("tpm_title", "", 0, "Title"), ("tpm_type", "", 0, "T")), "where": [("tpm_type", "=", "S"), ("tpm_system", "=", "RTL")], "order": "tpm_tname" } r1s = (("Yes", "Y"), ("No", "N")) self.fld = ((("T", 0, 0, 0), ("IRB", r1s), 0, "G/L Integration", "", self.acc[1], "N", None, None, None, None), (("T", 0, 1, 0), "ID1", 10, "Last Month End", "", self.acc[2], "N", None, None, None, ("efld", )), (("T", 0, 2, 0), "INA", 20, "Statement Template", "", self.acc[3], "N", self.doTplNam, tpm, None, None), (("T", 0, 3, 0), "ITX", 50, "Email Address", "", self.acc[4], "N", None, None, None, ("email", ))) but = (("Quit", None, self.doExit, 1, None, None), ) tnd = ((self.doEnd, "Y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], eflds=self.fld, butt=but, tend=tnd, txit=txt) if not self.new: for n, f in enumerate(self.acc[1:-1]): self.df.loadEntry("T", 0, n, data=f)
def selectPrinter(self): tit = ("Printer Selection", ) tpm = { "stype": "R", "tables": ("tplmst", ), "cols": (("tpm_tname", "", 0, "Template"), ("tpm_title", "", 0, "Title", "Y")), "where": [("tpm_type", "=", "O"), ("tpm_system", "=", "STR")], "order": "tpm_tname" } fld = ((("T", 0, 0, 0), "INA", 20, "Template Name", "", self.dtpl, "N", self.doTplNam, tpm, None, None), (("T", 0, 1, 0), "ID1", 10, "Order Date", "", self.sysdtw, "N", self.doOrdDate, None, None, ("efld", ))) self.pr = TartanDialog(self.opts["mf"], tops=True, title=tit, eflds=fld, tend=((self.doPrtEnd, "y"), ), txit=(self.doPrtExit, ), view=("N", "P"), mail=("N", "Y", "Y")) self.opts["mf"].startLoop()
def mainProcess(self): bmf = { "stype": "R", "tables": ("bksmst", "bksown"), "cols": (("bmf_stat", "", 0, "S"), ("bmf_code", "", 0, "Code"), ("bmf_titl", "", 0, "Title", "Y"), ("bmf_ownr", "", 0, "Ownr"), ("bof_fnam", "", 0, "Name"), ("bmf_mnth", "", 0, "Mth-Rec")), "where": [("bmf_cono", "=", self.opts["conum"]), ("bof_cono=bmf_cono", ), ("bof_code=bmf_ownr", )], "order": "bmf_stat, bmf_titl", "index": 1 } amf = { "stype": "R", "tables": ("bksaut", ), "cols": (("baf_code", "", 0, "Code"), ("baf_snam", "", 0, "Surname", "Y"), ("baf_fnam", "", 0, "Names")), "order": "baf_code" } omf = { "stype": "R", "tables": ("bksown", ), "cols": (("bof_code", "", 0, "Code"), ("bof_snam", "", 0, "Surname", "Y"), ("bof_fnam", "", 0, "Names")), "where": [("bof_cono", "=", self.opts["conum"])], "order": "bof_code" } r1s = (("Current", "C"), ("Removed", "X")) fld = ((("T", 0, 0, 0), "IUI", 4, "Code", "", "", "Y", self.doCode, bmf, None, ("efld", )), (("T", 0, 1, 0), "ITX", 30, "Title", "", "", "N", self.doTitle, None, None, ("notblank", )), (("T", 0, 2, 0), "IUI", 4, "Author", "", "", "N", self.doAuthor, amf, None, ("efld", )), (("T", 0, 2, 0), "ONA", 30, ""), (("T", 0, 3, 0), "IUI", 4, "Owner", "", "", "N", self.doOwner, omf, None, ("efld", )), (("T", 0, 3, 0), "ONA", 30, ""), (("T", 0, 4, 0), "ID2", 7, "Month", "", "", "N", self.doMonth, None, None, ("efld", )), (("T", 0, 5, 0), ("IRB", r1s), 0, "Status", "", "C", "N", self.doStatus, None, None, None)) but = (("Accept", None, self.doAccept, 0, ("T", 0, 2), (("T", 0, 0), ("T", 0, 1))), ("Exit", None, self.doExit, 0, ("T", 0, 1), None)) tnd = ((self.doEnd, "y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], eflds=fld, butt=but, tend=tnd, txit=txt)
def doRibbon(self): tit = ("Ribbon Line", ) fld = ((("T", 0, 0, 0), "INA", 30, "Customer Order", "", self.cnam, "N", None, None, None, None), (("T", 0, 1, 0), "INA", 30, "Job Number", "", self.cnam, "N", None, None, None, None), (("T", 0, 2, 0), "INA", 30, "Contact Person", "", self.cnam, "N", None, None, None, None), (("T", 0, 3, 0), "INA", 10, "VAT Number", "", self.vatn, "N", self.doVatNum, None, None, None)) state = self.df.disableButtonsTags() self.rb = TartanDialog(self.opts["mf"], title=tit, tops=True, eflds=fld, tend=((self.doRibEnd, "n"), ), txit=(self.doRibExit, ), focus=False) if self.ribbon: self.rb.loadEntry("T", 0, 0, data=self.ribbon[0]) self.rb.loadEntry("T", 0, 1, data=self.ribbon[1]) self.rb.loadEntry("T", 0, 2, data=self.ribbon[2]) self.rb.loadEntry("T", 0, 3, data=self.ribbon[3]) self.rb.focusField("T", 0, 1) self.rb.mstFrame.wait_window() self.df.enableButtonsTags(state=state) self.df.focusField(self.df.frt, self.df.pag, self.df.col)
def doNewAsset(self): tit = ("Create New Asset", ) dep = { "stype": "R", "tables": ("assdep", ), "cols": (("asd_code", "", 0, "Cod"), ("asd_desc", "", 0, "Description", "Y")), "where": [("asd_cono", "=", self.opts["conum"])] } self.fld = ((("T", 0, 0, 0), "INA", 30, "Description", "", "", "N", None, None, None, ("notblank", )), (("T", 0, 1, 0), "INa", 3, "Dep Code", "Depreciation Code", self.depcod, "N", self.doDepCode, dep, None, ("notblank", )), (("T", 0, 1, 0), "ONA", 34, "")) tnd = ((self.doNewEnd, "N"), ) txt = (self.doNewXit, ) state = self.df.disableButtonsTags() self.na = TartanDialog(self.opts["mf"], tops=True, title=tit, eflds=self.fld, tend=tnd, txit=txt) self.na.mstFrame.wait_window() self.df.enableButtonsTags(state=state)
def mainProcess(self): prm = { "stype": "R", "tables": ("rtlprm",), "cols": ( ("rtp_code", "", 0, "Cod"), ("rtp_desc", "", 0, "Description", "Y")), "where": [("rtp_cono", "=", self.opts["conum"])]} rtm = { "stype": "R", "tables": ("rtlmst",), "cols": [ ("rtm_code", "", 0, "Cod"), ("rtm_acno", "", 0, "Acc-Num"), ("rtm_name", "", 0, "Name", "Y")], "where": [("rtm_cono", "=", self.opts["conum"])], "whera": [["T", "rtm_code", 0]], "index": 1} fld = [ (("T",0,0,0),"IRW",7,"Old Code","Old Premises Code", "","Y",self.doOldCod,prm,None,("notblank",)), (("T",0,0,0),"O@rtp_desc",0,""), (("T",0,1,0),"IRW",7,"Old Account","Old Account Number", "","Y",self.doOldAcc,rtm,None,("notblank",)), (("T",0,1,0),"O@rtm_name",0,""), (("T",0,2,0),"I@rtp_code",0,"New Code","New Premises Code", "","Y",self.doNewCod,prm,None,("notblank",)), (("T",0,2,0),"O@rtp_desc",0,""), (("T",0,3,0),"I@rtm_acno",0,"New Account","New Account Number", "","Y",self.doNewAcc,None,None,("notblank",))] tnd = ((self.doProcess,"y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], eflds=fld, tend=tnd, txit=txt)
def mainProcess(self): eml = { "stype": "R", "tables": ("emllog", ), "cols": (("eml_too", "", 0, "E-Mail Address", "F"), ), "group": "eml_too" } r1s = (("Descending", "D"), ("Ascending", "A")) fld = ((("T", 0, 0, 0), "Id1", 10, "Date From", "", 0, "N", self.doDate, None, None, ("efld", )), (("T", 0, 1, 0), "ID1", 10, "Date To", "", self.sysdtw, "N", self.doDate, None, None, ("efld", )), (("T", 0, 2, 0), "INA", 50, "Recipient", "", "", "N", self.doRecpt, eml, None, ("efld", )), (("T", 0, 3, 0), ("IRB", r1s), 0, "Date Order", "", "D", "N", self.doOrder, None, None, None)) tnd = ((self.doEnd, "y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], tops=False, eflds=fld, tend=tnd, txit=txt, view=("Y", "V"), mail=("Y", "N"))
def mainProcess(self): dats = [["ALL", "All Systems"]] syss = list(allsys.keys()) syss.sort() for s in syss: dats.append((s, allsys[s][0])) syss.append("ALL") sts = { "stype": "C", "titl": "Select the Required System", "head": ("COD", "System"), "data": dats } r1s = (("All", "A"), ("System", "S"), ("Singles", "X")) fld = ((("T", 0, 0, 0), ("IRB", r1s), 0, "Tables", "", "X", "Y", self.doTab, None, None, None), (("T", 0, 1, 0), "IUA", 3, "System", "", "ALL", "Y", self.doSys, sts, None, ("in", syss))) tnd = ((self.doEnd, "y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], eflds=fld, tend=tnd, txit=txt, view=("N", "V"), mail=("Y", "N"))
def mainProcess(self): self.tit = ("%03i %s" % (self.opts["conum"], self.opts["conam"]), "Cash Reconciliation Report (%s)" % self.__class__.__name__) dte = { "stype": "R", "tables": ("cshcnt", ), "cols": (("cct_date", "", 0, "Date"), ), "where": [("cct_cono", "=", self.opts["conum"])], "group": "cct_date" } fld = ((("T", 0, 0, 0), "ID1", 10, "From Date", "", self.dte, "Y", self.doFrom, dte, None, ("efld", )), (("T", 0, 1, 0), "Id1", 10, "To Date", "To Date", "", "Y", self.doTo, dte, None, ("efld", )), (("T", 0, 2, 0), "ISD", 13.2, "Float", "Cash Float", 2000, "Y", self.doFloat, None, None, ("notzero", ))) tnd = ((self.doEnd, "Y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], title=self.tit, eflds=fld, tend=tnd, txit=txt, view=("N", "V"), mail=("Y", "N"))
def mainProcess(self): self.tit = ("%03i %s" % (self.opts["conum"], self.opts["conam"]), "Delete Imported Bank Statements (%s)" % self.__class__.__name__) glm = { "stype": "R", "tables": ("ctlctl", "genmst"), "cols": (("ctl_conacc", "", 0, "Acc-Num"), ("glm_desc", "", 0, "Description", "Y")), "where": [("ctl_cono", "=", self.opts["conum"]), ("ctl_code", "like", "bank_%"), ("glm_cono=ctl_cono", ), ("glm_acno=ctl_conacc", )] } r1s = (("Yes", "Y"), ("No", "N")) fld = ((("T", 0, 0, 0), "IUI", 7, "Bank Account", "", "", "Y", self.doBankAcc, glm, None, ("efld", )), (("T", 0, 1, 0), "Id1", 10, "From Date", "From Date (0 for Beginning)", 0, "Y", self.doFrom, None, None, ("efld", )), (("T", 0, 2, 0), "Id1", 10, "To Date", "To Date (0 for End)", 0, "Y", self.doTo, None, None, ("efld", )), (("T", 0, 3, 0), ("IRB", r1s), 0, "Unallocated Only", "", "Y", "Y", self.doUnall, None, None, None)) tnd = ((self.doEnd, "y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], title=self.tit, eflds=fld, tend=tnd, txit=txt)
def mainProcess(self): self.tit = ("%03i %s" % (self.opts["conum"], self.opts["conam"]), "Creditors Batch Error Listing (%s)" % self.__class__.__name__) data = ["All Types"] for typ in crtrtp: data.append(typ[1]) btt = {"stype": "C", "titl": "Valid Types", "data": data, "retn": "I"} btm = { "stype": "R", "tables": ("ctlbat", ), "cols": (("btm_batno", "", 0, "Bat-Num"), ("btm_rtyp", ("xx", crtrtp), 20, "Type"), ("btm_curdt", "", 0, "Curr-Dt"), ("btm_multi", "", 0, "M")), "where": [("btm_cono", "=", self.opts["conum"]), ("btm_styp", "=", "CRS"), ("btm_ind", "=", "N")], "whera": [] } fld = ((("T", 0, 0, 0), "IUI", 1, "Type", "Transaction Type", "", "Y", self.doBatTyp, btt, None, None), (("T", 0, 1, 0), "INa", 7, "Batch-Number", "Batch Number", "", "Y", self.doBatNum, btm, None, None)) tnd = ((self.doEnd, "y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], title=self.tit, eflds=fld, tend=tnd, txit=txt, view=("N", "V"))
def mainProcess(self): lst = { "stype": "R", "tables": ("bksmst", ), "cols": (("bmf_mnth", "", 0, "Month"), ), "where": [("bmf_cono", "=", self.opts["conum"])], "group": "bmf_mnth", "order": "bmf_mnth" } r1s = (("All", "A"), ("Current", "C"), ("Removed", "R")) r2s = (("Title", "T"), ("Date", "D"), ("Author", "A"), ("Owner", "O")) fld = ((("T", 0, 0, 0), "ID2", 7, "Last Meeting", "", "", "N", self.doLast, lst, None, ("efld", )), (("T", 0, 1, 0), ("IRB", r1s), 0, "Status", "", "A", "N", self.doStatus, None, None, None), (("T", 0, 2, 0), ("IRB", r2s), 0, "Order", "", "T", "N", self.doOrder, None, None, None)) tnd = ((self.doEnd, "y"), ) txt = (self.doExit, ) self.df = TartanDialog(self.opts["mf"], tops=False, eflds=fld, tend=tnd, txit=txt, view=("N", "V"), mail=("B", "Y"))
def mainProcess(self): tab = { "stype": "R", "tables": ("bwltab", ), "cols": (("btb_tab", "", 0, "Tab-No"), ("btb_surname", "", 0, "Surname", "Y"), ("btb_names", "", 0, "Names")), "where": [("btb_cono", "=", self.opts["conum"])], "order": "btb_tab" } fld = [(["T", 0, 0, 0], "I@btb_tab", 0, "Old Tab", "Old Tab Number", "", "Y", self.doOldTab, tab, None, ("notzero", )), (["T", 0, 0, 18], "ONA", 30, ""), (["T", 0, 1, 0], "I@btb_tab", 0, "New Tab", "New Tab Number", "", "Y", self.doNewTab, None, None, ("notzero", ))] tnd = ((self.doProcess, "y"), ) txt = (self.doExit, ) but = [("Generate", None, self.doGenerate, 0, ("T", 0, 1), ("T", 0, 2), "Auto Generate New Tab Numbers Based on Names and Gender")] self.df = TartanDialog(self.opts["mf"], eflds=fld, tend=tnd, txit=txt, butt=but)
def dataHeader(self): crm = { "stype": "R", "tables": ("crsmst",), "cols": ( ("crm_acno", "", 0, "Acc-Num"), ("crm_name", "", 0, "Name", "Y")), "where": [ ("crm_cono", "=", self.opts["conum"]), ("crm_stat", "<>", "X")]} fld = [ [["T",0,0,0],"ID2",7,"Period","Current Financial Period", self.curdt,"N",self.doCurdt,None,None,("efld",)], [["T",0,1,0],"INA",7,"Acc-Num","Account Number", "","N",self.doAccno,crm,None,("notblank",)], [["T",0,1,0],"ONA",30,"Name"]] tnd = ((self.endTop, "n"),) txt = (self.exitTop,) self.but = ( ("Normal", None, self.doReAgeNormal, 0, None, None, "Only Show Unallocated Transactions"), ("History", None, self.doReAgeHistory, 0, None, None, "Show All Transactions, Including Already Allocated"), ("Automatic", None, self.doReAgeAuto, 0, None, None, "Automatically Re-Age the Account Based on Date")) self.df = TartanDialog(self.opts["mf"], eflds=fld, tend=tnd, txit=txt, butt=self.but)
def dataHeader(self): mlm = { "stype": "R", "tables": ("memmst", ), "cols": (("mlm_memno", "", 0, "Mem-No"), ("mlm_oldno", "", 0, "Old-No"), ("mlm_gender", "", 0, "G"), ("mlm_state", "", 0, "S"), ("mlm_surname", "", 0, "Surname", "Y"), ("mlm_names", "", 0, "Names", "F")), "where": [("mlm_cono", "=", self.opts["conum"])], "order": "mlm_surname, mlm_names", "sort": False } fld = ((("T", 0, 0, 0), "IUI", 6, "Mem-No", "Member Number", "", "Y", self.doMemNo, mlm, None, ("notblank", )), (("T", 0, 0, 0), "ONA", 30, "Member")) tnd = ((self.endTop, "n"), ) txt = (self.exitTop, ) self.but = (("Normal", None, self.doReAgeNormal, 0, None, None, "Only Show Unallocated Transactions"), ("History", None, self.doReAgeHistory, 0, None, None, "Show All Transactions, Including Already Allocated")) self.df = TartanDialog(self.opts["mf"], eflds=fld, tend=tnd, txit=txt, butt=self.but)
def doChgChanges(self): tit = ("Change Line", ) fld = ((("T", 0, 0, 0), "I@can_trdt", 10, "", "", "", "N", self.doChgDate, None, None, ("efld", )), (("T", 0, 1, 0), "I@can_code", 0, "", "", "", "N", None, self.cod, None, None), (("T", 0, 2, 0), "I@can_desc", 0, "", "", "", "N", None, None, None, ("efld", )), (("T", 0, 3, 0), "I@can_vatcod", 0, "", "", "", "N", self.doChgVCode, None, None, ("efld", )), (("T", 0, 4, 0), "I@can_incamt", 0, "", "", "", "N", self.doChgIncAmt, None, None, ("efld", )), (("T", 0, 5, 0), "I@can_vatamt", 0, "", "", "", "N", None, None, None, ("efld", ))) but = [["Delete", None, self.doChgDel, 1, None, None]] self.cg = TartanDialog(self.opts["mf"], title=tit, tops=True, eflds=fld, butt=but, tend=((self.doChgEnd, "n"), ), txit=(self.doChgExit, ), focus=False) for num, dat in enumerate(self.edit[3:9]): self.cg.loadEntry("T", 0, num, data=dat) self.cg.focusField("T", 0, 1, clr=False) self.cg.mstFrame.wait_window()