This commit is contained in:
2025-05-08 21:02:56 +03:00
parent 6706cbec45
commit 86a11faf70
24 changed files with 1022 additions and 460 deletions

View File

@@ -2,7 +2,6 @@
#include <fstream>
#include <nlohmann/json.hpp>
#include <string>
#include "../utils/utils.h"
#if __GNUC__ <= 8 && __clang_major__ < 17
# include <experimental/filesystem>
@@ -23,24 +22,28 @@ Settings::Settings(std::string path) {
"print_header": true,
"print_total": true,
"output_order": {
"goods_name": {
"date" : {
"position":1,
"name": "Date"
},
"goods_name": {
"position":2,
"name":"Goods name"
},
"goods_price_per_unit": {
"position":2,
"position":3,
"name":"Goods price per unit"
},
"goods_quantity": {
"position":3,
"position":4,
"name":"Goods quantity"
},
"goods_net_weight": {
"position":4,
"position":5,
"name":"Goods net weight"
},
"goods_total": {
"position":5,
"position":6,
"name":"Goods total"
}
}
@@ -56,9 +59,6 @@ Settings::Settings(std::string path) {
nlohmann::json settings = nlohmann::json::parse(input);
this->settings = settings;
}
create_directories(get_path_relative_to_home(this->settings["ofds_modules_dir"]));
create_directories(get_path_relative_to_home(this->settings["stores_modules_dir"]));
}
void Settings::write_setting(std::string setting, std::string value) {