minor fix
This commit is contained in:
parent
c9a687809f
commit
4a6c63fadd
|
@ -377,7 +377,10 @@ class TableModel(QAbstractTableModel):
|
||||||
mod_hours = value_obj + timedelta(hours=DELTA_LOCALE)
|
mod_hours = value_obj + timedelta(hours=DELTA_LOCALE)
|
||||||
val = mod_hours.strftime('%d/%m/%Y %I:%M %p')
|
val = mod_hours.strftime('%d/%m/%Y %I:%M %p')
|
||||||
elif data['type'] == 'time':
|
elif data['type'] == 'time':
|
||||||
|
try:
|
||||||
value_obj = datetime.strptime(val, '%Y-%m-%dT%H:%M:%S.%f')
|
value_obj = datetime.strptime(val, '%Y-%m-%dT%H:%M:%S.%f')
|
||||||
|
except Exception:
|
||||||
|
value_obj = datetime.strptime(val, '%Y-%m-%dT%H:%M:%S')
|
||||||
mod_hours = value_obj + timedelta(hours=DELTA_LOCALE)
|
mod_hours = value_obj + timedelta(hours=DELTA_LOCALE)
|
||||||
val = mod_hours.strftime('%I:%M %p')
|
val = mod_hours.strftime('%I:%M %p')
|
||||||
if data['type'] == 'icon':
|
if data['type'] == 'icon':
|
||||||
|
|
|
@ -4,9 +4,7 @@ import sys
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import base64
|
import base64
|
||||||
import platform
|
|
||||||
import time
|
import time
|
||||||
from packaging.version import parse as parse_version
|
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from datetime import datetime, timedelta, date
|
from datetime import datetime, timedelta, date
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
@ -40,7 +38,6 @@ from .constants import (
|
||||||
SALE_FIELDS, KIND_REST, KIND_RETAIL, DIALOG_REPLY_YES,
|
SALE_FIELDS, KIND_REST, KIND_RETAIL, DIALOG_REPLY_YES,
|
||||||
)
|
)
|
||||||
from .dialogs import DialogDeliveryParty
|
from .dialogs import DialogDeliveryParty
|
||||||
import time
|
|
||||||
try:
|
try:
|
||||||
from app.models import MODELS_RETAIL
|
from app.models import MODELS_RETAIL
|
||||||
except:
|
except:
|
||||||
|
@ -227,7 +224,7 @@ class AppWindow(FrontWindow):
|
||||||
)
|
)
|
||||||
self.receipt_order = None
|
self.receipt_order = None
|
||||||
# Printing order context
|
# Printing order context
|
||||||
if self.print_order:
|
if hasattr(self, 'print_order') and self.print_order:
|
||||||
self.receipt_order = Receipt(ctx_printing, environment=self.enviroment)
|
self.receipt_order = Receipt(ctx_printing, environment=self.enviroment)
|
||||||
self.set_default_printer()
|
self.set_default_printer()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue