Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Aug 21, 2024
2 parents 12c3423 + ac889ef commit 25f9fa6
Show file tree
Hide file tree
Showing 22 changed files with 517 additions and 257 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
draft: false
prerelease: false
title: "Latest Release"
automatic_release_tag: "v5.0.161"
automatic_release_tag: "v5.0.162"
files: |
${{ github.workspace }}/artifacts/Invoice-Ninja-Archive
${{ github.workspace }}/artifacts/Invoice-Ninja-Hash
Expand Down
1 change: 1 addition & 0 deletions flatpak/com.invoiceninja.InvoiceNinja.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
</screenshots>
<content_rating type="oars-1.1"/>
<releases>
<release version="5.0.162" date="2024-08-21"/>
<release version="5.0.161" date="2024-06-27"/>
<release version="5.0.160" date="2024-05-22"/>
<release version="5.0.159" date="2024-05-10"/>
Expand Down
4 changes: 2 additions & 2 deletions 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.161';
const String kClientVersion = '5.0.162';
const String kMinServerVersion = '5.0.4';

const String kAppName = 'Invoice Ninja';
Expand All @@ -15,7 +15,7 @@ const String kAppProductionUrl = 'https://invoicing.co';
const String kAppReactUrl = 'https://app.invoicing.co';
const String kAppStagingUrl = 'https://staging.invoicing.co';
const String kAppStagingNetUrl = 'https://invoiceninja.net';
const String kAppLargeTestUrl = 'https://testv5.invoicing.co/';
const String kAppLargeTestUrl = 'https://testv5.invoicing.co';
const String kFlutterDemoUrl = 'https://demo.invoiceninja.com';
const String kReactDemoUrl = 'https://react.invoicing.co/demo';
const String kWhiteLabelUrl =
Expand Down
2 changes: 1 addition & 1 deletion lib/data/models/company_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ abstract class CompanyEntity extends Object
..transactions.replace(BuiltList<TransactionEntity>())
..transactionRules.replace(BuiltList<TransactionRuleEntity>())
..schedules.replace(BuiltList<ScheduleEntity>());
//..eInvoice.replace(BuiltMap<String, dynamic>())
//..eInvoice.replace(BuiltMap<String, dynamic>())

static Serializer<CompanyEntity> get serializer => _$companyEntitySerializer;
}
Expand Down
6 changes: 6 additions & 0 deletions lib/data/models/settings_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ abstract class SettingsEntity
static const MAILGUN_ENDPOINT_US = 'api.mailgun.net';
static const MAILGUN_ENDPOINT_EU = 'api.eu.mailgun.net';

static const PAYMENT_FLOW_DEFAULT = 'default';
static const PAYMENT_FLOW_SMOOTH = 'smooth';

@BuiltValueField(wireName: 'timezone_id')
String? get timezoneId;

Expand Down Expand Up @@ -864,6 +867,9 @@ abstract class SettingsEntity
@BuiltValueField(wireName: 'merge_e_invoice_to_pdf')
bool? get mergeEInvoiceToPdf;

@BuiltValueField(wireName: 'payment_flow')
String? get paymentFlow;

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

Expand Down
31 changes: 27 additions & 4 deletions lib/data/models/settings_model.g.dart

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

13 changes: 11 additions & 2 deletions lib/data/models/transaction_rule_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ abstract class TransactionRuleCriteriaEntity
factory TransactionRuleCriteriaEntity(
{String? searchKey, String? operator, String? value}) {
return _$TransactionRuleCriteriaEntity._(
searchKey: searchKey ?? SEARCH_KEY_DESCRIPTION,
operator: operator ?? STRING_OPERATOR_CONTAINS,
searchKey: searchKey ?? '',
operator: operator ?? '',
value: value ?? '',
);
}
Expand All @@ -202,6 +202,15 @@ abstract class TransactionRuleCriteriaEntity
static const SEARCH_KEY_DESCRIPTION = 'description';
static const SEARCH_KEY_AMOUNT = 'amount';

static const SEARCH_KEY_CLIENT_EMAIL = 'client.email';
static const SEARCH_KEY_CLIENT_ID_NUMBER = 'client.id_number';
static const SEARCH_KEY_INVOICE_NUMBER = 'invoice.number';
static const SEARCH_KEY_INVOICE_AMOUNT = 'invoice.amount';
static const SEARCH_KEY_INVOICE_PO_NUMBER = 'invoice.po_number';
static const SEARCH_KEY_PAYMENT_AMOUNT = 'payment.amount';
static const SEARCH_KEY_PAYMENT_TRANSACTION_REFERENCE =
'payment.transaction_reference';

static const NUMBER_OPERATOR_EQUALS = '=';
static const NUMBER_OPERATOR_GREATER_THAN = '>';
static const NUMBER_OPERATOR_GREATER_THAN_OR_EQUALS = '>=';
Expand Down
2 changes: 2 additions & 0 deletions lib/data/models/webhook_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ abstract class WebhookEntity extends Object
static const EVENT_SENT_CREDIT = '62';
static const EVENT_SENT_PURCHASE_ORDER = '63';
static const EVENT_REMIND_QUOTE = '64';
static const EVENT_ACCEPT_PURCHASE_ORDER = '65';

static const EVENT_MAP = {
EVENT_CREATE_CLIENT: 'create_client',
Expand Down Expand Up @@ -203,6 +204,7 @@ abstract class WebhookEntity extends Object
EVENT_DELETE_PURCHASE_ORDER: 'delete_purchase_order',
EVENT_RESTORE_PURCHASE_ORDER: 'restore_purchase_order',
EVENT_ARCHIVE_PURCHASE_ORDER: 'archive_purchase_order',
EVENT_ACCEPT_PURCHASE_ORDER: 'accept_purchase_order',
};

@override
Expand Down
4 changes: 4 additions & 0 deletions lib/data/web_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class WebClient {
const WebClient();

Future<bool> _isOnline() async {
if (!isMobileOS()) {
return true;
}

final ConnectionStatusSingleton connectionStatus =
ConnectionStatusSingleton.getInstance();
await connectionStatus.checkConnection();
Expand Down
2 changes: 1 addition & 1 deletion lib/redux/app/app_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ void editEntity({

if (settings.lockInvoices ==
SettingsEntity.LOCK_INVOICES_WHEN_PAID &&
invoice.isPaid) {
(invoice.isPaid || invoice.isPartial)) {
showMessageDialog(message: localization!.paidInvoicesArelocked);
} else if (settings.lockInvoices ==
SettingsEntity.LOCK_INVOICES_WHEN_SENT &&
Expand Down
3 changes: 2 additions & 1 deletion lib/redux/dashboard/dashboard_selectors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,8 @@ List<ChartDataGroup> chartExpenses(
// Handle "All"
if (settings.currencyId == kCurrencyAll &&
currencyId != company.currencyId) {
final exchangeRate = expense.hasExchangeRate
final exchangeRate = expense.hasExchangeRate &&
expense.invoiceCurrencyId == company.currencyId
? expense.exchangeRate
: getExchangeRate(currencyMap,
fromCurrencyId: currencyId, toCurrencyId: company.currencyId);
Expand Down
Loading

0 comments on commit 25f9fa6

Please sign in to comment.