def exeJbb(): if cats.get() == 'TODAY': site = 'BLG' strObjd = getNow() fromAddr, toAddr, pswd = eAddress(site) subs = 'JBB Closing %s' % strObjd.strftime('%d-%m-%Y') msg = mailContent(site, subs, pathEntry7.get(), cats.get()) logIn(fromAddr, toAddr, pswd, msg) pathEntry7.delete(0, END) elif cats.get() == 'YESTERDAY': site = 'BLG' strObjd = getYesterday() fromAddr, toAddr, pswd = eAddress(site) subs = 'JBB Closing %s' % strObjd.strftime('%d-%m-%Y') msg = mailContent(site, subs, pathEntry7.get(), cats.get()) logIn(fromAddr, toAddr, pswd, msg) pathEntry7.delete(0, END)
def getAttNameYtd(site): tgl = getYesterday() if site == 'UJB': hMin1F= 'OutstandingUJB %s.xlsx' % tgl.strftime('%d-%m-%Y') ms2F= 'PlanMs2UJB %s.xlsx' % tgl.strftime('%d-%m-%Y') dLO = 'DataLO_UJB %s.xls' % tgl.strftime('%d-%m-%Y') return hMin1F,ms2F,dLO elif site == 'TGR': hMin1F= 'OutstandingTG %s.xlsx' % tgl.strftime('%d-%m-%Y') ms2F= 'PlanMs2TG %s.xlsx' % tgl.strftime('%d-%m-%Y') dLO = 'DataLO_TG %s.xls' % tgl.strftime('%d-%m-%Y') return hMin1F,ms2F,dLO elif site == 'PLP': hMin1F= 'OutstandingPLP %s.xlsx' % tgl.strftime('%d-%m-%Y') ms2F= 'PlanMs2PLP %s.xlsx' % tgl.strftime('%d-%m-%Y') dLO = 'DataLO_PLP %s.xls' % tgl.strftime('%d-%m-%Y') return hMin1F,ms2F,dLO elif site == 'BLG': dLO = 'DATA_LO_BLG %s.xls' % tgl.strftime('%d-%m-%Y') return dLO