@tomei/finance 0.2.15 → 0.3.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.
- package/.commitlintrc.json +22 -22
- package/.eslintrc.js +72 -72
- package/.husky/commit-msg +4 -4
- package/.husky/pre-commit +4 -4
- package/.prettierrc +4 -4
- package/CONTRIBUTING.md +30 -30
- package/LICENSE +21 -21
- package/README.md +13 -41
- package/dist/account/account.d.ts +35 -38
- package/dist/account/account.js +109 -116
- package/dist/account/account.js.map +1 -1
- package/dist/account/account.repository.d.ts +5 -16
- package/dist/account/account.repository.js +11 -46
- package/dist/account/account.repository.js.map +1 -1
- package/dist/account/entities/account.entity.d.ts +26 -26
- package/dist/account/entities/account.entity.js +198 -198
- package/dist/account/entities/fee-associated-object.entity.d.ts +6 -0
- package/dist/account/entities/fee-associated-object.entity.js +52 -0
- package/dist/account/entities/fee-associated-object.entity.js.map +1 -0
- package/dist/account/index.d.ts +6 -6
- package/dist/account/index.js +9 -9
- package/dist/account/interfaces/account-attr.interface.d.ts +29 -21
- package/dist/account/interfaces/account-attr.interface.js +2 -2
- package/dist/account/interfaces/account.repository.interface.d.ts +3 -3
- package/dist/account/interfaces/account.repository.interface.js +2 -2
- package/dist/account-system-entity/account-system-entity.d.ts +21 -21
- package/dist/account-system-entity/account-system-entity.js +96 -75
- package/dist/account-system-entity/account-system-entity.js.map +1 -1
- package/dist/account-system-entity/index.d.ts +2 -2
- package/dist/account-system-entity/index.js +5 -5
- package/dist/account-system-entity/post-history.entity.d.ts +11 -11
- package/dist/account-system-entity/post-history.entity.js +64 -64
- package/dist/account-system-entity/post-history.repository.d.ts +5 -5
- package/dist/account-system-entity/post-history.repository.js +11 -12
- package/dist/account-system-entity/post-history.repository.js.map +1 -1
- package/dist/base/account-system.interface.d.ts +7 -7
- package/dist/base/account-system.interface.js +2 -2
- package/dist/base/address.base.abstract.d.ts +4 -0
- package/dist/base/address.base.abstract.js +10 -0
- package/dist/base/address.base.abstract.js.map +1 -0
- package/dist/base/base.address.d.ts +8 -0
- package/dist/base/base.address.js +15 -0
- package/dist/base/base.address.js.map +1 -0
- package/dist/base/base.object.d.ts +7 -0
- package/dist/base/base.object.js +14 -0
- package/dist/base/base.object.js.map +1 -0
- package/dist/base/base.owner.d.ts +23 -0
- package/dist/base/base.owner.js +34 -0
- package/dist/base/base.owner.js.map +1 -0
- package/dist/base/base.repository.abstract.d.ts +12 -12
- package/dist/base/base.repository.abstract.js +21 -21
- package/dist/base/base.repository.interface.d.ts +9 -9
- package/dist/base/base.repository.interface.js +2 -2
- package/dist/base/index.d.ts +4 -6
- package/dist/base/index.js +9 -7
- package/dist/base/index.js.map +1 -1
- package/dist/base/object/base.object.abstract.d.ts +5 -5
- package/dist/base/object/base.object.abstract.js +6 -6
- package/dist/base/object/base.object.d.ts +7 -0
- package/dist/base/object/base.object.js +14 -0
- package/dist/base/object/base.object.js.map +1 -0
- package/dist/base/object/object.interface.d.ts +4 -4
- package/dist/base/object/object.interface.js +2 -2
- package/dist/base/object.base.abstract.d.ts +5 -0
- package/dist/base/object.base.abstract.js +11 -0
- package/dist/base/object.base.abstract.js.map +1 -0
- package/dist/base/owner/base.owner.abstract.d.ts +20 -20
- package/dist/base/owner/base.owner.abstract.js +7 -7
- package/dist/base/owner/base.owner.d.ts +22 -0
- package/dist/base/owner/base.owner.js +31 -0
- package/dist/base/owner/base.owner.js.map +1 -0
- package/dist/base/owner/owner.interface.d.ts +19 -19
- package/dist/base/owner/owner.interface.js +2 -2
- package/dist/base/person.base.abstract.d.ts +21 -0
- package/dist/base/person.base.abstract.js +17 -0
- package/dist/base/person.base.abstract.js.map +1 -0
- package/dist/base/repository/base.repository.abstract.d.ts +12 -0
- package/dist/base/repository/base.repository.abstract.js +22 -0
- package/dist/base/repository/base.repository.abstract.js.map +1 -0
- package/dist/base/repository/base.repository.interface.d.ts +9 -0
- package/dist/base/repository/base.repository.interface.js +3 -0
- package/dist/base/repository/base.repository.interface.js.map +1 -0
- package/dist/config.d.ts +34 -34
- package/dist/config.js +148 -148
- package/dist/customer/customer.d.ts +28 -27
- package/dist/customer/customer.js +64 -52
- package/dist/customer/customer.js.map +1 -1
- package/dist/customer/customer.repository.d.ts +0 -0
- package/dist/customer/customer.repository.js +1 -0
- package/dist/customer/customer.repository.js.map +1 -0
- package/dist/customer/entities/customer.entity.d.ts +13 -13
- package/dist/customer/entities/customer.entity.js +110 -110
- package/dist/customer/finance-customer.repository.d.ts +10 -10
- package/dist/customer/finance-customer.repository.js +37 -37
- package/dist/customer/finance-customer.repository.js.map +1 -1
- package/dist/customer/index.d.ts +7 -7
- package/dist/customer/index.js +9 -9
- package/dist/customer/interfaces/customer.repository.interface.d.ts +3 -3
- package/dist/customer/interfaces/customer.repository.interface.js +2 -2
- package/dist/customer/interfaces/finance-customer-attr.interface.d.ts +10 -10
- package/dist/customer/interfaces/finance-customer-attr.interface.js +2 -2
- package/dist/customer/interfaces/finance-customer.repository.interface.d.ts +3 -3
- package/dist/customer/interfaces/finance-customer.repository.interface.js +2 -2
- package/dist/database.d.ts +4 -0
- package/dist/database.js +15 -0
- package/dist/database.js.map +1 -0
- package/dist/document/document-item.d.ts +22 -22
- package/dist/document/document-item.js +5 -6
- package/dist/document/document-item.js.map +1 -1
- package/dist/document/document-item.repository.d.ts +17 -17
- package/dist/document/document-item.repository.js +50 -50
- package/dist/document/document-item.repository.js.map +1 -1
- package/dist/document/document.d.ts +64 -44
- package/dist/document/document.js +288 -141
- package/dist/document/document.js.map +1 -1
- package/dist/document/document.repository.d.ts +5 -16
- package/dist/document/document.repository.js +11 -46
- package/dist/document/document.repository.js.map +1 -1
- package/dist/document/entities/document-item.entity.d.ts +27 -27
- package/dist/document/entities/document-item.entity.js +173 -173
- package/dist/document/entities/document.entity.d.ts +22 -22
- package/dist/document/entities/document.entity.js +138 -138
- package/dist/document/index.d.ts +11 -11
- package/dist/document/index.js +19 -19
- package/dist/document/interfaces/document-attr.interface.d.ts +25 -19
- package/dist/document/interfaces/document-attr.interface.js +6 -6
- package/dist/document/interfaces/document-attr.interface.js.map +1 -1
- package/dist/document/interfaces/document-item-attr.interface.d.ts +22 -22
- package/dist/document/interfaces/document-item-attr.interface.js +6 -6
- package/dist/document/interfaces/document-item.repository.interface.d.ts +3 -3
- package/dist/document/interfaces/document-item.repository.interface.js +2 -2
- package/dist/document/interfaces/document.repository.interface.d.ts +3 -3
- package/dist/document/interfaces/document.repository.interface.js +2 -2
- package/dist/enum/doc-type.enum.d.ts +8 -7
- package/dist/enum/doc-type.enum.js +12 -11
- package/dist/enum/doc-type.enum.js.map +1 -1
- package/dist/enum/document-status.enum.d.ts +5 -4
- package/dist/enum/document-status.enum.js +9 -8
- package/dist/enum/document-status.enum.js.map +1 -1
- package/dist/enum/document-type.enum.d.ts +7 -0
- package/dist/enum/document-type.enum.js +12 -0
- package/dist/enum/document-type.enum.js.map +1 -0
- package/dist/enum/index.d.ts +8 -7
- package/dist/enum/index.js +17 -15
- package/dist/enum/index.js.map +1 -1
- package/dist/enum/intuit-client.enum.d.ts +13 -0
- package/dist/enum/intuit-client.enum.js +19 -0
- package/dist/enum/intuit-client.enum.js.map +1 -0
- package/dist/enum/payment-method.enum.d.ts +3 -3
- package/dist/enum/payment-method.enum.js +7 -7
- package/dist/enum/payment-status.enum.d.ts +4 -0
- package/dist/enum/payment-status.enum.js +9 -0
- package/dist/enum/payment-status.enum.js.map +1 -0
- package/dist/enum/payment-type.enum.d.ts +4 -4
- package/dist/enum/payment-type.enum.js +8 -8
- package/dist/enum/quick-book-client-scopes.enum.d.ts +13 -13
- package/dist/enum/quick-book-client-scopes.enum.js +18 -18
- package/dist/enum/transaction-type.enum.d.ts +4 -4
- package/dist/enum/transaction-type.enum.js +8 -8
- package/dist/finance-company/entities/finance-company.entity.d.ts +13 -0
- package/dist/finance-company/entities/finance-company.entity.js +113 -0
- package/dist/finance-company/entities/finance-company.entity.js.map +1 -0
- package/dist/finance-company/finance-company.d.ts +39 -36
- package/dist/finance-company/finance-company.entity.d.ts +13 -13
- package/dist/finance-company/finance-company.entity.js +65 -65
- package/dist/finance-company/finance-company.js +249 -210
- package/dist/finance-company/finance-company.js.map +1 -1
- package/dist/finance-company/finance-company.repository.d.ts +5 -5
- package/dist/finance-company/finance-company.repository.js +11 -12
- package/dist/finance-company/finance-company.repository.js.map +1 -1
- package/dist/finance-company/index.d.ts +3 -3
- package/dist/finance-company/index.js +7 -7
- package/dist/finance-company/interfaces/finance-company-attr.interface.d.ts +10 -0
- package/dist/finance-company/interfaces/finance-company-attr.interface.js +3 -0
- package/dist/finance-company/interfaces/finance-company-attr.interface.js.map +1 -0
- package/dist/finance-company/interfaces/finance-company.repository.interface.d.ts +3 -0
- package/dist/finance-company/interfaces/finance-company.repository.interface.js +3 -0
- package/dist/finance-company/interfaces/finance-company.repository.interface.js.map +1 -0
- package/dist/index.d.ts +15 -9
- package/dist/index.js +28 -27
- package/dist/index.js.map +1 -1
- package/dist/interfaces/account-system-entity.interface.d.ts +7 -7
- package/dist/interfaces/account-system-entity.interface.js +2 -2
- package/dist/interfaces/account-system.interface.d.ts +13 -13
- package/dist/interfaces/account-system.interface.js +2 -2
- package/dist/interfaces/customer.repository.interface.d.ts +3 -0
- package/dist/interfaces/customer.repository.interface.js +3 -0
- package/dist/interfaces/customer.repository.interface.js.map +1 -0
- package/dist/interfaces/finance-customer.repository.interface.d.ts +3 -0
- package/dist/interfaces/finance-customer.repository.interface.js +3 -0
- package/dist/interfaces/finance-customer.repository.interface.js.map +1 -0
- package/dist/interfaces/index.d.ts +2 -2
- package/dist/interfaces/index.js +2 -2
- package/dist/interfaces/systemConfig.interface.d.ts +0 -0
- package/dist/interfaces/systemConfig.interface.js +1 -0
- package/dist/interfaces/systemConfig.interface.js.map +1 -0
- package/dist/intuit-client/client.d.ts +14 -0
- package/dist/intuit-client/client.js +44 -0
- package/dist/intuit-client/client.js.map +1 -0
- package/dist/journal-entry/entities/journal-entry.entity.d.ts +16 -16
- package/dist/journal-entry/entities/journal-entry.entity.js +128 -128
- package/dist/journal-entry/index.d.ts +6 -6
- package/dist/journal-entry/index.js +9 -9
- package/dist/journal-entry/interfaces/journal-entry-attr.interface.d.ts +11 -11
- package/dist/journal-entry/interfaces/journal-entry-attr.interface.js +2 -2
- package/dist/journal-entry/interfaces/journal-entry.repository.interface.d.ts +10 -10
- package/dist/journal-entry/interfaces/journal-entry.repository.interface.js +2 -2
- package/dist/journal-entry/journal-entry.d.ts +43 -45
- package/dist/journal-entry/journal-entry.js +151 -137
- package/dist/journal-entry/journal-entry.js.map +1 -1
- package/dist/journal-entry/journal-entry.repository.d.ts +5 -15
- package/dist/journal-entry/journal-entry.repository.js +11 -44
- package/dist/journal-entry/journal-entry.repository.js.map +1 -1
- package/dist/ledger-transaction/entities/ledger-transaction.entity.d.ts +19 -19
- package/dist/ledger-transaction/entities/ledger-transaction.entity.js +156 -156
- package/dist/ledger-transaction/index.d.ts +6 -6
- package/dist/ledger-transaction/index.js +9 -9
- package/dist/ledger-transaction/interfaces/ledger-transaction-attr.interface.d.ts +18 -18
- package/dist/ledger-transaction/interfaces/ledger-transaction-attr.interface.js +2 -2
- package/dist/ledger-transaction/interfaces/ledger-transaction.repository.interface.d.ts +5 -5
- package/dist/ledger-transaction/interfaces/ledger-transaction.repository.interface.js +2 -2
- package/dist/ledger-transaction/ledger-transaction.d.ts +35 -35
- package/dist/ledger-transaction/ledger-transaction.js +82 -70
- package/dist/ledger-transaction/ledger-transaction.js.map +1 -1
- package/dist/ledger-transaction/ledger-transaction.repository.d.ts +10 -10
- package/dist/ledger-transaction/ledger-transaction.repository.js +38 -38
- package/dist/ledger-transaction/ledger-transaction.repository.js.map +1 -1
- package/dist/models/account.entity.d.ts +30 -0
- package/dist/models/account.entity.js +233 -0
- package/dist/models/account.entity.js.map +1 -0
- package/dist/models/customer.entity.d.ts +13 -0
- package/dist/models/customer.entity.js +110 -0
- package/dist/models/customer.entity.js.map +1 -0
- package/dist/models/document-item.entity.d.ts +27 -0
- package/dist/models/document-item.entity.js +173 -0
- package/dist/models/document-item.entity.js.map +1 -0
- package/dist/models/document.entity.d.ts +30 -0
- package/dist/models/document.entity.js +222 -0
- package/dist/models/document.entity.js.map +1 -0
- package/dist/models/finance-company.entity.d.ts +9 -0
- package/dist/models/finance-company.entity.js +45 -0
- package/dist/models/finance-company.entity.js.map +1 -0
- package/dist/models/journal-entry.entity.d.ts +16 -0
- package/dist/models/journal-entry.entity.js +128 -0
- package/dist/models/journal-entry.entity.js.map +1 -0
- package/dist/models/ledger-transaction.entity.d.ts +19 -0
- package/dist/models/ledger-transaction.entity.js +156 -0
- package/dist/models/ledger-transaction.entity.js.map +1 -0
- package/dist/models/payment-item.entity.d.ts +11 -0
- package/dist/models/payment-item.entity.js +68 -0
- package/dist/models/payment-item.entity.js.map +1 -0
- package/dist/models/payment-method-type.entity.d.ts +13 -0
- package/dist/models/payment-method-type.entity.js +86 -0
- package/dist/models/payment-method-type.entity.js.map +1 -0
- package/dist/models/payment-method.entity.d.ts +7 -0
- package/dist/models/payment-method.entity.js +46 -0
- package/dist/models/payment-method.entity.js.map +1 -0
- package/dist/models/payment.entity.d.ts +30 -0
- package/dist/models/payment.entity.js +209 -0
- package/dist/models/payment.entity.js.map +1 -0
- package/dist/models/post-history.entity.d.ts +11 -0
- package/dist/models/post-history.entity.js +64 -0
- package/dist/models/post-history.entity.js.map +1 -0
- package/dist/payment/entities/payment-item.entity.d.ts +10 -10
- package/dist/payment/entities/payment-item.entity.js +61 -61
- package/dist/payment/entities/payment.entity.d.ts +25 -25
- package/dist/payment/entities/payment.entity.js +151 -151
- package/dist/payment/index.d.ts +10 -10
- package/dist/payment/index.js +17 -17
- package/dist/payment/interfaces/payment-attr.interface.d.ts +23 -20
- package/dist/payment/interfaces/payment-attr.interface.js +6 -6
- package/dist/payment/interfaces/payment-attr.interface.js.map +1 -1
- package/dist/payment/interfaces/payment-item-attr.interface.d.ts +8 -7
- package/dist/payment/interfaces/payment-item-attr.interface.js +6 -6
- package/dist/payment/interfaces/payment-item-attr.interface.js.map +1 -1
- package/dist/payment/interfaces/payment-item.repository.interface.d.ts +3 -3
- package/dist/payment/interfaces/payment-item.repository.interface.js +2 -2
- package/dist/payment/interfaces/payment-params.interface.d.ts +7 -7
- package/dist/payment/interfaces/payment-params.interface.js +2 -2
- package/dist/payment/interfaces/payment.repository.interface.d.ts +3 -3
- package/dist/payment/interfaces/payment.repository.interface.js +2 -2
- package/dist/payment/payment-item.repository.d.ts +5 -17
- package/dist/payment/payment-item.repository.js +11 -50
- package/dist/payment/payment-item.repository.js.map +1 -1
- package/dist/payment/payment.d.ts +50 -52
- package/dist/payment/payment.js +132 -138
- package/dist/payment/payment.js.map +1 -1
- package/dist/payment/payment.repository.d.ts +5 -16
- package/dist/payment/payment.repository.js +11 -46
- package/dist/payment/payment.repository.js.map +1 -1
- package/dist/payment-item/interfaces/payment-item-attr.interface.d.ts +8 -0
- package/dist/payment-item/interfaces/payment-item-attr.interface.js +7 -0
- package/dist/payment-item/interfaces/payment-item-attr.interface.js.map +1 -0
- package/{src/payment/interfaces/payment-item.repository.interface.ts → dist/payment-item/interfaces/payment-item.repository.interface.d.ts} +3 -4
- package/dist/payment-item/interfaces/payment-item.repository.interface.js +3 -0
- package/dist/payment-item/interfaces/payment-item.repository.interface.js.map +1 -0
- package/dist/payment-item/payment-item.d.ts +22 -0
- package/dist/payment-item/payment-item.js +42 -0
- package/dist/payment-item/payment-item.js.map +1 -0
- package/dist/payment-item/payment-item.repository.d.ts +5 -0
- package/dist/payment-item/payment-item.repository.js +12 -0
- package/dist/payment-item/payment-item.repository.js.map +1 -0
- package/dist/payment-method/interfaces/payment-method-attr.interface.d.ts +4 -0
- package/dist/payment-method/interfaces/payment-method-attr.interface.js +3 -0
- package/dist/payment-method/interfaces/payment-method-attr.interface.js.map +1 -0
- package/dist/payment-method/payment-method.d.ts +10 -0
- package/dist/payment-method/payment-method.js +15 -0
- package/dist/payment-method/payment-method.js.map +1 -0
- package/dist/payment-method/payment-method.repository.d.ts +5 -0
- package/dist/payment-method/payment-method.repository.js +12 -0
- package/dist/payment-method/payment-method.repository.js.map +1 -0
- package/dist/payment-method-type/interfaces/payment-method-type-attr.interface.d.ts +8 -0
- package/dist/payment-method-type/interfaces/payment-method-type-attr.interface.js +3 -0
- package/dist/payment-method-type/interfaces/payment-method-type-attr.interface.js.map +1 -0
- package/dist/payment-method-type/payment-method-type.d.ts +14 -0
- package/dist/payment-method-type/payment-method-type.js +15 -0
- package/dist/payment-method-type/payment-method-type.js.map +1 -0
- package/dist/payment-method-type/payment-method-type.repository.d.ts +5 -0
- package/dist/payment-method-type/payment-method-type.repository.js +12 -0
- package/dist/payment-method-type/payment-method-type.repository.js.map +1 -0
- package/dist/quickbook-client/client.d.ts +39 -26
- package/dist/quickbook-client/client.js +204 -90
- package/dist/quickbook-client/client.js.map +1 -1
- package/dist/quickbook-client/constant.d.ts +1 -1
- package/dist/quickbook-client/constant.js +4 -4
- package/dist/quickbook-client/index.d.ts +5 -5
- package/dist/quickbook-client/index.js +5 -9
- package/dist/quickbook-client/index.js.map +1 -1
- package/dist/quickbook-client/interfaces/quickbook-client-call-options.interface.d.ts +6 -6
- package/dist/quickbook-client/interfaces/quickbook-client-call-options.interface.js +2 -2
- package/dist/quickbook-client/interfaces/quickbook-client-create-account-options.interface.d.ts +9 -0
- package/dist/quickbook-client/interfaces/quickbook-client-create-account-options.interface.js +3 -0
- package/dist/quickbook-client/interfaces/quickbook-client-create-account-options.interface.js.map +1 -0
- package/dist/quickbook-client/interfaces/quickbook-client-create-customer-options.interface.d.ts +7 -0
- package/dist/quickbook-client/interfaces/quickbook-client-create-customer-options.interface.js +3 -0
- package/dist/quickbook-client/interfaces/quickbook-client-create-customer-options.interface.js.map +1 -0
- package/dist/quickbook-client/interfaces/quickbook-client-options.interface.d.ts +8 -8
- package/dist/quickbook-client/interfaces/quickbook-client-options.interface.js +2 -2
- package/dist/quickbook-client/quickbook-client.module-definition.d.ts +2 -2
- package/dist/quickbook-client/quickbook-client.module-definition.js +8 -8
- package/dist/quickbook-client/quickbook-client.module.d.ts +6 -6
- package/dist/quickbook-client/quickbook-client.module.js +33 -33
- package/dist/test.d.ts +1 -1
- package/dist/test.js +7 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/img.png +0 -0
- package/img_1.png +0 -0
- package/invoice-template/assets/css/style.css.map +12 -12
- package/invoice-template/assets/css/style.min.css +1 -1
- package/invoice-template/assets/img/arrow_bg.svg +11 -11
- package/invoice-template/assets/img/coffy_shop_img.svg +18 -18
- package/invoice-template/assets/img/logo_accent.svg +3 -3
- package/invoice-template/assets/img/logo_white.svg +4 -4
- package/invoice-template/assets/img/sign.svg +12 -12
- package/invoice-template/assets/js/html2canvas.min.js +10379 -10379
- package/invoice-template/assets/js/jquery.min.js +1 -1
- package/invoice-template/assets/sass/common/_color_variable.scss +12 -12
- package/invoice-template/assets/sass/common/_typography.scss +178 -178
- package/invoice-template/assets/sass/style.scss +12 -12
- package/migrations/finance-account-migration.js +97 -83
- package/migrations/finance-company-migration.js +29 -43
- package/migrations/finance-customer-migration.js +51 -51
- package/migrations/finance-document-item-migration.js +111 -111
- package/migrations/finance-document-migration.js +108 -77
- package/migrations/finance-payment-item-migration.js +43 -39
- package/migrations/finance-payment-method-migration.js +21 -0
- package/migrations/finance-payment-method-type-migration.js +55 -0
- package/migrations/finance-payment-migration.js +106 -89
- package/migrations/finance-post-history-migration.js +45 -45
- package/nest-cli.json +19 -19
- package/package.json +79 -76
- package/src/account/account.repository.ts +11 -44
- package/src/account/account.ts +137 -157
- package/src/account/interfaces/account-attr.interface.ts +31 -23
- package/src/account-system-entity/account-system-entity.ts +106 -102
- package/src/account-system-entity/post-history.repository.ts +11 -12
- package/src/config.ts +178 -178
- package/src/customer/customer.ts +99 -92
- package/src/customer/finance-customer.repository.ts +30 -30
- package/src/customer/interfaces/customer.repository.interface.ts +3 -3
- package/src/customer/interfaces/finance-customer-attr.interface.ts +10 -10
- package/src/customer/interfaces/finance-customer.repository.interface.ts +4 -4
- package/src/database.ts +15 -0
- package/src/document/document-item.repository.ts +49 -49
- package/src/document/document-item.ts +3 -3
- package/src/document/document.repository.ts +11 -41
- package/src/document/document.ts +299 -83
- package/src/document/interfaces/document-attr.interface.ts +26 -20
- package/src/document/interfaces/document-item-attr.interface.ts +22 -22
- package/src/document/interfaces/document-item.repository.interface.ts +4 -4
- package/src/enum/doc-type.enum.ts +8 -7
- package/src/enum/document-status.enum.ts +3 -2
- package/src/enum/index.ts +17 -15
- package/src/enum/payment-method.enum.ts +3 -3
- package/src/enum/payment-status.enum.ts +4 -0
- package/src/enum/payment-type.enum.ts +4 -4
- package/src/finance-company/finance-company.repository.ts +11 -12
- package/src/finance-company/finance-company.ts +67 -41
- package/src/index.ts +28 -9
- package/src/interfaces/account-system.interface.ts +20 -14
- package/src/interfaces/index.ts +3 -3
- package/src/journal-entry/journal-entry.repository.ts +6 -35
- package/src/journal-entry/journal-entry.ts +16 -19
- package/src/ledger-transaction/ledger-transaction.repository.ts +1 -1
- package/src/ledger-transaction/ledger-transaction.ts +1 -1
- package/src/{account/entities → models}/account.entity.ts +206 -171
- package/src/{customer/entities → models}/customer.entity.ts +93 -93
- package/src/{document/entities → models}/document-item.entity.ts +143 -143
- package/src/models/document.entity.ts +193 -0
- package/src/{finance-company → models}/finance-company.entity.ts +25 -41
- package/src/{journal-entry/entities → models}/journal-entry.entity.ts +3 -3
- package/src/{ledger-transaction/entities → models}/ledger-transaction.entity.ts +3 -3
- package/src/{payment/entities → models}/payment-item.entity.ts +53 -47
- package/src/models/payment-method-type.entity.ts +70 -0
- package/src/models/payment-method.entity.ts +28 -0
- package/src/models/payment.entity.ts +180 -0
- package/src/{account-system-entity → models}/post-history.entity.ts +41 -41
- package/src/payment/interfaces/payment-attr.interface.ts +24 -21
- package/src/payment/interfaces/payment-params.interface.ts +8 -8
- package/src/payment/payment.repository.ts +11 -41
- package/src/payment/payment.ts +175 -203
- package/src/{payment → payment-item}/interfaces/payment-item-attr.interface.ts +8 -7
- package/src/payment-item/payment-item.repository.ts +11 -0
- package/src/payment-item/payment-item.ts +58 -0
- package/src/payment-method/interfaces/payment-method-attr.interface.ts +4 -0
- package/src/payment-method/payment-method.repository.ts +11 -0
- package/src/payment-method/payment-method.ts +20 -0
- package/src/payment-method-type/interfaces/payment-method-type-attr.interface.ts +8 -0
- package/src/payment-method-type/payment-method-type.repository.ts +11 -0
- package/src/payment-method-type/payment-method-type.ts +24 -0
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +22 -30
- package/tslint.json +18 -18
- package/src/account/index.ts +0 -17
- package/src/account/interfaces/account.repository.interface.ts +0 -4
- package/src/account-system-entity/index.ts +0 -3
- package/src/customer/index.ts +0 -15
- package/src/document/entities/document.entity.ts +0 -106
- package/src/document/index.ts +0 -23
- package/src/document/interfaces/document.repository.interface.ts +0 -4
- package/src/finance-company/index.ts +0 -4
- package/src/journal-entry/index.ts +0 -13
- package/src/journal-entry/interfaces/journal-entry.repository.interface.ts +0 -11
- package/src/ledger-transaction/index.ts +0 -13
- package/src/payment/entities/payment.entity.ts +0 -125
- package/src/payment/index.ts +0 -21
- package/src/payment/interfaces/payment.repository.interface.ts +0 -4
- package/src/payment/payment-item.repository.ts +0 -49
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.LedgerTransactionModel = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
15
|
-
const account_entity_1 = require("../../account/entities/account.entity");
|
|
16
|
-
const journal_entry_entity_1 = require("../../journal-entry/entities/journal-entry.entity");
|
|
17
|
-
let LedgerTransactionModel = class LedgerTransactionModel extends sequelize_typescript_1.Model {
|
|
18
|
-
};
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'Transactionid' }),
|
|
21
|
-
(0, sequelize_typescript_1.Column)({
|
|
22
|
-
primaryKey: true,
|
|
23
|
-
allowNull: false,
|
|
24
|
-
type: sequelize_typescript_1.DataType.STRING(30),
|
|
25
|
-
}),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], LedgerTransactionModel.prototype, "TransactionId", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, swagger_1.ApiProperty)({
|
|
30
|
-
type: String,
|
|
31
|
-
description: 'Transaction Type eg. "Credit", "Debit"',
|
|
32
|
-
}),
|
|
33
|
-
(0, sequelize_typescript_1.Column)({
|
|
34
|
-
allowNull: false,
|
|
35
|
-
type: sequelize_typescript_1.DataType.STRING(20),
|
|
36
|
-
}),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], LedgerTransactionModel.prototype, "TransactionType", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'JournalEntryId' }),
|
|
41
|
-
(0, sequelize_typescript_1.ForeignKey)(() => journal_entry_entity_1.JournalEntryModel),
|
|
42
|
-
(0, sequelize_typescript_1.Column)({
|
|
43
|
-
allowNull: false,
|
|
44
|
-
type: sequelize_typescript_1.DataType.STRING(30),
|
|
45
|
-
}),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], LedgerTransactionModel.prototype, "JournalEntryId", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, swagger_1.ApiProperty)({ type: String, description: 'AccountNo' }),
|
|
50
|
-
(0, sequelize_typescript_1.ForeignKey)(() => account_entity_1.AccountModel),
|
|
51
|
-
(0, sequelize_typescript_1.Column)({
|
|
52
|
-
allowNull: false,
|
|
53
|
-
type: sequelize_typescript_1.DataType.STRING(30),
|
|
54
|
-
}),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], LedgerTransactionModel.prototype, "AccountNo", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, swagger_1.ApiProperty)({ type: Date, description: 'Date' }),
|
|
59
|
-
(0, sequelize_typescript_1.Column)({
|
|
60
|
-
allowNull: false,
|
|
61
|
-
type: sequelize_typescript_1.DataType.DATE,
|
|
62
|
-
}),
|
|
63
|
-
__metadata("design:type", Date)
|
|
64
|
-
], LedgerTransactionModel.prototype, "Date", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, swagger_1.ApiProperty)({
|
|
67
|
-
type: String,
|
|
68
|
-
description: 'Name of the ledger transaction',
|
|
69
|
-
}),
|
|
70
|
-
(0, sequelize_typescript_1.Column)({
|
|
71
|
-
allowNull: false,
|
|
72
|
-
type: sequelize_typescript_1.DataType.STRING(200),
|
|
73
|
-
}),
|
|
74
|
-
__metadata("design:type", String)
|
|
75
|
-
], LedgerTransactionModel.prototype, "Name", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, swagger_1.ApiProperty)({
|
|
78
|
-
type: String,
|
|
79
|
-
description: 'Description of the ledger transaction',
|
|
80
|
-
}),
|
|
81
|
-
(0, sequelize_typescript_1.Column)({
|
|
82
|
-
allowNull: true,
|
|
83
|
-
type: sequelize_typescript_1.DataType.STRING(1000),
|
|
84
|
-
}),
|
|
85
|
-
__metadata("design:type", String)
|
|
86
|
-
], LedgerTransactionModel.prototype, "Description", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
(0, swagger_1.ApiProperty)({
|
|
89
|
-
type: String,
|
|
90
|
-
description: 'Currency',
|
|
91
|
-
}),
|
|
92
|
-
(0, sequelize_typescript_1.Column)({
|
|
93
|
-
allowNull: false,
|
|
94
|
-
type: sequelize_typescript_1.DataType.CHAR(3),
|
|
95
|
-
}),
|
|
96
|
-
__metadata("design:type", String)
|
|
97
|
-
], LedgerTransactionModel.prototype, "Currency", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, swagger_1.ApiProperty)({
|
|
100
|
-
type: Number,
|
|
101
|
-
description: 'Debit Amount of the ledger transaction',
|
|
102
|
-
}),
|
|
103
|
-
(0, sequelize_typescript_1.Column)({
|
|
104
|
-
allowNull: true,
|
|
105
|
-
type: sequelize_typescript_1.DataType.DECIMAL(10, 2),
|
|
106
|
-
}),
|
|
107
|
-
__metadata("design:type", Number)
|
|
108
|
-
], LedgerTransactionModel.prototype, "DebitAmount", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, swagger_1.ApiProperty)({
|
|
111
|
-
type: Number,
|
|
112
|
-
description: 'Credit Amount of the ledger transaction',
|
|
113
|
-
}),
|
|
114
|
-
(0, sequelize_typescript_1.Column)({
|
|
115
|
-
allowNull: true,
|
|
116
|
-
type: sequelize_typescript_1.DataType.DECIMAL(10, 2),
|
|
117
|
-
}),
|
|
118
|
-
__metadata("design:type", Number)
|
|
119
|
-
], LedgerTransactionModel.prototype, "CreditAmount", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
(0, swagger_1.ApiProperty)({
|
|
122
|
-
type: String,
|
|
123
|
-
description: 'RelatedObjectId',
|
|
124
|
-
}),
|
|
125
|
-
(0, sequelize_typescript_1.Column)({
|
|
126
|
-
allowNull: false,
|
|
127
|
-
type: sequelize_typescript_1.DataType.STRING(30),
|
|
128
|
-
}),
|
|
129
|
-
__metadata("design:type", String)
|
|
130
|
-
], LedgerTransactionModel.prototype, "RelatedObjectId", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
(0, swagger_1.ApiProperty)({
|
|
133
|
-
type: String,
|
|
134
|
-
description: 'RelatedObjectType',
|
|
135
|
-
}),
|
|
136
|
-
(0, sequelize_typescript_1.Column)({
|
|
137
|
-
allowNull: false,
|
|
138
|
-
type: sequelize_typescript_1.DataType.STRING(200),
|
|
139
|
-
}),
|
|
140
|
-
__metadata("design:type", String)
|
|
141
|
-
], LedgerTransactionModel.prototype, "RelatedObjectType", void 0);
|
|
142
|
-
__decorate([
|
|
143
|
-
(0, sequelize_typescript_1.BelongsTo)(() => account_entity_1.AccountModel),
|
|
144
|
-
__metadata("design:type", account_entity_1.AccountModel)
|
|
145
|
-
], LedgerTransactionModel.prototype, "Account", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
(0, sequelize_typescript_1.BelongsTo)(() => journal_entry_entity_1.JournalEntryModel),
|
|
148
|
-
__metadata("design:type", journal_entry_entity_1.JournalEntryModel)
|
|
149
|
-
], LedgerTransactionModel.prototype, "JournalEntry", void 0);
|
|
150
|
-
LedgerTransactionModel = __decorate([
|
|
151
|
-
(0, sequelize_typescript_1.Table)({
|
|
152
|
-
tableName: 'finance_LedgerTransaction',
|
|
153
|
-
timestamps: false,
|
|
154
|
-
})
|
|
155
|
-
], LedgerTransactionModel);
|
|
156
|
-
exports.LedgerTransactionModel = LedgerTransactionModel;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LedgerTransactionModel = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
15
|
+
const account_entity_1 = require("../../account/entities/account.entity");
|
|
16
|
+
const journal_entry_entity_1 = require("../../journal-entry/entities/journal-entry.entity");
|
|
17
|
+
let LedgerTransactionModel = class LedgerTransactionModel extends sequelize_typescript_1.Model {
|
|
18
|
+
};
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Transactionid' }),
|
|
21
|
+
(0, sequelize_typescript_1.Column)({
|
|
22
|
+
primaryKey: true,
|
|
23
|
+
allowNull: false,
|
|
24
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
25
|
+
}),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], LedgerTransactionModel.prototype, "TransactionId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({
|
|
30
|
+
type: String,
|
|
31
|
+
description: 'Transaction Type eg. "Credit", "Debit"',
|
|
32
|
+
}),
|
|
33
|
+
(0, sequelize_typescript_1.Column)({
|
|
34
|
+
allowNull: false,
|
|
35
|
+
type: sequelize_typescript_1.DataType.STRING(20),
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], LedgerTransactionModel.prototype, "TransactionType", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'JournalEntryId' }),
|
|
41
|
+
(0, sequelize_typescript_1.ForeignKey)(() => journal_entry_entity_1.JournalEntryModel),
|
|
42
|
+
(0, sequelize_typescript_1.Column)({
|
|
43
|
+
allowNull: false,
|
|
44
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
45
|
+
}),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], LedgerTransactionModel.prototype, "JournalEntryId", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'AccountNo' }),
|
|
50
|
+
(0, sequelize_typescript_1.ForeignKey)(() => account_entity_1.AccountModel),
|
|
51
|
+
(0, sequelize_typescript_1.Column)({
|
|
52
|
+
allowNull: false,
|
|
53
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], LedgerTransactionModel.prototype, "AccountNo", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Date' }),
|
|
59
|
+
(0, sequelize_typescript_1.Column)({
|
|
60
|
+
allowNull: false,
|
|
61
|
+
type: sequelize_typescript_1.DataType.DATE,
|
|
62
|
+
}),
|
|
63
|
+
__metadata("design:type", Date)
|
|
64
|
+
], LedgerTransactionModel.prototype, "Date", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, swagger_1.ApiProperty)({
|
|
67
|
+
type: String,
|
|
68
|
+
description: 'Name of the ledger transaction',
|
|
69
|
+
}),
|
|
70
|
+
(0, sequelize_typescript_1.Column)({
|
|
71
|
+
allowNull: false,
|
|
72
|
+
type: sequelize_typescript_1.DataType.STRING(200),
|
|
73
|
+
}),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], LedgerTransactionModel.prototype, "Name", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, swagger_1.ApiProperty)({
|
|
78
|
+
type: String,
|
|
79
|
+
description: 'Description of the ledger transaction',
|
|
80
|
+
}),
|
|
81
|
+
(0, sequelize_typescript_1.Column)({
|
|
82
|
+
allowNull: true,
|
|
83
|
+
type: sequelize_typescript_1.DataType.STRING(1000),
|
|
84
|
+
}),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], LedgerTransactionModel.prototype, "Description", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, swagger_1.ApiProperty)({
|
|
89
|
+
type: String,
|
|
90
|
+
description: 'Currency',
|
|
91
|
+
}),
|
|
92
|
+
(0, sequelize_typescript_1.Column)({
|
|
93
|
+
allowNull: false,
|
|
94
|
+
type: sequelize_typescript_1.DataType.CHAR(3),
|
|
95
|
+
}),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], LedgerTransactionModel.prototype, "Currency", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, swagger_1.ApiProperty)({
|
|
100
|
+
type: Number,
|
|
101
|
+
description: 'Debit Amount of the ledger transaction',
|
|
102
|
+
}),
|
|
103
|
+
(0, sequelize_typescript_1.Column)({
|
|
104
|
+
allowNull: true,
|
|
105
|
+
type: sequelize_typescript_1.DataType.DECIMAL(10, 2),
|
|
106
|
+
}),
|
|
107
|
+
__metadata("design:type", Number)
|
|
108
|
+
], LedgerTransactionModel.prototype, "DebitAmount", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, swagger_1.ApiProperty)({
|
|
111
|
+
type: Number,
|
|
112
|
+
description: 'Credit Amount of the ledger transaction',
|
|
113
|
+
}),
|
|
114
|
+
(0, sequelize_typescript_1.Column)({
|
|
115
|
+
allowNull: true,
|
|
116
|
+
type: sequelize_typescript_1.DataType.DECIMAL(10, 2),
|
|
117
|
+
}),
|
|
118
|
+
__metadata("design:type", Number)
|
|
119
|
+
], LedgerTransactionModel.prototype, "CreditAmount", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, swagger_1.ApiProperty)({
|
|
122
|
+
type: String,
|
|
123
|
+
description: 'RelatedObjectId',
|
|
124
|
+
}),
|
|
125
|
+
(0, sequelize_typescript_1.Column)({
|
|
126
|
+
allowNull: false,
|
|
127
|
+
type: sequelize_typescript_1.DataType.STRING(30),
|
|
128
|
+
}),
|
|
129
|
+
__metadata("design:type", String)
|
|
130
|
+
], LedgerTransactionModel.prototype, "RelatedObjectId", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, swagger_1.ApiProperty)({
|
|
133
|
+
type: String,
|
|
134
|
+
description: 'RelatedObjectType',
|
|
135
|
+
}),
|
|
136
|
+
(0, sequelize_typescript_1.Column)({
|
|
137
|
+
allowNull: false,
|
|
138
|
+
type: sequelize_typescript_1.DataType.STRING(200),
|
|
139
|
+
}),
|
|
140
|
+
__metadata("design:type", String)
|
|
141
|
+
], LedgerTransactionModel.prototype, "RelatedObjectType", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, sequelize_typescript_1.BelongsTo)(() => account_entity_1.AccountModel),
|
|
144
|
+
__metadata("design:type", account_entity_1.AccountModel)
|
|
145
|
+
], LedgerTransactionModel.prototype, "Account", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, sequelize_typescript_1.BelongsTo)(() => journal_entry_entity_1.JournalEntryModel),
|
|
148
|
+
__metadata("design:type", journal_entry_entity_1.JournalEntryModel)
|
|
149
|
+
], LedgerTransactionModel.prototype, "JournalEntry", void 0);
|
|
150
|
+
LedgerTransactionModel = __decorate([
|
|
151
|
+
(0, sequelize_typescript_1.Table)({
|
|
152
|
+
tableName: 'finance_LedgerTransaction',
|
|
153
|
+
timestamps: false,
|
|
154
|
+
})
|
|
155
|
+
], LedgerTransactionModel);
|
|
156
|
+
exports.LedgerTransactionModel = LedgerTransactionModel;
|
|
157
157
|
//# sourceMappingURL=ledger-transaction.entity.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LedgerTransaction } from './ledger-transaction';
|
|
2
|
-
import { LedgerTransactionModel } from './entities/ledger-transaction.entity';
|
|
3
|
-
import { ILedgerTransactionAttr } from './interfaces/ledger-transaction-attr.interface';
|
|
4
|
-
import { ILedgerTransactionRepository } from './interfaces/ledger-transaction.repository.interface';
|
|
5
|
-
import { LedgerTransactionRepository } from './ledger-transaction.repository';
|
|
6
|
-
export { ILedgerTransactionRepository, LedgerTransaction, LedgerTransactionModel, ILedgerTransactionAttr, LedgerTransactionRepository, };
|
|
1
|
+
import { LedgerTransaction } from './ledger-transaction';
|
|
2
|
+
import { LedgerTransactionModel } from './entities/ledger-transaction.entity';
|
|
3
|
+
import { ILedgerTransactionAttr } from './interfaces/ledger-transaction-attr.interface';
|
|
4
|
+
import { ILedgerTransactionRepository } from './interfaces/ledger-transaction.repository.interface';
|
|
5
|
+
import { LedgerTransactionRepository } from './ledger-transaction.repository';
|
|
6
|
+
export { ILedgerTransactionRepository, LedgerTransaction, LedgerTransactionModel, ILedgerTransactionAttr, LedgerTransactionRepository, };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LedgerTransactionRepository = exports.LedgerTransactionModel = exports.LedgerTransaction = void 0;
|
|
4
|
-
const ledger_transaction_1 = require("./ledger-transaction");
|
|
5
|
-
Object.defineProperty(exports, "LedgerTransaction", { enumerable: true, get: function () { return ledger_transaction_1.LedgerTransaction; } });
|
|
6
|
-
const ledger_transaction_entity_1 = require("./entities/ledger-transaction.entity");
|
|
7
|
-
Object.defineProperty(exports, "LedgerTransactionModel", { enumerable: true, get: function () { return ledger_transaction_entity_1.LedgerTransactionModel; } });
|
|
8
|
-
const ledger_transaction_repository_1 = require("./ledger-transaction.repository");
|
|
9
|
-
Object.defineProperty(exports, "LedgerTransactionRepository", { enumerable: true, get: function () { return ledger_transaction_repository_1.LedgerTransactionRepository; } });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LedgerTransactionRepository = exports.LedgerTransactionModel = exports.LedgerTransaction = void 0;
|
|
4
|
+
const ledger_transaction_1 = require("./ledger-transaction");
|
|
5
|
+
Object.defineProperty(exports, "LedgerTransaction", { enumerable: true, get: function () { return ledger_transaction_1.LedgerTransaction; } });
|
|
6
|
+
const ledger_transaction_entity_1 = require("./entities/ledger-transaction.entity");
|
|
7
|
+
Object.defineProperty(exports, "LedgerTransactionModel", { enumerable: true, get: function () { return ledger_transaction_entity_1.LedgerTransactionModel; } });
|
|
8
|
+
const ledger_transaction_repository_1 = require("./ledger-transaction.repository");
|
|
9
|
+
Object.defineProperty(exports, "LedgerTransactionRepository", { enumerable: true, get: function () { return ledger_transaction_repository_1.LedgerTransactionRepository; } });
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { TransactionTypeOptions } from '../../enum';
|
|
2
|
-
export interface ILedgerTransactionAttr {
|
|
3
|
-
TransactionId: string;
|
|
4
|
-
TransactionType: string;
|
|
5
|
-
JournalEntryId: string;
|
|
6
|
-
AccountNo: string;
|
|
7
|
-
Date: Date;
|
|
8
|
-
Name: string;
|
|
9
|
-
Description: string;
|
|
10
|
-
Currency: string;
|
|
11
|
-
DebitAmount: number;
|
|
12
|
-
CreditAmount: number;
|
|
13
|
-
RelatedObjectId: string;
|
|
14
|
-
RelatedObjectType: string;
|
|
15
|
-
}
|
|
16
|
-
export interface ILedgerTransactionTypeOptionsAttr {
|
|
17
|
-
transactionType: TransactionTypeOptions;
|
|
18
|
-
}
|
|
1
|
+
import { TransactionTypeOptions } from '../../enum';
|
|
2
|
+
export interface ILedgerTransactionAttr {
|
|
3
|
+
TransactionId: string;
|
|
4
|
+
TransactionType: string;
|
|
5
|
+
JournalEntryId: string;
|
|
6
|
+
AccountNo: string;
|
|
7
|
+
Date: Date;
|
|
8
|
+
Name: string;
|
|
9
|
+
Description: string;
|
|
10
|
+
Currency: string;
|
|
11
|
+
DebitAmount: number;
|
|
12
|
+
CreditAmount: number;
|
|
13
|
+
RelatedObjectId: string;
|
|
14
|
+
RelatedObjectType: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ILedgerTransactionTypeOptionsAttr {
|
|
17
|
+
transactionType: TransactionTypeOptions;
|
|
18
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=ledger-transaction-attr.interface.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface ILedgerTransactionRepository<T> {
|
|
2
|
-
create?(data: T | any, options?: any): Promise<T> | any;
|
|
3
|
-
findAll?(options?: any): Promise<T[]>;
|
|
4
|
-
findOne?(options: any): Promise<T>;
|
|
5
|
-
}
|
|
1
|
+
export interface ILedgerTransactionRepository<T> {
|
|
2
|
+
create?(data: T | any, options?: any): Promise<T> | any;
|
|
3
|
+
findAll?(options?: any): Promise<T[]>;
|
|
4
|
+
findOne?(options: any): Promise<T>;
|
|
5
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=ledger-transaction.repository.interface.js.map
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { ILedgerTransactionAttr, ILedgerTransactionTypeOptionsAttr } from './interfaces/ledger-transaction-attr.interface';
|
|
2
|
-
import { LedgerTransactionRepository } from './ledger-transaction.repository';
|
|
3
|
-
export
|
|
4
|
-
TransactionId: string;
|
|
5
|
-
JournalEntryId: string;
|
|
6
|
-
AccountNo: string;
|
|
7
|
-
Date: Date;
|
|
8
|
-
Name: string;
|
|
9
|
-
Description: string;
|
|
10
|
-
Currency: string;
|
|
11
|
-
DebitAmount: number;
|
|
12
|
-
CreditAmount: number;
|
|
13
|
-
RelatedObjectId: string;
|
|
14
|
-
RelatedObjectType: string;
|
|
15
|
-
TransactionType: string;
|
|
16
|
-
ledgerTransactionRepository: LedgerTransactionRepository;
|
|
17
|
-
constructor(ledgerTransactionRepository: LedgerTransactionRepository);
|
|
18
|
-
init(params?: ILedgerTransactionAttr): void;
|
|
19
|
-
getData(): {
|
|
20
|
-
TransactionId: string;
|
|
21
|
-
TransactionType: string;
|
|
22
|
-
JournalEntryId: string;
|
|
23
|
-
AccountNo: string;
|
|
24
|
-
Date: Date;
|
|
25
|
-
Name: string;
|
|
26
|
-
Description: string;
|
|
27
|
-
Currency: string;
|
|
28
|
-
DebitAmount: number;
|
|
29
|
-
CreditAmount: number;
|
|
30
|
-
RelatedObjectId: string;
|
|
31
|
-
RelatedObjectType: string;
|
|
32
|
-
};
|
|
33
|
-
create(): Promise<any>;
|
|
34
|
-
newLedgerTransaction({ transactionType }: ILedgerTransactionTypeOptionsAttr, journalEntryId?: string): Promise<any>;
|
|
35
|
-
}
|
|
1
|
+
import { ILedgerTransactionAttr, ILedgerTransactionTypeOptionsAttr } from './interfaces/ledger-transaction-attr.interface';
|
|
2
|
+
import { LedgerTransactionRepository } from './ledger-transaction.repository';
|
|
3
|
+
export default class LedgerTransaction {
|
|
4
|
+
TransactionId: string;
|
|
5
|
+
JournalEntryId: string;
|
|
6
|
+
AccountNo: string;
|
|
7
|
+
Date: Date;
|
|
8
|
+
Name: string;
|
|
9
|
+
Description: string;
|
|
10
|
+
Currency: string;
|
|
11
|
+
DebitAmount: number;
|
|
12
|
+
CreditAmount: number;
|
|
13
|
+
RelatedObjectId: string;
|
|
14
|
+
RelatedObjectType: string;
|
|
15
|
+
TransactionType: string;
|
|
16
|
+
ledgerTransactionRepository: LedgerTransactionRepository;
|
|
17
|
+
constructor(ledgerTransactionRepository: LedgerTransactionRepository);
|
|
18
|
+
init(params?: ILedgerTransactionAttr): void;
|
|
19
|
+
getData(): {
|
|
20
|
+
TransactionId: string;
|
|
21
|
+
TransactionType: string;
|
|
22
|
+
JournalEntryId: string;
|
|
23
|
+
AccountNo: string;
|
|
24
|
+
Date: Date;
|
|
25
|
+
Name: string;
|
|
26
|
+
Description: string;
|
|
27
|
+
Currency: string;
|
|
28
|
+
DebitAmount: number;
|
|
29
|
+
CreditAmount: number;
|
|
30
|
+
RelatedObjectId: string;
|
|
31
|
+
RelatedObjectType: string;
|
|
32
|
+
};
|
|
33
|
+
create(): Promise<any>;
|
|
34
|
+
newLedgerTransaction({ transactionType }: ILedgerTransactionTypeOptionsAttr, journalEntryId?: string): Promise<any>;
|
|
35
|
+
}
|
|
@@ -1,71 +1,83 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
this.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const transaction_type_enum_1 = require("../enum/transaction-type.enum");
|
|
13
|
+
const uniqid = require("uniqid");
|
|
14
|
+
class LedgerTransaction {
|
|
15
|
+
constructor(ledgerTransactionRepository) {
|
|
16
|
+
this.ledgerTransactionRepository = ledgerTransactionRepository;
|
|
17
|
+
}
|
|
18
|
+
init(params) {
|
|
19
|
+
this.TransactionId = params.TransactionId;
|
|
20
|
+
this.TransactionType = params.TransactionType;
|
|
21
|
+
this.JournalEntryId = params.JournalEntryId;
|
|
22
|
+
this.AccountNo = params.AccountNo;
|
|
23
|
+
this.Date = params.Date;
|
|
24
|
+
this.Name = params.Name;
|
|
25
|
+
this.Description = params.Description;
|
|
26
|
+
this.Currency = params.Currency;
|
|
27
|
+
this.DebitAmount = params.DebitAmount;
|
|
28
|
+
this.CreditAmount = params.CreditAmount;
|
|
29
|
+
this.RelatedObjectId = params.RelatedObjectId;
|
|
30
|
+
this.RelatedObjectType = params.RelatedObjectType;
|
|
31
|
+
}
|
|
32
|
+
getData() {
|
|
33
|
+
return {
|
|
34
|
+
TransactionId: this.TransactionId,
|
|
35
|
+
TransactionType: this.TransactionType,
|
|
36
|
+
JournalEntryId: this.JournalEntryId,
|
|
37
|
+
AccountNo: this.AccountNo,
|
|
38
|
+
Date: this.Date,
|
|
39
|
+
Name: this.Name,
|
|
40
|
+
Description: this.Description,
|
|
41
|
+
Currency: this.Currency,
|
|
42
|
+
DebitAmount: this.DebitAmount,
|
|
43
|
+
CreditAmount: this.CreditAmount,
|
|
44
|
+
RelatedObjectId: this.RelatedObjectId,
|
|
45
|
+
RelatedObjectType: this.RelatedObjectType,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
create() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return yield this.ledgerTransactionRepository.create(this.getData);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
newLedgerTransaction({ transactionType }, journalEntryId) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
this.init({
|
|
56
|
+
TransactionId: uniqid(),
|
|
57
|
+
TransactionType: 'Debit',
|
|
58
|
+
JournalEntryId: '',
|
|
59
|
+
AccountNo: '',
|
|
60
|
+
Date: new Date(),
|
|
61
|
+
Name: '',
|
|
62
|
+
Description: '',
|
|
63
|
+
Currency: 'MYR',
|
|
64
|
+
DebitAmount: 0,
|
|
65
|
+
CreditAmount: 0,
|
|
66
|
+
RelatedObjectId: '',
|
|
67
|
+
RelatedObjectType: '',
|
|
68
|
+
});
|
|
69
|
+
if (transactionType === transaction_type_enum_1.TransactionTypeOptions.Debit) {
|
|
70
|
+
this.TransactionType = 'Debit';
|
|
71
|
+
}
|
|
72
|
+
else if (transactionType === transaction_type_enum_1.TransactionTypeOptions.Credit) {
|
|
73
|
+
this.TransactionType = 'Credit';
|
|
74
|
+
}
|
|
75
|
+
if (journalEntryId) {
|
|
76
|
+
this.JournalEntryId = journalEntryId;
|
|
77
|
+
}
|
|
78
|
+
return yield this.create();
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.default = LedgerTransaction;
|
|
71
83
|
//# sourceMappingURL=ledger-transaction.js.map
|