def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) expheads = [ "%03u %-30s %s %6s" % (self.opts["conum"], self.opts["conam"], self.sysdttm, self.__class__.__name__) ] expheads.append("Debtors Master Code List as at %s" % self.sysdtd) expcolsh = [self.colsh] expforms = self.forms expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) expdatas.append([ "BODY", [ vals[0].work, vals[1].work, vals[2].work, vals[3].work, vals[4].work, vals[5].work, vals[6].work, vals[7].work, vals[8].work, vals[9].work, vals[10].work, vals[11].work, vals[12].work, vals[13].work, vals[14].work, vals[15].work ] ]) p.closeProgress() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=expheads, colsh=expcolsh, forms=expforms, datas=expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [ "%03u %-30s %s" % (self.opts["conum"], self.opts["conam"], self.sysdttm) ] self.expheads.append("Stores Sales History for the 12 Month Period "\ "to %s" % self.coffd) self.expcolsh = [self.colsh] self.expforms = self.forms self.expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) if not vals: continue cod, dsc, uoi, amt, purchd, purchw = vals line = ["BODY", [self.grp.work, cod.work, dsc.work, uoi.work]] line[1].extend(purchw) self.expdatas.append(line) p.closeProgress() self.grandTotal() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [self.head + " %s" % self.sysdttm] self.expheads.append("Booking's Balances up to %s" % self.period) self.expheads.append("Booking Status: %s" % self.statusd) self.expcolsh = [self.colsh] self.expforms = self.forms self.expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) if not vals: continue line = ["BODY", [vals[0].work, vals[1].work, vals[2].work, vals[3].work, vals[4].work]] for val in vals[5:]: line[1].append(val.work) self.expdatas.append(line) p.closeProgress() self.grandTotal() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [self.head + " %s" % self.sysdttm] self.expheads.append("Loans's Ledger Audit Trail for Period "\ "%s to %s" % (self.sdatd, self.edatd)) self.expcolsh = [self.colsh] self.expforms = self.forms self.expdatas = [] self.gdrs = 0 self.gcrs = 0 for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) if not vals: continue acno, loan, batch, trtp, trdt, ref, drs, crs, desc = vals line = ["BODY", [trtp.work, batch.work, acno.work, loan.work, ref.work, trdt.work, desc.work, drs.work, crs.work]] self.expdatas.append(line) self.gdrs = float(ASD(self.gdrs) + ASD(drs.work)) self.gcrs = float(ASD(self.gcrs) + ASD(crs.work)) p.closeProgress() self.grandTotal() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [self.head + " %s" % self.sysdttm] self.expheads.append("Stock to Order Report as at %s" % self.sysdtd) self.expheads.append("(Options: Report Date %s)" % self.repdtd) self.expheads.append("Location %s %s" % (self.loc, self.locd)) self.expcolsh = [self.colsh] self.expforms = self.forms self.expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) if not vals: continue self.expdatas.append([ "BODY", [ vals[0].work, vals[1].work, vals[2].work, vals[3].work, vals[4].work, vals[5].work, vals[6].work, vals[7].work ] ]) p.closeProgress() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [self.head + " %s" % self.sysdttm] self.expheads.append("Creditor's Purchase History for the 12 Months "\ "Period to %s" % self.coffd) self.expheads.append("Options: Ignore-Zeros %s" % self.zer) self.expcolsh = [self.colsh] self.expforms = self.forms self.expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) if not vals: continue line = ["BODY", [vals[0].work, vals[1].work]] for val in vals[3]: line[1].append(val) self.expdatas.append(line) p.closeProgress() self.grandTotal() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [self.head + " %s" % self.sysdttm] self.expheads.append("Debtor's Age Analaysis up to %s" % self.opts["period"]) self.expheads.append("Options: Activity %s Type %s Low-Bal %s "\ "Cr-Bals %s Ignore-Zeros %s" % (self.drsact, self.drstyp, self.limit, self.credit, self.zero)) self.expcolsh = [self.colsh] self.expforms = self.forms self.expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) if not vals: continue line = ["BODY", [vals[0].work, vals[1].work, vals[2].work]] for val in vals[3:]: line[1].append(val.work) self.expdatas.append(line) p.closeProgress() self.grandTotal() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [self.head + " %s" % self.sysdttm] self.expheads.append("General Ledger Account Statements for Period "\ "%s to %s" % (self.sdate.disp, self.edate.disp)) self.expcolsh = [self.colsh] self.expforms = self.forms self.expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return self.acno, self.desc, acctot = self.getAccValues(dat) trn = self.sql.getRec("gentrn", where=[("glt_cono", "=", dat[0]), ("glt_acno", "=", dat[1]), ("glt_curdt", ">=", self.sdate.work), ("glt_curdt", "<=", self.edate.work)], order="glt_acno, glt_curdt, glt_trdt, glt_type, glt_refno, "\ "glt_batch") if self.pages == "Y" and (acctot or trn): self.expdatas.append(["PAGE", [self.expheads, self.expcolsh]]) prt = False if acctot: prt = True self.expdatas.append([ "BODY", [ self.opts["conum"], self.acno.work, self.desc.work, ((self.sdate.work * 100) + 1), "", "", "", "Opening Balance", "", "", acctot ] ]) for acc in trn: prt = True trdt, refno, trtp, batch, amt, dbt, crt, detail, curdt, \ curmth = self.getTrnValues(acc) acctot = float(ASD(acctot) + ASD(amt.work)) self.expdatas.append([ "BODY", [ self.opts["conum"], self.acno.work, self.desc.work, trdt.work, refno.work, gltrtp[(trtp.work - 1)][0], batch.work, detail.work, dbt.work, crt.work, acctot ] ]) if self.pages == "N" and prt: self.expdatas.append(["BLANK"]) p.closeProgress() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [self.head + " %s" % self.sysdttm] self.expheads.append("Asset Register Report as at %s" % self.sysdtd) self.expheads.append("Options: Report Period: %s Report Type: %s" % \ (self.df.t_disp[0][0][0], self.typ)) self.expcolsh = [self.colsh] self.expforms = self.forms self.expdatas = [] for seq, dat in enumerate(recs): p.displayProgress(seq) if p.quit: p.closeProgress() return if not seq: desc = self.groupDesc(dat[0]) self.expdatas.append( ["HEAD", ["", "Group %s %s" % (dat[0], desc)]]) self.expdatas.append(["BLANK"]) vals = self.getValues(dat) if not vals: continue pdte = self.sql.getRec("asstrn", cols=["min(ast_date)"], where=[("ast_cono", "=", self.opts["conum"]), ("ast_group", "=", dat[0]), ("ast_code", "=", dat[1]), ("ast_mtyp", "=", 1)], limit=1) pdte = CCD(pdte[0], "d1", 10).work if self.oldgrp and self.oldgrp != dat[0]: self.groupTotal() self.expdatas.append(["BLANK"]) desc = self.groupDesc(dat[0]) self.expdatas.append( ["HEAD", ["", "Group %s %s" % (dat[0], desc)]]) self.expdatas.append(["BLANK"]) line = ["BODY", [dat[1], dat[2], pdte]] for num, val in enumerate(vals): line[1].append(val) self.stot[num] = float(ASD(self.stot[num]) + ASD(val)) self.gtot[num] = float(ASD(self.gtot[num]) + ASD(val)) self.expdatas.append(line) self.oldgrp = dat[0] p.closeProgress() self.groupTotal() self.grandTotal() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [ "%03u %-30s %s" % (self.opts["conum"], self.opts["conam"], self.sysdttm) ] self.expheads.append("Outstanding Sales Orders Report as at %s" % \ self.sysdtd) self.expcolsh = [[ "Order-Num", "Order-Date", "Chn", "Acc-Num", "Name", "Rep", "Rep-Name", "Job-Num", "Taxable", "Non-Taxable", "Total-Tax", "Total-Value" ]] if self.rtype == "L" and self.content == "D": self.expcolsh[0][6] = "Delivery-Address" self.expforms = [("Na", 9), ("D1", 10), ("UI", 3), ("NA", 7), ("NA", 30), ("Na", 3), ("NA", 30), ("Na", 7), ("SD", 13.2), ("SD", 13.2), ("SD", 13.2), ("SD", 13.2)] self.expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return if not self.getValues(dat): continue self.getOrdTot() self.expdatas.append([ "BODY", [ self.odr.work, self.dte.work, self.chn.work, self.drs.work, self.drsnam, self.rep.work, self.context, self.job.work, self.total_taxable, self.total_nontaxable, self.total_tax, self.total_value ] ]) self.expdatas.append(["BLANK"]) self.expdatas.append(["TOTAL", [""] * 8 + self.slstot]) p.closeProgress() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, chg): p = ProgressBar(self.opts["mf"].body, mxs=len(chg), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [self.head + " %s" % self.sysdttm] self.expheads.append("Members Category Changes between %s and %s" % (self.start.disp, self.end.disp)) self.expheads.append(self.getOptions()) self.expcolsh = [self.colsh] self.expforms = self.forms self.expdatas = [] lmemno = 0 for num, dat in enumerate(chg): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) if not vals: continue if vals[0].work == lmemno: self.expdatas.append([ "BODY", [ "", "", "", "", vals[4], vals[5].work, vals[6].work, vals[7].work, vals[8].work, vals[9].work, vals[10].work ] ]) else: self.expdatas.append([ "BODY", [ vals[0].work, vals[1].work, vals[2].work, vals[3].work, vals[4], vals[5].work, vals[6].work, vals[7].work, vals[8].work, vals[9].work, vals[10].work ] ]) lmemno = vals[0].work p.closeProgress() doWriteExport(xtype=self.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) expheads = [self.head1 + " %s" % self.sysdttm] if self.opebal == "Y": date = CCD(self.opts["period"][1][0], "D1", 10) expheads.append("General Ledger Opening Balances as at %s" % \ date.disp) else: sdate = CCD(self.start, "D2", 7) edate = CCD(self.end, "D2", 7) expheads.append("General Ledger Trial Balance for Period %s "\ "to %s" % (sdate.disp, edate.disp)) expheads.append("(Options: Opening Balances Included %s)" % \ self.incope) expcolsh = [self.colsh] expforms = self.forms self.expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) if not vals: continue self.expdatas.append([ "BODY", [ vals[0].work, vals[1].work, vals[2].work, vals[3].work, vals[4].work ] ]) p.closeProgress() self.grandTotal() doWriteExport(xtype=self.repprt[1], name=expnam, heads=expheads, colsh=expcolsh, forms=expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [ "%03u %-30s %s" % (self.opts["conum"], self.opts["conam"], self.sysdttm) ] self.expheads.append("Rental's Ledger Audit Trail for Period "\ "%s to %s" % (self.sperd, self.eperd)) self.expcolsh = [self.colsh] self.expforms = self.forms self.expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) if not vals: continue code, acno, trdt, trtp, refno, batch, debit, credit, taxamt, \ detail, taxind, name = vals line = [ "BODY", [ trtp.work, batch.work, code.work, acno.work, name.work, refno.work, trdt.work, debit.work, credit.work, taxamt.work, taxind.work, detail.work ] ] self.expdatas.append(line) p.closeProgress() self.grandTotal() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [ "%03u %-30s %s" % (self.opts["conum"], self.opts["conam"], self.sysdttm) ] self.expheads.append("Sales Report By Product up to %s" % self.cutper) self.expcolsh = self.colsh self.expforms = self.forms self.expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) if not vals: continue code, desc, uoi, mq, ms, mp, mn, yq, ys, yp, yn = vals self.expdatas.append([ "BODY", [ self.grp.work, code.work, desc.work, uoi.work, mq.work, ms.work, mp.work, mn.work, yq.work, ys.work, yp.work, yn.work ] ]) p.closeProgress() self.grandTotal() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [ "%03u %-30s %s" % (self.opts["conum"], self.opts["conam"], self.sysdttm) ] self.expheads.append("Stock On Hand Report as at %s" % self.date.disp) self.expcolsh = [self.colsh] self.expforms = self.forms self.expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) if not vals: continue self.expdatas.append([ "BODY", [ vals[0].work, vals[1].work, vals[2].work, vals[3].work, vals[4].work, vals[5].work ] ]) p.closeProgress() self.grandTotal() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p1 = ProgressBar(self.opts["mf"].body, mxs=len(recs), typ="VAT Categories") expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) self.expheads = [self.head + " %s" % self.sysdttm] self.expheads.append("VAT Statement for Period %s to %s" % \ (self.sperd, self.eperd)) self.expcolsh = [self.colsh] self.expforms = self.forms self.expdatas = [] self.pcat = None self.pcode = None for n1, dat1 in enumerate(recs): p1.displayProgress(n1) vals = self.getValues1(dat1) if not vals: continue code, self.pdesc, cat, vtf = vals if not self.pcat: self.pcat = cat self.expdatas.append([ "PAGE", [ self.expheads, self.expcolsh, self.expforms, "Category %s" % cat ] ]) if not self.pcode: self.pcode = code if cat != self.pcat: self.doPrintCodeTotal(ttype="X") self.doPrintCatTotal(ttype="X") self.pcat = cat self.pcode = code self.expdatas.append([ "PAGE", [ self.expheads, self.expcolsh, self.expforms, "Category %s" % cat ] ]) if code != self.pcode: self.doPrintCodeTotal(ttype="X") self.pcode = code p2 = ProgressBar(self.opts["mf"].body, mxs=len(vtf), inn=p1, typ="Category Transactions") for n2, dat2 in enumerate(vtf): p2.displayProgress(n2) vtyp, curdt,styp, ttyp, acno, refno, refdt, desc, exc, \ vtr, tax, inc = self.getValues2(dat2) line = [ "BODY", [ self.pcode, vtyp.work, curdt.work, styp.work, ttyp.work, acno.work, refno.work, refdt.work, desc.work, vtr.work ] ] if vtyp.work == "I": line[1].extend([inc.work, tax.work, 0, 0]) self.ctipv = float(ASD(self.ctipv) + ASD(inc.work)) self.ctipt = float(ASD(self.ctipt) + ASD(tax.work)) self.ttipv[self.pcat][vtr.disp] = \ float(ASD(self.ttipv[self.pcat][vtr.disp]) + \ ASD(inc.work)) self.ttipt[self.pcat][vtr.disp] = \ float(ASD(self.ttipt[self.pcat][vtr.disp]) + \ ASD(tax.work)) self.gtipv = float(ASD(self.gtipv) + ASD(inc.work)) self.gtipt = float(ASD(self.gtipt) + ASD(tax.work)) else: line[1].extend([0, 0, inc.work, tax.work]) self.ctopv = float(ASD(self.ctopv) + ASD(inc.work)) self.ctopt = float(ASD(self.ctopt) + ASD(tax.work)) self.ttopv[self.pcat][vtr.disp] = \ float(ASD(self.ttopv[self.pcat][vtr.disp]) + \ ASD(inc.work)) self.ttopt[self.pcat][vtr.disp] = \ float(ASD(self.ttopt[self.pcat][vtr.disp]) + \ ASD(tax.work)) self.gtopv = float(ASD(self.gtopv) + ASD(inc.work)) self.gtopt = float(ASD(self.gtopt) + ASD(tax.work)) self.expdatas.append(line) p2.closeProgress() p1.closeProgress() if not self.expdatas: return self.doPrintCodeTotal(ttype="X") self.doPrintCatTotal(ttype="X", page=False) if self.cat in ("A", "B"): self.doPrintSummary(ttype="X") doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=self.expheads, colsh=self.expcolsh, forms=self.expforms, datas=self.expdatas, rcdic=self.opts["mf"].rcdic)
def exportReport(self, recs): p = ProgressBar(self.opts["mf"].body, mxs=len(recs), esc=True) expnam = getModName(self.opts["mf"].rcdic["wrkdir"], self.__class__.__name__, self.opts["conum"]) expheads = [ "%03u %-30s %s" % (self.opts["conum"], self.opts["conam"], self.sysdttm) ] if self.rtype == "S": expheads.append("Selling Price List as at %s" % self.sysdtd) mess = "Options:- Ignore Out of Stock: %s VAT Inclusive: %s "\ "Ignore Un-priced: %s" % (self.nostock, self.vatinc, self.noprice) expheads.append(mess) expcolsh = [[ "Grp", "Product-Code", "Description", "U.O.I", "V", "Quantity" ]] expforms = [("UA", 3), ("NA", 20), ("NA", 30), ("NA", 10), ("UA", 1), ("SD", 10.2)] for lev in self.levs: expcolsh[0].append("Level-%s" % lev) expforms.append(("UD", 9.2)) if self.costs == "Y": expcolsh[0].extend(["Avg-Cost", "Last-Cost"]) expforms.extend([("SD", 10.2), ("SD", 10.2)]) else: expheads.append("Cost Price List as at %s" % self.sysdtd) mess = "Options:- Ignore Out of Stock: %s" % self.nostock expheads.append(mess) expcolsh = [[ "Grp", "Product-Code", "Description", "U.O.I", "Quantity", "Avg-Cost", "Last-Cost" ]] expforms = [("UA", 3), ("NA", 20), ("NA", 30), ("NA", 10), ("SD", 10.2), ("SD", 10.2), ("SD", 10.2)] expdatas = [] for num, dat in enumerate(recs): p.displayProgress(num) if p.quit: p.closeProgress() return vals = self.getValues(dat) if not vals: continue if self.rtype == "S": grp, code, desc, uoi, vat, qty, acst, lcst, prcs = vals vvv = [ grp.work, code.work, desc.work, uoi.work, vat.work, qty.work ] for lev in prcs: vvv.append(lev.work) if self.costs == "Y": vvv.extend([acst.work, lcst.work]) expdatas.append(["BODY", vvv]) else: grp, code, desc, uoi, qty, acst, lcst = vals expdatas.append([ "BODY", [ grp.work, code.work, desc.work, uoi.work, qty.work, acst.work, lcst.work ] ]) p.closeProgress() doWriteExport(xtype=self.df.repprt[1], name=expnam, heads=expheads, colsh=expcolsh, forms=expforms, datas=expdatas, rcdic=self.opts["mf"].rcdic)