diff --git a/src/ps/ps6215100.cpp b/src/ps/ps6215100.cpp index 7564dfe0c..92fd3dfe0 100644 --- a/src/ps/ps6215100.cpp +++ b/src/ps/ps6215100.cpp @@ -288,17 +288,39 @@ bool TComariExport_app::export_table(const short id) const bool ok = false; ofstream fout; TString path = _fld_dest; - - if (id == F_CLIFOR) + const char* name, *name_file; + switch (id) { - path << "\\clifo.txt"; + default: + case F_CLIFOR: + name_file = "clifo.txt"; + path << "\\" << name_file; fout.open(path, ios_base::out); if ((ok = fout.is_open())) { export_clifo(fout); fout.close(); } + name = "Clienti Fornitori"; + break; + case F_PIANOCONTI: + name_file = "pianoconti.txt"; + path << "\\" << name_file; + ok = true; + name = "Piano dei Conti"; + break; + case F_MASTRI: + name_file = "mastri.txt"; + path << "\\" << name_file; + ok = true; + name = "Mastri"; + break; } + TString msg; msg << "Esportazione " << name << (ok ? " " : " non ") << "completata.\nFile: " << (ok ? path : name_file); + if (ok) + message_box(msg); + else + warning_box(msg); return ok; } @@ -322,6 +344,7 @@ void TComariExport_app::main_loop() TComariExport_mask msk; while (msk.run() == K_ENTER) { + bool ok = false; _fld_dest = msk.get(F_FLDDEST); for (short i = F_CLIFOR; i <= F_MASTRI; ++i)