Пример #1
0
 def printReport(self):
     state = self.df.disableButtonsTags()
     heads = ["Module Passwords Master Listing"]
     cols = [
         ["pwd_cono","UI",3.0,"Coy"],
         ["pwd_sys","UA",3.0,"Sys"],
         ["pwd_code","NA",20.0,"Access Code"],
         ["pwd_desc","NA",50.0,"Description"],
         ["pwd_pass","HA",30.0,"Password"]]
     if self.typ == "Y":
         tables = ["ctlpwr"]
         if self.sys == "ALL":
             whr = []
         else:
             whr = [("pwd_sys", "=", self.sys)]
         odr = "pwd_cono, pwd_sys, pwd_code"
         RepPrt(self.opts["mf"], name=self.__class__.__name__,
             tables=tables, heads=heads, cols=cols, where=whr,
             order=odr, repprt=self.df.repprt)
     else:
         ccol = cols[:]
         ccol[0][1] = "NA"
         data = []
         for ctl in pwctrl:
             if self.sys == "ALL" or ctl[0] == self.sys:
                 data.append(("", ctl[0], ctl[1], ctl[2], ""))
         RepPrt(self.opts["mf"], name=self.__class__.__name__,
             tables=data, heads=heads, cols=ccol, ttype="D",
             repprt=self.df.repprt)
     self.df.enableButtonsTags(state=state)
Пример #2
0
 def doEnd(self):
     tables = ["assgrp"]
     heads = ["Asset Groups Master Listing"]
     col = [["asg_group", "UA", 3.0, "Grp"],
            ["asg_desc", "NA", 30.0, "Description"],
            ["asg_assacc", "UI", 7.0, "Ass-Acc"],
            ["asg_depacc", "UI", 7.0, "Dep-Acc"],
            ["asg_expacc", "UI", 7.0, "Exp-Acc"]]
     whr = [("asg_cono", "=", self.opts["conum"])]
     odr = "asg_group"
     state = self.df.disableButtonsTags()
     RepPrt(self.opts["mf"],
            name=self.__class__.__name__,
            tables=tables,
            heads=heads,
            cols=col,
            where=whr,
            order=odr,
            conum=self.opts["conum"],
            conam=self.opts["conam"],
            repprt=self.df.repprt,
            repeml=self.df.repeml,
            fromad=self.fromad)
     self.df.enableButtonsTags(state=state)
     self.closeProcess()
Пример #3
0
 def doEnd(self):
     self.df.closeProcess()
     if not self.frm.work:
         frm = "Beginning"
     else:
         frm = self.frm.disp
     hds = "Changes Log Report from %s to %s" % (frm, self.too.disp)
     col = [("chg_tab", "NA", 6.0, "TabNam"), ("chg_act", "UA", 1.0, "A"),
            ("chg_key", "NA", 30.0, "Record-Key"),
            ("chg_col", "NA", 20.0, "Column-Name"),
            ("chg_old", "TX", 50.0, "Old-Details"),
            ("chg_new", "TX", 50.0, "New-Details"),
            ("chg_dte", "TS", 19.0, "Date-&-Time-Changed"),
            ("chg_usr", "NA", 20.0, "User-Login")]
     whr = [("chg_dte", ">=", str(self.frm.work * 1000000)),
            ("chg_dte", "<=", str((self.too.work * 1000000) + 999999))]
     if self.byusr == "Y":
         odr = "chg_tab, chg_dte desc"
     else:
         odr = "chg_dte desc"
     if self.table:
         whr.append(("chg_tab", "=", self.table))
     if self.user:
         whr.append(("chg_usr", "=", self.user))
     RepPrt(self.opts["mf"],
            name=self.__class__.__name__,
            tables=["chglog"],
            heads=[hds],
            cols=col,
            where=whr,
            order=odr,
            repprt=self.df.repprt,
            repeml=self.df.repeml)
     self.opts["mf"].closeLoop()
Пример #4
0
 def printReport(self, recs):
     self.df.closeProcess()
     tables = []
     for rec in recs:
         lin = []
         lin.append(rec[0])
         lin.append(rec[1])
         lin.append(rec[2])
         tables.append(lin)
         lin = []
         if rec[3] or rec[4]:
             lin.append("")
             lin.append(rec[3])
             lin.append(rec[4])
             tables.append(lin)
         lin = []
         for _ in range(0, 3):
             lin.append("")
         tables.append(lin)
     heads = ["Debtors Delivery Address Listing"]
     cols = [["a","NA",7.0,"Add-Cod"],
             ["b","NA",30.0,"Address-Line"],
             ["c","NA",30.0,"Address-Line"]]
     RepPrt(self.opts["mf"], name=self.__class__.__name__, tables=tables,
         heads=heads, cols=cols, conum=self.opts["conum"], ttype="D",
         conam=self.opts["conam"], repprt=self.df.repprt,
         repeml=self.df.repeml, fromad=self.fromad)
     self.opts["mf"].closeLoop()
Пример #5
0
 def doPrintDoc(self, repprt):
     hds = [
         "Goods Issued Notes",
         "GIN Number: %s GIN Date: %s" % (self.iss, self.ddt)
     ]
     tab = ["strmf1", "strtrn"]
     col = [["stt_group", "UA", 3, "Grp", "y"],
            ["stt_code", "NA", 20, "Product-Code", "y"],
            ["stt_desc", "NA", 40, "Description", "y"],
            ["stt_loc", "UA", 1, "L", "y"],
            ["stt_qty", "SD", 11.2, "Quantity", "y", "y"],
            ["stt_cost", "SD", 11.2, "Price", "y", "y"]]
     gtt = ["stt_cost"]
     whr = [("stt_cono", "=", self.opts["conum"]),
            ("stt_type", "in", (2, 6)), ("stt_ref1", "=", self.iss),
            ("stt_trdt", "=", self.dte), ("st1_cono=stt_cono", ),
            ("st1_group=stt_group", ), ("st1_code=stt_code", ),
            ("st1_type", "<>", "R")]
     odr = "stt_seq"
     self.df.setWidget(self.df.mstFrame, state="hide")
     RepPrt(self.opts["mf"],
            conum=self.opts["conum"],
            conam=self.opts["conam"],
            name=self.__class__.__name__,
            tables=tab,
            heads=hds,
            cols=col,
            gtots=gtt,
            where=whr,
            order=odr,
            repprt=repprt)
     self.df.setWidget(self.df.mstFrame, state="show")
Пример #6
0
 def doEnd(self):
     self.df.closeProcess()
     tables = ["ctlrep"]
     heads = ["Salemen's Master Listing"]
     cols = []
     dics = self.sql.ctlrep_dic
     for col in self.sql.ctlrep_col:
         if col in ("rep_cono", ):
             continue
         dat = [col, dics[col][2], dics[col][3], dics[col][4]]
         cols.append(dat)
     if self.sort == "N":
         odr = "rep_code"
     else:
         odr = "rep_name, rep_code"
     whr = [("rep_cono", "=", self.opts["conum"])]
     opts = "%-5s%-6s" % ("Sort-", self.sort)
     RepPrt(self.opts["mf"],
            tables=tables,
            heads=heads,
            cols=cols,
            order=odr,
            opts=opts,
            where=whr,
            conum=self.opts["conum"],
            conam=self.opts["conam"],
            repprt=self.df.repprt,
            repeml=self.df.repeml,
            fromad=self.fromad)
     self.opts["mf"].closeLoop()
Пример #7
0
 def doEnd(self):
     data = []
     self.df.closeProcess()
     hed = ["Cancelled Sales %s" % self.dtyp]
     tab = ["slsiv1", "drsmst"]
     col = [
         "si1_rtn", "si1_docno", "si1_date", "si1_acno", "drm_name",
         "si1_invno"
     ]
     whr = [("si1_cono", "=", self.opts["conum"]),
            ("si1_date", "between", self.sdte, self.edte),
            ("drm_cono=si1_cono", ), ("drm_chain=si1_chain", ),
            ("drm_acno=si1_acno", )]
     if self.type == "B":
         whr.append(("si1_rtn", "in", ("C", "I")))
     else:
         whr.append(("si1_rtn", "=", self.type))
     whr.append(("si1_invno", "=", "cancel"))
     odr = "si1_rtn, si1_docno"
     data = self.sql.getRec(tables=tab, cols=col, where=whr, order=odr)
     cols = []
     dics = self.sql.slsiv1_dic.copy()
     dics.update(self.sql.drsmst_dic)
     for c in col[:5]:
         cols.append((c, dics[c][2], dics[c][3], dics[c][5]))
     RepPrt(self.opts["mf"],
            name=self.__class__.__name__,
            tables=data,
            ttype="D",
            heads=hed,
            cols=cols)
     self.opts["mf"].closeLoop()
Пример #8
0
 def doPrint(self):
     hds = "V.A.T. Records"
     col = [
         ["vtm_code", "UA",  1,   "C"],
         ["vtm_desc", "NA", 30,   "Description"],
         ["vtm_cat", "UA",   1,   "T"],
         ["vtr_date", "d1", 10,   "Start-Date"],
         ["vtr_rate", "UD",  6.2, "Rate"]]
     recs = self.sql.getRec(tables=["ctlvmf", "ctlvrf"], cols=["vtm_code",
         "vtm_desc", "vtm_cat", "vtr_date", "vtr_rate"], where=[("vtm_cono",
         "=", self.opts["conum"]), ("vtr_cono=vtm_cono",),
         ("vtr_code=vtm_code",)], order="vtm_code, vtr_date")
     code = None
     data = copyList(recs)
     for num, rec in enumerate(recs):
         if rec[0] == code:
             data[num][0] = ""
             data[num][1] = ""
             data[num][2] = ""
         code = rec[0]
     state = self.df.disableButtonsTags()
     self.df.setWidget(self.df.mstFrame, state="hide")
     RepPrt(self.opts["mf"], name=self.__class__.__name__, tables=data,
         heads=[hds], ttype="D", cols=col, prtdia=(("Y","V"), ("Y","N")))
     self.df.setWidget(self.df.mstFrame, state="show")
     self.df.enableButtonsTags(state=state)
     self.df.focusField("T", 0, 1)
Пример #9
0
 def doEnd(self):
     self.df.closeProcess()
     heads = ["Debtor's Chainstores Master Listing"]
     cols = []
     dics = self.sql.drschn_dic
     for col in self.sql.drschn_col:
         if col in ("chm_cono", "chm_add1", "chm_add2", "chm_add3",
                    "chm_pcod"):
             continue
         dat = [col, dics[col][2], dics[col][3], dics[col][4]]
         if col == "chm_email":
             dat[2] = 30
         cols.append(dat)
     RepPrt(self.opts["mf"],
            name=self.__class__.__name__,
            tables=["drschn"],
            heads=heads,
            cols=cols,
            where=[("chm_cono", "=", self.opts["conum"])],
            conum=self.opts["conum"],
            conam=self.opts["conam"],
            repprt=self.df.repprt,
            repeml=self.df.repeml,
            fromad=self.fromad)
     self.opts["mf"].closeLoop()
Пример #10
0
 def doEnd(self):
     self.df.closeProcess()
     if self.unall == "Y":
         hds = ["General Ledger Bank Statement Records (Unallocated Only)"]
     else:
         hds = ["General Ledger Bank Statement Records (All)"]
     des = "Bank Account Number %s %s" % (self.acnod, self.name)
     if self.start:
         des = "%s from %s" % (des, self.df.t_disp[0][0][1])
     if self.to:
         des = "%s to %s" % (des, self.df.t_disp[0][0][2])
     hds.append(des)
     col = ["grt_date", "grt_memo", "grt_refno", "grt_payee",
         "grt_flag", "grt_amount"]
     whr = [
         ("grt_cono", "=", self.opts["conum"]),
         ("grt_acno", "=", self.acnow)]
     if self.start:
         whr.append(("grt_date", ">=", self.start))
     if self.to:
         whr.append(("grt_date", "<=", self.to))
     if self.unall == "Y":
         whr.append(("grt_flag", "=", "N"))
     odr = "grt_date, grt_refno"
     tot = ["grt_amount"]
     RepPrt(self.opts["mf"], conum=self.opts["conum"],
         conam=self.opts["conam"], name=self.__class__.__name__,
         tables=["genrct"], heads=hds, cols=col, where=whr, order=odr,
         gtots=tot, repprt=self.df.repprt, repeml=self.df.repeml)
     self.closeProcess()
Пример #11
0
 def doEnd(self):
     self.df.closeProcess()
     if not self.frm.work:
         frm = "Beginning"
     else:
         frm = self.frm.disp
     hds = "Email Log Report from %s to %s" % (frm, self.too.disp)
     col = ["eml_too", "eml_sub", "eml_dtt", "eml_sta"]
     whr = [("eml_dtt", ">=", "%10s 00:00" % self.frm.disp),
            ("eml_dtt", "<=", "%10s 99:99" % self.too.disp)]
     if self.recpt:
         whr.append(("eml_too", "like", "%s%s%s" % ("%", self.recpt, "%")))
     if self.order == "A":
         odr = "eml_dtt asc"
     else:
         odr = "eml_dtt desc"
     RepPrt(self.opts["mf"],
            name=self.__class__.__name__,
            tables=["emllog"],
            heads=[hds],
            cols=col,
            where=whr,
            order=odr,
            repprt=self.df.repprt,
            repeml=self.df.repeml)
     self.opts["mf"].closeLoop()
Пример #12
0
 def doPrintDoc(self, repprt, repeml):
     hds = [
         "Goods Received Notes",
         "GRN Number: %s GRN Date: %s" % (self.grv, self.dtw)
     ]
     col = [["stt_group", "UA", 3, "Grp", "y"],
            ["stt_code", "NA", 20, "Product-Code", "y"],
            ["stt_desc", "NA", 40, "Description", "y"],
            ["stt_loc", "UA", 1, "L", "y"],
            ["stt_qty", "SD", 11.2, "Quantity", "y"],
            ["stt_cost", "SD", 11.2, "Price", "y"]]
     gtt = ["stt_cost"]
     whr = [("stt_cono", "=", self.opts["conum"]), ("stt_type", "=", 1),
            ("stt_ref1", "=", self.grv), ("stt_trdt", "=", self.dte)]
     odr = "stt_seq"
     self.df.setWidget(self.df.mstFrame, state="hide")
     RepPrt(self.opts["mf"],
            conum=self.opts["conum"],
            conam=self.opts["conam"],
            name=self.__class__.__name__,
            tables=["strtrn"],
            heads=hds,
            cols=col,
            gtots=gtt,
            where=whr,
            order=odr,
            repprt=repprt,
            repeml=repeml,
            fromad=self.fromad)
     self.df.setWidget(self.df.mstFrame, state="show")
Пример #13
0
 def doPrintOption(self, opt):
     if opt == "N":
         return
     state = self.df.disableButtonsTags()
     self.df.setWidget(self.df.mstFrame, state="hide")
     if opt in ("I", "B"):
         table = "crsmst"
         whr = [
             ("crm_cono", "=", self.opts["conum"]),
             ("crm_acno", "=", self.acno)]
         rp = TabPrt(self.opts["mf"], self.opts["conum"], self.opts["conam"],
             name=self.__class__.__name__, tabs=table, where=whr,
             keys=[self.acno])
         repprt = rp.repprt
         repeml = rp.repeml
         xits = rp.xits
     else:
         repprt = None
         repeml = None
         xits = False
     if opt in ("T", "B") and not xits:
         heads = ["Creditor's Transactions",
             "Account: %s  Name: %s" % (self.acno, self.name)]
         whr = [
             ("crt_cono", "=", self.opts["conum"]),
             ("crt_acno", "=", self.acno)]
         if self.paidup == "Y":
             col, recs = getTrn(self.opts["mf"].dbm, "crs", whr=whr)
         else:
             col, recs = getTrn(self.opts["mf"].dbm, "crs",
                 dte=self.curdt, whr=whr)
         cols = []
         data = []
         dic = self.sql.crstrn_dic
         for num, rec in enumerate(recs):
             dat = []
             for nam in ["crt_ref1", "crt_trdt", "crt_type",
                     "crt_tramt", "paid", "balance", "crt_desc"]:
                 if not num:
                     if nam == "paid":
                         cols.append(["paid", "SD", 13.2, "Paid"])
                     elif nam == "balance":
                         cols.append(["balance", "SD", 13.2, "Balance"])
                     else:
                         cols.append([nam, dic[nam][2], dic[nam][3],
                             dic[nam][5]])
                 dat.append(rec[col.index(nam)])
             data.append(dat)
         if repprt:
             prtdia = False
         else:
             prtdia = (("Y","V"),("Y","N"))
         rp = RepPrt(self.opts["mf"], conum=self.opts["conum"],
             conam=self.opts["conam"], name=self.__class__.__name__,
             ttype="D", tables=data, heads=heads, cols=cols,
             trtp=["crt_type", crtrtp], prtdia=prtdia, repprt=repprt,
             repeml=repeml, fromad=self.fromad)
     self.df.setWidget(self.df.mstFrame, state="show")
     self.df.enableButtonsTags(state=state)
Пример #14
0
 def mainProcess(self):
     data = []
     p = ProgressBar(self.opts["mf"].body,
                     typ="Generating the Report",
                     mxs=len(self.notes.data),
                     esc=True)
     for num, dat in enumerate(self.notes.data):
         p.displayProgress(num)
         if p.quit:
             break
         if len(dat[2].strip()) < 14:
             continue
         desc = textFormat(dat[5], width=50)
         for n, d in enumerate(desc):
             if not n:
                 own = dat[2][:7].strip()
                 cod = dat[2][7:14].strip()
                 acc = dat[2][14:].strip()
                 nam = self.sql.getRec("rcatnm",
                                       cols=["rtn_name"],
                                       where=[("rtn_cono", "=",
                                               self.opts["conum"]),
                                              ("rtn_owner", "=", own),
                                              ("rtn_code", "=", cod),
                                              ("rtn_acno", "=", acc)],
                                       limit=1)
                 if not nam:
                     continue
                 data.append([
                     own, cod, acc, nam[0], dat[4],
                     CCD(dat[3], "d1", 10).disp, dat[6],
                     CCD(dat[7], "d1", 10).disp, d
                 ])
             else:
                 data.append(["", "", "", "", "", "", "", "", d])
     p.closeProgress()
     if not p.quit:
         name = self.__class__.__name__
         head = ["Rental's Masterfile Notes Listing"]
         cols = [["a", "NA", 7, "Own-Cod", "y"],
                 ["b", "NA", 7, "Prm-Cod", "y"],
                 ["c", "NA", 7, "Acc-Num", "y"],
                 ["d", "NA", 30, "Acc-Name", "y"],
                 ["e", "NA", 20, "User-Name", "y"],
                 ["f", "NA", 10, "Cap-Date", "y"], ["g", "UA", 1, "F", "y"],
                 ["h", "NA", 10, "Act-Date", "y"],
                 ["i", "NA", 50, "Details", "y"]]
         RepPrt(self.opts["mf"],
                conum=self.opts["conum"],
                conam=self.opts["conam"],
                name=name,
                tables=data,
                heads=head,
                cols=cols,
                ttype="D",
                repprt=self.notes.df.repprt,
                repeml=self.notes.df.repeml,
                fromad=self.fromad)
Пример #15
0
 def printReport(self, recs):
     p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True)
     data = []
     for num, dat in enumerate(recs):
         p.displayProgress(num)
         if p.quit:
             break
         owner, code, acno = dat
         dep = getDeposit(self.opts["mf"], self.opts["conum"], self.date,
                          owner, code, acno)
         if not dep:
             continue
         dept = 0
         intr = 0
         admn = 0
         for d in dep:
             dept = float(ASD(dept) + ASD(d[1]))
             intr = float(ASD(intr) + ASD(d[4]))
             admn = float(ASD(admn) + ASD(d[6]))
         balance = float(ASD(dept) + ASD(intr))
         name = self.sql.getRec("rcatnm",
                                cols=["rtn_name"],
                                where=[("rtn_cono", "=",
                                        self.opts["conum"]),
                                       ("rtn_owner", "=", owner),
                                       ("rtn_code", "=", code),
                                       ("rtn_acno", "=", acno)],
                                limit=1)
         if name:
             name = name[0]
         else:
             name = "Unknown"
         if dept:
             data.append([code, acno, name, dept, intr, balance, admn])
     p.closeProgress()
     if not p.quit:
         head = ["Tenants Outstanding Deposits as at %s" % self.datep]
         cols = [["aa", "NA", 7, "Pr-Code", "y"],
                 ["bb", "NA", 7, "Acc-Num", "y"],
                 ["cc", "NA", 40, "Name", "y"],
                 ["dd", "SD", 13.2, "Deposit", "y"],
                 ["ee", "SD", 13.2, "Interest", "y"],
                 ["ff", "SD", 13.2, "Balance", "y"],
                 ["gg", "SD", 13.2, "Admin", "y"]]
         RepPrt(self.opts["mf"],
                name=self.__class__.__name__,
                tables=data,
                heads=head,
                cols=cols,
                gtots=["dd", "ee", "ff", "gg"],
                ttype="D",
                repprt=self.df.repprt,
                repeml=self.df.repeml,
                fromad=self.fromad)
Пример #16
0
 def doPrint(self):
     table = ["genrpt"]
     heads = ["General Ledger Report %s Layout" % self.repno]
     state = self.df.disableButtonsTags()
     self.df.setWidget(self.df.mstFrame, "hide")
     RepPrt(self.opts["mf"], name=self.__class__.__name__, tables=table,
         heads=heads, where=[("glr_cono", "=", self.selcoy),
         ("glr_repno", "=", self.repno)], order="glr_seq asc",
         prtdia=(("Y","V"), ("Y","N")))
     self.df.setWidget(self.df.mstFrame, "show")
     self.df.enableButtonsTags(state=state)
     self.df.focusField(self.df.frt, self.df.pag, self.df.col)
Пример #17
0
 def mainProcess(self):
     data = []
     p = ProgressBar(self.opts["mf"].body,
                     typ="Generating the Report",
                     mxs=len(self.notes.data),
                     esc=True)
     for num, dat in enumerate(self.notes.data):
         p.displayProgress(num)
         if p.quit:
             break
         desc = textFormat(dat[5], width=50)
         for n, d in enumerate(desc):
             if not n:
                 bkn = dat[2]
                 des = self.sql.getRec(
                     tables=["bkmmst", "bkmcon"],
                     cols=["bkc_title", "bkc_sname", "bkc_names"],
                     where=[("bkm_cono", "=", self.opts["conum"]),
                            ("bkm_number", "=", int(bkn)),
                            ("bkc_cono=bkm_cono", ),
                            ("bkc_ccode=bkm_ccode", )],
                     limit=1)
                 data.append([
                     bkn,
                     "%s %s %s" % (des[0], des[2][0], des[1]), dat[4],
                     CCD(dat[3], "d1", 10).disp, dat[6],
                     CCD(dat[7], "d1", 10).disp, d
                 ])
             else:
                 data.append(["", "", "", "", "", "", d])
     p.closeProgress()
     if not p.quit:
         name = self.__class__.__name__
         head = ["Booking Master Notes Listing"]
         cols = [["a", "NA", 7, "Booking", "y"],
                 ["b", "NA", 30, "Name", "y"],
                 ["c", "NA", 20, "User-Name", "y"],
                 ["d", "NA", 10, "Capt-Date",
                  "y"], ["e", "UA", 1, "F", "y"],
                 ["f", "NA", 10, "Actn-Date", "y"],
                 ["g", "NA", 50, "Details", "y"]]
         RepPrt(self.opts["mf"],
                conum=self.opts["conum"],
                conam=self.opts["conam"],
                name=name,
                tables=data,
                heads=head,
                cols=cols,
                ttype="D",
                repprt=self.notes.df.repprt,
                repeml=self.notes.df.repeml,
                fromad=self.fromad)
Пример #18
0
 def printReport(self, recs):
     data = []
     typ = "Generating the Report ... Please Wait"
     p = ProgressBar(self.opts["mf"].body, mxs=len(recs), typ=typ, esc=True)
     for num, dat in enumerate(recs):
         p.displayProgress(num)
         if p.quit:
             break
         data.append(self.getValues(dat))
     p.closeProgress()
     if not p.quit:
         head = ["Member's Master Report as at %s" % self.repdtd]
         colsh = []
         for n1 in self.cnums:
             for n2, d2 in enumerate(self.colsd[n1][2:]):
                 if n1 in (20, 21) and self.df.repprt[2] == "export":
                     if n1 == 20:
                         prefix = "P"
                         col = copyList(self.padcol)
                     else:
                         prefix = "S"
                         col = copyList(self.sadcol)
                     colsh.append(("name1%s_%s" % (n1, n2), "NA", col[0],
                                   "%s-Address-Line-1" % prefix, "y"))
                     colsh.append(("name2%s_%s" % (n1, n2), "NA", col[1],
                                   "%s-Address-Line-2" % prefix, "y"))
                     colsh.append(("name3%s_%s" % (n1, n2), "NA", col[2],
                                   "%s-Address-Line-3" % prefix, "y"))
                     colsh.append(("name4%s_%s" % (n1, n2), "NA", col[3],
                                   "%s-City" % prefix, "y"))
                     colsh.append(("name5%s_%s" % (n1, n2), "NA", col[4],
                                   "%s-Code" % prefix, "y"))
                     colsh.append(("name6%s_%s" % (n1, n2), "NA", col[5],
                                   "%s-Region" % prefix, "y"))
                     colsh.append(("name7%s_%s" % (n1, n2), "NA", col[6],
                                   "%s-Country" % prefix, "y"))
                 else:
                     colsh.append(
                         ("name%s_%s" % (n1, n2), d2[1], d2[2], d2[0], "y"))
         RepPrt(self.opts["mf"],
                name=self.__class__.__name__,
                heads=head,
                tables=data,
                cols=colsh,
                opts=self.getDes(),
                ttype="D",
                conum=self.opts["conum"],
                conam=self.opts["conam"],
                repprt=self.df.repprt,
                repeml=self.df.repeml,
                fromad=self.fromad,
                pbar="P")
Пример #19
0
 def mainProcess(self):
     data = []
     p = ProgressBar(self.opts["mf"].body,
                     typ="Generating the Report",
                     mxs=len(self.notes.data),
                     esc=True)
     for num, dat in enumerate(self.notes.data):
         p.displayProgress(num)
         if p.quit:
             break
         desc = textFormat(dat[5], width=50)
         for n, d in enumerate(desc):
             if not n:
                 chn = int(dat[2][:3])
                 acc = dat[2][3:].strip()
                 nam = self.sql.getRec("drsmst",
                                       cols=["drm_name"],
                                       where=[("drm_cono", "=",
                                               self.opts["conum"]),
                                              ("drm_chain", "=", chn),
                                              ("drm_acno", "=", acc)],
                                       limit=1)
                 if not nam:
                     nam = "Unknown"
                 data.append([
                     chn, acc, nam[0], dat[4],
                     CCD(dat[3], "d1", 10).disp, dat[6],
                     CCD(dat[7], "d1", 10).disp, d
                 ])
             else:
                 data.append(["", "", "", "", "", "", "", d])
     p.closeProgress()
     if not p.quit:
         name = self.__class__.__name__
         head = ["Debtor's Masterfile Notes Listing"]
         cols = [["a", "NA", 3, "Chn", "y"], ["b", "NA", 7, "Acc-Num", "y"],
                 ["c", "NA", 30, "Acc-Name", "y"],
                 ["d", "NA", 20, "User-Name", "y"],
                 ["e", "NA", 10, "Cap-Date", "y"], ["f", "UA", 1, "F", "y"],
                 ["g", "NA", 10, "Act-Date", "y"],
                 ["h", "NA", 50, "Details", "y"]]
         RepPrt(self.opts["mf"],
                conum=self.opts["conum"],
                conam=self.opts["conam"],
                name=name,
                tables=data,
                heads=head,
                cols=cols,
                ttype="D",
                repprt=self.notes.df.repprt,
                repeml=self.notes.df.repeml,
                fromad=self.fromad)
Пример #20
0
 def doPrint(self):
     state = self.df.disableButtonsTags()
     cols = [["ff_seq", "UI", 3.0, "Seq"],
             ["ff_name", "NA", 20.0, "Field Name"],
             ["ff_type", "NA", 2.0, "Tp"], ["ff_size", "NA", 6.1, "Size"],
             ["ff_desc", "NA", 30.0, "Description"],
             ["ff_head", "NA", 20.0, "Heading"]]
     whr = [("ff_tabl", "=", self.tab)]
     RepPrt(self.opts["mf"],
            name=self.tab + "_fld",
            tables=["ffield"],
            heads=[
                "Table Fields for Table %s" % self.tab,
            ],
            cols=cols,
            where=whr)
     cols = [["ft_desc", "NA", 30.0, "Table Description"],
             ["ft_seq", "UI", 2.0, "Sq"], ["ft_type", "NA", 1.0, "T"],
             ["ft_key0", "NA", 10.0, "1st-Key"],
             ["ft_key1", "NA", 10.0, "2nd-Key"],
             ["ft_key2", "NA", 10.0, "3rd-Key"],
             ["ft_key3", "NA", 10.0, "4th-Key"],
             ["ft_key4", "NA", 10.0, "5th-Key"],
             ["ft_key5", "NA", 10.0, "6th-Key"],
             ["ft_key6", "NA", 10.0, "7th-Key"],
             ["ft_key7", "NA", 10.0, "8th-Key"],
             ["ft_key8", "NA", 10.0, "9th-Key"],
             ["ft_key9", "NA", 10.0, "10th-Key"]]
     whr = [("ft_tabl", "=", self.tab)]
     RepPrt(self.opts["mf"],
            name=self.tab + "_idx",
            tables=["ftable"],
            heads=[
                "Table Keys for Table %s" % self.tab,
            ],
            cols=cols,
            where=whr)
     self.df.enableButtonsTags(state=state)
     self.df.focusField(self.df.frt, self.df.pag, self.df.col)
Пример #21
0
 def mainProcess(self):
     data = []
     p = ProgressBar(self.opts["mf"].body,
                     typ="Generating the Report",
                     mxs=len(self.notes.data),
                     esc=True)
     for num, dat in enumerate(self.notes.data):
         p.displayProgress(num)
         if p.quit:
             break
         desc = textFormat(dat[5], width=50)
         for n, d in enumerate(desc):
             if not n:
                 grp = dat[2][:3].strip()
                 cod = dat[2][3:].strip()
                 des = self.sql.getRec("strmf1",
                                       cols=["st1_desc"],
                                       where=[("st1_cono", "=",
                                               self.opts["conum"]),
                                              ("st1_group", "=", grp),
                                              ("st1_code", "=", cod)],
                                       limit=1)
                 data.append([
                     grp, cod, des[0], dat[4],
                     CCD(dat[3], "d1", 10).disp, dat[6],
                     CCD(dat[7], "d1", 10).disp, d
                 ])
             else:
                 data.append(["", "", "", "", "", "", "", d])
     p.closeProgress()
     if not p.quit:
         name = self.__class__.__name__
         head = ["Debtor's Masterfile Notes Listing"]
         cols = [["a", "NA", 3, "Grp", "y"],
                 ["b", "NA", 20, "Cod-Num", "y"],
                 ["c", "NA", 30, "Description", "y"],
                 ["d", "NA", 20, "User-Name", "y"],
                 ["e", "NA", 10, "Cap-Date", "y"], ["f", "UA", 1, "F", "y"],
                 ["g", "NA", 10, "Act-Date", "y"],
                 ["h", "NA", 50, "Details", "y"]]
         RepPrt(self.opts["mf"],
                conum=self.opts["conum"],
                conam=self.opts["conam"],
                name=name,
                tables=data,
                heads=head,
                cols=cols,
                ttype="D",
                repprt=self.notes.df.repprt,
                repeml=self.notes.df.repeml,
                fromad=self.fromad)
Пример #22
0
 def mainProcess(self):
     data = []
     p = ProgressBar(self.opts["mf"].body,
                     typ="Generating the Report",
                     mxs=len(self.notes.data),
                     esc=True)
     for num, dat in enumerate(self.notes.data):
         p.displayProgress(num)
         if p.quit:
             break
         desc = textFormat(dat[5], width=50)
         for n, d in enumerate(desc):
             if not n:
                 mem = int(dat[2].strip())
                 des = self.sql.getRec(
                     "memmst",
                     cols=["mlm_title", "mlm_initial", "mlm_surname"],
                     where=[("mlm_cono", "=", self.opts["conum"]),
                            ("mlm_memno", "=", mem)],
                     limit=1)
                 data.append([
                     mem,
                     "%s %s %s" % tuple(des), dat[4],
                     CCD(dat[3], "d1", 10).disp, dat[6],
                     CCD(dat[7], "d1", 10).disp, d
                 ])
             else:
                 data.append(["", "", "", "", "", "", d])
     p.closeProgress()
     if not p.quit:
         name = self.__class__.__name__
         head = ["Member's Ledger Notes Listing"]
         cols = [["a", "NA", 6, "Mem-No", "y"],
                 ["b", "NA", 30, "Name", "y"],
                 ["c", "NA", 20, "User-Name", "y"],
                 ["d", "NA", 10, "Cap-Date", "y"], ["e", "UA", 1, "F", "y"],
                 ["f", "NA", 10, "Act-Date", "y"],
                 ["g", "NA", 50, "Details", "y"]]
         RepPrt(self.opts["mf"],
                conum=self.opts["conum"],
                conam=self.opts["conam"],
                name=name,
                tables=data,
                heads=head,
                cols=cols,
                ttype="D",
                repprt=self.notes.df.repprt,
                repeml=self.notes.df.repeml,
                fromad=self.fromad)
Пример #23
0
 def doPrint(self):
     table = ["ctlctl"]
     heads = ["General Ledger Control Accounts"]
     state = self.df.disableButtonsTags()
     self.df.setWidget(self.df.mstFrame, "hide")
     RepPrt(self.opts["mf"],
            name="glc110",
            tables=table,
            heads=heads,
            where=[("ctl_cono", "=", self.opts["conum"])],
            order="ctl_code",
            prtdia=(("Y", "V"), ("Y", "N")))
     self.df.setWidget(self.df.mstFrame, "show")
     self.df.enableButtonsTags(state=state)
     self.df.focusField(self.df.frt, self.df.pag, self.df.col)
Пример #24
0
 def doPrint(self):
     tables = []
     for pag in range(0, (self.df.pgs+1)):
         for x in range(0, self.df.topq[pag]):
             lin = []
             lin.append(self.df.topf[pag][x][3])
             lin.append(self.df.t_disp[pag][0][x])
             tables.append(lin)
     heads = ["Salaries and Wages File Maintenance"]
     cols = [["a","NA",30.0,"Field Name"],
             ["b","NA",30.0,"Values"]]
     state = self.df.disableButtonsTags()
     RepPrt(self.opts["mf"], name=self.__class__.__name__, tables=tables,
         heads=heads, cols=cols, conum=self.opts["conum"],
         conam=self.opts["conam"], ttype="D")
     self.df.enableButtonsTags(state=state)
     self.df.focusField(self.df.frt, self.df.pag, self.df.col)
Пример #25
0
 def doEnd(self):
     self.df.closeProcess()
     tab = ["memmst"]
     col = [
         "mlm_memno",
         "mlm_surname",
         "mlm_names",
         "mlm_dob%10000 as date"]
     whr = [
         ("mlm_cono", "=", self.opts["conum"]),
         ("mlm_state", "=", "A"),
         ("date", "between", self.frdt % 10000, self.todt % 10000)]
     if self.cat:
         tab.append("memcat")
         whr.append(("mlc_cono=mlm_cono",))
         whr.append(("mlc_memno=mlm_memno",))
         whr.append(("mlc_type", "=", self.cat))
         if self.cod:
             whr.append(("mlc_code", "=", self.cod))
     if self.sort == "N":
         odr = "mlm_memno"
     elif self.sort == "M":
         odr = "mlm_surname"
     else:
         odr = "date"
     sp = SplashScreen(self.opts["mf"].body,
         "Preparing Report ... Please Wait")
     recs = self.sql.getRec(tables=tab, cols=col, where=whr, order=odr)
     sp.closeSplash()
     if not recs:
         self.opts["mf"].closeLoop()
         return
     name = self.__class__.__name__
     head = ["Members Birthday Report"]
     cols = [
         ["a", "NA",  7, "Mem-No", "y"],
         ["b", "NA", 50, "Surname", "y"],
         ["c", "NA", 50, "Names",  "y"],
         ["d", "DM", 5, "Birthday", "y"]]
     RepPrt(self.opts["mf"], conum=self.opts["conum"],
         conam=self.opts["conam"], name=name, tables=recs, heads=head,
         cols=cols, ttype="D", repprt=self.df.repprt,
         repeml=self.df.repeml, fromad=self.fromad)
     self.opts["mf"].closeLoop()
Пример #26
0
 def doEnd(self):
     self.df.closeProcess()
     pb = ProgressBar(self.opts["mf"].body, mxs=len(self.coys), esc=True)
     miss = {}
     for num, coy in enumerate(self.coys):
         pb.displayProgress(num)
         nam = self.sql.getRec("ctlmst",
                               cols=["ctm_name"],
                               where=[("ctm_cono", "=", coy)],
                               limit=1)
         accs = self.sql.getRec("gentrn",
                                cols=["glt_acno"],
                                where=[("glt_cono", "=", coy)],
                                group="glt_acno",
                                order="glt_acno")
         for acc in accs:
             glm = self.sql.getRec("genmst",
                                   where=[("glm_cono", "=", coy),
                                          ("glm_acno", "=", acc[0])],
                                   limit=1)
             if not glm:
                 if coy not in miss:
                     miss[coy] = []
                 miss[coy].append((nam[0], acc[0]))
     pb.closeProgress()
     keys = list(miss.keys())
     keys.sort()
     data = []
     for k in keys:
         for a in miss[k]:
             data.append((k, a[0], a[1]))
     if data:
         head = ["Missing Account Numbers"]
         cols = [("a", "NA", 3, "Coy", "y"), ("b", "NA", 30, "Name", "y"),
                 ("c", "UI", 7, "Acc-Num", "y")]
         RepPrt(self.opts["mf"],
                name="gl6080",
                tables=data,
                heads=head,
                cols=cols,
                repprt=self.df.repprt,
                ttype="D")
     self.opts["mf"].closeLoop()
Пример #27
0
 def printRecipe(self):
     self.df.setWidget(self.df.mstFrame, state="hide")
     hds = [
         "Stores's Recipe",
         "Location: %s  Code: %s  Description: %s" %
         (self.loc, self.code, self.desc)
     ]
     RepPrt(self.opts["mf"],
            conum=self.opts["conum"],
            conam=self.opts["conam"],
            name=self.__class__.__name__,
            heads=hds,
            cols=self.rcp[0],
            tables=self.rcp[1],
            ttype="D",
            prtdia=(("Y", "V"), ("Y", "N")))
     self.df.setWidget(self.df.mstFrame, state="show")
     if "wait" not in self.opts:
         self.opts["mf"].closeLoop()
Пример #28
0
 def doPrint(self):
     self.df.setWidget(self.df.mstFrame, state="hide")
     hdr = ["Skips Entered for the %s" % self.cmpnam]
     tab = ["scpent", "scpmem"]
     col = [
         "scm_scod", "scm_surname", "scm_names", "scm_phone",
         ["scm_email", "TX", 30, "Email-Address"]
     ]
     whr = [("sce_ccod", "=", self.ccod), ("scm_scod=sce_scod", )]
     odr = "scm_surname"
     RepPrt(self.opts["mf"],
            name=self.__class__.__name__,
            heads=hdr,
            tables=tab,
            cols=col,
            where=whr,
            order=odr,
            prtdia=(("Y", "V"), ("Y", "N")))
     self.df.setWidget(self.df.mstFrame, state="show")
Пример #29
0
 def printReport(self, recs):
     descs = [
         "", "Type", "Code Number", "Description", "Fixed or Variable",
         "EMPLOYEE Rate or Amount", "         Based On", "         Amount",
         "         Limit", "         G/L Cono", "         G/L Number",
         "         Earnings Type", "EMPLOYER Rate or Amount",
         "         Based On", "         Amount", "         Limit",
         "         G/L Cono", "         G/L Number", "Tax Code",
         "Taxable Portion", "Receiver of Revenue Code",
         "Include in Union Report", "Must Pay", "Balance Number",
         "Hourly Limit", "Monthly Deduction", "UIF Portion", "SDL Portion"
     ]
     tables = []
     for rec in recs:
         for y in range(1, len(recs[0]) - 1):
             lin = []
             lin.append("")
             lin.append(descs[y])
             lin.append(rec[y])
             tables.append(lin)
     if self.rtyp == "E":
         typ = "Earnings"
     elif self.rtyp == "D":
         typ = "Deductions"
     else:
         typ = "Earnings and Deductions"
     heads = ["%s Codes Listing" % typ]
     cols = [["a", "NA", 15.0, " "], ["b", "RW", 30.0, "Field Name"],
             ["c", "NA", 30.0, "Details"]]
     state = self.df.disableButtonsTags()
     RepPrt(self.opts["mf"],
            name=self.__class__.__name__,
            tables=tables,
            heads=heads,
            cols=cols,
            conum=self.opts["conum"],
            ttype="D",
            conam=self.opts["conam"],
            lines=(len(descs) - 1),
            repprt=self.df.repprt,
            repeml=self.df.repeml,
            fromad=self.fromad)
     self.df.enableButtonsTags(state=state)
Пример #30
0
 def doEnd(self):
     tables = ["struoi"]
     heads = ["Units Of Issue Master Listing"]
     col = [["unm_unit", "NA", 10.0, "Unit"],
            ["unm_desc", "NA", 30.0, "Description"]]
     whr = [("unm_cono", "=", self.opts["conum"])]
     odr = "unm_unit"
     state = self.df.disableButtonsTags()
     RepPrt(self.opts["mf"],
            name=self.__class__.__name__,
            tables=tables,
            heads=heads,
            cols=col,
            order=odr,
            where=whr,
            conum=self.opts["conum"],
            conam=self.opts["conam"],
            repprt=self.df.repprt)
     self.df.enableButtonsTags(state=state)
     self.closeProcess()