@tomei/finance 0.2.11 → 0.2.13
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.
- package/dist/account/account.d.ts +1 -7
- package/dist/account/account.js +1 -7
- package/dist/account/account.js.map +1 -1
- package/dist/account-system-entity/account-system-entity.d.ts +18 -7
- package/dist/account-system-entity/account-system-entity.js +59 -8
- package/dist/account-system-entity/account-system-entity.js.map +1 -1
- package/dist/account-system-entity/index.d.ts +2 -0
- package/dist/account-system-entity/index.js +6 -0
- package/dist/account-system-entity/index.js.map +1 -0
- package/dist/account-system-entity/post-history.entity.d.ts +11 -0
- package/dist/account-system-entity/post-history.entity.js +65 -0
- package/dist/account-system-entity/post-history.entity.js.map +1 -0
- package/dist/account-system-entity/post-history.repository.d.ts +5 -0
- package/dist/account-system-entity/post-history.repository.js +13 -0
- package/dist/account-system-entity/post-history.repository.js.map +1 -0
- package/dist/customer/customer.d.ts +18 -13
- package/dist/customer/customer.js +18 -13
- package/dist/customer/customer.js.map +1 -1
- package/dist/customer/entities/customer.entity.d.ts +9 -4
- package/dist/customer/entities/customer.entity.js +46 -9
- package/dist/customer/entities/customer.entity.js.map +1 -1
- package/dist/customer/index.d.ts +2 -2
- package/dist/customer/index.js +3 -3
- package/dist/customer/index.js.map +1 -1
- package/dist/customer/interfaces/finance-customer-attr.interface.d.ts +7 -1
- package/dist/document/document.d.ts +2 -6
- package/dist/document/document.js +1 -2
- package/dist/document/document.js.map +1 -1
- package/dist/finance-company/entities/finance-company.entity.d.ts +13 -0
- package/dist/finance-company/entities/finance-company.entity.js +113 -0
- package/dist/finance-company/entities/finance-company.entity.js.map +1 -0
- package/dist/finance-company/finance-company.d.ts +23 -8
- package/dist/finance-company/finance-company.js +75 -16
- package/dist/finance-company/finance-company.js.map +1 -1
- package/dist/finance-company/finance-company.repository.d.ts +10 -0
- package/dist/finance-company/finance-company.repository.js +38 -0
- package/dist/finance-company/finance-company.repository.js.map +1 -0
- package/dist/finance-company/index.d.ts +5 -1
- package/dist/finance-company/index.js +5 -1
- package/dist/finance-company/index.js.map +1 -1
- package/dist/finance-company/interfaces/finance-company-attr.interface.d.ts +10 -0
- package/dist/finance-company/interfaces/finance-company-attr.interface.js +3 -0
- package/dist/finance-company/interfaces/finance-company-attr.interface.js.map +1 -0
- package/dist/finance-company/interfaces/finance-company.repository.interface.d.ts +3 -0
- package/dist/finance-company/interfaces/finance-company.repository.interface.js +3 -0
- package/dist/finance-company/interfaces/finance-company.repository.interface.js.map +1 -0
- package/dist/journal-entry/interfaces/journal-entry-attr.interface.d.ts +2 -2
- package/dist/journal-entry/journal-entry.d.ts +1 -7
- package/dist/journal-entry/journal-entry.js +3 -10
- package/dist/journal-entry/journal-entry.js.map +1 -1
- package/dist/ledger-transaction/interfaces/ledger-transaction-attr.interface.d.ts +1 -1
- package/dist/payment/payment.d.ts +1 -7
- package/dist/payment/payment.js +1 -8
- package/dist/payment/payment.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/migrations/finance-company-migration.js +45 -0
- package/migrations/finance-customer-migration.js +23 -5
- package/migrations/finance-post-history-migration.js +45 -0
- package/package.json +2 -2
- package/src/account/account.ts +4 -15
- package/src/account-system-entity/account-system-entity.ts +82 -12
- package/src/account-system-entity/index.ts +3 -0
- package/src/account-system-entity/post-history.entity.ts +41 -0
- package/src/account-system-entity/post-history.repository.ts +12 -0
- package/src/customer/customer.ts +38 -26
- package/src/customer/entities/customer.entity.ts +50 -10
- package/src/customer/index.ts +2 -2
- package/src/customer/interfaces/finance-customer-attr.interface.ts +7 -1
- package/src/document/document.ts +2 -6
- package/src/finance-company/entities/finance-company.entity.ts +88 -0
- package/src/finance-company/finance-company.repository.ts +30 -0
- package/src/finance-company/finance-company.ts +152 -24
- package/src/finance-company/index.ts +11 -1
- package/src/finance-company/interfaces/finance-company-attr.interface.ts +10 -0
- package/src/finance-company/interfaces/finance-company.repository.interface.ts +4 -0
- package/src/journal-entry/interfaces/journal-entry-attr.interface.ts +2 -2
- package/src/journal-entry/journal-entry.ts +3 -19
- package/src/ledger-transaction/interfaces/ledger-transaction-attr.interface.ts +1 -2
- package/src/payment/payment.ts +1 -18
|
@@ -2,13 +2,11 @@ import { IAccountRepository } from './interfaces/account.repository.interface';
|
|
|
2
2
|
import { AccountModel } from './entities/account.entity';
|
|
3
3
|
import { ObjectBase, LoginUserBase } from '@tomei/general';
|
|
4
4
|
import { IBaseRepository } from '@tomei/general/dist/interfaces/repository.base.interface';
|
|
5
|
-
import { AccountSystemEntity } from '../account-system-entity
|
|
5
|
+
import { AccountSystemEntity } from '../account-system-entity';
|
|
6
6
|
export declare class Account extends AccountSystemEntity {
|
|
7
7
|
protected BaseRepository: any;
|
|
8
8
|
ObjectId: string;
|
|
9
9
|
ObjectName: string;
|
|
10
|
-
get objectId(): string;
|
|
11
|
-
get objectName(): string;
|
|
12
10
|
accountRepository: IAccountRepository;
|
|
13
11
|
AccountNo: string;
|
|
14
12
|
Owner: LoginUserBase;
|
|
@@ -20,16 +18,12 @@ export declare class Account extends AccountSystemEntity {
|
|
|
20
18
|
private RelatedObjectId;
|
|
21
19
|
private RelatedObjectType;
|
|
22
20
|
private ParentAccountNo;
|
|
23
|
-
AccSystemRefId: string;
|
|
24
21
|
SystemCode: string;
|
|
25
22
|
AccSystemCode: string;
|
|
26
23
|
Name: string;
|
|
27
24
|
Description: string;
|
|
28
25
|
AccountType: string;
|
|
29
26
|
AccountSubtype: string;
|
|
30
|
-
PostedToAccSystemYN: 'N';
|
|
31
|
-
PostedById: string;
|
|
32
|
-
PostedDateTime: Date;
|
|
33
27
|
CreatedAt: Date;
|
|
34
28
|
CreatedById: string;
|
|
35
29
|
constructor(accountRepository?: IBaseRepository<AccountModel>, accountNo?: string);
|
package/dist/account/account.js
CHANGED
|
@@ -2,14 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Account = void 0;
|
|
4
4
|
const general_1 = require("@tomei/general");
|
|
5
|
-
const account_system_entity_1 = require("../account-system-entity
|
|
5
|
+
const account_system_entity_1 = require("../account-system-entity");
|
|
6
6
|
class Account extends account_system_entity_1.AccountSystemEntity {
|
|
7
|
-
get objectId() {
|
|
8
|
-
return '';
|
|
9
|
-
}
|
|
10
|
-
get objectName() {
|
|
11
|
-
return '';
|
|
12
|
-
}
|
|
13
7
|
constructor(accountRepository, accountNo) {
|
|
14
8
|
super();
|
|
15
9
|
this.isNewRecord = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/account/account.ts"],"names":[],"mappings":";;;AAEA,4CAAgF;AAEhF,
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/account/account.ts"],"names":[],"mappings":";;;AAEA,4CAAgF;AAEhF,oEAA+D;AAC/D,MAAa,OAAQ,SAAQ,2CAAmB;IA8B9C,YACE,iBAAiD,EACjD,SAAkB;QAElB,KAAK,EAAE,CAAC;QAxBF,gBAAW,GAAG,IAAI,CAAC;QAyBzB,IAAI,iBAAiB,IAAI,SAAS,EAAE;YAClC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;YAC3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAC3B,MAAM,WAAW,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;gBACjD,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE;aAChC,CAAC,CAAC;YACH,IAAI,WAAW,EAAE;gBACf,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;gBACzB,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,eAAe,CAAC;gBACnD,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;gBACzC,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC,aAAa,CAAC;gBAC/C,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;gBACjD,IAAI,CAAC,IAAI,GAAG,WAA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cAAc;iBACpC,CAAC,CAAC;gBAEH,IAAI,OAAO,EAAE;oBACX,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;oBACnC,OAAO,IAAI,CAAC,SAAS,CAAC;iBACvB;qBAAM;oBACL,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;iBACtD;aACF;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,KAAK,CAAC;aACb;SACF;IACH,CAAC;CACF;AA1JD,0BA0JC"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import { IBaseRepository, LoginUserBase, ObjectBase } from '@tomei/general';
|
|
2
2
|
export declare abstract class AccountSystemEntity extends ObjectBase {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
protected abstract BaseRepository: IBaseRepository
|
|
9
|
-
|
|
3
|
+
private _CompanyId;
|
|
4
|
+
private _PostedToAccSystemYN;
|
|
5
|
+
private _AccSystemRefId;
|
|
6
|
+
private _PostedById;
|
|
7
|
+
private _PostedDateTime;
|
|
8
|
+
protected abstract BaseRepository: IBaseRepository<any>;
|
|
9
|
+
private static PostHistoryRepository;
|
|
10
|
+
get CompanyId(): string;
|
|
11
|
+
protected set CompanyId(value: string);
|
|
12
|
+
get PostedToAccSystemYN(): string;
|
|
13
|
+
set PostedToAccSystemYN(value: string);
|
|
14
|
+
get AccSystemRefId(): string;
|
|
15
|
+
set AccSystemRefId(value: string);
|
|
16
|
+
get PostedById(): string;
|
|
17
|
+
set PostedById(value: string);
|
|
18
|
+
get PostedDateTime(): Date;
|
|
19
|
+
set PostedDateTime(value: Date);
|
|
20
|
+
postToAccSystem(dbTransaction: any, loginUser: LoginUserBase): Promise<void>;
|
|
10
21
|
}
|
|
@@ -2,19 +2,69 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AccountSystemEntity = void 0;
|
|
4
4
|
const general_1 = require("@tomei/general");
|
|
5
|
+
const finance_company_1 = require("../finance-company");
|
|
6
|
+
const post_history_repository_1 = require("./post-history.repository");
|
|
7
|
+
const cuid_1 = require("cuid");
|
|
5
8
|
class AccountSystemEntity extends general_1.ObjectBase {
|
|
6
9
|
constructor() {
|
|
7
10
|
super(...arguments);
|
|
8
|
-
this.
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
11
|
+
this._CompanyId = 'New';
|
|
12
|
+
this._PostedToAccSystemYN = 'N';
|
|
13
|
+
this._AccSystemRefId = '';
|
|
14
|
+
this._PostedById = '';
|
|
12
15
|
}
|
|
13
|
-
|
|
16
|
+
get CompanyId() {
|
|
17
|
+
return this._CompanyId;
|
|
18
|
+
}
|
|
19
|
+
set CompanyId(value) {
|
|
20
|
+
this._CompanyId = value;
|
|
21
|
+
}
|
|
22
|
+
get PostedToAccSystemYN() {
|
|
23
|
+
return this._PostedToAccSystemYN;
|
|
24
|
+
}
|
|
25
|
+
set PostedToAccSystemYN(value) {
|
|
26
|
+
this._PostedToAccSystemYN = value;
|
|
27
|
+
}
|
|
28
|
+
get AccSystemRefId() {
|
|
29
|
+
return this._AccSystemRefId;
|
|
30
|
+
}
|
|
31
|
+
set AccSystemRefId(value) {
|
|
32
|
+
this._AccSystemRefId = value;
|
|
33
|
+
}
|
|
34
|
+
get PostedById() {
|
|
35
|
+
return this._PostedById;
|
|
36
|
+
}
|
|
37
|
+
set PostedById(value) {
|
|
38
|
+
this._PostedById = value;
|
|
39
|
+
}
|
|
40
|
+
get PostedDateTime() {
|
|
41
|
+
return this._PostedDateTime;
|
|
42
|
+
}
|
|
43
|
+
set PostedDateTime(value) {
|
|
44
|
+
this._PostedDateTime = value;
|
|
45
|
+
}
|
|
46
|
+
async postToAccSystem(dbTransaction, loginUser) {
|
|
14
47
|
try {
|
|
15
|
-
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
48
|
+
const company = finance_company_1.FinanceCompany.getFinanceCompany(this.CompanyId);
|
|
49
|
+
this._PostedToAccSystemYN = 'Y';
|
|
50
|
+
this._PostedById = loginUser.ObjectId;
|
|
51
|
+
this._PostedDateTime = new Date();
|
|
52
|
+
const entity = await this.BaseRepository.findByPk(this.ObjectId);
|
|
53
|
+
const updated = await entity.update({
|
|
54
|
+
PostedToAccSystemYN: this._PostedToAccSystemYN,
|
|
55
|
+
PostedById: this._PostedById,
|
|
56
|
+
PostedDateTime: this._PostedDateTime,
|
|
57
|
+
}, { transaction: dbTransaction });
|
|
58
|
+
await AccountSystemEntity.PostHistoryRepository.create({
|
|
59
|
+
PostId: (0, cuid_1.default)(),
|
|
60
|
+
DateTime: this._PostedDateTime,
|
|
61
|
+
ItemId: this.ObjectId,
|
|
62
|
+
ItemType: this.TableName,
|
|
63
|
+
ItemValue: JSON.stringify(updated),
|
|
64
|
+
PostedById: this._PostedById,
|
|
65
|
+
AccSystemCode: company.AccSystemCode,
|
|
66
|
+
AccSystemRefId: this._AccSystemRefId,
|
|
67
|
+
}, { transaction: dbTransaction });
|
|
18
68
|
}
|
|
19
69
|
catch (err) {
|
|
20
70
|
throw err;
|
|
@@ -22,4 +72,5 @@ class AccountSystemEntity extends general_1.ObjectBase {
|
|
|
22
72
|
}
|
|
23
73
|
}
|
|
24
74
|
exports.AccountSystemEntity = AccountSystemEntity;
|
|
75
|
+
AccountSystemEntity.PostHistoryRepository = new post_history_repository_1.PostHistoryRepository();
|
|
25
76
|
//# sourceMappingURL=account-system-entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-system-entity.js","sourceRoot":"","sources":["../../src/account-system-entity/account-system-entity.ts"],"names":[],"mappings":";;;AAAA,4CAA4E;
|
|
1
|
+
{"version":3,"file":"account-system-entity.js","sourceRoot":"","sources":["../../src/account-system-entity/account-system-entity.ts"],"names":[],"mappings":";;;AAAA,4CAA4E;AAC5E,wDAAoD;AACpD,uEAAkE;AAClE,+BAAwB;AAExB,MAAsB,mBAAoB,SAAQ,oBAAU;IAA5D;;QACU,e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,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACjE,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,MAAM,CACjC;gBACE,mBAAmB,EAAE,IAAI,CAAC,oBAAoB;gBAC9C,UAAU,EAAE,IAAI,CAAC,WAAW;gBAC5B,cAAc,EAAE,IAAI,CAAC,eAAe;aACrC,EACD,EAAE,WAAW,EAAE,aAAa,EAAE,CAC/B,CAAC;YAGF,MAAM,mBAAmB,CAAC,qBAAqB,CAAC,MAAM,CACpD;gBACE,MAAM,EAAE,IAAA,cAAI,GAAE;gBACd,QAAQ,EAAE,IAAI,CAAC,eAAe;gBAC9B,MAAM,EAAE,IAAI,CAAC,QAAQ;gBACrB,QAAQ,EAAE,IAAI,CAAC,SAAS;gBACxB,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;gBAClC,UAAU,EAAE,IAAI,CAAC,WAAW;gBAC5B,aAAa,EAAE,OAAO,CAAC,aAAa;gBACpC,cAAc,EAAE,IAAI,CAAC,eAAe;aACrC,EACD,EAAE,WAAW,EAAE,aAAa,EAAE,CAC/B,CAAC;SACH;QAAC,OAAO,GAAG,EAAE;YACZ,MAAM,GAAG,CAAC;SACX;IACH,CAAC;;AA/FH,kDAgGC;AAzFgB,yCAAqB,GAAG,IAAI,+CAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccountSystemEntity = void 0;
|
|
4
|
+
const account_system_entity_1 = require("./account-system-entity");
|
|
5
|
+
Object.defineProperty(exports, "AccountSystemEntity", { enumerable: true, get: function () { return account_system_entity_1.AccountSystemEntity; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/account-system-entity/index.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAErD,oGAFA,2CAAmB,OAEA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
export declare class FinancePostHistoryModel extends Model {
|
|
3
|
+
PostId: string;
|
|
4
|
+
DateTime: Date;
|
|
5
|
+
ItemId: string;
|
|
6
|
+
ItemType: string;
|
|
7
|
+
ItemValue: string;
|
|
8
|
+
PostedById: string;
|
|
9
|
+
AccSystemCode: string;
|
|
10
|
+
AccSystemRefId: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FinancePostHistoryModel = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
15
|
+
let FinancePostHistoryModel = class FinancePostHistoryModel extends sequelize_typescript_1.Model {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'PostId' }),
|
|
19
|
+
(0, sequelize_typescript_1.Column)({
|
|
20
|
+
primaryKey: true,
|
|
21
|
+
allowNull: false,
|
|
22
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
23
|
+
}),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], FinancePostHistoryModel.prototype, "PostId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({ type: Date }),
|
|
28
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, type: sequelize_typescript_1.DataType.DATE }),
|
|
29
|
+
__metadata("design:type", Date)
|
|
30
|
+
], FinancePostHistoryModel.prototype, "DateTime", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'ItemId' }),
|
|
33
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, type: sequelize_typescript_1.DataType.STRING(30) }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], FinancePostHistoryModel.prototype, "ItemId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'ItemType' }),
|
|
38
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, type: sequelize_typescript_1.DataType.STRING(200) }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], FinancePostHistoryModel.prototype, "ItemType", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'ItemValue' }),
|
|
43
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, type: sequelize_typescript_1.DataType.JSON }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], FinancePostHistoryModel.prototype, "ItemValue", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)(),
|
|
48
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, type: sequelize_typescript_1.DataType.STRING(30) }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], FinancePostHistoryModel.prototype, "PostedById", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, swagger_1.ApiProperty)(),
|
|
53
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, type: sequelize_typescript_1.DataType.STRING(10) }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], FinancePostHistoryModel.prototype, "AccSystemCode", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiProperty)(),
|
|
58
|
+
(0, sequelize_typescript_1.Column)({ allowNull: false, type: sequelize_typescript_1.DataType.STRING(30) }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], FinancePostHistoryModel.prototype, "AccSystemRefId", void 0);
|
|
61
|
+
FinancePostHistoryModel = __decorate([
|
|
62
|
+
(0, sequelize_typescript_1.Table)({ tableName: 'finance_PostHistory', createdAt: false, updatedAt: false })
|
|
63
|
+
], FinancePostHistoryModel);
|
|
64
|
+
exports.FinancePostHistoryModel = FinancePostHistoryModel;
|
|
65
|
+
//# sourceMappingURL=post-history.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-history.entity.js","sourceRoot":"","sources":["../../src/account-system-entity/post-history.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,+DAAsE;AAG/D,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,4BAAK;CAoCjD,CAAA;AAnCC;IAAC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;IACpD,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;uDACa;AAEf;IAAC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC3B,IAAA,6BAAM,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,+BAAQ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AS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;GACnE,uBAAuB,CAoCnC;AApCY,0DAAuB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseRepository, IBaseRepository } from '@tomei/general';
|
|
2
|
+
import { FinancePostHistoryModel } from './post-history.entity';
|
|
3
|
+
export declare class PostHistoryRepository extends BaseRepository<FinancePostHistoryModel> implements IBaseRepository<FinancePostHistoryModel> {
|
|
4
|
+
constructor();
|
|
5
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PostHistoryRepository = void 0;
|
|
4
|
+
const general_1 = require("@tomei/general");
|
|
5
|
+
const post_history_entity_1 = require("./post-history.entity");
|
|
6
|
+
class PostHistoryRepository extends general_1.BaseRepository {
|
|
7
|
+
constructor() {
|
|
8
|
+
const postHistoryModel = new post_history_entity_1.FinancePostHistoryModel();
|
|
9
|
+
super(postHistoryModel);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.PostHistoryRepository = PostHistoryRepository;
|
|
13
|
+
//# sourceMappingURL=post-history.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-history.repository.js","sourceRoot":"","sources":["../../src/account-system-entity/post-history.repository.ts"],"names":[],"mappings":";;;AAAA,4CAAiE;AACjE,+DAAgE;AAEhE,MAAa,qBACX,SAAQ,wBAAuC;IAG/C;QACE,MAAM,gBAAgB,GAAG,IAAI,6CAAuB,EAAE,CAAC;QACvD,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC1B,CAAC;CACF;AARD,sDAQC"}
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import { IAddress, LoginUserBase } from '@tomei/general';
|
|
1
|
+
import { IAddress, IPerson, LoginUserBase } from '@tomei/general';
|
|
2
|
+
import { AccountSystemEntity } from '../account-system-entity/account-system-entity';
|
|
2
3
|
import { FinanceCustomerModel } from './entities/customer.entity';
|
|
3
4
|
import { IFinanceCustomerRepository } from './interfaces/finance-customer.repository.interface';
|
|
4
|
-
export declare abstract class Customer extends
|
|
5
|
-
FullName: string;
|
|
6
|
-
IDNo: string;
|
|
7
|
-
IDType: string;
|
|
8
|
-
ContactNo: string;
|
|
9
|
-
Email: string;
|
|
10
|
-
DefaultAddress: IAddress;
|
|
5
|
+
export declare abstract class Customer extends AccountSystemEntity implements IPerson {
|
|
6
|
+
abstract FullName: string;
|
|
7
|
+
abstract IDNo: string;
|
|
8
|
+
abstract IDType: string;
|
|
9
|
+
abstract ContactNo: string;
|
|
10
|
+
abstract Email: string;
|
|
11
|
+
abstract DefaultAddress: IAddress;
|
|
12
|
+
getDetails(): Promise<{
|
|
13
|
+
FullName: string;
|
|
14
|
+
IDNo: string;
|
|
15
|
+
IDType: string;
|
|
16
|
+
Email: string;
|
|
17
|
+
ContactNo: string;
|
|
18
|
+
}>;
|
|
11
19
|
financeCustomerRepository: IFinanceCustomerRepository;
|
|
12
20
|
CustomerId: string;
|
|
13
|
-
SystemCode: string;
|
|
14
|
-
AccSystemCode: string;
|
|
15
|
-
AccSystemCustomerId: string;
|
|
16
21
|
CustSystemCode: string;
|
|
17
22
|
CustSystemRefId: string;
|
|
18
|
-
constructor(
|
|
19
|
-
abstract
|
|
23
|
+
constructor(sFinanceCompanyId: string, custSystemCode: string, custSystemRefId: string);
|
|
24
|
+
abstract getBillingAddress(): Promise<IAddress>;
|
|
20
25
|
init(person: LoginUserBase): void;
|
|
21
26
|
save(customerId: string, dbTransaction?: any): Promise<FinanceCustomerModel>;
|
|
22
27
|
}
|
|
@@ -2,21 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Customer = void 0;
|
|
4
4
|
const general_1 = require("@tomei/general");
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const account_system_entity_1 = require("../account-system-entity/account-system-entity");
|
|
6
|
+
class Customer extends account_system_entity_1.AccountSystemEntity {
|
|
7
|
+
async getDetails() {
|
|
8
|
+
return {
|
|
9
|
+
FullName: this.FullName,
|
|
10
|
+
IDNo: this.IDNo,
|
|
11
|
+
IDType: this.IDType,
|
|
12
|
+
Email: this.Email,
|
|
13
|
+
ContactNo: this.ContactNo,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(sFinanceCompanyId, custSystemCode, custSystemRefId) {
|
|
7
17
|
super();
|
|
8
18
|
const financeCustomerData = this.financeCustomerRepository.findOne({
|
|
9
19
|
where: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
CustomerRefId: custSystemRefId,
|
|
20
|
+
CompanyId: sFinanceCompanyId,
|
|
21
|
+
CustSystemCode: custSystemCode,
|
|
22
|
+
CustSystemRefId: custSystemRefId,
|
|
14
23
|
},
|
|
15
24
|
});
|
|
16
25
|
if (financeCustomerData) {
|
|
17
|
-
this.
|
|
18
|
-
this.AccSystemCode = accSystemCode;
|
|
19
|
-
this.AccSystemCustomerId = financeCustomerData.AccSystemCustomerId;
|
|
26
|
+
this.CompanyId = sFinanceCompanyId;
|
|
20
27
|
this.CustSystemCode = custSystemCode;
|
|
21
28
|
this.CustSystemRefId = custSystemRefId;
|
|
22
29
|
}
|
|
@@ -36,10 +43,8 @@ class Customer extends general_1.LoginUserBase {
|
|
|
36
43
|
async save(customerId, dbTransaction) {
|
|
37
44
|
const data = await this.financeCustomerRepository.create({
|
|
38
45
|
CustomerId: customerId,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
AccSystemCustomerId: this.AccSystemCustomerId,
|
|
42
|
-
CustomerRefId: this.CustSystemRefId,
|
|
46
|
+
CustSystemCode: this.CustSystemCode,
|
|
47
|
+
CustSystemRefId: this.CustSystemRefId,
|
|
43
48
|
}, dbTransaction);
|
|
44
49
|
return data;
|
|
45
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.js","sourceRoot":"","sources":["../../src/customer/customer.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"customer.js","sourceRoot":"","sources":["../../src/customer/customer.ts"],"names":[],"mappings":";;;AAAA,4CAKwB;AACxB,0FAAqF;AAGrF,MAAsB,QAAS,SAAQ,2CAAmB;IASxD,KAAK,CAAC,UAAU;QAOd,OAAO;YACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;IAQD,YACE,iBAAyB,EACzB,cAAsB,EACtB,eAAuB;QAEvB,KAAK,EAAE,CAAC;QACR,MAAM,mBAAmB,GAAG,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC;YACjE,KAAK,EAAE;gBACL,SAAS,EAAE,iBAAiB;gBAC5B,cAAc,EAAE,cAAc;gBAC9B,eAAe,EAAE,eAAe;aACjC;SACF,CAAC,CAAC;QACH,IAAI,mBAAmB,EAAE;YACvB,IAAI,CAAC,SAAS,GAAG,iBAAiB,CAAC;YACnC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;YACrC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;SACxC;aAAM;YACL,MAAM,aAAa,GAAG,IAAI,6BAAmB,CAAC,iBAAiB,CAAC,CAAC;YACjE,MAAM,aAAa,CAAC;SACrB;IACH,CAAC;IAOD,IAAI,CAAC,MAAqB;QACxB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,IAAI,CACR,UAAkB,EAClB,aAAmB;QAEnB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,MAAM,CACtD;YACE,UAAU,EAAE,UAAU;YACtB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;SACtC,EACD,aAAa,CACd,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlFD,4BAkFC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { FinanceCompanyModel } from '../../finance-company/entities/finance-company.entity';
|
|
2
3
|
export declare class FinanceCustomerModel extends Model {
|
|
3
4
|
CustomerId: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
CompanyId: string;
|
|
6
|
+
CustSystemCode: string;
|
|
7
|
+
CustSystemRefId: string;
|
|
8
|
+
AccSystemRefId: string;
|
|
9
|
+
PostedToAccSystemYN: string;
|
|
10
|
+
PostedById: string;
|
|
11
|
+
PostedDateTime: Date;
|
|
12
|
+
FinanceCompany: FinanceCompanyModel;
|
|
8
13
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.FinanceCustomerModel = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
15
|
+
const finance_company_entity_1 = require("../../finance-company/entities/finance-company.entity");
|
|
15
16
|
let FinanceCustomerModel = class FinanceCustomerModel extends sequelize_typescript_1.Model {
|
|
16
17
|
};
|
|
17
18
|
__decorate([
|
|
@@ -23,50 +24,86 @@ __decorate([
|
|
|
23
24
|
}),
|
|
24
25
|
__metadata("design:type", String)
|
|
25
26
|
], FinanceCustomerModel.prototype, "CustomerId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'CompanyId' }),
|
|
29
|
+
(0, sequelize_typescript_1.ForeignKey)(() => finance_company_entity_1.FinanceCompanyModel),
|
|
30
|
+
(0, sequelize_typescript_1.Column)({
|
|
31
|
+
allowNull: false,
|
|
32
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], FinanceCustomerModel.prototype, "CompanyId", void 0);
|
|
26
36
|
__decorate([
|
|
27
37
|
(0, swagger_1.ApiProperty)({
|
|
28
38
|
type: String,
|
|
29
|
-
description: 'System Code eg. "EZC", "CRM"',
|
|
39
|
+
description: 'Cust System Code eg. "EZC", "CRM"',
|
|
30
40
|
}),
|
|
31
41
|
(0, sequelize_typescript_1.Column)({
|
|
32
42
|
allowNull: false,
|
|
33
|
-
type: sequelize_typescript_1.DataType.STRING(
|
|
43
|
+
type: sequelize_typescript_1.DataType.STRING(10),
|
|
34
44
|
}),
|
|
35
45
|
__metadata("design:type", String)
|
|
36
|
-
], FinanceCustomerModel.prototype, "
|
|
46
|
+
], FinanceCustomerModel.prototype, "CustSystemCode", void 0);
|
|
37
47
|
__decorate([
|
|
38
48
|
(0, swagger_1.ApiProperty)({
|
|
39
49
|
type: String,
|
|
40
|
-
description: '
|
|
50
|
+
description: 'CustSystemRefId',
|
|
41
51
|
}),
|
|
42
52
|
(0, sequelize_typescript_1.Column)({
|
|
43
53
|
allowNull: false,
|
|
44
54
|
type: sequelize_typescript_1.DataType.STRING(30),
|
|
45
55
|
}),
|
|
46
56
|
__metadata("design:type", String)
|
|
47
|
-
], FinanceCustomerModel.prototype, "
|
|
57
|
+
], FinanceCustomerModel.prototype, "CustSystemRefId", void 0);
|
|
48
58
|
__decorate([
|
|
49
59
|
(0, swagger_1.ApiProperty)({
|
|
50
60
|
type: String,
|
|
51
|
-
description: 'Account Customer Id in
|
|
61
|
+
description: 'Account Customer Id in API',
|
|
52
62
|
}),
|
|
53
63
|
(0, sequelize_typescript_1.Column)({
|
|
54
64
|
allowNull: false,
|
|
55
65
|
type: sequelize_typescript_1.DataType.STRING(30),
|
|
56
66
|
}),
|
|
57
67
|
__metadata("design:type", String)
|
|
58
|
-
], FinanceCustomerModel.prototype, "
|
|
68
|
+
], FinanceCustomerModel.prototype, "AccSystemRefId", void 0);
|
|
59
69
|
__decorate([
|
|
60
70
|
(0, swagger_1.ApiProperty)({
|
|
61
71
|
type: String,
|
|
62
|
-
description: '
|
|
72
|
+
description: 'PostedToAccSystemYN',
|
|
73
|
+
example: 'Y',
|
|
63
74
|
}),
|
|
64
75
|
(0, sequelize_typescript_1.Column)({
|
|
65
76
|
allowNull: false,
|
|
77
|
+
type: sequelize_typescript_1.DataType.CHAR(1),
|
|
78
|
+
}),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], FinanceCustomerModel.prototype, "PostedToAccSystemYN", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, swagger_1.ApiProperty)({
|
|
83
|
+
example: '138140891dd211b288d34bc7b4312a49',
|
|
84
|
+
description: 'PostedById',
|
|
85
|
+
}),
|
|
86
|
+
(0, sequelize_typescript_1.Column)({
|
|
87
|
+
allowNull: true,
|
|
66
88
|
type: sequelize_typescript_1.DataType.STRING(30),
|
|
67
89
|
}),
|
|
68
90
|
__metadata("design:type", String)
|
|
69
|
-
], FinanceCustomerModel.prototype, "
|
|
91
|
+
], FinanceCustomerModel.prototype, "PostedById", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, swagger_1.ApiProperty)({
|
|
94
|
+
example: new Date(),
|
|
95
|
+
description: 'PostedToAccSystem Date',
|
|
96
|
+
}),
|
|
97
|
+
(0, sequelize_typescript_1.Column)({
|
|
98
|
+
allowNull: true,
|
|
99
|
+
type: sequelize_typescript_1.DataType.DATE,
|
|
100
|
+
}),
|
|
101
|
+
__metadata("design:type", Date)
|
|
102
|
+
], FinanceCustomerModel.prototype, "PostedDateTime", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, sequelize_typescript_1.BelongsTo)(() => finance_company_entity_1.FinanceCompanyModel),
|
|
105
|
+
__metadata("design:type", finance_company_entity_1.FinanceCompanyModel)
|
|
106
|
+
], FinanceCustomerModel.prototype, "FinanceCompany", void 0);
|
|
70
107
|
FinanceCustomerModel = __decorate([
|
|
71
108
|
(0, sequelize_typescript_1.Table)({ tableName: 'finance_Customer', createdAt: false, updatedAt: false })
|
|
72
109
|
], FinanceCustomerModel);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.entity.js","sourceRoot":"","sources":["../../../src/customer/entities/customer.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,+
|
|
1
|
+
{"version":3,"file":"customer.entity.js","sourceRoot":"","sources":["../../../src/customer/entities/customer.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,+DAO8B;AAC9B,kGAA4F;AAGrF,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,4BAAK;CAgF9C,CAAA;AA/EC;IAAC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;IACxD,IAAA,6BAAM,EAAC;QACN,UAAU,EAAE,IAAI;QAChB,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1B,CAAC;;wDACiB;AAEnB;IAAC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;IACvD,IAAA,iCAAU,EAAC,GAAG,EAAE,CAAC,4CAAmB,CAAC;IACrC,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,+BAAQ,CAAC,MAAM,CAAC,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EAAE,wBAAwB;KACtC,CAAC;IACD,IAAA,6BAAM,EAAC;QACN,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,+BAAQ,CAAC,IAAI;KACpB,CAAC;8BACc,IAAI;4DAAC;AAErB;IAAC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,4CAAmB,CAAC;8BACrB,4CAAmB;4DAAC;AA/EzB,oBAAoB;IADhC,IAAA,4BAAK,EAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;GAChE,oBAAoB,CAgFhC;AAhFY,oDAAoB"}
|
package/dist/customer/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { Customer } from './customer';
|
|
1
2
|
import { IFinanceCustomerRepository } from './interfaces/finance-customer.repository.interface';
|
|
2
3
|
import { IFinanceCustomerAttr } from './interfaces/finance-customer-attr.interface';
|
|
3
4
|
import { FinanceCustomerModel } from './entities/customer.entity';
|
|
4
5
|
import { ICustomerRepository } from './interfaces/customer.repository.interface';
|
|
5
6
|
import { FinanceCustomerRepository } from './finance-customer.repository';
|
|
6
|
-
|
|
7
|
-
export { IFinanceCustomerRepository, IFinanceCustomerAttr, FinanceCustomerModel, ICustomerRepository, FinanceCustomerRepository, Customer, };
|
|
7
|
+
export { Customer, IFinanceCustomerRepository, IFinanceCustomerAttr, FinanceCustomerModel, ICustomerRepository, FinanceCustomerRepository, };
|
package/dist/customer/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FinanceCustomerRepository = exports.FinanceCustomerModel = exports.Customer = void 0;
|
|
4
|
+
const customer_1 = require("./customer");
|
|
5
|
+
Object.defineProperty(exports, "Customer", { enumerable: true, get: function () { return customer_1.Customer; } });
|
|
4
6
|
const customer_entity_1 = require("./entities/customer.entity");
|
|
5
7
|
Object.defineProperty(exports, "FinanceCustomerModel", { enumerable: true, get: function () { return customer_entity_1.FinanceCustomerModel; } });
|
|
6
8
|
const finance_customer_repository_1 = require("./finance-customer.repository");
|
|
7
9
|
Object.defineProperty(exports, "FinanceCustomerRepository", { enumerable: true, get: function () { return finance_customer_repository_1.FinanceCustomerRepository; } });
|
|
8
|
-
const customer_1 = require("./customer");
|
|
9
|
-
Object.defineProperty(exports, "Customer", { enumerable: true, get: function () { return customer_1.Customer; } });
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/customer/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/customer/index.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAQpC,yFARO,mBAAQ,OAQP;AALV,gEAAkE;AAQhE,qGARO,sCAAoB,OAQP;AANtB,+EAA0E;AAQxE,0GARO,uDAAyB,OAQP"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export interface IFinanceCustomerAttr {
|
|
2
2
|
CustomerId: string;
|
|
3
|
-
|
|
3
|
+
CompanyId: string;
|
|
4
|
+
CustSystemCode: string;
|
|
5
|
+
CustSystemRefId: string;
|
|
6
|
+
AccSystemRefId: string;
|
|
7
|
+
PostedToAccSystemYN: string;
|
|
8
|
+
PostedById: string;
|
|
9
|
+
PostedDateTime?: Date;
|
|
4
10
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="multer" />
|
|
2
2
|
import { IBaseRepository } from '@tomei/general';
|
|
3
3
|
import { IMediasRepository, CommonService as MediaCommonService } from '@tomei/media';
|
|
4
|
-
import { DocType } from '
|
|
4
|
+
import { DocType } from '../enum';
|
|
5
5
|
import { DocumentRepository } from './document.repository';
|
|
6
6
|
import { IDocumentAttr } from './interfaces/document-attr.interface';
|
|
7
7
|
import { DocumentItemRepository } from './document-item.repository';
|
|
8
8
|
import { DocumentItem } from './document-item';
|
|
9
|
-
import { AccountSystemEntity } from '../account-system-entity
|
|
9
|
+
import { AccountSystemEntity } from '../account-system-entity';
|
|
10
10
|
export declare class Document extends AccountSystemEntity {
|
|
11
11
|
protected BaseRepository: IBaseRepository;
|
|
12
12
|
ObjectId: string;
|
|
@@ -23,10 +23,6 @@ export declare class Document extends AccountSystemEntity {
|
|
|
23
23
|
IssuedToId: string;
|
|
24
24
|
IssuedToType: string;
|
|
25
25
|
AccSystemCode: string;
|
|
26
|
-
PostedToAccSystemYN: string;
|
|
27
|
-
PostedById: string;
|
|
28
|
-
PostedDateTime: Date;
|
|
29
|
-
AccSystemRefId: string;
|
|
30
26
|
UseAccSystemDocYN: string;
|
|
31
27
|
private DocHTMLFilePath;
|
|
32
28
|
private DocPDFFilePath;
|