Patch level : 2.2 66

Files correlati     :  ca1.exe
Ricompilazione Demo : [ ]
Commento            :

Prima bozza stampe anagrafiche


git-svn-id: svn://10.65.10.50/trunk@12881 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2005-03-31 23:41:34 +00:00
parent 8200acbd8b
commit 31781521f5
18 changed files with 509 additions and 10 deletions

View File

@ -7,8 +7,11 @@ int main(int argc, char** argv)
const int r = (argc > 1) ? argv[1][1] - '0' : 0;
switch (r)
{
case 1: break;
default: ca1100(argc,argv); break; // stampa centri di costo
case 3: ca1400(argc,argv); break; // stampa piano dei conti
case 4: ca1500(argc,argv); break; // stampa centri di costo
case 5: ca1600(argc,argv); break; // stampa commesse
case 6: ca1700(argc,argv); break; // stampa fasi
default: ca1100(argc,argv); break; // stampa tabelle
}
exit(0);
return 0;

View File

@ -1 +1,10 @@
#ifndef __CA1_H
#define __CA1_H
int ca1100(int argc, char* argv[]);
int ca1400(int argc, char* argv[]);
int ca1500(int argc, char* argv[]);
int ca1600(int argc, char* argv[]);
int ca1700(int argc, char* argv[]);
#endif // __CA0_H

View File

@ -15,3 +15,7 @@
: MESSAGE_FORMAT_CONTO ( -- )
CA_FORMAT_CONTO
;
: MESSAGE_FORMAT_CMSCDC ( -- )
\ da implementare
CA_FORMAT_CMSCDC

54
ca/ca1400.cpp Executable file
View File

@ -0,0 +1,54 @@
#include <applicat.h>
#include <reprint.h>
#include "ca1.h"
#include "ca1400a.h"
#include "calib02.h"
class TPrint_pdc : public TSkeleton_application
{
public:
virtual void main_loop();
};
void TPrint_pdc::main_loop()
{
TFilename path;
TMask m("ca1400a");;
while (m.run() == K_ENTER)
{
TReport_book book;
TAnal_report rep;
;
path = m.get(F_REPORT);
if (path.empty())
path = "ca1400";
path.ext("rep");
path.custom_path();
if (rep.load(path))
{
TRecordset * r = rep.recordset();
if (r != NULL)
{
TVariant var;
var = m.get(F_DACONTO);
r->set_var("#DACONTO", var);
var = m.get(F_ACONTO);
r->set_var("#ACONTO", var);
}
}
book.add(rep);
book.print_or_preview();
}
}
int ca1400(int argc, char* argv[])
{
TPrint_pdc a;
a.run(argc, argv, TR("Stampa piano dei conti analitica"));
return 0;
}

3
ca/ca1400a.h Executable file
View File

@ -0,0 +1,3 @@
#define F_DACONTO 101
#define F_ACONTO 102
#define F_REPORT 103

47
ca/ca1400a.uml Executable file
View File

@ -0,0 +1,47 @@
#include "ca1400a.h"
PAGE "Stampa piano dei conti analitica" -1 -1 80 8
STRING F_DACONTO 20
BEGIN
PROMPT 2 1 "Da conto "
FIELD DA_CONTO
USE LF_PCONANA
INPUT CODCONTO F_DACONTO
DISPLAY "Codice@20" CODCONTO
DISPLAY "Descrizione@50" DESCR
OUTPUT F_DACONTO CODCONTO
CHECKTYPE SEARCH
END
STRING F_ACONTO 20
BEGIN
PROMPT 2 3 "A conto "
FIELD A_CONTO
COPY USE F_DACONTO
INPUT CODCONTO F_ACONTO
COPY DISPLAY F_DACONTO
OUTPUT F_ACONTO CODCONTO
CHECKTYPE SEARCH
END
STRING F_REPORT 20
BEGIN
PROMPT 2 5 "Tipo di stampa "
RSELECT "ca1400"
CHECKTYPE NORMAL
END
BUTTON DLG_PRINT 10 2
BEGIN
PROMPT -12 -1 ""
END
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -22 -1 ""
END
ENDPAGE
ENDMASK

55
ca/ca1500.cpp Executable file
View File

@ -0,0 +1,55 @@
#include <applicat.h>
#include <reprint.h>
#include "ca1.h"
#include "ca1500a.h"
#include "calib02.h"
class TPrint_cdc : public TSkeleton_application
{
public:
virtual void main_loop();
};
void TPrint_cdc::main_loop()
{
TFilename path;
TMask m("ca1500a");;
while (m.run() == K_ENTER)
{
TReport_book book;
TAnal_report rep;
path = m.get(F_REPORT);
if (path.empty())
path = "ca1500";
path.ext("rep");
path.custom_path();
if (rep.load(path))
{
TRecordset * r = rep.recordset();
if (r != NULL)
{
TVariant var;
var = m.get(F_DACDC);
r->set_var("#DACDC", var);
var = m.get(F_ACDC);
r->set_var("#ACDC", var);
}
}
book.add(rep);
book.print_or_preview();
}
}
int ca1500(int argc, char* argv[])
{
TPrint_cdc a;
a.run(argc, argv, TR("Stampa centri di costo"));
return 0;
}

3
ca/ca1500a.h Executable file
View File

@ -0,0 +1,3 @@
#define F_DACDC 101
#define F_ACDC 102
#define F_REPORT 103

47
ca/ca1500a.uml Executable file
View File

@ -0,0 +1,47 @@
#include "ca1500a.h"
PAGE "Stampa centri di costo" -1 -1 80 8
STRING F_DACDC 20
BEGIN
PROMPT 2 1 "Da Centro "
FIELD DA_CDC
USE LF_CDC
INPUT CODCOSTO F_DACDC
DISPLAY "Codice@20" CODCOSTO
DISPLAY "Descrizione@50" DESCRIZ
OUTPUT F_DACDC CODCOSTO
CHECKTYPE SEARCH
END
STRING F_ACDC 20
BEGIN
PROMPT 2 3 "A Cento "
FIELD A_CDC
COPY USE F_DACDC
INPUT CODCOSTO F_ACDC
COPY DISPLAY F_DACDC
OUTPUT F_ACDC CODCOSTO
CHECKTYPE SEARCH
END
STRING F_REPORT 20
BEGIN
PROMPT 2 5 "Tipo di stampa "
RSELECT "ca1500"
CHECKTYPE NORMAL
END
BUTTON DLG_PRINT 10 2
BEGIN
PROMPT -12 -1 ""
END
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -22 -1 ""
END
ENDPAGE
ENDMASK

55
ca/ca1600.cpp Executable file
View File

@ -0,0 +1,55 @@
#include <applicat.h>
#include <reprint.h>
#include "ca1.h"
#include "ca1600a.h"
#include "calib02.h"
class TPrint_cms : public TSkeleton_application
{
public:
virtual void main_loop();
};
void TPrint_cms::main_loop()
{
TFilename path;
TMask m("ca1600a");;
while (m.run() == K_ENTER)
{
TReport_book book;
TAnal_report rep;
path = m.get(F_REPORT);
if (path.empty())
path = "ca1600";
path.ext("rep");
path.custom_path();
if (rep.load(path))
{
TRecordset * r = rep.recordset();
if (r != NULL)
{
TVariant var;
var = m.get(F_DACMS);
r->set_var("#DACMS", var);
var = m.get(F_ACMS);
r->set_var("#ACMS", var);
}
}
book.add(rep);
book.print_or_preview();
}
}
int ca1600(int argc, char* argv[])
{
TPrint_cms a;
a.run(argc, argv, TR("Stampa commesse"));
return 0;
}

3
ca/ca1600a.h Executable file
View File

@ -0,0 +1,3 @@
#define F_DACMS 101
#define F_ACMS 102
#define F_REPORT 103

47
ca/ca1600a.uml Executable file
View File

@ -0,0 +1,47 @@
#include "ca1600a.h"
PAGE "Stampa commesse" -1 -1 80 8
STRING F_DACMS 20
BEGIN
PROMPT 2 1 "Da Commessa "
FIELD DA_CMS
USE LF_COMMESSE
INPUT CODCMS F_DACMS
DISPLAY "Codice@20" CODCMS
DISPLAY "Descrizione@50" DESCRIZ
OUTPUT F_DACMS CODCMS
CHECKTYPE SEARCH
END
STRING F_ACMS 20
BEGIN
PROMPT 2 3 "A Commessa "
FIELD A_CMS
COPY USE F_DACMS
INPUT CODCMS F_ACMS
COPY DISPLAY F_DACMS
OUTPUT F_ACMS CODCMS
CHECKTYPE SEARCH
END
STRING F_REPORT 20
BEGIN
PROMPT 2 5 "Tipo di stampa "
RSELECT "ca1600"
CHECKTYPE NORMAL
END
BUTTON DLG_PRINT 10 2
BEGIN
PROMPT -12 -1 ""
END
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -22 -1 ""
END
ENDPAGE
ENDMASK

55
ca/ca1600x.cpp Executable file
View File

@ -0,0 +1,55 @@
#include <applicat.h>
#include <reprint.h>
#include "ca1.h"
#include "ca1500a.h"
#include "calib02.h"
class TPrint_cdc : public TSkeleton_application
{
public:
virtual void main_loop();
};
void TPrint_cdc::main_loop()
{
TFilename path;
TMask m("ca1500a");;
while (m.run() == K_ENTER)
{
TReport_book book;
TAnal_report rep;
path = m.get(F_REPORT);
if (path.empty())
path = "ca1500";
path.ext("rep");
path.custom_path();
if (rep.load(path))
{
TRecordset * r = rep.recordset();
if (r != NULL)
{
TVariant var;
var = m.get(F_DACDC);
r->set_var("#DACDC", var);
var = m.get(F_ACDC);
r->set_var("#ACDC", var);
}
}
book.add(rep);
book.print_or_preview();
}
}
int ca1500(int argc, char* argv[])
{
TPrint_cdc a;
a.run(argc, argv, TR("Stampa centri di costo"));
return 0;
}

55
ca/ca1700.cpp Executable file
View File

@ -0,0 +1,55 @@
#include <applicat.h>
#include <reprint.h>
#include "ca1.h"
#include "ca1700a.h"
#include "calib02.h"
class TPrint_fasi : public TSkeleton_application
{
public:
virtual void main_loop();
};
void TPrint_fasi::main_loop()
{
TFilename path;
TMask m("ca1700a");;
while (m.run() == K_ENTER)
{
TReport_book book;
TAnal_report rep;
path = m.get(F_REPORT);
if (path.empty())
path = "ca1700";
path.ext("rep");
path.custom_path();
if (rep.load(path))
{
TRecordset * r = rep.recordset();
if (r != NULL)
{
TVariant var;
var = m.get(F_DAFASE);
r->set_var("#DAFASE", var);
var = m.get(F_AFASE);
r->set_var("#AFASE", var);
}
}
book.add(rep);
book.print_or_preview();
}
}
int ca1700(int argc, char* argv[])
{
TPrint_fasi a;
a.run(argc, argv, TR("Stampa fasi"));
return 0;
}

3
ca/ca1700a.h Executable file
View File

@ -0,0 +1,3 @@
#define F_DAFASE 101
#define F_AFASE 102
#define F_REPORT 103

47
ca/ca1700a.uml Executable file
View File

@ -0,0 +1,47 @@
#include "ca1700a.h"
PAGE "Stampa fasi" -1 -1 80 8
STRING F_DAFASE 10
BEGIN
PROMPT 2 1 "Da Fase "
FIELD DA_FASE
USE LF_FASI
INPUT CODFASE F_DAFASE
DISPLAY "Codice@10" CODFASE
DISPLAY "Descrizione@50" DESCRIZ
OUTPUT F_DAFASE CODFASE
CHECKTYPE SEARCH
END
STRING F_AFASE 10
BEGIN
PROMPT 2 3 "A Fase "
FIELD A_FASE
COPY USE F_DAFASE
INPUT CODFASE F_AFASE
COPY DISPLAY F_DAFASE
OUTPUT F_AFASE CODFASE
CHECKTYPE SEARCH
END
STRING F_REPORT 20
BEGIN
PROMPT 2 5 "Tipo di stampa "
RSELECT "ca1700"
CHECKTYPE NORMAL
END
BUTTON DLG_PRINT 10 2
BEGIN
PROMPT -12 -1 ""
END
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -22 -1 ""
END
ENDPAGE
ENDMASK

View File

@ -13,6 +13,7 @@ size_t TAnal_report::get_usr_words(TString_array& words) const
"CA_FORMAT_COMMESSA",
"CA_FORMAT_FASE",
"CA_FORMAT_CONTO",
"CA_FORMAT_CMSCDC",
NULL
};
@ -31,10 +32,11 @@ bool TAnal_report::execute_usr_word(unsigned int opcode, TVariant_stack& stack)
opcode -= _first_msg;
switch (opcode)
{
case 0 : msg_format_costo(stack); break;
case 1 : msg_format_commessa(stack); break;
case 2 : msg_format_fase(stack); break;
case 3 : msg_format_conto(stack); break;
case 0 : msg_format_costo(stack); break;
case 1 : msg_format_commessa(stack); break;
case 2 : msg_format_fase(stack); break;
case 3 : msg_format_conto(stack); break;
case 4 : msg_format_commessa_costo(stack); break;
default: break;
}
return true;
@ -81,3 +83,9 @@ void TAnal_report::msg_format_fase (TVariant_stack& stack)
void TAnal_report::msg_format_conto (TVariant_stack& stack)
{ msg_format(LF_PCONANA, stack); }
void TAnal_report::msg_format_commessa_costo(TVariant_stack& stack)
{
const TMultilevel_code_info& main_info = ca_multilevel_code_info(LF_FASI);
msg_format(main_info.parent(), stack);
}

View File

@ -18,10 +18,11 @@ protected: // protected is safer
virtual bool execute_usr_word(unsigned int opcode, TVariant_stack& stack);
void msg_format(int logicnum, TVariant_stack& stack);
void msg_format_costo (TVariant_stack& stack);
void msg_format_commessa(TVariant_stack& stack);
void msg_format_fase (TVariant_stack& stack);
void msg_format_conto (TVariant_stack& stack);
void msg_format_costo (TVariant_stack& stack);
void msg_format_commessa (TVariant_stack& stack);
void msg_format_fase (TVariant_stack& stack);
void msg_format_conto (TVariant_stack& stack);
void msg_format_commessa_costo(TVariant_stack& stack);
public: // meglio pubic?
};