src/EditProductTab3.cpp

changeset 284
33bb98c33e6a
parent 283
242a68fa7186
child 301
fe6346211b5b
--- a/src/EditProductTab3.cpp	Mon Jun 13 16:47:52 2022 +0200
+++ b/src/EditProductTab3.cpp	Mon Jun 13 17:34:51 2022 +0200
@@ -398,20 +398,20 @@
     product->yeasts_ok = true;
     if (product->yeasts.size() > 0) {
         for (i = 0; i < product->yeasts.size(); i++) {
-	    if (product->yeasts.at(i).y_use == 0) {		// Used in primary
-		if (product->yeasts.at(i).y_attenuation > svg)
-		    svg = product->yeasts.at(i).y_attenuation;	// Take the highest if multiple yeasts.
+	    if (product->yeasts.at(i).use == 0) {		// Used in primary
+		if (product->yeasts.at(i).attenuation > svg)
+		    svg = product->yeasts.at(i).attenuation;	// Take the highest if multiple yeasts.
 	    }
-	    if (product->yeasts.at(i).y_form == 0)
-		initcells += (product->yeasts.at(i).y_cells / 1000000000) * product->yeasts.at(i).y_amount * (product->starter_viability / 100);
+	    if (product->yeasts.at(i).form == 0)
+		initcells += (product->yeasts.at(i).cells / 1000000000) * product->yeasts.at(i).amount * (product->starter_viability / 100);
 	    else
-		initcells += (product->yeasts.at(i).y_cells / 1000000) * product->yeasts.at(i).y_amount * (product->starter_viability / 100);
+		initcells += (product->yeasts.at(i).cells / 1000000) * product->yeasts.at(i).amount * (product->starter_viability / 100);
 	    // TODO: brett or others in secondary.
-	    if ((((product->inventory_reduced <= PROD_STAGE_PRIMARY)   && (product->yeasts.at(i).y_use == 0)) ||  // Primary
-        	 ((product->inventory_reduced <= PROD_STAGE_SECONDARY) && (product->yeasts.at(i).y_use == 1)) ||  // Secondary
-        	 ((product->inventory_reduced <= PROD_STAGE_TERTIARY)  && (product->yeasts.at(i).y_use == 2)) ||  // Tertiary
-        	 ((product->inventory_reduced <= PROD_STAGE_PACKAGE)   && (product->yeasts.at(i).y_use == 3))) && // Bottle
-        	  (product->yeasts.at(i).y_inventory < product->yeasts.at(i).y_amount)) {
+	    if ((((product->inventory_reduced <= PROD_STAGE_PRIMARY)   && (product->yeasts.at(i).use == 0)) ||  // Primary
+        	 ((product->inventory_reduced <= PROD_STAGE_SECONDARY) && (product->yeasts.at(i).use == 1)) ||  // Secondary
+        	 ((product->inventory_reduced <= PROD_STAGE_TERTIARY)  && (product->yeasts.at(i).use == 2)) ||  // Tertiary
+        	 ((product->inventory_reduced <= PROD_STAGE_PACKAGE)   && (product->yeasts.at(i).use == 3))) && // Bottle
+        	  (product->yeasts.at(i).inventory < product->yeasts.at(i).amount)) {
 		product->yeasts_ok = false;
 	    }
 	}

mercurial