feat(eet): report sales to eet 2.0, with settings, status and a sandbox - #99
Merged
Merged
Conversation
|
@i-am-fatik is attempting to deploy a commit to the Josef K's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
pepakriz
reviewed
Sep 29, 2026
pepakriz
approved these changes
Sep 29, 2026
EET 2.0 takes the sale total with the currency's full fraction digits, "250.00", while minorUnitsToDecimalString trims it to "250" for display.
EET 2.0 obliges a Czech merchant to report every in-person sale whatever the payment form, and production accepts sales from 1 November 2026. Each payment received while EET is enabled gets one sale record, frozen at creation so every resend describes the same sale, and the job resends it with backoff until a signed POK arrives. A payment stays paid whatever EET answers. The protocol comes from @finitoapp/eet-client, Payky owns only the records, the queue and reading the certificate. The job runs in the native app and the browser but not in the CLI, which has no terminal device to report from, so the CLI list is now cliBackgroundJobs. The production endpoint comes from VITE_PAYKY_EET_PRODUCTION_URL, and a build without it offers only the playground.
…etail Staff need to see whether EET confirmed a sale, and to resend one it refused without waiting for the next automatic retry. The payment detail shows the POK, warnings and the last error with a manual resend, and every payment row of the bill detail carries the status badge.
…s a tap away A merchant turns EET on, imports the cash-register certificate, enters the establishment number, picks the environment, sends a test in verification mode and sees the sales EET has not confirmed yet. It stays off by default. The official playground certificates come through api/eet/playground-certificates, because the tax administrator's server sends no CORS headers, so no test key is ever committed.
With the playground selected every sale is still sent, just never to the tax administrator, so a banner on every terminal screen and a note on the paid screen keep staff from taking a sandbox sale for a reported one. Layouts make room for the banner through --terminal-banner-height.
The spec answers from a fake EET responder with a generated certificate, never the shared playground ones. Payments made through the e2e bridge now carry the terminal device, since the job reports only its own device's payments, and both the dev server and the preview build get an .invalid production URL so the production path runs too.
…sale A tip is a reported EET sale only when it is the business's income. A tip that belongs to employees is not subject to EET, and only employees' tips can be exempt from income tax, so a restaurant whose staff keep the tips needs its sales reported without them. Payky cannot know who a tip belongs to, so the EET settings now ask, with the reasons spelled out next to the choice. The business stays the default, which is today's behavior and always allowed, since employees' tips may be reported voluntarily. The choice is read once when a sale is frozen, so it never rewrites a sale already created. The rule comes from the tax administrator's seminar for developers, not from the binding interface specification.
pepakriz
force-pushed
the
feat/eet2-sales-reporting
branch
from
September 29, 2026 09:09
80711ca to
f21d46a
Compare
Merged
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #24.
@finitoapp/eet-client, which builds, signs and verifies the EET 2.0 messages. Payky owns the records, the queue and reading the.p12certificate.api/eet/playground-certificates, because the tax administrator's server sends no CORS headers. No test key is committed.VITE_PAYKY_EET_PRODUCTION_URL. A build without it offers only the playground.Test plan
bun run checkpasses on every commit (844 tests on the last). Under a load average of about 10, two runs timed out onexpect.pollineet-reporting-job.test.tsand passed on rerun.e2e/eet.spec.tspasses 11/11 with--workers=2, against a fake EET responder and a generated certificate, including a 10 % tip left out ofcelk_trzbawhen tips belong to employeesvite buildkeeps the certificate parsing in a lazy chunk, andfflatestays out of the client bundle🤖 Generated with Claude Code