set limit amount to invoice pos
This commit is contained in:
parent
73e2ee1fce
commit
1914f73f88
|
@ -1093,6 +1093,9 @@ class AppWindow(FrontWindow):
|
|||
return
|
||||
if not self._sale['id'] or not self.model_sale_lines.rowCount() > 0:
|
||||
return
|
||||
sale, = self.Sale.find([['id', '=', self._sale['id']]], fields=['invoice_type', 'total_amount'])
|
||||
if sale['invoice_type'] == 'P' and self._config.get('uvt_pos') and sale['total_amount'] > self._config['uvt_pos']:
|
||||
return self.dialog('base_uvt_pos')
|
||||
if self.enviroment == 'retail':
|
||||
print('ingresa a este')
|
||||
self.Sale.button_method('quote', [self._sale['id']])
|
||||
|
|
|
@ -170,7 +170,7 @@ MODELS_RESTAURANT = {
|
|||
'delivery_product.list_price', 'delivery_product.code',
|
||||
'delivery_product.name', 'allow_discount_handle',
|
||||
'cache_products_local', 'show_party_categories',
|
||||
'print_lines_product'
|
||||
'print_lines_product', 'uvt_pos'
|
||||
]
|
||||
},
|
||||
'party.address': {
|
||||
|
@ -383,7 +383,7 @@ MODELS_RETAIL = {
|
|||
'delivery_product.list_price', 'delivery_product.code',
|
||||
'delivery_product.name', 'allow_discount_handle',
|
||||
'cache_products_local', 'show_party_categories',
|
||||
'print_lines_product'
|
||||
'print_lines_product', 'uvt_pos'
|
||||
]
|
||||
},
|
||||
'party.address': {
|
||||
|
|
|
@ -62,4 +62,5 @@ class StackMessages(QWidget):
|
|||
'user_without_permission': ('info', 'USUARIO NO AUTORIZADO!'),
|
||||
'missing_note_for_delete_product': ('error', 'DEBE ESCRIBIR UNA OBSERVACION PARA ELIMINAR EL PRODUCTO'),
|
||||
'dont_delete_product': ('error', 'PARA ELIMINAR UN PRODUCTO DE LA VENTA DEBE FORZAR A BORRADOR EN TRYTON.'),
|
||||
'base_uvt_pos': ('info', 'VENTA SUPERA LA BASE, \n DEBE SELECCIONAR VENTA ELECTRONICA.'),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue