HydraAcceptKSeFInvoice is a Hydra callback extension that handles KSeF document acceptance during document editing (KSFEdycja).
The extension:
- adds a button to the document window,
- shows acceptance status via an icon (green/yellow/red),
- opens a dedicated acceptance window,
- saves user decisions and updates data in the database.
- The callback initializes repositories and event subscriptions.
- When the document window opens, an acceptance button is added.
- The button icon is determined by acceptance status (
Accepted,PartiallyAccepted,NotAccepted). - Clicking the button opens
MainWindowwith document data and the acceptance list. - The user can:
- save with acceptance,
- save without acceptance,
- reject the document.
- The result is returned to the callback, which:
- updates Hydra form fields (
qualification,rejected,description), - saves acceptance updates to
dbo.KSeFAkceptacje, - refreshes the window.
- updates Hydra form fields (
HydraCallback.cs– callback entry point and Hydra UI integration.Views/MainWindow.xaml+Views/MainWindow.xaml.cs– WPF window and acceptance presentation logic.Repositories/KSeFRepository.cs– read/write operations for KSeF acceptance data.Repositories/OperatorRepository.cs– operator-to-worker mapping.Models/Acceptation.cs– acceptance row data model.Data/AcceptationResult.cs– result model returned from the acceptance window.Data/Enums/*– enum types (Qualification,AcceptationStatus).Data/EnumExtensions.cs– helper extension for enum descriptions.
- Description is required for
Dokument_VATqualification. - The acceptance screen limits approval to authorized rows (
CanAccept). - For “save without acceptance”, acceptance updates are cleared.
- Rejecting a document sets rejected state and unchecks editable acceptance rows.
Repositories use System.Data.SqlClient and operate on datebase tables:
Operations include:
- calculating document acceptance status,
- loading the full acceptance list,
- updating acceptance info (flag, accepting worker, date).
- .NET Framework 4.8
- WPF
- Hydra Callback API
- SQL Server (
SqlClient)
This project is proprietary and confidential.
It was developed for a client and is not permitted to be shared, redistributed, or used without explicit written permission from the owner.
See LICENSE for details.
© 2025-present calKU0