Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed May 5, 2022
2 parents f2a000f + 97a2ba1 commit ffb7543
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 27 deletions.
12 changes: 6 additions & 6 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,15 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 81;
CURRENT_PROJECT_VERSION = 82;
DEVELOPMENT_TEAM = NPC44Y2C98;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.0.81;
MARKETING_VERSION = 5.0.82;
PRODUCT_BUNDLE_IDENTIFIER = com.invoiceninja.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand Down Expand Up @@ -502,15 +502,15 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 81;
CURRENT_PROJECT_VERSION = 82;
DEVELOPMENT_TEAM = NPC44Y2C98;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.0.81;
MARKETING_VERSION = 5.0.82;
PRODUCT_BUNDLE_IDENTIFIER = com.invoiceninja.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand All @@ -526,15 +526,15 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 81;
CURRENT_PROJECT_VERSION = 82;
DEVELOPMENT_TEAM = NPC44Y2C98;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.0.81;
MARKETING_VERSION = 5.0.82;
PRODUCT_BUNDLE_IDENTIFIER = com.invoiceninja.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand Down
2 changes: 1 addition & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Constants {
}

// TODO remove version once #46609 is fixed
const String kClientVersion = '5.0.81';
const String kClientVersion = '5.0.82';
const String kMinServerVersion = '5.0.4';

const String kAppName = 'Invoice Ninja';
Expand Down
4 changes: 3 additions & 1 deletion lib/data/models/invoice_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,9 @@ abstract class InvoiceEntity extends Object

String get calculatedStatusId {
if (isRecurring) {
if (isPending) {
if (!isDraft && remainingCycles == 0) {
return kRecurringInvoiceStatusCompleted;
} else if (isPending) {
return kRecurringInvoiceStatusPending;
}
} else {
Expand Down
6 changes: 4 additions & 2 deletions lib/ui/app/entity_dropdown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@ class _EntityDropdownState extends State<EntityDropdown> {

if (widget.onCreateNew != null &&
options.isEmpty &&
_filter.isNotEmpty) {
_filter.trim().isNotEmpty &&
textEditingValue.text.trim().isNotEmpty &&
state.userCompany.canCreate(widget.entityType)) {
options.add(_AutocompleteEntity(name: textEditingValue.text));
}

Expand Down Expand Up @@ -290,7 +292,7 @@ class _EntityDropdownState extends State<EntityDropdown> {
}

if (entity?.id == _AutocompleteEntity.KEY) {
final name = (entity as _AutocompleteEntity).name;
final name = (entity as _AutocompleteEntity).name.trim();
_textController.text = name;

_focusNode.removeListener(_onFocusChanged);
Expand Down
2 changes: 0 additions & 2 deletions lib/ui/app/tables/entity_datatable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ class EntityDataTableSource extends AppDataTableSource {
'public_notes',
'private_notes',
'description',
'email',
'contact_email',
'custom1',
'custom2',
'custom3',
Expand Down
40 changes: 40 additions & 0 deletions lib/ui/reports/payment_report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@ enum PaymentReportFields {
number,
amount,
client,
client_number,
client_balance,
client_address1,
client_address2,
client_vat_number,
client_city,
client_postal_code,
client_country,
client_shipping_address1,
client_shipping_address2,
client_state,
client_shipping_city,
client_shipping_state,
client_shipping_postal_code,
client_shipping_country,
transaction_reference,
date,
type,
Expand Down Expand Up @@ -178,6 +188,36 @@ ReportResult paymentReport(
case PaymentReportFields.client_shipping_address2:
value = client.shippingAddress2;
break;
case PaymentReportFields.client_state:
value = client.state;
break;
case PaymentReportFields.client_shipping_city:
value = client.shippingCity;
break;
case PaymentReportFields.client_shipping_state:
value = client.shippingState;
break;
case PaymentReportFields.client_shipping_postal_code:
value = client.shippingPostalCode;
break;
case PaymentReportFields.client_shipping_country:
value = staticState.countryMap[client.shippingCountryId]?.name ?? '';
break;
case PaymentReportFields.client_city:
value = client.city;
break;
case PaymentReportFields.client_country:
value = staticState.countryMap[client.countryId]?.name ?? '';
break;
case PaymentReportFields.client_postal_code:
value = client.postalCode;
break;
case PaymentReportFields.client_vat_number:
value = client.vatNumber;
break;
case PaymentReportFields.client_number:
value = client.number;
break;
case PaymentReportFields.transaction_reference:
value = payment.transactionReference;
break;
Expand Down
24 changes: 19 additions & 5 deletions lib/ui/reports/reports_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,12 @@ class ReportResult {
customStartDate: reportsUIState.customStartDate,
customEndDate: reportsUIState.customEndDate,
);

final customStartDate = reportsUIState.customStartDate;
final customEndDate = reportsUIState.customEndDate;

value = value.split('T').first;

if (dateRange == DateRange.custom) {
if (customStartDate.isNotEmpty && customEndDate.isNotEmpty) {
if (!(startDate.compareTo(value) <= 0 &&
Expand Down Expand Up @@ -1256,10 +1260,16 @@ class ReportResult {
final cell = row[index];
final column = sorted[j];
cells.add(
DataCell(cell.renderWidget(context, column), onTap: () {
viewEntityById(
entityId: cell.entityId, entityType: cell.entityType);
}),
DataCell(
ConstrainedBox(
constraints: BoxConstraints(maxWidth: kTableColumnWidthMax),
child: cell.renderWidget(context, column),
),
onTap: () {
viewEntityById(
entityId: cell.entityId, entityType: cell.entityType);
},
),
);
}
return DataRow(cells: cells);
Expand Down Expand Up @@ -1574,7 +1584,11 @@ class ReportStringValue extends ReportElement {

@override
Widget renderWidget(BuildContext context, String column) {
return Text(renderText(context, column));
return Text(
renderText(context, column),
maxLines: 2,
overflow: TextOverflow.ellipsis,
);
}

@override
Expand Down
2 changes: 2 additions & 0 deletions lib/ui/settings/device_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ class _DeviceSettingsState extends State<DeviceSettings>
secondary: Icon(MdiIcons.filePdfBox),
),
],
/*
SwitchListTile(
title: Text(localization.persistUi),
subtitle: Text(localization.persistUiHelp),
Expand All @@ -271,6 +272,7 @@ class _DeviceSettingsState extends State<DeviceSettings>
activeColor: Theme.of(context).colorScheme.secondary,
secondary: Icon(Icons.save_alt),
),
*/
SwitchListTile(
title: Text(localization.persistData),
subtitle: Text(localization.persistDataHelp),
Expand Down
12 changes: 6 additions & 6 deletions macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -421,14 +421,14 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 81;
CURRENT_PROJECT_VERSION = 82;
DEVELOPMENT_TEAM = NPC44Y2C98;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 5.0.81;
MARKETING_VERSION = 5.0.82;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
Expand Down Expand Up @@ -551,14 +551,14 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 81;
CURRENT_PROJECT_VERSION = 82;
DEVELOPMENT_TEAM = NPC44Y2C98;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 5.0.81;
MARKETING_VERSION = 5.0.82;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
Expand All @@ -575,14 +575,14 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 81;
CURRENT_PROJECT_VERSION = 82;
DEVELOPMENT_TEAM = NPC44Y2C98;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 5.0.81;
MARKETING_VERSION = 5.0.82;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
Expand Down
2 changes: 1 addition & 1 deletion pubspec.foss.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: invoiceninja_flutter
description: Client for Invoice Ninja
version: 5.0.81+81
version: 5.0.82+82
homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io
publish_to: none
Expand Down
2 changes: 1 addition & 1 deletion pubspec.next.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: invoiceninja_flutter
description: Client for Invoice Ninja
version: 5.0.81+81
version: 5.0.82+82
homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io
publish_to: none
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: invoiceninja_flutter
description: Client for Invoice Ninja
version: 5.0.81+81
version: 5.0.82+82
homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io
publish_to: none
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: invoiceninja
version: '5.0.81'
version: '5.0.82'
summary: Create invoices, accept payments, track expenses & time-tasks
description: "### Note: if the app fails to run using `snap run invoiceninja` it may help to run `/snap/invoiceninja/current/bin/invoiceninja` instead
Expand Down

0 comments on commit ffb7543

Please sign in to comment.