minor fixes
This commit is contained in:
parent
b72a947ae5
commit
4659847b00
|
@ -1042,9 +1042,9 @@ class MainWindow(FrontWindow):
|
|||
return True
|
||||
|
||||
def action_tip(self):
|
||||
if self._config['tip_product.code'] and self._config['tip_rate']:
|
||||
if self._config['tip_product'] and self._config['tip_rate']:
|
||||
total_amount = int(self._get_total_amount())
|
||||
self.add_product(code=self._config['tip_product.code'])
|
||||
self.add_product(code=self._config['tip_product']['code'])
|
||||
self.button_plus_pressed()
|
||||
eval_value = int((self._config['tip_rate'] / 100) * total_amount)
|
||||
self.ModSaleLine.write(
|
||||
|
@ -1418,13 +1418,14 @@ class MainWindow(FrontWindow):
|
|||
|
||||
if party.get('customer_payment_term'):
|
||||
values['payment_term'] = party.get('customer_payment_term')
|
||||
self.field_payment_term.setText(str(party['customer_payment_term.name']))
|
||||
self.field_payment_term.setText(str(party['customer_payment_term']['name']))
|
||||
self.field_payment_term_id = party.get('customer_payment_term')
|
||||
else:
|
||||
values['payment_term'] = self.default_payment_term['id']
|
||||
self.field_payment_term_id = self.default_payment_term['id']
|
||||
self.field_payment_term.setText(self.default_payment_term['name'])
|
||||
|
||||
print(self._sale['id'], values)
|
||||
values['payment_term'] = values['payment_term']['id']
|
||||
self._PosSale.write([self._sale['id']], values)
|
||||
|
||||
self.party_id = party_id
|
||||
|
@ -2082,7 +2083,6 @@ class MainWindow(FrontWindow):
|
|||
'product_id': product_id,
|
||||
'qty': 1
|
||||
}
|
||||
|
||||
res = self.ModSale.faster_add_product(data)
|
||||
self._sale_line = res
|
||||
self._current_line_id = res['id']
|
||||
|
@ -2393,7 +2393,7 @@ class MainWindow(FrontWindow):
|
|||
if self.enviroment == 'restaurant':
|
||||
if removed_item and self.print_order:
|
||||
self.action_print_order(self._sale['id'], removed_item)
|
||||
if self._config['tip_product.code'] == removed_item['product.code']:
|
||||
if self._config['tip_product']['code'] == removed_item['product.code']:
|
||||
self._PosSale.write([self._sale['id']], {'tip': None})
|
||||
|
||||
def set_discount(self, eval_value, lines_ids=[]):
|
||||
|
|
Loading…
Reference in New Issue