67 lines
1.6 KiB
C++
67 lines
1.6 KiB
C++
#include <applicat.h>
|
|
#include <mask.h>
|
|
#include <progind.h>
|
|
#include <recset.h>
|
|
#include <urldefid.h>
|
|
#include <toolfld.h>
|
|
|
|
#include "../ca/calib01.h"
|
|
|
|
#include "movana.h"
|
|
#include "rmovana.h"
|
|
|
|
class TRic_comp_app : public TSkeleton_application
|
|
{
|
|
public:
|
|
virtual void main_loop();
|
|
};
|
|
|
|
void TRic_comp_app::main_loop()
|
|
{
|
|
TMask m(title(), 1, 40, 6);
|
|
m.add_button_tool(DLG_OK, TR("Elabora"), TOOL_ELABORA);
|
|
m.add_button_tool(-1, NULL, 0);
|
|
m.add_button_tool(DLG_INFO, TR("Info"), TOOL_INFO);
|
|
m.add_button_tool(DLG_HELP, TR("Help"), TOOL_HELP);
|
|
m.add_button_tool(-1, NULL, 0);
|
|
m.add_button_tool(DLG_QUIT, TR("Fine"), TOOL_QUIT);
|
|
m.add_date(101, 0, PR("Data iniziale "), 1, 1);
|
|
m.add_date(102, 0, PR("Data finale "), 1, 3, "A");
|
|
|
|
if (!ini_get_bool(CONFIG_DITTA, "ca", "AttRmovc"))
|
|
{
|
|
if (yesno_box(TR("Si desidera attivare la suddivisione delle righe analitiche per competenza?")))
|
|
ini_set_bool(CONFIG_DITTA, "ca", "AttRmovc", true);
|
|
else
|
|
return;
|
|
}
|
|
|
|
while (m.run() == K_ENTER)
|
|
{
|
|
TISAM_recordset movset("USE MOVANA KEY 2\nFROM DATACOMP=#DAL\nTO DATACOMP=#AL");
|
|
movset.set_var("#DAL", m.get(101));
|
|
movset.set_var("#AL", m.get(102));
|
|
long items = 0;
|
|
{
|
|
TWait_cursor hourglass;
|
|
items = movset.items();
|
|
}
|
|
TProgress_monitor pi(items, title());
|
|
for (bool ok = movset.move_first(); ok; ok = movset.move_next())
|
|
{
|
|
TAnal_mov am(movset.get(MOVANA_NUMREG).as_int());
|
|
am.save_rmov_comp();
|
|
if (!pi.add_status())
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
int ca2400(int argc, char* argv[])
|
|
{
|
|
TRic_comp_app app;
|
|
app.run(argc, argv, TR("Ricostruzione righe per competenza"));
|
|
return 0;
|
|
}
|