arcli 2.1.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (539) hide show
  1. package/CHANGELOG.md +67 -1
  2. package/README.md +37 -2
  3. package/dist/cli/arca-runtime.js +0 -1
  4. package/dist/cli/commands/billing-family.command.js +36 -9
  5. package/dist/cli/commands/billing-shortcuts.command.js +8 -2
  6. package/dist/cli/commands/billing.command.batch.js +0 -1
  7. package/dist/cli/commands/billing.command.interactive-preview.js +9 -13
  8. package/dist/cli/commands/billing.command.options.js +83 -39
  9. package/dist/cli/commands/billing.command.output.js +0 -1
  10. package/dist/cli/commands/billing.command.parser.js +18 -17
  11. package/dist/cli/commands/billing.command.pdf.js +9 -6
  12. package/dist/cli/commands/billing.command.shared.js +2 -2
  13. package/dist/cli/commands/billing.command.shortcuts.js +3 -4
  14. package/dist/cli/commands/completion.command.js +140 -0
  15. package/dist/cli/commands/config.command.js +9 -10
  16. package/dist/cli/commands/cuit-argument.js +6 -6
  17. package/dist/cli/commands/examples.command.js +0 -1
  18. package/dist/cli/commands/export-shortcut.command.js +19 -0
  19. package/dist/cli/commands/export.command.js +106 -0
  20. package/dist/cli/commands/export.command.options.js +140 -0
  21. package/dist/cli/commands/export.command.parser.js +84 -0
  22. package/dist/cli/commands/export.command.pdf.js +61 -0
  23. package/dist/cli/commands/fce-obligation.command.js +2 -3
  24. package/dist/cli/commands/interactive.command.js +2 -3
  25. package/dist/cli/commands/padron.command.js +5 -6
  26. package/dist/cli/commands/parameters.command.js +5 -6
  27. package/dist/cli/commands/pdf.command.js +1 -2
  28. package/dist/cli/commands/storybook.command.js +4 -4
  29. package/dist/cli/commands/vouchers.command.js +9 -9
  30. package/dist/cli/error-output.js +21 -3
  31. package/dist/cli/global-options.js +2 -3
  32. package/dist/cli/help-argv.js +0 -1
  33. package/dist/cli/help.js +186 -380
  34. package/dist/cli/ignored-global-options.js +1 -2
  35. package/dist/cli/index.js +5 -3
  36. package/dist/cli/interactive/advanced-options.js +13 -14
  37. package/dist/cli/interactive/config.flow.js +55 -17
  38. package/dist/cli/interactive/export.flow.js +263 -0
  39. package/dist/cli/interactive/history.flow.js +2 -3
  40. package/dist/cli/interactive/interactive-mode.js +16 -17
  41. package/dist/cli/interactive/invoice-picker.js +7 -7
  42. package/dist/cli/interactive/invoice.flow.js +32 -11
  43. package/dist/cli/interactive/note.flow.js +12 -13
  44. package/dist/cli/interactive/pdf.flow.js +9 -7
  45. package/dist/cli/interactive/prompts.js +0 -1
  46. package/dist/cli/interactive/receiver-padron.js +3 -4
  47. package/dist/cli/interactive/repeat.flow.js +7 -8
  48. package/dist/cli/interactive/session.js +9 -7
  49. package/dist/cli/interactive/status.flow.js +0 -1
  50. package/dist/cli/interactive/update.flow.js +0 -1
  51. package/dist/cli/interactive/validators.js +7 -6
  52. package/dist/cli/option-parsers.js +14 -4
  53. package/dist/cli/program.js +6 -3
  54. package/dist/cli/skipped-options.js +14 -0
  55. package/dist/cli/spinner.js +0 -1
  56. package/dist/cli/types.js +0 -1
  57. package/dist/cli/version.js +1 -2
  58. package/dist/index.js +0 -1
  59. package/dist/lib/dates/arca-date.js +3 -4
  60. package/dist/lib/errors/app-error.js +0 -1
  61. package/dist/lib/files/read-json-file.js +2 -3
  62. package/dist/lib/files/restrict-to-owner.js +0 -1
  63. package/dist/lib/files/write-new-file.js +0 -1
  64. package/dist/lib/identity/cuit.js +26 -0
  65. package/dist/lib/identity/format-cuit.js +1 -2
  66. package/dist/lib/links.js +0 -1
  67. package/dist/lib/numbers/argentine-amount.js +3 -4
  68. package/dist/lib/numbers/strict-integer.js +0 -1
  69. package/dist/lib/paths/mask-path.js +0 -1
  70. package/dist/lib/security/certificate.js +0 -1
  71. package/dist/lib/security/pem.js +2 -3
  72. package/dist/modules/billing/billing-response.js +6 -7
  73. package/dist/modules/billing/billing.amounts.js +3 -4
  74. package/dist/modules/billing/billing.associated-period.js +7 -8
  75. package/dist/modules/billing/billing.associated-vouchers.js +5 -6
  76. package/dist/modules/billing/billing.batch.js +7 -6
  77. package/dist/modules/billing/billing.constants.js +0 -1
  78. package/dist/modules/billing/billing.currency.js +4 -5
  79. package/dist/modules/billing/billing.date-range.js +1 -2
  80. package/dist/modules/billing/billing.display.js +10 -8
  81. package/dist/modules/billing/billing.errors.js +2 -3
  82. package/dist/modules/billing/billing.fce.js +3 -4
  83. package/dist/modules/billing/billing.iva-receptor.js +2 -3
  84. package/dist/modules/billing/billing.json-format.js +0 -1
  85. package/dist/modules/billing/billing.json-input.js +5 -6
  86. package/dist/modules/billing/billing.labels.js +1 -2
  87. package/dist/modules/billing/billing.mappers.js +0 -1
  88. package/dist/modules/billing/billing.padron.js +9 -5
  89. package/dist/modules/billing/billing.presenter.js +0 -1
  90. package/dist/modules/billing/billing.schemas.js +14 -6
  91. package/dist/modules/billing/billing.serialize.js +6 -3
  92. package/dist/modules/billing/billing.service.js +4 -4
  93. package/dist/modules/billing/billing.text.js +0 -1
  94. package/dist/modules/billing/billing.types.internal.js +0 -1
  95. package/dist/modules/billing/billing.types.js +0 -1
  96. package/dist/modules/billing/billing.validation.js +13 -11
  97. package/dist/modules/billing/voucher-kind-map.js +15 -16
  98. package/dist/modules/completion/completion.js +53 -0
  99. package/dist/modules/completion/completion.presenter.js +35 -0
  100. package/dist/modules/completion/installer.js +92 -0
  101. package/dist/modules/completion/shell-scripts.js +46 -0
  102. package/dist/modules/config/certificate-expiry.js +3 -4
  103. package/dist/modules/config/config-doctor.js +36 -14
  104. package/dist/modules/config/config-value-parser.js +29 -16
  105. package/dist/modules/config/config.export-credentials.js +23 -0
  106. package/dist/modules/config/config.presenter.js +22 -6
  107. package/dist/modules/config/config.schemas.js +24 -12
  108. package/dist/modules/config/config.sections.js +26 -11
  109. package/dist/modules/config/config.service.js +6 -2
  110. package/dist/modules/examples/examples.js +44 -10
  111. package/dist/modules/export/export.items.js +149 -0
  112. package/dist/modules/export/export.json-input.js +91 -0
  113. package/dist/modules/export/export.mappers.js +293 -0
  114. package/dist/modules/export/export.presenter.js +2 -0
  115. package/dist/modules/export/export.response.js +86 -0
  116. package/dist/modules/export/export.serialize.js +70 -0
  117. package/dist/modules/export/export.service.js +146 -0
  118. package/dist/modules/export/export.text.js +177 -0
  119. package/dist/modules/export/export.types.js +36 -0
  120. package/dist/modules/fce/fce-obligation.js +3 -4
  121. package/dist/modules/fce/fce-obligation.presenter.js +2 -3
  122. package/dist/modules/interactive/amount-input.js +0 -1
  123. package/dist/modules/interactive/choices.js +10 -2
  124. package/dist/modules/interactive/config-fields.js +11 -3
  125. package/dist/modules/interactive/equivalent-command.js +4 -1
  126. package/dist/modules/interactive/export-equivalent-command.js +40 -0
  127. package/dist/modules/interactive/invoice-copy.js +1 -2
  128. package/dist/modules/interactive/periods.js +0 -1
  129. package/dist/modules/interactive/wizard.js +0 -1
  130. package/dist/modules/padron/padron.js +0 -1
  131. package/dist/modules/padron/padron.presenter.js +6 -7
  132. package/dist/modules/parameters/health.js +0 -1
  133. package/dist/modules/parameters/parameters.js +2 -3
  134. package/dist/modules/parameters/parameters.presenter.js +12 -13
  135. package/dist/modules/parameters/status.js +0 -1
  136. package/dist/modules/pdf/pdf-data.mapper.js +94 -3
  137. package/dist/modules/pdf/pdf-decision.js +0 -1
  138. package/dist/modules/pdf/pdf-file-name.js +0 -1
  139. package/dist/modules/pdf/pdf-issuer.js +3 -3
  140. package/dist/modules/pdf/pdf-legends.js +35 -0
  141. package/dist/modules/pdf/pdf.errors.js +0 -1
  142. package/dist/modules/pdf/pdf.types.js +0 -1
  143. package/dist/modules/storybook/showcase-theme.js +0 -1
  144. package/dist/modules/storybook/showcase.js +20 -21
  145. package/dist/modules/update-check/changelog.js +0 -1
  146. package/dist/modules/update-check/update-check.presenter.js +6 -7
  147. package/dist/modules/update-check/update-check.service.js +0 -1
  148. package/dist/modules/vouchers/voucher-history.js +0 -1
  149. package/dist/modules/vouchers/voucher-history.presenter.js +3 -4
  150. package/dist/services/arca/arca-billing.gateway.js +4 -5
  151. package/dist/services/arca/arca-client.factory.js +23 -2
  152. package/dist/services/arca/arca-context.resolver.js +5 -6
  153. package/dist/services/arca/arca-export.gateway.js +146 -0
  154. package/dist/services/arca/arca-fce-obligation.gateway.js +2 -3
  155. package/dist/services/arca/arca-padron.gateway.js +1 -2
  156. package/dist/services/arca/arca-parameters.gateway.js +2 -3
  157. package/dist/services/arca/arca-voucher-history.gateway.js +2 -3
  158. package/dist/services/arca/last-voucher.js +26 -0
  159. package/dist/services/clipboard/clipboard.js +0 -1
  160. package/dist/services/pdf/escape-html.js +0 -1
  161. package/dist/services/pdf/pdf-browser.js +0 -1
  162. package/dist/services/pdf/pdf-exporter.js +15 -2
  163. package/dist/services/pdf/pdf-plugin.js +45 -16
  164. package/dist/ui/components/certificateBanner.js +0 -1
  165. package/dist/ui/components/contentPanel.js +0 -1
  166. package/dist/ui/components/errorPanel.js +0 -1
  167. package/dist/ui/components/index.js +0 -1
  168. package/dist/ui/components/keyValuePanel.js +0 -1
  169. package/dist/ui/components/noticePanel.js +0 -1
  170. package/dist/ui/components/rawPanel.js +0 -1
  171. package/dist/ui/components/sectionHeading.js +0 -1
  172. package/dist/ui/components/statusBar.js +0 -1
  173. package/dist/ui/components/statusPanel.js +0 -1
  174. package/dist/ui/components/testingBanner.js +0 -1
  175. package/dist/ui/index.js +0 -1
  176. package/dist/ui/presenters/billing.presenter.js +0 -1
  177. package/dist/ui/presenters/config.presenter.js +0 -1
  178. package/dist/ui/presenters/errors.presenter.js +10 -11
  179. package/dist/ui/presenters/errors.zod-presenter.js +8 -9
  180. package/dist/ui/presenters/export.presenter.js +1 -0
  181. package/dist/ui/presenters/index.js +1 -1
  182. package/dist/ui/presenters/pdf.presenter.js +1 -2
  183. package/dist/ui/presenters/showcase.presenter.js +0 -1
  184. package/dist/ui/primitives/index.js +0 -1
  185. package/dist/ui/primitives/renderDivider.js +0 -1
  186. package/dist/ui/primitives/renderFooter.js +0 -1
  187. package/dist/ui/primitives/renderJson.js +0 -1
  188. package/dist/ui/primitives/renderKeyValue.js +0 -1
  189. package/dist/ui/primitives/renderLogo.js +0 -1
  190. package/dist/ui/primitives/renderObject.js +0 -1
  191. package/dist/ui/primitives/renderPanel.js +0 -1
  192. package/dist/ui/primitives/renderSubtitle.js +0 -1
  193. package/dist/ui/primitives/renderTable.js +0 -1
  194. package/dist/ui/primitives/terminalWidth.js +0 -1
  195. package/dist/ui/primitives/text.js +0 -1
  196. package/dist/ui/stream/index.js +0 -1
  197. package/dist/ui/stream/terminal-stream.js +0 -1
  198. package/dist/ui/theme/index.js +0 -1
  199. package/dist/ui/theme/theme.js +0 -1
  200. package/llms.txt +64 -5
  201. package/package.json +1 -2
  202. package/dist/cli/arca-runtime.d.ts +0 -20
  203. package/dist/cli/arca-runtime.js.map +0 -1
  204. package/dist/cli/commands/billing-family.command.d.ts +0 -2
  205. package/dist/cli/commands/billing-family.command.js.map +0 -1
  206. package/dist/cli/commands/billing-shortcuts.command.d.ts +0 -2
  207. package/dist/cli/commands/billing-shortcuts.command.js.map +0 -1
  208. package/dist/cli/commands/billing.command.batch.d.ts +0 -32
  209. package/dist/cli/commands/billing.command.batch.js.map +0 -1
  210. package/dist/cli/commands/billing.command.interactive-preview.d.ts +0 -18
  211. package/dist/cli/commands/billing.command.interactive-preview.js.map +0 -1
  212. package/dist/cli/commands/billing.command.options.d.ts +0 -2
  213. package/dist/cli/commands/billing.command.options.js.map +0 -1
  214. package/dist/cli/commands/billing.command.output.d.ts +0 -18
  215. package/dist/cli/commands/billing.command.output.js.map +0 -1
  216. package/dist/cli/commands/billing.command.parser.d.ts +0 -35
  217. package/dist/cli/commands/billing.command.parser.js.map +0 -1
  218. package/dist/cli/commands/billing.command.pdf.d.ts +0 -24
  219. package/dist/cli/commands/billing.command.pdf.js.map +0 -1
  220. package/dist/cli/commands/billing.command.shared.d.ts +0 -26
  221. package/dist/cli/commands/billing.command.shared.js.map +0 -1
  222. package/dist/cli/commands/billing.command.shortcuts.d.ts +0 -7
  223. package/dist/cli/commands/billing.command.shortcuts.js.map +0 -1
  224. package/dist/cli/commands/config.command.d.ts +0 -6
  225. package/dist/cli/commands/config.command.js.map +0 -1
  226. package/dist/cli/commands/cuit-argument.d.ts +0 -2
  227. package/dist/cli/commands/cuit-argument.js.map +0 -1
  228. package/dist/cli/commands/examples.command.d.ts +0 -2
  229. package/dist/cli/commands/examples.command.js.map +0 -1
  230. package/dist/cli/commands/fce-obligation.command.d.ts +0 -2
  231. package/dist/cli/commands/fce-obligation.command.js.map +0 -1
  232. package/dist/cli/commands/interactive.command.d.ts +0 -3
  233. package/dist/cli/commands/interactive.command.js.map +0 -1
  234. package/dist/cli/commands/padron.command.d.ts +0 -2
  235. package/dist/cli/commands/padron.command.js.map +0 -1
  236. package/dist/cli/commands/parameters.command.d.ts +0 -2
  237. package/dist/cli/commands/parameters.command.js.map +0 -1
  238. package/dist/cli/commands/pdf.command.d.ts +0 -2
  239. package/dist/cli/commands/pdf.command.js.map +0 -1
  240. package/dist/cli/commands/storybook.command.d.ts +0 -2
  241. package/dist/cli/commands/storybook.command.js.map +0 -1
  242. package/dist/cli/commands/vouchers.command.d.ts +0 -2
  243. package/dist/cli/commands/vouchers.command.js.map +0 -1
  244. package/dist/cli/error-output.d.ts +0 -25
  245. package/dist/cli/error-output.js.map +0 -1
  246. package/dist/cli/global-options.d.ts +0 -26
  247. package/dist/cli/global-options.js.map +0 -1
  248. package/dist/cli/help-argv.d.ts +0 -5
  249. package/dist/cli/help-argv.js.map +0 -1
  250. package/dist/cli/help.d.ts +0 -14
  251. package/dist/cli/help.js.map +0 -1
  252. package/dist/cli/ignored-global-options.d.ts +0 -6
  253. package/dist/cli/ignored-global-options.js.map +0 -1
  254. package/dist/cli/index.d.ts +0 -2
  255. package/dist/cli/index.js.map +0 -1
  256. package/dist/cli/interactive/advanced-options.d.ts +0 -21
  257. package/dist/cli/interactive/advanced-options.js.map +0 -1
  258. package/dist/cli/interactive/config.flow.d.ts +0 -4
  259. package/dist/cli/interactive/config.flow.js.map +0 -1
  260. package/dist/cli/interactive/history.flow.d.ts +0 -6
  261. package/dist/cli/interactive/history.flow.js.map +0 -1
  262. package/dist/cli/interactive/interactive-mode.d.ts +0 -3
  263. package/dist/cli/interactive/interactive-mode.js.map +0 -1
  264. package/dist/cli/interactive/invoice-picker.d.ts +0 -25
  265. package/dist/cli/interactive/invoice-picker.js.map +0 -1
  266. package/dist/cli/interactive/invoice.flow.d.ts +0 -22
  267. package/dist/cli/interactive/invoice.flow.js.map +0 -1
  268. package/dist/cli/interactive/note.flow.d.ts +0 -34
  269. package/dist/cli/interactive/note.flow.js.map +0 -1
  270. package/dist/cli/interactive/pdf.flow.d.ts +0 -5
  271. package/dist/cli/interactive/pdf.flow.js.map +0 -1
  272. package/dist/cli/interactive/prompts.d.ts +0 -57
  273. package/dist/cli/interactive/prompts.js.map +0 -1
  274. package/dist/cli/interactive/receiver-padron.d.ts +0 -29
  275. package/dist/cli/interactive/receiver-padron.js.map +0 -1
  276. package/dist/cli/interactive/repeat.flow.d.ts +0 -13
  277. package/dist/cli/interactive/repeat.flow.js.map +0 -1
  278. package/dist/cli/interactive/session.d.ts +0 -22
  279. package/dist/cli/interactive/session.js.map +0 -1
  280. package/dist/cli/interactive/status.flow.d.ts +0 -3
  281. package/dist/cli/interactive/status.flow.js.map +0 -1
  282. package/dist/cli/interactive/update.flow.d.ts +0 -6
  283. package/dist/cli/interactive/update.flow.js.map +0 -1
  284. package/dist/cli/interactive/validators.d.ts +0 -9
  285. package/dist/cli/interactive/validators.js.map +0 -1
  286. package/dist/cli/option-parsers.d.ts +0 -6
  287. package/dist/cli/option-parsers.js.map +0 -1
  288. package/dist/cli/program.d.ts +0 -6
  289. package/dist/cli/program.js.map +0 -1
  290. package/dist/cli/spinner.d.ts +0 -8
  291. package/dist/cli/spinner.js.map +0 -1
  292. package/dist/cli/types.d.ts +0 -6
  293. package/dist/cli/types.js.map +0 -1
  294. package/dist/cli/version.d.ts +0 -1
  295. package/dist/cli/version.js.map +0 -1
  296. package/dist/index.d.ts +0 -1
  297. package/dist/index.js.map +0 -1
  298. package/dist/lib/dates/arca-date.d.ts +0 -19
  299. package/dist/lib/dates/arca-date.js.map +0 -1
  300. package/dist/lib/errors/app-error.d.ts +0 -17
  301. package/dist/lib/errors/app-error.js.map +0 -1
  302. package/dist/lib/files/read-json-file.d.ts +0 -1
  303. package/dist/lib/files/read-json-file.js.map +0 -1
  304. package/dist/lib/files/restrict-to-owner.d.ts +0 -7
  305. package/dist/lib/files/restrict-to-owner.js.map +0 -1
  306. package/dist/lib/files/write-new-file.d.ts +0 -5
  307. package/dist/lib/files/write-new-file.js.map +0 -1
  308. package/dist/lib/identity/format-cuit.d.ts +0 -2
  309. package/dist/lib/identity/format-cuit.js.map +0 -1
  310. package/dist/lib/links.d.ts +0 -4
  311. package/dist/lib/links.js.map +0 -1
  312. package/dist/lib/numbers/argentine-amount.d.ts +0 -23
  313. package/dist/lib/numbers/argentine-amount.js.map +0 -1
  314. package/dist/lib/numbers/strict-integer.d.ts +0 -4
  315. package/dist/lib/numbers/strict-integer.js.map +0 -1
  316. package/dist/lib/paths/mask-path.d.ts +0 -1
  317. package/dist/lib/paths/mask-path.js.map +0 -1
  318. package/dist/lib/security/certificate.d.ts +0 -11
  319. package/dist/lib/security/certificate.js.map +0 -1
  320. package/dist/lib/security/pem.d.ts +0 -5
  321. package/dist/lib/security/pem.js.map +0 -1
  322. package/dist/modules/billing/billing-response.d.ts +0 -4
  323. package/dist/modules/billing/billing-response.js.map +0 -1
  324. package/dist/modules/billing/billing.amounts.d.ts +0 -21
  325. package/dist/modules/billing/billing.amounts.js.map +0 -1
  326. package/dist/modules/billing/billing.associated-period.d.ts +0 -8
  327. package/dist/modules/billing/billing.associated-period.js.map +0 -1
  328. package/dist/modules/billing/billing.associated-vouchers.d.ts +0 -12
  329. package/dist/modules/billing/billing.associated-vouchers.js.map +0 -1
  330. package/dist/modules/billing/billing.batch.d.ts +0 -23
  331. package/dist/modules/billing/billing.batch.js.map +0 -1
  332. package/dist/modules/billing/billing.constants.d.ts +0 -2
  333. package/dist/modules/billing/billing.constants.js.map +0 -1
  334. package/dist/modules/billing/billing.currency.d.ts +0 -18
  335. package/dist/modules/billing/billing.currency.js.map +0 -1
  336. package/dist/modules/billing/billing.date-range.d.ts +0 -9
  337. package/dist/modules/billing/billing.date-range.js.map +0 -1
  338. package/dist/modules/billing/billing.display.d.ts +0 -13
  339. package/dist/modules/billing/billing.display.js.map +0 -1
  340. package/dist/modules/billing/billing.errors.d.ts +0 -12
  341. package/dist/modules/billing/billing.errors.js.map +0 -1
  342. package/dist/modules/billing/billing.fce.d.ts +0 -21
  343. package/dist/modules/billing/billing.fce.js.map +0 -1
  344. package/dist/modules/billing/billing.iva-receptor.d.ts +0 -8
  345. package/dist/modules/billing/billing.iva-receptor.js.map +0 -1
  346. package/dist/modules/billing/billing.json-format.d.ts +0 -6
  347. package/dist/modules/billing/billing.json-format.js.map +0 -1
  348. package/dist/modules/billing/billing.json-input.d.ts +0 -58
  349. package/dist/modules/billing/billing.json-input.js.map +0 -1
  350. package/dist/modules/billing/billing.labels.d.ts +0 -9
  351. package/dist/modules/billing/billing.labels.js.map +0 -1
  352. package/dist/modules/billing/billing.mappers.d.ts +0 -8
  353. package/dist/modules/billing/billing.mappers.js.map +0 -1
  354. package/dist/modules/billing/billing.padron.d.ts +0 -14
  355. package/dist/modules/billing/billing.padron.js.map +0 -1
  356. package/dist/modules/billing/billing.presenter.d.ts +0 -7
  357. package/dist/modules/billing/billing.presenter.js.map +0 -1
  358. package/dist/modules/billing/billing.schemas.d.ts +0 -147
  359. package/dist/modules/billing/billing.schemas.js.map +0 -1
  360. package/dist/modules/billing/billing.serialize.d.ts +0 -9
  361. package/dist/modules/billing/billing.serialize.js.map +0 -1
  362. package/dist/modules/billing/billing.service.d.ts +0 -30
  363. package/dist/modules/billing/billing.service.js.map +0 -1
  364. package/dist/modules/billing/billing.text.d.ts +0 -8
  365. package/dist/modules/billing/billing.text.js.map +0 -1
  366. package/dist/modules/billing/billing.types.d.ts +0 -13
  367. package/dist/modules/billing/billing.types.internal.d.ts +0 -38
  368. package/dist/modules/billing/billing.types.internal.js.map +0 -1
  369. package/dist/modules/billing/billing.types.js.map +0 -1
  370. package/dist/modules/billing/billing.validation.d.ts +0 -7
  371. package/dist/modules/billing/billing.validation.js.map +0 -1
  372. package/dist/modules/billing/voucher-kind-map.d.ts +0 -9
  373. package/dist/modules/billing/voucher-kind-map.js.map +0 -1
  374. package/dist/modules/config/certificate-expiry.d.ts +0 -42
  375. package/dist/modules/config/certificate-expiry.js.map +0 -1
  376. package/dist/modules/config/config-doctor.d.ts +0 -16
  377. package/dist/modules/config/config-doctor.js.map +0 -1
  378. package/dist/modules/config/config-value-parser.d.ts +0 -2
  379. package/dist/modules/config/config-value-parser.js.map +0 -1
  380. package/dist/modules/config/config.presenter.d.ts +0 -17
  381. package/dist/modules/config/config.presenter.js.map +0 -1
  382. package/dist/modules/config/config.schemas.d.ts +0 -156
  383. package/dist/modules/config/config.schemas.js.map +0 -1
  384. package/dist/modules/config/config.sections.d.ts +0 -14
  385. package/dist/modules/config/config.sections.js.map +0 -1
  386. package/dist/modules/config/config.service.d.ts +0 -35
  387. package/dist/modules/config/config.service.js.map +0 -1
  388. package/dist/modules/examples/examples.d.ts +0 -6
  389. package/dist/modules/examples/examples.js.map +0 -1
  390. package/dist/modules/fce/fce-obligation.d.ts +0 -20
  391. package/dist/modules/fce/fce-obligation.js.map +0 -1
  392. package/dist/modules/fce/fce-obligation.presenter.d.ts +0 -9
  393. package/dist/modules/fce/fce-obligation.presenter.js.map +0 -1
  394. package/dist/modules/interactive/amount-input.d.ts +0 -4
  395. package/dist/modules/interactive/amount-input.js.map +0 -1
  396. package/dist/modules/interactive/choices.d.ts +0 -13
  397. package/dist/modules/interactive/choices.js.map +0 -1
  398. package/dist/modules/interactive/config-fields.d.ts +0 -20
  399. package/dist/modules/interactive/config-fields.js.map +0 -1
  400. package/dist/modules/interactive/equivalent-command.d.ts +0 -8
  401. package/dist/modules/interactive/equivalent-command.js.map +0 -1
  402. package/dist/modules/interactive/invoice-copy.d.ts +0 -19
  403. package/dist/modules/interactive/invoice-copy.js.map +0 -1
  404. package/dist/modules/interactive/periods.d.ts +0 -7
  405. package/dist/modules/interactive/periods.js.map +0 -1
  406. package/dist/modules/interactive/wizard.d.ts +0 -16
  407. package/dist/modules/interactive/wizard.js.map +0 -1
  408. package/dist/modules/padron/padron.d.ts +0 -46
  409. package/dist/modules/padron/padron.js.map +0 -1
  410. package/dist/modules/padron/padron.presenter.d.ts +0 -7
  411. package/dist/modules/padron/padron.presenter.js.map +0 -1
  412. package/dist/modules/parameters/health.d.ts +0 -17
  413. package/dist/modules/parameters/health.js.map +0 -1
  414. package/dist/modules/parameters/parameters.d.ts +0 -50
  415. package/dist/modules/parameters/parameters.js.map +0 -1
  416. package/dist/modules/parameters/parameters.presenter.d.ts +0 -12
  417. package/dist/modules/parameters/parameters.presenter.js.map +0 -1
  418. package/dist/modules/parameters/status.d.ts +0 -31
  419. package/dist/modules/parameters/status.js.map +0 -1
  420. package/dist/modules/pdf/pdf-data.mapper.d.ts +0 -4
  421. package/dist/modules/pdf/pdf-data.mapper.js.map +0 -1
  422. package/dist/modules/pdf/pdf-decision.d.ts +0 -14
  423. package/dist/modules/pdf/pdf-decision.js.map +0 -1
  424. package/dist/modules/pdf/pdf-file-name.d.ts +0 -3
  425. package/dist/modules/pdf/pdf-file-name.js.map +0 -1
  426. package/dist/modules/pdf/pdf-issuer.d.ts +0 -8
  427. package/dist/modules/pdf/pdf-issuer.js.map +0 -1
  428. package/dist/modules/pdf/pdf.errors.d.ts +0 -9
  429. package/dist/modules/pdf/pdf.errors.js.map +0 -1
  430. package/dist/modules/pdf/pdf.types.d.ts +0 -91
  431. package/dist/modules/pdf/pdf.types.js.map +0 -1
  432. package/dist/modules/storybook/showcase-theme.d.ts +0 -7
  433. package/dist/modules/storybook/showcase-theme.js.map +0 -1
  434. package/dist/modules/storybook/showcase.d.ts +0 -2
  435. package/dist/modules/storybook/showcase.js.map +0 -1
  436. package/dist/modules/update-check/changelog.d.ts +0 -23
  437. package/dist/modules/update-check/changelog.js.map +0 -1
  438. package/dist/modules/update-check/update-check.presenter.d.ts +0 -6
  439. package/dist/modules/update-check/update-check.presenter.js.map +0 -1
  440. package/dist/modules/update-check/update-check.service.d.ts +0 -11
  441. package/dist/modules/update-check/update-check.service.js.map +0 -1
  442. package/dist/modules/vouchers/voucher-history.d.ts +0 -39
  443. package/dist/modules/vouchers/voucher-history.js.map +0 -1
  444. package/dist/modules/vouchers/voucher-history.presenter.d.ts +0 -29
  445. package/dist/modules/vouchers/voucher-history.presenter.js.map +0 -1
  446. package/dist/services/arca/arca-billing.gateway.d.ts +0 -16
  447. package/dist/services/arca/arca-billing.gateway.js.map +0 -1
  448. package/dist/services/arca/arca-client.factory.d.ts +0 -6
  449. package/dist/services/arca/arca-client.factory.js.map +0 -1
  450. package/dist/services/arca/arca-context.resolver.d.ts +0 -55
  451. package/dist/services/arca/arca-context.resolver.js.map +0 -1
  452. package/dist/services/arca/arca-fce-obligation.gateway.d.ts +0 -7
  453. package/dist/services/arca/arca-fce-obligation.gateway.js.map +0 -1
  454. package/dist/services/arca/arca-padron.gateway.d.ts +0 -9
  455. package/dist/services/arca/arca-padron.gateway.js.map +0 -1
  456. package/dist/services/arca/arca-parameters.gateway.d.ts +0 -10
  457. package/dist/services/arca/arca-parameters.gateway.js.map +0 -1
  458. package/dist/services/arca/arca-voucher-history.gateway.d.ts +0 -8
  459. package/dist/services/arca/arca-voucher-history.gateway.js.map +0 -1
  460. package/dist/services/clipboard/clipboard.d.ts +0 -2
  461. package/dist/services/clipboard/clipboard.js.map +0 -1
  462. package/dist/services/pdf/escape-html.d.ts +0 -6
  463. package/dist/services/pdf/escape-html.js.map +0 -1
  464. package/dist/services/pdf/pdf-browser.d.ts +0 -5
  465. package/dist/services/pdf/pdf-browser.js.map +0 -1
  466. package/dist/services/pdf/pdf-exporter.d.ts +0 -22
  467. package/dist/services/pdf/pdf-exporter.js.map +0 -1
  468. package/dist/services/pdf/pdf-plugin.d.ts +0 -50
  469. package/dist/services/pdf/pdf-plugin.js.map +0 -1
  470. package/dist/ui/components/certificateBanner.d.ts +0 -11
  471. package/dist/ui/components/certificateBanner.js.map +0 -1
  472. package/dist/ui/components/contentPanel.d.ts +0 -5
  473. package/dist/ui/components/contentPanel.js.map +0 -1
  474. package/dist/ui/components/errorPanel.d.ts +0 -1
  475. package/dist/ui/components/errorPanel.js.map +0 -1
  476. package/dist/ui/components/index.d.ts +0 -10
  477. package/dist/ui/components/index.js.map +0 -1
  478. package/dist/ui/components/keyValuePanel.d.ts +0 -3
  479. package/dist/ui/components/keyValuePanel.js.map +0 -1
  480. package/dist/ui/components/noticePanel.d.ts +0 -3
  481. package/dist/ui/components/noticePanel.js.map +0 -1
  482. package/dist/ui/components/rawPanel.d.ts +0 -1
  483. package/dist/ui/components/rawPanel.js.map +0 -1
  484. package/dist/ui/components/sectionHeading.d.ts +0 -3
  485. package/dist/ui/components/sectionHeading.js.map +0 -1
  486. package/dist/ui/components/statusBar.d.ts +0 -19
  487. package/dist/ui/components/statusBar.js.map +0 -1
  488. package/dist/ui/components/statusPanel.d.ts +0 -3
  489. package/dist/ui/components/statusPanel.js.map +0 -1
  490. package/dist/ui/components/testingBanner.d.ts +0 -2
  491. package/dist/ui/components/testingBanner.js.map +0 -1
  492. package/dist/ui/index.d.ts +0 -5
  493. package/dist/ui/index.js.map +0 -1
  494. package/dist/ui/presenters/billing.presenter.d.ts +0 -2
  495. package/dist/ui/presenters/billing.presenter.js.map +0 -1
  496. package/dist/ui/presenters/config.presenter.d.ts +0 -1
  497. package/dist/ui/presenters/config.presenter.js.map +0 -1
  498. package/dist/ui/presenters/errors.presenter.d.ts +0 -1
  499. package/dist/ui/presenters/errors.presenter.js.map +0 -1
  500. package/dist/ui/presenters/errors.zod-presenter.d.ts +0 -4
  501. package/dist/ui/presenters/errors.zod-presenter.js.map +0 -1
  502. package/dist/ui/presenters/index.d.ts +0 -6
  503. package/dist/ui/presenters/index.js.map +0 -1
  504. package/dist/ui/presenters/pdf.presenter.d.ts +0 -13
  505. package/dist/ui/presenters/pdf.presenter.js.map +0 -1
  506. package/dist/ui/presenters/showcase.presenter.d.ts +0 -1
  507. package/dist/ui/presenters/showcase.presenter.js.map +0 -1
  508. package/dist/ui/primitives/index.d.ts +0 -10
  509. package/dist/ui/primitives/index.js.map +0 -1
  510. package/dist/ui/primitives/renderDivider.d.ts +0 -5
  511. package/dist/ui/primitives/renderDivider.js.map +0 -1
  512. package/dist/ui/primitives/renderFooter.d.ts +0 -7
  513. package/dist/ui/primitives/renderFooter.js.map +0 -1
  514. package/dist/ui/primitives/renderJson.d.ts +0 -3
  515. package/dist/ui/primitives/renderJson.js.map +0 -1
  516. package/dist/ui/primitives/renderKeyValue.d.ts +0 -14
  517. package/dist/ui/primitives/renderKeyValue.js.map +0 -1
  518. package/dist/ui/primitives/renderLogo.d.ts +0 -3
  519. package/dist/ui/primitives/renderLogo.js.map +0 -1
  520. package/dist/ui/primitives/renderObject.d.ts +0 -1
  521. package/dist/ui/primitives/renderObject.js.map +0 -1
  522. package/dist/ui/primitives/renderPanel.d.ts +0 -27
  523. package/dist/ui/primitives/renderPanel.js.map +0 -1
  524. package/dist/ui/primitives/renderSubtitle.d.ts +0 -7
  525. package/dist/ui/primitives/renderSubtitle.js.map +0 -1
  526. package/dist/ui/primitives/renderTable.d.ts +0 -6
  527. package/dist/ui/primitives/renderTable.js.map +0 -1
  528. package/dist/ui/primitives/terminalWidth.d.ts +0 -4
  529. package/dist/ui/primitives/terminalWidth.js.map +0 -1
  530. package/dist/ui/primitives/text.d.ts +0 -28
  531. package/dist/ui/primitives/text.js.map +0 -1
  532. package/dist/ui/stream/index.d.ts +0 -1
  533. package/dist/ui/stream/index.js.map +0 -1
  534. package/dist/ui/stream/terminal-stream.d.ts +0 -21
  535. package/dist/ui/stream/terminal-stream.js.map +0 -1
  536. package/dist/ui/theme/index.d.ts +0 -1
  537. package/dist/ui/theme/index.js.map +0 -1
  538. package/dist/ui/theme/theme.d.ts +0 -68
  539. package/dist/ui/theme/theme.js.map +0 -1
@@ -0,0 +1,14 @@
1
+ /**
2
+ * `arcli factura <letra>` comparte un solo comando para A, B, C y E, asi que acepta los flags de todas las letras.
3
+ * Los que se pasaron y no aplican a la letra elegida no cortan la ejecucion: se saltean con un aviso.
4
+ */
5
+ export function findPassedOptions(command, options) {
6
+ return options
7
+ .filter((option) => command.getOptionValueSource(option.attributeName()) === 'cli')
8
+ .map((option) => option.long ?? option.short ?? option.flags);
9
+ }
10
+ export function formatSkippedOptionsWarning(flags, voucherLabel) {
11
+ return flags.length === 1
12
+ ? `${flags[0]} no aplica a ${voucherLabel} y se salteó.`
13
+ : `Estos flags no aplican a ${voucherLabel} y se saltearon: ${flags.join(', ')}.`;
14
+ }
@@ -11,4 +11,3 @@ export function startSpinner(text) {
11
11
  }
12
12
  return ora({ discardStdin: false, text }).start();
13
13
  }
14
- //# sourceMappingURL=spinner.js.map
package/dist/cli/types.js CHANGED
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=types.js.map
@@ -1,2 +1 @@
1
- export const CLI_VERSION = '2.1.0';
2
- //# sourceMappingURL=version.js.map
1
+ export const CLI_VERSION = '2.2.1';
package/dist/index.js CHANGED
@@ -1,2 +1 @@
1
1
  import './cli/index.js';
2
- //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { InputValidationError } from '../errors/app-error.js';
2
- const ARGENTINE_DATE_FORMAT_HINT = 'Use D, DD, D-MM, D/MM, D-MM-YY, D/MM/YY, D-MM-YYYY o D/MM/YYYY.';
2
+ const ARGENTINE_DATE_FORMAT_HINT = 'Usá D, DD, D-MM, D/MM, D-MM-YY, D/MM/YY, D-MM-YYYY o D/MM/YYYY.';
3
3
  const ARGENTINE_DATE_PARTS = new Intl.DateTimeFormat('en-CA', {
4
4
  day: '2-digit',
5
5
  month: '2-digit',
@@ -38,7 +38,7 @@ export function parseArgentineDateInputAsArcaDate(value, referenceDate = new Dat
38
38
  const normalizedValue = value.trim();
39
39
  const dateMatch = /^(\d{1,2})(?:([-/])(\d{1,2})(?:\2(\d{2}|\d{4}))?)?$/.exec(normalizedValue);
40
40
  if (!dateMatch) {
41
- throw new InputValidationError(`La fecha "${value}" no es valida. ${ARGENTINE_DATE_FORMAT_HINT}`);
41
+ throw new InputValidationError(`La fecha "${value}" no es válida. ${ARGENTINE_DATE_FORMAT_HINT}`);
42
42
  }
43
43
  const [, rawDay, , rawMonth, explicitYear] = dateMatch;
44
44
  const today = toArgentineCalendarDate(referenceDate);
@@ -49,7 +49,7 @@ export function parseArgentineDateInputAsArcaDate(value, referenceDate = new Dat
49
49
  if (date.getUTCFullYear() !== Number(year) ||
50
50
  date.getUTCMonth() !== Number(month) - 1 ||
51
51
  date.getUTCDate() !== Number(day)) {
52
- throw new InputValidationError(`La fecha "${value}" no es valida.`);
52
+ throw new InputValidationError(`La fecha "${value}" no es válida.`);
53
53
  }
54
54
  return `${year}${month}${day}`;
55
55
  }
@@ -59,4 +59,3 @@ function resolveYear(explicitYear, today) {
59
59
  }
60
60
  return explicitYear.length === 2 ? `20${explicitYear}` : explicitYear;
61
61
  }
62
- //# sourceMappingURL=arca-date.js.map
@@ -30,4 +30,3 @@ export class InputValidationError extends AppError {
30
30
  this.name = 'InputValidationError';
31
31
  }
32
32
  }
33
- //# sourceMappingURL=app-error.js.map
@@ -11,11 +11,10 @@ export function readJsonFile(filePath) {
11
11
  return JSON.parse(rawContent);
12
12
  }
13
13
  catch (error) {
14
- const message = error instanceof Error ? error.message : 'JSON invalido';
14
+ const message = error instanceof Error ? error.message : 'JSON inválido';
15
15
  throw new InputValidationError(`No se pudo leer el archivo JSON "${filePath}": ${message}`, {
16
- cause: error instanceof Error ? error.message : 'JSON invalido',
16
+ cause: error instanceof Error ? error.message : 'JSON inválido',
17
17
  path: filePath,
18
18
  });
19
19
  }
20
20
  }
21
- //# sourceMappingURL=read-json-file.js.map
@@ -16,4 +16,3 @@ export function restrictFolderToOwner(path) {
16
16
  // Carpeta de otro usuario o sistema de archivos sin permisos POSIX: no es motivo para frenar el comando.
17
17
  }
18
18
  }
19
- //# sourceMappingURL=restrict-to-owner.js.map
@@ -27,4 +27,3 @@ export function writeNewFile(path, data) {
27
27
  }
28
28
  throw new Error(`No se pudo guardar ${path}: ya existen ${MAX_ATTEMPTS} archivos con ese nombre.`);
29
29
  }
30
- //# sourceMappingURL=write-new-file.js.map
@@ -0,0 +1,26 @@
1
+ const CHECK_DIGIT_WEIGHTS = [5, 4, 3, 2, 7, 6, 5, 4, 3, 2];
2
+ /** Digito verificador de los primeros 10 digitos (modulo 11). `undefined` si da 10: ARCA no asigna esos. */
3
+ function computeCheckDigit(firstTen) {
4
+ const sum = CHECK_DIGIT_WEIGHTS.reduce((total, weight, index) => total + weight * Number(firstTen[index]), 0);
5
+ const digit = 11 - (sum % 11);
6
+ if (digit === 11) {
7
+ return 0;
8
+ }
9
+ return digit === 10 ? undefined : digit;
10
+ }
11
+ /**
12
+ * CUIT o CUIL con o sin guiones, puntos o espacios (`20-33333333-4`, `20333333334`).
13
+ * Devuelve los 11 digitos si el formato y el digito verificador son validos, o el motivo si no.
14
+ */
15
+ export function parseCuit(raw) {
16
+ const value = String(raw)
17
+ .trim()
18
+ .replace(/[-.\s]/g, '');
19
+ if (!/^\d{11}$/.test(value)) {
20
+ return { ok: false, reason: 'debe tener 11 digitos, con o sin guiones' };
21
+ }
22
+ if (computeCheckDigit(value.slice(0, 10)) !== Number(value[10])) {
23
+ return { ok: false, reason: 'el digito verificador no coincide; revisá que esté bien escrito' };
24
+ }
25
+ return { ok: true, value };
26
+ }
@@ -1,6 +1,5 @@
1
- /** CUIT o CUIL con guiones, como lo muestra ARCA: `20409509763` → `20-40950976-3`. Si no tiene 11 digitos, sin cambios. */
1
+ /** CUIT o CUIL con guiones, como lo muestra ARCA: `20333333334` → `20-33333333-4`. Si no tiene 11 digitos, sin cambios. */
2
2
  export function formatCuit(value) {
3
3
  const digits = String(value);
4
4
  return /^\d{11}$/.test(digits) ? `${digits.slice(0, 2)}-${digits.slice(2, 10)}-${digits.slice(10)}` : digits;
5
5
  }
6
- //# sourceMappingURL=format-cuit.js.map
package/dist/lib/links.js CHANGED
@@ -2,4 +2,3 @@
2
2
  export const CERTIFICATE_GUIDE_URL = 'https://github.com/LcsGrz/arcli/blob/main/docs/obtencion-certificados.md';
3
3
  /** Seccion de la guia que explica como crear un punto de venta para web service. */
4
4
  export const POINT_OF_SALE_GUIDE_URL = `${CERTIFICATE_GUIDE_URL}#punto-de-venta-para-web-service`;
5
- //# sourceMappingURL=links.js.map
@@ -3,7 +3,7 @@ import Big from 'big.js';
3
3
  export const AMOUNT_DECIMALS = 2;
4
4
  /** Decimales de una cotizacion en ARCA (MonCotiz). */
5
5
  export const EXCHANGE_RATE_DECIMALS = 6;
6
- const FORMAT_HINT = 'use punto para miles y coma para decimales, por ejemplo 15000, 15.000 o 1.500,50';
6
+ const FORMAT_HINT = 'usá punto para miles y coma para decimales, por ejemplo 15000, 15.000 o 1.500,50';
7
7
  /**
8
8
  * Interpreta un monto escrito como en Argentina: el punto separa miles y la coma separa decimales.
9
9
  * `15000`, `15.000`, `1500,50` y `1.500,50` son validos; `1500.50` no, porque un grupo de miles
@@ -14,11 +14,11 @@ export function parseArgentineAmount(raw, options = {}) {
14
14
  const value = raw.trim().replace(/^\$/, '').replace(/\s/g, '');
15
15
  const match = /^(\d{1,3}(?:\.\d{3})+|\d+)(?:,(\d+))?$/.exec(value);
16
16
  if (!match) {
17
- return { ok: false, reason: /^\d+\.\d{1,2}$/.test(value) ? 'use coma para los decimales' : FORMAT_HINT };
17
+ return { ok: false, reason: /^\d+\.\d{1,2}$/.test(value) ? 'usá coma para los decimales' : FORMAT_HINT };
18
18
  }
19
19
  const [, integerPart = '', decimalPart = ''] = match;
20
20
  if (decimalPart.length > maxDecimals) {
21
- return { ok: false, reason: `use hasta ${maxDecimals} decimales` };
21
+ return { ok: false, reason: `usá hasta ${maxDecimals} decimales` };
22
22
  }
23
23
  const amount = Number(`${integerPart.replace(/\./g, '')}.${decimalPart || '0'}`);
24
24
  if (!Number.isFinite(amount) || amount <= 0) {
@@ -34,4 +34,3 @@ export function formatArgentineAmountInput(value) {
34
34
  export function hasAtMostDecimals(value, decimals) {
35
35
  return Number.isFinite(value) && new Big(value).round(decimals, Big.roundDown).eq(value);
36
36
  }
37
- //# sourceMappingURL=argentine-amount.js.map
@@ -7,4 +7,3 @@ export function parseStrictInteger(raw) {
7
7
  export function parseDocumentNumber(raw) {
8
8
  return parseStrictInteger(raw.replace(/[-.\s]/g, ''));
9
9
  }
10
- //# sourceMappingURL=strict-integer.js.map
@@ -14,4 +14,3 @@ export function maskPath(filePath) {
14
14
  }
15
15
  return `.../${parentDirectory}/${fileName}`;
16
16
  }
17
- //# sourceMappingURL=mask-path.js.map
@@ -16,4 +16,3 @@ export function readCertificateExpiry(pemContent, now = new Date()) {
16
16
  export function isCertificateExpiringSoon(expiry, thresholdDays) {
17
17
  return !expiry.isExpired && expiry.daysRemaining <= thresholdDays;
18
18
  }
19
- //# sourceMappingURL=certificate.js.map
@@ -12,7 +12,7 @@ function acceptedPemHeaders(kind) {
12
12
  }
13
13
  export function ensurePathExists(filePath, label) {
14
14
  if (!existsSync(filePath)) {
15
- throw new ConfigurationError(`La ruta del ${label} no existe: ${maskPath(filePath)}`, {
15
+ throw new ConfigurationError(`La ruta de ${label === 'certificado' ? 'el certificado' : 'la clave privada'} no existe: ${maskPath(filePath)}`, {
16
16
  path: maskPath(filePath),
17
17
  });
18
18
  }
@@ -26,7 +26,7 @@ export function ensurePemFormat(content, filePath, label) {
26
26
  const hasAcceptedHeader = acceptedPemHeaders(label).some((header) => normalizedContent.includes(`-----${header}-----`));
27
27
  const hasAcceptedFooter = normalizedContent.includes('-----END');
28
28
  if (!hasAcceptedHeader || !hasAcceptedFooter) {
29
- throw new ConfigurationError(`La ${label === 'certificado' ? 'ruta del certificado' : 'ruta de la clave privada'} apunta a un archivo con formato PEM invalido: ${maskPath(filePath)}. Debe contener un bloque como ${expectedPemHeader(label)}.`, {
29
+ throw new ConfigurationError(`La ${label === 'certificado' ? 'ruta del certificado' : 'ruta de la clave privada'} apunta a un archivo con formato PEM inválido: ${maskPath(filePath)}. Debe contener un bloque como ${expectedPemHeader(label)}.`, {
30
30
  path: maskPath(filePath),
31
31
  });
32
32
  }
@@ -37,4 +37,3 @@ export function readPemFile(filePath, label) {
37
37
  ensurePemFormat(content, filePath, label);
38
38
  return content;
39
39
  }
40
- //# sourceMappingURL=pem.js.map
@@ -1,7 +1,7 @@
1
1
  import { POINT_OF_SALE_GUIDE_URL } from '../../lib/links.js';
2
2
  /**
3
3
  * WSFEv1 10005: "El punto de venta informado debe estar dado de alta y ser del tipo RECE".
4
- * Es el rechazo de un punto de venta de "Factura en linea" (Comprobantes en linea).
4
+ * Es el rechazo de un punto de venta de "Factura en línea" (Comprobantes en linea).
5
5
  */
6
6
  const POINT_OF_SALE_NOT_RECE_CODE = 10005;
7
7
  export function createDryRunResponse() {
@@ -59,19 +59,19 @@ function buildResponseSuggestions(options) {
59
59
  .filter((code) => Number.isInteger(code));
60
60
  const suggestions = new Set();
61
61
  if (/transacci[oó]n activa/i.test(messages) || /error interno de base de datos/i.test(messages)) {
62
- suggestions.add('ARCA devolvio un error transitorio. Espere unos segundos y vuelva a intentar la emision.');
62
+ suggestions.add('ARCA devolvió un error transitorio. Esperá unos segundos y volvé a intentar la emisión.');
63
63
  }
64
64
  if (/cuit receptora.*no existe/i.test(messages)) {
65
- suggestions.add('Revise el CUIT del receptor o emita con un receptor valido del padron para testing.');
65
+ suggestions.add('Revisá el CUIT del receptor o emití con un receptor válido del padrón para testing.');
66
66
  }
67
67
  if (/objeto IVA es obligatorio/i.test(messages)) {
68
- suggestions.add('Revise IVA receptor y el calculo de IVA del comprobante antes de reintentar.');
68
+ suggestions.add('Revisá IVA receptor y el calculo de IVA del comprobante antes de reintentar.');
69
69
  }
70
70
  if (codes.includes(POINT_OF_SALE_NOT_RECE_CODE) || /punto de venta.*tipo RECE/i.test(messages)) {
71
- suggestions.add(`El punto de venta no esta habilitado para web service (los de "Factura en linea" no sirven). Revise los habilitados con arcli parametros puntos-venta o cree uno para web service: ${POINT_OF_SALE_GUIDE_URL}`);
71
+ suggestions.add(`El punto de venta no está habilitado para web service (los de "Factura en línea" no sirven). Revisá los habilitados con arcli parametros puntos-venta o creá uno para web service: ${POINT_OF_SALE_GUIDE_URL}`);
72
72
  }
73
73
  if (options.resultado === 'R' && suggestions.size === 0) {
74
- suggestions.add('Revise observaciones y errores de ARCA antes de volver a emitir.');
74
+ suggestions.add('Revisá observaciones y errores de ARCA antes de volver a emitir.');
75
75
  }
76
76
  return [...suggestions];
77
77
  }
@@ -84,4 +84,3 @@ function resolveBillingStatus(options) {
84
84
  }
85
85
  return 'observado';
86
86
  }
87
- //# sourceMappingURL=billing-response.js.map
@@ -22,7 +22,7 @@ function validateLetterCAmounts(input, voucherKind) {
22
22
  input.untaxedAmount ? '--nogravado' : undefined,
23
23
  ].filter((flag) => Boolean(flag));
24
24
  if (flags.length > 0) {
25
- throw new InputValidationError(`La ${formatVoucherLabel(voucherKind)} no discrimina IVA ni importes exentos o no gravados. Quite ${flags.join(', ')}.`);
25
+ throw new InputValidationError(`La ${formatVoucherLabel(voucherKind)} no discrimina IVA ni importes exentos o no gravados. Sacá ${flags.join(', ')}.`);
26
26
  }
27
27
  }
28
28
  /**
@@ -43,7 +43,7 @@ export function resolveTaxAmounts(input, voucherKind) {
43
43
  const untaxedAmount = input.untaxedAmount ?? 0;
44
44
  const taxedTotal = new Big(input.totalAmount).minus(exemptAmount).minus(untaxedAmount);
45
45
  if (taxedTotal.lt(0)) {
46
- throw new InputValidationError('El importe exento mas el no gravado no puede superar el monto total.');
46
+ throw new InputValidationError('El importe exento más el no gravado no puede superar el monto total.');
47
47
  }
48
48
  if (taxedTotal.eq(0)) {
49
49
  return { exemptAmount, ivaAmount: 0, netAmount: 0, untaxedAmount };
@@ -79,7 +79,7 @@ function resolveTaxedParts(input, taxedTotal) {
79
79
  const sum = [...byRate.values()].reduce((total, amount) => total.plus(amount), new Big(0));
80
80
  // Los importes tienen 2 decimales como maximo, asi que la suma tiene que dar exacta.
81
81
  if (!sum.eq(taxedTotal)) {
82
- throw new InputValidationError(`La suma de las alicuotas (${formatPlain(sum)}) no coincide con lo gravado del monto total (${formatPlain(taxedTotal)}). Revise --monto, --alicuota, --exento y --nogravado.`);
82
+ throw new InputValidationError(`La suma de las alícuotas (${formatPlain(sum)}) no coincide con lo gravado del monto total (${formatPlain(taxedTotal)}). Revisá --monto, --alicuota, --exento y --nogravado.`);
83
83
  }
84
84
  return [...byRate.entries()].map(([rate, amount]) => ({ amount, rate }));
85
85
  }
@@ -93,4 +93,3 @@ function roundAmount(value) {
93
93
  export function sumTaxAmounts(amounts) {
94
94
  return roundAmount(new Big(amounts.untaxedAmount).plus(amounts.exemptAmount).plus(amounts.netAmount).plus(amounts.ivaAmount));
95
95
  }
96
- //# sourceMappingURL=billing.amounts.js.map
@@ -13,28 +13,27 @@ export function resolveAssociatedPeriod(input, voucherKind, billingDate) {
13
13
  }
14
14
  const label = formatVoucherLabel(voucherKind);
15
15
  if (!voucherKind.requiresAssociatedVoucher) {
16
- throw new InputValidationError(`La ${label} no usa periodo asociado: solo aplica a notas de credito o debito.`);
16
+ throw new InputValidationError(`La ${label} no usa período asociado: solo aplica a notas de crédito o débito.`);
17
17
  }
18
18
  if (voucherKind.isElectronicCredit) {
19
- throw new InputValidationError(`La ${label} no admite periodo asociado: ARCA solo lo acepta en notas comunes. Use el comprobante asociado (--ac).`);
19
+ throw new InputValidationError(`La ${label} no admite período asociado: ARCA solo lo acepta en notas comunes. Usá el comprobante asociado (--ac).`);
20
20
  }
21
21
  if (input.associatedVoucher) {
22
- throw new InputValidationError('Use un comprobante asociado (--ac/--at) o un periodo asociado (--periodo-desde/--periodo-hasta), pero no ambos.');
22
+ throw new InputValidationError('Usá un comprobante asociado (--ac/--at) o un período asociado (--periodo-desde/--periodo-hasta), pero no ambos.');
23
23
  }
24
24
  if (!period.desde || !period.hasta) {
25
- throw new InputValidationError('El periodo asociado requiere ambas fechas: --periodo-desde y --periodo-hasta.');
25
+ throw new InputValidationError('El período asociado requiere ambas fechas: --periodo-desde y --periodo-hasta.');
26
26
  }
27
27
  const FchDesde = parseArgentineDateInputAsArcaDate(period.desde);
28
28
  const FchHasta = parseArgentineDateInputAsArcaDate(period.hasta);
29
29
  if (FchDesde < MINIMUM_PERIOD_DATE) {
30
- throw new InputValidationError('El periodo asociado tiene que ser posterior al 01/01/2006.');
30
+ throw new InputValidationError('El período asociado tiene que ser posterior al 01/01/2006.');
31
31
  }
32
32
  if (FchDesde > FchHasta) {
33
- throw new InputValidationError('En el periodo asociado, --periodo-desde no puede ser posterior a --periodo-hasta.');
33
+ throw new InputValidationError('En el período asociado, --periodo-desde no puede ser posterior a --periodo-hasta.');
34
34
  }
35
35
  if (FchHasta > billingDate) {
36
- throw new InputValidationError(`El periodo asociado no puede terminar despues de la fecha de la ${label} (${formatArcaDateAsArgentineDate(billingDate)}).`);
36
+ throw new InputValidationError(`El período asociado no puede terminar después de la fecha de la ${label} (${formatArcaDateAsArgentineDate(billingDate)}).`);
37
37
  }
38
38
  return { FchDesde, FchHasta };
39
39
  }
40
- //# sourceMappingURL=billing.associated-period.js.map
@@ -20,13 +20,13 @@ export function resolveAssociatedVouchers(options) {
20
20
  const associatedVoucherType = associatedVoucher?.tipo ?? resolveAssociatedVoucherType(associatedVoucher?.shortcut, requireVoucherKind);
21
21
  const associatedVoucherKind = resolveAssociatedVoucherKind(associatedVoucher, requireVoucherKind);
22
22
  if (!associatedVoucher?.numero || !associatedVoucher.puntoVenta || !associatedVoucherType || !associatedCuit) {
23
- throw new InputValidationError(`El comprobante ${formatVoucherLabel(voucherKind)} requiere comprobante asociado. Use --ac o --at, junto con --apv o --asociado-punto-venta, --ar y --acuit${voucherKind.isElectronicCredit ? '' : ', o un periodo con --periodo-desde y --periodo-hasta'}.`);
23
+ throw new InputValidationError(`El comprobante ${formatVoucherLabel(voucherKind)} requiere comprobante asociado. Usá --ac o --at, junto con --apv o --asociado-punto-venta, --ar y --acuit${voucherKind.isElectronicCredit ? '' : ', o un período con --periodo-desde y --periodo-hasta'}.`);
24
24
  }
25
25
  if (associatedVoucherKind) {
26
26
  validateAssociatedVoucherKind(associatedVoucherKind, voucherKind);
27
27
  }
28
28
  if (voucherKind.isElectronicCredit && associatedCuit !== String(emitterCuit)) {
29
- throw new InputValidationError(`En la ${formatVoucherLabel(voucherKind)} el comprobante asociado tiene que ser del CUIT emisor (${emitterCuit}). Quite --acuit o use ese CUIT.`);
29
+ throw new InputValidationError(`En la ${formatVoucherLabel(voucherKind)} el comprobante asociado tiene que ser del CUIT emisor (${emitterCuit}). Sacá --acuit o usá ese CUIT.`);
30
30
  }
31
31
  const associatedDate = resolveAssociatedVoucherDate(associatedVoucher.fecha, billingDate, voucherKind);
32
32
  return [
@@ -47,14 +47,14 @@ function resolveAssociatedVoucherKind(associatedVoucher, requireVoucherKind) {
47
47
  const byShortcut = associatedVoucher?.shortcut ? requireVoucherKind(associatedVoucher.shortcut) : undefined;
48
48
  const byType = associatedVoucher?.tipo ? (getVoucherKindByArcaType(associatedVoucher.tipo) ?? undefined) : undefined;
49
49
  if (byShortcut && associatedVoucher?.tipo && byShortcut.arcaType !== associatedVoucher.tipo) {
50
- throw new InputValidationError(`El atajo "${associatedVoucher.shortcut}" es el tipo ${byShortcut.arcaType}, no el ${associatedVoucher.tipo}. Use uno solo para el comprobante asociado.`);
50
+ throw new InputValidationError(`El atajo "${associatedVoucher.shortcut}" es el tipo ${byShortcut.arcaType}, no el ${associatedVoucher.tipo}. Usá uno solo para el comprobante asociado.`);
51
51
  }
52
52
  return byShortcut ?? byType;
53
53
  }
54
54
  function resolveAssociatedVoucherDate(rawDate, billingDate, voucherKind) {
55
55
  if (!rawDate) {
56
56
  if (voucherKind.isElectronicCredit) {
57
- throw new InputValidationError(`La ${formatVoucherLabel(voucherKind)} requiere la fecha del comprobante asociado. Use --afecha <fecha>.`);
57
+ throw new InputValidationError(`La ${formatVoucherLabel(voucherKind)} requiere la fecha del comprobante asociado. Usá --afecha <fecha>.`);
58
58
  }
59
59
  return undefined;
60
60
  }
@@ -78,7 +78,6 @@ function validateAssociatedVoucherKind(associatedVoucherKind, voucherKind) {
78
78
  throw new InputValidationError(`El comprobante asociado debe usar la misma letra que ${formatVoucherLabel(voucherKind)}.`);
79
79
  }
80
80
  if (associatedVoucherKind.isElectronicCredit !== voucherKind.isElectronicCredit) {
81
- throw new InputValidationError(`El comprobante asociado debe pertenecer a la misma categoria electronica que ${formatVoucherLabel(voucherKind)}.`);
81
+ throw new InputValidationError(`El comprobante asociado debe pertenecer a la misma categoría electrónica que ${formatVoucherLabel(voucherKind)}.`);
82
82
  }
83
83
  }
84
- //# sourceMappingURL=billing.associated-vouchers.js.map
@@ -14,8 +14,8 @@ export class BatchValidationError extends AppError {
14
14
  const lines = errors.map((item) => `#${item.index}: ${item.message}`);
15
15
  super([
16
16
  errors.length === 1
17
- ? `1 de ${total} ${total === 1 ? 'comprobante' : 'comprobantes'} del lote tiene errores. No se emitio ninguno.`
18
- : `${errors.length} de ${total} comprobantes del lote tienen errores. No se emitio ninguno.`,
17
+ ? `1 de ${total} ${total === 1 ? 'comprobante' : 'comprobantes'} del lote tiene errores. No se emitió ninguno.`
18
+ : `${errors.length} de ${total} comprobantes del lote tienen errores. No se emitió ninguno.`,
19
19
  '',
20
20
  ...lines,
21
21
  ].join('\n'), {
@@ -31,13 +31,15 @@ export class BatchValidationError extends AppError {
31
31
  */
32
32
  export class BatchEmissionError extends AppError {
33
33
  constructor(options) {
34
- const pending = Array.from({ length: options.total - options.failedIndex }, (_, offset) => options.failedIndex + 1 + offset);
35
34
  const uncertain = options.cause instanceof EmissionUncertainError;
35
+ // Si el fallo fue antes de la llamada que emite (login, ultimo numero), ese comprobante tampoco se proceso.
36
+ const firstPending = uncertain ? options.failedIndex + 1 : options.failedIndex;
37
+ const pending = Array.from({ length: options.total - firstPending + 1 }, (_, offset) => firstPending + offset);
36
38
  super([
37
- `El lote se interrumpio en el comprobante #${options.failedIndex}: ${describeBatchItemError(options.cause)}`,
39
+ `El lote se interrumpió en el comprobante #${options.failedIndex}: ${describeBatchItemError(options.cause)}`,
38
40
  `Procesados: ${options.emitted} de ${options.total}.${pending.length > 0 ? ` Sin procesar: ${pending.map((index) => `#${index}`).join(', ')}.` : ''}`,
39
41
  ...(uncertain
40
- ? [`El #${options.failedIndex} puede haberse emitido: verifiquelo con "arcli ultimos" antes de reintentarlo.`]
42
+ ? [`El #${options.failedIndex} puede haberse emitido: verificalo con "arcli ultimos" antes de reintentarlo.`]
41
43
  : []),
42
44
  ].join('\n'), {
43
45
  code: 'BATCH_EMISSION_ERROR',
@@ -52,4 +54,3 @@ export class BatchEmissionError extends AppError {
52
54
  this.name = 'BatchEmissionError';
53
55
  }
54
56
  }
55
- //# sourceMappingURL=billing.batch.js.map
@@ -1,3 +1,2 @@
1
1
  export const DEFAULT_CURRENCY_CODE = 'ARS';
2
2
  export const DEFAULT_EXCHANGE_RATE = 1;
3
- //# sourceMappingURL=billing.constants.js.map
@@ -20,7 +20,7 @@ export function resolveBillingCurrencyFields(input, billingDate, today) {
20
20
  throw new InputValidationError('--misma-moneda solo aplica a comprobantes en moneda extranjera.');
21
21
  }
22
22
  if (typeof input.exchangeRate === 'number' && input.exchangeRate !== DEFAULT_EXCHANGE_RATE) {
23
- throw new InputValidationError('En pesos la cotizacion debe ser 1. Quite --cotizacion-moneda o use --cm 1.');
23
+ throw new InputValidationError('En pesos la cotización debe ser 1. Sacá --cotizacion-moneda o usá --cm 1.');
24
24
  }
25
25
  // ARCA rechaza CanMisMonExt cuando MonId = PES (error 10241).
26
26
  return {
@@ -30,10 +30,10 @@ export function resolveBillingCurrencyFields(input, billingDate, today) {
30
30
  }
31
31
  if (input.sameCurrency) {
32
32
  if (billingDate < today) {
33
- throw new InputValidationError('Con --misma-moneda la fecha del comprobante no puede ser anterior a hoy: ARCA exige la cotizacion oficial de ese dia y solo se puede consultar la vigente.');
33
+ throw new InputValidationError('Con --misma-moneda la fecha del comprobante no puede ser anterior a hoy: ARCA exige la cotización oficial de ese día y solo se puede consultar la vigente.');
34
34
  }
35
35
  if (typeof input.exchangeRate !== 'number') {
36
- throw new InputValidationError(`No se pudo obtener la cotizacion oficial de ${inputCurrencyCode} desde ARCA.`);
36
+ throw new InputValidationError(`No se pudo obtener la cotización oficial de ${inputCurrencyCode} desde ARCA.`);
37
37
  }
38
38
  return {
39
39
  CanMisMonExt: 'S',
@@ -42,7 +42,7 @@ export function resolveBillingCurrencyFields(input, billingDate, today) {
42
42
  };
43
43
  }
44
44
  if (typeof input.exchangeRate !== 'number' || input.exchangeRate === DEFAULT_EXCHANGE_RATE) {
45
- throw new InputValidationError(`Falta la cotizacion de ${inputCurrencyCode}. Use --cotizacion-moneda o --cm, o --misma-moneda si el pago se hace en ${inputCurrencyCode}.`);
45
+ throw new InputValidationError(`Falta la cotización de ${inputCurrencyCode}. Usá --cotizacion-moneda o --cm, o --misma-moneda si el pago se hace en ${inputCurrencyCode}.`);
46
46
  }
47
47
  return {
48
48
  CanMisMonExt: 'N',
@@ -50,4 +50,3 @@ export function resolveBillingCurrencyFields(input, billingDate, today) {
50
50
  MonId: currencyCode,
51
51
  };
52
52
  }
53
- //# sourceMappingURL=billing.currency.js.map
@@ -28,7 +28,7 @@ function resolvePaymentDateFromDueDay(dueDay, now = new Date()) {
28
28
  const monthIndex = firstOfMonth.getUTCMonth();
29
29
  const daysInMonth = new Date(Date.UTC(year, monthIndex + 1, 0)).getUTCDate();
30
30
  if (dueDay > daysInMonth) {
31
- throw new InputValidationError(`--dia ${dueDay} no existe en ${MONTH_NAMES[monthIndex]} de ${year}. Indique la fecha exacta con --servicio-hasta.`);
31
+ throw new InputValidationError(`--dia ${dueDay} no existe en ${MONTH_NAMES[monthIndex]} de ${year}. Indicá la fecha exacta con --servicio-hasta.`);
32
32
  }
33
33
  return calendarDateToArcaDate({ day: dueDay, month: monthIndex + 1, year });
34
34
  }
@@ -71,4 +71,3 @@ export function resolveBillingDateRange(input, voucherKind, today = formatDateAs
71
71
  validatePaymentDueDate(paymentDueDate, minimumPaymentDueDate);
72
72
  return { billingDate, paymentDueDate, ...serviceDates };
73
73
  }
74
- //# sourceMappingURL=billing.date-range.js.map
@@ -1,4 +1,5 @@
1
1
  import { keyValuePanel, renderKeyValueRows, renderTable, resolveKeyValueLabelWidth, statusPanel, testingBanner, toneText, } from '../../ui/index.js';
2
+ import { formatVoucherNumber } from '../vouchers/voucher-history.presenter.js';
2
3
  import { resolveIvaRateLabel } from './billing.amounts.js';
3
4
  import { formatConceptLabel, formatCurrencyLabel, formatDateLabel, formatDecimalLabel, formatDocumentTypeLabel, formatIvaConditionLabel, formatMoneyLabel, formatNumericLabel, formatTaxIdLabel, } from './billing.labels.js';
4
5
  import { getVoucherKindByArcaType } from './voucher-kind-map.js';
@@ -47,7 +48,7 @@ function formatIvaRows(iva) {
47
48
  }
48
49
  const label = (aliquotId) => resolveIvaRateLabel(aliquotId) ?? String(aliquotId);
49
50
  if (iva.length === 1 && iva[0]) {
50
- return [['Alicuota IVA', label(iva[0].Id)]];
51
+ return [['Alícuota IVA', label(iva[0].Id)]];
51
52
  }
52
53
  return iva.map((item) => [`IVA ${label(item.Id)}`, `${formatMoneyLabel(item.Importe)} sobre ${formatMoneyLabel(item.BaseImp)}`]);
53
54
  }
@@ -59,7 +60,7 @@ function formatFriendlyPayloadRows(result) {
59
60
  ['Fecha del comprobante', formatDateLabel(payload.CbteFch)],
60
61
  ['Tipo de documento', formatDocumentTypeLabel(payload.DocTipo)],
61
62
  [
62
- 'Numero de documento',
63
+ 'Número de documento',
63
64
  typeof payload.DocNro === 'number'
64
65
  ? payload.DocNro === 0
65
66
  ? 'Sin especificar'
@@ -71,10 +72,10 @@ function formatFriendlyPayloadRows(result) {
71
72
  ...(result.receiver?.name ? [['Receptor', result.receiver.name]] : []),
72
73
  [
73
74
  'IVA receptor',
74
- `${formatIvaConditionLabel(payload.CondicionIVAReceptorId)}${result.receiver?.ivaConditionFromPadron ? ' (padron)' : ''}`,
75
+ `${formatIvaConditionLabel(payload.CondicionIVAReceptorId)}${result.receiver?.ivaConditionFromPadron ? ' (padrón)' : ''}`,
75
76
  ],
76
77
  ['Moneda', formatCurrencyLabel(payload.MonId)],
77
- ['Cotizacion', formatDecimalLabel(payload.MonCotiz)],
78
+ ['Cotización', formatDecimalLabel(payload.MonCotiz)],
78
79
  ['Importe neto', formatMoneyLabel(payload.ImpNeto)],
79
80
  ['Importe IVA', formatMoneyLabel(payload.ImpIVA)],
80
81
  ...formatIvaRows(payload.Iva ?? []),
@@ -97,7 +98,7 @@ function formatFriendlyPayloadRows(result) {
97
98
  const associatedKind = getVoucherKindByArcaType(associatedVoucher.Tipo);
98
99
  rows.push(['Comprobante asociado', associatedKind ? associatedKind.displayName : String(associatedVoucher.Tipo)]);
99
100
  rows.push(['Punto de venta asociado', formatNumericLabel(associatedVoucher.PtoVta)]);
100
- rows.push(['Numero asociado', formatNumericLabel(associatedVoucher.Nro)]);
101
+ rows.push(['Número asociado', formatNumericLabel(associatedVoucher.Nro)]);
101
102
  rows.push(['CUIT asociado', formatTaxIdLabel(associatedVoucher.Cuit)]);
102
103
  if (associatedVoucher.CbteFch) {
103
104
  rows.push(['Fecha asociado', formatDateLabel(associatedVoucher.CbteFch)]);
@@ -105,7 +106,7 @@ function formatFriendlyPayloadRows(result) {
105
106
  }
106
107
  if (payload.PeriodoAsoc) {
107
108
  rows.push([
108
- 'Periodo asociado',
109
+ 'Período asociado',
109
110
  `${formatDateLabel(payload.PeriodoAsoc.FchDesde)} al ${formatDateLabel(payload.PeriodoAsoc.FchHasta)}`,
110
111
  ]);
111
112
  }
@@ -130,7 +131,9 @@ export function formatResultPanel(result, status) {
130
131
  const summaryRows = [
131
132
  ['CAE', result.response.cae ?? 'N/D'],
132
133
  ['Vencimiento CAE', formatDateLabel(result.response.caeVencimiento ?? undefined)],
133
- ['Punto de venta', result.payload.PtoVta],
134
+ result.voucherNumber === undefined
135
+ ? ['Punto de venta', result.payload.PtoVta]
136
+ : ['Número', formatVoucherNumber(result.payload.PtoVta, result.voucherNumber)],
134
137
  ['Importe total', formatMoneyLabel(result.payload.ImpTotal)],
135
138
  ];
136
139
  const countRows = [
@@ -147,4 +150,3 @@ export function formatResultPanel(result, status) {
147
150
  const footer = toneText(status.label, status.tone);
148
151
  return statusPanel(result.voucherKind.displayName, rows, footer, 'ticket', status.tone, 'ticket');
149
152
  }
150
- //# sourceMappingURL=billing.display.js.map
@@ -6,13 +6,12 @@ import { AppError } from '../../lib/errors/app-error.js';
6
6
  export class EmissionUncertainError extends AppError {
7
7
  constructor(options) {
8
8
  const reason = options.cause instanceof Error ? options.cause.message : String(options.cause);
9
- super(`No se pudo confirmar la emision: ${reason}`, {
9
+ super(`No se pudo confirmar la emisión: ${reason}`, {
10
10
  code: 'EMISSION_UNCERTAIN',
11
11
  details: { causa: reason },
12
- suggestion: `Puede haberse emitido igual. Antes de reintentar, verifique con "arcli ultimos ${options.shortcut} --pv ${options.pointOfSale}": si figura, ya esta emitido y no hay que repetirlo.`,
12
+ suggestion: `Puede haberse emitido igual. Antes de reintentar, verificá con "arcli ultimos ${options.shortcut} --pv ${options.pointOfSale}": si figura, ya esta emitido y no hay que repetirlo.`,
13
13
  });
14
14
  this.name = 'EmissionUncertainError';
15
15
  this.cause = options.cause;
16
16
  }
17
17
  }
18
- //# sourceMappingURL=billing.errors.js.map
@@ -30,7 +30,7 @@ export function resolveElectronicCreditOptionals(input, voucherKind) {
30
30
  if (!voucherKind.isElectronicCredit) {
31
31
  const flags = input.cancellation ? [...invoiceOnlyFlags, '--anulacion'] : invoiceOnlyFlags;
32
32
  if (flags.length > 0) {
33
- throw new InputValidationError(`${flags.join(', ')} solo aplica a comprobantes de credito electronica (FCE).`);
33
+ throw new InputValidationError(`${flags.join(', ')} solo aplica a comprobantes de crédito electrónica (FCE).`);
34
34
  }
35
35
  return undefined;
36
36
  }
@@ -41,10 +41,10 @@ export function resolveElectronicCreditOptionals(input, voucherKind) {
41
41
  return [{ Id: FCE_OPTIONAL_IDS.cancellation, Valor: input.cancellation ? 'S' : 'N' }];
42
42
  }
43
43
  if (input.cancellation) {
44
- throw new InputValidationError(`La ${label} no usa --anulacion: solo aplica a notas de credito o debito FCE.`);
44
+ throw new InputValidationError(`La ${label} no usa --anulacion: solo aplica a notas de crédito o débito FCE.`);
45
45
  }
46
46
  if (!input.cbu) {
47
- throw new InputValidationError(`La ${label} requiere el CBU del emisor. Use --cbu o configurelo con "arcli config establecer cbu <22 digitos>".`);
47
+ throw new InputValidationError(`La ${label} requiere el CBU del emisor. Usá --cbu o configuralo con "arcli config establecer cbu <22 digitos>".`);
48
48
  }
49
49
  const optionals = [{ Id: FCE_OPTIONAL_IDS.cbu, Valor: input.cbu }];
50
50
  if (input.cbuAlias) {
@@ -56,4 +56,3 @@ export function resolveElectronicCreditOptionals(input, voucherKind) {
56
56
  });
57
57
  return optionals;
58
58
  }
59
- //# sourceMappingURL=billing.fce.js.map
@@ -47,7 +47,7 @@ export function validateIvaConditionForVoucher(ivaCondition, voucherKind) {
47
47
  return;
48
48
  }
49
49
  const suggestedLetter = ['a', 'b'].find((letter) => isIvaConditionAllowed(letter, ivaCondition));
50
- const suggestion = suggestedLetter ? ` Use un comprobante letra ${suggestedLetter.toUpperCase()}.` : '';
50
+ const suggestion = suggestedLetter ? ` Usá un comprobante letra ${suggestedLetter.toUpperCase()}.` : '';
51
51
  throw new InputValidationError(`La ${formatVoucherLabel(voucherKind)} no admite IVA receptor "${ivaCondition}".${suggestion}`);
52
52
  }
53
53
  export function validateConsumerIdentification(input, exchangeRate, voucherKind) {
@@ -55,7 +55,6 @@ export function validateConsumerIdentification(input, exchangeRate, voucherKind)
55
55
  return;
56
56
  }
57
57
  if (input.totalAmount * exchangeRate >= CONSUMER_IDENTIFICATION_THRESHOLD) {
58
- throw new InputValidationError(`La ${formatVoucherLabel(voucherKind)} de $10.000.000 o mas requiere identificar al consumidor final. Use --dni, --cuit o --cuil.`);
58
+ throw new InputValidationError(`La ${formatVoucherLabel(voucherKind)} de $10.000.000 o más requiere identificar al consumidor final. Usá --dni, --cuit o --cuil.`);
59
59
  }
60
60
  }
61
- //# sourceMappingURL=billing.iva-receptor.js.map
@@ -2,4 +2,3 @@ import { serializeBillingResult } from './billing.serialize.js';
2
2
  export function formatBillingResultAsJson(result, options = {}) {
3
3
  return JSON.stringify(serializeBillingResult(result, { raw: options.raw }), null, 2);
4
4
  }
5
- //# sourceMappingURL=billing.json-format.js.map