taxtank-core 0.32.130 → 0.32.131

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,9 +9,7 @@ import { SoleInvoiceStatusesEnum } from '../../db/Enums/sole-invoice-statuses.en
9
9
  import { BankAccount } from '../bank';
10
10
  import { SoleInvoiceTaxTypeEnum } from '../../db/Enums/sole-invoice-tax-type.enum';
11
11
  import { SoleInvoiceItemCollection } from '../../collections';
12
- import ceil from 'lodash/ceil';
13
12
  import { Transaction, TransactionAllocation } from '../transaction';
14
- import round from 'lodash/round';
15
13
  export class SoleInvoice extends SoleInvoiceBase {
16
14
  constructor() {
17
15
  super(...arguments);
@@ -29,13 +27,13 @@ export class SoleInvoice extends SoleInvoiceBase {
29
27
  * total without GST
30
28
  */
31
29
  get netPrice() {
32
- return ceil(this.itemsCollection.getTotalPrice(this.taxType), 2);
30
+ return this.itemsCollection.getTotalPrice(this.taxType);
33
31
  }
34
32
  /**
35
33
  * total + GST
36
34
  */
37
35
  get grossPrice() {
38
- return ceil(this.itemsCollection.getTotalPrice(this.taxType, true), 2);
36
+ return this.itemsCollection.getTotalPrice(this.taxType, true);
39
37
  }
40
38
  get gstAmount() {
41
39
  return this.grossPrice - this.netPrice;
@@ -116,7 +114,7 @@ export class SoleInvoice extends SoleInvoiceBase {
116
114
  return this.items.map((item) => {
117
115
  const transaction = plainToClass(Transaction, item.toTransaction());
118
116
  transaction.date = date;
119
- transaction.amount = round(item.getTotalPrice(this.taxType) * allocationCoefficient, 2);
117
+ transaction.amount = item.getTotalPrice(this.taxType) * allocationCoefficient;
120
118
  return transaction;
121
119
  });
122
120
  }
@@ -142,4 +140,4 @@ __decorate([
142
140
  __decorate([
143
141
  Type(() => BankAccount)
144
142
  ], SoleInvoice.prototype, "bankAccount", void 0);
145
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29sZS1pbnZvaWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4v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6 @@ import orderBy from 'lodash/orderBy';
19
19
  import uniq from 'lodash/uniq';
20
20
  import moment from 'moment';
21
21
  import { DateRange } from 'moment-range';
22
- import ceil from 'lodash/ceil';
23
22
  import round from 'lodash/round';
24
23
  import range from 'lodash/range';
25
24
  import { Validators, FormGroup, FormArray, UntypedFormControl, UntypedFormArray, UntypedFormGroup, FormControl } from '@angular/forms';
@@ -5024,13 +5023,13 @@ class SoleInvoice extends SoleInvoice$1 {
5024
5023
  * total without GST
5025
5024
  */
5026
5025
  get netPrice() {
5027
- return ceil(this.itemsCollection.getTotalPrice(this.taxType), 2);
5026
+ return this.itemsCollection.getTotalPrice(this.taxType);
5028
5027
  }
5029
5028
  /**
5030
5029
  * total + GST
5031
5030
  */
5032
5031
  get grossPrice() {
5033
- return ceil(this.itemsCollection.getTotalPrice(this.taxType, true), 2);
5032
+ return this.itemsCollection.getTotalPrice(this.taxType, true);
5034
5033
  }
5035
5034
  get gstAmount() {
5036
5035
  return this.grossPrice - this.netPrice;
@@ -5111,7 +5110,7 @@ class SoleInvoice extends SoleInvoice$1 {
5111
5110
  return this.items.map((item) => {
5112
5111
  const transaction = plainToClass(Transaction, item.toTransaction());
5113
5112
  transaction.date = date;
5114
- transaction.amount = round(item.getTotalPrice(this.taxType) * allocationCoefficient, 2);
5113
+ transaction.amount = item.getTotalPrice(this.taxType) * allocationCoefficient;
5115
5114
  return transaction;
5116
5115
  });
5117
5116
  }