Beispiel #1
0
def do_print(receipt):
    logger.info('Print receipt %s', str(receipt))
    try:
        device = printer.device(config_from_gui=config_from_gui)
        device.print_receipt(receipt)
    except (SystemExit, KeyboardInterrupt):
        raise
    except Exception, e:
        logger.error('Failed to print receipt', exc_info=True)
Beispiel #2
0
def open_cashbox():
    logger.info('open_cashbox')
    try:
        device = printer.device()
        device.open_cashbox()
    except (SystemExit, KeyboardInterrupt):
        raise
    except Exception, e:
        logger.error('Failed to open the cashbox', exc_info=True)
Beispiel #3
0
def print_receipt():
    receipt = _get_data('receipt')
    logger.info('Print receipt %s', str(receipt))
    try:
        device = printer.device()
        device.print_receipt(receipt)
    except (SystemExit, KeyboardInterrupt):
        raise
    except Exception, e:
        logger.error('Failed to print receipt', exc_info=True)