@powerhousedao/contributor-billing 0.1.29 → 0.1.31
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/README.md +165 -8
- package/dist/document-models/billing-statement/actions.d.ts +1 -0
- package/dist/document-models/billing-statement/actions.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/document-model.js +58 -47
- package/dist/document-models/billing-statement/gen/document-schema.d.ts +38 -38
- package/dist/document-models/billing-statement/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/line-items/actions.d.ts +6 -2
- package/dist/document-models/billing-statement/gen/line-items/actions.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/line-items/creators.d.ts +3 -2
- package/dist/document-models/billing-statement/gen/line-items/creators.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/line-items/creators.js +2 -1
- package/dist/document-models/billing-statement/gen/line-items/operations.d.ts +2 -1
- package/dist/document-models/billing-statement/gen/line-items/operations.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/ph-factories.js +1 -1
- package/dist/document-models/billing-statement/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/reducer.js +5 -1
- package/dist/document-models/billing-statement/gen/schema/types.d.ts +3 -0
- package/dist/document-models/billing-statement/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/schema/zod.d.ts +2 -1
- package/dist/document-models/billing-statement/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/billing-statement/gen/schema/zod.js +5 -0
- package/dist/document-models/billing-statement/gen/utils.js +2 -2
- package/dist/document-models/billing-statement/src/reducers/general.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/general.js +5 -4
- package/dist/document-models/billing-statement/src/reducers/line-items.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/line-items.js +7 -2
- package/dist/document-models/billing-statement/src/reducers/tags.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/tags.js +1 -1
- package/dist/document-models/billing-statement/src/tests/document-model.test.d.ts +4 -0
- package/dist/document-models/billing-statement/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/tests/document-model.test.js +94 -7
- package/dist/document-models/billing-statement/src/tests/general.test.d.ts +2 -1
- package/dist/document-models/billing-statement/src/tests/general.test.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/tests/general.test.js +33 -88
- package/dist/document-models/billing-statement/src/tests/line-items.test.js +22 -125
- package/dist/document-models/billing-statement/src/tests/tags.test.js +13 -47
- package/dist/document-models/document-models.js +2 -2
- package/dist/document-models/expense-report/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/document-model.js +48 -48
- package/dist/document-models/expense-report/gen/document-schema.d.ts +6 -6
- package/dist/document-models/expense-report/gen/utils.js +1 -1
- package/dist/document-models/expense-report/src/tests/document-model.test.d.ts +4 -0
- package/dist/document-models/expense-report/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/expense-report/src/tests/document-model.test.js +94 -8
- package/dist/document-models/expense-report/src/tests/wallet.test.js +145 -10
- package/dist/document-models/index.d.ts +2 -6
- package/dist/document-models/index.d.ts.map +1 -1
- package/dist/document-models/index.js +2 -6
- package/dist/document-models/integrations/gen/document-model.js +33 -33
- package/dist/document-models/integrations/gen/document-schema.d.ts +6 -6
- package/dist/document-models/integrations/gen/utils.js +1 -1
- package/dist/document-models/integrations/src/reducers/integrations.d.ts.map +1 -1
- package/dist/document-models/integrations/src/reducers/integrations.js +9 -32
- package/dist/document-models/integrations/src/tests/document-model.test.d.ts +4 -0
- package/dist/document-models/integrations/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/integrations/src/tests/document-model.test.js +91 -5
- package/dist/document-models/integrations/src/tests/integrations.test.js +21 -46
- package/dist/document-models/invoice/gen/document-model.js +147 -147
- package/dist/document-models/invoice/gen/document-schema.d.ts +127 -127
- package/dist/document-models/invoice/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/ph-factories.js +16 -122
- package/dist/document-models/invoice/gen/schema/types.d.ts +4 -4
- package/dist/document-models/invoice/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/schema/zod.js +4 -4
- package/dist/document-models/invoice/gen/utils.d.ts.map +1 -1
- package/dist/document-models/invoice/gen/utils.js +17 -123
- package/dist/document-models/invoice/src/reducers/general.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/general.js +34 -10
- package/dist/document-models/invoice/src/reducers/items.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/items.js +7 -7
- package/dist/document-models/invoice/src/reducers/parties.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/parties.js +96 -50
- package/dist/document-models/invoice/src/reducers/transitions.d.ts.map +1 -1
- package/dist/document-models/invoice/src/reducers/transitions.js +69 -53
- package/dist/document-models/invoice/src/tests/document-model.test.d.ts +4 -0
- package/dist/document-models/invoice/src/tests/document-model.test.d.ts.map +1 -1
- package/dist/document-models/invoice/src/tests/document-model.test.js +91 -4
- package/dist/document-models/invoice/src/tests/general.test.js +24 -26
- package/dist/document-models/invoice/src/tests/items.test.js +37 -17
- package/dist/document-models/invoice/src/tests/parties.test.js +32 -26
- package/dist/document-models/invoice/src/tests/transitions.test.js +52 -500
- package/dist/document-models/invoice/utils/statusTransitions.d.ts.map +1 -1
- package/dist/document-models/invoice/utils/statusTransitions.js +10 -10
- package/dist/editors/billing-statement/components/lineItemsTable.d.ts.map +1 -1
- package/dist/editors/billing-statement/components/lineItemsTable.js +32 -23
- package/dist/editors/billing-statement/components/objectSetTable.d.ts.map +1 -1
- package/dist/editors/billing-statement/components/objectSetTable.js +1 -2
- package/dist/editors/billing-statement/editor.d.ts +4 -0
- package/dist/editors/billing-statement/editor.d.ts.map +1 -1
- package/dist/editors/billing-statement/editor.js +34 -16
- package/dist/editors/billing-statement/lineItemTags/lineItemTags.d.ts.map +1 -1
- package/dist/editors/billing-statement/lineItemTags/lineItemTags.js +36 -37
- package/dist/editors/billing-statement/lineItemTags/tagMapping.d.ts.map +1 -1
- package/dist/editors/billing-statement/lineItemTags/tagMapping.js +28 -10
- package/dist/editors/clean-new-editor/components/CreateDocument.d.ts +6 -0
- package/dist/editors/clean-new-editor/components/CreateDocument.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/CreateDocument.js +18 -0
- package/dist/editors/clean-new-editor/components/DriveContents.d.ts +3 -0
- package/dist/editors/clean-new-editor/components/DriveContents.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/DriveContents.js +10 -0
- package/dist/editors/clean-new-editor/components/DriveExplorer.d.ts +7 -0
- package/dist/editors/clean-new-editor/components/DriveExplorer.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/DriveExplorer.js +16 -0
- package/dist/editors/clean-new-editor/components/EmptyState.d.ts +3 -0
- package/dist/editors/clean-new-editor/components/EmptyState.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/EmptyState.js +10 -0
- package/dist/editors/clean-new-editor/components/Files.d.ts +3 -0
- package/dist/editors/clean-new-editor/components/Files.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/Files.js +12 -0
- package/dist/editors/clean-new-editor/components/FolderTree.d.ts +6 -0
- package/dist/editors/clean-new-editor/components/FolderTree.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/FolderTree.js +65 -0
- package/dist/editors/clean-new-editor/components/Folders.d.ts +3 -0
- package/dist/editors/clean-new-editor/components/Folders.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/Folders.js +12 -0
- package/dist/editors/clean-new-editor/components/NavigationBreadcrumbs.d.ts +3 -0
- package/dist/editors/clean-new-editor/components/NavigationBreadcrumbs.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/components/NavigationBreadcrumbs.js +6 -0
- package/dist/editors/clean-new-editor/config.d.ts +4 -0
- package/dist/editors/clean-new-editor/config.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/config.js +5 -0
- package/dist/editors/clean-new-editor/editor.d.ts +4 -0
- package/dist/editors/clean-new-editor/editor.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/editor.js +11 -0
- package/dist/editors/clean-new-editor/module.d.ts +3 -0
- package/dist/editors/clean-new-editor/module.d.ts.map +1 -0
- package/dist/editors/clean-new-editor/module.js +10 -0
- package/dist/editors/contributor-billing/components/ConfirmationModal.d.ts +14 -0
- package/dist/editors/contributor-billing/components/ConfirmationModal.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/ConfirmationModal.js +6 -0
- package/dist/editors/contributor-billing/components/CreateDocument.d.ts +6 -0
- package/dist/editors/contributor-billing/components/CreateDocument.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/CreateDocument.js +18 -0
- package/dist/editors/contributor-billing/components/DriveContents.d.ts +3 -0
- package/dist/editors/contributor-billing/components/DriveContents.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/DriveContents.js +10 -0
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts +3 -3
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/DriveExplorer.js +13 -180
- package/dist/editors/contributor-billing/components/EmptyState.d.ts +3 -0
- package/dist/editors/contributor-billing/components/EmptyState.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/EmptyState.js +10 -0
- package/dist/editors/contributor-billing/components/Files.d.ts +3 -0
- package/dist/editors/contributor-billing/components/Files.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/Files.js +12 -0
- package/dist/editors/contributor-billing/components/FolderTree.d.ts +6 -0
- package/dist/editors/contributor-billing/components/FolderTree.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/FolderTree.js +65 -0
- package/dist/editors/contributor-billing/components/Folders.d.ts +3 -0
- package/dist/editors/contributor-billing/components/Folders.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/Folders.js +12 -0
- package/dist/editors/contributor-billing/components/HeaderControls.d.ts +38 -0
- package/dist/editors/contributor-billing/components/HeaderControls.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/HeaderControls.js +124 -0
- package/dist/editors/contributor-billing/components/HeaderStats.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/{InvoiceTable/HeaderStats.js → HeaderStats.js} +1 -1
- package/dist/editors/contributor-billing/components/InvoiceTable.d.ts +22 -0
- package/dist/editors/contributor-billing/components/InvoiceTable.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable.js +399 -0
- package/dist/editors/contributor-billing/components/InvoiceTableContainer.d.ts +6 -0
- package/dist/editors/contributor-billing/components/InvoiceTableContainer.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTableContainer.js +111 -0
- package/dist/editors/contributor-billing/components/InvoiceTableRow.d.ts +32 -0
- package/dist/editors/contributor-billing/components/InvoiceTableRow.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTableRow.js +55 -0
- package/dist/editors/contributor-billing/components/InvoiceTableSection.d.ts +13 -0
- package/dist/editors/contributor-billing/components/InvoiceTableSection.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTableSection.js +16 -0
- package/dist/editors/contributor-billing/components/NavigationBreadcrumbs.d.ts +3 -0
- package/dist/editors/contributor-billing/components/NavigationBreadcrumbs.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/NavigationBreadcrumbs.js +6 -0
- package/dist/editors/contributor-billing/config.d.ts +1 -0
- package/dist/editors/contributor-billing/config.d.ts.map +1 -1
- package/dist/editors/contributor-billing/config.js +4 -1
- package/dist/editors/contributor-billing/editor.d.ts +1 -0
- package/dist/editors/contributor-billing/editor.d.ts.map +1 -1
- package/dist/editors/contributor-billing/editor.js +4 -1
- package/dist/editors/contributor-billing/module.d.ts +1 -1
- package/dist/editors/contributor-billing/module.d.ts.map +1 -1
- package/dist/editors/contributor-billing/module.js +3 -2
- package/dist/editors/contributor-billing/utils/exchangeRate.d.ts +15 -0
- package/dist/editors/contributor-billing/utils/exchangeRate.d.ts.map +1 -0
- package/dist/editors/contributor-billing/utils/exchangeRate.js +122 -0
- package/dist/editors/editors.js +2 -2
- package/dist/editors/expense-report/components/AddBillingStatementModal.d.ts.map +1 -1
- package/dist/editors/expense-report/editor.js +8 -8
- package/dist/editors/index.d.ts +2 -2
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +2 -2
- package/dist/editors/integrations/components/EditName.d.ts +3 -0
- package/dist/editors/integrations/components/EditName.d.ts.map +1 -0
- package/dist/editors/integrations/components/EditName.js +31 -0
- package/dist/editors/integrations/editor.d.ts +2 -4
- package/dist/editors/integrations/editor.d.ts.map +1 -1
- package/dist/editors/integrations/editor.js +5 -132
- package/dist/editors/integrations/module.d.ts +1 -0
- package/dist/editors/integrations/module.d.ts.map +1 -1
- package/dist/editors/integrations/module.js +3 -2
- package/dist/editors/invoice/components/confirmationModal.js +1 -1
- package/dist/editors/invoice/components/countryForm.d.ts.map +1 -1
- package/dist/editors/invoice/components/countryForm.js +1 -1
- package/dist/editors/invoice/components/currencyForm.d.ts.map +1 -1
- package/dist/editors/invoice/components/currencyForm.js +1 -1
- package/dist/editors/invoice/components/datePicker.d.ts +1 -1
- package/dist/editors/invoice/components/datePicker.d.ts.map +1 -1
- package/dist/editors/invoice/components/datePicker.js +1 -1
- package/dist/editors/invoice/components/inputField.d.ts.map +1 -1
- package/dist/editors/invoice/components/inputField.js +3 -2
- package/dist/editors/invoice/components/lineItemMobileModal.d.ts.map +1 -1
- package/dist/editors/invoice/components/lineItemMobileModal.js +1 -1
- package/dist/editors/invoice/components/numberForm.d.ts.map +1 -1
- package/dist/editors/invoice/components/selectField.js +7 -7
- package/dist/editors/invoice/components/statusModalComponents.d.ts.map +1 -1
- package/dist/editors/invoice/components/statusModalComponents.js +27 -3
- package/dist/editors/invoice/editor.d.ts +1 -4
- package/dist/editors/invoice/editor.d.ts.map +1 -1
- package/dist/editors/invoice/editor.js +102 -40
- package/dist/editors/invoice/exportUBL.d.ts.map +1 -1
- package/dist/editors/invoice/exportUBL.js +35 -18
- package/dist/editors/invoice/ingestPDF.d.ts.map +1 -1
- package/dist/editors/invoice/ingestPDF.js +15 -9
- package/dist/editors/invoice/invoiceToGnosis.js +2 -2
- package/dist/editors/invoice/legalEntity/bankSection.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/legalEntity.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/walletSection.d.ts.map +1 -1
- package/dist/editors/invoice/legalEntity/walletSection.js +3 -3
- package/dist/editors/invoice/lineItemTags/lineItemTags.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/lineItemTags.js +1 -1
- package/dist/editors/invoice/lineItemTags/tagMobileModal.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/tagMobileModal.js +4 -3
- package/dist/editors/invoice/lineItems.d.ts.map +1 -1
- package/dist/editors/invoice/module.d.ts +1 -0
- package/dist/editors/invoice/module.d.ts.map +1 -1
- package/dist/editors/invoice/module.js +2 -1
- package/dist/editors/invoice/requestFinance.js +3 -3
- package/dist/editors/invoice/uploadPdfChunked.d.ts.map +1 -1
- package/dist/editors/invoice/uploadPdfChunked.js +4 -3
- package/dist/editors/invoice/utils/utils.d.ts.map +1 -1
- package/dist/editors/invoice/utils/utils.js +5 -4
- package/dist/editors/invoice/validation/validationHandler.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationHandler.js +11 -5
- package/dist/editors/invoice/validation/validationManager.d.ts +2 -2
- package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationManager.js +5 -5
- package/dist/editors/invoice/validation/validationRules.d.ts.map +1 -1
- package/dist/editors/invoice/validation/validationRules.js +178 -178
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/old-contributor-billing/components/DriveExplorer.d.ts +7 -0
- package/dist/old-contributor-billing/components/DriveExplorer.d.ts.map +1 -0
- package/dist/old-contributor-billing/components/DriveExplorer.js +184 -0
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +1 -0
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.d.ts +2 -0
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.d.ts.map +1 -0
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.js +73 -0
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +1 -0
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +1 -0
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +1 -0
- package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTableSection.js +1 -1
- package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/RowActionMenu.d.ts +1 -1
- package/dist/old-contributor-billing/components/InvoiceTable/RowActionMenu.d.ts.map +1 -0
- package/dist/old-contributor-billing/components/InvoiceTable/RowActionMenu.js +2 -0
- package/dist/old-contributor-billing/config.d.ts +3 -0
- package/dist/old-contributor-billing/config.d.ts.map +1 -0
- package/dist/old-contributor-billing/config.js +4 -0
- package/dist/old-contributor-billing/editor.d.ts +3 -0
- package/dist/old-contributor-billing/editor.d.ts.map +1 -0
- package/dist/old-contributor-billing/editor.js +8 -0
- package/dist/old-contributor-billing/module.d.ts +3 -0
- package/dist/old-contributor-billing/module.d.ts.map +1 -0
- package/dist/old-contributor-billing/module.js +9 -0
- package/dist/old-contributor-billing/util.d.ts.map +1 -0
- package/dist/{editors/contributor-billing → old-contributor-billing}/util.js +11 -9
- package/dist/powerhouse.manifest.json +6 -41
- package/dist/processors/index.d.ts +1 -6
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/processors/index.js +1 -18
- package/dist/scripts/contributor-billing/createExpenseReportCsv.d.ts.map +1 -1
- package/dist/scripts/contributor-billing/createExpenseReportCsv.js +24 -24
- package/dist/scripts/contributor-billing/createXeroCsv.d.ts.map +1 -1
- package/dist/scripts/contributor-billing/createXeroCsv.js +52 -46
- package/dist/scripts/invoice/autoTagging.d.ts +1 -1
- package/dist/scripts/invoice/autoTagging.d.ts.map +1 -1
- package/dist/scripts/invoice/autoTagging.js +168 -138
- package/dist/scripts/invoice/exampleBatchTxn.js +16 -16
- package/dist/scripts/invoice/gnosisTransactionBuilder.d.ts.map +1 -1
- package/dist/scripts/invoice/gnosisTransactionBuilder.js +32 -25
- package/dist/scripts/invoice/pdfToClaudeAI.d.ts.map +1 -1
- package/dist/scripts/invoice/pdfToClaudeAI.js +36 -30
- package/dist/scripts/invoice/requestFinance.d.ts.map +1 -1
- package/dist/scripts/invoice/requestFinance.js +13 -13
- package/dist/style.css +407 -13659
- package/dist/subgraphs/billing-statement/resolvers.d.ts +1 -1
- package/dist/subgraphs/billing-statement/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/billing-statement/resolvers.js +16 -5
- package/dist/subgraphs/billing-statement/schema.d.ts.map +1 -1
- package/dist/subgraphs/billing-statement/schema.js +12 -67
- package/dist/subgraphs/expense-report/resolvers.d.ts +1 -1
- package/dist/subgraphs/expense-report/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/expense-report/resolvers.js +4 -5
- package/dist/subgraphs/expense-report/schema.d.ts.map +1 -1
- package/dist/subgraphs/expense-report/schema.js +5 -48
- package/dist/subgraphs/index.d.ts +1 -0
- package/dist/subgraphs/index.d.ts.map +1 -1
- package/dist/subgraphs/index.js +1 -0
- package/dist/subgraphs/integrations/resolvers.d.ts +1 -1
- package/dist/subgraphs/integrations/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/integrations/resolvers.js +4 -5
- package/dist/subgraphs/integrations/schema.d.ts.map +1 -1
- package/dist/subgraphs/integrations/schema.js +3 -43
- package/dist/subgraphs/invoice/index.d.ts.map +1 -1
- package/dist/subgraphs/invoice/index.js +1 -20
- package/dist/subgraphs/invoice/resolvers.d.ts +1 -1
- package/dist/subgraphs/invoice/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/invoice/resolvers.js +4 -9
- package/dist/subgraphs/invoice/schema.d.ts.map +1 -1
- package/dist/subgraphs/invoice/schema.js +14 -232
- package/dist/subgraphs/{invoice → invoice-addon}/customResolvers.d.ts +1 -1
- package/dist/subgraphs/invoice-addon/customResolvers.d.ts.map +1 -0
- package/dist/subgraphs/{invoice → invoice-addon}/customResolvers.js +38 -34
- package/dist/subgraphs/invoice-addon/index.d.ts +11 -0
- package/dist/subgraphs/invoice-addon/index.d.ts.map +1 -0
- package/dist/subgraphs/invoice-addon/index.js +11 -0
- package/dist/subgraphs/invoice-addon/resolvers.d.ts +3 -0
- package/dist/subgraphs/invoice-addon/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/invoice-addon/resolvers.js +12 -0
- package/dist/subgraphs/invoice-addon/schema.d.ts +3 -0
- package/dist/subgraphs/invoice-addon/schema.d.ts.map +1 -0
- package/dist/subgraphs/invoice-addon/schema.js +52 -0
- package/package.json +9 -21
- package/dist/document-models/expense-report/gen/expense-report/actions.d.ts +0 -8
- package/dist/document-models/expense-report/gen/expense-report/actions.d.ts.map +0 -1
- package/dist/document-models/expense-report/gen/expense-report/actions.js +0 -1
- package/dist/document-models/expense-report/gen/expense-report/creators.d.ts +0 -4
- package/dist/document-models/expense-report/gen/expense-report/creators.d.ts.map +0 -1
- package/dist/document-models/expense-report/gen/expense-report/creators.js +0 -3
- package/dist/document-models/expense-report/gen/expense-report/error.d.ts +0 -2
- package/dist/document-models/expense-report/gen/expense-report/error.d.ts.map +0 -1
- package/dist/document-models/expense-report/gen/expense-report/error.js +0 -1
- package/dist/document-models/expense-report/gen/expense-report/operations.d.ts +0 -7
- package/dist/document-models/expense-report/gen/expense-report/operations.d.ts.map +0 -1
- package/dist/document-models/expense-report/gen/expense-report/operations.js +0 -3
- package/dist/document-models/expense-report/src/tests/expense-report.test.d.ts +0 -6
- package/dist/document-models/expense-report/src/tests/expense-report.test.d.ts.map +0 -1
- package/dist/document-models/expense-report/src/tests/expense-report.test.js +0 -24
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderStats.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/RowActionMenu.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTable/RowActionMenu.js +0 -2
- package/dist/editors/contributor-billing/util.d.ts.map +0 -1
- package/dist/editors/hooks/useBillingStatementDocument.d.ts +0 -4
- package/dist/editors/hooks/useBillingStatementDocument.d.ts.map +0 -1
- package/dist/editors/hooks/useBillingStatementDocument.js +0 -8
- package/dist/editors/hooks/useExpenseReportDocument.d.ts +0 -4
- package/dist/editors/hooks/useExpenseReportDocument.d.ts.map +0 -1
- package/dist/editors/hooks/useExpenseReportDocument.js +0 -8
- package/dist/editors/hooks/useIntegrationsDocument.d.ts +0 -4
- package/dist/editors/hooks/useIntegrationsDocument.d.ts.map +0 -1
- package/dist/editors/hooks/useIntegrationsDocument.js +0 -8
- package/dist/editors/hooks/useInvoiceDocument.d.ts +0 -4
- package/dist/editors/hooks/useInvoiceDocument.d.ts.map +0 -1
- package/dist/editors/hooks/useInvoiceDocument.js +0 -8
- package/dist/editors/integrations/config.d.ts +0 -3
- package/dist/editors/integrations/config.d.ts.map +0 -1
- package/dist/editors/integrations/config.js +0 -3
- package/dist/editors/invoice/exportSAFTPT.d.ts +0 -184
- package/dist/editors/invoice/exportSAFTPT.d.ts.map +0 -1
- package/dist/editors/invoice/exportSAFTPT.js +0 -548
- package/dist/processors/line-item-processor/index.d.ts +0 -11
- package/dist/processors/line-item-processor/index.d.ts.map +0 -1
- package/dist/processors/line-item-processor/index.js +0 -36
- package/dist/subgraphs/invoice/customResolvers.d.ts.map +0 -1
- package/editors/invoice/assets/custom.d.ts +0 -4
- package/editors/invoice/assets/powerhouseLogo.png +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTable/HeaderStats.d.ts → HeaderStats.d.ts} +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/HeaderControls.d.ts +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/HeaderControls.js +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTable.d.ts +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTable.js +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTableRow.d.ts +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTableRow.js +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTableSection.d.ts +0 -0
- /package/dist/{editors/contributor-billing → old-contributor-billing}/util.d.ts +0 -0
|
@@ -9,35 +9,35 @@ async function getExchangeRate(date, from, to) {
|
|
|
9
9
|
return 1;
|
|
10
10
|
// Convert crypto currencies to USD for API compatibility
|
|
11
11
|
let effectiveFrom = from;
|
|
12
|
-
if (from ===
|
|
13
|
-
effectiveFrom =
|
|
12
|
+
if (from === "DAI" || from === "USDS") {
|
|
13
|
+
effectiveFrom = "USD";
|
|
14
14
|
}
|
|
15
15
|
let effectiveTo = to;
|
|
16
|
-
if (to ===
|
|
17
|
-
effectiveTo =
|
|
16
|
+
if (to === "DAI" || to === "USDS") {
|
|
17
|
+
effectiveTo = "USD";
|
|
18
18
|
}
|
|
19
|
-
const formattedDate = date.split(
|
|
19
|
+
const formattedDate = date.split("T")[0];
|
|
20
20
|
const cacheKey = `${formattedDate}|${effectiveFrom}|${effectiveTo}`;
|
|
21
21
|
if (exchangeRateCache[cacheKey] !== undefined) {
|
|
22
22
|
return exchangeRateCache[cacheKey];
|
|
23
23
|
}
|
|
24
24
|
try {
|
|
25
25
|
const url = `https://api.frankfurter.dev/v1/${formattedDate}?base=${effectiveFrom}&symbols=${effectiveTo}`;
|
|
26
|
-
console.log(
|
|
26
|
+
console.log("Fetching from Frankfurter URL:", url);
|
|
27
27
|
const res = await fetch(url);
|
|
28
28
|
if (!res.ok) {
|
|
29
29
|
throw new Error(`Failed to fetch Frankfurter exchange rate: ${res.status} ${res.statusText}`);
|
|
30
30
|
}
|
|
31
31
|
const data = await res.json();
|
|
32
32
|
const rate = data?.rates?.[effectiveTo];
|
|
33
|
-
if (typeof rate !==
|
|
33
|
+
if (typeof rate !== "number") {
|
|
34
34
|
throw new Error(`Frankfurter exchange rate for ${effectiveFrom} to ${effectiveTo} on ${formattedDate} not found in response`);
|
|
35
35
|
}
|
|
36
36
|
exchangeRateCache[cacheKey] = rate;
|
|
37
37
|
return rate;
|
|
38
38
|
}
|
|
39
39
|
catch (err) {
|
|
40
|
-
console.error(
|
|
40
|
+
console.error("Frankfurter ForEx API error:", err);
|
|
41
41
|
return 1; // Fallback to 1:1 on error
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -56,7 +56,7 @@ export async function exportExpenseReportCSV(invoiceStates, baseCurrency) {
|
|
|
56
56
|
const invoiceName = state.name || invoiceId;
|
|
57
57
|
const items = state.lineItems || [];
|
|
58
58
|
const dateIssued = state.dateIssued;
|
|
59
|
-
const currency = state.currency ||
|
|
59
|
+
const currency = state.currency || "USD";
|
|
60
60
|
// Check if any line item is missing tags
|
|
61
61
|
const hasMissingTags = items.some((item) => {
|
|
62
62
|
return !item.lineItemTag || item.lineItemTag.length === 0;
|
|
@@ -67,8 +67,8 @@ export async function exportExpenseReportCSV(invoiceStates, baseCurrency) {
|
|
|
67
67
|
}
|
|
68
68
|
// Get exchange rate for this invoice
|
|
69
69
|
let effectiveCurrency = currency;
|
|
70
|
-
if (currency ===
|
|
71
|
-
effectiveCurrency =
|
|
70
|
+
if (currency === "DAI" || currency === "USDS") {
|
|
71
|
+
effectiveCurrency = "USD";
|
|
72
72
|
}
|
|
73
73
|
const exchangeRate = await getExchangeRate(dateIssued, effectiveCurrency, baseCurrency);
|
|
74
74
|
// Aggregate line items by tag
|
|
@@ -77,10 +77,10 @@ export async function exportExpenseReportCSV(invoiceStates, baseCurrency) {
|
|
|
77
77
|
const lineItemTotal = item.totalPriceTaxIncl || 0;
|
|
78
78
|
const convertedAmount = lineItemTotal * exchangeRate;
|
|
79
79
|
lineItemTags.forEach((tag) => {
|
|
80
|
-
const dimension = tag.dimension ||
|
|
81
|
-
const label = tag.label || tag.value ||
|
|
80
|
+
const dimension = tag.dimension || "";
|
|
81
|
+
const label = tag.label || tag.value || "Unknown";
|
|
82
82
|
// Skip accounting-period dimension
|
|
83
|
-
if (dimension ===
|
|
83
|
+
if (dimension === "accounting-period") {
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
// Aggregate by tag label in base currency
|
|
@@ -94,12 +94,12 @@ export async function exportExpenseReportCSV(invoiceStates, baseCurrency) {
|
|
|
94
94
|
// If any invoices are missing tags, throw an error
|
|
95
95
|
if (missingTagInvoices.length > 0) {
|
|
96
96
|
throw {
|
|
97
|
-
message: `The following invoices have line items missing tags: ${[...new Set(missingTagInvoices)].join(
|
|
98
|
-
missingTagInvoices: missingTagInvoices
|
|
97
|
+
message: `The following invoices have line items missing tags: ${[...new Set(missingTagInvoices)].join(", ")}`,
|
|
98
|
+
missingTagInvoices: missingTagInvoices,
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
// Create CSV headers
|
|
102
|
-
const headers = [
|
|
102
|
+
const headers = ["Tag Label", "Currency", "Total Amount"];
|
|
103
103
|
// Convert aggregated data to rows
|
|
104
104
|
const expenseRows = Object.entries(expensesByTag)
|
|
105
105
|
.sort(([labelA], [labelB]) => labelA.localeCompare(labelB))
|
|
@@ -107,15 +107,15 @@ export async function exportExpenseReportCSV(invoiceStates, baseCurrency) {
|
|
|
107
107
|
// Combine headers and data rows
|
|
108
108
|
const allRows = [headers, ...expenseRows];
|
|
109
109
|
// Convert to CSV format
|
|
110
|
-
const csvLines = allRows.map((row) => row.map((value) => `"${value}"`).join(
|
|
111
|
-
const csvData = csvLines.join(
|
|
110
|
+
const csvLines = allRows.map((row) => row.map((value) => `"${value}"`).join(","));
|
|
111
|
+
const csvData = csvLines.join("\n");
|
|
112
112
|
// Download CSV file (browser)
|
|
113
|
-
const blob = new Blob([csvData], { type:
|
|
114
|
-
const link = document.createElement(
|
|
113
|
+
const blob = new Blob([csvData], { type: "text/csv;charset=utf-8;" });
|
|
114
|
+
const link = document.createElement("a");
|
|
115
115
|
const url = URL.createObjectURL(blob);
|
|
116
|
-
link.setAttribute(
|
|
117
|
-
link.setAttribute(
|
|
118
|
-
link.style.visibility =
|
|
116
|
+
link.setAttribute("href", url);
|
|
117
|
+
link.setAttribute("download", `expense-report-by-tag-${new Date().toISOString().split("T")[0]}.csv`);
|
|
118
|
+
link.style.visibility = "hidden";
|
|
119
119
|
document.body.appendChild(link);
|
|
120
120
|
link.click();
|
|
121
121
|
document.body.removeChild(link);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createXeroCsv.d.ts","sourceRoot":"","sources":["../../../scripts/contributor-billing/createXeroCsv.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAsB,eAAe,
|
|
1
|
+
{"version":3,"file":"createXeroCsv.d.ts","sourceRoot":"","sources":["../../../scripts/contributor-billing/createXeroCsv.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,MAAM,CAAC,CAsCjB;AAED,wBAAsB,uBAAuB,CAC3C,aAAa,EAAE,GAAG,EAAE,EACpB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,GAAG,CAAC,CAsNd"}
|
|
@@ -10,10 +10,10 @@ export async function getExchangeRate(date, from, to) {
|
|
|
10
10
|
return 1;
|
|
11
11
|
// Use the invoice currency as base, CHF as symbol
|
|
12
12
|
let effectiveTo = from;
|
|
13
|
-
if (from ===
|
|
14
|
-
effectiveTo =
|
|
13
|
+
if (from === "DAI" || from === "USDS") {
|
|
14
|
+
effectiveTo = "USD";
|
|
15
15
|
}
|
|
16
|
-
const formattedDate = date.split(
|
|
16
|
+
const formattedDate = date.split("T")[0];
|
|
17
17
|
const cacheKey = `${formattedDate}|${effectiveTo}|${to}`;
|
|
18
18
|
if (exchangeRateCache[cacheKey] !== undefined) {
|
|
19
19
|
return exchangeRateCache[cacheKey];
|
|
@@ -21,60 +21,60 @@ export async function getExchangeRate(date, from, to) {
|
|
|
21
21
|
try {
|
|
22
22
|
// base=effectiveTo (invoice currency), symbols=CHF
|
|
23
23
|
const url = `https://api.frankfurter.dev/v1/${formattedDate}?base=${effectiveTo}&symbols=${to}`;
|
|
24
|
-
console.log(
|
|
24
|
+
console.log("Fetching from Frankfurter URL:", url);
|
|
25
25
|
const res = await fetch(url);
|
|
26
26
|
if (!res.ok) {
|
|
27
27
|
throw new Error(`Failed to fetch Frankfurter exchange rate: ${res.status} ${res.statusText}`);
|
|
28
28
|
}
|
|
29
29
|
const data = await res.json();
|
|
30
30
|
const rate = data?.rates?.[to];
|
|
31
|
-
if (typeof rate !==
|
|
31
|
+
if (typeof rate !== "number") {
|
|
32
32
|
throw new Error(`Frankfurter exchange rate for ${effectiveTo} to CHF on ${formattedDate} not found in response`);
|
|
33
33
|
}
|
|
34
34
|
exchangeRateCache[cacheKey] = rate;
|
|
35
35
|
return rate;
|
|
36
36
|
}
|
|
37
37
|
catch (err) {
|
|
38
|
-
console.error(
|
|
38
|
+
console.error("Frankfurter ForEx API error:", err);
|
|
39
39
|
return 1; // Fallback to 1:1 on error
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
export async function exportInvoicesToXeroCSV(invoiceStates, baseCurrency) {
|
|
43
43
|
const headers = [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
"Narration",
|
|
45
|
+
"Date",
|
|
46
|
+
"Description",
|
|
47
|
+
"AccountCode",
|
|
48
|
+
"TaxRate",
|
|
49
|
+
"Amount",
|
|
50
|
+
"TrackingName1",
|
|
51
|
+
"TrackingOption1",
|
|
52
|
+
"TrackingName2",
|
|
53
|
+
"TrackingOption2",
|
|
54
|
+
"Invoice currency",
|
|
55
|
+
"FX Rate Used",
|
|
56
56
|
];
|
|
57
57
|
const allRows = [];
|
|
58
58
|
const exportDataByInvoice = {};
|
|
59
59
|
const exportTimestamp = new Date().toISOString();
|
|
60
60
|
const missingExpenseTagInvoices = [];
|
|
61
61
|
const missingDateIssuedInvoices = [];
|
|
62
|
-
for (
|
|
62
|
+
for (const invoiceState of invoiceStates) {
|
|
63
63
|
const state = invoiceState.state.global;
|
|
64
64
|
const invoiceId = invoiceState.header.id;
|
|
65
65
|
const invoiceName = state.name || invoiceId;
|
|
66
66
|
const items = state.lineItems || [];
|
|
67
67
|
const dateIssued = state.dateIssued;
|
|
68
|
-
let datePaid = state.paymentDate ||
|
|
69
|
-
if (datePaid.includes(
|
|
70
|
-
datePaid = datePaid.split(
|
|
68
|
+
let datePaid = state.paymentDate || "";
|
|
69
|
+
if (datePaid.includes("T")) {
|
|
70
|
+
datePaid = datePaid.split("T")[0];
|
|
71
71
|
}
|
|
72
|
-
const narration = `${state.issuer?.name ||
|
|
73
|
-
const currency = state.currency ||
|
|
72
|
+
const narration = `${state.issuer?.name || "Supplier"}, invoice ${state.invoiceNo || ""}`;
|
|
73
|
+
const currency = state.currency || "USD";
|
|
74
74
|
const invoiceAmount = Number(state.totalPriceTaxIncl || 0);
|
|
75
75
|
let effectiveCurrency = currency;
|
|
76
|
-
if (currency ===
|
|
77
|
-
effectiveCurrency =
|
|
76
|
+
if (currency === "DAI" || currency === "USDS") {
|
|
77
|
+
effectiveCurrency = "USD";
|
|
78
78
|
}
|
|
79
79
|
if (!dateIssued) {
|
|
80
80
|
missingDateIssuedInvoices.push(invoiceName);
|
|
@@ -106,20 +106,23 @@ export async function exportInvoicesToXeroCSV(invoiceStates, baseCurrency) {
|
|
|
106
106
|
invoiceRows.push([
|
|
107
107
|
narration,
|
|
108
108
|
dateIssued,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
"Accounts Payable",
|
|
110
|
+
"802",
|
|
111
|
+
"Tax Exempt (0%)",
|
|
112
112
|
`-${amountAtIssue.toFixed(2)}`,
|
|
113
|
-
|
|
113
|
+
"",
|
|
114
|
+
"",
|
|
115
|
+
"",
|
|
116
|
+
"",
|
|
114
117
|
currency,
|
|
115
|
-
rateOnIssue.toString()
|
|
118
|
+
rateOnIssue.toString(),
|
|
116
119
|
]);
|
|
117
120
|
}
|
|
118
121
|
items.forEach((item) => {
|
|
119
122
|
const expenseTag = (item.lineItemTag || []).find((tag) => tag.dimension === "xero-expense-account");
|
|
120
123
|
const description = expenseTag.label;
|
|
121
|
-
const accountCode = expenseTag.value?.toString() || item.accountCode?.toString() ||
|
|
122
|
-
const taxRate =
|
|
124
|
+
const accountCode = expenseTag.value?.toString() || item.accountCode?.toString() || "";
|
|
125
|
+
const taxRate = "Tax Exempt (0%)";
|
|
123
126
|
const itemAmount = (item.totalPriceTaxIncl || 0) * rateOnIssue;
|
|
124
127
|
invoiceRows.push([
|
|
125
128
|
narration,
|
|
@@ -128,9 +131,12 @@ export async function exportInvoicesToXeroCSV(invoiceStates, baseCurrency) {
|
|
|
128
131
|
accountCode,
|
|
129
132
|
taxRate,
|
|
130
133
|
itemAmount.toFixed(2),
|
|
131
|
-
|
|
134
|
+
"",
|
|
135
|
+
"",
|
|
136
|
+
"",
|
|
137
|
+
"",
|
|
132
138
|
currency,
|
|
133
|
-
rateOnIssue.toString()
|
|
139
|
+
rateOnIssue.toString(),
|
|
134
140
|
]);
|
|
135
141
|
});
|
|
136
142
|
// --- PAYMENT DATE JOURNALS (commented out) ---
|
|
@@ -181,29 +187,29 @@ export async function exportInvoicesToXeroCSV(invoiceStates, baseCurrency) {
|
|
|
181
187
|
// Store export data for this invoice
|
|
182
188
|
exportDataByInvoice[invoiceId] = {
|
|
183
189
|
timestamp: exportTimestamp,
|
|
184
|
-
exportedLineItems: [headers, ...invoiceRows]
|
|
190
|
+
exportedLineItems: [headers, ...invoiceRows],
|
|
185
191
|
};
|
|
186
192
|
}
|
|
187
193
|
// If any invoices are missing expense tags, throw an error
|
|
188
194
|
if (missingExpenseTagInvoices.length > 0) {
|
|
189
195
|
throw {
|
|
190
|
-
message: `The following invoices have line items missing a 'xero-expense-account' tag: ${[...new Set(missingExpenseTagInvoices)].join(
|
|
191
|
-
missingExpenseTagInvoices: missingExpenseTagInvoices
|
|
196
|
+
message: `The following invoices have line items missing a 'xero-expense-account' tag: ${[...new Set(missingExpenseTagInvoices)].join(", ")}`,
|
|
197
|
+
missingExpenseTagInvoices: missingExpenseTagInvoices,
|
|
192
198
|
};
|
|
193
199
|
}
|
|
194
200
|
if (missingDateIssuedInvoices.length > 0) {
|
|
195
|
-
throw new Error(`The following invoices are missing a 'dateIssued' value: ${[...new Set(missingDateIssuedInvoices)].join(
|
|
201
|
+
throw new Error(`The following invoices are missing a 'dateIssued' value: ${[...new Set(missingDateIssuedInvoices)].join(", ")}`);
|
|
196
202
|
}
|
|
197
203
|
// Download CSV for all invoices
|
|
198
|
-
const csvLines = [headers.join(
|
|
199
|
-
const csvData = csvLines.join(
|
|
204
|
+
const csvLines = [headers.join(",")].concat(allRows.map((row) => row.map((value) => `"${value}"`).join(",")));
|
|
205
|
+
const csvData = csvLines.join("\n");
|
|
200
206
|
// Download logic (browser)
|
|
201
|
-
const blob = new Blob([csvData], { type:
|
|
202
|
-
const link = document.createElement(
|
|
207
|
+
const blob = new Blob([csvData], { type: "text/csv;charset=utf-8;" });
|
|
208
|
+
const link = document.createElement("a");
|
|
203
209
|
const url = URL.createObjectURL(blob);
|
|
204
|
-
link.setAttribute(
|
|
205
|
-
link.setAttribute(
|
|
206
|
-
link.style.visibility =
|
|
210
|
+
link.setAttribute("href", url);
|
|
211
|
+
link.setAttribute("download", `xero-invoice-export-${new Date().toISOString().split("T")[0]}.csv`);
|
|
212
|
+
link.style.visibility = "hidden";
|
|
207
213
|
document.body.appendChild(link);
|
|
208
214
|
link.click();
|
|
209
215
|
document.body.removeChild(link);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoTagging.d.ts","sourceRoot":"","sources":["../../../scripts/invoice/autoTagging.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE;QACH,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"autoTagging.d.ts","sourceRoot":"","sources":["../../../scripts/invoice/autoTagging.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE;QACH,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAwND;;GAEG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,GACd,aAAa,GAAG,IAAI,CA0DtB;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CA6E/B;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CA4BvE"}
|