Author: vsalaun Date: 2011-07-11 13:08:52 +0200 (Mon, 11 Jul 2011) New Revision: 3208 Url: http://chorem.org/repositories/revision/lima/3208 Log: add headers ton lima-business / lima-callao Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/OptionsServiceMonitorable.java trunk/lima-business/src/main/java/org/chorem/lima/business/VatStatementServiceMonitorable.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsService.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsServiceLocal.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementImpl.java Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/OptionsServiceMonitorable.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/OptionsServiceMonitorable.java 2011-07-11 11:02:45 UTC (rev 3207) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/OptionsServiceMonitorable.java 2011-07-11 11:08:52 UTC (rev 3208) @@ -1,3 +1,27 @@ +/* + * #%L + * Lima :: business + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2008 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ package org.chorem.lima.business; import org.chorem.lima.business.ejbinterface.OptionsService; Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/VatStatementServiceMonitorable.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/VatStatementServiceMonitorable.java 2011-07-11 11:02:45 UTC (rev 3207) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/VatStatementServiceMonitorable.java 2011-07-11 11:08:52 UTC (rev 3208) @@ -1,3 +1,27 @@ +/* + * #%L + * Lima :: business + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2008 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ package org.chorem.lima.business; import org.chorem.lima.business.ejbinterface.VatStatementService; Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2011-07-11 11:02:45 UTC (rev 3207) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2011-07-11 11:08:52 UTC (rev 3208) @@ -62,6 +62,7 @@ import org.chorem.lima.business.ejbinterface.FinancialStatementService; import org.chorem.lima.business.ejbinterface.IdentityService; import org.chorem.lima.business.ejbinterface.ReportService; +import org.chorem.lima.business.ejbinterface.VatStatementService; import org.chorem.lima.business.utils.DocumentsEnum; import org.chorem.lima.business.utils.EntryComparator; import org.chorem.lima.business.utils.FormatsEnum; @@ -76,6 +77,7 @@ import org.chorem.lima.entity.FinancialTransaction; import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.LimaCallaoDAOHelper; +import org.chorem.lima.entity.VatStatement; import org.nuiton.topia.TopiaContext; import org.nuiton.topia.TopiaContextFactory; import org.nuiton.topia.TopiaException; @@ -116,6 +118,9 @@ @EJB private ReportService reportService; + @EJB + private VatStatementService vatStatementService; + protected String path; //SDFs @@ -1455,7 +1460,15 @@ @Override public void createVatDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException, IOException, COSVisitorException { - try { + try { + + List<VatStatement> vatStatementsList = vatStatementService.getAllVatStatements(); + + for (VatStatement vatStatement : vatStatementsList) { + BigDecimal nb = vatStatementService.vatStatementAmounts(vatStatement, beginDate, endDate); + System.out.println(vatStatement.getLabel() + " : " + nb); + } + String filePath = path+File.separator+DocumentsEnum.VAT.getFileName()+format.getExtension(); Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java 2011-07-11 11:02:45 UTC (rev 3207) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java 2011-07-11 11:08:52 UTC (rev 3208) @@ -1,3 +1,27 @@ +/* + * #%L + * Lima :: business + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2008 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ package org.chorem.lima.business.ejb; import javax.ejb.Stateless; Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsService.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsService.java 2011-07-11 11:02:45 UTC (rev 3207) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsService.java 2011-07-11 11:08:52 UTC (rev 3208) @@ -1,3 +1,27 @@ +/* + * #%L + * Lima :: business + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2008 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ package org.chorem.lima.business.ejbinterface; import javax.ejb.Remote; Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsServiceLocal.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsServiceLocal.java 2011-07-11 11:02:45 UTC (rev 3207) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsServiceLocal.java 2011-07-11 11:08:52 UTC (rev 3208) @@ -1,3 +1,27 @@ +/* + * #%L + * Lima :: business + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2008 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ package org.chorem.lima.business.ejbinterface; import javax.ejb.Local; Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java 2011-07-11 11:02:45 UTC (rev 3207) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java 2011-07-11 11:08:52 UTC (rev 3208) @@ -1,11 +1,38 @@ +/* + * #%L + * Lima :: business + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2008 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ package org.chorem.lima.business.ejbinterface; +import java.math.BigDecimal; +import java.util.Date; import java.util.List; import javax.ejb.Remote; import org.chorem.lima.business.LimaException; import org.chorem.lima.entity.VatStatement; +import org.nuiton.topia.TopiaException; @Remote public interface VatStatementService { @@ -24,4 +51,9 @@ void updateVatStatement(VatStatement vatStatement) throws LimaException; + BigDecimal vatStatementAmounts(VatStatement vatStatement, + Date selectedBeginDate, Date selectedEndDate) throws LimaException, + TopiaException; + + } \ No newline at end of file Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java 2011-07-11 11:02:45 UTC (rev 3207) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java 2011-07-11 11:08:52 UTC (rev 3208) @@ -1,3 +1,27 @@ +/* + * #%L + * Lima :: business + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2008 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ package org.chorem.lima.business.ejbinterface; import javax.ejb.Local; Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java =================================================================== --- trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java 2011-07-11 11:02:45 UTC (rev 3207) +++ trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java 2011-07-11 11:08:52 UTC (rev 3208) @@ -1,25 +1,23 @@ /* * #%L - * - * * $Id$ * $HeadURL$ * %% * Copyright (C) 2011 Codelutin, Chatellier Eric * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as + * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Lesser Public + * You should have received a copy of the GNU General Public * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementImpl.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementImpl.java 2011-07-11 11:02:45 UTC (rev 3207) +++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementImpl.java 2011-07-11 11:08:52 UTC (rev 3208) @@ -1,3 +1,27 @@ +/* + * #%L + * Lima :: callao + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2008 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ package org.chorem.lima.entity; public class VatStatementImpl extends VatStatementAbstract {