@tomei/finance 0.17.0 → 0.18.1-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 +6 -2
  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,23 +1,23 @@
1
- {
2
- "extends": [
3
- "@commitlint/config-conventional"
4
- ],
5
- "rules": {
6
- "header-max-length": [ 2, "always", 120 ],
7
- "type-enum": [
8
- 2,
9
- "always",
10
- [
11
- "breaking",
12
- "feat",
13
- "fix",
14
- "refactor",
15
- "config",
16
- "test",
17
- "docs",
18
- "chore",
19
- "release"
20
- ]
21
- ]
22
- }
23
- }
1
+ {
2
+ "extends": [
3
+ "@commitlint/config-conventional"
4
+ ],
5
+ "rules": {
6
+ "header-max-length": [ 2, "always", 120 ],
7
+ "type-enum": [
8
+ 2,
9
+ "always",
10
+ [
11
+ "breaking",
12
+ "feat",
13
+ "fix",
14
+ "refactor",
15
+ "config",
16
+ "test",
17
+ "docs",
18
+ "chore",
19
+ "release"
20
+ ]
21
+ ]
22
+ }
23
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ ## [0.16.0] - 2026-02-XX
2
+
3
+ ### Added
4
+ - Optional asynchronous invoice posting mode (`ASYNC_OUTBOX`)
5
+ - Invoice lifecycle states to track accounting system synchronization
6
+ - Support for deferred posting to external accounting systems
7
+
8
+ ### Changed
9
+ - `issueInvoice()` now supports an opt-in asynchronous posting mode
10
+ - Accounting system integration can be executed outside database transactions
11
+
12
+ ### Backward Compatibility
13
+ - Default behavior remains synchronous (`SYNC_LEGACY`)
14
+ - Existing consumers are not affected unless explicitly opted in
15
+
16
+ ### Notes
17
+ - Synchronous posting mode will be deprecated in a future `1.0.0` release
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 John Biundo
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2019 John Biundo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/MIGRATION.md ADDED
@@ -0,0 +1,43 @@
1
+ # Migration Guide
2
+
3
+ This document describes breaking or opt-in changes introduced in each version
4
+ and how to migrate existing consumers.
5
+
6
+ ---
7
+
8
+ ## Migration to 0.16.0 — Async Invoice Posting
9
+
10
+ ### Summary
11
+ Invoices can now be issued without synchronously posting to external accounting
12
+ systems.
13
+
14
+ ## Who should migrate
15
+ Projects that integrate with external accounting systems and require improved
16
+ transaction safety and retry capability.
17
+
18
+ ## How to opt in
19
+
20
+ ```ts
21
+ await financeCompany.issueInvoice(
22
+ tx,
23
+ invoice,
24
+ loginUser,
25
+ customer,
26
+ undefined,
27
+ tags,
28
+ discount,
29
+ {
30
+ postingMode: 'ASYNC_OUTBOX',
31
+ }
32
+ );
33
+
34
+ ## Required Setup
35
+ - Background worker to process outbox events
36
+ - Accounting integration worker enabled
37
+
38
+ ## Invoice Status Flow
39
+ ISSUED -> POSTING -> POSTED/POST_FAILED
40
+
41
+ ## Rollback Behaviour
42
+ - Local database failures rollback safely
43
+ - Accounting system failures do not corrupt local state