/*
 * Test.java
 * Created on 2005.06.11.
 * Author:  Laszlo Felfoldi, Etixpert GmbH 
 * mail:    laszlo.felfoldi@etixpert.com
 */
package com.etixpert.evolution.app.statistics;

import java.io.FileOutputStream;
import java.io.FileWriter;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;

public class Test {
    public static java.sql.Date getNormalDate(String value) throws Exception {
    	java.sql.Date date;
    	java.text.DateFormat df = java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM, Locale.GERMAN);
    	java.util.Date d = df.parse(value);
    	date = new java.sql.Date(d.getTime());		
    	return date;
    }
    
    public static void main(String[] args) {
		try {
			FileOutputStream fos;
			FileWriter fw;
			
			Calendar c = Calendar.getInstance();
			c.setTime(new Date(0));
			c.set(Calendar.YEAR, 2012);
			c.set(Calendar.MONTH, 9);
			
			Calendar d = Calendar.getInstance();
			d.setTime(new Date(0));
			d.set(Calendar.YEAR, 2012);
			d.set(Calendar.MONTH, 9);
			d.set(Calendar.DAY_OF_MONTH, 5);
			
//			fos = new FileOutputStream("DownlineEtiketten.pdf");
//			fos.write(DownlineEtiketten.generatePDF(new Integer(0), "d.id", new String[] {"100", "200", "300", "400", "500", "600", "700", "800", "900"}, new String[]{"2", "1"}, "AT", false, "WEB-INF", "x", "Y"));
//			fos.close();
			
			Calendar x = Calendar.getInstance();
			x.set(Calendar.DAY_OF_MONTH, 2);
//			fos = new FileOutputStream("Lieferscheinsummen.pdf");
//			fos.write(Lieferscheinsummen.generatePDF(c.getTime(), x.getTime(), new Integer(0), "WEB-INF"));
//			fos.close();
//			fw = new FileWriter("Lieferscheinsummen.html");
//			fw.write(Lieferscheinsummen.generateHTML(c.getTime(), x.getTime(), new Integer(0), "WEB-INF"));
//			fw.close();

//			fos = new FileOutputStream("TagesProduktion.pdf");
//			fos.write(TagesProduktion.generatePDF(c.getTime(), /*new Date(), new Integer(0), null, */ "WEB-INF"));
//			fos.close();
//			fw = new FileWriter("TagesProduktion.html");
//			fw.write(TagesProduktion.generateHTML(c.getTime(), /*Calendar.getInstance().getTime(), new Integer(0), null,*/ "WEB-INF"));
//			fw.close();
			
			
//			fw = new FileWriter("Umsatzproduktion.html");
//			fw.write(Umsatzproduktion.generateHTML(getNormalDate("01.01.2004"), getNormalDate("01.01.2007"), new Integer(0), null, "WEB-INF"));
//			fw.close();
//			fos = new FileOutputStream("Umsatzproduktion.pdf");
//			fos.write(Umsatzproduktion.generatePDF(new Date(0), Calendar.getInstance().getTime(), new Integer(43000502), "AT", "WEB-INF"));
//			fos.close();
						
//			fw = new FileWriter("NewQualification.html");
//			fw.write(NewQualification.generateHTML(c.getTime(), new Integer(400), "WEB-INF"));
//			fw.close();
//			fos = new FileOutputStream("NewQualification.pdf");
//			fos.write(NewQualification.generatePDF(c.getTime(), new Integer(400), "WEB-INF"));
//			fos.close();
			
//			fos = new FileOutputStream("TopArticles.pdf");
//			fos.write(TopArticles.generatePDF(c.getTime(), new Date(), "49000541", "", "WEB-INF"));
//			fos.close();

//			fw = new FileWriter("x.html");			
//			fw.write(BestDistributorArticles.generateHTML(c.getTime(), new Date(), null, "WEB-INF"));
//			fw.close();
			
//			fw = new FileWriter("x.html");			
//			fw.write(TopTenMembers.generateHTML(c.getTime(), d.getTime(), 4, "WEB-INF"));
//			fw.close();

//			fw = new FileWriter("x.html");
//			fw.write(Umsatzsteuervoranmeldung.generateHTML(c.getTime(), null, "WEB-INF"));
//			fw.close();
//			fos = new FileOutputStream("x.pdf");
//			fos.write(Umsatzsteuervoranmeldung.generatePDF(c.getTime(), null, "WEB-INF"));
//			fos.close();
//			fos = new FileOutputStream("x_DE.pdf");
//			fos.write(Umsatzsteuervoranmeldung.generatePDF(c.getTime(), "DE", "WEB-INF"));
//			fos.close();

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
