Description PDF creation
This commit is contained in:
parent
10664ee9fa
commit
c95471987e
@ -38,6 +38,7 @@ class PrintController extends GetxController {
|
|||||||
return pw.Column(
|
return pw.Column(
|
||||||
crossAxisAlignment: pw.CrossAxisAlignment.start,
|
crossAxisAlignment: pw.CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
//Header
|
||||||
// PDF-Design hier
|
// PDF-Design hier
|
||||||
pw.Text('Tankbericht $year',
|
pw.Text('Tankbericht $year',
|
||||||
style: pw.TextStyle(
|
style: pw.TextStyle(
|
||||||
@ -51,7 +52,7 @@ class PrintController extends GetxController {
|
|||||||
fontSize: 16, color: PdfColors.grey700, font: font)),
|
fontSize: 16, color: PdfColors.grey700, font: font)),
|
||||||
pw.Divider(color: PdfColors.grey400),
|
pw.Divider(color: PdfColors.grey400),
|
||||||
pw.SizedBox(height: 20),
|
pw.SizedBox(height: 20),
|
||||||
|
// Data
|
||||||
// Dynamische Erstellung der monatlichen Abschnitte
|
// Dynamische Erstellung der monatlichen Abschnitte
|
||||||
...tankungenByMonth.entries.map((entry) {
|
...tankungenByMonth.entries.map((entry) {
|
||||||
final monthName = entry.key;
|
final monthName = entry.key;
|
||||||
@ -99,32 +100,7 @@ class PrintController extends GetxController {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
//footer
|
||||||
// pw.TableHelper.fromTextArray(
|
|
||||||
// headers: [
|
|
||||||
// 'Datum',
|
|
||||||
// 'Ort',
|
|
||||||
// 'Menge (L)',
|
|
||||||
// 'Preis/L (€)',
|
|
||||||
// 'Summe (€)'
|
|
||||||
// ],
|
|
||||||
// cellAlignment: pw.Alignment.centerLeft,
|
|
||||||
// border: pw.TableBorder.all(color: PdfColors.grey200),
|
|
||||||
// headerStyle:
|
|
||||||
// pw.TextStyle(fontWeight: pw.FontWeight.bold, font: font),
|
|
||||||
// data: tankungen.map((item) {
|
|
||||||
// var modDate = item.date.substring(5);
|
|
||||||
// var modPreisPerLiter = item.pricePerLiter.padRight(5, '0');
|
|
||||||
// return [
|
|
||||||
// modDate,
|
|
||||||
// item.location,
|
|
||||||
// item.liters,
|
|
||||||
// modPreisPerLiter,
|
|
||||||
// item.szSummePreis ?? '0.0',
|
|
||||||
// ];
|
|
||||||
// }).toList(),
|
|
||||||
// ),
|
|
||||||
|
|
||||||
pw.Spacer(),
|
pw.Spacer(),
|
||||||
pw.Divider(color: PdfColors.grey400),
|
pw.Divider(color: PdfColors.grey400),
|
||||||
pw.Container(
|
pw.Container(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user