private void difoltMjGod() throws NumberFormatException { raIniciranje.getInstance().posOrgsPl(hr.restart.zapod.OrgStr.getKNJCORG()); fieldSet.setShort( "GODINAOD", Short.parseShort(Util.getUtil().getYear(dm.getOrgpl().getTimestamp("DATUMISPL")))); fieldSet.setShort( "MJESECOD", Short.parseShort(Util.getUtil().getMonth(dm.getOrgpl().getTimestamp("DATUMISPL")))); }
private void setKnjigovodstvo() { String knjigovodstvo = "SELECT Orgstruktura.naziv, Orgstruktura.mjesto, Orgstruktura.adresa, Orgstruktura.hpbroj, Orgstruktura.ziro, " + (raObracunPL.isOIB() ? "Logotipovi.oib" : "Logotipovi.matbroj") + " AS MATBROJ" + ", Logotipovi.sifdjel " + "FROM Orgstruktura, Logotipovi " + "WHERE orgstruktura.corg = logotipovi.corg and orgstruktura.corg ='" + hr.restart.zapod.OrgStr.getKNJCORG() + "'"; knjig = Util.getNewQueryDataSet(knjigovodstvo); }
public String getNSPRAVOSOB() { String nspo = ""; if (lookupData .getlookupData() .raLocate(dm.getOrgstruktura(), "CORG", hr.restart.zapod.OrgStr.getKNJCORG())) { nspo = dm.getOrgstruktura().getString("NAZIV") + ", " + dm.getOrgstruktura().getString("ADRESA") + ", " + dm.getOrgstruktura().getString("HPBROJ") + " " + dm.getOrgstruktura().getString("MJESTO"); } else nspo = rpm.getFirstLine() + " " + rpm.getSecondLine() + ", " + rpm.getThirdLine(); return nspo; }
public File getAttachment() { File dir = new File(System.getProperty("user.dir") + File.separator + "dumps"); if (dir.exists() && !dir.isDirectory()) dir.delete(); if (!dir.exists()) dir.mkdir(); QueryDataSet knjs = Orgstruktura.getDataModule().getKnjig(); knjs.open(); lookupData.getlookupData().raLocate(knjs, "CORG", OrgStr.getKNJCORG()); String prefix = getMailProperties().getProperty("dump.name", knjs.getString("NAZIV")); String dumpFileName = dir.getAbsolutePath() + File.separator + prefix + "-dbdump-" + new java.sql.Date(System.currentTimeMillis()) + ".zi_"; File plainDumpFile = new File(dumpFileName + "__plain.tmp"); File dumpFile = new File(dumpFileName); raDbaseCreator.dumpTo(plainDumpFile); DesEncrypter enc = new DesEncrypter(getFrom()); enc.encrypt(plainDumpFile, dumpFile); return dumpFile; }