# HG changeset patch # User Michiel Broek # Date 1659383397 -7200 # Node ID 2e30c9c20d22df9c7cd7dd8f07736754d7bf1ab2 # Parent 09af9f46518fa3a05e002a44d3ce152cae9118c6 Added reports, total production, fermentations and efficiency. diff -r 09af9f46518f -r 2e30c9c20d22 src/MainWindow.cpp --- a/src/MainWindow.cpp Mon Aug 01 13:05:23 2022 +0200 +++ b/src/MainWindow.cpp Mon Aug 01 21:49:57 2022 +0200 @@ -793,6 +793,24 @@ } +void MainWindow::on_actionRep_Production_triggered() +{ + PrinterDialog(PR_REP_TOTAL, -1, this); +} + + +void MainWindow::on_actionRep_Efficiency_triggered() +{ + PrinterDialog(PR_REP_EFF, -1, this); +} + + +void MainWindow::on_actionRep_Fermentation_triggered() +{ + PrinterDialog(PR_REP_SVG, -1, this); +} + + void MainWindow::fromProfileWaters() { ui->mainStack->setCurrentIndex(-1); diff -r 09af9f46518f -r 2e30c9c20d22 src/MainWindow.h --- a/src/MainWindow.h Mon Aug 01 13:05:23 2022 +0200 +++ b/src/MainWindow.h Mon Aug 01 21:49:57 2022 +0200 @@ -149,6 +149,9 @@ void on_actionMon_CO2meters_triggered(); void on_actionMon_iSpindels_triggered(); void on_actionProd_inprod_triggered(); + void on_actionRep_Production_triggered(); + void on_actionRep_Efficiency_triggered(); + void on_actionRep_Fermentation_triggered(); void on_actionOn_Name_triggered(); void on_actionOn_Code_triggered(); void on_actionOn_Date_triggered(); diff -r 09af9f46518f -r 2e30c9c20d22 src/PrinterDialog.cpp --- a/src/PrinterDialog.cpp Mon Aug 01 13:05:23 2022 +0200 +++ b/src/PrinterDialog.cpp Mon Aug 01 21:49:57 2022 +0200 @@ -2141,6 +2141,231 @@ } } } + } else if (p_job == PR_REP_TOTAL) { + + qInfo() << "Print total production"; + printHeader(&painter); + y = 120; + + /* Report header */ + painter.setFont(QFont("Helvetica", 9, QFont::Bold)); + painter.setPen(Qt::black); + painter.fillRect( 20, y, 540, 20, c_header); + painter.drawText( 20, y+4, 80, 20, Qt::AlignHCenter, tr("Number")); + painter.drawText(100, y+4, 80, 20, Qt::AlignHCenter, tr("Year")); + painter.drawText(180, y+4, 120, 20, Qt::AlignRight, tr("Brew sessions")); + painter.drawText(300, y+4, 120, 20, Qt::AlignRight, tr("Brew volume")); + painter.drawText(420, y+4, 120, 20, Qt::AlignRight, tr("Average volume")); + y += 20; + painter.setFont(QFont("Helvetica", 9, QFont::Normal)); + query.exec("SELECT DISTINCT YEAR(package_date) FROM products WHERE package_date ORDER BY package_date"); + query.first(); + int regel = 0, brews = 0, total = 0; + double packaged = 0, tvolume = 0, average; + QString year = ""; + for (int i = 0 ; i < query.size() ; i++ ) { + if ((y + 20) > painter.device()->height()) { + printer->newPage(); + printHeader(&painter); + y = 120; + } + + brews = 0; + packaged = 0; + regel++; + year = query.value(0).toString(); + QSqlQuery query2; + query2.exec("SELECT package_volume FROM products WHERE package_date AND YEAR(package_date) = '" + year + "'"); + while (query2.next()) { + brews++; + total++; + packaged += query2.value(0).toDouble(); + tvolume += query2.value(0).toDouble(); + } + average = packaged / brews; + painter.fillRect( 20, y, 540, 20, (i % 2) ? c_line1:c_line2); + painter.drawText( 20, y+4, 80, 20, Qt::AlignCenter, QString("%1").arg(regel)); + painter.drawText(100, y+4, 100, 20, Qt::AlignCenter, year); + painter.drawText(180, y+4, 120, 20, Qt::AlignRight, QString("%1").arg(brews)); + painter.drawText(300, y+4, 120, 20, Qt::AlignRight, QString("%1 L").arg(packaged, 2, 'f', 1, '0')); + painter.drawText(420, y+4, 120, 20, Qt::AlignRight, QString("%1 L").arg(average, 2, 'f', 1, '0')); + query.next(); + y += 20; + } + average = tvolume / total; + painter.fillRect(180, y, 360, 20, w_line); + painter.drawText(180, y+4, 120, 20, Qt::AlignRight, QString("%1").arg(total)); + painter.drawText(300, y+4, 120, 20, Qt::AlignRight, QString("%1 L").arg(tvolume, 2, 'f', 1, '0')); + painter.drawText(420, y+4, 120, 20, Qt::AlignRight, QString("%1 L").arg(average, 2, 'f', 1, '0')); + y += 20; + + } else if (p_job == PR_REP_EFF) { + + qInfo() << "Print efficiency"; + y = painter.device()->height() + 100; + + query.exec("SELECT * FROM products WHERE package_date AND type='2' ORDER BY code"); + query.first(); + for (int i = 0 ; i < query.size() ; i++ ) { + if ((y + 20) > painter.device()->height()) { + if (i > 0) + printer->newPage(); + printHeader(&painter); + y = 120; + + /* Report header */ + painter.setFont(QFont("Helvetica", 9, QFont::Bold)); + painter.setPen(Qt::black); + painter.fillRect( 20, y, 715, 20, c_header); + painter.drawText( 25, y+4, 65, 20, Qt::AlignLeft, tr("Code")); + painter.drawText( 90, y+4, 200, 20, Qt::AlignLeft, tr("Name")); + painter.drawText(290, y+4, 120, 20, Qt::AlignLeft, tr("Beer style")); + painter.drawText(410, y+4, 80, 20, Qt::AlignRight, tr("Max extract")); + painter.drawText(490, y+4, 80, 20, Qt::AlignRight, tr("Mash eff.")); + painter.drawText(570, y+4, 80, 20, Qt::AlignRight, tr("Sparge eff")); + painter.drawText(650, y+4, 80, 20, Qt::AlignRight, tr("Boil eff")); + y += 20; + painter.setFont(QFont("Helvetica", 9, QFont::Normal)); + } + + /* + * Data is not always available, calculate the missing pieces. + */ + double mvol = 0, msugars = 0, ssugars = 0; + QJsonParseError parseError; + + const auto& ma_json = query.value("json_mashs").toString().trimmed(); + if (!ma_json.trimmed().isEmpty()) { + const auto& formattedJson = QString("%1").arg(ma_json); + QJsonDocument mashs = QJsonDocument::fromJson(formattedJson.toUtf8(), &parseError); + if (parseError.error != QJsonParseError::NoError) { + qWarning() << "Parse error: " << parseError.errorString() << "at" << parseError.offset ; + } else if (mashs.isArray()) { + for (int j = 0; j < mashs.array().size(); j++) { + QJsonObject obj = mashs.array().at(j).toObject(); + if (obj["step_type"].toInt() == 0) + mvol += obj["step_infuse_amount"].toDouble(); + } + } + } + + const auto& f_json = query.value("json_fermentables").toString(); + if (!f_json.trimmed().isEmpty()) { + const auto& formattedJson = QString("%1").arg(f_json); + QJsonDocument fermentables = QJsonDocument::fromJson(formattedJson.toUtf8(), &parseError); + if (parseError.error != QJsonParseError::NoError) { + qWarning() << "Parse error: " << parseError.errorString() << "at" << parseError.offset ; + } else if (fermentables.isArray()) { + for (int j = 0; j < fermentables.array().size(); j++) { + QJsonObject obj = fermentables.array().at(j).toObject(); + if (obj["f_added"].toInt() == 0) { + double d = obj["f_amount"].toDouble() * (obj["f_yield"].toDouble() / 100) * (1 - obj["f_moisture"].toDouble() / 100); + ssugars += obj["f_amount"].toDouble(); + mvol += obj["f_amount"].toDouble() * obj["f_moisture"].toDouble() / 100; + msugars += d; + } + } + } + } + + double sugardensity = 1.611; + double v = msugars / sugardensity + mvol; + double plato = 1000 * msugars / (v * 10); // deg. Plato + double mash_efficiency = query.value("brew_mash_efficiency").toDouble(); + double mash_sg = query.value("brew_mash_sg").toDouble(); + if ((mash_efficiency == 0) && (mash_sg > 1)) { + mash_efficiency = 100 * Utils::sg_to_plato(mash_sg) / plato; + } + double mash_extract = 100 * msugars / ssugars; + double preboil_sg = query.value("brew_preboil_sg").toDouble(); + double preboil_volume = query.value("brew_preboil_volume").toDouble(); + double est_preboil_plato = Utils::sg_to_plato(preboil_sg) * (preboil_volume / 1.04) * preboil_sg * 10 / 1000; + double preboil_efficiency = query.value("brew_preboil_efficiency").toDouble(); + if ((msugars > 0) && (preboil_efficiency == 0)) + preboil_efficiency = est_preboil_plato / msugars * 100; + if (preboil_efficiency < 0) + preboil_efficiency = 0; + double aboil_efficiency = query.value("brew_aboil_efficiency").toDouble(); + + painter.fillRect( 20, y, 715, 20, (i % 2) ? c_line1:c_line2); + painter.drawText( 25, y+4, 65, 20, Qt::AlignLeft, query.value("code").toString()); + painter.drawText( 90, y+4, 200, 20, Qt::AlignLeft, query.value("name").toString()); + painter.drawText(290, y+4, 120, 20, Qt::AlignLeft, query.value("st_name").toString()); + painter.drawText(410, y+4, 80, 20, Qt::AlignRight, QString("%1%").arg(mash_extract, 2, 'f', 1, '0')); + painter.drawText(490, y+4, 80, 20, Qt::AlignRight, QString("%1%").arg(mash_efficiency, 2, 'f', 1, '0')); + painter.drawText(570, y+4, 80, 20, Qt::AlignRight, QString("%1%").arg(preboil_efficiency, 2, 'f', 1, '0')); + painter.drawText(650, y+4, 80, 20, Qt::AlignRight, QString("%1%").arg(aboil_efficiency, 2, 'f', 1, '0')); + query.next(); + y += 20; + } + + } else if (p_job == PR_REP_SVG) { + + qInfo() << "Print fermentations"; + y = painter.device()->height() + 100; + QString y_name, y_lab, y_product; + + /* + * Works from MariaDB 10.6.x and later, MySQL 8.x and later. + * Pick the first yeast record, that should be the one used for primary. + */ + query.exec("SELECT code,name,brew_date_end,primary_end_temp,primary_end_date,secondary_temp,secondary_end_date,tertiary_temp," + "package_date,brew_fermenter_sg,fg,json_yeasts," + "JSON_EXTRACT(json_yeasts, '$[0].y_laboratory') AS yeastLab,JSON_EXTRACT(json_yeasts, '$[0].y_product_id') AS yeastID " + "FROM products WHERE package_date AND type='2' ORDER BY yeastID"); + query.first(); + + for (int i = 0 ; i < query.size() ; i++ ) { + if ((y + 20) > painter.device()->height()) { + if (i > 0) + printer->newPage(); + printHeader(&painter); + y = 120; + + /* Report header */ + painter.setFont(QFont("Helvetica", 9, QFont::Bold)); + painter.setPen(Qt::black); + painter.fillRect( 20, y, 715, 20, c_header); + painter.drawText( 25, y+4, 65, 20, Qt::AlignLeft, tr("Code")); + painter.drawText( 90, y+4, 180, 20, Qt::AlignLeft, tr("Name")); + painter.drawText(270, y+4, 110, 20, Qt::AlignLeft, tr("Yeast")); + painter.drawText(380, y+4, 60, 20, Qt::AlignHCenter, tr("Primary")); + painter.drawText(440, y+4, 60, 20, Qt::AlignHCenter, tr("Secondary")); + painter.drawText(500, y+4, 60, 20, Qt::AlignHCenter, tr("Tertiary")); + painter.drawText(560, y+4, 40, 20, Qt::AlignRight, tr("Days")); + painter.drawText(600, y+4, 40, 20, Qt::AlignRight, tr("OG")); + painter.drawText(640, y+4, 40, 20, Qt::AlignRight, tr("FG")); + painter.drawText(680, y+4, 50, 20, Qt::AlignRight, tr("AA")); + y += 20; + painter.setFont(QFont("Helvetica", 9, QFont::Normal)); + } + + int primary = query.value("brew_date_end").toDate().daysTo(query.value("primary_end_date").toDate()); + int secondary = query.value("primary_end_date").toDate().daysTo(query.value("secondary_end_date").toDate()); + int tertiary = query.value("secondary_end_date").toDate().daysTo(query.value("package_date").toDate()); + int total = query.value("brew_date_end").toDate().daysTo(query.value("package_date").toDate()); + double og = query.value("brew_fermenter_sg").toDouble(); + double fg = query.value("fg").toDouble(); + double aa = Utils::calc_svg(og, fg); + + painter.fillRect( 20, y, 715, 20, (i % 2) ? c_line1:c_line2); + painter.drawText( 25, y+4, 65, 20, Qt::AlignLeft, query.value("code").toString()); + painter.drawText( 90, y+4, 180, 20, Qt::AlignLeft, query.value("name").toString()); + painter.drawText(270, y+4, 110, 20, Qt::AlignLeft, query.value("yeastID").toString() + " " + query.value("yeastLab").toString()); + painter.drawText(380, y+4, 40, 20, Qt::AlignRight, QString("%1°").arg(query.value("primary_end_temp").toDouble(), 2, 'f', 1)); + painter.drawText(420, y+4, 20, 20, Qt::AlignRight, QString("%1").arg(primary)); + painter.drawText(440, y+4, 40, 20, Qt::AlignRight, QString("%1°").arg(query.value("secondary_temp").toDouble(), 2, 'f', 1)); + painter.drawText(480, y+4, 20, 20, Qt::AlignRight, QString("%1").arg(secondary)); + painter.drawText(500, y+4, 40, 20, Qt::AlignRight, QString("%1°").arg(query.value("tertiary_temp").toDouble(), 2, 'f', 1)); + painter.drawText(540, y+4, 20, 20, Qt::AlignRight, QString("%1").arg(tertiary)); + painter.drawText(560, y+4, 40, 20, Qt::AlignRight, QString("%1").arg(total)); + painter.drawText(600, y+4, 40, 20, Qt::AlignRight, QString("%1").arg(og, 4, 'f', 3, '0')); + painter.drawText(640, y+4, 40, 20, Qt::AlignRight, QString("%1").arg(fg, 4, 'f', 3, '0')); + painter.drawText(680, y+4, 50, 20, Qt::AlignRight, QString("%1%").arg(aa, 2, 'f', 1, '0')); + + query.next(); + y += 20; + } } painter.end(); @@ -2232,6 +2457,12 @@ painter->drawText(140, 0, 500, 40, Qt::AlignLeft, recipe->name); } else if (p_job == PR_PRODUCT || p_job == PR_CHECKLIST) { painter->drawText(140, 0, 500, 40, Qt::AlignLeft, product->code + " " + product->name); + } else if (p_job == PR_REP_TOTAL) { + painter->drawText(140, 0, 500, 40, Qt::AlignLeft, tr("Year production") + " " + my_brewery_name); + } else if (p_job == PR_REP_EFF) { + painter->drawText(140, 0, 500, 40, Qt::AlignLeft, tr("Brew efficiency") + " " + my_brewery_name); + } else if (p_job == PR_REP_SVG) { + painter->drawText(140, 0, 500, 40, Qt::AlignLeft, tr("Fermentations") + " " + my_brewery_name); } else { painter->drawText(140, 0, 500, 40, Qt::AlignLeft, "?? " + my_brewery_name); } diff -r 09af9f46518f -r 2e30c9c20d22 src/PrinterDialog.h --- a/src/PrinterDialog.h Mon Aug 01 13:05:23 2022 +0200 +++ b/src/PrinterDialog.h Mon Aug 01 21:49:57 2022 +0200 @@ -6,7 +6,7 @@ #include -enum JobType { PR_SUPPLIES, PR_YEASTBANK, PR_RECIPE, PR_PRODUCT, PR_CHECKLIST }; +enum JobType { PR_SUPPLIES, PR_YEASTBANK, PR_RECIPE, PR_PRODUCT, PR_CHECKLIST, PR_REP_TOTAL, PR_REP_EFF, PR_REP_SVG }; namespace Ui { class PrinterDialog; diff -r 09af9f46518f -r 2e30c9c20d22 translations/bmsapp_en.ts --- a/translations/bmsapp_en.ts Mon Aug 01 13:05:23 2022 +0200 +++ b/translations/bmsapp_en.ts Mon Aug 01 21:49:57 2022 +0200 @@ -1109,6 +1109,11 @@ + + Clone + + + Stainless Steel @@ -1129,46 +1134,58 @@ - + BMSapp - Add new equipment - + BMSapp - Edit equipment %1 - + Edit Equipment - + Name empty or too short. - - + + + Database error - - + + + MySQL error: %1 %2 %3 - + + Delete equipment + + + + + Delete %1 + + + + Equipment changed - + This equipment has been modified. Save changes? @@ -1418,6 +1435,11 @@ + + Clone + + + Grain @@ -1508,58 +1530,70 @@ - + BMSapp - Add new fermentable - + BMSapp - Edit fermentable %1 - - - + + + Edit Fermentable - + Name empty or too short. - + Origin empty or too short. - + Supplier empty or too short. - - + + + Database error - - + + + MySQL error: %1 %2 %3 - + + Delete fermentable + + + + + Delete %1 + + + + Fermentable changed - + This fermentable has been modified. Save changes? @@ -1789,54 +1823,64 @@ - + BMSapp - Add new hop - + BMSapp - Edit hop %1 - - + + Edit Hop - + Name empty or too short. - + Origin empty or too short. + + + + Database error + + + - - - Database error - - - - - - + + MySQL error: %1 %2 %3 - + + Delete hop + + + + + Delete %1 + + + + Hop changed - + This hop has been modified. Save changes? @@ -1895,7 +1939,7 @@ - + gr @@ -1991,6 +2035,11 @@ + + Clone + + + Spice @@ -2056,51 +2105,63 @@ - + BMSapp - Add new misc ingredient - + BMSapp - Edit misc ingredient %1 - + Edit Misc - + Name empty or too short. + + + + Database error + + + - - Database error - - - - - + + MySQL error: %1 %2 %3 - + + Delete misc + + + + + Delete %1 + + + + ml - + Misc changed - + The ingredient has been modified. Save changes? @@ -2133,7 +2194,7 @@ - + Delete @@ -2267,8 +2328,8 @@ - - + + L @@ -2545,7 +2606,7 @@ - + Add @@ -3424,7 +3485,7 @@ - + After boil @@ -4482,7 +4543,7 @@ - + Save File @@ -4497,198 +4558,198 @@ - + XML export ready - - - - + + + + Copy Product - + Copy Product export ready. - + Copy Product error. - + Copy Product to Recipe ready. - + Copy Product to Recipe error. - - + + Export to forum - + The recipe and all data are copied to the clipboard. You can "paste" this data in the forum screen in your web browser. - + Add a splitted batch - + Choose split moment in the brew process - + Delete the last splitted batch - + The read-only `product code` of the batch - + Batch name, click to change the name - + Batch size, click to change the volume - - + + Split product - + Product name: - + Product code: - + Available volume: - + Current brew stage: - + Split at moment: - - Not divided - - - - - After mash - - - - After cooling + Not divided - After primary - - - - - After secondary + After mash + After cooling + + + + + After primary + + + + + After secondary + + + + After tertiary - + Volume remaining: - + Split code - + Split name - + Split volume - + Export choices - + Export to beerXML - + Copy to product - + Copy to recipe - + Split this batch - + Printer report - + Print recipe - + Print checklist @@ -4808,7 +4869,7 @@ - + Delete @@ -4849,16 +4910,21 @@ + + Clone + + + - + Beer - + Fridge @@ -4898,46 +4964,58 @@ - + BMSapp - Add new fermentation profile - + BMSapp - Edit fermentation profile %1 - + Edit Ferment - + Name empty or too short. + + + + Database error + + + - - Database error - - - - - + + MySQL error: %1 %2 %3 - + + Delete fermentation profile + + + + + Delete %1 + + + + Fermentation changed - + This fermentation profile has been modified. Save changes? @@ -4982,7 +5060,7 @@ - + Delete @@ -5002,6 +5080,11 @@ + + Clone + + + Step name @@ -5038,63 +5121,75 @@ - + Infusion - + Temperature - + Decoction - + BMSapp - Add new mash profile - + BMSapp - Edit mash profile %1 - + Edit Mash - + Name empty or too short. + + + + Database error + + + - - Database error - - - - - + + MySQL error: %1 %2 %3 - + + Delete mash profile + + + + + Delete %1 + + + + Mash changed - + This mash profile has been modified. Save changes? @@ -5399,6 +5494,11 @@ + + Clone + + + Sulfate (SO4) mg/L: @@ -5419,46 +5519,58 @@ - + BMSapp - Add new brewing water - + BMSapp - Edit brewing water %1 - + Edit Water - + Name empty or too short. + + + + Database error + + + - - Database error - - - - - + + MySQL error: %1 %2 %3 - + + Delete water profile + + + + + Delete %1 + + + + Water changed - + This water profile has been modified. Save changes? @@ -6881,7 +6993,7 @@ - + Save File @@ -6896,67 +7008,67 @@ - + XML export ready - - - - + + + + Copy Recipe - + Copy Recipe export ready. - + Copy Recipe error. - + Copy Recipe to Product ready. - + Copy Recipe to Product error. - - + + Export to forum - + The recipe and all data are copied to the clipboard. You can "paste" this data in the forum screen in your web browser. - + Export choices - + Export to beerXML - + Copy to recipe - + Copy to product @@ -7216,6 +7328,11 @@ + + Clone + + + Unlimited stock: @@ -7251,46 +7368,58 @@ - + BMSapp - Add new brewing water - + BMSapp - Edit brewing water %1 - + Edit Water - + Name empty or too short. + + + + Database error + + + - - Database error - - - - - + + MySQL error: %1 %2 %3 - + + Delete water + + + + + Delete %1 + + + + Water changed - + The brewing water has been modified. Save changes? @@ -7469,7 +7598,7 @@ - + Billion cells/gram: @@ -7555,6 +7684,11 @@ + + Clone + + + Lager @@ -7650,92 +7784,104 @@ + + Price per pack: + + + - Price per pack: + Inventory Packs: - Inventory Packs: - - - - Billion cells/pack: + + Price per Kg: + + + - Price per Kg: - - - - Inventory gram: + + Price per litre: + + + - Price per litre: + Inventory ml: - Inventory ml: - - - - Billion cells/ml: - + BMSapp - Add new yeast - + BMSapp - Edit yeast %1 - - + + Edit Yeast - + Name empty or too short. - + Laboratory empty or too short. + + + + Database error + + + - - Database error - - - - - + + MySQL error: %1 %2 %3 - + + Delete yeast + + + + + Delete %1 + + + + Yeast changed - + The yeast has been modified. Save changes? @@ -8225,7 +8371,7 @@ - + Save File @@ -8240,7 +8386,7 @@ - + XML export ready @@ -8601,172 +8747,192 @@ - + Archive - - + + Recipes - + Exit - + About - + Fermenters - + iSpindels - + Suppliers - + + Reports + + + + Fermentables - + Hops - + Yeasts - + Miscs - + Waters - + Equipments - + Supplies list - + Yeast bank - + Water profiles - + Mash schedules - + Beer styles - + Fermentation schedules - + Global settings - + Import beerxml - + In Production - + On Name - + On Code - + On Date - + On Beerstyle - + Import beerXML - + dummy - + hh - + hj - + ll - - + + Nodes - + Carbonation + + + Total Production + + + + + Efficiency + + + + + Fermentation + + ManoMeter @@ -9161,6 +9327,7 @@ + Yeast @@ -10328,34 +10495,142 @@ - + + Number + + + + + Year + + + + + Brew sessions + + + + + Brew volume + + + + + Average volume + + + + + + Code + + + + + + Name + + + + + Max extract + + + + + Mash eff. + + + + + Sparge eff + + + + + Boil eff + + + + + Primary + + + + + Secondary + + + + + Tertiary + + + + + Days + + + + + OG + + + + + FG + + + + + AA + + + + Measured: - + %1 split the batch here! - + Inventory - + Yeastbank - + + Year production + + + + + Brew efficiency + + + + + Fermentations + + + + Date and time - - + + + Beer style @@ -11130,11 +11405,11 @@ - - + + - - + + Database error @@ -11145,10 +11420,10 @@ - - - - + + + + MySQL error: %1 %2 %3 diff -r 09af9f46518f -r 2e30c9c20d22 translations/bmsapp_nl.ts --- a/translations/bmsapp_nl.ts Mon Aug 01 13:05:23 2022 +0200 +++ b/translations/bmsapp_nl.ts Mon Aug 01 21:49:57 2022 +0200 @@ -1158,6 +1158,11 @@ Volume naar het gistvat L: + + Clone + Kloon + + Stainless Steel RVS @@ -1178,34 +1183,36 @@ Koper - + BMSapp - Add new equipment BMSapp - Nieuwe apparatuur - + BMSapp - Edit equipment %1 BMSapp - Wijzig apparatuur %1 - + Edit Equipment Wijzig apparatuur - + Name empty or too short. De naam is leeg of te kort. - - + + + Database error Database fout - - + + + MySQL error: %1 %2 %3 @@ -1214,12 +1221,22 @@ %3 - + + Delete equipment + Verwijder apparatuur + + + + Delete %1 + Verwijder %1 + + + Equipment changed Apparatuur gewijzigd - + This equipment has been modified. Save changes? Deze installatie is gewijzigd. Wijzigingen opslaan? @@ -1487,6 +1504,11 @@ Verwijder de productie datum + + Clone + Kloon + + Grain Mout @@ -1577,46 +1599,48 @@ Fusten - + BMSapp - Add new fermentable BMSapp - Nieuw vergistbaar ingredient - + BMSapp - Edit fermentable %1 BMSapp - Wijzig vergistbaar ingredient %1 - - - + + + Edit Fermentable Wijzig vergistbaar ingredient - + Name empty or too short. De naam is leeg of te kort. - + Origin empty or too short. Herkomst leeg of te kort. - + Supplier empty or too short. Leverancier leeg of te kort. - - + + + Database error Database fout - - + + + MySQL error: %1 %2 %3 @@ -1625,12 +1649,22 @@ %3 - + + Delete fermentable + Verwijder vergistbaar ingredient + + + + Delete %1 + Verwijder %1 + + + Fermentable changed Vergistbaar ingredient gewijzigd - + This fermentable has been modified. Save changes? Dit vergistbaar ingredient is gewijzigd. Wijzigingen opslaan? @@ -1907,12 +1941,12 @@ Extract - + BMSapp - Add new hop BMSapp - Nieuwe hop - + BMSapp - Edit hop %1 BMSapp - Wijzig hop %1 @@ -1921,32 +1955,32 @@ L - - + + Edit Hop Wijzig hop - + Name empty or too short. De naam is leeg of te kort. - + Origin empty or too short. Herkomst leeg of te kort. + + + + Database error + Database fout + + - - - Database error - Database fout - - - - - + + MySQL error: %1 %2 %3 @@ -1955,12 +1989,22 @@ %3 - + + Delete hop + Verwijder hop + + + + Delete %1 + Verwijder %1 + + + Hop changed Hop gewijzigd - + This hop has been modified. Save changes? Deze hop is gewijzigd. Wijzigingen opslaan? @@ -2025,7 +2069,7 @@ - + gr gr @@ -2121,6 +2165,11 @@ Zet de tht datum op vandaag. + + Clone + Kloon + + Spice Specerij @@ -2186,34 +2235,36 @@ Bottelen - + BMSapp - Add new misc ingredient BMSapp - Nieuw overig ingredient - + BMSapp - Edit misc ingredient %1 BMSapp - Wijzig overig ingredient %1 - + Edit Misc Wijzig ingredient - + Name empty or too short. De naam is leeg of te kort. + + + + Database error + Database fout + + - - Database error - Database fout - - - - + + MySQL error: %1 %2 %3 @@ -2222,17 +2273,27 @@ %3 - + + Delete misc + Verwijder divers ingredient + + + + Delete %1 + Verwijder %1 + + + ml ml - + Misc changed Ingredient gewijzigd - + The ingredient has been modified. Save changes? Dit ingredient is gewijzigd. Wijzigingen opslaan? @@ -2271,7 +2332,7 @@ - + Delete Verwijder @@ -2405,8 +2466,8 @@ - - + + L L @@ -2683,7 +2744,7 @@ - + Add Nieuw @@ -3588,7 +3649,7 @@ - + After boil Einde koken @@ -4785,7 +4846,7 @@ - + Save File Bestand opslaan @@ -4800,20 +4861,20 @@ Geen XML bestand gekozen. - + XML export ready XML uitvoer gereed - - - - + + + + Copy Product Kopieer Product - + Copy Product export ready. Kopie Product export gereed. @@ -4822,7 +4883,7 @@ Kopieer Product - + Copy Product error. Kopieer Product fout. @@ -4831,176 +4892,176 @@ Kopieer Product naar Recept gereed. - + Copy Product to Recipe ready. Kopieer Product naar Recept gereed. - + Copy Product to Recipe error. Kopieer Product naar Recept fout. - - + + Export to forum Exporteer naar Forum - + The recipe and all data are copied to the clipboard. You can "paste" this data in the forum screen in your web browser. Het recept en alle gegevens zijn gekopieerd naar het klemboard. Je kunt deze gegevens "plakken" in het forum scherm in je web browser. - + Add a splitted batch Voeg een split batch toe - + Choose split moment in the brew process Kies een splits moment in het brouw proces - + Delete the last splitted batch Verwijder de laatste gesplitste batch - + The read-only `product code` of the batch De alleen lezen `product code` van de batch - + Batch name, click to change the name Batch naam, klik om de naam te wijzigen - + Batch size, click to change the volume Batch volume, klik om het volume te wijzigen - - + + Split product Splits product - + Product name: Product naam: - + Product code: Product code: - + Available volume: Beschikbaar volume: - + Current brew stage: Huidige brouw fase: - + Split at moment: Splits op moment: - - Not divided - Niet gesplitst - - - - After mash - Na maischen - - - After cooling - Na koelen + Not divided + Niet gesplitst - After primary - Na hoofdgisting - - - - After secondary - Na nagisting + After mash + Na maischen + After cooling + Na koelen + + + + After primary + Na hoofdgisting + + + + After secondary + Na nagisting + + + After tertiary Na lageren - + Volume remaining: Resterend volume: - + Split code Splits code - + Split name Splits naam - + Split volume Splits volume - + Export choices Export keuzes - + Export to beerXML Exporteer naar beerXML - + Copy to product Kopieer naar Product - + Copy to recipe Kopieer naar Recept - + Split this batch Splits deze batch - + Printer report Print rapporten - + Print recipe Print recept - + Print checklist Print werklijst @@ -5172,7 +5233,7 @@ - + Delete Verwijder @@ -5213,16 +5274,21 @@ Sensor: + + Clone + Kloon + + - + Beer Bier - + Fridge Koelkast @@ -5262,34 +5328,36 @@ Toets - + BMSapp - Add new fermentation profile BMSapp - Nieuw vergisting profiel - + BMSapp - Edit fermentation profile %1 BMSadd - Wijzig vergisting profiel %1 - + Edit Ferment Wijzig vergisting - + Name empty or too short. De naam is leeg of te kort. + + + + Database error + Database fout + + - - Database error - Database fout - - - - + + MySQL error: %1 %2 %3 @@ -5298,12 +5366,22 @@ %3 - + + Delete fermentation profile + Verwijder vergisting profiel + + + + Delete %1 + Verwijder %1 + + + Fermentation changed Vergisting gewijzigd - + This fermentation profile has been modified. Save changes? Dit vergisting profiel is gewijzigd. Wijzigingen opslaan? @@ -5348,7 +5426,7 @@ - + Delete Verwijder @@ -5368,6 +5446,11 @@ Nieuwe stap + + Clone + Kloon + + Step name Stap naam @@ -5404,51 +5487,53 @@ - + Infusion Infusie - + Temperature Verwarmen - + Decoction Decoctie - + BMSapp - Add new mash profile BMSapp - Nieuw maisch profiel - + BMSapp - Edit mash profile %1 BMSapp - Wijzig maisch profiel %1 - + Edit Mash Wijzig maisch - + Name empty or too short. De naam is leeg of te kort. + + + + Database error + Database fout + + - - Database error - Database fout - - - - + + MySQL error: %1 %2 %3 @@ -5457,12 +5542,22 @@ %3 - + + Delete mash profile + Verwijder maisch profiel + + + + Delete %1 + Verwijder %1 + + + Mash changed Maisch gewijzigd - + This mash profile has been modified. Save changes? Dit maisch schema is gewijzigd, Wijzigingen opslaan? @@ -5789,6 +5884,11 @@ Carbonaat (CO3) mg/L: + + Clone + Kloon + + Acid pH: Zuurgraad pH: @@ -5817,34 +5917,36 @@ Ionen balans meq/L: - + BMSapp - Add new brewing water BMSapp - Nieuw brouwwater - + BMSapp - Edit brewing water %1 BMSapp - Wijzig brouwwater %1 - + Edit Water Wijzig water - + Name empty or too short. De naam is leeg of te kort. + + + + Database error + Database fout + + - - Database error - Database fout - - - - + + MySQL error: %1 %2 %3 @@ -5853,12 +5955,22 @@ %3 - + + Delete water profile + Verwijder water profiel + + + + Delete %1 + Verwijder %1 + + + Water changed Water gewijzigd - + This water profile has been modified. Save changes? Dit water profiel is gewijzigd. Wijzigingen opslaan? @@ -7368,7 +7480,7 @@ - + Save File Bestand opslaan @@ -7383,68 +7495,68 @@ Geen XML bestand gekozen. - + XML export ready XML uitvoer gereed - - - - + + + + Copy Recipe Kopieer Recept - + Copy Recipe export ready. Kopie Recept export gereed. - + Copy Recipe error. Kopieer Recept fout. - + Copy Recipe to Product ready. Kopieer Recept naar Product gereed. - + Copy Recipe to Product error. Kopieer Recept naar Product fout. - - + + Export to forum Exporteer naar Forum - + The recipe and all data are copied to the clipboard. You can "paste" this data in the forum screen in your web browser. Het recept en alle gegevens zijn gekopieerd naar het klemboard. Je kunt deze gegevens "plakken" in het forum scherm in je web browser. - + Export choices Export keuzes - + Export to beerXML Exporteer naar beerXML - + Copy to recipe Kopieer naar Recept - + Copy to product Kopieer naar Product @@ -7712,6 +7824,11 @@ Rest alkaliteit als CaCO3: + + Clone + Kloon + + Acid pH: Zuurgraad pH: @@ -7763,34 +7880,36 @@ Ionen balans meq/L: - + BMSapp - Add new brewing water BMSapp - Nieuw brouwwater - + BMSapp - Edit brewing water %1 BMSapp - Wijzig brouwwater %1 - + Edit Water Wijzig water - + Name empty or too short. De naam is leeg of te kort. + + + + Database error + Database fout + + - - Database error - Database fout - - - - + + MySQL error: %1 %2 %3 @@ -7799,12 +7918,22 @@ %3 - + + Delete water + Verwijder water + + + + Delete %1 + Verwijder %1 + + + Water changed Water gewijzigd - + The brewing water has been modified. Save changes? Dit brouwwater is gewijzigd. Wijzigingen opslaan? @@ -7989,7 +8118,7 @@ - + Billion cells/gram: Miljard cellen/gram: @@ -8075,6 +8204,11 @@ Zet de tht datum op vandaag. + + Clone + Kloon + + Lager Ondergist @@ -8170,80 +8304,82 @@ Zeer hoog - + Price per pack: Prijs per pak: + + Inventory Packs: + Voorraad pakken: + + - Inventory Packs: - Voorraad pakken: - - - Billion cells/pack: Miljard cellen/pak: + + Price per Kg: + Prijs per kg: + + - Price per Kg: - Prijs per kg: - - - Inventory gram: Voorraad gram: + + Price per litre: + Prijs per liter: + + - Price per litre: - Prijs per liter: + Inventory ml: + Voorraad ml: - Inventory ml: - Voorraad ml: - - - Billion cells/ml: Miljard cellen/ml: - + BMSapp - Add new yeast BMSapp - Nieuwe gist - + BMSapp - Edit yeast %1 BMSapp - Wijzig gist %1 - - + + Edit Yeast Wijzig gist - + Name empty or too short. De naam is leeg of te kort. - + Laboratory empty or too short. Laboratorium leeg of te kort. + + + + Database error + Database fout + + - - Database error - Database fout - - - - + + MySQL error: %1 %2 %3 @@ -8252,12 +8388,22 @@ %3 - + + Delete yeast + Verwijder gist + + + + Delete %1 + Verwijder %1 + + + Yeast changed Gist gewijzigd - + The yeast has been modified. Save changes? Deze gist is gewijzigd. Wijzigingen opslaan? @@ -8868,7 +9014,7 @@ - + Save File Bestand opslaan @@ -8883,7 +9029,7 @@ Geen XML bestand gekozen. - + XML export ready XML uitvoer gereed @@ -9368,23 +9514,23 @@ - + Archive Archief - - + + Recipes Recepten - + Exit Afsluiten - + About Over @@ -9393,7 +9539,7 @@ Systemen - + Fermenters Vergisting @@ -9402,146 +9548,166 @@ CO2 meters - + iSpindels iSpindels - + Suppliers Leveranciers - + + Reports + Rapporten + + + Fermentables Vergistbare ingredienten - + Hops Hoppen - + Yeasts Gisten - + Miscs Overige ingredienten - + Waters Water - + Equipments Brouw apparatuur - + Supplies list Voorraad lijst - + Yeast bank Gistbank lijst - + Water profiles Water profielen - + Mash schedules Maisch schemas - + Beer styles Bierstijlen - + Fermentation schedules Vergisting profielen - + Global settings Instellingen - + Import beerxml Importeer beerxml - + In Production In Productie - + On Name Op naam - + On Code Op code - + On Date Op datum - + On Beerstyle Op bierstijl - + Import beerXML Importeer beerXML - + dummy - + hh - + hj - + ll - - + + Nodes Systemen - + Carbonation Carbonatie + + + Total Production + Totaal productie + + + + Efficiency + Rendement + + + + Fermentation + Vergisting + ManoMeter @@ -10082,6 +10248,7 @@ + Yeast Gist @@ -11255,34 +11422,142 @@ Toevoegen %1 gr `%2` - + + Number + Nummer + + + + Year + Jaar + + + + Brew sessions + Brouw sessies + + + + Brew volume + Brouw volume + + + + Average volume + Gemiddeld volume + + + + + Code + Code + + + + + Name + Naam + + + + Max extract + Max extract + + + + Mash eff. + Maisch % + + + + Sparge eff + Spoelen % + + + + Boil eff + Koken % + + + + Primary + Hoofdgisting + + + + Secondary + Nagisten + + + + Tertiary + Lageren + + + + Days + Dagen + + + + OG + OG + + + + FG + FG + + + + AA + SVG + + + Measured: Gemeten: - + %1 split the batch here! %1 splits de batch hier! - + Inventory Inventaris - + Yeastbank Gistbank - + + Year production + Jaar productie + + + + Brew efficiency + Brouw rendement + + + + Fermentations + Vergistingen + + + Date and time Datum en tijd - - + + + Beer style Bierstijl @@ -12403,11 +12678,11 @@ - - + + - - + + Database error Database fout @@ -12418,10 +12693,10 @@ MySQL fout: record %1 niet gevonden - - - - + + + + MySQL error: %1 %2 %3 diff -r 09af9f46518f -r 2e30c9c20d22 ui/MainWindow.ui --- a/ui/MainWindow.ui Mon Aug 01 13:05:23 2022 +0200 +++ b/ui/MainWindow.ui Mon Aug 01 21:49:57 2022 +0200 @@ -111,8 +111,21 @@ + + + Reports + + + + :/icons/silk/printer.png:/icons/silk/printer.png + + + + + + @@ -455,6 +468,33 @@ iSpindels + + + + :/icons/bms/beerstyles.png:/icons/bms/beerstyles.png + + + Total Production + + + + + + :/icons/silk/report.png:/icons/silk/report.png + + + Efficiency + + + + + + :/icons/bms/fermenter.png:/icons/bms/fermenter.png + + + Fermentation + +