@tomei/finance 0.16.0 → 0.17.0

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 (75) 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 +2 -2
  5. package/dist/document/document.js.map +1 -1
  6. package/dist/enum/quick-book-client-scopes.enum.d.ts +0 -1
  7. package/dist/enum/quick-book-client-scopes.enum.js +1 -34
  8. package/dist/enum/quick-book-client-scopes.enum.js.map +1 -1
  9. package/dist/interfaces/account-system.interface.d.ts +1 -0
  10. package/dist/interfaces/account-system.interface.d.ts.map +1 -1
  11. package/dist/journal-entry/journal-entry.d.ts.map +1 -1
  12. package/dist/journal-entry/journal-entry.js +2 -2
  13. package/dist/journal-entry/journal-entry.js.map +1 -1
  14. package/dist/ledger-transaction/ledger-transaction.d.ts.map +1 -1
  15. package/dist/ledger-transaction/ledger-transaction.js +2 -2
  16. package/dist/ledger-transaction/ledger-transaction.js.map +1 -1
  17. package/dist/tsconfig.tsbuildinfo +1 -1
  18. package/invoice-template/assets/css/style.css.map +12 -12
  19. package/invoice-template/assets/css/style.min.css +1 -1
  20. package/invoice-template/assets/img/arrow_bg.svg +11 -11
  21. package/invoice-template/assets/img/coffy_shop_img.svg +18 -18
  22. package/invoice-template/assets/img/logo_accent.svg +3 -3
  23. package/invoice-template/assets/img/logo_white.svg +4 -4
  24. package/invoice-template/assets/img/sign.svg +12 -12
  25. package/invoice-template/assets/img/tomei-logo.svg +9 -9
  26. package/invoice-template/assets/js/html2canvas.min.js +10379 -10379
  27. package/invoice-template/assets/js/jquery.min.js +1 -1
  28. package/invoice-template/assets/sass/common/_color_variable.scss +12 -12
  29. package/invoice-template/assets/sass/common/_typography.scss +178 -178
  30. package/invoice-template/assets/sass/style.scss +12 -12
  31. package/migrations/add-discount-collumn-to-document-related-table.js +90 -90
  32. package/migrations/finance-account-migration.js +97 -97
  33. package/migrations/finance-company-migration.js +29 -29
  34. package/migrations/finance-customer-migration.js +51 -51
  35. package/migrations/finance-document-item-migration.js +111 -111
  36. package/migrations/finance-document-migration.js +122 -122
  37. package/migrations/finance-document-tag-migration.js +46 -46
  38. package/migrations/finance-journal-entry-migration.js +59 -59
  39. package/migrations/finance-ledger-transaction-migration.js +89 -89
  40. package/migrations/finance-payment-item-migration.js +52 -52
  41. package/migrations/finance-payment-method-migration.js +31 -31
  42. package/migrations/finance-payment-method-type-migration.js +55 -55
  43. package/migrations/finance-payment-migration.js +96 -96
  44. package/migrations/finance-post-history-migration.js +45 -45
  45. package/migrations/finance-tag-group-migration.js +53 -53
  46. package/migrations/finance-tag-migration.js +63 -63
  47. package/migrations/finance-tax-migration.js +52 -52
  48. package/migrations/refactor-finance-document-migration.js +71 -71
  49. package/migrations/update-document-item.migration.js +87 -87
  50. package/package.json +79 -79
  51. package/receipt-template/default/assets/css/style.css +2629 -2629
  52. package/receipt-template/default/assets/css/style.css.map +12 -12
  53. package/receipt-template/default/assets/css/style.min.css +1 -1
  54. package/receipt-template/default/assets/img/arrow_bg.svg +11 -11
  55. package/receipt-template/default/assets/img/coffy_shop_img.svg +18 -18
  56. package/receipt-template/default/assets/img/logo.svg +4 -4
  57. package/receipt-template/default/assets/img/logo_accent.svg +3 -3
  58. package/receipt-template/default/assets/img/logo_white.svg +4 -4
  59. package/receipt-template/default/assets/img/sign.svg +12 -12
  60. package/receipt-template/default/assets/img/tomei-logo.svg +9 -9
  61. package/receipt-template/default/assets/js/html2canvas.min.js +10379 -10379
  62. package/receipt-template/default/assets/js/jquery.min.js +1 -1
  63. package/receipt-template/default/assets/js/main.js +48 -48
  64. package/receipt-template/default/assets/sass/common/_color_variable.scss +12 -12
  65. package/receipt-template/default/assets/sass/common/_invoice.scss +1801 -1801
  66. package/receipt-template/default/assets/sass/common/_normalize.scss +350 -350
  67. package/receipt-template/default/assets/sass/common/_typography.scss +178 -178
  68. package/receipt-template/default/assets/sass/style.scss +12 -12
  69. package/receipt-template/default/index.html +291 -291
  70. package/scripts/postinstall.js +300 -300
  71. package/dist/enum/quick-book-client-scopes.enum.d.ts.map +0 -1
  72. package/dist/helpers/chrome-browser-pool.d.ts +0 -17
  73. package/dist/helpers/chrome-browser-pool.d.ts.map +0 -1
  74. package/dist/helpers/chrome-browser-pool.js +0 -109
  75. package/dist/helpers/chrome-browser-pool.js.map +0 -1
@@ -1,45 +1,45 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- async up(queryInterface, Sequelize) {
5
- await queryInterface.createTable('finance_PostHistory', {
6
- PostId: {
7
- type: Sequelize.STRING(30),
8
- primaryKey: true,
9
- allowNull: false,
10
- },
11
- DateTime: {
12
- type: Sequelize.DATE,
13
- allowNull: false,
14
- },
15
- ItemId: {
16
- type: Sequelize.STRING(30),
17
- allowNull: false,
18
- },
19
- ItemType: {
20
- type: Sequelize.STRING(200),
21
- allowNull: false,
22
- },
23
- ItemValue: {
24
- type: Sequelize.JSON(),
25
- allowNull: false,
26
- },
27
- PostedById: {
28
- type: Sequelize.STRING(30),
29
- allowNull: false,
30
- },
31
- AccSystemCode: {
32
- type: Sequelize.STRING(10),
33
- allowNull: false,
34
- },
35
- AccSystemRefId: {
36
- type: Sequelize.STRING(30),
37
- allowNull: false,
38
- },
39
- });
40
- },
41
-
42
- async down(queryInterface) {
43
- await queryInterface.dropTable('finance_PostHistory');
44
- },
45
- };
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ async up(queryInterface, Sequelize) {
5
+ await queryInterface.createTable('finance_PostHistory', {
6
+ PostId: {
7
+ type: Sequelize.STRING(30),
8
+ primaryKey: true,
9
+ allowNull: false,
10
+ },
11
+ DateTime: {
12
+ type: Sequelize.DATE,
13
+ allowNull: false,
14
+ },
15
+ ItemId: {
16
+ type: Sequelize.STRING(30),
17
+ allowNull: false,
18
+ },
19
+ ItemType: {
20
+ type: Sequelize.STRING(200),
21
+ allowNull: false,
22
+ },
23
+ ItemValue: {
24
+ type: Sequelize.JSON(),
25
+ allowNull: false,
26
+ },
27
+ PostedById: {
28
+ type: Sequelize.STRING(30),
29
+ allowNull: false,
30
+ },
31
+ AccSystemCode: {
32
+ type: Sequelize.STRING(10),
33
+ allowNull: false,
34
+ },
35
+ AccSystemRefId: {
36
+ type: Sequelize.STRING(30),
37
+ allowNull: false,
38
+ },
39
+ });
40
+ },
41
+
42
+ async down(queryInterface) {
43
+ await queryInterface.dropTable('finance_PostHistory');
44
+ },
45
+ };
@@ -1,53 +1,53 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- async up(queryInterface, Sequelize) {
5
- await queryInterface.createTable('finance_TagGroup', {
6
- TagGroupId: {
7
- type: Sequelize.STRING(30),
8
- primaryKey: true,
9
- allowNull: false,
10
- },
11
- TagGroupName: {
12
- type: Sequelize.STRING(50),
13
- allowNull: false,
14
- },
15
- CreatedById: {
16
- type: Sequelize.STRING(30),
17
- allowNull: false,
18
- },
19
- CreatedAt: {
20
- type: Sequelize.DATE,
21
- allowNull: false,
22
- },
23
- UpdatedById: {
24
- type: Sequelize.STRING(30),
25
- allowNull: true,
26
- },
27
- UpdatedAt: {
28
- type: Sequelize.DATE,
29
- allowNull: true,
30
- },
31
- AccSystemRefId: {
32
- type: Sequelize.STRING(30),
33
- allowNull: true,
34
- },
35
- PostedToAccSystemYN: {
36
- type: Sequelize.CHAR(1),
37
- allowNull: true,
38
- },
39
- PostedById: {
40
- type: Sequelize.STRING(30),
41
- allowNull: true,
42
- },
43
- PostedDateTime: {
44
- type: Sequelize.DATE,
45
- allowNull: true,
46
- },
47
- });
48
- },
49
-
50
- async down(queryInterface) {
51
- await queryInterface.dropTable('finance_TagGroup');
52
- },
53
- };
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ async up(queryInterface, Sequelize) {
5
+ await queryInterface.createTable('finance_TagGroup', {
6
+ TagGroupId: {
7
+ type: Sequelize.STRING(30),
8
+ primaryKey: true,
9
+ allowNull: false,
10
+ },
11
+ TagGroupName: {
12
+ type: Sequelize.STRING(50),
13
+ allowNull: false,
14
+ },
15
+ CreatedById: {
16
+ type: Sequelize.STRING(30),
17
+ allowNull: false,
18
+ },
19
+ CreatedAt: {
20
+ type: Sequelize.DATE,
21
+ allowNull: false,
22
+ },
23
+ UpdatedById: {
24
+ type: Sequelize.STRING(30),
25
+ allowNull: true,
26
+ },
27
+ UpdatedAt: {
28
+ type: Sequelize.DATE,
29
+ allowNull: true,
30
+ },
31
+ AccSystemRefId: {
32
+ type: Sequelize.STRING(30),
33
+ allowNull: true,
34
+ },
35
+ PostedToAccSystemYN: {
36
+ type: Sequelize.CHAR(1),
37
+ allowNull: true,
38
+ },
39
+ PostedById: {
40
+ type: Sequelize.STRING(30),
41
+ allowNull: true,
42
+ },
43
+ PostedDateTime: {
44
+ type: Sequelize.DATE,
45
+ allowNull: true,
46
+ },
47
+ });
48
+ },
49
+
50
+ async down(queryInterface) {
51
+ await queryInterface.dropTable('finance_TagGroup');
52
+ },
53
+ };
@@ -1,63 +1,63 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- async up(queryInterface, Sequelize) {
5
- await queryInterface.createTable('finance_Tag', {
6
- TagId: {
7
- type: Sequelize.STRING(30),
8
- primaryKey: true,
9
- allowNull: false,
10
- },
11
- TagName: {
12
- type: Sequelize.STRING(50),
13
- allowNull: false,
14
- },
15
- TagGroupId: {
16
- type: Sequelize.STRING(30),
17
- allowNull: false,
18
- references: {
19
- model: 'finance_TagGroup',
20
- key: 'TagGroupId',
21
- },
22
- onUpdate: 'CASCADE',
23
- onDelete: 'CASCADE',
24
- },
25
- CreatedById: {
26
- type: Sequelize.STRING(30),
27
- allowNull: false,
28
- },
29
- CreatedAt: {
30
- type: Sequelize.DATE,
31
- allowNull: false,
32
- },
33
- UpdatedById: {
34
- type: Sequelize.STRING(30),
35
- allowNull: true,
36
- },
37
- UpdatedAt: {
38
- type: Sequelize.DATE,
39
- allowNull: true,
40
- },
41
- AccSystemRefId: {
42
- type: Sequelize.STRING(30),
43
- allowNull: true,
44
- },
45
- PostedToAccSystemYN: {
46
- type: Sequelize.CHAR(1),
47
- allowNull: true,
48
- },
49
- PostedById: {
50
- type: Sequelize.STRING(30),
51
- allowNull: true,
52
- },
53
- PostedDateTime: {
54
- type: Sequelize.DATE,
55
- allowNull: true,
56
- },
57
- });
58
- },
59
-
60
- async down(queryInterface) {
61
- await queryInterface.dropTable('finance_Tag');
62
- },
63
- };
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ async up(queryInterface, Sequelize) {
5
+ await queryInterface.createTable('finance_Tag', {
6
+ TagId: {
7
+ type: Sequelize.STRING(30),
8
+ primaryKey: true,
9
+ allowNull: false,
10
+ },
11
+ TagName: {
12
+ type: Sequelize.STRING(50),
13
+ allowNull: false,
14
+ },
15
+ TagGroupId: {
16
+ type: Sequelize.STRING(30),
17
+ allowNull: false,
18
+ references: {
19
+ model: 'finance_TagGroup',
20
+ key: 'TagGroupId',
21
+ },
22
+ onUpdate: 'CASCADE',
23
+ onDelete: 'CASCADE',
24
+ },
25
+ CreatedById: {
26
+ type: Sequelize.STRING(30),
27
+ allowNull: false,
28
+ },
29
+ CreatedAt: {
30
+ type: Sequelize.DATE,
31
+ allowNull: false,
32
+ },
33
+ UpdatedById: {
34
+ type: Sequelize.STRING(30),
35
+ allowNull: true,
36
+ },
37
+ UpdatedAt: {
38
+ type: Sequelize.DATE,
39
+ allowNull: true,
40
+ },
41
+ AccSystemRefId: {
42
+ type: Sequelize.STRING(30),
43
+ allowNull: true,
44
+ },
45
+ PostedToAccSystemYN: {
46
+ type: Sequelize.CHAR(1),
47
+ allowNull: true,
48
+ },
49
+ PostedById: {
50
+ type: Sequelize.STRING(30),
51
+ allowNull: true,
52
+ },
53
+ PostedDateTime: {
54
+ type: Sequelize.DATE,
55
+ allowNull: true,
56
+ },
57
+ });
58
+ },
59
+
60
+ async down(queryInterface) {
61
+ await queryInterface.dropTable('finance_Tag');
62
+ },
63
+ };
@@ -1,52 +1,52 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- async up(queryInterface, Sequelize) {
5
- await queryInterface.createTable('finance_Tax', {
6
- TaxCode: {
7
- type: Sequelize.STRING(30),
8
- primaryKey: true,
9
- allowNull: false,
10
- },
11
- TaxRate: {
12
- type: Sequelize.DECIMAL(10, 2),
13
- allowNull: false,
14
- },
15
- Description: {
16
- type: Sequelize.STRING(1000),
17
- },
18
- CompanyId: {
19
- type: Sequelize.STRING(30),
20
- allowNull: false,
21
- references: {
22
- model: 'finance_Company',
23
- key: 'CompanyId',
24
- },
25
- onUpdate: 'CASCADE',
26
- onDelete: 'CASCADE',
27
- },
28
- CreatedAt: {
29
- allowNull: false,
30
- defaultValue: new Date(),
31
- type: Sequelize.DATE,
32
- },
33
- CreatedById: {
34
- type: Sequelize.STRING(30),
35
- allowNull: false,
36
- },
37
- UpdatedAt: {
38
- allowNull: false,
39
- defaultValue: new Date(),
40
- type: Sequelize.DATE,
41
- },
42
- UpdatedById: {
43
- type: Sequelize.STRING(30),
44
- allowNull: false,
45
- },
46
- });
47
- },
48
-
49
- async down(queryInterface) {
50
- await queryInterface.dropTable('finance_Tax');
51
- },
52
- };
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ async up(queryInterface, Sequelize) {
5
+ await queryInterface.createTable('finance_Tax', {
6
+ TaxCode: {
7
+ type: Sequelize.STRING(30),
8
+ primaryKey: true,
9
+ allowNull: false,
10
+ },
11
+ TaxRate: {
12
+ type: Sequelize.DECIMAL(10, 2),
13
+ allowNull: false,
14
+ },
15
+ Description: {
16
+ type: Sequelize.STRING(1000),
17
+ },
18
+ CompanyId: {
19
+ type: Sequelize.STRING(30),
20
+ allowNull: false,
21
+ references: {
22
+ model: 'finance_Company',
23
+ key: 'CompanyId',
24
+ },
25
+ onUpdate: 'CASCADE',
26
+ onDelete: 'CASCADE',
27
+ },
28
+ CreatedAt: {
29
+ allowNull: false,
30
+ defaultValue: new Date(),
31
+ type: Sequelize.DATE,
32
+ },
33
+ CreatedById: {
34
+ type: Sequelize.STRING(30),
35
+ allowNull: false,
36
+ },
37
+ UpdatedAt: {
38
+ allowNull: false,
39
+ defaultValue: new Date(),
40
+ type: Sequelize.DATE,
41
+ },
42
+ UpdatedById: {
43
+ type: Sequelize.STRING(30),
44
+ allowNull: false,
45
+ },
46
+ });
47
+ },
48
+
49
+ async down(queryInterface) {
50
+ await queryInterface.dropTable('finance_Tax');
51
+ },
52
+ };
@@ -1,72 +1,72 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- up: async (queryInterface, Sequelize) => {
5
- const transaction = await queryInterface.sequelize.transaction();
6
- try {
7
- //Update column type to string
8
- await queryInterface.changeColumn('finance_Document', 'Status', {
9
- type: Sequelize.STRING(30),
10
- allowNull: false,
11
- }, { transaction });
12
- // Update inconsistent data before changing the enum values
13
- await queryInterface.sequelize.query(`
14
- UPDATE finance_Document
15
- SET Status = 'Settled'
16
- WHERE Status = 'Paid'
17
- `, { transaction });
18
-
19
- await queryInterface.sequelize.query(`
20
- UPDATE finance_Document
21
- SET Status = 'Partial Settled'
22
- WHERE Status = 'Partial Paid'
23
- `, { transaction });
24
-
25
- // Change the column to the new enum values
26
- await queryInterface.changeColumn('finance_Document', 'Status', {
27
- type: Sequelize.ENUM(['Unpaid', 'Settled', 'Partial Settled', 'Cancelled']), // new enum values
28
- allowNull: false,
29
- }, { transaction });
30
-
31
- await transaction.commit();
32
- } catch (error) {
33
- await transaction.rollback();
34
- throw error;
35
- }
36
- },
37
-
38
- down: async (queryInterface, Sequelize) => {
39
- const transaction = await queryInterface.sequelize.transaction();
40
- try {
41
- //Update column type to string
42
- await queryInterface.changeColumn('finance_Document', 'Status', {
43
- type: Sequelize.STRING(30),
44
- allowNull: false,
45
- }, { transaction });
46
-
47
- // Update inconsistent data before changing the enum values
48
- await queryInterface.sequelize.query(`
49
- UPDATE finance_Document
50
- SET Status = 'Paid'
51
- WHERE Status = 'Settled'
52
- `, { transaction });
53
-
54
- await queryInterface.sequelize.query(`
55
- UPDATE finance_Document
56
- SET Status = 'Partial Paid'
57
- WHERE Status = 'Partial Settled'
58
- `, { transaction });
59
-
60
- // Change the column to the new enum values
61
- await queryInterface.changeColumn('finance_Document', 'Status', {
62
- type: Sequelize.ENUM(['Unpaid', 'Paid', 'Partial Paid', 'Cancelled']), // new enum values
63
- allowNull: false,
64
- }, { transaction });
65
-
66
- await transaction.commit();
67
- } catch (error) {
68
- await transaction.rollback();
69
- throw error;
70
- }
71
- }
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ up: async (queryInterface, Sequelize) => {
5
+ const transaction = await queryInterface.sequelize.transaction();
6
+ try {
7
+ //Update column type to string
8
+ await queryInterface.changeColumn('finance_Document', 'Status', {
9
+ type: Sequelize.STRING(30),
10
+ allowNull: false,
11
+ }, { transaction });
12
+ // Update inconsistent data before changing the enum values
13
+ await queryInterface.sequelize.query(`
14
+ UPDATE finance_Document
15
+ SET Status = 'Settled'
16
+ WHERE Status = 'Paid'
17
+ `, { transaction });
18
+
19
+ await queryInterface.sequelize.query(`
20
+ UPDATE finance_Document
21
+ SET Status = 'Partial Settled'
22
+ WHERE Status = 'Partial Paid'
23
+ `, { transaction });
24
+
25
+ // Change the column to the new enum values
26
+ await queryInterface.changeColumn('finance_Document', 'Status', {
27
+ type: Sequelize.ENUM(['Unpaid', 'Settled', 'Partial Settled', 'Cancelled']), // new enum values
28
+ allowNull: false,
29
+ }, { transaction });
30
+
31
+ await transaction.commit();
32
+ } catch (error) {
33
+ await transaction.rollback();
34
+ throw error;
35
+ }
36
+ },
37
+
38
+ down: async (queryInterface, Sequelize) => {
39
+ const transaction = await queryInterface.sequelize.transaction();
40
+ try {
41
+ //Update column type to string
42
+ await queryInterface.changeColumn('finance_Document', 'Status', {
43
+ type: Sequelize.STRING(30),
44
+ allowNull: false,
45
+ }, { transaction });
46
+
47
+ // Update inconsistent data before changing the enum values
48
+ await queryInterface.sequelize.query(`
49
+ UPDATE finance_Document
50
+ SET Status = 'Paid'
51
+ WHERE Status = 'Settled'
52
+ `, { transaction });
53
+
54
+ await queryInterface.sequelize.query(`
55
+ UPDATE finance_Document
56
+ SET Status = 'Partial Paid'
57
+ WHERE Status = 'Partial Settled'
58
+ `, { transaction });
59
+
60
+ // Change the column to the new enum values
61
+ await queryInterface.changeColumn('finance_Document', 'Status', {
62
+ type: Sequelize.ENUM(['Unpaid', 'Paid', 'Partial Paid', 'Cancelled']), // new enum values
63
+ allowNull: false,
64
+ }, { transaction });
65
+
66
+ await transaction.commit();
67
+ } catch (error) {
68
+ await transaction.rollback();
69
+ throw error;
70
+ }
71
+ }
72
72
  };