taxtank-core 2.1.38 → 2.1.40

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.
@@ -5496,6 +5496,9 @@ class SoleInvoice extends SoleInvoice$1 {
5496
5496
  get itemsCollection() {
5497
5497
  return new SoleInvoiceItemCollection(this.items);
5498
5498
  }
5499
+ get totalPrice() {
5500
+ return this.itemsCollection.sumBy('totalPrice');
5501
+ }
5499
5502
  /**
5500
5503
  * total without GST
5501
5504
  */
@@ -5629,6 +5632,12 @@ __decorate([
5629
5632
  __decorate([
5630
5633
  Type(() => BankAccount)
5631
5634
  ], SoleInvoice.prototype, "bankAccount", void 0);
5635
+ __decorate([
5636
+ Type(() => Date)
5637
+ ], SoleInvoice.prototype, "createdAt", void 0);
5638
+ __decorate([
5639
+ Type(() => Date)
5640
+ ], SoleInvoice.prototype, "updatedAt", void 0);
5632
5641
 
5633
5642
  class SoleInvoiceTemplate extends SoleInvoiceTemplate$1 {
5634
5643
  constructor() {
@@ -16784,7 +16793,7 @@ class SoleInvoiceService extends RestService$1 {
16784
16793
  return this.put(invoice, `${this.apiUrl}/${invoice.id}/send`);
16785
16794
  }
16786
16795
  download(invoice) {
16787
- return this.http.get(`${this.apiUrl}/${invoice.id}/download`, { responseType: 'blob' });
16796
+ return this.http.get(`${this.apiUrl}/${invoice.id}/download?v=${invoice.updatedAt.getTime()}`, { responseType: 'blob' });
16788
16797
  }
16789
16798
  /**
16790
16799
  * Return the next number from the last invoice