Added missing est_og3 database field load and save. Added all extra fields in update and insert product. Renamed est_og3Edit on tab 3 to est_og4Edit because est_og3Edit is reserved for the brewday tab.

Sat, 30 Apr 2022 20:36:30 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 30 Apr 2022 20:36:30 +0200
changeset 181
14a1f7bca79b
parent 180
bbf0f06a5e72
child 182
545d31130844

Added missing est_og3 database field load and save. Added all extra fields in update and insert product. Renamed est_og3Edit on tab 3 to est_og4Edit because est_og3Edit is reserved for the brewday tab.

src/EditProduct.cpp file | annotate | diff | comparison | revisions
src/EditProductTab3.cpp file | annotate | diff | comparison | revisions
ui/EditProduct.ui file | annotate | diff | comparison | revisions
--- a/src/EditProduct.cpp	Fri Apr 29 23:09:51 2022 +0200
+++ b/src/EditProduct.cpp	Sat Apr 30 20:36:30 2022 +0200
@@ -249,6 +249,7 @@
 	product->boil_time = query.value("boil_time").toDouble();
 	product->efficiency = query.value("efficiency").toDouble();
 	product->est_og = query.value("est_og").toDouble();
+	product->est_og3 = query.value("est_og3").toDouble();
 	product->est_fg = query.value("est_fg").toDouble();
 	product->est_abv = query.value("est_abv").toDouble();
 	product->est_color = query.value("est_color").toDouble();
@@ -633,7 +634,7 @@
 	product->eq_boil_time = product->boil_time = 60;
 	product->eq_boil_size = product->boil_size = product->batch_size + (round(product->batch_size * product->boil_time / 60.0) / 10.0);
 	product->type = 2;
-	product->est_og = product->est_fg = product->est_color = product->est_ibu = product->est_abv = 0;
+	product->est_og = product->est_og3 = product->est_fg = product->est_color = product->est_ibu = product->est_abv = 0;
 	product->brew_date_start = product->brew_date_end = QDateTime();
 	product->brew_mash_ph = product->brew_mash_sg = product->brew_mash_efficiency = 0;
 	product->brew_sparge_temperature = product->brew_sparge_volume = product->brew_sparge_est = product->brew_sparge_ph = 0;
@@ -788,7 +789,7 @@
     ui->est_ibu2Edit->setValue(product->est_ibu);
 
     // Tab yeasts.
-    ui->est_og3Edit->setValue(product->est_og);
+    ui->est_og4Edit->setValue(product->est_og);
     ui->est_fg3Edit->setValue(product->est_fg);
     ui->est_abv2Edit->setValue(product->est_abv);
 
@@ -1041,13 +1042,52 @@
 
     if (this->textIsChanged) {
     	if (this->recno == -1) {
-    	    query.prepare("INSERT INTO products SET locked=:locked, st_name=:st_name, st_letter=:st_letter, "
+    	    query.prepare("INSERT INTO products SET "
+		"name=:name, code=:code, birth=:birth, stage=:stage, notes=:notes, log_brew=:log_brew, "
+		"log_fermentation=:log_fermentation, log_ispindel=:log_ispindel, log_co2pressure=:log_co2pressure, "
+		"inventory_reduced=:inventory_reduced, locked=:locked, "
+		"eq_name=:eq_name, eq_boil_size=:eq_boil_size, eq_efficiency=:eq_efficiency, "
+                "eq_batch_size=:eq_batch_size, eq_tun_volume=:eq_tun_volume, eq_tun_weight=:eq_tun_weight, "
+                "eq_tun_specific_heat=:eq_tun_specific_heat, eq_tun_material=:eq_tun_material, eq_tun_height=:eq_tun_height, "
+                "eq_top_up_water=:eq_top_up_water, eq_trub_chiller_loss=:eq_chiller_loss, eq_evap_rate=:eq_evap_rate, "
+                "eq_boil_time=:eq_boil_time, eq_calc_boil_volume=:eq_calcboil, eq_top_up_kettle=:eq_top_up_kettle, "
+                "eq_hop_utilization=:eq_hopfactor, eq_notes=:eq_notes, eq_lauter_volume=:eq_lauter_volume, "
+                "eq_lauter_height=:eq_lauter_height, eq_lauter_deadspace=:eq_lauter_deadspace, eq_kettle_volume=:eq_kettle_volume, "
+                "eq_kettle_height=:eq_kettle_height, eq_mash_volume=:eq_mash_volume, eq_mash_max=:eq_mash_max, "
+		"brew_date_start=:brew_date_start, brew_mash_ph=:brew_mash_ph, brew_mash_sg=:brew_mash_sg, "
+		"brew_mash_efficiency=:brew_mash_efficiency, brew_sparge_temperature=:brew_sparge_temperature, "
+		"brew_sparge_volume=:brew_sparge_volume, brew_sparge_est=:brew_sparge_est, brew_sparge_ph=:brew_sparge_ph, "
+		"brew_preboil_volume=:brew_preboil_volume, brew_preboil_sg=:brew_preboil_sg, brew_preboil_ph=:brew_preboil_ph, "
+		"brew_preboil_efficiency=:brew_preboil_efficiency, brew_aboil_volume=:brew_aboil_volume, "
+		"brew_aboil_sg=:brew_aboil_sg, brew_aboil_ph:=brew_aboil_ph, brew_aboil_efficiency=:brew_aboil_efficiency, "
+		"brew_cooling_method=:brew_cooling_method, brew_cooling_time=:brew_cooling_time, brew_cooling_to=:brew_cooling_to, "
+		"brew_whirlpool9=:brew_whirlpool9, brew_whirlpool7=:brew_whirlpool7, brew_whirlpool6=:brew_whirlpool6, "
+		"brew_whirlpool2=:brew_whirlpool2, brew_fermenter_volume=:brew_fermenter_volume, "
+		"brew_fermenter_extrawater=:brew_fermenter_extrawater, brew_fermenter_tcloss=:brew_fermenter_tcloss, "
+		"brew_aeration_time=:brew_aeration_time, brew_aeration_speed=:brew_aeration_speed, "
+		"brew_aeration_type=:brew_aeration_type, brew_fermenter_sg=:brew_fermenter_sg, brew_fermenter_ibu=:brew_fermenter_ibu, "
+		"brew_fermenter_color=:brew_fermenter_color, brew_date_end=:brew_date_end, "
+		"og=:og, fg=:fg, primary_start_temp=:primary_start_temp, primary_max_temp=:primary_max_temp, "
+		"primary_end_temp=:primary_end_temp, primary_end_sg=:primary_end_sg, primary_end_date=:primary_end_date, "
+		"secondary_temp=:secondary_temp, secondary_end_sg=:secondary_end_sg, secondary_end_date=:secondary_end_date, "
+		"tertiary_temp=:tertiary_temp, package_date=:package_date, package_volume=:package_volume, "
+		"package_infuse_amount=:package_infuse_amount, package_infuse_abv=:package_infuse_abv, "
+		"package_infuse_notes=:package_infuse_notes, package_abv=:package_abv, package_ph=:package_ph, "
+		"bottle_amount=:bottle_amount, bottle_carbonation=:bottle_carbonation, bottle_priming_sugar=:bottle_priming_sugar, "
+		"bottle_priming_amount=:bottle_priming_amount, bottle_priming_water=:bottle_priming_water, "
+		"bottle_carbonation_temp=:bottle_carbonation_temp, keg_amount=:keg_amount, keg_carbonation=:keg_carbonation, "
+		"keg_priming_sugar=:keg_priming_sugar, keg_priming_amount=:keg_priming_amount, keg_priming_water=:keg_priming_water, "
+		"keg_carbonation_temp=:keg_carbonation_temp, keg_forced_carb=:keg_forced_carb, keg_pressure=:keg_pressure, "
+		"taste_notes=:taste_notes, taste_rate=:taste_rate, taste_date=:taste_date, taste_color=:taste_color, "
+		"taste_transparency=:taste_transparency, taste_head=:taste_head, taste_aroma=:taste_aroma, "
+		"taste_taste=:taste_taste, taste_mouthfeel=:taste_mouthfeel, taste_aftertaste=:taste_aftertaste, "
+		"st_name=:st_name, st_letter=:st_letter, "
 		"st_guide=:st_guide, st_category=:st_category, st_category_number=:st_catnr, st_type=:st_type, "
 		"st_og_min=:st_og_min, st_og_max=:st_og_max, st_fg_min=:st_fg_min, st_fg_max=:st_fg_max, "
 		"st_ibu_min=:st_ibu_min, st_ibu_max=:st_ibu_max, st_color_min=:st_color_min, st_color_max=:st_color_max, "
 		"st_carb_min=:st_carb_min, st_carb_max=:st_carb_max, st_abv_min=:st_abv_min, st_abv_max=:st_abv_max, "
-		"name=:name, notes=:notes, type=:type, batch_size=:batch_size, boil_size=:boil_size, "
-		"boil_time=:boil_time, efficiency=:efficiency, est_og=:est_og, est_fg=:est_fg, est_abv=:est_abv, "
+		"type=:type, batch_size=:batch_size, boil_size=:boil_size, "
+		"boil_time=:boil_time, efficiency=:efficiency, est_og=:est_og, est_og3=:est_og3, est_fg=:est_fg, est_abv=:est_abv, "
 		"est_color=:est_color, color_method=:color_method, est_ibu=:est_ibu, ibu_method=:ibu_method, "
 		"est_carb=:est_carb, sparge_temp=:sparge_temp, sparge_ph=:sparge_ph, "
 		"sparge_volume=:sparge_volume, sparge_source=:sparge_source, sparge_acid_type=:sparge_acid_type, "
@@ -1065,16 +1105,61 @@
 		"wb_calcium=:wb_calcium, wb_sulfate=:wb_sulfate, wb_chloride=:wb_chloride, wb_sodium=:wb_sodium, "
 		"wb_magnesium=:wb_magnesium, wb_total_alkalinity=:wb_total_alkalinity, wb_ph=:wb_ph, "
 		"wa_acid_name=:wa_acid_name, wa_acid_perc=:wa_acid_perc, wa_base_name=:wa_base_name, "
+		"starter_enable=:starter_enable, starter_type=:starter_type, starter_sg=:starter_sg, "
+		"starter_viability=:starter_viability, yeast_prod_date=:yeast_prod_date, yeast_pitchrate=:yeast_pitchrate, "
+		"prop1_type=:prop1_type, prop1_volume=:prop1_volume, prop2_type=:prop2_type, prop2_volume=:prop2_volume, "
+		"prop3_type=:prop3_type, prop3_volume=:prop3_volume, prop4_type=:prop4_type, prop4_volume=:prop4_volume, "
+		"divide_type=:divide_type, divide_size=:divide_size, divide_factor=:divide_factor, "
+		"divide_parts=:divide_parts, divide_part=:divide_part, "
 		"json_fermentables=:json_fermentables, json_hops=:json_hops, json_miscs=:json_miscs, "
 		"json_yeasts=:json_yeasts, json_mashs=:json_mashs, uuid=:uuid");
     	} else {
-	    query.prepare("UPDATE products SET locked=:locked, st_name=:st_name, st_letter=:st_letter, "
+	    query.prepare("UPDATE products SET "
+		"name=:name, code=:code, birth=:birth, stage=:stage, notes=:notes, log_brew=:log_brew, "
+                "log_fermentation=:log_fermentation, log_ispindel=:log_ispindel, log_co2pressure=:log_co2pressure, "
+                "inventory_reduced=:inventory_reduced, locked=:locked, "
+		"eq_name=:eq_name, eq_boil_size=:eq_boil_size, eq_efficiency=:eq_efficiency, "
+                "eq_batch_size=:eq_batch_size, eq_tun_volume=:eq_tun_volume, eq_tun_weight=:eq_tun_weight, "
+                "eq_tun_specific_heat=:eq_tun_specific_heat, eq_tun_material=:eq_tun_material, eq_tun_height=:eq_tun_height, "
+                "eq_top_up_water=:eq_top_up_water, eq_trub_chiller_loss=:eq_chiller_loss, eq_evap_rate=:eq_evap_rate, "
+                "eq_boil_time=:eq_boil_time, eq_calc_boil_volume=:eq_calcboil, eq_top_up_kettle=:eq_top_up_kettle, "
+                "eq_hop_utilization=:eq_hopfactor, eq_notes=:eq_notes, eq_lauter_volume=:eq_lauter_volume, "
+                "eq_lauter_height=:eq_lauter_height, eq_lauter_deadspace=:eq_lauter_deadspace, eq_kettle_volume=:eq_kettle_volume, "
+                "eq_kettle_height=:eq_kettle_height, eq_mash_volume=:eq_mash_volume, eq_mash_max=:eq_mash_max, "
+		"brew_date_start=:brew_date_start, brew_mash_ph=:brew_mash_ph, brew_mash_sg=:brew_mash_sg, "
+                "brew_mash_efficiency=:brew_mash_efficiency, brew_sparge_temperature=:brew_sparge_temperature, "
+                "brew_sparge_volume=:brew_sparge_volume, brew_sparge_est=:brew_sparge_est, brew_sparge_ph=:brew_sparge_ph, "
+                "brew_preboil_volume=:brew_preboil_volume, brew_preboil_sg=:brew_preboil_sg, brew_preboil_ph=:brew_preboil_ph, "
+                "brew_preboil_efficiency=:brew_preboil_efficiency, brew_aboil_volume=:brew_aboil_volume, "
+                "brew_aboil_sg=:brew_aboil_sg, brew_aboil_ph:=brew_aboil_ph, brew_aboil_efficiency=:brew_aboil_efficiency, "
+                "brew_cooling_method=:brew_cooling_method, brew_cooling_time=:brew_cooling_time, brew_cooling_to=:brew_cooling_to, "
+                "brew_whirlpool9=:brew_whirlpool9, brew_whirlpool7=:brew_whirlpool7, brew_whirlpool6=:brew_whirlpool6, "
+                "brew_whirlpool2=:brew_whirlpool2, brew_fermenter_volume=:brew_fermenter_volume, "
+                "brew_fermenter_extrawater=:brew_fermenter_extrawater, brew_fermenter_tcloss=:brew_fermenter_tcloss, "
+                "brew_aeration_time=:brew_aeration_time, brew_aeration_speed=:brew_aeration_speed, "
+                "brew_aeration_type=:brew_aeration_type, brew_fermenter_sg=:brew_fermenter_sg, brew_fermenter_ibu=:brew_fermenter_ibu, "
+                "brew_fermenter_color=:brew_fermenter_color, brew_date_end=:brew_date_end, "
+                "og=:og, fg=:fg, primary_start_temp=:primary_start_temp, primary_max_temp=:primary_max_temp, "
+                "primary_end_temp=:primary_end_temp, primary_end_sg=:primary_end_sg, primary_end_date=:primary_end_date, "
+                "secondary_temp=:secondary_temp, secondary_end_sg=:secondary_end_sg, secondary_end_date=:secondary_end_date, "
+                "tertiary_temp=:tertiary_temp, package_date=:package_date, package_volume=:package_volume, "
+                "package_infuse_amount=:package_infuse_amount, package_infuse_abv=:package_infuse_abv, "
+                "package_infuse_notes=:package_infuse_notes, package_abv=:package_abv, package_ph=:package_ph, "
+                "bottle_amount=:bottle_amount, bottle_carbonation=:bottle_carbonation, bottle_priming_sugar=:bottle_priming_sugar, "
+                "bottle_priming_amount=:bottle_priming_amount, bottle_priming_water=:bottle_priming_water, "
+                "bottle_carbonation_temp=:bottle_carbonation_temp, keg_amount=:keg_amount, keg_carbonation=:keg_carbonation, "
+                "keg_priming_sugar=:keg_priming_sugar, keg_priming_amount=:keg_priming_amount, keg_priming_water=:keg_priming_water, "
+                "keg_carbonation_temp=:keg_carbonation_temp, keg_forced_carb=:keg_forced_carb, keg_pressure=:keg_pressure, "
+                "taste_notes=:taste_notes, taste_rate=:taste_rate, taste_date=:taste_date, taste_color=:taste_color, "
+                "taste_transparency=:taste_transparency, taste_head=:taste_head, taste_aroma=:taste_aroma, "
+                "taste_taste=:taste_taste, taste_mouthfeel=:taste_mouthfeel, taste_aftertaste=:taste_aftertaste, "
+		"st_name=:st_name, st_letter=:st_letter, "
 		"st_guide=:st_guide, st_category=:st_category, st_category_number=:st_catnr, st_type=:st_type, "
                 "st_og_min=:st_og_min, st_og_max=:st_og_max, st_fg_min=:st_fg_min, st_fg_max=:st_fg_max, "
                 "st_ibu_min=:st_ibu_min, st_ibu_max=:st_ibu_max, st_color_min=:st_color_min, st_color_max=:st_color_max, "
                 "st_carb_min=:st_carb_min, st_carb_max=:st_carb_max, st_abv_min=:st_abv_min, st_abv_max=:st_abv_max, "
-                "name=:name, notes=:notes, type=:type, batch_size=:batch_size, boil_size=:boil_size, "
-		"boil_time=:boil_time, efficiency=:efficiency, est_og=:est_og, est_fg=:est_fg, est_abv=:est_abv, "
+                "type=:type, batch_size=:batch_size, boil_size=:boil_size, "
+		"boil_time=:boil_time, efficiency=:efficiency, est_og=:est_og, est_og3=:est_og3, est_fg=:est_fg, est_abv=:est_abv, "
                 "est_color=:est_color, color_method=:color_method, est_ibu=:est_ibu, ibu_method=:ibu_method, "
                 "est_carb=:est_carb, sparge_temp=:sparge_temp, sparge_ph=:sparge_ph, "
 		"sparge_volume=:sparge_volume, sparge_source=:sparge_source, sparge_acid_type=:sparge_acid_type, "
@@ -1092,10 +1177,126 @@
                 "wb_calcium=:wb_calcium, wb_sulfate=:wb_sulfate, wb_chloride=:wb_chloride, wb_sodium=:wb_sodium, "
                 "wb_magnesium=:wb_magnesium, wb_total_alkalinity=:wb_total_alkalinity, wb_ph=:wb_ph, "
                 "wa_acid_name=:wa_acid_name, wa_acid_perc=:wa_acid_perc, wa_base_name=:wa_base_name, "
+		"starter_enable=:starter_enable, starter_type=:starter_type, starter_sg=:starter_sg, "
+                "starter_viability=:starter_viability, yeast_prod_date=:yeast_prod_date, yeast_pitchrate=:yeast_pitchrate, "
+                "prop1_type=:prop1_type, prop1_volume=:prop1_volume, prop2_type=:prop2_type, prop2_volume=:prop2_volume, "
+                "prop3_type=:prop3_type, prop3_volume=:prop3_volume, prop4_type=:prop4_type, prop4_volume=:prop4_volume, "
+                "divide_type=:divide_type, divide_size=:divide_size, divide_factor=:divide_factor, "
+                "divide_parts=:divide_parts, divide_part=:divide_part, "
 		"json_fermentables=:json_fermentables, json_hops=:json_hops, json_miscs=:json_miscs, "
                 "json_yeasts=:json_yeasts, json_mashs=:json_mashs WHERE record = :recno");
     	}
+
+	query.bindValue(":name", product->name);
+	query.bindValue(":code", product->code);
+	query.bindValue(":birth", product->birth);
+	query.bindValue(":stage", product->stage);
+        query.bindValue(":notes", product->notes);
+	query.bindValue(":log_brew", product->log_brew ? 1:0);
+	query.bindValue(":log_fermentation", product->log_fermentation ? 1:0);
+	query.bindValue(":log_ispindel", product->log_ispindel ? 1:0);
+	query.bindValue(":log_co2pressure", product->log_co2pressure ? 1:0);
+	query.bindValue(":inventory_reduced", product->inventory_reduced);
 	query.bindValue(":locked", product->locked ? 1:0);
+	query.bindValue(":eq_name", product->eq_name);
+        query.bindValue(":eq_boil_size", round(product->eq_boil_size * 10) / 10);
+        query.bindValue(":eq_batch_size", round(product->eq_batch_size * 100) / 100);
+        query.bindValue(":eq_tun_volume", round(product->eq_tun_volume * 10) / 10);
+        query.bindValue(":eq_tun_weight", round(product->eq_tun_weight * 10) / 10);
+        query.bindValue(":eq_tun_specific_heat", round(product->eq_tun_specific_heat * 1000) / 1000);
+        query.bindValue(":eq_tun_material", product->eq_tun_material);
+        query.bindValue(":eq_tun_height", round(product->eq_tun_height * 1000) / 1000);
+        query.bindValue(":eq_top_up_water", round(product->eq_top_up_water * 10) / 10);
+        query.bindValue(":eq_chiller_loss", round(product->eq_trub_chiller_loss * 10) / 10);
+        query.bindValue(":eq_evap_rate", round(product->eq_evap_rate * 100) / 100);
+        query.bindValue(":eq_boil_time", round(product->eq_boil_time));
+        query.bindValue(":eq_calcboil", product->eq_calc_boil_volume ? 1:0);
+        query.bindValue(":eq_top_up_kettle", round(product->eq_top_up_kettle * 10) / 10);
+        query.bindValue(":eq_hopfactor", round(product->eq_hop_utilization));
+        query.bindValue(":eq_notes", product->eq_notes);
+        query.bindValue(":eq_lauter_volume", round(product->eq_lauter_volume * 10) / 10);
+        query.bindValue(":eq_lauter_height", round(product->eq_lauter_height * 1000) / 1000);
+        query.bindValue(":eq_lauter_deadspace", round(product->eq_lauter_deadspace * 10) / 10);
+        query.bindValue(":eq_kettle_volume", round(product->eq_kettle_volume * 10) / 10);
+        query.bindValue(":eq_kettle_height", round(product->eq_kettle_height * 1000) / 1000);
+        query.bindValue(":eq_mash_volume", round(product->eq_mash_volume * 10) / 10);
+        query.bindValue(":eq_mash_max", round(product->eq_mash_max * 10) / 10);
+        query.bindValue(":eq_efficiency", round(product->eq_efficiency * 10) / 10);
+	query.bindValue(":brew_date_start", product->brew_date_start);
+	query.bindValue(":brew_mash_ph", round(product->brew_mash_ph * 100) / 100);
+	query.bindValue(":brew_mash_sg", round(product->brew_mash_sg * 1000) / 1000);
+	query.bindValue(":brew_mash_efficiency", round(product->brew_mash_efficiency * 10) / 10);
+	query.bindValue(":brew_sparge_temperature", round(product->brew_sparge_temperature * 10) / 10);
+	query.bindValue(":brew_sparge_volume", round(product->brew_sparge_volume * 10) / 10);
+	query.bindValue(":brew_sparge_est", round(product->brew_sparge_est * 10) / 10);
+	query.bindValue(":brew_sparge_ph", round(product->brew_sparge_ph * 100) / 100);
+	query.bindValue(":brew_preboil_volume", round(product->brew_preboil_volume * 10) / 10);
+	query.bindValue(":brew_preboil_sg", round(product->brew_preboil_sg * 1000) / 1000);
+	query.bindValue(":brew_preboil_ph", round(product->brew_preboil_ph * 100) / 100);
+	query.bindValue(":brew_preboil_efficiency", round(product->brew_preboil_efficiency * 10) / 10);
+	query.bindValue(":brew_aboil_volume", round(product->brew_aboil_volume * 10) / 10);
+	query.bindValue(":brew_aboil_sg", round(product->brew_aboil_sg * 1000) / 1000);
+	query.bindValue(":brew_aboil_ph", round(product->brew_aboil_ph * 100) / 100);
+	query.bindValue(":brew_aboil_efficiency", round(product->brew_aboil_efficiency * 10) / 10);
+	query.bindValue(":brew_cooling_method", product->brew_cooling_method);
+	query.bindValue(":brew_cooling_time", round(product->brew_cooling_time * 10) / 10);
+	query.bindValue(":brew_cooling_to", round(product->brew_cooling_to * 10) / 10);
+	query.bindValue(":brew_whirlpool9", round(product->brew_whirlpool9));
+	query.bindValue(":brew_whirlpool7", round(product->brew_whirlpool7));
+	query.bindValue(":brew_whirlpool6", round(product->brew_whirlpool6));
+	query.bindValue(":brew_whirlpool2", round(product->brew_whirlpool2));
+	query.bindValue(":brew_fermenter_volume", round(product->brew_aboil_efficiency * 10) / 10);
+	query.bindValue(":brew_fermenter_extrawater", round(product->brew_aboil_efficiency * 10) / 10);
+	query.bindValue(":brew_fermenter_tcloss", round(product->brew_aboil_efficiency * 10) / 10);
+	query.bindValue(":brew_aeration_time", round(product->brew_aeration_time));
+	query.bindValue(":brew_aeration_speed", round(product->brew_aboil_efficiency * 10) / 10);
+	query.bindValue(":brew_aeration_type", product->brew_aeration_type);
+	query.bindValue(":brew_fermenter_sg", round(product->brew_aboil_efficiency * 1000) / 1000);
+	query.bindValue(":brew_fermenter_ibu", round(product->brew_aboil_efficiency * 10) / 10);
+	query.bindValue(":brew_fermenter_color", round(product->brew_aboil_efficiency * 10) / 10);
+	query.bindValue(":brew_date_end", product->brew_date_end);
+	query.bindValue(":og", round(product->og * 1000) / 1000);
+	query.bindValue(":fg", round(product->fg * 1000) / 1000);
+	query.bindValue(":primary_start_temp", round(product->primary_start_temp * 10) / 10);
+	query.bindValue(":primary_max_temp", round(product->primary_max_temp * 10) / 10);
+	query.bindValue(":primary_end_temp", round(product->primary_end_temp * 10) / 10);
+	query.bindValue(":primary_end_sg", round(product->primary_end_sg * 1000) / 1000);
+	query.bindValue(":primary_end_date", product->primary_end_date);
+	query.bindValue(":secondary_temp", round(product->secondary_temp * 10) / 10);
+	query.bindValue(":secondary_end_sg", round(product->secondary_end_sg * 1000) / 1000);
+	query.bindValue(":secondary_end_date", product->secondary_end_date);
+	query.bindValue(":tertiary_temp", round(product->tertiary_temp * 10) / 10);
+	query.bindValue(":package_date", product->package_date);
+	query.bindValue(":package_volume", round(product->package_volume * 10) / 10);
+	query.bindValue(":package_infuse_amount", round(product->package_infuse_amount * 10) / 10);
+	query.bindValue(":package_infuse_abv", round(product->package_infuse_abv * 100) / 100);
+	query.bindValue(":package_infuse_notes", product->package_infuse_notes);
+	query.bindValue(":package_abv", round(product->package_abv * 100) / 100);
+	query.bindValue(":package_ph", round(product->package_ph * 100) / 100);
+	query.bindValue(":bottle_amount", round(product->bottle_amount * 10) / 10);
+	query.bindValue(":bottle_carbonation", round(product->bottle_carbonation * 100) / 100);
+	query.bindValue(":bottle_priming_sugar", product->bottle_priming_sugar);
+	query.bindValue(":bottle_priming_amount", round(product->bottle_priming_amount * 10) / 10);
+	query.bindValue(":bottle_priming_water", round(product->bottle_priming_water * 1000) / 1000);
+	query.bindValue(":bottle_carbonation_temp", round(product->bottle_carbonation_temp * 10) / 10);
+	query.bindValue(":keg_amount", round(product->keg_amount * 10) / 10);
+	query.bindValue(":keg_carbonation", round(product->keg_carbonation * 100) / 100);
+	query.bindValue(":keg_priming_sugar", product->keg_priming_sugar);
+	query.bindValue(":keg_priming_amount", round(product->keg_priming_amount * 10) / 10);
+	query.bindValue(":keg_priming_water", round(product->keg_priming_water * 1000) / 1000);
+	query.bindValue(":keg_carbonation_temp", round(product->keg_carbonation_temp * 10) / 10);
+	query.bindValue(":keg_forced_carb", product->keg_forced_carb ? 1:0);
+	query.bindValue(":keg_pressure", round(product->keg_pressure * 10) / 10);
+	query.bindValue(":taste_notes", product->taste_notes);
+	query.bindValue(":taste_rate", round(product->taste_rate * 10) / 10);
+	query.bindValue(":taste_date", product->taste_date);
+	query.bindValue(":taste_color", product->taste_color);
+	query.bindValue(":taste_transparency", product->taste_transparency);
+	query.bindValue(":taste_head", product->taste_head);
+	query.bindValue(":taste_aroma", product->taste_aroma);
+	query.bindValue(":taste_taste", product->taste_taste);
+	query.bindValue(":taste_mouthfeel", product->taste_mouthfeel);
+	query.bindValue(":taste_aftertaste", product->taste_aftertaste);
 	query.bindValue(":st_name", product->st_name);
 	query.bindValue(":st_letter", product->st_letter);
 	query.bindValue(":st_guide", product->st_guide);
@@ -1114,14 +1315,13 @@
         query.bindValue(":st_carb_max", round(product->st_carb_max * 10) / 10);
 	query.bindValue(":st_abv_min", round(product->st_abv_min * 10) / 10);
         query.bindValue(":st_abv_max", round(product->st_abv_max * 10) / 10);
-	query.bindValue(":name", product->name);
-	query.bindValue(":notes", product->notes);
 	query.bindValue(":type", product->type);
 	query.bindValue(":batch_size", round(product->batch_size * 10) / 10);
 	query.bindValue(":boil_size", round(product->boil_size * 10) / 10);
 	query.bindValue(":boil_time", round(product->boil_time * 10) / 10);
 	query.bindValue(":efficiency", round(product->efficiency * 10) / 10);
 	query.bindValue(":est_og", round(product->est_og * 1000) / 1000);
+	query.bindValue(":est_og3", round(product->est_og3 * 1000) / 1000);
 	query.bindValue(":est_fg", round(product->est_fg * 1000) / 1000);
 	query.bindValue(":est_abv", round(product->est_abv * 10) / 10);
 	query.bindValue(":est_color", round(product->est_color * 10) / 10);
@@ -1177,6 +1377,25 @@
 	query.bindValue(":wa_acid_name", product->wa_acid_name);
 	query.bindValue(":wa_acid_perc", round(product->wa_acid_perc * 10) / 10);
 	query.bindValue(":wa_base_name", product->wa_base_name);
+	query.bindValue(":starter_enable", product->starter_enable ? 1:0);
+	query.bindValue(":starter_type", product->starter_type);
+	query.bindValue(":starter_sg", round(product->starter_sg * 1000) / 1000);
+	query.bindValue(":starter_viability", product->starter_viability);
+	query.bindValue(":yeast_prod_date", product->yeast_prod_date);
+	query.bindValue(":yeast_pitchrate", round(product->yeast_pitchrate * 1000) / 1000);
+	query.bindValue(":prop1_type", product->prop1_type);
+	query.bindValue(":prop1_volume", round(product->prop1_volume * 1000) / 1000);
+	query.bindValue(":prop2_type", product->prop2_type);
+	query.bindValue(":prop2_volume", round(product->prop2_volume * 1000) / 1000);
+	query.bindValue(":prop3_type", product->prop3_type);
+	query.bindValue(":prop3_volume", round(product->prop3_volume * 1000) / 1000);
+	query.bindValue(":prop4_type", product->prop4_type);
+	query.bindValue(":prop4_volume", round(product->prop4_volume * 1000) / 1000);
+	query.bindValue(":divide_type", product->divide_type);
+	query.bindValue(":divide_size", round(product->divide_size * 10) / 10);
+	query.bindValue(":divide_factor", round(product->divide_factor * 100) / 100);
+	query.bindValue(":divide_parts", product->divide_parts);
+	query.bindValue(":divide_part", product->divide_part);
 
 	if (product->fermentables.size() == 0) {
 	    query.bindValue(":json_fermentables", "[]");
--- a/src/EditProductTab3.cpp	Fri Apr 29 23:09:51 2022 +0200
+++ b/src/EditProductTab3.cpp	Sat Apr 30 20:36:30 2022 +0200
@@ -196,7 +196,7 @@
 	product->est_og = 0.980;
     	ui->est_ogEdit->setValue(0.980);
     	ui->est_og2Edit->setValue(0.980);
-    	ui->est_og3Edit->setValue(0.980);
+    	ui->est_og4Edit->setValue(0.980);
     	ui->est_ogShow->setValue(0.980);
     	product->est_color = 0;
     	ui->est_colorEdit->setValue(0);
@@ -267,7 +267,7 @@
     product->est_og = og;
     ui->est_ogEdit->setValue(og);
     ui->est_og2Edit->setValue(og);
-    ui->est_og3Edit->setValue(og);
+    ui->est_og4Edit->setValue(og);
     ui->est_ogShow->setValue(og);
 
     product->preboil_sg = Utils::estimate_sg(sugarsm, product->boil_size);
--- a/ui/EditProduct.ui	Fri Apr 29 23:09:51 2022 +0200
+++ b/ui/EditProduct.ui	Sat Apr 30 20:36:30 2022 +0200
@@ -2704,7 +2704,7 @@
        <attribute name="title">
         <string>Yeasts</string>
        </attribute>
-       <widget class="QLabel" name="est_og3Label">
+       <widget class="QLabel" name="est_og4Label">
         <property name="geometry">
          <rect>
           <x>50</x>
@@ -2720,7 +2720,7 @@
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
         </property>
        </widget>
-       <widget class="QDoubleSpinBox" name="est_og3Edit">
+       <widget class="QDoubleSpinBox" name="est_og4Edit">
         <property name="geometry">
          <rect>
           <x>190</x>

mercurial