@kreiseck/kasseneck-api 1.31.0 → 1.32.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.
Files changed (119) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/client/aufrufe.d.ts +3 -3
  3. package/dist/cjs/client/aufrufe.js +8 -0
  4. package/dist/cjs/client/receipts.d.ts +11 -0
  5. package/dist/cjs/client/receipts.js +14 -0
  6. package/dist/cjs/index.d.ts +2 -2
  7. package/dist/cjs/index.js +8 -5
  8. package/dist/cjs/models/index.d.ts +1 -1
  9. package/dist/cjs/models/index.js +5 -2
  10. package/dist/cjs/models/receipt-errors.d.ts +1 -1
  11. package/dist/cjs/models/receipt-errors.js +9 -0
  12. package/dist/cjs/models/receipt-item.d.ts +44 -2
  13. package/dist/cjs/models/receipt-item.js +56 -1
  14. package/dist/cjs/models/receipt.d.ts +17 -0
  15. package/dist/cjs/models/receipt.js +9 -0
  16. package/dist/cjs/pos/artikel.d.ts +14 -0
  17. package/dist/cjs/pos/artikel.js +3 -0
  18. package/dist/cjs/pos/client.d.ts +1 -0
  19. package/dist/cjs/pos/client.js +3 -0
  20. package/dist/cjs/pos/errors.d.ts +1 -1
  21. package/dist/cjs/pos/errors.js +12 -0
  22. package/dist/cjs/pos/index.d.ts +4 -2
  23. package/dist/cjs/pos/index.js +24 -4
  24. package/dist/cjs/pos/leergut.d.ts +60 -0
  25. package/dist/cjs/pos/leergut.js +82 -0
  26. package/dist/cjs/pos/pfand.d.ts +144 -0
  27. package/dist/cjs/pos/pfand.js +382 -0
  28. package/dist/cjs/pos/settings.d.ts +3 -7
  29. package/dist/cjs/pos/settings.js +7 -0
  30. package/dist/cjs/pos/texte.d.ts +68 -0
  31. package/dist/cjs/pos/texte.js +40 -1
  32. package/dist/cjs/receipt/discount.js +3 -0
  33. package/dist/cjs/receipt/due.d.ts +6 -0
  34. package/dist/cjs/receipt/due.js +16 -5
  35. package/dist/cjs/receipt/gutschein-plan.d.ts +7 -1
  36. package/dist/cjs/receipt/gutschein-plan.js +16 -2
  37. package/dist/cjs/receipt/layout.js +108 -2
  38. package/dist/cjs/register/pairing.d.ts +15 -1
  39. package/dist/cjs/register/pairing.js +14 -1
  40. package/dist/cjs/stored/vokabular.d.ts +1 -1
  41. package/dist/cjs/stored/vokabular.js +72 -4
  42. package/dist/cjs/version.d.ts +1 -1
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/esm/client/aufrufe.d.ts +3 -3
  45. package/dist/esm/client/aufrufe.js +8 -0
  46. package/dist/esm/client/receipts.d.ts +11 -0
  47. package/dist/esm/client/receipts.js +14 -0
  48. package/dist/esm/index.d.ts +2 -2
  49. package/dist/esm/index.js +2 -2
  50. package/dist/esm/models/index.d.ts +1 -1
  51. package/dist/esm/models/index.js +1 -1
  52. package/dist/esm/models/receipt-errors.d.ts +1 -1
  53. package/dist/esm/models/receipt-errors.js +9 -0
  54. package/dist/esm/models/receipt-item.d.ts +44 -2
  55. package/dist/esm/models/receipt-item.js +54 -1
  56. package/dist/esm/models/receipt.d.ts +17 -0
  57. package/dist/esm/models/receipt.js +9 -0
  58. package/dist/esm/pos/artikel.d.ts +14 -0
  59. package/dist/esm/pos/artikel.js +3 -0
  60. package/dist/esm/pos/client.d.ts +1 -0
  61. package/dist/esm/pos/client.js +3 -0
  62. package/dist/esm/pos/errors.d.ts +1 -1
  63. package/dist/esm/pos/errors.js +12 -0
  64. package/dist/esm/pos/index.d.ts +4 -2
  65. package/dist/esm/pos/index.js +4 -2
  66. package/dist/esm/pos/leergut.d.ts +60 -0
  67. package/dist/esm/pos/leergut.js +77 -0
  68. package/dist/esm/pos/pfand.d.ts +144 -0
  69. package/dist/esm/pos/pfand.js +371 -0
  70. package/dist/esm/pos/settings.d.ts +3 -7
  71. package/dist/esm/pos/settings.js +7 -0
  72. package/dist/esm/pos/texte.d.ts +68 -0
  73. package/dist/esm/pos/texte.js +38 -0
  74. package/dist/esm/receipt/discount.js +4 -1
  75. package/dist/esm/receipt/due.d.ts +6 -0
  76. package/dist/esm/receipt/due.js +17 -6
  77. package/dist/esm/receipt/gutschein-plan.d.ts +7 -1
  78. package/dist/esm/receipt/gutschein-plan.js +14 -2
  79. package/dist/esm/receipt/layout.js +109 -3
  80. package/dist/esm/register/pairing.d.ts +15 -1
  81. package/dist/esm/register/pairing.js +13 -1
  82. package/dist/esm/stored/vokabular.d.ts +1 -1
  83. package/dist/esm/stored/vokabular.js +72 -4
  84. package/dist/esm/version.d.ts +1 -1
  85. package/dist/esm/version.js +1 -1
  86. package/fixtures/deposit-cases.json +4758 -0
  87. package/fixtures/expected/deposit-return.grid32.txt +28 -0
  88. package/fixtures/expected/deposit-return.grid48.txt +28 -0
  89. package/fixtures/expected/deposit-return.lines.json +275 -0
  90. package/fixtures/expected/deposit-return.sheet32.json +194 -0
  91. package/fixtures/expected/deposit-return.sheet48.json +194 -0
  92. package/fixtures/expected/deposit.grid32.txt +34 -0
  93. package/fixtures/expected/deposit.grid48.txt +32 -0
  94. package/fixtures/expected/deposit.lines.json +316 -0
  95. package/fixtures/expected/deposit.sheet32.json +230 -0
  96. package/fixtures/expected/deposit.sheet48.json +218 -0
  97. package/fixtures/hobex-hps-codes.json +1 -1
  98. package/fixtures/invoice-api.schema.json +1 -1
  99. package/fixtures/invoice-texts.json +1 -1
  100. package/fixtures/manifest.json +16 -0
  101. package/fixtures/pos-texts.json +62 -1
  102. package/fixtures/receipts/deposit-return.json +63 -0
  103. package/fixtures/receipts/deposit.json +83 -0
  104. package/fixtures/return-code-cases.json +1338 -0
  105. package/fixtures/surface.json +44 -4
  106. package/fixtures/v3/antworten/belege.json +2 -2
  107. package/fixtures/v3/antworten/belegmail.json +2 -2
  108. package/fixtures/v3/antworten/berichte.json +2 -2
  109. package/fixtures/v3/antworten/kasse-belege.json +2 -2
  110. package/fixtures/v3/antworten/kasse.json +428 -13
  111. package/fixtures/v3/antworten/lager.json +1 -1
  112. package/fixtures/v3/antworten/rechnungen.json +2 -2
  113. package/fixtures/v3/antworten/storno.json +2 -2
  114. package/fixtures/v3/stored/belege.json +2 -2
  115. package/fixtures/v3/stored/kasse.json +42 -4
  116. package/fixtures/v3/stored/rechnungen.json +2 -2
  117. package/fixtures/v3/v3-vokabular.json +808 -27
  118. package/fixtures/v3/zahlbetrag-faelle.json +187 -3
  119. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
1
  import type { InternerTransport } from '../client/aufrufe.js';
2
2
  import { type PosReference } from './kachel-referenz.js';
3
+ import { type DepositEntry } from './pfand.js';
3
4
  import { type ArticleExternalVoucher } from './fremdgutschein-artikel.js';
4
5
  /**
5
6
  * Artikelgruppen (Kategorien der Kachel-Kasse) und Artikel in der Form, die
@@ -22,6 +23,11 @@ export interface ArticleGroup {
22
23
  * erst ueber [addOnsFor].
23
24
  */
24
25
  addOns?: string[] | null;
26
+ /**
27
+ * Pfand der Gruppe (Pfand & Leergut): gilt fuer Artikel ohne eigene Liste; null = keines.
28
+ * Optional wie `addOns`, der Leser setzt es immer.
29
+ */
30
+ deposits?: DepositEntry[] | null;
25
31
  }
26
32
  export interface ArticleGroupPayload {
27
33
  id?: string | null;
@@ -31,6 +37,7 @@ export interface ArticleGroupPayload {
31
37
  sort?: number | null;
32
38
  vatRate?: number | null;
33
39
  addOns?: unknown;
40
+ deposits?: unknown;
34
41
  }
35
42
  /** Zusatzliste am Draht: nur eine Liste von Texten zaehlt, sonst null. Paketintern. */
36
43
  export declare function addOnListe(wert: unknown): string[] | null;
@@ -132,6 +139,12 @@ export interface PosArticle {
132
139
  * unbekannter Wert wird null.
133
140
  */
134
141
  externalVoucher?: ArticleExternalVoucher | null;
142
+ /**
143
+ * Pfand des Artikels (Pfand & Leergut): `null` = keine eigene Angabe (die Gruppe gilt), `[]` = ausdruecklich
144
+ * ohne Pfand, sonst die Eintraege. Der Server setzt die Pfandzeilen am Beleg daraus (`autoDeposits`). Optional wie
145
+ * `addOns`, der Leser setzt es immer.
146
+ */
147
+ deposits?: DepositEntry[] | null;
135
148
  }
136
149
  /**
137
150
  * Kann die Kachel gebucht werden? Mit festem Preis immer, ohne Preis nur mit
@@ -173,6 +186,7 @@ export interface PosArticlePayload {
173
186
  reference?: unknown;
174
187
  addOns?: unknown;
175
188
  externalVoucher?: unknown;
189
+ deposits?: unknown;
176
190
  }
177
191
  export declare function fromPosArticlePayload(p: PosArticlePayload): PosArticle;
178
192
  /**
@@ -14,6 +14,7 @@ exports.listMyArticleGroups = listMyArticleGroups;
14
14
  exports.listMyArticles = listMyArticles;
15
15
  const errors_js_1 = require("../client/errors.js");
16
16
  const kachel_referenz_js_1 = require("./kachel-referenz.js");
17
+ const pfand_js_1 = require("./pfand.js");
17
18
  const fremdgutschein_artikel_js_1 = require("./fremdgutschein-artikel.js");
18
19
  /** Zusatzliste am Draht: nur eine Liste von Texten zaehlt, sonst null. Paketintern. */
19
20
  function addOnListe(wert) {
@@ -28,6 +29,7 @@ function fromArticleGroupPayload(p) {
28
29
  sort: typeof p.sort === 'number' ? p.sort : 0,
29
30
  vatRate: typeof p.vatRate === 'number' ? p.vatRate : null,
30
31
  addOns: addOnListe(p.addOns),
32
+ deposits: (0, pfand_js_1.depositEntriesFromWire)(p.deposits),
31
33
  };
32
34
  }
33
35
  /**
@@ -108,6 +110,7 @@ function fromPosArticlePayload(p) {
108
110
  reference: (0, kachel_referenz_js_1.fromReferencePayload)(p.reference),
109
111
  addOns: addOnListe(p.addOns),
110
112
  externalVoucher: (0, fremdgutschein_artikel_js_1.isArticleExternalVoucher)(p.externalVoucher) ? p.externalVoucher : null,
113
+ deposits: (0, pfand_js_1.depositEntriesFromWire)(p.deposits),
111
114
  };
112
115
  }
113
116
  /**
@@ -9,6 +9,7 @@ export declare function posSettingsFromWire(data: {
9
9
  business?: unknown;
10
10
  device?: unknown;
11
11
  vouchers?: unknown;
12
+ deposit?: unknown;
12
13
  } | null | undefined): PosSettings;
13
14
  /** Betriebsweite Einstellungen schreiben (Recht `layout`); liefert den gemischten Stand. */
14
15
  export declare function setMyPosSettings(transport: InternerTransport, business: Partial<PosBusinessSettings>): Promise<PosBusinessSettings>;
@@ -7,6 +7,7 @@ exports.setMyRegisterDeviceSettings = setMyRegisterDeviceSettings;
7
7
  exports.setMyPosLogo = setMyPosLogo;
8
8
  const errors_js_1 = require("../client/errors.js");
9
9
  const gutschein_js_1 = require("./gutschein.js");
10
+ const pfand_js_1 = require("./pfand.js");
10
11
  const rabatt_vorlagen_js_1 = require("./rabatt-vorlagen.js");
11
12
  const settings_js_1 = require("./settings.js");
12
13
  /*
@@ -38,10 +39,12 @@ async function getPosSettings(transport, options = {}) {
38
39
  }
39
40
  /** `{business, device, vouchers}` einer Antwort, gemischt mit den Standardwerten. */
40
41
  function posSettingsFromWire(data) {
42
+ const deposit = (0, pfand_js_1.posDepositSettingsFromWire)(data?.deposit);
41
43
  return {
42
44
  vouchers: (0, gutschein_js_1.posVoucherSettingsFromWire)(data?.vouchers),
43
45
  business: (0, settings_js_1.mergePosSettings)(settings_js_1.POS_BUSINESS_DEFAULTS, objekt(data?.business)),
44
46
  device: (0, settings_js_1.mergePosSettings)(settings_js_1.POS_DEVICE_DEFAULTS, objekt(data?.device)),
47
+ ...(deposit ? { deposit } : {}),
45
48
  };
46
49
  }
47
50
  /** Betriebsweite Einstellungen schreiben (Recht `layout`); liefert den gemischten Stand. */
@@ -21,7 +21,7 @@ import { KasseneckApiError } from '../client/errors.js';
21
21
  * ueber `KasseneckApiError.code` lesbar; die Kasse braucht dafuer einen
22
22
  * Rueckfallzweig.
23
23
  */
24
- export declare const POS_ERROR_CODES: readonly ["account_not_found", "action_confirmation_required", "admin_required", "after_count_not_permitted", "api_not_approved", "app_check_invalid", "app_check_missing", "article_not_found", "article_not_in_scope", "article_not_tracked", "cash_movement_exceeds_balance", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "comment_required", "count_already_voided", "count_not_found", "device_not_found", "dialect_mismatch", "drawer_inactive", "drawer_not_found", "idempotency_conflict", "idempotency_key_required", "internal_translation_error", "invalid_amount", "invalid_cursor", "invalid_denominations", "invalid_discount_preset", "invalid_movement_type", "invalid_quantity", "invalid_serial", "live_not_enabled", "location_inactive", "location_not_found", "logo_invalid", "logo_invalid_type", "logo_too_large", "method_not_allowed", "mfa_required", "module_inactive", "not_found", "not_permitted", "note_required", "password_change_required", "print_job_not_found", "print_layout_failed", "printer_not_found", "recount_exhausted", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "serial_already_counted", "serial_not_allowed", "serial_required", "server_error", "session_expired", "session_other_cashregister", "shift_already_open", "shift_closed", "shift_mode_off", "shift_not_open", "stocktake_closed", "stocktake_closing", "stocktake_not_found", "stocktake_not_open", "tip_payout_exceeds_claim", "too_many_counts", "transfer_same_drawer", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
24
+ export declare const POS_ERROR_CODES: readonly ["account_not_found", "action_confirmation_required", "admin_required", "after_count_not_permitted", "api_not_approved", "app_check_invalid", "app_check_missing", "article_not_found", "article_not_in_scope", "article_not_tracked", "cash_movement_exceeds_balance", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "comment_required", "count_already_voided", "count_not_found", "deposit_follows_item", "deposit_not_enabled", "deposit_return_not_offered", "deposit_set_by_server", "deposit_type_in_use", "deposit_type_not_found", "deposit_type_not_issued", "device_not_found", "dialect_mismatch", "drawer_inactive", "drawer_not_found", "filler_role_required", "idempotency_conflict", "idempotency_key_required", "internal_translation_error", "invalid_amount", "invalid_cursor", "invalid_denominations", "invalid_deposit", "invalid_deposit_quantity", "invalid_discount_preset", "invalid_item_kind", "invalid_movement_type", "invalid_quantity", "invalid_serial", "live_not_enabled", "location_inactive", "location_not_found", "logo_invalid", "logo_invalid_type", "logo_too_large", "method_not_allowed", "mfa_required", "module_inactive", "not_found", "not_permitted", "note_required", "password_change_required", "print_job_not_found", "print_layout_failed", "printer_not_found", "recount_exhausted", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "serial_already_counted", "serial_not_allowed", "serial_required", "server_error", "session_expired", "session_other_cashregister", "shift_already_open", "shift_closed", "shift_mode_off", "shift_not_open", "stocktake_closed", "stocktake_closing", "stocktake_not_found", "stocktake_not_open", "tip_payout_exceeds_claim", "too_many_counts", "too_many_deposit_types", "transfer_same_drawer", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
25
25
  export type PosErrorCode = typeof POS_ERROR_CODES[number];
26
26
  export declare function isPosErrorCode(value: unknown): value is PosErrorCode;
27
27
  /** Der Code eines geworfenen Fehlers, wenn er in [POS_ERROR_CODES] steht; sonst `undefined`. */
@@ -47,17 +47,28 @@ exports.POS_ERROR_CODES = Object.freeze([
47
47
  'comment_required',
48
48
  'count_already_voided',
49
49
  'count_not_found',
50
+ 'deposit_follows_item',
51
+ 'deposit_not_enabled',
52
+ 'deposit_return_not_offered',
53
+ 'deposit_set_by_server',
54
+ 'deposit_type_in_use',
55
+ 'deposit_type_not_found',
56
+ 'deposit_type_not_issued',
50
57
  'device_not_found',
51
58
  'dialect_mismatch',
52
59
  'drawer_inactive',
53
60
  'drawer_not_found',
61
+ 'filler_role_required',
54
62
  'idempotency_conflict',
55
63
  'idempotency_key_required',
56
64
  'internal_translation_error',
57
65
  'invalid_amount',
58
66
  'invalid_cursor',
59
67
  'invalid_denominations',
68
+ 'invalid_deposit',
69
+ 'invalid_deposit_quantity',
60
70
  'invalid_discount_preset',
71
+ 'invalid_item_kind',
61
72
  'invalid_movement_type',
62
73
  'invalid_quantity',
63
74
  'invalid_serial',
@@ -99,6 +110,7 @@ exports.POS_ERROR_CODES = Object.freeze([
99
110
  'stocktake_not_open',
100
111
  'tip_payout_exceeds_claim',
101
112
  'too_many_counts',
113
+ 'too_many_deposit_types',
102
114
  'transfer_same_drawer',
103
115
  'unauthorized',
104
116
  'user_disabled',
@@ -10,18 +10,20 @@ export { type PosTheme, type PosFontSize, type PosWatermark, type PosQuantity, t
10
10
  export { type ArticleGroup, type ArticleGroupPayload, fromArticleGroupPayload, type PosArticle, type PosArticlePayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, QUANTITY_RULES, type QuantityRule, type QuantityDefaults, quantityRuleForUnit, quantityDefaults, allowedQuantity, isBookableArticle, tilePrompts, } from './artikel.js';
11
11
  export { REFERENCE_MODES, type ReferenceMode, type PosReference, REFERENCE_INPUT_MAX, REFERENCE_LABEL_MAX, REFERENCE_HINT_MAX, REFERENCE_PATTERN_MAX, REFERENCE_PATTERN_TEMPLATES, cleanReferenceText, isValidReferencePattern, isDigitsOnlyPattern, type ReferenceCheckResult, checkReference, referenceLineName, fromReferencePayload, } from './kachel-referenz.js';
12
12
  export { ADD_ONS_MAX, ADD_ON_BLOCK_REASONS, type AddOnBlockReason, isSelectableAddOn, addOnsFor, addOnReferencesValid, addOnsOfItem, addOnRemap, addOnDisplayOrder, orderAddOnLines, } from './zusaetze.js';
13
+ export { DEPOSIT_KINDS, type DepositKind, DEPOSIT_TYPES, type DepositContainerType, DEPOSIT_RETURN_MODES, type DepositReturnMode, DEPOSIT_ON_PREMISES_DEFAULTS, type DepositOnPremisesDefault, type DepositAmount, type DepositType, type DepositSettings, type DepositEntry, type DepositSharedReturnPoint, type CashRegisterDeposit, posDepositSettingsFromWire, depositEntriesFromWire, cashRegisterDepositFromWire, depositsFor, depositAmountOn, viennaDay, withDepositLines, depositReturnLine, type DepositPreviewItem, type DepositPreviewLine, type DepositPreviewInput, type DepositPreviewArticle, type DepositPreviewResult, type DepositPreviewErrorCode, } from './pfand.js';
13
14
  export { ARTICLE_EXTERNAL_VOUCHER_TYPES, type ArticleExternalVoucher, ARTICLE_EXTERNAL_VOUCHER_INVALID, ARTICLE_EXTERNAL_VOUCHER_VAT_RATES, EXTERNAL_VOUCHER_ARTICLE_REASONS, type ExternalVoucherArticleReason, type ExternalVoucherArticleInput, isArticleExternalVoucher, checkExternalVoucherValue, checkExternalVoucherArticle, type ExternalVoucherTileBlock, externalVoucherTileBlock, } from './fremdgutschein-artikel.js';
14
15
  export { ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape } from '../models/voucher.js';
15
16
  export { getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, setMyPosLogo, posSettingsFromWire, type SetMyPosLogoOptions, } from './client.js';
16
17
  export { POS_ERROR_CODES, type PosErrorCode, isPosErrorCode, posErrorCode, isPosError, type PosFieldError, posFieldErrors, } from './errors.js';
17
18
  export { distributeDiscount } from '../receipt/discount.js';
18
- export { cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, type VoucherPerms, type RegisterScope, type RegisterUserPerms } from '../register/pairing.js';
19
+ export { cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, depositReturnOf, type VoucherPerms, type RegisterScope, type RegisterUserPerms } from '../register/pairing.js';
19
20
  export { type NetworkPrinter, type PrintJob, type PrintJobStatus, PRINT_JOB_STATUSES, type PrintJobSource, PRINT_JOB_SOURCES, isPrintJobFinished, type CreatePrintJobOptions, listMyPrinters, createPrintJob, getPrintJob, } from './drucker.js';
20
21
  export { listMyTipRecipients } from './trinkgeld.js';
21
22
  export { posDiscountPresets, discountPresetChipText, discountChipsFromPresets, checkDiscountPresets, discountBlockLines, INVALID_DISCOUNT_PRESET, DISCOUNT_PRESETS_MAX, DISCOUNT_PRESET_NAME_MAX, DISCOUNT_PRESET_PERCENT_BP, DISCOUNT_PRESET_AMOUNT_CENTS, DISCOUNT_PRESET_MESSAGES, type DiscountPresetReason, type DiscountPresetError, type DiscountPresetsCheck, type DiscountBlockLine, type DiscountTotal, } from './rabatt-vorlagen.js';
22
23
  export { depFolderName } from './dep.js';
23
24
  export { type RegisterInspectionInfo, type RegisterInspectionSignature, type InspectionSignatureStatus, type InspectionInfoRow, type InspectionInfoRowKey, type InspectionInfoSection, type InspectionInfoLinesOptions, getRegisterInspectionInfo, inspectionInfoRows, inspectionInfoLines, } from './kasseninfo.js';
24
25
  export { type ConnectStateReport, reportConnectState } from './connect-bestand.js';
26
+ export { type ReturnCode, type ReturnCodeEntry, type ReturnCodeMatch, type ReturnCodeArticle, type ReturnCodeGroup, type ReturnCodeInput, learnReturnCode, listReturnCodes, matchReturnCode, } from './leergut.js';
25
27
  export { STOCK_LOCATION_TYPES, type StockLocationType, type StockLocation, type StockLocationAddress, type StockLevel, type StockValue, type StockList, type ListMyStockOptions, type SetMyCashregisterStockLocationOptions, type CashregisterStockLocation, listMyStockLocations, listMyStock, setMyCashregisterStockLocation, } from './lager.js';
26
28
  export { type ListMyStocktakesOptions, type ListMyStocktakeItemsOptions, type ListMyStocktakeCountsOptions, type RecordMyStocktakeCountOptions, type VoidMyStocktakeCountOptions, listMyStocktakes, listMyStocktakeItems, listMyStocktakeCounts, recordMyStocktakeCount, voidMyStocktakeCount, parseQuantityMilli, } from './inventur.js';
27
29
  export type { Stocktake, StocktakeItem, StocktakeCount, StocktakeCountResult, StocktakeItemPage, StocktakeCountPage, StocktakeActor, StocktakeProgress, StocktakeReview, StocktakeRecount, StocktakeScope, } from '../inventory/typen.js';
@@ -32,5 +34,5 @@ export { EUR_DENOMINATIONS, MOVEMENT_TYPES, MANUAL_MOVEMENT_TYPES, CASH_LOCATION
32
34
  export { type ShiftReceiptLayoutOptions, shiftReceiptLayout, cashMovementLayout } from '../receipt/shift-sheet.js';
33
35
  export { RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputKind, type ReceiptOutputResult } from '../models/receipt-output.js';
34
36
  export { RETURN_DISPOSITIONS, isReturnDisposition, type ReturnDisposition } from '../models/cancellation.js';
35
- export { MESSAGES, ERROR_RULES, ERROR_CODE_RULES, ERROR_OUTCOME_RULES, CALLS_WITH_EFFECT, findErrorRule, messageOutcome, messageText, messageAppliesTo, RECEIPT_EMAIL_ERROR_MESSAGES, receiptEmailErrorMessage, CANCELLATION_PAYMENT_ERROR_MESSAGES, cancellationPaymentErrorMessage, CANCELLATION_VOUCHER_ERROR_MESSAGES, cancellationErrorMessage, VOUCHER_ERROR_MESSAGES, voucherErrorMessage, EXTERNAL_VOUCHER_TILE_MESSAGES, EXTERNAL_VOUCHER_ARTICLE_MESSAGES, externalVoucherArticleErrorMessage, EXTERNAL_VOUCHERS_LABELS, EXTERNAL_VOUCHER_KIND_LABELS, TIP_KEPT_MODE_LABELS, LABELS, labelText, RETURN_DISPOSITION_LABELS, receiptOutputLabel, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
37
+ export { MESSAGES, ERROR_RULES, ERROR_CODE_RULES, ERROR_OUTCOME_RULES, CALLS_WITH_EFFECT, findErrorRule, messageOutcome, messageText, messageAppliesTo, RECEIPT_EMAIL_ERROR_MESSAGES, receiptEmailErrorMessage, CANCELLATION_PAYMENT_ERROR_MESSAGES, cancellationPaymentErrorMessage, CANCELLATION_VOUCHER_ERROR_MESSAGES, cancellationErrorMessage, VOUCHER_ERROR_MESSAGES, voucherErrorMessage, DEPOSIT_ERROR_MESSAGES, depositErrorMessage, EXTERNAL_VOUCHER_TILE_MESSAGES, EXTERNAL_VOUCHER_ARTICLE_MESSAGES, externalVoucherArticleErrorMessage, EXTERNAL_VOUCHERS_LABELS, EXTERNAL_VOUCHER_KIND_LABELS, TIP_KEPT_MODE_LABELS, LABELS, labelText, RETURN_DISPOSITION_LABELS, receiptOutputLabel, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
36
38
  export { roundUpSuggestions } from './aufrunden.js';
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SETTINGS_FONT_SIZE = exports.LOGO_SIZE = exports.QR_MODE = exports.DRAWER_AUTO_OPEN = exports.CUT = exports.CODE_PAGE = exports.PAPER_SIZE = exports.TERMINAL_TYPE = exports.TERMINAL_VIA = exports.PRINTER_TYPE = exports.TILE_HEIGHT = exports.CATEGORY_POSITION = exports.LAYOUT = exports.RECEIPT_OUTPUT = exports.CARD_PROVIDER = exports.CHECKOUT_MODE = exports.CART_WIDTH = exports.TIP_KEPT_MODE = exports.TIP_START = exports.TIP_KINDS = exports.TIP_MODE = exports.QUANTITY = exports.WATERMARK = exports.FONT_SIZE = exports.THEME = exports.posShortcutConflict = exports.POS_SHORTCUT_SHARED_PAIRS = exports.posSettingsChanges = exports.unknownPosSettingValues = exports.sanitizePosSettings = exports.mergePosSettings = exports.POS_DEVICE_VALUES = exports.POS_BUSINESS_VALUES = exports.posCartWidth = exports.posTipStart = exports.posTipKinds = exports.POS_BUSINESS_OPTIONAL_LISTS = exports.DISCOUNT_PRESET_KIND = exports.tipKeptFor = exports.posTipKeptMode = exports.posCustomDiscountAllowed = exports.posTipKeptByDefault = exports.POS_DEVICE_OPTIONAL_CHOICES = exports.POS_BUSINESS_OPTIONAL_CHOICES = exports.POS_BUSINESS_OPTIONAL_FIELDS = exports.POS_DEVICE_OPTIONAL_FIELDS = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.POS_SHORTCUT_DEFAULTS = exports.POS_SHORTCUT_ACTIONS = void 0;
4
- exports.getPosSettings = exports.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.externalVoucherTileBlock = exports.checkExternalVoucherArticle = exports.checkExternalVoucherValue = exports.isArticleExternalVoucher = exports.EXTERNAL_VOUCHER_ARTICLE_REASONS = exports.ARTICLE_EXTERNAL_VOUCHER_VAT_RATES = exports.ARTICLE_EXTERNAL_VOUCHER_INVALID = exports.ARTICLE_EXTERNAL_VOUCHER_TYPES = exports.orderAddOnLines = exports.addOnDisplayOrder = exports.addOnRemap = exports.addOnsOfItem = exports.addOnReferencesValid = exports.addOnsFor = exports.isSelectableAddOn = exports.ADD_ON_BLOCK_REASONS = exports.ADD_ONS_MAX = exports.fromReferencePayload = exports.referenceLineName = exports.checkReference = exports.isDigitsOnlyPattern = exports.isValidReferencePattern = exports.cleanReferenceText = exports.REFERENCE_PATTERN_TEMPLATES = exports.REFERENCE_PATTERN_MAX = exports.REFERENCE_HINT_MAX = exports.REFERENCE_LABEL_MAX = exports.REFERENCE_INPUT_MAX = exports.REFERENCE_MODES = exports.tilePrompts = exports.isBookableArticle = exports.allowedQuantity = exports.quantityDefaults = exports.quantityRuleForUnit = exports.QUANTITY_RULES = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.DONE_SCREEN_SECONDS = exports.WATERMARK_SCALE = exports.LOGO_SCALE = exports.WATERMARK_STRENGTH = exports.WATERMARK_SIDE = exports.DISCOUNT = exports.AUTO_LOGOUT_MINUTES = exports.TILE_STYLE = void 0;
5
- exports.checkVoucher = exports.VOUCHER_STATUSES = exports.VOUCHER_KINDS = exports.parseQuantityMilli = exports.voidMyStocktakeCount = exports.recordMyStocktakeCount = exports.listMyStocktakeCounts = exports.listMyStocktakeItems = exports.listMyStocktakes = exports.setMyCashregisterStockLocation = exports.listMyStock = exports.listMyStockLocations = exports.STOCK_LOCATION_TYPES = exports.reportConnectState = exports.inspectionInfoLines = exports.inspectionInfoRows = exports.getRegisterInspectionInfo = exports.depFolderName = exports.DISCOUNT_PRESET_MESSAGES = exports.DISCOUNT_PRESET_AMOUNT_CENTS = exports.DISCOUNT_PRESET_PERCENT_BP = exports.DISCOUNT_PRESET_NAME_MAX = exports.DISCOUNT_PRESETS_MAX = exports.INVALID_DISCOUNT_PRESET = exports.discountBlockLines = exports.checkDiscountPresets = exports.discountChipsFromPresets = exports.discountPresetChipText = exports.posDiscountPresets = exports.listMyTipRecipients = exports.getPrintJob = exports.createPrintJob = exports.listMyPrinters = exports.isPrintJobFinished = exports.PRINT_JOB_SOURCES = exports.PRINT_JOB_STATUSES = exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.posFieldErrors = exports.isPosError = exports.posErrorCode = exports.isPosErrorCode = exports.POS_ERROR_CODES = exports.posSettingsFromWire = exports.setMyPosLogo = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = void 0;
6
- exports.CANCELLATION_VOUCHER_ERROR_MESSAGES = exports.cancellationPaymentErrorMessage = exports.CANCELLATION_PAYMENT_ERROR_MESSAGES = exports.receiptEmailErrorMessage = exports.RECEIPT_EMAIL_ERROR_MESSAGES = exports.messageAppliesTo = exports.messageText = exports.messageOutcome = exports.findErrorRule = exports.CALLS_WITH_EFFECT = exports.ERROR_OUTCOME_RULES = exports.ERROR_CODE_RULES = exports.ERROR_RULES = exports.MESSAGES = exports.isReturnDisposition = exports.RETURN_DISPOSITIONS = exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_KINDS = exports.cashMovementLayout = exports.shiftReceiptLayout = exports.DIFFERENCE_PART_TYPES = exports.EXPECTED_PART_KEYS = exports.AFTER_COUNT_TYPES = exports.SHIFT_RECEIPT_KINDS = exports.MANUAL_OPENING_REASONS = exports.OPENING_REASONS = exports.CASH_LOCATIONS = exports.MANUAL_MOVEMENT_TYPES = exports.MOVEMENT_TYPES = exports.EUR_DENOMINATIONS = exports.durationText = exports.shiftTipLines = exports.newIdempotencyKey = exports.parseCentsAllowZero = exports.sumDenominations = exports.recordMyShiftCount = exports.closeMyShift = exports.getMyShiftReport = exports.logMyDrawerOpenings = exports.recordMyCashMovement = exports.openMyShift = exports.getMyDrawerState = exports.EXTERNAL_VOUCHERS = exports.VOUCHER_TYPE_VALIDITY_PATTERNS = exports.VOUCHER_AMOUNT_MODES = exports.VOUCHER_TYPE_KINDS = exports.VOUCHER_PAYOUTS = exports.posVoucherSettingsFromWire = exports.VOUCHER_SETTINGS_DEFAULTS = exports.reprintVoucherLabel = void 0;
7
- exports.roundUpSuggestions = exports.receiptOutputLabel = exports.RETURN_DISPOSITION_LABELS = exports.labelText = exports.LABELS = exports.TIP_KEPT_MODE_LABELS = exports.EXTERNAL_VOUCHER_KIND_LABELS = exports.EXTERNAL_VOUCHERS_LABELS = exports.externalVoucherArticleErrorMessage = exports.EXTERNAL_VOUCHER_ARTICLE_MESSAGES = exports.EXTERNAL_VOUCHER_TILE_MESSAGES = exports.voucherErrorMessage = exports.VOUCHER_ERROR_MESSAGES = exports.cancellationErrorMessage = void 0;
4
+ exports.withDepositLines = exports.viennaDay = exports.depositAmountOn = exports.depositsFor = exports.cashRegisterDepositFromWire = exports.depositEntriesFromWire = exports.posDepositSettingsFromWire = exports.DEPOSIT_ON_PREMISES_DEFAULTS = exports.DEPOSIT_RETURN_MODES = exports.DEPOSIT_TYPES = exports.DEPOSIT_KINDS = exports.orderAddOnLines = exports.addOnDisplayOrder = exports.addOnRemap = exports.addOnsOfItem = exports.addOnReferencesValid = exports.addOnsFor = exports.isSelectableAddOn = exports.ADD_ON_BLOCK_REASONS = exports.ADD_ONS_MAX = exports.fromReferencePayload = exports.referenceLineName = exports.checkReference = exports.isDigitsOnlyPattern = exports.isValidReferencePattern = exports.cleanReferenceText = exports.REFERENCE_PATTERN_TEMPLATES = exports.REFERENCE_PATTERN_MAX = exports.REFERENCE_HINT_MAX = exports.REFERENCE_LABEL_MAX = exports.REFERENCE_INPUT_MAX = exports.REFERENCE_MODES = exports.tilePrompts = exports.isBookableArticle = exports.allowedQuantity = exports.quantityDefaults = exports.quantityRuleForUnit = exports.QUANTITY_RULES = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.DONE_SCREEN_SECONDS = exports.WATERMARK_SCALE = exports.LOGO_SCALE = exports.WATERMARK_STRENGTH = exports.WATERMARK_SIDE = exports.DISCOUNT = exports.AUTO_LOGOUT_MINUTES = exports.TILE_STYLE = void 0;
5
+ exports.reportConnectState = exports.inspectionInfoLines = exports.inspectionInfoRows = exports.getRegisterInspectionInfo = exports.depFolderName = exports.DISCOUNT_PRESET_MESSAGES = exports.DISCOUNT_PRESET_AMOUNT_CENTS = exports.DISCOUNT_PRESET_PERCENT_BP = exports.DISCOUNT_PRESET_NAME_MAX = exports.DISCOUNT_PRESETS_MAX = exports.INVALID_DISCOUNT_PRESET = exports.discountBlockLines = exports.checkDiscountPresets = exports.discountChipsFromPresets = exports.discountPresetChipText = exports.posDiscountPresets = exports.listMyTipRecipients = exports.getPrintJob = exports.createPrintJob = exports.listMyPrinters = exports.isPrintJobFinished = exports.PRINT_JOB_SOURCES = exports.PRINT_JOB_STATUSES = exports.depositReturnOf = exports.voucherPermsOf = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.posFieldErrors = exports.isPosError = exports.posErrorCode = exports.isPosErrorCode = exports.POS_ERROR_CODES = exports.posSettingsFromWire = exports.setMyPosLogo = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = exports.getPosSettings = exports.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.externalVoucherTileBlock = exports.checkExternalVoucherArticle = exports.checkExternalVoucherValue = exports.isArticleExternalVoucher = exports.EXTERNAL_VOUCHER_ARTICLE_REASONS = exports.ARTICLE_EXTERNAL_VOUCHER_VAT_RATES = exports.ARTICLE_EXTERNAL_VOUCHER_INVALID = exports.ARTICLE_EXTERNAL_VOUCHER_TYPES = exports.depositReturnLine = void 0;
6
+ exports.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_KINDS = exports.cashMovementLayout = exports.shiftReceiptLayout = exports.DIFFERENCE_PART_TYPES = exports.EXPECTED_PART_KEYS = exports.AFTER_COUNT_TYPES = exports.SHIFT_RECEIPT_KINDS = exports.MANUAL_OPENING_REASONS = exports.OPENING_REASONS = exports.CASH_LOCATIONS = exports.MANUAL_MOVEMENT_TYPES = exports.MOVEMENT_TYPES = exports.EUR_DENOMINATIONS = exports.durationText = exports.shiftTipLines = exports.newIdempotencyKey = exports.parseCentsAllowZero = exports.sumDenominations = exports.recordMyShiftCount = exports.closeMyShift = exports.getMyShiftReport = exports.logMyDrawerOpenings = exports.recordMyCashMovement = exports.openMyShift = exports.getMyDrawerState = exports.EXTERNAL_VOUCHERS = exports.VOUCHER_TYPE_VALIDITY_PATTERNS = exports.VOUCHER_AMOUNT_MODES = exports.VOUCHER_TYPE_KINDS = exports.VOUCHER_PAYOUTS = exports.posVoucherSettingsFromWire = exports.VOUCHER_SETTINGS_DEFAULTS = exports.reprintVoucherLabel = exports.checkVoucher = exports.VOUCHER_STATUSES = exports.VOUCHER_KINDS = exports.parseQuantityMilli = exports.voidMyStocktakeCount = exports.recordMyStocktakeCount = exports.listMyStocktakeCounts = exports.listMyStocktakeItems = exports.listMyStocktakes = exports.setMyCashregisterStockLocation = exports.listMyStock = exports.listMyStockLocations = exports.STOCK_LOCATION_TYPES = exports.matchReturnCode = exports.listReturnCodes = exports.learnReturnCode = void 0;
7
+ exports.roundUpSuggestions = exports.receiptOutputLabel = exports.RETURN_DISPOSITION_LABELS = exports.labelText = exports.LABELS = exports.TIP_KEPT_MODE_LABELS = exports.EXTERNAL_VOUCHER_KIND_LABELS = exports.EXTERNAL_VOUCHERS_LABELS = exports.externalVoucherArticleErrorMessage = exports.EXTERNAL_VOUCHER_ARTICLE_MESSAGES = exports.EXTERNAL_VOUCHER_TILE_MESSAGES = exports.depositErrorMessage = exports.DEPOSIT_ERROR_MESSAGES = exports.voucherErrorMessage = exports.VOUCHER_ERROR_MESSAGES = exports.cancellationErrorMessage = exports.CANCELLATION_VOUCHER_ERROR_MESSAGES = exports.cancellationPaymentErrorMessage = exports.CANCELLATION_PAYMENT_ERROR_MESSAGES = exports.receiptEmailErrorMessage = exports.RECEIPT_EMAIL_ERROR_MESSAGES = exports.messageAppliesTo = exports.messageText = exports.messageOutcome = exports.findErrorRule = exports.CALLS_WITH_EFFECT = exports.ERROR_OUTCOME_RULES = exports.ERROR_CODE_RULES = exports.ERROR_RULES = exports.MESSAGES = exports.isReturnDisposition = exports.RETURN_DISPOSITIONS = void 0;
8
8
  /**
9
9
  * Kachel-Kasse: Einstellungen, Artikelgruppen/Artikel fuer Kacheln,
10
10
  * Rabattverteilung, Drucker, Trinkgeld-Empfaenger, Lager (Standorte, Bestand,
@@ -107,6 +107,19 @@ Object.defineProperty(exports, "addOnsOfItem", { enumerable: true, get: function
107
107
  Object.defineProperty(exports, "addOnRemap", { enumerable: true, get: function () { return zusaetze_js_1.addOnRemap; } });
108
108
  Object.defineProperty(exports, "addOnDisplayOrder", { enumerable: true, get: function () { return zusaetze_js_1.addOnDisplayOrder; } });
109
109
  Object.defineProperty(exports, "orderAddOnLines", { enumerable: true, get: function () { return zusaetze_js_1.orderAddOnLines; } });
110
+ var pfand_js_1 = require("./pfand.js");
111
+ Object.defineProperty(exports, "DEPOSIT_KINDS", { enumerable: true, get: function () { return pfand_js_1.DEPOSIT_KINDS; } });
112
+ Object.defineProperty(exports, "DEPOSIT_TYPES", { enumerable: true, get: function () { return pfand_js_1.DEPOSIT_TYPES; } });
113
+ Object.defineProperty(exports, "DEPOSIT_RETURN_MODES", { enumerable: true, get: function () { return pfand_js_1.DEPOSIT_RETURN_MODES; } });
114
+ Object.defineProperty(exports, "DEPOSIT_ON_PREMISES_DEFAULTS", { enumerable: true, get: function () { return pfand_js_1.DEPOSIT_ON_PREMISES_DEFAULTS; } });
115
+ Object.defineProperty(exports, "posDepositSettingsFromWire", { enumerable: true, get: function () { return pfand_js_1.posDepositSettingsFromWire; } });
116
+ Object.defineProperty(exports, "depositEntriesFromWire", { enumerable: true, get: function () { return pfand_js_1.depositEntriesFromWire; } });
117
+ Object.defineProperty(exports, "cashRegisterDepositFromWire", { enumerable: true, get: function () { return pfand_js_1.cashRegisterDepositFromWire; } });
118
+ Object.defineProperty(exports, "depositsFor", { enumerable: true, get: function () { return pfand_js_1.depositsFor; } });
119
+ Object.defineProperty(exports, "depositAmountOn", { enumerable: true, get: function () { return pfand_js_1.depositAmountOn; } });
120
+ Object.defineProperty(exports, "viennaDay", { enumerable: true, get: function () { return pfand_js_1.viennaDay; } });
121
+ Object.defineProperty(exports, "withDepositLines", { enumerable: true, get: function () { return pfand_js_1.withDepositLines; } });
122
+ Object.defineProperty(exports, "depositReturnLine", { enumerable: true, get: function () { return pfand_js_1.depositReturnLine; } });
110
123
  var fremdgutschein_artikel_js_1 = require("./fremdgutschein-artikel.js");
111
124
  Object.defineProperty(exports, "ARTICLE_EXTERNAL_VOUCHER_TYPES", { enumerable: true, get: function () { return fremdgutschein_artikel_js_1.ARTICLE_EXTERNAL_VOUCHER_TYPES; } });
112
125
  Object.defineProperty(exports, "ARTICLE_EXTERNAL_VOUCHER_INVALID", { enumerable: true, get: function () { return fremdgutschein_artikel_js_1.ARTICLE_EXTERNAL_VOUCHER_INVALID; } });
@@ -141,6 +154,7 @@ Object.defineProperty(exports, "cancelScopeOf", { enumerable: true, get: functio
141
154
  Object.defineProperty(exports, "receiptsScopeOf", { enumerable: true, get: function () { return pairing_js_1.receiptsScopeOf; } });
142
155
  Object.defineProperty(exports, "stockViewOf", { enumerable: true, get: function () { return pairing_js_1.stockViewOf; } });
143
156
  Object.defineProperty(exports, "voucherPermsOf", { enumerable: true, get: function () { return pairing_js_1.voucherPermsOf; } });
157
+ Object.defineProperty(exports, "depositReturnOf", { enumerable: true, get: function () { return pairing_js_1.depositReturnOf; } });
144
158
  var drucker_js_1 = require("./drucker.js");
145
159
  Object.defineProperty(exports, "PRINT_JOB_STATUSES", { enumerable: true, get: function () { return drucker_js_1.PRINT_JOB_STATUSES; } });
146
160
  Object.defineProperty(exports, "PRINT_JOB_SOURCES", { enumerable: true, get: function () { return drucker_js_1.PRINT_JOB_SOURCES; } });
@@ -173,6 +187,10 @@ Object.defineProperty(exports, "inspectionInfoLines", { enumerable: true, get: f
173
187
  // Connect-Bestand: die Kasse meldet Version und System von Kasseneck Connect.
174
188
  var connect_bestand_js_1 = require("./connect-bestand.js");
175
189
  Object.defineProperty(exports, "reportConnectState", { enumerable: true, get: function () { return connect_bestand_js_1.reportConnectState; } });
190
+ var leergut_js_1 = require("./leergut.js");
191
+ Object.defineProperty(exports, "learnReturnCode", { enumerable: true, get: function () { return leergut_js_1.learnReturnCode; } });
192
+ Object.defineProperty(exports, "listReturnCodes", { enumerable: true, get: function () { return leergut_js_1.listReturnCodes; } });
193
+ Object.defineProperty(exports, "matchReturnCode", { enumerable: true, get: function () { return leergut_js_1.matchReturnCode; } });
176
194
  var lager_js_1 = require("./lager.js");
177
195
  Object.defineProperty(exports, "STOCK_LOCATION_TYPES", { enumerable: true, get: function () { return lager_js_1.STOCK_LOCATION_TYPES; } });
178
196
  Object.defineProperty(exports, "listMyStockLocations", { enumerable: true, get: function () { return lager_js_1.listMyStockLocations; } });
@@ -253,6 +271,8 @@ Object.defineProperty(exports, "CANCELLATION_VOUCHER_ERROR_MESSAGES", { enumerab
253
271
  Object.defineProperty(exports, "cancellationErrorMessage", { enumerable: true, get: function () { return texte_js_1.cancellationErrorMessage; } });
254
272
  Object.defineProperty(exports, "VOUCHER_ERROR_MESSAGES", { enumerable: true, get: function () { return texte_js_1.VOUCHER_ERROR_MESSAGES; } });
255
273
  Object.defineProperty(exports, "voucherErrorMessage", { enumerable: true, get: function () { return texte_js_1.voucherErrorMessage; } });
274
+ Object.defineProperty(exports, "DEPOSIT_ERROR_MESSAGES", { enumerable: true, get: function () { return texte_js_1.DEPOSIT_ERROR_MESSAGES; } });
275
+ Object.defineProperty(exports, "depositErrorMessage", { enumerable: true, get: function () { return texte_js_1.depositErrorMessage; } });
256
276
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_TILE_MESSAGES", { enumerable: true, get: function () { return texte_js_1.EXTERNAL_VOUCHER_TILE_MESSAGES; } });
257
277
  Object.defineProperty(exports, "EXTERNAL_VOUCHER_ARTICLE_MESSAGES", { enumerable: true, get: function () { return texte_js_1.EXTERNAL_VOUCHER_ARTICLE_MESSAGES; } });
258
278
  Object.defineProperty(exports, "externalVoucherArticleErrorMessage", { enumerable: true, get: function () { return texte_js_1.externalVoucherArticleErrorMessage; } });
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Leergut-Codes an der Kasse (Pfand & Leergut): ein Code, den die Kasse im Leergut-Blatt noch nicht kennt,
3
+ * wird einer Pfandart zugeordnet und gelernt (`learnReturnCode`); `listReturnCodes` liest die gelernten Codes.
4
+ * `matchReturnCode` ist die Regel, mit der ein Scan im Leergut-Blatt einer Pfandart zugeordnet wird – Web-Kasse
5
+ * und Kassen-App (ueber den Dart-Zwilling) benutzen genau diese Regel.
6
+ */
7
+ import type { InternerTransport } from '../client/aufrufe.js';
8
+ import { type DepositEntry, type DepositType } from './pfand.js';
9
+ /** Ein gelernter Leergut-Code: die GTIN und die Pfandart, der sie zugeordnet ist. */
10
+ export interface ReturnCode {
11
+ gtin: string;
12
+ depositTypeId: string;
13
+ }
14
+ /** Eine Zeile der Zuordnung: Pfandart und Stueckzahl, die ein Scan ins Leergut-Blatt bringt. */
15
+ export interface ReturnCodeEntry {
16
+ depositTypeId: string;
17
+ quantity: number;
18
+ }
19
+ /** Ergebnis von `matchReturnCode`: die Eintraege oder `unknown` (Code ist keiner Pfandart zuzuordnen). */
20
+ export type ReturnCodeMatch = {
21
+ entries: ReturnCodeEntry[];
22
+ } | {
23
+ unknown: true;
24
+ };
25
+ /**
26
+ * Lernt einen Leergut-Code (`learnMyLeergutCode`, nur Kassenweg, Recht `depositReturn`): `gtin` muss eine gueltige
27
+ * GTIN sein, `depositTypeId` eine aktive Pfandart. Die Form wird vor dem Senden geprueft; was der Server nicht
28
+ * annimmt, lehnt er mit `invalid_deposit` oder `deposit_type_not_found` ab.
29
+ */
30
+ export declare function learnReturnCode(transport: InternerTransport, code: ReturnCode): Promise<ReturnCode>;
31
+ /** Liest die gelernten Leergut-Codes (`listMyLeergutCodes`, nur Kassenweg): nur aktive Pfandarten, nach GTIN sortiert. */
32
+ export declare function listReturnCodes(transport: InternerTransport): Promise<ReturnCode[]>;
33
+ /** Was `matchReturnCode` von einem Artikel braucht (Teil von `PosArticle`). */
34
+ export interface ReturnCodeArticle {
35
+ groupId?: string | null;
36
+ ean?: string | null;
37
+ number?: string | null;
38
+ internalCode?: string | null;
39
+ deposits?: DepositEntry[] | null;
40
+ externalVoucher?: unknown;
41
+ }
42
+ /** Was `matchReturnCode` von einer Gruppe braucht (Teil von `ArticleGroup`). */
43
+ export interface ReturnCodeGroup {
44
+ id: string;
45
+ deposits?: DepositEntry[] | null;
46
+ }
47
+ export interface ReturnCodeInput {
48
+ articles: ReadonlyArray<ReturnCodeArticle>;
49
+ groups: ReadonlyArray<ReturnCodeGroup>;
50
+ learned: ReadonlyArray<ReturnCode>;
51
+ depositTypes: ReadonlyArray<Pick<DepositType, 'id' | 'active'>>;
52
+ }
53
+ /**
54
+ * Ordnet einen Scan im Leergut-Blatt einer Pfandart zu. Reihenfolge: (1) gelernter Code -> 1 Stueck; (2) `gtin` eines
55
+ * Pfandeintrags an Artikel oder Gruppe -> 1 Stueck dieser Pfandart; (3) Artikel-EAN, -Nummer oder -Code mit wirksamer
56
+ * Pfandliste -> jeder Eintrag mit seiner `quantity` (Kiste: 1 Kiste + 20 Flaschen); sonst `unknown`. Es zaehlen nur
57
+ * aktive Pfandarten: ein Treffer auf eine stillgelegte oder unbekannte Pfandart ist `unknown` (die Suche endet am
58
+ * ersten Treffer, sie faellt nicht auf die naechste Stufe zurueck). Der Code wird getrimmt, ein leerer ist `unknown`.
59
+ */
60
+ export declare function matchReturnCode(code: string, input: ReturnCodeInput): ReturnCodeMatch;
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ /**
3
+ * Leergut-Codes an der Kasse (Pfand & Leergut): ein Code, den die Kasse im Leergut-Blatt noch nicht kennt,
4
+ * wird einer Pfandart zugeordnet und gelernt (`learnReturnCode`); `listReturnCodes` liest die gelernten Codes.
5
+ * `matchReturnCode` ist die Regel, mit der ein Scan im Leergut-Blatt einer Pfandart zugeordnet wird – Web-Kasse
6
+ * und Kassen-App (ueber den Dart-Zwilling) benutzen genau diese Regel.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.learnReturnCode = learnReturnCode;
10
+ exports.listReturnCodes = listReturnCodes;
11
+ exports.matchReturnCode = matchReturnCode;
12
+ const validator_1 = require("@kreiseck/validator");
13
+ const errors_js_1 = require("../client/errors.js");
14
+ const pfand_js_1 = require("./pfand.js");
15
+ const istObjekt = (w) => w !== null && typeof w === 'object' && !Array.isArray(w);
16
+ function leergutCode(wert) {
17
+ if (!istObjekt(wert) || typeof wert['gtin'] !== 'string' || typeof wert['depositTypeId'] !== 'string')
18
+ return null;
19
+ return { gtin: wert['gtin'], depositTypeId: wert['depositTypeId'] };
20
+ }
21
+ /**
22
+ * Lernt einen Leergut-Code (`learnMyLeergutCode`, nur Kassenweg, Recht `depositReturn`): `gtin` muss eine gueltige
23
+ * GTIN sein, `depositTypeId` eine aktive Pfandart. Die Form wird vor dem Senden geprueft; was der Server nicht
24
+ * annimmt, lehnt er mit `invalid_deposit` oder `deposit_type_not_found` ab.
25
+ */
26
+ async function learnReturnCode(transport, code) {
27
+ const name = 'learnMyLeergutCode';
28
+ const anfrage = (grund) => new errors_js_1.KasseneckValidationError(name, grund, 'request');
29
+ if (!istObjekt(code))
30
+ throw anfrage('Anfrage muss ein Objekt sein');
31
+ const fremd = Object.keys(code).find((k) => k !== 'gtin' && k !== 'depositTypeId');
32
+ if (fremd != null)
33
+ throw anfrage(`unbekanntes Feld "${fremd}"`);
34
+ if (typeof code.gtin !== 'string' || !validator_1.Gtin.isValid(code.gtin))
35
+ throw anfrage('gtin ist keine gueltige GTIN');
36
+ if (typeof code.depositTypeId !== 'string' || code.depositTypeId === '')
37
+ throw anfrage('depositTypeId fehlt');
38
+ const antwort = await transport(name, { gtin: code.gtin, depositTypeId: code.depositTypeId });
39
+ return leergutCode(antwort) ?? { gtin: code.gtin, depositTypeId: code.depositTypeId };
40
+ }
41
+ /** Liest die gelernten Leergut-Codes (`listMyLeergutCodes`, nur Kassenweg): nur aktive Pfandarten, nach GTIN sortiert. */
42
+ async function listReturnCodes(transport) {
43
+ const antwort = await transport('listMyLeergutCodes', {});
44
+ const liste = istObjekt(antwort) && Array.isArray(antwort['codes']) ? antwort['codes'] : [];
45
+ return liste.map(leergutCode).filter((c) => c != null);
46
+ }
47
+ /**
48
+ * Ordnet einen Scan im Leergut-Blatt einer Pfandart zu. Reihenfolge: (1) gelernter Code -> 1 Stueck; (2) `gtin` eines
49
+ * Pfandeintrags an Artikel oder Gruppe -> 1 Stueck dieser Pfandart; (3) Artikel-EAN, -Nummer oder -Code mit wirksamer
50
+ * Pfandliste -> jeder Eintrag mit seiner `quantity` (Kiste: 1 Kiste + 20 Flaschen); sonst `unknown`. Es zaehlen nur
51
+ * aktive Pfandarten: ein Treffer auf eine stillgelegte oder unbekannte Pfandart ist `unknown` (die Suche endet am
52
+ * ersten Treffer, sie faellt nicht auf die naechste Stufe zurueck). Der Code wird getrimmt, ein leerer ist `unknown`.
53
+ */
54
+ function matchReturnCode(code, input) {
55
+ const unbekannt = { unknown: true };
56
+ const gesucht = typeof code === 'string' ? code.trim() : '';
57
+ if (gesucht === '')
58
+ return unbekannt;
59
+ const aktiv = new Set(input.depositTypes.filter((t) => t.active).map((t) => t.id));
60
+ const eins = (depositTypeId) => (aktiv.has(depositTypeId) ? { entries: [{ depositTypeId, quantity: 1 }] } : unbekannt);
61
+ const gelernt = input.learned.find((l) => l.gtin === gesucht);
62
+ if (gelernt != null)
63
+ return eins(gelernt.depositTypeId);
64
+ const gruppeVon = (a) => input.groups.find((g) => g.id === a.groupId) ?? null;
65
+ for (const a of input.articles) {
66
+ const hit = ((0, pfand_js_1.depositsFor)(a, gruppeVon(a))).find((d) => d.gtin === gesucht);
67
+ if (hit != null)
68
+ return eins(hit.depositTypeId);
69
+ }
70
+ for (const g of input.groups) {
71
+ const hit = (g.deposits ?? []).find((d) => d.gtin === gesucht);
72
+ if (hit != null)
73
+ return eins(hit.depositTypeId);
74
+ }
75
+ const artikel = input.articles.find((a) => a.ean === gesucht || a.number === gesucht || a.internalCode === gesucht);
76
+ if (artikel == null)
77
+ return unbekannt;
78
+ const liste = (0, pfand_js_1.depositsFor)(artikel, gruppeVon(artikel));
79
+ if (liste.length === 0 || !liste.every((d) => aktiv.has(d.depositTypeId)))
80
+ return unbekannt;
81
+ return { entries: liste.map((d) => ({ depositTypeId: d.depositTypeId, quantity: d.quantity })) };
82
+ }
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Pfand & Leergut an der Kasse: Pfandarten und Einstellungen aus
3
+ * `getKasseSettings` (Block `deposit`), Pfandliste am Artikel und an der
4
+ * Gruppe (`deposits`) und die Pfand-Angaben des Kassenobjekts aus
5
+ * `listRegisterUsersForDevice`. Alles nur Lesen und Schreiben der Formen; die
6
+ * Rechnung (Betrag, Staffel nach Tag) kommt in einem eigenen Modul.
7
+ */
8
+ import type { ReceiptItem } from '../models/receipt-item.js';
9
+ /** Art einer Pfandart: Einweg oder Mehrweg. */
10
+ export declare const DEPOSIT_KINDS: readonly ["single_use", "reusable"];
11
+ export type DepositKind = typeof DEPOSIT_KINDS[number];
12
+ /** Gebindetyp einer Pfandart (frei, nur zur Anzeige). */
13
+ export declare const DEPOSIT_TYPES: readonly ["bottle", "crate", "keg", "cup", "glass", "other"];
14
+ export type DepositContainerType = typeof DEPOSIT_TYPES[number];
15
+ /** Wer nimmt Leergut an der Kasse zurueck: diese Kasse, eine gemeinsame Stelle oder niemand. */
16
+ export declare const DEPOSIT_RETURN_MODES: readonly ["here", "shared", "none"];
17
+ export type DepositReturnMode = typeof DEPOSIT_RETURN_MODES[number];
18
+ /** Vorbelegung, ob Getraenke vor Ort getrunken oder mitgenommen werden. */
19
+ export declare const DEPOSIT_ON_PREMISES_DEFAULTS: readonly ["on_premises", "takeaway", "ask"];
20
+ export type DepositOnPremisesDefault = typeof DEPOSIT_ON_PREMISES_DEFAULTS[number];
21
+ /** Ein Pfandbetrag ab einem Tag (`from`, Wiener Tag `YYYY-MM-DD`), in Cent je Stueck. */
22
+ export interface DepositAmount {
23
+ from: string;
24
+ cents: number;
25
+ }
26
+ /** Eine Pfandart des Betriebs. */
27
+ export interface DepositType {
28
+ id: string;
29
+ kind: DepositKind;
30
+ name: string;
31
+ type: DepositContainerType | null;
32
+ /** Betraege nach Gueltigkeit, wie vom Server geliefert (aufsteigend nach `from`). */
33
+ amounts: DepositAmount[];
34
+ /** Steuersatz in Prozent, mit dem Mehrweg-Leergut zurueckgenommen wird (Rueckgabesatz), oder null (noch nie ausgegeben). */
35
+ returnRate: number | null;
36
+ /** Die Pfandart steht an mindestens einem Artikel oder Beleg. */
37
+ used: boolean;
38
+ active: boolean;
39
+ }
40
+ /** Block `deposit` aus `getKasseSettings`; fehlt bei ausgeschaltetem Pfand. */
41
+ export interface DepositSettings {
42
+ singleUse: boolean;
43
+ reusable: boolean;
44
+ depositTypes: DepositType[];
45
+ }
46
+ /** Eine Pfandangabe an Artikel oder Gruppe (`deposits[]`). */
47
+ export interface DepositEntry {
48
+ depositTypeId: string;
49
+ quantity: number;
50
+ gtin?: string;
51
+ ownFilling?: boolean;
52
+ }
53
+ /** Gemeinsame Rueckgabestelle (Kassen-Pfandangaben). */
54
+ export interface DepositSharedReturnPoint {
55
+ name: string;
56
+ address: string;
57
+ }
58
+ /** Pfand-Angaben des Kassenobjekts aus `listRegisterUsersForDevice`; fehlt bei ausgeschaltetem Pfand. */
59
+ export interface CashRegisterDeposit {
60
+ returns: DepositReturnMode;
61
+ onPremisesDefault: DepositOnPremisesDefault;
62
+ usualQuantity: number;
63
+ sharedReturnPoint: DepositSharedReturnPoint | null;
64
+ }
65
+ /**
66
+ * Den Block `deposit` einer Antwort lesen. Kein Objekt (Pfand aus, alter
67
+ * Server) -> `undefined`: das Feld fehlt dann am Modell, es wird nichts erfunden.
68
+ * Eine Pfandart in unbekannter Form faellt weg.
69
+ */
70
+ export declare function posDepositSettingsFromWire(value: unknown): DepositSettings | undefined;
71
+ /** Die Pfandliste eines Artikels oder einer Gruppe; keine Liste -> `null`, unlesbare Eintraege fallen weg. */
72
+ export declare function depositEntriesFromWire(value: unknown): DepositEntry[] | null;
73
+ /** Die Pfand-Angaben eines Kassenobjekts; fehlt der Block oder ist er unbrauchbar -> `undefined`. */
74
+ export declare function cashRegisterDepositFromWire(value: unknown): CashRegisterDeposit | undefined;
75
+ /** Pfandangaben, wirksam fuer einen Artikel: Artikel vor Gruppe, `[]` = kein Pfand, `null`/fehlend = wie die Gruppe. */
76
+ export declare function depositsFor(article: {
77
+ deposits?: DepositEntry[] | null;
78
+ externalVoucher?: unknown;
79
+ } | null | undefined, group: {
80
+ deposits?: DepositEntry[] | null;
81
+ } | null | undefined): DepositEntry[];
82
+ /** Pfandbetrag in Cent am Wiener Tag `day` (`YYYY-MM-DD`): letzter Eintrag mit `from <= day`, sonst `null`. */
83
+ export declare function depositAmountOn(type: Pick<DepositType, 'amounts'>, day: string): number | null;
84
+ /** Wiener Kalendertag `YYYY-MM-DD` zum Zeitpunkt `nowMs` (nie der UTC-Tag). */
85
+ export declare function viennaDay(nowMs: number): string;
86
+ /** Eine Position des Korbs in der Leitungsform (`amount`/`quantity`, `vat`/`vatRate`, `addOnOf` ...). */
87
+ export type DepositPreviewItem = object | null;
88
+ /** Eine Pfand- oder Leergutzeile in der Leitungsform, wie der Server sie baut. */
89
+ export type DepositPreviewLine = Record<string, unknown>;
90
+ /** Fehlercodes der Vorschau (die /v3-Codes von `createReceipt`). */
91
+ export type DepositPreviewErrorCode = 'invalid_deposit' | 'deposit_set_by_server' | 'deposit_type_not_found' | 'invalid_deposit_quantity' | 'deposit_return_not_offered' | 'deposit_type_not_issued' | 'not_permitted';
92
+ /** Eingabe der Vorschau (ohne die Positionen): was der Server aus Konto, Kasse und Beleg wuesste. */
93
+ export interface DepositPreviewInput {
94
+ /** Pfand zu Artikeln selbst ableiten (`autoDeposits`). */
95
+ auto: boolean;
96
+ articles: ReadonlyMap<string, DepositPreviewArticle> | Readonly<Record<string, DepositPreviewArticle>>;
97
+ groups: ReadonlyMap<string, {
98
+ deposits?: DepositEntry[] | null;
99
+ }> | Readonly<Record<string, {
100
+ deposits?: DepositEntry[] | null;
101
+ }>>;
102
+ depositTypes: ReadonlyMap<string, DepositType> | Readonly<Record<string, DepositType>>;
103
+ /** Wiener Tag des Belegs. */
104
+ day: string;
105
+ /** Vor Ort getrunken: Einweg entfaellt. */
106
+ onPremises: boolean;
107
+ /** Pfand-Angaben der Kasse (nur `returns` zaehlt); ohne Angabe nimmt die Kasse kein Leergut zurueck. */
108
+ cashRegister?: Pick<CashRegisterDeposit, 'returns'> | null;
109
+ smallBusiness: boolean;
110
+ /** Der Benutzer darf Leergut zuruecknehmen (`depositReturnOf`). */
111
+ mayReturn: boolean;
112
+ }
113
+ /** Artikel, soweit die Vorschau ihn liest. */
114
+ export interface DepositPreviewArticle {
115
+ id?: string;
116
+ groupId?: string | null;
117
+ deposits?: DepositEntry[] | null;
118
+ externalVoucher?: unknown;
119
+ }
120
+ export type DepositPreviewResult<T> = {
121
+ ok: true;
122
+ items: T[];
123
+ } | {
124
+ ok: false;
125
+ code: DepositPreviewErrorCode;
126
+ };
127
+ /**
128
+ * Pfand- und Leergutzeilen eines Belegs wie der Server: leitet Pfand zu Artikeln ab (`auto`), prueft ausdrueckliche
129
+ * `deposit`-Zeilen und `deposit_return`-Zeilen und rechnet `addOnOf` und `depositFor` auf die neuen Positionen um.
130
+ * Ohne Pfand-/Leergutzeile und ohne Ableitung kommen die Positionen unveraendert zurueck. Die Fehlercodes sind die
131
+ * von `createReceipt`.
132
+ */
133
+ export declare function withDepositLines<T extends DepositPreviewItem>(items: readonly T[], input: DepositPreviewInput): DepositPreviewResult<T | DepositPreviewLine>;
134
+ /**
135
+ * Die Leergutzeile zu `quantity` Stueck einer Pfandart, wie `withDepositLines` sie fuer eine
136
+ * `deposit_return`-Eingabe baut (fuer die Korb-Vorschau). Wirft, wenn sich keine Zeile ergibt
137
+ * (unbekannte Pfandart, Menge ausserhalb 1 bis 1000, Mehrweg ohne Rueckgabesatz, ungueltige Codes);
138
+ * ob die Kasse Leergut annimmt, prueft der Aufrufer.
139
+ */
140
+ export declare function depositReturnLine(type: DepositType, quantity: number, options: {
141
+ day: string;
142
+ smallBusiness: boolean;
143
+ codes?: Record<string, number>;
144
+ }): ReceiptItem;