Improve auto-taxes
This commit is contained in:
parent
df5b7052e2
commit
bd194ad5bc
|
|
@ -49,6 +49,7 @@ import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit_contacts_vm.da
|
|||
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit_details_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit_items_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_tax_details.dart';
|
||||
import 'package:invoiceninja_flutter/ui/purchase_order/edit/purchase_order_edit_items_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/quote/edit/quote_edit_items_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/recurring_invoice/edit/recurring_invoice_edit_items_vm.dart';
|
||||
|
|
@ -964,6 +965,7 @@ class InvoiceEditDesktopState extends State<InvoiceEditDesktop>
|
|||
Expanded(
|
||||
flex: 1,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
FormCard(
|
||||
padding: const EdgeInsets.only(
|
||||
|
|
@ -1120,6 +1122,20 @@ class InvoiceEditDesktopState extends State<InvoiceEditDesktop>
|
|||
),
|
||||
),
|
||||
]),
|
||||
if (company.calculateTaxes)
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 10, right: 16),
|
||||
child: AppButton(
|
||||
label: localization.taxDetails.toUpperCase(),
|
||||
onPressed: () {
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
builder: (context) =>
|
||||
InvoiceTaxDetails());
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -1128,8 +1144,7 @@ class InvoiceEditDesktopState extends State<InvoiceEditDesktop>
|
|||
if (state.prefState.showPdfPreview &&
|
||||
!state.prefState.showPdfPreviewSideBySide)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 16, right: 16, bottom: 16, top: 2),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: _PdfPreview(invoice: invoice),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
|
||||
class InvoiceTaxDetails extends StatelessWidget {
|
||||
const InvoiceTaxDetails({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final localization = AppLocalization.of(context);
|
||||
|
||||
return AlertDialog(
|
||||
title: Text(localization.taxDetails),
|
||||
content: DataTable(
|
||||
columns: [
|
||||
DataColumn(label: Text('')),
|
||||
DataColumn(label: Text(localization.invoice)),
|
||||
DataColumn(label: Text(localization.client)),
|
||||
DataColumn(label: Text(localization.company)),
|
||||
],
|
||||
rows: [
|
||||
DataRow(cells: [
|
||||
DataCell(Text(localization.address)),
|
||||
DataCell(Text('test')),
|
||||
DataCell(Text('test')),
|
||||
DataCell(Text('test')),
|
||||
])
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: Text(
|
||||
localization.close.toUpperCase(),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -18,6 +18,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
static final Map<String, Map<String, String>> _localizedValues = {
|
||||
'en': {
|
||||
// STARTER: lang key - do not remove comment
|
||||
'tax_details': 'Tax Details',
|
||||
'activity_10_online':
|
||||
':contact entered payment :payment for invoice :invoice for :client',
|
||||
'activity_10_manual':
|
||||
|
|
@ -105924,6 +105925,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
_localizedValues[localeCode]['default_payment_type'] ??
|
||||
_localizedValues['en']['default_payment_type'];
|
||||
|
||||
String get taxDetails =>
|
||||
_localizedValues[localeCode]['tax_details'] ??
|
||||
_localizedValues['en']['tax_details'];
|
||||
|
||||
// STARTER: lang field - do not remove comment
|
||||
|
||||
String lookup(String key) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue