@tomei/finance 0.12.0 → 0.12.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 (48) hide show
  1. package/.commitlintrc.json +23 -23
  2. package/LICENSE +21 -21
  3. package/configs/config.js +348 -348
  4. package/dist/document/document.js +165 -165
  5. package/dist/journal-entry/journal-entry.d.ts.map +1 -1
  6. package/dist/journal-entry/journal-entry.js +2 -2
  7. package/dist/journal-entry/journal-entry.js.map +1 -1
  8. package/dist/ledger-transaction/ledger-transaction.d.ts.map +1 -1
  9. package/dist/ledger-transaction/ledger-transaction.js +5 -2
  10. package/dist/ledger-transaction/ledger-transaction.js.map +1 -1
  11. package/dist/tsconfig.tsbuildinfo +1 -1
  12. package/invoice-template/assets/css/style.css.map +12 -12
  13. package/invoice-template/assets/css/style.min.css +1 -1
  14. package/invoice-template/assets/img/arrow_bg.svg +11 -11
  15. package/invoice-template/assets/img/coffy_shop_img.svg +18 -18
  16. package/invoice-template/assets/img/logo_accent.svg +3 -3
  17. package/invoice-template/assets/img/logo_white.svg +4 -4
  18. package/invoice-template/assets/img/sign.svg +12 -12
  19. package/invoice-template/assets/img/tomei-logo.svg +9 -9
  20. package/invoice-template/assets/js/html2canvas.min.js +10379 -10379
  21. package/invoice-template/assets/js/jquery.min.js +1 -1
  22. package/invoice-template/assets/sass/common/_color_variable.scss +12 -12
  23. package/invoice-template/assets/sass/common/_typography.scss +178 -178
  24. package/invoice-template/assets/sass/style.scss +12 -12
  25. package/migrations/add-discount-collumn-to-document-related-table.js +90 -90
  26. package/migrations/finance-account-migration.js +97 -97
  27. package/migrations/finance-company-migration.js +29 -29
  28. package/migrations/finance-customer-migration.js +51 -51
  29. package/migrations/finance-document-item-migration.js +111 -111
  30. package/migrations/finance-document-migration.js +122 -122
  31. package/migrations/finance-document-tag-migration.js +46 -46
  32. package/migrations/finance-journal-entry-migration.js +59 -59
  33. package/migrations/finance-ledger-transaction-migration.js +89 -89
  34. package/migrations/finance-payment-item-migration.js +52 -52
  35. package/migrations/finance-payment-method-migration.js +31 -31
  36. package/migrations/finance-payment-method-type-migration.js +55 -55
  37. package/migrations/finance-payment-migration.js +96 -96
  38. package/migrations/finance-post-history-migration.js +45 -45
  39. package/migrations/finance-tag-group-migration.js +53 -53
  40. package/migrations/finance-tag-migration.js +63 -63
  41. package/migrations/finance-tax-migration.js +52 -52
  42. package/migrations/refactor-finance-document-migration.js +71 -71
  43. package/migrations/update-document-item.migration.js +87 -87
  44. package/package.json +77 -77
  45. package/dist/enum/quick-book-client-scopes.enum.d.ts +0 -14
  46. package/dist/enum/quick-book-client-scopes.enum.d.ts.map +0 -1
  47. package/dist/enum/quick-book-client-scopes.enum.js +0 -52
  48. package/dist/enum/quick-book-client-scopes.enum.js.map +0 -1
@@ -1,91 +1,91 @@
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_Document',
9
- 'AmountBeforeDiscount',
10
- {
11
- allowNull: true,
12
- type: Sequelize.DECIMAL(10, 2),
13
- after: 'Currency'
14
- },
15
- { transaction },
16
- );
17
- await queryInterface.addColumn(
18
- 'finance_Document',
19
- 'DiscountType',
20
- {
21
- allowNull: true,
22
- type: Sequelize.ENUM('Percentage', 'Fixed'),
23
- after: 'Amount'
24
- },
25
- { transaction },
26
- );
27
- await queryInterface.addColumn(
28
- 'finance_Document',
29
- 'DiscountValue',
30
- {
31
- allowNull: true,
32
- type: Sequelize.DECIMAL(10, 2),
33
- after: 'Amount'
34
- },
35
- { transaction },
36
- );
37
- await queryInterface.addColumn(
38
- 'finance_DocumentItem',
39
- 'AmountBeforeDiscount',
40
- {
41
- allowNull: true,
42
- type: Sequelize.DECIMAL(10, 2),
43
- after: 'QuantityUOM'
44
- },
45
- { transaction },
46
- );
47
- await queryInterface.addColumn(
48
- 'finance_DocumentItem',
49
- 'DiscountType',
50
- {
51
- allowNull: true,
52
- type: Sequelize.ENUM('Percentage', 'Fixed'),
53
- after: 'Amount'
54
- },
55
- { transaction },
56
- );
57
- await queryInterface.addColumn(
58
- 'finance_DocumentItem',
59
- 'DiscountValue',
60
- {
61
- allowNull: true,
62
- type: Sequelize.DECIMAL(10, 2),
63
- after: 'Amount'
64
- },
65
- { transaction },
66
- );
67
-
68
- await transaction.commit();
69
- } catch (error) {
70
- await transaction.rollback();
71
- throw error;
72
- }
73
- },
74
-
75
- down: async (queryInterface) => {
76
- const transaction = await queryInterface.sequelize.transaction();
77
- try {
78
- await queryInterface.removeColumn('finance_Document', 'AmountBeforeDiscount', { transaction });
79
- await queryInterface.removeColumn('finance_Document', 'DiscountType', { transaction });
80
- await queryInterface.removeColumn('finance_Document', 'DiscountValue', { transaction });
81
- await queryInterface.removeColumn('finance_DocumentItem', 'AmountBeforeDiscount', { transaction });
82
- await queryInterface.removeColumn('finance_DocumentItem', 'DiscountType', { transaction });
83
- await queryInterface.removeColumn('finance_DocumentItem', 'DiscountValue', { transaction });
84
-
85
- await transaction.commit();
86
- } catch (error) {
87
- await transaction.rollback();
88
- throw error;
89
- }
90
- }
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_Document',
9
+ 'AmountBeforeDiscount',
10
+ {
11
+ allowNull: true,
12
+ type: Sequelize.DECIMAL(10, 2),
13
+ after: 'Currency'
14
+ },
15
+ { transaction },
16
+ );
17
+ await queryInterface.addColumn(
18
+ 'finance_Document',
19
+ 'DiscountType',
20
+ {
21
+ allowNull: true,
22
+ type: Sequelize.ENUM('Percentage', 'Fixed'),
23
+ after: 'Amount'
24
+ },
25
+ { transaction },
26
+ );
27
+ await queryInterface.addColumn(
28
+ 'finance_Document',
29
+ 'DiscountValue',
30
+ {
31
+ allowNull: true,
32
+ type: Sequelize.DECIMAL(10, 2),
33
+ after: 'Amount'
34
+ },
35
+ { transaction },
36
+ );
37
+ await queryInterface.addColumn(
38
+ 'finance_DocumentItem',
39
+ 'AmountBeforeDiscount',
40
+ {
41
+ allowNull: true,
42
+ type: Sequelize.DECIMAL(10, 2),
43
+ after: 'QuantityUOM'
44
+ },
45
+ { transaction },
46
+ );
47
+ await queryInterface.addColumn(
48
+ 'finance_DocumentItem',
49
+ 'DiscountType',
50
+ {
51
+ allowNull: true,
52
+ type: Sequelize.ENUM('Percentage', 'Fixed'),
53
+ after: 'Amount'
54
+ },
55
+ { transaction },
56
+ );
57
+ await queryInterface.addColumn(
58
+ 'finance_DocumentItem',
59
+ 'DiscountValue',
60
+ {
61
+ allowNull: true,
62
+ type: Sequelize.DECIMAL(10, 2),
63
+ after: 'Amount'
64
+ },
65
+ { transaction },
66
+ );
67
+
68
+ await transaction.commit();
69
+ } catch (error) {
70
+ await transaction.rollback();
71
+ throw error;
72
+ }
73
+ },
74
+
75
+ down: async (queryInterface) => {
76
+ const transaction = await queryInterface.sequelize.transaction();
77
+ try {
78
+ await queryInterface.removeColumn('finance_Document', 'AmountBeforeDiscount', { transaction });
79
+ await queryInterface.removeColumn('finance_Document', 'DiscountType', { transaction });
80
+ await queryInterface.removeColumn('finance_Document', 'DiscountValue', { transaction });
81
+ await queryInterface.removeColumn('finance_DocumentItem', 'AmountBeforeDiscount', { transaction });
82
+ await queryInterface.removeColumn('finance_DocumentItem', 'DiscountType', { transaction });
83
+ await queryInterface.removeColumn('finance_DocumentItem', 'DiscountValue', { transaction });
84
+
85
+ await transaction.commit();
86
+ } catch (error) {
87
+ await transaction.rollback();
88
+ throw error;
89
+ }
90
+ }
91
91
  };
@@ -1,97 +1,97 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- async up(queryInterface, Sequelize) {
5
- await queryInterface.createTable('finance_Account', {
6
- AccountNo: {
7
- type: Sequelize.STRING(30),
8
- primaryKey: true,
9
- allowNull: false,
10
- },
11
- CompanyId: {
12
- type: Sequelize.STRING(30),
13
- allowNull: false,
14
- references: {
15
- model: 'finance_Company',
16
- key: 'CompanyId',
17
- },
18
- onUpdate: 'CASCADE',
19
- onDelete: 'CASCADE',
20
- },
21
- ParentAccountNo: {
22
- type: Sequelize.STRING(30),
23
- allowNull: true,
24
- },
25
- Name: {
26
- type: Sequelize.STRING(200),
27
- allowNull: false,
28
- },
29
- Description: {
30
- type: Sequelize.STRING(2000),
31
- allowNull: true,
32
- },
33
- AccountType: {
34
- type: Sequelize.STRING(100),
35
- allowNull: false,
36
- },
37
- AccountSubtype: {
38
- type: Sequelize.STRING(100),
39
- allowNull: true,
40
- },
41
- OwnerId: {
42
- type: Sequelize.STRING(30),
43
- allowNull: true,
44
- },
45
- OwnerType: {
46
- type: Sequelize.STRING(200),
47
- allowNull: true,
48
- },
49
- RelatedObjectId: {
50
- type: Sequelize.STRING(30),
51
- allowNull: true,
52
- },
53
- RelatedObjectType: {
54
- type: Sequelize.STRING(200),
55
- allowNull: true,
56
- },
57
- CreatedAt: {
58
- allowNull: false,
59
- defaultValue: new Date(),
60
- type: Sequelize.DATE,
61
- },
62
- CreatedById: {
63
- type: Sequelize.STRING(30),
64
- allowNull: false,
65
- },
66
- UpdatedAt: {
67
- allowNull: true,
68
- defaultValue: new Date(),
69
- type: Sequelize.DATE,
70
- },
71
- UpdatedById: {
72
- type: Sequelize.STRING(30),
73
- allowNull: true,
74
- },
75
- AccSystemRefId: {
76
- type: Sequelize.STRING(30),
77
- allowNull: false,
78
- },
79
- PostedToAccSystemYN: {
80
- type: Sequelize.ENUM(['Y', 'N']),
81
- allowNull: false,
82
- },
83
- PostedById: {
84
- type: Sequelize.STRING(30),
85
- allowNull: true,
86
- },
87
- PostedDateTime: {
88
- type: Sequelize.DATE,
89
- allowNull: true,
90
- },
91
- });
92
- },
93
-
94
- async down(queryInterface) {
95
- await queryInterface.dropTable('finance_Account');
96
- },
97
- };
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ async up(queryInterface, Sequelize) {
5
+ await queryInterface.createTable('finance_Account', {
6
+ AccountNo: {
7
+ type: Sequelize.STRING(30),
8
+ primaryKey: true,
9
+ allowNull: false,
10
+ },
11
+ CompanyId: {
12
+ type: Sequelize.STRING(30),
13
+ allowNull: false,
14
+ references: {
15
+ model: 'finance_Company',
16
+ key: 'CompanyId',
17
+ },
18
+ onUpdate: 'CASCADE',
19
+ onDelete: 'CASCADE',
20
+ },
21
+ ParentAccountNo: {
22
+ type: Sequelize.STRING(30),
23
+ allowNull: true,
24
+ },
25
+ Name: {
26
+ type: Sequelize.STRING(200),
27
+ allowNull: false,
28
+ },
29
+ Description: {
30
+ type: Sequelize.STRING(2000),
31
+ allowNull: true,
32
+ },
33
+ AccountType: {
34
+ type: Sequelize.STRING(100),
35
+ allowNull: false,
36
+ },
37
+ AccountSubtype: {
38
+ type: Sequelize.STRING(100),
39
+ allowNull: true,
40
+ },
41
+ OwnerId: {
42
+ type: Sequelize.STRING(30),
43
+ allowNull: true,
44
+ },
45
+ OwnerType: {
46
+ type: Sequelize.STRING(200),
47
+ allowNull: true,
48
+ },
49
+ RelatedObjectId: {
50
+ type: Sequelize.STRING(30),
51
+ allowNull: true,
52
+ },
53
+ RelatedObjectType: {
54
+ type: Sequelize.STRING(200),
55
+ allowNull: true,
56
+ },
57
+ CreatedAt: {
58
+ allowNull: false,
59
+ defaultValue: new Date(),
60
+ type: Sequelize.DATE,
61
+ },
62
+ CreatedById: {
63
+ type: Sequelize.STRING(30),
64
+ allowNull: false,
65
+ },
66
+ UpdatedAt: {
67
+ allowNull: true,
68
+ defaultValue: new Date(),
69
+ type: Sequelize.DATE,
70
+ },
71
+ UpdatedById: {
72
+ type: Sequelize.STRING(30),
73
+ allowNull: true,
74
+ },
75
+ AccSystemRefId: {
76
+ type: Sequelize.STRING(30),
77
+ allowNull: false,
78
+ },
79
+ PostedToAccSystemYN: {
80
+ type: Sequelize.ENUM(['Y', 'N']),
81
+ allowNull: false,
82
+ },
83
+ PostedById: {
84
+ type: Sequelize.STRING(30),
85
+ allowNull: true,
86
+ },
87
+ PostedDateTime: {
88
+ type: Sequelize.DATE,
89
+ allowNull: true,
90
+ },
91
+ });
92
+ },
93
+
94
+ async down(queryInterface) {
95
+ await queryInterface.dropTable('finance_Account');
96
+ },
97
+ };
@@ -1,29 +1,29 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- async up(queryInterface, Sequelize) {
5
- await queryInterface.createTable('finance_Company', {
6
- CompanyId: {
7
- type: Sequelize.STRING(30),
8
- primaryKey: true,
9
- allowNull: false,
10
- },
11
- CompSystemCode: {
12
- type: Sequelize.STRING(10),
13
- allowNull: false,
14
- },
15
- CompSystemRefId: {
16
- type: Sequelize.STRING(30),
17
- allowNull: false,
18
- },
19
- AccSystemCode: {
20
- type: Sequelize.STRING(10),
21
- allowNull: false,
22
- },
23
- });
24
- },
25
-
26
- async down(queryInterface) {
27
- await queryInterface.dropTable('finance_Company');
28
- },
29
- };
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ async up(queryInterface, Sequelize) {
5
+ await queryInterface.createTable('finance_Company', {
6
+ CompanyId: {
7
+ type: Sequelize.STRING(30),
8
+ primaryKey: true,
9
+ allowNull: false,
10
+ },
11
+ CompSystemCode: {
12
+ type: Sequelize.STRING(10),
13
+ allowNull: false,
14
+ },
15
+ CompSystemRefId: {
16
+ type: Sequelize.STRING(30),
17
+ allowNull: false,
18
+ },
19
+ AccSystemCode: {
20
+ type: Sequelize.STRING(10),
21
+ allowNull: false,
22
+ },
23
+ });
24
+ },
25
+
26
+ async down(queryInterface) {
27
+ await queryInterface.dropTable('finance_Company');
28
+ },
29
+ };
@@ -1,51 +1,51 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- async up(queryInterface, Sequelize) {
5
- await queryInterface.createTable('finance_Customer', {
6
- CustomerId: {
7
- type: Sequelize.STRING(30),
8
- primaryKey: true,
9
- allowNull: false,
10
- },
11
- CompanyId: {
12
- type: Sequelize.STRING(30),
13
- allowNull: false,
14
- references: {
15
- model: 'finance_Company',
16
- key: 'CompanyId',
17
- },
18
- onUpdate: 'CASCADE',
19
- onDelete: 'CASCADE',
20
- },
21
- CustSystemCode: {
22
- type: Sequelize.STRING(10),
23
- allowNull: false,
24
- },
25
- CustSystemRefId: {
26
- type: Sequelize.STRING(30),
27
- allowNull: false,
28
- },
29
- AccSystemRefId: {
30
- type: Sequelize.STRING(30),
31
- allowNull: false,
32
- },
33
- PostedToAccSystemYN: {
34
- type: Sequelize.CHAR(1),
35
- allowNull: false,
36
- },
37
- PostedById: {
38
- type: Sequelize.STRING(30),
39
- allowNull: true,
40
- },
41
- PostedDateTime: {
42
- type: Sequelize.DATE,
43
- allowNull: true,
44
- },
45
- });
46
- },
47
-
48
- async down(queryInterface) {
49
- await queryInterface.dropTable('finance_Customer');
50
- },
51
- };
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ async up(queryInterface, Sequelize) {
5
+ await queryInterface.createTable('finance_Customer', {
6
+ CustomerId: {
7
+ type: Sequelize.STRING(30),
8
+ primaryKey: true,
9
+ allowNull: false,
10
+ },
11
+ CompanyId: {
12
+ type: Sequelize.STRING(30),
13
+ allowNull: false,
14
+ references: {
15
+ model: 'finance_Company',
16
+ key: 'CompanyId',
17
+ },
18
+ onUpdate: 'CASCADE',
19
+ onDelete: 'CASCADE',
20
+ },
21
+ CustSystemCode: {
22
+ type: Sequelize.STRING(10),
23
+ allowNull: false,
24
+ },
25
+ CustSystemRefId: {
26
+ type: Sequelize.STRING(30),
27
+ allowNull: false,
28
+ },
29
+ AccSystemRefId: {
30
+ type: Sequelize.STRING(30),
31
+ allowNull: false,
32
+ },
33
+ PostedToAccSystemYN: {
34
+ type: Sequelize.CHAR(1),
35
+ allowNull: false,
36
+ },
37
+ PostedById: {
38
+ type: Sequelize.STRING(30),
39
+ allowNull: true,
40
+ },
41
+ PostedDateTime: {
42
+ type: Sequelize.DATE,
43
+ allowNull: true,
44
+ },
45
+ });
46
+ },
47
+
48
+ async down(queryInterface) {
49
+ await queryInterface.dropTable('finance_Customer');
50
+ },
51
+ };