Compare commits
2 commits
f0ec980e8d
...
acc8408b0a
Author | SHA1 | Date | |
---|---|---|---|
acc8408b0a | |||
99104a932f |
3 changed files with 18 additions and 2 deletions
|
@ -16,7 +16,7 @@ class Article : public EntityUuid
|
||||||
public:
|
public:
|
||||||
Article() = default;
|
Article() = default;
|
||||||
Article(int price);
|
Article(int price);
|
||||||
//virtual ~Article() = default;
|
virtual ~Article() = default;
|
||||||
|
|
||||||
void setArticleNo(int articleNo);
|
void setArticleNo(int articleNo);
|
||||||
void setPrice(int price);
|
void setPrice(int price);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Seller : public EntityInt
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Seller() = default;
|
Seller() = default;
|
||||||
~Seller() = default;
|
virtual ~Seller() = default;
|
||||||
Seller(const std::string& firstName, const std::string& lastName, int sellerNo = 0,
|
Seller(const std::string& firstName, const std::string& lastName, int sellerNo = 0,
|
||||||
int numArticlesOffered = 0);
|
int numArticlesOffered = 0);
|
||||||
|
|
||||||
|
|
|
@ -462,7 +462,11 @@ void MainWindow::onImportSellerExcelActionTriggered()
|
||||||
if (filename.isEmpty())
|
if (filename.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#if defined(_WIN64) || defined(_WIN32)
|
||||||
fs::path filePath(filename.toStdWString());
|
fs::path filePath(filename.toStdWString());
|
||||||
|
#else
|
||||||
|
fs::path filePath(filename.toStdString());
|
||||||
|
#endif
|
||||||
|
|
||||||
std::size_t numImported{};
|
std::size_t numImported{};
|
||||||
if (case_insensitive_match(filePath.extension().string(), std::string(".xlsx"))) {
|
if (case_insensitive_match(filePath.extension().string(), std::string(".xlsx"))) {
|
||||||
|
@ -498,7 +502,11 @@ void MainWindow::onImportSellerJsonActionTriggered()
|
||||||
if (filename.isEmpty())
|
if (filename.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#if defined(_WIN64) || defined(_WIN32)
|
||||||
fs::path filePath(filename.toStdWString());
|
fs::path filePath(filename.toStdWString());
|
||||||
|
#else
|
||||||
|
fs::path filePath(filename.toStdString());
|
||||||
|
#endif
|
||||||
|
|
||||||
JsonUtil::importSellers(filePath, marketplace_.get());
|
JsonUtil::importSellers(filePath, marketplace_.get());
|
||||||
updateStatLabel();
|
updateStatLabel();
|
||||||
|
@ -529,7 +537,11 @@ void MainWindow::onExportSalesJsonActionTriggered()
|
||||||
if (filename.isEmpty())
|
if (filename.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#if defined(_WIN64) || defined(_WIN32)
|
||||||
fs::path filePath(filename.toStdWString());
|
fs::path filePath(filename.toStdWString());
|
||||||
|
#else
|
||||||
|
fs::path filePath(filename.toStdString());
|
||||||
|
#endif
|
||||||
|
|
||||||
JsonUtil::exportSales(filePath, marketplace_.get(),
|
JsonUtil::exportSales(filePath, marketplace_.get(),
|
||||||
settings.value("global/cashPointNo").toInt());
|
settings.value("global/cashPointNo").toInt());
|
||||||
|
@ -545,7 +557,11 @@ void MainWindow::onImportSalesJsonActionTriggered()
|
||||||
if (filename.isEmpty())
|
if (filename.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#if defined(_WIN64) || defined(_WIN32)
|
||||||
fs::path filePath(filename.toStdWString());
|
fs::path filePath(filename.toStdWString());
|
||||||
|
#else
|
||||||
|
fs::path filePath(filename.toStdString());
|
||||||
|
#endif
|
||||||
|
|
||||||
delete ui_.salesView->model();
|
delete ui_.salesView->model();
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue