minor fix
This commit is contained in:
parent
f3c6d2348f
commit
e3501040df
|
@ -130,6 +130,7 @@ class Login(QDialog):
|
|||
self.error_msg.hide()
|
||||
|
||||
def run(self, profile=None):
|
||||
self.api_url = self.params['api_url']
|
||||
if self.params['database']:
|
||||
self.field_database.setText(self.params['database'])
|
||||
if self.params['user']:
|
||||
|
@ -137,6 +138,7 @@ class Login(QDialog):
|
|||
if self.params['server']:
|
||||
self.field_host.setText(self.params['server'])
|
||||
if self.mode_conn == 'offline':
|
||||
self.api_url = self.params['api_url_offline']
|
||||
if self.params['database_offline']:
|
||||
self.field_database.setText(self.params['database_offline'])
|
||||
if self.params['user']:
|
||||
|
|
|
@ -188,7 +188,6 @@ class AppWindow(FrontWindow):
|
|||
})
|
||||
ctx_printing['row_characters'] = self.row_characters
|
||||
ctx_printing['delta_locale'] = DELTA_LOCALE
|
||||
|
||||
locale_logo = ''
|
||||
if self.logo:
|
||||
locale_logo = os.path.join(os.path.abspath(
|
||||
|
@ -2767,12 +2766,11 @@ class AppWindow(FrontWindow):
|
|||
self.label_input.setFocus()
|
||||
self.dialog_product_edit.close()
|
||||
if self.enviroment == 'restaurant':
|
||||
if self._config['tip_product']['code'] == removed_item['product'].['code']:
|
||||
if self._config['tip_product']['code'] == removed_item['product']['code']:
|
||||
self.Sale.write([self._sale['id']], {'tip': None})
|
||||
|
||||
def set_discount(self, eval_value, lines_ids=[], type_='percentage'):
|
||||
res = False
|
||||
print(lines_ids, type_, 'set_discount')
|
||||
try:
|
||||
value = round(float(str(eval_value)), 6)
|
||||
except ValueError:
|
||||
|
|
|
@ -228,7 +228,7 @@ class Receipt(object):
|
|||
if sale.get('cufe'):
|
||||
self._printer.text('CUFE: ' + sale['cufe'])
|
||||
try:
|
||||
if self._img_logo and sale.get('qr_code'):
|
||||
if sale.get('qr_code'):
|
||||
self.print_qrcode(sale['qr_code'])
|
||||
except:
|
||||
pass
|
||||
|
@ -699,7 +699,7 @@ class Receipt(object):
|
|||
if sale.get('delivery_party'):
|
||||
self._printer.text('DOMICILIARIO: %s' % sale['delivery_party'])
|
||||
self.print_enter()
|
||||
|
||||
print(self._show_position, sale['position'], '*************')
|
||||
if self._show_position:
|
||||
self._printer.text('POSICION: %s' % str(sale['position']))
|
||||
self.print_enter()
|
||||
|
|
5
pospro
5
pospro
|
@ -30,11 +30,14 @@ class Client(object):
|
|||
if args.o:
|
||||
_file_config = args.o
|
||||
login = Login(file_config=_file_config)
|
||||
|
||||
while not login.connection:
|
||||
login.run()
|
||||
login.exec_()
|
||||
|
||||
login.params['database'] = login.field_database.text()
|
||||
login.params['user'] = login.field_user.text()
|
||||
login.params['server'] = login.field_host.text()
|
||||
login.params['api_url'] = login.api_url
|
||||
return login.connection, login.params, login.mode_conn
|
||||
|
||||
def main(self, conn, params, mode_conn):
|
||||
|
|
Loading…
Reference in New Issue