@kreiseck/kasseneck-api 1.13.0 → 1.15.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 +36 -0
- package/README.md +71 -2
- package/dist/cjs/client/api.d.ts +8 -1
- package/dist/cjs/client/api.js +4 -0
- package/dist/cjs/client/aufrufe.d.ts +6 -6
- package/dist/cjs/client/aufrufe.js +11 -2
- package/dist/cjs/client/index.d.ts +2 -1
- package/dist/cjs/client/index.js +13 -1
- package/dist/cjs/client/list-receipts.d.ts +211 -0
- package/dist/cjs/client/list-receipts.js +290 -0
- package/dist/cjs/client/receipts.d.ts +85 -2
- package/dist/cjs/client/receipts.js +164 -5
- package/dist/cjs/enums/voucher-type.d.ts +1 -1
- package/dist/cjs/enums/voucher-type.js +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +24 -3
- package/dist/cjs/invoice/typen.d.ts +1 -1
- package/dist/cjs/invoice/vertrag.d.ts +1 -1
- package/dist/cjs/invoice/vertrag.js +2 -0
- package/dist/cjs/models/index.d.ts +2 -1
- package/dist/cjs/models/index.js +12 -1
- package/dist/cjs/models/receipt-errors.d.ts +1 -1
- package/dist/cjs/models/receipt-errors.js +3 -0
- package/dist/cjs/models/receipt-output.d.ts +79 -0
- package/dist/cjs/models/receipt-output.js +143 -0
- package/dist/cjs/models/receipt.d.ts +2 -2
- package/dist/cjs/models/receipt.js +2 -2
- package/dist/cjs/models/voucher.d.ts +24 -2
- package/dist/cjs/models/voucher.js +2 -2
- package/dist/cjs/partner/typen.d.ts +1 -1
- package/dist/cjs/pos/index.d.ts +2 -1
- package/dist/cjs/pos/index.js +6 -1
- package/dist/cjs/pos/schicht-typen.d.ts +2 -2
- package/dist/cjs/pos/schicht-typen.js +2 -2
- package/dist/cjs/pos/settings.d.ts +1 -1
- package/dist/cjs/pos/settings.js +5 -0
- package/dist/cjs/pos/texte.d.ts +114 -0
- package/dist/cjs/pos/texte.js +64 -0
- package/dist/cjs/receipt/due.d.ts +4 -2
- package/dist/cjs/receipt/due.js +22 -5
- package/dist/cjs/receipt/duplikat.d.ts +35 -0
- package/dist/cjs/receipt/duplikat.js +76 -0
- package/dist/cjs/receipt/gutschein-plan.d.ts +2 -0
- package/dist/cjs/receipt/gutschein-plan.js +5 -0
- package/dist/cjs/receipt/index.d.ts +1 -0
- package/dist/cjs/receipt/index.js +4 -2
- package/dist/cjs/receipt/layout.js +44 -21
- package/dist/cjs/register/pairing.d.ts +6 -2
- package/dist/cjs/register/pairing.js +1 -1
- package/dist/cjs/stored/bon-layout.js +3 -4
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +47 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/api.d.ts +8 -1
- package/dist/esm/client/api.js +5 -1
- package/dist/esm/client/aufrufe.d.ts +6 -6
- package/dist/esm/client/aufrufe.js +11 -2
- package/dist/esm/client/index.d.ts +2 -1
- package/dist/esm/client/index.js +2 -1
- package/dist/esm/client/list-receipts.d.ts +211 -0
- package/dist/esm/client/list-receipts.js +284 -0
- package/dist/esm/client/receipts.d.ts +85 -2
- package/dist/esm/client/receipts.js +164 -6
- package/dist/esm/enums/voucher-type.d.ts +1 -1
- package/dist/esm/enums/voucher-type.js +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/invoice/typen.d.ts +1 -1
- package/dist/esm/invoice/vertrag.d.ts +1 -1
- package/dist/esm/invoice/vertrag.js +2 -0
- package/dist/esm/models/index.d.ts +2 -1
- package/dist/esm/models/index.js +1 -0
- package/dist/esm/models/receipt-errors.d.ts +1 -1
- package/dist/esm/models/receipt-errors.js +3 -0
- package/dist/esm/models/receipt-output.d.ts +79 -0
- package/dist/esm/models/receipt-output.js +135 -0
- package/dist/esm/models/receipt.d.ts +2 -2
- package/dist/esm/models/receipt.js +2 -2
- package/dist/esm/models/voucher.d.ts +24 -2
- package/dist/esm/models/voucher.js +2 -2
- package/dist/esm/partner/typen.d.ts +1 -1
- package/dist/esm/pos/index.d.ts +2 -1
- package/dist/esm/pos/index.js +3 -1
- package/dist/esm/pos/schicht-typen.d.ts +2 -2
- package/dist/esm/pos/schicht-typen.js +2 -2
- package/dist/esm/pos/settings.d.ts +1 -1
- package/dist/esm/pos/settings.js +5 -0
- package/dist/esm/pos/texte.d.ts +114 -0
- package/dist/esm/pos/texte.js +63 -0
- package/dist/esm/receipt/due.d.ts +4 -2
- package/dist/esm/receipt/due.js +23 -6
- package/dist/esm/receipt/duplikat.d.ts +35 -0
- package/dist/esm/receipt/duplikat.js +73 -0
- package/dist/esm/receipt/gutschein-plan.d.ts +2 -0
- package/dist/esm/receipt/gutschein-plan.js +4 -0
- package/dist/esm/receipt/index.d.ts +1 -0
- package/dist/esm/receipt/index.js +1 -0
- package/dist/esm/receipt/layout.js +44 -21
- package/dist/esm/register/pairing.d.ts +6 -2
- package/dist/esm/register/pairing.js +1 -1
- package/dist/esm/stored/bon-layout.js +3 -4
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +47 -3
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/code-table-receipts.json +1 -1
- package/fixtures/duplicate-cases.json +5616 -0
- package/fixtures/expected/cancellation-discount.grid32.txt +1 -1
- package/fixtures/expected/cancellation-discount.grid48.txt +1 -1
- package/fixtures/expected/cancellation-discount.lines.json +1 -1
- package/fixtures/expected/cancellation-discount.sheet32.json +1 -1
- package/fixtures/expected/cancellation-discount.sheet48.json +1 -1
- package/fixtures/expected/cancellation-full.grid32.txt +1 -1
- package/fixtures/expected/cancellation-full.grid48.txt +1 -1
- package/fixtures/expected/cancellation-full.lines.json +1 -1
- package/fixtures/expected/cancellation-full.sheet32.json +1 -1
- package/fixtures/expected/cancellation-full.sheet48.json +1 -1
- package/fixtures/expected/cancellation-partial.grid32.txt +1 -1
- package/fixtures/expected/cancellation-partial.grid48.txt +1 -1
- package/fixtures/expected/cancellation-partial.lines.json +1 -1
- package/fixtures/expected/cancellation-partial.sheet32.json +1 -1
- package/fixtures/expected/cancellation-partial.sheet48.json +1 -1
- package/fixtures/expected/cancellation-split-full.grid32.txt +1 -1
- package/fixtures/expected/cancellation-split-full.grid48.txt +1 -1
- package/fixtures/expected/cancellation-split-full.lines.json +1 -1
- package/fixtures/expected/cancellation-split-full.sheet32.json +1 -1
- package/fixtures/expected/cancellation-split-full.sheet48.json +1 -1
- package/fixtures/expected/cancellation-split-partial.grid32.txt +1 -1
- package/fixtures/expected/cancellation-split-partial.grid48.txt +1 -1
- package/fixtures/expected/cancellation-split-partial.lines.json +1 -1
- package/fixtures/expected/cancellation-split-partial.sheet32.json +1 -1
- package/fixtures/expected/cancellation-split-partial.sheet48.json +1 -1
- package/fixtures/expected/card-custom.grid32.txt +1 -1
- package/fixtures/expected/card-custom.grid48.txt +1 -1
- package/fixtures/expected/card-custom.lines.json +1 -1
- package/fixtures/expected/card-custom.sheet32.json +1 -1
- package/fixtures/expected/card-custom.sheet48.json +1 -1
- package/fixtures/expected/card-gptom-ios.grid32.txt +1 -1
- package/fixtures/expected/card-gptom-ios.grid48.txt +1 -1
- package/fixtures/expected/card-gptom-ios.lines.json +1 -1
- package/fixtures/expected/card-gptom-ios.sheet32.json +1 -1
- package/fixtures/expected/card-gptom-ios.sheet48.json +1 -1
- package/fixtures/expected/card-gptom.grid32.txt +1 -1
- package/fixtures/expected/card-gptom.grid48.txt +1 -1
- package/fixtures/expected/card-gptom.lines.json +1 -1
- package/fixtures/expected/card-gptom.sheet32.json +1 -1
- package/fixtures/expected/card-gptom.sheet48.json +1 -1
- package/fixtures/expected/card-hobex-cloud.grid32.txt +1 -1
- package/fixtures/expected/card-hobex-cloud.grid48.txt +1 -1
- package/fixtures/expected/card-hobex-cloud.lines.json +1 -1
- package/fixtures/expected/card-hobex-cloud.sheet32.json +1 -1
- package/fixtures/expected/card-hobex-cloud.sheet48.json +1 -1
- package/fixtures/expected/card-hobex-hps.grid32.txt +1 -1
- package/fixtures/expected/card-hobex-hps.grid48.txt +1 -1
- package/fixtures/expected/card-hobex-hps.lines.json +1 -1
- package/fixtures/expected/card-hobex-hps.sheet32.json +1 -1
- package/fixtures/expected/card-hobex-hps.sheet48.json +1 -1
- package/fixtures/expected/card-mypos.grid32.txt +1 -1
- package/fixtures/expected/card-mypos.grid48.txt +1 -1
- package/fixtures/expected/card-mypos.lines.json +1 -1
- package/fixtures/expected/card-mypos.sheet32.json +1 -1
- package/fixtures/expected/card-mypos.sheet48.json +1 -1
- package/fixtures/expected/card-stripe-eps.grid32.txt +1 -1
- package/fixtures/expected/card-stripe-eps.grid48.txt +1 -1
- package/fixtures/expected/card-stripe-eps.lines.json +1 -1
- package/fixtures/expected/card-stripe-eps.sheet32.json +1 -1
- package/fixtures/expected/card-stripe-eps.sheet48.json +1 -1
- package/fixtures/expected/card-stripe.grid32.txt +1 -1
- package/fixtures/expected/card-stripe.grid48.txt +1 -1
- package/fixtures/expected/card-stripe.lines.json +1 -1
- package/fixtures/expected/card-stripe.sheet32.json +1 -1
- package/fixtures/expected/card-stripe.sheet48.json +1 -1
- package/fixtures/expected/card-sumup.grid32.txt +1 -1
- package/fixtures/expected/card-sumup.grid48.txt +1 -1
- package/fixtures/expected/card-sumup.lines.json +1 -1
- package/fixtures/expected/card-sumup.sheet32.json +1 -1
- package/fixtures/expected/card-sumup.sheet48.json +1 -1
- package/fixtures/expected/code-table-receipt.long-item-name.iso8859_15.hex +1 -1
- package/fixtures/expected/code-table-receipt.long-item-name.pc437.hex +1 -1
- package/fixtures/expected/code-table-receipt.long-item-name.pc850.hex +1 -1
- package/fixtures/expected/code-table-receipt.long-item-name.pc858.hex +1 -1
- package/fixtures/expected/code-table-receipt.long-item-name.replacement.hex +1 -1
- package/fixtures/expected/code-table-receipt.long-item-name.wpc1252.hex +1 -1
- package/fixtures/expected/code-table-receipt.sale-cash.iso8859_15.hex +1 -1
- package/fixtures/expected/code-table-receipt.sale-cash.pc437.hex +1 -1
- package/fixtures/expected/code-table-receipt.sale-cash.pc850.hex +1 -1
- package/fixtures/expected/code-table-receipt.sale-cash.pc858.hex +1 -1
- package/fixtures/expected/code-table-receipt.sale-cash.replacement.hex +1 -1
- package/fixtures/expected/code-table-receipt.sale-cash.wpc1252.hex +1 -1
- package/fixtures/expected/code-table-receipt.special-characters.iso8859_15.hex +1 -1
- package/fixtures/expected/code-table-receipt.special-characters.pc437.hex +1 -1
- package/fixtures/expected/code-table-receipt.special-characters.pc850.hex +1 -1
- package/fixtures/expected/code-table-receipt.special-characters.pc858.hex +1 -1
- package/fixtures/expected/code-table-receipt.special-characters.replacement.hex +1 -1
- package/fixtures/expected/code-table-receipt.special-characters.wpc1252.hex +1 -1
- package/fixtures/expected/code-table-receipt.test-cashregister-sale.iso8859_15.hex +1 -1
- package/fixtures/expected/code-table-receipt.test-cashregister-sale.pc437.hex +1 -1
- package/fixtures/expected/code-table-receipt.test-cashregister-sale.pc850.hex +1 -1
- package/fixtures/expected/code-table-receipt.test-cashregister-sale.pc858.hex +1 -1
- package/fixtures/expected/code-table-receipt.test-cashregister-sale.replacement.hex +1 -1
- package/fixtures/expected/code-table-receipt.test-cashregister-sale.wpc1252.hex +1 -1
- package/fixtures/expected/discount-lines.grid32.txt +1 -1
- package/fixtures/expected/discount-lines.grid48.txt +1 -1
- package/fixtures/expected/discount-lines.lines.json +1 -1
- package/fixtures/expected/discount-lines.sheet32.json +1 -1
- package/fixtures/expected/discount-lines.sheet48.json +1 -1
- package/fixtures/expected/discount-owner-tip.grid32.txt +1 -1
- package/fixtures/expected/discount-owner-tip.grid48.txt +1 -1
- package/fixtures/expected/discount-owner-tip.lines.json +1 -1
- package/fixtures/expected/discount-owner-tip.sheet32.json +1 -1
- package/fixtures/expected/discount-owner-tip.sheet48.json +1 -1
- package/fixtures/expected/discount-simple.grid32.txt +1 -1
- package/fixtures/expected/discount-simple.grid48.txt +1 -1
- package/fixtures/expected/discount-simple.lines.json +1 -1
- package/fixtures/expected/discount-simple.sheet32.json +1 -1
- package/fixtures/expected/discount-simple.sheet48.json +1 -1
- package/fixtures/expected/discount-tip.grid32.txt +1 -1
- package/fixtures/expected/discount-tip.grid48.txt +1 -1
- package/fixtures/expected/discount-tip.lines.json +1 -1
- package/fixtures/expected/discount-tip.sheet32.json +1 -1
- package/fixtures/expected/discount-tip.sheet48.json +1 -1
- package/fixtures/expected/discount-value-voucher.grid32.txt +1 -1
- package/fixtures/expected/discount-value-voucher.grid48.txt +1 -1
- package/fixtures/expected/discount-value-voucher.lines.json +1 -1
- package/fixtures/expected/discount-value-voucher.sheet32.json +1 -1
- package/fixtures/expected/discount-value-voucher.sheet48.json +1 -1
- package/fixtures/expected/duplicate.cancellation-full.hex +44 -0
- package/fixtures/expected/duplicate.cancellation-partial.hex +33 -0
- package/fixtures/expected/duplicate.sale-cash-mm58.hex +28 -0
- package/fixtures/expected/duplicate.sale-cash-twice.hex +35 -0
- package/fixtures/expected/duplicate.sale-cash.hex +35 -0
- package/fixtures/expected/duplicate.shift-close.hex +43 -0
- package/fixtures/expected/duplicate.summer-time-last-second.hex +28 -0
- package/fixtures/expected/duplicate.summer-time-start.hex +35 -0
- package/fixtures/expected/duplicate.test-cashregister-sale-logo.hex +189 -0
- package/fixtures/expected/duplicate.voucher-multi-purpose-redeem.hex +37 -0
- package/fixtures/expected/duplicate.voucher-service-redeem-logo.hex +119 -0
- package/fixtures/expected/duplicate.winter-time-first-second.hex +28 -0
- package/fixtures/expected/duplicate.zero-start.hex +40 -0
- package/fixtures/expected/long-item-name.grid32.txt +1 -1
- package/fixtures/expected/long-item-name.grid48.txt +1 -1
- package/fixtures/expected/long-item-name.lines.json +1 -1
- package/fixtures/expected/long-item-name.sheet32.json +1 -1
- package/fixtures/expected/long-item-name.sheet48.json +1 -1
- package/fixtures/expected/sale-card.grid32.txt +1 -1
- package/fixtures/expected/sale-card.grid48.txt +1 -1
- package/fixtures/expected/sale-card.lines.json +1 -1
- package/fixtures/expected/sale-card.sheet32.json +1 -1
- package/fixtures/expected/sale-card.sheet48.json +1 -1
- package/fixtures/expected/sale-cash.grid32.txt +1 -1
- package/fixtures/expected/sale-cash.grid48.txt +1 -1
- package/fixtures/expected/sale-cash.lines.json +1 -1
- package/fixtures/expected/sale-cash.sheet32.json +1 -1
- package/fixtures/expected/sale-cash.sheet48.json +1 -1
- package/fixtures/expected/sale-small-business.grid32.txt +1 -1
- package/fixtures/expected/sale-small-business.grid48.txt +1 -1
- package/fixtures/expected/sale-small-business.lines.json +1 -1
- package/fixtures/expected/sale-small-business.sheet32.json +1 -1
- package/fixtures/expected/sale-small-business.sheet48.json +1 -1
- package/fixtures/expected/signature-outage-sale.grid32.txt +1 -1
- package/fixtures/expected/signature-outage-sale.grid48.txt +1 -1
- package/fixtures/expected/signature-outage-sale.lines.json +1 -1
- package/fixtures/expected/signature-outage-sale.sheet32.json +1 -1
- package/fixtures/expected/signature-outage-sale.sheet48.json +1 -1
- package/fixtures/expected/split-card-card-cash.grid32.txt +1 -1
- package/fixtures/expected/split-card-card-cash.grid48.txt +1 -1
- package/fixtures/expected/split-card-card-cash.lines.json +1 -1
- package/fixtures/expected/split-card-card-cash.sheet32.json +1 -1
- package/fixtures/expected/split-card-card-cash.sheet48.json +1 -1
- package/fixtures/expected/split-cash-change.grid32.txt +1 -1
- package/fixtures/expected/split-cash-change.grid48.txt +1 -1
- package/fixtures/expected/split-cash-change.lines.json +1 -1
- package/fixtures/expected/split-cash-change.sheet32.json +1 -1
- package/fixtures/expected/split-cash-change.sheet48.json +1 -1
- package/fixtures/expected/split-long-amount.grid32.txt +1 -1
- package/fixtures/expected/split-long-amount.grid48.txt +1 -1
- package/fixtures/expected/split-long-amount.lines.json +1 -1
- package/fixtures/expected/split-long-amount.sheet32.json +1 -1
- package/fixtures/expected/split-long-amount.sheet48.json +1 -1
- package/fixtures/expected/split-one-card-tip.grid32.txt +1 -1
- package/fixtures/expected/split-one-card-tip.grid48.txt +1 -1
- package/fixtures/expected/split-one-card-tip.lines.json +1 -1
- package/fixtures/expected/split-one-card-tip.sheet32.json +1 -1
- package/fixtures/expected/split-one-card-tip.sheet48.json +1 -1
- package/fixtures/expected/split-table-round-tip.grid32.txt +1 -1
- package/fixtures/expected/split-table-round-tip.grid48.txt +1 -1
- package/fixtures/expected/split-table-round-tip.lines.json +1 -1
- package/fixtures/expected/split-table-round-tip.sheet32.json +1 -1
- package/fixtures/expected/split-table-round-tip.sheet48.json +1 -1
- package/fixtures/expected/split-tip-card.grid32.txt +1 -1
- package/fixtures/expected/split-tip-card.grid48.txt +1 -1
- package/fixtures/expected/split-tip-card.lines.json +1 -1
- package/fixtures/expected/split-tip-card.sheet32.json +1 -1
- package/fixtures/expected/split-tip-card.sheet48.json +1 -1
- package/fixtures/expected/split-two-cards-same-provider.grid32.txt +1 -1
- package/fixtures/expected/split-two-cards-same-provider.grid48.txt +1 -1
- package/fixtures/expected/split-two-cards-same-provider.lines.json +1 -1
- package/fixtures/expected/split-two-cards-same-provider.sheet32.json +1 -1
- package/fixtures/expected/split-two-cards-same-provider.sheet48.json +1 -1
- package/fixtures/expected/test-cashregister-sale.grid32.txt +1 -1
- package/fixtures/expected/test-cashregister-sale.grid48.txt +1 -1
- package/fixtures/expected/test-cashregister-sale.lines.json +1 -1
- package/fixtures/expected/test-cashregister-sale.sheet32.json +1 -1
- package/fixtures/expected/test-cashregister-sale.sheet48.json +1 -1
- package/fixtures/expected/test-signature-sale.grid32.txt +1 -1
- package/fixtures/expected/test-signature-sale.grid48.txt +1 -1
- package/fixtures/expected/test-signature-sale.lines.json +1 -1
- package/fixtures/expected/test-signature-sale.sheet32.json +1 -1
- package/fixtures/expected/test-signature-sale.sheet48.json +1 -1
- package/fixtures/expected/training.grid32.txt +1 -1
- package/fixtures/expected/training.grid48.txt +1 -1
- package/fixtures/expected/training.lines.json +1 -1
- package/fixtures/expected/training.sheet32.json +1 -1
- package/fixtures/expected/training.sheet48.json +1 -1
- package/fixtures/expected/voucher-multi-purpose-sale.grid32.txt +1 -2
- package/fixtures/expected/voucher-multi-purpose-sale.grid48.txt +1 -1
- package/fixtures/expected/voucher-multi-purpose-sale.lines.json +1 -1
- package/fixtures/expected/voucher-multi-purpose-sale.sheet32.json +1 -7
- package/fixtures/expected/voucher-multi-purpose-sale.sheet48.json +1 -1
- package/fixtures/expected/voucher-single-purpose-redeem-exempt.grid32.txt +1 -1
- package/fixtures/expected/voucher-single-purpose-redeem-exempt.grid48.txt +1 -1
- package/fixtures/expected/voucher-single-purpose-redeem-exempt.lines.json +1 -1
- package/fixtures/expected/voucher-single-purpose-redeem-exempt.sheet32.json +1 -1
- package/fixtures/expected/voucher-single-purpose-redeem-exempt.sheet48.json +1 -1
- package/fixtures/expected/voucher-single-purpose-redeem.grid32.txt +1 -1
- package/fixtures/expected/voucher-single-purpose-redeem.grid48.txt +1 -1
- package/fixtures/expected/voucher-single-purpose-redeem.lines.json +1 -1
- package/fixtures/expected/voucher-single-purpose-redeem.sheet32.json +1 -1
- package/fixtures/expected/voucher-single-purpose-redeem.sheet48.json +1 -1
- package/fixtures/expected/voucher-single-purpose-sale.grid32.txt +2 -3
- package/fixtures/expected/voucher-single-purpose-sale.grid48.txt +2 -2
- package/fixtures/expected/voucher-single-purpose-sale.lines.json +2 -2
- package/fixtures/expected/voucher-single-purpose-sale.sheet32.json +2 -8
- package/fixtures/expected/voucher-single-purpose-sale.sheet48.json +2 -2
- package/fixtures/expected/zero-annual.grid32.txt +1 -1
- package/fixtures/expected/zero-annual.grid48.txt +1 -1
- package/fixtures/expected/zero-annual.lines.json +1 -1
- package/fixtures/expected/zero-annual.sheet32.json +1 -1
- package/fixtures/expected/zero-annual.sheet48.json +1 -1
- package/fixtures/expected/zero-final.grid32.txt +1 -1
- package/fixtures/expected/zero-final.grid48.txt +1 -1
- package/fixtures/expected/zero-final.lines.json +1 -1
- package/fixtures/expected/zero-final.sheet32.json +1 -1
- package/fixtures/expected/zero-final.sheet48.json +1 -1
- package/fixtures/expected/zero-manual.grid32.txt +1 -1
- package/fixtures/expected/zero-manual.grid48.txt +1 -1
- package/fixtures/expected/zero-manual.lines.json +1 -1
- package/fixtures/expected/zero-manual.sheet32.json +1 -1
- package/fixtures/expected/zero-manual.sheet48.json +1 -1
- package/fixtures/expected/zero-monthly.grid32.txt +1 -1
- package/fixtures/expected/zero-monthly.grid48.txt +1 -1
- package/fixtures/expected/zero-monthly.lines.json +1 -1
- package/fixtures/expected/zero-monthly.sheet32.json +1 -1
- package/fixtures/expected/zero-monthly.sheet48.json +1 -1
- package/fixtures/expected/zero-outage-end.grid32.txt +1 -1
- package/fixtures/expected/zero-outage-end.grid48.txt +1 -1
- package/fixtures/expected/zero-outage-end.lines.json +1 -1
- package/fixtures/expected/zero-outage-end.sheet32.json +1 -1
- package/fixtures/expected/zero-outage-end.sheet48.json +1 -1
- package/fixtures/expected/zero-start.grid32.txt +1 -1
- package/fixtures/expected/zero-start.grid48.txt +1 -1
- package/fixtures/expected/zero-start.lines.json +1 -1
- package/fixtures/expected/zero-start.sheet32.json +1 -1
- package/fixtures/expected/zero-start.sheet48.json +1 -1
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api.schema.json +3 -2
- package/fixtures/invoice-texts.json +1 -1
- package/fixtures/manifest.json +260 -260
- package/fixtures/pos-texts.json +118 -1
- package/fixtures/receipt-due-voucher-generated.json +2 -2
- package/fixtures/receipt-outputs-cases.json +2778 -0
- package/fixtures/receipts/cancellation-discount.json +1 -1
- package/fixtures/receipts/cancellation-full.json +1 -1
- package/fixtures/receipts/cancellation-partial.json +1 -1
- package/fixtures/receipts/cancellation-split-full.json +1 -1
- package/fixtures/receipts/cancellation-split-partial.json +1 -1
- package/fixtures/receipts/card-custom.json +1 -1
- package/fixtures/receipts/card-gptom-ios.json +1 -1
- package/fixtures/receipts/card-gptom.json +1 -1
- package/fixtures/receipts/card-hobex-cloud.json +1 -1
- package/fixtures/receipts/card-hobex-hps.json +1 -1
- package/fixtures/receipts/card-mypos.json +1 -1
- package/fixtures/receipts/card-stripe-eps.json +1 -1
- package/fixtures/receipts/card-stripe.json +1 -1
- package/fixtures/receipts/card-sumup.json +1 -1
- package/fixtures/receipts/discount-lines.json +1 -1
- package/fixtures/receipts/discount-owner-tip.json +1 -1
- package/fixtures/receipts/discount-simple.json +1 -1
- package/fixtures/receipts/discount-tip.json +1 -1
- package/fixtures/receipts/discount-value-voucher.json +1 -1
- package/fixtures/receipts/long-item-name.json +1 -1
- package/fixtures/receipts/sale-card.json +1 -1
- package/fixtures/receipts/sale-cash.json +1 -1
- package/fixtures/receipts/sale-small-business.json +1 -1
- package/fixtures/receipts/signature-outage-sale.json +1 -1
- package/fixtures/receipts/split-card-card-cash.json +1 -1
- package/fixtures/receipts/split-cash-change.json +1 -1
- package/fixtures/receipts/split-long-amount.json +1 -1
- package/fixtures/receipts/split-one-card-tip.json +1 -1
- package/fixtures/receipts/split-table-round-tip.json +1 -1
- package/fixtures/receipts/split-tip-card.json +1 -1
- package/fixtures/receipts/split-two-cards-same-provider.json +1 -1
- package/fixtures/receipts/test-cashregister-sale.json +1 -1
- package/fixtures/receipts/test-signature-sale.json +1 -1
- package/fixtures/receipts/training.json +1 -1
- package/fixtures/receipts/zero-annual.json +1 -1
- package/fixtures/receipts/zero-final.json +1 -1
- package/fixtures/receipts/zero-manual.json +1 -1
- package/fixtures/receipts/zero-monthly.json +1 -1
- package/fixtures/receipts/zero-outage-end.json +1 -1
- package/fixtures/receipts/zero-start.json +1 -1
- package/fixtures/surface.json +30 -7
- package/fixtures/v3/README.md +10 -3
- package/fixtures/v3/antworten/belege.json +623 -125
- package/fixtures/v3/antworten/belegmail.json +2 -2
- package/fixtures/v3/antworten/kasse-belege.json +622 -122
- package/fixtures/v3/antworten/kasse.json +479 -38
- package/fixtures/v3/antworten/lager.json +1 -1
- package/fixtures/v3/antworten/rechnungen.json +4 -4
- package/fixtures/v3/antworten/storno.json +211 -3
- package/fixtures/v3/stored/belege.json +2 -2
- package/fixtures/v3/stored/kasse.json +262 -382
- package/fixtures/v3/stored/rechnungen.json +157 -17
- package/fixtures/v3/v3-vokabular.json +311 -28
- package/fixtures/v3/zahlbetrag-faelle.json +1070 -4
- package/package.json +3 -1
- package/dist/cjs/stored/gutscheine.d.ts +0 -3
- package/dist/cjs/stored/gutscheine.js +0 -60
- package/dist/esm/stored/gutscheine.d.ts +0 -3
- package/dist/esm/stored/gutscheine.js +0 -56
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RECEIPT_OUTPUT_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = exports.RECEIPT_OUTPUT_ENTRIES_MAX = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_LOG_KINDS = exports.RECEIPT_OUTPUT_KINDS = void 0;
|
|
4
|
+
exports.receiptOutputsFromWire = receiptOutputsFromWire;
|
|
5
|
+
exports.isReceiptOutputErrorCode = isReceiptOutputErrorCode;
|
|
6
|
+
exports.receiptOutputErrorCode = receiptOutputErrorCode;
|
|
7
|
+
exports.isReceiptOutputError = isReceiptOutputError;
|
|
8
|
+
exports.receiptOutputFieldErrors = receiptOutputFieldErrors;
|
|
9
|
+
const fehlercodes_js_1 = require("../client/fehlercodes.js");
|
|
10
|
+
/*
|
|
11
|
+
* Ausgaben eines Belegs: auf welchem Weg ein Beleg den Betrieb verlassen hat
|
|
12
|
+
* (Erstdruck, Duplikat, E-Mail, Link oder PDF geteilt, vom Kunden geoeffnet).
|
|
13
|
+
* Registrierkassen-Erlass BMF-AV Nr. 2/2026, Abschnitt 4.2: die Art der
|
|
14
|
+
* Belegerteilung ist zu dokumentieren. Das Protokoll fuehrt das Backend neben
|
|
15
|
+
* dem Beleg (nie am Beleg, nie im DEP); die Kasse meldet ihre Drucke und das
|
|
16
|
+
* Teilen mit `logReceiptOutputs`, `getReceipt` liefert unter `/v3` die
|
|
17
|
+
* neuesten 20 Eintraege als `outputs`.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Die Arten einer Ausgabe (Katalog `AUSGABE_ART`): `print` Erstdruck,
|
|
21
|
+
* `reprint` Duplikat, `email` Belegmail, `link_shared` Link geteilt,
|
|
22
|
+
* `pdf_shared` PDF geteilt, `opened` vom Kunden geoeffnet (Abrufe je Stunde).
|
|
23
|
+
*/
|
|
24
|
+
exports.RECEIPT_OUTPUT_KINDS = Object.freeze(['print', 'reprint', 'email', 'link_shared', 'pdf_shared', 'opened']);
|
|
25
|
+
/**
|
|
26
|
+
* Die Arten, die eine Kasse selbst meldet. `email` und `opened` schreibt das
|
|
27
|
+
* Backend selbst (beim Versand bzw. beim Abruf des Links); meldet eine Kasse
|
|
28
|
+
* sie, lehnt der Server genau diesen Eintrag ab (`invalid_output_kind`).
|
|
29
|
+
*/
|
|
30
|
+
exports.RECEIPT_OUTPUT_LOG_KINDS = Object.freeze(['print', 'reprint', 'link_shared', 'pdf_shared']);
|
|
31
|
+
/** Ergebnis einer Ausgabe (Katalog `AUSGABE_ERGEBNIS`); Mail und Abruf sind immer `ok`. */
|
|
32
|
+
exports.RECEIPT_OUTPUT_RESULTS = Object.freeze(['ok', 'failed', 'unclear']);
|
|
33
|
+
/** Hoechstens so viele Eintraege je Aufruf von `logReceiptOutputs`. */
|
|
34
|
+
exports.RECEIPT_OUTPUT_ENTRIES_MAX = 50;
|
|
35
|
+
/**
|
|
36
|
+
* Liest `data.outputs` nachsichtig: das Protokoll ist eine Auskunft neben dem
|
|
37
|
+
* Beleg und darf das Lesen, Anzeigen und Nachdrucken des Belegs nie scheitern
|
|
38
|
+
* lassen. Keine Liste: `undefined` (Antwort ohne Protokoll, etwa `/api` oder
|
|
39
|
+
* `createReceipt`). Ein Eintrag ohne lesbare Art, Zeit oder Ergebnis faellt
|
|
40
|
+
* weg; ein Handelnder ohne Kennung gilt als `null`, eine Anzahl, die keine
|
|
41
|
+
* ganze Zahl ab 0 ist, fehlt. Paketintern.
|
|
42
|
+
*/
|
|
43
|
+
function receiptOutputsFromWire(roh) {
|
|
44
|
+
if (!Array.isArray(roh))
|
|
45
|
+
return undefined;
|
|
46
|
+
const raus = [];
|
|
47
|
+
for (const e of roh) {
|
|
48
|
+
if (e === null || typeof e !== 'object' || Array.isArray(e))
|
|
49
|
+
continue;
|
|
50
|
+
const { kind, at, result, by, count } = e;
|
|
51
|
+
if (typeof kind !== 'string' || kind === '' || typeof at !== 'string' || at === '' || typeof result !== 'string' || result === '')
|
|
52
|
+
continue;
|
|
53
|
+
const eintrag = { kind, at, result, by: handelnder(by) };
|
|
54
|
+
if (typeof count === 'number' && Number.isSafeInteger(count) && count >= 0)
|
|
55
|
+
eintrag.count = count;
|
|
56
|
+
raus.push(eintrag);
|
|
57
|
+
}
|
|
58
|
+
return raus;
|
|
59
|
+
}
|
|
60
|
+
function handelnder(w) {
|
|
61
|
+
if (w === null || typeof w !== 'object' || Array.isArray(w))
|
|
62
|
+
return null;
|
|
63
|
+
const { id, name } = w;
|
|
64
|
+
if (typeof id !== 'string' || id === '')
|
|
65
|
+
return null;
|
|
66
|
+
return { id, name: typeof name === 'string' ? name : null };
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Codes je Eintrag in `rejected[].code` einer Antwort von
|
|
70
|
+
* `logReceiptOutputs`: der Eintrag ist dauerhaft abgelehnt (aus dem Puffer
|
|
71
|
+
* nehmen, nicht noch einmal senden). `validation` heisst hier: ein Druck ohne
|
|
72
|
+
* oder mit unbekanntem Ergebnis.
|
|
73
|
+
*/
|
|
74
|
+
exports.RECEIPT_OUTPUT_ENTRY_ERROR_CODES = Object.freeze([
|
|
75
|
+
'receipt_not_found', // Beleg gibt es nicht ODER er liegt in einer anderen Kasse
|
|
76
|
+
'invalid_output_kind', // Art, die die Kasse nicht meldet (email, opened)
|
|
77
|
+
'output_time_out_of_range', // unlesbare Zeit oder ohne Zone (eine falsch gehende Uhr klemmt der Server)
|
|
78
|
+
'idempotency_key_required', // Schluessel fehlt oder hat nicht 8-64 Zeichen [A-Za-z0-9_-]
|
|
79
|
+
'validation', // Druck ohne bzw. mit unbekanntem Ergebnis
|
|
80
|
+
]);
|
|
81
|
+
/**
|
|
82
|
+
* Fehlercodes von `logReceiptOutputs`, wenn die ganze Anfrage scheitert
|
|
83
|
+
* (Vokabular `errorCodes.registerHandlersByEndpoint.logReceiptOutputs`),
|
|
84
|
+
* dahinter die Codes, die Anmeldung und Rand auf diesem Endpunkt erzeugen
|
|
85
|
+
* koennen (`errorCodes.auth` ohne die sieben des Partner-Zugangs,
|
|
86
|
+
* `errorCodes.edge`), zuletzt `route_missing` (Code des Pakets). Ein Code
|
|
87
|
+
* ausserhalb bleibt ueber `KasseneckApiError.code` lesbar.
|
|
88
|
+
*/
|
|
89
|
+
exports.RECEIPT_OUTPUT_ERROR_CODES = Object.freeze([
|
|
90
|
+
'idempotency_key_required',
|
|
91
|
+
'invalid_output_kind',
|
|
92
|
+
'output_time_out_of_range',
|
|
93
|
+
'receipt_not_found',
|
|
94
|
+
'server_error',
|
|
95
|
+
'validation',
|
|
96
|
+
// Anmeldung und Rand (errorCodes.auth ohne Partner-Zugang, errorCodes.edge)
|
|
97
|
+
'account_not_found',
|
|
98
|
+
'action_confirmation_required',
|
|
99
|
+
'admin_required',
|
|
100
|
+
'api_not_approved',
|
|
101
|
+
'app_check_invalid',
|
|
102
|
+
'app_check_missing',
|
|
103
|
+
'cashregister_not_assigned',
|
|
104
|
+
'cashregister_not_found',
|
|
105
|
+
'cashregister_token_invalid',
|
|
106
|
+
'cashregister_token_missing',
|
|
107
|
+
'dialect_mismatch',
|
|
108
|
+
'internal_translation_error',
|
|
109
|
+
'live_not_enabled',
|
|
110
|
+
'method_not_allowed',
|
|
111
|
+
'mfa_required',
|
|
112
|
+
'not_found',
|
|
113
|
+
'password_change_required',
|
|
114
|
+
'register_user_no_business',
|
|
115
|
+
'register_user_not_allowed',
|
|
116
|
+
'register_user_not_found',
|
|
117
|
+
'response_translation_failed',
|
|
118
|
+
'second_factor_required',
|
|
119
|
+
'session_expired',
|
|
120
|
+
'session_other_cashregister',
|
|
121
|
+
'unauthorized',
|
|
122
|
+
'user_disabled',
|
|
123
|
+
'user_verification_failed',
|
|
124
|
+
// Code des Pakets (CLIENT_ERROR_CODES)
|
|
125
|
+
'route_missing',
|
|
126
|
+
]);
|
|
127
|
+
function isReceiptOutputErrorCode(value) {
|
|
128
|
+
return typeof value === 'string' && exports.RECEIPT_OUTPUT_ERROR_CODES.includes(value);
|
|
129
|
+
}
|
|
130
|
+
const BEKANNT = new Set(exports.RECEIPT_OUTPUT_ERROR_CODES);
|
|
131
|
+
/** Der Code eines geworfenen Fehlers, wenn er in [RECEIPT_OUTPUT_ERROR_CODES] steht; sonst `undefined`. */
|
|
132
|
+
function receiptOutputErrorCode(error) {
|
|
133
|
+
return (0, fehlercodes_js_1.bekannterCode)(error, BEKANNT);
|
|
134
|
+
}
|
|
135
|
+
/** Ohne `code`: traegt der Fehler ueberhaupt einen Code aus [RECEIPT_OUTPUT_ERROR_CODES]? */
|
|
136
|
+
function isReceiptOutputError(error, code) {
|
|
137
|
+
const gefunden = receiptOutputErrorCode(error);
|
|
138
|
+
return gefunden !== undefined && (code === undefined || gefunden === code);
|
|
139
|
+
}
|
|
140
|
+
/** Die Feldfehler einer `validation`-Antwort; leer, wenn es keine sind. */
|
|
141
|
+
function receiptOutputFieldErrors(error) {
|
|
142
|
+
return (0, fehlercodes_js_1.feldfehlerVon)(error);
|
|
143
|
+
}
|
|
@@ -155,10 +155,10 @@ export declare function readRegistrationInfo(roh: {
|
|
|
155
155
|
export declare function receiptValueVoucherSign(receipt: Receipt): 1 | -1;
|
|
156
156
|
/**
|
|
157
157
|
* Zwischensumme in **Cent** — Positionen plus verkaufte Wertgutscheine minus
|
|
158
|
-
* eingeloeste
|
|
158
|
+
* eingeloeste Aktionsgutscheine. Wertgutschein-Einloesungen wirken erst auf
|
|
159
159
|
* [receiptSumCents], nicht hier (siehe Dart-Vorbild `subSumCents`/`sumCents`).
|
|
160
160
|
* Am Storno-Beleg zaehlen Wertgutscheine mit umgekehrtem Vorzeichen
|
|
161
|
-
* ([receiptValueVoucherSign]), und ein gespiegelter
|
|
161
|
+
* ([receiptValueVoucherSign]), und ein gespiegelter Aktionsgutschein
|
|
162
162
|
* mindert nichts: den Rabatt nimmt der Server dort ueber Ausgleichspositionen
|
|
163
163
|
* (`kind: 'discount'`) zurueck, und belegToepfe verteilt einen Promo-Eintrag
|
|
164
164
|
* nur auf eine positive Topfsumme, die ein Storno nie hat.
|
|
@@ -150,10 +150,10 @@ function receiptValueVoucherSign(receipt) {
|
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
152
152
|
* Zwischensumme in **Cent** — Positionen plus verkaufte Wertgutscheine minus
|
|
153
|
-
* eingeloeste
|
|
153
|
+
* eingeloeste Aktionsgutscheine. Wertgutschein-Einloesungen wirken erst auf
|
|
154
154
|
* [receiptSumCents], nicht hier (siehe Dart-Vorbild `subSumCents`/`sumCents`).
|
|
155
155
|
* Am Storno-Beleg zaehlen Wertgutscheine mit umgekehrtem Vorzeichen
|
|
156
|
-
* ([receiptValueVoucherSign]), und ein gespiegelter
|
|
156
|
+
* ([receiptValueVoucherSign]), und ein gespiegelter Aktionsgutschein
|
|
157
157
|
* mindert nichts: den Rabatt nimmt der Server dort ueber Ausgleichspositionen
|
|
158
158
|
* (`kind: 'discount'`) zurueck, und belegToepfe verteilt einen Promo-Eintrag
|
|
159
159
|
* nur auf eine positive Topfsumme, die ein Storno nie hat.
|
|
@@ -38,6 +38,28 @@ export interface Voucher {
|
|
|
38
38
|
exempt?: boolean;
|
|
39
39
|
zeroRateBucket?: boolean;
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Ein ausgestellter Gutschein in der Antwort von `createReceipt` unter `/v3`
|
|
43
|
+
* (`data.issuedVouchers[]`): der Klartext-Code erscheint hier einmalig fuer das Etikett.
|
|
44
|
+
*/
|
|
45
|
+
export interface IssuedVoucher {
|
|
46
|
+
id: string;
|
|
47
|
+
/** Klartext-Code; nie in Logs oder Fehlertexte schreiben. */
|
|
48
|
+
code: string;
|
|
49
|
+
type: string;
|
|
50
|
+
index: number;
|
|
51
|
+
codeSuffix: string;
|
|
52
|
+
faceValueCents?: number;
|
|
53
|
+
quantity?: number;
|
|
54
|
+
/** Nur bei Leistungsgutscheinen: Name des verkauften Artikels; sonst fehlt das Feld. */
|
|
55
|
+
articleName?: string;
|
|
56
|
+
validity?: {
|
|
57
|
+
pattern: string;
|
|
58
|
+
redeemableUntil: string | null;
|
|
59
|
+
refundableUntil: string | null;
|
|
60
|
+
validUntil: string | null;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
41
63
|
/** Artikel eines Leistungsgutscheins, wie der Server ihn am Beleg festhaelt. */
|
|
42
64
|
export interface VoucherArticle {
|
|
43
65
|
id: string;
|
|
@@ -87,8 +109,8 @@ export declare function voucherServerFields(voucher: Voucher): string[];
|
|
|
87
109
|
export declare function toVoucherPayload(voucher: Voucher): VoucherPayload;
|
|
88
110
|
/**
|
|
89
111
|
* Ist der Gutschein an das Backend sendbar? Zwilling von `KeckVoucher.isValid`
|
|
90
|
-
* im Flutter-Vorbild: Wert- und
|
|
91
|
-
*
|
|
112
|
+
* im Flutter-Vorbild: Wert- und Aktionsgutscheine brauchen einen Wert,
|
|
113
|
+
* Aktionsgutscheine duerfen nur eingeloest (nicht verkauft) werden, und ein
|
|
92
114
|
* gesetzter Wert muss positiv sein.
|
|
93
115
|
*/
|
|
94
116
|
export declare function voucherIsValid(voucher: Voucher): boolean;
|
|
@@ -53,8 +53,8 @@ function toVoucherPayload(voucher) {
|
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
55
|
* Ist der Gutschein an das Backend sendbar? Zwilling von `KeckVoucher.isValid`
|
|
56
|
-
* im Flutter-Vorbild: Wert- und
|
|
57
|
-
*
|
|
56
|
+
* im Flutter-Vorbild: Wert- und Aktionsgutscheine brauchen einen Wert,
|
|
57
|
+
* Aktionsgutscheine duerfen nur eingeloest (nicht verkauft) werden, und ein
|
|
58
58
|
* gesetzter Wert muss positiv sein.
|
|
59
59
|
*/
|
|
60
60
|
function voucherIsValid(voucher) {
|
|
@@ -104,7 +104,7 @@ export interface BusinessAddress {
|
|
|
104
104
|
city: string;
|
|
105
105
|
}
|
|
106
106
|
export interface BusinessTaxDetails {
|
|
107
|
-
/** Steuernummer im Format `
|
|
107
|
+
/** Steuernummer im Format `91-123/4565`; die Pruefziffer wird geprueft. */
|
|
108
108
|
taxNumber: string;
|
|
109
109
|
smallBusiness: boolean;
|
|
110
110
|
/**
|
package/dist/cjs/pos/index.d.ts
CHANGED
|
@@ -22,5 +22,6 @@ export { VOUCHER_KINDS, VOUCHER_STATUSES, checkVoucher, reprintVoucherLabel, VOU
|
|
|
22
22
|
export { type GetMyDrawerStateOptions, type OpenMyShiftOptions, type RecordMyCashMovementOptions, type DrawerOpeningEntry, type LogMyDrawerOpeningsOptions, type GetMyShiftReportOptions, type TipPayout, type CloseMyShiftOptions, type AfterCountOption, getMyDrawerState, openMyShift, recordMyCashMovement, logMyDrawerOpenings, getMyShiftReport, closeMyShift, sumDenominations, parseCentsAllowZero, newIdempotencyKey, shiftTipLines, durationText, type ShiftTipLine, type ShiftTipLineKey, } from './schicht.js';
|
|
23
23
|
export { EUR_DENOMINATIONS, MOVEMENT_TYPES, MANUAL_MOVEMENT_TYPES, CASH_LOCATIONS, OPENING_REASONS, MANUAL_OPENING_REASONS, SHIFT_RECEIPT_KINDS, AFTER_COUNT_TYPES, type AfterCountType, type AfterCount, type EurDenomination, type MovementType, type ManualMovementType, type CashLocation, type OpeningReason, type ManualOpeningReason, type ShiftReceiptKind, type ShiftStatus, type ShiftActorRole, type Denominations, type ShiftActor, type DrawerInfo, type DrawerRights, type NonCashAmount, type ShiftTipTotals, type ShiftTip, type ShiftRunningTotals, type ShiftReconciliation, type Shift, type TipClaim, type DrawerOpening, type DrawerState, type CashMovement, type ShiftReceiptHeader, type ShiftReceiptMovement, type ShiftReceiptTip, type ShiftSummaryReceipt, type CashMovementReceipt, type ShiftReceipt, type OpenShiftResult, type CashMovementResult, type DrawerOpeningsResult, type ShiftReport, type CloseShiftResult, } from './schicht-typen.js';
|
|
24
24
|
export { type ShiftReceiptLayoutOptions, shiftReceiptLayout, cashMovementLayout } from '../receipt/shift-sheet.js';
|
|
25
|
+
export { RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputKind, type ReceiptOutputResult } from '../models/receipt-output.js';
|
|
25
26
|
export { RETURN_DISPOSITIONS, isReturnDisposition, type ReturnDisposition } from '../models/cancellation.js';
|
|
26
|
-
export { MESSAGES, ERROR_RULES, ERROR_CODE_RULES, ERROR_OUTCOME_RULES, CALLS_WITH_EFFECT, findErrorRule, messageOutcome, messageText, messageAppliesTo, RECEIPT_EMAIL_ERROR_MESSAGES, receiptEmailErrorMessage, CANCELLATION_PAYMENT_ERROR_MESSAGES, cancellationPaymentErrorMessage, VOUCHER_ERROR_MESSAGES, voucherErrorMessage, LABELS, labelText, RETURN_DISPOSITION_LABELS, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
|
|
27
|
+
export { MESSAGES, ERROR_RULES, ERROR_CODE_RULES, ERROR_OUTCOME_RULES, CALLS_WITH_EFFECT, findErrorRule, messageOutcome, messageText, messageAppliesTo, RECEIPT_EMAIL_ERROR_MESSAGES, receiptEmailErrorMessage, CANCELLATION_PAYMENT_ERROR_MESSAGES, cancellationPaymentErrorMessage, VOUCHER_ERROR_MESSAGES, voucherErrorMessage, LABELS, labelText, RETURN_DISPOSITION_LABELS, receiptOutputLabel, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
|
package/dist/cjs/pos/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.quantityRuleForUnit = exports.QUANTITY_RULES = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.DONE_SCREEN_SECONDS = exports.WATERMARK_SCALE = exports.LOGO_SCALE = exports.WATERMARK_STRENGTH = exports.WATERMARK_SIDE = exports.DISCOUNT = exports.AUTO_LOGOUT_MINUTES = exports.TILE_STYLE = exports.SETTINGS_FONT_SIZE = exports.LOGO_SIZE = exports.QR_MODE = exports.DRAWER_AUTO_OPEN = exports.CUT = exports.CODE_PAGE = exports.PAPER_SIZE = exports.TERMINAL_TYPE = exports.TERMINAL_VIA = exports.PRINTER_TYPE = exports.TILE_HEIGHT = exports.CATEGORY_POSITION = exports.LAYOUT = exports.RECEIPT_OUTPUT = exports.CARD_PROVIDER = exports.CHECKOUT_MODE = exports.TIP_MODE = exports.QUANTITY = exports.WATERMARK = exports.FONT_SIZE = exports.THEME = exports.posShortcutConflict = exports.POS_SHORTCUT_SHARED_PAIRS = exports.posSettingsChanges = exports.unknownPosSettingValues = exports.sanitizePosSettings = exports.mergePosSettings = exports.POS_DEVICE_VALUES = exports.POS_BUSINESS_VALUES = exports.posTipKeptByDefault = exports.POS_BUSINESS_OPTIONAL_FIELDS = exports.POS_DEVICE_OPTIONAL_FIELDS = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.POS_SHORTCUT_DEFAULTS = exports.POS_SHORTCUT_ACTIONS = void 0;
|
|
4
4
|
exports.shiftTipLines = exports.newIdempotencyKey = exports.parseCentsAllowZero = exports.sumDenominations = exports.closeMyShift = exports.getMyShiftReport = exports.logMyDrawerOpenings = exports.recordMyCashMovement = exports.openMyShift = exports.getMyDrawerState = exports.posVoucherSettingsFromWire = exports.VOUCHER_SETTINGS_DEFAULTS = exports.reprintVoucherLabel = exports.checkVoucher = exports.VOUCHER_STATUSES = exports.VOUCHER_KINDS = exports.parseQuantityMilli = exports.voidMyStocktakeCount = exports.recordMyStocktakeCount = exports.listMyStocktakeCounts = exports.listMyStocktakeItems = exports.listMyStocktakes = exports.setMyCashregisterStockLocation = exports.listMyStock = exports.listMyStockLocations = exports.STOCK_LOCATION_TYPES = exports.listMyTipRecipients = exports.getPrintJob = exports.createPrintJob = exports.listMyPrinters = exports.isPrintJobFinished = exports.PRINT_JOB_SOURCES = exports.PRINT_JOB_STATUSES = exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.posFieldErrors = exports.isPosError = exports.posErrorCode = exports.isPosErrorCode = exports.POS_ERROR_CODES = exports.posSettingsFromWire = exports.setMyPosLogo = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.allowedQuantity = exports.quantityDefaults = void 0;
|
|
5
|
-
exports.RETURN_DISPOSITION_LABELS = exports.labelText = exports.LABELS = exports.voucherErrorMessage = exports.VOUCHER_ERROR_MESSAGES = exports.cancellationPaymentErrorMessage = exports.CANCELLATION_PAYMENT_ERROR_MESSAGES = exports.receiptEmailErrorMessage = exports.RECEIPT_EMAIL_ERROR_MESSAGES = exports.messageAppliesTo = exports.messageText = exports.messageOutcome = exports.findErrorRule = exports.CALLS_WITH_EFFECT = exports.ERROR_OUTCOME_RULES = exports.ERROR_CODE_RULES = exports.ERROR_RULES = exports.MESSAGES = exports.isReturnDisposition = exports.RETURN_DISPOSITIONS = exports.cashMovementLayout = exports.shiftReceiptLayout = exports.AFTER_COUNT_TYPES = exports.SHIFT_RECEIPT_KINDS = exports.MANUAL_OPENING_REASONS = exports.OPENING_REASONS = exports.CASH_LOCATIONS = exports.MANUAL_MOVEMENT_TYPES = exports.MOVEMENT_TYPES = exports.EUR_DENOMINATIONS = exports.durationText = void 0;
|
|
5
|
+
exports.receiptOutputLabel = exports.RETURN_DISPOSITION_LABELS = exports.labelText = exports.LABELS = exports.voucherErrorMessage = exports.VOUCHER_ERROR_MESSAGES = exports.cancellationPaymentErrorMessage = exports.CANCELLATION_PAYMENT_ERROR_MESSAGES = exports.receiptEmailErrorMessage = exports.RECEIPT_EMAIL_ERROR_MESSAGES = exports.messageAppliesTo = exports.messageText = exports.messageOutcome = exports.findErrorRule = exports.CALLS_WITH_EFFECT = exports.ERROR_OUTCOME_RULES = exports.ERROR_CODE_RULES = exports.ERROR_RULES = exports.MESSAGES = exports.isReturnDisposition = exports.RETURN_DISPOSITIONS = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_KINDS = exports.cashMovementLayout = exports.shiftReceiptLayout = exports.AFTER_COUNT_TYPES = exports.SHIFT_RECEIPT_KINDS = exports.MANUAL_OPENING_REASONS = exports.OPENING_REASONS = exports.CASH_LOCATIONS = exports.MANUAL_MOVEMENT_TYPES = exports.MOVEMENT_TYPES = exports.EUR_DENOMINATIONS = exports.durationText = void 0;
|
|
6
6
|
/**
|
|
7
7
|
* Kachel-Kasse: Einstellungen, Artikelgruppen/Artikel fuer Kacheln,
|
|
8
8
|
* Rabattverteilung, Drucker, Trinkgeld-Empfaenger, Lager (Standorte, Bestand,
|
|
@@ -141,6 +141,10 @@ Object.defineProperty(exports, "AFTER_COUNT_TYPES", { enumerable: true, get: fun
|
|
|
141
141
|
var shift_sheet_js_1 = require("../receipt/shift-sheet.js");
|
|
142
142
|
Object.defineProperty(exports, "shiftReceiptLayout", { enumerable: true, get: function () { return shift_sheet_js_1.shiftReceiptLayout; } });
|
|
143
143
|
Object.defineProperty(exports, "cashMovementLayout", { enumerable: true, get: function () { return shift_sheet_js_1.cashMovementLayout; } });
|
|
144
|
+
// Ausgaben eines Belegs (Belegdetail: Art und Ergebnis -> Beschriftung); dieselben Listen wie an der Wurzel.
|
|
145
|
+
var receipt_output_js_1 = require("../models/receipt-output.js");
|
|
146
|
+
Object.defineProperty(exports, "RECEIPT_OUTPUT_KINDS", { enumerable: true, get: function () { return receipt_output_js_1.RECEIPT_OUTPUT_KINDS; } });
|
|
147
|
+
Object.defineProperty(exports, "RECEIPT_OUTPUT_RESULTS", { enumerable: true, get: function () { return receipt_output_js_1.RECEIPT_OUTPUT_RESULTS; } });
|
|
144
148
|
// Rueckgabe-Wahl beim Storno (Kassen-Dialog); dieselbe Liste wie an der Wurzel.
|
|
145
149
|
var cancellation_js_1 = require("../models/cancellation.js");
|
|
146
150
|
Object.defineProperty(exports, "RETURN_DISPOSITIONS", { enumerable: true, get: function () { return cancellation_js_1.RETURN_DISPOSITIONS; } });
|
|
@@ -165,3 +169,4 @@ Object.defineProperty(exports, "voucherErrorMessage", { enumerable: true, get: f
|
|
|
165
169
|
Object.defineProperty(exports, "LABELS", { enumerable: true, get: function () { return texte_js_1.LABELS; } });
|
|
166
170
|
Object.defineProperty(exports, "labelText", { enumerable: true, get: function () { return texte_js_1.labelText; } });
|
|
167
171
|
Object.defineProperty(exports, "RETURN_DISPOSITION_LABELS", { enumerable: true, get: function () { return texte_js_1.RETURN_DISPOSITION_LABELS; } });
|
|
172
|
+
Object.defineProperty(exports, "receiptOutputLabel", { enumerable: true, get: function () { return texte_js_1.receiptOutputLabel; } });
|
|
@@ -37,10 +37,10 @@ export declare const CASH_LOCATIONS: readonly ["bank", "safe"];
|
|
|
37
37
|
export type CashLocation = (typeof CASH_LOCATIONS)[number];
|
|
38
38
|
/**
|
|
39
39
|
* Warum die Lade aufging (Katalog `LADE_OEFFNUNG_GRUND`). `sale`,
|
|
40
|
-
* `cash_movement`, `shift_open` und `
|
|
40
|
+
* `cash_movement`, `shift_open`, `shift_close` und `voucher_payout` meldet die Kasse selbst beim
|
|
41
41
|
* jeweiligen Vorgang; von Hand waehlt der Kassier aus [MANUAL_OPENING_REASONS].
|
|
42
42
|
*/
|
|
43
|
-
export declare const OPENING_REASONS: readonly ["sale", "cash_movement", "shift_open", "shift_close", "change", "check", "misoperation", "other"];
|
|
43
|
+
export declare const OPENING_REASONS: readonly ["sale", "cash_movement", "shift_open", "shift_close", "change", "check", "misoperation", "other", "voucher_payout"];
|
|
44
44
|
export type OpeningReason = (typeof OPENING_REASONS)[number];
|
|
45
45
|
/** Die Gruende des Knopfs „Lade“; `other` braucht einen Text (`note`). */
|
|
46
46
|
export declare const MANUAL_OPENING_REASONS: readonly ["change", "check", "misoperation", "other"];
|
|
@@ -41,11 +41,11 @@ exports.MANUAL_MOVEMENT_TYPES = Object.freeze([
|
|
|
41
41
|
exports.CASH_LOCATIONS = Object.freeze(['bank', 'safe']);
|
|
42
42
|
/**
|
|
43
43
|
* Warum die Lade aufging (Katalog `LADE_OEFFNUNG_GRUND`). `sale`,
|
|
44
|
-
* `cash_movement`, `shift_open` und `
|
|
44
|
+
* `cash_movement`, `shift_open`, `shift_close` und `voucher_payout` meldet die Kasse selbst beim
|
|
45
45
|
* jeweiligen Vorgang; von Hand waehlt der Kassier aus [MANUAL_OPENING_REASONS].
|
|
46
46
|
*/
|
|
47
47
|
exports.OPENING_REASONS = Object.freeze([
|
|
48
|
-
'sale', 'cash_movement', 'shift_open', 'shift_close', 'change', 'check', 'misoperation', 'other',
|
|
48
|
+
'sale', 'cash_movement', 'shift_open', 'shift_close', 'change', 'check', 'misoperation', 'other', 'voucher_payout',
|
|
49
49
|
]);
|
|
50
50
|
/** Die Gruende des Knopfs „Lade“; `other` braucht einen Text (`note`). */
|
|
51
51
|
exports.MANUAL_OPENING_REASONS = Object.freeze(['change', 'check', 'misoperation', 'other']);
|
|
@@ -199,7 +199,7 @@ export interface PosBusinessSettings {
|
|
|
199
199
|
tipKeptByDefault?: boolean;
|
|
200
200
|
}
|
|
201
201
|
/** Aktionen der Kasse, die eine Taste bekommen koennen (Schluessel von `device.shortcuts`). */
|
|
202
|
-
export declare const POS_SHORTCUT_ACTIONS: readonly ["checkout", "complete", "cancel", "customAmount", "cash", "card", "exactAmount", "receipts", "undoLast", "settings", "logout", "tip", "fullscreen", "clearTendered", "clearCart", "splitPayment"];
|
|
202
|
+
export declare const POS_SHORTCUT_ACTIONS: readonly ["checkout", "complete", "cancel", "customAmount", "cash", "card", "exactAmount", "receipts", "undoLast", "settings", "logout", "tip", "fullscreen", "clearTendered", "clearCart", "splitPayment", "shiftStatus", "openDrawer", "voucherPayout"];
|
|
203
203
|
export type PosShortcutAction = typeof POS_SHORTCUT_ACTIONS[number];
|
|
204
204
|
/** Tastenkarte: Aktion -> Tasten (`Mod+F`, `Enter`, `Escape`, `F5` ...; `Mod` = ⌘ auf dem Mac, Strg sonst). */
|
|
205
205
|
export type PosShortcutMap = Record<PosShortcutAction, string[]>;
|
package/dist/cjs/pos/settings.js
CHANGED
|
@@ -103,6 +103,7 @@ exports.DONE_SCREEN_SECONDS = [0, 3, 5, 10, 15, 30, 60];
|
|
|
103
103
|
exports.POS_SHORTCUT_ACTIONS = [
|
|
104
104
|
'checkout', 'complete', 'cancel', 'customAmount', 'cash', 'card', 'exactAmount', 'receipts', 'undoLast',
|
|
105
105
|
'settings', 'logout', 'tip', 'fullscreen', 'clearTendered', 'clearCart', 'splitPayment',
|
|
106
|
+
'shiftStatus', 'openDrawer', 'voucherPayout',
|
|
106
107
|
];
|
|
107
108
|
exports.POS_SHORTCUT_DEFAULTS = Object.freeze({
|
|
108
109
|
checkout: ['Enter'], complete: ['Enter'], cancel: ['Escape'],
|
|
@@ -126,6 +127,10 @@ exports.POS_SHORTCUT_DEFAULTS = Object.freeze({
|
|
|
126
127
|
// Bewusst ohne Vorgabe: jede freie Mod-Taste ist in irgendeinem Browser
|
|
127
128
|
// belegt oder am Geraet unerprobt. Der Chef vergibt sie, wenn er sie braucht.
|
|
128
129
|
splitPayment: [],
|
|
130
|
+
// Ebenso ohne Vorgabe: Kassenstand, Kassenlade und Gutschein auszahlen. Der
|
|
131
|
+
// Server fuehrt sie nicht in seiner Vorgabekarte; fehlen sie in einer
|
|
132
|
+
// Antwort, heisst das „keine Taste“ (leere Liste), nie eine geratene Taste.
|
|
133
|
+
shiftStatus: [], openDrawer: [], voucherPayout: [],
|
|
129
134
|
});
|
|
130
135
|
/**
|
|
131
136
|
* Aktionen, die sich eine Taste teilen duerfen (Backend `TASTEN_PAARE`): sie
|
package/dist/cjs/pos/texte.d.ts
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* `only`), die Platzhalter und die Arten der Fehlerregeln (Abschnitte
|
|
21
21
|
* `placeholders` und `structure`).
|
|
22
22
|
*/
|
|
23
|
+
import type { ReceiptOutput } from '../models/receipt-output.js';
|
|
23
24
|
import { type ErrorOutcome } from '../client/errors.js';
|
|
24
25
|
export type Surface = 'web' | 'app';
|
|
25
26
|
export interface TextEntry {
|
|
@@ -1669,6 +1670,9 @@ declare const BESCHRIFTUNGEN_ROH: {
|
|
|
1669
1670
|
readonly 'drawer.reason_shift_close': {
|
|
1670
1671
|
readonly text: "Schichtabschluss";
|
|
1671
1672
|
};
|
|
1673
|
+
readonly 'drawer.reason_voucher_payout': {
|
|
1674
|
+
readonly text: "Gutschein-Auszahlung";
|
|
1675
|
+
};
|
|
1672
1676
|
readonly 'shift.resend': {
|
|
1673
1677
|
readonly text: "Erneut senden";
|
|
1674
1678
|
};
|
|
@@ -1766,6 +1770,79 @@ declare const BESCHRIFTUNGEN_ROH: {
|
|
|
1766
1770
|
readonly text: "Gutschein ····-{suffix}";
|
|
1767
1771
|
readonly placeholders: readonly ["suffix"];
|
|
1768
1772
|
};
|
|
1773
|
+
readonly 'quantity.at_most': {
|
|
1774
|
+
readonly text: "höchstens {count}";
|
|
1775
|
+
readonly placeholders: readonly ["count"];
|
|
1776
|
+
};
|
|
1777
|
+
readonly 'quantity.at_least': {
|
|
1778
|
+
readonly text: "mindestens {count}";
|
|
1779
|
+
readonly placeholders: readonly ["count"];
|
|
1780
|
+
};
|
|
1781
|
+
readonly 'receipts.number_hint': {
|
|
1782
|
+
readonly text: "Nummer";
|
|
1783
|
+
};
|
|
1784
|
+
readonly 'receipts.clear_number': {
|
|
1785
|
+
readonly text: "Nummer löschen";
|
|
1786
|
+
};
|
|
1787
|
+
readonly 'receipts.open': {
|
|
1788
|
+
readonly text: "Öffnen";
|
|
1789
|
+
};
|
|
1790
|
+
readonly 'receipt.creating': {
|
|
1791
|
+
readonly text: "Beleg wird erstellt …";
|
|
1792
|
+
};
|
|
1793
|
+
readonly 'receipt_done.sale_title': {
|
|
1794
|
+
readonly text: "Verkauf abgeschlossen";
|
|
1795
|
+
};
|
|
1796
|
+
readonly 'receipt_done.paid_by_voucher': {
|
|
1797
|
+
readonly text: "mit Gutschein bezahlt";
|
|
1798
|
+
};
|
|
1799
|
+
readonly 'receipt_done.payout_title': {
|
|
1800
|
+
readonly text: "Auszahlung abgeschlossen";
|
|
1801
|
+
};
|
|
1802
|
+
readonly 'receipt_done.paid_out': {
|
|
1803
|
+
readonly text: "{method} ausgezahlt";
|
|
1804
|
+
readonly placeholders: readonly ["method"];
|
|
1805
|
+
};
|
|
1806
|
+
readonly 'voucher.code_mask': {
|
|
1807
|
+
readonly text: "····-{suffix}";
|
|
1808
|
+
readonly placeholders: readonly ["suffix"];
|
|
1809
|
+
};
|
|
1810
|
+
readonly 'cart.close': {
|
|
1811
|
+
readonly text: "Warenkorb schließen";
|
|
1812
|
+
};
|
|
1813
|
+
readonly 'nav.register': {
|
|
1814
|
+
readonly text: "Kasse";
|
|
1815
|
+
};
|
|
1816
|
+
readonly 'nav.receipts': {
|
|
1817
|
+
readonly text: "Belege";
|
|
1818
|
+
};
|
|
1819
|
+
readonly 'nav.vouchers': {
|
|
1820
|
+
readonly text: "Gutscheine";
|
|
1821
|
+
};
|
|
1822
|
+
readonly 'nav.open_drawer': {
|
|
1823
|
+
readonly text: "Kassenlade öffnen";
|
|
1824
|
+
};
|
|
1825
|
+
readonly 'nav.stocktake': {
|
|
1826
|
+
readonly text: "Inventur";
|
|
1827
|
+
};
|
|
1828
|
+
readonly 'nav.settings': {
|
|
1829
|
+
readonly text: "Einstellungen";
|
|
1830
|
+
};
|
|
1831
|
+
readonly 'nav.settings_locked': {
|
|
1832
|
+
readonly text: "nur mit Chef-Anmeldung";
|
|
1833
|
+
};
|
|
1834
|
+
readonly 'nav.logout': {
|
|
1835
|
+
readonly text: "Abmelden";
|
|
1836
|
+
};
|
|
1837
|
+
readonly 'nav.logging_out': {
|
|
1838
|
+
readonly text: "Wird abgemeldet …";
|
|
1839
|
+
};
|
|
1840
|
+
readonly 'nav.fullscreen': {
|
|
1841
|
+
readonly text: "Vollbild";
|
|
1842
|
+
};
|
|
1843
|
+
readonly 'nav.fullscreen_exit': {
|
|
1844
|
+
readonly text: "Vollbild verlassen";
|
|
1845
|
+
};
|
|
1769
1846
|
readonly 'voucher.covers_items': {
|
|
1770
1847
|
readonly text: "Deckt: {items}";
|
|
1771
1848
|
readonly placeholders: readonly ["items"];
|
|
@@ -1988,6 +2065,35 @@ declare const BESCHRIFTUNGEN_ROH: {
|
|
|
1988
2065
|
readonly text: "{amount} auszahlen";
|
|
1989
2066
|
readonly placeholders: readonly ["amount"];
|
|
1990
2067
|
};
|
|
2068
|
+
readonly 'receipt.outputs_title': {
|
|
2069
|
+
readonly text: "Ausgaben";
|
|
2070
|
+
};
|
|
2071
|
+
readonly 'receipt.outputs_count': {
|
|
2072
|
+
readonly text: "{count} Ausgaben";
|
|
2073
|
+
readonly placeholders: readonly ["count"];
|
|
2074
|
+
};
|
|
2075
|
+
readonly 'receipt.output_print': {
|
|
2076
|
+
readonly text: "Erstdruck";
|
|
2077
|
+
};
|
|
2078
|
+
readonly 'receipt.output_reprint': {
|
|
2079
|
+
readonly text: "Duplikat";
|
|
2080
|
+
};
|
|
2081
|
+
readonly 'receipt.output_email': {
|
|
2082
|
+
readonly text: "E-Mail";
|
|
2083
|
+
};
|
|
2084
|
+
readonly 'receipt.output_link_shared': {
|
|
2085
|
+
readonly text: "Link geteilt";
|
|
2086
|
+
};
|
|
2087
|
+
readonly 'receipt.output_pdf_shared': {
|
|
2088
|
+
readonly text: "PDF geteilt";
|
|
2089
|
+
};
|
|
2090
|
+
readonly 'receipt.output_opened': {
|
|
2091
|
+
readonly text: "Link geöffnet ({count}×)";
|
|
2092
|
+
readonly placeholders: readonly ["count"];
|
|
2093
|
+
};
|
|
2094
|
+
readonly 'receipt.output_failed': {
|
|
2095
|
+
readonly text: "fehlgeschlagen";
|
|
2096
|
+
};
|
|
1991
2097
|
};
|
|
1992
2098
|
export type LabelKey = keyof typeof BESCHRIFTUNGEN_ROH;
|
|
1993
2099
|
export declare const LABELS: Record<LabelKey, TextEntry>;
|
|
@@ -2002,6 +2108,14 @@ export declare const RETURN_DISPOSITION_LABELS: {
|
|
|
2002
2108
|
readonly defective: "stock.return_defective";
|
|
2003
2109
|
readonly disposed: "stock.return_disposed";
|
|
2004
2110
|
};
|
|
2111
|
+
/**
|
|
2112
|
+
* Die Beschriftung der Art einer Ausgabe (Belegdetail, Zeile „Ausgaben“), nie
|
|
2113
|
+
* eine Ausnahme: `null` bei einer Art, die dieses Paket nicht kennt (neuerer
|
|
2114
|
+
* Server); `opened` ohne gueltige Anzahl (ganze Zahl ab 1) zaehlt als ein
|
|
2115
|
+
* Abruf. Nur die Art: „fehlgeschlagen“ (`receipt.output_failed`) setzt die
|
|
2116
|
+
* Kasse selbst dazu, wenn `result` `failed` ist.
|
|
2117
|
+
*/
|
|
2118
|
+
export declare function receiptOutputLabel(output: ReceiptOutput): string | null;
|
|
2005
2119
|
/** Die Beschriftung zum Schluessel, Platzhalter ersetzt; fehlt ein Wert, wirft es wie `messageText`. */
|
|
2006
2120
|
export declare function labelText(key: LabelKey, values?: Record<string, string | number>): string;
|
|
2007
2121
|
/** Der Satz zum Schluessel, Platzhalter ersetzt. Fehlt ein Wert, wirft es — ein `{status}` am Tresen waere schlimmer. */
|
package/dist/cjs/pos/texte.js
CHANGED
|
@@ -28,6 +28,7 @@ exports.messageOutcome = messageOutcome;
|
|
|
28
28
|
exports.receiptEmailErrorMessage = receiptEmailErrorMessage;
|
|
29
29
|
exports.cancellationPaymentErrorMessage = cancellationPaymentErrorMessage;
|
|
30
30
|
exports.voucherErrorMessage = voucherErrorMessage;
|
|
31
|
+
exports.receiptOutputLabel = receiptOutputLabel;
|
|
31
32
|
exports.labelText = labelText;
|
|
32
33
|
exports.messageText = messageText;
|
|
33
34
|
exports.messageAppliesTo = messageAppliesTo;
|
|
@@ -878,6 +879,7 @@ const BESCHRIFTUNGEN_ROH = {
|
|
|
878
879
|
'drawer.reason_cash_movement': { text: 'Kassenbewegung' },
|
|
879
880
|
'drawer.reason_shift_open': { text: 'Schichtbeginn' },
|
|
880
881
|
'drawer.reason_shift_close': { text: 'Schichtabschluss' },
|
|
882
|
+
'drawer.reason_voucher_payout': { text: 'Gutschein-Auszahlung' },
|
|
881
883
|
'shift.resend': { text: 'Erneut senden' },
|
|
882
884
|
'shift.next': { text: 'Weiter' },
|
|
883
885
|
'shift.print_close': { text: 'Schichtabschluss drucken' },
|
|
@@ -910,6 +912,30 @@ const BESCHRIFTUNGEN_ROH = {
|
|
|
910
912
|
'voucher.service': { text: 'Leistungsgutschein' },
|
|
911
913
|
'voucher.promotion': { text: 'Aktionsgutschein' },
|
|
912
914
|
'voucher.payment_line': { text: 'Gutschein ····-{suffix}', placeholders: ['suffix'] },
|
|
915
|
+
// Kassen-Navigation, Beleg-Fertig-Seite, Mengen (Paket-Nachzug Gutscheine).
|
|
916
|
+
'quantity.at_most': { text: 'höchstens {count}', placeholders: ['count'] },
|
|
917
|
+
'quantity.at_least': { text: 'mindestens {count}', placeholders: ['count'] },
|
|
918
|
+
'receipts.number_hint': { text: 'Nummer' },
|
|
919
|
+
'receipts.clear_number': { text: 'Nummer löschen' },
|
|
920
|
+
'receipts.open': { text: 'Öffnen' },
|
|
921
|
+
'receipt.creating': { text: 'Beleg wird erstellt …' },
|
|
922
|
+
'receipt_done.sale_title': { text: 'Verkauf abgeschlossen' },
|
|
923
|
+
'receipt_done.paid_by_voucher': { text: 'mit Gutschein bezahlt' },
|
|
924
|
+
'receipt_done.payout_title': { text: 'Auszahlung abgeschlossen' },
|
|
925
|
+
'receipt_done.paid_out': { text: '{method} ausgezahlt', placeholders: ['method'] },
|
|
926
|
+
'voucher.code_mask': { text: '····-{suffix}', placeholders: ['suffix'] },
|
|
927
|
+
'cart.close': { text: 'Warenkorb schließen' },
|
|
928
|
+
'nav.register': { text: 'Kasse' },
|
|
929
|
+
'nav.receipts': { text: 'Belege' },
|
|
930
|
+
'nav.vouchers': { text: 'Gutscheine' },
|
|
931
|
+
'nav.open_drawer': { text: 'Kassenlade öffnen' },
|
|
932
|
+
'nav.stocktake': { text: 'Inventur' },
|
|
933
|
+
'nav.settings': { text: 'Einstellungen' },
|
|
934
|
+
'nav.settings_locked': { text: 'nur mit Chef-Anmeldung' },
|
|
935
|
+
'nav.logout': { text: 'Abmelden' },
|
|
936
|
+
'nav.logging_out': { text: 'Wird abgemeldet …' },
|
|
937
|
+
'nav.fullscreen': { text: 'Vollbild' },
|
|
938
|
+
'nav.fullscreen_exit': { text: 'Vollbild verlassen' },
|
|
913
939
|
'voucher.covers_items': { text: 'Deckt: {items}', placeholders: ['items'] },
|
|
914
940
|
'voucher.code_shown_once': { text: 'Code nur jetzt sichtbar: {code}', placeholders: ['code'] },
|
|
915
941
|
'voucher.not_in_split': { text: 'Gutscheine gehen beim getrennten Kassieren nicht.' },
|
|
@@ -986,6 +1012,18 @@ const BESCHRIFTUNGEN_ROH = {
|
|
|
986
1012
|
'shift.pay_outs': { text: 'Auszahlungen' },
|
|
987
1013
|
'cash_movement.pay_in_amount': { text: '{amount} einzahlen', placeholders: ['amount'] },
|
|
988
1014
|
'cash_movement.pay_out_amount': { text: '{amount} auszahlen', placeholders: ['amount'] },
|
|
1015
|
+
// Belegdetail: Zeile „Ausgaben“ (eingeklappt mit Anzahl), aufgeklappt je Eintrag die Art
|
|
1016
|
+
// (`receipt.output_<kind>`, Arten wie RECEIPT_OUTPUT_KINDS), dazu „fehlgeschlagen“ bei Ergebnis `failed`.
|
|
1017
|
+
// `{count}` beim Abruf ist die Zahl der Abrufe in dieser Stunde.
|
|
1018
|
+
'receipt.outputs_title': { text: 'Ausgaben' },
|
|
1019
|
+
'receipt.outputs_count': { text: '{count} Ausgaben', placeholders: ['count'] },
|
|
1020
|
+
'receipt.output_print': { text: 'Erstdruck' },
|
|
1021
|
+
'receipt.output_reprint': { text: 'Duplikat' },
|
|
1022
|
+
'receipt.output_email': { text: 'E-Mail' },
|
|
1023
|
+
'receipt.output_link_shared': { text: 'Link geteilt' },
|
|
1024
|
+
'receipt.output_pdf_shared': { text: 'PDF geteilt' },
|
|
1025
|
+
'receipt.output_opened': { text: 'Link geöffnet ({count}×)', placeholders: ['count'] },
|
|
1026
|
+
'receipt.output_failed': { text: 'fehlgeschlagen' },
|
|
989
1027
|
};
|
|
990
1028
|
exports.LABELS = BESCHRIFTUNGEN_ROH;
|
|
991
1029
|
/**
|
|
@@ -999,6 +1037,32 @@ exports.RETURN_DISPOSITION_LABELS = {
|
|
|
999
1037
|
defective: 'stock.return_defective',
|
|
1000
1038
|
disposed: 'stock.return_disposed',
|
|
1001
1039
|
};
|
|
1040
|
+
/** Art einer Ausgabe -> Beschriftung (`receipt.output_<kind>`). */
|
|
1041
|
+
const AUSGABE_BESCHRIFTUNG = {
|
|
1042
|
+
print: 'receipt.output_print',
|
|
1043
|
+
reprint: 'receipt.output_reprint',
|
|
1044
|
+
email: 'receipt.output_email',
|
|
1045
|
+
link_shared: 'receipt.output_link_shared',
|
|
1046
|
+
pdf_shared: 'receipt.output_pdf_shared',
|
|
1047
|
+
opened: 'receipt.output_opened',
|
|
1048
|
+
};
|
|
1049
|
+
/**
|
|
1050
|
+
* Die Beschriftung der Art einer Ausgabe (Belegdetail, Zeile „Ausgaben“), nie
|
|
1051
|
+
* eine Ausnahme: `null` bei einer Art, die dieses Paket nicht kennt (neuerer
|
|
1052
|
+
* Server); `opened` ohne gueltige Anzahl (ganze Zahl ab 1) zaehlt als ein
|
|
1053
|
+
* Abruf. Nur die Art: „fehlgeschlagen“ (`receipt.output_failed`) setzt die
|
|
1054
|
+
* Kasse selbst dazu, wenn `result` `failed` ist.
|
|
1055
|
+
*/
|
|
1056
|
+
function receiptOutputLabel(output) {
|
|
1057
|
+
const art = output?.kind;
|
|
1058
|
+
if (typeof art !== 'string' || !Object.prototype.hasOwnProperty.call(AUSGABE_BESCHRIFTUNG, art))
|
|
1059
|
+
return null;
|
|
1060
|
+
const key = AUSGABE_BESCHRIFTUNG[art];
|
|
1061
|
+
if (art !== 'opened')
|
|
1062
|
+
return labelText(key);
|
|
1063
|
+
const anzahl = output.count;
|
|
1064
|
+
return labelText(key, { count: typeof anzahl === 'number' && Number.isSafeInteger(anzahl) && anzahl >= 1 ? anzahl : 1 });
|
|
1065
|
+
}
|
|
1002
1066
|
/** Die Beschriftung zum Schluessel, Platzhalter ersetzt; fehlt ein Wert, wirft es wie `messageText`. */
|
|
1003
1067
|
function labelText(key, values = {}) {
|
|
1004
1068
|
return ersetze(`labelText(${key})`, exports.LABELS[key].text, values);
|
|
@@ -183,7 +183,8 @@ export interface VoucherRedeemContext {
|
|
|
183
183
|
* Hoechstbetrag zum Vorbelegen einer Einloesung an der Kasse, in Cent, nie
|
|
184
184
|
* negativ: der groesste Betrag, den der Server fuer diesen Gutschein annimmt.
|
|
185
185
|
*
|
|
186
|
-
* Obergrenze: Saldo, offener Betrag
|
|
186
|
+
* Obergrenze: Saldo, offener Betrag ohne Trinkgeld (ein Gutschein deckt nie
|
|
187
|
+
* das Trinkgeld, Personal wie Inhaber); bei Einzweck die deckbaren Positionen im
|
|
187
188
|
* Topf seines Satzes abzueglich der schon gewaehlten Einloesungen dort. Befreit
|
|
188
189
|
* verkauft bzw. als Kleinunternehmer verteilt der Server anteilig auf alle
|
|
189
190
|
* Saetze (`kuTeile`); dann begrenzt jeder Topf: sein Anteil plus die schon
|
|
@@ -195,6 +196,7 @@ export interface VoucherRedeemContext {
|
|
|
195
196
|
* Bisektion ueber [1, Grenze] und prueft danach 16 Cent aufwaerts: am Rand
|
|
196
197
|
* des groessten Rests ist die Annahme nicht monoton. Leistung (wird ueber
|
|
197
198
|
* Positionen eingeloest), Aktion (Rabatt rechnet der Server) und jeder nicht
|
|
198
|
-
* aktive Gutschein: 0.
|
|
199
|
+
* aktive Gutschein: 0. Wirft nie [ReceiptDueError]: ist der Beleg ohne den
|
|
200
|
+
* Gutschein nicht rechenbar (etwa `tip_without_goods`), ist das Ergebnis 0.
|
|
199
201
|
*/
|
|
200
202
|
export declare function voucherRedeemMaxCents(items: readonly ReceiptItem[], voucher: VoucherCheck, before?: VoucherRedeemContext): number;
|