@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
package/dist/cjs/receipt/due.js
CHANGED
|
@@ -110,6 +110,12 @@ function rechne(items, vouchers, receiptType, options) {
|
|
|
110
110
|
if (plan.mitPlan && dueCents + plan.auszahlungCents < 0) {
|
|
111
111
|
throw new ReceiptDueError('invalid_voucher', 'die Gutscheine uebersteigen die Summe des Belegs.', 'voucher_exceeds_total');
|
|
112
112
|
}
|
|
113
|
+
// Ein Gutschein deckt nie das Trinkgeld (Personal wie Inhaber): der Zahlbetrag nach den Gutscheinen
|
|
114
|
+
// muss die Trinkgeldzeilen tragen. Storno ausgenommen (dort gibt es keinen Plan).
|
|
115
|
+
const trinkgeld = (0, gutschein_plan_js_1.trinkgeldCents)(kunde);
|
|
116
|
+
if (plan.mitPlan && art !== 'cancellation' && trinkgeld > 0 && dueCents + plan.auszahlungCents < trinkgeld) {
|
|
117
|
+
throw new ReceiptDueError('invalid_voucher', 'die Gutscheine decken das Trinkgeld.', 'voucher_exceeds_total');
|
|
118
|
+
}
|
|
113
119
|
return {
|
|
114
120
|
ergebnis: {
|
|
115
121
|
dueCents,
|
|
@@ -133,7 +139,8 @@ function rechne(items, vouchers, receiptType, options) {
|
|
|
133
139
|
* Hoechstbetrag zum Vorbelegen einer Einloesung an der Kasse, in Cent, nie
|
|
134
140
|
* negativ: der groesste Betrag, den der Server fuer diesen Gutschein annimmt.
|
|
135
141
|
*
|
|
136
|
-
* Obergrenze: Saldo, offener Betrag
|
|
142
|
+
* Obergrenze: Saldo, offener Betrag ohne Trinkgeld (ein Gutschein deckt nie
|
|
143
|
+
* das Trinkgeld, Personal wie Inhaber); bei Einzweck die deckbaren Positionen im
|
|
137
144
|
* Topf seines Satzes abzueglich der schon gewaehlten Einloesungen dort. Befreit
|
|
138
145
|
* verkauft bzw. als Kleinunternehmer verteilt der Server anteilig auf alle
|
|
139
146
|
* Saetze (`kuTeile`); dann begrenzt jeder Topf: sein Anteil plus die schon
|
|
@@ -145,7 +152,8 @@ function rechne(items, vouchers, receiptType, options) {
|
|
|
145
152
|
* Bisektion ueber [1, Grenze] und prueft danach 16 Cent aufwaerts: am Rand
|
|
146
153
|
* des groessten Rests ist die Annahme nicht monoton. Leistung (wird ueber
|
|
147
154
|
* Positionen eingeloest), Aktion (Rabatt rechnet der Server) und jeder nicht
|
|
148
|
-
* aktive Gutschein: 0.
|
|
155
|
+
* aktive Gutschein: 0. Wirft nie [ReceiptDueError]: ist der Beleg ohne den
|
|
156
|
+
* Gutschein nicht rechenbar (etwa `tip_without_goods`), ist das Ergebnis 0.
|
|
149
157
|
*/
|
|
150
158
|
function voucherRedeemMaxCents(items, voucher, before = {}) {
|
|
151
159
|
if (voucher.status !== 'active')
|
|
@@ -155,9 +163,18 @@ function voucherRedeemMaxCents(items, voucher, before = {}) {
|
|
|
155
163
|
const saldo = Number.isInteger(voucher.balanceCents) ? voucher.balanceCents : 0;
|
|
156
164
|
const options = before.options ?? {};
|
|
157
165
|
const vorher = before.vouchers ?? [];
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
166
|
+
let r;
|
|
167
|
+
try {
|
|
168
|
+
r = rechne(items, vorher, 'standard', options);
|
|
169
|
+
}
|
|
170
|
+
catch (fehler) {
|
|
171
|
+
// Nicht rechenbar (etwa Trinkgeld ohne Ware): nichts vorbelegen, die Kasse meldet es beim Zahlbetrag.
|
|
172
|
+
if (fehler instanceof ReceiptDueError)
|
|
173
|
+
return 0;
|
|
174
|
+
throw fehler;
|
|
175
|
+
}
|
|
176
|
+
// Rundung je Topf: hoechstens ein halber Cent je Topf ueber dem offenen Betrag. Das Trinkgeld deckt nie ein Gutschein.
|
|
177
|
+
let oben = Math.min(saldo, r.ergebnis.dueCents + r.auszahlungCents - (0, gutschein_plan_js_1.trinkgeldCents)(r.kunde) + 6, HOECHSTBETRAG_CENTS);
|
|
161
178
|
if (voucher.type === 'single_purpose') {
|
|
162
179
|
const deckbar = r.kunde.filter(gutschein_plan_js_1.istDeckbar);
|
|
163
180
|
const topfBasis = (topf) => (0, gutschein_plan_js_1.centSumme)(deckbar.filter((it) => (0, gutschein_plan_js_1.topfFuerSatz)(it.vat) === topf));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReceiptLayout } from './layout.js';
|
|
2
|
+
/**
|
|
3
|
+
* Kennzeichnet einen Nachdruck als **Belegduplikat**. Registrierkassen-Erlass
|
|
4
|
+
* BMF-AV Nr. 2/2026, Abschnitt 4.5.6: „Ein Belegduplikat ist als solches zu
|
|
5
|
+
* bezeichnen, nicht nochmals zu signieren, nicht neuerlich im
|
|
6
|
+
* Datenerfassungsprotokoll aufzunehmen und darf zu keiner Veränderung des
|
|
7
|
+
* Umsatzzählers führen.“ Signatur, DEP und Zähler bleiben ohnehin unberührt,
|
|
8
|
+
* weil ein Nachdruck den gespeicherten Beleg druckt; diese Funktion liefert
|
|
9
|
+
* die Bezeichnung.
|
|
10
|
+
*
|
|
11
|
+
* Die Kasse ruft sie bei **jedem** Nachdruck und bei „Kopie drucken“ mit dem
|
|
12
|
+
* Zeitpunkt des Drucks auf, nie beim Erstdruck und nie fuer Mail, Link oder
|
|
13
|
+
* PDF, und gibt das Ergebnis an denselben Druckweg (`escPosLayoutBytes`,
|
|
14
|
+
* `eposPrintXml`, `receiptSheet`, React-Ansicht).
|
|
15
|
+
*
|
|
16
|
+
* Neu ist genau eine Zeile im Kennungsblock, direkt unter `Beleg-ID:`, in
|
|
17
|
+
* der Spaltenform von `Datum:` (nicht fett, Wert rechtsbuendig):
|
|
18
|
+
*
|
|
19
|
+
* ```
|
|
20
|
+
* Beleg-ID: AT0-KASSE1-42
|
|
21
|
+
* Duplikat am: 24.10.2026 14:10:05
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* `printedAt` ist ein Zeitpunkt; gedruckt wird er in Wiener Zeit
|
|
25
|
+
* (Sommerzeit nach EU-Regel), nie in der Zeitzone des Rechners. Ohne
|
|
26
|
+
* Spaltenzeile `Beleg-ID:` (Schicht-Bons) steht die Zeile ganz oben. Alles
|
|
27
|
+
* andere bleibt Zeile fuer Zeile wie beim Erstdruck.
|
|
28
|
+
*
|
|
29
|
+
* Reine Funktion: die Eingabe bleibt unangetastet, das Ergebnis ist eine
|
|
30
|
+
* eigene Kopie. Traegt das Layout schon eine Zeile `Duplikat am:`, bekommt
|
|
31
|
+
* nur sie die neue Zeit (der letzte Nachdruck gilt); es bleibt bei einer
|
|
32
|
+
* Zeile. Ein unbrauchbarer Zeitpunkt wirft `KasseneckValidationError`
|
|
33
|
+
* (`scope: 'request'`).
|
|
34
|
+
*/
|
|
35
|
+
export declare function markAsDuplicate(layout: ReceiptLayout, printedAt: Date): ReceiptLayout;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.markAsDuplicate = markAsDuplicate;
|
|
4
|
+
const errors_js_1 = require("../client/errors.js");
|
|
5
|
+
const vienna_time_js_1 = require("../vienna-time.js");
|
|
6
|
+
/** Beschriftung der Duplikat-Zeile; derselbe Text im Dart-Zwilling. */
|
|
7
|
+
const DUPLIKAT_AM = 'Duplikat am:';
|
|
8
|
+
/**
|
|
9
|
+
* Spaltenbreiten in Zwoelfteln. 5:7 setzt Beschriftung (12 Zeichen) und Zeit
|
|
10
|
+
* (19 Zeichen) auf 32 und 48 Zeichen ohne Umbruch in eine Zeile, den Wert am
|
|
11
|
+
* rechten Rand wie bei `Datum:`: 13 + 19 bzw. 20 + 28 Zeichen. Die Breiten
|
|
12
|
+
* von `Beleg-ID:` (6:6) und `Datum:` (4:8) reichen auf 32 Zeichen nicht.
|
|
13
|
+
*/
|
|
14
|
+
const LINKS = 5;
|
|
15
|
+
const RECHTS = 7;
|
|
16
|
+
/** Eigene Kopie einer Zeile: wer am Duplikat dreht, dreht nie am Erstdruck. */
|
|
17
|
+
function kopie(zeile) {
|
|
18
|
+
return zeile.kind === 'columns' ? { ...zeile, columns: zeile.columns.map((c) => ({ ...c })) } : { ...zeile };
|
|
19
|
+
}
|
|
20
|
+
const istZeile = (z, beschriftung) => z.kind === 'columns' && z.columns[0]?.text === beschriftung;
|
|
21
|
+
/** Zeitpunkt als `TT.MM.JJJJ HH:MM:SS` in Wiener Zeit; Bruchteile fallen weg. */
|
|
22
|
+
function wienerZeit(zeitpunkt) {
|
|
23
|
+
const t = (0, vienna_time_js_1.toViennaWallClock)(zeitpunkt);
|
|
24
|
+
const zwei = (n) => String(n).padStart(2, '0');
|
|
25
|
+
return `${zwei(t.day)}.${zwei(t.month)}.${t.year} ${zwei(t.hour)}:${zwei(t.minute)}:${zwei(t.second)}`;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Kennzeichnet einen Nachdruck als **Belegduplikat**. Registrierkassen-Erlass
|
|
29
|
+
* BMF-AV Nr. 2/2026, Abschnitt 4.5.6: „Ein Belegduplikat ist als solches zu
|
|
30
|
+
* bezeichnen, nicht nochmals zu signieren, nicht neuerlich im
|
|
31
|
+
* Datenerfassungsprotokoll aufzunehmen und darf zu keiner Veränderung des
|
|
32
|
+
* Umsatzzählers führen.“ Signatur, DEP und Zähler bleiben ohnehin unberührt,
|
|
33
|
+
* weil ein Nachdruck den gespeicherten Beleg druckt; diese Funktion liefert
|
|
34
|
+
* die Bezeichnung.
|
|
35
|
+
*
|
|
36
|
+
* Die Kasse ruft sie bei **jedem** Nachdruck und bei „Kopie drucken“ mit dem
|
|
37
|
+
* Zeitpunkt des Drucks auf, nie beim Erstdruck und nie fuer Mail, Link oder
|
|
38
|
+
* PDF, und gibt das Ergebnis an denselben Druckweg (`escPosLayoutBytes`,
|
|
39
|
+
* `eposPrintXml`, `receiptSheet`, React-Ansicht).
|
|
40
|
+
*
|
|
41
|
+
* Neu ist genau eine Zeile im Kennungsblock, direkt unter `Beleg-ID:`, in
|
|
42
|
+
* der Spaltenform von `Datum:` (nicht fett, Wert rechtsbuendig):
|
|
43
|
+
*
|
|
44
|
+
* ```
|
|
45
|
+
* Beleg-ID: AT0-KASSE1-42
|
|
46
|
+
* Duplikat am: 24.10.2026 14:10:05
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* `printedAt` ist ein Zeitpunkt; gedruckt wird er in Wiener Zeit
|
|
50
|
+
* (Sommerzeit nach EU-Regel), nie in der Zeitzone des Rechners. Ohne
|
|
51
|
+
* Spaltenzeile `Beleg-ID:` (Schicht-Bons) steht die Zeile ganz oben. Alles
|
|
52
|
+
* andere bleibt Zeile fuer Zeile wie beim Erstdruck.
|
|
53
|
+
*
|
|
54
|
+
* Reine Funktion: die Eingabe bleibt unangetastet, das Ergebnis ist eine
|
|
55
|
+
* eigene Kopie. Traegt das Layout schon eine Zeile `Duplikat am:`, bekommt
|
|
56
|
+
* nur sie die neue Zeit (der letzte Nachdruck gilt); es bleibt bei einer
|
|
57
|
+
* Zeile. Ein unbrauchbarer Zeitpunkt wirft `KasseneckValidationError`
|
|
58
|
+
* (`scope: 'request'`).
|
|
59
|
+
*/
|
|
60
|
+
function markAsDuplicate(layout, printedAt) {
|
|
61
|
+
if (!(printedAt instanceof Date) || Number.isNaN(printedAt.getTime())) {
|
|
62
|
+
throw new errors_js_1.KasseneckValidationError('markAsDuplicate', 'printedAt: kein gueltiger Zeitpunkt (Date)', 'request');
|
|
63
|
+
}
|
|
64
|
+
const neu = {
|
|
65
|
+
kind: 'columns',
|
|
66
|
+
columns: [
|
|
67
|
+
{ text: DUPLIKAT_AM, width: LINKS, align: 'left' },
|
|
68
|
+
{ text: wienerZeit(printedAt), width: RECHTS, align: 'right' },
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
const vorhanden = layout.lines.findIndex((z) => istZeile(z, DUPLIKAT_AM));
|
|
72
|
+
const lines = layout.lines.filter((z) => !istZeile(z, DUPLIKAT_AM)).map(kopie);
|
|
73
|
+
const stelle = vorhanden >= 0 ? vorhanden : lines.findIndex((z) => istZeile(z, 'Beleg-ID:')) + 1;
|
|
74
|
+
lines.splice(stelle, 0, neu);
|
|
75
|
+
return { ...layout, lines };
|
|
76
|
+
}
|
|
@@ -89,6 +89,8 @@ type TopfName = 'amountRateStandard' | 'amountRateReduced1' | 'amountRateReduced
|
|
|
89
89
|
export declare function topfFuerSatz(vat: number): TopfName;
|
|
90
90
|
/** Position, die ein Gutschein decken darf: weder Trinkgeld noch Gutscheinzeile. */
|
|
91
91
|
export declare function istDeckbar(p: Innen): boolean;
|
|
92
|
+
/** Summe der Trinkgeldzeilen (Personal und Inhaber) in Cent, wie `centSumme(kunde.filter(istTip))` im Backend. */
|
|
93
|
+
export declare function trinkgeldCents(kunde: readonly Innen[]): number;
|
|
92
94
|
/** Wie beleg-toepfe: Euro in Positionsreihenfolge aufsummieren, erst die Summe auf Cent runden. */
|
|
93
95
|
export declare function centSumme(liste: readonly Innen[]): number;
|
|
94
96
|
/** Die Saetze, auf die `kuTeile` verteilt: je Satz `centSumme` der deckbaren Positionen, nur positive. */
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VOUCHER_ZERO_RATE_BUCKET_FROM = void 0;
|
|
4
4
|
exports.topfFuerSatz = topfFuerSatz;
|
|
5
5
|
exports.istDeckbar = istDeckbar;
|
|
6
|
+
exports.trinkgeldCents = trinkgeldCents;
|
|
6
7
|
exports.centSumme = centSumme;
|
|
7
8
|
exports.kuSaetze = kuSaetze;
|
|
8
9
|
exports.planeGutscheine = planeGutscheine;
|
|
@@ -37,6 +38,10 @@ function istGutscheinZeile(p) {
|
|
|
37
38
|
function istDeckbar(p) {
|
|
38
39
|
return p.tip == null && p.kind !== 'tip' && !istGutscheinZeile(p);
|
|
39
40
|
}
|
|
41
|
+
/** Summe der Trinkgeldzeilen (Personal und Inhaber) in Cent, wie `centSumme(kunde.filter(istTip))` im Backend. */
|
|
42
|
+
function trinkgeldCents(kunde) {
|
|
43
|
+
return centSumme(kunde.filter((p) => p.tip != null || p.kind === 'tip'));
|
|
44
|
+
}
|
|
40
45
|
/** Wie beleg-toepfe: Euro in Positionsreihenfolge aufsummieren, erst die Summe auf Cent runden. */
|
|
41
46
|
function centSumme(liste) {
|
|
42
47
|
return Math.round(liste.reduce((s, it) => s + it.priceOne * it.amount, 0) * 100);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { type LayoutAlign, type LayoutColumn, type LayoutTextLine, type LayoutColumnsLine, type LayoutRuleLine, type LayoutSpaceLine, type LayoutQrLine, type LayoutLine, type ReceiptLayout, type BuildReceiptLayoutOptions, buildReceiptLayout, receiptSignatureFailed, receiptSignatureIsTest, receiptIsZero, receiptAmountsAreZero, receiptIsSmallBusinessConsistent, receiptZdaText, CURRENT_LAYOUT_RULESET, type LayoutBannerLine, type LayoutBannerTone, type LayoutRuleset, SMALL_BUSINESS_NOTICE, formatCents, } from './layout.js';
|
|
2
|
+
export { markAsDuplicate } from './duplikat.js';
|
|
2
3
|
export { type EscPosLayoutOptions, type EscPosLayoutResult, type QrPrintMode, type PrintLogo, assertLogoRaster, escPosLayoutBytes, escPosLayoutResult, } from './layout-escpos.js';
|
|
3
4
|
export { type GridLine, type GridLineKind, type ReceiptGrid, type RenderReceiptGridOptions, renderReceiptGrid, gridColumnWidths, gridToText, CHARS_PER_PAPER_SIZE, } from './grid.js';
|
|
4
5
|
export { type EposPrintXmlOptions, type EposPrintResult, type EposDirectOptions, type EposResponse, EposConnectionError, eposPrintXml, eposPrintXmlResult, eposXmlEscape, eposImageXml, eposServiceUrl, eposSoapEnvelope, eposParseResponse, eposDirectPrint, eposDirectStatus } from './epos.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.VOUCHER_ZERO_RATE_BUCKET_FROM = exports.voucherRedeemMaxCents = void 0;
|
|
3
|
+
exports.RECEIPT_DUE_ERROR_REASONS = exports.ReceiptDueError = exports.receiptDueBreakdown = exports.receiptDueCents = exports.codeTableReferenceImage = exports.codeTableTestSheetBytes = exports.codeTableTestSheet = exports.CODE_TABLE_TEST_SHEET_CHARS = exports.brandMarkImage = exports.BRAND_MARK_PATHS = exports.BRAND_MARK_RASTERS = exports.rasterizeLogo = exports.receiptSheet = exports.qrSheetWidthFraction = exports.logoRasterSize = exports.isLogoPixelSizeAllowed = exports.logoDimensions = exports.paperSizeForChars = exports.DOTS_PER_LINE = exports.DOTS_PER_CHAR = exports.LOGO_MAX_PIXELS = exports.SHEET_LOGO_SIZES = exports.eposDirectStatus = exports.eposDirectPrint = exports.eposParseResponse = exports.eposSoapEnvelope = exports.eposServiceUrl = exports.eposImageXml = exports.eposXmlEscape = exports.eposPrintXmlResult = exports.eposPrintXml = exports.EposConnectionError = exports.CHARS_PER_PAPER_SIZE = exports.gridToText = exports.gridColumnWidths = exports.renderReceiptGrid = exports.escPosLayoutResult = exports.escPosLayoutBytes = exports.assertLogoRaster = exports.markAsDuplicate = exports.formatCents = exports.SMALL_BUSINESS_NOTICE = exports.CURRENT_LAYOUT_RULESET = exports.receiptZdaText = exports.receiptIsSmallBusinessConsistent = exports.receiptAmountsAreZero = exports.receiptIsZero = exports.receiptSignatureIsTest = exports.receiptSignatureFailed = exports.buildReceiptLayout = void 0;
|
|
4
|
+
exports.VOUCHER_ZERO_RATE_BUCKET_FROM = exports.voucherRedeemMaxCents = exports.isReceiptDueError = void 0;
|
|
5
5
|
var layout_js_1 = require("./layout.js");
|
|
6
6
|
Object.defineProperty(exports, "buildReceiptLayout", { enumerable: true, get: function () { return layout_js_1.buildReceiptLayout; } });
|
|
7
7
|
Object.defineProperty(exports, "receiptSignatureFailed", { enumerable: true, get: function () { return layout_js_1.receiptSignatureFailed; } });
|
|
@@ -13,6 +13,8 @@ Object.defineProperty(exports, "receiptZdaText", { enumerable: true, get: functi
|
|
|
13
13
|
Object.defineProperty(exports, "CURRENT_LAYOUT_RULESET", { enumerable: true, get: function () { return layout_js_1.CURRENT_LAYOUT_RULESET; } });
|
|
14
14
|
Object.defineProperty(exports, "SMALL_BUSINESS_NOTICE", { enumerable: true, get: function () { return layout_js_1.SMALL_BUSINESS_NOTICE; } });
|
|
15
15
|
Object.defineProperty(exports, "formatCents", { enumerable: true, get: function () { return layout_js_1.formatCents; } });
|
|
16
|
+
var duplikat_js_1 = require("./duplikat.js");
|
|
17
|
+
Object.defineProperty(exports, "markAsDuplicate", { enumerable: true, get: function () { return duplikat_js_1.markAsDuplicate; } });
|
|
16
18
|
var layout_escpos_js_1 = require("./layout-escpos.js");
|
|
17
19
|
Object.defineProperty(exports, "assertLogoRaster", { enumerable: true, get: function () { return layout_escpos_js_1.assertLogoRaster; } });
|
|
18
20
|
Object.defineProperty(exports, "escPosLayoutBytes", { enumerable: true, get: function () { return layout_escpos_js_1.escPosLayoutBytes; } });
|
|
@@ -453,19 +453,31 @@ function barZeilen(zahlung) {
|
|
|
453
453
|
*/
|
|
454
454
|
function zahlungsZeilen(receipt) {
|
|
455
455
|
const zahlungen = receipt.payments;
|
|
456
|
+
// Trägt der Beleg eine Gutschein-Zahlungszeile, entfällt, was 0 Cent kostet
|
|
457
|
+
// (§ 132a Abs. 3 BAO: die Zahlungsart ist kein Pflichtinhalt, der Betrag bleibt).
|
|
458
|
+
const mitGutschein = receipt.vouchers.some((v) => v.action === index_js_1.VoucherAction.redeem && v.type !== index_js_1.VoucherType.promo);
|
|
456
459
|
if (zahlungen == null || zahlungen.length === 0) {
|
|
460
|
+
if (mitGutschein && (0, index_js_2.receiptSumCents)(receipt) === 0)
|
|
461
|
+
return [];
|
|
457
462
|
return [paarZeile('Zahlungsart:', zahlungsartText(receipt.paymentMethod))];
|
|
458
463
|
}
|
|
459
464
|
if (zahlungen.length === 1) {
|
|
460
465
|
const zahlung = zahlungen[0];
|
|
466
|
+
if (mitGutschein && zahlung.amountCents === 0)
|
|
467
|
+
return [];
|
|
461
468
|
return [paarZeile('Zahlungsart:', zahlungsartText(zahlung.method)), ...zahlungTrinkgeldZeilen(zahlung), ...barZeilen(zahlung)];
|
|
462
469
|
}
|
|
470
|
+
// Mehrere Zahlungen: mit Gutschein entfallen die mit 0 Cent (Nummer bleibt die des Kartenblocks).
|
|
471
|
+
const alle = zahlungen.map((zahlung, i) => ({ zahlung, i }));
|
|
472
|
+
const liste = mitGutschein ? alle.filter(({ zahlung }) => zahlung.amountCents !== 0) : alle;
|
|
473
|
+
if (liste.length === 0)
|
|
474
|
+
return [];
|
|
463
475
|
const zeilen = [textZeile('Zahlungsarten:')];
|
|
464
|
-
|
|
476
|
+
for (const { zahlung, i } of liste) {
|
|
465
477
|
zeilen.push(paarZeile(zahlungNummerText(zahlung, i), `${formatCents(zahlung.amountCents)} €`, 8, 4));
|
|
466
478
|
zeilen.push(...zahlungTrinkgeldZeilen(zahlung));
|
|
467
479
|
zeilen.push(...barZeilen(zahlung));
|
|
468
|
-
}
|
|
480
|
+
}
|
|
469
481
|
return zeilen;
|
|
470
482
|
}
|
|
471
483
|
// -------------------------------------------------------- Kleinunternehmer
|
|
@@ -554,10 +566,12 @@ function gutscheinText(voucher) {
|
|
|
554
566
|
text += 'Wertgutschein';
|
|
555
567
|
}
|
|
556
568
|
else if (voucher.type === index_js_1.VoucherType.promo) {
|
|
557
|
-
text += '
|
|
569
|
+
text += 'Aktionsgutschein';
|
|
558
570
|
}
|
|
559
571
|
const name = voucher.name;
|
|
560
|
-
|
|
572
|
+
// Alte Belege nennen den Aktionsgutschein noch „Promotionsgutschein": auch dieser Name steht allein.
|
|
573
|
+
if (name != null && (name.toLowerCase().includes(text.toLowerCase())
|
|
574
|
+
|| (voucher.type === index_js_1.VoucherType.promo && name.toLowerCase().includes('promotionsgutschein')))) {
|
|
561
575
|
return name;
|
|
562
576
|
}
|
|
563
577
|
// Der Betrag steht in derselben Zeile rechts in der Betragsspalte — ihn
|
|
@@ -566,7 +580,7 @@ function gutscheinText(voucher) {
|
|
|
566
580
|
// identifiziert den Gutschein (Mehrzweck: der Kunde will wissen, WELCHER
|
|
567
581
|
// eingeloest wurde).
|
|
568
582
|
if (voucher.code != null && voucher.code !== '') {
|
|
569
|
-
text += ` ${voucher
|
|
583
|
+
text += ` ${codeKurz(voucher)}`;
|
|
570
584
|
}
|
|
571
585
|
if (name != null && name.length > 0) {
|
|
572
586
|
text += ` - ${name}`;
|
|
@@ -584,21 +598,20 @@ function gutscheinText(voucher) {
|
|
|
584
598
|
* Leistung Zeile dieses Gutscheins Text „ Einzweck, versteuert mit
|
|
585
599
|
* Beleg K1-ID-4711“ (bzw. „Leistung, …“, „…, befreit
|
|
586
600
|
* verkauft (Kleinunternehmer)“, 47 Zeichen: passt auf
|
|
587
|
-
* 80 mm) und 8:4 „ Rest am Gutschein“ | „19,50
|
|
601
|
+
* 80 mm) und 8:4 „ Rest am Gutschein“ | „19,50 €“ bzw.
|
|
588
602
|
* „2 Stück“
|
|
589
603
|
* Einloesung Mehrzweck nach „Zwischensumme“ 8:4 „Gutschein ····-9DWT“ |
|
|
590
604
|
* „-17,50 €“ und „ Rest am Gutschein“ | „32,50 €“
|
|
591
605
|
* Auszahlung 8:4 „Auszahlung Gutschein ····-9DWT“ | „-12,00 D“,
|
|
592
606
|
* Text „ Grund: <Grund>“
|
|
593
|
-
* Aktion Rabattzeile wie bisher (
|
|
607
|
+
* Aktion Rabattzeile wie bisher (Aktionsgutschein)
|
|
594
608
|
*
|
|
595
609
|
* Vermerke sind Textzeilen mit zwei fuehrenden Leerzeichen; das Raster bricht
|
|
596
610
|
* sie mit demselben Einzug um (grid.ts, haengender Einzug), auf 58 mm etwa
|
|
597
611
|
* „ Einzweck, versteuert mit“ / „ Beleg K1-ID-4711“.
|
|
598
612
|
*
|
|
599
|
-
* Die Zusatzzeilen kommen nur aus dem Eintrag: ein Beleg
|
|
600
|
-
*
|
|
601
|
-
* der Position, functions/beleg-layout.js `gutscheineFuerPaket`), zeigt seine
|
|
613
|
+
* Die Zusatzzeilen kommen nur aus dem Eintrag: ein Beleg ohne Eintrag (aeltere
|
|
614
|
+
* Belege, bei denen der Code schon an der Position steht) zeigt seine
|
|
602
615
|
* Positionen wie jede andere Position. Ein Betrag zaehlt immer genau einmal:
|
|
603
616
|
* Positionen in der Steuertabelle, Eintraege mit `zeroRateBucket` nie.
|
|
604
617
|
*/
|
|
@@ -611,12 +624,22 @@ function istMehrzweckMitCode(voucher) {
|
|
|
611
624
|
return voucher.type === index_js_1.VoucherType.value && voucher.voucherType === index_js_1.VoucherType.multi_purpose;
|
|
612
625
|
}
|
|
613
626
|
/**
|
|
614
|
-
* Code fuer die Belegzeile: die Maske
|
|
615
|
-
*
|
|
616
|
-
*
|
|
627
|
+
* Code fuer die Belegzeile: immer die kurze Maske `····-XXXX` aus dem Code-Ende
|
|
628
|
+
* (auch wenn ein alter Beleg die lange `····-····-XXXX` im Eintrag traegt),
|
|
629
|
+
* ohne den Platzhalter `no-code`, den der Server Alt-Eintraegen ohne Code
|
|
630
|
+
* setzt (index.js checkVouchersIsValid). Leer, wenn es keinen gibt.
|
|
617
631
|
*/
|
|
618
632
|
function gutscheinCodeZusatz(voucher) {
|
|
619
|
-
return typeof voucher.code === 'string' && voucher.code !== '' && voucher.code !== 'no-code' ? ` ${voucher
|
|
633
|
+
return typeof voucher.code === 'string' && voucher.code !== '' && voucher.code !== 'no-code' ? ` ${codeKurz(voucher)}` : '';
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Maskierte Codes (`····-····-XXXX` alt, `····-XXXX` neu) drucken immer kurz;
|
|
637
|
+
* ein Alt-Code ohne Maske (z. B. `GS-1`) bleibt, wie er ist.
|
|
638
|
+
*/
|
|
639
|
+
function codeKurz(voucher) {
|
|
640
|
+
const code = voucher.code ?? '';
|
|
641
|
+
const endung = gutscheinEndung(voucher);
|
|
642
|
+
return code.includes('····') && endung != null ? `····-${endung}` : code;
|
|
620
643
|
}
|
|
621
644
|
/** Die vier letzten Zeichen des Codes (`codeSuffix`, sonst aus der Maske), oder null. */
|
|
622
645
|
function gutscheinEndung(voucher) {
|
|
@@ -630,7 +653,7 @@ const MEHRZWECK_UST_TEXT = ' USt bei Einlösung';
|
|
|
630
653
|
* Eintrag? Jede Position hoechstens einem Eintrag, Eintraege in ihrer
|
|
631
654
|
* Reihenfolge (der Server haengt die Positionen in derselben Reihenfolge an).
|
|
632
655
|
* Verkauf: erste freie Position der Art mit demselben Betrag und ohne Code im
|
|
633
|
-
* Namen (wie
|
|
656
|
+
* Namen (wie die Zuordnung des Servers). Einloesung: freie Positionen
|
|
634
657
|
* mit genau dem Namen `Gutschein ····-<Endung>`, Auszahlung: `Auszahlung
|
|
635
658
|
* Gutschein ····-<Endung>` (gutschein-beleg.plane) -- der Reihe nach, bis
|
|
636
659
|
* ihr Betrag den des Eintrags erreicht (ein Kleinunternehmer-Einzweck oder
|
|
@@ -708,14 +731,14 @@ function gutscheinPositionsZeilen(item, satz, zu) {
|
|
|
708
731
|
else if (v.exempt === true) {
|
|
709
732
|
zeilen.push(textZeile(` ${art}, befreit verkauft (Kleinunternehmer)`));
|
|
710
733
|
}
|
|
711
|
-
// Rest: Betrag
|
|
712
|
-
//
|
|
734
|
+
// Rest: Betrag mit „€“ wie beim Mehrzweckgutschein, Stueck rechtsbuendig.
|
|
735
|
+
// Die Gesamtzahl kennt der Beleg nicht.
|
|
713
736
|
if (v.type === index_js_1.VoucherType.service) {
|
|
714
737
|
if (Number.isInteger(v.remainingQuantityAfter))
|
|
715
738
|
zeilen.push(paarZeile(' Rest am Gutschein', `${v.remainingQuantityAfter} Stück`, 8, 4));
|
|
716
739
|
}
|
|
717
740
|
else if (Number.isInteger(v.balanceAfterCents)) {
|
|
718
|
-
zeilen.push(paarZeile(' Rest am Gutschein', `${formatCents(v.balanceAfterCents)}
|
|
741
|
+
zeilen.push(paarZeile(' Rest am Gutschein', `${formatCents(v.balanceAfterCents)} €`, 8, 4));
|
|
719
742
|
}
|
|
720
743
|
return zeilen;
|
|
721
744
|
}
|
|
@@ -1105,7 +1128,7 @@ function buildReceiptLayout(receipt, company, options = {}) {
|
|
|
1105
1128
|
lines.push(...(art === 'discount' ? rabattZeilen(item.name, teile) : trinkgeldZeilen(item.name, teile)));
|
|
1106
1129
|
}
|
|
1107
1130
|
// --- Gutscheine: verkaufte Wertgutscheine sind Umsatz zu 0 %, eingeloeste
|
|
1108
|
-
//
|
|
1131
|
+
// Aktionsgutscheine mindern die Steuergruppen anteilig.
|
|
1109
1132
|
// Am Storno-Beleg zaehlen Wertgutscheine mit umgekehrtem Vorzeichen
|
|
1110
1133
|
// (receiptValueVoucherSign): der verkaufte wird zurueckgezahlt.
|
|
1111
1134
|
// Eintraege mit `zeroRateBucket` stehen schon als Position (0-%-Topf).
|
|
@@ -1135,7 +1158,7 @@ function buildReceiptLayout(receipt, company, options = {}) {
|
|
|
1135
1158
|
lines.push(textZeile(MEHRZWECK_UST_TEXT));
|
|
1136
1159
|
}
|
|
1137
1160
|
if (voucher.action === index_js_1.VoucherAction.redeem && voucher.type === index_js_1.VoucherType.promo) {
|
|
1138
|
-
// Am Storno-Beleg steht der
|
|
1161
|
+
// Am Storno-Beleg steht der Aktionsgutschein nur als Bezug: den Rabatt
|
|
1139
1162
|
// nimmt dort die Position „Gutschein-Ausgleich“ zurueck (receiptSubSumCents).
|
|
1140
1163
|
if (wgVz === 1)
|
|
1141
1164
|
promoCents += wert;
|
|
@@ -1255,7 +1278,7 @@ function buildReceiptLayout(receipt, company, options = {}) {
|
|
|
1255
1278
|
return { lines, paperSize, ruleset };
|
|
1256
1279
|
}
|
|
1257
1280
|
/**
|
|
1258
|
-
* Verteilt einen eingeloesten
|
|
1281
|
+
* Verteilt einen eingeloesten Aktionsgutschein anteilig auf die
|
|
1259
1282
|
* Steuergruppen — Zwilling von `print_paper.dart` (Zeilen 296-325).
|
|
1260
1283
|
*
|
|
1261
1284
|
* Der Gutschein mindert keinen einzelnen Artikel, sondern den Umsatz: jede
|
|
@@ -120,8 +120,12 @@ export type RegisterLoginMode = 'select_user' | 'pin';
|
|
|
120
120
|
export interface RegisterDeviceUsers {
|
|
121
121
|
/** Im Modus `pin` bewusst leer — Namen haben am nur-PIN-Geraet nichts verloren. */
|
|
122
122
|
users: RegisterUserSummary[];
|
|
123
|
-
/**
|
|
124
|
-
|
|
123
|
+
/**
|
|
124
|
+
* Kassen-Einstellungen (betriebsweit + Geraet), gemischt mit den Standardwerten.
|
|
125
|
+
* Ohne `vouchers`: die Antwort des Servers fuehrt den Block nicht, er kommt
|
|
126
|
+
* mit `getPosSettings`; ein Vorgabe-Block waere erfunden.
|
|
127
|
+
*/
|
|
128
|
+
settings: Omit<PosSettings, 'vouchers'>;
|
|
125
129
|
/** Belegkopf-Daten des Betriebs (Name, Anschrift, UID, Fusszeilen), ohne Geheimnisse. */
|
|
126
130
|
receiptHeader: ReceiptCompany | null;
|
|
127
131
|
/**
|
|
@@ -215,7 +215,7 @@ async function listRegisterUsersForDevice(options) {
|
|
|
215
215
|
};
|
|
216
216
|
});
|
|
217
217
|
const settingsRoh = daten?.settings;
|
|
218
|
-
const settings = (0, client_js_1.posSettingsFromWire)(settingsRoh !== null && typeof settingsRoh === 'object' ? settingsRoh : null);
|
|
218
|
+
const { vouchers: _keinBlock, ...settings } = (0, client_js_1.posSettingsFromWire)(settingsRoh !== null && typeof settingsRoh === 'object' ? settingsRoh : null);
|
|
219
219
|
const kopf = daten?.receiptHeader;
|
|
220
220
|
const receiptHeader = kopf && typeof kopf === 'object' ? (0, receipt_company_js_1.fromReceiptCompanyPayload)(kopf) : null;
|
|
221
221
|
return {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.layoutWieServer = layoutWieServer;
|
|
4
4
|
const layout_js_1 = require("../receipt/layout.js");
|
|
5
|
-
const gutscheine_js_1 = require("./gutscheine.js");
|
|
6
5
|
/**
|
|
7
6
|
* Layout wie `beleg-layout.layoutFuerBeleg`: 80 mm, Regelwerk mindestens das
|
|
8
7
|
* aktuelle. Kann der Server es nicht bauen, liefert er `null` (dann baut
|
|
@@ -11,9 +10,9 @@ const gutscheine_js_1 = require("./gutscheine.js");
|
|
|
11
10
|
function layoutWieServer(b, regelwerk) {
|
|
12
11
|
const ruleset = Math.max(Number(regelwerk) || 1, layout_js_1.CURRENT_LAYOUT_RULESET);
|
|
13
12
|
try {
|
|
14
|
-
// Wie layoutFuerBeleg
|
|
15
|
-
//
|
|
16
|
-
return (0, layout_js_1.buildReceiptLayout)(
|
|
13
|
+
// Wie layoutFuerBeleg seit dem Paket 0.34.0 des Servers: der Beleg geht
|
|
14
|
+
// unveraendert ans Paket (keine Aufbereitung der Gutscheine mehr).
|
|
15
|
+
return (0, layout_js_1.buildReceiptLayout)(b.receipt, b.company, {
|
|
17
16
|
paperSize: 'mm80', ruleset, testCashregister: b.testCashregister, testSignature: b.testSignature, registrationInfo: b.registrationInfo,
|
|
18
17
|
});
|
|
19
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
|
|
2
|
-
export declare const VOKABULAR_QUELLE = "
|
|
2
|
+
export declare const VOKABULAR_QUELLE = "c64430e6ec3c3dad8674ad684b353bf52c57df54da8afbaa6ba7d8f717511eb7";
|
|
3
3
|
/** Schema-Notation des Vertrags: Blatt 'aussen': 'innen', Objekt { __: 'innen', ... }, Liste [ { __: 'innen', ... } ]. */
|
|
4
4
|
export type SchemaEintrag = string | SchemaObjekt | readonly [SchemaObjekt];
|
|
5
5
|
export interface SchemaObjekt {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.KATALOGE = exports.ARTIKEL_FELDER = exports.SCHEMAS = exports.VOKABULAR_QUELLE = void 0;
|
|
6
6
|
/** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
|
|
7
|
-
exports.VOKABULAR_QUELLE = "
|
|
7
|
+
exports.VOKABULAR_QUELLE = "c64430e6ec3c3dad8674ad684b353bf52c57df54da8afbaa6ba7d8f717511eb7";
|
|
8
8
|
/** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
|
|
9
9
|
exports.SCHEMAS = {
|
|
10
10
|
"getReceipt": {
|
|
@@ -53,6 +53,7 @@ exports.SCHEMAS = {
|
|
|
53
53
|
"codeSuffix": "codeEnde",
|
|
54
54
|
"faceValueCents": "nennwertCents",
|
|
55
55
|
"quantity": "stueck",
|
|
56
|
+
"articleName": "artikelName",
|
|
56
57
|
"validity": {
|
|
57
58
|
"__": "gueltigkeit",
|
|
58
59
|
"pattern": "muster",
|
|
@@ -61,6 +62,15 @@ exports.SCHEMAS = {
|
|
|
61
62
|
"validUntil": "gueltigBis"
|
|
62
63
|
}
|
|
63
64
|
}
|
|
65
|
+
],
|
|
66
|
+
"outputs": [
|
|
67
|
+
{
|
|
68
|
+
"__": "ausgaben",
|
|
69
|
+
"kind": "art",
|
|
70
|
+
"result": "ergebnis",
|
|
71
|
+
"by": "durch",
|
|
72
|
+
"count": "anzahl"
|
|
73
|
+
}
|
|
64
74
|
]
|
|
65
75
|
},
|
|
66
76
|
"werte": {
|
|
@@ -75,6 +85,12 @@ exports.SCHEMAS = {
|
|
|
75
85
|
},
|
|
76
86
|
"issuedVouchers[].validity.pattern": {
|
|
77
87
|
"$catalog": "GUTSCHEIN_MUSTER"
|
|
88
|
+
},
|
|
89
|
+
"outputs[].kind": {
|
|
90
|
+
"$catalog": "AUSGABE_ART"
|
|
91
|
+
},
|
|
92
|
+
"outputs[].result": {
|
|
93
|
+
"$catalog": "AUSGABE_ERGEBNIS"
|
|
78
94
|
}
|
|
79
95
|
}
|
|
80
96
|
},
|
|
@@ -157,7 +173,10 @@ exports.SCHEMAS = {
|
|
|
157
173
|
"fullscreen": "vollbild",
|
|
158
174
|
"clearTendered": "gegebenLeeren",
|
|
159
175
|
"clearCart": "korbLeeren",
|
|
160
|
-
"splitPayment": "getrennt"
|
|
176
|
+
"splitPayment": "getrennt",
|
|
177
|
+
"shiftStatus": "kassenstand",
|
|
178
|
+
"openDrawer": "ladeOeffnen",
|
|
179
|
+
"voucherPayout": "gutscheinAuszahlen"
|
|
161
180
|
},
|
|
162
181
|
"printerEnabled": "druckerAn",
|
|
163
182
|
"printerType": "druckerArt",
|
|
@@ -186,7 +205,19 @@ exports.SCHEMAS = {
|
|
|
186
205
|
"__": "gutscheine",
|
|
187
206
|
"sale": "verkauf",
|
|
188
207
|
"valueVoucherType": "wertArt",
|
|
189
|
-
"vatRateBp": "satzBp"
|
|
208
|
+
"vatRateBp": "satzBp",
|
|
209
|
+
"label": {
|
|
210
|
+
"__": "etikett",
|
|
211
|
+
"size": "groesse",
|
|
212
|
+
"fields": {
|
|
213
|
+
"__": "felder",
|
|
214
|
+
"business": "betrieb",
|
|
215
|
+
"value": "wert",
|
|
216
|
+
"validity": "gueltigkeit",
|
|
217
|
+
"checkPage": "pruefseite"
|
|
218
|
+
},
|
|
219
|
+
"freeText": "freitext"
|
|
220
|
+
}
|
|
190
221
|
}
|
|
191
222
|
},
|
|
192
223
|
"werte": {
|
|
@@ -301,6 +332,19 @@ exports.ARTIKEL_FELDER = [
|
|
|
301
332
|
];
|
|
302
333
|
/** Wertkataloge innen (deutsch) -> aussen (englisch). */
|
|
303
334
|
exports.KATALOGE = {
|
|
335
|
+
"AUSGABE_ART": {
|
|
336
|
+
"erstdruck": "print",
|
|
337
|
+
"duplikat": "reprint",
|
|
338
|
+
"mail": "email",
|
|
339
|
+
"link_geteilt": "link_shared",
|
|
340
|
+
"pdf_geteilt": "pdf_shared",
|
|
341
|
+
"abruf": "opened"
|
|
342
|
+
},
|
|
343
|
+
"AUSGABE_ERGEBNIS": {
|
|
344
|
+
"ok": "ok",
|
|
345
|
+
"fehler": "failed",
|
|
346
|
+
"unklar": "unclear"
|
|
347
|
+
},
|
|
304
348
|
"E1A_GRUPPE": {
|
|
305
349
|
"erloese": "revenue",
|
|
306
350
|
"erloese_waren": "revenue_goods",
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
package/dist/esm/client/api.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ import { type HobexPayOptions, type HobexRefundOptions } from '../payments/hobex
|
|
|
4
4
|
import { type TransportOptions } from './transport.js';
|
|
5
5
|
import { type CashregisterReportPeriod, type ReportV2, type ReportV2Options } from './reports.js';
|
|
6
6
|
import { type CashboxStatus, type SignatureStatus } from './status.js';
|
|
7
|
-
import { type
|
|
7
|
+
import { type ListedReceipt, type ListReceiptsOptions, type ListReceiptsPage, type ListReceiptsView } from './list-receipts.js';
|
|
8
|
+
import { type SendReceiptEmailOptions, type SendReceiptEmailResult, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type ListMyReceiptsOptions, type ReceiptList, type ReceiptWithCompany, type SellReceiptOptions, type CancelReceiptOptions, type CancelReceiptResult } from './receipts.js';
|
|
8
9
|
/**
|
|
9
10
|
* Schlichte Factory ueber den Endpunkt-Funktionen: bindet einen Transport
|
|
10
11
|
* einmal und liefert die Aufrufe ohne den wiederkehrenden ersten Parameter.
|
|
@@ -48,12 +49,18 @@ export interface KasseneckApi {
|
|
|
48
49
|
getFirstReceiptDate(): Promise<ReportMonth>;
|
|
49
50
|
/** Beleg als Link auf die oeffentliche Belegseite per E-Mail schicken. */
|
|
50
51
|
sendReceiptEmail(options: SendReceiptEmailOptions): Promise<SendReceiptEmailResult>;
|
|
52
|
+
/** Drucke und Teilen eines Belegs an das Protokoll „Ausgaben“ melden (nur Kassenweg). */
|
|
53
|
+
logReceiptOutputs(options: LogReceiptOutputsOptions): Promise<LogReceiptOutputsResult>;
|
|
51
54
|
/** Belegliste einer Kasse samt Kennzahlen (nur mit ID-Token, siehe receipts.ts). */
|
|
52
55
|
listMyReceipts(options: ListMyReceiptsOptions): Promise<ReceiptList>;
|
|
53
56
|
/** Kassen des angemeldeten Benutzers (nur mit ID-Token, siehe cashregisters.ts). */
|
|
54
57
|
listMyCashregisters(): Promise<Cashregister[]>;
|
|
55
58
|
/** Rohdaten eines Zeitraums: Belege und Firmendaten (`getReportV2`). */
|
|
56
59
|
getReportV2(options: ReportV2Options): Promise<ReportV2>;
|
|
60
|
+
/** Eine Seite Belege eines Tages oder Zeitraums (`listReceipts`, hoechstens 31 Tage, blaetterbar). */
|
|
61
|
+
listReceipts<V extends ListReceiptsView = 'summary'>(options: ListReceiptsOptions<V>): Promise<ListReceiptsPage<V>>;
|
|
62
|
+
/** Alle Belege eines Tages oder Zeitraums, Seite fuer Seite geholt (hoechstens 100 Seiten). */
|
|
63
|
+
listAllReceipts<V extends ListReceiptsView = 'summary'>(options: ListReceiptsOptions<V>): AsyncGenerator<ListedReceipt<V>, void, undefined>;
|
|
57
64
|
/** Kassenbericht als PDF (v2): abgeschlossener Monat, Tag oder Zeitraum (Endpunkt `getCashregisterReport`). */
|
|
58
65
|
getCashregisterReport(options: CashregisterReportPeriod): Promise<Uint8Array>;
|
|
59
66
|
/** @deprecated Since 1.10.0: use getCashregisterReport. Tagesbericht als PDF (Kalendertag nach Wiener Zeit). */
|
package/dist/esm/client/api.js
CHANGED
|
@@ -3,7 +3,8 @@ import { hobexPay, hobexRefund } from '../payments/hobex.js';
|
|
|
3
3
|
import { createTransport, createBinaryTransport } from './transport.js';
|
|
4
4
|
import { downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2 } from './reports.js';
|
|
5
5
|
import { getCashboxStatus, getSignatureStatus } from './status.js';
|
|
6
|
-
import {
|
|
6
|
+
import { listAllReceipts, listReceipts } from './list-receipts.js';
|
|
7
|
+
import { sellReceipt, sellReceiptWithCompany, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, sendReceiptEmail, logReceiptOutputs, } from './receipts.js';
|
|
7
8
|
import { listMyCashregisters } from './cashregisters.js';
|
|
8
9
|
import { renewRegisterSession, endRegisterSession } from '../register/session.js';
|
|
9
10
|
export function createKasseneckApi(options) {
|
|
@@ -22,8 +23,11 @@ export function createKasseneckApi(options) {
|
|
|
22
23
|
getFirstReceiptDate: () => getFirstReceiptDate(rufen),
|
|
23
24
|
listMyReceipts: (o) => listMyReceipts(rufen, o),
|
|
24
25
|
sendReceiptEmail: (o) => sendReceiptEmail(rufen, o),
|
|
26
|
+
logReceiptOutputs: (o) => logReceiptOutputs(rufen, o),
|
|
25
27
|
listMyCashregisters: () => listMyCashregisters(rufen),
|
|
26
28
|
getReportV2: (o) => getReportV2(rufen, o),
|
|
29
|
+
listReceipts: (o) => listReceipts(rufen, o),
|
|
30
|
+
listAllReceipts: (o) => listAllReceipts(rufen, o),
|
|
27
31
|
getCashregisterReport: (options) => getCashregisterReport(rufenBinaer, options),
|
|
28
32
|
downloadDailyReport: (date) => downloadDailyReport(rufenBinaer, date),
|
|
29
33
|
downloadMonthlyReport: (reportMonth) => downloadMonthlyReport(rufenBinaer, reportMonth),
|