This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit 177dbb2b253a0c2a519af4f7e46585fa4d6b2b1c Author: Jean Couteau <jean.couteau@gmail.com> Date: Thu Apr 26 12:05:08 2018 +0200 fixes #9796 : Renommage de champs calculatrice --- .../persistence/entities/EmailTopiaDao.java | 38 +++++++++++++++++++--- .../i18n/faxtomail-ui-swing_fr_FR.properties | 4 +-- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java b/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java index a3d01543..295e37a0 100644 --- a/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java +++ b/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java @@ -1076,7 +1076,7 @@ public class EmailTopiaDao extends AbstractEmailTopiaDao<Email> { List<Range> allRanges = findAll(allRangesQuery, args); Map<String, Range> rangesById = Maps.uniqueIndex(allRanges, TopiaEntities.getTopiaIdFunction()); - // this has been modifier from + // this has been modified from // SELECT range // to // SELECT range.topiaId @@ -1135,6 +1135,8 @@ public class EmailTopiaDao extends AbstractEmailTopiaDao<Email> { Quantities otherDemandsQuantities = null; if (computeQuantitiesSubtotalsByState) { + + //inProgressQuantities correspond aux "Pris par et sans état d'attente" String inProgressQuantitiesQuery = "SELECT SUM(rangeRow." + RangeRow.PROPERTY_PRODUCT_QUANTITY + ") AS prodQ," + " SUM(rangeRow." + RangeRow.PROPERTY_SAV_QUANTITY + ") AS savQ," + " SUM(rangeRow." + RangeRow.PROPERTY_QUOTATION_QUANTITY + ") AS quotQ" + @@ -1164,9 +1166,37 @@ public class EmailTopiaDao extends AbstractEmailTopiaDao<Email> { inProgressDemandsQuantities = new Quantities(productInProgressQuantity, savInProgressQuantity, quotationInProgressQuantity); - otherDemandsQuantities = new Quantities(productTotalQuantity - productInProgressQuantity, - savTotalQuantity - savInProgressQuantity, - quotationTotalQuantity - quotationInProgressQuantity); + + //otherDemandsQuantities correspond aux lignes "avec état d'attente" + String otherDemandsQuantitiesQuery = "SELECT SUM(rangeRow." + RangeRow.PROPERTY_PRODUCT_QUANTITY + ") AS prodQ," + + " SUM(rangeRow." + RangeRow.PROPERTY_SAV_QUANTITY + ") AS savQ," + + " SUM(rangeRow." + RangeRow.PROPERTY_QUOTATION_QUANTITY + ") AS quotQ" + + " FROM " + Email.class.getName() + " AS email " + + " INNER JOIN email." + Email.PROPERTY_RANGE_ROW + " AS rangeRow" + + " WHERE email." + Email.PROPERTY_MAIL_FOLDER + " IN :folders" + + // " AND email." + Email.PROPERTY_TAKEN_BY + " IS NOT NULL" + + " AND email." + Email.PROPERTY_WAITING_STATE + " IS NOT NULL"; + + args = new HashMap<>(); + args.put("folders", folders); + + Object[] otherDemandsQueryResut = findUnique(otherDemandsQuantitiesQuery, args); + Long productOtherDemandsQuantity = (Long) otherDemandsQueryResut[0]; + if (productOtherDemandsQuantity == null) { + productOtherDemandsQuantity = 0L; + } + Long savOtherDemandsQuantity = (Long) otherDemandsQueryResut[1]; + if (savOtherDemandsQuantity == null) { + savOtherDemandsQuantity = 0L; + } + Long quotationOtherDemandsQuantity = (Long) otherDemandsQueryResut[2]; + if (quotationOtherDemandsQuantity == null) { + quotationOtherDemandsQuantity = 0L; + } + + otherDemandsQuantities = new Quantities(productOtherDemandsQuantity, + savOtherDemandsQuantity, + quotationOtherDemandsQuantity); } return new QuantitiesByRange(quantitiesByRange, inProgressDemandsQuantities, otherDemandsQuantities, totalQuantities); diff --git a/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties b/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties index ae3dd5df..cf93f20d 100644 --- a/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties +++ b/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties @@ -281,8 +281,8 @@ faxtomail.pdfEditor.readPdf.error=Erreur lors de la lecture du PDF faxtomail.print.success.message=%s fichiers ont été imprimés faxtomail.quantitiesByRange.button.text=OK faxtomail.quantitiesByRange.title=Quantités par gamme -faxtomail.rangeRows.quantities.inProgress.label=En cours -faxtomail.rangeRows.quantities.otherDemands.label=Autres +faxtomail.rangeRows.quantities.inProgress.label=Pris par +faxtomail.rangeRows.quantities.otherDemands.label=État d'attente faxtomail.rangeRows.quantities.totals.label=Totaux faxtomail.rangeRows.table.header.commandNumber=N° commande / devis faxtomail.rangeRows.table.header.commandNumber.tip=N° commande / devis -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.