@intelact/driveup 2.4.6 → 2.4.7

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.
@@ -1,33 +1,39 @@
1
- import { Address, StatusType, TrainingType } from "@driveup/shared";
1
+ import { Address, BankAccount, Person, StatusType, Tax } from "@driveup/shared";
2
+ import { Company } from "../company/company.model";
2
3
  import { Finance } from "../finance/finance.model";
4
+ import { Student } from "../student/student.model";
3
5
  import { Training } from "../training/training.model";
4
6
  import { InvoiceItem } from "./item.model";
5
7
  export declare class Invoice {
6
8
  id: number;
7
- trainign: Training;
8
- trainingType: TrainingType;
9
- vat: number;
10
- note: string;
9
+ status: StatusType;
11
10
  number: number;
12
11
  invoiceDate: Date;
13
12
  dueDate: Date;
13
+ vat: number;
14
+ subtotalAmount: number;
15
+ totalVatAmount: number;
14
16
  totalAmount: number;
15
- companyAddress: Address;
16
- companyPhone: string;
17
- status: StatusType;
18
- IBAN: string;
19
- SWIFT: string;
20
- taxID: string;
21
- accountHolder: string;
17
+ address: Address;
18
+ bankAccount: BankAccount;
19
+ tax: Tax;
20
+ note: string;
21
+ /******************** relations ********************/
22
+ company: Company[];
23
+ student: Student;
24
+ training: Training;
22
25
  items: InvoiceItem[];
23
- payment: Finance;
24
- createdBy: any;
26
+ transaction: Finance;
27
+ /******************** audits ********************/
28
+ createdBy: Person;
25
29
  createdOn: Date;
26
- generatedBy: any;
30
+ updatedBy: Person;
31
+ updatedOn: Date;
32
+ generatedBy: Person;
27
33
  generatedOn: Date;
28
- paidBy: any;
34
+ paidBy: Person;
29
35
  paidOn: Date;
30
- canceledBy: any;
36
+ canceledBy: Person;
31
37
  canceledOn: Date;
32
38
  constructor(props?: Partial<Invoice>);
33
39
  }
@@ -12,7 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Invoice = void 0;
13
13
  const shared_1 = require("@driveup/shared");
14
14
  const class_transformer_1 = require("class-transformer");
15
+ const company_model_1 = require("../company/company.model");
15
16
  const finance_model_1 = require("../finance/finance.model");
17
+ const student_model_1 = require("../student/student.model");
16
18
  const training_model_1 = require("../training/training.model");
17
19
  const item_model_1 = require("./item.model");
18
20
  class Invoice {
@@ -26,19 +28,10 @@ __decorate([
26
28
  (0, class_transformer_1.Type)(() => Number),
27
29
  __metadata("design:type", Number)
28
30
  ], Invoice.prototype, "id", void 0);
29
- __decorate([
30
- (0, class_transformer_1.Expose)(),
31
- (0, class_transformer_1.Type)(() => training_model_1.Training),
32
- __metadata("design:type", training_model_1.Training)
33
- ], Invoice.prototype, "trainign", void 0);
34
- __decorate([
35
- (0, class_transformer_1.Expose)(),
36
- __metadata("design:type", String)
37
- ], Invoice.prototype, "trainingType", void 0);
38
31
  __decorate([
39
32
  (0, class_transformer_1.Expose)(),
40
33
  __metadata("design:type", String)
41
- ], Invoice.prototype, "note", void 0);
34
+ ], Invoice.prototype, "status", void 0);
42
35
  __decorate([
43
36
  (0, class_transformer_1.Expose)(),
44
37
  (0, class_transformer_1.Type)(() => Number),
@@ -54,6 +47,21 @@ __decorate([
54
47
  (0, class_transformer_1.Type)(() => Date),
55
48
  __metadata("design:type", Date)
56
49
  ], Invoice.prototype, "dueDate", void 0);
50
+ __decorate([
51
+ (0, class_transformer_1.Expose)(),
52
+ (0, class_transformer_1.Type)(() => Number),
53
+ __metadata("design:type", Number)
54
+ ], Invoice.prototype, "vat", void 0);
55
+ __decorate([
56
+ (0, class_transformer_1.Expose)(),
57
+ (0, class_transformer_1.Type)(() => Number),
58
+ __metadata("design:type", Number)
59
+ ], Invoice.prototype, "subtotalAmount", void 0);
60
+ __decorate([
61
+ (0, class_transformer_1.Expose)(),
62
+ (0, class_transformer_1.Type)(() => Number),
63
+ __metadata("design:type", Number)
64
+ ], Invoice.prototype, "totalVatAmount", void 0);
57
65
  __decorate([
58
66
  (0, class_transformer_1.Expose)(),
59
67
  (0, class_transformer_1.Type)(() => Number),
@@ -63,31 +71,36 @@ __decorate([
63
71
  (0, class_transformer_1.Expose)(),
64
72
  (0, class_transformer_1.Type)(() => shared_1.Address),
65
73
  __metadata("design:type", shared_1.Address)
66
- ], Invoice.prototype, "companyAddress", void 0);
74
+ ], Invoice.prototype, "address", void 0);
67
75
  __decorate([
68
76
  (0, class_transformer_1.Expose)(),
69
- __metadata("design:type", String)
70
- ], Invoice.prototype, "companyPhone", void 0);
77
+ (0, class_transformer_1.Type)(() => shared_1.BankAccount),
78
+ __metadata("design:type", shared_1.BankAccount)
79
+ ], Invoice.prototype, "bankAccount", void 0);
71
80
  __decorate([
72
81
  (0, class_transformer_1.Expose)(),
73
- __metadata("design:type", String)
74
- ], Invoice.prototype, "status", void 0);
82
+ (0, class_transformer_1.Type)(() => shared_1.Tax),
83
+ __metadata("design:type", shared_1.Tax)
84
+ ], Invoice.prototype, "tax", void 0);
75
85
  __decorate([
76
86
  (0, class_transformer_1.Expose)(),
77
87
  __metadata("design:type", String)
78
- ], Invoice.prototype, "IBAN", void 0);
88
+ ], Invoice.prototype, "note", void 0);
79
89
  __decorate([
80
90
  (0, class_transformer_1.Expose)(),
81
- __metadata("design:type", String)
82
- ], Invoice.prototype, "SWIFT", void 0);
91
+ (0, class_transformer_1.Type)(() => company_model_1.Company),
92
+ __metadata("design:type", Array)
93
+ ], Invoice.prototype, "company", void 0);
83
94
  __decorate([
84
95
  (0, class_transformer_1.Expose)(),
85
- __metadata("design:type", String)
86
- ], Invoice.prototype, "taxID", void 0);
96
+ (0, class_transformer_1.Type)(() => student_model_1.Student),
97
+ __metadata("design:type", student_model_1.Student)
98
+ ], Invoice.prototype, "student", void 0);
87
99
  __decorate([
88
100
  (0, class_transformer_1.Expose)(),
89
- __metadata("design:type", String)
90
- ], Invoice.prototype, "accountHolder", void 0);
101
+ (0, class_transformer_1.Type)(() => training_model_1.Training),
102
+ __metadata("design:type", training_model_1.Training)
103
+ ], Invoice.prototype, "training", void 0);
91
104
  __decorate([
92
105
  (0, class_transformer_1.Expose)(),
93
106
  (0, class_transformer_1.Type)(() => item_model_1.InvoiceItem),
@@ -97,10 +110,11 @@ __decorate([
97
110
  (0, class_transformer_1.Expose)(),
98
111
  (0, class_transformer_1.Type)(() => finance_model_1.Finance),
99
112
  __metadata("design:type", finance_model_1.Finance)
100
- ], Invoice.prototype, "payment", void 0);
113
+ ], Invoice.prototype, "transaction", void 0);
101
114
  __decorate([
102
115
  (0, class_transformer_1.Expose)(),
103
- __metadata("design:type", Object)
116
+ (0, class_transformer_1.Type)(() => shared_1.Person),
117
+ __metadata("design:type", shared_1.Person)
104
118
  ], Invoice.prototype, "createdBy", void 0);
105
119
  __decorate([
106
120
  (0, class_transformer_1.Expose)(),
@@ -109,7 +123,18 @@ __decorate([
109
123
  ], Invoice.prototype, "createdOn", void 0);
110
124
  __decorate([
111
125
  (0, class_transformer_1.Expose)(),
112
- __metadata("design:type", Object)
126
+ (0, class_transformer_1.Type)(() => shared_1.Person),
127
+ __metadata("design:type", shared_1.Person)
128
+ ], Invoice.prototype, "updatedBy", void 0);
129
+ __decorate([
130
+ (0, class_transformer_1.Expose)(),
131
+ (0, class_transformer_1.Type)(() => Date),
132
+ __metadata("design:type", Date)
133
+ ], Invoice.prototype, "updatedOn", void 0);
134
+ __decorate([
135
+ (0, class_transformer_1.Expose)(),
136
+ (0, class_transformer_1.Type)(() => shared_1.Person),
137
+ __metadata("design:type", shared_1.Person)
113
138
  ], Invoice.prototype, "generatedBy", void 0);
114
139
  __decorate([
115
140
  (0, class_transformer_1.Expose)(),
@@ -118,7 +143,8 @@ __decorate([
118
143
  ], Invoice.prototype, "generatedOn", void 0);
119
144
  __decorate([
120
145
  (0, class_transformer_1.Expose)(),
121
- __metadata("design:type", Object)
146
+ (0, class_transformer_1.Type)(() => shared_1.Person),
147
+ __metadata("design:type", shared_1.Person)
122
148
  ], Invoice.prototype, "paidBy", void 0);
123
149
  __decorate([
124
150
  (0, class_transformer_1.Expose)(),
@@ -127,7 +153,8 @@ __decorate([
127
153
  ], Invoice.prototype, "paidOn", void 0);
128
154
  __decorate([
129
155
  (0, class_transformer_1.Expose)(),
130
- __metadata("design:type", Object)
156
+ (0, class_transformer_1.Type)(() => shared_1.Person),
157
+ __metadata("design:type", shared_1.Person)
131
158
  ], Invoice.prototype, "canceledBy", void 0);
132
159
  __decorate([
133
160
  (0, class_transformer_1.Expose)(),
@@ -1 +1 @@
1
- {"version":3,"file":"invoice.model.js","sourceRoot":"","sources":["../../src/invoice/invoice.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAoE;AACpE,yDAAiD;AAEjD,4DAAmD;AACnD,+DAAsD;AACtD,6CAA2C;AAE3C,MAAa,OAAO;IA2FnB,YAAY,KAAwB;QACnC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AA9FD,0BA8FC;AA3FA;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;mCACR;AAIX;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,yBAAQ,CAAC;8BACX,yBAAQ;yCAAC;AAGnB;IADC,IAAA,0BAAM,GAAE;;6CACkB;AAK3B;IADC,IAAA,0BAAM,GAAE;;qCACI;AAIb;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;uCACJ;AAIf;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACJ,IAAI;4CAAC;AAIlB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACR,IAAI;wCAAC;AAId;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;4CACC;AAIpB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EA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J,IAAI;4CAAC;AAIlB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;8BACX,eAAM;uCAAC;AAIf;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACT,IAAI;uCAAC;AAIb;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAM,CAAC;8BACP,eAAM;2CAAC;AAInB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;8BACL,IAAI;2CAAC"}
@@ -3,5 +3,6 @@ export declare class InvoiceItem {
3
3
  description: string;
4
4
  amountPerUnit: number;
5
5
  quantity: number;
6
+ totalAmount: number;
6
7
  constructor(props?: Partial<InvoiceItem>);
7
8
  }
@@ -28,6 +28,7 @@ __decorate([
28
28
  ], InvoiceItem.prototype, "description", void 0);
29
29
  __decorate([
30
30
  (0, class_transformer_1.Expose)(),
31
+ (0, class_transformer_1.Type)(() => Number),
31
32
  __metadata("design:type", Number)
32
33
  ], InvoiceItem.prototype, "amountPerUnit", void 0);
33
34
  __decorate([
@@ -35,4 +36,9 @@ __decorate([
35
36
  (0, class_transformer_1.Type)(() => Number),
36
37
  __metadata("design:type", Number)
37
38
  ], InvoiceItem.prototype, "quantity", void 0);
39
+ __decorate([
40
+ (0, class_transformer_1.Expose)(),
41
+ (0, class_transformer_1.Type)(() => Number),
42
+ __metadata("design:type", Number)
43
+ ], InvoiceItem.prototype, "totalAmount", void 0);
38
44
  //# sourceMappingURL=item.model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"item.model.js","sourceRoot":"","sources":["../../src/invoice/item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AAEjD,MAAa,WAAW;IAevB,YAAY,KAA4B;QACvC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAlBD,kCAkBC;AAfA;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;uCACR;AAGX;IADC,IAAA,0BAAM,GAAE;;gDACW;AAGpB;IADC,IAAA,0BAAM,GAAE;;kDACa;AAItB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;6CACF"}
1
+ {"version":3,"file":"item.model.js","sourceRoot":"","sources":["../../src/invoice/item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiD;AAEjD,MAAa,WAAW;IAqBvB,YAAY,KAA4B;QACvC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;CACD;AAxBD,kCAwBC;AApBA;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;uCACR;AAGX;IADC,IAAA,0BAAM,GAAE;;gDACW;AAIpB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;kDACG;AAItB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;6CACF;AAIjB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;gDACC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intelact/driveup",
3
- "version": "2.4.6",
3
+ "version": "2.4.7",
4
4
  "description": "Driveup Common",
5
5
  "author": "Intelact Solutions Ltd.",
6
6
  "main": "lib/index.js",