Delivery notes

This commit is contained in:
Hillel Coren 2020-11-27 15:59:13 +02:00
parent c205c47ec3
commit d1ec9a29ce
2 changed files with 17 additions and 3 deletions

View File

@ -15,6 +15,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = {
'en': {
// STARTER: lang key - do not remove comment
'delivery_note': 'Delivery Note',
'sent_invoices_are_locked': 'Sent invoices are locked',
'paid_invoices_are_locked': 'Paid invoices are locked',
'source_code': 'Source Code',
@ -5204,6 +5205,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
String get sentInvoicesArelocked =>
_localizedValues[localeCode]['sent_invoices_are_locked'] ?? '';
String get deliveryNote =>
_localizedValues[localeCode]['delivery_note'] ?? '';
String lookup(String key) {
final lookupKey = toSnakeCase(key);

View File

@ -125,8 +125,8 @@ class _PDFScaffoldState extends State<PDFScaffold> {
Text(localization.lookup('${invoice.entityType}') +
' ' +
(invoice.number ?? '')),
Spacer(),
if (_activityId != null && isDesktop(context)) ...[
Spacer(),
Flexible(
child: IgnorePointer(
ignoring: _isLoading,
@ -157,7 +157,6 @@ class _PDFScaffoldState extends State<PDFScaffold> {
Spacer(),
],
if (!kIsWeb && _pageCount > 1) ...[
Spacer(),
IconButton(
icon: Icon(Icons.navigate_before),
onPressed: _pageNumber > 1
@ -185,7 +184,17 @@ class _PDFScaffoldState extends State<PDFScaffold> {
: null,
),
Spacer(),
]
],
Container(
width: 200,
child: CheckboxListTile(
title: Text(localization.deliveryNote),
value: true,
onChanged: (value) => null,
controlAffinity: ListTileControlAffinity.leading,
activeColor: store.state.accentColor,
),
),
],
),
actions: <Widget>[