@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.
Files changed (89) hide show
  1. package/.commitlintrc.json +23 -23
  2. package/CHANGELOG.md +17 -0
  3. package/LICENSE +21 -21
  4. package/MIGRATION.md +43 -0
  5. package/configs/config.js +348 -348
  6. package/dist/document/document.d.ts +3 -0
  7. package/dist/document/document.d.ts.map +1 -1
  8. package/dist/document/document.js +5 -0
  9. package/dist/document/document.js.map +1 -1
  10. package/dist/document/interfaces/document-attr.interface.d.ts +3 -1
  11. package/dist/document/interfaces/document-attr.interface.d.ts.map +1 -1
  12. package/dist/document/interfaces/document-attr.interface.js.map +1 -1
  13. package/dist/enum/index.d.ts +2 -1
  14. package/dist/enum/index.d.ts.map +1 -1
  15. package/dist/enum/index.js +3 -1
  16. package/dist/enum/index.js.map +1 -1
  17. package/dist/enum/posting-status.enum.d.ts +7 -0
  18. package/dist/enum/posting-status.enum.d.ts.map +1 -0
  19. package/dist/enum/posting-status.enum.js +11 -0
  20. package/dist/enum/posting-status.enum.js.map +1 -0
  21. package/dist/finance-company/finance-company.d.ts +7 -3
  22. package/dist/finance-company/finance-company.d.ts.map +1 -1
  23. package/dist/finance-company/finance-company.js +48 -16
  24. package/dist/finance-company/finance-company.js.map +1 -1
  25. package/dist/index.d.ts +3 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +5 -1
  28. package/dist/index.js.map +1 -1
  29. package/dist/models/document.entity.d.ts +3 -0
  30. package/dist/models/document.entity.d.ts.map +1 -1
  31. package/dist/models/document.entity.js +20 -0
  32. package/dist/models/document.entity.js.map +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/invoice-template/assets/css/style.css.map +12 -12
  35. package/invoice-template/assets/css/style.min.css +1 -1
  36. package/invoice-template/assets/img/arrow_bg.svg +11 -11
  37. package/invoice-template/assets/img/coffy_shop_img.svg +18 -18
  38. package/invoice-template/assets/img/logo_accent.svg +3 -3
  39. package/invoice-template/assets/img/logo_white.svg +4 -4
  40. package/invoice-template/assets/img/sign.svg +12 -12
  41. package/invoice-template/assets/img/tomei-logo.svg +9 -9
  42. package/invoice-template/assets/js/html2canvas.min.js +10379 -10379
  43. package/invoice-template/assets/js/jquery.min.js +1 -1
  44. package/invoice-template/assets/sass/common/_color_variable.scss +12 -12
  45. package/invoice-template/assets/sass/common/_typography.scss +178 -178
  46. package/invoice-template/assets/sass/style.scss +12 -12
  47. package/migrations/add-discount-collumn-to-document-related-table.js +90 -90
  48. package/migrations/finance-account-migration.js +97 -97
  49. package/migrations/finance-company-migration.js +29 -29
  50. package/migrations/finance-customer-migration.js +51 -51
  51. package/migrations/finance-document-item-migration.js +111 -111
  52. package/migrations/finance-document-migration.js +122 -122
  53. package/migrations/finance-document-tag-migration.js +46 -46
  54. package/migrations/finance-journal-entry-migration.js +59 -59
  55. package/migrations/finance-ledger-transaction-migration.js +89 -89
  56. package/migrations/finance-payment-item-migration.js +52 -52
  57. package/migrations/finance-payment-method-migration.js +31 -31
  58. package/migrations/finance-payment-method-type-migration.js +55 -55
  59. package/migrations/finance-payment-migration.js +96 -96
  60. package/migrations/finance-post-history-migration.js +45 -45
  61. package/migrations/finance-tag-group-migration.js +53 -53
  62. package/migrations/finance-tag-migration.js +63 -63
  63. package/migrations/finance-tax-migration.js +52 -52
  64. package/migrations/refactor-finance-document-migration.js +71 -71
  65. package/migrations/update-document-item.migration.js +87 -87
  66. package/package.json +81 -79
  67. package/receipt-template/default/assets/css/style.css +2629 -2629
  68. package/receipt-template/default/assets/css/style.css.map +12 -12
  69. package/receipt-template/default/assets/css/style.min.css +1 -1
  70. package/receipt-template/default/assets/img/arrow_bg.svg +11 -11
  71. package/receipt-template/default/assets/img/coffy_shop_img.svg +18 -18
  72. package/receipt-template/default/assets/img/logo.svg +4 -4
  73. package/receipt-template/default/assets/img/logo_accent.svg +3 -3
  74. package/receipt-template/default/assets/img/logo_white.svg +4 -4
  75. package/receipt-template/default/assets/img/sign.svg +12 -12
  76. package/receipt-template/default/assets/img/tomei-logo.svg +9 -9
  77. package/receipt-template/default/assets/js/html2canvas.min.js +10379 -10379
  78. package/receipt-template/default/assets/js/jquery.min.js +1 -1
  79. package/receipt-template/default/assets/js/main.js +48 -48
  80. package/receipt-template/default/assets/sass/common/_color_variable.scss +12 -12
  81. package/receipt-template/default/assets/sass/common/_invoice.scss +1801 -1801
  82. package/receipt-template/default/assets/sass/common/_normalize.scss +350 -350
  83. package/receipt-template/default/assets/sass/common/_typography.scss +178 -178
  84. package/receipt-template/default/assets/sass/style.scss +12 -12
  85. package/receipt-template/default/index.html +291 -291
  86. package/scripts/postinstall.js +300 -300
  87. package/dist/enum/quick-book-client-scopes.enum.d.ts +0 -13
  88. package/dist/enum/quick-book-client-scopes.enum.js +0 -19
  89. 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.17.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/sso": "^0.65.0",
41
- "axios": "^1.12.2",
42
- "dotenv": "^16.6.1",
43
- "intuit-oauth": "^4.2.0",
44
- "puppeteer": "^24.22.3",
45
- "sequelize": "^6.37.7",
46
- "sequelize-typescript": "^2.1.6"
47
- },
48
- "devDependencies": {
49
- "@commitlint/cli": "^19.8.1",
50
- "@commitlint/config-conventional": "^19.8.1",
51
- "@eslint/js": "^9.36.0",
52
- "@types/multer": "^1.4.13",
53
- "@types/node": "^22.18.8",
54
- "@types/sequelize": "^4.28.20",
55
- "@typescript-eslint/eslint-plugin": "^8.45.0",
56
- "eslint": "^9.36.0",
57
- "eslint-config-prettier": "^9.1.2",
58
- "eslint-plugin-import": "^2.32.0",
59
- "eslint-plugin-prettier": "^5.5.4",
60
- "globals": "^15.15.0",
61
- "husky": "^9.1.7",
62
- "lint-staged": "^15.5.2",
63
- "prettier": "^3.6.2",
64
- "ts-node": "^10.9.2",
65
- "tsc-watch": "^6.3.1",
66
- "tsconfig-paths": "^4.2.0",
67
- "typescript": "^5.9.3",
68
- "typescript-eslint": "^8.45.0"
69
- },
70
- "lint-staged": {
71
- "*/**/*.{js,ts,tsx}": [
72
- "npm run lint",
73
- "npm run eslint",
74
- "npm run format",
75
- "npm run build",
76
- "git add ."
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
+ }