diff --git a/OEC March 2026 release notes.md b/OEC March 2026 release notes.md new file mode 100644 index 0000000..e65e145 --- /dev/null +++ b/OEC March 2026 release notes.md @@ -0,0 +1,61 @@ +# OEC March 2026 release notes + +- Súlad so zákonom 384/2025 +- zlepšenia pri odosielaní dokladu emailom + + +## Dostupnosť +March 2026 release je dostupný v týchto updatoch + +|Zariadenie|Verzia update|SWID|Verzia SW| +|----|----|----|----| +|OEC.LAN Standalone|update 022|71DAC91FCEEFA6EE2CADA283FF8CA9A93C99D746|1.7.0.0| +|OEC.LAN Internal|update 019|87F1E812CBA5F8563CEEC3B213F66F294A75540E|1.7.0.0| +|OEC.Android Swissbit|update 017|9E018572FB15D0CF3F914FF2FAFFA37826D2178D|1.7.0.0| + +> Release March 2025 je delta update. + +> Vyžaduje nainštalovanú predošlú verziu. Pre OEC.LAN Standalone minimálne verziu 016. Pred spustením update sa uistite, že máte nainštalovanú minimálne verziu 016. Návod na zistenie verzie je dostupný na [Wiki](https://github.com/datapacsro/oec/wiki/Ako-zisti%C5%A5-verziu-software-OEC) + +# Nová funkcionalita +## Súlad so zákonom 384/2025 +Táto verzia je v súlade so zákonom 384/2025 a zmenami z neho vyplývajúcimi: +### Posielanie rozpisu DPH do eKasa +Podľa požiadaviek zákona sa znovu zavádza posielanie rozpisu DPH do eKasa. +- V kategórii základná sadzba 23%, +- V kategórii znížená sadzba je spočítaná znížená sadzba 19% a 5% + +Pokladňa môže odoslať sumár DPH priamo v požiadavke na registráciu dokladu. Pokiaľ pokladnňa nepošle sumár DPH, OEC ho automaticky spočíta na základe položiek dokladu takto: Pre každú sadzbu DPH spočíta sumu za položky a z výslednej sumy vypočíta základ a DPH. +Pri odosielaní správy do eKasa OEC automaticky spočíta do zníženej sadzby DPH sadzby 19% a 5%. + +### Minimálna doba odozvy 5s +Defaultná minimálna doba odozvy bola zvýšená na 5s a OEC neumožňuje nastaviť kratšiu dobu odozvy. + +### Vklady a výbery sa neodosielajú do eKasa +Vklady a výbery sa neodosielajú do eKasa. Kôli zachovaniu spätnej kompatibility OEC umožňuje pokladni aj naďalej poslať do OEC vklad a výber, vytlačí ho, ale neodošle do eKasa + + +# Zmeny +## Zlepšenia pri odosielaní dokladu emailom +### Tlač pri chybe SMTP servera +Rozšírili sme kontrolu odpovedí z SMTP servera a v prípade ak indikuje, že email nebol odoslaný, je doklad automaticky vytlačený na tlačiarni. + +### Vlastné telo emailu +Pridali sme možnosť nastaviť vlastné telo emailu. Je možné ho nastaviť +- konfiguráciou globálne alebo pre každú pokladňu +- individuálne ako súčasť requestu na registráciu dokladu. + +OEC použije telo emailu na základe tohto algoritmu +1. Ak je špecifikované pri requeste o evidecniu dokladu https://datapacsro.github.io/oec/#api-Default-addReceipt v sekcii ```ReceiptRenderer/EmailHeaders/Body```, použije sa z requestu +2. Ak je špecifikované v konfigurácii pokladne https://datapacsro.github.io/oec/#api-Default-getCashRegisterConfiguration v sekcii ```SMTPConfiguration/Body```, použije sa z konfigurácie pokladne +3. Ak je špecifikované v globálnej konfigurácii https://datapacsro.github.io/oec/#api-Default-getGlobalConfiguration ```SMTPConfiguration/Body```, použije sa z globálnej konfigurácie + +Ak nie je špecifikované, odošle sa prázdne telo emailu (tak ako do teraz). + +> Telo emailu môže byť v HTML alebo plain text. + + +# Bugfixes a zlepšenia stability + + + diff --git a/api/.swagger-codegen-ignore b/api/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/api/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/api/.swagger-codegen/VERSION b/api/.swagger-codegen/VERSION deleted file mode 100644 index 24ade4a..0000000 --- a/api/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.4.43 \ No newline at end of file diff --git a/api/README.md b/api/README.md deleted file mode 100644 index 0c2b69a..0000000 --- a/api/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Swagger JSON -This is a swagger JSON built by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. \ No newline at end of file diff --git a/api/oec_api.yaml b/api/oec_api.yaml index 006c637..62eac35 100644 --- a/api/oec_api.yaml +++ b/api/oec_api.yaml @@ -1,8 +1,7 @@ ---- swagger: "2.0" info: description: "## API je dostupné na adrese\n```\nhttp://adresa/oec/api\n```\n\n### Príklad\n```\nhttp://adresa/oec/api/status\nhttp://adresa/oec/api/receipt/123456789\n```\n\n## Healthcheck OEC je dostupný na \n```\nhttp://adresa/oec/health\n```\n" - version: 7.0.0 + version: 7.1.0 title: Datapac OEC API contact: name: Helpdesk @@ -47,18 +46,18 @@ paths: description: Renderer required: false schema: - $ref: '#/definitions/ReceiptRenderer' + $ref: "#/definitions/ReceiptRenderer" responses: "204": description: Kópia dokladu vyhotovená schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" "404": description: Doklad nenájedný "504": description: Kópiu dokladu sa nepodarilo vyhotoviť. Buď zlyhala tlač alebo odoslanie e-mailu schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" post: summary: Zaeviduje doklad v eKasa description: "Zaeviduje doklad v eKasa systéme, CHDU a použitím zvoleného renderera ho vytlačí alebo pošle e-mailom" @@ -80,31 +79,31 @@ paths: description: Receipt request required: true schema: - $ref: '#/definitions/ReceiptRequest' + $ref: "#/definitions/ReceiptRequest" responses: "201": description: "Doklad bol úspešne zaevidovaný v eKasa buď online alebo offline, uložený v CHDU a vytlačený alebo poslaný e-mailom" schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" "202": description: | Doklad bol úspešne zaevidovaný v eKasa buď online alebo offline, uložený v CHDU, ale **NEBOL** vytlačený alebo poslaný e-mailom schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" "400": description: Zlý vstup schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" "405": description: Pokladňa nie je aktívna "504": description: Tlačiareň nepripravená schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" "507": description: Kapacita CHDU vyčerpaná schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" /transaction/{CashRegisterCode}: get: summary: Vráti poslednú transakciu @@ -126,7 +125,7 @@ paths: schema: type: array items: - $ref: '#/definitions/Transaction' + $ref: "#/definitions/Transaction" /transaction/{CashRegisterCode}/{Count}: get: summary: Vráti posledné Count transakcie @@ -153,7 +152,7 @@ paths: schema: type: array items: - $ref: '#/definitions/Transaction' + $ref: "#/definitions/Transaction" /transaction/{CashRegisterCode}/{From}/{To}: get: summary: Vráti transakcie od datumu po datum @@ -184,7 +183,7 @@ paths: schema: type: array items: - $ref: '#/definitions/Transaction' + $ref: "#/definitions/Transaction" /documentinfo/{CashRegisterCode}/{Year}/{Month}/{ReceiptNumber}: get: summary: Vráti detaily k dokladu @@ -221,7 +220,7 @@ paths: schema: type: array items: - $ref: '#/definitions/ReceiptMessage' + $ref: "#/definitions/ReceiptMessage" "404": description: Doklad nenájedný /location/{CashRegisterCode}: @@ -245,22 +244,22 @@ paths: description: Register location request required: true schema: - $ref: '#/definitions/RegisterLocationRequest' + $ref: "#/definitions/RegisterLocationRequest" responses: "201": description: Poloha zaevidovaná v eKasa schema: - $ref: '#/definitions/RegisterLocationResponse' + $ref: "#/definitions/RegisterLocationResponse" "400": description: Zlý vstup schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" "405": description: Pokladňa nie je aktívna "507": description: Kapacita CHDU vyčerpaná schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" /print/{CashRegisterCode}: post: summary: Prints the text to the printer and stores it to the CHDU @@ -278,7 +277,7 @@ paths: description: Receipt request required: true schema: - $ref: '#/definitions/Text' + $ref: "#/definitions/Text" responses: "200": description: Text bol uložený v CHDU a vytlačený @@ -289,7 +288,7 @@ paths: "504": description: Tlačiareň nepripravená schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" "507": description: Kapacita CHDU vyčerpaná /cashregisterconfig/{CashRegisterCode}: @@ -311,7 +310,7 @@ paths: "200": description: Konfigurácia pre pokladňu schema: - $ref: '#/definitions/CashRegisterConfiguration' + $ref: "#/definitions/CashRegisterConfiguration" "400": description: Konfigurácia pre pokladňu neexistuje post: @@ -332,7 +331,7 @@ paths: description: Konfigurácia pokladne required: true schema: - $ref: '#/definitions/CashRegisterConfiguration' + $ref: "#/definitions/CashRegisterConfiguration" responses: "201": description: Konfigurácia zmenená @@ -354,7 +353,7 @@ paths: schema: type: array items: - $ref: '#/definitions/CashRegisterConfiguration' + $ref: "#/definitions/CashRegisterConfiguration" /globalconfig/: get: summary: Vráti globálnu konfiguráciu @@ -369,7 +368,7 @@ paths: "200": description: Globálna konfigurácia schema: - $ref: '#/definitions/GlobalConfiguration' + $ref: "#/definitions/GlobalConfiguration" post: summary: Uloží globálnu konfiguráciu description: | @@ -384,7 +383,7 @@ paths: description: Global Configuration required: true schema: - $ref: '#/definitions/GlobalConfiguration' + $ref: "#/definitions/GlobalConfiguration" responses: "200": description: Update úspešný @@ -433,7 +432,7 @@ paths: schema: type: array items: - $ref: '#/definitions/AuthIdSet' + $ref: "#/definitions/AuthIdSet" post: summary: Pridá AuthId set pre pokladňu description: | @@ -450,14 +449,14 @@ paths: description: AuthIdSet required: true schema: - $ref: '#/definitions/AuthIdSet' + $ref: "#/definitions/AuthIdSet" responses: "201": description: AuthId set pridaný "507": description: Kapacita CHDU vyčerpaná schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" /authidset/{CashRegisterCode}/{AuthSetId}: get: summary: Vráti špecifikovaný AuthSet s Id pre pokladňu @@ -482,7 +481,7 @@ paths: "200": description: Špecifikovaný AuthIdSet s Id pre pokladňu schema: - $ref: '#/definitions/AuthIdSet' + $ref: "#/definitions/AuthIdSet" "404": description: AuthIdSet pre pokladňu nenájdený /authidset/{CashRegisterCode}/current: @@ -504,7 +503,7 @@ paths: "200": description: AuthIdSet pre pokladňu schema: - $ref: '#/definitions/AuthIdSet' + $ref: "#/definitions/AuthIdSet" /authidsetraw/{CashRegisterCode}: post: summary: Pridá raw AuthId set pre pokladňu @@ -541,7 +540,7 @@ paths: "507": description: Kapacita CHDU vyčerpaná schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" /status: get: summary: Vráti status informácie @@ -555,7 +554,7 @@ paths: "200": description: Status OEC schema: - $ref: '#/definitions/Status' + $ref: "#/definitions/Status" /printunsent/{CashRegisterCode}: get: summary: Vytlačí neodoslané správy @@ -676,7 +675,7 @@ paths: schema: type: array items: - $ref: '#/definitions/UnsentState' + $ref: "#/definitions/UnsentState" /errors/{CashRegisterCode}: get: summary: Vráti chybné správy @@ -700,7 +699,7 @@ paths: schema: type: array items: - $ref: '#/definitions/Message' + $ref: "#/definitions/Message" /receipterror/{CashRegisterCode}/{Date}/{ReceiptNumber}/{ErrorCode}/{CorrectDate}: post: summary: Opraví dátovú správu dokladu so zlým dátumom @@ -752,7 +751,7 @@ paths: "400": description: Nepovolený kód chyby na opravu alebo iná chyba schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" /locationerror/{CashRegisterCode}/{Date}/{Id}/{ErrorCode}/{CorrectDate}: post: summary: Opraví dátovú správu polohy so zlým dátumom @@ -803,7 +802,7 @@ paths: "400": description: Nepovolený kód chyby na opravu alebo iná chyba schema: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" /reboot: get: summary: Vykoná reboot zariadenia @@ -844,17 +843,17 @@ paths: "200": description: OK schema: - $ref: '#/definitions/inline_response_200' + $ref: "#/definitions/inline_response_200" definitions: ReceiptRequest: type: object properties: Receipt: - $ref: '#/definitions/Receipt' + $ref: "#/definitions/Receipt" ReceiptRenderer: - $ref: '#/definitions/ReceiptRenderer' + $ref: "#/definitions/ReceiptRenderer" PrintTemplate: - $ref: '#/definitions/ReceiptPrintTemplate' + $ref: "#/definitions/ReceiptPrintTemplate" description: "Receipt request. Obsahuje Receipt (doklad), renderer a tlačový template" Receipt: type: object @@ -923,18 +922,18 @@ definitions: description: Celková suma základu DPH pre zníženú sadzbu dane podľa zákona č. 222/2004 Z. z. VATBreakdown: description: Rozpis DPH - $ref: '#/definitions/VATBreakdown' + $ref: "#/definitions/VATBreakdown" Items: type: array description: Položky dokladu items: - $ref: '#/definitions/ReceiptItem' + $ref: "#/definitions/ReceiptItem" minItems: 0 Payments: type: array description: Prijaté platby items: - $ref: '#/definitions/Payment' + $ref: "#/definitions/Payment" Cashier: type: string description: Pokladník @@ -1058,9 +1057,9 @@ definitions: type: string description: Popis chyby Receipt: - $ref: '#/definitions/Receipt' + $ref: "#/definitions/Receipt" Printout: - $ref: '#/definitions/ReceiptPrintTemplate' + $ref: "#/definitions/ReceiptPrintTemplate" description: Odpoveď na ReceiptRequest ReceiptPrintTemplate: type: array @@ -1085,14 +1084,17 @@ definitions: - printer - email - none + - drr + default: printer EmailHeaders: - $ref: '#/definitions/EmailHeaders' + $ref: "#/definitions/EmailHeaders" description: | # Renderer určuje ako sa doklad pošle na výstup ## Možné hodnoty * printer - Doklad bude vytlačený na tlačiarni * email - Doklad bude skonvertovaný do PDF vrátane QR kódu (ak nejde o kópiu) a odoslaný e-mailom + * drr - doklad bude doruceny do digital receipt repository * none - doklad sa nebude tlačiť ani posielať e-mailom. Je možné použiť len s dokladmi typu VKLAD a VÝBER. Pri ostatných dokladoch **musí** byť doklad vytlačený alebo doručený elektronicky > Ak je požadovaný email, musia byť nakonfigurované SMTP parametre a vyplnený EmailHeaders @@ -1126,11 +1128,14 @@ definitions: type: boolean description: Include ReceiptResponse as the e-mail attachment. If enabled the ReceiptResponse.json is added as a attachment to the e-mail default: false + Body: + type: string + description: "Telo emailu. Ak nie je špecifikované, použije sa definícia z SMTP konfigurácie. Môže byť v HTML" description: Hlavičky e-mailu GlobalConfiguration: properties: SMTPConfiguration: - $ref: '#/definitions/SMTPConfiguration' + $ref: "#/definitions/SMTPConfiguration" eKasaEndpoint: type: string description: URL eKasa @@ -1155,7 +1160,7 @@ definitions: description: Timeout čakania na odpoveď od eKasa v ms v prípade doposlania správy. Musí byť >=2000 minimum: 2000 ProxyConfiguration: - $ref: '#/definitions/ProxyConfiguration' + $ref: "#/definitions/ProxyConfiguration" description: Globálna OEC konfigurácia CashRegisterConfiguration: required: @@ -1178,11 +1183,11 @@ definitions: - active - umožňuje registrovať doklady (addReceipt), polohu (registerLocation), tlač (print) a otvorenie zásuvky (openCashDrawer) - paused - neumožňuje registrovať doklady (addReceipt), polohu (registerLocation), tlač (print) a otvorenie zásuvky (openCashDrawer). V healthckeck sa vyhodnocuje rovnako ako active. - disabled - neumožňuje registrovať doklady (addReceipt), polohu (registerLocation), tlač (print) a otvorenie zásuvky (openCashDrawer). V healthckeck je vždy vyhodnotená ako Healthy - default: active enum: - active - disabled - paused + default: active ExceptionMode: type: boolean description: "Príznak, či ide o pokladnicu podnikateľa s udelenou výnimkou zo zasielania údajov" @@ -1190,16 +1195,16 @@ definitions: type: integer description: Číslo posledného dokladu SMTPConfiguration: - $ref: '#/definitions/SMTPConfiguration' + $ref: "#/definitions/SMTPConfiguration" PrinterConfiguration: - $ref: '#/definitions/PrinterConfiguration' + $ref: "#/definitions/PrinterConfiguration" AuthIdSets: type: array description: AuthId sety pre pokladňu items: - $ref: '#/definitions/AuthIdSet' + $ref: "#/definitions/AuthIdSet" CloudStorageConfiguration: - $ref: '#/definitions/CloudStorageConfiguration' + $ref: "#/definitions/CloudStorageConfiguration" description: Konfigurácia pokladne AuthIdSet: required: @@ -1251,6 +1256,10 @@ definitions: type: boolean description: Include ReceiptResponse as the e-mail attachment. If enabled the ReceiptResponse.json is added as a attachment to the e-mail default: false + Body: + type: string + format: html + description: "Telo emailu. Ak nie je špecifikované, telo emailu bude prázdne. Môže byť v HTML" description: SMTP configuration CloudStorageConfiguration: properties: @@ -1275,7 +1284,7 @@ definitions: Status: properties: CHDUInformation: - $ref: '#/definitions/CHDUInformation' + $ref: "#/definitions/CHDUInformation" Version: type: string description: Verzia PPEKK @@ -1295,9 +1304,9 @@ definitions: Transaction: properties: ReceiptRequest: - $ref: '#/definitions/ReceiptRequest' + $ref: "#/definitions/ReceiptRequest" ReceiptResponse: - $ref: '#/definitions/ReceiptResponse' + $ref: "#/definitions/ReceiptResponse" TransactionState: type: string enum: @@ -1338,9 +1347,9 @@ definitions: description: | Iný spôsob definovania umiestnenia prenosnej pokladnice , na ktorej podnikateľ v danom čase prijíma tržbu. ORP použije tento typ definovania polohy, ak nie je možné uviesť adresu umiestnenia prenosnej pokladnice alebo GPS súradnice GPS: - $ref: '#/definitions/GPSLocation' + $ref: "#/definitions/GPSLocation" PhysicalAddress: - $ref: '#/definitions/PhysicalAddress' + $ref: "#/definitions/PhysicalAddress" description: Register location request GPSLocation: properties: @@ -1393,7 +1402,7 @@ definitions: type: string description: Upozornenie zaevidovania polohy RegisterLocationRequest: - $ref: '#/definitions/RegisterLocationRequest' + $ref: "#/definitions/RegisterLocationRequest" description: Register location response PrinterConfiguration: properties: @@ -1510,7 +1519,7 @@ definitions: type: array description: DPH pre jednotlivé sadzby items: - $ref: '#/definitions/VATAmount' + $ref: "#/definitions/VATAmount" minItems: 0 description: Rozpis DPH VATAmount: