Minor fix

This commit is contained in:
Oscar Alvarez 2021-01-02 14:02:12 -05:00
parent 2b22781681
commit 3933813eda
12 changed files with 465 additions and 451 deletions

View File

@ -38,7 +38,8 @@ class MessageBar(QHBoxLayout):
type_, msg_string = self.stack_messages.get(msg) type_, msg_string = self.stack_messages.get(msg)
if additional_info: if additional_info:
msg_string = msg_string % additional_info msg_string = msg_string % additional_info
self.label_info.setText(msg_string) print('----', msg_string)
self.label_info.setText(self.tr(msg_string))
self.type = type_ self.type = type_
self.update_style() self.update_style()

View File

@ -1,12 +1,10 @@
# -*- coding: UTF-8 -*-
import os import os
import time import time
from datetime import date from datetime import date
import logging import logging
from pathlib import Path from pathlib import Path
from collections import OrderedDict from PyQt5.QtWidgets import QMainWindow, QDesktopWidget, QLineEdit
from PyQt5.QtWidgets import QMainWindow, QDesktopWidget, QLabel, QLineEdit from PyQt5.QtCore import QTimer, QThread, pyqtSignal
from PyQt5.QtCore import QTimer, QThread, pyqtSignal, Qt
from .commons.dialogs import QuickDialog from .commons.dialogs import QuickDialog
from .commons.dblogin import safe_reconnect from .commons.dblogin import safe_reconnect
@ -71,11 +69,10 @@ class FrontWindow(QMainWindow):
self.screen_size = 'medium' self.screen_size = 'medium'
self.timeout = _DEFAULT_TIMEOUT self.timeout = _DEFAULT_TIMEOUT
self.set_stack_messages()
self.setFocus() self.setFocus()
self.global_timer = 0 self.global_timer = 0
print('Screen Size: > ', self.screen_size) # print('Screen Size: > ', self.screen_size)
_theme = params['theme'] if params.get('theme') else None _theme = params['theme'] if params.get('theme') else None
self.profile_printer = params['profile_printer'] if params.get('profile_printer') else 'TM-P80' self.profile_printer = params['profile_printer'] if params.get('profile_printer') else 'TM-P80'
self.set_style(SCREENS[self.screen_size], _theme) self.set_style(SCREENS[self.screen_size], _theme)
@ -98,21 +95,6 @@ class FrontWindow(QMainWindow):
screen = QDesktopWidget().screenGeometry() screen = QDesktopWidget().screenGeometry()
return screen.width(), screen.height() return screen.width(), screen.height()
def set_statusbar(self, values):
status_bar = self.statusBar()
status_bar.setSizeGripEnabled(False)
for k, v in values.items():
_label = QLabel(v['name'] + ':')
_label.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
_label.setObjectName('label_status_bar')
status_bar.addWidget(_label, 1)
setattr(self, k, QLabel(str(v['value'])))
_field_info = getattr(self, k)
_field_info.setObjectName('field_status_bar')
_field_info.setAlignment(Qt.AlignLeft | Qt.AlignVCenter)
status_bar.addWidget(_field_info)
def set_style(self, file_css, theme_css=None): def set_style(self, file_css, theme_css=None):
styles = [] styles = []
if theme_css: if theme_css:
@ -146,7 +128,7 @@ class FrontWindow(QMainWindow):
self.check_empty_sale() self.check_empty_sale()
if self.active_weighing and self.reader_thread: if self.active_weighing and self.reader_thread:
self.reader_thread.onClose() self.reader_thread.onClose()
super(MainWindow, self).close() super(FrontWindow, self).close()
def dialog(self, name, response=False): def dialog(self, name, response=False):
res = QuickDialog( res = QuickDialog(
@ -174,53 +156,6 @@ class FrontWindow(QMainWindow):
def keyReleaseEvent(self, event): def keyReleaseEvent(self, event):
self._keyStates[event.key()] = False self._keyStates[event.key()] = False
def set_stack_messages(self):
messages = {
'system_ready': ('info', self.tr('SYSTEM READY...')),
'confirm_exit': ('warning', self.tr('DO YOU WANT TO EXIT?')),
'confirm_credit': ('question', self.tr('PLEASE CONFIRM YOUR PAYMENT TERM AS CREDIT?')),
'sale_number_not_found': ('warning', self.tr('SALE ORDER / INVOICE NUMBER NOT FOUND!')),
'sale_closed': ('error', self.tr('THIS SALE IS CLOSED, YOU CAN NOT TO MODIFY!')),
'discount_not_valid': ('warning', self.tr('DISCOUNT VALUE IS NOT VALID!')),
'add_payment_sale_draft': ('info', self.tr('YOU CAN NOT ADD PAYMENTS TO SALE ON DRAFT STATE!')),
'enter_quantity': ('question', self.tr('ENTER QUANTITY...')),
'enter_discount': ('question', self.tr('ENTER DISCOUNT...')),
'enter_payment': ('question', self.tr('ENTER PAYMENT AMOUNT BY: %s')),
'enter_new_price': ('question', self.tr('ENTER NEW PRICE...')),
'order_successfully': ('info', self.tr('ORDER SUCCESUFULLY SENT.')),
'order_failed': ('warning', self.tr('FAILED SEND ORDER!')),
'missing_agent': ('warning', self.tr('MISSING AGENT!')),
'missing_salesman': ('warning', self.tr('THERE IS NOT SALESMAN FOR THE SALE!')),
'sale_without_products': ('warning', self.tr('YOU CAN NOT CONFIRM A SALE WITHOUT PRODUCTS!')),
'user_without_permission': ('error', self.tr('USER WITHOUT PERMISSION FOR SALE POS!')),
'quantity_not_valid': ('error', self.tr('THE QUANTITY IS NOT VALID...!')),
'user_not_permissions_device': ('error', self.tr('THE USER HAVE NOT PERMISSIONS FOR ACCESS TO DEVICE!')),
'missing_party_configuration': ('warning', self.tr('MISSING THE DEFAULT PARTY ON SHOP CONFIGURATION!')),
'missing_journal_device': ('error', self.tr('MISSING SET THE JOURNAL ON DEVICE!')),
'statement_closed': ('error', self.tr('THERE IS NOT A STATEMENT OPEN FOR THIS DEVICE!')),
'product_not_found': ('warning', self.tr('PRODUCT NOT FOUND!')),
'must_load_or_create_sale': ('warning', self.tr('FIRST YOU MUST CREATE/LOAD A SALE!')),
'new_sale': ('warning', self.tr('DO YOU WANT CREATE NEW SALE?')),
'cancel_sale': ('question', self.tr('ARE YOU WANT TO CANCEL SALE?')),
'not_permission_delete_sale': ('info', self.tr('YOU HAVE NOT PERMISSIONS FOR DELETE THIS SALE!')),
'not_permission_for_cancel': ('info', self.tr('YOU HAVE NOT PERMISSIONS FOR CANCEL THIS SALE!')),
'customer_not_credit': ('info', self.tr('THE CUSTOMER HAS NOT CREDIT!')),
'agent_not_found': ('warning', self.tr('AGENT NOT FOUND!')),
'invalid_commission': ('warning', self.tr('COMMISSION NOT VALID!')),
'credit_limit_exceed': ('info', self.tr('CREDIT LIMIT FOR CUSTOMER EXCEED!')),
'credit_limit_capacity': ('info', self.tr('THE CUSTOMER CREDIT CAPACITY IS ABOVE 80%')),
'not_can_force_assign': ('warning', self.tr('YOU CAN NOT FORCE ASSIGN!')),
'send_electronic_failed': ('info', self.tr('FALLO EL ENVIO DE FACTURA!')),
'invoice_done_failed': ('info', self.tr('FALLO FINALIZACIÓN DE FACTURA!')),
'without_stock_quantity': ('info', self.tr('PRODUCT WITHOUT STOCK: %s')),
'not_sale': ('info', self.tr('NOT SALE!...')),
'statement_created': ('info', self.tr('STATEMENTS CREATED!')),
'statement_finish': ('info', self.tr('STATEMENTS CLOSED!')),
'order_dispatched': ('info', self.tr('ORDER DISPATCHED!')),
'error_order_dispatched': ('error', self.tr('ERROR TO DISPATCHED ORDER!')),
}
self.stack_msg = messages
def create_dialogs(self): def create_dialogs(self):
self.dialog_control_panel = ControlPanel(self).get(self.menu_control_panel) self.dialog_control_panel = ControlPanel(self).get(self.menu_control_panel)
self.dialog_money_count = DialogTableMoneyCount(self).get() self.dialog_money_count = DialogTableMoneyCount(self).get()
@ -407,16 +342,6 @@ class FrontWindow(QMainWindow):
self.Channel = FastModel('sale.web_channel', self.ctx) self.Channel = FastModel('sale.web_channel', self.ctx)
return True return True
def create_statusbar(self):
values = OrderedDict([
('stb_shop', {'name': self.tr('SHOP'), 'value': self.shop['name']}),
('stb_device', {'name': self.tr('DEVICE'), 'value': self.device['name']}),
('stb_database', {'name': self.tr('DATABASE'), 'value': self.database}),
('stb_user', {'name': self.tr('USER'), 'value': self.user}),
('stb_printer', {'name': self.tr('PRINTER'), 'value': self.printer_sale_name})
])
self.set_statusbar(values)
class ClearUi(QThread): class ClearUi(QThread):
sigActionClear = pyqtSignal() sigActionClear = pyqtSignal()

View File

@ -1,3 +0,0 @@
import os
locale_path = path_trans = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'i18n_es')

Binary file not shown.

View File

@ -172,7 +172,7 @@
<message> <message>
<location filename="../dialogs.py" line="700"/> <location filename="../dialogs.py" line="700"/>
<source>TYPE VEHICLE:</source> <source>TYPE VEHICLE:</source>
<translation>TIPO DE VEHÍCULO</translation> <translation>TIPO DE VEHÍCULO:</translation>
</message> </message>
<message> <message>
<location filename="../dialogs.py" line="711"/> <location filename="../dialogs.py" line="711"/>
@ -274,7 +274,7 @@
<message> <message>
<location filename="../dialogs.py" line="325"/> <location filename="../dialogs.py" line="325"/>
<source>SALES HISTORY</source> <source>SALES HISTORY</source>
<translation>HISTORIAL DE VENTAS:</translation> <translation>HISTORIAL DE VENTAS</translation>
</message> </message>
</context> </context>
<context> <context>
@ -415,7 +415,7 @@
<message> <message>
<location filename="../dialogs.py" line="808"/> <location filename="../dialogs.py" line="808"/>
<source>TOTAL MONEY:</source> <source>TOTAL MONEY:</source>
<translation>TOTAL DINERO</translation> <translation>TOTAL DINERO:</translation>
</message> </message>
</context> </context>
<context> <context>
@ -483,245 +483,10 @@
<context> <context>
<name>FrontWindow</name> <name>FrontWindow</name>
<message> <message>
<location filename="../frontwindow.py" line="42"/> <location filename="../frontwindow.py" line="40"/>
<source>APPLICATION</source> <source>APPLICATION</source>
<translation>APLICACION</translation> <translation>APLICACION</translation>
</message> </message>
<message>
<location filename="../frontwindow.py" line="179"/>
<source>SYSTEM READY...</source>
<translation>SISTEMA LISTO...</translation>
</message>
<message>
<location filename="../frontwindow.py" line="180"/>
<source>DO YOU WANT TO EXIT?</source>
<translation>DESEA SALIR?</translation>
</message>
<message>
<location filename="../frontwindow.py" line="181"/>
<source>PLEASE CONFIRM YOUR PAYMENT TERM AS CREDIT?</source>
<translation>CONFIRME QUE LA FORMA DE PAGO ES CREDITO?</translation>
</message>
<message>
<location filename="../frontwindow.py" line="182"/>
<source>SALE ORDER / INVOICE NUMBER NOT FOUND!</source>
<translation>ORDEN / FACTURA NO ENCONTRADA!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="183"/>
<source>THIS SALE IS CLOSED, YOU CAN NOT TO MODIFY!</source>
<translation>ESTA CUENTA ESTA CERRADA NO PUEDE MODIFICARLA!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="184"/>
<source>DISCOUNT VALUE IS NOT VALID!</source>
<translation>DESCUENTO NO VALIDO!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="185"/>
<source>YOU CAN NOT ADD PAYMENTS TO SALE ON DRAFT STATE!</source>
<translation>NO PUEDE AGREGAR PAGOS A UNA VENTA EN BORRADOR!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="186"/>
<source>ENTER QUANTITY...</source>
<translation>INGRESE LA CANTIDAD...</translation>
</message>
<message>
<location filename="../frontwindow.py" line="187"/>
<source>ENTER DISCOUNT...</source>
<translation>INGRESE EL DESCUENTO...</translation>
</message>
<message>
<location filename="../frontwindow.py" line="188"/>
<source>ENTER PAYMENT AMOUNT BY: %s</source>
<translation>INGRESE EL VALOR A PAGAR: %s</translation>
</message>
<message>
<location filename="../frontwindow.py" line="189"/>
<source>ENTER NEW PRICE...</source>
<translation>INGRESE EL NUEVO PRECIO...</translation>
</message>
<message>
<location filename="../frontwindow.py" line="190"/>
<source>ORDER SUCCESUFULLY SENT.</source>
<translation>ORDEN ENVIADA EXITOSAMENTE.</translation>
</message>
<message>
<location filename="../frontwindow.py" line="191"/>
<source>FAILED SEND ORDER!</source>
<translation>FALLO EL ENVIO DE LA ORDEN!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="192"/>
<source>MISSING AGENT!</source>
<translation>FALTA EL AGENTE!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="193"/>
<source>THERE IS NOT SALESMAN FOR THE SALE!</source>
<translation>NO HAY MESERO ASIGNADO!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="194"/>
<source>YOU CAN NOT CONFIRM A SALE WITHOUT PRODUCTS!</source>
<translation>NO PUEDE CONFIRMAR UNA ORDEN SIN PRODUCTOS!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="195"/>
<source>USER WITHOUT PERMISSION FOR SALE POS!</source>
<translation>USUARIO SIN PERMISOS DE EVNTAS POS!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="196"/>
<source>THE QUANTITY IS NOT VALID...!</source>
<translation>LA CANTIDAD NO ES VÁLIDA...!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="197"/>
<source>THE USER HAVE NOT PERMISSIONS FOR ACCESS TO DEVICE!</source>
<translation>EL USUARIO NO TIENE PERMISOS PARA ACCEDER AL DISPOSITIVO!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="198"/>
<source>MISSING THE DEFAULT PARTY ON SHOP CONFIGURATION!</source>
<translation>FALTA EL TERCERO POR DEFECTO EN LA CONFIGURACION!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="199"/>
<source>MISSING SET THE JOURNAL ON DEVICE!</source>
<translation></translation>
</message>
<message>
<location filename="../frontwindow.py" line="200"/>
<source>THERE IS NOT A STATEMENT OPEN FOR THIS DEVICE!</source>
<translation>NO HAY ESTADOS DE CUENTA ABIERTOS PARA EL DISPOSITIVO!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="201"/>
<source>PRODUCT NOT FOUND!</source>
<translation>PRODUCTO NO ENCONTRADO!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="202"/>
<source>FIRST YOU MUST CREATE/LOAD A SALE!</source>
<translation>PRIMERO DEBES CREAR/CARGAR UNA VENTA!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="203"/>
<source>DO YOU WANT CREATE NEW SALE?</source>
<translation>DESEA CREAR UNA NUEVA ORDER?</translation>
</message>
<message>
<location filename="../frontwindow.py" line="204"/>
<source>ARE YOU WANT TO CANCEL SALE?</source>
<translation>DESEA CANCELAR LA VENTA?</translation>
</message>
<message>
<location filename="../frontwindow.py" line="205"/>
<source>YOU HAVE NOT PERMISSIONS FOR DELETE THIS SALE!</source>
<translation>NO TIENES PERMISOS PARA BORRAR LA VENTA!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="206"/>
<source>YOU HAVE NOT PERMISSIONS FOR CANCEL THIS SALE!</source>
<translation>NO TIENES PERMISOS PARA BORRAR LA VENTA!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="207"/>
<source>THE CUSTOMER HAS NOT CREDIT!</source>
<translation>EL CLIENTE NO TIENE CREDITO!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="208"/>
<source>AGENT NOT FOUND!</source>
<translation>AGENTE NO ENCONTRADO!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="209"/>
<source>COMMISSION NOT VALID!</source>
<translation>COMISION NO VALIDA!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="210"/>
<source>CREDIT LIMIT FOR CUSTOMER EXCEED!</source>
<translation>LIMITE DE CREDITO PARA CLIENTE EXCEDIDO!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="211"/>
<source>THE CUSTOMER CREDIT CAPACITY IS ABOVE 80%</source>
<translation>EL CLIENTE ESTA EN UNA CAPACIDAD DE CREDITO POR ARRIBA DEL 80%</translation>
</message>
<message>
<location filename="../frontwindow.py" line="212"/>
<source>YOU CAN NOT FORCE ASSIGN!</source>
<translation>TU NO PUEDES FORZAR ASIGNACION!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="213"/>
<source>FALLO EL ENVIO DE FACTURA!</source>
<translation>FALLO EL ENVIO DE FACTURA!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="214"/>
<source>FALLO FINALIZACIÓN DE FACTURA!</source>
<translation>FALLO FINALIZACIÓN DE FACTURA!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="215"/>
<source>PRODUCT WITHOUT STOCK: %s</source>
<translation>PRODUCTO SIN INVENTARIO: %s</translation>
</message>
<message>
<location filename="../frontwindow.py" line="216"/>
<source>NOT SALE!...</source>
<translation>NO HAY VENTA...</translation>
</message>
<message>
<location filename="../frontwindow.py" line="217"/>
<source>STATEMENTS CREATED!</source>
<translation>ESTADOS DE CUENTA CREADOS!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="218"/>
<source>STATEMENTS CLOSED!</source>
<translation>ESTADOS DE CUENTA CERRADO!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="219"/>
<source>ORDER DISPATCHED!</source>
<translation>ORDEN DESPACHADA!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="220"/>
<source>ERROR TO DISPATCHED ORDER!</source>
<translation>ERROR EN EL DESAPACHO DE LA ORDEN!</translation>
</message>
<message>
<location filename="../frontwindow.py" line="411"/>
<source>SHOP</source>
<translation>TIENDA</translation>
</message>
<message>
<location filename="../frontwindow.py" line="411"/>
<source>DEVICE</source>
<translation>TERMINAL</translation>
</message>
<message>
<location filename="../frontwindow.py" line="411"/>
<source>DATABASE</source>
<translation>BASE DE DATOS</translation>
</message>
<message>
<location filename="../frontwindow.py" line="411"/>
<source>USER</source>
<translation>USUARIO</translation>
</message>
<message>
<location filename="../frontwindow.py" line="411"/>
<source>PRINTER</source>
<translation>IMPRESORA</translation>
</message>
</context> </context>
<context> <context>
<name>Help</name> <name>Help</name>
@ -811,7 +576,7 @@
<message> <message>
<location filename="../commons/dialogs.py" line="316"/> <location filename="../commons/dialogs.py" line="316"/>
<source>Keys Shortcuts...</source> <source>Keys Shortcuts...</source>
<translation>ATAJOS DE TECLADO</translation> <translation>ATAJOS DE TECLADO...</translation>
</message> </message>
<message> <message>
<location filename="../commons/dialogs.py" line="327"/> <location filename="../commons/dialogs.py" line="327"/>
@ -849,7 +614,7 @@
<message> <message>
<location filename="../commons/dblogin.py" line="80"/> <location filename="../commons/dblogin.py" line="80"/>
<source>C&amp;ANCEL</source> <source>C&amp;ANCEL</source>
<translation>CANCELAR</translation> <translation>CANC&amp;ELAR</translation>
</message> </message>
<message> <message>
<location filename="../commons/dblogin.py" line="83"/> <location filename="../commons/dblogin.py" line="83"/>
@ -865,287 +630,287 @@
<context> <context>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="../mainwindow.py" line="2186"/> <location filename="../mainwindow.py" line="2219"/>
<source>DATE</source> <source>DATE</source>
<translation>FECHA</translation> <translation>FECHA</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="367"/> <location filename="../mainwindow.py" line="418"/>
<source>SALESMAN</source> <source>SALESMAN</source>
<translation>VENDEDOR</translation> <translation>VENDEDOR</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="381"/> <location filename="../mainwindow.py" line="432"/>
<source>PAYMENT TERM</source> <source>PAYMENT TERM</source>
<translation>PLAZO DE PAGO</translation> <translation>PLAZO DE PAGO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="374"/> <location filename="../mainwindow.py" line="425"/>
<source>No ORDER</source> <source>No ORDER</source>
<translation>No PEDIDO</translation> <translation>No PEDIDO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="410"/> <location filename="../mainwindow.py" line="461"/>
<source>POSITION</source> <source>POSITION</source>
<translation>POSICION</translation> <translation>POSICION</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="418"/> <location filename="../mainwindow.py" line="469"/>
<source>AGENT</source> <source>AGENT</source>
<translation>AGENTE</translation> <translation>AGENTE</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="429"/> <location filename="../mainwindow.py" line="480"/>
<source>DELIVERY CHARGE</source> <source>DELIVERY CHARGE</source>
<translation>CARGO DOMICILIO</translation> <translation>CARGO DOMICILIO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2113"/> <location filename="../mainwindow.py" line="2146"/>
<source>SUBTOTAL</source> <source>SUBTOTAL</source>
<translation>SUBTOTAL</translation> <translation>SUBTOTAL</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="516"/> <location filename="../mainwindow.py" line="567"/>
<source>TAXES</source> <source>TAXES</source>
<translation>IMPUESTOS</translation> <translation>IMPUESTOS</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="524"/> <location filename="../mainwindow.py" line="575"/>
<source>DISCOUNT</source> <source>DISCOUNT</source>
<translation>DESCUENTO</translation> <translation>DESCUENTO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="544"/> <location filename="../mainwindow.py" line="595"/>
<source>TOTAL</source> <source>TOTAL</source>
<translation>TOTAL</translation> <translation>TOTAL</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="560"/> <location filename="../mainwindow.py" line="611"/>
<source>PAID</source> <source>PAID</source>
<translation>PAGADO</translation> <translation>PAGADO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="574"/> <location filename="../mainwindow.py" line="625"/>
<source>CHANGE</source> <source>CHANGE</source>
<translation>CAMBIO</translation> <translation>CAMBIO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2079"/> <location filename="../mainwindow.py" line="2112"/>
<source>NAME</source> <source>NAME</source>
<translation>NOMBRE</translation> <translation>NOMBRE</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2085"/> <location filename="../mainwindow.py" line="2118"/>
<source>DESCRIPTION</source> <source>DESCRIPTION</source>
<translation>DESCRIPCIÓN</translation> <translation>DESCRIPCIÓN</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2247"/> <location filename="../mainwindow.py" line="2280"/>
<source>AMOUNT</source> <source>AMOUNT</source>
<translation>VALOR</translation> <translation>VALOR</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2073"/> <location filename="../mainwindow.py" line="2106"/>
<source>COD</source> <source>COD</source>
<translation>COD</translation> <translation>COD</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2091"/> <location filename="../mainwindow.py" line="2124"/>
<source>UNIT</source> <source>UNIT</source>
<translation>UND</translation> <translation>UND</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2098"/> <location filename="../mainwindow.py" line="2131"/>
<source>QTY</source> <source>QTY</source>
<translation>CANT</translation> <translation>CANT</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2106"/> <location filename="../mainwindow.py" line="2139"/>
<source>DISC</source> <source>DISC</source>
<translation>DESC</translation> <translation>DESC</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2119"/> <location filename="../mainwindow.py" line="2152"/>
<source>NOTE</source> <source>NOTE</source>
<translation>NOTA</translation> <translation>NOTA</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2127"/> <location filename="../mainwindow.py" line="2160"/>
<source>UNIT PRICE W TAX</source> <source>UNIT PRICE W TAX</source>
<translation>PRECIO UNIT CON IMP</translation> <translation>PRECIO UNIT CON IMP</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2242"/> <location filename="../mainwindow.py" line="2275"/>
<source>STATEMENT JOURNAL</source> <source>STATEMENT JOURNAL</source>
<translation>ESTADO DE CUENTA</translation> <translation>ESTADO DE CUENTA</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="429"/> <location filename="../mainwindow.py" line="480"/>
<source>CUSTOMER</source> <source>CUSTOMER</source>
<translation>CLIENTE</translation> <translation>CLIENTE</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="429"/> <location filename="../mainwindow.py" line="480"/>
<source>COMPANY</source> <source>COMPANY</source>
<translation>COMPAÑIA</translation> <translation>COMPAÑIA</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="486"/> <location filename="../mainwindow.py" line="537"/>
<source>ASSIGNED TABLE</source> <source>ASSIGNED TABLE</source>
<translation>MESA ASIGNADA</translation> <translation>MESA ASIGNADA</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2135"/> <location filename="../mainwindow.py" line="2168"/>
<source>FRAC</source> <source>FRAC</source>
<translation>FRAC</translation> <translation>FRAC</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2251"/> <location filename="../mainwindow.py" line="2284"/>
<source>VOUCHER</source> <source>VOUCHER</source>
<translation>COMPROBANTE</translation> <translation>COMPROBANTE</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="1582"/> <location filename="../mainwindow.py" line="1621"/>
<source>DELIVERY MEN</source> <source>DELIVERY MEN</source>
<translation>DOMICILIARIO</translation> <translation>DOMICILIARIO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="400"/> <location filename="../mainwindow.py" line="451"/>
<source>CHANNEL</source> <source>CHANNEL</source>
<translation>CANAL</translation> <translation>CANAL</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="1578"/> <location filename="../mainwindow.py" line="1617"/>
<source>OPEN STATEMENTS</source> <source>OPEN STATEMENTS</source>
<translation>ABRIR ESTADOS DE CUENTA</translation> <translation>ABRIR ESTADOS DE CUENTA</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="1579"/> <location filename="../mainwindow.py" line="1618"/>
<source>CLOSED STATEMENTS</source> <source>CLOSED STATEMENTS</source>
<translation>CERRAR ESTADOS DE CUENTA</translation> <translation>CERRAR ESTADOS DE CUENTA</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="1581"/> <location filename="../mainwindow.py" line="1620"/>
<source>GLOBAL DISCOUNT</source> <source>GLOBAL DISCOUNT</source>
<translation>DESCUENTO GLOBAL</translation> <translation>DESCUENTO GLOBAL</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="1583"/> <location filename="../mainwindow.py" line="1622"/>
<source>HELP</source> <source>HELP</source>
<translation>AYUDA</translation> <translation>AYUDA</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2168"/> <location filename="../mainwindow.py" line="2201"/>
<source>NUMBER</source> <source>NUMBER</source>
<translation>NÚMERO</translation> <translation>NÚMERO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2174"/> <location filename="../mainwindow.py" line="2207"/>
<source>INVOICE NUMBER</source> <source>INVOICE NUMBER</source>
<translation>NUMERO DE FACTURA</translation> <translation>NUMERO DE FACTURA</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2180"/> <location filename="../mainwindow.py" line="2213"/>
<source>CONSUMER</source> <source>CONSUMER</source>
<translation>CONSUMIDOR</translation> <translation>CONSUMIDOR</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2192"/> <location filename="../mainwindow.py" line="2225"/>
<source>TOTAL AMOUNT</source> <source>TOTAL AMOUNT</source>
<translation>VALOR TOTAL</translation> <translation>VALOR TOTAL</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2204"/> <location filename="../mainwindow.py" line="2237"/>
<source>PARTY</source> <source>PARTY</source>
<translation>TERCERO</translation> <translation>TERCERO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2222"/> <location filename="../mainwindow.py" line="2255"/>
<source>NUMBER PLATE</source> <source>NUMBER PLATE</source>
<translation>NÚMERO DE PLACA</translation> <translation>NÚMERO DE PLACA</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2228"/> <location filename="../mainwindow.py" line="2261"/>
<source>TYPE VEHICLE</source> <source>TYPE VEHICLE</source>
<translation>TIPO DE VEHICULO</translation> <translation>TIPO DE VEHICULO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="455"/> <location filename="../mainwindow.py" line="506"/>
<source>TAKE AWAY</source> <source>TAKE AWAY</source>
<translation>PARA LLEVAR</translation> <translation>PARA LLEVAR</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="456"/> <location filename="../mainwindow.py" line="507"/>
<source>DELIVERY</source> <source>DELIVERY</source>
<translation>DOMICILIO</translation> <translation>DOMICILIO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2142"/> <location filename="../mainwindow.py" line="2175"/>
<source>COMMANDED</source> <source>COMMANDED</source>
<translation>COMAN</translation> <translation>COMAN</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2210"/> <location filename="../mainwindow.py" line="2243"/>
<source>ID NUMBER</source> <source>ID NUMBER</source>
<translation>NUMERO ID</translation> <translation>NUMERO ID</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="2216"/> <location filename="../mainwindow.py" line="2249"/>
<source>PHONE</source> <source>PHONE</source>
<translation>TELÉFONO</translation> <translation>TELÉFONO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="457"/> <location filename="../mainwindow.py" line="508"/>
<source>TO TABLE</source> <source>TO TABLE</source>
<translation>A LA MESA</translation> <translation>A LA MESA</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="459"/> <location filename="../mainwindow.py" line="510"/>
<source>KIND</source> <source>KIND</source>
<translation>CLASE</translation> <translation>CLASE</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="532"/> <location filename="../mainwindow.py" line="583"/>
<source>VR. PROPINA</source> <source>VR. PROPINA</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="538"/> <location filename="../mainwindow.py" line="589"/>
<source>VR. DOMIC</source> <source>VR. DOMIC</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="552"/> <location filename="../mainwindow.py" line="603"/>
<source>NETO TOTAL</source> <source>NETO TOTAL</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="294"/> <location filename="../mainwindow.py" line="345"/>
<source>START</source> <source>START</source>
<translation>INICIO</translation> <translation>INICIO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="339"/> <location filename="../mainwindow.py" line="390"/>
<source>No Invoice</source> <source>No Invoice</source>
<translation>No. Factura</translation> <translation>No. Factura</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="567"/> <location filename="../mainwindow.py" line="618"/>
<source>PENDING</source> <source>PENDING</source>
<translation>PENDIENTE</translation> <translation>PENDIENTE</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="472"/> <location filename="../mainwindow.py" line="523"/>
<source>CASH</source> <source>CASH</source>
<translation>EFECTIVO</translation> <translation>EFECTIVO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="473"/> <location filename="../mainwindow.py" line="524"/>
<source>TERMINAL</source> <source>TERMINAL</source>
<translation>DATAFONO</translation> <translation>DATAFONO</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.py" line="475"/> <location filename="../mainwindow.py" line="526"/>
<source>PAYMENT METHOD</source> <source>PAYMENT METHOD</source>
<translation>METODO DE PAGO</translation> <translation>METODO DE PAGO</translation>
</message> </message>
@ -1155,7 +920,7 @@
<message> <message>
<location filename="../commons/menu_list.py" line="111"/> <location filename="../commons/menu_list.py" line="111"/>
<source>Menu...</source> <source>Menu...</source>
<translation>Menu</translation> <translation>Menu...</translation>
</message> </message>
<message> <message>
<location filename="../commons/menu_list.py" line="170"/> <location filename="../commons/menu_list.py" line="170"/>
@ -1181,17 +946,17 @@
<message> <message>
<location filename="../commons/dialogs.py" line="36"/> <location filename="../commons/dialogs.py" line="36"/>
<source>Warning...</source> <source>Warning...</source>
<translation>Advertencia</translation> <translation>Advertencia...</translation>
</message> </message>
<message> <message>
<location filename="../commons/dialogs.py" line="37"/> <location filename="../commons/dialogs.py" line="37"/>
<source>Information...</source> <source>Information...</source>
<translation>Información</translation> <translation>Información...</translation>
</message> </message>
<message> <message>
<location filename="../commons/dialogs.py" line="38"/> <location filename="../commons/dialogs.py" line="38"/>
<source>Action...</source> <source>Action...</source>
<translation>Acción</translation> <translation>Acción...</translation>
</message> </message>
<message> <message>
<location filename="../commons/dialogs.py" line="39"/> <location filename="../commons/dialogs.py" line="39"/>
@ -1224,42 +989,42 @@
<message> <message>
<location filename="../dialogs.py" line="377"/> <location filename="../dialogs.py" line="377"/>
<source>PARTY:</source> <source>PARTY:</source>
<translation>CLIENTE</translation> <translation>CLIENTE:</translation>
</message> </message>
<message> <message>
<location filename="../dialogs.py" line="385"/> <location filename="../dialogs.py" line="385"/>
<source>NUMBER:</source> <source>NUMBER:</source>
<translation>NÚMERO</translation> <translation>NÚMERO:</translation>
</message> </message>
<message> <message>
<location filename="../dialogs.py" line="393"/> <location filename="../dialogs.py" line="393"/>
<source>DATE:</source> <source>DATE:</source>
<translation>FECHA</translation> <translation>FECHA:</translation>
</message> </message>
<message> <message>
<location filename="../dialogs.py" line="401"/> <location filename="../dialogs.py" line="401"/>
<source>SALESMAN:</source> <source>SALESMAN:</source>
<translation>VENDEDOR</translation> <translation>VENDEDOR:</translation>
</message> </message>
<message> <message>
<location filename="../dialogs.py" line="409"/> <location filename="../dialogs.py" line="409"/>
<source>LINES:</source> <source>LINES:</source>
<translation>LINEAS</translation> <translation>LINEAS:</translation>
</message> </message>
<message> <message>
<location filename="../dialogs.py" line="419"/> <location filename="../dialogs.py" line="419"/>
<source>UNTAXED AMOUNT:</source> <source>UNTAXED AMOUNT:</source>
<translation>BASE</translation> <translation>BASE:</translation>
</message> </message>
<message> <message>
<location filename="../dialogs.py" line="427"/> <location filename="../dialogs.py" line="427"/>
<source>TAX AMOUNT:</source> <source>TAX AMOUNT:</source>
<translation>IMPUESTOS</translation> <translation>IMPUESTOS:</translation>
</message> </message>
<message> <message>
<location filename="../dialogs.py" line="435"/> <location filename="../dialogs.py" line="435"/>
<source>TOTAL AMOUNT:</source> <source>TOTAL AMOUNT:</source>
<translation>TOTAL</translation> <translation>TOTAL:</translation>
</message> </message>
<message> <message>
<location filename="../dialogs.py" line="453"/> <location filename="../dialogs.py" line="453"/>
@ -1272,7 +1037,7 @@
<message> <message>
<location filename="../commons/dialogs.py" line="245"/> <location filename="../commons/dialogs.py" line="245"/>
<source>Search Products...</source> <source>Search Products...</source>
<translation>Buscar Productos</translation> <translation>Buscar Productos...</translation>
</message> </message>
</context> </context>
<context> <context>
@ -1412,16 +1177,229 @@
<context> <context>
<name>SearchWindow</name> <name>SearchWindow</name>
<message> <message>
<location filename="../commons/search_window.py" line="65"/> <location filename="../commons/search_window.py" line="66"/>
<source>SEARCH...</source> <source>SEARCH...</source>
<translation>BUSCAR...</translation> <translation>BUSCAR...</translation>
</message> </message>
<message> <message>
<location filename="../commons/search_window.py" line="171"/> <location filename="../commons/search_window.py" line="172"/>
<source>FILTER:</source> <source>FILTER:</source>
<translation>FILTRO:</translation> <translation>FILTRO:</translation>
</message> </message>
</context> </context>
<context>
<name>StackMessages</name>
<message>
<location filename="../stack_messages.py" line="11"/>
<source>SYSTEM READY...</source>
<translation>SISTEMA LISTO...</translation>
</message>
<message>
<location filename="../stack_messages.py" line="12"/>
<source>DO YOU WANT TO EXIT?</source>
<translation>ESTA SEGURO QUE DESEA SALIR?</translation>
</message>
<message>
<location filename="../stack_messages.py" line="13"/>
<source>PLEASE CONFIRM YOUR PAYMENT TERM AS CREDIT?</source>
<translation>CONFIRME QUE EL PLAZO DE PAGO ES CREDITO?</translation>
</message>
<message>
<location filename="../stack_messages.py" line="14"/>
<source>SALE ORDER / INVOICE NUMBER NOT FOUND!</source>
<translation>PEDIDO / FACTURA NO ENCONTRADA!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="15"/>
<source>THIS SALE IS CLOSED, YOU CAN NOT TO MODIFY!</source>
<translation>LA VENTA ESTA CERRA, NO PUEDES MODIFICARLA!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="16"/>
<source>DISCOUNT VALUE IS NOT VALID!</source>
<translation>EL DESCUENTO NO ES VALIDO!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="17"/>
<source>YOU CAN NOT ADD PAYMENTS TO SALE ON DRAFT STATE!</source>
<translation>NO PUEDE AGREGAR PAGO A UN PEDIDO EN BORRADOR!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="18"/>
<source>ENTER QUANTITY...</source>
<translation>INGRESE LA CANTIDAD...</translation>
</message>
<message>
<location filename="../stack_messages.py" line="19"/>
<source>ENTER DISCOUNT...</source>
<translation>INGRESE EL DESCUENTO...</translation>
</message>
<message>
<location filename="../stack_messages.py" line="20"/>
<source>ENTER PAYMENT AMOUNT BY: %s</source>
<translation>INGRESE EL VALOR A PAGAR EN: %s</translation>
</message>
<message>
<location filename="../stack_messages.py" line="21"/>
<source>ENTER NEW PRICE...</source>
<translation>INGRESE EL PRECIO...</translation>
</message>
<message>
<location filename="../stack_messages.py" line="22"/>
<source>ORDER SUCCESSFULLY SENT</source>
<translation>ORDEN ENVIADA EXITOSAMENTE</translation>
</message>
<message>
<location filename="../stack_messages.py" line="23"/>
<source>FAILED SEND ORDER!</source>
<translation>FALLO EL ENVIO DE LA ORDEN!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="24"/>
<source>MISSING AGENT!</source>
<translation>FALTA EL AGENTE!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="25"/>
<source>THERE IS NOT SALESMAN FOR THE SALE!</source>
<translation>NO HAY VENDEDOR EN EL PEDIDO!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="26"/>
<source>YOU CAN NOT CONFIRM A SALE WITHOUT PRODUCTS!</source>
<translation>NO PUEDE CONFIRMAR UNA VENTA SIN PRODUCTOS!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="27"/>
<source>USER WITHOUT PERMISSION FOR SALE POS!</source>
<translation>USUARIO SIN PERMISOS PARA VENTAS EN POS!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="28"/>
<source>THE QUANTITY IS NOT VALID...!</source>
<translation>LA CANTIDAD NO ES VALIDA!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="29"/>
<source>THE USER HAVE NOT PERMISSIONS FOR ACCESS TO DEVICE!</source>
<translation>EL USUARIO NO TIENE PERMISOS PARA ACCEDER AL DISPOSITIVO!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="30"/>
<source>MISSING THE DEFAULT PARTY ON SHOP CONFIGURATION!</source>
<translation>FALTA EL TERCERO POR DEFECTO EN LA SUCURSAL!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="31"/>
<source>MISSING SET THE JOURNAL ON DEVICE!</source>
<translation>FALTA EL DIARIO EN EL TERMINAL!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="32"/>
<source>THERE IS NOT A STATEMENT OPEN FOR THIS DEVICE!</source>
<translation>NO HAY ESTADOS DE CUENTA ABIERTOS PARA ESTE TERMINAL!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="33"/>
<source>PRODUCT NOT FOUND!</source>
<translation>PRODUCTO NO ENCONTRADO!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="34"/>
<source>FIRST YOU MUST CREATE/LOAD A SALE!</source>
<translation>PRIMERO DEBE CREAR/CARAGR UNA VENTA!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="35"/>
<source>DO YOU WANT CREATE NEW SALE?</source>
<translation>DESEA CREAR UNA NUEVA VENTA!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="36"/>
<source>ARE YOU WANT TO CANCEL SALE?</source>
<translation>DESEA CACELAR LA VENTA?</translation>
</message>
<message>
<location filename="../stack_messages.py" line="37"/>
<source>YOU HAVE NOT PERMISSIONS FOR DELETE THIS SALE!</source>
<translation>NO TIENE PERMISOS PARA BORAR VENTAS!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="38"/>
<source>YOU HAVE NOT PERMISSIONS FOR CANCEL THIS SALE!</source>
<translation>NO TIENES PERMISOS PARA CANCELAR LA VENTA!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="39"/>
<source>THE CUSTOMER HAS NOT CREDIT!</source>
<translation>EL CLIENTE NO TIENE CUPO DE CREDITO!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="40"/>
<source>AGENT NOT FOUND!</source>
<translation>AGENTE NO ENCONTRADO!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="41"/>
<source>COMMISSION NOT VALID!</source>
<translation>COMISION NO VALIDA!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="42"/>
<source>CREDIT LIMIT FOR CUSTOMER EXCEED!</source>
<translation>LIMITE DE CREDITO DEL CLIENTE EXCEDIDO!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="43"/>
<source>THE CUSTOMER CREDIT CAPACITY IS ABOVE 80%</source>
<translation>LA CAPACIDAD DE CREDITO DEL CLIENTE ESTA SOBRE EL 80%</translation>
</message>
<message>
<location filename="../stack_messages.py" line="44"/>
<source>YOU CAN NOT FORCE ASSIGN!</source>
<translation></translation>
</message>
<message>
<location filename="../stack_messages.py" line="45"/>
<source>FALLO EL ENVIO DE FACTURA!</source>
<translation>FALLO EN EL ENVIO DE LA FACTURA!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="46"/>
<source>FALLO FINALIZACIÓN DE FACTURA!</source>
<translation type="unfinished">FALLO EN EL PROCESAMIENTO DE LA FACTURA!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="47"/>
<source>PRODUCT WITHOUT STOCK: %s</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../stack_messages.py" line="48"/>
<source>NOT SALE!...</source>
<translation>NO HAY VENTA!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="49"/>
<source>STATEMENTS CREATED!</source>
<translation>ESTADOS DE CUENTA ABIERTOS!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="50"/>
<source>STATEMENTS CLOSED!</source>
<translation>ESTADOS DE CUENTA CERRADOS!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="51"/>
<source>ORDER DISPATCHED!</source>
<translation>ORDEN DESPACHADA!</translation>
</message>
<message>
<location filename="../stack_messages.py" line="52"/>
<source>ERROR TO DISPATCHED ORDER!</source>
<translation>ERROR EN EL DESPACHO DELA ORDEN!</translation>
</message>
</context>
<context> <context>
<name>StartButtons</name> <name>StartButtons</name>
<message> <message>
@ -1450,6 +1428,34 @@
<translation>IMPRIMIR</translation> <translation>IMPRIMIR</translation>
</message> </message>
</context> </context>
<context>
<name>StatusBar</name>
<message>
<location filename="../status_bar.py" line="13"/>
<source>SHOP</source>
<translation>SUCURSAL</translation>
</message>
<message>
<location filename="../status_bar.py" line="13"/>
<source>DEVICE</source>
<translation>TERMINAL</translation>
</message>
<message>
<location filename="../status_bar.py" line="13"/>
<source>DATABASE</source>
<translation>BASE DE DATOS</translation>
</message>
<message>
<location filename="../status_bar.py" line="13"/>
<source>USER</source>
<translation>USUARIO</translation>
</message>
<message>
<location filename="../status_bar.py" line="13"/>
<source>PRINTER</source>
<translation>IMPRESORA</translation>
</message>
</context>
<context> <context>
<name>TipAmount</name> <name>TipAmount</name>
<message> <message>

View File

@ -15,6 +15,8 @@ from PyQt5.QtWidgets import (
) )
from .frontwindow import FrontWindow from .frontwindow import FrontWindow
from .status_bar import StatusBar
from .stack_messages import StackMessages
from app.commons.action import Action from app.commons.action import Action
from app.commons.forms import GridForm, ComboBox, FieldNumeric from app.commons.forms import GridForm, ComboBox, FieldNumeric
from app.commons.messages import MessageBar from app.commons.messages import MessageBar
@ -48,6 +50,8 @@ class MainWindow(FrontWindow):
super(MainWindow, self).__init__(connection, params, title) super(MainWindow, self).__init__(connection, params, title)
self.payment_ctx = {} self.payment_ctx = {}
self.set_keys() self.set_keys()
# self.set_stack_messages()
StackMessages(self)
self.stock_context = None self.stock_context = None
self._sale = {} self._sale = {}
self.ctx = self._context self.ctx = self._context
@ -76,7 +80,7 @@ class MainWindow(FrontWindow):
self.set_printers_usb(PATH_PRINTERS) self.set_printers_usb(PATH_PRINTERS)
self.set_printing_context() self.set_printing_context()
self.create_statusbar() self.statusbar = StatusBar(self)
self.reader_thread = None self.reader_thread = None
self._current_line_id = None self._current_line_id = None
@ -109,6 +113,53 @@ class MainWindow(FrontWindow):
if j['id'] == self.default_journal['id']: if j['id'] == self.default_journal['id']:
self.default_journal = j self.default_journal = j
# def set_stack_messages(self):
# self.stack_msg = {
# 'system_ready': ('info', self.tr('SYSTEM READY...')),
# 'confirm_exit': ('warning', self.tr('DO YOU WANT TO EXIT?')),
# 'confirm_credit': ('question', self.tr('PLEASE CONFIRM YOUR PAYMENT TERM AS CREDIT?')),
# 'sale_number_not_found': ('warning', self.tr('SALE ORDER / INVOICE NUMBER NOT FOUND!')),
# 'sale_closed': ('error', self.tr('THIS SALE IS CLOSED, YOU CAN NOT TO MODIFY!')),
# 'discount_not_valid': ('warning', self.tr('DISCOUNT VALUE IS NOT VALID!')),
# 'add_payment_sale_draft': ('info', self.tr('YOU CAN NOT ADD PAYMENTS TO SALE ON DRAFT STATE!')),
# 'enter_quantity': ('question', self.tr('ENTER QUANTITY...')),
# 'enter_discount': ('question', self.tr('ENTER DISCOUNT...')),
# 'enter_payment': ('question', self.tr('ENTER PAYMENT AMOUNT BY: %s')),
# 'enter_new_price': ('question', self.tr('ENTER NEW PRICE...')),
# 'order_successfully': ('info', self.tr('ORDER SUCCESSFULLY SENT')),
# 'order_failed': ('warning', self.tr('FAILED SEND ORDER!')),
# 'missing_agent': ('warning', self.tr('MISSING AGENT!')),
# 'missing_salesman': ('warning', self.tr('THERE IS NOT SALESMAN FOR THE SALE!')),
# 'sale_without_products': ('warning', self.tr('YOU CAN NOT CONFIRM A SALE WITHOUT PRODUCTS!')),
# 'user_without_permission': ('error', self.tr('USER WITHOUT PERMISSION FOR SALE POS!')),
# 'quantity_not_valid': ('error', self.tr('THE QUANTITY IS NOT VALID...!')),
# 'user_not_permissions_device': ('error', self.tr('THE USER HAVE NOT PERMISSIONS FOR ACCESS TO DEVICE!')),
# 'missing_party_configuration': ('warning', self.tr('MISSING THE DEFAULT PARTY ON SHOP CONFIGURATION!')),
# 'missing_journal_device': ('error', self.tr('MISSING SET THE JOURNAL ON DEVICE!')),
# 'statement_closed': ('error', self.tr('THERE IS NOT A STATEMENT OPEN FOR THIS DEVICE!')),
# 'product_not_found': ('warning', self.tr('PRODUCT NOT FOUND!')),
# 'must_load_or_create_sale': ('warning', self.tr('FIRST YOU MUST CREATE/LOAD A SALE!')),
# 'new_sale': ('warning', self.tr('DO YOU WANT CREATE NEW SALE?')),
# 'cancel_sale': ('question', self.tr('ARE YOU WANT TO CANCEL SALE?')),
# 'not_permission_delete_sale': ('info', self.tr('YOU HAVE NOT PERMISSIONS FOR DELETE THIS SALE!')),
# 'not_permission_for_cancel': ('info', self.tr('YOU HAVE NOT PERMISSIONS FOR CANCEL THIS SALE!')),
# 'customer_not_credit': ('info', self.tr('THE CUSTOMER HAS NOT CREDIT!')),
# 'agent_not_found': ('warning', self.tr('AGENT NOT FOUND!')),
# 'invalid_commission': ('warning', self.tr('COMMISSION NOT VALID!')),
# 'credit_limit_exceed': ('info', self.tr('CREDIT LIMIT FOR CUSTOMER EXCEED!')),
# 'credit_limit_capacity': ('info', self.tr('THE CUSTOMER CREDIT CAPACITY IS ABOVE 80%')),
# 'not_can_force_assign': ('warning', self.tr('YOU CAN NOT FORCE ASSIGN!')),
# 'send_electronic_failed': ('info', self.tr('FALLO EL ENVIO DE FACTURA!')),
# 'invoice_done_failed': ('info', self.tr('FALLO FINALIZACIÓN DE FACTURA!')),
# 'without_stock_quantity': ('info', self.tr('PRODUCT WITHOUT STOCK: %s')),
# 'not_sale': ('info', self.tr('NOT SALE!...')),
# 'statement_created': ('info', self.tr('STATEMENTS CREATED!')),
# 'statement_finish': ('info', self.tr('STATEMENTS CLOSED!')),
# 'order_dispatched': ('info', self.tr('ORDER DISPATCHED!')),
# 'error_order_dispatched': ('error', self.tr('ERROR TO DISPATCHED ORDER!')),
# }
# # self.stack_msg = messages
def set_domains(self): def set_domains(self):
self.domain_search_product = [ self.domain_search_product = [
('code', '!=', None), ('code', '!=', None),
@ -2747,5 +2798,3 @@ class MainWindow(FrontWindow):
if self._consumer.get('birthday'): if self._consumer.get('birthday'):
y, m, d = self._consumer['birthday'].split('-') y, m, d = self._consumer['birthday'].split('-')
self.row_field_birthday.setDate(QDate(int(y), int(m), int(d))) self.row_field_birthday.setDate(QDate(int(y), int(m), int(d)))
# 2798

53
app/stack_messages.py Normal file
View File

@ -0,0 +1,53 @@
from PyQt5.QtWidgets import QWidget
__all__ = ['StackMessages']
class StackMessages(QWidget):
def __init__(self, parent):
super(StackMessages, self).__init__(parent)
parent.stack_msg = {
'system_ready': ('info', self.tr('SYSTEM READY...')),
'confirm_exit': ('warning', self.tr('DO YOU WANT TO EXIT?')),
'confirm_credit': ('question', self.tr('PLEASE CONFIRM YOUR PAYMENT TERM AS CREDIT?')),
'sale_number_not_found': ('warning', self.tr('SALE ORDER / INVOICE NUMBER NOT FOUND!')),
'sale_closed': ('error', self.tr('THIS SALE IS CLOSED, YOU CAN NOT TO MODIFY!')),
'discount_not_valid': ('warning', self.tr('DISCOUNT VALUE IS NOT VALID!')),
'add_payment_sale_draft': ('info', self.tr('YOU CAN NOT ADD PAYMENTS TO SALE ON DRAFT STATE!')),
'enter_quantity': ('question', self.tr('ENTER QUANTITY...')),
'enter_discount': ('question', self.tr('ENTER DISCOUNT...')),
'enter_payment': ('question', self.tr('ENTER PAYMENT AMOUNT BY: %s')),
'enter_new_price': ('question', self.tr('ENTER NEW PRICE...')),
'order_successfully': ('info', self.tr('ORDER SUCCESSFULLY SENT')),
'order_failed': ('warning', self.tr('FAILED SEND ORDER!')),
'missing_agent': ('warning', self.tr('MISSING AGENT!')),
'missing_salesman': ('warning', self.tr('THERE IS NOT SALESMAN FOR THE SALE!')),
'sale_without_products': ('warning', self.tr('YOU CAN NOT CONFIRM A SALE WITHOUT PRODUCTS!')),
'user_without_permission': ('error', self.tr('USER WITHOUT PERMISSION FOR SALE POS!')),
'quantity_not_valid': ('error', self.tr('THE QUANTITY IS NOT VALID...!')),
'user_not_permissions_device': ('error', self.tr('THE USER HAVE NOT PERMISSIONS FOR ACCESS TO DEVICE!')),
'missing_party_configuration': ('warning', self.tr('MISSING THE DEFAULT PARTY ON SHOP CONFIGURATION!')),
'missing_journal_device': ('error', self.tr('MISSING SET THE JOURNAL ON DEVICE!')),
'statement_closed': ('error', self.tr('THERE IS NOT A STATEMENT OPEN FOR THIS DEVICE!')),
'product_not_found': ('warning', self.tr('PRODUCT NOT FOUND!')),
'must_load_or_create_sale': ('warning', self.tr('FIRST YOU MUST CREATE/LOAD A SALE!')),
'new_sale': ('warning', self.tr('DO YOU WANT CREATE NEW SALE?')),
'cancel_sale': ('question', self.tr('ARE YOU WANT TO CANCEL SALE?')),
'not_permission_delete_sale': ('info', self.tr('YOU HAVE NOT PERMISSIONS FOR DELETE THIS SALE!')),
'not_permission_for_cancel': ('info', self.tr('YOU HAVE NOT PERMISSIONS FOR CANCEL THIS SALE!')),
'customer_not_credit': ('info', self.tr('THE CUSTOMER HAS NOT CREDIT!')),
'agent_not_found': ('warning', self.tr('AGENT NOT FOUND!')),
'invalid_commission': ('warning', self.tr('COMMISSION NOT VALID!')),
'credit_limit_exceed': ('info', self.tr('CREDIT LIMIT FOR CUSTOMER EXCEED!')),
'credit_limit_capacity': ('info', self.tr('THE CUSTOMER CREDIT CAPACITY IS ABOVE 80%')),
'not_can_force_assign': ('warning', self.tr('YOU CAN NOT FORCE ASSIGN!')),
'send_electronic_failed': ('info', self.tr('SEND INVOICE FAILED!')),
'invoice_done_failed': ('info', self.tr('PROCESSING INVOICE FAILED!')),
'without_stock_quantity': ('info', self.tr('PRODUCT WITHOUT STOCK: %s')),
'not_sale': ('info', self.tr('NOT SALE!...')),
'statement_created': ('info', self.tr('STATEMENTS CREATED!')),
'statement_finish': ('info', self.tr('STATEMENTS CLOSED!')),
'order_dispatched': ('info', self.tr('ORDER DISPATCHED!')),
'error_order_dispatched': ('error', self.tr('ERROR TO DISPATCHED ORDER!')),
}

33
app/status_bar.py Normal file
View File

@ -0,0 +1,33 @@
from collections import OrderedDict
from PyQt5.QtWidgets import QWidget, QLabel
from PyQt5.QtCore import Qt
__all__ = ['StatusBar']
class StatusBar(QWidget):
def __init__(self, parent):
super(StatusBar, self).__init__()
p = parent
values = OrderedDict([
('stb_shop', {'name': self.tr('SHOP'), 'value': p.shop['name']}),
('stb_device', {'name': self.tr('DEVICE'), 'value': p.device['name']}),
('stb_database', {'name': self.tr('DATABASE'), 'value': p.database}),
('stb_user', {'name': self.tr('USER'), 'value': p.user}),
('stb_printer', {'name': self.tr('PRINTER'), 'value': p.printer_sale_name})
])
status_bar = p.statusBar()
status_bar.setSizeGripEnabled(False)
for k, v in values.items():
_label = QLabel(v['name'] + ':')
_label.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
_label.setObjectName('label_status_bar')
status_bar.addWidget(_label, 1)
setattr(parent, k, QLabel(str(v['value'])))
_field_info = getattr(parent, k)
_field_info.setObjectName('field_status_bar')
_field_info.setAlignment(Qt.AlignLeft | Qt.AlignVCenter)
status_bar.addWidget(_field_info)

View File

@ -1,50 +0,0 @@
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os
import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QTranslator
from app.commons.dblogin import Login
from app import mainwindow
try:
DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
'..', '..', '..')))
if os.path.isdir(DIR):
sys.path.insert(0, os.path.dirname(DIR))
except NameError:
pass
locale_app = os.path.join(os.path.abspath(
os.path.dirname(__file__)), 'app', 'locale', 'i18n_es.qm')
class Client(object):
def __init__(self, parent=None):
self.app = QApplication(sys.argv)
self.translator = QTranslator()
self.translator.load(locale_app)
self.app.installTranslator(self.translator)
def init_login(self):
login = Login(file_config='config_pos.ini')
while not login.connection:
login.run()
login.exec_()
return login.connection, login.params
def main(self, conn, params):
mw = mainwindow.MainWindow(conn, params)
self.app.exec_()
client = Client()
conn, params = client.init_login()
if conn:
client.main(conn, params)
sys.exit()

BIN
posproc

Binary file not shown.

View File

@ -1,3 +1,3 @@
# Execute in terminal $ pylupdate5 project.pro # Execute in terminal $ pylupdate5 project.pro
SOURCES = app/mainwindow.py app/dialogs.py app/reporting.py app/buttonpad.py app/commons/custom_button.py app/commons/buttons.py app/commons/dblogin.py app/commons/dialogs.py app/commons/forms.py app/frontwindow.py app/commons/menu_list.py app/commons/search_window.py SOURCES = app/mainwindow.py app/frontwindow.py app/status_bar.py app/stack_messages.py app/dialogs.py app/reporting.py app/buttonpad.py app/commons/custom_button.py app/commons/buttons.py app/commons/dblogin.py app/commons/dialogs.py app/commons/forms.py app/commons/menu_list.py app/commons/search_window.py app/commons/messages.py
TRANSLATIONS = app/locale/i18n_es.ts TRANSLATIONS = app/locale/i18n_es.ts

View File

@ -15,7 +15,7 @@ args = {}
data_files = [ data_files = [
('app', glob.glob('*.ini')), ('app', glob.glob('*.ini')),
('app/frontend', glob.glob('pos/share/*.css')), ('app/commons', glob.glob('pos/share/*.css')),
('app/share', glob.glob('app/share/*.png')), ('app/share', glob.glob('app/share/*.png')),
('app/locale', glob.glob('app/locale/*.qm')), ('app/locale', glob.glob('app/locale/*.qm')),
] ]