Adjust variables for payment template
This commit is contained in:
parent
0427a9b7a5
commit
c719db0941
|
|
@ -17,9 +17,11 @@ import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
class VariablesHelp extends StatefulWidget {
|
class VariablesHelp extends StatefulWidget {
|
||||||
const VariablesHelp({
|
const VariablesHelp({
|
||||||
this.showInvoiceAsQuote = false,
|
this.showInvoiceAsQuote = false,
|
||||||
|
this.showInvoiceAsInvoices = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
final bool showInvoiceAsQuote;
|
final bool showInvoiceAsQuote;
|
||||||
|
final bool showInvoiceAsInvoices;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_VariablesHelpState createState() => _VariablesHelpState();
|
_VariablesHelpState createState() => _VariablesHelpState();
|
||||||
|
|
@ -57,7 +59,9 @@ class _VariablesHelpState extends State<VariablesHelp>
|
||||||
Tab(
|
Tab(
|
||||||
child: Text(widget.showInvoiceAsQuote
|
child: Text(widget.showInvoiceAsQuote
|
||||||
? localization.quote
|
? localization.quote
|
||||||
: localization.invoice)),
|
: widget.showInvoiceAsInvoices
|
||||||
|
? localization.invoices
|
||||||
|
: localization.invoice)),
|
||||||
Tab(child: Text(localization.client)),
|
Tab(child: Text(localization.client)),
|
||||||
Tab(child: Text(localization.contact)),
|
Tab(child: Text(localization.contact)),
|
||||||
Tab(child: Text(localization.company)),
|
Tab(child: Text(localization.company)),
|
||||||
|
|
@ -78,7 +82,11 @@ class _VariablesHelpState extends State<VariablesHelp>
|
||||||
'assigned_to_user',
|
'assigned_to_user',
|
||||||
'invoices',
|
'invoices',
|
||||||
'payments',
|
'payments',
|
||||||
if (widget.showInvoiceAsQuote) ...[
|
if (widget.showInvoiceAsInvoices) ...[
|
||||||
|
'invoice_references',
|
||||||
|
'invoice.po_number',
|
||||||
|
'payment.status',
|
||||||
|
] else if (widget.showInvoiceAsQuote) ...[
|
||||||
QuoteFields.amount,
|
QuoteFields.amount,
|
||||||
QuoteFields.discount,
|
QuoteFields.discount,
|
||||||
QuoteFields.date,
|
QuoteFields.date,
|
||||||
|
|
|
||||||
|
|
@ -521,6 +521,10 @@ class _TemplatesAndRemindersState extends State<TemplatesAndReminders>
|
||||||
),
|
),
|
||||||
VariablesHelp(
|
VariablesHelp(
|
||||||
showInvoiceAsQuote: template == EmailTemplate.quote,
|
showInvoiceAsQuote: template == EmailTemplate.quote,
|
||||||
|
showInvoiceAsInvoices: [
|
||||||
|
EmailTemplate.payment,
|
||||||
|
EmailTemplate.payment_partial,
|
||||||
|
].contains(template),
|
||||||
),
|
),
|
||||||
SizedBox(height: 16),
|
SizedBox(height: 16),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue