function addGenoTubeMadeToOrder() {
	var title = "TaqMan<sup>&reg;</sup>&nbsp;SNP Genotyping Assays";
	var format = "";
	var subtype = "Made-to-order";
	var noofreactions = getExperimentInfo('noofreplicates')
			* getExperimentInfo('noofsamples');

	var equipment = getExperimentInfo('equipment');

	// if(equipment == "96-well") {
	// if (noofreactions <= 300) {
	// format = 'Small';
	// } else if (noofreactions <= 1000) {
	// format = 'Medium';
	// } else {
	// format = 'Large';
	// }
	// } else {
	// if (noofreactions <= 1500) {
	// format = 'Small';
	// } else if (noofreactions <= 5000) {
	// format = 'Medium';
	// } else {
	// format = 'Large';
	// }
	// }
	//	

	var species = "";
	if (getExperimentInfo('species') == "Human") {
		species = "Human";
	} else {
		species = "Non-Human";
	}
	var isOtherFormat = getExperimentInfo('isOtherFormat');
	var spno = 4;
	if( isOtherFormat === "YES" ){
		spno = getExperimentInfo('otherFmPano');
		var selOtherForVal = getExperimentInfo('selOtherFormatValue');
		var tubeObj = findAppTapRecForOtherFormat(genoTypeTubes, 'productname', selOtherForVal);
	}else{
		updateExperimentInfo("currFmPno", spno);
		var tubeObj = findOptimumGenoTubeRecord(subtype, species, noofreactions);
	}
	var partNumber = tubeObj.get('partnumber');
	var productName = tubeObj.get('productname');

	var tubenoofreactions = "";
	var wellNum = 96;
	if (equipment == "96-well") {
		tubenoofreactions = tubeObj.get('no of reactions in 96-well tube');
	} else {
		wellNum = 384;
		tubenoofreactions = tubeObj.get('no of reactions in 384-well tube');
	}

	var noofunits = Math.ceil(noofreactions / tubenoofreactions)
			* getExperimentInfo('nooftargets');
	var mvolume = 0;
	if (equipment == '96-well') {
		mvolume = tubeObj.get('mastermix volume perreaction for 96-well')
				* getExperimentInfo('nooftargets')
				* getExperimentInfo('noofreplicates')
				* getExperimentInfo('noofsamples');
	} else if (equipment == '384-well') {
		mvolume = tubeObj.get('mastermix volume perreaction for 384-well')
				* getExperimentInfo('nooftargets')
				* getExperimentInfo('noofreplicates')
				* getExperimentInfo('noofsamples');
	}

	//var mmxObj = findGenoMMXRecord(mvolume);
	var isOtherMMFormat = getExperimentInfo('isOtherMMFormat');
	if( isOtherMMFormat === "YES" ){
		spno = getExperimentInfo('otherFmPano');
		var selOtherForVal = getExperimentInfo('selOtherFormatMMValue');
		var selOtherForPd = getExperimentInfo('selOtherFormatMMProd');
		var mastermixObj = findAppTapRecForOtherMMFormat(genoMasterMix, 'productname', selOtherForPd);
		var mastermix = mastermixObj.get('productname');
		var mnoofunits = (Math.ceil(mvolume / mastermixObj.get('volume')));
		var mastermixPartNumber = mastermixObj.get('partnumber');
		var masterMixCostPerUnit = pricelist.findRecord('partnumber',mastermixPartNumber).regions().findRecord('region',region + "-" + currency).get('price');
		var masterperc = (Ext.get('masterperc').dom.value).split('%')[0];
		var totalMasterMixCost = masterMixCostPerUnit * mnoofunits * (1 - (masterperc / 100));
		var masterMixCostPerReaction = totalMasterMixCost / (getExperimentInfo('nooftargets') * 
										getExperimentInfo('noofreplicates') * getExperimentInfo('noofsamples'));
		var mmixCostPerSample = totalMasterMixCost	/ getExperimentInfo('noofsamples');
		var masterMixCostPerReaction1 = 0;
		var masterMixCostPerReaction2 = 0;
		var masterMixCostPerReaction3 = 0;
		var mmixCostPerSample1 = 0;
		var mmixCostPerSample2 = 0;
		var mmixCostPerSample3 = 0;
		var totalMasterMixCost1 = 0;
		var totalMasterMixCost2 = 0;
		var totalMasterMixCost3 = 0;
	} else{
		// Master Mix Combination starts here
		//console.log("mvolume : "+mvolume);
		totalQty = [];
		allCombination = [];
		var totQty = Math.ceil( mvolume / 1000 );
		var toGetCombinationVal = pbRatio(0, totQty, mvolume, genoTypingMasterMix);
		var selMM = toGetOptimumPrice(toGetCombinationVal, genoMasterMix);
		//var mmxObj = findGenoMMXRecordCombination(mvolume);
		var mmxObj = selMM;
		
		var mastermix = mmxObj['Product Name1'];
		var mastermix1 = mmxObj['Product Name2'];
		var mastermix2 = mmxObj['Product Name3'];
		var mastermix3 = mmxObj['Product Name4'];
	
			
		var mnoofunits = mmxObj['qty1'];
		var mnoofunits1 = mmxObj['qty2'];
		if(mnoofunits1 != undefined){
			mnoofunits1 = mnoofunits1;
		} else {
			mnoofunits1 = 0;
		}
		var mnoofunits2 = mmxObj['qty3'];
		if(mnoofunits2 != undefined){
			mnoofunits2 = mnoofunits2;
		} else {
			mnoofunits2 = 0;
		}
		var mnoofunits3 = mmxObj['qty4'];
		if(mnoofunits3 != undefined){
			mnoofunits3 = mnoofunits3;
		} else {
			mnoofunits3 = 0;
		}
		
		var mastermixPartNumber = mmxObj["Part Number1"];
		var mastermixPartNumber1 = mmxObj["Part Number2"];
		if(mastermixPartNumber1 != undefined){
			mastermixPartNumber1 = mastermixPartNumber1;
		} else {
			mastermixPartNumber1 = 0;
		}
		var mastermixPartNumber2 = mmxObj["Part Number3"];
		if(mastermixPartNumber2 != undefined){
			mastermixPartNumber2 = mastermixPartNumber2;
		} else {
			mastermixPartNumber2 = 0;
		}
		var mastermixPartNumber3 = mmxObj["Part Number4"];
		if(mastermixPartNumber3 != undefined){
			mastermixPartNumber3 = mastermixPartNumber3;
		} else {
			mastermixPartNumber3 = 0;
		}
		
		
		var masterMixCostPerUnit = pricelist.findRecord('partnumber', mastermixPartNumber).regions().findRecord('region', region + "-" + currency).get('price');
		
		if(mastermixPartNumber1 != 0){
			var masterMixCostPerUnit1 = pricelist.findRecord('partnumber', mastermixPartNumber1).regions().findRecord('region', region + "-" + currency).get('price');
		} else {
			var masterMixCostPerUnit1 = 0;
		}
		if(mastermixPartNumber2 != 0){
			var masterMixCostPerUnit2 = pricelist.findRecord('partnumber', mastermixPartNumber2).regions().findRecord('region', region + "-" + currency).get('price');
		} else {
			var masterMixCostPerUnit2 = 0;
		}
		if(mastermixPartNumber3 != 0){
			var masterMixCostPerUnit3 = pricelist.findRecord('partnumber', mastermixPartNumber3).regions().findRecord('region', region + "-" + currency).get('price');
		} else {
			var masterMixCostPerUnit3 = 0;
		}
		
		var masterperc = (Ext.get('masterperc').dom.value).split('%')[0];
		var totalMasterMixCost = masterMixCostPerUnit * mnoofunits * (1 - (masterperc / 100));
		var totalMasterMixCost1 = masterMixCostPerUnit1 * mnoofunits1 * (1 - (masterperc / 100));
		var totalMasterMixCost2 = masterMixCostPerUnit2 * mnoofunits2 * (1 - (masterperc / 100));
		var totalMasterMixCost3 = masterMixCostPerUnit3 * mnoofunits3 * (1 - (masterperc / 100));
		
		var masterMixCostPerReaction = (totalMasterMixCost) / (getExperimentInfo('nooftargets')	* getExperimentInfo('noofreplicates') * getExperimentInfo('noofsamples'));
		var masterMixCostPerReaction1 = (totalMasterMixCost1) / (getExperimentInfo('nooftargets')	* getExperimentInfo('noofreplicates') * getExperimentInfo('noofsamples'));
		var masterMixCostPerReaction2 = (totalMasterMixCost2) / (getExperimentInfo('nooftargets')	* getExperimentInfo('noofreplicates') * getExperimentInfo('noofsamples'));
		var masterMixCostPerReaction3 = (totalMasterMixCost3) / (getExperimentInfo('nooftargets')	* getExperimentInfo('noofreplicates') * getExperimentInfo('noofsamples'));
		
		var mmixCostPerSample = totalMasterMixCost / getExperimentInfo('noofsamples');
		var mmixCostPerSample1 = totalMasterMixCost1 / getExperimentInfo('noofsamples');
		var mmixCostPerSample2 = totalMasterMixCost2 / getExperimentInfo('noofsamples');
		var mmixCostPerSample3 = totalMasterMixCost3 / getExperimentInfo('noofsamples');
	
		// Master Mix Combination ends here
	}	
	
	
	
	var assayCostPerUnit = pricelist.findRecord('partnumber', partNumber).regions().findRecord('region', region + "-" + currency).get('price');
	var volumeDiscount = 0;
	var costWithVolDisc = noofunits * assayCostPerUnit
			* (1 - (volumeDiscount / 100));
	var assayperc = (Ext.get('assayperc').dom.value).split('%')[0];
	var totalAssayCost = costWithVolDisc * (1 - (assayperc / 100));
	
	var masterperc = (Ext.get('masterperc').dom.value).split('%')[0];
		
	var numPlates = Math.ceil(getExperimentInfo('nooftargets')
			* getExperimentInfo('noofreplicates')
			* getExperimentInfo('noofsamples')/wellNum);
	//console.log("Number of plates: " + numPlates);
	var hours = Math.ceil(67/60 * 1.2 * numPlates);

//	var hours = Math.ceil((45 / 60 / wellNum) * getExperimentInfo('nooftargets')
//			* getExperimentInfo('noofreplicates')
//			* getExperimentInfo('noofsamples'));
	var totalCost = totalAssayCost + totalMasterMixCost + totalMasterMixCost1 + totalMasterMixCost2;

	var assayCostPerReaction = totalAssayCost
			/ (getExperimentInfo('nooftargets')
					* getExperimentInfo('noofreplicates') * getExperimentInfo('noofsamples'));
	
	var optimizationCostPerReaction = 0;
	var totalCostPerReaction = assayCostPerReaction + masterMixCostPerReaction + masterMixCostPerReaction1 + masterMixCostPerReaction2 +optimizationCostPerReaction;

	var productUrl = "";
	productUrl = "https://www.invitrogen.com/site/us/en/home/Products-and-Services/Applications/PCR/real-time-pcr/real-time-pcr-assays/snp-genotyping-taqman-assays/single-tube-snp-genotyping.html";
	
	var assayCostPerSample = totalAssayCost / getExperimentInfo('noofsamples');
	var totalCostPerSample = assayCostPerSample + mmixCostPerSample + mmixCostPerSample1 + mmixCostPerSample2;

	var totalCostPreDisc = costWithVolDisc
			+ (masterMixCostPerUnit * mnoofunits);
	var totalDiscount = 100 - (totalCost * 100 / totalCostPreDisc);
	
	var formats = productName;
	var formatqnt = formats.replace("Taqman","TaqMan®");
	var format = formatqnt.replace("QuantStudio TM","QuantStudio™");
	
	outputList.add({
		pno : spno,
		title : title,
		partnumber : partNumber,
		mastermixpartnumber : mastermixPartNumber,
		mastermixpartnumber1 : mastermixPartNumber1,
		mastermixpartnumber2 : mastermixPartNumber2,
		mastermixpartnumber3 : mastermixPartNumber3,
		format :format,
		noofunits : noofunits,
		noofreactions : noofreactions * getExperimentInfo('nooftargets'),
		mastermix : mastermix.replace(/�/gi, '<sup>&reg;</sup>&nbsp;'),
		mastermix1 : mastermix1,//.replace(/�/gi, '<sup>&reg;</sup>&nbsp;'),
		mastermix2 : mastermix2,//.replace(/�/gi, '<sup>&reg;</sup>&nbsp;'),
		mastermix3 : mastermix3,//.replace(/�/gi, '<sup>&reg;</sup>&nbsp;'),
		mnoofunits : mnoofunits,
		mnoofunits1 : mnoofunits1,
		mnoofunits2 : mnoofunits2,		
		mnoofunits3 : mnoofunits3,		
		totalcost : roundNumber(totalCost, 2),
		volumediscount : volumeDiscount,
		mvolumediscount : masterperc,
		assayscost : roundNumber(costWithVolDisc, 2),
		assayscostperunit : roundNumber(assayCostPerUnit, 2),
		assayscostwithvoldisc : roundNumber(totalAssayCost, 2),
		mastermixvol : roundNumber(mvolume, 2),
		mastermixcostperunit : roundNumber(masterMixCostPerUnit, 2),
		mastermixcostperunit1 : roundNumber(masterMixCostPerUnit1, 2),
		mastermixcostperunit2 : roundNumber(masterMixCostPerUnit2, 2),
		mastermixcostperunit3 : roundNumber(masterMixCostPerUnit3, 2),
		mastermixdisc : masterperc,
		mastermixcostwithdisc : roundNumber(totalMasterMixCost, 2),
		mastermixcostwithdisc1: roundNumber(totalMasterMixCost1, 2),
		mastermixcostwithdisc2: roundNumber(totalMasterMixCost2, 2),
		mastermixcostwithdisc3: roundNumber(totalMasterMixCost3, 2),
		mastermixcostpredisc : roundNumber((masterMixCostPerUnit * mnoofunits), 2),
		mastermixcostpredisc1 : roundNumber((masterMixCostPerUnit1 * mnoofunits1), 2),
		mastermixcostpredisc2 : roundNumber((masterMixCostPerUnit2 * mnoofunits2), 2),
		mastermixcostpredisc3 : roundNumber((masterMixCostPerUnit3 * mnoofunits3), 2),
		mastermixcost : roundNumber(masterMixCostPerUnit * mnoofunits, 2),
		mastermixcost1 : roundNumber(masterMixCostPerUnit1 * mnoofunits1, 2),
		mastermixcost2 : roundNumber(masterMixCostPerUnit2 * mnoofunits2, 2),
		mastermixcost3 : roundNumber(masterMixCostPerUnit3 * mnoofunits3, 2),
		mmxcostpersample : roundNumber(mmixCostPerSample,2),
		mmxcostpersample1 : roundNumber(mmixCostPerSample1,2),
		mmxcostpersample2 : roundNumber(mmixCostPerSample2,2),
		mmxcostpersample3 : roundNumber(mmixCostPerSample3,2),
		assaycostpersample : roundNumber(assayCostPerSample, 2),
		totalcostpersample : roundNumber(totalCostPerSample, 2),
		totalcostpredisc : roundNumber(totalCostPreDisc, 2),
		totaldiscount : roundNumber(totalDiscount, 2),
		noofhours : hours,
		assaycostperreaction : roundNumber(assayCostPerReaction, 2),
		mastermixcostperreaction : roundNumber(masterMixCostPerReaction, 2),
		mastermixcostperreaction1 : roundNumber(masterMixCostPerReaction1, 2),
		mastermixcostperreaction2 : roundNumber(masterMixCostPerReaction2, 2),
		mastermixcostperreaction3 : roundNumber(masterMixCostPerReaction3, 2),
		optimizationcostperreaction : roundNumber(optimizationCostPerReaction,
				2),
		totalcostperreaction : roundNumber(totalCostPerReaction, 2),
		totalcostpersample : roundNumber(totalCostPerSample, 2),
		producturl : productUrl,
		reqnoofunits : noofunits,
		fnName:'addGenoTubeMadeToOrder',
		type : 'tube'
	});

}
