Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Nov 12, 2023
2 parents 8449e2e + bc54291 commit 47ac36a
Show file tree
Hide file tree
Showing 47 changed files with 884 additions and 577 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.138"
automatic_release_tag: "v5.0.139"
files: |
${{ github.workspace }}/artifacts/Invoice-Ninja-Archive
${{ github.workspace }}/artifacts/Invoice-Ninja-Hash
Expand Down
6 changes: 5 additions & 1 deletion flatpak/com.invoiceninja.InvoiceNinja.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<summary>Create invoices, accept payments, track expenses &amp; time tasks</summary>
<developer_name>Invoice Ninja</developer_name>
<url type="homepage">https://invoiceninja.com</url>
<url type="help">https://forum.invoiceninja.com</url>
<url type="vcs-browser">https://github.com/invoiceninja/admin-portal</url>
<url type="bugtracker">https://github.com/invoiceninja/admin-portal/issues</url>
<project_license>AAL</project_license>
<metadata_license>CC0-1.0</metadata_license>
<supports>
Expand All @@ -18,7 +21,7 @@
</supports>
<description>
<p>Create. Send. Get Paid.</p>
<p>Invoice Ninja is a leading source-code available platform for SMB’s to invoice, accept payments, track expenses &amp; time billable-tasks. Designed for freelancers and small to medium size businesses, Invoice Ninja is a suite of apps to help you get paid.</p>
<p>Invoice Ninja is a leading platform for SMB’s to invoice, accept payments, track expenses &amp; time billable-tasks. Designed for freelancers and small to medium size businesses, Invoice Ninja is a suite of apps to help you get paid.</p>
<p>
• Incredibly easy to use<br/>
Invoice Ninja was built to serve freelancers and business owners with a complete suite of invoicing &amp; payment tools to advance your business.
Expand Down Expand Up @@ -47,6 +50,7 @@
</screenshots>
<content_rating type="oars-1.1"/>
<releases>
<release version="5.0.139" date="2023-11-12"/>
<release version="5.0.138" date="2023-11-03"/>
<release version="5.0.137" date="2023-11-02"/>
<release version="5.0.136" date="2023-11-01"/>
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.138';
const String kClientVersion = '5.0.139';
const String kMinServerVersion = '5.0.4';

const String kAppName = 'Invoice Ninja';
Expand Down
16 changes: 14 additions & 2 deletions lib/data/models/design_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ abstract class DesignEntity extends Object
kDesignIncludes: '',
}),
isCustom: true,
isTemplate: false,
entities: '',
);
}

Expand All @@ -134,6 +136,11 @@ abstract class DesignEntity extends Object
@BuiltValueField(wireName: 'is_free')
bool get isFree;

@BuiltValueField(wireName: 'is_template')
bool get isTemplate;

String get entities;

DesignEntity get clone => rebuild((b) => b
..id = BaseEntity.nextId
..isChanged = false
Expand Down Expand Up @@ -224,9 +231,14 @@ abstract class DesignEntity extends Object
@override
FormatNumberType? get listDisplayAmountType => null;

bool supportsEntityType(EntityType entityType) =>
isTemplate && entities.split(',').contains(entityType.apiValue);

// ignore: unused_element
static void _initializeBuilder(DesignEntityBuilder builder) =>
builder..isFree = true;
static void _initializeBuilder(DesignEntityBuilder builder) => builder
..isFree = true
..isTemplate = false
..entities = '';

static Serializer<DesignEntity> get serializer => _$designEntitySerializer;
}
44 changes: 44 additions & 0 deletions lib/data/models/design_model.g.dart

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

18 changes: 15 additions & 3 deletions lib/data/models/invoice_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ abstract class InvoiceEntity extends Object
customSurcharge2: 0,
customSurcharge3: 0,
customSurcharge4: 0,
filename: '',
subscriptionId: '',
recurringDates: BuiltList<InvoiceScheduleEntity>(),
lineItems: BuiltList<InvoiceItemEntity>(),
Expand Down Expand Up @@ -554,8 +553,6 @@ abstract class InvoiceEntity extends Object
@BuiltValueField(wireName: 'auto_bill_enabled')
bool get autoBillEnabled;

String? get filename;

@BuiltValueField(wireName: 'recurring_dates')
BuiltList<InvoiceScheduleEntity>? get recurringDates;

Expand Down Expand Up @@ -635,6 +632,21 @@ abstract class InvoiceEntity extends Object
.whereType<InvoiceHistoryEntity>()
.toList();

List<InvoiceHistoryEntity> get balanceHistory => activities
.where((activity) =>
activity.history != null &&
activity.history!.id.isNotEmpty &&
activity.history!.createdAt > 0 &&
![
kActivityViewInvoice,
kActivityViewQuote,
kActivityViewCredit,
kActivityViewPurchaseOrder,
].contains(activity.activityTypeId))
.map((activity) => activity.history)
.whereType<InvoiceHistoryEntity>()
.toList();

bool get isLoaded => loadedAt != null && loadedAt! > 0;

bool get isStale {
Expand Down
23 changes: 0 additions & 23 deletions lib/data/models/invoice_model.g.dart

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

12 changes: 12 additions & 0 deletions lib/data/models/settings_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,18 @@ abstract class SettingsEntity
@BuiltValueField(wireName: 'credit_design_id')
String? get defaultCreditDesignId;

@BuiltValueField(wireName: 'delivery_note_design_id')
String? get defaultDeliveryNoteDesignId;

@BuiltValueField(wireName: 'statement_design_id')
String? get defaultStatementDesignId;

@BuiltValueField(wireName: 'payment_receipt_design_id')
String? get defaultPaymentReceiptDesignId;

@BuiltValueField(wireName: 'payment_refund_design_id')
String? get defaultPaymentRefundDesignId;

@BuiltValueField(wireName: 'invoice_footer')
String? get defaultInvoiceFooter;

Expand Down
Loading

0 comments on commit 47ac36a

Please sign in to comment.