From 59095a1c9def05c305e3aff8a18c1719693cc67b Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 12 Nov 2023 11:40:52 +0200 Subject: [PATCH] Don't show delivery note option when emailing --- lib/ui/invoice/invoice_pdf.dart | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/ui/invoice/invoice_pdf.dart b/lib/ui/invoice/invoice_pdf.dart index c9bce872a..a33cf2fe8 100644 --- a/lib/ui/invoice/invoice_pdf.dart +++ b/lib/ui/invoice/invoice_pdf.dart @@ -262,18 +262,19 @@ class _InvoicePdfViewState extends State { : null, body: Column( children: [ - Material( - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 8), - child: Row( - children: [ - if (supportsDesignTemplates()) designPicker, - activityPicker, - if (invoice.isInvoice && _activityId == null) deliveryNote, - ], + if (widget.showAppBar) + Material( + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: Row( + children: [ + if (supportsDesignTemplates()) designPicker, + activityPicker, + if (invoice.isInvoice && _activityId == null) deliveryNote, + ], + ), ), ), - ), Expanded( child: _isLoading || _response == null ? LoadingIndicator()