@things-factory/accounting 8.0.0-alpha.1 → 8.0.0-alpha.12
Sign up to get free protection for your applications and to get access to all the features.
- package/client/bootstrap.ts +10 -1
- package/client/components/accounting-category-selector.ts +136 -0
- package/client/components/accounting-category-view.ts +75 -0
- package/client/grist-editors/grist-editor-accounting-category-object.ts +83 -0
- package/client/grist-editors/grist-renderer-accounting-category-object.ts +13 -0
- package/client/pages/account/account-list-page.ts +33 -2
- package/client/pages/accounting-category/accounting-category-list-page.ts +31 -1
- package/client/pages/accounting-category/accounting-category-tree-page.ts +338 -0
- package/client/pages/accounting-document/accounting-document-importer.ts +90 -0
- package/client/pages/accounting-document/accounting-document-list-page.ts +398 -0
- package/client/pages/bank/bank-importer.ts +90 -0
- package/client/pages/{ledger/ledger-list-page.ts → bank/bank-list-page.ts} +118 -57
- package/client/pages/{ledger/ledger-importer.ts → bank-account/bank-account-importer.ts} +10 -17
- package/client/pages/bank-account/bank-account-list-page.ts +398 -0
- package/client/pages/financial-institution/financial-institution-importer.ts +90 -0
- package/client/pages/financial-institution/financial-institution-list-page.ts +398 -0
- package/client/pages/payment/payment-importer.ts +90 -0
- package/client/pages/payment/payment-list-page.ts +398 -0
- package/client/route.ts +0 -4
- package/client/types/accounting-category.ts +23 -0
- package/client/types/index.ts +1 -0
- package/dist-client/bootstrap.js +7 -1
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/components/accounting-category-selector.d.ts +16 -0
- package/dist-client/components/accounting-category-selector.js +134 -0
- package/dist-client/components/accounting-category-selector.js.map +1 -0
- package/dist-client/components/accounting-category-view.d.ts +14 -0
- package/dist-client/components/accounting-category-view.js +81 -0
- package/dist-client/components/accounting-category-view.js.map +1 -0
- package/dist-client/grist-editors/grist-editor-accounting-category-object.d.ts +11 -0
- package/dist-client/grist-editors/grist-editor-accounting-category-object.js +71 -0
- package/dist-client/grist-editors/grist-editor-accounting-category-object.js.map +1 -0
- package/dist-client/grist-editors/grist-renderer-accounting-category-object.d.ts +2 -0
- package/dist-client/grist-editors/grist-renderer-accounting-category-object.js +9 -0
- package/dist-client/grist-editors/grist-renderer-accounting-category-object.js.map +1 -0
- package/dist-client/pages/account/account-list-page.js +33 -2
- package/dist-client/pages/account/account-list-page.js.map +1 -1
- package/dist-client/pages/accounting-category/accounting-category-list-page.js +31 -1
- package/dist-client/pages/accounting-category/accounting-category-list-page.js.map +1 -1
- package/dist-client/pages/accounting-category/accounting-category-tree-page.d.ts +46 -0
- package/dist-client/pages/accounting-category/accounting-category-tree-page.js +329 -0
- package/dist-client/pages/accounting-category/accounting-category-tree-page.js.map +1 -0
- package/dist-client/pages/accounting-document/accounting-document-importer.d.ts +23 -0
- package/dist-client/pages/accounting-document/accounting-document-importer.js +93 -0
- package/dist-client/pages/accounting-document/accounting-document-importer.js.map +1 -0
- package/dist-client/pages/accounting-document/accounting-document-list-page.d.ts +66 -0
- package/dist-client/pages/accounting-document/accounting-document-list-page.js +370 -0
- package/dist-client/pages/accounting-document/accounting-document-list-page.js.map +1 -0
- package/dist-client/pages/{ledger/ledger-importer.d.ts → bank/bank-importer.d.ts} +3 -2
- package/dist-client/pages/{ledger/ledger-importer.js → bank/bank-importer.js} +14 -21
- package/dist-client/pages/bank/bank-importer.js.map +1 -0
- package/dist-client/pages/{ledger/ledger-list-page.d.ts → bank/bank-list-page.d.ts} +12 -8
- package/dist-client/pages/{ledger/ledger-list-page.js → bank/bank-list-page.js} +114 -67
- package/dist-client/pages/bank/bank-list-page.js.map +1 -0
- package/dist-client/pages/bank-account/bank-account-importer.d.ts +23 -0
- package/dist-client/pages/bank-account/bank-account-importer.js +93 -0
- package/dist-client/pages/bank-account/bank-account-importer.js.map +1 -0
- package/dist-client/pages/bank-account/bank-account-list-page.d.ts +66 -0
- package/dist-client/pages/bank-account/bank-account-list-page.js +370 -0
- package/dist-client/pages/bank-account/bank-account-list-page.js.map +1 -0
- package/dist-client/pages/financial-institution/financial-institution-importer.d.ts +23 -0
- package/dist-client/pages/financial-institution/financial-institution-importer.js +93 -0
- package/dist-client/pages/financial-institution/financial-institution-importer.js.map +1 -0
- package/dist-client/pages/financial-institution/financial-institution-list-page.d.ts +66 -0
- package/dist-client/pages/financial-institution/financial-institution-list-page.js +370 -0
- package/dist-client/pages/financial-institution/financial-institution-list-page.js.map +1 -0
- package/dist-client/pages/payment/payment-importer.d.ts +23 -0
- package/dist-client/pages/payment/payment-importer.js +93 -0
- package/dist-client/pages/payment/payment-importer.js.map +1 -0
- package/dist-client/pages/payment/payment-list-page.d.ts +66 -0
- package/dist-client/pages/payment/payment-list-page.js +370 -0
- package/dist-client/pages/payment/payment-list-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +0 -3
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/types/accounting-category.d.ts +16 -0
- package/dist-client/types/accounting-category.js +3 -0
- package/dist-client/types/accounting-category.js.map +1 -0
- package/dist-client/types/index.d.ts +1 -0
- package/dist-client/types/index.js +2 -0
- package/dist-client/types/index.js.map +1 -0
- package/dist-server/activities/activity-book.js +31 -19
- package/dist-server/activities/activity-book.js.map +1 -1
- package/dist-server/controllers/summary-statements.js +13 -7
- package/dist-server/controllers/summary-statements.js.map +1 -1
- package/dist-server/index.d.ts +1 -0
- package/dist-server/index.js +1 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/migrations/1725200507196-seed-fiscal-entities.js +3 -3
- package/dist-server/migrations/1725200507196-seed-fiscal-entities.js.map +1 -1
- package/dist-server/migrations/1725201467183-seed-accounts.js +31 -31
- package/dist-server/migrations/1725201467183-seed-accounts.js.map +1 -1
- package/dist-server/migrations/1725201567284-seed-country-codes.d.ts +5 -0
- package/dist-server/migrations/1725201567284-seed-country-codes.js +248 -0
- package/dist-server/migrations/1725201567284-seed-country-codes.js.map +1 -0
- package/dist-server/migrations/1725201667385-seed-financial-institutions.d.ts +5 -0
- package/dist-server/migrations/1725201667385-seed-financial-institutions.js +348 -0
- package/dist-server/migrations/1725201667385-seed-financial-institutions.js.map +1 -0
- package/dist-server/routes.d.ts +0 -1
- package/dist-server/routes.js +0 -1
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/account/account-history.d.ts +4 -1
- package/dist-server/service/account/account-history.js +14 -4
- package/dist-server/service/account/account-history.js.map +1 -1
- package/dist-server/service/account/account-mutation.js +13 -9
- package/dist-server/service/account/account-mutation.js.map +1 -1
- package/dist-server/service/account/account-query.js +2 -0
- package/dist-server/service/account/account-query.js.map +1 -1
- package/dist-server/service/account/account.d.ts +1 -1
- package/dist-server/service/account/account.js +15 -4
- package/dist-server/service/account/account.js.map +1 -1
- package/dist-server/service/account/index.d.ts +1 -2
- package/dist-server/service/accounting-category/accounting-category-history.d.ts +26 -0
- package/dist-server/service/accounting-category/accounting-category-history.js +136 -0
- package/dist-server/service/accounting-category/accounting-category-history.js.map +1 -0
- package/dist-server/service/accounting-category/accounting-category-mutation.js +12 -8
- package/dist-server/service/accounting-category/accounting-category-mutation.js.map +1 -1
- package/dist-server/service/accounting-category/accounting-category-query.d.ts +1 -0
- package/dist-server/service/accounting-category/accounting-category-query.js +23 -0
- package/dist-server/service/accounting-category/accounting-category-query.js.map +1 -1
- package/dist-server/service/accounting-category/accounting-category.d.ts +1 -0
- package/dist-server/service/accounting-category/accounting-category.js +14 -3
- package/dist-server/service/accounting-category/accounting-category.js.map +1 -1
- package/dist-server/service/accounting-category/event-subscriber.d.ts +7 -0
- package/dist-server/service/accounting-category/event-subscriber.js +21 -0
- package/dist-server/service/accounting-category/event-subscriber.js.map +1 -0
- package/dist-server/service/accounting-category/index.d.ts +2 -1
- package/dist-server/service/accounting-category/index.js +4 -2
- package/dist-server/service/accounting-category/index.js.map +1 -1
- package/dist-server/service/accounting-document/accounting-document-history.d.ts +26 -0
- package/dist-server/service/accounting-document/accounting-document-history.js +129 -0
- package/dist-server/service/accounting-document/accounting-document-history.js.map +1 -0
- package/dist-server/service/accounting-document/accounting-document-mutation.d.ts +10 -0
- package/dist-server/service/accounting-document/accounting-document-mutation.js +128 -0
- package/dist-server/service/accounting-document/accounting-document-mutation.js.map +1 -0
- package/dist-server/service/accounting-document/accounting-document-query.d.ts +11 -0
- package/dist-server/service/accounting-document/accounting-document-query.js +79 -0
- package/dist-server/service/accounting-document/accounting-document-query.js.map +1 -0
- package/dist-server/service/accounting-document/accounting-document-type.d.ts +20 -0
- package/dist-server/service/accounting-document/accounting-document-type.js +74 -0
- package/dist-server/service/accounting-document/accounting-document-type.js.map +1 -0
- package/dist-server/service/accounting-document/accounting-document.d.ts +21 -0
- package/dist-server/service/accounting-document/accounting-document.js +104 -0
- package/dist-server/service/accounting-document/accounting-document.js.map +1 -0
- package/dist-server/service/accounting-document/event-subscriber.d.ts +7 -0
- package/dist-server/service/accounting-document/event-subscriber.js +21 -0
- package/dist-server/service/accounting-document/event-subscriber.js.map +1 -0
- package/dist-server/service/accounting-document/index.d.ts +7 -0
- package/dist-server/service/accounting-document/index.js +12 -0
- package/dist-server/service/accounting-document/index.js.map +1 -0
- package/dist-server/service/bank-account/bank-account-history.d.ts +34 -0
- package/dist-server/service/bank-account/bank-account-history.js +172 -0
- package/dist-server/service/bank-account/bank-account-history.js.map +1 -0
- package/dist-server/service/bank-account/bank-account-mutation.d.ts +10 -0
- package/dist-server/service/bank-account/bank-account-mutation.js +128 -0
- package/dist-server/service/bank-account/bank-account-mutation.js.map +1 -0
- package/dist-server/service/bank-account/bank-account-query.d.ts +11 -0
- package/dist-server/service/bank-account/bank-account-query.js +79 -0
- package/dist-server/service/bank-account/bank-account-query.js.map +1 -0
- package/dist-server/service/bank-account/bank-account-type.d.ts +39 -0
- package/dist-server/service/bank-account/bank-account-type.js +153 -0
- package/dist-server/service/bank-account/bank-account-type.js.map +1 -0
- package/dist-server/service/bank-account/bank-account.d.ts +38 -0
- package/dist-server/service/bank-account/bank-account.js +164 -0
- package/dist-server/service/bank-account/bank-account.js.map +1 -0
- package/dist-server/service/bank-account/event-subscriber.d.ts +7 -0
- package/dist-server/service/bank-account/event-subscriber.js +21 -0
- package/dist-server/service/bank-account/event-subscriber.js.map +1 -0
- package/dist-server/service/bank-account/index.d.ts +7 -0
- package/dist-server/service/bank-account/index.js +12 -0
- package/dist-server/service/bank-account/index.js.map +1 -0
- package/dist-server/service/financial-institution/financial-institution-mutation.d.ts +10 -0
- package/dist-server/service/financial-institution/financial-institution-mutation.js +169 -0
- package/dist-server/service/financial-institution/financial-institution-mutation.js.map +1 -0
- package/dist-server/service/financial-institution/financial-institution-query.d.ts +12 -0
- package/dist-server/service/financial-institution/financial-institution-query.js +97 -0
- package/dist-server/service/financial-institution/financial-institution-query.js.map +1 -0
- package/dist-server/service/financial-institution/financial-institution-type.d.ts +32 -0
- package/dist-server/service/financial-institution/financial-institution-type.js +126 -0
- package/dist-server/service/financial-institution/financial-institution-type.js.map +1 -0
- package/dist-server/service/financial-institution/financial-institution.d.ts +34 -0
- package/dist-server/service/financial-institution/financial-institution.js +137 -0
- package/dist-server/service/financial-institution/financial-institution.js.map +1 -0
- package/dist-server/service/financial-institution/index.d.ts +6 -0
- package/dist-server/service/financial-institution/index.js +10 -0
- package/dist-server/service/financial-institution/index.js.map +1 -0
- package/dist-server/service/financial-statement/financial-statement-history.d.ts +9 -6
- package/dist-server/service/financial-statement/financial-statement-history.js +30 -20
- package/dist-server/service/financial-statement/financial-statement-history.js.map +1 -1
- package/dist-server/service/financial-statement/financial-statement-line-item.d.ts +19 -0
- package/dist-server/service/financial-statement/financial-statement-line-item.js +94 -0
- package/dist-server/service/financial-statement/financial-statement-line-item.js.map +1 -0
- package/dist-server/service/financial-statement/financial-statement-mutation.js +12 -8
- package/dist-server/service/financial-statement/financial-statement-mutation.js.map +1 -1
- package/dist-server/service/financial-statement/financial-statement-query.js +2 -0
- package/dist-server/service/financial-statement/financial-statement-query.js.map +1 -1
- package/dist-server/service/financial-statement/financial-statement.d.ts +2 -0
- package/dist-server/service/financial-statement/financial-statement.js +45 -24
- package/dist-server/service/financial-statement/financial-statement.js.map +1 -1
- package/dist-server/service/financial-statement/index.d.ts +2 -2
- package/dist-server/service/financial-statement/index.js +2 -1
- package/dist-server/service/financial-statement/index.js.map +1 -1
- package/dist-server/service/fiscal-month/fiscal-month-mutation.js +6 -0
- package/dist-server/service/fiscal-month/fiscal-month-mutation.js.map +1 -1
- package/dist-server/service/fiscal-month/fiscal-month-query.js +2 -0
- package/dist-server/service/fiscal-month/fiscal-month-query.js.map +1 -1
- package/dist-server/service/fiscal-month/fiscal-month.js +1 -1
- package/dist-server/service/fiscal-month/fiscal-month.js.map +1 -1
- package/dist-server/service/fiscal-quarter/fiscal-quarter-mutation.js +6 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter-mutation.js.map +1 -1
- package/dist-server/service/fiscal-quarter/fiscal-quarter-query.js +2 -0
- package/dist-server/service/fiscal-quarter/fiscal-quarter-query.js.map +1 -1
- package/dist-server/service/fiscal-quarter/fiscal-quarter.js +1 -1
- package/dist-server/service/fiscal-quarter/fiscal-quarter.js.map +1 -1
- package/dist-server/service/fiscal-year/fiscal-year-mutation.js +6 -0
- package/dist-server/service/fiscal-year/fiscal-year-mutation.js.map +1 -1
- package/dist-server/service/fiscal-year/fiscal-year-query.js +2 -0
- package/dist-server/service/fiscal-year/fiscal-year-query.js.map +1 -1
- package/dist-server/service/fiscal-year/fiscal-year.js +1 -1
- package/dist-server/service/fiscal-year/fiscal-year.js.map +1 -1
- package/dist-server/service/income-statement/income-statement-history.d.ts +9 -5
- package/dist-server/service/income-statement/income-statement-history.js +35 -20
- package/dist-server/service/income-statement/income-statement-history.js.map +1 -1
- package/dist-server/service/income-statement/income-statement-line-item.d.ts +19 -0
- package/dist-server/service/income-statement/income-statement-line-item.js +96 -0
- package/dist-server/service/income-statement/income-statement-line-item.js.map +1 -0
- package/dist-server/service/income-statement/income-statement-mutation.js +12 -8
- package/dist-server/service/income-statement/income-statement-mutation.js.map +1 -1
- package/dist-server/service/income-statement/income-statement-query.js +2 -0
- package/dist-server/service/income-statement/income-statement-query.js.map +1 -1
- package/dist-server/service/income-statement/income-statement.d.ts +2 -0
- package/dist-server/service/income-statement/income-statement.js +46 -26
- package/dist-server/service/income-statement/income-statement.js.map +1 -1
- package/dist-server/service/income-statement/index.d.ts +2 -2
- package/dist-server/service/income-statement/index.js +2 -1
- package/dist-server/service/income-statement/index.js.map +1 -1
- package/dist-server/service/index.d.ts +4 -2
- package/dist-server/service/index.js +10 -0
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/payment/event-subscriber.d.ts +7 -0
- package/dist-server/service/payment/event-subscriber.js +21 -0
- package/dist-server/service/payment/event-subscriber.js.map +1 -0
- package/dist-server/service/payment/index.d.ts +7 -0
- package/dist-server/service/payment/index.js +12 -0
- package/dist-server/service/payment/index.js.map +1 -0
- package/dist-server/service/payment/payment-history.d.ts +37 -0
- package/dist-server/service/payment/payment-history.js +174 -0
- package/dist-server/service/payment/payment-history.js.map +1 -0
- package/dist-server/service/payment/payment-mutation.d.ts +10 -0
- package/dist-server/service/payment/payment-mutation.js +134 -0
- package/dist-server/service/payment/payment-mutation.js.map +1 -0
- package/dist-server/service/payment/payment-query.d.ts +11 -0
- package/dist-server/service/payment/payment-query.js +81 -0
- package/dist-server/service/payment/payment-query.js.map +1 -0
- package/dist-server/service/payment/payment-type.d.ts +30 -0
- package/dist-server/service/payment/payment-type.js +114 -0
- package/dist-server/service/payment/payment-type.js.map +1 -0
- package/dist-server/service/payment/payment.d.ts +42 -0
- package/dist-server/service/payment/payment.js +181 -0
- package/dist-server/service/payment/payment.js.map +1 -0
- package/dist-server/service/transaction/index.d.ts +2 -1
- package/dist-server/service/transaction/transaction-history.d.ts +6 -2
- package/dist-server/service/transaction/transaction-history.js +28 -9
- package/dist-server/service/transaction/transaction-history.js.map +1 -1
- package/dist-server/service/transaction/transaction-mutation.js +13 -9
- package/dist-server/service/transaction/transaction-mutation.js.map +1 -1
- package/dist-server/service/transaction/transaction-query.js +2 -0
- package/dist-server/service/transaction/transaction-query.js.map +1 -1
- package/dist-server/service/transaction/transaction.d.ts +28 -6
- package/dist-server/service/transaction/transaction.js +119 -31
- package/dist-server/service/transaction/transaction.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/helps/accounting/accounting-document.md +160 -0
- package/helps/accounting/bank-account.md +160 -0
- package/helps/accounting/bank.md +160 -0
- package/helps/accounting/contract.md +160 -0
- package/helps/accounting/financial-institution.md +160 -0
- package/helps/accounting/payment.md +160 -0
- package/package.json +5 -5
- package/server/activities/activity-book.ts +31 -19
- package/server/controllers/summary-statements.ts +13 -7
- package/server/index.ts +1 -0
- package/server/migrations/1725200507196-seed-fiscal-entities.ts +3 -3
- package/server/migrations/1725201467183-seed-accounts.ts +31 -31
- package/server/migrations/1725201567284-seed-country-codes.ts +261 -0
- package/server/migrations/1725201667385-seed-financial-institutions.ts +348 -0
- package/server/routes.ts +0 -2
- package/server/service/account/account-history.ts +14 -6
- package/server/service/account/account-mutation.ts +13 -10
- package/server/service/account/account-query.ts +2 -0
- package/server/service/account/account.ts +15 -4
- package/server/service/accounting-category/accounting-category-history.ts +123 -0
- package/server/service/accounting-category/accounting-category-mutation.ts +12 -9
- package/server/service/accounting-category/accounting-category-query.ts +23 -0
- package/server/service/accounting-category/accounting-category.ts +14 -3
- package/server/service/accounting-category/event-subscriber.ts +20 -0
- package/server/service/accounting-category/index.ts +4 -2
- package/server/service/accounting-document/accounting-document-history.ts +117 -0
- package/server/service/accounting-document/accounting-document-mutation.ts +137 -0
- package/server/service/accounting-document/accounting-document-query.ts +48 -0
- package/server/service/accounting-document/accounting-document-type.ts +52 -0
- package/server/service/accounting-document/accounting-document.ts +93 -0
- package/server/service/accounting-document/event-subscriber.ts +17 -0
- package/server/service/accounting-document/index.ts +9 -0
- package/server/service/bank-account/bank-account-history.ts +149 -0
- package/server/service/bank-account/bank-account-mutation.ts +137 -0
- package/server/service/bank-account/bank-account-query.ts +48 -0
- package/server/service/bank-account/bank-account-type.ts +112 -0
- package/server/service/bank-account/bank-account.ts +142 -0
- package/server/service/bank-account/event-subscriber.ts +17 -0
- package/server/service/bank-account/index.ts +9 -0
- package/server/service/financial-institution/financial-institution-mutation.ts +198 -0
- package/server/service/financial-institution/financial-institution-query.ts +62 -0
- package/server/service/financial-institution/financial-institution-type.ts +91 -0
- package/server/service/financial-institution/financial-institution.ts +122 -0
- package/server/service/financial-institution/index.ts +7 -0
- package/server/service/financial-statement/financial-statement-history.ts +27 -18
- package/server/service/financial-statement/financial-statement-line-item.ts +82 -0
- package/server/service/financial-statement/financial-statement-mutation.ts +12 -9
- package/server/service/financial-statement/financial-statement-query.ts +2 -0
- package/server/service/financial-statement/financial-statement.ts +52 -36
- package/server/service/financial-statement/index.ts +2 -1
- package/server/service/fiscal-month/fiscal-month-mutation.ts +10 -2
- package/server/service/fiscal-month/fiscal-month-query.ts +3 -1
- package/server/service/fiscal-month/fiscal-month.ts +1 -1
- package/server/service/fiscal-quarter/fiscal-quarter-mutation.ts +14 -3
- package/server/service/fiscal-quarter/fiscal-quarter-query.ts +2 -0
- package/server/service/fiscal-quarter/fiscal-quarter.ts +1 -1
- package/server/service/fiscal-year/fiscal-year-mutation.ts +10 -2
- package/server/service/fiscal-year/fiscal-year-query.ts +2 -0
- package/server/service/fiscal-year/fiscal-year.ts +1 -1
- package/server/service/income-statement/income-statement-history.ts +30 -17
- package/server/service/income-statement/income-statement-line-item.ts +84 -0
- package/server/service/income-statement/income-statement-mutation.ts +12 -10
- package/server/service/income-statement/income-statement-query.ts +2 -0
- package/server/service/income-statement/income-statement.ts +54 -39
- package/server/service/income-statement/index.ts +2 -1
- package/server/service/index.ts +18 -0
- package/server/service/payment/event-subscriber.ts +17 -0
- package/server/service/payment/index.ts +9 -0
- package/server/service/payment/payment-history.ts +149 -0
- package/server/service/payment/payment-mutation.ts +139 -0
- package/server/service/payment/payment-query.ts +50 -0
- package/server/service/payment/payment-type.ts +82 -0
- package/server/service/payment/payment.ts +154 -0
- package/server/service/transaction/transaction-history.ts +24 -8
- package/server/service/transaction/transaction-mutation.ts +13 -10
- package/server/service/transaction/transaction-query.ts +2 -0
- package/server/service/transaction/transaction.ts +130 -34
- package/things-factory.config.js +0 -1
- package/translations/en.json +9 -1
- package/translations/ja.json +9 -1
- package/translations/ko.json +9 -1
- package/translations/ms.json +9 -1
- package/translations/zh.json +9 -1
- package/client/pages/main.ts +0 -24
- package/dist-client/pages/ledger/ledger-importer.js.map +0 -1
- package/dist-client/pages/ledger/ledger-list-page.js.map +0 -1
- package/dist-client/pages/main.d.ts +0 -1
- package/dist-client/pages/main.js +0 -27
- package/dist-client/pages/main.js.map +0 -1
@@ -145,31 +145,31 @@ export class SeedAccounts1725201467183 implements MigrationInterface {
|
|
145
145
|
const accounts = [
|
146
146
|
// 유동자산 계정
|
147
147
|
{
|
148
|
-
|
148
|
+
code: '101',
|
149
149
|
name: '현금 및 현금성 자산',
|
150
150
|
description: '현금, 예금 및 기타 현금성 자산',
|
151
151
|
category: subCategories.유동자산
|
152
152
|
},
|
153
153
|
{
|
154
|
-
|
154
|
+
code: '102',
|
155
155
|
name: '매출채권',
|
156
156
|
description: '상품 또는 서비스의 판매로 인해 발생한 채권',
|
157
157
|
category: subCategories.유동자산
|
158
158
|
},
|
159
159
|
{
|
160
|
-
|
160
|
+
code: '103',
|
161
161
|
name: '재고자산',
|
162
162
|
description: '판매를 목적으로 보유한 상품, 제품, 원재료 등',
|
163
163
|
category: subCategories.유동자산
|
164
164
|
},
|
165
165
|
{
|
166
|
-
|
166
|
+
code: '104',
|
167
167
|
name: '단기금융상품',
|
168
168
|
description: '단기투자 목적으로 보유한 금융상품',
|
169
169
|
category: subCategories.유동자산
|
170
170
|
},
|
171
171
|
{
|
172
|
-
|
172
|
+
code: '105',
|
173
173
|
name: '선급금',
|
174
174
|
description: '상품, 서비스 제공을 위해 미리 지급한 금액',
|
175
175
|
category: subCategories.유동자산
|
@@ -177,25 +177,25 @@ export class SeedAccounts1725201467183 implements MigrationInterface {
|
|
177
177
|
|
178
178
|
// 비유동자산 계정
|
179
179
|
{
|
180
|
-
|
180
|
+
code: '201',
|
181
181
|
name: '건물',
|
182
182
|
description: '기업이 소유한 건물',
|
183
183
|
category: furtherSubCategories.유형자산
|
184
184
|
},
|
185
185
|
{
|
186
|
-
|
186
|
+
code: '202',
|
187
187
|
name: '토지',
|
188
188
|
description: '기업이 소유한 토지',
|
189
189
|
category: furtherSubCategories.유형자산
|
190
190
|
},
|
191
191
|
{
|
192
|
-
|
192
|
+
code: '203',
|
193
193
|
name: '기계장치',
|
194
194
|
description: '생산을 위해 사용되는 기계 및 장치',
|
195
195
|
category: furtherSubCategories.유형자산
|
196
196
|
},
|
197
197
|
{
|
198
|
-
|
198
|
+
code: '204',
|
199
199
|
name: '무형자산',
|
200
200
|
description: '특허권, 상표권 등의 무형자산',
|
201
201
|
category: furtherSubCategories.무형자산
|
@@ -203,70 +203,70 @@ export class SeedAccounts1725201467183 implements MigrationInterface {
|
|
203
203
|
|
204
204
|
// 유동부채 계정
|
205
205
|
{
|
206
|
-
|
206
|
+
code: '301',
|
207
207
|
name: '매입채무',
|
208
208
|
description: '상품 또는 서비스의 구매로 인해 발생한 채무',
|
209
209
|
category: subCategories.유동부채
|
210
210
|
},
|
211
211
|
{
|
212
|
-
|
212
|
+
code: '302',
|
213
213
|
name: '단기차입금',
|
214
214
|
description: '단기 대출금',
|
215
215
|
category: furtherSubCategories.단기금융부채
|
216
216
|
},
|
217
217
|
{
|
218
|
-
|
218
|
+
code: '303',
|
219
219
|
name: '미지급금',
|
220
220
|
description: '이미 발생한 비용에 대한 지급할 금액',
|
221
221
|
category: subCategories.유동부채
|
222
222
|
},
|
223
223
|
{
|
224
|
-
|
224
|
+
code: '304',
|
225
225
|
name: '선수금',
|
226
226
|
description: '고객으로부터 미리 받은 금액',
|
227
227
|
category: subCategories.유동부채
|
228
228
|
},
|
229
229
|
|
230
230
|
// 비유동부채 계정
|
231
|
-
{
|
231
|
+
{ code: '401', name: '장기차입금', description: '장기 대출금', category: subCategories.비유동부채 },
|
232
232
|
{
|
233
|
-
|
233
|
+
code: '402',
|
234
234
|
name: '퇴직급여충당부채',
|
235
235
|
description: '퇴직급여 지급을 위해 설정한 부채',
|
236
236
|
category: subCategories.비유동부채
|
237
237
|
},
|
238
238
|
|
239
239
|
// 자본 계정
|
240
|
-
{
|
241
|
-
{
|
240
|
+
{ code: '501', name: '자본금', description: '주주가 납입한 자본', category: topLevelCategories.자본 },
|
241
|
+
{ code: '502', name: '이익잉여금', description: '이익의 축적', category: topLevelCategories.자본 },
|
242
242
|
|
243
243
|
// 수익 계정
|
244
244
|
{
|
245
|
-
|
245
|
+
code: '601',
|
246
246
|
name: '제품매출',
|
247
247
|
description: '제품의 판매로 인한 수익',
|
248
248
|
category: topLevelCategories.수익
|
249
249
|
},
|
250
250
|
{
|
251
|
-
|
251
|
+
code: '602',
|
252
252
|
name: '상품매출',
|
253
253
|
description: '상품의 판매로 인한 수익',
|
254
254
|
category: topLevelCategories.수익
|
255
255
|
},
|
256
256
|
{
|
257
|
-
|
257
|
+
code: '603',
|
258
258
|
name: '용역매출',
|
259
259
|
description: '용역 제공으로 인한 수익',
|
260
260
|
category: topLevelCategories.수익
|
261
261
|
},
|
262
262
|
{
|
263
|
-
|
263
|
+
code: '604',
|
264
264
|
name: '이자수익',
|
265
265
|
description: '금융 자산에서 발생한 이자수익',
|
266
266
|
category: topLevelCategories.수익
|
267
267
|
},
|
268
268
|
{
|
269
|
-
|
269
|
+
code: '605',
|
270
270
|
name: '배당금수익',
|
271
271
|
description: '주식 투자로 인한 배당금 수익',
|
272
272
|
category: topLevelCategories.수익
|
@@ -274,32 +274,32 @@ export class SeedAccounts1725201467183 implements MigrationInterface {
|
|
274
274
|
|
275
275
|
// 비용 계정
|
276
276
|
{
|
277
|
-
|
277
|
+
code: '701',
|
278
278
|
name: '매출원가',
|
279
279
|
description: '제품, 상품, 용역 제공에 대한 원가',
|
280
280
|
category: topLevelCategories.비용
|
281
281
|
},
|
282
|
-
{
|
283
|
-
{
|
282
|
+
{ code: '702', name: '급여', description: '직원 급여 비용', category: topLevelCategories.비용 },
|
283
|
+
{ code: '703', name: '임대료', description: '건물 및 설비 임차료', category: topLevelCategories.비용 },
|
284
284
|
{
|
285
|
-
|
285
|
+
code: '704',
|
286
286
|
name: '감가상각비',
|
287
287
|
description: '유형자산의 감가상각비용',
|
288
288
|
category: topLevelCategories.비용
|
289
289
|
},
|
290
290
|
{
|
291
|
-
|
291
|
+
code: '705',
|
292
292
|
name: '이자비용',
|
293
293
|
description: '차입금에 대한 이자비용',
|
294
294
|
category: topLevelCategories.비용
|
295
295
|
},
|
296
296
|
{
|
297
|
-
|
297
|
+
code: '706',
|
298
298
|
name: '판매비 및 관리비',
|
299
299
|
description: '기업 운영에 필요한 비용',
|
300
300
|
category: topLevelCategories.비용
|
301
301
|
},
|
302
|
-
{
|
302
|
+
{ code: '707', name: '법인세비용', description: '법인세 납부 비용', category: topLevelCategories.비용 }
|
303
303
|
]
|
304
304
|
|
305
305
|
// 계정 저장
|
@@ -331,9 +331,9 @@ export class SeedAccounts1725201467183 implements MigrationInterface {
|
|
331
331
|
}
|
332
332
|
|
333
333
|
// Accounts 삭제
|
334
|
-
await accountRepository.
|
334
|
+
await accountRepository.softDelete({ domain: { id: domain.id } })
|
335
335
|
|
336
336
|
// AccountingCategories 삭제
|
337
|
-
await accountingCategoryRepository.
|
337
|
+
await accountingCategoryRepository.softDelete({ domain: { id: domain.id } })
|
338
338
|
}
|
339
339
|
}
|
@@ -0,0 +1,261 @@
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm'
|
2
|
+
|
3
|
+
import { CommonCode, CommonCodeDetail } from '@things-factory/code-base'
|
4
|
+
import { Domain, getRepository } from '@things-factory/shell'
|
5
|
+
|
6
|
+
const codes = [
|
7
|
+
{
|
8
|
+
name: 'COUNTRY_CODES',
|
9
|
+
description: 'country code',
|
10
|
+
details: [
|
11
|
+
{ name: 'AF', description: '아프가니스탄' },
|
12
|
+
{ name: 'AL', description: '알바니아' },
|
13
|
+
{ name: 'DZ', description: '알제리' },
|
14
|
+
{ name: 'AS', description: '아메리칸사모아' },
|
15
|
+
{ name: 'AD', description: '안도라' },
|
16
|
+
{ name: 'AO', description: '앙골라' },
|
17
|
+
{ name: 'AI', description: '앵귈라' },
|
18
|
+
{ name: 'AQ', description: '남극' },
|
19
|
+
{ name: 'AG', description: '앤티가 바부다' },
|
20
|
+
{ name: 'AR', description: '아르헨티나' },
|
21
|
+
{ name: 'AM', description: '아르메니아' },
|
22
|
+
{ name: 'AW', description: '아루바' },
|
23
|
+
{ name: 'AU', description: '호주' },
|
24
|
+
{ name: 'AT', description: '오스트리아' },
|
25
|
+
{ name: 'AZ', description: '아제르바이잔' },
|
26
|
+
{ name: 'BS', description: '바하마' },
|
27
|
+
{ name: 'BH', description: '바레인' },
|
28
|
+
{ name: 'BD', description: '방글라데시' },
|
29
|
+
{ name: 'BB', description: '바베이도스' },
|
30
|
+
{ name: 'BY', description: '벨라루스' },
|
31
|
+
{ name: 'BE', description: '벨기에' },
|
32
|
+
{ name: 'BZ', description: '벨리즈' },
|
33
|
+
{ name: 'BJ', description: '베냉' },
|
34
|
+
{ name: 'BM', description: '버뮤다' },
|
35
|
+
{ name: 'BT', description: '부탄' },
|
36
|
+
{ name: 'BO', description: '볼리비아' },
|
37
|
+
{ name: 'BA', description: '보스니아 헤르체고비나' },
|
38
|
+
{ name: 'BW', description: '보츠와나' },
|
39
|
+
{ name: 'BV', description: '부베 섬' },
|
40
|
+
{ name: 'BR', description: '브라질' },
|
41
|
+
{ name: 'IO', description: '영국령 인도양 지역' },
|
42
|
+
{ name: 'BN', description: '브루나이' },
|
43
|
+
{ name: 'BG', description: '불가리아' },
|
44
|
+
{ name: 'BF', description: '부르키나파소' },
|
45
|
+
{ name: 'BI', description: '부룬디' },
|
46
|
+
{ name: 'KH', description: '캄보디아' },
|
47
|
+
{ name: 'CM', description: '카메룬' },
|
48
|
+
{ name: 'CA', description: '캐나다' },
|
49
|
+
{ name: 'CV', description: '카보베르데' },
|
50
|
+
{ name: 'KY', description: '케이맨 제도' },
|
51
|
+
{ name: 'CF', description: '중앙아프리카 공화국' },
|
52
|
+
{ name: 'TD', description: '차드' },
|
53
|
+
{ name: 'CL', description: '칠레' },
|
54
|
+
{ name: 'CN', description: '중국' },
|
55
|
+
{ name: 'CX', description: '크리스마스 섬' },
|
56
|
+
{ name: 'CC', description: '코코스 제도' },
|
57
|
+
{ name: 'CO', description: '콜롬비아' },
|
58
|
+
{ name: 'KM', description: '코모로' },
|
59
|
+
{ name: 'CG', description: '콩고' },
|
60
|
+
{ name: 'CD', description: '콩고 민주 공화국' },
|
61
|
+
{ name: 'CK', description: '쿡 제도' },
|
62
|
+
{ name: 'CR', description: '코스타리카' },
|
63
|
+
{ name: 'CI', description: '코트디부아르' },
|
64
|
+
{ name: 'HR', description: '크로아티아' },
|
65
|
+
{ name: 'CU', description: '쿠바' },
|
66
|
+
{ name: 'CY', description: '키프로스' },
|
67
|
+
{ name: 'CZ', description: '체코' },
|
68
|
+
{ name: 'DK', description: '덴마크' },
|
69
|
+
{ name: 'DJ', description: '지부티' },
|
70
|
+
{ name: 'DM', description: '도미니카' },
|
71
|
+
{ name: 'DO', description: '도미니카 공화국' },
|
72
|
+
{ name: 'EC', description: '에콰도르' },
|
73
|
+
{ name: 'EG', description: '이집트' },
|
74
|
+
{ name: 'SV', description: '엘살바도르' },
|
75
|
+
{ name: 'GQ', description: '적도 기니' },
|
76
|
+
{ name: 'ER', description: '에리트레아' },
|
77
|
+
{ name: 'EE', description: '에스토니아' },
|
78
|
+
{ name: 'ET', description: '에티오피아' },
|
79
|
+
{ name: 'FK', description: '포클랜드 제도' },
|
80
|
+
{ name: 'FO', description: '페로 제도' },
|
81
|
+
{ name: 'FJ', description: '피지' },
|
82
|
+
{ name: 'FI', description: '핀란드' },
|
83
|
+
{ name: 'FR', description: '프랑스' },
|
84
|
+
{ name: 'GF', description: '프랑스령 기아나' },
|
85
|
+
{ name: 'PF', description: '프랑스령 폴리네시아' },
|
86
|
+
{ name: 'TF', description: '프랑스령 남방 및 남극' },
|
87
|
+
{ name: 'GA', description: '가봉' },
|
88
|
+
{ name: 'GM', description: '감비아' },
|
89
|
+
{ name: 'GE', description: '조지아' },
|
90
|
+
{ name: 'DE', description: '독일' },
|
91
|
+
{ name: 'GH', description: '가나' },
|
92
|
+
{ name: 'GI', description: '지브롤터' },
|
93
|
+
{ name: 'GR', description: '그리스' },
|
94
|
+
{ name: 'GL', description: '그린란드' },
|
95
|
+
{ name: 'GD', description: '그레나다' },
|
96
|
+
{ name: 'GP', description: '과들루프' },
|
97
|
+
{ name: 'GU', description: '괌' },
|
98
|
+
{ name: 'GT', description: '과테말라' },
|
99
|
+
{ name: 'GN', description: '기니' },
|
100
|
+
{ name: 'GW', description: '기니비사우' },
|
101
|
+
{ name: 'GY', description: '가이아나' },
|
102
|
+
{ name: 'HT', description: '아이티' },
|
103
|
+
{ name: 'HM', description: '허드 맥도널드 제도' },
|
104
|
+
{ name: 'VA', description: '바티칸 시국' },
|
105
|
+
{ name: 'HN', description: '온두라스' },
|
106
|
+
{ name: 'HK', description: '홍콩' },
|
107
|
+
{ name: 'HU', description: '헝가리' },
|
108
|
+
{ name: 'IS', description: '아이슬란드' },
|
109
|
+
{ name: 'IN', description: '인도' },
|
110
|
+
{ name: 'ID', description: '인도네시아' },
|
111
|
+
{ name: 'IR', description: '이란' },
|
112
|
+
{ name: 'IQ', description: '이라크' },
|
113
|
+
{ name: 'IE', description: '아일랜드' },
|
114
|
+
{ name: 'IL', description: '이스라엘' },
|
115
|
+
{ name: 'IT', description: '이탈리아' },
|
116
|
+
{ name: 'JM', description: '자메이카' },
|
117
|
+
{ name: 'JP', description: '일본' },
|
118
|
+
{ name: 'JO', description: '요르단' },
|
119
|
+
{ name: 'KZ', description: '카자흐스탄' },
|
120
|
+
{ name: 'KE', description: '케냐' },
|
121
|
+
{ name: 'KI', description: '키리바시' },
|
122
|
+
{ name: 'KP', description: '북한' },
|
123
|
+
{ name: 'KR', description: '대한민국' },
|
124
|
+
{ name: 'KW', description: '쿠웨이트' },
|
125
|
+
{ name: 'KG', description: '키르기스스탄' },
|
126
|
+
{ name: 'LA', description: '라오스' },
|
127
|
+
{ name: 'LV', description: '라트비아' },
|
128
|
+
{ name: 'LB', description: '레바논' },
|
129
|
+
{ name: 'LS', description: '레소토' },
|
130
|
+
{ name: 'LR', description: '라이베리아' },
|
131
|
+
{ name: 'LY', description: '리비아' },
|
132
|
+
{ name: 'LI', description: '리히텐슈타인' },
|
133
|
+
{ name: 'LT', description: '리투아니아' },
|
134
|
+
{ name: 'LU', description: '룩셈부르크' },
|
135
|
+
{ name: 'MO', description: '마카오' },
|
136
|
+
{ name: 'MK', description: '북마케도니아' },
|
137
|
+
{ name: 'MG', description: '마다가스카르' },
|
138
|
+
{ name: 'MW', description: '말라위' },
|
139
|
+
{ name: 'MY', description: '말레이시아' },
|
140
|
+
{ name: 'MV', description: '몰디브' },
|
141
|
+
{ name: 'ML', description: '말리' },
|
142
|
+
{ name: 'MT', description: '몰타' },
|
143
|
+
{ name: 'MH', description: '마셜 제도' },
|
144
|
+
{ name: 'MQ', description: '마르티니크' },
|
145
|
+
{ name: 'MR', description: '모리타니' },
|
146
|
+
{ name: 'MU', description: '모리셔스' },
|
147
|
+
{ name: 'YT', description: '마요트' },
|
148
|
+
{ name: 'MX', description: '멕시코' },
|
149
|
+
{ name: 'FM', description: '미크로네시아 연방' },
|
150
|
+
{ name: 'MD', description: '몰도바' },
|
151
|
+
{ name: 'MC', description: '모나코' },
|
152
|
+
{ name: 'MN', description: '몽골' },
|
153
|
+
{ name: 'MS', description: '몬트세랫' },
|
154
|
+
{ name: 'MA', description: '모로코' },
|
155
|
+
{ name: 'MZ', description: '모잠비크' },
|
156
|
+
{ name: 'MM', description: '미얀마' },
|
157
|
+
{ name: 'NA', description: '나미비아' },
|
158
|
+
{ name: 'NR', description: '나우루' },
|
159
|
+
{ name: 'NP', description: '네팔' },
|
160
|
+
{ name: 'NL', description: '네덜란드' },
|
161
|
+
{ name: 'NC', description: '뉴칼레도니아' },
|
162
|
+
{ name: 'NZ', description: '뉴질랜드' },
|
163
|
+
{ name: 'NI', description: '니카라과' },
|
164
|
+
{ name: 'NE', description: '니제르' },
|
165
|
+
{ name: 'NG', description: '나이지리아' },
|
166
|
+
{ name: 'NU', description: '니우에' },
|
167
|
+
{ name: 'NF', description: '노퍽 섬' },
|
168
|
+
{ name: 'MP', description: '북마리아나 제도' },
|
169
|
+
{ name: 'NO', description: '노르웨이' },
|
170
|
+
{ name: 'OM', description: '오만' },
|
171
|
+
{ name: 'PK', description: '파키스탄' },
|
172
|
+
{ name: 'PW', description: '팔라우' },
|
173
|
+
{ name: 'PS', description: '팔레스타인' },
|
174
|
+
{ name: 'PA', description: '파나마' },
|
175
|
+
{ name: 'PG', description: '파푸아뉴기니' },
|
176
|
+
{ name: 'PY', description: '파라과이' },
|
177
|
+
{ name: 'PE', description: '페루' },
|
178
|
+
{ name: 'PH', description: '필리핀' },
|
179
|
+
{ name: 'PN', description: '핏케언 제도' },
|
180
|
+
{ name: 'PL', description: '폴란드' },
|
181
|
+
{ name: 'PT', description: '포르투갈' },
|
182
|
+
{ name: 'PR', description: '푸에르토리코' },
|
183
|
+
{ name: 'QA', description: '카타르' },
|
184
|
+
{ name: 'RE', description: '레위니옹' },
|
185
|
+
{ name: 'RO', description: '루마니아' },
|
186
|
+
{ name: 'RU', description: '러시아' },
|
187
|
+
{ name: 'RW', description: '르완다' },
|
188
|
+
{ name: 'SH', description: '세인트헬레나' },
|
189
|
+
{ name: 'KN', description: '세인트키츠 네비스' },
|
190
|
+
{ name: 'LC', description: '세인트루시아' },
|
191
|
+
{ name: 'PM', description: '생피에르 미클롱' },
|
192
|
+
{ name: 'VC', description: '세인트빈센트 그레나딘' },
|
193
|
+
{ name: 'WS', description: '사모아' },
|
194
|
+
{ name: 'SM', description: '산마리노' },
|
195
|
+
{ name: 'ST', description: '상투메 프린시페' },
|
196
|
+
{ name: 'SA', description: '사우디아라비아' },
|
197
|
+
{ name: 'SN', description: '세네갈' },
|
198
|
+
{ name: 'SC', description: '세이셸' },
|
199
|
+
{ name: 'SL', description: '시에라리온' },
|
200
|
+
{ name: 'SG', description: '싱가포르' },
|
201
|
+
{ name: 'SK', description: '슬로바키아' },
|
202
|
+
{ name: 'SI', description: '슬로베니아' },
|
203
|
+
{ name: 'SB', description: '솔로몬 제도' },
|
204
|
+
{ name: 'SO', description: '소말리아' },
|
205
|
+
{ name: 'ZA', description: '남아프리카 공화국' },
|
206
|
+
{ name: 'GS', description: '사우스조지아 사우스샌드위치 제도' },
|
207
|
+
{ name: 'ES', description: '스페인' },
|
208
|
+
{ name: 'LK', description: '스리랑카' },
|
209
|
+
{ name: 'SD', description: '수단' },
|
210
|
+
{ name: 'SR', description: '수리남' },
|
211
|
+
{ name: 'SJ', description: '스발바르 얀마옌' },
|
212
|
+
{ name: 'SZ', description: '에스와티니' },
|
213
|
+
{ name: 'SE', description: '스웨덴' },
|
214
|
+
{ name: 'CH', description: '스위스' },
|
215
|
+
{ name: 'SY', description: '시리아' },
|
216
|
+
{ name: 'TW', description: '대만' },
|
217
|
+
{ name: 'TJ', description: '타지키스탄' },
|
218
|
+
{ name: 'TZ', description: '탄자니아' },
|
219
|
+
{ name: 'TH', description: '태국' },
|
220
|
+
{ name: 'TL', description: '동티모르' },
|
221
|
+
{ name: 'TG', description: '토고' },
|
222
|
+
{ name: 'TK', description: '토켈라우' },
|
223
|
+
{ name: 'TO', description: '통가' }
|
224
|
+
]
|
225
|
+
}
|
226
|
+
]
|
227
|
+
|
228
|
+
export class SeedCountryCodes1725201567284 implements MigrationInterface {
|
229
|
+
public async up(queryRunner: QueryRunner): Promise<any> {
|
230
|
+
const codeRepo = getRepository(CommonCode)
|
231
|
+
const codeDetailRepo = getRepository(CommonCodeDetail)
|
232
|
+
const domain = await getRepository(Domain).findOneBy({
|
233
|
+
subdomain: 'system'
|
234
|
+
})
|
235
|
+
|
236
|
+
return await Promise.all(
|
237
|
+
codes.map(async code => {
|
238
|
+
const commonCode = await codeRepo.save({
|
239
|
+
...code,
|
240
|
+
domain
|
241
|
+
})
|
242
|
+
|
243
|
+
await codeDetailRepo.save(
|
244
|
+
commonCode.details.map((detail, idx) => {
|
245
|
+
return {
|
246
|
+
...detail,
|
247
|
+
commonCode,
|
248
|
+
domain,
|
249
|
+
rank: (idx + 1) * 10
|
250
|
+
}
|
251
|
+
})
|
252
|
+
)
|
253
|
+
})
|
254
|
+
)
|
255
|
+
}
|
256
|
+
|
257
|
+
public async down(queryRunner: QueryRunner): Promise<any> {
|
258
|
+
const codeRepo = getRepository(CommonCode)
|
259
|
+
const codeDetailRepo = getRepository(CommonCodeDetail)
|
260
|
+
}
|
261
|
+
}
|