price per item is printed

This commit is contained in:
atseirjo
2026-10-28 12:32:49 +01:00
parent c32adbad50
commit 77fbe16867
31 changed files with 656 additions and 55 deletions
+6
View File
@@ -31,6 +31,7 @@ class BauteilController extends GetxController {
final minutenController = TextEditingController(text: '0');
final gewichtController = TextEditingController();
final abfallController = TextEditingController(text: '0');
final gesamtpreisController = TextEditingController();
final _verbrauchControllers = <String, TextEditingController>{};
final filamente = <KaufFilamentModel>[].obs;
final profile = <AnwendungModel>[].obs;
@@ -224,6 +225,7 @@ class BauteilController extends GetxController {
druckdauerMinuten: duration,
gewichtGramm: InputValidators.number(gewichtController.text)!,
abfallGramm: InputValidators.number(abfallController.text)!,
gesamtpreis: InputValidators.number(gesamtpreisController.text),
fotoBase64: foto.value == null ? null : base64Encode(foto.value!),
filamente: selectedFilamente.entries
.map(
@@ -268,6 +270,8 @@ class BauteilController extends GetxController {
minutenController.text = '${entry.druckdauerMinuten % 60}';
gewichtController.text = DisplayFormats.number(entry.gewichtGramm);
abfallController.text = DisplayFormats.number(entry.abfallGramm);
gesamtpreisController.text =
entry.gesamtpreis?.toString().replaceAll('.', ',') ?? '';
foto.value = entry.fotoBytes;
for (final item in entry.filamente) {
verbrauchController(item.filamentId).text = item.verbrauchGramm > 0
@@ -342,6 +346,7 @@ class BauteilController extends GetxController {
minutenController.text = '0';
gewichtController.clear();
abfallController.text = '0';
gesamtpreisController.clear();
selectedFilamente.clear();
for (final controller in _verbrauchControllers.values) {
controller.clear();
@@ -359,6 +364,7 @@ class BauteilController extends GetxController {
minutenController.dispose();
gewichtController.dispose();
abfallController.dispose();
gesamtpreisController.dispose();
for (final controller in _verbrauchControllers.values) {
controller.dispose();
}