From 75e4a519385a15e1f8421aedc7bb7a806af1af85 Mon Sep 17 00:00:00 2001
From: barillac <barillac>
Date: Thu, 17 Apr 2014 08:01:21 +0000
Subject: [PATCH] corrected volume calculation

SVN: 31388
---
 .../html/js/widgets/DilutionWidget.js         | 25 +++++++++++--------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/widgets/DilutionWidget.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/widgets/DilutionWidget.js
index e95b2428c4b..ce6b27aba59 100644
--- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/widgets/DilutionWidget.js
+++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/widgets/DilutionWidget.js
@@ -162,16 +162,19 @@ function DilutionWidget(containerId, serverFacade) {
 					break;
 				}
 			}
-			if(conjugatedCloneSelected === "") {
-				_this._updateCell(rowNumber,4, "");
-				_this._updateCell(rowNumber,5, "");
-				_this._updateCell(rowNumber,6, "");
-				_this._updateCell(rowNumber,7, "");
-			} else {
-				_this._updateCell(rowNumber,4, data["clone"].properties["REACTIVITY"]);
-				_this._updateCell(rowNumber,5, data["lot"].properties["SUPPLIER"]);
-				_this._updateCell(rowNumber,6, data["conjugatedClone"].properties["CYTOF_CONCENTRATION"]);
-			}
+			var dilutionVolume = parseFloat(data["conjugatedClone"].properties["CYTOF_STAINING_CONC"]) / parseFloat(data["conjugatedClone"].properties["CYTOF_CONCENTRATION"]);
+
+				if(conjugatedCloneSelected === "") {
+					_this._updateCell(rowNumber,4, "");
+					_this._updateCell(rowNumber,5, "");
+					_this._updateCell(rowNumber,6, "");
+					_this._updateCell(rowNumber,7, "");
+				} else {
+					_this._updateCell(rowNumber,4, data["clone"].properties["REACTIVITY"]);
+					_this._updateCell(rowNumber,5, data["lot"].properties["SUPPLIER"]);
+					_this._updateCell(rowNumber,6, dilutionVolume);
+
+				}
 			_this._updateCalculatedValues();
 		}
 		
@@ -187,7 +190,7 @@ function DilutionWidget(containerId, serverFacade) {
 			var row = $(tBody.rows[rowNum]);
 			var concentration = row.children()[6].innerHTML;
 			if(concentration !== "") {
-				var volumeToAdd = this._totalVolume / parseFloat(concentration);
+				var volumeToAdd = this._totalVolume * parseFloat(concentration);
 				totalVolumeToAdd += volumeToAdd;
 				this._updateCell(rowNum,7, volumeToAdd);
 			}
-- 
GitLab