Patch level : 12.0 902

Files correlati     : ps6215.exe ps6215100a.msk
Commento            : Esportazione tabelle per CO.MA.RI.
This commit is contained in:
Simone Palacino 2019-12-03 11:29:45 +01:00
parent 5ead3809a2
commit c4e9bd3671

View File

@ -288,17 +288,39 @@ bool TComariExport_app::export_table(const short id) const
bool ok = false; bool ok = false;
ofstream fout; ofstream fout;
TString path = _fld_dest; TString path = _fld_dest;
const char* name, *name_file;
if (id == F_CLIFOR) switch (id)
{ {
path << "\\clifo.txt"; default:
case F_CLIFOR:
name_file = "clifo.txt";
path << "\\" << name_file;
fout.open(path, ios_base::out); fout.open(path, ios_base::out);
if ((ok = fout.is_open())) if ((ok = fout.is_open()))
{ {
export_clifo(fout); export_clifo(fout);
fout.close(); 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; return ok;
} }
@ -322,6 +344,7 @@ void TComariExport_app::main_loop()
TComariExport_mask msk; TComariExport_mask msk;
while (msk.run() == K_ENTER) while (msk.run() == K_ENTER)
{ {
bool ok = false;
_fld_dest = msk.get(F_FLDDEST); _fld_dest = msk.get(F_FLDDEST);
for (short i = F_CLIFOR; i <= F_MASTRI; ++i) for (short i = F_CLIFOR; i <= F_MASTRI; ++i)