Expense changes
This commit is contained in:
parent
1711a657ba
commit
5b4fcb1493
|
|
@ -114,10 +114,15 @@ abstract class ExpenseEntity extends Object
|
|||
documents: BuiltList<DocumentEntity>(),
|
||||
taxName1: '',
|
||||
taxName2: '',
|
||||
taxName3: '',
|
||||
taxRate1: 0,
|
||||
taxRate2: 0,
|
||||
taxName3: '',
|
||||
taxRate3: 0,
|
||||
taxAmount1: 0,
|
||||
taxAmount2: 0,
|
||||
taxAmount3: 0,
|
||||
usesInclusiveTaxes: company?.expenseInclusiveTaxes ?? false,
|
||||
amountIsPretax: company?.expenseAmountIsPretax ?? true,
|
||||
clientId: client?.id,
|
||||
vendorId: vendor?.id,
|
||||
invoiceId: '',
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja_flutter/constants.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/app_border.dart';
|
||||
import 'package:invoiceninja_flutter/ui/expense/edit/expense_edit_details.dart';
|
||||
import 'package:invoiceninja_flutter/ui/expense/edit/expense_edit_notes.dart';
|
||||
import 'package:invoiceninja_flutter/ui/expense/edit/expense_edit_settings.dart';
|
||||
import 'package:invoiceninja_flutter/ui/expense/edit/expense_edit_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/edit_scaffold.dart';
|
||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||
|
||||
class ExpenseEdit extends StatefulWidget {
|
||||
const ExpenseEdit({
|
||||
|
|
@ -95,6 +99,61 @@ class _ExpenseEditState extends State<ExpenseEdit>
|
|||
],
|
||||
),
|
||||
),
|
||||
bottomNavigationBar: BottomAppBar(
|
||||
elevation: 0,
|
||||
color: Theme.of(context).cardColor,
|
||||
shape: CircularNotchedRectangle(),
|
||||
child: SizedBox(
|
||||
height: kTopBottomBarHeight,
|
||||
child: AppBorder(
|
||||
isTop: true,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
/*
|
||||
if (isDesktop(context))
|
||||
Tooltip(
|
||||
message: useSidebarEditor
|
||||
? localization.fullscreenEditor
|
||||
: localization.sidebarEditor,
|
||||
child: InkWell(
|
||||
onTap: () =>
|
||||
store.dispatch(ToggleEditorLayout(EntityType.task)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Icon(useSidebarEditor
|
||||
? Icons.chevron_left
|
||||
: Icons.chevron_right),
|
||||
),
|
||||
),
|
||||
),
|
||||
*/
|
||||
AppBorder(
|
||||
//isLeft: isDesktop(context),
|
||||
isLeft: false,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 16),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
localization.expenseTotal +
|
||||
': ' +
|
||||
formatNumber(expense.amountWithTax, context,
|
||||
currencyId: expense.currencyId),
|
||||
style: TextStyle(
|
||||
color: viewModel.state.prefState.enableDarkMode
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
fontSize: 20.0,
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
static final Map<String, Map<String, String>> _localizedValues = {
|
||||
'en': {
|
||||
// STARTER: lang key - do not remove comment
|
||||
'expense_total': 'Expense Total',
|
||||
'enter_taxes': 'Enter Taxes',
|
||||
'by_rate': 'By Rate',
|
||||
'by_amount': 'By Amount',
|
||||
|
|
@ -51249,6 +51250,9 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
String get searchTaskStatus =>
|
||||
_localizedValues[localeCode]['search_task_status'];
|
||||
|
||||
String get expenseTotal =>
|
||||
_localizedValues[localeCode]['expense_total'];
|
||||
|
||||
String get expenseCategory =>
|
||||
_localizedValues[localeCode]['expense_category'];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue