minor fix
This commit is contained in:
parent
f81774c446
commit
4f64c01b99
16
app/main.py
16
app/main.py
|
@ -6,11 +6,13 @@ import logging
|
|||
import base64
|
||||
import time
|
||||
import traceback
|
||||
import threading
|
||||
import atexit
|
||||
from decimal import Decimal
|
||||
from datetime import datetime, timedelta
|
||||
from collections import OrderedDict
|
||||
from PySide6 import QtGui
|
||||
from PySide6.QtCore import Qt, QTimer
|
||||
from PySide6.QtCore import Qt, QTimer, QThread
|
||||
from PySide6.QtWidgets import (
|
||||
QLabel, QHBoxLayout, QVBoxLayout,
|
||||
QWidget)
|
||||
|
@ -109,6 +111,9 @@ class AppWindow(FrontWindow):
|
|||
timer = QTimer()
|
||||
timer.timeout.connect(self.verify_print_order_automatic)
|
||||
timer.start(30000)
|
||||
# self.timer = threading.Timer(30, self.verify_print_order_automatic)
|
||||
# self.timer.start()
|
||||
# atexit.register(self.terminate_timer)
|
||||
|
||||
self.do_invoice = DoInvoice(self, self.ctx)
|
||||
self.do_invoice.sigDoInvoice.connect(self.__do_invoice_thread)
|
||||
|
@ -119,6 +124,9 @@ class AppWindow(FrontWindow):
|
|||
if matching_journal:
|
||||
self.default_journal = matching_journal
|
||||
|
||||
# def terminate_timer(self):
|
||||
# self.timer.cancel()
|
||||
|
||||
def get_defaults_variables(self):
|
||||
self._clear_invoice_number = False
|
||||
self.reader_thread = None
|
||||
|
@ -1116,9 +1124,11 @@ class AppWindow(FrontWindow):
|
|||
elif environment == 'retail':
|
||||
if not self._check_quantity():
|
||||
return
|
||||
self.Sale.button_method('quote', [sale_id])
|
||||
self.load_sale(sale_id)
|
||||
self.Sale.write([sale_id], {'state': 'quotation'})
|
||||
# self.load_sale(sale_id)
|
||||
self.store.set({'state': 'quotation'})
|
||||
self.set_state('accept')
|
||||
self.set_amounts()
|
||||
|
||||
def button_checkout_pressed(self):
|
||||
if not self.check_salesman():
|
||||
|
|
|
@ -606,9 +606,9 @@ class Receipt(object):
|
|||
consumer = sale.get('consumer', None)
|
||||
if consumer:
|
||||
payment_method = sale.get('payment_method', None)
|
||||
consumer_name = consumer.get('consumer_name', None)
|
||||
consumer_address = consumer.get('consumer_address', '')
|
||||
consumer_phone = consumer.get('consumer_phone', '')
|
||||
consumer_name = consumer.get('name', None)
|
||||
consumer_address = consumer.get('address', '')
|
||||
consumer_phone = consumer.get('phone', '')
|
||||
self.print_horinzontal_line()
|
||||
self.print_enter()
|
||||
self._printer.set(align='center')
|
||||
|
|
Loading…
Reference in New Issue