taxtank-core 2.1.27 → 2.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9234,7 +9234,7 @@ class SoleInvoiceCollection extends Collection {
9234
9234
  return this.getOpen().filter(invoice => round(amountPerInvoice.get(invoice.id), 2) < invoice.grossPrice.toFixed(2));
9235
9235
  }
9236
9236
  getOpen() {
9237
- return this.filter((invoice) => invoice.isOpen());
9237
+ return this.filterBy('status', SoleInvoiceStatusesEnum.OPEN);
9238
9238
  }
9239
9239
  getInvoiceItemsIds() {
9240
9240
  return flatten(this.map(invoice => invoice.items.map(item => item.id)));
@@ -16710,6 +16710,12 @@ class SoleInvoiceService extends RestService$1 {
16710
16710
  }
16711
16711
  return list.first.number + 1;
16712
16712
  }
16713
+ getQuotes() {
16714
+ return this.get().pipe(map((invoices) => invoices.filterBy('type', SoleInvoiceTypeEnum.QUOTE)));
16715
+ }
16716
+ getInvoices() {
16717
+ return this.get().pipe(map((invoices) => invoices.filterBy('type', SoleInvoiceTypeEnum.INVOICE)));
16718
+ }
16713
16719
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: SoleInvoiceService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
16714
16720
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: SoleInvoiceService, providedIn: 'root' }); }
16715
16721
  }