From 063e4effb55d7abe3520394fc8805513c27f3115 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 1 Apr 2005 11:23:49 +0000 Subject: [PATCH] Patch level : 2.2 66 Files correlati : ca1.exe Ricompilazione Demo : [ ] Commento : Prima versione tampe anagrafiche git-svn-id: svn://10.65.10.50/trunk@12890 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ca/ca1400.cpp | 46 +++++++++++++++++++++------------- ca/ca1400.rep | 55 ++++++++++++++++++++++++++++++++++++++++ ca/ca1400a.h | 4 +-- ca/ca1400a.uml | 25 +++++-------------- ca/ca1500.cpp | 43 ++++++++++++++++++------------- ca/ca1500.rep | 61 ++++++++++++++++++++++++++++++++++++++++++++ ca/ca1500a.h | 4 +-- ca/ca1500a.uml | 25 +++++-------------- ca/ca1600.cpp | 41 +++++++++++++++++------------- ca/ca1600.rep | 43 +++++++++++++++++++++++++++++++ ca/ca1600a.h | 4 +-- ca/ca1600a.uml | 25 +++++-------------- ca/ca1700.cpp | 45 +++++++++++++++++++-------------- ca/ca1700.rep | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ ca/ca1700a.h | 4 +-- ca/ca1700a.uml | 25 +++++-------------- 16 files changed, 362 insertions(+), 156 deletions(-) create mode 100755 ca/ca1400.rep create mode 100755 ca/ca1500.rep create mode 100755 ca/ca1600.rep create mode 100755 ca/ca1700.rep diff --git a/ca/ca1400.cpp b/ca/ca1400.cpp index 9d9ce24c3..d3681e4a4 100755 --- a/ca/ca1400.cpp +++ b/ca/ca1400.cpp @@ -7,6 +7,28 @@ #include "calib01.h" #include "calib02.h" +class TMask_print_pdc : public TAutomask +{ + +protected: + bool on_field_event(TOperable_field& o, TField_event e, long jolly) {return true;} +public: + TMask_print_pdc(); + virtual ~TMask_print_pdc() {} +}; + +TMask_print_pdc::TMask_print_pdc() + :TAutomask("ca1400a") +{ + ca_create_fields(*this, LF_PCONANA, 2, 2, F_DACONTO, F_DACONTO + 100, 0x0, "#DACONTO"); + int nfields = ca_create_fields(*this, LF_PCONANA, 2, 8, F_ACONTO, F_ACONTO + 100, 0x0, "#ACONTO"); + for (int i = 0; i < nfields; i++) + { + field(F_DACONTO + i).set_group(1); + field(F_ACONTO + i).set_group(2); + } +} + class TPrint_pdc : public TSkeleton_application { bool create(); @@ -37,33 +59,21 @@ bool TPrint_pdc::create() void TPrint_pdc::main_loop() { TFilename path; - TMask m("ca1400a");; + TMask_print_pdc m; + 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); - } - } + rep.load(path); + rep.mask2report(m); book.add(rep); book.print_or_preview(); + } } diff --git a/ca/ca1400.rep b/ca/ca1400.rep new file mode 100755 index 000000000..5b35fdb6a --- /dev/null +++ b/ca/ca1400.rep @@ -0,0 +1,55 @@ + + + Stampa piano dei conti di analitica + +
+ + "!RAGSOC" +#REPORT.FIRM + + + #SYSTEM.DATE + + + #REPORT.PAGE + + + + + + + + + + + + + + + + + +
+
+
+
+ + CODCONTO + MESSAGE_FORMAT_CONTO + + + DESCR + + + SEZSALDI + + + SOSPESO + +
+
+
+ USE 106 +FROM #DACONTO +TO #ACONTO + \ No newline at end of file diff --git a/ca/ca1400a.h b/ca/ca1400a.h index b081796a2..98faacdd4 100755 --- a/ca/ca1400a.h +++ b/ca/ca1400a.h @@ -1,3 +1,3 @@ #define F_DACONTO 101 -#define F_ACONTO 102 -#define F_REPORT 103 \ No newline at end of file +#define F_ACONTO 110 +#define F_REPORT 120 \ No newline at end of file diff --git a/ca/ca1400a.uml b/ca/ca1400a.uml index fa5544b87..70b9cfc43 100755 --- a/ca/ca1400a.uml +++ b/ca/ca1400a.uml @@ -1,33 +1,20 @@ #include "ca1400a.h" -PAGE "Stampa piano dei conti analitica" -1 -1 80 8 +PAGE "Stampa piano dei conti analitica" -1 -1 80 17 -STRING F_DACONTO 20 +GROUPBOX DLG_NULL 78 6 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 + PROMPT 2 1 "Da conto" END -STRING F_ACONTO 20 +GROUPBOX DLG_NULL 78 6 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 + PROMPT 2 7 "A conto" END STRING F_REPORT 20 BEGIN - PROMPT 2 5 "Tipo di stampa " + PROMPT 2 14 "Tipo di stampa " RSELECT "ca1400" CHECKTYPE NORMAL END diff --git a/ca/ca1500.cpp b/ca/ca1500.cpp index 38595f3e9..2ce2fcf5d 100755 --- a/ca/ca1500.cpp +++ b/ca/ca1500.cpp @@ -6,6 +6,27 @@ #include "calib01.h" #include "calib02.h" +class TMask_print_cdc : public TAutomask +{ + +protected: + bool on_field_event(TOperable_field& o, TField_event e, long jolly) {return true;} +public: + TMask_print_cdc(); + virtual ~TMask_print_cdc() {} +}; + +TMask_print_cdc::TMask_print_cdc() + :TAutomask("ca1500a") +{ + ca_create_fields(*this, LF_CDC, 2, 2, F_DACDC, F_DACDC + 100, 0x0, "#DACDC"); + int nfields = ca_create_fields(*this, LF_CDC, 2, 8, F_ACDC, F_ACDC + 100, 0x0, "#ACDC"); + for (int i = 0; i < nfields; i++) + { + field(F_DACDC + i).set_group(1); + field(F_ACDC + i).set_group(2); + } +} class TPrint_cdc : public TSkeleton_application { @@ -19,7 +40,7 @@ bool TPrint_cdc::create() { const TMultilevel_code_info& mci = ca_multilevel_code_info(LF_CDC); if (mci.levels() <= 0) - return error_box(TR("I centri di costo non sono stati configurati")); + return error_box(TR("I centri di costo non sono stati configurati")); return TSkeleton_application::create(); } @@ -27,7 +48,7 @@ bool TPrint_cdc::create() void TPrint_cdc::main_loop() { TFilename path; - TMask m("ca1500a");; + TMask_print_cdc m; while (m.run() == K_ENTER) { TReport_book book; @@ -37,22 +58,8 @@ void TPrint_cdc::main_loop() 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); - } - } + rep.load(path); + rep.mask2report(m); book.add(rep); book.print_or_preview(); } diff --git a/ca/ca1500.rep b/ca/ca1500.rep new file mode 100755 index 000000000..6265960bb --- /dev/null +++ b/ca/ca1500.rep @@ -0,0 +1,61 @@ + + + Stampa centri di costo di analitica + +
+ + "!RAGSOC" +#REPORT.FIRM + + + #SYSTEM.DATE + + + #REPORT.PAGE + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + CODCOSTO + MESSAGE_FORMAT_COSTO + + + DESCRIZ + DESCRAGG + + + ADDETTI + + + GESTFASI + + + APPOGGIO + +
+
+
+ USE 146 +FROM #DACDC +TO #ACDC + \ No newline at end of file diff --git a/ca/ca1500a.h b/ca/ca1500a.h index a8dc4d22a..4d60e8635 100755 --- a/ca/ca1500a.h +++ b/ca/ca1500a.h @@ -1,3 +1,3 @@ #define F_DACDC 101 -#define F_ACDC 102 -#define F_REPORT 103 \ No newline at end of file +#define F_ACDC 110 +#define F_REPORT 120 \ No newline at end of file diff --git a/ca/ca1500a.uml b/ca/ca1500a.uml index abfa3a7e7..b2bfd7f4e 100755 --- a/ca/ca1500a.uml +++ b/ca/ca1500a.uml @@ -1,33 +1,20 @@ #include "ca1500a.h" -PAGE "Stampa centri di costo" -1 -1 80 8 +PAGE "Stampa centri di costo" -1 -1 80 17 -STRING F_DACDC 20 +GROUPBOX DLG_NULL 78 6 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 + PROMPT 2 1 "Da centro di costo" END -STRING F_ACDC 20 +GROUPBOX DLG_NULL 78 6 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 + PROMPT 2 7 "A centro di costo" END STRING F_REPORT 20 BEGIN - PROMPT 2 5 "Tipo di stampa " + PROMPT 2 14 "Tipo di stampa " RSELECT "ca1500" CHECKTYPE NORMAL END diff --git a/ca/ca1600.cpp b/ca/ca1600.cpp index d6ab876eb..56f949fb4 100755 --- a/ca/ca1600.cpp +++ b/ca/ca1600.cpp @@ -6,6 +6,27 @@ #include "calib01.h" #include "calib02.h" +class TMask_print_cms : public TAutomask +{ + +protected: + bool on_field_event(TOperable_field& o, TField_event e, long jolly) {return true;} +public: + TMask_print_cms(); + virtual ~TMask_print_cms() {} +}; + +TMask_print_cms::TMask_print_cms() + :TAutomask("ca1600a") +{ + ca_create_fields(*this, LF_COMMESSE, 2, 2, F_DACMS, F_DACMS + 100, 0x0, "#DACMS"); + int nfields = ca_create_fields(*this, LF_COMMESSE, 2, 8, F_ACMS, F_ACMS + 100, 0x0, "#ACMS"); + for (int i = 0; i < nfields; i++) + { + field(F_DACMS + i).set_group(1); + field(F_ACMS + i).set_group(2); + } +} class TPrint_cms : public TSkeleton_application { @@ -27,7 +48,7 @@ bool TPrint_cms::create() void TPrint_cms::main_loop() { TFilename path; - TMask m("ca1600a");; + TMask_print_cms m; while (m.run() == K_ENTER) { TReport_book book; @@ -37,22 +58,8 @@ void TPrint_cms::main_loop() 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); - } - } + rep.load(path); + rep.mask2report(m); book.add(rep); book.print_or_preview(); } diff --git a/ca/ca1600.rep b/ca/ca1600.rep new file mode 100755 index 000000000..5c8062203 --- /dev/null +++ b/ca/ca1600.rep @@ -0,0 +1,43 @@ + + + Stampa commesse di analitica + +
+ + "!RAGSOC" +#REPORT.FIRM + + + #SYSTEM.DATE + + + #REPORT.PAGE + + + + + + + + + + + +
+
+
+
+ + CODCMS + MESSAGE_FORMAT_COMMESSA + + + DESCRIZ + DESCRAGG + +
+
+
+ USE 147 +FROM #DACMS +TO #ACMS + \ No newline at end of file diff --git a/ca/ca1600a.h b/ca/ca1600a.h index 8ad361857..880666487 100755 --- a/ca/ca1600a.h +++ b/ca/ca1600a.h @@ -1,3 +1,3 @@ #define F_DACMS 101 -#define F_ACMS 102 -#define F_REPORT 103 \ No newline at end of file +#define F_ACMS 110 +#define F_REPORT 120 \ No newline at end of file diff --git a/ca/ca1600a.uml b/ca/ca1600a.uml index e328e5f20..feca65acd 100755 --- a/ca/ca1600a.uml +++ b/ca/ca1600a.uml @@ -1,33 +1,20 @@ #include "ca1600a.h" -PAGE "Stampa commesse" -1 -1 80 8 +PAGE "Stampa commesse" -1 -1 80 17 -STRING F_DACMS 20 +GROUPBOX DLG_NULL 78 6 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 + PROMPT 2 1 "Da commess" END -STRING F_ACMS 20 +GROUPBOX DLG_NULL 78 6 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 + PROMPT 2 7 "A commessa" END STRING F_REPORT 20 BEGIN - PROMPT 2 5 "Tipo di stampa " + PROMPT 2 14 "Tipo di stampa " RSELECT "ca1600" CHECKTYPE NORMAL END diff --git a/ca/ca1700.cpp b/ca/ca1700.cpp index f361e0d66..c93f689f9 100755 --- a/ca/ca1700.cpp +++ b/ca/ca1700.cpp @@ -6,6 +6,27 @@ #include "calib01.h" #include "calib02.h" +class TMask_print_fasi : public TAutomask +{ + +protected: + bool on_field_event(TOperable_field& o, TField_event e, long jolly) {return true;} +public: + TMask_print_fasi(); + virtual ~TMask_print_fasi() {} +}; + +TMask_print_fasi::TMask_print_fasi() + :TAutomask("ca1700a") +{ + ca_create_fields(*this, LF_FASI, 2, 2, F_DAFASE, F_DAFASE + 100, 0x0, "#DAFASE"); + int nfields = ca_create_fields(*this, LF_FASI, 2, 8, F_AFASE, F_AFASE + 100, 0x0, "#AFASE"); + for (int i = 0; i < nfields; i++) + { + field(F_DAFASE + i).set_group(1); + field(F_AFASE + i).set_group(2); + } +} class TPrint_fasi : public TSkeleton_application { @@ -18,8 +39,8 @@ public: bool TPrint_fasi::create() { const TMultilevel_code_info& mci = ca_multilevel_code_info(LF_FASI); - if (mci.levels() <= 0) - return error_box(TR("Le fasi non sono state configurate")); +// if (mci.levels() <= 0) +// return error_box(TR("Le fasi non sono state configurate")); return TSkeleton_application::create(); } @@ -27,7 +48,7 @@ bool TPrint_fasi::create() void TPrint_fasi::main_loop() { TFilename path; - TMask m("ca1700a");; + TMask_print_fasi m; while (m.run() == K_ENTER) { TReport_book book; @@ -37,22 +58,8 @@ void TPrint_fasi::main_loop() 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); - } - } + rep.load(path); + rep.mask2report(m); book.add(rep); book.print_or_preview(); } diff --git a/ca/ca1700.rep b/ca/ca1700.rep new file mode 100755 index 000000000..0b8043d4e --- /dev/null +++ b/ca/ca1700.rep @@ -0,0 +1,68 @@ + + + Stampa fasi di analitica + +
+ + "!RAGSOC" +#REPORT.FIRM + + + #SYSTEM.DATE + + + #REPORT.PAGE + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + CODCMSFAS + MESSAGE_FORMAT_CMSCDC + + + DESCRIZ + + + DATAINIZIO + + + DATAFINE + + + CODFASE + MESSAGE_FORMAT_FASE + + + DATAPROR + +
+
+
+ USE 148 +FROM #DAFASE +TO #AFASE + \ No newline at end of file diff --git a/ca/ca1700a.h b/ca/ca1700a.h index 4886c5601..851f17270 100755 --- a/ca/ca1700a.h +++ b/ca/ca1700a.h @@ -1,3 +1,3 @@ #define F_DAFASE 101 -#define F_AFASE 102 -#define F_REPORT 103 \ No newline at end of file +#define F_AFASE 110 +#define F_REPORT 120 \ No newline at end of file diff --git a/ca/ca1700a.uml b/ca/ca1700a.uml index 077492019..38520b5a7 100755 --- a/ca/ca1700a.uml +++ b/ca/ca1700a.uml @@ -1,33 +1,20 @@ #include "ca1700a.h" -PAGE "Stampa fasi" -1 -1 80 8 +PAGE "Stampa fasi" -1 -1 80 17 -STRING F_DAFASE 10 +GROUPBOX DLG_NULL 78 6 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 + PROMPT 2 1 "Da fase" END -STRING F_AFASE 10 +GROUPBOX DLG_NULL 78 6 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 + PROMPT 2 7 "A fase" END STRING F_REPORT 20 BEGIN - PROMPT 2 5 "Tipo di stampa " + PROMPT 2 14 "Tipo di stampa " RSELECT "ca1700" CHECKTYPE NORMAL END