|
@@ -405,7 +405,7 @@
|
405
|
405
|
query.exec();
|
406
|
406
|
query.next();
|
407
|
407
|
var roastedId = query.value(0);
|
408
|
|
- query.prepare("INSERT INTO roasting_log (time, unroasted_id, unroasted_quantity, unroasted_total_quantity, roasted_id, roasted_quantity, transaction_type, annotation, machine, duration, approval, humidity, barometric, indoor_air, outdoor_air, files) VALUES (:time, :unroastedids, :greens, :green, :roastedid, :roasted, 'SAMPLEROAST', :note, :machine, :duration, TRUE, NULL, NULL, NULL, NULL, :files)");
|
|
408
|
+ query.prepare("INSERT INTO roasting_log (time, unroasted_id, unroasted_quantity, unroasted_total_quantity, roasted_id, roasted_quantity, transaction_type, annotation, machine, duration, approval, humidity, barometric, indoor_air, outdoor_air, files, person) VALUES (:time, :unroastedids, :greens, :green, :roastedid, :roasted, 'SAMPLEROAST', :note, :machine, :duration, TRUE, NULL, NULL, NULL, NULL, :files, :user)");
|
409
|
409
|
query.bind(":time", roastTime.text);
|
410
|
410
|
query.bind(":unroastedids", "{" + greenId + "}");
|
411
|
411
|
query.bind(":greens", "{" + convertToPounds(parseFloat(sampleGreenWeight.text), sampleGreenUnit.currentText) + "}");
|
|
@@ -416,9 +416,10 @@
|
416
|
416
|
query.bind(":machine", Number(selectedRoasterID));
|
417
|
417
|
query.bind(":duration", roastDuration.text);
|
418
|
418
|
query.bind(":files", "{" + fileID + "}");
|
|
419
|
+ query.bind(":user", Application.currentTypicaUser());
|
419
|
420
|
query.exec();
|
420
|
421
|
} else {
|
421
|
|
- var q = "INSERT INTO roasting_log (time, unroasted_id, unroasted_quantity, unroasted_total_quantity, roasted_id, roasted_quantity, transaction_type, annotation, machine, duration, approval, humidity, barometric, indoor_air, outdoor_air, files) VALUES (:time, ";
|
|
422
|
+ var q = "INSERT INTO roasting_log (time, unroasted_id, unroasted_quantity, unroasted_total_quantity, roasted_id, roasted_quantity, transaction_type, annotation, machine, duration, approval, humidity, barometric, indoor_air, outdoor_air, files, person) VALUES (:time, ";
|
422
|
423
|
q += productionGreenTable.columnArray(0, 32);
|
423
|
424
|
q += ", ";
|
424
|
425
|
for(var i = 0; i < productionGreenTable.data(i, 1, 0).value != ""; i++) {
|
|
@@ -433,11 +434,12 @@
|
433
|
434
|
q += selectedRoasterID;
|
434
|
435
|
q += ", :duration, TRUE, NULL, NULL, NULL, NULL, '{";
|
435
|
436
|
q += fileID;
|
436
|
|
- q += "}')";
|
|
437
|
+ q += "}', :user)";
|
437
|
438
|
query.prepare(q);
|
438
|
439
|
query.bind(":time", roastTime.text);
|
439
|
440
|
query.bind(":annotation", notes.plainText);
|
440
|
441
|
query.bind(":duration", roastDuration.text);
|
|
442
|
+ query.bind(":user", Application.currentTypicaUser());
|
441
|
443
|
query.exec();
|
442
|
444
|
}
|
443
|
445
|
query = query.invalidate();
|