This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository chorem. See http://git.chorem.org/chorem.git commit 794e95a775a49f54516f5f2e976d5ce0879d4280 Author: kootox <jean.couteau@gmail.com> Date: Sun Nov 9 15:53:34 2014 +0100 fixes #1136 : change request to get invoice that target project and quotations on the project --- .../actions/financial/BillingPerProjectReportAction.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/financial/BillingPerProjectReportAction.java b/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/financial/BillingPerProjectReportAction.java index 39d35e2..49a0f78 100644 --- a/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/financial/BillingPerProjectReportAction.java +++ b/chorem-webmotion/src/main/java/org/chorem/webmotion/actions/financial/BillingPerProjectReportAction.java @@ -22,15 +22,13 @@ package org.chorem.webmotion.actions.financial; */ import org.chorem.ChoremClient; -import org.chorem.entities.Accepted; -import org.chorem.entities.FinancialTransaction; -import org.chorem.entities.Project; -import org.chorem.entities.Quotation; +import org.chorem.entities.*; import org.chorem.webmotion.actions.sales.SalesData; import org.chorem.webmotion.actions.sales.SalesReportHelper; import org.debux.webmotion.server.WebMotionController; import org.debux.webmotion.server.render.Render; import org.nuiton.wikitty.WikittyClient; +import org.nuiton.wikitty.entities.Element; import org.nuiton.wikitty.query.WikittyQuery; import org.nuiton.wikitty.query.WikittyQueryMaker; @@ -93,16 +91,18 @@ public class BillingPerProjectReportAction extends WebMotionController { WikittyQuery projectQuery = new WikittyQueryMaker() .select().sum("FinancialTransaction.amount").where().and() - .eq(FinancialTransaction.FQ_FIELD_FINANCIALTRANSACTION_TARGET, project) .bw(FinancialTransaction.FQ_FIELD_FINANCIALTRANSACTION_EMITTEDDATE, first, last) + .containsOne(FinancialTransaction.FQ_FIELD_FINANCIALTRANSACTION_TARGET) + .select(Element.ID).or().ideq(project).eq(Quotation.ELEMENT_FIELD_QUOTATION_PROJECT, project).close() .end(); Integer sales = client.findByQuery(Integer.class, projectQuery); //TODO JC 2012-01-22 Find a way to replace two queries into one. WikittyQuery transactionsQuery = new WikittyQueryMaker().and() - .eq(FinancialTransaction.FQ_FIELD_FINANCIALTRANSACTION_TARGET, project) .bw(FinancialTransaction.FQ_FIELD_FINANCIALTRANSACTION_EMITTEDDATE, first, last) + .containsOne(FinancialTransaction.FQ_FIELD_FINANCIALTRANSACTION_TARGET) + .select(Element.ID).or().ideq(project).eq(Quotation.ELEMENT_FIELD_QUOTATION_PROJECT, project).close() .end(); List<FinancialTransaction> transactions = client.findAllByQuery(FinancialTransaction.class, -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.