Skip to content

tszulborski/litex.novitus_xml

 
 

Repository files navigation

litex.novitus_xml

Driver for a Polish fiscal printer with Novitus XML protocol

Fiscal printer is a fiscal memory device used to record retail sales in Poland and few other countries in the world (eg. Russia, Czechia).

This library implements parts of XML protocol of one of the major Polish manufacturers Novitus.

Printing receipt example (for more, see tests):

from litex.novitus_xml import Printer

# uses USB device autodetection and no checksumming by default
# for more url examples, see PySerial documentation
# https://pyserial.readthedocs.io/en/latest/url_handlers.html
printer = Printer(
    url='hwgrep://.*Novitus.*'
) 

printer.receipt_begin()

printer.item(
    name='First product',
    quantity=2,
    quantityunit='pcs',
    ptu='A',
    price=4
)

printer.item(
    name='Second product',
    quantity=4,
    quantityunit='pcs',
    description='A long description',
    ptu='A',
    price=2        
)

printer.receipt_close(
    total=16.0,
    systemno='1/TEST/2020',
    checkout='10',
    cashier='John Doe'
)

About

A Novitus XML Protocol Fiscal Printer Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%