diff --git a/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs b/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs index 7244f624..68e5c8e2 100644 --- a/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs +++ b/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs @@ -708,13 +708,11 @@ public IActionResult FertigationDetails(FertigationDetailsViewModel fgvm) fgvm.totProductVolPerSeason = Math.Round((field.Area * convertedProductRate * fgvm.eventsPerSeason), 2); // convert to int/string? Error messages? decimal injectionRateConversion = 0; - ConversionFactor _cf = _sd.GetConversionFactor(); switch (fgvm.selInjectionRateUnitOption) { //US gallon/min //1 Imperial gallons per minute to gallon/minute = 1.20095 gallon/minute case "1": - //injectionRateConversion = _cf. injectionRateConversion = 1.20095M; break; @@ -731,7 +729,6 @@ public IActionResult FertigationDetails(FertigationDetailsViewModel fgvm) } //Fertigation time - //volumePerFertigation / (injectionRate / conversionFactor) decimal fertTimeVal = Convert.ToDecimal(fgvm.totProductVolPerFert) / (Convert.ToDecimal(fgvm.injectionRate) / injectionRateConversion); fgvm.fertigationTime = Math.Round(fertTimeVal, 2); @@ -758,6 +755,7 @@ public IActionResult FertigationDetails(FertigationDetailsViewModel fgvm) FertigationUpdate(fgvm); } + //Still required this year FertigationStillRequired(ref fgvm); if (fgvm.id == null) { diff --git a/app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml b/app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml index 590a6919..bc9ea642 100644 --- a/app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml +++ b/app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml @@ -227,12 +227,24 @@