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 10, 2024
2 parents ed82d5f + c40441c commit 64f2515
Show file tree
Hide file tree
Showing 54 changed files with 1,085 additions and 450 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.2'
flutter-version: '3.19.6'
#channel: 'stable'

- name: Install Sentry
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.2'
flutter-version: '3.19.6'
#channel: 'stable'

- name: Init Flutter
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
draft: false
prerelease: false
title: "Latest Release"
automatic_release_tag: "v5.0.157"
automatic_release_tag: "v5.0.159"
files: |
${{ github.workspace }}/artifacts/Invoice-Ninja-Archive
${{ github.workspace }}/artifacts/Invoice-Ninja-Hash
Expand Down
7 changes: 2 additions & 5 deletions codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ workflows:
instance_type: linux
max_build_duration: 120
environment:
flutter: 3.16.2
flutter: 3.19.6
xcode: latest
cocoapods: default
vars:
Expand All @@ -26,13 +26,10 @@ workflows:
echo "const FLUTTER_VERSION = const <String, String>" > $FCI_BUILD_DIR/lib/flutter_version.dart
flutter --version --machine >> $FCI_BUILD_DIR/lib/flutter_version.dart
echo ";" >> $FCI_BUILD_DIR/lib/flutter_version.dart
#- cat $FCI_BUILD_DIR/lib/flutter_version.dart
- cd . && flutter packages pub get
- flutter config --enable-linux-desktop
#- flutter build linux --release
#- export SNAPCRAFT_STORE_CREDENTIALS=$(echo $SNAPCRAFT_LOGIN_CREDENTIALS)
- snapcraft whoami
- sudo snap refresh snapcraft --channel=7.x/stable
- snapcraft whoami
- snapcraft snap --output invoiceninja.snap
- snapcraft upload invoiceninja.snap --release stable
artifacts:
Expand Down
2 changes: 2 additions & 0 deletions flatpak/com.invoiceninja.InvoiceNinja.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
</screenshots>
<content_rating type="oars-1.1"/>
<releases>
<release version="5.0.159" date="2024-05-10"/>
<release version="5.0.158" date="2024-04-24"/>
<release version="5.0.157" date="2024-04-10"/>
<release version="5.0.156" date="2024-02-21"/>
<release version="5.0.155" date="2024-02-07"/>
Expand Down
28 changes: 27 additions & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Constants {
}

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

const String kAppName = 'Invoice Ninja';
Expand Down Expand Up @@ -55,6 +55,10 @@ const String kFacebookUrl = 'https://www.facebook.com/invoiceninja';
const String kYouTubeUrl =
'https://www.youtube.com/channel/UCXAHcBvhW05PDtWYIq7WDFA/videos';

const String kTemplatesYouTubeUrl =
'https://www.youtube.com/watch?v=kfG5vvcbYes';
const String kTemplatesDocsUrl = 'https://invoiceninja.github.io/en/templates';

const String kYodleeCoverageUrl =
'https://www.yodlee.com/open-banking/data-connections';
const String kNordigenCoverageUrl =
Expand Down Expand Up @@ -428,6 +432,7 @@ const String kGatewayTypeVenmo = '25';
const String kGatewayTypeMercadoPago = '26';
const String kGatewayTypeMyBank = '27';
const String kGatewayTypePayLater = '28';
const String kGatewayTypeAdvancedCards = '29';

const kGatewayTypes = {
kGatewayTypeCreditCard: 'credit_card',
Expand Down Expand Up @@ -458,6 +463,7 @@ const kGatewayTypes = {
kGatewayTypeMercadoPago: 'mercado_pago',
kGatewayTypeMyBank: 'my_bank',
kGatewayTypePayLater: 'pay_later',
kGatewayTypeAdvancedCards: 'advanced_cards',
};

const String kNotificationChannelEmail = 'email';
Expand Down Expand Up @@ -811,6 +817,24 @@ const String kReportGroupMonth = 'month';
const String kReportGroupQuarter = 'quarter';
const String kReportGroupYear = 'year';

const String kRoundTo1Minute = '1_minute';
const String kRoundTo5Minutes = '5_minutes';
const String kRoundTo15Minutes = '15_minutes';
const String kRoundTo30Minutes = '30_minutes';
const String kRoundTo1Hour = '1_hour';
const String kRoundTo1Day = '1_day';
const String kRoundToCustom = 'custom';

const kTaskRoundingOptions = {
kRoundTo1Minute: 60,
kRoundTo5Minutes: 60 * 5,
kRoundTo15Minutes: 60 * 15,
kRoundTo30Minutes: 60 * 30,
kRoundTo1Hour: 60 * 60,
kRoundTo1Day: 60 * 60 * 24,
kRoundToCustom: 0,
};

const int kModuleRecurringInvoices = 1;
const int kModuleCredits = 2;
const int kModuleQuotes = 4;
Expand Down Expand Up @@ -1093,3 +1117,5 @@ const String kActivityEmailPurchaseOrder = '135';
const String kActivityViewPurchaseOrder = '136';
const String kActivityAcceptPurchaseOrder = '137';
const String kActivityEmailPayment = '138';
const String kActivityExpenseNotificationSent = '139';
const String kActivityStatementSent = '140';
7 changes: 7 additions & 0 deletions lib/data/models/client_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class ClientFields {
static const String routingId = 'routing_id';
static const String isTaxExempt = 'tax_exempt';
static const String classification = 'classification';
static const String sizeId = 'size_id';
static const String industryId = 'industry_id';
static const String countryId = 'country_id';
}

abstract class ClientEntity extends Object
Expand Down Expand Up @@ -682,6 +685,10 @@ abstract class ClientEntity extends Object
}
}

if (!isDeleted! && multiselect) {
actions.add(EntityAction.bulkUpdate);
}

if (!isDeleted! && !multiselect) {
if (actions.isNotEmpty && actions.last != null) {
actions.add(null);
Expand Down
7 changes: 6 additions & 1 deletion lib/data/models/company_gateway_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ abstract class CompanyGatewayEntity extends Object
requireCustomValue2: false,
requireCustomValue3: false,
requireCustomValue4: false,
alwaysShowRequiredFields: true,
updateDetails: true,
config: '',
feesAndLimitsMap: BuiltMap<String, FeesAndLimitsSettings>(),
Expand Down Expand Up @@ -197,6 +198,9 @@ abstract class CompanyGatewayEntity extends Object
@BuiltValueField(wireName: 'test_mode')
bool get isTestMode;

@BuiltValueField(wireName: 'always_show_required_fields')
bool get alwaysShowRequiredFields;

String get label;

Map<String, dynamic>? get parsedConfig =>
Expand Down Expand Up @@ -308,7 +312,8 @@ abstract class CompanyGatewayEntity extends Object
..requireCustomValue1 = false
..requireCustomValue2 = false
..requireCustomValue3 = false
..requireCustomValue4 = false;
..requireCustomValue4 = false
..alwaysShowRequiredFields = true;

static Serializer<CompanyGatewayEntity> get serializer =>
_$companyGatewayEntitySerializer;
Expand Down
22 changes: 22 additions & 0 deletions lib/data/models/company_gateway_model.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lib/data/models/entities.dart
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,8 @@ abstract class ActivityEntity
kActivityUpdateClient,
kActivityArchiveClient,
kActivityDeleteClient,
kActivityRestoreClient
kActivityRestoreClient,
kActivityStatementSent,
].contains(activityTypeId)) {
return EntityType.client;
} else if ([
Expand Down Expand Up @@ -841,6 +842,7 @@ abstract class ActivityEntity
kActivityDeleteExpense,
kActivityRestoreExpense,
kActivityUpdateExpense,
kActivityExpenseNotificationSent,
].contains(activityTypeId)) {
return EntityType.expense;
} else if ([
Expand Down
1 change: 1 addition & 0 deletions lib/data/models/models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ class EntityAction extends EnumClass {
static const EntityAction ePurchaseOrder = _$ePurchaseOrder;
static const EntityAction unlink = _$unlink;
static const EntityAction runTemplate = _$runTemplate;
static const EntityAction bulkUpdate = _$bulkUpdate;

@override
String toString() {
Expand Down
4 changes: 4 additions & 0 deletions lib/data/models/models.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions lib/data/models/serializers.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions lib/data/models/settings_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:invoiceninja_flutter/constants.dart';

// Project imports:
import 'package:invoiceninja_flutter/data/models/entities.dart';
Expand Down Expand Up @@ -832,6 +833,19 @@ abstract class SettingsEntity
@BuiltValueField(wireName: 'brevo_secret')
String? get brevoSecret;

@BuiltValueField(wireName: 'task_round_up')
bool? get taskRoundUp;

@BuiltValueField(wireName: 'task_round_to_nearest')
int? get taskRoundToNearest;

bool? get taskRoundingEnabled =>
taskRoundToNearest == null ? null : taskRoundToNearest != 1;

bool get isTaskRoundingCustom =>
taskRoundToNearest == 0 ||
!kTaskRoundingOptions.values.contains(taskRoundToNearest);

bool get hasAddress => address1 != null && address1!.isNotEmpty;

bool get hasLogo => companyLogo != null && companyLogo!.isNotEmpty;
Expand Down
Loading

0 comments on commit 64f2515

Please sign in to comment.