This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See https://gitlab.nuiton.org/codelutin/tutti.git commit f7f8bf93ef169c6946cd8f3a1168b927c0cc83bf Author: Kevin Morin <morin@codelutin.com> Date: Thu Mar 24 09:38:02 2016 +0100 on arrondit avant la comparaison (refs #8151) --- .../ifremer/tutti/service/catches/WeightComputingService.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/WeightComputingService.java b/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/WeightComputingService.java index de61146..4ef90a9 100644 --- a/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/WeightComputingService.java +++ b/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/WeightComputingService.java @@ -385,6 +385,7 @@ public class WeightComputingService extends AbstractTuttiService { frequencyWeight += w; } } + frequencyWeight = WeightUnit.KG.round(frequencyWeight); if (categoryWeight == null && rowWeight != null) { // throw new TuttiBusinessException(t("tutti.service.operations.computeWeights.error.incoherentRowWeightCategory")); @@ -407,7 +408,7 @@ public class WeightComputingService extends AbstractTuttiService { } else if (categoryWeight == null && frequencyWeight != null) { // if the category weight is null and the frequencies have a weight, // then this weight is the result - batch.setSampleCategoryComputedWeight(WeightUnit.KG.round(frequencyWeight)); + batch.setSampleCategoryComputedWeight(frequencyWeight); result = frequencyWeight; } else if (frequencyWeight != null @@ -430,7 +431,7 @@ public class WeightComputingService extends AbstractTuttiService { thisIndex); } else if (rowWeight == null) { - batch.setComputedWeight(WeightUnit.KG.round(frequencyWeight)); + batch.setComputedWeight(frequencyWeight); } result = categoryWeight; @@ -575,6 +576,7 @@ public class WeightComputingService extends AbstractTuttiService { frequencyWeight += w; } } + frequencyWeight = WeightUnit.KG.round(frequencyWeight); if (categoryWeight == null && rowWeight != null) { // throw new TuttiBusinessException(t("tutti.service.operations.computeWeights.error.incoherentRowWeightCategory")); @@ -598,7 +600,7 @@ public class WeightComputingService extends AbstractTuttiService { } else if (categoryWeight == null && frequencyWeight != null) { // if the category weight is null and the frequencies have a weight, // then this weight is the result - batch.setSampleCategoryComputedWeight(WeightUnit.KG.round(frequencyWeight)); + batch.setSampleCategoryComputedWeight(frequencyWeight); result = frequencyWeight; } else if (frequencyWeight != null @@ -622,7 +624,7 @@ public class WeightComputingService extends AbstractTuttiService { thisIndex); } else if (rowWeight == null) { - batch.setComputedWeight(WeightUnit.KG.round(frequencyWeight)); + batch.setComputedWeight(frequencyWeight); } result = categoryWeight; -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.