@tomei/finance 0.18.1-dev.1 → 0.18.3-test.3

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 (67) hide show
  1. package/.commitlintrc.json +23 -23
  2. package/CHANGELOG.md +17 -17
  3. package/LICENSE +21 -21
  4. package/MIGRATION.md +43 -43
  5. package/configs/config.js +348 -348
  6. package/dist/finance-company/finance-company.d.ts +1 -1
  7. package/dist/finance-company/finance-company.d.ts.map +1 -1
  8. package/dist/finance-company/finance-company.js +14 -11
  9. package/dist/finance-company/finance-company.js.map +1 -1
  10. package/dist/tsconfig.tsbuildinfo +1 -1
  11. package/invoice-template/assets/css/style.css.map +12 -12
  12. package/invoice-template/assets/css/style.min.css +1 -1
  13. package/invoice-template/assets/img/arrow_bg.svg +11 -11
  14. package/invoice-template/assets/img/coffy_shop_img.svg +18 -18
  15. package/invoice-template/assets/img/logo_accent.svg +3 -3
  16. package/invoice-template/assets/img/logo_white.svg +4 -4
  17. package/invoice-template/assets/img/sign.svg +12 -12
  18. package/invoice-template/assets/img/tomei-logo.svg +9 -9
  19. package/invoice-template/assets/js/html2canvas.min.js +10379 -10379
  20. package/invoice-template/assets/js/jquery.min.js +1 -1
  21. package/invoice-template/assets/sass/common/_color_variable.scss +12 -12
  22. package/invoice-template/assets/sass/common/_typography.scss +178 -178
  23. package/invoice-template/assets/sass/style.scss +12 -12
  24. package/migrations/add-discount-collumn-to-document-related-table.js +90 -90
  25. package/migrations/finance-account-migration.js +97 -97
  26. package/migrations/finance-company-migration.js +29 -29
  27. package/migrations/finance-customer-migration.js +51 -51
  28. package/migrations/finance-document-item-migration.js +111 -111
  29. package/migrations/finance-document-migration.js +122 -122
  30. package/migrations/finance-document-tag-migration.js +46 -46
  31. package/migrations/finance-journal-entry-migration.js +59 -59
  32. package/migrations/finance-ledger-transaction-migration.js +89 -89
  33. package/migrations/finance-payment-item-migration.js +52 -52
  34. package/migrations/finance-payment-method-migration.js +31 -31
  35. package/migrations/finance-payment-method-type-migration.js +55 -55
  36. package/migrations/finance-payment-migration.js +96 -96
  37. package/migrations/finance-post-history-migration.js +45 -45
  38. package/migrations/finance-tag-group-migration.js +53 -53
  39. package/migrations/finance-tag-migration.js +63 -63
  40. package/migrations/finance-tax-migration.js +52 -52
  41. package/migrations/refactor-finance-document-migration.js +71 -71
  42. package/migrations/update-document-item.migration.js +87 -87
  43. package/package.json +84 -81
  44. package/receipt-template/default/assets/css/style.css +2629 -2629
  45. package/receipt-template/default/assets/css/style.css.map +12 -12
  46. package/receipt-template/default/assets/css/style.min.css +1 -1
  47. package/receipt-template/default/assets/img/arrow_bg.svg +11 -11
  48. package/receipt-template/default/assets/img/coffy_shop_img.svg +18 -18
  49. package/receipt-template/default/assets/img/logo.svg +4 -4
  50. package/receipt-template/default/assets/img/logo_accent.svg +3 -3
  51. package/receipt-template/default/assets/img/logo_white.svg +4 -4
  52. package/receipt-template/default/assets/img/sign.svg +12 -12
  53. package/receipt-template/default/assets/img/tomei-logo.svg +9 -9
  54. package/receipt-template/default/assets/js/html2canvas.min.js +10379 -10379
  55. package/receipt-template/default/assets/js/jquery.min.js +1 -1
  56. package/receipt-template/default/assets/js/main.js +48 -48
  57. package/receipt-template/default/assets/sass/common/_color_variable.scss +12 -12
  58. package/receipt-template/default/assets/sass/common/_invoice.scss +1801 -1801
  59. package/receipt-template/default/assets/sass/common/_normalize.scss +350 -350
  60. package/receipt-template/default/assets/sass/common/_typography.scss +178 -178
  61. package/receipt-template/default/assets/sass/style.scss +12 -12
  62. package/receipt-template/default/index.html +291 -291
  63. package/scripts/postinstall.js +300 -300
  64. package/dist/test.d.ts +0 -2
  65. package/dist/test.d.ts.map +0 -1
  66. package/dist/test.js +0 -7
  67. package/dist/test.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
  };