Compare commits
14 Commits
529f7f6e7d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| e3a5e44c33 | |||
| 12dd6ddba0 | |||
| de2bab90de | |||
| 285fc8e80f | |||
| 93eb98c10a | |||
| e958c86eb7 | |||
| 8b132c6c51 | |||
| 46b2098ffc | |||
| 7082648122 | |||
| e02595ba0e | |||
| 2597f79d2d | |||
| 5b77337b3f | |||
| 5b5f31f64d | |||
| b17b8cb259 |
@@ -14,6 +14,7 @@ find_package(Qt6 COMPONENTS
|
||||
Core
|
||||
Gui
|
||||
Widgets
|
||||
Qml
|
||||
REQUIRED)
|
||||
|
||||
add_library(addressbook SHARED
|
||||
@@ -42,6 +43,7 @@ target_link_libraries(addressbook
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
Qt::Qml
|
||||
qdecimal
|
||||
decnumber
|
||||
QxOrm
|
||||
|
||||
@@ -13,6 +13,7 @@ find_package(Qt6 COMPONENTS
|
||||
Gui
|
||||
Widgets
|
||||
Sql
|
||||
Qml
|
||||
REQUIRED)
|
||||
|
||||
include_directories(../core)
|
||||
@@ -27,12 +28,20 @@ add_executable(prodejna
|
||||
logindialog.ui
|
||||
mainwindow.cpp
|
||||
mainwindow.h
|
||||
mainwindow.ui)
|
||||
mainwindow.ui
|
||||
shop.rc
|
||||
)
|
||||
|
||||
target_link_libraries(prodejna
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
Qt::Sql
|
||||
Qt::Qml
|
||||
core
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set_property(TARGET prodejna PROPERTY WIN32_EXECUTABLE true)
|
||||
endif()
|
||||
|
||||
@@ -256,5 +256,5 @@ void MainWindow::on_actionAbout_Qt_triggered()
|
||||
|
||||
void MainWindow::on_actionAbout_triggered()
|
||||
{
|
||||
QMessageBox::about(this, tr("About prodejna"), tr("Modular cash register software under GPL license.\n(C) 2015 - 2017 Josef Rokos, Zdenek Jonák"));
|
||||
QMessageBox::about(this, tr("About prodejna"), tr("Modular cash register software under GPL license.\n(C) 2015 - 2023 Josef Rokos, Zdenek Jonák"));
|
||||
}
|
||||
|
||||
@@ -117,9 +117,9 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<widget class="QLabel" name="labelVersion">
|
||||
<property name="text">
|
||||
<string>Prodejna 2.0</string>
|
||||
<string>Prodejna 3.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
@@ -137,7 +137,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1000</width>
|
||||
<height>42</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
|
||||
@@ -14,6 +14,7 @@ find_package(Qt6 COMPONENTS
|
||||
Core
|
||||
Gui
|
||||
Widgets
|
||||
Qml
|
||||
REQUIRED)
|
||||
|
||||
add_library(camp SHARED
|
||||
@@ -70,6 +71,7 @@ target_link_libraries(camp
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
Qt::Qml
|
||||
qdecimal
|
||||
decnumber
|
||||
QxOrm
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@ void CampGrid::addToVoucher(const CampDataPtr& data)
|
||||
|
||||
shopSrv.addShopItem(voucher, campItem, 1);
|
||||
shopSrv.calculate(voucher);
|
||||
shopSrv.saveVoucher(voucher);
|
||||
shopSrv.save(voucher);
|
||||
|
||||
data->setOnVoucher(true);
|
||||
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
#include "campseller.h"
|
||||
#include <cmath>
|
||||
|
||||
#ifdef _WIN32
|
||||
double round(double value) { return value < 0 ? -std::floor(0.5 - value) : std::floor(0.5 + value); }
|
||||
#endif
|
||||
|
||||
CampService::CampService()
|
||||
{
|
||||
m_pluginId = "CAMP";
|
||||
@@ -357,8 +353,12 @@ void CampService::addAccFee(const CampDataPtr& data, const AddressItemPtr& item,
|
||||
}
|
||||
}
|
||||
|
||||
QList<IShopItemPtr> CampService::shopItems()
|
||||
QList<IShopItemPtr> CampService::shopItems(const QString& category)
|
||||
{
|
||||
if (!category.isEmpty()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
CampShopItemPtr item(new CampShopItem);
|
||||
|
||||
QList<IShopItemPtr> items;
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ private:
|
||||
|
||||
// ISellableService interface
|
||||
public:
|
||||
QList<IShopItemPtr> shopItems() override;
|
||||
QList<IShopItemPtr> shopItems(const QString& category = "") override;
|
||||
IShopItemPtr shopItem(int itemId) override;
|
||||
void addedToVoucher(int itemId, int countAdded) override;
|
||||
ISeller *seller() override;
|
||||
|
||||
@@ -28,7 +28,7 @@ Enums::VatType CampShopItem::vatType()
|
||||
return m_vatType;
|
||||
}
|
||||
|
||||
QString CampShopItem::pluginId()
|
||||
QString CampShopItem::pluginId() const
|
||||
{
|
||||
return "CAMP";
|
||||
}
|
||||
@@ -48,7 +48,7 @@ void CampShopItem::setVatType(const Enums::VatType &vatType)
|
||||
m_vatType = vatType;
|
||||
}
|
||||
|
||||
long CampShopItem::id()
|
||||
long CampShopItem::id() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
+2
-2
@@ -10,12 +10,12 @@ public:
|
||||
|
||||
// IShopItem interface
|
||||
public:
|
||||
long id() override;
|
||||
long id() const override;
|
||||
QString name() override;
|
||||
QString shortName() override;
|
||||
QDecDouble unitPrice() override;
|
||||
Enums::VatType vatType() override;
|
||||
QString pluginId() override;
|
||||
QString pluginId() const override;
|
||||
|
||||
// ShopItem interface
|
||||
public:
|
||||
|
||||
@@ -14,6 +14,7 @@ find_package(Qt6 COMPONENTS
|
||||
Core
|
||||
Gui
|
||||
Widgets
|
||||
Qml
|
||||
REQUIRED)
|
||||
|
||||
add_library(commodity SHARED
|
||||
@@ -40,7 +41,7 @@ add_library(commodity SHARED
|
||||
data/commoditytypedata.h
|
||||
settings/commoditysettings.cpp
|
||||
settings/commoditysettings.h
|
||||
)
|
||||
coloritemdelegate.cpp coloritemdelegate.h)
|
||||
|
||||
target_compile_definitions(commodity PRIVATE -DCOMMODITY_LIBRARY)
|
||||
|
||||
@@ -51,6 +52,7 @@ target_link_libraries(commodity
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
Qt::Qml
|
||||
qdecimal
|
||||
decnumber
|
||||
QxOrm
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
//
|
||||
// Created by Josef Rokos on 03.05.2023.
|
||||
//
|
||||
|
||||
#include "coloritemdelegate.h"
|
||||
#include <QPainter>
|
||||
#include <QApplication>
|
||||
#include <QPaintEvent>
|
||||
#include <QHBoxLayout>
|
||||
#include <QColorDialog>
|
||||
|
||||
ColorLabel::ColorLabel(QWidget* parent) : QWidget(parent), m_color(Qt::white) {
|
||||
setAttribute(Qt::WA_StaticContents);
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
setFocusPolicy(Qt::NoFocus);
|
||||
}
|
||||
|
||||
QColor ColorLabel::color() const {
|
||||
return m_color;
|
||||
}
|
||||
|
||||
void ColorLabel::setColor(const QColor& color) {
|
||||
m_color = color;
|
||||
}
|
||||
|
||||
QSize ColorLabel::sizeHint() const {
|
||||
return {20,20};
|
||||
}
|
||||
|
||||
void ColorLabel::paintEvent(QPaintEvent* event) {
|
||||
QPainter painter(this);
|
||||
|
||||
QStyle* style = QApplication::style();
|
||||
painter.save();
|
||||
painter.setBrush(m_color);
|
||||
|
||||
bool dark = false;
|
||||
qreal darkness = 1-(0.299*m_color.red() + 0.587*m_color.green() + 0.114*m_color.blue())/255;
|
||||
if(darkness >= 0.5){
|
||||
dark = true;
|
||||
}
|
||||
|
||||
QColor penColor = dark ? Qt::transparent : Qt::darkGray;
|
||||
|
||||
painter.setPen(penColor);
|
||||
int border = (event->rect().height() - style->pixelMetric(QStyle::PM_IndicatorWidth))/2;
|
||||
|
||||
QRect rect(event->rect().x()+border, event->rect().y()+border,
|
||||
style->pixelMetric(QStyle::PM_IndicatorWidth),
|
||||
style->pixelMetric(QStyle::PM_IndicatorWidth));// = option.rect.adjusted(4,4,-4,-6);
|
||||
|
||||
painter.drawRect(rect);
|
||||
painter.restore();
|
||||
}
|
||||
|
||||
ColorItemEditor::ColorItemEditor(QWidget* parent) : QWidget(parent), m_buttonPressed(false)
|
||||
{
|
||||
m_colorIndicator = new ColorLabel(this);
|
||||
m_colorIndicator->setColor(m_color);
|
||||
m_button = new QToolButton(this);
|
||||
m_button->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||||
m_button->setText("...");
|
||||
m_button->installEventFilter(this);
|
||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||
layout->addWidget(m_colorIndicator);
|
||||
layout->addWidget(m_button);
|
||||
layout->setSpacing(0);
|
||||
layout->setContentsMargins(1,1,1,1);
|
||||
setFocusProxy(m_button);
|
||||
setAutoFillBackground(true);
|
||||
setLayout(layout);
|
||||
setAutoFillBackground(true);
|
||||
connect(m_button,SIGNAL(clicked()),this,SLOT(slotClicked()));
|
||||
}
|
||||
|
||||
void ColorItemEditor::setColor(const QColor& value) {
|
||||
m_color = value;
|
||||
m_colorIndicator->setColor(value);
|
||||
}
|
||||
|
||||
bool ColorItemEditor::eventFilter(QObject* obj, QEvent* event) {
|
||||
if (obj == m_button){
|
||||
if (event->type() == QEvent::FocusOut && !m_buttonPressed){
|
||||
auto focusEvent = dynamic_cast<QFocusEvent*>(event);
|
||||
if (focusEvent && focusEvent->reason()!=Qt::MouseFocusReason){
|
||||
setFocusToParent();
|
||||
emit(editingFinished());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ColorItemEditor::setFocusToParent() {
|
||||
if (parentWidget()) {
|
||||
parentWidget()->setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
void ColorItemEditor::slotClicked() {
|
||||
m_buttonPressed = true;
|
||||
auto dialog = new QColorDialog(this);
|
||||
dialog->setCurrentColor(m_color);
|
||||
|
||||
if (dialog->exec()) {
|
||||
setColor(dialog->currentColor());
|
||||
}
|
||||
|
||||
delete dialog;
|
||||
setFocusToParent();
|
||||
emit(editingFinished());
|
||||
}
|
||||
|
||||
ColorItemDelegate::ColorItemDelegate(QObject* parent) : QStyledItemDelegate(parent) {
|
||||
|
||||
}
|
||||
|
||||
void ColorItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const {
|
||||
QColor color(index.data().toString());
|
||||
|
||||
if (color.isValid()) {
|
||||
painter->save();
|
||||
painter->setBrush(color);
|
||||
|
||||
QRect rect(option.rect.x(), option.rect.y(), option.rect.width(), option.rect.height());
|
||||
painter->drawRect(rect);
|
||||
painter->restore();
|
||||
} else {
|
||||
QStyledItemDelegate::paint(painter, option, index);
|
||||
}
|
||||
}
|
||||
|
||||
QSize ColorItemDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const {
|
||||
return QStyledItemDelegate::sizeHint(option, index);
|
||||
}
|
||||
|
||||
QWidget* ColorItemDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const {
|
||||
QColor color(index.data().toString());
|
||||
if (!color.isValid()) {
|
||||
color = QColorConstants::Gray;
|
||||
}
|
||||
|
||||
auto editor = new ColorItemEditor(parent);
|
||||
editor->setColor(color);
|
||||
connect(editor, &ColorItemEditor::editingFinished, this, &ColorItemDelegate::commitAndCloseEditor);
|
||||
return editor;
|
||||
}
|
||||
|
||||
void ColorItemDelegate::commitAndCloseEditor() {
|
||||
auto editor = qobject_cast<ColorItemEditor*>(sender());
|
||||
emit commitData(editor);
|
||||
emit closeEditor(editor);
|
||||
}
|
||||
|
||||
void ColorItemDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const {
|
||||
auto edit = qobject_cast<ColorItemEditor*>(editor);
|
||||
QColor color(index.data().toString());
|
||||
|
||||
if (edit && color.isValid()) {
|
||||
edit->setColor(color);
|
||||
} else {
|
||||
QStyledItemDelegate::setEditorData(editor, index);
|
||||
}
|
||||
}
|
||||
|
||||
void ColorItemDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const {
|
||||
auto edit = qobject_cast<ColorItemEditor*>(editor);
|
||||
|
||||
if (edit) {
|
||||
model->setData(index, edit->color().name());
|
||||
} else {
|
||||
QStyledItemDelegate::setModelData(editor, model, index);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// Created by Josef Rokos on 03.05.2023.
|
||||
//
|
||||
|
||||
#ifndef COLORITEMDELEGATE_H
|
||||
#define COLORITEMDELEGATE_H
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QToolButton>
|
||||
|
||||
class ColorItemDelegate : public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ColorItemDelegate(QObject* parent = nullptr);
|
||||
~ColorItemDelegate() override = default;
|
||||
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
|
||||
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
|
||||
|
||||
private slots:
|
||||
void commitAndCloseEditor();
|
||||
|
||||
|
||||
};
|
||||
|
||||
class ColorLabel : public QWidget{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ColorLabel(QWidget* parent = nullptr);
|
||||
QColor color() const;
|
||||
void setColor(const QColor &color);
|
||||
QSize sizeHint() const override;
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
private:
|
||||
QColor m_color;
|
||||
};
|
||||
|
||||
class ColorItemEditor : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ColorItemEditor(QWidget *parent = nullptr);
|
||||
QColor color(){return m_color;}
|
||||
void setColor(const QColor& value);
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
private:
|
||||
void setFocusToParent();
|
||||
signals:
|
||||
void editingFinished();
|
||||
private slots:
|
||||
void slotClicked();
|
||||
private:
|
||||
QColor m_color;
|
||||
QToolButton* m_button;
|
||||
ColorLabel* m_colorIndicator;
|
||||
bool m_buttonPressed;
|
||||
};
|
||||
|
||||
#endif //COLORITEMDELEGATE_H
|
||||
@@ -8,7 +8,7 @@
|
||||
"default" : "",
|
||||
"CZ" : ""
|
||||
},
|
||||
"schemaVersion" : 1,
|
||||
"schemaVersion" : 2,
|
||||
"sql" : [
|
||||
"CREATE TABLE \"CommodityTypeData\" (
|
||||
\"id\" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
@@ -26,8 +26,13 @@ CREATE TABLE \"CommodityData\" (
|
||||
CONSTRAINT \"type_fk\"
|
||||
FOREIGN KEY (\"type\")
|
||||
REFERENCES \"CommodityTypeData\" (\"id\")
|
||||
DEFERRABLE INITIALLY DEFERRED);"
|
||||
|
||||
DEFERRABLE INITIALLY DEFERRED);
|
||||
",
|
||||
"
|
||||
ALTER TABLE \"CommodityTypeData\" ADD \"color\" TEXT NULL;
|
||||
ALTER TABLE \"CommodityData\" ADD \"favorite\" INTEGER NULL;
|
||||
UPDATE \"CommodityData\" SET \"favorite\"=0;
|
||||
"
|
||||
],
|
||||
"dependencies" : [ "SHOP" ],
|
||||
"translations" : {
|
||||
|
||||
@@ -25,6 +25,7 @@ CommodityForm::CommodityForm(QWidget *parent) :
|
||||
<< ComboData(Enums::SECOND_LOWER,tr("Second Lower"));
|
||||
registerBinding(ui->vat, vt);
|
||||
registerBinding(ui->count);
|
||||
registerBinding(ui->favorite);
|
||||
|
||||
m_codeAsNumber = false;
|
||||
}
|
||||
|
||||
@@ -94,6 +94,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QCheckBox" name="favorite">
|
||||
<property name="text">
|
||||
<string>Favorite</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#include "commodityservice.h"
|
||||
|
||||
QList<QSharedPointer<IShopItem> > CommodityService::shopItems()
|
||||
QList<QSharedPointer<IShopItem> > CommodityService::shopItems(const QString& category/* = ""*/)
|
||||
{
|
||||
QList<QSharedPointer<IShopItem> > ret;
|
||||
|
||||
foreach (QSharedPointer<CommodityData> data, all()) {
|
||||
ret.append(qSharedPointerDynamicCast<IShopItem, CommodityData>(data));
|
||||
if (category.isEmpty() || (data->favorite() && data->category() == category)) {
|
||||
ret.append(qSharedPointerDynamicCast<IShopItem, CommodityData>(data));
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -12,7 +12,7 @@ public:
|
||||
|
||||
// ISellableService interface
|
||||
public:
|
||||
QList<IShopItemPtr> shopItems() override;
|
||||
QList<IShopItemPtr> shopItems(const QString& category = "") override;
|
||||
void addedToVoucher(int itemId, int countAdded) override;
|
||||
IShopItemPtr shopItem(int itemId) override;
|
||||
ISeller *seller() override;
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <service.h>
|
||||
#include <settingsservice.h>
|
||||
|
||||
#include "coloritemdelegate.h"
|
||||
|
||||
CommoditySettingsForm::CommoditySettingsForm(QWidget *parent) :
|
||||
FormBinder<CommoditySettings>(parent),
|
||||
ui(new Ui::CommoditySettingsForm)
|
||||
@@ -13,9 +15,10 @@ CommoditySettingsForm::CommoditySettingsForm(QWidget *parent) :
|
||||
registerBinding(ui->codeAsNumber);
|
||||
|
||||
m_table = new AutoTableModel<CommodityTypeData>();
|
||||
m_table->setEditableCols(QList<int>() << 0);
|
||||
m_table->setEditableCols(QList<int>() << 0 << 1);
|
||||
ui->commodityTypesTable->setModel(m_table);
|
||||
ui->commodityTypesTable->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
|
||||
ui->commodityTypesTable->setItemDelegateForColumn(1, new ColorItemDelegate(this));
|
||||
}
|
||||
|
||||
CommoditySettingsForm::~CommoditySettingsForm()
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace qx {
|
||||
t.data(&CommodityData::m_price, "price");
|
||||
t.data(&CommodityData::m_vat, "vat");
|
||||
t.data(&CommodityData::m_count, "count");
|
||||
t.data(&CommodityData::m_favorite, "favorite");
|
||||
|
||||
t.relationManyToOne(&CommodityData::m_type, "type");
|
||||
}
|
||||
@@ -25,7 +26,7 @@ CommodityData::CommodityData(QObject *parent)
|
||||
m_price = 0;
|
||||
m_vat = Enums::NONE;
|
||||
}
|
||||
long CommodityData::id()
|
||||
long CommodityData::id() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
@@ -114,7 +115,7 @@ Enums::VatType CommodityData::vatType()
|
||||
return vat();
|
||||
}
|
||||
|
||||
QString CommodityData::pluginId()
|
||||
QString CommodityData::pluginId() const
|
||||
{
|
||||
return "COMMODITY";
|
||||
}
|
||||
@@ -123,6 +124,22 @@ QStringList CommodityData::eagerLoad() {
|
||||
return { "type" };
|
||||
}
|
||||
|
||||
bool CommodityData::favorite() {
|
||||
return m_favorite;
|
||||
}
|
||||
|
||||
void CommodityData::setFavorite(bool favorite) {
|
||||
m_favorite = favorite;
|
||||
}
|
||||
|
||||
QString CommodityData::color() {
|
||||
return m_type->color();
|
||||
}
|
||||
|
||||
QString CommodityData::category() {
|
||||
return m_type->name();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
#include "../commodity_global.h"
|
||||
|
||||
#pragma db object
|
||||
class CommodityData : public IShopItem
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -24,11 +23,12 @@ class CommodityData : public IShopItem
|
||||
Q_PROPERTY(QDecDouble price READ price WRITE setPrice)
|
||||
Q_PROPERTY(Enums::VatType vat READ vat WRITE setVat)
|
||||
Q_PROPERTY(int count READ count WRITE setCount)
|
||||
Q_PROPERTY(bool favorite READ favorite WRITE setFavorite)
|
||||
|
||||
public:
|
||||
explicit CommodityData(QObject *parent = nullptr);
|
||||
|
||||
long id() override;
|
||||
long id() const override;
|
||||
void setId(long id);
|
||||
|
||||
QString name() override;
|
||||
@@ -52,6 +52,9 @@ public:
|
||||
int count() const;
|
||||
void setCount(int count);
|
||||
|
||||
bool favorite() override;
|
||||
void setFavorite(bool favorite);
|
||||
|
||||
Q_INVOKABLE QStringList eagerLoad();
|
||||
|
||||
private:
|
||||
@@ -63,13 +66,15 @@ private:
|
||||
int m_price;
|
||||
Enums::VatType m_vat;
|
||||
int m_count;
|
||||
bool m_favorite;
|
||||
|
||||
// IShopItem interface
|
||||
public:
|
||||
QDecDouble unitPrice() override;
|
||||
Enums::VatType vatType() override;
|
||||
QString pluginId() override;
|
||||
|
||||
QString pluginId() const override;
|
||||
QString color() override;
|
||||
QString category() override;
|
||||
};
|
||||
|
||||
typedef QSharedPointer<CommodityData> CommodityDataPtr;
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace qx {
|
||||
t.setName("CommodityTypeData");
|
||||
t.id(&CommodityTypeData::m_id, "id");
|
||||
t.data(&CommodityTypeData::m_name, "name");
|
||||
t.data(&CommodityTypeData::m_color, "color");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,4 +48,12 @@ QString CommodityTypeData::toString()
|
||||
return this->name();
|
||||
}
|
||||
|
||||
QString CommodityTypeData::color() const {
|
||||
return m_color;
|
||||
}
|
||||
|
||||
void CommodityTypeData::setColor(const QString& color) {
|
||||
m_color = color;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ class CommodityTypeData :public ComboItem
|
||||
|
||||
QX_REGISTER_FRIEND_CLASS(CommodityTypeData)
|
||||
Q_PROPERTY(QString name READ name WRITE setName)
|
||||
Q_PROPERTY(QString color READ color WRITE setColor)
|
||||
|
||||
public:
|
||||
explicit CommodityTypeData(QObject *parent = nullptr);
|
||||
@@ -22,9 +23,13 @@ public:
|
||||
QString name() const;
|
||||
void setName(const QString &name);
|
||||
|
||||
QString color() const;
|
||||
void setColor(const QString& color);
|
||||
|
||||
private:
|
||||
long m_id{0};
|
||||
QString m_name;
|
||||
QString m_color;
|
||||
|
||||
// ComboItem interface
|
||||
public:
|
||||
|
||||
@@ -18,7 +18,6 @@ find_package(Qt6 COMPONENTS
|
||||
REQUIRED)
|
||||
|
||||
add_library(core SHARED
|
||||
main.cpp
|
||||
autoform.h
|
||||
autotablemodel.h
|
||||
columndialog.cpp
|
||||
|
||||
@@ -95,6 +95,10 @@ void Role::clearPermissions()
|
||||
m_listPermissions.clear();
|
||||
}
|
||||
|
||||
QStringList Role::eagerLoad() {
|
||||
return {"object_id_fk", "value_fk"};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ public:
|
||||
void addPermission(QSharedPointer<Permission> perm);
|
||||
void clearPermissions();
|
||||
|
||||
Q_INVOKABLE QStringList eagerLoad();
|
||||
|
||||
private:
|
||||
long m_id;
|
||||
QString m_name;
|
||||
|
||||
@@ -112,6 +112,10 @@ void User::setIsAdmin(bool isAdmin)
|
||||
m_isAdmin = isAdmin;
|
||||
}
|
||||
|
||||
QStringList User::eagerLoad() {
|
||||
return {"object_id_fk"};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ public:
|
||||
|
||||
void clearRoles();
|
||||
|
||||
Q_INVOKABLE QStringList eagerLoad();
|
||||
|
||||
private:
|
||||
long m_id;
|
||||
|
||||
+10
-2
@@ -15,7 +15,11 @@
|
||||
|
||||
#ifndef PLUGIN_ROOT
|
||||
#ifdef _WIN32
|
||||
#define PLUGIN_ROOT "/../../plugins"
|
||||
#ifdef QT_NO_DEBUG
|
||||
#define PLUGIN_ROOT "/plugins"
|
||||
#else
|
||||
#define PLUGIN_ROOT "/../../plugins"
|
||||
#endif
|
||||
#else
|
||||
#define PLUGIN_ROOT "/../plugins"
|
||||
#endif
|
||||
@@ -23,7 +27,11 @@
|
||||
|
||||
#ifndef REPORT_ROOT
|
||||
#ifdef _WIN32
|
||||
#define REPORT_ROOT "/../../reports"
|
||||
#ifdef QT_NO_DEBUG
|
||||
#define REPORT_ROOT "/reports"
|
||||
#else
|
||||
#define REPORT_ROOT "/../../reports"
|
||||
#endif
|
||||
#else
|
||||
#define REPORT_ROOT "/../reports"
|
||||
#endif
|
||||
|
||||
@@ -1,21 +1,5 @@
|
||||
#include "exprevaluator.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
ExprEvaluator::ExprEvaluator()
|
||||
{
|
||||
m_operations["=="] = [](QVariant left, QVariant right) { return left == right; };
|
||||
m_operations["!="] = [](QVariant left, QVariant right) { return left != right; };
|
||||
m_operations["<"] = [](QVariant left, QVariant right) { return left < right; };
|
||||
m_operations["<="] = [](QVariant left, QVariant right) { return left <= right; };
|
||||
m_operations[">"] = [](QVariant left, QVariant right) { return left > right; };
|
||||
m_operations[">="] = [](QVariant left, QVariant right) { return left >= right; };
|
||||
m_operations["%"] = [](QVariant left, QVariant right) { return left.toString().contains(right.toString()); };
|
||||
|
||||
m_operations["||"] = [](QVariant left, QVariant right) { return left.toBool() || right.toBool(); };
|
||||
m_operations["&&"] = [](QVariant left, QVariant right) { return left.toBool() && right.toBool(); };
|
||||
m_caseSensitive = false;
|
||||
}
|
||||
#else
|
||||
const QMap<QString, std::function<bool(QVariant, QVariant)> > ExprEvaluator::m_operations = {
|
||||
{ "==", [](QVariant left, QVariant right) { return left == right; }},
|
||||
{ "!=", [](QVariant left, QVariant right) { return left != right; }},
|
||||
@@ -35,13 +19,6 @@ const QMap<QString, std::function<bool(QVariant, QVariant)> > ExprEvaluator::m_o
|
||||
{ "&&", [](QVariant left, QVariant right) { return left.toBool() && right.toBool(); }}
|
||||
};
|
||||
|
||||
ExprEvaluator::ExprEvaluator()
|
||||
{
|
||||
m_caseSensitive = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
bool ExprEvaluator::evaluate(QObject *object, const QString &exp)
|
||||
{
|
||||
if (exp.contains("&&") && exp.contains("||"))
|
||||
|
||||
@@ -11,19 +11,15 @@
|
||||
class CORESHARED_EXPORT ExprEvaluator
|
||||
{
|
||||
public:
|
||||
ExprEvaluator();
|
||||
ExprEvaluator() = default;
|
||||
|
||||
bool evaluate(QObject *object, const QString &exp);
|
||||
void setCaseSensitive(bool caseSensitive);
|
||||
|
||||
private:
|
||||
#ifdef _MSC_VER
|
||||
QMap<QString, std::function<bool(QVariant, QVariant)> > m_operations;
|
||||
#else
|
||||
static const QMap<QString, std::function<bool(QVariant, QVariant)> > m_operations;
|
||||
#endif
|
||||
|
||||
bool m_caseSensitive;
|
||||
bool m_caseSensitive{false};
|
||||
|
||||
bool subEval(const QString &oper, const QString &expresion, QObject *object);
|
||||
void parseExpr(const QString &exp, QVariant &value, QString &oper, QVariant &condition, QObject *object);
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ protected:
|
||||
m_translator = new QTranslator();
|
||||
|
||||
if (!m_translator->load(fileName + QLocale::system().name())) {
|
||||
qDebug() << "Cannot load translation";
|
||||
qDebug() << "Cannot load translation " << QLocale::system().name();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
#include "iservice.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
QX_REGISTER_CPP_CORE(IService)
|
||||
|
||||
namespace qx {
|
||||
template<> void register_class(QxClass<IService>&) {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
IService::IService(QObject *parent) : QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -33,4 +33,8 @@ protected:
|
||||
QString m_pluginId;
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
QX_REGISTER_HPP_CORE(IService, QObject, 0)
|
||||
#endif
|
||||
|
||||
#endif // ISERVICE_H
|
||||
|
||||
+9
-2
@@ -9,7 +9,7 @@
|
||||
"default" : "",
|
||||
"CZ" : ""
|
||||
},
|
||||
"schemaVersion" : 1,
|
||||
"schemaVersion" : 2,
|
||||
"sql" : [
|
||||
"CREATE TABLE \"User\" (
|
||||
\"id\" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
@@ -91,7 +91,14 @@ CREATE TABLE \"NumberSeries\" (
|
||||
FOREIGN KEY (\"season\")
|
||||
REFERENCES \"Season\" (\"id\")
|
||||
DEFERRABLE INITIALLY DEFERRED);
|
||||
" ],
|
||||
",
|
||||
|
||||
"DROP INDEX \"Role_listPermissions_index_i\";
|
||||
ALTER TABLE \"Role_listPermissions\" DROP \"index\";
|
||||
DROP INDEX \"User_listRoles_index_i\";
|
||||
ALTER TABLE \"User_listRoles\" DROP \"index\";
|
||||
"
|
||||
],
|
||||
"dependencies" : []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "permissionservice.h"
|
||||
#include "service.h"
|
||||
#include <QCryptographicHash>
|
||||
|
||||
QList<QSharedPointer<Permission> > PermissionService::forPlugin(const QString &pluginId)
|
||||
@@ -54,6 +55,10 @@ QSharedPointer<User> PermissionService::loadUser(const QString &login)
|
||||
auto admin = srvUser.all("login = '" + login + "'");
|
||||
|
||||
if (admin.count() == 1) {
|
||||
Service<Role> srvRole;
|
||||
for (auto& role : admin[0]->listRoles()) {
|
||||
srvRole.load(role);
|
||||
}
|
||||
return admin[0];
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
|
||||
#include <QDialog>
|
||||
#include "report.h"
|
||||
#include "../core_global.h"
|
||||
|
||||
namespace Ui {
|
||||
class ReportDialog;
|
||||
}
|
||||
|
||||
class ReportDialog : public QDialog
|
||||
class CORESHARED_EXPORT ReportDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
+3
-3
@@ -58,7 +58,7 @@ public:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void save(QSharedPointer<T> entity, qx::QxSession* pSession = nullptr) {
|
||||
virtual void save(QSharedPointer<T> entity, qx::QxSession* pSession = nullptr) {
|
||||
if (!checkPermission(PERM_ADD)) {
|
||||
return;
|
||||
}
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
emit dataChanged();
|
||||
}
|
||||
|
||||
void update(QSharedPointer<T> entity, qx::QxSession* pSession = nullptr) {
|
||||
virtual void update(QSharedPointer<T> entity, qx::QxSession* pSession = nullptr) {
|
||||
if (!checkPermission(PERM_EDIT)) {
|
||||
return;
|
||||
}
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
pSession = ptrSession.data();
|
||||
}
|
||||
|
||||
*pSession += qx::dao::delete_by_id(entity);
|
||||
*pSession += qx::dao::delete_by_id(entity, pSession->database());
|
||||
|
||||
if (!pSession->isValid()) {
|
||||
qDebug() << pSession->firstError().text();
|
||||
|
||||
Binary file not shown.
@@ -129,83 +129,83 @@
|
||||
<translation>Hlavní nastavení</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="104"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="107"/>
|
||||
<source>Web</source>
|
||||
<translation>Web</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="111"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="114"/>
|
||||
<source>E-mail</source>
|
||||
<translation>E-mail</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="118"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="121"/>
|
||||
<source>Phone</source>
|
||||
<translation>Telefon</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="166"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="169"/>
|
||||
<source>Company info</source>
|
||||
<translation>Informace o společnosti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="175"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="178"/>
|
||||
<source>IC</source>
|
||||
<translation>IČO</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="185"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="188"/>
|
||||
<source>VAT number</source>
|
||||
<translation>DIČ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="195"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="198"/>
|
||||
<source>VAT payer</source>
|
||||
<translation>Plátce DPH</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="208"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="211"/>
|
||||
<source>VAT rates</source>
|
||||
<translation>Sazby DPH</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="214"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="217"/>
|
||||
<source>High</source>
|
||||
<translation>Vysoká</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="228"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="231"/>
|
||||
<source>First lower</source>
|
||||
<translation>První snížená</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="242"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="245"/>
|
||||
<source>Second lower</source>
|
||||
<translation>Druhá snížená</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="259"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="262"/>
|
||||
<source>Prices with VAT</source>
|
||||
<translation>Ceny s DPH</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="270"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="331"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="273"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="334"/>
|
||||
<source>Number series</source>
|
||||
<translation>Číselné řady</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="299"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="302"/>
|
||||
<source>Edit name</source>
|
||||
<translation>Upravit název</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="310"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="313"/>
|
||||
<source>Season</source>
|
||||
<translation>Sezóna</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="317"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="320"/>
|
||||
<source>Create new</source>
|
||||
<translation>Vytvořit novou</translation>
|
||||
</message>
|
||||
@@ -215,67 +215,75 @@
|
||||
<translation>Kontaktní údaje</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="45"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="48"/>
|
||||
<source>Firm Name</source>
|
||||
<translation>Název společnosti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="55"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="58"/>
|
||||
<source>Street</source>
|
||||
<translation>Ulice</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="65"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="68"/>
|
||||
<source>House Number</source>
|
||||
<translation>Číslo popisné</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="75"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="78"/>
|
||||
<source>City</source>
|
||||
<translation>Město</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="85"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="88"/>
|
||||
<source>ZIP code</source>
|
||||
<translation>PSČ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="128"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="131"/>
|
||||
<source>Logo</source>
|
||||
<translation>Logo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.ui" line="156"/>
|
||||
<location filename="../settings/globalsettingsform.ui" line="159"/>
|
||||
<source>Select file</source>
|
||||
<translation>Vyber soubor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.cpp" line="82"/>
|
||||
<location filename="../settings/globalsettingsform.cpp" line="95"/>
|
||||
<source>Switch season</source>
|
||||
<translation>Změna sezóny</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.cpp" line="82"/>
|
||||
<source>Realy switch active season?</source>
|
||||
<translation>Opravdu si přejete změnit aktivní sezónu?</translation>
|
||||
<translation type="vanished">Opravdu si přejete změnit aktivní sezónu?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.cpp" line="150"/>
|
||||
<location filename="../settings/globalsettingsform.cpp" line="155"/>
|
||||
<source>New season</source>
|
||||
<translation>Nová sezóna</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.cpp" line="150"/>
|
||||
<source>Realy create new season and switch to it?</source>
|
||||
<translation type="vanished">Opravdu si přejete vytvořit novou sezónu a přepnout na ni?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.cpp" line="95"/>
|
||||
<source>Really switch active season?</source>
|
||||
<translation>Opravdu si přejete změnit aktivní sezónu?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.cpp" line="155"/>
|
||||
<source>Really create new season and switch to it?</source>
|
||||
<translation>Opravdu si přejete vytvořit novou sezónu a přepnout na ni?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.cpp" line="173"/>
|
||||
<location filename="../settings/globalsettingsform.cpp" line="178"/>
|
||||
<source>Select logo</source>
|
||||
<translation>Vybrat logo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/globalsettingsform.cpp" line="173"/>
|
||||
<location filename="../settings/globalsettingsform.cpp" line="178"/>
|
||||
<source>Images (*.png *.xpm *.jpg)</source>
|
||||
<translation>Obrázky (*.png *.xpm *.jpg)</translation>
|
||||
</message>
|
||||
@@ -359,17 +367,17 @@
|
||||
<translation>Import dat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../importdialog.ui" line="20"/>
|
||||
<location filename="../importdialog.ui" line="23"/>
|
||||
<source>File</source>
|
||||
<translation>Soubor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../importdialog.ui" line="27"/>
|
||||
<location filename="../importdialog.ui" line="30"/>
|
||||
<source>Separator</source>
|
||||
<translation>Oddělovač</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../importdialog.ui" line="65"/>
|
||||
<location filename="../importdialog.ui" line="68"/>
|
||||
<source>...</source>
|
||||
<translation>...</translation>
|
||||
</message>
|
||||
@@ -400,12 +408,12 @@
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../iplugin.h" line="58"/>
|
||||
<location filename="../iplugin.h" line="52"/>
|
||||
<source>Permission denied</source>
|
||||
<translation>Nedostatečná oprávnění</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../iplugin.h" line="58"/>
|
||||
<location filename="../iplugin.h" line="52"/>
|
||||
<source>You don't have permission to open this plugin.</source>
|
||||
<translation>Nemáte oprávnění otevřít tento modul.</translation>
|
||||
</message>
|
||||
@@ -590,39 +598,39 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autoform.h" line="46"/>
|
||||
<location filename="../gridform.h" line="250"/>
|
||||
<location filename="../gridform.h" line="262"/>
|
||||
<location filename="../gridform.h" line="274"/>
|
||||
<location filename="../gridform.h" line="252"/>
|
||||
<location filename="../gridform.h" line="264"/>
|
||||
<location filename="../gridform.h" line="276"/>
|
||||
<source>Permission denied</source>
|
||||
<translation>Nedostatečná oprávnění</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gridform.h" line="250"/>
|
||||
<location filename="../gridform.h" line="252"/>
|
||||
<source>You don't have permission to add new record.</source>
|
||||
<translation>Nemáte oprávnění přidat nový záznam.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gridform.h" line="262"/>
|
||||
<location filename="../gridform.h" line="264"/>
|
||||
<source>You don't have permission to edit record.</source>
|
||||
<translation>Nemáte oprávnění upravit záznam.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gridform.h" line="274"/>
|
||||
<location filename="../gridform.h" line="276"/>
|
||||
<source>You don't have permission to delete record.</source>
|
||||
<translation>Nemáte oprávnění smazat záznam.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gridform.h" line="231"/>
|
||||
<location filename="../gridform.h" line="233"/>
|
||||
<source>Delete record</source>
|
||||
<translation>Smazat záznam</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gridform.h" line="231"/>
|
||||
<location filename="../gridform.h" line="233"/>
|
||||
<source>Realy delete this record?</source>
|
||||
<translation>Opravdu si přejete smazat tento záznam?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gridform.h" line="327"/>
|
||||
<location filename="../gridform.h" line="329"/>
|
||||
<source>Import</source>
|
||||
<translation>Import</translation>
|
||||
</message>
|
||||
@@ -635,37 +643,37 @@
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../users/userform.ui" line="20"/>
|
||||
<location filename="../users/userform.ui" line="23"/>
|
||||
<source>Login</source>
|
||||
<translation>Uživatelské jméno</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../users/userform.ui" line="30"/>
|
||||
<location filename="../users/userform.ui" line="33"/>
|
||||
<source>Password</source>
|
||||
<translation>Heslo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../users/userform.ui" line="44"/>
|
||||
<location filename="../users/userform.ui" line="47"/>
|
||||
<source>Name</source>
|
||||
<translation>Jméno</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../users/userform.ui" line="57"/>
|
||||
<location filename="../users/userform.ui" line="60"/>
|
||||
<source>Is Admin</source>
|
||||
<translation>Admin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../users/userform.ui" line="67"/>
|
||||
<location filename="../users/userform.ui" line="70"/>
|
||||
<source>Active</source>
|
||||
<translation>Aktivní</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../users/userform.ui" line="77"/>
|
||||
<location filename="../users/userform.ui" line="80"/>
|
||||
<source>Roles</source>
|
||||
<translation>Role</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../users/userform.ui" line="91"/>
|
||||
<location filename="../users/userform.ui" line="94"/>
|
||||
<source>Retype Password</source>
|
||||
<translation>Zopakujte heslo</translation>
|
||||
</message>
|
||||
|
||||
@@ -14,6 +14,7 @@ find_package(Qt6 COMPONENTS
|
||||
Core
|
||||
Gui
|
||||
Widgets
|
||||
Qml
|
||||
REQUIRED)
|
||||
|
||||
add_library(countryregister SHARED
|
||||
@@ -33,6 +34,7 @@ target_link_libraries(countryregister
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
Qt::Qml
|
||||
qdecimal
|
||||
decnumber
|
||||
QxOrm
|
||||
|
||||
@@ -14,6 +14,7 @@ find_package(Qt6 COMPONENTS
|
||||
Core
|
||||
Gui
|
||||
Widgets
|
||||
Qml
|
||||
REQUIRED)
|
||||
|
||||
add_library(postregister SHARED
|
||||
@@ -33,6 +34,7 @@ target_link_libraries(postregister
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
Qt::Qml
|
||||
qdecimal
|
||||
decnumber
|
||||
QxOrm
|
||||
|
||||
@@ -14,6 +14,7 @@ find_package(Qt6 COMPONENTS
|
||||
Core
|
||||
Gui
|
||||
Widgets
|
||||
Qml
|
||||
REQUIRED)
|
||||
|
||||
add_library(services SHARED
|
||||
@@ -39,6 +40,7 @@ target_link_libraries(services
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
Qt::Qml
|
||||
qdecimal
|
||||
decnumber
|
||||
QxOrm
|
||||
|
||||
@@ -14,6 +14,7 @@ find_package(Qt6 COMPONENTS
|
||||
Core
|
||||
Gui
|
||||
Widgets
|
||||
Qml
|
||||
REQUIRED)
|
||||
|
||||
add_library(shop SHARED
|
||||
@@ -85,6 +86,7 @@ target_link_libraries(shop
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
Qt::Qml
|
||||
qdecimal
|
||||
decnumber
|
||||
QxOrm
|
||||
|
||||
@@ -5,7 +5,7 @@ QX_REGISTER_CPP_SHOP(FavoritItem)
|
||||
|
||||
QX_REGISTER_ALL_QT_PROPERTIES(FavoritItem, "id")
|
||||
|
||||
long FavoritItem::id()
|
||||
long FavoritItem::id() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ void FavoritItem::setVatType(const Enums::VatType &vatType)
|
||||
m_vatType = vatType;
|
||||
}
|
||||
|
||||
QString FavoritItem::pluginId()
|
||||
QString FavoritItem::pluginId() const
|
||||
{
|
||||
return m_pluginId;
|
||||
}
|
||||
|
||||
@@ -30,13 +30,13 @@ public:
|
||||
|
||||
// IShopItem interface
|
||||
public:
|
||||
long id() override;
|
||||
long id() const override;
|
||||
void setId(long id);
|
||||
|
||||
QString name() override;
|
||||
void setName(const QString &name);
|
||||
|
||||
virtual QString shortName() override;
|
||||
QString shortName() override;
|
||||
void setShortName(const QString &shortName);
|
||||
|
||||
QDecDouble unitPrice() override;
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
Enums::VatType vatType() override;
|
||||
void setVatType(const Enums::VatType &vatType);
|
||||
|
||||
QString pluginId() override;
|
||||
QString pluginId() const override;
|
||||
void setPluginId(const QString &pluginId);
|
||||
|
||||
QString favButtonName() const;
|
||||
|
||||
+17
-1
@@ -131,7 +131,13 @@ void Voucher::addItem(QSharedPointer<VoucherItem> item)
|
||||
|
||||
void Voucher::removeItem(QSharedPointer<VoucherItem> item)
|
||||
{
|
||||
m_items.removeOne(item);
|
||||
if (item->id() != 0) {
|
||||
m_items.removeIf([&item](const auto& it){
|
||||
return item->id() == it->id();
|
||||
});
|
||||
} else {
|
||||
m_items.removeOne(item);
|
||||
}
|
||||
}
|
||||
|
||||
void Voucher::clearItems()
|
||||
@@ -415,3 +421,13 @@ QDecDouble VoucherSum::totalPrice() const
|
||||
int VoucherSum::count() const {
|
||||
return m_count;
|
||||
}
|
||||
|
||||
VoucherSum::VoucherSum(int count, int totalPrice) : m_count(count), m_totalPrice(totalPrice) {}
|
||||
|
||||
void VoucherSum::addPrice(QDecDouble price) {
|
||||
m_totalPrice += FROM_DEC(price);
|
||||
}
|
||||
|
||||
void VoucherSum::addCount(int count) {
|
||||
m_count += count;
|
||||
}
|
||||
|
||||
@@ -210,9 +210,13 @@ class VoucherSum
|
||||
QX_REGISTER_FRIEND_CLASS(VoucherSum)
|
||||
public:
|
||||
VoucherSum() = default;
|
||||
VoucherSum(int count, int totalPrice);
|
||||
|
||||
QDecDouble totalPrice() const;
|
||||
int count() const;
|
||||
|
||||
void addPrice(QDecDouble price);
|
||||
void addCount(int count);
|
||||
|
||||
private:
|
||||
int m_count{0};
|
||||
|
||||
@@ -6,7 +6,7 @@ DirectSaleItem::DirectSaleItem(QObject *parent) : IShopItem(parent)
|
||||
m_vat = Enums::NONE;
|
||||
}
|
||||
|
||||
long DirectSaleItem::id()
|
||||
long DirectSaleItem::id() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -26,7 +26,7 @@ QDecDouble DirectSaleItem::unitPrice()
|
||||
return m_unitPrice;
|
||||
}
|
||||
|
||||
QString DirectSaleItem::pluginId()
|
||||
QString DirectSaleItem::pluginId() const
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ public slots:
|
||||
|
||||
// IShopItem interface
|
||||
public:
|
||||
long id() override;
|
||||
long id() const override;
|
||||
QString name() override;
|
||||
QString shortName() override;
|
||||
QDecDouble unitPrice() override;
|
||||
QString pluginId() override;
|
||||
QString pluginId() const override;
|
||||
Enums::VatType vatType() override;
|
||||
|
||||
int count() const;
|
||||
|
||||
+5
-5
@@ -8,11 +8,11 @@ class FavButtonStyle : public QProxyStyle
|
||||
{
|
||||
public:
|
||||
FavButtonStyle();
|
||||
virtual ~FavButtonStyle();
|
||||
~FavButtonStyle() override = default;
|
||||
|
||||
// QStyle interface
|
||||
public:
|
||||
void drawItemText(QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole) const;
|
||||
void drawItemText(QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole) const override;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(FavButtonStyle)
|
||||
@@ -23,15 +23,15 @@ class FavButton : public QToolButton
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FavButton(QWidget *parent = 0);
|
||||
explicit FavButton(QWidget *parent = nullptr);
|
||||
|
||||
signals:
|
||||
void itemDropped();
|
||||
|
||||
// QWidget interface
|
||||
protected:
|
||||
virtual void dragEnterEvent(QDragEnterEvent *event) override;
|
||||
virtual void dropEvent(QDropEvent *event) override;
|
||||
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||
void dropEvent(QDropEvent *event) override;
|
||||
|
||||
private:
|
||||
FavButtonStyle m_style;
|
||||
|
||||
@@ -12,7 +12,7 @@ class SHOPSHARED_EXPORT ISellableService
|
||||
public:
|
||||
ISellableService();
|
||||
|
||||
virtual QList<IShopItemPtr> shopItems() = 0;
|
||||
virtual QList<IShopItemPtr> shopItems(const QString& category = "") = 0;
|
||||
virtual IShopItemPtr shopItem(int itemId) = 0;
|
||||
virtual void addedToVoucher(int itemId, int countAdded) = 0;
|
||||
virtual ISeller *seller() = 0;
|
||||
|
||||
+10
-2
@@ -17,20 +17,28 @@ class SHOPSHARED_EXPORT IShopItem : public QObject
|
||||
Q_PROPERTY(QString shortName READ shortName)
|
||||
Q_PROPERTY(QDecDouble unitPrice READ unitPrice)
|
||||
Q_PROPERTY(Enums::VatType vatType READ vatType)
|
||||
Q_PROPERTY(bool favorite READ favorite)
|
||||
|
||||
public:
|
||||
explicit IShopItem(QObject* parent = nullptr);
|
||||
~IShopItem() override = default;
|
||||
|
||||
virtual long id() { return {}; }
|
||||
virtual long id() const { return {}; }
|
||||
virtual QString name() { return {}; }
|
||||
virtual QString code() { return {}; }
|
||||
virtual QString shortName() { return {}; }
|
||||
virtual QDecDouble unitPrice() { return {}; }
|
||||
virtual Enums::VatType vatType() { return {}; }
|
||||
virtual QString pluginId() { return {}; }
|
||||
virtual QString pluginId() const { return {}; }
|
||||
virtual QString color() { return {}; }
|
||||
virtual QString category() { return {}; }
|
||||
virtual bool favorite() { return false; }
|
||||
};
|
||||
|
||||
inline bool operator==(const IShopItem& lhs, const IShopItem& rhs) {
|
||||
return lhs.id() == rhs.id() && lhs.pluginId() == rhs.pluginId();
|
||||
}
|
||||
|
||||
using IShopItemPtr = QSharedPointer<IShopItem>;
|
||||
|
||||
QX_REGISTER_HPP_SHOP(IShopItem, QObject, 0)
|
||||
|
||||
@@ -47,12 +47,20 @@ PaydVouchersDialog::PaydVouchersDialog(QWidget *parent) :
|
||||
ui->tableItems->setColumnHidden(0, true);
|
||||
ui->tableItems->verticalScrollBar()->setStyleSheet("QScrollBar:vertical { width: 30px; }");
|
||||
|
||||
#ifndef EET
|
||||
ui->btnEetNotSen->setVisible(false);
|
||||
ui->btnSendEet->setVisible(false);
|
||||
ui->label_2->setVisible(false);
|
||||
ui->lblEetStatus->setVisible(false);
|
||||
#endif
|
||||
|
||||
ShopService srv;
|
||||
m_voucherModel->setData(srv.paiedVouchers());
|
||||
ui->tableVouchers->sortByColumn(0,Qt::AscendingOrder);
|
||||
ui->tableVouchers->verticalScrollBar()->setStyleSheet("QScrollBar:vertical { width: 30px; }");
|
||||
|
||||
connect(ui->tableVouchers->selectionModel(), &QItemSelectionModel::currentRowChanged, [this, &srv](const QModelIndex ¤t, const QModelIndex &) {
|
||||
connect(ui->tableVouchers->selectionModel(), &QItemSelectionModel::currentRowChanged, [this](const QModelIndex ¤t, const QModelIndex &) {
|
||||
ShopService srv;
|
||||
QSharedPointer<Voucher> voucher = m_voucherModel->itemFromIndex(current);
|
||||
if (voucher->items().isEmpty()) {
|
||||
srv.load(voucher);
|
||||
|
||||
@@ -59,11 +59,11 @@ void ReceiptGenerator::print()
|
||||
DWORD dwBytes;
|
||||
BOOL bStatus = FALSE;
|
||||
|
||||
if (OpenPrinter((LPWSTR)printer.toStdWString().c_str(), &hPrinter, NULL))
|
||||
if (OpenPrinter((LPWSTR)printer.toStdWString().c_str(), &hPrinter, nullptr))
|
||||
{
|
||||
docInfo.pDocName = L"Uctenka";
|
||||
docInfo.pOutputFile = NULL;
|
||||
docInfo.pDatatype = L"RAW";
|
||||
docInfo.pDocName = (LPWSTR)(L"Uctenka");
|
||||
docInfo.pOutputFile = nullptr;
|
||||
docInfo.pDatatype = (LPWSTR)(L"RAW");
|
||||
|
||||
dwJob = StartDocPrinter(hPrinter, 1, (LPBYTE)&docInfo);
|
||||
if (dwJob > 0)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#include "shopsettingsform.h"
|
||||
#include "ui_shopsettingsform.h"
|
||||
|
||||
#include <settingsservice.h>
|
||||
#include <combodata.h>
|
||||
#include <QFileDialog>
|
||||
#include <QDragEnterEvent>
|
||||
#include <QDebug>
|
||||
@@ -18,6 +16,7 @@ ShopSettingsForm::ShopSettingsForm(QWidget *parent) :
|
||||
registerBinding(ui->lettersPerLine);
|
||||
registerBinding(ui->byMessage);
|
||||
|
||||
#ifdef EET
|
||||
registerBinding(ui->eetActive);
|
||||
registerBinding(ui->eetShopId);
|
||||
registerBinding(ui->eetRegisterId);
|
||||
@@ -28,6 +27,9 @@ ShopSettingsForm::ShopSettingsForm(QWidget *parent) :
|
||||
registerBinding(ui->eetKeyPassword);
|
||||
registerBinding(ui->eetTest);
|
||||
registerBinding(ui->eetPlayground);
|
||||
#else
|
||||
ui->tabWidget->removeTab(2);
|
||||
#endif
|
||||
|
||||
registerBinding(ui->favBtnCols);
|
||||
registerBinding(ui->favBtnRows);
|
||||
@@ -146,7 +148,7 @@ bool ShopSettingsForm::saveRecord()
|
||||
}
|
||||
|
||||
foreach (QString btnName, m_btnMap.keys()) {
|
||||
if (m_btnMap[btnName] != NULL)
|
||||
if (m_btnMap[btnName] != nullptr)
|
||||
{
|
||||
srvFav.save(m_btnMap[btnName]);
|
||||
}
|
||||
@@ -192,10 +194,6 @@ FavButtonStyle::FavButtonStyle()
|
||||
{
|
||||
}
|
||||
|
||||
FavButtonStyle::~FavButtonStyle()
|
||||
{
|
||||
}
|
||||
|
||||
void FavButtonStyle::drawItemText(QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole) const
|
||||
{
|
||||
flags |= Qt::TextWordWrap;
|
||||
|
||||
+128
-10
@@ -145,6 +145,7 @@ void ShopForm::loadLast()
|
||||
m_commodityModel->setData(srv.allSellableItems());
|
||||
ui->commodityTable->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch);
|
||||
ui->commodityTable->setColumnHidden(4, true);
|
||||
ui->commodityTable->setColumnHidden(5, true);
|
||||
ui->commodityTable->setColumnHidden(2, true);
|
||||
ui->commodityTable->setColumnWidth(3, 90);
|
||||
|
||||
@@ -167,22 +168,20 @@ void ShopForm::loadButtons(const ShopSettingsPtr& settings)
|
||||
Service<FavoritItem> srvFav;
|
||||
QMap<QString, FavoritItemPtr> btnMap;
|
||||
|
||||
foreach (QWidget *child, ui->favorites->findChildren<QWidget*>()) {
|
||||
if (child->objectName() != "directSale")
|
||||
{
|
||||
delete child;
|
||||
}
|
||||
}
|
||||
clearFavButtons();
|
||||
|
||||
foreach (FavoritItemPtr item, srvFav.all()) {
|
||||
btnMap[item->favButtonName()] = item;
|
||||
}
|
||||
|
||||
ShopService srv;
|
||||
auto allItems = srv.allSellableItems();
|
||||
|
||||
for (int i = 0; i < settings->favBtnRows(); i++)
|
||||
{
|
||||
for (int j = 0; j < settings->favBtnCols(); j++)
|
||||
{
|
||||
FavButton *btn = new FavButton(ui->favorites);
|
||||
auto *btn = new QToolButton(ui->favorites);
|
||||
QString btnName = QString::number(i) + "_" + QString::number(j);
|
||||
btn->setObjectName(btnName);
|
||||
|
||||
@@ -197,6 +196,16 @@ void ShopForm::loadButtons(const ShopSettingsPtr& settings)
|
||||
if (btnMap[btnName] != nullptr)
|
||||
{
|
||||
btn->setText(btnMap[btnName]->shortName());
|
||||
|
||||
auto shItem = std::find_if(allItems.begin(), allItems.end(),[btnMap, btn](auto it) -> bool {
|
||||
return btnMap[btn->objectName()]->refId() == it->id() && btnMap[btn->objectName()]->pluginId() == it->pluginId();
|
||||
});
|
||||
|
||||
if (shItem != allItems.end()) {
|
||||
btn->setStyleSheet("background: " + shItem->data()->color() + ";");
|
||||
btn->update();
|
||||
}
|
||||
|
||||
connect(btn, &FavButton::clicked, [this, btnMap, btn](bool){
|
||||
FavoritItemPtr item = btnMap[btn->objectName()];
|
||||
|
||||
@@ -249,6 +258,7 @@ void ShopForm::setupForm()
|
||||
loadLast();
|
||||
fillReceiptCombo();
|
||||
loadButtons(settings);
|
||||
loadCatButtons();
|
||||
}
|
||||
|
||||
void ShopForm::on_directSale_clicked()
|
||||
@@ -505,7 +515,6 @@ void ShopForm::recalculate()
|
||||
{
|
||||
ShopService srv;
|
||||
srv.calculate(m_voucher);
|
||||
this->m_itemsModel->setData(m_voucher->items());
|
||||
|
||||
setTotalText();
|
||||
ui->temporarySaveButton->setEnabled(!m_voucher->items().isEmpty());
|
||||
@@ -514,12 +523,15 @@ void ShopForm::recalculate()
|
||||
|
||||
if (m_voucher->status() == Voucher::NEW && m_voucher->id() == 0)
|
||||
{
|
||||
srv.saveVoucher(m_voucher);
|
||||
srv.save(m_voucher);
|
||||
}
|
||||
else
|
||||
{
|
||||
srv.update(m_voucher);
|
||||
}
|
||||
|
||||
this->m_itemsModel->setData(m_voucher->items());
|
||||
connectItemSignals();
|
||||
}
|
||||
|
||||
void ShopForm::on_receiptCombo_currentIndexChanged(int)
|
||||
@@ -644,7 +656,9 @@ void ShopForm::on_actionDelete_items_triggered()
|
||||
QList<VoucherItemPtr> forDelete;
|
||||
|
||||
for (const auto& row : ui->actualReceipt->selectionModel()->selectedIndexes()) {
|
||||
forDelete << m_itemsModel->itemFromIndex(row);
|
||||
if (!forDelete.contains(m_itemsModel->itemFromIndex(row))) {
|
||||
forDelete << m_itemsModel->itemFromIndex(row);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& item : forDelete) {
|
||||
@@ -664,3 +678,107 @@ void ShopForm::on_actualReceipt_customContextMenuRequested(const QPoint &pos)
|
||||
QPoint globalPos = ui->actualReceipt->mapToGlobal(pos);
|
||||
m_itemCtxMenu->exec(globalPos);
|
||||
}
|
||||
|
||||
void ShopForm::clearFavButtons() {
|
||||
foreach (QWidget *child, ui->favorites->findChildren<QWidget*>()) {
|
||||
if (child->objectName() != "directSale")
|
||||
{
|
||||
delete child;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShopForm::loadFavCatButtons(const QString& category) {
|
||||
SettingsService srvSettings("SHOP");
|
||||
ShopSettingsPtr settings = srvSettings.loadSettings<ShopSettings>();
|
||||
|
||||
if (category.isEmpty()) {
|
||||
loadButtons(settings);
|
||||
return;
|
||||
}
|
||||
|
||||
clearFavButtons();
|
||||
|
||||
ShopService srv;
|
||||
auto all = srv.allSellableItems(category);
|
||||
|
||||
if (all.count() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto square = std::sqrt(all.count());
|
||||
int cols = static_cast<int>(square);
|
||||
int rows = cols;
|
||||
|
||||
if (square - cols != 0) {
|
||||
if (cols > 1) {
|
||||
++rows;
|
||||
} else {
|
||||
++cols;
|
||||
}
|
||||
}
|
||||
|
||||
if (cols * rows < all.count()) {
|
||||
++cols;
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
for (int i = 0; i < rows; i++) {
|
||||
for (int j = 0; j < cols; j++) {
|
||||
if (index >= all.count()) {
|
||||
break;
|
||||
}
|
||||
|
||||
auto item = all[index];
|
||||
++index;
|
||||
auto *btn = new QToolButton(ui->favorites);
|
||||
|
||||
if (settings->favBtnSize() > 0)
|
||||
{
|
||||
btn->setMinimumHeight(settings->favBtnSize());
|
||||
btn->setMinimumWidth(settings->favBtnSize());
|
||||
}
|
||||
|
||||
btn->setText(item->shortName());
|
||||
btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
((QGridLayout*)ui->favorites->layout())->addWidget(btn, i + 1, j);
|
||||
|
||||
btn->setStyleSheet("background: " + item->color() + ";");
|
||||
btn->update();
|
||||
|
||||
connect(btn, &QToolButton::clicked, [this, item](bool){
|
||||
addItem(item, 1);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShopForm::loadCatButtons() {
|
||||
ShopService srv;
|
||||
auto allCat = srv.allCategories();
|
||||
|
||||
for (const auto btnFav : ui->widgetCategories->findChildren<QWidget*>()) {
|
||||
if (btnFav->objectName() != "btnFav") {
|
||||
delete btnFav;
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& cat : allCat.keys()) {
|
||||
auto catButton = new QToolButton(ui->widgetCategories);
|
||||
catButton->setText(cat);
|
||||
catButton->setMinimumHeight(45);
|
||||
catButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
catButton->setStyleSheet("background: " + allCat[cat] + ";");
|
||||
catButton->update();
|
||||
|
||||
connect(catButton, &QPushButton::clicked, [this, cat](bool){
|
||||
loadFavCatButtons(cat);
|
||||
});
|
||||
|
||||
ui->widgetCategories->layout()->addWidget(catButton);
|
||||
}
|
||||
}
|
||||
|
||||
void ShopForm::on_btnFav_clicked() {
|
||||
loadFavCatButtons("");
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ private slots:
|
||||
|
||||
void on_payButton_clicked();
|
||||
|
||||
void on_btnFav_clicked();
|
||||
|
||||
void on_showPaidButton_clicked();
|
||||
|
||||
void on_btnAddItem_clicked();
|
||||
@@ -67,6 +69,9 @@ private:
|
||||
|
||||
void loadLast();
|
||||
void loadButtons(const ShopSettingsPtr& settings);
|
||||
void loadFavCatButtons(const QString& category);
|
||||
void loadCatButtons();
|
||||
void clearFavButtons();
|
||||
void fillReceiptCombo();
|
||||
void createVoucher();
|
||||
void doTempSave(bool comboChanged);
|
||||
|
||||
+67
-43
@@ -35,6 +35,73 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetButtons" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QToolButton" name="directSale">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Direct Sell</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="shoprc.qrc">
|
||||
<normaloff>:/icons/shop.svg</normaloff>:/icons/shop.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+D</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetCategories" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnFav">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Favorities</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="favorites" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetComodity" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
@@ -110,49 +177,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetButtons" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QWidget" name="favorites" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QToolButton" name="directSale">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Direct Sell</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="shoprc.qrc">
|
||||
<normaloff>:/icons/shop.svg</normaloff>:/icons/shop.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+D</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
|
||||
+2
-2
@@ -25,13 +25,13 @@ public slots:
|
||||
|
||||
// IShopItem interface
|
||||
public:
|
||||
long id() override { return 0; }
|
||||
long id() const override { return 0; }
|
||||
QString code() override { return ""; }
|
||||
QString name() override { return ""; }
|
||||
QString shortName() override { return ""; }
|
||||
QDecDouble unitPrice() override { return {}; }
|
||||
Enums::VatType vatType() override { return Enums::NONE; }
|
||||
QString pluginId() override { return ""; }
|
||||
QString pluginId() const override { return ""; }
|
||||
};
|
||||
|
||||
typedef QSharedPointer<ShopItem> ShopItemPtr;
|
||||
|
||||
+13
-1
@@ -7,6 +7,11 @@ ShopOverview::ShopOverview(QWidget *parent) :
|
||||
ui(new Ui::ShopOverview)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
#ifndef EET
|
||||
ui->labelUnsendEET->setVisible(false);
|
||||
ui->label_6->setVisible(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
ShopOverview::~ShopOverview()
|
||||
@@ -19,9 +24,16 @@ void ShopOverview::refresh()
|
||||
ShopService srv;
|
||||
|
||||
VoucherSum unpaid = srv.unpaidSummary();
|
||||
VoucherSum unsend = srv.unsendEET();
|
||||
|
||||
ui->labelUnapiedCount->setText(QString::number(unpaid.count()));
|
||||
ui->labelUnpaiedAmount->setText(QString::number(unpaid.totalPrice().toDouble()));
|
||||
|
||||
VoucherSum today = srv.salesSummary(QDate::currentDate());
|
||||
ui->labelSales->setText(QString::number(today.totalPrice().toDouble()));
|
||||
ui->labelNumSales->setText(QString::number(today.count()));
|
||||
|
||||
#ifdef EET
|
||||
VoucherSum unsend = srv.unsendEET();
|
||||
ui->labelUnsendEET->setText(QString::number(unsend.count()));
|
||||
#endif
|
||||
}
|
||||
|
||||
+47
-3
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>908</width>
|
||||
<height>95</height>
|
||||
<height>162</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -83,7 +83,6 @@
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
@@ -102,7 +101,6 @@
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
@@ -114,6 +112,52 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Today sales:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="labelSales">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>90</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Number of sales today:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="labelNumSales">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>90</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
+74
-12
@@ -60,10 +60,6 @@ void ShopService::calculate(VoucherPtr voucher)
|
||||
|
||||
loadSettings();
|
||||
|
||||
if (voucher->items().isEmpty()) {
|
||||
load(voucher);
|
||||
}
|
||||
|
||||
foreach (QSharedPointer<VoucherItem> item, voucher->items()) {
|
||||
|
||||
if (item->refId() == ROUNDING_ITEM)
|
||||
@@ -173,6 +169,10 @@ void ShopService::pay(VoucherPtr voucher)
|
||||
voucher->setPayDateTime(QDateTime::currentDateTime());
|
||||
|
||||
this->update(voucher, &session);
|
||||
|
||||
if (!session.isValid()) {
|
||||
qDebug() << session.firstError().text();
|
||||
}
|
||||
}
|
||||
|
||||
void ShopService::updateRelatedItem(VoucherItem* item, int countAdded)
|
||||
@@ -371,7 +371,7 @@ void ShopService::moveItems(QList<VoucherItemPtr> items, VoucherPtr source, Vouc
|
||||
|
||||
if (target->status() == Voucher::NEW && target->id() == 0)
|
||||
{
|
||||
this->saveVoucher(target, &session);
|
||||
this->save(target, &session);
|
||||
}
|
||||
|
||||
for (const auto& it : items) {
|
||||
@@ -380,6 +380,9 @@ void ShopService::moveItems(QList<VoucherItemPtr> items, VoucherPtr source, Vouc
|
||||
it->setVoucher(target);
|
||||
}
|
||||
|
||||
calculate(target);
|
||||
update(target, &session);
|
||||
|
||||
if (source->items().isEmpty())
|
||||
{
|
||||
erase(source, &session);
|
||||
@@ -415,7 +418,7 @@ QList<VoucherPtr> ShopService::vouchersForEet()
|
||||
.arg(QString::number(Voucher::PAID), QString::number(Voucher::EET_SENT), QString::number(Voucher::EET_NOT_ENTERING)));
|
||||
}
|
||||
|
||||
QList<IShopItemPtr> ShopService::allSellableItems()
|
||||
QList<IShopItemPtr> ShopService::allSellableItems(const QString& category/* = ""*/)
|
||||
{
|
||||
QList<QSharedPointer<IShopItem> > items;
|
||||
foreach (IPlugin *plugin, Context::instance().plugins()) {
|
||||
@@ -424,7 +427,7 @@ QList<IShopItemPtr> ShopService::allSellableItems()
|
||||
|
||||
if (selSrv != nullptr)
|
||||
{
|
||||
items.append(selSrv->shopItems());
|
||||
items.append(selSrv->shopItems(category));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,9 +436,7 @@ QList<IShopItemPtr> ShopService::allSellableItems()
|
||||
|
||||
VoucherSum ShopService::unpaidSummary()
|
||||
{
|
||||
VoucherSum sum; //= db->query_value<VoucherSum>("status = " + query::_ref((int)Voucher::NOT_PAID));
|
||||
|
||||
return sum;
|
||||
return summary("status = " + QString::number(Voucher::NOT_PAID));
|
||||
}
|
||||
|
||||
VoucherSum ShopService::unsendEET()
|
||||
@@ -491,13 +492,74 @@ QDecDouble ShopService::vatRate(Enums::VatType vatType)
|
||||
return vatRate;
|
||||
}
|
||||
|
||||
void ShopService::saveVoucher(VoucherPtr entity, qx::QxSession* pSession/* = nullptr*/)
|
||||
void ShopService::save(VoucherPtr entity, qx::QxSession* pSession/* = nullptr*/)
|
||||
{
|
||||
SeasonService seasonSrv;
|
||||
SeasonPtr season = seasonSrv.active();
|
||||
entity->setSeason(season);
|
||||
|
||||
addDateAndUser(entity, true);
|
||||
save(entity, pSession);
|
||||
Service::save(entity, pSession);
|
||||
}
|
||||
|
||||
QMap<QString, QString> ShopService::allCategories() {
|
||||
QMap<QString, QString> ret;
|
||||
|
||||
for (const auto& item : allSellableItems()) {
|
||||
if (!item->category().isEmpty() && !ret.contains(item->category())) {
|
||||
ret[item->category()] = item->color();
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ShopService::update(VoucherPtr entity, qx::QxSession* pSession) {
|
||||
bool reloadItems = pSession == nullptr;
|
||||
|
||||
{
|
||||
QScopedPointer<qx::QxSession> ptrSession;
|
||||
|
||||
if (pSession == nullptr) {
|
||||
ptrSession.reset(new qx::QxSession());
|
||||
pSession = ptrSession.data();
|
||||
}
|
||||
|
||||
Service::update(entity, pSession);
|
||||
auto oldItems = entity->items();
|
||||
|
||||
Service<VoucherItem> srvItem;
|
||||
auto items = srvItem.all("voucher = " + QString::number(entity->id()));
|
||||
|
||||
for (auto item : items) {
|
||||
auto newItem = std::find_if(oldItems.begin(), oldItems.end(), [item](auto it){
|
||||
return item->id() == it->id();
|
||||
});
|
||||
|
||||
if (newItem == oldItems.end()) {
|
||||
qx::dao::delete_by_id(item, pSession->database());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (reloadItems) {
|
||||
entity->clearItems();
|
||||
load(entity);
|
||||
}
|
||||
}
|
||||
|
||||
VoucherSum ShopService::salesSummary(QDate date) {
|
||||
return summary("payDateTime >= '" + date.toString("yyyy-MM-dd") + "'");
|
||||
}
|
||||
|
||||
VoucherSum ShopService::summary(const QString& where) {
|
||||
auto sums = all(where);
|
||||
VoucherSum sum(sums.count(), 0);
|
||||
|
||||
for (const auto& item : sums) {
|
||||
sum.addPrice(item->totalPrice());
|
||||
}
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
||||
+6
-2
@@ -27,7 +27,8 @@ public:
|
||||
void calculate(VoucherPtr voucher);
|
||||
void calculateItem(VoucherItemPtr item);
|
||||
void pay(VoucherPtr voucher);
|
||||
void saveVoucher(VoucherPtr entity, qx::QxSession* pSession = nullptr);
|
||||
void save(VoucherPtr entity, qx::QxSession* pSession = nullptr) override;
|
||||
void update(VoucherPtr entity, qx::QxSession* pSession = nullptr) override;
|
||||
void moveItems(QList<VoucherItemPtr> items, VoucherPtr source, VoucherPtr target);
|
||||
void updateRelatedItem(VoucherItem* item, int countAdded);
|
||||
bool processEet(VoucherPtr voucher, QString &message);
|
||||
@@ -40,14 +41,17 @@ public:
|
||||
QList<VoucherPtr> tempVouchers();
|
||||
QList<VoucherPtr> paiedVouchers();
|
||||
QList<VoucherPtr> vouchersForEet();
|
||||
QList<IShopItemPtr> allSellableItems();
|
||||
QList<IShopItemPtr> allSellableItems(const QString& category = "");
|
||||
QMap<QString, QString> allCategories();
|
||||
VoucherSum unpaidSummary();
|
||||
VoucherSum salesSummary(QDate date);
|
||||
VoucherSum unsendEET();
|
||||
|
||||
private:
|
||||
QDecDouble includeVat(QDecDouble price, Enums::VatType vatType);
|
||||
QDecDouble excludeVat(QDecDouble price, Enums::VatType vatType);
|
||||
void loadSettings();
|
||||
VoucherSum summary(const QString& where);
|
||||
|
||||
QSharedPointer<GlobalSettings> m_gs;
|
||||
QDecDouble vatRate(Enums::VatType vatType);
|
||||
|
||||
Binary file not shown.
+179
-95
@@ -29,22 +29,22 @@
|
||||
<translation>Sazba DPH</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../directsaleform.cpp" line="17"/>
|
||||
<location filename="../directsaleform.cpp" line="18"/>
|
||||
<source>None</source>
|
||||
<translation>Žádná</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../directsaleform.cpp" line="18"/>
|
||||
<location filename="../directsaleform.cpp" line="19"/>
|
||||
<source>High</source>
|
||||
<translation>Vysoká</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../directsaleform.cpp" line="19"/>
|
||||
<location filename="../directsaleform.cpp" line="20"/>
|
||||
<source>First Lower</source>
|
||||
<translation>První snížená</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../directsaleform.cpp" line="20"/>
|
||||
<location filename="../directsaleform.cpp" line="21"/>
|
||||
<source>Second Lower</source>
|
||||
<translation>Druhá snížená</translation>
|
||||
</message>
|
||||
@@ -60,36 +60,41 @@
|
||||
<context>
|
||||
<name>PayDialog</name>
|
||||
<message>
|
||||
<location filename="../paydialog.ui" line="14"/>
|
||||
<location filename="../paydialog.ui" line="20"/>
|
||||
<source>Recieve money</source>
|
||||
<translation>Platba</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydialog.ui" line="30"/>
|
||||
<location filename="../paydialog.ui" line="36"/>
|
||||
<source>Total:</source>
|
||||
<translation>Celkem:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydialog.ui" line="44"/>
|
||||
<location filename="../paydialog.ui" line="101"/>
|
||||
<location filename="../paydialog.ui" line="50"/>
|
||||
<location filename="../paydialog.ui" line="107"/>
|
||||
<source>0</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydialog.ui" line="59"/>
|
||||
<location filename="../paydialog.ui" line="65"/>
|
||||
<source>Recieved</source>
|
||||
<translation>Obdrženo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydialog.ui" line="89"/>
|
||||
<location filename="../paydialog.ui" line="95"/>
|
||||
<source>Return</source>
|
||||
<translation>Vrátit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydialog.ui" line="124"/>
|
||||
<location filename="../paydialog.ui" line="117"/>
|
||||
<source>Send to EET portal</source>
|
||||
<translation>Odeslat na EET</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydialog.ui" line="142"/>
|
||||
<source>OK</source>
|
||||
<translation>OK</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PaydVouchersDialog</name>
|
||||
@@ -104,65 +109,66 @@
|
||||
<translation>Vytisknout účtenku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydvouchersdialog.ui" line="55"/>
|
||||
<location filename="../paydvouchersdialog.cpp" line="99"/>
|
||||
<location filename="../paydvouchersdialog.ui" line="75"/>
|
||||
<location filename="../paydvouchersdialog.cpp" line="110"/>
|
||||
<source>Save receipt</source>
|
||||
<translation>Uložit účtenku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydvouchersdialog.ui" line="58"/>
|
||||
<location filename="../paydvouchersdialog.ui" line="52"/>
|
||||
<location filename="../paydvouchersdialog.ui" line="78"/>
|
||||
<location filename="../paydvouchersdialog.ui" line="101"/>
|
||||
<location filename="../paydvouchersdialog.ui" line="98"/>
|
||||
<location filename="../paydvouchersdialog.ui" line="121"/>
|
||||
<source>...</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydvouchersdialog.ui" line="153"/>
|
||||
<location filename="../paydvouchersdialog.ui" line="173"/>
|
||||
<source>Items</source>
|
||||
<translation>Položky</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydvouchersdialog.ui" line="168"/>
|
||||
<location filename="../paydvouchersdialog.ui" line="188"/>
|
||||
<source>EET:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydvouchersdialog.ui" line="219"/>
|
||||
<location filename="../paydvouchersdialog.ui" line="239"/>
|
||||
<source>Total:</source>
|
||||
<translation>Celkem:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydvouchersdialog.ui" line="239"/>
|
||||
<location filename="../paydvouchersdialog.ui" line="259"/>
|
||||
<source>0</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydvouchersdialog.cpp" line="63"/>
|
||||
<location filename="../paydvouchersdialog.cpp" line="74"/>
|
||||
<source>not entering</source>
|
||||
<translation>Nevstupuje</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydvouchersdialog.cpp" line="66"/>
|
||||
<location filename="../paydvouchersdialog.cpp" line="77"/>
|
||||
<source>for send</source>
|
||||
<translation>K odeslání</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydvouchersdialog.cpp" line="69"/>
|
||||
<location filename="../paydvouchersdialog.cpp" line="80"/>
|
||||
<source>error</source>
|
||||
<translation>Chyba</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydvouchersdialog.cpp" line="72"/>
|
||||
<location filename="../paydvouchersdialog.cpp" line="83"/>
|
||||
<source>sent</source>
|
||||
<translation>Odesláno</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydvouchersdialog.cpp" line="99"/>
|
||||
<location filename="../paydvouchersdialog.cpp" line="110"/>
|
||||
<source>Text files (*.txt)</source>
|
||||
<translation>Textové soubory (*.txt)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../paydvouchersdialog.cpp" line="139"/>
|
||||
<location filename="../paydvouchersdialog.cpp" line="150"/>
|
||||
<source>Error</source>
|
||||
<translation>Chyba</translation>
|
||||
</message>
|
||||
@@ -170,33 +176,33 @@
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../shopform.cpp" line="36"/>
|
||||
<location filename="../shopform.cpp" line="35"/>
|
||||
<source>EET communication error.
|
||||
</source>
|
||||
<translation>Chyba komunikace s EET</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.cpp" line="40"/>
|
||||
<location filename="../shopform.cpp" line="39"/>
|
||||
<source>Message from portal: </source>
|
||||
<translation>Zpráva z EET portálu:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.cpp" line="43"/>
|
||||
<location filename="../shopform.cpp" line="42"/>
|
||||
<source>Switch to offline?</source>
|
||||
<translation>Přepnout do offline?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.cpp" line="45"/>
|
||||
<location filename="../shopform.cpp" line="44"/>
|
||||
<source>EET error</source>
|
||||
<translation>Chyba EET</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.cpp" line="51"/>
|
||||
<location filename="../shopform.cpp" line="50"/>
|
||||
<source><a href="#eet">Online</a></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.cpp" line="51"/>
|
||||
<location filename="../shopform.cpp" line="50"/>
|
||||
<source><a href="#eet">Offline</a></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@@ -223,6 +229,11 @@
|
||||
<source>Items</source>
|
||||
<translation>Položky</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../receiptloadform.ui" line="55"/>
|
||||
<source>Select &all</source>
|
||||
<translation>Vybrat &vše</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ReceiptSaveForm</name>
|
||||
@@ -284,142 +295,167 @@
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="44"/>
|
||||
<location filename="../shopform.ui" line="111"/>
|
||||
<source>Commodity</source>
|
||||
<translation>Zboží</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="73"/>
|
||||
<location filename="../shopform.ui" line="140"/>
|
||||
<source>Count</source>
|
||||
<translation>Počet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="99"/>
|
||||
<location filename="../shopform.ui" line="166"/>
|
||||
<source>Add Item</source>
|
||||
<translation>Přidat položku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="127"/>
|
||||
<source>Direct Sale</source>
|
||||
<translation>Přímý prodej</translation>
|
||||
<translation type="vanished">Přímý prodej</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="140"/>
|
||||
<location filename="../shopform.ui" line="62"/>
|
||||
<source>Ctrl+D</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="162"/>
|
||||
<location filename="../shopform.ui" line="84"/>
|
||||
<source>Favorities</source>
|
||||
<translation>Oblíbené</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="186"/>
|
||||
<source>Receipt</source>
|
||||
<translation>Účtenka</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="201"/>
|
||||
<location filename="../shopform.ui" line="231"/>
|
||||
<source>10%</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="260"/>
|
||||
<location filename="../shopform.ui" line="289"/>
|
||||
<source>0%</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="273"/>
|
||||
<location filename="../shopform.ui" line="302"/>
|
||||
<source>21%</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="312"/>
|
||||
<location filename="../shopform.ui" line="340"/>
|
||||
<source>15%</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="361"/>
|
||||
<location filename="../shopform.ui" line="387"/>
|
||||
<source>Witouth VAT</source>
|
||||
<translation>Bez DPH</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="371"/>
|
||||
<location filename="../shopform.ui" line="397"/>
|
||||
<source>VAT</source>
|
||||
<translation>DPH</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="381"/>
|
||||
<location filename="../shopform.ui" line="407"/>
|
||||
<source>Total</source>
|
||||
<translation>Celkem</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="409"/>
|
||||
<location filename="../shopform.ui" line="435"/>
|
||||
<source>EET status:</source>
|
||||
<translation>EET status:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="425"/>
|
||||
<location filename="../shopform.ui" line="450"/>
|
||||
<source><a href="#eet">dfghdfg</a></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="455"/>
|
||||
<location filename="../shopform.ui" line="479"/>
|
||||
<source>Total:</source>
|
||||
<translation>Celkem:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="185"/>
|
||||
<location filename="../shopform.ui" line="208"/>
|
||||
<location filename="../shopform.ui" line="218"/>
|
||||
<location filename="../shopform.ui" line="228"/>
|
||||
<location filename="../shopform.ui" line="244"/>
|
||||
<location filename="../shopform.ui" line="280"/>
|
||||
<location filename="../shopform.ui" line="296"/>
|
||||
<location filename="../shopform.ui" line="325"/>
|
||||
<location filename="../shopform.ui" line="335"/>
|
||||
<location filename="../shopform.ui" line="351"/>
|
||||
<location filename="../shopform.ui" line="472"/>
|
||||
<location filename="../shopform.ui" line="627"/>
|
||||
<location filename="../shopform.cpp" line="655"/>
|
||||
<source>Delete items</source>
|
||||
<translation>Smazat položky</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="630"/>
|
||||
<source>Ctrl+Del</source>
|
||||
<translation>Ctrl+Del</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="215"/>
|
||||
<location filename="../shopform.ui" line="238"/>
|
||||
<location filename="../shopform.ui" line="248"/>
|
||||
<location filename="../shopform.ui" line="258"/>
|
||||
<location filename="../shopform.ui" line="273"/>
|
||||
<location filename="../shopform.ui" line="309"/>
|
||||
<location filename="../shopform.ui" line="324"/>
|
||||
<location filename="../shopform.ui" line="352"/>
|
||||
<location filename="../shopform.ui" line="362"/>
|
||||
<location filename="../shopform.ui" line="377"/>
|
||||
<location filename="../shopform.ui" line="495"/>
|
||||
<source>0</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="493"/>
|
||||
<location filename="../shopform.ui" line="49"/>
|
||||
<source>Direct Sell</source>
|
||||
<translation>Přímý prodej</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="516"/>
|
||||
<source>Temporary Save</source>
|
||||
<translation>Dočasné uložení</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="515"/>
|
||||
<location filename="../shopform.ui" line="538"/>
|
||||
<source>Save</source>
|
||||
<translation>Uložení</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="537"/>
|
||||
<location filename="../shopform.ui" line="560"/>
|
||||
<source>Load</source>
|
||||
<translation>Načíst</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="559"/>
|
||||
<location filename="../shopform.ui" line="582"/>
|
||||
<source>Show paid</source>
|
||||
<translation>Zobrazit zaplacené</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.ui" line="581"/>
|
||||
<location filename="../shopform.ui" line="604"/>
|
||||
<source>Pay</source>
|
||||
<translation>Zaplatit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.cpp" line="149"/>
|
||||
<location filename="../shopform.cpp" line="595"/>
|
||||
<location filename="../shopform.cpp" line="157"/>
|
||||
<location filename="../shopform.cpp" line="640"/>
|
||||
<source><a href="#eet">Online</a></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.cpp" line="149"/>
|
||||
<location filename="../shopform.cpp" line="595"/>
|
||||
<location filename="../shopform.cpp" line="157"/>
|
||||
<location filename="../shopform.cpp" line="640"/>
|
||||
<source><a href="#eet">Offline</a></source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.cpp" line="223"/>
|
||||
<location filename="../shopform.cpp" line="236"/>
|
||||
<source><< empty >></source>
|
||||
<translation><< nevybráno >></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopform.cpp" line="655"/>
|
||||
<source>Really delete selected voucher items?</source>
|
||||
<translation>Opravdu chcete smazat vybrané položky?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>EET communication error.
|
||||
</source>
|
||||
@@ -453,7 +489,9 @@
|
||||
<message>
|
||||
<location filename="../shopoverview.ui" line="52"/>
|
||||
<location filename="../shopoverview.ui" line="75"/>
|
||||
<location filename="../shopoverview.ui" line="110"/>
|
||||
<location filename="../shopoverview.ui" line="108"/>
|
||||
<location filename="../shopoverview.ui" line="131"/>
|
||||
<location filename="../shopoverview.ui" line="154"/>
|
||||
<source>TextLabel</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@@ -463,10 +501,20 @@
|
||||
<translation>Nezaplaceno v Kč:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopoverview.ui" line="91"/>
|
||||
<location filename="../shopoverview.ui" line="90"/>
|
||||
<source>Unsend to EET:</source>
|
||||
<translation>Neodesláno na EET:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopoverview.ui" line="118"/>
|
||||
<source>Today sales:</source>
|
||||
<translation>Dnešní tržba:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../shopoverview.ui" line="141"/>
|
||||
<source>Number of sales today:</source>
|
||||
<translation>Dnešní počet prodejů:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShopSettingsForm</name>
|
||||
@@ -481,127 +529,148 @@
|
||||
<translation>Nastavení rychlé volby</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="236"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="245"/>
|
||||
<source>...</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="126"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="129"/>
|
||||
<source>Printer</source>
|
||||
<translation>Tiskárna</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="89"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="92"/>
|
||||
<source>Columns</source>
|
||||
<translation>Sloupců</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="99"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="102"/>
|
||||
<source>Rows</source>
|
||||
<translation>Řádků</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="109"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="112"/>
|
||||
<source>Size</source>
|
||||
<translation>Velikost</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="132"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="138"/>
|
||||
<source>Output device</source>
|
||||
<translation>Jméno tiskárny</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="142"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="148"/>
|
||||
<source>Letters per line</source>
|
||||
<translation>Znaků na řádek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="152"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="158"/>
|
||||
<source>Footer text</source>
|
||||
<translation>Patička</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="163"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="169"/>
|
||||
<source>EET</source>
|
||||
<translation>EET</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="169"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="175"/>
|
||||
<source>Activate EET</source>
|
||||
<translation>Zapnout podporu EET</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="181"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="190"/>
|
||||
<source>Shop ID</source>
|
||||
<translation>ID provozovny</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="191"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="200"/>
|
||||
<source>Cash register ID</source>
|
||||
<translation>ID zařízení</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="201"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="210"/>
|
||||
<source>EET mode</source>
|
||||
<translation>EET režim</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="211"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="220"/>
|
||||
<source>Certificate file</source>
|
||||
<translation>Certifikát</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="246"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="255"/>
|
||||
<source>Private key password</source>
|
||||
<translation>Heslo k certifikátu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="260"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="269"/>
|
||||
<source>Test mode</source>
|
||||
<translation>Testovací režim</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="267"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="276"/>
|
||||
<source>Communication with playground </source>
|
||||
<translation>Testovací EET server </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="278"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="287"/>
|
||||
<source>Other</source>
|
||||
<translation>Jiné</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="284"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="293"/>
|
||||
<source>Rounding</source>
|
||||
<translation>Zaokrouhlování</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="290"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="302"/>
|
||||
<source>Direction</source>
|
||||
<translation>Typ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="300"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="312"/>
|
||||
<source>Decimal places</source>
|
||||
<translation>Desetiných míst</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="313"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="325"/>
|
||||
<source>Rounding item text</source>
|
||||
<translation>Název položky</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.cpp" line="27"/>
|
||||
<location filename="../settings/shopsettingsform.ui" line="335"/>
|
||||
<source>Default VAT type</source>
|
||||
<translation>Výchozí sazba daně</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="348"/>
|
||||
<source>Doub&le print bill</source>
|
||||
<translation>Z&dvojená účtenka</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="363"/>
|
||||
<source>Item name</source>
|
||||
<translation>Jméno položky</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.ui" line="376"/>
|
||||
<source>Show field for item count</source>
|
||||
<translation>Zobrazit pole pro počet položek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.cpp" line="24"/>
|
||||
<source>Simplifyed</source>
|
||||
<translation>Zjednodušený</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.cpp" line="27"/>
|
||||
<location filename="../settings/shopsettingsform.cpp" line="24"/>
|
||||
<source>Standard</source>
|
||||
<translation>Standartní</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.cpp" line="40"/>
|
||||
<location filename="../settings/shopsettingsform.cpp" line="55"/>
|
||||
<source>None</source>
|
||||
<translation>Žádný</translation>
|
||||
</message>
|
||||
@@ -620,6 +689,21 @@
|
||||
<source>Mathematic</source>
|
||||
<translation>Matematické</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.cpp" line="56"/>
|
||||
<source>High</source>
|
||||
<translation>Vysoká</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.cpp" line="57"/>
|
||||
<source>First lower</source>
|
||||
<translation>První snížená</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../settings/shopsettingsform.cpp" line="58"/>
|
||||
<source>Second lower</source>
|
||||
<translation>Druhá snížená</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TemporaryReceiptSaveForm</name>
|
||||
|
||||
Reference in New Issue
Block a user