@kreiseck/kasseneck-api 1.12.0 → 1.14.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 +29 -0
- package/README.md +1 -0
- package/dist/cjs/client/api.d.ts +3 -1
- package/dist/cjs/client/api.js +1 -0
- package/dist/cjs/client/aufrufe.d.ts +5 -5
- package/dist/cjs/client/aufrufe.js +7 -2
- package/dist/cjs/client/index.d.ts +1 -1
- package/dist/cjs/client/index.js +2 -1
- 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 +15 -3
- package/dist/cjs/invoice/typen.d.ts +1 -1
- package/dist/cjs/models/index.d.ts +2 -1
- package/dist/cjs/models/index.js +12 -1
- 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 +187 -0
- package/dist/cjs/pos/texte.js +88 -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 +34 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/api.d.ts +3 -1
- package/dist/esm/client/api.js +2 -1
- package/dist/esm/client/aufrufe.d.ts +5 -5
- package/dist/esm/client/aufrufe.js +7 -2
- package/dist/esm/client/index.d.ts +1 -1
- package/dist/esm/client/index.js +1 -1
- 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/models/index.d.ts +2 -1
- package/dist/esm/models/index.js +1 -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 +187 -0
- package/dist/esm/pos/texte.js +87 -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 +34 -2
- 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 +1 -1
- package/fixtures/invoice-texts.json +1 -1
- package/fixtures/manifest.json +260 -260
- package/fixtures/pos-texts.json +205 -1
- package/fixtures/receipt-due-voucher-generated.json +1 -1
- 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 +25 -5
- 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 +407 -31
- 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 +114 -4
- package/fixtures/v3/stored/rechnungen.json +17 -17
- package/fixtures/v3/v3-vokabular.json +224 -19
- 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,73 @@
|
|
|
1
|
+
import { KasseneckValidationError } from '../client/errors.js';
|
|
2
|
+
import { toViennaWallClock } from '../vienna-time.js';
|
|
3
|
+
/** Beschriftung der Duplikat-Zeile; derselbe Text im Dart-Zwilling. */
|
|
4
|
+
const DUPLIKAT_AM = 'Duplikat am:';
|
|
5
|
+
/**
|
|
6
|
+
* Spaltenbreiten in Zwoelfteln. 5:7 setzt Beschriftung (12 Zeichen) und Zeit
|
|
7
|
+
* (19 Zeichen) auf 32 und 48 Zeichen ohne Umbruch in eine Zeile, den Wert am
|
|
8
|
+
* rechten Rand wie bei `Datum:`: 13 + 19 bzw. 20 + 28 Zeichen. Die Breiten
|
|
9
|
+
* von `Beleg-ID:` (6:6) und `Datum:` (4:8) reichen auf 32 Zeichen nicht.
|
|
10
|
+
*/
|
|
11
|
+
const LINKS = 5;
|
|
12
|
+
const RECHTS = 7;
|
|
13
|
+
/** Eigene Kopie einer Zeile: wer am Duplikat dreht, dreht nie am Erstdruck. */
|
|
14
|
+
function kopie(zeile) {
|
|
15
|
+
return zeile.kind === 'columns' ? { ...zeile, columns: zeile.columns.map((c) => ({ ...c })) } : { ...zeile };
|
|
16
|
+
}
|
|
17
|
+
const istZeile = (z, beschriftung) => z.kind === 'columns' && z.columns[0]?.text === beschriftung;
|
|
18
|
+
/** Zeitpunkt als `TT.MM.JJJJ HH:MM:SS` in Wiener Zeit; Bruchteile fallen weg. */
|
|
19
|
+
function wienerZeit(zeitpunkt) {
|
|
20
|
+
const t = toViennaWallClock(zeitpunkt);
|
|
21
|
+
const zwei = (n) => String(n).padStart(2, '0');
|
|
22
|
+
return `${zwei(t.day)}.${zwei(t.month)}.${t.year} ${zwei(t.hour)}:${zwei(t.minute)}:${zwei(t.second)}`;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Kennzeichnet einen Nachdruck als **Belegduplikat**. Registrierkassen-Erlass
|
|
26
|
+
* BMF-AV Nr. 2/2026, Abschnitt 4.5.6: „Ein Belegduplikat ist als solches zu
|
|
27
|
+
* bezeichnen, nicht nochmals zu signieren, nicht neuerlich im
|
|
28
|
+
* Datenerfassungsprotokoll aufzunehmen und darf zu keiner Veränderung des
|
|
29
|
+
* Umsatzzählers führen.“ Signatur, DEP und Zähler bleiben ohnehin unberührt,
|
|
30
|
+
* weil ein Nachdruck den gespeicherten Beleg druckt; diese Funktion liefert
|
|
31
|
+
* die Bezeichnung.
|
|
32
|
+
*
|
|
33
|
+
* Die Kasse ruft sie bei **jedem** Nachdruck und bei „Kopie drucken“ mit dem
|
|
34
|
+
* Zeitpunkt des Drucks auf, nie beim Erstdruck und nie fuer Mail, Link oder
|
|
35
|
+
* PDF, und gibt das Ergebnis an denselben Druckweg (`escPosLayoutBytes`,
|
|
36
|
+
* `eposPrintXml`, `receiptSheet`, React-Ansicht).
|
|
37
|
+
*
|
|
38
|
+
* Neu ist genau eine Zeile im Kennungsblock, direkt unter `Beleg-ID:`, in
|
|
39
|
+
* der Spaltenform von `Datum:` (nicht fett, Wert rechtsbuendig):
|
|
40
|
+
*
|
|
41
|
+
* ```
|
|
42
|
+
* Beleg-ID: AT0-KASSE1-42
|
|
43
|
+
* Duplikat am: 24.10.2026 14:10:05
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* `printedAt` ist ein Zeitpunkt; gedruckt wird er in Wiener Zeit
|
|
47
|
+
* (Sommerzeit nach EU-Regel), nie in der Zeitzone des Rechners. Ohne
|
|
48
|
+
* Spaltenzeile `Beleg-ID:` (Schicht-Bons) steht die Zeile ganz oben. Alles
|
|
49
|
+
* andere bleibt Zeile fuer Zeile wie beim Erstdruck.
|
|
50
|
+
*
|
|
51
|
+
* Reine Funktion: die Eingabe bleibt unangetastet, das Ergebnis ist eine
|
|
52
|
+
* eigene Kopie. Traegt das Layout schon eine Zeile `Duplikat am:`, bekommt
|
|
53
|
+
* nur sie die neue Zeit (der letzte Nachdruck gilt); es bleibt bei einer
|
|
54
|
+
* Zeile. Ein unbrauchbarer Zeitpunkt wirft `KasseneckValidationError`
|
|
55
|
+
* (`scope: 'request'`).
|
|
56
|
+
*/
|
|
57
|
+
export function markAsDuplicate(layout, printedAt) {
|
|
58
|
+
if (!(printedAt instanceof Date) || Number.isNaN(printedAt.getTime())) {
|
|
59
|
+
throw new KasseneckValidationError('markAsDuplicate', 'printedAt: kein gueltiger Zeitpunkt (Date)', 'request');
|
|
60
|
+
}
|
|
61
|
+
const neu = {
|
|
62
|
+
kind: 'columns',
|
|
63
|
+
columns: [
|
|
64
|
+
{ text: DUPLIKAT_AM, width: LINKS, align: 'left' },
|
|
65
|
+
{ text: wienerZeit(printedAt), width: RECHTS, align: 'right' },
|
|
66
|
+
],
|
|
67
|
+
};
|
|
68
|
+
const vorhanden = layout.lines.findIndex((z) => istZeile(z, DUPLIKAT_AM));
|
|
69
|
+
const lines = layout.lines.filter((z) => !istZeile(z, DUPLIKAT_AM)).map(kopie);
|
|
70
|
+
const stelle = vorhanden >= 0 ? vorhanden : lines.findIndex((z) => istZeile(z, 'Beleg-ID:')) + 1;
|
|
71
|
+
lines.splice(stelle, 0, neu);
|
|
72
|
+
return { ...layout, lines };
|
|
73
|
+
}
|
|
@@ -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. */
|
|
@@ -29,6 +29,10 @@ function istGutscheinZeile(p) {
|
|
|
29
29
|
export function istDeckbar(p) {
|
|
30
30
|
return p.tip == null && p.kind !== 'tip' && !istGutscheinZeile(p);
|
|
31
31
|
}
|
|
32
|
+
/** Summe der Trinkgeldzeilen (Personal und Inhaber) in Cent, wie `centSumme(kunde.filter(istTip))` im Backend. */
|
|
33
|
+
export function trinkgeldCents(kunde) {
|
|
34
|
+
return centSumme(kunde.filter((p) => p.tip != null || p.kind === 'tip'));
|
|
35
|
+
}
|
|
32
36
|
/** Wie beleg-toepfe: Euro in Positionsreihenfolge aufsummieren, erst die Summe auf Cent runden. */
|
|
33
37
|
export function centSumme(liste) {
|
|
34
38
|
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,4 +1,5 @@
|
|
|
1
1
|
export { buildReceiptLayout, receiptSignatureFailed, receiptSignatureIsTest, receiptIsZero, receiptAmountsAreZero, receiptIsSmallBusinessConsistent, receiptZdaText, CURRENT_LAYOUT_RULESET, SMALL_BUSINESS_NOTICE, formatCents, } from './layout.js';
|
|
2
|
+
export { markAsDuplicate } from './duplikat.js';
|
|
2
3
|
export { assertLogoRaster, escPosLayoutBytes, escPosLayoutResult, } from './layout-escpos.js';
|
|
3
4
|
export { renderReceiptGrid, gridColumnWidths, gridToText, CHARS_PER_PAPER_SIZE, } from './grid.js';
|
|
4
5
|
export { EposConnectionError, eposPrintXml, eposPrintXmlResult, eposXmlEscape, eposImageXml, eposServiceUrl, eposSoapEnvelope, eposParseResponse, eposDirectPrint, eposDirectStatus } from './epos.js';
|
|
@@ -441,19 +441,31 @@ function barZeilen(zahlung) {
|
|
|
441
441
|
*/
|
|
442
442
|
function zahlungsZeilen(receipt) {
|
|
443
443
|
const zahlungen = receipt.payments;
|
|
444
|
+
// Trägt der Beleg eine Gutschein-Zahlungszeile, entfällt, was 0 Cent kostet
|
|
445
|
+
// (§ 132a Abs. 3 BAO: die Zahlungsart ist kein Pflichtinhalt, der Betrag bleibt).
|
|
446
|
+
const mitGutschein = receipt.vouchers.some((v) => v.action === VoucherAction.redeem && v.type !== VoucherType.promo);
|
|
444
447
|
if (zahlungen == null || zahlungen.length === 0) {
|
|
448
|
+
if (mitGutschein && receiptSumCents(receipt) === 0)
|
|
449
|
+
return [];
|
|
445
450
|
return [paarZeile('Zahlungsart:', zahlungsartText(receipt.paymentMethod))];
|
|
446
451
|
}
|
|
447
452
|
if (zahlungen.length === 1) {
|
|
448
453
|
const zahlung = zahlungen[0];
|
|
454
|
+
if (mitGutschein && zahlung.amountCents === 0)
|
|
455
|
+
return [];
|
|
449
456
|
return [paarZeile('Zahlungsart:', zahlungsartText(zahlung.method)), ...zahlungTrinkgeldZeilen(zahlung), ...barZeilen(zahlung)];
|
|
450
457
|
}
|
|
458
|
+
// Mehrere Zahlungen: mit Gutschein entfallen die mit 0 Cent (Nummer bleibt die des Kartenblocks).
|
|
459
|
+
const alle = zahlungen.map((zahlung, i) => ({ zahlung, i }));
|
|
460
|
+
const liste = mitGutschein ? alle.filter(({ zahlung }) => zahlung.amountCents !== 0) : alle;
|
|
461
|
+
if (liste.length === 0)
|
|
462
|
+
return [];
|
|
451
463
|
const zeilen = [textZeile('Zahlungsarten:')];
|
|
452
|
-
|
|
464
|
+
for (const { zahlung, i } of liste) {
|
|
453
465
|
zeilen.push(paarZeile(zahlungNummerText(zahlung, i), `${formatCents(zahlung.amountCents)} €`, 8, 4));
|
|
454
466
|
zeilen.push(...zahlungTrinkgeldZeilen(zahlung));
|
|
455
467
|
zeilen.push(...barZeilen(zahlung));
|
|
456
|
-
}
|
|
468
|
+
}
|
|
457
469
|
return zeilen;
|
|
458
470
|
}
|
|
459
471
|
// -------------------------------------------------------- Kleinunternehmer
|
|
@@ -542,10 +554,12 @@ function gutscheinText(voucher) {
|
|
|
542
554
|
text += 'Wertgutschein';
|
|
543
555
|
}
|
|
544
556
|
else if (voucher.type === VoucherType.promo) {
|
|
545
|
-
text += '
|
|
557
|
+
text += 'Aktionsgutschein';
|
|
546
558
|
}
|
|
547
559
|
const name = voucher.name;
|
|
548
|
-
|
|
560
|
+
// Alte Belege nennen den Aktionsgutschein noch „Promotionsgutschein": auch dieser Name steht allein.
|
|
561
|
+
if (name != null && (name.toLowerCase().includes(text.toLowerCase())
|
|
562
|
+
|| (voucher.type === VoucherType.promo && name.toLowerCase().includes('promotionsgutschein')))) {
|
|
549
563
|
return name;
|
|
550
564
|
}
|
|
551
565
|
// Der Betrag steht in derselben Zeile rechts in der Betragsspalte — ihn
|
|
@@ -554,7 +568,7 @@ function gutscheinText(voucher) {
|
|
|
554
568
|
// identifiziert den Gutschein (Mehrzweck: der Kunde will wissen, WELCHER
|
|
555
569
|
// eingeloest wurde).
|
|
556
570
|
if (voucher.code != null && voucher.code !== '') {
|
|
557
|
-
text += ` ${voucher
|
|
571
|
+
text += ` ${codeKurz(voucher)}`;
|
|
558
572
|
}
|
|
559
573
|
if (name != null && name.length > 0) {
|
|
560
574
|
text += ` - ${name}`;
|
|
@@ -572,21 +586,20 @@ function gutscheinText(voucher) {
|
|
|
572
586
|
* Leistung Zeile dieses Gutscheins Text „ Einzweck, versteuert mit
|
|
573
587
|
* Beleg K1-ID-4711“ (bzw. „Leistung, …“, „…, befreit
|
|
574
588
|
* verkauft (Kleinunternehmer)“, 47 Zeichen: passt auf
|
|
575
|
-
* 80 mm) und 8:4 „ Rest am Gutschein“ | „19,50
|
|
589
|
+
* 80 mm) und 8:4 „ Rest am Gutschein“ | „19,50 €“ bzw.
|
|
576
590
|
* „2 Stück“
|
|
577
591
|
* Einloesung Mehrzweck nach „Zwischensumme“ 8:4 „Gutschein ····-9DWT“ |
|
|
578
592
|
* „-17,50 €“ und „ Rest am Gutschein“ | „32,50 €“
|
|
579
593
|
* Auszahlung 8:4 „Auszahlung Gutschein ····-9DWT“ | „-12,00 D“,
|
|
580
594
|
* Text „ Grund: <Grund>“
|
|
581
|
-
* Aktion Rabattzeile wie bisher (
|
|
595
|
+
* Aktion Rabattzeile wie bisher (Aktionsgutschein)
|
|
582
596
|
*
|
|
583
597
|
* Vermerke sind Textzeilen mit zwei fuehrenden Leerzeichen; das Raster bricht
|
|
584
598
|
* sie mit demselben Einzug um (grid.ts, haengender Einzug), auf 58 mm etwa
|
|
585
599
|
* „ Einzweck, versteuert mit“ / „ Beleg K1-ID-4711“.
|
|
586
600
|
*
|
|
587
|
-
* Die Zusatzzeilen kommen nur aus dem Eintrag: ein Beleg
|
|
588
|
-
*
|
|
589
|
-
* der Position, functions/beleg-layout.js `gutscheineFuerPaket`), zeigt seine
|
|
601
|
+
* Die Zusatzzeilen kommen nur aus dem Eintrag: ein Beleg ohne Eintrag (aeltere
|
|
602
|
+
* Belege, bei denen der Code schon an der Position steht) zeigt seine
|
|
590
603
|
* Positionen wie jede andere Position. Ein Betrag zaehlt immer genau einmal:
|
|
591
604
|
* Positionen in der Steuertabelle, Eintraege mit `zeroRateBucket` nie.
|
|
592
605
|
*/
|
|
@@ -599,12 +612,22 @@ function istMehrzweckMitCode(voucher) {
|
|
|
599
612
|
return voucher.type === VoucherType.value && voucher.voucherType === VoucherType.multi_purpose;
|
|
600
613
|
}
|
|
601
614
|
/**
|
|
602
|
-
* Code fuer die Belegzeile: die Maske
|
|
603
|
-
*
|
|
604
|
-
*
|
|
615
|
+
* Code fuer die Belegzeile: immer die kurze Maske `····-XXXX` aus dem Code-Ende
|
|
616
|
+
* (auch wenn ein alter Beleg die lange `····-····-XXXX` im Eintrag traegt),
|
|
617
|
+
* ohne den Platzhalter `no-code`, den der Server Alt-Eintraegen ohne Code
|
|
618
|
+
* setzt (index.js checkVouchersIsValid). Leer, wenn es keinen gibt.
|
|
605
619
|
*/
|
|
606
620
|
function gutscheinCodeZusatz(voucher) {
|
|
607
|
-
return typeof voucher.code === 'string' && voucher.code !== '' && voucher.code !== 'no-code' ? ` ${voucher
|
|
621
|
+
return typeof voucher.code === 'string' && voucher.code !== '' && voucher.code !== 'no-code' ? ` ${codeKurz(voucher)}` : '';
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Maskierte Codes (`····-····-XXXX` alt, `····-XXXX` neu) drucken immer kurz;
|
|
625
|
+
* ein Alt-Code ohne Maske (z. B. `GS-1`) bleibt, wie er ist.
|
|
626
|
+
*/
|
|
627
|
+
function codeKurz(voucher) {
|
|
628
|
+
const code = voucher.code ?? '';
|
|
629
|
+
const endung = gutscheinEndung(voucher);
|
|
630
|
+
return code.includes('····') && endung != null ? `····-${endung}` : code;
|
|
608
631
|
}
|
|
609
632
|
/** Die vier letzten Zeichen des Codes (`codeSuffix`, sonst aus der Maske), oder null. */
|
|
610
633
|
function gutscheinEndung(voucher) {
|
|
@@ -618,7 +641,7 @@ const MEHRZWECK_UST_TEXT = ' USt bei Einlösung';
|
|
|
618
641
|
* Eintrag? Jede Position hoechstens einem Eintrag, Eintraege in ihrer
|
|
619
642
|
* Reihenfolge (der Server haengt die Positionen in derselben Reihenfolge an).
|
|
620
643
|
* Verkauf: erste freie Position der Art mit demselben Betrag und ohne Code im
|
|
621
|
-
* Namen (wie
|
|
644
|
+
* Namen (wie die Zuordnung des Servers). Einloesung: freie Positionen
|
|
622
645
|
* mit genau dem Namen `Gutschein ····-<Endung>`, Auszahlung: `Auszahlung
|
|
623
646
|
* Gutschein ····-<Endung>` (gutschein-beleg.plane) -- der Reihe nach, bis
|
|
624
647
|
* ihr Betrag den des Eintrags erreicht (ein Kleinunternehmer-Einzweck oder
|
|
@@ -696,14 +719,14 @@ function gutscheinPositionsZeilen(item, satz, zu) {
|
|
|
696
719
|
else if (v.exempt === true) {
|
|
697
720
|
zeilen.push(textZeile(` ${art}, befreit verkauft (Kleinunternehmer)`));
|
|
698
721
|
}
|
|
699
|
-
// Rest: Betrag
|
|
700
|
-
//
|
|
722
|
+
// Rest: Betrag mit „€“ wie beim Mehrzweckgutschein, Stueck rechtsbuendig.
|
|
723
|
+
// Die Gesamtzahl kennt der Beleg nicht.
|
|
701
724
|
if (v.type === VoucherType.service) {
|
|
702
725
|
if (Number.isInteger(v.remainingQuantityAfter))
|
|
703
726
|
zeilen.push(paarZeile(' Rest am Gutschein', `${v.remainingQuantityAfter} Stück`, 8, 4));
|
|
704
727
|
}
|
|
705
728
|
else if (Number.isInteger(v.balanceAfterCents)) {
|
|
706
|
-
zeilen.push(paarZeile(' Rest am Gutschein', `${formatCents(v.balanceAfterCents)}
|
|
729
|
+
zeilen.push(paarZeile(' Rest am Gutschein', `${formatCents(v.balanceAfterCents)} €`, 8, 4));
|
|
707
730
|
}
|
|
708
731
|
return zeilen;
|
|
709
732
|
}
|
|
@@ -1093,7 +1116,7 @@ export function buildReceiptLayout(receipt, company, options = {}) {
|
|
|
1093
1116
|
lines.push(...(art === 'discount' ? rabattZeilen(item.name, teile) : trinkgeldZeilen(item.name, teile)));
|
|
1094
1117
|
}
|
|
1095
1118
|
// --- Gutscheine: verkaufte Wertgutscheine sind Umsatz zu 0 %, eingeloeste
|
|
1096
|
-
//
|
|
1119
|
+
// Aktionsgutscheine mindern die Steuergruppen anteilig.
|
|
1097
1120
|
// Am Storno-Beleg zaehlen Wertgutscheine mit umgekehrtem Vorzeichen
|
|
1098
1121
|
// (receiptValueVoucherSign): der verkaufte wird zurueckgezahlt.
|
|
1099
1122
|
// Eintraege mit `zeroRateBucket` stehen schon als Position (0-%-Topf).
|
|
@@ -1123,7 +1146,7 @@ export function buildReceiptLayout(receipt, company, options = {}) {
|
|
|
1123
1146
|
lines.push(textZeile(MEHRZWECK_UST_TEXT));
|
|
1124
1147
|
}
|
|
1125
1148
|
if (voucher.action === VoucherAction.redeem && voucher.type === VoucherType.promo) {
|
|
1126
|
-
// Am Storno-Beleg steht der
|
|
1149
|
+
// Am Storno-Beleg steht der Aktionsgutschein nur als Bezug: den Rabatt
|
|
1127
1150
|
// nimmt dort die Position „Gutschein-Ausgleich“ zurueck (receiptSubSumCents).
|
|
1128
1151
|
if (wgVz === 1)
|
|
1129
1152
|
promoCents += wert;
|
|
@@ -1243,7 +1266,7 @@ export function buildReceiptLayout(receipt, company, options = {}) {
|
|
|
1243
1266
|
return { lines, paperSize, ruleset };
|
|
1244
1267
|
}
|
|
1245
1268
|
/**
|
|
1246
|
-
* Verteilt einen eingeloesten
|
|
1269
|
+
* Verteilt einen eingeloesten Aktionsgutschein anteilig auf die
|
|
1247
1270
|
* Steuergruppen — Zwilling von `print_paper.dart` (Zeilen 296-325).
|
|
1248
1271
|
*
|
|
1249
1272
|
* 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
|
/**
|
|
@@ -202,7 +202,7 @@ export async function listRegisterUsersForDevice(options) {
|
|
|
202
202
|
};
|
|
203
203
|
});
|
|
204
204
|
const settingsRoh = daten?.settings;
|
|
205
|
-
const settings = posSettingsFromWire(settingsRoh !== null && typeof settingsRoh === 'object' ? settingsRoh : null);
|
|
205
|
+
const { vouchers: _keinBlock, ...settings } = posSettingsFromWire(settingsRoh !== null && typeof settingsRoh === 'object' ? settingsRoh : null);
|
|
206
206
|
const kopf = daten?.receiptHeader;
|
|
207
207
|
const receiptHeader = kopf && typeof kopf === 'object' ? fromReceiptCompanyPayload(kopf) : null;
|
|
208
208
|
return {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { buildReceiptLayout, CURRENT_LAYOUT_RULESET } from '../receipt/layout.js';
|
|
2
|
-
import { gutscheineFuerPaket, wieVendortesPaket } from './gutscheine.js';
|
|
3
2
|
/**
|
|
4
3
|
* Layout wie `beleg-layout.layoutFuerBeleg`: 80 mm, Regelwerk mindestens das
|
|
5
4
|
* aktuelle. Kann der Server es nicht bauen, liefert er `null` (dann baut
|
|
@@ -8,9 +7,9 @@ import { gutscheineFuerPaket, wieVendortesPaket } from './gutscheine.js';
|
|
|
8
7
|
export function layoutWieServer(b, regelwerk) {
|
|
9
8
|
const ruleset = Math.max(Number(regelwerk) || 1, CURRENT_LAYOUT_RULESET);
|
|
10
9
|
try {
|
|
11
|
-
// Wie layoutFuerBeleg
|
|
12
|
-
//
|
|
13
|
-
return buildReceiptLayout(
|
|
10
|
+
// Wie layoutFuerBeleg seit dem Paket 0.34.0 des Servers: der Beleg geht
|
|
11
|
+
// unveraendert ans Paket (keine Aufbereitung der Gutscheine mehr).
|
|
12
|
+
return buildReceiptLayout(b.receipt, b.company, {
|
|
14
13
|
paperSize: 'mm80', ruleset, testCashregister: b.testCashregister, testSignature: b.testSignature, registrationInfo: b.registrationInfo,
|
|
15
14
|
});
|
|
16
15
|
}
|
|
@@ -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 = "328c8d0ff0f496f8f6b7d9ed78673e7666980e38586ec7efacb442e6906d898a";
|
|
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 {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Erzeugt von scripts/stored-vokabular.mjs aus fixtures/v3/v3-vokabular.json.
|
|
2
2
|
// Nicht von Hand aendern: test/stored.test.ts vergleicht mit dem Vertrag.
|
|
3
3
|
/** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
|
|
4
|
-
export const VOKABULAR_QUELLE = "
|
|
4
|
+
export const VOKABULAR_QUELLE = "328c8d0ff0f496f8f6b7d9ed78673e7666980e38586ec7efacb442e6906d898a";
|
|
5
5
|
/** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
|
|
6
6
|
export const SCHEMAS = {
|
|
7
7
|
"getReceipt": {
|
|
@@ -50,6 +50,7 @@ export const SCHEMAS = {
|
|
|
50
50
|
"codeSuffix": "codeEnde",
|
|
51
51
|
"faceValueCents": "nennwertCents",
|
|
52
52
|
"quantity": "stueck",
|
|
53
|
+
"articleName": "artikelName",
|
|
53
54
|
"validity": {
|
|
54
55
|
"__": "gueltigkeit",
|
|
55
56
|
"pattern": "muster",
|
|
@@ -58,6 +59,15 @@ export const SCHEMAS = {
|
|
|
58
59
|
"validUntil": "gueltigBis"
|
|
59
60
|
}
|
|
60
61
|
}
|
|
62
|
+
],
|
|
63
|
+
"outputs": [
|
|
64
|
+
{
|
|
65
|
+
"__": "ausgaben",
|
|
66
|
+
"kind": "art",
|
|
67
|
+
"result": "ergebnis",
|
|
68
|
+
"by": "durch",
|
|
69
|
+
"count": "anzahl"
|
|
70
|
+
}
|
|
61
71
|
]
|
|
62
72
|
},
|
|
63
73
|
"werte": {
|
|
@@ -72,6 +82,12 @@ export const SCHEMAS = {
|
|
|
72
82
|
},
|
|
73
83
|
"issuedVouchers[].validity.pattern": {
|
|
74
84
|
"$catalog": "GUTSCHEIN_MUSTER"
|
|
85
|
+
},
|
|
86
|
+
"outputs[].kind": {
|
|
87
|
+
"$catalog": "AUSGABE_ART"
|
|
88
|
+
},
|
|
89
|
+
"outputs[].result": {
|
|
90
|
+
"$catalog": "AUSGABE_ERGEBNIS"
|
|
75
91
|
}
|
|
76
92
|
}
|
|
77
93
|
},
|
|
@@ -154,7 +170,10 @@ export const SCHEMAS = {
|
|
|
154
170
|
"fullscreen": "vollbild",
|
|
155
171
|
"clearTendered": "gegebenLeeren",
|
|
156
172
|
"clearCart": "korbLeeren",
|
|
157
|
-
"splitPayment": "getrennt"
|
|
173
|
+
"splitPayment": "getrennt",
|
|
174
|
+
"shiftStatus": "kassenstand",
|
|
175
|
+
"openDrawer": "ladeOeffnen",
|
|
176
|
+
"voucherPayout": "gutscheinAuszahlen"
|
|
158
177
|
},
|
|
159
178
|
"printerEnabled": "druckerAn",
|
|
160
179
|
"printerType": "druckerArt",
|
|
@@ -298,6 +317,19 @@ export const ARTIKEL_FELDER = [
|
|
|
298
317
|
];
|
|
299
318
|
/** Wertkataloge innen (deutsch) -> aussen (englisch). */
|
|
300
319
|
export const KATALOGE = {
|
|
320
|
+
"AUSGABE_ART": {
|
|
321
|
+
"erstdruck": "print",
|
|
322
|
+
"duplikat": "reprint",
|
|
323
|
+
"mail": "email",
|
|
324
|
+
"link_geteilt": "link_shared",
|
|
325
|
+
"pdf_geteilt": "pdf_shared",
|
|
326
|
+
"abruf": "opened"
|
|
327
|
+
},
|
|
328
|
+
"AUSGABE_ERGEBNIS": {
|
|
329
|
+
"ok": "ok",
|
|
330
|
+
"fehler": "failed",
|
|
331
|
+
"unklar": "unclear"
|
|
332
|
+
},
|
|
301
333
|
"E1A_GRUPPE": {
|
|
302
334
|
"erloese": "revenue",
|
|
303
335
|
"erloese_waren": "revenue_goods",
|
package/dist/esm/version.d.ts
CHANGED
package/dist/esm/version.js
CHANGED