|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
from decimal import Decimal
|
|
|
|
|
from .commons.dialogs import HelpDialog, QuickDialog
|
|
|
|
|
from PyQt5.QtCore import Qt
|
|
|
|
|
from PyQt5.QtCore import Qt, QSize
|
|
|
|
|
from PyQt5.QtWidgets import (
|
|
|
|
|
QCheckBox, QTextEdit, QVBoxLayout, QGridLayout, QLineEdit, QPlainTextEdit,
|
|
|
|
|
QScrollArea, QHBoxLayout, QDoubleSpinBox, QLabel, QMessageBox
|
|
|
|
@ -92,7 +92,7 @@ class ControlPanel(QuickDialog):
|
|
|
|
|
vbox_.addLayout(grid)
|
|
|
|
|
width, height = get_screen()
|
|
|
|
|
super(ControlPanel, self).__init__(parent, 'action', widgets=[vbox_])
|
|
|
|
|
self.setFixedSize(width * 0.5, height * 0.5)
|
|
|
|
|
self.setFixedSize(int(width * 0.5), int(height * 0.5))
|
|
|
|
|
self.setWindowTitle('PANEL DE CONTROL')
|
|
|
|
|
|
|
|
|
|
def get_control_panel(self):
|
|
|
|
@ -123,7 +123,7 @@ class DialogReports(QuickDialog):
|
|
|
|
|
grid.addWidget(scroll_area)
|
|
|
|
|
vbox.addLayout(grid)
|
|
|
|
|
width, height = get_screen()
|
|
|
|
|
self.setFixedSize(width * 0.5, height * 0.5)
|
|
|
|
|
self.setFixedSize(int(width * 0.5), int(height * 0.5))
|
|
|
|
|
self.setWindowTitle('REPORTES')
|
|
|
|
|
self.add_widget(vbox)
|
|
|
|
|
|
|
|
|
@ -328,7 +328,7 @@ class DialogManageTables(QuickDialog):
|
|
|
|
|
width, height = get_screen()
|
|
|
|
|
super(DialogManageTables, self).__init__(parent, 'action',
|
|
|
|
|
widgets=[self.manager])
|
|
|
|
|
self.setFixedSize(width / 1.5, height / 1.5)
|
|
|
|
|
self.setFixedSize(int(width / 1.5), int(height / 1.5))
|
|
|
|
|
|
|
|
|
|
def exec_(self):
|
|
|
|
|
self.open_tables()
|
|
|
|
@ -418,7 +418,7 @@ class DialogConsumer(QuickDialog):
|
|
|
|
|
self.setWindowTitle('CONSUMIDOR')
|
|
|
|
|
self.ok_button.setDefault(False)
|
|
|
|
|
width, height = get_screen()
|
|
|
|
|
self.setGeometry(0, 0, width * 0.4, height * 0.7)
|
|
|
|
|
self.setGeometry(0, 0, int(width * 0.4), int(height * 0.7))
|
|
|
|
|
|
|
|
|
|
def get_button(self):
|
|
|
|
|
self.button_history_customer = CustomButton(
|
|
|
|
@ -504,7 +504,7 @@ class DialogHistoricSales(QuickDialog):
|
|
|
|
|
vbox_.addSpacing(10)
|
|
|
|
|
super(DialogHistoricSales, self).__init__(parent, 'action', widgets=[vbox_])
|
|
|
|
|
self.setWindowTitle('-- VENTA --')
|
|
|
|
|
self.setFixedSize(width * 0.6, height * 0.7)
|
|
|
|
|
self.setFixedSize(int(width * 0.6), int(height * 0.7))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DialogSaleForm(QuickDialog):
|
|
|
|
@ -546,7 +546,7 @@ class DialogSaleForm(QuickDialog):
|
|
|
|
|
|
|
|
|
|
self.grid.addWidget(self.get_button(), 5, 3, 3, 4)
|
|
|
|
|
width, height = get_screen()
|
|
|
|
|
self.setFixedSize(width * 0.5, height * 0.6)
|
|
|
|
|
self.setFixedSize(int(width * 0.5), int(height * 0.6))
|
|
|
|
|
|
|
|
|
|
def start(self, data):
|
|
|
|
|
self.sale_customer_selected = data['id']
|
|
|
|
@ -639,7 +639,7 @@ class DialogStock(QuickDialog):
|
|
|
|
|
width, height = get_screen()
|
|
|
|
|
super(DialogStock, self).__init__(parent, 'selection', label,
|
|
|
|
|
data, readonly=True)
|
|
|
|
|
self.setFixedSize(width * 0.4, height * 0.3)
|
|
|
|
|
self.setFixedSize(int(width * 0.4), int(height * 0.3))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -709,7 +709,7 @@ class DialogFixedDiscounts(QuickDialog):
|
|
|
|
|
width, height = get_screen()
|
|
|
|
|
super(DialogFixedDiscounts, self).__init__(parent, 'action',
|
|
|
|
|
widgets=[widgets])
|
|
|
|
|
self.setFixedSize(width * 0.8, height * 0.7)
|
|
|
|
|
self.setFixedSize(int(width * 0.8), int(height * 0.7))
|
|
|
|
|
self.setWindowTitle('DESCUENTO/BONO')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -732,7 +732,7 @@ class DialogDeliveryParty(QuickDialog):
|
|
|
|
|
super(DialogDeliveryParty, self).__init__(parent, 'action',
|
|
|
|
|
widgets=[vbox_])
|
|
|
|
|
self.setWindowTitle('ESCOJE EL DOMICILIARIO')
|
|
|
|
|
self.setFixedSize(width * 0.8, height * 0.7)
|
|
|
|
|
self.setFixedSize(int(width * 0.8), int(height * 0.7))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DeliveryPartySelected(QuickDialog):
|
|
|
|
@ -817,7 +817,7 @@ class DialogTableDeliveryParty(QuickDialog):
|
|
|
|
|
method_selected_row=parent.delivery_party_selected
|
|
|
|
|
)
|
|
|
|
|
width, height = get_screen()
|
|
|
|
|
table.setFixedSize(width/2.2, height/2.2)
|
|
|
|
|
table.setFixedSize(int(width/2.2), int(height/2.2))
|
|
|
|
|
vbox_ = QVBoxLayout()
|
|
|
|
|
|
|
|
|
|
grid = QGridLayout()
|
|
|
|
@ -830,7 +830,7 @@ class DialogTableDeliveryParty(QuickDialog):
|
|
|
|
|
super(DialogTableDeliveryParty, self).__init__(parent, 'action',
|
|
|
|
|
widgets=[vbox_])
|
|
|
|
|
width, height = get_screen()
|
|
|
|
|
self.setGeometry(0, 0, width / 1.8, height / 1.5)
|
|
|
|
|
self.setGeometry(0, 0, int(width / 1.8), int(height / 1.5))
|
|
|
|
|
self.setWindowTitle('DOMICILIARIO')
|
|
|
|
|
|
|
|
|
|
def get_button(self):
|
|
|
|
@ -859,7 +859,7 @@ class DialogMoneyCount(QuickDialog):
|
|
|
|
|
]
|
|
|
|
|
self.model = TableEdit(self, MONEY, fields)
|
|
|
|
|
table = TableView('model', self.model, _sizes, editable=True)
|
|
|
|
|
table.setFixedSize(width * 0.35, height * 0.4)
|
|
|
|
|
table.setFixedSize(int(width * 0.35), int(height * 0.4))
|
|
|
|
|
grid.addWidget(table, 1, 0, 1, 2)
|
|
|
|
|
|
|
|
|
|
label_total = QLabel('TOTAL DINERO:')
|
|
|
|
@ -978,7 +978,7 @@ class DialogExpenses(QuickDialog):
|
|
|
|
|
grid.setSpacing(10)
|
|
|
|
|
|
|
|
|
|
super(DialogExpenses, self).__init__(parent, 'action', widgets=[grid])
|
|
|
|
|
self.setGeometry(0, 0, width * 0.5, height * 0.7)
|
|
|
|
|
self.setGeometry(0, 0, int(width * 0.5), int(height * 0.7))
|
|
|
|
|
self.setWindowTitle('GASTOS')
|
|
|
|
|
self.id_count = -1
|
|
|
|
|
self.load()
|
|
|
|
@ -1056,7 +1056,7 @@ class DialogSource(QuickDialog):
|
|
|
|
|
buttons=False)
|
|
|
|
|
self.setWindowTitle('SELECCIONE EL CANAL')
|
|
|
|
|
width, height = get_screen()
|
|
|
|
|
self.setFixedSize(width * 0.6, height * 0.7)
|
|
|
|
|
self.setFixedSize(int(width * 0.6), int(height * 0.7))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DialogPaymentTerm(QuickDialog):
|
|
|
|
@ -1073,7 +1073,7 @@ class DialogPayment(QuickDialog):
|
|
|
|
|
width, height = get_screen()
|
|
|
|
|
super(DialogPayment, self).__init__(parent, 'action', widgets=[vbox_])
|
|
|
|
|
self.setWindowTitle('EL MEDIO DE PAGO:')
|
|
|
|
|
self.setFixedSize(width * 0.8, height * 0.7)
|
|
|
|
|
self.setFixedSize(int(width * 0.8), int(height * 0.7))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Position(QuickDialog):
|
|
|
|
@ -1263,7 +1263,7 @@ class ProductEdit(QuickDialog):
|
|
|
|
|
hbox.addWidget(self.checkbox_base, 0)
|
|
|
|
|
|
|
|
|
|
super(ProductEdit, self).__init__(parent, 'action', widgets=[vbox_product])
|
|
|
|
|
self.setFixedSize(width * 0.5, height * 0.7)
|
|
|
|
|
self.setFixedSize(int(width * 0.5), int(height * 0.7))
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
return self.active_line
|
|
|
|
@ -1352,7 +1352,7 @@ class CombineProduct(QuickDialog):
|
|
|
|
|
|
|
|
|
|
super(CombineProduct, self).__init__(parent, 'action', widgets=[self.box])
|
|
|
|
|
self.setWindowTitle('SELECCIONE LA COMBINACION')
|
|
|
|
|
self.setFixedSize(width * 0.8, height * 0.9)
|
|
|
|
|
self.setFixedSize(int(width * 0.8), int(height * 0.9))
|
|
|
|
|
|
|
|
|
|
def set_buttons(self, values):
|
|
|
|
|
self.values = values
|
|
|
|
@ -1403,7 +1403,7 @@ class DialogComboProduct(QuickDialog):
|
|
|
|
|
parent, 'action', widgets=[self.box]
|
|
|
|
|
)
|
|
|
|
|
self.setWindowTitle('PRODUCTO EN COMBO')
|
|
|
|
|
self.setFixedSize(width * 0.7, height * 0.6)
|
|
|
|
|
self.setFixedSize(int(width * 0.7), int(height * 0.6))
|
|
|
|
|
|
|
|
|
|
def set_buttons(self, values):
|
|
|
|
|
self.values = values
|
|
|
|
@ -1444,7 +1444,7 @@ class DialogSplitSale(QuickDialog):
|
|
|
|
|
|
|
|
|
|
super(DialogSplitSale, self).__init__(parent, 'action', widgets=[box])
|
|
|
|
|
self.setWindowTitle('DIVIDIR CUENTA')
|
|
|
|
|
self.setFixedSize(width * 0.4, height * 0.3)
|
|
|
|
|
self.setFixedSize(int(width * 0.4), int(height * 0.3))
|
|
|
|
|
self.label.setObjectName('label_h2')
|
|
|
|
|
self.label_number.setObjectName('label_h1')
|
|
|
|
|
|
|
|
|
@ -1551,7 +1551,7 @@ class DialogInfoProduct(QuickDialog):
|
|
|
|
|
self.setWindowTitle('INFO. PRODUCT')
|
|
|
|
|
self.ok_button.setDefault(False)
|
|
|
|
|
width, height = get_screen()
|
|
|
|
|
self.setGeometry(0, 0, width * 0.4, height * 0.7)
|
|
|
|
|
self.setGeometry(0, 0, int(width * 0.4), int(height * 0.7))
|
|
|
|
|
self.input_filter.setFocus()
|
|
|
|
|
|
|
|
|
|
def fill(self, values):
|
|
|
|
@ -1627,7 +1627,7 @@ class DialogInfoProduct(QuickDialog):
|
|
|
|
|
]
|
|
|
|
|
self.model = TableEdit(self, [], fields)
|
|
|
|
|
self.table = TableView('model_info_product', self.model, _sizes, editable=False, method_selected_row=self.on_selected_product)
|
|
|
|
|
self.table.setFixedSize(width * 0.35, height * 0.4)
|
|
|
|
|
self.table.setFixedSize(int(width * 0.35), int(height * 0.4))
|
|
|
|
|
grid.addWidget(self.table, 1, 0, 1, 2)
|
|
|
|
|
self.dialog_select_item = QuickDialog(parent, 'action', widgets=[grid], readonly=True, buttons=True)
|
|
|
|
|
self.dialog_select_item.setWindowTitle('PRODUCTOS')
|
|
|
|
|