@tomei/finance 0.17.0 → 0.18.2-dev.1
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/.commitlintrc.json +23 -23
- package/CHANGELOG.md +17 -0
- package/LICENSE +21 -21
- package/MIGRATION.md +43 -0
- package/configs/config.js +348 -348
- package/dist/document/document.d.ts +3 -0
- package/dist/document/document.d.ts.map +1 -1
- package/dist/document/document.js +5 -0
- package/dist/document/document.js.map +1 -1
- package/dist/document/interfaces/document-attr.interface.d.ts +3 -1
- package/dist/document/interfaces/document-attr.interface.d.ts.map +1 -1
- package/dist/document/interfaces/document-attr.interface.js.map +1 -1
- package/dist/enum/index.d.ts +2 -1
- package/dist/enum/index.d.ts.map +1 -1
- package/dist/enum/index.js +3 -1
- package/dist/enum/index.js.map +1 -1
- package/dist/enum/posting-status.enum.d.ts +7 -0
- package/dist/enum/posting-status.enum.d.ts.map +1 -0
- package/dist/enum/posting-status.enum.js +11 -0
- package/dist/enum/posting-status.enum.js.map +1 -0
- package/dist/finance-company/finance-company.d.ts +7 -3
- package/dist/finance-company/finance-company.d.ts.map +1 -1
- package/dist/finance-company/finance-company.js +48 -16
- package/dist/finance-company/finance-company.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/models/document.entity.d.ts +3 -0
- package/dist/models/document.entity.d.ts.map +1 -1
- package/dist/models/document.entity.js +20 -0
- package/dist/models/document.entity.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/invoice-template/assets/css/style.css.map +12 -12
- package/invoice-template/assets/css/style.min.css +1 -1
- package/invoice-template/assets/img/arrow_bg.svg +11 -11
- package/invoice-template/assets/img/coffy_shop_img.svg +18 -18
- package/invoice-template/assets/img/logo_accent.svg +3 -3
- package/invoice-template/assets/img/logo_white.svg +4 -4
- package/invoice-template/assets/img/sign.svg +12 -12
- package/invoice-template/assets/img/tomei-logo.svg +9 -9
- package/invoice-template/assets/js/html2canvas.min.js +10379 -10379
- package/invoice-template/assets/js/jquery.min.js +1 -1
- package/invoice-template/assets/sass/common/_color_variable.scss +12 -12
- package/invoice-template/assets/sass/common/_typography.scss +178 -178
- package/invoice-template/assets/sass/style.scss +12 -12
- package/migrations/add-discount-collumn-to-document-related-table.js +90 -90
- package/migrations/finance-account-migration.js +97 -97
- package/migrations/finance-company-migration.js +29 -29
- package/migrations/finance-customer-migration.js +51 -51
- package/migrations/finance-document-item-migration.js +111 -111
- package/migrations/finance-document-migration.js +122 -122
- package/migrations/finance-document-tag-migration.js +46 -46
- package/migrations/finance-journal-entry-migration.js +59 -59
- package/migrations/finance-ledger-transaction-migration.js +89 -89
- package/migrations/finance-payment-item-migration.js +52 -52
- package/migrations/finance-payment-method-migration.js +31 -31
- package/migrations/finance-payment-method-type-migration.js +55 -55
- package/migrations/finance-payment-migration.js +96 -96
- package/migrations/finance-post-history-migration.js +45 -45
- package/migrations/finance-tag-group-migration.js +53 -53
- package/migrations/finance-tag-migration.js +63 -63
- package/migrations/finance-tax-migration.js +52 -52
- package/migrations/refactor-finance-document-migration.js +71 -71
- package/migrations/update-document-item.migration.js +87 -87
- package/package.json +81 -79
- package/receipt-template/default/assets/css/style.css +2629 -2629
- package/receipt-template/default/assets/css/style.css.map +12 -12
- package/receipt-template/default/assets/css/style.min.css +1 -1
- package/receipt-template/default/assets/img/arrow_bg.svg +11 -11
- package/receipt-template/default/assets/img/coffy_shop_img.svg +18 -18
- package/receipt-template/default/assets/img/logo.svg +4 -4
- package/receipt-template/default/assets/img/logo_accent.svg +3 -3
- package/receipt-template/default/assets/img/logo_white.svg +4 -4
- package/receipt-template/default/assets/img/sign.svg +12 -12
- package/receipt-template/default/assets/img/tomei-logo.svg +9 -9
- package/receipt-template/default/assets/js/html2canvas.min.js +10379 -10379
- package/receipt-template/default/assets/js/jquery.min.js +1 -1
- package/receipt-template/default/assets/js/main.js +48 -48
- package/receipt-template/default/assets/sass/common/_color_variable.scss +12 -12
- package/receipt-template/default/assets/sass/common/_invoice.scss +1801 -1801
- package/receipt-template/default/assets/sass/common/_normalize.scss +350 -350
- package/receipt-template/default/assets/sass/common/_typography.scss +178 -178
- package/receipt-template/default/assets/sass/style.scss +12 -12
- package/receipt-template/default/index.html +291 -291
- package/scripts/postinstall.js +300 -300
- package/dist/enum/quick-book-client-scopes.enum.d.ts +0 -13
- package/dist/enum/quick-book-client-scopes.enum.js +0 -19
- package/dist/enum/quick-book-client-scopes.enum.js.map +0 -1
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
up: async (queryInterface, Sequelize) => {
|
|
5
|
-
const transaction = await queryInterface.sequelize.transaction();
|
|
6
|
-
try {
|
|
7
|
-
await queryInterface.addColumn(
|
|
8
|
-
'finance_DocumentItem',
|
|
9
|
-
'AccSystemRefId',
|
|
10
|
-
{
|
|
11
|
-
allowNull: false,
|
|
12
|
-
type: Sequelize.STRING(30),
|
|
13
|
-
defaultValue: 'REF',
|
|
14
|
-
},
|
|
15
|
-
{ transaction },
|
|
16
|
-
);
|
|
17
|
-
await queryInterface.addColumn(
|
|
18
|
-
'finance_DocumentItem',
|
|
19
|
-
'PostedToAccSystemYN',
|
|
20
|
-
{
|
|
21
|
-
allowNull: false,
|
|
22
|
-
type: Sequelize.CHAR(1),
|
|
23
|
-
defaultValue: 'N',
|
|
24
|
-
},
|
|
25
|
-
{ transaction },
|
|
26
|
-
);
|
|
27
|
-
await queryInterface.addColumn(
|
|
28
|
-
'finance_DocumentItem',
|
|
29
|
-
'PostedById',
|
|
30
|
-
{
|
|
31
|
-
allowNull: true,
|
|
32
|
-
type: Sequelize.STRING(30),
|
|
33
|
-
},
|
|
34
|
-
{ transaction },
|
|
35
|
-
);
|
|
36
|
-
await queryInterface.addColumn(
|
|
37
|
-
'finance_DocumentItem',
|
|
38
|
-
'PostedDateTime',
|
|
39
|
-
{
|
|
40
|
-
allowNull: true,
|
|
41
|
-
type: Sequelize.DATE,
|
|
42
|
-
},
|
|
43
|
-
{ transaction },
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
await transaction.commit();
|
|
47
|
-
} catch (error) {
|
|
48
|
-
await transaction.rollback();
|
|
49
|
-
throw error;
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
down: async (queryInterface) => {
|
|
54
|
-
const transaction = await queryInterface.sequelize.transaction();
|
|
55
|
-
try {
|
|
56
|
-
await queryInterface.removeColumn(
|
|
57
|
-
'finance_DocumentItem',
|
|
58
|
-
'AccSystemRefId',
|
|
59
|
-
{
|
|
60
|
-
transaction: t,
|
|
61
|
-
},
|
|
62
|
-
);
|
|
63
|
-
await queryInterface.removeColumn(
|
|
64
|
-
'finance_DocumentItem',
|
|
65
|
-
'PostedToAccSystemYN',
|
|
66
|
-
{
|
|
67
|
-
transaction: t,
|
|
68
|
-
},
|
|
69
|
-
);
|
|
70
|
-
await queryInterface.removeColumn('finance_DocumentItem', 'PostedById', {
|
|
71
|
-
transaction: t,
|
|
72
|
-
});
|
|
73
|
-
await queryInterface.removeColumn(
|
|
74
|
-
'finance_DocumentItem',
|
|
75
|
-
'PostedDateTime',
|
|
76
|
-
{
|
|
77
|
-
transaction: t,
|
|
78
|
-
},
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
await transaction.commit();
|
|
82
|
-
} catch (error) {
|
|
83
|
-
await transaction.rollback();
|
|
84
|
-
throw error;
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
};
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
const transaction = await queryInterface.sequelize.transaction();
|
|
6
|
+
try {
|
|
7
|
+
await queryInterface.addColumn(
|
|
8
|
+
'finance_DocumentItem',
|
|
9
|
+
'AccSystemRefId',
|
|
10
|
+
{
|
|
11
|
+
allowNull: false,
|
|
12
|
+
type: Sequelize.STRING(30),
|
|
13
|
+
defaultValue: 'REF',
|
|
14
|
+
},
|
|
15
|
+
{ transaction },
|
|
16
|
+
);
|
|
17
|
+
await queryInterface.addColumn(
|
|
18
|
+
'finance_DocumentItem',
|
|
19
|
+
'PostedToAccSystemYN',
|
|
20
|
+
{
|
|
21
|
+
allowNull: false,
|
|
22
|
+
type: Sequelize.CHAR(1),
|
|
23
|
+
defaultValue: 'N',
|
|
24
|
+
},
|
|
25
|
+
{ transaction },
|
|
26
|
+
);
|
|
27
|
+
await queryInterface.addColumn(
|
|
28
|
+
'finance_DocumentItem',
|
|
29
|
+
'PostedById',
|
|
30
|
+
{
|
|
31
|
+
allowNull: true,
|
|
32
|
+
type: Sequelize.STRING(30),
|
|
33
|
+
},
|
|
34
|
+
{ transaction },
|
|
35
|
+
);
|
|
36
|
+
await queryInterface.addColumn(
|
|
37
|
+
'finance_DocumentItem',
|
|
38
|
+
'PostedDateTime',
|
|
39
|
+
{
|
|
40
|
+
allowNull: true,
|
|
41
|
+
type: Sequelize.DATE,
|
|
42
|
+
},
|
|
43
|
+
{ transaction },
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
await transaction.commit();
|
|
47
|
+
} catch (error) {
|
|
48
|
+
await transaction.rollback();
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
down: async (queryInterface) => {
|
|
54
|
+
const transaction = await queryInterface.sequelize.transaction();
|
|
55
|
+
try {
|
|
56
|
+
await queryInterface.removeColumn(
|
|
57
|
+
'finance_DocumentItem',
|
|
58
|
+
'AccSystemRefId',
|
|
59
|
+
{
|
|
60
|
+
transaction: t,
|
|
61
|
+
},
|
|
62
|
+
);
|
|
63
|
+
await queryInterface.removeColumn(
|
|
64
|
+
'finance_DocumentItem',
|
|
65
|
+
'PostedToAccSystemYN',
|
|
66
|
+
{
|
|
67
|
+
transaction: t,
|
|
68
|
+
},
|
|
69
|
+
);
|
|
70
|
+
await queryInterface.removeColumn('finance_DocumentItem', 'PostedById', {
|
|
71
|
+
transaction: t,
|
|
72
|
+
});
|
|
73
|
+
await queryInterface.removeColumn(
|
|
74
|
+
'finance_DocumentItem',
|
|
75
|
+
'PostedDateTime',
|
|
76
|
+
{
|
|
77
|
+
transaction: t,
|
|
78
|
+
},
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
await transaction.commit();
|
|
82
|
+
} catch (error) {
|
|
83
|
+
await transaction.rollback();
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
};
|
package/package.json
CHANGED
|
@@ -1,79 +1,81 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tomei/finance",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "NestJS package for finance module",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"start:dev": "tsc -w",
|
|
8
|
-
"build": "tsc",
|
|
9
|
-
"postinstall": "node scripts/postinstall.js",
|
|
10
|
-
"test:package": "node test-package.js",
|
|
11
|
-
"prepare": "husky install",
|
|
12
|
-
"format": "prettier --write \"src/**/*.ts\"",
|
|
13
|
-
"lint": "npx eslint . --fix",
|
|
14
|
-
"test": "jest",
|
|
15
|
-
"test:watch": "jest --watch",
|
|
16
|
-
"test:cov": "jest --coverage",
|
|
17
|
-
"test:e2e": "jest --config ./test/jest-e2e.json"
|
|
18
|
-
},
|
|
19
|
-
"keywords": [
|
|
20
|
-
"tomei",
|
|
21
|
-
"finance"
|
|
22
|
-
],
|
|
23
|
-
"author": "Fadhil Muhammad <fadhil@tomei.com.my>",
|
|
24
|
-
"license": "ISC",
|
|
25
|
-
"repository": {
|
|
26
|
-
"type": "git",
|
|
27
|
-
"url": "https://gitlab.com/tomei-package/finance.git"
|
|
28
|
-
},
|
|
29
|
-
"publishConfig": {
|
|
30
|
-
"access": "public"
|
|
31
|
-
},
|
|
32
|
-
"peerDependencies": {
|
|
33
|
-
"@nestjs/common": "^10.4.20",
|
|
34
|
-
"@nestjs/swagger": "^8.1.1",
|
|
35
|
-
"@paralleldrive/cuid2": "^2.2.2",
|
|
36
|
-
"@tomei/activity-history": "^0.4.4",
|
|
37
|
-
"@tomei/config": "^0.3.22",
|
|
38
|
-
"@tomei/general": "^0.21.10",
|
|
39
|
-
"@tomei/media": "^0.10.0",
|
|
40
|
-
"@tomei/
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@types/
|
|
55
|
-
"@
|
|
56
|
-
"
|
|
57
|
-
"eslint-
|
|
58
|
-
"eslint
|
|
59
|
-
"eslint-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"npm run
|
|
75
|
-
"npm run
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@tomei/finance",
|
|
3
|
+
"version": "0.18.2-dev.1",
|
|
4
|
+
"description": "NestJS package for finance module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start:dev": "tsc -w",
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"postinstall": "node scripts/postinstall.js",
|
|
10
|
+
"test:package": "node test-package.js",
|
|
11
|
+
"prepare": "husky install",
|
|
12
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
13
|
+
"lint": "npx eslint . --fix",
|
|
14
|
+
"test": "jest",
|
|
15
|
+
"test:watch": "jest --watch",
|
|
16
|
+
"test:cov": "jest --coverage",
|
|
17
|
+
"test:e2e": "jest --config ./test/jest-e2e.json"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"tomei",
|
|
21
|
+
"finance"
|
|
22
|
+
],
|
|
23
|
+
"author": "Fadhil Muhammad <fadhil@tomei.com.my>",
|
|
24
|
+
"license": "ISC",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://gitlab.com/tomei-package/finance.git"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@nestjs/common": "^10.4.20",
|
|
34
|
+
"@nestjs/swagger": "^8.1.1",
|
|
35
|
+
"@paralleldrive/cuid2": "^2.2.2",
|
|
36
|
+
"@tomei/activity-history": "^0.4.4",
|
|
37
|
+
"@tomei/config": "^0.3.22",
|
|
38
|
+
"@tomei/general": "^0.21.10",
|
|
39
|
+
"@tomei/media": "^0.10.0",
|
|
40
|
+
"@tomei/outbox": "^0.1.2",
|
|
41
|
+
"@tomei/sso": "^0.65.0",
|
|
42
|
+
"axios": "^1.12.2",
|
|
43
|
+
"cuid": "^3.0.0",
|
|
44
|
+
"dotenv": "^16.6.1",
|
|
45
|
+
"intuit-oauth": "^4.2.0",
|
|
46
|
+
"puppeteer": "^24.22.3",
|
|
47
|
+
"sequelize": "^6.37.7",
|
|
48
|
+
"sequelize-typescript": "^2.1.6"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@commitlint/cli": "^19.8.1",
|
|
52
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
53
|
+
"@eslint/js": "^9.36.0",
|
|
54
|
+
"@types/multer": "^1.4.13",
|
|
55
|
+
"@types/node": "^22.18.8",
|
|
56
|
+
"@types/sequelize": "^4.28.20",
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
|
58
|
+
"eslint": "^9.36.0",
|
|
59
|
+
"eslint-config-prettier": "^9.1.2",
|
|
60
|
+
"eslint-plugin-import": "^2.32.0",
|
|
61
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
62
|
+
"globals": "^15.15.0",
|
|
63
|
+
"husky": "^9.1.7",
|
|
64
|
+
"lint-staged": "^15.5.2",
|
|
65
|
+
"prettier": "^3.6.2",
|
|
66
|
+
"ts-node": "^10.9.2",
|
|
67
|
+
"tsc-watch": "^6.3.1",
|
|
68
|
+
"tsconfig-paths": "^4.2.0",
|
|
69
|
+
"typescript": "^5.9.3",
|
|
70
|
+
"typescript-eslint": "^8.45.0"
|
|
71
|
+
},
|
|
72
|
+
"lint-staged": {
|
|
73
|
+
"*/**/*.{js,ts,tsx}": [
|
|
74
|
+
"npm run lint",
|
|
75
|
+
"npm run eslint",
|
|
76
|
+
"npm run format",
|
|
77
|
+
"npm run build",
|
|
78
|
+
"git add ."
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|