taxtank-core 2.0.2 → 2.0.3

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.
@@ -5193,6 +5193,15 @@ __decorate([
5193
5193
  Type(() => BankAccount)
5194
5194
  ], SoleInvoiceTemplate.prototype, "bankAccount", void 0);
5195
5195
 
5196
+ function TransformDate(format = 'YYYY-MM-DD', params = { toPlainOnly: true }) {
5197
+ return Transform(({ value }) => {
5198
+ if (!(value instanceof Date)) {
5199
+ return value;
5200
+ }
5201
+ return moment(value).format(format);
5202
+ }, params);
5203
+ }
5204
+
5196
5205
  class VehicleLogbook extends VehicleLogbook$1 {
5197
5206
  get kilometers() {
5198
5207
  return this.odometerEnd - this.odometerStart;
@@ -5209,7 +5218,8 @@ class VehicleLogbook extends VehicleLogbook$1 {
5209
5218
  }
5210
5219
  }
5211
5220
  __decorate([
5212
- Type(() => Date)
5221
+ Type(() => Date),
5222
+ TransformDate()
5213
5223
  ], VehicleLogbook.prototype, "date", void 0);
5214
5224
  __decorate([
5215
5225
  Type(() => SoleBusiness)
@@ -6873,15 +6883,6 @@ var TransactionCategoryEnum;
6873
6883
  TransactionCategoryEnum[TransactionCategoryEnum["PERSONAL"] = 3] = "PERSONAL";
6874
6884
  })(TransactionCategoryEnum || (TransactionCategoryEnum = {}));
6875
6885
 
6876
- function TransformDate(format = 'YYYY-MM-DD', params = { toPlainOnly: true }) {
6877
- return Transform(({ value }) => {
6878
- if (!(value instanceof Date)) {
6879
- return value;
6880
- }
6881
- return moment(value).format(format);
6882
- }, params);
6883
- }
6884
-
6885
6886
  /**
6886
6887
  * @TODO Alex: clarify grouping rules and refactor
6887
6888
  */