src/EditProductTab9.cpp

changeset 283
242a68fa7186
parent 216
39aad77b7599
child 295
4b2ac345b982
--- a/src/EditProductTab9.cpp	Mon Jun 13 15:47:16 2022 +0200
+++ b/src/EditProductTab9.cpp	Mon Jun 13 16:47:52 2022 +0200
@@ -224,8 +224,8 @@
     if (product->fermentables.size() == 0)
 	return;	// no fermentables loaded yet
     for (int i = 0; i < product->fermentables.size(); i++) {
-   	if (product->fermentables.at(i).f_added == FERMENTABLE_ADDED_MASH) {
-	    m += product->fermentables.at(i).f_amount * (product->fermentables.at(i).f_yield / 100) * (1 - product->fermentables.at(i).f_moisture / 100);
+   	if (product->fermentables.at(i).added == FERMENTABLE_ADDED_MASH) {
+	    m += product->fermentables.at(i).amount * (product->fermentables.at(i).yield / 100) * (1 - product->fermentables.at(i).moisture / 100);
 	}
     }
     tot = Utils::sg_to_plato(product->brew_preboil_sg) * (product->brew_preboil_volume / 1.04) * product->brew_preboil_sg * 10 / 1000;
@@ -306,10 +306,10 @@
     if (product->fermentables.size() == 0)
         return; // no fermentables loaded yet
     for (int i = 0; i < product->fermentables.size(); i++) {
-	if (product->fermentables.at(i).f_added == FERMENTABLE_ADDED_MASH) {
-	    m += product->fermentables.at(i).f_amount * (product->fermentables.at(i).f_yield / 100) * (1 - product->fermentables.at(i).f_moisture / 100);
-	} else if (product->fermentables.at(i).f_added == FERMENTABLE_ADDED_BOIL) {
-	    b += product->fermentables.at(i).f_amount * (product->fermentables.at(i).f_yield / 100) * (1 - product->fermentables.at(i).f_moisture / 100);
+	if (product->fermentables.at(i).added == FERMENTABLE_ADDED_MASH) {
+	    m += product->fermentables.at(i).amount * (product->fermentables.at(i).yield / 100) * (1 - product->fermentables.at(i).moisture / 100);
+	} else if (product->fermentables.at(i).added == FERMENTABLE_ADDED_BOIL) {
+	    b += product->fermentables.at(i).amount * (product->fermentables.at(i).yield / 100) * (1 - product->fermentables.at(i).moisture / 100);
 	}
     }
     double tot = Utils::sg_to_plato(product->brew_aboil_sg) * (product->brew_aboil_volume / 1.04) * product->brew_aboil_sg * 10 / 1000;

mercurial