Description PDF creation
This commit is contained in:
parent
10664ee9fa
commit
c95471987e
@ -38,6 +38,7 @@ class PrintController extends GetxController {
|
||||
return pw.Column(
|
||||
crossAxisAlignment: pw.CrossAxisAlignment.start,
|
||||
children: [
|
||||
//Header
|
||||
// PDF-Design hier
|
||||
pw.Text('Tankbericht $year',
|
||||
style: pw.TextStyle(
|
||||
@ -51,7 +52,7 @@ class PrintController extends GetxController {
|
||||
fontSize: 16, color: PdfColors.grey700, font: font)),
|
||||
pw.Divider(color: PdfColors.grey400),
|
||||
pw.SizedBox(height: 20),
|
||||
|
||||
// Data
|
||||
// Dynamische Erstellung der monatlichen Abschnitte
|
||||
...tankungenByMonth.entries.map((entry) {
|
||||
final monthName = entry.key;
|
||||
@ -99,32 +100,7 @@ class PrintController extends GetxController {
|
||||
],
|
||||
);
|
||||
}),
|
||||
|
||||
// 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(),
|
||||
// ),
|
||||
|
||||
//footer
|
||||
pw.Spacer(),
|
||||
pw.Divider(color: PdfColors.grey400),
|
||||
pw.Container(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user