arcli 2.0.0 → 2.2.0
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/CHANGELOG.md +106 -1
- package/README.md +21 -14
- package/dist/cli/arca-runtime.js +41 -0
- package/dist/cli/commands/billing-family.command.js +36 -9
- package/dist/cli/commands/billing-shortcuts.command.js +8 -2
- package/dist/cli/commands/billing.command.batch.js +28 -12
- package/dist/cli/commands/billing.command.interactive-preview.js +12 -13
- package/dist/cli/commands/billing.command.options.js +83 -39
- package/dist/cli/commands/billing.command.output.js +3 -3
- package/dist/cli/commands/billing.command.parser.js +44 -30
- package/dist/cli/commands/billing.command.pdf.js +9 -6
- package/dist/cli/commands/billing.command.shared.js +86 -49
- package/dist/cli/commands/billing.command.shortcuts.js +3 -4
- package/dist/cli/commands/completion.command.js +140 -0
- package/dist/cli/commands/config.command.js +44 -45
- package/dist/cli/commands/cuit-argument.js +10 -0
- package/dist/cli/commands/examples.command.js +0 -1
- package/dist/cli/commands/export-shortcut.command.js +19 -0
- package/dist/cli/commands/export.command.js +106 -0
- package/dist/cli/commands/export.command.options.js +140 -0
- package/dist/cli/commands/export.command.parser.js +84 -0
- package/dist/cli/commands/export.command.pdf.js +61 -0
- package/dist/cli/commands/fce-obligation.command.js +8 -16
- package/dist/cli/commands/interactive.command.js +9 -8
- package/dist/cli/commands/padron.command.js +46 -0
- package/dist/cli/commands/parameters.command.js +13 -13
- package/dist/cli/commands/pdf.command.js +17 -31
- package/dist/cli/commands/storybook.command.js +4 -4
- package/dist/cli/commands/vouchers.command.js +14 -14
- package/dist/cli/error-output.js +89 -11
- package/dist/cli/global-options.js +55 -0
- package/dist/cli/help-argv.js +0 -1
- package/dist/cli/help.js +243 -391
- package/dist/cli/ignored-global-options.js +32 -0
- package/dist/cli/index.js +12 -14
- package/dist/cli/interactive/advanced-options.js +13 -14
- package/dist/cli/interactive/config.flow.js +59 -20
- package/dist/cli/interactive/export.flow.js +263 -0
- package/dist/cli/interactive/history.flow.js +2 -3
- package/dist/cli/interactive/interactive-mode.js +63 -33
- package/dist/cli/interactive/invoice-picker.js +7 -7
- package/dist/cli/interactive/invoice.flow.js +35 -13
- package/dist/cli/interactive/note.flow.js +16 -16
- package/dist/cli/interactive/pdf.flow.js +9 -7
- package/dist/cli/interactive/prompts.js +0 -1
- package/dist/cli/interactive/receiver-padron.js +52 -0
- package/dist/cli/interactive/repeat.flow.js +10 -11
- package/dist/cli/interactive/session.js +13 -8
- package/dist/cli/interactive/status.flow.js +0 -1
- package/dist/cli/interactive/update.flow.js +0 -1
- package/dist/cli/interactive/validators.js +7 -6
- package/dist/cli/option-parsers.js +14 -4
- package/dist/cli/program.js +14 -5
- package/dist/cli/skipped-options.js +14 -0
- package/dist/cli/spinner.js +0 -1
- package/dist/cli/types.js +0 -1
- package/dist/cli/version.js +1 -2
- package/dist/index.js +0 -1
- package/dist/lib/dates/arca-date.js +3 -4
- package/dist/lib/errors/app-error.js +2 -2
- package/dist/lib/files/read-json-file.js +2 -3
- package/dist/lib/files/restrict-to-owner.js +0 -1
- package/dist/lib/files/write-new-file.js +29 -0
- package/dist/lib/identity/cuit.js +26 -0
- package/dist/lib/identity/format-cuit.js +1 -2
- package/dist/lib/links.js +2 -1
- package/dist/lib/numbers/argentine-amount.js +3 -4
- package/dist/lib/numbers/strict-integer.js +0 -1
- package/dist/lib/paths/mask-path.js +0 -1
- package/dist/lib/security/certificate.js +10 -8
- package/dist/lib/security/pem.js +2 -3
- package/dist/modules/billing/billing-response.js +16 -5
- package/dist/modules/billing/billing.amounts.js +3 -4
- package/dist/modules/billing/billing.associated-period.js +7 -8
- package/dist/modules/billing/billing.associated-vouchers.js +5 -6
- package/dist/modules/billing/billing.batch.js +12 -5
- package/dist/modules/billing/billing.constants.js +0 -1
- package/dist/modules/billing/billing.currency.js +4 -5
- package/dist/modules/billing/billing.date-range.js +27 -11
- package/dist/modules/billing/billing.display.js +14 -8
- package/dist/modules/billing/billing.errors.js +2 -3
- package/dist/modules/billing/billing.fce.js +3 -4
- package/dist/modules/billing/billing.iva-receptor.js +2 -3
- package/dist/modules/billing/billing.json-format.js +0 -1
- package/dist/modules/billing/billing.json-input.js +278 -0
- package/dist/modules/billing/billing.labels.js +1 -2
- package/dist/modules/billing/billing.mappers.js +0 -1
- package/dist/modules/billing/billing.padron.js +59 -0
- package/dist/modules/billing/billing.presenter.js +0 -1
- package/dist/modules/billing/billing.schemas.js +20 -6
- package/dist/modules/billing/billing.serialize.js +11 -15
- package/dist/modules/billing/billing.service.js +25 -4
- package/dist/modules/billing/billing.text.js +4 -13
- package/dist/modules/billing/billing.types.internal.js +0 -1
- package/dist/modules/billing/billing.types.js +0 -1
- package/dist/modules/billing/billing.validation.js +13 -11
- package/dist/modules/billing/voucher-kind-map.js +15 -16
- package/dist/modules/completion/completion.js +53 -0
- package/dist/modules/completion/completion.presenter.js +35 -0
- package/dist/modules/completion/installer.js +92 -0
- package/dist/modules/completion/shell-scripts.js +46 -0
- package/dist/modules/config/certificate-expiry.js +90 -0
- package/dist/modules/config/config-doctor.js +42 -28
- package/dist/modules/config/config-value-parser.js +32 -17
- package/dist/modules/config/config.export-credentials.js +23 -0
- package/dist/modules/config/config.presenter.js +28 -6
- package/dist/modules/config/config.schemas.js +27 -12
- package/dist/modules/config/config.sections.js +31 -11
- package/dist/modules/config/config.service.js +38 -9
- package/dist/modules/examples/examples.js +72 -37
- package/dist/modules/export/export.items.js +149 -0
- package/dist/modules/export/export.json-input.js +91 -0
- package/dist/modules/export/export.mappers.js +293 -0
- package/dist/modules/export/export.presenter.js +2 -0
- package/dist/modules/export/export.response.js +86 -0
- package/dist/modules/export/export.serialize.js +70 -0
- package/dist/modules/export/export.service.js +146 -0
- package/dist/modules/export/export.text.js +177 -0
- package/dist/modules/export/export.types.js +36 -0
- package/dist/modules/fce/fce-obligation.js +3 -4
- package/dist/modules/fce/fce-obligation.presenter.js +2 -3
- package/dist/modules/interactive/amount-input.js +0 -1
- package/dist/modules/interactive/choices.js +10 -2
- package/dist/modules/interactive/config-fields.js +17 -3
- package/dist/modules/interactive/equivalent-command.js +6 -3
- package/dist/modules/interactive/export-equivalent-command.js +40 -0
- package/dist/modules/interactive/invoice-copy.js +1 -2
- package/dist/modules/interactive/periods.js +0 -1
- package/dist/modules/interactive/wizard.js +0 -1
- package/dist/modules/padron/padron.js +23 -0
- package/dist/modules/padron/padron.presenter.js +48 -0
- package/dist/modules/parameters/health.js +0 -1
- package/dist/modules/parameters/parameters.js +2 -3
- package/dist/modules/parameters/parameters.presenter.js +14 -12
- package/dist/modules/parameters/status.js +0 -1
- package/dist/modules/pdf/pdf-data.mapper.js +94 -3
- package/dist/modules/pdf/pdf-decision.js +0 -1
- package/dist/modules/pdf/pdf-file-name.js +0 -1
- package/dist/modules/pdf/pdf-issuer.js +3 -3
- package/dist/modules/pdf/pdf-legends.js +35 -0
- package/dist/modules/pdf/pdf.errors.js +0 -1
- package/dist/modules/pdf/pdf.types.js +0 -1
- package/dist/modules/storybook/showcase-theme.js +0 -1
- package/dist/modules/storybook/showcase.js +35 -23
- package/dist/modules/update-check/changelog.js +0 -1
- package/dist/modules/update-check/update-check.presenter.js +6 -7
- package/dist/modules/update-check/update-check.service.js +0 -1
- package/dist/modules/vouchers/voucher-history.js +0 -1
- package/dist/modules/vouchers/voucher-history.presenter.js +3 -4
- package/dist/services/arca/arca-billing.gateway.js +18 -4
- package/dist/services/arca/arca-client.factory.js +27 -1
- package/dist/services/arca/arca-context.resolver.js +17 -7
- package/dist/services/arca/arca-export.gateway.js +146 -0
- package/dist/services/arca/arca-fce-obligation.gateway.js +2 -3
- package/dist/services/arca/arca-padron.gateway.js +103 -0
- package/dist/services/arca/arca-parameters.gateway.js +2 -3
- package/dist/services/arca/arca-voucher-history.gateway.js +2 -3
- package/dist/services/arca/last-voucher.js +26 -0
- package/dist/services/clipboard/clipboard.js +0 -1
- package/dist/services/pdf/escape-html.js +0 -1
- package/dist/services/pdf/pdf-browser.js +0 -1
- package/dist/services/pdf/pdf-exporter.js +26 -11
- package/dist/services/pdf/pdf-plugin.js +41 -14
- package/dist/ui/components/certificateBanner.js +8 -0
- package/dist/ui/components/contentPanel.js +0 -1
- package/dist/ui/components/errorPanel.js +0 -1
- package/dist/ui/components/index.js +1 -1
- package/dist/ui/components/keyValuePanel.js +0 -1
- package/dist/ui/components/noticePanel.js +0 -1
- package/dist/ui/components/rawPanel.js +0 -1
- package/dist/ui/components/sectionHeading.js +0 -1
- package/dist/ui/components/statusBar.js +0 -1
- package/dist/ui/components/statusPanel.js +0 -1
- package/dist/ui/components/testingBanner.js +0 -1
- package/dist/ui/index.js +0 -1
- package/dist/ui/presenters/billing.presenter.js +0 -1
- package/dist/ui/presenters/config.presenter.js +1 -2
- package/dist/ui/presenters/errors.presenter.js +14 -12
- package/dist/ui/presenters/errors.zod-presenter.js +13 -35
- package/dist/ui/presenters/export.presenter.js +1 -0
- package/dist/ui/presenters/index.js +1 -1
- package/dist/ui/presenters/pdf.presenter.js +1 -2
- package/dist/ui/presenters/showcase.presenter.js +0 -1
- package/dist/ui/primitives/index.js +0 -1
- package/dist/ui/primitives/renderDivider.js +0 -1
- package/dist/ui/primitives/renderFooter.js +0 -1
- package/dist/ui/primitives/renderJson.js +0 -1
- package/dist/ui/primitives/renderKeyValue.js +0 -1
- package/dist/ui/primitives/renderLogo.js +0 -1
- package/dist/ui/primitives/renderObject.js +0 -1
- package/dist/ui/primitives/renderPanel.js +0 -1
- package/dist/ui/primitives/renderSubtitle.js +0 -1
- package/dist/ui/primitives/renderTable.js +0 -1
- package/dist/ui/primitives/terminalWidth.js +0 -1
- package/dist/ui/primitives/text.js +0 -1
- package/dist/ui/stream/index.js +0 -1
- package/dist/ui/stream/terminal-stream.js +13 -2
- package/dist/ui/theme/index.js +0 -1
- package/dist/ui/theme/theme.js +0 -1
- package/llms.txt +122 -45
- package/package.json +1 -2
- package/dist/cli/commands/billing-family.command.d.ts +0 -2
- package/dist/cli/commands/billing-family.command.js.map +0 -1
- package/dist/cli/commands/billing-shortcuts.command.d.ts +0 -2
- package/dist/cli/commands/billing-shortcuts.command.js.map +0 -1
- package/dist/cli/commands/billing.command.batch.d.ts +0 -22
- package/dist/cli/commands/billing.command.batch.js.map +0 -1
- package/dist/cli/commands/billing.command.interactive-preview.d.ts +0 -18
- package/dist/cli/commands/billing.command.interactive-preview.js.map +0 -1
- package/dist/cli/commands/billing.command.options.d.ts +0 -2
- package/dist/cli/commands/billing.command.options.js.map +0 -1
- package/dist/cli/commands/billing.command.output.d.ts +0 -14
- package/dist/cli/commands/billing.command.output.js.map +0 -1
- package/dist/cli/commands/billing.command.parser.d.ts +0 -28
- package/dist/cli/commands/billing.command.parser.js.map +0 -1
- package/dist/cli/commands/billing.command.pdf.d.ts +0 -24
- package/dist/cli/commands/billing.command.pdf.js.map +0 -1
- package/dist/cli/commands/billing.command.shared.d.ts +0 -7
- package/dist/cli/commands/billing.command.shared.js.map +0 -1
- package/dist/cli/commands/billing.command.shortcuts.d.ts +0 -7
- package/dist/cli/commands/billing.command.shortcuts.js.map +0 -1
- package/dist/cli/commands/config.command.d.ts +0 -7
- package/dist/cli/commands/config.command.js.map +0 -1
- package/dist/cli/commands/examples.command.d.ts +0 -2
- package/dist/cli/commands/examples.command.js.map +0 -1
- package/dist/cli/commands/fce-obligation.command.d.ts +0 -2
- package/dist/cli/commands/fce-obligation.command.js.map +0 -1
- package/dist/cli/commands/interactive.command.d.ts +0 -3
- package/dist/cli/commands/interactive.command.js.map +0 -1
- package/dist/cli/commands/parameters.command.d.ts +0 -2
- package/dist/cli/commands/parameters.command.js.map +0 -1
- package/dist/cli/commands/pdf.command.d.ts +0 -2
- package/dist/cli/commands/pdf.command.js.map +0 -1
- package/dist/cli/commands/storybook.command.d.ts +0 -2
- package/dist/cli/commands/storybook.command.js.map +0 -1
- package/dist/cli/commands/vouchers.command.d.ts +0 -2
- package/dist/cli/commands/vouchers.command.js.map +0 -1
- package/dist/cli/error-output.d.ts +0 -7
- package/dist/cli/error-output.js.map +0 -1
- package/dist/cli/help-argv.d.ts +0 -5
- package/dist/cli/help-argv.js.map +0 -1
- package/dist/cli/help.d.ts +0 -12
- package/dist/cli/help.js.map +0 -1
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/interactive/advanced-options.d.ts +0 -21
- package/dist/cli/interactive/advanced-options.js.map +0 -1
- package/dist/cli/interactive/config.flow.d.ts +0 -5
- package/dist/cli/interactive/config.flow.js.map +0 -1
- package/dist/cli/interactive/history.flow.d.ts +0 -6
- package/dist/cli/interactive/history.flow.js.map +0 -1
- package/dist/cli/interactive/interactive-mode.d.ts +0 -3
- package/dist/cli/interactive/interactive-mode.js.map +0 -1
- package/dist/cli/interactive/invoice-picker.d.ts +0 -25
- package/dist/cli/interactive/invoice-picker.js.map +0 -1
- package/dist/cli/interactive/invoice.flow.d.ts +0 -20
- package/dist/cli/interactive/invoice.flow.js.map +0 -1
- package/dist/cli/interactive/note.flow.d.ts +0 -32
- package/dist/cli/interactive/note.flow.js.map +0 -1
- package/dist/cli/interactive/pdf.flow.d.ts +0 -5
- package/dist/cli/interactive/pdf.flow.js.map +0 -1
- package/dist/cli/interactive/prompts.d.ts +0 -57
- package/dist/cli/interactive/prompts.js.map +0 -1
- package/dist/cli/interactive/repeat.flow.d.ts +0 -13
- package/dist/cli/interactive/repeat.flow.js.map +0 -1
- package/dist/cli/interactive/session.d.ts +0 -22
- package/dist/cli/interactive/session.js.map +0 -1
- package/dist/cli/interactive/status.flow.d.ts +0 -3
- package/dist/cli/interactive/status.flow.js.map +0 -1
- package/dist/cli/interactive/update.flow.d.ts +0 -6
- package/dist/cli/interactive/update.flow.js.map +0 -1
- package/dist/cli/interactive/validators.d.ts +0 -9
- package/dist/cli/interactive/validators.js.map +0 -1
- package/dist/cli/option-parsers.d.ts +0 -6
- package/dist/cli/option-parsers.js.map +0 -1
- package/dist/cli/program.d.ts +0 -2
- package/dist/cli/program.js.map +0 -1
- package/dist/cli/spinner.d.ts +0 -8
- package/dist/cli/spinner.js.map +0 -1
- package/dist/cli/types.d.ts +0 -6
- package/dist/cli/types.js.map +0 -1
- package/dist/cli/version.d.ts +0 -1
- package/dist/cli/version.js.map +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/dates/arca-date.d.ts +0 -19
- package/dist/lib/dates/arca-date.js.map +0 -1
- package/dist/lib/errors/app-error.d.ts +0 -17
- package/dist/lib/errors/app-error.js.map +0 -1
- package/dist/lib/files/read-json-file.d.ts +0 -1
- package/dist/lib/files/read-json-file.js.map +0 -1
- package/dist/lib/files/restrict-to-owner.d.ts +0 -7
- package/dist/lib/files/restrict-to-owner.js.map +0 -1
- package/dist/lib/identity/format-cuit.d.ts +0 -2
- package/dist/lib/identity/format-cuit.js.map +0 -1
- package/dist/lib/links.d.ts +0 -2
- package/dist/lib/links.js.map +0 -1
- package/dist/lib/numbers/argentine-amount.d.ts +0 -23
- package/dist/lib/numbers/argentine-amount.js.map +0 -1
- package/dist/lib/numbers/strict-integer.d.ts +0 -4
- package/dist/lib/numbers/strict-integer.js.map +0 -1
- package/dist/lib/paths/mask-path.d.ts +0 -1
- package/dist/lib/paths/mask-path.js.map +0 -1
- package/dist/lib/security/certificate.d.ts +0 -7
- package/dist/lib/security/certificate.js.map +0 -1
- package/dist/lib/security/pem.d.ts +0 -5
- package/dist/lib/security/pem.js.map +0 -1
- package/dist/modules/billing/billing-response.d.ts +0 -4
- package/dist/modules/billing/billing-response.js.map +0 -1
- package/dist/modules/billing/billing.amounts.d.ts +0 -21
- package/dist/modules/billing/billing.amounts.js.map +0 -1
- package/dist/modules/billing/billing.associated-period.d.ts +0 -8
- package/dist/modules/billing/billing.associated-period.js.map +0 -1
- package/dist/modules/billing/billing.associated-vouchers.d.ts +0 -12
- package/dist/modules/billing/billing.associated-vouchers.js.map +0 -1
- package/dist/modules/billing/billing.batch.d.ts +0 -23
- package/dist/modules/billing/billing.batch.js.map +0 -1
- package/dist/modules/billing/billing.constants.d.ts +0 -2
- package/dist/modules/billing/billing.constants.js.map +0 -1
- package/dist/modules/billing/billing.currency.d.ts +0 -18
- package/dist/modules/billing/billing.currency.js.map +0 -1
- package/dist/modules/billing/billing.date-range.d.ts +0 -9
- package/dist/modules/billing/billing.date-range.js.map +0 -1
- package/dist/modules/billing/billing.display.d.ts +0 -13
- package/dist/modules/billing/billing.display.js.map +0 -1
- package/dist/modules/billing/billing.errors.d.ts +0 -12
- package/dist/modules/billing/billing.errors.js.map +0 -1
- package/dist/modules/billing/billing.fce.d.ts +0 -21
- package/dist/modules/billing/billing.fce.js.map +0 -1
- package/dist/modules/billing/billing.iva-receptor.d.ts +0 -8
- package/dist/modules/billing/billing.iva-receptor.js.map +0 -1
- package/dist/modules/billing/billing.json-format.d.ts +0 -6
- package/dist/modules/billing/billing.json-format.js.map +0 -1
- package/dist/modules/billing/billing.labels.d.ts +0 -9
- package/dist/modules/billing/billing.labels.js.map +0 -1
- package/dist/modules/billing/billing.mappers.d.ts +0 -8
- package/dist/modules/billing/billing.mappers.js.map +0 -1
- package/dist/modules/billing/billing.presenter.d.ts +0 -7
- package/dist/modules/billing/billing.presenter.js.map +0 -1
- package/dist/modules/billing/billing.schemas.d.ts +0 -142
- package/dist/modules/billing/billing.schemas.js.map +0 -1
- package/dist/modules/billing/billing.serialize.d.ts +0 -8
- package/dist/modules/billing/billing.serialize.js.map +0 -1
- package/dist/modules/billing/billing.service.d.ts +0 -27
- package/dist/modules/billing/billing.service.js.map +0 -1
- package/dist/modules/billing/billing.text.d.ts +0 -8
- package/dist/modules/billing/billing.text.js.map +0 -1
- package/dist/modules/billing/billing.types.d.ts +0 -13
- package/dist/modules/billing/billing.types.internal.d.ts +0 -30
- package/dist/modules/billing/billing.types.internal.js.map +0 -1
- package/dist/modules/billing/billing.types.js.map +0 -1
- package/dist/modules/billing/billing.validation.d.ts +0 -7
- package/dist/modules/billing/billing.validation.js.map +0 -1
- package/dist/modules/billing/voucher-kind-map.d.ts +0 -9
- package/dist/modules/billing/voucher-kind-map.js.map +0 -1
- package/dist/modules/config/config-doctor.d.ts +0 -15
- package/dist/modules/config/config-doctor.js.map +0 -1
- package/dist/modules/config/config-value-parser.d.ts +0 -2
- package/dist/modules/config/config-value-parser.js.map +0 -1
- package/dist/modules/config/config.presenter.d.ts +0 -15
- package/dist/modules/config/config.presenter.js.map +0 -1
- package/dist/modules/config/config.schemas.d.ts +0 -154
- package/dist/modules/config/config.schemas.js.map +0 -1
- package/dist/modules/config/config.sections.d.ts +0 -14
- package/dist/modules/config/config.sections.js.map +0 -1
- package/dist/modules/config/config.service.d.ts +0 -35
- package/dist/modules/config/config.service.js.map +0 -1
- package/dist/modules/examples/examples.d.ts +0 -1
- package/dist/modules/examples/examples.js.map +0 -1
- package/dist/modules/fce/fce-obligation.d.ts +0 -20
- package/dist/modules/fce/fce-obligation.js.map +0 -1
- package/dist/modules/fce/fce-obligation.presenter.d.ts +0 -9
- package/dist/modules/fce/fce-obligation.presenter.js.map +0 -1
- package/dist/modules/interactive/amount-input.d.ts +0 -4
- package/dist/modules/interactive/amount-input.js.map +0 -1
- package/dist/modules/interactive/choices.d.ts +0 -13
- package/dist/modules/interactive/choices.js.map +0 -1
- package/dist/modules/interactive/config-fields.d.ts +0 -20
- package/dist/modules/interactive/config-fields.js.map +0 -1
- package/dist/modules/interactive/equivalent-command.d.ts +0 -8
- package/dist/modules/interactive/equivalent-command.js.map +0 -1
- package/dist/modules/interactive/invoice-copy.d.ts +0 -19
- package/dist/modules/interactive/invoice-copy.js.map +0 -1
- package/dist/modules/interactive/periods.d.ts +0 -7
- package/dist/modules/interactive/periods.js.map +0 -1
- package/dist/modules/interactive/wizard.d.ts +0 -16
- package/dist/modules/interactive/wizard.js.map +0 -1
- package/dist/modules/parameters/health.d.ts +0 -17
- package/dist/modules/parameters/health.js.map +0 -1
- package/dist/modules/parameters/parameters.d.ts +0 -50
- package/dist/modules/parameters/parameters.js.map +0 -1
- package/dist/modules/parameters/parameters.presenter.d.ts +0 -12
- package/dist/modules/parameters/parameters.presenter.js.map +0 -1
- package/dist/modules/parameters/status.d.ts +0 -31
- package/dist/modules/parameters/status.js.map +0 -1
- package/dist/modules/pdf/pdf-data.mapper.d.ts +0 -4
- package/dist/modules/pdf/pdf-data.mapper.js.map +0 -1
- package/dist/modules/pdf/pdf-decision.d.ts +0 -14
- package/dist/modules/pdf/pdf-decision.js.map +0 -1
- package/dist/modules/pdf/pdf-file-name.d.ts +0 -3
- package/dist/modules/pdf/pdf-file-name.js.map +0 -1
- package/dist/modules/pdf/pdf-issuer.d.ts +0 -8
- package/dist/modules/pdf/pdf-issuer.js.map +0 -1
- package/dist/modules/pdf/pdf.errors.d.ts +0 -9
- package/dist/modules/pdf/pdf.errors.js.map +0 -1
- package/dist/modules/pdf/pdf.types.d.ts +0 -91
- package/dist/modules/pdf/pdf.types.js.map +0 -1
- package/dist/modules/storybook/showcase-theme.d.ts +0 -7
- package/dist/modules/storybook/showcase-theme.js.map +0 -1
- package/dist/modules/storybook/showcase.d.ts +0 -2
- package/dist/modules/storybook/showcase.js.map +0 -1
- package/dist/modules/update-check/changelog.d.ts +0 -23
- package/dist/modules/update-check/changelog.js.map +0 -1
- package/dist/modules/update-check/update-check.presenter.d.ts +0 -6
- package/dist/modules/update-check/update-check.presenter.js.map +0 -1
- package/dist/modules/update-check/update-check.service.d.ts +0 -11
- package/dist/modules/update-check/update-check.service.js.map +0 -1
- package/dist/modules/vouchers/voucher-history.d.ts +0 -39
- package/dist/modules/vouchers/voucher-history.js.map +0 -1
- package/dist/modules/vouchers/voucher-history.presenter.d.ts +0 -29
- package/dist/modules/vouchers/voucher-history.presenter.js.map +0 -1
- package/dist/services/arca/arca-billing.gateway.d.ts +0 -10
- package/dist/services/arca/arca-billing.gateway.js.map +0 -1
- package/dist/services/arca/arca-client.factory.d.ts +0 -5
- package/dist/services/arca/arca-client.factory.js.map +0 -1
- package/dist/services/arca/arca-context.resolver.d.ts +0 -44
- package/dist/services/arca/arca-context.resolver.js.map +0 -1
- package/dist/services/arca/arca-fce-obligation.gateway.d.ts +0 -7
- package/dist/services/arca/arca-fce-obligation.gateway.js.map +0 -1
- package/dist/services/arca/arca-parameters.gateway.d.ts +0 -10
- package/dist/services/arca/arca-parameters.gateway.js.map +0 -1
- package/dist/services/arca/arca-voucher-history.gateway.d.ts +0 -8
- package/dist/services/arca/arca-voucher-history.gateway.js.map +0 -1
- package/dist/services/clipboard/clipboard.d.ts +0 -2
- package/dist/services/clipboard/clipboard.js.map +0 -1
- package/dist/services/pdf/escape-html.d.ts +0 -6
- package/dist/services/pdf/escape-html.js.map +0 -1
- package/dist/services/pdf/pdf-browser.d.ts +0 -5
- package/dist/services/pdf/pdf-browser.js.map +0 -1
- package/dist/services/pdf/pdf-exporter.d.ts +0 -19
- package/dist/services/pdf/pdf-exporter.js.map +0 -1
- package/dist/services/pdf/pdf-plugin.d.ts +0 -50
- package/dist/services/pdf/pdf-plugin.js.map +0 -1
- package/dist/ui/components/contentPanel.d.ts +0 -5
- package/dist/ui/components/contentPanel.js.map +0 -1
- package/dist/ui/components/errorPanel.d.ts +0 -1
- package/dist/ui/components/errorPanel.js.map +0 -1
- package/dist/ui/components/index.d.ts +0 -9
- package/dist/ui/components/index.js.map +0 -1
- package/dist/ui/components/keyValuePanel.d.ts +0 -3
- package/dist/ui/components/keyValuePanel.js.map +0 -1
- package/dist/ui/components/noticePanel.d.ts +0 -3
- package/dist/ui/components/noticePanel.js.map +0 -1
- package/dist/ui/components/rawPanel.d.ts +0 -1
- package/dist/ui/components/rawPanel.js.map +0 -1
- package/dist/ui/components/sectionHeading.d.ts +0 -3
- package/dist/ui/components/sectionHeading.js.map +0 -1
- package/dist/ui/components/statusBar.d.ts +0 -19
- package/dist/ui/components/statusBar.js.map +0 -1
- package/dist/ui/components/statusPanel.d.ts +0 -3
- package/dist/ui/components/statusPanel.js.map +0 -1
- package/dist/ui/components/testingBanner.d.ts +0 -2
- package/dist/ui/components/testingBanner.js.map +0 -1
- package/dist/ui/index.d.ts +0 -5
- package/dist/ui/index.js.map +0 -1
- package/dist/ui/presenters/billing.presenter.d.ts +0 -2
- package/dist/ui/presenters/billing.presenter.js.map +0 -1
- package/dist/ui/presenters/config.presenter.d.ts +0 -1
- package/dist/ui/presenters/config.presenter.js.map +0 -1
- package/dist/ui/presenters/errors.presenter.d.ts +0 -1
- package/dist/ui/presenters/errors.presenter.js.map +0 -1
- package/dist/ui/presenters/errors.zod-presenter.d.ts +0 -4
- package/dist/ui/presenters/errors.zod-presenter.js.map +0 -1
- package/dist/ui/presenters/index.d.ts +0 -6
- package/dist/ui/presenters/index.js.map +0 -1
- package/dist/ui/presenters/pdf.presenter.d.ts +0 -13
- package/dist/ui/presenters/pdf.presenter.js.map +0 -1
- package/dist/ui/presenters/showcase.presenter.d.ts +0 -1
- package/dist/ui/presenters/showcase.presenter.js.map +0 -1
- package/dist/ui/primitives/index.d.ts +0 -10
- package/dist/ui/primitives/index.js.map +0 -1
- package/dist/ui/primitives/renderDivider.d.ts +0 -5
- package/dist/ui/primitives/renderDivider.js.map +0 -1
- package/dist/ui/primitives/renderFooter.d.ts +0 -7
- package/dist/ui/primitives/renderFooter.js.map +0 -1
- package/dist/ui/primitives/renderJson.d.ts +0 -3
- package/dist/ui/primitives/renderJson.js.map +0 -1
- package/dist/ui/primitives/renderKeyValue.d.ts +0 -14
- package/dist/ui/primitives/renderKeyValue.js.map +0 -1
- package/dist/ui/primitives/renderLogo.d.ts +0 -3
- package/dist/ui/primitives/renderLogo.js.map +0 -1
- package/dist/ui/primitives/renderObject.d.ts +0 -1
- package/dist/ui/primitives/renderObject.js.map +0 -1
- package/dist/ui/primitives/renderPanel.d.ts +0 -27
- package/dist/ui/primitives/renderPanel.js.map +0 -1
- package/dist/ui/primitives/renderSubtitle.d.ts +0 -7
- package/dist/ui/primitives/renderSubtitle.js.map +0 -1
- package/dist/ui/primitives/renderTable.d.ts +0 -6
- package/dist/ui/primitives/renderTable.js.map +0 -1
- package/dist/ui/primitives/terminalWidth.d.ts +0 -4
- package/dist/ui/primitives/terminalWidth.js.map +0 -1
- package/dist/ui/primitives/text.d.ts +0 -28
- package/dist/ui/primitives/text.js.map +0 -1
- package/dist/ui/stream/index.d.ts +0 -1
- package/dist/ui/stream/index.js.map +0 -1
- package/dist/ui/stream/terminal-stream.d.ts +0 -16
- package/dist/ui/stream/terminal-stream.js.map +0 -1
- package/dist/ui/theme/index.d.ts +0 -1
- package/dist/ui/theme/index.js.map +0 -1
- package/dist/ui/theme/theme.d.ts +0 -68
- package/dist/ui/theme/theme.js.map +0 -1
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { contentPanel, keyValuePanel, renderKeyValueRows, renderObject, renderTable, resolveKeyValueLabelWidth, statusPanel, testingBanner, toneText, } from '../../ui/index.js';
|
|
2
|
+
import { formatDateLabel, formatMoneyLabel, formatNumericLabel } from '../billing/billing.labels.js';
|
|
3
|
+
import { formatRawExportResponse } from './export.serialize.js';
|
|
4
|
+
import { EXPORT_TYPES } from './export.types.js';
|
|
5
|
+
function formatEnvironmentBanner(environment) {
|
|
6
|
+
return environment === 'testing' ? [testingBanner()] : [];
|
|
7
|
+
}
|
|
8
|
+
export function formatExportStatusBadge(result) {
|
|
9
|
+
switch (result.response.status) {
|
|
10
|
+
case 'aprobado':
|
|
11
|
+
return { label: 'APROBADO', tone: 'success' };
|
|
12
|
+
case 'rechazado':
|
|
13
|
+
return { label: 'RECHAZADO', tone: 'danger' };
|
|
14
|
+
default:
|
|
15
|
+
return { label: 'OBSERVADO', tone: 'warning' };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function formatCountry(result) {
|
|
19
|
+
const { Dst_cmp: code } = result.payload;
|
|
20
|
+
const name = result.display.countryName;
|
|
21
|
+
return name ? `${code} - ${name}` : String(code);
|
|
22
|
+
}
|
|
23
|
+
function formatExportType(result) {
|
|
24
|
+
return `${result.payload.Tipo_expo} - ${EXPORT_TYPES[result.payload.Tipo_expo]}`;
|
|
25
|
+
}
|
|
26
|
+
function formatIncoterm(result) {
|
|
27
|
+
const { Incoterms: code, Incoterms_Ds: description } = result.payload;
|
|
28
|
+
if (!code) {
|
|
29
|
+
return 'No informado';
|
|
30
|
+
}
|
|
31
|
+
// La tabla de WSFEX trae como descripcion el mismo codigo ("FOB"): no se repite.
|
|
32
|
+
return description && description.trim().toUpperCase() !== code.trim().toUpperCase()
|
|
33
|
+
? `${code} - ${description}`
|
|
34
|
+
: code;
|
|
35
|
+
}
|
|
36
|
+
/** La E casi siempre va en moneda extranjera: el importe lleva su codigo, no el `$` de los pesos. */
|
|
37
|
+
function formatAmount(result, value) {
|
|
38
|
+
const currency = result.payload.Moneda_Id;
|
|
39
|
+
const label = formatMoneyLabel(value);
|
|
40
|
+
return currency === 'PES' ? label : `${label.replace(/\$$/, '')} ${currency}`;
|
|
41
|
+
}
|
|
42
|
+
function formatLanguage(result) {
|
|
43
|
+
const { Idioma_cbte: id } = result.payload;
|
|
44
|
+
return result.display.languageName ? `${id} - ${result.display.languageName}` : String(id);
|
|
45
|
+
}
|
|
46
|
+
function formatCurrency(result) {
|
|
47
|
+
const { CanMisMonExt: sameCurrency, Moneda_Id: currency, Moneda_ctz: rate } = result.payload;
|
|
48
|
+
const label = currency === 'PES' ? `${currency} (pesos)` : `${currency}, cotización ${rate}`;
|
|
49
|
+
return sameCurrency === 'S' ? `${label} (el pago se cancela en la misma moneda)` : label;
|
|
50
|
+
}
|
|
51
|
+
function formatUnit(result, unitCode) {
|
|
52
|
+
return result.display.unitNames[unitCode] ?? String(unitCode);
|
|
53
|
+
}
|
|
54
|
+
/** Un renglon por item, con la cantidad y la unidad como etiqueta: es lo que WSFEX autoriza. */
|
|
55
|
+
function formatItemsTable(result) {
|
|
56
|
+
const items = result.payload.Items.Item;
|
|
57
|
+
if (items.length === 0) {
|
|
58
|
+
return '';
|
|
59
|
+
}
|
|
60
|
+
const rows = items.map((item) => [
|
|
61
|
+
`${item.Pro_qty} x ${item.Pro_ds} (${formatUnit(result, item.Pro_umed)})`,
|
|
62
|
+
formatAmount(result, item.Pro_total_item),
|
|
63
|
+
]);
|
|
64
|
+
const labelWidth = Math.max(...rows.map(([label]) => label.length), 0);
|
|
65
|
+
return renderTable(rows, { labelWidth }).trimEnd();
|
|
66
|
+
}
|
|
67
|
+
function formatPayloadRows(result) {
|
|
68
|
+
const { payload } = result;
|
|
69
|
+
const rows = [
|
|
70
|
+
['Cliente', payload.Cliente],
|
|
71
|
+
['CUIT del país del cliente', String(payload.Cuit_pais_cliente)],
|
|
72
|
+
['Domicilio del cliente', payload.Domicilio_cliente],
|
|
73
|
+
['País de destino', formatCountry(result)],
|
|
74
|
+
['Tipo de exportación', formatExportType(result)],
|
|
75
|
+
['Actividad', payload.Actividades.Actividad.map((activity) => activity.Id).join(', ')],
|
|
76
|
+
['Incoterm', formatIncoterm(result)],
|
|
77
|
+
['Idioma', formatLanguage(result)],
|
|
78
|
+
['Moneda', formatCurrency(result)],
|
|
79
|
+
['Forma de pago', payload.Forma_pago],
|
|
80
|
+
['Punto de venta', formatNumericLabel(payload.Punto_vta)],
|
|
81
|
+
['Número', formatNumericLabel(payload.Cbte_nro)],
|
|
82
|
+
['Fecha del comprobante', formatDateLabel(payload.Fecha_cbte)],
|
|
83
|
+
['Fecha de pago', formatDateLabel(payload.Fecha_pago)],
|
|
84
|
+
['Importe total', formatAmount(result, payload.Imp_total)],
|
|
85
|
+
];
|
|
86
|
+
if (payload.Id_impositivo) {
|
|
87
|
+
rows.splice(3, 0, ['ID impositivo del cliente', payload.Id_impositivo]);
|
|
88
|
+
}
|
|
89
|
+
const permits = payload.Permisos?.Permiso ?? [];
|
|
90
|
+
if (permits.length > 0) {
|
|
91
|
+
rows.push(['Permisos de embarque', permits.map((permit) => permit.Id_permiso).join(', ')]);
|
|
92
|
+
}
|
|
93
|
+
if (payload.Obs) {
|
|
94
|
+
rows.push(['Observaciones', payload.Obs]);
|
|
95
|
+
}
|
|
96
|
+
if (payload.Obs_comerciales) {
|
|
97
|
+
rows.push(['Observaciones comerciales', payload.Obs_comerciales]);
|
|
98
|
+
}
|
|
99
|
+
return rows;
|
|
100
|
+
}
|
|
101
|
+
export function formatExportPayloadTable(result) {
|
|
102
|
+
const rows = formatPayloadRows(result);
|
|
103
|
+
return renderTable(rows, { labelWidth: resolveKeyValueLabelWidth('ticket', rows) }).trimEnd();
|
|
104
|
+
}
|
|
105
|
+
export function formatExportPayloadPreview(result) {
|
|
106
|
+
const content = [formatExportPayloadTable(result)];
|
|
107
|
+
const items = formatItemsTable(result);
|
|
108
|
+
if (items) {
|
|
109
|
+
content.push(items);
|
|
110
|
+
}
|
|
111
|
+
const footer = result.dryRun ? toneText('SIN EMITIR', 'warning') : undefined;
|
|
112
|
+
return keyValuePanel(result.voucherKind.displayName, content, footer, 'ticket', undefined, 'ticket');
|
|
113
|
+
}
|
|
114
|
+
export function formatExportResultPanel(result, status) {
|
|
115
|
+
const summaryRows = [
|
|
116
|
+
['CAE', result.response.cae ?? 'N/D'],
|
|
117
|
+
['Vencimiento CAE', formatDateLabel(result.response.caeVencimiento ?? undefined)],
|
|
118
|
+
['Punto de venta', result.payload.Punto_vta],
|
|
119
|
+
['Número', result.payload.Cbte_nro],
|
|
120
|
+
['Importe total', formatAmount(result, result.payload.Imp_total)],
|
|
121
|
+
];
|
|
122
|
+
const countRows = [
|
|
123
|
+
['Observaciones', result.response.observaciones.length],
|
|
124
|
+
['Eventos', result.response.events.length],
|
|
125
|
+
['Errores', result.response.errors.length],
|
|
126
|
+
];
|
|
127
|
+
const labelWidth = resolveKeyValueLabelWidth('ticket', [...summaryRows, ...countRows]);
|
|
128
|
+
const rows = [
|
|
129
|
+
...renderKeyValueRows(summaryRows, { labelWidth }),
|
|
130
|
+
'',
|
|
131
|
+
...renderKeyValueRows(countRows, { labelWidth }),
|
|
132
|
+
];
|
|
133
|
+
return statusPanel(result.voucherKind.displayName, rows, toneText(status.label, status.tone), 'ticket', status.tone, 'ticket');
|
|
134
|
+
}
|
|
135
|
+
function formatObservationList(observaciones) {
|
|
136
|
+
return observaciones.map((item, index) => `${index + 1}. ${item}`).join('\n');
|
|
137
|
+
}
|
|
138
|
+
function formatWarningsPanel(result) {
|
|
139
|
+
const warnings = result.warnings ?? [];
|
|
140
|
+
if (warnings.length === 0) {
|
|
141
|
+
return [];
|
|
142
|
+
}
|
|
143
|
+
return [
|
|
144
|
+
contentPanel('Avisos', warnings.map((item) => `• ${item}`).join('\n'), 'wide', 'warning', 'left', 'attention'),
|
|
145
|
+
];
|
|
146
|
+
}
|
|
147
|
+
export function formatExportResultAsText(result, options = {}) {
|
|
148
|
+
const environmentLines = [
|
|
149
|
+
...(options.previewShown ? [] : formatEnvironmentBanner(options.environment ?? result.environment)),
|
|
150
|
+
...(options.previewShown ? [] : formatWarningsPanel(result)),
|
|
151
|
+
];
|
|
152
|
+
if (result.dryRun) {
|
|
153
|
+
return [...environmentLines, formatExportPayloadPreview(result)].join('\n\n');
|
|
154
|
+
}
|
|
155
|
+
const lines = [...environmentLines];
|
|
156
|
+
if (!options.previewShown) {
|
|
157
|
+
lines.push(formatExportPayloadPreview(result));
|
|
158
|
+
}
|
|
159
|
+
lines.push(formatExportResultPanel(result, formatExportStatusBadge(result)));
|
|
160
|
+
if (result.response.observaciones.length > 0) {
|
|
161
|
+
lines.push(contentPanel('Observaciones', formatObservationList(result.response.observaciones), 'wide', 'warning', 'left', 'attention'));
|
|
162
|
+
}
|
|
163
|
+
if (result.response.events.length > 0) {
|
|
164
|
+
lines.push(contentPanel('Eventos', renderObject(result.response.events), 'wide', 'subtle', 'left', 'data'));
|
|
165
|
+
}
|
|
166
|
+
if (result.response.errors.length > 0) {
|
|
167
|
+
lines.push(contentPanel('Errores', renderObject(result.response.errors), 'wide', 'danger', 'left', 'error'));
|
|
168
|
+
}
|
|
169
|
+
if (result.response.suggestions.length > 0) {
|
|
170
|
+
lines.push(contentPanel('Sugerencias', result.response.suggestions.map((item) => `• ${item}`).join('\n'), 'wide', 'warning', 'left', 'tip'));
|
|
171
|
+
}
|
|
172
|
+
// `--bruto` agrega la respuesta cruda al final; el resumen se muestra igual.
|
|
173
|
+
if (options.raw) {
|
|
174
|
+
lines.push(contentPanel('Respuesta bruta', renderObject(formatRawExportResponse(result)), 'wide', 'subtle', 'left', 'data'));
|
|
175
|
+
}
|
|
176
|
+
return lines.join('\n\n');
|
|
177
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WSFEX solo emite comprobantes de exportacion, asi que la letra es siempre E y el tipo de comprobante
|
|
3
|
+
* 19 (Factura E). Notas de credito y debito E quedan para mas adelante.
|
|
4
|
+
*/
|
|
5
|
+
export const EXPORT_VOUCHER_KIND = {
|
|
6
|
+
arcaType: 19,
|
|
7
|
+
displayName: 'Factura de exportación E',
|
|
8
|
+
family: 'factura',
|
|
9
|
+
letter: 'e',
|
|
10
|
+
shortcut: 'fe',
|
|
11
|
+
};
|
|
12
|
+
/** Tabla FEXGetPARAM_Tipo_Expo. */
|
|
13
|
+
export const EXPORT_TYPES = {
|
|
14
|
+
1: 'Exportación definitiva de bienes',
|
|
15
|
+
2: 'Servicios',
|
|
16
|
+
4: 'Otros',
|
|
17
|
+
};
|
|
18
|
+
export const EXPORT_TYPE_VALUES = [1, 2, 4];
|
|
19
|
+
/**
|
|
20
|
+
* Los tipos 2 (servicios) y 4 (otros) no llevan permisos de embarque: ARCA exige `Permiso_existente`
|
|
21
|
+
* vacio en esos comprobantes (error 1550).
|
|
22
|
+
*/
|
|
23
|
+
export const EXPORT_TYPES_WITHOUT_PERMITS = [2, 4];
|
|
24
|
+
/**
|
|
25
|
+
* Tipo de exportacion por defecto: la exportacion de servicios no lleva permisos de embarque ni bienes
|
|
26
|
+
* fisicos, asi que es la que menos datos pide. Los bienes van con `--tipo-expo 1`.
|
|
27
|
+
*/
|
|
28
|
+
export const DEFAULT_EXPORT_TYPE = 2;
|
|
29
|
+
/** Moneda por defecto de la factura de exportacion: en WSFEX el dolar es `DOL`. */
|
|
30
|
+
export const DEFAULT_EXPORT_CURRENCY_CODE = 'DOL';
|
|
31
|
+
/** Codigo de unidad de medida de ARCA que se usa cuando el item no indica otra. 7 = Unidad. */
|
|
32
|
+
export const DEFAULT_EXPORT_UNIT_CODE = 7;
|
|
33
|
+
/** Idioma por defecto del comprobante. 1 = Espanol. */
|
|
34
|
+
export const DEFAULT_EXPORT_LANGUAGE = 1;
|
|
35
|
+
/** Tope de numeracion de ARCA. */
|
|
36
|
+
export const MAX_EXPORT_VOUCHER_NUMBER = 99_999_999;
|
|
@@ -19,15 +19,14 @@ export function evaluateFceObligation(obligation, voucherKind, amountInPesos) {
|
|
|
19
19
|
const fceShortcut = `fce${voucherKind.letter}`;
|
|
20
20
|
if (voucherKind.family === 'factura' && requiresFce) {
|
|
21
21
|
return [
|
|
22
|
-
`El receptor
|
|
22
|
+
`El receptor está obligado a recibir FCE desde ${formatMoney(obligation.minimumAmount)} y este monto lo supera. Corresponde emitir ${fceShortcut} en lugar de ${regularShortcut}.`,
|
|
23
23
|
];
|
|
24
24
|
}
|
|
25
25
|
if (voucherKind.family === 'factura-credito-electronica' && !requiresFce) {
|
|
26
26
|
const reason = obligation.obligated
|
|
27
|
-
? `el monto es menor al
|
|
28
|
-
: 'el receptor no
|
|
27
|
+
? `el monto es menor al mínimo del régimen (${formatMoney(obligation.minimumAmount)})`
|
|
28
|
+
: 'el receptor no está obligado a recibir FCE';
|
|
29
29
|
return [`Para este comprobante ${reason}. Corresponde emitir ${regularShortcut} en lugar de ${fceShortcut}.`];
|
|
30
30
|
}
|
|
31
31
|
return [];
|
|
32
32
|
}
|
|
33
|
-
//# sourceMappingURL=fce-obligation.js.map
|
|
@@ -22,11 +22,10 @@ export function formatFceObligationAsText(report) {
|
|
|
22
22
|
['CUIT', String(report.cuit)],
|
|
23
23
|
['Fecha consultada', formatArcaDate(report.issueDate)],
|
|
24
24
|
['Obligado a recibir FCE', report.obligation.obligated ? 'si' : 'no'],
|
|
25
|
-
['Monto
|
|
25
|
+
['Monto mínimo', MONEY_FORMATTER.format(report.obligation.minimumAmount)],
|
|
26
26
|
];
|
|
27
27
|
const footer = report.obligation.obligated
|
|
28
28
|
? `Desde ese monto corresponde emitir FCE (fcea, fceb o fcec). Debajo, factura comun.`
|
|
29
29
|
: 'Corresponde emitir factura comun (fa, fb o fc).';
|
|
30
|
-
return keyValuePanel('
|
|
30
|
+
return keyValuePanel('Régimen FCE MiPyMEs', renderKeyValueRows(rows, { labelWidth: resolveKeyValueLabelWidth('standard', rows) }), footer, 'standard', undefined, 'sheet');
|
|
31
31
|
}
|
|
32
|
-
//# sourceMappingURL=fce-obligation.presenter.js.map
|
|
@@ -2,6 +2,7 @@ import { listAllowedIvaConditions } from '../billing/billing.iva-receptor.js';
|
|
|
2
2
|
import { formatIvaConditionLabel } from '../billing/billing.labels.js';
|
|
3
3
|
import { resolveBillingIvaConditionCode } from '../billing/billing.mappers.js';
|
|
4
4
|
import { VOUCHER_KIND_MAP } from '../billing/voucher-kind-map.js';
|
|
5
|
+
import { EXPORT_VOUCHER_KIND } from '../export/export.types.js';
|
|
5
6
|
const INVOICE_DESCRIPTIONS = {
|
|
6
7
|
a: 'Entre responsables inscriptos, o de RI a monotributista',
|
|
7
8
|
b: 'De responsable inscripto a consumidor final, exento u otros',
|
|
@@ -12,11 +13,19 @@ export function invoiceKindChoices() {
|
|
|
12
13
|
return INVOICE_SHORTCUTS.map((shortcut) => {
|
|
13
14
|
const definition = VOUCHER_KIND_MAP[shortcut];
|
|
14
15
|
const description = definition.isElectronicCredit
|
|
15
|
-
? 'Factura de
|
|
16
|
+
? 'Factura de Crédito Electrónica MiPyMEs, para grandes empresas'
|
|
16
17
|
: INVOICE_DESCRIPTIONS[definition.letter];
|
|
17
18
|
return { description, name: `${definition.displayName} (${shortcut})`, value: definition };
|
|
18
19
|
});
|
|
19
20
|
}
|
|
21
|
+
/** La factura E va por WSFEX y tiene su propio asistente, pero se elige en el mismo selector que A, B y C. */
|
|
22
|
+
export function exportInvoiceChoice() {
|
|
23
|
+
return {
|
|
24
|
+
description: 'A un cliente del exterior: servicios o bienes',
|
|
25
|
+
name: `${EXPORT_VOUCHER_KIND.displayName} (${EXPORT_VOUCHER_KIND.shortcut})`,
|
|
26
|
+
value: EXPORT_VOUCHER_KIND,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
20
29
|
export function noteKindChoices(kind, invoice) {
|
|
21
30
|
const prefix = kind === 'credito' ? 'nc' : 'nd';
|
|
22
31
|
const shortcut = `${prefix}${invoice.isElectronicCredit ? 'e' : ''}${invoice.letter}`;
|
|
@@ -53,4 +62,3 @@ export function ivaRateChoices() {
|
|
|
53
62
|
value: rate,
|
|
54
63
|
}));
|
|
55
64
|
}
|
|
56
|
-
//# sourceMappingURL=choices.js.map
|
|
@@ -36,6 +36,15 @@ const FIELD_DEFINITIONS = [
|
|
|
36
36
|
path: true,
|
|
37
37
|
read: (c) => c.key.produccion,
|
|
38
38
|
},
|
|
39
|
+
{ key: 'exportacion.cert.testing', path: true, read: (c) => c.exportacion?.cert.testing },
|
|
40
|
+
{ key: 'exportacion.key.testing', path: true, read: (c) => c.exportacion?.key.testing },
|
|
41
|
+
{ key: 'exportacion.cert.produccion', path: true, read: (c) => c.exportacion?.cert.produccion },
|
|
42
|
+
{ key: 'exportacion.key.produccion', path: true, read: (c) => c.exportacion?.key.produccion },
|
|
43
|
+
{
|
|
44
|
+
hint: 'código de la tabla de WSFEX, por ejemplo 620100',
|
|
45
|
+
key: 'exportacion.actividad',
|
|
46
|
+
read: (c) => c.exportacion?.actividad?.toString(),
|
|
47
|
+
},
|
|
39
48
|
{
|
|
40
49
|
hint: 'numero',
|
|
41
50
|
key: 'puntoVenta',
|
|
@@ -63,6 +72,12 @@ const FIELD_DEFINITIONS = [
|
|
|
63
72
|
},
|
|
64
73
|
{ hint: '22 digitos', key: 'cbu', read: (c) => c.cbu },
|
|
65
74
|
{ key: 'aliasCbu', read: (c) => c.aliasCbu },
|
|
75
|
+
{
|
|
76
|
+
choices: ['si', 'no'],
|
|
77
|
+
hint: 'por defecto si',
|
|
78
|
+
key: 'consultarPadron',
|
|
79
|
+
read: (c) => (c.consultarPadron === undefined ? undefined : c.consultarPadron ? 'si' : 'no'),
|
|
80
|
+
},
|
|
66
81
|
{
|
|
67
82
|
choices: ['si', 'no'],
|
|
68
83
|
key: 'verificarFce',
|
|
@@ -82,7 +97,7 @@ const FIELD_DEFINITIONS = [
|
|
|
82
97
|
key: 'emisor.inicioActividades',
|
|
83
98
|
read: (c) => date(c.emisor.inicioActividades),
|
|
84
99
|
},
|
|
85
|
-
{ key: 'emisor.iibb', read: (c) => c.emisor.iibb },
|
|
100
|
+
{ hint: 'número, o "Exento" si lo estás', key: 'emisor.iibb', read: (c) => c.emisor.iibb },
|
|
86
101
|
{
|
|
87
102
|
choices: arcliDefaultIvaConditionSchema.options,
|
|
88
103
|
key: 'emisor.condicionIva',
|
|
@@ -90,7 +105,7 @@ const FIELD_DEFINITIONS = [
|
|
|
90
105
|
},
|
|
91
106
|
{ key: 'emisor.logo', path: true, read: (c) => c.emisor.logo },
|
|
92
107
|
{
|
|
93
|
-
hint: '
|
|
108
|
+
hint: 'código de moneda, por ejemplo PES o USD',
|
|
94
109
|
key: 'moneda',
|
|
95
110
|
read: (c) => c.monedaPorDefecto,
|
|
96
111
|
},
|
|
@@ -125,4 +140,3 @@ export const REQUIRED_SETUP_KEYS = ['cuit', 'cert.testing', 'key.testing', 'punt
|
|
|
125
140
|
export function listMissingSetupKeys(config) {
|
|
126
141
|
return REQUIRED_SETUP_KEYS.filter((key) => !getConfigField(key).read(config));
|
|
127
142
|
}
|
|
128
|
-
//# sourceMappingURL=config-fields.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { formatArgentineAmountInput } from '../../lib/numbers/argentine-amount.js';
|
|
2
2
|
import { isForeignCurrency } from '../billing/billing.currency.js';
|
|
3
|
+
import { resolveBillingCurrencyCode } from '../billing/billing.mappers.js';
|
|
3
4
|
const CONCEPT_FLAGS = {
|
|
4
5
|
productos: '--cp',
|
|
5
6
|
'productos-servicios': '--csp',
|
|
@@ -64,6 +65,9 @@ export function buildEquivalentCommand(input, options) {
|
|
|
64
65
|
parts.push('--cm', formatArgentineAmountInput(input.exchangeRate));
|
|
65
66
|
}
|
|
66
67
|
}
|
|
68
|
+
else if (options.defaultCurrency && resolveBillingCurrencyCode(options.defaultCurrency) !== 'PES') {
|
|
69
|
+
parts.push('--moneda', 'ARS');
|
|
70
|
+
}
|
|
67
71
|
if (input.ivaRate)
|
|
68
72
|
parts.push('--alicuota', input.ivaRate);
|
|
69
73
|
for (const { amount, rate } of input.ivaRateAmounts ?? []) {
|
|
@@ -88,9 +92,8 @@ export function buildEquivalentCommand(input, options) {
|
|
|
88
92
|
parts.push(...associatedFlags(input));
|
|
89
93
|
if (input.cancellation)
|
|
90
94
|
parts.push('--anulacion');
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
// Siempre explicito: si la config cambia de entorno, el comando pegado sigue emitiendo donde se armo.
|
|
96
|
+
parts.push(`--${options.environment}`);
|
|
93
97
|
parts.push('--emitir');
|
|
94
98
|
return parts.join(' ');
|
|
95
99
|
}
|
|
96
|
-
//# sourceMappingURL=equivalent-command.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { formatArgentineAmountInput } from '../../lib/numbers/argentine-amount.js';
|
|
2
|
+
import { DEFAULT_EXPORT_PAYMENT_TERMS } from '../export/export.mappers.js';
|
|
3
|
+
import { DEFAULT_EXPORT_TYPE, EXPORT_VOUCHER_KIND } from '../export/export.types.js';
|
|
4
|
+
/** Comillas solo cuando hacen falta, para que se pueda pegar en bash, zsh o fish. */
|
|
5
|
+
function quote(value) {
|
|
6
|
+
return /^[\w./:,-]+$/.test(value) ? value : `"${value.replace(/(["\\$`])/g, '\\$1')}"`;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* `arcli fe` que reproduce la factura E armada por el asistente. La actividad va siempre explicita: si la config
|
|
10
|
+
* cambia, el comando pegado sigue informando la misma.
|
|
11
|
+
*/
|
|
12
|
+
export function buildExportEquivalentCommand(input, options) {
|
|
13
|
+
const parts = ['arcli', EXPORT_VOUCHER_KIND.shortcut, '-m', formatArgentineAmountInput(input.amount ?? 0)];
|
|
14
|
+
const text = (flag, value) => {
|
|
15
|
+
if (value?.trim())
|
|
16
|
+
parts.push(flag, quote(value.trim()));
|
|
17
|
+
};
|
|
18
|
+
text('--cliente', input.clientName);
|
|
19
|
+
text('--domicilio-cliente', input.clientAddress);
|
|
20
|
+
text('--pais-destino', input.destinationCountry);
|
|
21
|
+
text('--id-impositivo', input.clientTaxId);
|
|
22
|
+
if (input.exportType !== undefined && input.exportType !== DEFAULT_EXPORT_TYPE) {
|
|
23
|
+
parts.push('--tipo-expo', String(input.exportType));
|
|
24
|
+
}
|
|
25
|
+
parts.push('--actividad', String(options.activity));
|
|
26
|
+
if (input.voucherNumber !== undefined)
|
|
27
|
+
parts.push('--numero', String(input.voucherNumber));
|
|
28
|
+
text('--descripcion', input.description);
|
|
29
|
+
text('--moneda', input.currencyCode);
|
|
30
|
+
if (input.sameCurrency)
|
|
31
|
+
parts.push('--misma-moneda');
|
|
32
|
+
text('--incoterm', input.incoterm);
|
|
33
|
+
if (input.paymentTerms?.trim() && input.paymentTerms.trim() !== DEFAULT_EXPORT_PAYMENT_TERMS) {
|
|
34
|
+
text('--forma-pago', input.paymentTerms);
|
|
35
|
+
}
|
|
36
|
+
text('--fecha-pago', input.paymentDate);
|
|
37
|
+
// Siempre explicito: si la config cambia de entorno, el comando pegado sigue emitiendo donde se armo.
|
|
38
|
+
parts.push(`--${options.environment}`, '--emitir');
|
|
39
|
+
return parts.join(' ');
|
|
40
|
+
}
|
|
@@ -12,7 +12,7 @@ export function copyInvoiceAmounts(invoice, letter) {
|
|
|
12
12
|
const limitation = (invoice.taxesAmount ?? 0) > 0
|
|
13
13
|
? 'La factura tiene tributos o percepciones, que ARCLI no maneja.'
|
|
14
14
|
: discriminatesIva && invoice.netAmount > 0 && !ivaRate
|
|
15
|
-
? 'No se pudo deducir la
|
|
15
|
+
? 'No se pudo deducir la alícuota de la factura: tiene varias o una que no es estandar.'
|
|
16
16
|
: undefined;
|
|
17
17
|
return {
|
|
18
18
|
currencyCode,
|
|
@@ -23,4 +23,3 @@ export function copyInvoiceAmounts(invoice, letter) {
|
|
|
23
23
|
untaxedAmount: discriminatesIva ? invoice.untaxedAmount || undefined : undefined,
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
//# sourceMappingURL=invoice-copy.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Impuestos del padron que definen la condicion frente al IVA. */
|
|
2
|
+
export const PADRON_TAX_IDS = {
|
|
3
|
+
iva: 30,
|
|
4
|
+
ivaExento: 32,
|
|
5
|
+
monotributo: 20,
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Condicion IVA a partir de los impuestos activos: monotributo, IVA (responsable inscripto) o IVA exento. Con
|
|
9
|
+
* otros datos (por ejemplo, una persona sin impuestos) no se adivina: devuelve null.
|
|
10
|
+
*/
|
|
11
|
+
export function deriveIvaCondition(input) {
|
|
12
|
+
const isActive = (id) => input.taxes.some((tax) => tax.id === id && tax.active);
|
|
13
|
+
if (input.monotributo || isActive(PADRON_TAX_IDS.monotributo)) {
|
|
14
|
+
return 'responsable-monotributo';
|
|
15
|
+
}
|
|
16
|
+
if (isActive(PADRON_TAX_IDS.iva)) {
|
|
17
|
+
return 'responsable-inscripto';
|
|
18
|
+
}
|
|
19
|
+
if (isActive(PADRON_TAX_IDS.ivaExento)) {
|
|
20
|
+
return 'sujeto-exento';
|
|
21
|
+
}
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { keyValuePanel, renderKeyValueRows, resolveKeyValueLabelWidth } from '../../ui/index.js';
|
|
2
|
+
import { formatIvaConditionName } from '../pdf/pdf-issuer.js';
|
|
3
|
+
const PERSON_TYPE_LABELS = {
|
|
4
|
+
fisica: 'Persona fisica',
|
|
5
|
+
juridica: 'Persona jurídica',
|
|
6
|
+
};
|
|
7
|
+
/** La primera es la principal (`orden` 1 en ARCA); el resto va en el JSON. */
|
|
8
|
+
function formatMainActivity(taxpayer) {
|
|
9
|
+
const [main, ...others] = taxpayer.activities;
|
|
10
|
+
const more = others.length === 0 ? '' : ` (y ${others.length} más)`;
|
|
11
|
+
return `${main?.description ?? '-'}${more}`;
|
|
12
|
+
}
|
|
13
|
+
export function formatPadronAsJson(report) {
|
|
14
|
+
const { taxpayer } = report;
|
|
15
|
+
return JSON.stringify({
|
|
16
|
+
actividades: taxpayer.activities.map((activity) => ({ descripcion: activity.description, id: activity.id })),
|
|
17
|
+
avisos: taxpayer.notices,
|
|
18
|
+
categoriaMonotributo: taxpayer.monotributoCategory,
|
|
19
|
+
condicionIva: taxpayer.ivaCondition,
|
|
20
|
+
cuit: taxpayer.cuit,
|
|
21
|
+
domicilio: taxpayer.address,
|
|
22
|
+
entorno: report.environment,
|
|
23
|
+
estadoClave: taxpayer.keyStatus,
|
|
24
|
+
impuestos: taxpayer.taxes.map((tax) => ({ activo: tax.active, descripcion: tax.description, id: tax.id })),
|
|
25
|
+
nombre: taxpayer.name,
|
|
26
|
+
tipoPersona: taxpayer.personType,
|
|
27
|
+
}, null, 2);
|
|
28
|
+
}
|
|
29
|
+
export function formatPadronAsText(report) {
|
|
30
|
+
const { taxpayer } = report;
|
|
31
|
+
const activeTaxes = taxpayer.taxes.filter((tax) => tax.active).map((tax) => tax.description);
|
|
32
|
+
const rows = [
|
|
33
|
+
['CUIT', String(taxpayer.cuit)],
|
|
34
|
+
['Nombre', taxpayer.name ?? '-'],
|
|
35
|
+
['Tipo', taxpayer.personType ? PERSON_TYPE_LABELS[taxpayer.personType] : '-'],
|
|
36
|
+
['Estado', taxpayer.keyStatus ?? '-'],
|
|
37
|
+
['Domicilio fiscal', taxpayer.address ?? '-'],
|
|
38
|
+
['Condición IVA', taxpayer.ivaCondition ? formatIvaConditionName(taxpayer.ivaCondition) : 'sin informar'],
|
|
39
|
+
...(taxpayer.monotributoCategory ? [['Categoría monotributo', taxpayer.monotributoCategory]] : []),
|
|
40
|
+
...(activeTaxes.length > 0 ? [['Impuestos', activeTaxes.join(', ')]] : []),
|
|
41
|
+
...(taxpayer.activities.length > 0 ? [['Actividad principal', formatMainActivity(taxpayer)]] : []),
|
|
42
|
+
...taxpayer.notices.map((notice) => ['Aviso de ARCA', notice]),
|
|
43
|
+
];
|
|
44
|
+
const footer = taxpayer.ivaCondition
|
|
45
|
+
? `Con --cuit ${taxpayer.cuit}, arcli completa solo el IVA receptor.`
|
|
46
|
+
: 'El padrón no informa la condición IVA: indicala con --ir al facturar.';
|
|
47
|
+
return keyValuePanel('Padrón de ARCA', renderKeyValueRows(rows, { labelWidth: resolveKeyValueLabelWidth('standard', rows, [25, 75]) }), footer, 'standard', undefined, 'sheet');
|
|
48
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputValidationError } from '../../lib/errors/app-error.js';
|
|
2
2
|
/** Tablas de referencia de ARCA (wsfe) que se pueden consultar con `arcli parametros <tabla>`. */
|
|
3
3
|
export const PARAMETER_TABLES = {
|
|
4
|
-
alicuotas: '
|
|
4
|
+
alicuotas: 'Alícuotas de IVA',
|
|
5
5
|
comprobantes: 'Tipos de comprobante',
|
|
6
6
|
conceptos: 'Conceptos',
|
|
7
7
|
documentos: 'Tipos de documento',
|
|
@@ -17,7 +17,7 @@ export function resolveParameterTable(value) {
|
|
|
17
17
|
if (normalized in PARAMETER_TABLES) {
|
|
18
18
|
return normalized;
|
|
19
19
|
}
|
|
20
|
-
throw new InputValidationError(`La tabla "${value}" no existe.
|
|
20
|
+
throw new InputValidationError(`La tabla "${value}" no existe. Usá una de estas: ${PARAMETER_TABLE_NAMES.join(', ')}, o "cotizacion <moneda>".`);
|
|
21
21
|
}
|
|
22
22
|
/** ARCA devuelve tambien valores dados de baja: solo quedan los vigentes a `today` (yyyymmdd). */
|
|
23
23
|
export function filterCurrentEntries(entries, today) {
|
|
@@ -31,4 +31,3 @@ export function salesPointToEntry(point) {
|
|
|
31
31
|
validTo: point.closedOn,
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
//# sourceMappingURL=parameters.js.map
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { formatArcaDateAsArgentineDate } from '../../lib/dates/arca-date.js';
|
|
2
|
+
import { POINT_OF_SALE_GUIDE_URL } from '../../lib/links.js';
|
|
2
3
|
import { keyValuePanel, noticePanel, renderKeyValueRows, resolveKeyValueLabelWidth } from '../../ui/index.js';
|
|
3
4
|
import { PARAMETER_TABLE_NAMES, PARAMETER_TABLES, } from './parameters.js';
|
|
4
5
|
export function formatParameterTablesAsText() {
|
|
5
6
|
const rows = PARAMETER_TABLE_NAMES.map((name) => [name, PARAMETER_TABLES[name]]);
|
|
6
|
-
const allRows = [...rows, ['
|
|
7
|
+
const allRows = [...rows, ['cotización <moneda>', 'Cotización oficial de ARCA, por ejemplo USD']];
|
|
7
8
|
return keyValuePanel('Tablas de ARCA', renderKeyValueRows(allRows, { labelWidth: resolveKeyValueLabelWidth('standard', allRows, [30, 70]) }), 'Uso: arcli parametros <tabla>', 'standard', undefined, 'sheet');
|
|
8
9
|
}
|
|
9
10
|
export function formatParameterTablesAsJson() {
|
|
10
11
|
return JSON.stringify({
|
|
11
12
|
tablas: [
|
|
12
13
|
...PARAMETER_TABLE_NAMES.map((name) => ({ descripcion: PARAMETER_TABLES[name], tabla: name })),
|
|
13
|
-
{ descripcion: '
|
|
14
|
+
{ descripcion: 'Cotización oficial de ARCA', tabla: 'cotizacion' },
|
|
14
15
|
],
|
|
15
16
|
}, null, 2);
|
|
16
17
|
}
|
|
17
18
|
export function formatParameterEntriesAsText(table, entries, environment) {
|
|
18
19
|
if (entries.length === 0) {
|
|
19
20
|
const reason = table === 'puntos-venta' && environment === 'testing'
|
|
20
|
-
? 'En testing ARCA no informa puntos de venta: cualquier
|
|
21
|
-
: `ARCA no
|
|
21
|
+
? 'En testing ARCA no informa puntos de venta: cualquier número sirve para probar.'
|
|
22
|
+
: `ARCA no devolvió valores para ${PARAMETER_TABLES[table].toLowerCase()}.`;
|
|
22
23
|
return noticePanel(reason, 'muted');
|
|
23
24
|
}
|
|
24
25
|
const idWidth = Math.max(...entries.map((entry) => entry.id.length));
|
|
@@ -40,10 +41,10 @@ export function formatParameterEntriesAsJson(table, entries, environment) {
|
|
|
40
41
|
export function formatQuotationAsText(quotation, environment) {
|
|
41
42
|
const rows = [
|
|
42
43
|
['Moneda', quotation.currency],
|
|
43
|
-
['
|
|
44
|
+
['Cotización', new Intl.NumberFormat('es-AR', { maximumFractionDigits: 6 }).format(quotation.rate)],
|
|
44
45
|
['Fecha', quotation.date ? formatArcaDateAsArgentineDate(quotation.date) : 'N/D'],
|
|
45
46
|
];
|
|
46
|
-
return keyValuePanel(`
|
|
47
|
+
return keyValuePanel(`Cotización oficial · ${environment}`, renderKeyValueRows(rows, { labelWidth: resolveKeyValueLabelWidth('standard', rows, [30, 70]) }), undefined, 'standard', undefined, 'sheet');
|
|
47
48
|
}
|
|
48
49
|
export function formatQuotationAsJson(quotation, environment) {
|
|
49
50
|
return JSON.stringify({ cotizacion: quotation.rate, entorno: environment, fecha: quotation.date ?? null, moneda: quotation.currency }, null, 2);
|
|
@@ -57,7 +58,7 @@ function describePointOfSale(check, number) {
|
|
|
57
58
|
case 'de-baja':
|
|
58
59
|
return `${number} dado de baja`;
|
|
59
60
|
case 'no-encontrado':
|
|
60
|
-
return `${number} no
|
|
61
|
+
return `${number} no está habilitado para web service en este CUIT`;
|
|
61
62
|
case 'sin-datos':
|
|
62
63
|
return `${number} (en testing ARCA no informa puntos de venta)`;
|
|
63
64
|
case 'sin-configurar':
|
|
@@ -67,7 +68,7 @@ function describePointOfSale(check, number) {
|
|
|
67
68
|
export function formatStatusAsText(report) {
|
|
68
69
|
const rows = [
|
|
69
70
|
['Entorno', report.environment],
|
|
70
|
-
['Servidor de
|
|
71
|
+
['Servidor de aplicación', report.servers.app],
|
|
71
72
|
['Base de datos', report.servers.db],
|
|
72
73
|
['Autenticacion', report.servers.auth],
|
|
73
74
|
['Tiempo de respuesta', `${report.latencyMs} ms`],
|
|
@@ -76,10 +77,12 @@ export function formatStatusAsText(report) {
|
|
|
76
77
|
const footer = report.ready
|
|
77
78
|
? 'ARCA responde: se puede emitir'
|
|
78
79
|
: report.pointOfSale.kind === 'sin-configurar'
|
|
79
|
-
? '
|
|
80
|
+
? 'Configurá el punto de venta: arcli config establecer puntoVenta <numero>'
|
|
80
81
|
: report.pointOfSale.kind === 'habilitado' || report.pointOfSale.kind === 'sin-datos'
|
|
81
|
-
? 'ARCA tiene problemas:
|
|
82
|
-
:
|
|
82
|
+
? 'ARCA tiene problemas: esperá unos minutos y reintentá'
|
|
83
|
+
: report.pointOfSale.kind === 'no-encontrado'
|
|
84
|
+
? `Revisá el punto de venta: arcli parametros puntos-venta. Los de "Factura en línea" no sirven; para crear uno para web service: ${POINT_OF_SALE_GUIDE_URL}`
|
|
85
|
+
: 'Revisá el punto de venta: arcli parametros puntos-venta';
|
|
83
86
|
return keyValuePanel('Estado de ARCA', renderKeyValueRows(rows, { labelWidth: resolveKeyValueLabelWidth('standard', rows, [30, 70]) }), footer, 'standard', report.ready ? 'success' : 'warning', 'sheet');
|
|
84
87
|
}
|
|
85
88
|
export function formatStatusAsJson(report) {
|
|
@@ -100,4 +103,3 @@ export function formatStatusAsJson(report) {
|
|
|
100
103
|
},
|
|
101
104
|
}, null, 2);
|
|
102
105
|
}
|
|
103
|
-
//# sourceMappingURL=parameters.presenter.js.map
|