All notable changes to Fiscguy are documented in this file.
Follows Keep a Changelog and Semantic Versioning.
lastReceiptGlobalNo + 1) and persisted
locally. If the local value differs from FDMS, a warning is logged and FDMS is used as the
source of truth.lastFiscalDayNo + 1 from FDMS, keeping the local
database in sync with FDMS at all times.GET /api/receipts/). Supports
configurable page sizes via ?page_size=N parameter (max 100 items).prefetch_related().IssueCertificateView) - POST endpoint to issue/renew
device certificates using the CertificateService.issue_certificate() flow. Returns
success or detailed error responses when certificate issuance fails.DecimalField instead of FloatField for precise financial
calculations:
Taxes.percent: DecimalField(max_digits=5, decimal_places=2)Receipt.total_amount: DecimalField(max_digits=12, decimal_places=2)ReceiptLine.quantity, unit_price, line_total, tax_amount: DecimalField with appropriate precisionReceiptCreateSerializer: added device field to serializer’s fields list so that the device
relation is properly saved when creating receipts. Previously, the device ID passed from
ReceiptService was being ignored during validation, resulting in receipts being created
without an associated device.OpenDayView, CloseDayView and DevicePing now correctly use POST instead of GET, as both endpoints
perform state-changing operations.ClosingDayService: fiscal day date in the closing hash string now uses the date the fiscal
day was opened (fiscal_day.created_at) instead of today’s date, matching what FDMS holds
on record.ClosingDayService: byTax counters are now sorted by (currency ASC, taxID ASC) before
concatenation, matching the required ordering in spec section 13.3.1.ClosingDayService: zero-value counters are now excluded from all builders. Previously
SaleByTax and CreditNoteByTax had no zero filter, violating the spec rule that zero-value
counters must not be submitted.ClosingDayService: _money_value now uses int(round(value * 100)) instead of
int(value * 100) to prevent floating point truncation (e.g. 699.75 * 100 = 69974.99
becoming 69974 instead of 69975).ZIMRAReceiptHandler: CreditNoteByTax counter now correctly uses sales_amount_with_tax
per tax group instead of receipt_data["receiptTotal"]. Previously the full receipt total
was written once per tax group, inflating the counter and causing CountersMismatch on
close day.Update fiscal counter. prevents race condition by using F for row level db locking.pyOpenSSL (OpenSSL.crypto) usage from ZIMRACrypto.generate_key_and_csr
and replaced it with the cryptography library, which was already a project dependency.api.py it had a module level caching which was causing a memory leak.ClosingDayService: removed unused _today() method and its date_today import after
the closing string was corrected to use fiscal_day.created_at directly.ping_deviceinit_device.pyinit_device.pycryptography dependency to a wheel-supported version to prevent Rust build failures on Termux, Android, and minimal Linux environmentspyOpenSSL dependencyopen_day(), close_day(), submit_receipt(), get_status(), get_configuration(), get_taxes()ReceiptService, ClosingDayServiceZIMRAClient, ZIMRAReceiptHandler, ZIMRACryptoinit_device