Compare commits

..

No commits in common. "7f11ba4e5d715f14d6723c729d748e8d3473a057" and "54e5c70447b0ea34047e355b0d30445de77dc019" have entirely different histories.

5 changed files with 18 additions and 23 deletions

View file

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.10)
project(kima2 VERSION 1.8.0) project(kima2 VERSION 1.7.2)
set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake") set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake")

View file

@ -9,12 +9,12 @@
<project_license>GPL-3.0-or-later</project_license> <project_license>GPL-3.0-or-later</project_license>
<releases> <releases>
<release version="@PROJECT_VERSION@" type="stable" date="2024-01-23" /> <release version="@PROJECT_VERSION@" type="stable" date="2023-04-25" />
</releases> </releases>
<description> <description>
<p> <p>
A small cash point program for children's stuff markets. German language only. A small cash point program for childrens stuff markets. German language only.
</p> </p>
</description> </description>

View file

@ -1,4 +1,4 @@
project('kima2', 'cpp', default_options : ['cpp_std=c++20'], version : '1.8.0') project('kima2', 'cpp', default_options : ['cpp_std=c++20'], version : '1.6.1')
conf_data = configuration_data() conf_data = configuration_data()
conf_data.set('PROJECT_VERSION', '"' + meson.project_version() + '"') conf_data.set('PROJECT_VERSION', '"' + meson.project_version() + '"')

View file

@ -102,10 +102,8 @@ void JsonUtil::importSales(const std::filesystem::path &filePath, Marketplace *m
int source_no = jsonValues["source_no"]; int source_no = jsonValues["source_no"];
if (source_no == cashPointNo) { if (source_no == cashPointNo) {
std::string ret = "Die Kassen-Nr. "; throw std::runtime_error("Die Kassen-Nr. der zu imporierenden Daten wird von dieser Kasse "
ret += std::to_string(source_no); "hier bereits verwendet.");
ret += " der zu imporierenden Daten wird von dieser Kasse hier bereits verwendet.";
throw std::runtime_error(ret);
} }
market->setSalesToDelete(jsonValues["source_no"]); market->setSalesToDelete(jsonValues["source_no"]);

View file

@ -504,30 +504,27 @@ void MainWindow::onImportSalesJsonActionTriggered()
{ {
QSettings settings; QSettings settings;
auto filenames = QFileDialog::getOpenFileNames(this, "Umsätze/Transaktionen importieren", auto filename = QFileDialog::getOpenFileName(this, "Umsätze/Transaktionen importieren",
QString(), "JSON Dateien (*.json)"); QString(), "JSON Dateien (*.json)");
if (filenames.isEmpty()) if (filename.isEmpty())
return; return;
for(auto filename: filenames) {
#if defined(_WIN64) || defined(_WIN32) #if defined(_WIN64) || defined(_WIN32)
fs::path filePath(filename.toStdWString()); fs::path filePath(filename.toStdWString());
#else #else
fs::path filePath(filename.toStdString()); fs::path filePath(filename.toStdString());
#endif #endif
delete m_ui.salesView->model(); delete m_ui.salesView->model();
try { try {
JsonUtil::importSales(filePath, m_marketplace.get(), JsonUtil::importSales(filePath, m_marketplace.get(),
settings.value("global/cashPointNo").toInt()); settings.value("global/cashPointNo").toInt());
} catch (std::runtime_error &err) { } catch (std::runtime_error &err) {
QMessageBox(QMessageBox::Icon::Warning, "Import nicht möglich", err.what(), QMessageBox::Ok, QMessageBox(QMessageBox::Icon::Warning, "Import nicht möglich", err.what(), QMessageBox::Ok,
this) this)
.exec(); .exec();
}
} }
setSaleModel(); setSaleModel();
updateStatLabel(); updateStatLabel();
} }